[U-Boot] MMC boot / mvebu / clearfog
Christoph Egger
christoph at christoph-egger.org
Sat Oct 22 02:38:44 CEST 2016
Hi!
Christoph Egger <christoph at christoph-egger.org> writes:
> Christoph Egger <christoph at christoph-egger.org> writes:
>> hdr read sector 141, count=1
>
> Looking at the binary it seems to have the expected magic at sector 140
> == 0x28000 and the "wrong magic" at sector 141 == 0x28200 indeed. I
> guess this comes from SD cards where the kwb blob is written with 1
> sector offset while on eMMC it has to be written directly to the start
> of the mmc device.
Indeeed, the following patch fixes MMC booting for me (and most
certainly breaks SD card booting)
Christoph
diff --git a/include/configs/clearfog.h b/include/configs/clearfog.h
index 6cbdee2..5e049bd 100644
--- a/include/configs/clearfog.h
+++ b/include/configs/clearfog.h
@@ -143,8 +143,7 @@
#define CONFIG_SPL_LIBDISK_SUPPORT
#define CONFIG_SYS_MMC_U_BOOT_OFFS (160 << 10)
#define CONFIG_SYS_U_BOOT_OFFS CONFIG_SYS_MMC_U_BOOT_OFFS
-#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR ((CONFIG_SYS_U_BOOT_OFFS / 512)\
- + 1)
+#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR (CONFIG_SYS_U_BOOT_OFFS / 512)
#define CONFIG_SYS_U_BOOT_MAX_SIZE_SECTORS ((512 << 10) / 512) /* 512KiB */
#ifdef CONFIG_SPL_BUILD
#define CONFIG_FIXED_SDHCI_ALIGNED_BUFFER 0x00180000 /* in SDRAM */
--
9FED 5C6C E206 B70A 5857 70CA 9655 22B9 D49A E731
Debian Developer | Lisp Hacker | CaCert Assurer
More information about the U-Boot
mailing list