On 10/8/23 14:46, Josua Mayer wrote:
Disarm the error message forcing u-boot/spl image to be located at
sector 0 on eMMC data-partition and microSD.
Offset 0 makes sense on eMMC boot partitions only, data partition must
use 4096 to avoid conflicting with MBR.
Valid offsets when booting from microSD, reported by boot-rom v1.73:
BootROM: Bad header at offset 0200
BootROM: Bad header at offset 4400
BootROM: Bad header at offset 0020
BootROM: Bad header at offset 0040
BootROM: Bad header at offset 0060
BootROM: Bad header at offset 0080
BootROM: Bad header at offset 00A0
BootROM: Bad header at offset 00C0
BootROM: Bad header at offset 00E0
BootROM: Bad header at offset 0100
BootROM: Bad header at offset 0120
BootROM: Bad header at offset 0140
BootROM: Bad header at offset 0160
BootROM: Bad header at offset 0180
BootROM: Bad header at offset 01A0
BootROM: Bad header at offset 01C0
BootROM: Bad header at offset 01E0
BootROM: Bad header at offset 0200
BootROM: Bad header at offset 0220
BootROM: Bad header at offset 0240
BootROM: Bad header at offset 0260
BootROM: Bad header at offset 0280
BootROM: Bad header at offset 02A0
BootROM: Bad header at offset 02C0
BootROM: Bad header at offset 02E0
Valid offsets when booting from eMMC:
BootROM: Bad header at offset
BootROM: Bad header at offset 0020
Switching BootPartitions.
BootROM: Bad header at offset
BootROM: Bad header at offset 0020
Fixes: 2226ca17348 ("arm: mvebu: Load U-Boot proper binary in SPL code based on
kwbimage header")
Signed-off-by: Josua Mayer
Reviewed-by: Stefan Roese
Thanks,
Stefan
---
arch/arm/mach-mvebu/spl.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/arch/arm/mach-mvebu/spl.c b/arch/arm/mach-mvebu/spl.c
index 379daa88a4d..0dbc12f66ea 100644
--- a/arch/arm/mach-mvebu/spl.c
+++ b/arch/arm/mach-mvebu/spl.c
@@ -71,8 +71,9 @@
#error CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR must be set to 0
#endif
#if !defined(CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_DATA_PART_OFFSET) || \
-CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_DATA_PART_OFFSET != 0
-#error CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_DATA_PART_OFFSET must be set to 0
+(CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_DATA_PART_OFFSET != 0 && \
+ CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_DATA_PART_OFFSET != 4096)
+#error CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_DATA_PART_OFFSET must be set to either
0 or 4096
#endif
#endif
Viele Grüße,
Stefan Roese
--
DENX Software Engineering GmbH, Managing Director: Erika Unter
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: s...@denx.de