All of lore.kernel.org
 help / color / mirror / Atom feed
From: "André Przywara" <andre.przywara@arm.com>
To: u-boot@lists.denx.de
Subject: sunxi/arm64 build broken (was: [PATCH v4 12/27] x86: Makefile: Drop explicit targets built by binman)
Date: Wed, 5 Aug 2020 15:20:04 +0100	[thread overview]
Message-ID: <4bea6ab8-4ee1-090d-f926-bd0491e44e05@arm.com> (raw)
In-Reply-To: <20200719135448.v4.12.Ib6ee37195cb6d64579710219bae87005cc61d61f@changeid>

On 19/07/2020 20:56, Simon Glass wrote:

Hi,

> On x86 various files that need to be created by binman. It does not make
> sense to enumerate these in the Makefile. They are described in the
> configuration (devicetree) for each board and we can simply run binman
> (always) to generate them.
> 
> Update the Makefile to have a separate, final step which runs binman,
> once all input dependencies are present.
> 
> This avoid sprinkling the Makefile with arch-specific code.

it seems that this patch (committed as 42b18df80fdb) breaks sunxi(!).
When building current master, the Trusted Firmware binary does not make
it into the u-boot-sunxi-with-spl.bin file. U-Boot still runs, but Linux
won't get very far without BL31. To me it looks like we combine
u-boot.img with the SPL, instead of u-boot.itb. Only the latter contains
bl31.bin.

I bisected down into the hunks of this patch here, and by reverting just
hunk #3 (the one introducing .binman_stamp) it works again.
My knowledge of the U-Boot build system is somewhat limited, so I don't
immediately see the problem or a fix.

A simple way to verify a build is complete would be:
$ strings u-boot-sunxi-with-spl.bin | grep BL31
If it reports some lines, TF-A is included and it would work correctly.
If it comes back empty, TF-A is missing and we won't boot.

I would be grateful for any insights!

Cheers,
Andre

