[U-Boot] [PATCH RFC 0/2] sunxi: Build u-boot-sunxi-with-spl.bin on ARM64 as well

For some reason we seem to have documented how to build u-boot-sunxi-with-spl.bin manually with cat but not have a build system rule for it. Let's fix this to have the file built by default just like it is on 32-bit sunxi boards.
Build-tested only.
Tuomas Tynkkynen (2): ARM: sunxi: Move u-boot-sunxi-with-spl.bin rule to Makefile ARM: sunxi: Build u-boot-sunxi-with-spl.bin on ARM64 as well
Makefile | 10 ++++++++++ arch/arm/cpu/armv7/sunxi/config.mk | 6 ------ board/sunxi/README.sunxi64 | 3 +-- 3 files changed, 11 insertions(+), 8 deletions(-) delete mode 100644 arch/arm/cpu/armv7/sunxi/config.mk

We're going to need this logic for 64-bit builds as well, so move it out from under arch/arm/cpu/armv7.
Signed-off-by: Tuomas Tynkkynen tuomas@tuxera.com --- Makefile | 5 +++++ arch/arm/cpu/armv7/sunxi/config.mk | 6 ------ 2 files changed, 5 insertions(+), 6 deletions(-) delete mode 100644 arch/arm/cpu/armv7/sunxi/config.mk
diff --git a/Makefile b/Makefile index c6819d5742..24a79446d8 100644 --- a/Makefile +++ b/Makefile @@ -800,6 +800,11 @@ ifneq ($(BUILD_ROM)$(CONFIG_BUILD_ROM),) ALL-$(CONFIG_X86_RESET_VECTOR) += u-boot.rom endif
+# Build a combined spl + u-boot image for sunxi +ifeq ($(CONFIG_ARCH_SUNXI)$(CONFIG_SPL),yy) +ALL-y += u-boot-sunxi-with-spl.bin +endif + # enable combined SPL/u-boot/dtb rules for tegra ifeq ($(CONFIG_TEGRA)$(CONFIG_SPL),yy) ALL-y += u-boot-tegra.bin u-boot-nodtb-tegra.bin diff --git a/arch/arm/cpu/armv7/sunxi/config.mk b/arch/arm/cpu/armv7/sunxi/config.mk deleted file mode 100644 index 76ffec9df6..0000000000 --- a/arch/arm/cpu/armv7/sunxi/config.mk +++ /dev/null @@ -1,6 +0,0 @@ -# Build a combined spl + u-boot image -ifdef CONFIG_SPL -ifndef CONFIG_SPL_BUILD -ALL-y += u-boot-sunxi-with-spl.bin -endif -endif

Hi,
On 06/03/18 21:38, Tuomas Tynkkynen wrote:
We're going to need this logic for 64-bit builds as well, so move it out from under arch/arm/cpu/armv7.
Signed-off-by: Tuomas Tynkkynen tuomas@tuxera.com
Reviewed-by: Andre Przywara andre.przywara@arm.com
Thanks! Andre.
Makefile | 5 +++++ arch/arm/cpu/armv7/sunxi/config.mk | 6 ------ 2 files changed, 5 insertions(+), 6 deletions(-) delete mode 100644 arch/arm/cpu/armv7/sunxi/config.mk
diff --git a/Makefile b/Makefile index c6819d5742..24a79446d8 100644 --- a/Makefile +++ b/Makefile @@ -800,6 +800,11 @@ ifneq ($(BUILD_ROM)$(CONFIG_BUILD_ROM),) ALL-$(CONFIG_X86_RESET_VECTOR) += u-boot.rom endif
+# Build a combined spl + u-boot image for sunxi +ifeq ($(CONFIG_ARCH_SUNXI)$(CONFIG_SPL),yy) +ALL-y += u-boot-sunxi-with-spl.bin +endif
# enable combined SPL/u-boot/dtb rules for tegra ifeq ($(CONFIG_TEGRA)$(CONFIG_SPL),yy) ALL-y += u-boot-tegra.bin u-boot-nodtb-tegra.bin diff --git a/arch/arm/cpu/armv7/sunxi/config.mk b/arch/arm/cpu/armv7/sunxi/config.mk deleted file mode 100644 index 76ffec9df6..0000000000 --- a/arch/arm/cpu/armv7/sunxi/config.mk +++ /dev/null @@ -1,6 +0,0 @@ -# Build a combined spl + u-boot image -ifdef CONFIG_SPL -ifndef CONFIG_SPL_BUILD -ALL-y += u-boot-sunxi-with-spl.bin -endif -endif

On Wed, Mar 7, 2018 at 7:51 AM, André Przywara andre.przywara@arm.com wrote:
Hi,
On 06/03/18 21:38, Tuomas Tynkkynen wrote:
We're going to need this logic for 64-bit builds as well, so move it out from under arch/arm/cpu/armv7.
Signed-off-by: Tuomas Tynkkynen tuomas@tuxera.com
Reviewed-by: Andre Przywara andre.przywara@arm.com
Reviewed-by: Jagan Teki jagan@openedev.com

In README.sunxi64 we tell the user how to optionally create u-boot-sunxi-with-spl.bin by manually running cat. Instead, have the build system create the file automatically just like it does for 32-bit sunxi boards.
Signed-off-by: Tuomas Tynkkynen tuomas@tuxera.com --- Makefile | 5 +++++ board/sunxi/README.sunxi64 | 3 +-- 2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/Makefile b/Makefile index 24a79446d8..4b203a0155 100644 --- a/Makefile +++ b/Makefile @@ -1191,8 +1191,13 @@ u-boot-x86-16bit.bin: u-boot FORCE endif
ifneq ($(CONFIG_ARCH_SUNXI),) +ifeq ($(CONFIG_ARM64),) u-boot-sunxi-with-spl.bin: spl/sunxi-spl.bin u-boot.img u-boot.dtb FORCE $(call if_changed,binman) +else +u-boot-sunxi-with-spl.bin: spl/sunxi-spl.bin u-boot.itb FORCE + $(call if_changed,cat) +endif endif
ifneq ($(CONFIG_TEGRA),) diff --git a/board/sunxi/README.sunxi64 b/board/sunxi/README.sunxi64 index c492f749b8..5a363d27b8 100644 --- a/board/sunxi/README.sunxi64 +++ b/board/sunxi/README.sunxi64 @@ -95,9 +95,8 @@ Transfer the SPL and the U-Boot FIT image directly to an uSD card: (replace /dev/sdx with you SD card device file name, which could be /dev/mmcblk[x] as well).
-Alternatively you can concatenate the SPL and the U-Boot FIT image into a +Alternatively you can use the SPL and the U-Boot FIT image combined into a single file and transfer that instead: -$ cat spl/sunxi-spl.bin u-boot.itb > u-boot-sunxi-with-spl.bin # dd if=u-boot-sunxi-with-spl.bin of=/dev/sdx bs=8k seek=1
You can partition the microSD card, but leave the first MB unallocated (most

Hi,
On 06/03/18 21:38, Tuomas Tynkkynen wrote:
In README.sunxi64 we tell the user how to optionally create u-boot-sunxi-with-spl.bin by manually running cat. Instead, have the build system create the file automatically just like it does for 32-bit sunxi boards.
Signed-off-by: Tuomas Tynkkynen tuomas@tuxera.com
Reviewed-by: Andre Przywara andre.przywara@arm.com
Cheers, Andre.
Makefile | 5 +++++ board/sunxi/README.sunxi64 | 3 +-- 2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/Makefile b/Makefile index 24a79446d8..4b203a0155 100644 --- a/Makefile +++ b/Makefile @@ -1191,8 +1191,13 @@ u-boot-x86-16bit.bin: u-boot FORCE endif
ifneq ($(CONFIG_ARCH_SUNXI),) +ifeq ($(CONFIG_ARM64),) u-boot-sunxi-with-spl.bin: spl/sunxi-spl.bin u-boot.img u-boot.dtb FORCE $(call if_changed,binman) +else +u-boot-sunxi-with-spl.bin: spl/sunxi-spl.bin u-boot.itb FORCE
- $(call if_changed,cat)
+endif endif
ifneq ($(CONFIG_TEGRA),) diff --git a/board/sunxi/README.sunxi64 b/board/sunxi/README.sunxi64 index c492f749b8..5a363d27b8 100644 --- a/board/sunxi/README.sunxi64 +++ b/board/sunxi/README.sunxi64 @@ -95,9 +95,8 @@ Transfer the SPL and the U-Boot FIT image directly to an uSD card: (replace /dev/sdx with you SD card device file name, which could be /dev/mmcblk[x] as well).
-Alternatively you can concatenate the SPL and the U-Boot FIT image into a +Alternatively you can use the SPL and the U-Boot FIT image combined into a single file and transfer that instead: -$ cat spl/sunxi-spl.bin u-boot.itb > u-boot-sunxi-with-spl.bin # dd if=u-boot-sunxi-with-spl.bin of=/dev/sdx bs=8k seek=1
You can partition the microSD card, but leave the first MB unallocated (most

On Wed, Mar 7, 2018 at 7:51 AM, André Przywara andre.przywara@arm.com wrote:
Hi,
On 06/03/18 21:38, Tuomas Tynkkynen wrote:
In README.sunxi64 we tell the user how to optionally create u-boot-sunxi-with-spl.bin by manually running cat. Instead, have the build system create the file automatically just like it does for 32-bit sunxi boards.
Signed-off-by: Tuomas Tynkkynen tuomas@tuxera.com
Reviewed-by: Andre Przywara andre.przywara@arm.com
Reviewed-by: Jagan Teki jagan@openedev.com

Hi,
On 06/03/18 21:38, Tuomas Tynkkynen wrote:
For some reason we seem to have documented how to build u-boot-sunxi-with-spl.bin manually with cat but not have a build system rule for it. Let's fix this to have the file built by default just like it is on 32-bit sunxi boards.
Ah, thanks a lot! Admittedly I was just too lazy to find out how this works for the 32-bit boards, and how to pull this into the 64 bit builds as well.
Build-tested only.
I actually booted from an SD card and it works like a charm! So thanks again for pulling this together.
Cheers, Andre.
Tuomas Tynkkynen (2): ARM: sunxi: Move u-boot-sunxi-with-spl.bin rule to Makefile ARM: sunxi: Build u-boot-sunxi-with-spl.bin on ARM64 as well
Makefile | 10 ++++++++++ arch/arm/cpu/armv7/sunxi/config.mk | 6 ------ board/sunxi/README.sunxi64 | 3 +-- 3 files changed, 11 insertions(+), 8 deletions(-) delete mode 100644 arch/arm/cpu/armv7/sunxi/config.mk

On Tue, Mar 06, 2018 at 11:38:20PM +0200, Tuomas Tynkkynen wrote:
For some reason we seem to have documented how to build u-boot-sunxi-with-spl.bin manually with cat but not have a build system rule for it. Let's fix this to have the file built by default just like it is on 32-bit sunxi boards.
Build-tested only.
Acked-by: Maxime Ripard maxime.ripard@bootlin.com
Thanks! Maxime

On Wed, Mar 7, 2018 at 2:01 PM, Maxime Ripard maxime.ripard@bootlin.com wrote:
On Tue, Mar 06, 2018 at 11:38:20PM +0200, Tuomas Tynkkynen wrote:
For some reason we seem to have documented how to build u-boot-sunxi-with-spl.bin manually with cat but not have a build system rule for it. Let's fix this to have the file built by default just like it is on 32-bit sunxi boards.
Build-tested only.
Acked-by: Maxime Ripard maxime.ripard@bootlin.com
Applied to u-boot-sunxi/master
participants (4)
-
André Przywara
-
Jagan Teki
-
Maxime Ripard
-
Tuomas Tynkkynen