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] [PATCH v5 09/15] Makefile: Fix u-boot.itb generation when building outside the source tree
Date: Fri, 20 Sep 2019 17:28:17 +0200	[thread overview]
Message-ID: <20190920152824.18958-10-jjhiblot@ti.com> (raw)
In-Reply-To: <20190920152824.18958-1-jjhiblot@ti.com>

Include the object tree and the source tree in the search path of the
FIT compîler (dtc). This allows to use paths relative to the root of the
source or object trees in the ITS instead of working backward from the
actual location of the ITS.
It also allows to use a build directory different of the source directory.

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
---

Changes in v5: None
Changes in v4: None
Changes in v3: None
Changes in v2: None

 Makefile                                            | 5 +++--
 board/theobroma-systems/lion_rk3368/fit_spl_atf.its | 6 +++---
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/Makefile b/Makefile
index 2f118affe9..8a28740b22 100644
--- a/Makefile
+++ b/Makefile
@@ -914,7 +914,8 @@ cmd_mkimage = $(objtree)/tools/mkimage $(MKIMAGEFLAGS_$(@F)) -d $< $@ \
 	>$(MKIMAGEOUTPUT) $(if $(KBUILD_VERBOSE:0=), && cat $(MKIMAGEOUTPUT))
 
 quiet_cmd_mkfitimage = MKIMAGE $@
-cmd_mkfitimage = $(objtree)/tools/mkimage $(MKIMAGEFLAGS_$(@F)) -f $(U_BOOT_ITS) -p $(CONFIG_FIT_EXTERNAL_OFFSET) $@\
+cmd_mkfitimage = $(objtree)/tools/mkimage $(MKIMAGEFLAGS_$(@F)) -D "-i $(obj) -i $(src)"\
+	-f $(U_BOOT_ITS) $@ -p $(CONFIG_FIT_EXTERNAL_OFFSET)\
 	>$(MKIMAGEOUTPUT) $(if $(KBUILD_VERBOSE:0=), && cat $(MKIMAGEOUTPUT))
 
 quiet_cmd_cat = CAT     $@
@@ -1230,7 +1231,7 @@ endif
 SPL_FIT_SOURCE := $(subst ",,$(CONFIG_SPL_FIT_SOURCE))
 SPL_FIT_GENERATOR := $(subst ",,$(CONFIG_SPL_FIT_GENERATOR))
 ifneq ($(SPL_FIT_SOURCE),)
-U_BOOT_ITS = $(SPL_FIT_SOURCE)
+U_BOOT_ITS = $(src)/$(SPL_FIT_SOURCE)
 else
 ifneq ($(SPL_FIT_GENERATOR),)
 U_BOOT_ITS := u-boot.its
diff --git a/board/theobroma-systems/lion_rk3368/fit_spl_atf.its b/board/theobroma-systems/lion_rk3368/fit_spl_atf.its
index 6b04fbc7da..69202a117b 100644
--- a/board/theobroma-systems/lion_rk3368/fit_spl_atf.its
+++ b/board/theobroma-systems/lion_rk3368/fit_spl_atf.its
@@ -14,7 +14,7 @@
 	images {
 		uboot {
 			description = "U-Boot (64-bit)";
-			data = /incbin/("../../../u-boot-nodtb.bin");
+			data = /incbin/("u-boot-nodtb.bin");
 			type = "standalone";
 			os = "U-Boot";
 			arch = "arm64";
@@ -23,7 +23,7 @@
 		};
 		atf {
 			description = "ARM Trusted Firmware";
-			data = /incbin/("../../../bl31-rk3368.bin");
+			data = /incbin/("bl31-rk3368.bin");
 			type = "firmware";
 			os = "arm-trusted-firmware";
 			arch = "arm64";
@@ -34,7 +34,7 @@
 
 		fdt {
 			description = "RK3368-uQ7 (Lion) flat device-tree";
-			data = /incbin/("../../../u-boot.dtb");
+			data = /incbin/("u-boot.dtb");
 			type = "flat_dt";
 			compression = "none";
 		};
-- 
2.17.1

  parent reply	other threads:[~2019-09-20 15:28 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-20 15:28 [U-Boot] [PATCH v5 00/15] Add support for applications of overlays in SPL Jean-Jacques Hiblot
2019-09-20 15:28 ` [U-Boot] [PATCH v5 01/15] spl: fit: don't load the firmware twice Jean-Jacques Hiblot
2019-09-20 15:28 ` [U-Boot] [PATCH v5 02/15] spl: fit: Add support for applying DT overlay Jean-Jacques Hiblot
2019-09-20 15:28 ` [U-Boot] [PATCH v5 03/15] spl: fit: Make room in the FDT before applying overlays Jean-Jacques Hiblot
2019-09-20 15:28 ` [U-Boot] [PATCH v5 04/15] spl: fit: allocate a temporary buffer to load the overlays Jean-Jacques Hiblot
2019-09-20 15:28 ` [U-Boot] [PATCH v5 05/15] spl: fit: Do not fail immediately if an overlay is not available Jean-Jacques Hiblot
2019-09-20 15:28 ` [U-Boot] [PATCH v5 06/15] spl: fit: be more verbose when an error occurs when applying the overlays Jean-Jacques Hiblot
2019-09-20 15:28 ` [U-Boot] [PATCH v5 07/15] Makefile.lib: include /__symbols__ in dtb if SPL_LOAD_FIT_APPLY_OVERLAY is enabled Jean-Jacques Hiblot
2019-09-20 15:28 ` [U-Boot] [PATCH v5 08/15] Makefile: Fix tests for CONFIG_SPL_LOAD_FIT and CONFIG_SPL_FIT_GENERATOR Jean-Jacques Hiblot
2019-09-20 15:28 ` Jean-Jacques Hiblot [this message]
2019-09-20 15:28 ` [U-Boot] [PATCH v5 10/15] Makefile: Query the SPL Fit Generator for its dependencies Jean-Jacques Hiblot
2019-10-06 16:57   ` Auer, Lukas
2019-10-06 17:12     ` Tom Rini
2019-10-07  9:43       ` Jean-Jacques Hiblot
2019-10-07 16:02         ` Tom Rini
2019-10-09 10:10           ` Jean-Jacques Hiblot
2019-09-20 15:28 ` [U-Boot] [PATCH v5 11/15] spl: fit: constify the output parameter of spl_fit_get_image_name() Jean-Jacques Hiblot
2019-09-20 15:28 ` [U-Boot] [PATCH v5 12/15] drivers: board: Make the board drivers available in SPL Jean-Jacques Hiblot
2019-10-11 22:21   ` Simon Glass
2019-09-20 15:28 ` [U-Boot] [PATCH v5 13/15] drivers: board: Add get_fit_loadable() Jean-Jacques Hiblot
2019-09-20 15:28 ` [U-Boot] [PATCH v5 14/15] include: board: provide empty stubs when the BOARD option is not selected Jean-Jacques Hiblot
2019-09-20 15:28 ` [U-Boot] [PATCH v5 15/15] spl: fit: Allow the board to tell if more images must be loaded from FIT Jean-Jacques Hiblot

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=20190920152824.18958-10-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.