Makefile: socfpga: Generate spl/u-boot-splx4.sfp with 4 SPL images
PATCH 1/1 Makefile: socfpga: Generate spl/u-boot-splx4.sfp with 4 SPL images
Generate spl/u-boot-splx4.sfp which consist of 4 SPL images required for booting up Cyclone5/Arria10.
--- Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
Makefile +3 -2
@@ -1578,8 +1578,9 @@ u-boot.spr: spl/u-boot-spl.img u-boot.img FORCE ifneq ($(CONFIG_ARCH_SOCFPGA),) quiet_cmd_socboot = SOCBOOT $@ cmd_socboot = cat spl/u-boot-spl.sfp spl/u-boot-spl.sfp \ - spl/u-boot-spl.sfp spl/u-boot-spl.sfp \ - u-boot.img > $@ || rm -f $@ + spl/u-boot-spl.sfp \ + spl/u-boot-spl.sfp > spl/u-boot-splx4.sfp ; \ + cat spl/u-boot-splx4.sfp u-boot.img > $@ || rm -f $@ u-boot-with-spl.sfp: spl/u-boot-spl.sfp u-boot.img FORCE $(call if_changed,socboot)
Signature · 1 line
2.2.0
PATCH 1/1 Makefile: socfpga: Generate spl/u-boot-splx4.sfp with 4 SPL images
Quoted 13 lines · Chee Hong Ang
Generate spl/u-boot-splx4.sfp which consist of 4 SPL images required for booting up Cyclone5/Arria10.
Signed-off-by Chee Hong Ang <[email protected]>--- Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)Makefile +0
-0
Makefile u-boot.spr: spl/u-boot-spl.img u-boot.img FORCE · line 1583
Quoted 8 lines
Makefile +3
-2@@ -1578,8 +1578,9 @@ u-boot.spr: spl/u-boot-spl.img u-boot.img FORCE ifneq ($(CONFIG_ARCH_SOCFPGA),) quiet_cmd_socboot = SOCBOOT $@ cmd_socboot = cat spl/u-boot-spl.sfp spl/u-boot-spl.sfp \ - spl/u-boot-spl.sfp spl/u-boot-spl.sfp \ - u-boot.img > $@ || rm -f $@ + spl/u-boot-spl.sfp \ + spl/u-boot-spl.sfp > spl/u-boot-splx4.sfp ; \ + cat spl/u-boot-splx4.sfp u-boot.img > $@ || rm -f $@
Isn't that what the existing code does already ?
Also, this will I think fail on 128k erase block size NAND due to missing padding.
Tan
PATCH 1/1 Makefile: socfpga: Generate spl/u-boot-splx4.sfp with 4 SPL images
Quoted 39 lines
-----Original Message-----
From: Marek Vasut <[email protected]>
Sent: Wednesday, August 5, 2020 4:23 PM
To: Ang, Chee Hong <[email protected]>; u-boot at lists.denx.de
Cc: Simon Goldschmidt <[email protected]>; Tom Rini <[email protected]>; See, Chin Liang <[email protected]>; Tan, Ley Foon <[email protected]>; Chee, Tien Fong <[email protected]>; Lim, Elly Siew Chin <[email protected]>
Subject: Re: [PATCH v1]Makefile: socfpga: Generate spl/u-boot-splx4.sfp with 4 SPL imagesMakefile u-boot.spr: spl/u-boot-spl.img u-boot.img
Quoted 13 lines · Chee Hong Ang
Generate spl/u-boot-splx4.sfp which consist of 4 SPL images required for booting up Cyclone5/Arria10.
Signed-off-by Chee Hong Ang <[email protected]>--- Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)Makefile +0
-0@@ -1578,8 +1578,9 @@ u-boot.spr: spl/u-boot-spl.img u-boot.imgFORCE
Makefile u-boot.spr: spl/u-boot-spl.img u-boot.img FORCE · line 1583
Quoted 7 lines
ifneq ($(CONFIG_ARCH_SOCFPGA),)
quiet_cmd_socboot= SOCBOOT $@
cmd_socboot= cat spl/u-boot-spl.sfp spl/u-boot-spl.sfp \Makefile +3
-2- spl/u-boot-spl.sfp spl/u-boot-spl.sfp \ - u-boot.img > $@ || rm -f $@ + spl/u-boot-spl.sfp \ + spl/u-boot-spl.sfp > spl/u-boot-splx4.sfp ; \ + cat spl/u-boot-splx4.sfp u-boot.img > $@ || rm -f $@Isn't that what the existing code does already ?
Quoted 2 lines
Also, this will I think fail on 128k erase block size NAND due to missing padding.
This is to generate an output file (spl/u-boot-splx4.sfp) with 4 SPL images, each SPL image size is 256KB. So, spl/u-boot-splx4.sfp is always with 1MB size (4x256KB). Shouldn't have problem for 128KB erase size NAND.
Regards
Ley Foon
PATCH 1/1 Makefile: socfpga: Generate spl/u-boot-splx4.sfp with 4 SPL images
On 8/5/20 11:15 AM, Tan, Ley Foon wrote:
[...]
Quoted 16 lines
Quoted 16 lines
Makefile u-boot.spr: spl/u-boot-spl.img u-boot.img
Quoted 5 lines
Makefile +0
-0@@ -1578,8 +1578,9 @@ u-boot.spr: spl/u-boot-spl.img u-boot.imgFORCE
Makefile u-boot.spr: spl/u-boot-spl.img u-boot.img FORCE · line 1583
Quoted 7 lines
ifneq ($(CONFIG_ARCH_SOCFPGA),)
quiet_cmd_socboot= SOCBOOT $@
cmd_socboot= cat spl/u-boot-spl.sfp spl/u-boot-spl.sfp \Makefile +3
-2- spl/u-boot-spl.sfp spl/u-boot-spl.sfp \ - u-boot.img > $@ || rm -f $@ + spl/u-boot-spl.sfp \ + spl/u-boot-spl.sfp > spl/u-boot-splx4.sfp ; \ + cat spl/u-boot-splx4.sfp u-boot.img > $@ || rm -f $@Isn't that what the existing code does already ?
Quoted 4 lines
Quoted 2 lines
Also, this will I think fail on 128k erase block size NAND due to missing padding.
This is to generate an output file (spl/u-boot-splx4.sfp) with 4 SPL images, each SPL image size is 256KB. So, spl/u-boot-splx4.sfp is always with 1MB size (4x256KB). Shouldn't have problem for 128KB erase size NAND.
Isn't the SPL padded to 64 kiB each ?
Tan
PATCH 1/1 Makefile: socfpga: Generate spl/u-boot-splx4.sfp with 4 SPL images
Quoted 33 lines
-----Original Message-----
From: Marek Vasut <[email protected]>
Sent: Wednesday, August 5, 2020 5:18 PM
To: Tan, Ley Foon <[email protected]>; Ang, Chee Hong <[email protected]>; u-boot at lists.denx.de
Cc: Simon Goldschmidt <[email protected]>; Tom Rini <[email protected]>; See, Chin Liang <[email protected]>; Chee, Tien Fong <[email protected]>; Lim, Elly Siew Chin <[email protected]>
Subject: Re: [PATCH v1]Makefile: socfpga: Generate spl/u-boot-splx4.sfp with 4 SPL imagesOn 8/5/20 11:15 AM, Tan, Ley Foon wrote:
[...]Quoted 7 lines
Quoted 7 lines
Makefile u-boot.spr: spl/u-boot-spl.img u-boot.img
Quoted 5 lines
Makefile +0
-0@@ -1578,8 +1578,9 @@ u-boot.spr: spl/u-boot-spl.img u-boot.imgFORCE
Quoted 1 line
ifneq ($(CONFIG_ARCH_SOCFPGA),)
quiet_cmd_socboot= SOCBOOT$@
Quoted 9 lines
Quoted 9 lines
Makefile u-boot.spr: spl/u-boot-spl.img u-boot.img FORCE · line 1583
Quoted 6 lines
cmd_socboot= cat spl/u-boot-spl.sfp spl/u-boot-spl.sfp \Makefile +3
-2- spl/u-boot-spl.sfp spl/u-boot-spl.sfp \ - u-boot.img > $@ || rm -f $@ + spl/u-boot-spl.sfp \ + spl/u-boot-spl.sfp > spl/u-boot-splx4.sfp ; \ + cat spl/u-boot-splx4.sfp u-boot.img > $@ || rm -f $@Isn't that what the existing code does already ?
Quoted 8 lines
Quoted 3 lines
Quoted 2 lines
Also, this will I think fail on 128k erase block size NAND due to missing padding.
This is to generate an output file (spl/u-boot-splx4.sfp) with 4 SPL images,
each SPL image size is 256KB.
Quoted 1 line
So, spl/u-boot-splx4.sfp is always with 1MB size (4x256KB). Shouldn't have
problem for 128KB erase size NAND.
Isn't the SPL padded to 64 kiB each ?
Cyclone 5 and Arria 10 have different size.
Cyclone 5 SPL: 64KB each, spl/u-boot-splx4.sfp is 256KB
Arria 10 SPL: 256KB each, spl/u-boot-splx4.sfp is 1MB
Regards
Ley Foon
PATCH 1/1 Makefile: socfpga: Generate spl/u-boot-splx4.sfp with 4 SPL images
On 8/5/20 11:26 AM, Tan, Ley Foon wrote:
Hi,
[...]
Quoted 22 lines
Quoted 22 lines
Quoted 7 lines
Quoted 7 lines
Makefile u-boot.spr: spl/u-boot-spl.img u-boot.img
Quoted 5 lines
Makefile +0
-0@@ -1578,8 +1578,9 @@ u-boot.spr: spl/u-boot-spl.img u-boot.imgFORCE
Quoted 1 line
ifneq ($(CONFIG_ARCH_SOCFPGA),)
quiet_cmd_socboot= SOCBOOT$@
Quoted 9 lines
Quoted 9 lines
Makefile u-boot.spr: spl/u-boot-spl.img u-boot.img FORCE · line 1583
Quoted 6 lines
cmd_socboot= cat spl/u-boot-spl.sfp spl/u-boot-spl.sfp \Makefile +3
-2- spl/u-boot-spl.sfp spl/u-boot-spl.sfp \ - u-boot.img > $@ || rm -f $@ + spl/u-boot-spl.sfp \ + spl/u-boot-spl.sfp > spl/u-boot-splx4.sfp ; \ + cat spl/u-boot-splx4.sfp u-boot.img > $@ || rm -f $@Isn't that what the existing code does already ?
Quoted 3 lines
Quoted 2 lines
Also, this will I think fail on 128k erase block size NAND due to missing padding.
This is to generate an output file (spl/u-boot-splx4.sfp) with 4 SPL images,
each SPL image size is 256KB.
Quoted 1 line
So, spl/u-boot-splx4.sfp is always with 1MB size (4x256KB). Shouldn't have
Quoted 8 lines
Quoted 3 lines
problem for 128KB erase size NAND.
Isn't the SPL padded to 64 kiB each ?
Cyclone 5 and Arria 10 have different size.
Cyclone 5 SPL: 64KB each, spl/u-boot-splx4.sfp is 256KB
Arria 10 SPL: 256KB each, spl/u-boot-splx4.sfp is 1MB
So are you sure this will work on NAND with 128 kiB erase blocks on CV/AV ? I think you will run into problems with padding there. But maybe we don't support that anyway, so add a comment and be done with it.
Tan
PATCH 1/1 Makefile: socfpga: Generate spl/u-boot-splx4.sfp with 4 SPL images
Quoted 49 lines
-----Original Message-----
From: Marek Vasut <[email protected]>
Sent: Wednesday, August 5, 2020 7:36 PM
To: Tan, Ley Foon <[email protected]>; Ang, Chee Hong <[email protected]>; u-boot at lists.denx.de
Cc: Simon Goldschmidt <[email protected]>; Tom Rini <[email protected]>; See, Chin Liang <[email protected]>; Chee, Tien Fong <[email protected]>; Lim, Elly Siew Chin <[email protected]>
Subject: Re: [PATCH v1]Makefile: socfpga: Generate spl/u-boot-splx4.sfp with 4 SPL imagesOn 8/5/20 11:26 AM, Tan, Ley Foon wrote:
Hi,
[...]
Quoted 29 lines
Quoted 19 lines
Quoted 7 lines
Quoted 7 lines
Makefile u-boot.spr: spl/u-boot-spl.img u-boot.img
Quoted 5 lines
Makefile +0
-0@@ -1578,8 +1578,9 @@ u-boot.spr: spl/u-boot-spl.img u-boot.imgFORCE
Quoted 1 line
ifneq ($(CONFIG_ARCH_SOCFPGA),)
quiet_cmd_socboot= SOCBOOT$@
Quoted 11 lines
Quoted 11 lines
Makefile u-boot.spr: spl/u-boot-spl.img u-boot.img FORCE · line 1583
Quoted 6 lines
cmd_socboot= cat spl/u-boot-spl.sfp spl/u-boot-spl.sfp \Makefile +3
-2- spl/u-boot-spl.sfp spl/u-boot-spl.sfp \ - u-boot.img > $@ || rm -f $@ + spl/u-boot-spl.sfp \ + spl/u-boot-spl.sfp > spl/u-boot-splx4.sfp ; \ + cat spl/u-boot-splx4.sfp u-boot.img > $@ || rm -f $@Isn't that what the existing code does already ?
Also, this will I think fail on 128k erase block size NAND due to missing padding.
Quoted 8 lines
Quoted 2 lines
This is to generate an output file (spl/u-boot-splx4.sfp) with 4 SPL images,
each SPL image size is 256KB.
Quoted 2 lines
So, spl/u-boot-splx4.sfp is always with 1MB size (4x256KB). Shouldn't have
problem for 128KB erase size NAND.
Isn't the SPL padded to 64 kiB each ?
Cyclone 5 and Arria 10 have different size.
Quoted 7 lines
Quoted 3 lines
Cyclone 5 SPL: 64KB each, spl/u-boot-splx4.sfp is 256KB
Arria 10 SPL: 256KB each, spl/u-boot-splx4.sfp is 1MB
So are you sure this will work on NAND with 128 kiB erase blocks on CV/AV ? I think you will run into problems with padding there. But maybe we don't support that anyway, so add a comment and be done with it.
If the erase block size is 128KB and we program the spl/u-boot-splx4.sfp with 256KB for Cyclone5. It consumes 2 erase block size, why do you think it will have problem?
By the way, tested spl/u-boot-splx4.sfp on Arria 10 NAND with 128KB erase block size, it is working.
Regards
Ley Foon
PATCH 1/1 Makefile: socfpga: Generate spl/u-boot-splx4.sfp with 4 SPL images
On 8/6/20 3:50 AM, Tan, Ley Foon wrote:
Hi,
Quoted 29 lines
Quoted 29 lines
Quoted 29 lines
Quoted 19 lines
Quoted 7 lines
Quoted 7 lines
Makefile u-boot.spr: spl/u-boot-spl.img u-boot.img
Quoted 5 lines
Makefile +0
-0@@ -1578,8 +1578,9 @@ u-boot.spr: spl/u-boot-spl.img u-boot.imgFORCE
Quoted 1 line
ifneq ($(CONFIG_ARCH_SOCFPGA),)
quiet_cmd_socboot= SOCBOOT$@
Quoted 11 lines
Quoted 11 lines
Makefile
Quoted 6 lines
cmd_socboot= cat spl/u-boot-spl.sfp spl/u-boot-spl.sfp \Makefile +3
-2- spl/u-boot-spl.sfp spl/u-boot-spl.sfp \ - u-boot.img > $@ || rm -f $@ + spl/u-boot-spl.sfp \ + spl/u-boot-spl.sfp > spl/u-boot-splx4.sfp ; \ + cat spl/u-boot-splx4.sfp u-boot.img > $@ || rm -f $@Isn't that what the existing code does already ?
Also, this will I think fail on 128k erase block size NAND due to missing padding.
Quoted 8 lines
Quoted 2 lines
This is to generate an output file (spl/u-boot-splx4.sfp) with 4 SPL images,
each SPL image size is 256KB.
Quoted 2 lines
So, spl/u-boot-splx4.sfp is always with 1MB size (4x256KB). Shouldn't have
problem for 128KB erase size NAND.
Isn't the SPL padded to 64 kiB each ?
Cyclone 5 and Arria 10 have different size.
Quoted 8 lines
Quoted 7 lines
Quoted 3 lines
Cyclone 5 SPL: 64KB each, spl/u-boot-splx4.sfp is 256KB
Arria 10 SPL: 256KB each, spl/u-boot-splx4.sfp is 1MB
So are you sure this will work on NAND with 128 kiB erase blocks on CV/AV ? I think you will run into problems with padding there. But maybe we don't support that anyway, so add a comment and be done with it.
If the erase block size is 128KB and we program the spl/u-boot-splx4.sfp with 256KB for Cyclone5. It consumes 2 erase block size, why do you think it will have problem?
See "Figure A-7: NAND Flash Image Layout for 128 KB Memory Blocks" in Cyclone V datasheet, appending A.
Quoted 1 line
By the way, tested spl/u-boot-splx4.sfp on Arria 10 NAND with 128KB erase block size, it is working.
Isn't that only because it picks the first SPL copy and it accidentally works fine ? Try to write in an image with SPL 0,2,3 corrupted and only SPL 1 valid , then it wont boot I think.
Westergreen
PATCH 1/1 Makefile: socfpga: Generate spl/u-boot-splx4.sfp with 4 SPL images
In reply to Chee Hong AngCan you explain why this x4 image is needed? the top level u-boot-with-spl.sfp or whatever it is called already creates four spl entries. what are you generating the x4 image for?
--dalon
Quoted 24 lines · Chee Hong Ang
Generate spl/u-boot-splx4.sfp which consist of 4 SPL images required for booting up Cyclone5/Arria10.
Signed-off-by Chee Hong Ang <[email protected]>--- Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)Makefile +3
-2@@ -1578,8 +1578,9 @@ u-boot.spr: spl/u-boot-spl.img u-boot.img FORCE ifneq ($(CONFIG_ARCH_SOCFPGA),) quiet_cmd_socboot = SOCBOOT $@ cmd_socboot = cat spl/u-boot-spl.sfp spl/u-boot-spl.sfp \ - spl/u-boot-spl.sfp spl/u-boot-spl.sfp \ - u-boot.img > $@ || rm -f $@ + spl/u-boot-spl.sfp \ + spl/u-boot-spl.sfp > spl/u-boot-splx4.sfp ; \ + cat spl/u-boot-splx4.sfp u-boot.img > $@ || rm -f $@ u-boot-with-spl.sfp: spl/u-boot-spl.sfp u-boot.img FORCE $(call if_changed,socboot)
Tan
PATCH 1/1 Makefile: socfpga: Generate spl/u-boot-splx4.sfp with 4 SPL images
Quoted 12 lines
-----Original Message-----
From: Westergreen, Dalon <[email protected]>
Sent: Saturday, August 15, 2020 3:24 AM
To: u-boot at lists.denx.de; Ang, Chee Hong <[email protected]>
Cc: See, Chin Liang <[email protected]>; Tan, Ley Foon <[email protected]>; Chee, Tien Fong <[email protected]>; Lim, Elly Siew Chin <[email protected]>
Subject: Re: [PATCH v1]Makefile: socfpga: Generate spl/u-boot-splx4.sfp with 4 SPL images
Quoted 3 lines
Can you explain why this x4 image is needed? the top level u-boot-with- spl.sfp or whatever it is called already creates four spl entries. what are you generating the x4 image for?
If we put u-boot.img in FAT partition, then we don't need u-boot-with- spl.sfp. Just 4 x SPL images.
Regards
Ley Foon
Quoted 26 lines · Chee Hong Ang
Makefile u-boot.spr: spl/u-boot-spl.img u-boot.img
Quoted 13 lines
Generate spl/u-boot-splx4.sfp which consist of 4 SPL images required for booting up Cyclone5/Arria10.
Signed-off-by Chee Hong Ang <[email protected]>--- Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)Makefile +0
-0@@ -1578,8 +1578,9 @@ u-boot.spr: spl/u-boot-spl.img u-boot.imgFORCE
Quoted 10 lines
ifneq ($(CONFIG_ARCH_SOCFPGA),)
quiet_cmd_socboot= SOCBOOT $@
cmd_socboot= cat spl/u-boot-spl.sfp spl/u-boot-spl.sfp \Makefile +3
-2- spl/u-boot-spl.sfp spl/u-boot-spl.sfp \ - u-boot.img > $@ || rm -f $@ + spl/u-boot-spl.sfp \ + spl/u-boot-spl.sfp > spl/u-boot-splx4.sfp ; \ + cat spl/u-boot-splx4.sfp u-boot.img > $@ || rm -f $@ u-boot-with-spl.sfp: spl/u-boot-spl.sfp u-boot.img FORCE $(call if_changed,socboot)