
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@chromium.org ---
Makefile | 4 +--- arch/arm/dts/sun7i-a20-pcduino3.dts | 12 ++++++++++++ 2 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/Makefile b/Makefile index 6155f11..8862b8b 100644 --- a/Makefile +++ b/Makefile @@ -1084,10 +1084,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.dts b/arch/arm/dts/sun7i-a20-pcduino3.dts index 1a8b39b..141044e 100644 --- a/arch/arm/dts/sun7i-a20-pcduino3.dts +++ b/arch/arm/dts/sun7i-a20-pcduino3.dts @@ -42,6 +42,7 @@ */
/dts-v1/; +#include <config.h> #include "sun7i-a20.dtsi" #include "sunxi-common-regulators.dtsi"
@@ -62,6 +63,17 @@ stdout-path = "serial0:115200n8"; };
+ 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>; + }; + }; + leds { compatible = "gpio-leds"; pinctrl-names = "default";