Commit 1f6a6648 authored by Sven Ebenfeld's avatar Sven Ebenfeld Committed by Stefano Babic

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: [email protected]

 - No usage of MKIMAGEOUTPUT_$(@f) macro.
 - Predefine default value /dev/null in every involved Makefile.
Signed-off-by: default avatarSven Ebenfeld <[email protected]>
Reviewed-by: default avatarGeorge McCollister <[email protected]>
Tested-by: default avatarGeorge McCollister <[email protected]>
parent 3de6c7fc
......@@ -31,7 +31,7 @@
# Top-level generic files
......@@ -813,9 +813,11 @@ cmd_zobjcopy = $(OBJCOPY) $(OBJCOPYFLAGS) $(OBJCOPYFLAGS_$(@F)) $< [email protected]
quiet_cmd_efipayload = OBJCOPY [email protected]
cmd_efipayload = $(OBJCOPY) -I binary -O $(EFIPAYLOAD_BFDTARGET) -B $(EFIPAYLOAD_BFDARCH) $< [email protected]
MKIMAGEOUTPUT ?= /dev/null
quiet_cmd_mkimage = MKIMAGE [email protected]
cmd_mkimage = $(objtree)/tools/mkimage $(MKIMAGEFLAGS_$(@F)) -d $< [email protected] \
$(if $(KBUILD_VERBOSE:1=), >/dev/null)
quiet_cmd_cat = CAT [email protected]
cmd_cat = cat $(filter-out $(PHONY), $^) > [email protected]
......@@ -945,6 +947,8 @@ MKIMAGEFLAGS_u-boot.img = -A $(ARCH) -T firmware -C none -O u-boot \
MKIMAGEFLAGS_u-boot-ivt.img = -A $(ARCH) -T firmware_ivt -C none -O u-boot \
-n "U-Boot $(UBOOTRELEASE) for $(BOARD) board"
u-boot-ivt.img: MKIMAGEOUTPUT = u-boot-ivt.img.log
CLEAN_FILES += u-boot-ivt.img.log u-boot-dtb.imx.log SPL.log u-boot.imx.log
MKIMAGEFLAGS_u-boot-dtb.img = $(MKIMAGEFLAGS_u-boot.img)
......@@ -68,6 +68,7 @@ $(IMX_CONFIG): %.cfgtmp: % FORCE
MKIMAGEFLAGS_u-boot.imx = -n $(filter-out $(PLUGIN).bin $< $(PHONY),$^) -T imximage \
u-boot.imx: MKIMAGEOUTPUT = u-boot.imx.log
u-boot.imx: u-boot.bin $(IMX_CONFIG) $(PLUGIN).bin FORCE
$(call if_changed,mkimage)
......@@ -75,6 +76,7 @@ u-boot.imx: u-boot.bin $(IMX_CONFIG) $(PLUGIN).bin FORCE
MKIMAGEFLAGS_u-boot-dtb.imx = -n $(filter-out $(PLUGIN).bin $< $(PHONY),$^) -T imximage \
u-boot-dtb.imx: MKIMAGEOUTPUT = u-boot-dtb.imx.log
u-boot-dtb.imx: u-boot-dtb.bin $(IMX_CONFIG) $(PLUGIN).bin FORCE
$(call if_changed,mkimage)
......@@ -83,6 +85,8 @@ endif
MKIMAGEFLAGS_SPL = -n $(filter-out $(PLUGIN).bin $< $(PHONY),$^) -T imximage \
SPL: spl/u-boot-spl.bin $(IMX_CONFIG) $(PLUGIN).bin FORCE
$(call if_changed,mkimage)
......@@ -150,7 +150,8 @@ CONFIG_SECURE_BOOT is needed to build those two binaries.
After building, you need to create a command sequence file and use
Freescales Code Signing Tool to sign both binaries. After creation,
the mkimage tool outputs the required information about the HAB Blocks
parameter for the CSF.
parameter for the CSF. During the build, the information is preserved
in log files named as the binaries. (SPL.log and u-boot-ivt.log).
More information about the CSF and HAB can be found in the AN4581.
......@@ -487,6 +487,7 @@ cmd_xzmisc = (cat $(filter-out FORCE,$^) | \
# mkimage
# ---------------------------------------------------------------------------
MKIMAGEOUTPUT ?= /dev/null
quiet_cmd_mkimage = MKIMAGE [email protected]
cmd_mkimage = $(objtree)/tools/mkimage $(MKIMAGEFLAGS_$(@F)) -d $< [email protected] \
$(if $(KBUILD_VERBOSE:1=), >/dev/null)
......@@ -119,9 +119,11 @@ LDPPFLAGS += \
$(shell $(LD) --version | \
sed -ne 's/GNU ld version \([0-9][0-9]*\)\.\([0-9][0-9]*\).*/-DLD_MAJOR=\1 -DLD_MINOR=\2/p')
MKIMAGEOUTPUT ?= /dev/null
quiet_cmd_mkimage = MKIMAGE [email protected]
cmd_mkimage = $(objtree)/tools/mkimage $(MKIMAGEFLAGS_$(@F)) -d $< [email protected] \
$(if $(KBUILD_VERBOSE:1=), >/dev/null)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment