aboutsummaryrefslogtreecommitdiffstats
path: root/package/boot/uboot-sunxi
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@hauke-m.de>2017-07-20 23:27:31 +0200
committerHauke Mehrtens <hauke@hauke-m.de>2017-09-18 18:36:26 +0200
commitb9a35920bf45c3dfa950acdd187dcb5f80341e69 (patch)
tree7af4e10e9e737f9450ff40b53d843b1221050bd7 /package/boot/uboot-sunxi
parent85b7d780c58b586f2f6c01637efda45d4d77b1ac (diff)
downloadupstream-b9a35920bf45c3dfa950acdd187dcb5f80341e69.tar.gz
upstream-b9a35920bf45c3dfa950acdd187dcb5f80341e69.tar.bz2
upstream-b9a35920bf45c3dfa950acdd187dcb5f80341e69.zip
uboot-sunxi: revert the usage of binman
This will avoid the usage of swig. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Diffstat (limited to 'package/boot/uboot-sunxi')
-rw-r--r--package/boot/uboot-sunxi/patches/210-Revert-fdt-Makefile-Build-python-libfdt-library-if-n.patch96
-rw-r--r--package/boot/uboot-sunxi/patches/211-Revert-scripts-Makefile.lib-Always-have-.-u-boot.dts.patch31
-rw-r--r--package/boot/uboot-sunxi/patches/212-Revert-Avoid-non-portable-sed-construct.patch26
-rw-r--r--package/boot/uboot-sunxi/patches/213-Revert-sunxi-Use-binman-for-sunxi-boards.patch68
4 files changed, 221 insertions, 0 deletions
diff --git a/package/boot/uboot-sunxi/patches/210-Revert-fdt-Makefile-Build-python-libfdt-library-if-n.patch b/package/boot/uboot-sunxi/patches/210-Revert-fdt-Makefile-Build-python-libfdt-library-if-n.patch
new file mode 100644
index 0000000000..dcf16c716f
--- /dev/null
+++ b/package/boot/uboot-sunxi/patches/210-Revert-fdt-Makefile-Build-python-libfdt-library-if-n.patch
@@ -0,0 +1,96 @@
+From eed65e5c25cbc4b6e893f140e9d7898f4624c114 Mon Sep 17 00:00:00 2001
+From: Hauke Mehrtens <hauke@hauke-m.de>
+Date: Wed, 19 Jul 2017 23:12:38 +0200
+Subject: [PATCH 210/213] Revert "fdt: Makefile: Build python libfdt library if
+ needed"
+
+This reverts commit e38ffc42674fedc750ca895046be0bd983b56dd5.
+---
+ Makefile | 17 ++---------------
+ scripts/Makefile.spl | 17 ++++-------------
+ 2 files changed, 6 insertions(+), 28 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 119ad49eec..071efa8926 100644
+--- a/Makefile
++++ b/Makefile
+@@ -1116,7 +1116,7 @@ cmd_ldr = $(LD) $(LDFLAGS_$(@F)) \
+
+ u-boot.rom: u-boot-x86-16bit.bin u-boot.bin \
+ $(if $(CONFIG_SPL_X86_16BIT_INIT),spl/u-boot-spl.bin) \
+- $(if $(CONFIG_HAVE_REFCODE),refcode.bin) checkbinman FORCE
++ $(if $(CONFIG_HAVE_REFCODE),refcode.bin) FORCE
+ $(call if_changed,binman)
+
+ OBJCOPYFLAGS_u-boot-x86-16bit.bin := -O binary -j .start16 -j .resetvec
+@@ -1125,8 +1125,7 @@ u-boot-x86-16bit.bin: u-boot FORCE
+ endif
+
+ ifneq ($(CONFIG_ARCH_SUNXI),)
+-u-boot-sunxi-with-spl.bin: spl/sunxi-spl.bin u-boot.img u-boot.dtb \
+- checkbinman FORCE
++u-boot-sunxi-with-spl.bin: spl/sunxi-spl.bin u-boot.img u-boot.dtb FORCE
+ $(call if_changed,binman)
+ endif
+
+@@ -1355,18 +1354,6 @@ $(version_h): include/config/uboot.release FORCE
+ $(timestamp_h): $(srctree)/Makefile FORCE
+ $(call filechk,timestamp.h)
+
+-checkbinman: tools
+- @if ! ( echo 'import libfdt' | ( PYTHONPATH=tools python )); then \
+- echo >&2; \
+- echo >&2 '*** binman needs the Python libfdt library.'; \
+- echo >&2 '*** Either install it on your system, or try:'; \
+- echo >&2 '***'; \
+- echo >&2 '*** sudo apt-get install swig libpython-dev'; \
+- echo >&2 '***'; \
+- echo >&2 '*** to have U-Boot build its own version.'; \
+- false; \
+- fi
+-
+ # ---------------------------------------------------------------------------
+ quiet_cmd_cpp_lds = LDS $@
+ cmd_cpp_lds = $(CPP) -Wp,-MD,$(depfile) $(cpp_flags) $(LDPPFLAGS) \
+diff --git a/scripts/Makefile.spl b/scripts/Makefile.spl
+index ac3c2c7f13..135706f21d 100644
+--- a/scripts/Makefile.spl
++++ b/scripts/Makefile.spl
+@@ -257,12 +257,14 @@ PHONY += dts_dir
+ dts_dir:
+ $(shell [ -d $(obj)/dts ] || mkdir -p $(obj)/dts)
+
+-include/generated/dt-structs.h: $(obj)/$(SPL_BIN).dtb dts_dir checkdtoc
++include/generated/dt-structs.h: $(obj)/$(SPL_BIN).dtb dts_dir dtoc
+ $(call if_changed,dtoch)
+
+-$(obj)/dts/dt-platdata.c: $(obj)/$(SPL_BIN).dtb dts_dir checkdtoc
++$(obj)/dts/dt-platdata.c: $(obj)/$(SPL_BIN).dtb dts_dir dtoc
+ $(call if_changed,dtocc)
+
++dtoc: #$(objtree)/tools/_libfdt.so
++
+ ifdef CONFIG_SAMSUNG
+ ifdef CONFIG_VAR_SIZE_SPL
+ VAR_SIZE_PARAM = --vs
+@@ -355,17 +357,6 @@ ifneq ($(cmd_files),)
+ include $(cmd_files)
+ endif
+
+-checkdtoc: tools
+- @if ! ( echo 'import libfdt' | ( PYTHONPATH=tools python )); then \
+- echo '*** dtoc needs the Python libfdt library. Either '; \
+- echo '*** install it on your system, or try:'; \
+- echo '***'; \
+- echo '*** sudo apt-get install swig libpython-dev'; \
+- echo '***'; \
+- echo '*** to have U-Boot build its own version.'; \
+- false; \
+- fi
+-
+ PHONY += FORCE
+ FORCE:
+
+--
+2.11.0
+
diff --git a/package/boot/uboot-sunxi/patches/211-Revert-scripts-Makefile.lib-Always-have-.-u-boot.dts.patch b/package/boot/uboot-sunxi/patches/211-Revert-scripts-Makefile.lib-Always-have-.-u-boot.dts.patch
new file mode 100644
index 0000000000..8f68caf8fd
--- /dev/null
+++ b/package/boot/uboot-sunxi/patches/211-Revert-scripts-Makefile.lib-Always-have-.-u-boot.dts.patch
@@ -0,0 +1,31 @@
+From cdee74ad13e933631caf7f544c319d8e981c6063 Mon Sep 17 00:00:00 2001
+From: Hauke Mehrtens <hauke@hauke-m.de>
+Date: Thu, 20 Jul 2017 19:49:25 +0200
+Subject: [PATCH 211/213] Revert "scripts/Makefile.lib: Always have
+ ...-u-boot.dtsi be able to override"
+
+This reverts commit 7452946e7f3742b3ff1cb4a50603e7492aceea88.
+---
+ scripts/Makefile.lib | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
+index 80ddb08474..66f8dcbe07 100644
+--- a/scripts/Makefile.lib
++++ b/scripts/Makefile.lib
+@@ -306,10 +306,10 @@ $(obj)/%.dtb.S: $(obj)/%.dtb
+
+ quiet_cmd_dtc = DTC $@
+ # Modified for U-Boot
+-# Bring in any U-Boot-specific include at the end of the file
++# 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 "$$ a\#include \"$(u_boot_dtsi)\"") | \
++ | sed '/^\/ {$$/{x;s%$$%\#include \"$(u_boot_dtsi)\"%;G;}') | \
+ $(CPP) $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) - ; \
+ $(DTC) -O dtb -o $@ -b 0 \
+ -i $(dir $<) $(DTC_FLAGS) \
+--
+2.11.0
+
diff --git a/package/boot/uboot-sunxi/patches/212-Revert-Avoid-non-portable-sed-construct.patch b/package/boot/uboot-sunxi/patches/212-Revert-Avoid-non-portable-sed-construct.patch
new file mode 100644
index 0000000000..1633ec718b
--- /dev/null
+++ b/package/boot/uboot-sunxi/patches/212-Revert-Avoid-non-portable-sed-construct.patch
@@ -0,0 +1,26 @@
+From 53d123333fa0ddc64b2c55d48366f4582ac6922d Mon Sep 17 00:00:00 2001
+From: Hauke Mehrtens <hauke@hauke-m.de>
+Date: Thu, 20 Jul 2017 19:50:52 +0200
+Subject: [PATCH 212/213] Revert "Avoid non-portable sed construct"
+
+This reverts commit 208db781cad4c24f538658a9cb17e24fa43ca3c9.
+---
+ scripts/Makefile.lib | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
+index 66f8dcbe07..54bcb166b0 100644
+--- a/scripts/Makefile.lib
++++ b/scripts/Makefile.lib
+@@ -309,7 +309,7 @@ quiet_cmd_dtc = DTC $@
+ # 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 '/^\/ {$$/{x;s%$$%\#include \"$(u_boot_dtsi)\"%;G;}') | \
++ | 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) \
+--
+2.11.0
+
diff --git a/package/boot/uboot-sunxi/patches/213-Revert-sunxi-Use-binman-for-sunxi-boards.patch b/package/boot/uboot-sunxi/patches/213-Revert-sunxi-Use-binman-for-sunxi-boards.patch
new file mode 100644
index 0000000000..a3e529c2af
--- /dev/null
+++ b/package/boot/uboot-sunxi/patches/213-Revert-sunxi-Use-binman-for-sunxi-boards.patch
@@ -0,0 +1,68 @@
+From cf1defd80b7594f6f2721ab2dacffe48522abfca Mon Sep 17 00:00:00 2001
+From: Hauke Mehrtens <hauke@hauke-m.de>
+Date: Thu, 20 Jul 2017 19:51:01 +0200
+Subject: [PATCH 213/213] Revert "sunxi: Use binman for sunxi boards"
+
+This reverts commit 61b994a386eb6f631dc1c2194d4cce9b1a43542c.
+---
+ Makefile | 6 ++++--
+ arch/arm/dts/sunxi-u-boot.dtsi | 14 --------------
+ scripts/Makefile.lib | 4 ++--
+ 3 files changed, 6 insertions(+), 18 deletions(-)
+ delete mode 100644 arch/arm/dts/sunxi-u-boot.dtsi
+
+diff --git a/Makefile b/Makefile
+index 071efa8926..5349621baf 100644
+--- a/Makefile
++++ b/Makefile
+@@ -1125,8 +1125,10 @@ u-boot-x86-16bit.bin: u-boot FORCE
+ endif
+
+ ifneq ($(CONFIG_ARCH_SUNXI),)
+-u-boot-sunxi-with-spl.bin: spl/sunxi-spl.bin u-boot.img u-boot.dtb FORCE
+- $(call if_changed,binman)
++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)
+ endif
+
+ ifneq ($(CONFIG_TEGRA),)
+diff --git a/arch/arm/dts/sunxi-u-boot.dtsi b/arch/arm/dts/sunxi-u-boot.dtsi
+deleted file mode 100644
+index 5adfd9bca2..0000000000
+--- a/arch/arm/dts/sunxi-u-boot.dtsi
++++ /dev/null
+@@ -1,14 +0,0 @@
+-#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>;
+- };
+- };
+-};
+diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
+index 54bcb166b0..6246265c91 100644
+--- a/scripts/Makefile.lib
++++ b/scripts/Makefile.lib
+@@ -308,8 +308,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) \
+--
+2.11.0
+