[U-Boot] [PATCH v3 09/10] RFC: Use binman for a sunxi board

Simon Glass sjg at chromium.org
Wed Oct 5 02:25:39 CEST 2016


Add an example usage of binman for a sunxi board. This involves adding the
image definition to the device tree and using it in the Makefile.

This is for example only.

Signed-off-by: Simon Glass <sjg at chromium.org>
---

Changes in v3:
- Use a <dts>-u-boot.dtsi file for the binman changes

Changes in v2: None

 Makefile                                    |  4 +---
 arch/arm/dts/sun7i-a20-pcduino3-u-boot.dtsi | 14 ++++++++++++++
 2 files changed, 15 insertions(+), 3 deletions(-)
 create mode 100644 arch/arm/dts/sun7i-a20-pcduino3-u-boot.dtsi

diff --git a/Makefile b/Makefile
index a5428a2..31c9483 100644
--- a/Makefile
+++ b/Makefile
@@ -1121,10 +1121,8 @@ u-boot-x86-16bit.bin: u-boot FORCE
 endif
 
 ifneq ($(CONFIG_SUNXI),)
-OBJCOPYFLAGS_u-boot-sunxi-with-spl.bin = -I binary -O binary \
-				   --pad-to=$(CONFIG_SPL_PAD_TO) --gap-fill=0xff
 u-boot-sunxi-with-spl.bin: spl/sunxi-spl.bin u-boot.img FORCE
-	$(call if_changed,pad_cat)
+	$(call if_changed,binman)
 endif
 
 ifneq ($(CONFIG_TEGRA),)
diff --git a/arch/arm/dts/sun7i-a20-pcduino3-u-boot.dtsi b/arch/arm/dts/sun7i-a20-pcduino3-u-boot.dtsi
new file mode 100644
index 0000000..5adfd9b
--- /dev/null
+++ b/arch/arm/dts/sun7i-a20-pcduino3-u-boot.dtsi
@@ -0,0 +1,14 @@
+#include <config.h>
+
+/ {
+	binman {
+		filename = "u-boot-sunxi-with-spl.bin";
+		pad-byte = <0xff>;
+		blob {
+			filename = "spl/sunxi-spl.bin";
+		};
+		u-boot-img {
+			pos = <CONFIG_SPL_PAD_TO>;
+		};
+	};
+};
-- 
2.8.0.rc3.226.g39d4020



More information about the U-Boot mailing list