Skip to contentSkip to conversation

Makefile: sunxi: Don't use binman to build ATF image

PATCH New Simon Glass 4 participants 5 messages Aug 7, 2020 – Aug 8, 2020 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Makefile: sunxi: Don't use binman to build ATF image

At present with sunxi 64-bit, the Makefile builds u-boot-sunxi-with-spl.bin and then binman overwrites it with its own version. But the binman definition lacks some parts, in particular BL31.

For now, work around this with a hack.

Fixes 42b18df80fd ("x86: Makefile: Drop explicit targets built by binman")

---

 Makefile | 4 ++++
 1 file changed, 4 insertions(+)
Makefile +4 -0
index 2629a741f1e..4483a9bc8a3 100644
@@ -1024,9 +1024,13 @@ PHONY += inputs
 inputs: $(INPUTS-y)
 
 all: .binman_stamp inputs
+	# Hack for sunxi which doesn't have a proper binman definition for
+	# 64-bit boards
+ifneq ($(CONFIG_ARCH_SUNXI)$(CONFIG_ARM64),yy)
 ifeq ($(CONFIG_BINMAN),y)
 	$(call if_changed,binman)
 endif
+endif
 
 # Timestamp file to make sure that binman always runs
 .binman_stamp: FORCE
Signature · 1 line
2.28.0.236.gb10cc79966-goog
#1 lore raw

PATCH 1/1 Makefile: sunxi: Don't use binman to build ATF image

Quoted 6 lines · Simon Glass

At present with sunxi 64-bit, the Makefile builds u-boot-sunxi-with-spl.bin and then binman overwrites it with its own version. But the binman definition lacks some parts, in particular BL31.

For now, work around this with a hack.

Many thanks for providing this! Indeed it fixes the immediate problem for me. Tested on BananaPi-M64. Also compared the binaries for a 32-bit BPi-M1 build with and w/o the fix, and found them identical (with reproducible build magic).

Quoted 1 line

Cheers,
Andre

Quoted 25 lines
Fixes 42b18df80fd ("x86: Makefile: Drop explicit targets built by binman")

---

 Makefile | 4 ++++
 1 file changed, 4 insertions(+)
Makefile +4 -0
index 2629a741f1e..4483a9bc8a3 100644
@@ -1024,9 +1024,13 @@ PHONY += inputs
 inputs: $(INPUTS-y)
 
 all: .binman_stamp inputs
+	# Hack for sunxi which doesn't have a proper binman definition for
+	# 64-bit boards
+ifneq ($(CONFIG_ARCH_SUNXI)$(CONFIG_ARM64),yy)
 ifeq ($(CONFIG_BINMAN),y)
 	$(call if_changed,binman)
 endif
+endif
 
 # Timestamp file to make sure that binman always runs
 .binman_stamp: FORCE
#2 lore raw

PATCH 1/1 Makefile: sunxi: Don't use binman to build ATF image

In reply to Simon Glass
Quoted 23 lines · Simon Glass

At present with sunxi 64-bit, the Makefile builds u-boot-sunxi-with-spl.bin and then binman overwrites it with its own version. But the binman definition lacks some parts, in particular BL31.

For now, work around this with a hack.

Fixes 42b18df80fd ("x86: Makefile: Drop explicit targets built by binman")

---

 Makefile | 4 ++++
 1 file changed, 4 insertions(+)
Makefile +0 -0
index 2629a741f1e..4483a9bc8a3 100644
@@ -1024,9 +1024,13 @@ PHONY += inputs
 inputs: $(INPUTS-y)
 
 all: .binman_stamp inputs

Makefile PHONY += inputs · line 1036

Quoted 10 lines
Makefile +4 -0
+	# Hack for sunxi which doesn't have a proper binman definition for
+	# 64-bit boards
+ifneq ($(CONFIG_ARCH_SUNXI)$(CONFIG_ARM64),yy)
 ifeq ($(CONFIG_BINMAN),y)
 	$(call if_changed,binman)
 endif
+endif
 
 # Timestamp file to make sure that binman always runs
 .binman_stamp: FORCE

Tested on

- OrangePi PC (a 32bit SUNXI system)
- Pine64-LTS (a 64bit SUNXI system)

Solves the problem I experienced on the Pine64-LTS.

#3 lore raw

PATCH 1/1 Makefile: sunxi: Don't use binman to build ATF image

+Tom Rini

Quoted 43 lines · Heinrich Schuchardt
Quoted 23 lines · Simon Glass

At present with sunxi 64-bit, the Makefile builds u-boot-sunxi-with-spl.bin and then binman overwrites it with its own version. But the binman definition lacks some parts, in particular BL31.

For now, work around this with a hack.

Fixes 42b18df80fd ("x86: Makefile: Drop explicit targets built by binman")

---

 Makefile | 4 ++++
 1 file changed, 4 insertions(+)
Makefile +0 -0
index 2629a741f1e..4483a9bc8a3 100644
@@ -1024,9 +1024,13 @@ PHONY += inputs
 inputs: $(INPUTS-y)
 
 all: .binman_stamp inputs

Makefile PHONY += inputs · line 1036

Quoted 10 lines
Makefile +4 -0
+     # Hack for sunxi which doesn't have a proper binman definition for
+     # 64-bit boards
+ifneq ($(CONFIG_ARCH_SUNXI)$(CONFIG_ARM64),yy)
 ifeq ($(CONFIG_BINMAN),y)
      $(call if_changed,binman)
 endif
+endif
 
 # Timestamp file to make sure that binman always runs
 .binman_stamp: FORCE

Tested on

- OrangePi PC (a 32bit SUNXI system)
- Pine64-LTS (a 64bit SUNXI system)

Solves the problem I experienced on the Pine64-LTS.

#4 lore raw

PATCH 1/1 Makefile: sunxi: Don't use binman to build ATF image

In reply to Simon Glass
Quoted 9 lines · Simon Glass

At present with sunxi 64-bit, the Makefile builds u-boot-sunxi-with-spl.bin and then binman overwrites it with its own version. But the binman definition lacks some parts, in particular BL31.

For now, work around this with a hack.

Fixes 42b18df80fd ("x86: Makefile: Drop explicit targets built by binman")

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200808/820ab840/attachment.sig>