> 
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
> 
> (no changes since v3)
> 
> Changes in v3:
> - Drop rockchip changes which should not be in this patch
> 
>  Makefile | 63 +++++++++++++-------------------------------------------
>  1 file changed, 14 insertions(+), 49 deletions(-)
> 
> diff --git a/Makefile b/Makefile
> index 0147d9d49b..b4b5b10813 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -921,16 +921,6 @@ INPUTS-$(CONFIG_REMAKE_ELF) += u-boot.elf
>  INPUTS-$(CONFIG_EFI_APP) += u-boot-app.efi
>  INPUTS-$(CONFIG_EFI_STUB) += u-boot-payload.efi
>  
> -ifneq ($(CONFIG_HAS_ROM),)
> -ifneq ($(BUILD_ROM)$(CONFIG_BUILD_ROM),)
> -INPUTS-$(CONFIG_X86_RESET_VECTOR) += u-boot.rom
> -endif
> -endif
> -
> -ifeq ($(CONFIG_SYS_COREBOOT)$(CONFIG_SPL),yy)
> -INPUTS-$(CONFIG_BINMAN) += u-boot-x86-with-spl.bin
> -endif
> -
>  # Build a combined spl + u-boot image for sunxi
>  ifeq ($(CONFIG_ARCH_SUNXI)$(CONFIG_SPL),yy)
>  INPUTS-y += u-boot-sunxi-with-spl.bin
> @@ -961,6 +951,10 @@ ifeq ($(CONFIG_ARCH_ROCKCHIP)$(CONFIG_SPL),yy)
>  INPUTS-y += u-boot-rockchip.bin
>  endif
>  
> +INPUTS-$(CONFIG_X86) += u-boot-x86-start16.bin u-boot-x86-reset16.bin \
> +	$(if $(CONFIG_SPL_X86_16BIT_INIT),spl/u-boot-spl.bin) \
> +	$(if $(CONFIG_TPL_X86_16BIT_INIT),tpl/u-boot-tpl.bin)
> +
>  LDFLAGS_u-boot += $(LDFLAGS_FINAL)
>  
>  # Avoid 'Not enough room for program headers' error on binutils 2.28 onwards.
> @@ -1018,7 +1012,14 @@ cmd_cfgcheck = $(srctree)/scripts/check-config.sh $2 \
>  PHONY += inputs
>  inputs: $(INPUTS-y)
>  
> -all: inputs
> +all: .binman_stamp inputs
> +ifeq ($(CONFIG_BINMAN),y)
> +	$(call if_changed,binman)
> +endif
> +
> +# Timestamp file to make sure that binman always runs
> +.binman_stamp: FORCE
> +	@touch $@
>  
>  ifeq ($(CONFIG_DEPRECATED),y)
>  	$(warning "You have deprecated configuration options enabled in your .config! Please check your configuration.")
> @@ -1311,7 +1312,7 @@ quiet_cmd_binman = BINMAN  $@
>  cmd_binman = $(srctree)/tools/binman/binman $(if $(BINMAN_DEBUG),-D) \
>                  --toolpath $(objtree)/tools \
>  		$(if $(BINMAN_VERBOSE),-v$(BINMAN_VERBOSE)) \
> -		build -u -d u-boot.dtb -O . -m \
> +		build -u -d u-boot.dtb -O . -m --allow-missing \
>  		-I . -I $(srctree) -I $(srctree)/board/$(BOARDDIR) \
>  		$(BINMAN_$(@F))
>  
> @@ -1588,27 +1589,11 @@ u-boot-br.bin: u-boot FORCE
>  endif
>  endif
>  
> -# x86 uses a large ROM. We fill it with 0xff, put the 16-bit stuff (including
> -# reset vector) at the top, Intel ME descriptor at the bottom, and U-Boot in
> -# the middle. This is handled by binman based on an image description in the
> -# board's device tree.
> -ifneq ($(CONFIG_HAS_ROM),)
> -rom: u-boot.rom FORCE
> -
> -refcode.bin: $(srctree)/board/$(BOARDDIR)/refcode.bin FORCE
> -	$(call if_changed,copy)
> -
>  quiet_cmd_ldr = LD      $@
>  cmd_ldr = $(LD) $(LDFLAGS_$(@F)) \
>  	       $(filter-out FORCE,$^) -o $@
>  
> -rom-deps := u-boot.bin
>  ifdef CONFIG_X86
> -rom-deps += u-boot-x86-start16.bin u-boot-x86-reset16.bin \
> -		$(if $(CONFIG_SPL_X86_16BIT_INIT),spl/u-boot-spl.bin) \
> -		$(if $(CONFIG_TPL_X86_16BIT_INIT),tpl/u-boot-tpl.bin) \
> -		$(if $(CONFIG_HAVE_REFCODE),refcode.bin)
> -
>  OBJCOPYFLAGS_u-boot-x86-start16.bin := -O binary -j .start16
>  u-boot-x86-start16.bin: u-boot FORCE
>  	$(call if_changed,objcopy)
> @@ -1617,24 +1602,7 @@ OBJCOPYFLAGS_u-boot-x86-reset16.bin := -O binary -j .resetvec
>  u-boot-x86-reset16.bin: u-boot FORCE
>  	$(call if_changed,objcopy)
>  
> -else # !CONFIG_X86
> -
> -ifdef CONFIG_SPL
> -rom-deps += spl/u-boot-spl.bin
> -
> -# We can rely on CONFIG_SPL_FRAMEWORK being set for boards that use binman
> -rom-deps += u-boot.img
> -endif
> -
> -ifdef CONFIG_TPL
> -rom-deps += tpl/u-boot-tpl.bin
> -endif
> -
> -endif
> -
> -u-boot.rom: $(rom-deps) FORCE
> -	$(call if_changed,binman)
> -endif
> +endif # CONFIG_X86
>  
>  ifneq ($(CONFIG_ARCH_SUNXI),)
>  ifeq ($(CONFIG_ARM64),)
> @@ -1646,9 +1614,6 @@ u-boot-sunxi-with-spl.bin: spl/sunxi-spl.bin u-boot.itb FORCE
>  endif
>  endif
>  
> -u-boot-x86-with-spl.bin: spl/u-boot-spl.bin u-boot.bin FORCE
> -	$(call if_changed,binman)
> -
>  ifneq ($(CONFIG_ARCH_TEGRA),)
>  # Makes u-boot-dtb-tegra.bin u-boot-tegra.bin u-boot-nodtb-tegra.bin
>  %-dtb-tegra.bin %-tegra.bin %-nodtb-tegra.bin: spl/%-spl %.bin FORCE
> 

  reply	other threads:[~2020-08-05 14:20 UTC|newest]

