Skip to content

Commit 3a80ec0

Browse files
Josua-SRstroese
authored andcommitted
cmd: mvebu/bubt: move eMMC data-partition uboot from LBA-0 to 4096
A38x bootrom only searches 2 sectors when booting from eMMC, irregardless of data or boot partition: 0 & 4096. For eMMC boot partitions sector 0 is fine, but on data partition it conflicts with MBR. Change bubt command default to 4096 for eMMC data partition only, to allow using an MBR partition table on the eMMC data partition while also booting from it. Signed-off-by: Josua Mayer <[email protected]> Reviewed-by: Stefan Roese <[email protected]>
1 parent a5539f9 commit 3a80ec0

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

cmd/mvebu/bubt.c

+9-2
Original file line numberDiff line numberDiff line change
@@ -240,9 +240,16 @@ static int mmc_burn_image(size_t image_size)
240240
#endif
241241

242242
/* SD reserves LBA-0 for MBR and boots from LBA-1,
243-
* MMC/eMMC boots from LBA-0
243+
* MMC/eMMC boots from LBA-0 and LBA-4096
244244
*/
245-
start_lba = IS_SD(mmc) ? 1 : 0;
245+
if (IS_SD(mmc))
246+
start_lba = 1;
247+
#ifdef CONFIG_SUPPORT_EMMC_BOOT
248+
else if (part)
249+
start_lba = 0;
250+
#endif
251+
else
252+
start_lba = 4096;
246253
#ifdef CONFIG_BLK
247254
blk_count = image_size / mmc->write_bl_len;
248255
if (image_size % mmc->write_bl_len)

0 commit comments

Comments
 (0)