[U-Boot] [PATCH v4 10/11] sunxi: Use binman for sunxi boards

Simon Glass sjg at chromium.org
Thu Oct 6 22:59:41 CEST 2016


Move sunxi boards to use binman. This involves adding the image definition
to the device tree and using it in the Makefile.

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

Changes in v4:
- Remove RFC tag
- Update sunxi rule to depend on u-boot.dtb
- Use binman for all sunxi boards

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

Changes in v2: None

 Makefile                       |  6 ++----
 arch/arm/dts/sunxi-u-boot.dtsi | 14 ++++++++++++++
 2 files changed, 16 insertions(+), 4 deletions(-)
 create mode 100644 arch/arm/dts/sunxi-u-boot.dtsi

diff --git a/Makefile b/Makefile
index a5428a2..a5bbb24 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)
+u-boot-sunxi-with-spl.bin: spl/sunxi-spl.bin u-boot.img u-boot.dtb FORCE
+	$(call if_changed,binman)
 endif
 
 ifneq ($(CONFIG_TEGRA),)
diff --git a/arch/arm/dts/sunxi-u-boot.dtsi b/arch/arm/dts/sunxi-u-boot.dtsi
new file mode 100644
index 0000000..5adfd9b
--- /dev/null
+++ b/arch/arm/dts/sunxi-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