ti_armv7_common.h: Fix U-Boot location on eMMC
PATCH v2 1/1 ti_armv7_common.h: Fix U-Boot location on eMMC
According to common eMMC partition table for Android boot (see PARTS_DEFAULT definition in include/configs/dra7xx_evm.h), "bootloader" partition (where u-boot.img is stored) starts at 256 KiB. Which is equal to 512 sectors (as 1 MMC sector size is 512 bytes).
This patch fixes CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR constant so that it points to correct address of "bootloader" partition and SPL is able to read, parse and run u-boot.img correctly.
This change was originally done as part of patch [1] in omapzoom u-boot. Without this patch, SPL fails to parse U-Boot header with next error:
mkimage signature not found - ih_magic = 4814325a
While at it, also fix U-Boot partition size, which is 384 KiB (as stated in include/configs/dra7xx_evm.h).
[1] http://omapzoom.org/?p=repo/u-boot.git;a=commit;h=742b82d0c0aa0ed8096c2225a00e9f350212efa9
---
Changes for v2:
- Adjust also partition size to be 385 KiB
include/configs/ti_armv7_common.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
include/configs/ti_armv7_common.h +2 -2
@@ -229,8 +229,8 @@#endif /* RAW SD card / eMMC locations. */ -#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR 0x300/* address 0x60000 */ -#define CONFIG_SYS_U_BOOT_MAX_SIZE_SECTORS 0x200/* 256 KB */ +#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR 512/* address 0x40000 */ +#define CONFIG_SYS_U_BOOT_MAX_SIZE_SECTORS 0x300/* 384 KB */ /* FAT sd card locations. */ #define CONFIG_SYS_MMCSD_FS_BOOT_PARTITION 1
Signature · 1 line
2.8.0.rc3
PATCH v2 1/1 ti_armv7_common.h: Fix U-Boot location on eMMC
Quoted 32 lines · Sam Protsenko
According to common eMMC partition table for Android boot (see
PARTS_DEFAULTdefinition ininclude/configs/dra7xx_evm.h), "bootloader" partition (where u-boot.img is stored) starts at 256 KiB. Which is equal to 512 sectors (as 1 MMC sector size is 512 bytes).This patch fixes
CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTORconstant so that it points to correct address of "bootloader" partition and SPL is able to read, parse and run u-boot.img correctly.This change was originally done as part of patch [1] in omapzoom u-boot. Without this patch, SPL fails to parse U-Boot header with next error:
mkimage signature not found -
ih_magic=4814325aWhile at it, also fix U-Boot partition size, which is 384 KiB (as stated in
include/configs/dra7xx_evm.h).[1] http://omapzoom.org/?p=repo/u-boot.git;a=commit;h=742b82d0c0aa0ed8096c2225a00e9f350212efa9
Signed-off-by Sam Protsenko <[email protected]>---
Changes for v2:
- Adjust also partition size to be 385 KiBinclude/configs/ti_armv7_common.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)include/configs/ti_armv7_common.h +0
-0
include/configs/ti_armv7_common.h line 233
Quoted 7 lines
include/configs/ti_armv7_common.h +2
-2@@ -229,8 +229,8 @@#endif /* RAW SD card / eMMC locations. */ -#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR 0x300/* address 0x60000 */ -#define CONFIG_SYS_U_BOOT_MAX_SIZE_SECTORS 0x200/* 256 KB */ +#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR 512/* address 0x40000 */ +#define CONFIG_SYS_U_BOOT_MAX_SIZE_SECTORS 0x300/* 384 KB */
Good catch. But please keep the value in hex for consistency, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160419/ad467c46/attachment.sig>