Skip to contentSkip to conversation

ARM: socfpga: Introduce u-boot-with-nand-spl.sfp target

PATCH New Marek Vasut 3 participants 4 messages Nov 20, 2019 – Nov 21, 2019 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: socfpga: Introduce u-boot-with-nand-spl.sfp target

The NAND devices with 128 kiB erase blocks require extra 64 kiB padding between each SPL image. Generate U-Boot image with such a padding using this new target.

Cc Chin Liang See <[email protected]>
Cc Dalon Westergreen <[email protected]>
Cc Dinh Nguyen <[email protected]>
Cc Ley Foon Tan <[email protected]>
Cc Simon Goldschmidt <[email protected]>
Cc Tien Fong Chee <[email protected]>
---
 Makefile | 11 +++++++++++
 1 file changed, 11 insertions(+)
Makefile +11 -0
index 7485bc2594..d3038cf665 100644
@@ -1476,6 +1476,17 @@ cmd_socboot = cat	spl/u-boot-spl.sfp spl/u-boot-spl.sfp	\
 			u-boot.img > $@ || rm -f $@
 u-boot-with-spl.sfp: spl/u-boot-spl.sfp u-boot.img FORCE
 	$(call if_changed,socboot)
+
+quiet_cmd_socnandboot = SOCNANDBOOT $@
+cmd_socnandboot =  dd if=/dev/zero of=spl/u-boot-spl.pad bs=64 count=1024 ; \
+		   cat	spl/u-boot-spl.sfp spl/u-boot-spl.pad \
+			spl/u-boot-spl.sfp spl/u-boot-spl.pad \
+			spl/u-boot-spl.sfp spl/u-boot-spl.pad \
+			spl/u-boot-spl.sfp spl/u-boot-spl.pad \
+			u-boot.img > $@ || rm -f $@ spl/u-boot-spl.pad
+u-boot-with-nand-spl.sfp: spl/u-boot-spl.sfp u-boot.img FORCE
+	$(call if_changed,socnandboot)
+
 endif
 
 ifeq ($(CONFIG_MPC85xx)$(CONFIG_OF_SEPARATE),yy)
Signature · 1 line
2.24.0.432.g9d3f5f5b63
#1 lore raw

PATCH 1/1 ARM: socfpga: Introduce u-boot-with-nand-spl.sfp target

Quoted 18 lines

-----Original Message-----
From: Marek Vasut <[email protected]>
Sent: Thursday, November 21, 2019 5:37 AM
To: u-boot at lists.denx.de
Cc: Marek Vasut <[email protected]>; See, Chin Liang <[email protected]>; Dalon Westergreen <[email protected]>; Dinh Nguyen <[email protected]>; Tan, Ley Foon <[email protected]>; Simon Goldschmidt <[email protected]>; Chee, Tien Fong <[email protected]>
Subject: [PATCH] ARM: socfpga: Introduce u-boot-with-nand-spl.sfp target

The NAND devices with 128 kiB erase blocks require extra 64 kiB padding between each SPL image. Generate U-Boot image with such a padding using this new target.

Quoted 7 lines
Cc Chin Liang See <[email protected]>
Cc Dalon Westergreen <[email protected]>
Cc Dinh Nguyen <[email protected]>
Cc Ley Foon Tan <[email protected]>
Cc Simon Goldschmidt <[email protected]>
Cc Tien Fong Chee <[email protected]>

Regards
Ley Foon

#2 lore raw

PATCH 1/1 ARM: socfpga: Introduce u-boot-with-nand-spl.sfp target

In reply to Marek Vasut
Quoted 21 lines · Marek Vasut

The NAND devices with 128 kiB erase blocks require extra 64 kiB padding between each SPL image. Generate U-Boot image with such a padding using this new target.

Cc Chin Liang See <[email protected]>
Cc Dalon Westergreen <[email protected]>
Cc Dinh Nguyen <[email protected]>
Cc Ley Foon Tan <[email protected]>
Cc Simon Goldschmidt <[email protected]>
Cc Tien Fong Chee <[email protected]>
---
 Makefile | 11 +++++++++++
 1 file changed, 11 insertions(+)
Makefile +0 -0
index 7485bc2594..d3038cf665 100644

Makefile cmd_socboot = cat spl/u-boot-spl.sfp spl/u-boot-spl.sfp \ · line 1481

Quoted 6 lines
Makefile +3 -0
@@ -1476,6 +1476,17 @@ cmd_socboot = cat        spl/u-boot-spl.sfp spl/u-boot-spl.sfp   \
                        u-boot.img > $@ || rm -f $@
 u-boot-with-spl.sfp: spl/u-boot-spl.sfp u-boot.img FORCE
        $(call if_changed,socboot)
+
+quiet_cmd_socnandboot = SOCNANDBOOT $@
+cmd_socnandboot =  dd if=/dev/zero of=spl/u-boot-spl.pad bs=64 count=1024 ; \

There's already a file 'spl/u-boot-spl-pad.bin' which is used for reserving bss between spl binary and dtb. Could we use a more speaking name here?

Regards,
Simon

Quoted 14 lines
Makefile +8 -1
+                  cat  spl/u-boot-spl.sfp spl/u-boot-spl.pad \
+                       spl/u-boot-spl.sfp spl/u-boot-spl.pad \
+                       spl/u-boot-spl.sfp spl/u-boot-spl.pad \
+                       spl/u-boot-spl.sfp spl/u-boot-spl.pad \
+                       u-boot.img > $@ || rm -f $@ spl/u-boot-spl.pad
+u-boot-with-nand-spl.sfp: spl/u-boot-spl.sfp u-boot.img FORCE
+       $(call if_changed,socnandboot)
+
 endif
 
 ifeq ($(CONFIG_MPC85xx)$(CONFIG_OF_SEPARATE),yy)
--

2.24.0.432.g9d3f5f5b63

#3 lore raw

PATCH 1/1 ARM: socfpga: Introduce u-boot-with-nand-spl.sfp target

Quoted 17 lines · Simon Goldschmidt
Quoted 16 lines · Marek Vasut

The NAND devices with 128 kiB erase blocks require extra 64 kiB padding between each SPL image. Generate U-Boot image with such a padding using this new target.

Cc Chin Liang See <[email protected]>
Cc Dalon Westergreen <[email protected]>
Cc Dinh Nguyen <[email protected]>
Cc Ley Foon Tan <[email protected]>
Cc Simon Goldschmidt <[email protected]>
Cc Tien Fong Chee <[email protected]>
---
 Makefile | 11 +++++++++++
 1 file changed, 11 insertions(+)
Quoted 14 lines

Makefile cmd_socboot = cat spl/u-boot-spl.sfp spl/u-boot-spl.sfp \ · line 1481

Quoted 11 lines
Makefile +3 -0
index 7485bc2594..d3038cf665 100644
@@ -1476,6 +1476,17 @@ cmd_socboot = cat        spl/u-boot-spl.sfp spl/u-boot-spl.sfp   \
                        u-boot.img > $@ || rm -f $@
 u-boot-with-spl.sfp: spl/u-boot-spl.sfp u-boot.img FORCE
        $(call if_changed,socboot)
+
+quiet_cmd_socnandboot = SOCNANDBOOT $@
+cmd_socnandboot =  dd if=/dev/zero of=spl/u-boot-spl.pad bs=64 count=1024 ; \

There's already a file 'spl/u-boot-spl-pad.bin' which is used for reserving bss between spl binary and dtb. Could we use a more speaking name here?

Like what would you propose ?