Skip to contentSkip to conversation

powerpc: mpc85xx: Add support for generating QorIQ pre-PBL eSDHC boot sector

PATCH Superseded Pali Rohár 4 participants 17 messages Apr 5, 2022 – Sep 7, 2022 PowerPC

lore
Share & tools
lore
#0 lore raw

cover powerpc: mpc85xx: Add support for generating QorIQ pre-PBL eSDHC boot sector

With this patch series, U-Boot binary u-boot.bin (or u-boot-with-spl.bin when SPL is used) for QorIQ pre-PBL platforms can be directly copied to SD card without need to process binary via external formatting tools.

Tested on P2020 based board with SPL booting and also direct U-Boot booting without SPL.

Depends on other powerpc mpc85xx patches:
http://patchwork.ozlabs.org/project/uboot/list/?series=293592&state=*

When using SPL, also following mmc fsl_esdhc_spl patches are required:
http://patchwork.ozlabs.org/project/uboot/list/?series=293276&state=*

And when using SPL and u-boot-with-spl.bin is stored on non-zero sector then also following patch is required:
http://patchwork.ozlabs.org/project/uboot/patch/[email protected]/

Pali Rohár (2):
powerpc: mpc85xx: Add support for generating QorIQ pre-PBL eSDHC boot
sector
board: freescale: p1_p2_rdb_pc: Calculate offsets for eSDHC boot
sector

 arch/powerpc/cpu/mpc85xx/Kconfig        | 53 +++++++++++++++
 arch/powerpc/cpu/mpc85xx/start.S        | 86 +++++++++++++++++++++++++
 arch/powerpc/cpu/mpc85xx/u-boot-spl.lds |  5 ++
 arch/powerpc/cpu/mpc85xx/u-boot.lds     |  5 ++
 include/configs/p1_p2_rdb_pc.h          |  7 +-
 5 files changed, 155 insertions(+), 1 deletion(-)
Signature · 1 line
2.20.1
#13 lore raw

PATCH 2/2 board: freescale: p1_p2_rdb_pc: Calculate offsets for eSDHC boot sector

Correctly calculate offsets between SPL and proper U-Boot when new config option CONFIG_FSL_PREPBL_ESDHC_BOOT_SECTOR for generating eSDHC boot sector is enabled. Otherwise SPL would not be able to boot proper U-Boot.

---
 include/configs/p1_p2_rdb_pc.h | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
include/configs/p1_p2_rdb_pc.h +6 -1
index 0d1cc218fac0..370772053e63 100644
@@ -73,11 +73,16 @@
 #define CONFIG_SPL_FLUSH_IMAGE
 #define CONFIG_SPL_TARGET		"u-boot-with-spl.bin"
 #define CONFIG_SPL_PAD_TO		0x20000
+#ifdef CONFIG_FSL_PREPBL_ESDHC_BOOT_SECTOR
+#define CONFIG_SPL_MAX_SIZE		(CONFIG_SPL_PAD_TO - CONFIG_FSL_PREPBL_ESDHC_BOOT_SECTOR_DATA*512)
+#define CONFIG_SYS_MMC_U_BOOT_OFFS	(CONFIG_SPL_PAD_TO - CONFIG_FSL_PREPBL_ESDHC_BOOT_SECTOR_DATA*512)
+#else
 #define CONFIG_SPL_MAX_SIZE		CONFIG_SPL_PAD_TO
+#define CONFIG_SYS_MMC_U_BOOT_OFFS	CONFIG_SPL_PAD_TO
+#endif
 #define CONFIG_SYS_MMC_U_BOOT_SIZE	(768 << 10)
 #define CONFIG_SYS_MMC_U_BOOT_DST	CONFIG_SYS_TEXT_BASE
 #define CONFIG_SYS_MMC_U_BOOT_START	CONFIG_SYS_TEXT_BASE
-#define CONFIG_SYS_MMC_U_BOOT_OFFS	CONFIG_SPL_PAD_TO
 #define CONFIG_SYS_MPC85XX_NO_RESETVEC
 #ifdef CONFIG_SPL_BUILD
 #define CONFIG_SPL_COMMON_INIT_DDR
Signature · 1 line
2.20.1
#1 lore raw

PATCH 1/2 powerpc: mpc85xx: Add support for generating QorIQ pre-PBL eSDHC boot sector

In reply to Pali Rohár

QorIQ U-Boot binary for SD card booting compiled during build process (either u-boot.bin or u-boot-with-spl.bin) cannot be directly loaded by QorIQ pre-PBL BootROM. Compiled U-Boot binary first needs to be processed by Freescale boot_format tool as described in doc/README.mpc85xx-sd-spi-boot

BootROM requires that image on SD card must contain special boot sector. Implement support for generating this special boot sector directly in U-Boot start code. Boot sector needs to be at the beginning of the image, so when compiling only proper U-Boot without SPL then it needs to be in proper U-Boot. When compiling SPL with proper U-Boot then it needs to be only in SPL.

Support can be enabled by a new config option FSL_PREPBL_ESDHC_BOOT_SECTOR. Via other two additional options FSL_PREPBL_ESDHC_BOOT_SECTOR_START and FSL_PREPBL_ESDHC_BOOT_SECTOR_DATA it is possible to tune how final U-Boot image could be stored on the SD card.

---
 arch/powerpc/cpu/mpc85xx/Kconfig        | 53 +++++++++++++++
 arch/powerpc/cpu/mpc85xx/start.S        | 86 +++++++++++++++++++++++++
 arch/powerpc/cpu/mpc85xx/u-boot-spl.lds |  5 ++
 arch/powerpc/cpu/mpc85xx/u-boot.lds     |  5 ++
 4 files changed, 149 insertions(+)
arch/powerpc/cpu/mpc85xx/Kconfig +53 -0
index c308447d493a..6f8b7593d250 100644
@@ -12,6 +12,59 @@ config CMD_ERRATA
 	  This enables the 'errata' command which displays a list of errata
 	  work-arounds which are enabled for the current board.
 
