-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
examples/suit_update: add vfs storage for native
- Loading branch information
Showing
4 changed files
with
55 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,14 @@ | ||
ifeq ($(BOARD),native) | ||
USEMODULE += suit_storage_ram | ||
USEMODULE += netdev_default | ||
# Use VFS storage for native | ||
USEMODULE += suit_storage_vfs | ||
## Use VFS | ||
USEMODULE += vfs | ||
## Use default storage | ||
USEMODULE += vfs_default | ||
## Auto-format on mount | ||
USEMODULE += vfs_auto_format | ||
else | ||
USEMODULE += suit_storage_flashwrite | ||
endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Required variables defined in riotboot.inc.mk or Makefile.include | ||
BINDIR_APP = $(CURDIR)/bin/$(BOARD)/$(APPLICATION) | ||
$(BINDIR_APP): $(CLEAN) | ||
$(Q)mkdir -p $(BINDIR_APP) | ||
|
||
# Include to be able to use memoized | ||
include $(RIOTBASE)/makefiles/utils/variables.mk | ||
EPOCH = $(call memoized,EPOCH,$(shell date +%s)) | ||
APP_VER ?= $(EPOCH) | ||
|
||
# Default addressing if following README.native.md | ||
ifeq ($(BOARD),native) | ||
SUIT_CLIENT ?= [2001:db8::2] | ||
SUIT_COAP_SERVER ?= [2001:db8::1] | ||
endif | ||
|
||
ifeq ($(BOARD),native) | ||
# Set settings for publishing fake fw payloads to native | ||
SUIT_NATIVE_PAYLOAD ?= "AABBCCDD" | ||
SUIT_NATIVE_PAYLOAD_BIN ?= $(BINDIR_APP)/fw.$(APP_VER).bin | ||
# Make sure it is built | ||
BUILD_FILES += $(SUIT_NATIVE_PAYLOAD_BIN) | ||
|
||
$(SUIT_NATIVE_PAYLOAD_BIN): $(BINDIR_APP) | ||
$(Q)echo $(SUIT_NATIVE_PAYLOAD) > $@ | ||
|
||
SUIT_FW_STORAGE ?= /nvm0/SLOT0.TXT | ||
SUIT_MANIFEST_PAYLOADS ?= $(SUIT_NATIVE_PAYLOAD_BIN) | ||
SUIT_MANIFEST_SLOTFILES ?= $(SUIT_NATIVE_PAYLOAD_BIN):0:$(SUIT_FW_STORAGE) | ||
endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters