Commit 1f6a664802a4044779b9aebe03b9af6d2745de5f
Committed by
Stefano Babic
1 parent
3de6c7fc00
Exists in
v2017.01-smarct4x
and in
25 other branches
Makefile: preserve output for images that can contain HAB Blocks
To being able to sign created binaries, we need to know the HAB Blocks for that image. Especially for the imximage type the HAB Blocks are only available during creation of the image. We want to preserve the information until we get to sign the files. In the verbose case we still get them printed out instead of writing to log files. Cc: sbabic@denx.de v2-Changes: - No usage of MKIMAGEOUTPUT_$(@F) macro. - Predefine default value /dev/null in every involved Makefile. Signed-off-by: Sven Ebenfeld <sven.ebenfeld@gmail.com> Reviewed-by: George McCollister <george.mccollister@gmail.com> Tested-by: George McCollister <george.mccollister@gmail.com>
Showing 6 changed files with 17 additions and 5 deletions Side-by-side Diff
.gitignore
Makefile
... | ... | @@ -813,9 +813,11 @@ |
813 | 813 | quiet_cmd_efipayload = OBJCOPY $@ |
814 | 814 | cmd_efipayload = $(OBJCOPY) -I binary -O $(EFIPAYLOAD_BFDTARGET) -B $(EFIPAYLOAD_BFDARCH) $< $@ |
815 | 815 | |
816 | +MKIMAGEOUTPUT ?= /dev/null | |
817 | + | |
816 | 818 | quiet_cmd_mkimage = MKIMAGE $@ |
817 | 819 | cmd_mkimage = $(objtree)/tools/mkimage $(MKIMAGEFLAGS_$(@F)) -d $< $@ \ |
818 | - $(if $(KBUILD_VERBOSE:1=), >/dev/null) | |
820 | + $(if $(KBUILD_VERBOSE:1=), >$(MKIMAGEOUTPUT)) | |
819 | 821 | |
820 | 822 | quiet_cmd_cat = CAT $@ |
821 | 823 | cmd_cat = cat $(filter-out $(PHONY), $^) > $@ |
... | ... | @@ -945,6 +947,8 @@ |
945 | 947 | MKIMAGEFLAGS_u-boot-ivt.img = -A $(ARCH) -T firmware_ivt -C none -O u-boot \ |
946 | 948 | -a $(CONFIG_SYS_TEXT_BASE) -e $(CONFIG_SYS_UBOOT_START) \ |
947 | 949 | -n "U-Boot $(UBOOTRELEASE) for $(BOARD) board" |
950 | +u-boot-ivt.img: MKIMAGEOUTPUT = u-boot-ivt.img.log | |
951 | +CLEAN_FILES += u-boot-ivt.img.log u-boot-dtb.imx.log SPL.log u-boot.imx.log | |
948 | 952 | endif |
949 | 953 | |
950 | 954 | MKIMAGEFLAGS_u-boot-dtb.img = $(MKIMAGEFLAGS_u-boot.img) |
arch/arm/imx-common/Makefile
... | ... | @@ -68,6 +68,7 @@ |
68 | 68 | |
69 | 69 | MKIMAGEFLAGS_u-boot.imx = -n $(filter-out $(PLUGIN).bin $< $(PHONY),$^) -T imximage \ |
70 | 70 | -e $(CONFIG_SYS_TEXT_BASE) |
71 | +u-boot.imx: MKIMAGEOUTPUT = u-boot.imx.log | |
71 | 72 | |
72 | 73 | u-boot.imx: u-boot.bin $(IMX_CONFIG) $(PLUGIN).bin FORCE |
73 | 74 | $(call if_changed,mkimage) |
... | ... | @@ -75,6 +76,7 @@ |
75 | 76 | ifeq ($(CONFIG_OF_SEPARATE),y) |
76 | 77 | MKIMAGEFLAGS_u-boot-dtb.imx = -n $(filter-out $(PLUGIN).bin $< $(PHONY),$^) -T imximage \ |
77 | 78 | -e $(CONFIG_SYS_TEXT_BASE) |
79 | +u-boot-dtb.imx: MKIMAGEOUTPUT = u-boot-dtb.imx.log | |
78 | 80 | |
79 | 81 | u-boot-dtb.imx: u-boot-dtb.bin $(IMX_CONFIG) $(PLUGIN).bin FORCE |
80 | 82 | $(call if_changed,mkimage) |
... | ... | @@ -82,6 +84,8 @@ |
82 | 84 | |
83 | 85 | MKIMAGEFLAGS_SPL = -n $(filter-out $(PLUGIN).bin $< $(PHONY),$^) -T imximage \ |
84 | 86 | -e $(CONFIG_SPL_TEXT_BASE) |
87 | + | |
88 | +SPL: MKIMAGEOUTPUT = SPL.log | |
85 | 89 | |
86 | 90 | SPL: spl/u-boot-spl.bin $(IMX_CONFIG) $(PLUGIN).bin FORCE |
87 | 91 | $(call if_changed,mkimage) |
doc/README.imx6
... | ... | @@ -150,7 +150,8 @@ |
150 | 150 | After building, you need to create a command sequence file and use |
151 | 151 | Freescales Code Signing Tool to sign both binaries. After creation, |
152 | 152 | the mkimage tool outputs the required information about the HAB Blocks |
153 | -parameter for the CSF. | |
153 | +parameter for the CSF. During the build, the information is preserved | |
154 | +in log files named as the binaries. (SPL.log and u-boot-ivt.log). | |
154 | 155 | |
155 | 156 | More information about the CSF and HAB can be found in the AN4581. |
156 | 157 | https://cache.freescale.com/files/32bit/doc/app_note/AN4581.pdf |
scripts/Makefile.lib
... | ... | @@ -487,7 +487,8 @@ |
487 | 487 | # |
488 | 488 | # mkimage |
489 | 489 | # --------------------------------------------------------------------------- |
490 | +MKIMAGEOUTPUT ?= /dev/null | |
490 | 491 | quiet_cmd_mkimage = MKIMAGE $@ |
491 | 492 | cmd_mkimage = $(objtree)/tools/mkimage $(MKIMAGEFLAGS_$(@F)) -d $< $@ \ |
492 | - $(if $(KBUILD_VERBOSE:1=), >/dev/null) | |
493 | + $(if $(KBUILD_VERBOSE:1=), >$(MKIMAGEOUTPUT)) |
scripts/Makefile.spl
... | ... | @@ -119,9 +119,11 @@ |
119 | 119 | $(shell $(LD) --version | \ |
120 | 120 | sed -ne 's/GNU ld version \([0-9][0-9]*\)\.\([0-9][0-9]*\).*/-DLD_MAJOR=\1 -DLD_MINOR=\2/p') |
121 | 121 | |
122 | +MKIMAGEOUTPUT ?= /dev/null | |
123 | + | |
122 | 124 | quiet_cmd_mkimage = MKIMAGE $@ |
123 | 125 | cmd_mkimage = $(objtree)/tools/mkimage $(MKIMAGEFLAGS_$(@F)) -d $< $@ \ |
124 | - $(if $(KBUILD_VERBOSE:1=), >/dev/null) | |
126 | + $(if $(KBUILD_VERBOSE:1=), >$(MKIMAGEOUTPUT)) | |
125 | 127 | |
126 | 128 | MKIMAGEFLAGS_MLO = -T omapimage -a $(CONFIG_SPL_TEXT_BASE) |
127 | 129 |