+config FSL_PREPBL_ESDHC_BOOT_SECTOR
+	bool "Generate QorIQ pre-PBL eSDHC boot sector"
+	depends on MPC85xx
+	depends on SYS_EXTRA_OPTIONS = SDCARD
+	help
+	  With this option final image would have prepended QorIQ pre-PBL eSDHC
+	  boot sector suitable for SD card images. This boot sector instruct
+	  BootROM to configure L2 SRAM and eSDHC then load image from SD card
+	  into L2 SRAM and finally jump to image entry point.
+
+	  This is alternative to Freescale boot_format tool, but works only for
+	  SD card images and only for L2 SRAM booting. U-Boot images generated
+	  with this option should not passed to boot_format tool.
+
+	  For other configuration like booting from eSPI or configuring SDRAM
+	  please use Freescale boot_format tool without this option. See file
+	  doc/README.mpc85xx-sd-spi-boot
+
+config FSL_PREPBL_ESDHC_BOOT_SECTOR_START
+	int "QorIQ pre-PBL eSDHC boot sector start offset"
+	depends on FSL_PREPBL_ESDHC_BOOT_SECTOR
+	range 0 23
+	default 0
+	help
+	  QorIQ pre-PBL eSDHC boot sector may be located on one of the first
+	  24 SD card sectors. Select SD card sector on which final U-Boot
+	  image (with this boot sector) would be installed.
+
+	  By default first SD card sector (0) is used. But this may be changed
+	  to allow installing U-Boot image on some partition (with fixed start
+	  sector).
+
+	  Please note that any sector on SD card prior this boot sector must
+	  not contain ASCII "BOOT" bytes at sector offset 0x40.
+
+config FSL_PREPBL_ESDHC_BOOT_SECTOR_DATA
+	int "Relative data sector for QorIQ pre-PBL eSDHC boot sector"
+	depends on FSL_PREPBL_ESDHC_BOOT_SECTOR
+	default 1
+	range 1 8388607
+	help
+	  Select data sector from the beginning of QorIQ pre-PBL eSDHC boot
+	  sector on which would be stored raw U-Boot image.
+
+	  By default is it second sector (1) which is the first available free
+	  sector (on the first sector is stored boot sector). It can be any
+	  sector number which offset in bytes can be expressed by 32-bit number.
+
+	  In case this final U-Boot image (with this boot sector) is put on
+	  the FAT32 partition into reserved boot area, this data sector needs
+	  to be at least 2 (third sector) because FAT32 use second sector for
+	  its data.
+
 choice
 	prompt "Target select"
 	optional
arch/powerpc/cpu/mpc85xx/start.S +86 -0

92 lines not on this page · raw message

