From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jean-Jacques Hiblot Date: Thu, 23 May 2019 12:39:08 +0200 Subject: [U-Boot] [PATCH PATCH v3 08/12] Makefile: Fix u-boot.itb generation when building outside the source tree In-Reply-To: <20190523103912.3790-1-jjhiblot@ti.com> References: <20190523103912.3790-1-jjhiblot@ti.com> Message-ID: <20190523103912.3790-9-jjhiblot@ti.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: u-boot@lists.denx.de Include the object tree and the source tree in the search path of the FIT comp=C3=AEler (dtc). This allows to use paths relative to the root of t= he 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 --- Changes in v3: None Changes in v2: None Makefile | 5 +++-- board/theobroma-systems/lion_rk3368/fit_spl_atf.its | 6 +++--- board/theobroma-systems/puma_rk3399/fit_spl_atf.its | 8 ++++---- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index b3ac1a9b8a..f0ee4a21e2 100644 --- a/Makefile +++ b/Makefile @@ -900,7 +900,8 @@ cmd_mkimage =3D $(objtree)/tools/mkimage $(MKIMAGEFLAGS= _$(@F)) -d $< $@ \ >$(MKIMAGEOUTPUT) $(if $(KBUILD_VERBOSE:0=3D), && cat $(MKIMAGEOUTPUT)) =20 quiet_cmd_mkfitimage =3D MKIMAGE $@ -cmd_mkfitimage =3D $(objtree)/tools/mkimage $(MKIMAGEFLAGS_$(@F)) -f $(U_B= OOT_ITS) -p $(CONFIG_FIT_EXTERNAL_OFFSET) $@\ +cmd_mkfitimage =3D $(objtree)/tools/mkimage $(MKIMAGEFLAGS_$(@F)) -D "-i $= (obj) -i $(src)"\ + -f $(U_BOOT_ITS) $@ -p $(CONFIG_FIT_EXTERNAL_OFFSET)\ >$(MKIMAGEOUTPUT) $(if $(KBUILD_VERBOSE:0=3D), && cat $(MKIMAGEOUTPUT)) =20 quiet_cmd_cat =3D CAT $@ @@ -1206,7 +1207,7 @@ endif SPL_FIT_SOURCE :=3D $(subst ",,$(CONFIG_SPL_FIT_SOURCE)) SPL_FIT_GENERATOR :=3D $(subst ",,$(CONFIG_SPL_FIT_GENERATOR)) ifneq ($(SPL_FIT_SOURCE),) -U_BOOT_ITS =3D $(SPL_FIT_SOURCE) +U_BOOT_ITS =3D $(src)/$(SPL_FIT_SOURCE) else ifneq ($(SPL_FIT_GENERATOR),) U_BOOT_ITS :=3D u-boot.its diff --git a/board/theobroma-systems/lion_rk3368/fit_spl_atf.its b/board/th= eobroma-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 =3D "U-Boot (64-bit)"; - data =3D /incbin/("../../../u-boot-nodtb.bin"); + data =3D /incbin/("u-boot-nodtb.bin"); type =3D "standalone"; os =3D "U-Boot"; arch =3D "arm64"; @@ -23,7 +23,7 @@ }; atf { description =3D "ARM Trusted Firmware"; - data =3D /incbin/("../../../bl31-rk3368.bin"); + data =3D /incbin/("bl31-rk3368.bin"); type =3D "firmware"; os =3D "arm-trusted-firmware"; arch =3D "arm64"; @@ -34,7 +34,7 @@ =20 fdt { description =3D "RK3368-uQ7 (Lion) flat device-tree"; - data =3D /incbin/("../../../u-boot.dtb"); + data =3D /incbin/("u-boot.dtb"); type =3D "flat_dt"; compression =3D "none"; }; diff --git a/board/theobroma-systems/puma_rk3399/fit_spl_atf.its b/board/th= eobroma-systems/puma_rk3399/fit_spl_atf.its index 530f059f3d..659183ecc1 100644 --- a/board/theobroma-systems/puma_rk3399/fit_spl_atf.its +++ b/board/theobroma-systems/puma_rk3399/fit_spl_atf.its @@ -14,7 +14,7 @@ images { uboot { description =3D "U-Boot (64-bit)"; - data =3D /incbin/("../../../u-boot-nodtb.bin"); + data =3D /incbin/("u-boot-nodtb.bin"); type =3D "standalone"; os =3D "U-Boot"; arch =3D "arm64"; @@ -23,7 +23,7 @@ }; atf { description =3D "ARM Trusted Firmware"; - data =3D /incbin/("../../../bl31-rk3399.bin"); + data =3D /incbin/("bl31-rk3399.bin"); type =3D "firmware"; arch =3D "arm64"; os =3D "arm-trusted-firmware"; @@ -33,14 +33,14 @@ }; pmu { description =3D "Cortex-M0 firmware"; - data =3D /incbin/("../../../rk3399m0.bin"); + data =3D /incbin/("rk3399m0.bin"); type =3D "pmu-firmware"; compression =3D "none"; load =3D <0x180000>; }; fdt { description =3D "RK3399-Q7 (Puma) flat device-tree"; - data =3D /incbin/("../../../u-boot.dtb"); + data =3D /incbin/("u-boot.dtb"); type =3D "flat_dt"; compression =3D "none"; }; --=20 2.17.1