diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2019-08-15 10:58:08 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2019-08-15 10:58:08 +0200 |
commit | bd1fbce74f79d647af4ee338f9193351811e80f4 (patch) | |
tree | dc119b20a406c2f7f9df0d1b7990deb876a402a4 /images | |
parent | 53e145d550c1ee9db907fccd7ad4d98d6aee806b (diff) | |
parent | dd5dfb6ff467f6d640e48046acedfe435c649c94 (diff) | |
download | barebox-bd1fbce74f79d647af4ee338f9193351811e80f4.tar.gz barebox-bd1fbce74f79d647af4ee338f9193351811e80f4.tar.xz |
Merge branch 'for-next/imx8-hab'
Diffstat (limited to 'images')
-rw-r--r-- | images/Makefile | 22 | ||||
-rw-r--r-- | images/Makefile.imx | 11 | ||||
-rw-r--r-- | images/sha_sum.S | 7 |
3 files changed, 35 insertions, 5 deletions
diff --git a/images/Makefile b/images/Makefile index 293e644319..907986e2d0 100644 --- a/images/Makefile +++ b/images/Makefile @@ -57,11 +57,12 @@ quiet_cmd_elf__ ?= LD $@ cmd_elf__ ?= $(LD) $(LDFLAGS_barebox) --gc-sections \ -e $(2) -Map $@.map $(LDFLAGS_$(@F)) -o $@ \ -T $(pbl-lds) \ - --start-group $(barebox-pbl-common) $(obj)/piggy.o --end-group + --start-group $(barebox-pbl-common) $(obj)/piggy.o \ + $(obj)/sha_sum.o --end-group PBL_CPPFLAGS += -fdata-sections -ffunction-sections -$(obj)/%.pbl: $(pbl-lds) $(barebox-pbl-common) $(obj)/piggy.o FORCE +$(obj)/%.pbl: $(pbl-lds) $(barebox-pbl-common) $(obj)/piggy.o $(obj)/sha_sum.o FORCE $(call if_changed,elf__,$(*F)) $(obj)/%.pblb: $(obj)/%.pbl FORCE @@ -111,6 +112,21 @@ suffix_$(CONFIG_IMAGE_COMPRESSION_NONE) = comp_copy $(obj)/piggy.o: $(obj)/barebox.z FORCE +$(obj)/sha_sum.o: $(obj)/barebox.sha.bin FORCE + +quiet_cmd_sha256bin ?= SHA-BIN $@ + cmd_sha256bin ?= printf "$(shell awk '{printf $$1}' < $(obj)/barebox.sum | sed -e 's/../\\x&/g' )" > $@ + +quiet_cmd_sha256sum ?= SHA $@ + cmd_sha256sum ?= sha256sum $(obj)/barebox.z > $@ + +$(obj)/barebox.sha.bin: $(obj)/barebox.sum FORCE + $(call if_changed,sha256bin) + +$(obj)/barebox.sum: $(obj)/barebox.z FORCE + $(call if_changed,sha256sum) + + # barebox.z - compressed barebox binary # ---------------------------------------------------------------- $(obj)/barebox.z: $(obj)/../barebox.bin FORCE @@ -152,7 +168,7 @@ ifneq ($(pblx-y)$(pblx-),) $(error pblx- has been removed. Please use pblb- instead.) endif -targets += $(image-y) pbl.lds barebox.x barebox.z piggy.o +targets += $(image-y) pbl.lds barebox.x barebox.z piggy.o sha_sum.o barebox.sha.bin barebox.sum targets += $(patsubst %,%.pblb,$(pblb-y)) targets += $(patsubst %,%.pbl,$(pblb-y)) targets += $(patsubst %,%.s,$(pblb-y)) diff --git a/images/Makefile.imx b/images/Makefile.imx index dcec181779..84c4071b6c 100644 --- a/images/Makefile.imx +++ b/images/Makefile.imx @@ -8,6 +8,14 @@ $(obj)/%.imximg: $(obj)/% FORCE $(call if_changed,imx_image,$(CFG_$(@F)),) +$(obj)/%.pimximg: $(obj)/% FORCE + $(call if_changed,imx_image,$(CFG_$(patsubst %.pimximg,%.imximg,$(@F))),\ + -p $($(patsubst $(obj)/%.pblb,PBL_MEMORY_SIZE_%,$<))) + +$(obj)/%.psimximg: $(obj)/% FORCE + $(call if_changed,imx_image,$(CFG_$(patsubst %.psimximg,%.imximg,$(@F))),-s \ + -p $($(patsubst $(obj)/%.pblb,PBL_MEMORY_SIZE_%,$<))) + $(obj)/%.simximg: $(obj)/% FORCE $(call if_changed,imx_image,$(CFG_$(patsubst %.simximg,%.imximg,$(@F))),-s) @@ -579,8 +587,7 @@ image-$(CONFIG_MACH_ZII_IMX7D_DEV) += barebox-zii-imx7d-dev.img # ----------------------- i.MX8mq based boards -------------------------- pblb-$(CONFIG_MACH_NXP_IMX8MQ_EVK) += start_nxp_imx8mq_evk CFG_start_nxp_imx8mq_evk.pblb.imximg = $(board)/nxp-imx8mq-evk/flash-header-imx8mq-evk.imxcfg -MAX_PBL_MEMORY_SIZE_start_nxp_imx8mq_evk = 0x3f000 -FILE_barebox-nxp-imx8mq-evk.img = start_nxp_imx8mq_evk.pblb.imximg +FILE_barebox-nxp-imx8mq-evk.img = start_nxp_imx8mq_evk.pblb.pimximg image-$(CONFIG_MACH_NXP_IMX8MQ_EVK) += barebox-nxp-imx8mq-evk.img pblb-$(CONFIG_MACH_ZII_IMX8MQ_DEV) += start_zii_imx8mq_dev diff --git a/images/sha_sum.S b/images/sha_sum.S new file mode 100644 index 0000000000..5928c206a8 --- /dev/null +++ b/images/sha_sum.S @@ -0,0 +1,7 @@ +/* SPDX-License-Identifier: GPL-2.0 */ + .section .shasum,"a" + .globl sha_sum +sha_sum: + .incbin "images/barebox.sha.bin" + .globl sha_sum_end +sha_sum_end: |