From: Petr =?utf-8?Q?=C5=A0tetiar?= Date: Sat, 21 Mar 2020 16:19:02 +0100 Subject: [RFC PATCH 6/9] mkimage_fit_atf.sh: produce working binaries by default In-Reply-To: <39a69dc4-269f-fa0b-51c7-f280b325fafa@xilinx.com> References: <20200318095757.9365-1-ynezz@true.cz> <20200318095757.9365-7-ynezz@true.cz> <39a69dc4-269f-fa0b-51c7-f280b325fafa@xilinx.com> Message-ID: <20200321151902.GB85632@meh.true.cz> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Michal Simek [2020-03-20 11:20:17]: > I think instead of fixing it on several places we should merge things > together and fix this issue there. What do you mean exactly? Checking for the deps one layer up, like this for example in sunxi? diff --git a/Makefile b/Makefile index 44776b8efcc4..1f4bff4374cf 100644 --- a/Makefile +++ b/Makefile @@ -1276,6 +1276,19 @@ ifndef CONFIG_SYS_UBOOT_START CONFIG_SYS_UBOOT_START := $(CONFIG_SYS_TEXT_BASE) endif +define check_its_dep + @if ! test -f "$(1)"; then \ + if test "$(CONFIG_BUILDBOT_BROKEN_BINARIES)" = "y"; then \ + touch "$(1)"; \ + else \ + echo "ERROR: $(2) file $(1) NOT found. If you want to build without " >&2; \ + echo "a $(2) file (creating a NON-FUNCTIONAL binary), then enable" >&2; \ + echo "config option CONFIG_BUILDBOT_BROKEN_BINARIES." >&2; \ + false; \ + fi \ + fi +endef + # Boards with more complex image requirements can provide an .its source file # or a generator script ifneq ($(CONFIG_SPL_FIT_SOURCE),"") @@ -1289,6 +1302,13 @@ endif ifeq ($(CONFIG_SPL_FIT_GENERATOR),"arch/arm/mach-rockchip/make_fit_atf.py") U_BOOT_ITS_DEPS += u-boot endif +ifeq ($(CONFIG_SPL_FIT_GENERATOR),"board/sunxi/mksunxi_fit_atf.sh") +BL31 := $(CURDIR)/bl31.bin +export BL31 +$(BL31): + $(call check_its_dep,$@,BL31) +U_BOOT_ITS_DEPS += $(BL31) +endif $(U_BOOT_ITS): $(U_BOOT_ITS_DEPS) FORCE $(srctree)/$(CONFIG_SPL_FIT_GENERATOR) \ $(patsubst %,arch/$(ARCH)/dts/%.dtb,$(subst ",,$(CONFIG_OF_LIST))) > $@ diff --git a/board/sunxi/mksunxi_fit_atf.sh b/board/sunxi/mksunxi_fit_atf.sh index 88ad71974706..1b0e5ee7a77a 100755 --- a/board/sunxi/mksunxi_fit_atf.sh +++ b/board/sunxi/mksunxi_fit_atf.sh @@ -5,14 +5,6 @@ # # usage: $0 [ [&2 - echo "Please read the section on ARM Trusted Firmware (ATF) in board/sunxi/README.sunxi64" >&2 - BL31=/dev/null -fi - if grep -q "^CONFIG_MACH_SUN50I_H6=y" .config; then BL31_ADDR=0x104000 else > Take a look at thread where we discussed it with Tom. > https://lists.denx.de/pipermail/u-boot/2019-December/393556.html Ok, but that N'th variation was merged anyway. So whats the plan? It's not clear from that discussion or I don't get it. -- ynezz