From patchwork Thu Apr 30 19:03:48 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kiszka X-Patchwork-Id: 239033 List-Id: U-Boot discussion From: jan.kiszka at web.de (Jan Kiszka) Date: Thu, 30 Apr 2020 21:03:48 +0200 Subject: am65x build issues Message-ID: <04446bbd-6858-b8ba-0328-ba7c10291d68@web.de> Hi all, I've noticed that building am65x_evm_a53_defconfig causes the dtbs to be built twice, once for the main u-boot and once for the spl. This is because of an extra dependency in mach-k3/config_secure.mk added by 508369672ca3. Why should the produced dtbs depend on the target that produces them? Why not simply this? Disclaimer: I didn't actually test the HS path, just the unsigned build. But also with this change, make -j remains broken for this target: [...] COPY u-boot.dtb MKIMAGE u-boot-dtb.img MKIMAGE u-boot.img CAT u-boot-dtb.bin COPY u-boot.bin CC spl/./lib/asm-offsets.s CC spl/./arch/arm/lib/asm-offsets.s ../tools/k3_fit_atf.sh \ spl/dts/k3-am654-base-board.dtb > u-boot-spl-k3.its LDS spl/u-boot-spl.lds FDTGREP spl/dts/k3-am654-base-board.dtb Usage: fdtgrep - extract portions from device tree [...] Error: Cannot open output file make[2]: *** [../scripts/Makefile.spl:465: spl/dts/k3-am654-base-board.dtb] Error 1 make[2]: *** Waiting for unfinished jobs.... Something is fishy with dependencies here. Any ideas? Thanks, Jan diff --git a/arch/arm/mach-k3/config_secure.mk b/arch/arm/mach-k3/config_secure.mk index 6d63c57665..cbe9b684fb 100644 --- a/arch/arm/mach-k3/config_secure.mk +++ b/arch/arm/mach-k3/config_secure.mk @@ -34,11 +34,8 @@ MKIMAGEFLAGS_u-boot.img_HS = -f auto -A $(ARCH) -T firmware -C none -O u-boot \ -n "U-Boot $(UBOOTRELEASE) for $(BOARD) board" -E \ $(patsubst %,-b arch/$(ARCH)/dts/%.dtb_HS,$(subst ",,$(CONFIG_OF_LIST))) -OF_LIST_TARGETS = $(patsubst %,arch/$(ARCH)/dts/%.dtb,$(subst ",,$(CONFIG_OF_LIST))) -$(OF_LIST_TARGETS): dtbs - u-boot-nodtb.bin_HS: u-boot-nodtb.bin FORCE $(call if_changed,k3secureimg) -u-boot.img_HS: u-boot-nodtb.bin_HS u-boot.img $(patsubst %.dtb,%.dtb_HS,$(OF_LIST_TARGETS)) FORCE +u-boot.img_HS: u-boot-nodtb.bin_HS u-boot.img dtbs FORCE $(call if_changed,mkimage)