arch/powerpc/cpu/mpc85xx/u-boot-spl.lds +5 -0
index 6fd0da9f39b1..272e94a1f169 100644
@@ -14,6 +14,11 @@ SECTIONS
 {
 	. = IMAGE_TEXT_BASE;
 	.text : {
+/* Optional boot sector */
+#if defined(CONFIG_FSL_PREPBL_ESDHC_BOOT_SECTOR)
+		KEEP(*(.bootsect))
+		. = CONFIG_FSL_PREPBL_ESDHC_BOOT_SECTOR_DATA * 512;
+#endif
 /* For ifc, elbc, esdhc, espi, all need the SPL without section .resetvec */
 #ifdef CONFIG_SYS_MPC85XX_NO_RESETVEC
 		KEEP(*(.bootpg))
arch/powerpc/cpu/mpc85xx/u-boot.lds +5 -0
index 9f422810bb5d..4754aa1cf8e8 100644
@@ -19,6 +19,11 @@ SECTIONS
   /* Read-only sections, merged into text segment: */
   .text      :
   {
+#if defined(CONFIG_FSL_PREPBL_ESDHC_BOOT_SECTOR) && !defined(CONFIG_SPL)
+    /* Optional boot sector */
+    KEEP(arch/powerpc/cpu/mpc85xx/start.o (.bootsect))
+    . = CONFIG_FSL_PREPBL_ESDHC_BOOT_SECTOR_DATA * 512;
+#endif
 #ifdef CONFIG_SYS_MPC85XX_NO_RESETVEC
     KEEP(arch/powerpc/cpu/mpc85xx/start.o (.bootpg))
 #endif
Signature · 1 line
2.20.1
#2 lore raw
Quoted 24 lines

-----Original Message-----
From: U-Boot <[email protected]> On Behalf Of Pali Rohár
Sent: Tuesday, April 5, 2022 7:11 PM
To: Priyanka Jain <[email protected]>; Qiang Zhao <[email protected]>; Shengzhou Liu <[email protected]>; Alexander Graf <[email protected]>; Bin Meng <[email protected]>; Wolfgang Denk <[email protected]>; Sinan Akman <[email protected]>
Cc: [email protected]
Subject: [PATCH 1/2] powerpc: mpc85xx: Add support for generating QorIQ pre- PBL eSDHC boot sector

QorIQ U-Boot binary for SD card booting compiled during build process (either u- boot.bin or u-boot-with-spl.bin) cannot be directly loaded by QorIQ pre-PBL BootROM. Compiled U-Boot binary first needs to be processed by Freescale boot_format tool as described in doc/README.mpc85xx-sd-spi-boot

BootROM requires that image on SD card must contain special boot sector. Implement support for generating this special boot sector directly in U-Boot start code. Boot sector needs to be at the beginning of the image, so when compiling only proper U-Boot without SPL then it needs to be in proper U-Boot. When compiling SPL with proper U-Boot then it needs to be only in SPL.

Quoted 8 lines

Support can be enabled by a new config option FSL_PREPBL_ESDHC_BOOT_SECTOR.
Via other two additional options FSL_PREPBL_ESDHC_BOOT_SECTOR_START and FSL_PREPBL_ESDHC_BOOT_SECTOR_DATA it is possible to tune how final U-Boot image could be stored on the SD card.

---

Kindly rebase the series to master.

Regards
Priyanka

#3 lore raw
Quoted 28 lines · On Monday 25 April 2022 05:25:34 Priyanka Jain (OSS) wrote:
Quoted 28 lines

-----Original Message-----
From: U-Boot <[email protected]> On Behalf Of Pali Rohár
Sent: Tuesday, April 5, 2022 7:11 PM
To: Priyanka Jain <[email protected]>; Qiang Zhao <[email protected]>; Shengzhou Liu <[email protected]>; Alexander Graf <[email protected]>; Bin Meng <[email protected]>; Wolfgang Denk <[email protected]>; Sinan Akman <[email protected]>
Cc: [email protected]
Subject: [PATCH 1/2] powerpc: mpc85xx: Add support for generating QorIQ pre- PBL eSDHC boot sector

QorIQ U-Boot binary for SD card booting compiled during build process (either u- boot.bin or u-boot-with-spl.bin) cannot be directly loaded by QorIQ pre-PBL BootROM. Compiled U-Boot binary first needs to be processed by Freescale boot_format tool as described in doc/README.mpc85xx-sd-spi-boot

BootROM requires that image on SD card must contain special boot sector. Implement support for generating this special boot sector directly in U-Boot start code. Boot sector needs to be at the beginning of the image, so when compiling only proper U-Boot without SPL then it needs to be in proper U-Boot. When compiling SPL with proper U-Boot then it needs to be only in SPL.

Support can be enabled by a new config option FSL_PREPBL_ESDHC_BOOT_SECTOR.
Via other two additional options FSL_PREPBL_ESDHC_BOOT_SECTOR_START and FSL_PREPBL_ESDHC_BOOT_SECTOR_DATA it is possible to tune how final U-Boot image could be stored on the SD card.

Quoted 7 lines
Quoted 2 lines

---

Kindly rebase the series to master.

Regards
Priyanka

Hello! Both patches still applies cleanly on master, just they depend on another patch series (powerpc: mpc85xx: Fix and cleanup mpc85xx code) which I mentioned in cover letter and therefore needs V2 patch of "powerpc: mpc85xx: Set TEXT_BASE addresses to real base values" which I sent recently.

#12 lore raw

PATCH v2 1/1 powerpc: mpc85xx: Add support for generating QorIQ pre-PBL eSDHC boot sector

In reply to Pali Rohár

QorIQ U-Boot binary for SD card booting compiled during build process (either u-boot.bin or u-boot-with-spl.bin) cannot be directly loaded by QorIQ pre-PBL BootROM. Compiled U-Boot binary first needs to be processed by Freescale boot_format tool as described in doc/README.mpc85xx-sd-spi-boot

BootROM requires that image on SD card must contain special boot sector. Implement support for generating this special boot sector directly in U-Boot start code. Boot sector needs to be at the beginning of the image, so when compiling only proper U-Boot without SPL then it needs to be in proper U-Boot. When compiling SPL with proper U-Boot then it needs to be only in SPL.

Support can be enabled by a new config option FSL_PREPBL_ESDHC_BOOT_SECTOR. Via other two additional options FSL_PREPBL_ESDHC_BOOT_SECTOR_START and FSL_PREPBL_ESDHC_BOOT_SECTOR_DATA it is possible to tune how final U-Boot image could be stored on the SD card.

---
Changes in v2:
* Replace addresses in start.S by named constants
* Move bootsect from .text section to separate data section .bootsect which would be before TEXT_BASE. This boot sector is not used by the U-Boot nor SPL and it even is not loaded by BootROM into larget area, so it does not have to occupe data in TEXT_BASE. With this change U-Boot and SPL stay on the same addresses as before this change.

---
 arch/powerpc/cpu/mpc85xx/Kconfig        | 53 ++++++++++++++
 arch/powerpc/cpu/mpc85xx/start.S        | 94 +++++++++++++++++++++++++
 arch/powerpc/cpu/mpc85xx/u-boot-spl.lds |  8 +++
 arch/powerpc/cpu/mpc85xx/u-boot.lds     |  8 +++
 4 files changed, 163 insertions(+)
arch/powerpc/cpu/mpc85xx/Kconfig +53 -0
index c308447d493a..6f8b7593d250 100644
@@ -12,6 +12,59 @@ config CMD_ERRATA
 	  This enables the 'errata' command which displays a list of errata
 	  work-arounds which are enabled for the current board.
 
+config FSL_PREPBL_ESDHC_BOOT_SECTOR
+	bool "Generate QorIQ pre-PBL eSDHC boot sector"
+	depends on MPC85xx
+	depends on SYS_EXTRA_OPTIONS = SDCARD
+	help
+	  With this option final image would have prepended QorIQ pre-PBL eSDHC
+	  boot sector suitable for SD card images. This boot sector instruct
+	  BootROM to configure L2 SRAM and eSDHC then load image from SD card
+	  into L2 SRAM and finally jump to image entry point.
+
+	  This is alternative to Freescale boot_format tool, but works only for
+	  SD card images and only for L2 SRAM booting. U-Boot images generated
+	  with this option should not passed to boot_format tool.
+
+	  For other configuration like booting from eSPI or configuring SDRAM
+	  please use Freescale boot_format tool without this option. See file
+	  doc/README.mpc85xx-sd-spi-boot
+
+config FSL_PREPBL_ESDHC_BOOT_SECTOR_START
+	int "QorIQ pre-PBL eSDHC boot sector start offset"
+	depends on FSL_PREPBL_ESDHC_BOOT_SECTOR
+	range 0 23
+	default 0
+	help
+	  QorIQ pre-PBL eSDHC boot sector may be located on one of the first
+	  24 SD card sectors. Select SD card sector on which final U-Boot
+	  image (with this boot sector) would be installed.
+
+	  By default first SD card sector (0) is used. But this may be changed
+	  to allow installing U-Boot image on some partition (with fixed start
+	  sector).
+
+	  Please note that any sector on SD card prior this boot sector must
+	  not contain ASCII "BOOT" bytes at sector offset 0x40.
+
+config FSL_PREPBL_ESDHC_BOOT_SECTOR_DATA
+	int "Relative data sector for QorIQ pre-PBL eSDHC boot sector"
+	depends on FSL_PREPBL_ESDHC_BOOT_SECTOR
+	default 1
+	range 1 8388607
+	help
+	  Select data sector from the beginning of QorIQ pre-PBL eSDHC boot
+	  sector on which would be stored raw U-Boot image.
+
+	  By default is it second sector (1) which is the first available free
+	  sector (on the first sector is stored boot sector). It can be any
+	  sector number which offset in bytes can be expressed by 32-bit number.
+
+	  In case this final U-Boot image (with this boot sector) is put on
+	  the FAT32 partition into reserved boot area, this data sector needs
+	  to be at least 2 (third sector) because FAT32 use second sector for
+	  its data.
+
 choice
 	prompt "Target select"
 	optional
arch/powerpc/cpu/mpc85xx/start.S +94 -0

100 lines not on this page · raw message

arch/powerpc/cpu/mpc85xx/u-boot-spl.lds +8 -0
index 6fd0da9f39b1..6b3c84a8d5c4 100644
@@ -12,6 +12,14 @@ OUTPUT_ARCH(powerpc)
 
 SECTIONS
 {
+/* Optional boot sector */
+#if defined(CONFIG_FSL_PREPBL_ESDHC_BOOT_SECTOR)
+	.bootsect IMAGE_TEXT_BASE - CONFIG_FSL_PREPBL_ESDHC_BOOT_SECTOR_DATA * 512 : {
+		KEEP(*(.bootsect))
+		. = CONFIG_FSL_PREPBL_ESDHC_BOOT_SECTOR_DATA * 512;
+	}
+#endif
+
 	. = IMAGE_TEXT_BASE;
 	.text : {
 /* For ifc, elbc, esdhc, espi, all need the SPL without section .resetvec */
arch/powerpc/cpu/mpc85xx/u-boot.lds +8 -0
index 9f422810bb5d..cb32aeefdc79 100644
@@ -16,6 +16,14 @@ ENTRY(_start)
 
 SECTIONS
 {
+  /* Optional boot sector */
+#if defined(CONFIG_FSL_PREPBL_ESDHC_BOOT_SECTOR) && !defined(CONFIG_SPL)
+  .bootsect CONFIG_SYS_TEXT_BASE - CONFIG_FSL_PREPBL_ESDHC_BOOT_SECTOR_DATA * 512 : {
+    KEEP(arch/powerpc/cpu/mpc85xx/start.o (.bootsect))
+    . = CONFIG_FSL_PREPBL_ESDHC_BOOT_SECTOR_DATA * 512;
+  }
+#endif
+
   /* Read-only sections, merged into text segment: */
   .text      :
   {
Signature · 1 line
2.20.1
#4 lore raw
In reply to Pali Rohár
Quoted 34 lines · On Monday 25 April 2022 14:36:14 Pali Rohár wrote:
Quoted 33 lines · On Monday 25 April 2022 05:25:34 Priyanka Jain (OSS) wrote:
Quoted 22 lines

-----Original Message-----
From: U-Boot <[email protected]> On Behalf Of Pali Rohár
Sent: Tuesday, April 5, 2022 7:11 PM
To: Priyanka Jain <[email protected]>; Qiang Zhao <[email protected]>; Shengzhou Liu <[email protected]>; Alexander Graf <[email protected]>; Bin Meng <[email protected]>; Wolfgang Denk <[email protected]>; Sinan Akman <[email protected]>
Cc: [email protected]
Subject: [PATCH 1/2] powerpc: mpc85xx: Add support for generating QorIQ pre- PBL eSDHC boot sector

QorIQ U-Boot binary for SD card booting compiled during build process (either u- boot.bin or u-boot-with-spl.bin) cannot be directly loaded by QorIQ pre-PBL BootROM. Compiled U-Boot binary first needs to be processed by Freescale boot_format tool as described in doc/README.mpc85xx-sd-spi-boot

BootROM requires that image on SD card must contain special boot sector. Implement support for generating this special boot sector directly in U-Boot start code. Boot sector needs to be at the beginning of the image, so when compiling only proper U-Boot without SPL then it needs to be in proper U-Boot. When compiling SPL with proper U-Boot then it needs to be only in SPL.

Quoted 8 lines

Support can be enabled by a new config option FSL_PREPBL_ESDHC_BOOT_SECTOR.
Via other two additional options FSL_PREPBL_ESDHC_BOOT_SECTOR_START and FSL_PREPBL_ESDHC_BOOT_SECTOR_DATA it is possible to tune how final U-Boot image could be stored on the SD card.

---

Kindly rebase the series to master.

Quoted 8 lines
Quoted 2 lines

Regards
Priyanka

Hello! Both patches still applies cleanly on master, just they depend on another patch series (powerpc: mpc85xx: Fix and cleanup mpc85xx code) which I mentioned in cover letter and therefore needs V2 patch of "powerpc: mpc85xx: Set TEXT_BASE addresses to real base values" which I sent recently.

I sent a new version v2 of this patch, see email:
[PATCH v2] powerpc: mpc85xx: Add support for generating QorIQ pre-PBL eSDHC boot sector

#5 lore raw
Quoted 38 lines · On Wednesday 11 May 2022 22:59:28 Pali Rohár wrote:
Quoted 37 lines · On Monday 25 April 2022 14:36:14 Pali Rohár wrote:
Quoted 35 lines · On Monday 25 April 2022 05:25:34 Priyanka Jain (OSS) wrote:
Quoted 22 lines

-----Original Message-----
From: U-Boot <[email protected]> On Behalf Of Pali Rohár
Sent: Tuesday, April 5, 2022 7:11 PM
To: Priyanka Jain <[email protected]>; Qiang Zhao <[email protected]>; Shengzhou Liu <[email protected]>; Alexander Graf <[email protected]>; Bin Meng <[email protected]>; Wolfgang Denk <[email protected]>; Sinan Akman <[email protected]>
Cc: [email protected]
Subject: [PATCH 1/2] powerpc: mpc85xx: Add support for generating QorIQ pre- PBL eSDHC boot sector

QorIQ U-Boot binary for SD card booting compiled during build process (either u- boot.bin or u-boot-with-spl.bin) cannot be directly loaded by QorIQ pre-PBL BootROM. Compiled U-Boot binary first needs to be processed by Freescale boot_format tool as described in doc/README.mpc85xx-sd-spi-boot

BootROM requires that image on SD card must contain special boot sector. Implement support for generating this special boot sector directly in U-Boot start code. Boot sector needs to be at the beginning of the image, so when compiling only proper U-Boot without SPL then it needs to be in proper U-Boot. When compiling SPL with proper U-Boot then it needs to be only in SPL.

Quoted 8 lines

Support can be enabled by a new config option FSL_PREPBL_ESDHC_BOOT_SECTOR.
Via other two additional options FSL_PREPBL_ESDHC_BOOT_SECTOR_START and FSL_PREPBL_ESDHC_BOOT_SECTOR_DATA it is possible to tune how final U-Boot image could be stored on the SD card.

---

Kindly rebase the series to master.

Regards
Priyanka

Quoted 8 lines
Quoted 5 lines

Hello! Both patches still applies cleanly on master, just they depend on another patch series (powerpc: mpc85xx: Fix and cleanup mpc85xx code) which I mentioned in cover letter and therefore needs V2 patch of "powerpc: mpc85xx: Set TEXT_BASE addresses to real base values" which I sent recently.

I sent a new version v2 of this patch, see email:
[PATCH v2] powerpc: mpc85xx: Add support for generating QorIQ pre-PBL eSDHC boot sector

Priyanka: PING

#6 lore raw
Quoted 45 lines · On Wednesday 18 May 2022 12:53:20 Pali Rohár wrote:
Quoted 44 lines · On Wednesday 11 May 2022 22:59:28 Pali Rohár wrote:
Quoted 42 lines · On Monday 25 April 2022 14:36:14 Pali Rohár wrote:
Quoted 28 lines · On Monday 25 April 2022 05:25:34 Priyanka Jain (OSS) wrote:
Quoted 28 lines

-----Original Message-----
From: U-Boot <[email protected]> On Behalf Of Pali Rohár
Sent: Tuesday, April 5, 2022 7:11 PM
To: Priyanka Jain <[email protected]>; Qiang Zhao <[email protected]>; Shengzhou Liu <[email protected]>; Alexander Graf <[email protected]>; Bin Meng <[email protected]>; Wolfgang Denk <[email protected]>; Sinan Akman <[email protected]>
Cc: [email protected]
Subject: [PATCH 1/2] powerpc: mpc85xx: Add support for generating QorIQ pre- PBL eSDHC boot sector

QorIQ U-Boot binary for SD card booting compiled during build process (either u- boot.bin or u-boot-with-spl.bin) cannot be directly loaded by QorIQ pre-PBL BootROM. Compiled U-Boot binary first needs to be processed by Freescale boot_format tool as described in doc/README.mpc85xx-sd-spi-boot

BootROM requires that image on SD card must contain special boot sector. Implement support for generating this special boot sector directly in U-Boot start code. Boot sector needs to be at the beginning of the image, so when compiling only proper U-Boot without SPL then it needs to be in proper U-Boot. When compiling SPL with proper U-Boot then it needs to be only in SPL.

Support can be enabled by a new config option FSL_PREPBL_ESDHC_BOOT_SECTOR.
Via other two additional options FSL_PREPBL_ESDHC_BOOT_SECTOR_START and FSL_PREPBL_ESDHC_BOOT_SECTOR_DATA it is possible to tune how final U-Boot image could be stored on the SD card.

Quoted 7 lines
Quoted 2 lines

---

Kindly rebase the series to master.

Regards
Priyanka

Hello! Both patches still applies cleanly on master, just they depend on another patch series (powerpc: mpc85xx: Fix and cleanup mpc85xx code) which I mentioned in cover letter and therefore needs V2 patch of "powerpc: mpc85xx: Set TEXT_BASE addresses to real base values" which I sent recently.

Quoted 4 lines
Quoted 2 lines

I sent a new version v2 of this patch, see email:
[PATCH v2] powerpc: mpc85xx: Add support for generating QorIQ pre-PBL eSDHC boot sector

Priyanka: PING

PING?

#7 lore raw
Quoted 46 lines · On Saturday 04 June 2022 15:02:38 Pali Rohár wrote:
Quoted 45 lines · On Wednesday 18 May 2022 12:53:20 Pali Rohár wrote:
Quoted 44 lines · On Wednesday 11 May 2022 22:59:28 Pali Rohár wrote:
Quoted 42 lines · On Monday 25 April 2022 14:36:14 Pali Rohár wrote:
Quoted 28 lines · On Monday 25 April 2022 05:25:34 Priyanka Jain (OSS) wrote:
Quoted 28 lines

-----Original Message-----
From: U-Boot <[email protected]> On Behalf Of Pali Rohár
Sent: Tuesday, April 5, 2022 7:11 PM
To: Priyanka Jain <[email protected]>; Qiang Zhao <[email protected]>; Shengzhou Liu <[email protected]>; Alexander Graf <[email protected]>; Bin Meng <[email protected]>; Wolfgang Denk <[email protected]>; Sinan Akman <[email protected]>
Cc: [email protected]
Subject: [PATCH 1/2] powerpc: mpc85xx: Add support for generating QorIQ pre- PBL eSDHC boot sector

QorIQ U-Boot binary for SD card booting compiled during build process (either u- boot.bin or u-boot-with-spl.bin) cannot be directly loaded by QorIQ pre-PBL BootROM. Compiled U-Boot binary first needs to be processed by Freescale boot_format tool as described in doc/README.mpc85xx-sd-spi-boot

BootROM requires that image on SD card must contain special boot sector. Implement support for generating this special boot sector directly in U-Boot start code. Boot sector needs to be at the beginning of the image, so when compiling only proper U-Boot without SPL then it needs to be in proper U-Boot. When compiling SPL with proper U-Boot then it needs to be only in SPL.

Support can be enabled by a new config option FSL_PREPBL_ESDHC_BOOT_SECTOR.
Via other two additional options FSL_PREPBL_ESDHC_BOOT_SECTOR_START and FSL_PREPBL_ESDHC_BOOT_SECTOR_DATA it is possible to tune how final U-Boot image could be stored on the SD card.

Quoted 7 lines
Quoted 2 lines

---

Kindly rebase the series to master.

Regards
Priyanka

Hello! Both patches still applies cleanly on master, just they depend on another patch series (powerpc: mpc85xx: Fix and cleanup mpc85xx code) which I mentioned in cover letter and therefore needs V2 patch of "powerpc: mpc85xx: Set TEXT_BASE addresses to real base values" which I sent recently.

Quoted 6 lines
Quoted 4 lines
Quoted 2 lines

I sent a new version v2 of this patch, see email:
[PATCH v2] powerpc: mpc85xx: Add support for generating QorIQ pre-PBL eSDHC boot sector

Priyanka: PING

PING?

PING?

#8 lore raw
Quoted 47 lines · On Thursday 23 June 2022 19:17:55 Pali Rohár wrote:
Quoted 46 lines · On Saturday 04 June 2022 15:02:38 Pali Rohár wrote:
Quoted 45 lines · On Wednesday 18 May 2022 12:53:20 Pali Rohár wrote:
Quoted 44 lines · On Wednesday 11 May 2022 22:59:28 Pali Rohár wrote:
Quoted 42 lines · On Monday 25 April 2022 14:36:14 Pali Rohár wrote:
Quoted 28 lines · On Monday 25 April 2022 05:25:34 Priyanka Jain (OSS) wrote:
Quoted 28 lines

-----Original Message-----
From: U-Boot <[email protected]> On Behalf Of Pali Rohár
Sent: Tuesday, April 5, 2022 7:11 PM
To: Priyanka Jain <[email protected]>; Qiang Zhao <[email protected]>; Shengzhou Liu <[email protected]>; Alexander Graf <[email protected]>; Bin Meng <[email protected]>; Wolfgang Denk <[email protected]>; Sinan Akman <[email protected]>
Cc: [email protected]
Subject: [PATCH 1/2] powerpc: mpc85xx: Add support for generating QorIQ pre- PBL eSDHC boot sector

QorIQ U-Boot binary for SD card booting compiled during build process (either u- boot.bin or u-boot-with-spl.bin) cannot be directly loaded by QorIQ pre-PBL BootROM. Compiled U-Boot binary first needs to be processed by Freescale boot_format tool as described in doc/README.mpc85xx-sd-spi-boot

BootROM requires that image on SD card must contain special boot sector. Implement support for generating this special boot sector directly in U-Boot start code. Boot sector needs to be at the beginning of the image, so when compiling only proper U-Boot without SPL then it needs to be in proper U-Boot. When compiling SPL with proper U-Boot then it needs to be only in SPL.

Support can be enabled by a new config option FSL_PREPBL_ESDHC_BOOT_SECTOR.
Via other two additional options FSL_PREPBL_ESDHC_BOOT_SECTOR_START and FSL_PREPBL_ESDHC_BOOT_SECTOR_DATA it is possible to tune how final U-Boot image could be stored on the SD card.

Quoted 7 lines
Quoted 2 lines

---

Kindly rebase the series to master.

Regards
Priyanka

Hello! Both patches still applies cleanly on master, just they depend on another patch series (powerpc: mpc85xx: Fix and cleanup mpc85xx code) which I mentioned in cover letter and therefore needs V2 patch of "powerpc: mpc85xx: Set TEXT_BASE addresses to real base values" which I sent recently.

Quoted 8 lines
Quoted 6 lines
Quoted 4 lines
Quoted 2 lines

I sent a new version v2 of this patch, see email:
[PATCH v2] powerpc: mpc85xx: Add support for generating QorIQ pre-PBL eSDHC boot sector

Priyanka: PING

PING?

PING?

PING?

V2 now and still applies cleanly on top of next branch
https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/

And why v2 has "Changes Requested" state in above patchwork?

I do not see any comment for v2 on mailing list nor on patchwork. So what is requested from me?

#9 lore raw
Quoted 55 lines · Pali Rohár
Quoted 54 lines · On Thursday 23 June 2022 19:17:55 Pali Rohár wrote:
Quoted 52 lines · On Saturday 04 June 2022 15:02:38 Pali Rohár wrote:
Quoted 45 lines · On Wednesday 18 May 2022 12:53:20 Pali Rohár wrote:
Quoted 44 lines · On Wednesday 11 May 2022 22:59:28 Pali Rohár wrote:
Quoted 42 lines · On Monday 25 April 2022 14:36:14 Pali Rohár wrote:
Quoted 28 lines · On Monday 25 April 2022 05:25:34 Priyanka Jain (OSS) wrote:
Quoted 28 lines

-----Original Message-----
From: U-Boot <[email protected]> On Behalf Of Pali Rohár
Sent: Tuesday, April 5, 2022 7:11 PM
To: Priyanka Jain <[email protected]>; Qiang Zhao <[email protected]>; Shengzhou Liu <[email protected]>; Alexander Graf <[email protected]>; Bin Meng <[email protected]>; Wolfgang Denk <[email protected]>; Sinan Akman <[email protected]>
Cc: [email protected]
Subject: [PATCH 1/2] powerpc: mpc85xx: Add support for generating QorIQ pre- PBL eSDHC boot sector

QorIQ U-Boot binary for SD card booting compiled during build process (either u- boot.bin or u-boot-with-spl.bin) cannot be directly loaded by QorIQ pre-PBL BootROM. Compiled U-Boot binary first needs to be processed by Freescale boot_format tool as described in doc/README.mpc85xx-sd-spi-boot

BootROM requires that image on SD card must contain special boot sector. Implement support for generating this special boot sector directly in U-Boot start code. Boot sector needs to be at the beginning of the image, so when compiling only proper U-Boot without SPL then it needs to be in proper U-Boot. When compiling SPL with proper U-Boot then it needs to be only in SPL.

Support can be enabled by a new config option FSL_PREPBL_ESDHC_BOOT_SECTOR.
Via other two additional options FSL_PREPBL_ESDHC_BOOT_SECTOR_START and FSL_PREPBL_ESDHC_BOOT_SECTOR_DATA it is possible to tune how final U-Boot image could be stored on the SD card.

Quoted 7 lines
Quoted 2 lines

---

Kindly rebase the series to master.

Regards
Priyanka

Hello! Both patches still applies cleanly on master, just they depend on another patch series (powerpc: mpc85xx: Fix and cleanup mpc85xx code) which I mentioned in cover letter and therefore needs V2 patch of "powerpc: mpc85xx: Set TEXT_BASE addresses to real base values" which I sent recently.

Quoted 4 lines
Quoted 2 lines

I sent a new version v2 of this patch, see email:
[PATCH v2] powerpc: mpc85xx: Add support for generating QorIQ pre-PBL eSDHC boot sector

Priyanka: PING

PING?

Quoted 8 lines
Quoted 1 line

PING?

PING?

V2 now and still applies cleanly on top of next branch
https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/

And why v2 has "Changes Requested" state in above patchwork?

Probably my mistake, put it back to new.

Signature · 1 line
Tom
#10 lore raw
In reply to Pali Rohár
Quoted 53 lines · On Tuesday 28 June 2022 20:07:48 Pali Rohár wrote:
Quoted 52 lines · On Thursday 23 June 2022 19:17:55 Pali Rohár wrote:
Quoted 51 lines · On Saturday 04 June 2022 15:02:38 Pali Rohár wrote:
Quoted 49 lines · On Wednesday 18 May 2022 12:53:20 Pali Rohár wrote:
Quoted 38 lines · On Wednesday 11 May 2022 22:59:28 Pali Rohár wrote:
Quoted 37 lines · On Monday 25 April 2022 14:36:14 Pali Rohár wrote:
Quoted 35 lines · On Monday 25 April 2022 05:25:34 Priyanka Jain (OSS) wrote:
Quoted 22 lines

-----Original Message-----
From: U-Boot <[email protected]> On Behalf Of Pali Rohár
Sent: Tuesday, April 5, 2022 7:11 PM
To: Priyanka Jain <[email protected]>; Qiang Zhao <[email protected]>; Shengzhou Liu <[email protected]>; Alexander Graf <[email protected]>; Bin Meng <[email protected]>; Wolfgang Denk <[email protected]>; Sinan Akman <[email protected]>
Cc: [email protected]
Subject: [PATCH 1/2] powerpc: mpc85xx: Add support for generating QorIQ pre- PBL eSDHC boot sector

QorIQ U-Boot binary for SD card booting compiled during build process (either u- boot.bin or u-boot-with-spl.bin) cannot be directly loaded by QorIQ pre-PBL BootROM. Compiled U-Boot binary first needs to be processed by Freescale boot_format tool as described in doc/README.mpc85xx-sd-spi-boot

BootROM requires that image on SD card must contain special boot sector. Implement support for generating this special boot sector directly in U-Boot start code. Boot sector needs to be at the beginning of the image, so when compiling only proper U-Boot without SPL then it needs to be in proper U-Boot. When compiling SPL with proper U-Boot then it needs to be only in SPL.

Quoted 8 lines

Support can be enabled by a new config option FSL_PREPBL_ESDHC_BOOT_SECTOR.
Via other two additional options FSL_PREPBL_ESDHC_BOOT_SECTOR_START and FSL_PREPBL_ESDHC_BOOT_SECTOR_DATA it is possible to tune how final U-Boot image could be stored on the SD card.

---

Kindly rebase the series to master.

Regards
Priyanka

Quoted 8 lines
Quoted 5 lines

Hello! Both patches still applies cleanly on master, just they depend on another patch series (powerpc: mpc85xx: Fix and cleanup mpc85xx code) which I mentioned in cover letter and therefore needs V2 patch of "powerpc: mpc85xx: Set TEXT_BASE addresses to real base values" which I sent recently.

I sent a new version v2 of this patch, see email:
[PATCH v2] powerpc: mpc85xx: Add support for generating QorIQ pre-PBL eSDHC boot sector

Priyanka: PING

Quoted 8 lines
Quoted 3 lines
Quoted 1 line

PING?

PING?

PING?

V2 now and still applies cleanly on top of next branch
https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/

PING?

Quoted 4 lines

And why v2 has "Changes Requested" state in above patchwork?

I do not see any comment for v2 on mailing list nor on patchwork. So what is requested from me?

#11 lore raw
Quoted 56 lines · On Thursday 14 July 2022 01:49:59 Pali Rohár wrote:
Quoted 55 lines · On Tuesday 28 June 2022 20:07:48 Pali Rohár wrote:
Quoted 54 lines · On Thursday 23 June 2022 19:17:55 Pali Rohár wrote:
Quoted 52 lines · On Saturday 04 June 2022 15:02:38 Pali Rohár wrote:
Quoted 45 lines · On Wednesday 18 May 2022 12:53:20 Pali Rohár wrote:
Quoted 44 lines · On Wednesday 11 May 2022 22:59:28 Pali Rohár wrote:
Quoted 42 lines · On Monday 25 April 2022 14:36:14 Pali Rohár wrote:
Quoted 28 lines · On Monday 25 April 2022 05:25:34 Priyanka Jain (OSS) wrote:
Quoted 28 lines

-----Original Message-----
From: U-Boot <[email protected]> On Behalf Of Pali Rohár
Sent: Tuesday, April 5, 2022 7:11 PM
To: Priyanka Jain <[email protected]>; Qiang Zhao <[email protected]>; Shengzhou Liu <[email protected]>; Alexander Graf <[email protected]>; Bin Meng <[email protected]>; Wolfgang Denk <[email protected]>; Sinan Akman <[email protected]>
Cc: [email protected]
Subject: [PATCH 1/2] powerpc: mpc85xx: Add support for generating QorIQ pre- PBL eSDHC boot sector

QorIQ U-Boot binary for SD card booting compiled during build process (either u- boot.bin or u-boot-with-spl.bin) cannot be directly loaded by QorIQ pre-PBL BootROM. Compiled U-Boot binary first needs to be processed by Freescale boot_format tool as described in doc/README.mpc85xx-sd-spi-boot

BootROM requires that image on SD card must contain special boot sector. Implement support for generating this special boot sector directly in U-Boot start code. Boot sector needs to be at the beginning of the image, so when compiling only proper U-Boot without SPL then it needs to be in proper U-Boot. When compiling SPL with proper U-Boot then it needs to be only in SPL.

Support can be enabled by a new config option FSL_PREPBL_ESDHC_BOOT_SECTOR.
Via other two additional options FSL_PREPBL_ESDHC_BOOT_SECTOR_START and FSL_PREPBL_ESDHC_BOOT_SECTOR_DATA it is possible to tune how final U-Boot image could be stored on the SD card.

Quoted 7 lines
Quoted 2 lines

---

Kindly rebase the series to master.

Regards
Priyanka

Hello! Both patches still applies cleanly on master, just they depend on another patch series (powerpc: mpc85xx: Fix and cleanup mpc85xx code) which I mentioned in cover letter and therefore needs V2 patch of "powerpc: mpc85xx: Set TEXT_BASE addresses to real base values" which I sent recently.

Quoted 4 lines
Quoted 2 lines

I sent a new version v2 of this patch, see email:
[PATCH v2] powerpc: mpc85xx: Add support for generating QorIQ pre-PBL eSDHC boot sector

Priyanka: PING

PING?

Quoted 8 lines
Quoted 6 lines
Quoted 1 line

PING?

PING?

V2 now and still applies cleanly on top of next branch
https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/

PING?

PING?

Quoted 4 lines
Quoted 4 lines

And why v2 has "Changes Requested" state in above patchwork?

I do not see any comment for v2 on mailing list nor on patchwork. So what is requested from me?

#14 lore raw

PATCH v2 1/1 board: freescale: p1_p2_rdb_pc: Calculate offsets for eSDHC boot sector

In reply to Pali Rohár

Correctly calculate offsets between SPL and proper U-Boot when new config option CONFIG_FSL_PREPBL_ESDHC_BOOT_SECTOR for generating eSDHC boot sector is enabled. Otherwise SPL would not be able to boot proper U-Boot.

---
Changes in v2:
* rebase on top of master branch, commit 85eb5ac6efee878f3c2ab3269286250e187ca10c

---
 include/configs/p1_p2_rdb_pc.h | 4 ++++
 1 file changed, 4 insertions(+)
include/configs/p1_p2_rdb_pc.h +4 -0
index ba04029df8d8..d2787136681b 100644
@@ -80,7 +80,11 @@
 #define CONFIG_SYS_MMC_U_BOOT_SIZE	(768 << 10)
 #define CONFIG_SYS_MMC_U_BOOT_DST	CONFIG_SYS_TEXT_BASE
 #define CONFIG_SYS_MMC_U_BOOT_START	CONFIG_SYS_TEXT_BASE
+#ifdef CONFIG_FSL_PREPBL_ESDHC_BOOT_SECTOR
+#define CONFIG_SYS_MMC_U_BOOT_OFFS	(CONFIG_SPL_PAD_TO - CONFIG_FSL_PREPBL_ESDHC_BOOT_SECTOR_DATA*512)
+#else
 #define CONFIG_SYS_MMC_U_BOOT_OFFS	CONFIG_SPL_PAD_TO
+#endif
 #elif defined(CONFIG_SPIFLASH)
 #define CONFIG_SYS_SPI_FLASH_U_BOOT_SIZE	(768 << 10)
 #define CONFIG_SYS_SPI_FLASH_U_BOOT_DST		CONFIG_SYS_TEXT_BASE
Signature · 1 line
2.20.1
#15 lore raw

Re: [PATCH v2] board: freescale: p1_p2_rdb_pc: Calculate offsets for eSDHC boot sector

Quoted 8 lines · On Monday 01 August 2022 14:50:12 Pali Rohár wrote:

Correctly calculate offsets between SPL and proper U-Boot when new config option CONFIG_FSL_PREPBL_ESDHC_BOOT_SECTOR for generating eSDHC boot sector is enabled. Otherwise SPL would not be able to boot proper U-Boot.

---
Changes in v2:
* rebase on top of master branch, commit 85eb5ac6efee878f3c2ab3269286250e187ca10c

PING? Are we going to wait until this patch does not apply anymore again??

Quoted 23 lines
---
 include/configs/p1_p2_rdb_pc.h | 4 ++++
 1 file changed, 4 insertions(+)
include/configs/p1_p2_rdb_pc.h +4 -0
index ba04029df8d8..d2787136681b 100644
@@ -80,7 +80,11 @@
 #define CONFIG_SYS_MMC_U_BOOT_SIZE	(768 << 10)
 #define CONFIG_SYS_MMC_U_BOOT_DST	CONFIG_SYS_TEXT_BASE
 #define CONFIG_SYS_MMC_U_BOOT_START	CONFIG_SYS_TEXT_BASE
+#ifdef CONFIG_FSL_PREPBL_ESDHC_BOOT_SECTOR
+#define CONFIG_SYS_MMC_U_BOOT_OFFS	(CONFIG_SPL_PAD_TO - CONFIG_FSL_PREPBL_ESDHC_BOOT_SECTOR_DATA*512)
+#else
 #define CONFIG_SYS_MMC_U_BOOT_OFFS	CONFIG_SPL_PAD_TO
+#endif
 #elif defined(CONFIG_SPIFLASH)
 #define CONFIG_SYS_SPI_FLASH_U_BOOT_SIZE	(768 << 10)
 #define CONFIG_SYS_SPI_FLASH_U_BOOT_DST		CONFIG_SYS_TEXT_BASE
Signature · 1 line
2.20.1
Applied
#16 lore raw

Re: [PATCH v2] board: freescale: p1_p2_rdb_pc: Calculate offsets for eSDHC boot sector

Quoted 11 lines · Pali Rohár
Quoted 8 lines · On Monday 01 August 2022 14:50:12 Pali Rohár wrote:

Correctly calculate offsets between SPL and proper U-Boot when new config option CONFIG_FSL_PREPBL_ESDHC_BOOT_SECTOR for generating eSDHC boot sector is enabled. Otherwise SPL would not be able to boot proper U-Boot.

---
Changes in v2:
* rebase on top of master branch, commit 85eb5ac6efee878f3c2ab3269286250e187ca10c

PING? Are we going to wait until this patch does not apply anymore again??

Applied, sorry for late.

Thanks,
Peng.

Quoted 24 lines
Quoted 24 lines
---
  include/configs/p1_p2_rdb_pc.h | 4 ++++
  1 file changed, 4 insertions(+)
include/configs/p1_p2_rdb_pc.h +4 -0
index ba04029df8d8..d2787136681b 100644
@@ -80,7 +80,11 @@
  #define CONFIG_SYS_MMC_U_BOOT_SIZE	(768 << 10)
  #define CONFIG_SYS_MMC_U_BOOT_DST	CONFIG_SYS_TEXT_BASE
  #define CONFIG_SYS_MMC_U_BOOT_START	CONFIG_SYS_TEXT_BASE
+#ifdef CONFIG_FSL_PREPBL_ESDHC_BOOT_SECTOR
+#define CONFIG_SYS_MMC_U_BOOT_OFFS	(CONFIG_SPL_PAD_TO - CONFIG_FSL_PREPBL_ESDHC_BOOT_SECTOR_DATA*512)
+#else
  #define CONFIG_SYS_MMC_U_BOOT_OFFS	CONFIG_SPL_PAD_TO
+#endif
  #elif defined(CONFIG_SPIFLASH)
  #define CONFIG_SYS_SPI_FLASH_U_BOOT_SIZE	(768 << 10)
  #define CONFIG_SYS_SPI_FLASH_U_BOOT_DST		CONFIG_SYS_TEXT_BASE
Signature · 1 line
2.20.1