mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
makefiles/suit.inc.mk: refactor file storage and naming
- move all generated manifests under $(BINDIR)/suit_files (this can be overwritten. - rename signed manifests so that they are of the form: <somename>.<version>.bin, where <somename> is by default riot.suit. This avoids cluterring BINDIR while as well having a naming scheme that allows custom names for manifests addresssing different types of payloads.
This commit is contained in:
parent
17c6717093
commit
ac5c316361
@ -574,10 +574,10 @@ The following variables are defined in makefiles/suit.inc.mk:
|
||||
|
||||
The following convention is used when naming a manifest
|
||||
|
||||
SUIT_MANIFEST ?= $(BINDIR_APP)-riot.suitv3.$(APP_VER).bin
|
||||
SUIT_MANIFEST_LATEST ?= $(BINDIR_APP)-riot.suitv3.latest.bin
|
||||
SUIT_MANIFEST_SIGNED ?= $(BINDIR_APP)-riot.suitv3_signed.$(APP_VER).bin
|
||||
SUIT_MANIFEST_SIGNED_LATEST ?= $(BINDIR_APP)-riot.suitv3_signed.latest.bin
|
||||
SUIT_MANIFEST ?= $(BINDIR_RIOTBOOT)/riot.suitv3.$(APP_VER).bin
|
||||
SUIT_MANIFEST_LATEST ?= $(BINDIR_RIOTBOOT)/riot.suitv3.latest.bin
|
||||
SUIT_MANIFEST_SIGNED ?= $(BINDIR_RIOTBOOT)/riot.suitv3_signed.$(APP_VER).bin
|
||||
SUIT_MANIFEST_SIGNED_LATEST ?= $(BINDIR_RIOTBOOT)/riot.suitv3_signed.latest.bin
|
||||
|
||||
The following default values are using for generating the manifest:
|
||||
|
||||
|
@ -4,20 +4,24 @@
|
||||
# makefiles/suit.base.inc.mk
|
||||
#
|
||||
#
|
||||
SUIT_COAP_BASEPATH ?= fw/$(BOARD)
|
||||
SUIT_COAP_BASEPATH ?= fw/$(APPLICATION)/$(BOARD)
|
||||
SUIT_COAP_SERVER ?= localhost
|
||||
SUIT_COAP_ROOT ?= coap://$(SUIT_COAP_SERVER)/$(SUIT_COAP_BASEPATH)
|
||||
SUIT_COAP_FSROOT ?= $(RIOTBASE)/coaproot
|
||||
|
||||
BINDIR_SUIT = $(BINDIR)/suit_files
|
||||
$(BINDIR_SUIT): $(CLEAN)
|
||||
$(Q)mkdir -p $(BINDIR_SUIT)
|
||||
|
||||
#
|
||||
SUIT_MANIFEST_BASENAME ?= riot.suit
|
||||
SUIT_MANIFEST ?= $(BINDIR_APP)-$(SUIT_MANIFEST_BASENAME).$(APP_VER).bin
|
||||
SUIT_MANIFEST_LATEST ?= $(BINDIR_APP)-$(SUIT_MANIFEST_BASENAME).latest.bin
|
||||
SUIT_MANIFEST_SIGNED ?= $(BINDIR_APP)-$(SUIT_MANIFEST_BASENAME)_signed.$(APP_VER).bin
|
||||
SUIT_MANIFEST_SIGNED_LATEST ?= $(BINDIR_APP)-$(SUIT_MANIFEST_BASENAME)_signed.latest.bin
|
||||
SUIT_MANIFEST ?= $(BINDIR_SUIT)/$(SUIT_MANIFEST_BASENAME)_unsigned.$(APP_VER).bin
|
||||
SUIT_MANIFEST_LATEST ?= $(BINDIR_SUIT)/$(SUIT_MANIFEST_BASENAME)_unsigned.latest.bin
|
||||
SUIT_MANIFEST_SIGNED ?= $(BINDIR_SUIT)/$(SUIT_MANIFEST_BASENAME).$(APP_VER).bin
|
||||
SUIT_MANIFEST_SIGNED_LATEST ?= $(BINDIR_SUIT)/$(SUIT_MANIFEST_BASENAME).latest.bin
|
||||
|
||||
SUIT_NOTIFY_VERSION ?= latest
|
||||
SUIT_NOTIFY_MANIFEST ?= $(APPLICATION)-$(SUIT_MANIFEST_BASENAME)_signed.$(SUIT_NOTIFY_VERSION).bin
|
||||
SUIT_NOTIFY_MANIFEST ?= $(SUIT_MANIFEST_BASENAME).$(SUIT_NOTIFY_VERSION).bin
|
||||
|
||||
# Long manifest names require more buffer space when parsing
|
||||
export CFLAGS += -DCONFIG_SOCK_URLPATH_MAXLEN=128
|
||||
@ -26,14 +30,11 @@ SUIT_VENDOR ?= "riot-os.org"
|
||||
SUIT_SEQNR ?= $(APP_VER)
|
||||
SUIT_CLASS ?= $(BOARD)
|
||||
|
||||
ifneq (,$(filter riotboot,$(USEMODULE)))
|
||||
SUIT_MANIFEST_PAYLOADS ?= $(SLOT0_RIOT_BIN) $(SLOT1_RIOT_BIN)
|
||||
SUIT_MANIFEST_SLOTFILES ?= $(SLOT0_RIOT_BIN):$(SLOT0_OFFSET) \
|
||||
$(SLOT1_RIOT_BIN):$(SLOT1_OFFSET)
|
||||
endif
|
||||
#
|
||||
SUIT_MANIFEST_PAYLOADS ?= $(SLOT0_RIOT_BIN) $(SLOT1_RIOT_BIN)
|
||||
SUIT_MANIFEST_SLOTFILES ?= $(SLOT0_RIOT_BIN):$(SLOT0_OFFSET) \
|
||||
$(SLOT1_RIOT_BIN):$(SLOT1_OFFSET)
|
||||
|
||||
$(SUIT_MANIFEST): $(SUIT_MANIFEST_PAYLOADS)
|
||||
$(SUIT_MANIFEST): $(SUIT_MANIFEST_PAYLOADS) $(BINDIR_SUIT)
|
||||
$(Q)$(RIOTBASE)/dist/tools/suit/gen_manifest.py \
|
||||
--urlroot $(SUIT_COAP_ROOT) \
|
||||
--seqnr $(SUIT_SEQNR) \
|
||||
@ -55,9 +56,7 @@ $(SUIT_MANIFEST_LATEST): $(SUIT_MANIFEST)
|
||||
$(SUIT_MANIFEST_SIGNED_LATEST): $(SUIT_MANIFEST_SIGNED)
|
||||
$(Q)ln -f -s $< $@
|
||||
|
||||
SUIT_MANIFESTS := $(SUIT_MANIFEST) \
|
||||
$(SUIT_MANIFEST_LATEST) \
|
||||
$(SUIT_MANIFEST_SIGNED) \
|
||||
SUIT_MANIFESTS := $(SUIT_MANIFEST_SIGNED) \
|
||||
$(SUIT_MANIFEST_SIGNED_LATEST)
|
||||
|
||||
suit/manifest: $(SUIT_MANIFESTS)
|
||||
|
Loading…
Reference in New Issue
Block a user