Thread overview: 94+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-19 19:55 [PATCH v4 00/27] rockchip: x86: Support building ROM files automatically with binman Simon Glass
2020-07-19 19:55 ` [PATCH v4 01/27] x86: Change how selection of ROMs works Simon Glass
2020-07-19 19:55 ` [PATCH v4 02/27] rockchip: Allow Bob to use SPI boot Simon Glass
2020-08-08 10:59   ` Kever Yang
2020-08-08 13:28     ` Simon Glass
2020-07-19 19:55 ` [PATCH v4 03/27] Makefile: Allow building .rom files for non-x86 boards Simon Glass
2020-07-19 19:55 ` [PATCH v4 04/27] rockchip: jerry: Add serial support Simon Glass
2020-07-19 19:55 ` [PATCH v4 05/27] rockchip: bob: Support SPI-flash booting Simon Glass
2020-07-19 19:55 ` [PATCH v4 06/27] rockchip: Enable building a SPI ROM image on jerry Simon Glass
2020-07-19 19:55 ` [PATCH v4 07/27] rockchip: Enable building a SPI ROM image on bob Simon Glass
2020-08-08 12:39   ` Kever Yang
2020-08-08 13:28     ` Simon Glass
2020-08-10  7:46       ` Kever Yang
2020-08-13  2:51         ` Simon Glass
2020-10-11 15:39   ` Emmanuel Vadot
2020-10-14 18:37     ` Hugh Cole-Baker
2020-11-03 15:11       ` Simon Glass
2020-11-07 18:00         ` Emmanuel Vadot
2020-11-08 14:05         ` Hugh Cole-Baker
2020-07-19 19:55 ` [PATCH v4 08/27] tegra: Drop the unused non-binman code Simon Glass
2020-07-19 19:56 ` [PATCH v4 09/27] tegra: Don't enable binman on ARMv8 SoCs Simon Glass
2020-07-19 19:56 ` [PATCH v4 10/27] Makefile: Rename ALL-y to INPUTS-y Simon Glass
2020-07-19 19:56 ` [PATCH v4 11/27] powerpc: mpc85xx: Only enable binman when it is needed Simon Glass
2020-07-19 19:56 ` [PATCH v4 12/27] x86: Makefile: Drop explicit targets built by binman Simon Glass
2020-08-05 14:20   ` André Przywara [this message]
2020-08-05 15:05     ` sunxi/arm64 build broken (was: [PATCH v4 12/27] x86: Makefile: Drop explicit targets built by binman) Simon Glass
2020-08-05 15:21       ` André Przywara
2020-08-05 17:22         ` Simon Glass
2020-07-19 19:56 ` [PATCH v4 13/27] x86: Drop CONFIG_BUILD_ROM and repurpose BUILD_ROM Simon Glass
2020-07-19 19:56 ` [PATCH v4 14/27] sunxi: Makefile: Drop explicit targets built by binman Simon Glass
2020-07-19 19:56 ` [PATCH v4 15/27] tegra: " Simon Glass
2020-07-19 19:56 ` [PATCH v4 16/27] mediatek: " Simon Glass
2020-07-19 19:56 ` [PATCH v4 17/27] Makefile: Move CONFIG_TOOLS_DEBUG check to later Simon Glass
2020-07-19 19:56 ` [PATCH v4 18/27] Makefile: Fix a long line in cmd_mkfitimage Simon Glass
2020-07-19 19:56 ` [PATCH v4 19/27] Makefile: Allow CONFIG_SPL_FIT_GENERATOR to be empty Simon Glass
2020-07-19 19:56 ` [PATCH v4 20/27] Makefile: Warn against using CONFIG_SPL_FIT_GENERATOR Simon Glass
2020-08-14 13:27   ` Michal Simek
2020-08-16  3:39     ` Simon Glass
2020-08-17  6:49       ` Michal Simek
2020-08-22 15:08         ` Simon Glass
2020-08-24 14:11           ` Michal Simek
2020-08-25 15:04             ` Simon Glass
2020-08-25 15:12               ` Michal Simek
2020-08-25 16:57                 ` Simon Glass
2020-08-26 14:11                   ` Michal Simek
2020-08-30 20:37                     ` Simon Glass
2020-09-01 15:15                       ` Michal Simek
2020-09-01 15:26                         ` Simon Glass
2020-09-16 13:41                           ` Michal Simek
2020-07-19 19:56 ` [PATCH v4 21/27] rockchip: Convert evb-rk3288 over to use binman Simon Glass
2020-07-19 19:56 ` [PATCH v4 22/27] rockchip: Convert evb-rk3229 " Simon Glass
2020-07-19 19:56 ` [PATCH v4 23/27] rockchip: Drop the fit_spl_optee.sh script Simon Glass
2020-07-19 19:56 ` [PATCH v4 24/27] x86: Move the fdtmap away from the binary blobs Simon Glass
2020-07-19 19:56 ` [PATCH v4 25/27] x86: chromebook_link64: Correct the image layout Simon Glass
2020-07-19 19:56 ` [PATCH v4 26/27] x86: chromebook_panther: " Simon Glass
2020-07-19 19:56 ` [PATCH v4 27/27] x86: chromebook_samus_tpl: " Simon Glass
2020-07-20  1:12 ` [PATCH v4 00/27] rockchip: x86: Support building ROM files automatically with binman Bin Meng
2020-07-20  3:07   ` Simon Glass
2020-07-24 14:48     ` Simon Glass
2020-08-08 11:32       ` Kever Yang
2020-08-08 13:28         ` Simon Glass
2020-07-28 18:57 ` [PATCH v4 27/27] x86: chromebook_samus_tpl: Correct the image layout Simon Glass
2020-07-28 18:57 ` [PATCH v4 26/27] x86: chromebook_panther: " Simon Glass
2020-07-28 18:57 ` [PATCH v4 25/27] x86: chromebook_link64: " Simon Glass
2020-07-28 18:57 ` [PATCH v4 24/27] x86: Move the fdtmap away from the binary blobs Simon Glass
2020-07-28 18:57 ` [PATCH v4 23/27] rockchip: Drop the fit_spl_optee.sh script Simon Glass
2020-07-28 18:57 ` [PATCH v4 22/27] rockchip: Convert evb-rk3229 over to use binman Simon Glass
2020-07-28 18:57 ` [PATCH v4 21/27] rockchip: Convert evb-rk3288 " Simon Glass
2020-07-28 18:57 ` [PATCH v4 20/27] Makefile: Warn against using CONFIG_SPL_FIT_GENERATOR Simon Glass
2020-07-28 18:57 ` [PATCH v4 19/27] Makefile: Allow CONFIG_SPL_FIT_GENERATOR to be empty Simon Glass
2020-07-28 18:57 ` [PATCH v4 18/27] Makefile: Fix a long line in cmd_mkfitimage Simon Glass
2020-07-28 18:57 ` [PATCH v4 17/27] Makefile: Move CONFIG_TOOLS_DEBUG check to later Simon Glass
2020-07-28 18:57 ` [PATCH v4 16/27] mediatek: Makefile: Drop explicit targets built by binman Simon Glass
2020-07-28 18:57 ` [PATCH v4 15/27] tegra: " Simon Glass
2020-07-28 18:57 ` [PATCH v4 13/27] x86: Drop CONFIG_BUILD_ROM and repurpose BUILD_ROM Simon Glass
2020-07-28 18:57 ` [PATCH v4 12/27] x86: Makefile: Drop explicit targets built by binman Simon Glass
2020-08-05 17:13   ` [PATCH v4 12/27] x86: Makefile: Drop explicit targets built by binman - BREAKS NETWORK ON SUNXI Heinrich Schuchardt
2020-08-05 17:30     ` Heinrich Schuchardt
2020-08-05 18:23       ` Simon Glass
2020-08-05 18:25         ` Simon Glass
2020-08-07  4:21           ` sunxi/arm64 build broken (was: [PATCH v4 12/27] x86: Makefile: Drop explicit targets built by binman) Samuel Holland
2020-08-07 15:44             ` Simon Glass
2020-08-07 16:23             ` Simon Glass
2020-07-28 18:58 ` [PATCH v4 11/27] powerpc: mpc85xx: Only enable binman when it is needed Simon Glass
2020-07-28 18:58 ` [PATCH v4 10/27] Makefile: Rename ALL-y to INPUTS-y Simon Glass
2020-07-28 18:58 ` [PATCH v4 09/27] tegra: Don't enable binman on ARMv8 SoCs Simon Glass
2020-07-28 18:58 ` [PATCH v4 08/27] tegra: Drop the unused non-binman code Simon Glass
2020-07-28 18:58 ` [PATCH v4 07/27] rockchip: Enable building a SPI ROM image on bob Simon Glass
2020-07-28 18:58 ` [PATCH v4 06/27] rockchip: Enable building a SPI ROM image on jerry Simon Glass
2020-07-28 18:58 ` [PATCH v4 05/27] rockchip: bob: Support SPI-flash booting Simon Glass
2020-07-28 18:58 ` [PATCH v4 04/27] rockchip: jerry: Add serial support Simon Glass
2020-07-28 18:58 ` [PATCH v4 03/27] Makefile: Allow building .rom files for non-x86 boards Simon Glass
2020-07-28 18:58 ` [PATCH v4 02/27] rockchip: Allow Bob to use SPI boot Simon Glass
2020-07-28 18:58 ` [PATCH v4 01/27] x86: Change how selection of ROMs works Simon Glass

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=4bea6ab8-4ee1-090d-f926-bd0491e44e05@arm.com \
    --to=andre.przywara@arm.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.