Skip to contentSkip to conversation

Revert "boot/uboot: allow to build multiple U-Boot images"

PATCH New Fabio Estevam 3 participants 3 messages Oct 6, 2016 – Oct 7, 2016

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 Revert "boot/uboot: allow to build multiple U-Boot images"

This reverts commit fad58cefa4a392b52eafe46a773f8cbfb8aadb43.

Since commit fad58cefa4a392b ("boot/uboot: allow to build multiple U-Boot images") the installation of SPL binary fails.

For example, when building the mx6cubox_defconfig target we see:

LD u-boot
OBJCOPY u-boot-nodtb.bin
COPY u-boot.bin
MKIMAGE u-boot.img

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

uboot 2016.09.01 Installing to target
uboot 2016.09.01 Installing to images directory

cp -dpf /home/fabio/buildroot/output/build/uboot-2016.09.01/u-boot.bin /home/fabio/buildroot/output/images/ cp -dpf /home/fabio/buildroot/output/build/uboot-2016.09.01/u-boot.img /home/fabio/buildroot/output/images/ cp -dpf /home/fabio/buildroot/output/build/uboot-2016.09.01/SPL /home/fabio/buildroot/output/images/
cp: cannot stat '/home/fabio/buildroot/output/build/uboot-2016.09.01/SPL': No such file or directory

According to Arnout Vandecappelle:

"It has been mentioned in a number of threads: a better solution is to always 'make all' in UBOOT_BUILD_CMDS. This will also allow to remove many of the UBOOT_MAKE_TARGET assignments.

It hasn't been done yet because such a change should be tested against all the different U-Boot artefacts, and with different U-Boot versions."

While the 'make all' approach is not implemented, let's revert the offending commit to avoid the SPL breakage.

---
Changes since v1:
- Revert the offending commit instead of trying to fix it.

 boot/uboot/Config.in |  19 +++++-----
 boot/uboot/uboot.mk  | 102 ++++++++++++++++++---------------------------------
 2 files changed, 44 insertions(+), 77 deletions(-)
boot/uboot/Config.in +9 -10
index d46a757..a345601 100644
@@ -137,7 +137,9 @@ config BR2_TARGET_UBOOT_NEEDS_DTC
 	  Select this option if your U-Boot board configuration
 	  requires the Device Tree compiler to be available.
 
-menu "U-Boot binary format"
+choice
+	prompt "U-Boot binary format"
+	default BR2_TARGET_UBOOT_FORMAT_BIN
 
 config BR2_TARGET_UBOOT_FORMAT_AIS
 	bool "u-boot.ais"
@@ -148,7 +150,6 @@ config BR2_TARGET_UBOOT_FORMAT_AIS
 
 config BR2_TARGET_UBOOT_FORMAT_BIN
 	bool "u-boot.bin"
-	default y
 
 config BR2_TARGET_UBOOT_FORMAT_DTB_IMG
 	bool "u-boot-dtb.img"
@@ -251,21 +252,19 @@ config BR2_TARGET_UBOOT_FORMAT_CUSTOM
 	help
 	  On some platforms, the standard U-Boot binary is not called
 	  u-boot.bin, but u-boot<something>.bin. If this is your case,
-	  you should select this option and specify the correct name(s)
+	  you should select this option and specify the correct name
 	  in BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME.
 
+endchoice
+
 config BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME
-	string "U-Boot binary format: custom names"
+	string "U-Boot binary format: custom name"
 	depends on BR2_TARGET_UBOOT_FORMAT_CUSTOM
 	help
-	  In case the U-Boot binary for the target platform is not among
-	  the default names, one or more custom names can be listed here.
-	  Use space to separate multiple names.
-	  Example:
+	  Specify the correct name of the output binary created by
+	  U-Boot, if it is not one of the default names. For example:
 	  u-boot_magic.bin
 
-endmenu
-
 config BR2_TARGET_UBOOT_OMAP_IFT
 	depends on BR2_TARGET_UBOOT_FORMAT_BIN
 	depends on BR2_arm || BR2_armeb
boot/uboot/uboot.mk +35 -67

124 lines not on this page · raw message

Signature · 1 line
2.7.4
#1 lore raw

PATCH v2 1/1 Revert "boot/uboot: allow to build multiple U-Boot images"

Hello,

Quoted 4 lines · Fabio Estevam

This reverts commit fad58cefa4a392b52eafe46a773f8cbfb8aadb43.

Since commit fad58cefa4a392b ("boot/uboot: allow to build multiple U-Boot images") the installation of SPL binary fails.

I don't think we want to revert this patch. Instead, we want to call "make all" unconditionally.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
#2 lore raw

PATCH v2 1/1 Revert "boot/uboot: allow to build multiple U-Boot images"

Hi Thomas,

Quoted 2 lines · Thomas Petazzoni

I don't think we want to revert this patch. Instead, we want to call "make all" unconditionally.

Like this?

boot/uboot/uboot.mk +4 -1
index 7379a4d..86e5b84 100644
@@ -48,6 +48,9 @@ UBOOT_MAKE_TARGET += mdbtrick
 endif
 endif
 
+# Call 'make all' unconditionally
+UBOOT_MAKE_TARGET += all
+
 ifeq ($(BR2_TARGET_UBOOT_FORMAT_KWB),y)
 UBOOT_BINS += u-boot.kwb
 UBOOT_MAKE_TARGET += u-boot.kwb
@@ -68,7 +71,7 @@ endif
 
 ifeq ($(BR2_TARGET_UBOOT_FORMAT_DTB_IMG),y)
 UBOOT_BINS += u-boot-dtb.img
-UBOOT_MAKE_TARGET += all u-boot-dtb.img
+UBOOT_MAKE_TARGET += u-boot-dtb.img
 endif
 
 ifeq ($(BR2_TARGET_UBOOT_FORMAT_IMG),y)