]> git.sur5r.net Git - u-boot/commitdiff
sunxi: Use binman for sunxi boards
authorSimon Glass <sjg@chromium.org>
Sat, 26 Nov 2016 03:16:01 +0000 (20:16 -0700)
committerSimon Glass <sjg@chromium.org>
Mon, 19 Dec 2016 19:09:55 +0000 (08:09 +1300)
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@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
Makefile
arch/arm/dts/sunxi-u-boot.dtsi [new file with mode: 0644]
scripts/Makefile.lib

index 7688e875331072888f7675b5f04c888730eea4de..f5f82d203cca20662b7110038a9c45a62442b1d5 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1114,10 +1114,8 @@ u-boot-x86-16bit.bin: u-boot FORCE
 endif
 
 ifneq ($(CONFIG_ARCH_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 (file)
index 0000000..5adfd9b
--- /dev/null
@@ -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>;
+               };
+       };
+};
index 60265f4d32da4dcffdaf1085840cd4bf24096ad7..348de2dbf81ebb9928af4da99bd164e37699e4ac 100644 (file)
@@ -310,8 +310,8 @@ quiet_cmd_dtc = DTC     $@
 # Modified for U-Boot
 # Bring in any U-Boot-specific include after the '/dts-v1/;' header
 cmd_dtc = mkdir -p $(dir ${dtc-tmp}) ; \
-       cat $< $(if $(u-boot-dtsi),\
-               | sed 's%^/ {$$%\#include \"$(u-boot-dtsi)\"\n&%')  | \
+       cat $< $(if $(u_boot_dtsi),\
+               | sed 's%^/ {$$%\#include \"$(u_boot_dtsi)\"\n&%')  | \
                $(CPP) $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) - ; \
        $(DTC) -O dtb -o $@ -b 0 \
                -i $(dir $<) $(DTC_FLAGS) \