All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jean-Jacques Hiblot <jjhiblot@ti.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [RFC PATCH v1 5/9] Makefile: use custom ITS to build u-boot.img if SPL_FIT_SOURCE or SPL_FIT_GENERATOR are set
Date: Fri, 22 Mar 2019 15:39:52 +0100	[thread overview]
Message-ID: <20190322143956.14767-6-jjhiblot@ti.com> (raw)
In-Reply-To: <20190322143956.14767-1-jjhiblot@ti.com>

If SPL_FIT_SOURCE or SPL_FIT_GENERATOR are set, then the default output
image should be built using the provided/generated ITS, not using the
default template implemented by mkimage.
In that case, make u-boot.img a symbolic link to u-boot.itb

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
---

 Makefile | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 8616382f42..2d4eebc01b 100644
--- a/Makefile
+++ b/Makefile
@@ -888,6 +888,9 @@ cmd_efipayload = $(OBJCOPY) -I binary -O $(EFIPAYLOAD_BFDTARGET) -B $(EFIPAYLOAD
 
 MKIMAGEOUTPUT ?= /dev/null
 
+quiet_cmd_ln = LN      $@ -> $<
+cmd_ln = ln -f -s $< $@
+
 quiet_cmd_mkimage = MKIMAGE $@
 cmd_mkimage = $(objtree)/tools/mkimage $(MKIMAGEFLAGS_$(@F)) -d $< $@ \
 	>$(MKIMAGEOUTPUT) $(if $(KBUILD_VERBOSE:0=), && cat $(MKIMAGEOUTPUT))
@@ -1196,15 +1199,23 @@ MKIMAGEFLAGS_u-boot-spl.kwb = -n $(srctree)/$(CONFIG_SYS_KWD_CONFIG:"%"=%) \
 MKIMAGEFLAGS_u-boot.pbl = -n $(srctree)/$(CONFIG_SYS_FSL_PBL_RCW:"%"=%) \
 		-R $(srctree)/$(CONFIG_SYS_FSL_PBL_PBI:"%"=%) -T pblimage
 
-u-boot-dtb.img u-boot.img u-boot.kwb u-boot.pbl u-boot-ivt.img: \
+u-boot-dtb.img u-boot.kwb u-boot.pbl u-boot-ivt.img: \
 		$(if $(CONFIG_SPL_LOAD_FIT),u-boot-nodtb.bin dts/dt.dtb,u-boot.bin) FORCE
 	$(call if_changed,mkimage)
 	$(BOARD_SIZE_CHECK)
 
+ifndef U_BOOT_ITS
+u-boot.img: $(if $(CONFIG_SPL_LOAD_FIT),u-boot-nodtb.bin dts/dt.dtb,u-boot.bin) FORCE
+	$(call if_changed,mkimage)
+else
 u-boot.itb: u-boot-nodtb.bin dts/dt.dtb $(U_BOOT_ITS) FORCE
 	$(call if_changed,mkfitimage)
 	$(BOARD_SIZE_CHECK)
 
+u-boot.img: u-boot.itb
+	$(call if_changed,ln)
+endif
+
 u-boot-spl.kwb: u-boot.img spl/u-boot-spl.bin FORCE
 	$(call if_changed,mkimage)
 
-- 
2.17.1

  parent reply	other threads:[~2019-03-22 14:39 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-22 14:39 [U-Boot] [RFC PATCH v1 0/9] Add support for applications of overlays in SPL Jean-Jacques Hiblot
2019-03-22 14:39 ` [U-Boot] [RFC PATCH v1 1/9] dtbo: also generate dtbo from dtso Jean-Jacques Hiblot
2019-03-25  7:57   ` Michal Simek
2019-03-22 14:39 ` [U-Boot] [RFC PATCH v1 2/9] Makefile.lib: include /__symbols__ in dtb if OF_LIBFDT_OVERLAY is enabled Jean-Jacques Hiblot
2019-03-25  7:33   ` Michal Simek
2019-03-22 14:39 ` [U-Boot] [RFC PATCH v1 3/9] Makefile: Fix u-boot.itb generation when building outside the source tree Jean-Jacques Hiblot
2019-03-30 21:18   ` Simon Glass
2019-03-22 14:39 ` [U-Boot] [RFC PATCH v1 4/9] Makefile: Pass the board name to the FIT generator scripts Jean-Jacques Hiblot
2019-03-30 21:18   ` Simon Glass
2019-03-22 14:39 ` Jean-Jacques Hiblot [this message]
2019-03-30 21:18   ` [U-Boot] [RFC PATCH v1 5/9] Makefile: use custom ITS to build u-boot.img if SPL_FIT_SOURCE or SPL_FIT_GENERATOR are set Simon Glass
2019-03-22 14:39 ` [U-Boot] [RFC PATCH v1 6/9] spl: fit: Allow calling spl_load_fit_image() to only get the image size Jean-Jacques Hiblot
2019-03-25  8:12   ` Michal Simek
2019-03-22 14:39 ` [U-Boot] [RFC PATCH v1 7/9] spl: fit: Add support for applying DT overlay Jean-Jacques Hiblot
2019-03-25  8:18   ` Michal Simek
2019-03-25 11:40     ` Jean-Jacques Hiblot
2019-03-25 11:58       ` Michal Simek
2019-03-22 14:39 ` [U-Boot] [RFC PATCH v1 8/9] sp: fit: Allow the board to dynamically select the DTB overlays it needs Jean-Jacques Hiblot
2019-03-25  9:44   ` Michal Simek
2019-03-22 14:39 ` [U-Boot] [RFC PATCH v1 9/9] !!! TEMP !!! For demonstration only !!! DRA76: Usage of overlays in SPL Jean-Jacques Hiblot
2019-03-25  8:08 ` [U-Boot] [RFC PATCH v1 0/9] Add support for applications " Michal Simek
2019-03-28 13:54   ` Michal Simek
2019-03-29 10:13     ` Jean-Jacques Hiblot
2019-03-29 10:26       ` Michal Simek
2019-03-29 12:50         ` Jean-Jacques Hiblot
2019-03-29 16:48           ` Michal Simek
2019-03-27  9:39 ` Lukasz Majewski
2019-03-27 17:41   ` Jean-Jacques Hiblot
2019-03-28  6:45     ` Lukasz Majewski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190322143956.14767-6-jjhiblot@ti.com \
    --to=jjhiblot@ti.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.