mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-12-27 07:21:18 +01:00
Merge pull request #7948 from kaspar030/cleanup_mcuboot
make: cleanup mcuboot support
This commit is contained in:
commit
663bd8a71c
@ -567,6 +567,6 @@ CFLAGS := $(patsubst -D%,,$(CFLAGS))
|
||||
CFLAGS := $(patsubst -U%,,$(CFLAGS))
|
||||
CFLAGS += -include '$(RIOTBUILD_CONFIG_HEADER_C)'
|
||||
|
||||
# include multislot support
|
||||
include $(RIOTMAKE)/multislot.mk
|
||||
# include mcuboot support
|
||||
include $(RIOTMAKE)/mcuboot.mk
|
||||
endif # BOARD=none
|
||||
|
||||
@ -1,5 +1,3 @@
|
||||
# include module specific includes
|
||||
INCLUDES += -I$(RIOTCPU)/cortexm_common/include
|
||||
INCLUDES += -I$(RIOTCPU)/cortexm_common/include/vendor
|
||||
|
||||
export IMAGE_HDR_SIZE ?= 512
|
||||
|
||||
@ -11,7 +11,9 @@ MCUBOOT_BIN ?= $(BINDIR)/mcuboot.bin
|
||||
MCUBOOT_BIN_URL ?= http://download.riot-os.org/mynewt.mcuboot.bin
|
||||
MCUBOOT_BIN_MD5 ?= 0c71a0589bd3709fc2d90f07a0035ce7
|
||||
|
||||
create-key: $(MCUBOOT_KEYFILE)
|
||||
export IMAGE_HDR_SIZE ?= 512
|
||||
|
||||
mcuboot-create-key: $(MCUBOOT_KEYFILE)
|
||||
|
||||
ifeq ($(BINDIR)/key.pem,$(MCUBOOT_KEYFILE))
|
||||
$(MCUBOOT_KEYFILE):
|
||||
@ -19,7 +21,7 @@ $(MCUBOOT_KEYFILE):
|
||||
$(Q)$(IMGTOOL) keygen -k $@ -t rsa-2048
|
||||
endif
|
||||
|
||||
mcuboot: create-key link
|
||||
mcuboot: mcuboot-create-key link
|
||||
@$(COLOR_ECHO)
|
||||
@$(COLOR_ECHO) '${COLOR_PURPLE}Re-linking for MCUBoot at $(SLOT0_SIZE)...${COLOR_RESET}'
|
||||
@$(COLOR_ECHO)
|
||||
@ -37,14 +39,14 @@ mcuboot: create-key link
|
||||
$(MCUBOOT_BIN):
|
||||
$(Q)$(DLCACHE) $(MCUBOOT_BIN_URL) $(MCUBOOT_BIN_MD5) $@
|
||||
|
||||
.PHONY: flash-bootloader flash-mcuboot
|
||||
.PHONY: mcuboot-flash-bootloader mcuboot-flash
|
||||
|
||||
flash-bootloader: HEXFILE = $(MCUBOOT_BIN)
|
||||
flash-bootloader: $(MCUBOOT_BIN) $(FLASHDEPS)
|
||||
mcuboot-flash-bootloader: HEXFILE = $(MCUBOOT_BIN)
|
||||
mcuboot-flash-bootloader: $(MCUBOOT_BIN) $(FLASHDEPS)
|
||||
FLASH_ADDR=0x0 $(FLASHER) $(FFLAGS)
|
||||
|
||||
flash-mcuboot: HEXFILE = $(SIGN_BINFILE)
|
||||
flash-mcuboot: mcuboot $(FLASHDEPS) flash-bootloader
|
||||
mcuboot-flash: HEXFILE = $(SIGN_BINFILE)
|
||||
mcuboot-flash: mcuboot $(FLASHDEPS) mcuboot-flash-bootloader
|
||||
FLASH_ADDR=$(SLOT0_SIZE) $(FLASHER) $(FFLAGS)
|
||||
|
||||
else
|
||||
@ -26,7 +26,7 @@ pip3 install --user pycrypto ecdsa pyasn1
|
||||
```
|
||||
|
||||
This test can be called using `make mcuboot` to produce such ELF file,
|
||||
which can also be flashed using `make flash-mcuboot`.This command also flashes
|
||||
which can also be flashed using `make mcuboot-flash`.This command also flashes
|
||||
the pre-compiled bootloader.
|
||||
|
||||
It's also possible to build and flash MCUBoot by following the instructions on
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user