Merge pull request #11803 from kaspar030/misc_riotboot_fixes

sys/riotboot: misc fixes
This commit is contained in:
Francisco 2019-07-15 14:41:18 +02:00 committed by GitHub
commit 9f20c8a057
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -17,12 +17,13 @@ export SLOT0_OFFSET SLOT0_LEN SLOT1_OFFSET SLOT1_LEN
ifeq (1, RIOT_CI_BUILD)
APP_VER ?= 0
else
APP_VER ?= $(shell date +%s)
EPOCH := $(shell date +%s)
APP_VER ?= $(EPOCH)
endif
# Final target for slot 0 with riot_hdr
SLOT0_RIOT_BIN = $(BINDIR_APP)-slot0.riot.bin
SLOT1_RIOT_BIN = $(BINDIR_APP)-slot1.riot.bin
SLOT0_RIOT_BIN = $(BINDIR_APP)-slot0.$(APP_VER).riot.bin
SLOT1_RIOT_BIN = $(BINDIR_APP)-slot1.$(APP_VER).riot.bin
SLOT_RIOT_BINS = $(SLOT0_RIOT_BIN) $(SLOT1_RIOT_BIN)
# if RIOTBOOT_SKIP_COMPILE is set to 1, "make riotboot/slot[01](-flash)"
@ -53,7 +54,7 @@ link: $(SLOT_RIOT_ELFS)
endif
# Create binary target with RIOT header
$(SLOT_RIOT_BINS): %.riot.bin: %.hdr %.bin
$(SLOT_RIOT_BINS): %.$(APP_VER).riot.bin: %.hdr %.bin
@echo "creating $@..."
$(Q)cat $^ > $@