* [U-Boot] eMMC boot partition support in uboot
@ 2013-12-05 18:46 Richard Retanubun
2013-12-05 19:09 ` Tom Rini
0 siblings, 1 reply; 3+ messages in thread
From: Richard Retanubun @ 2013-12-05 18:46 UTC (permalink / raw)
To: u-boot
Hi guys,
Recap: I am trying to boot MLO + uboot from eMMC boot partition on DRA7xx_EVM eval platform.
SW-Baseline: uboot p-ti-uboot-2013.04 & p-ti-linux-3.8.y from omapzoom.
What happens so far:
1. I am able to dd the MLO into /dev/mmcblk1boot0 (need to echo 0 to force_ro).
2. I am able to setup the eMMC to enable the ROM BootLoader (RBL) to boot the "Alternate boot mode"
using mmc-utils by setting:
BOOT_BUS_WIDTH Register (EXT_CSD [177]) = 0x15 (needed to set DDR mode at boot)
PARTITION_CONFIG Register (EXT_CSD [179]) = 0x48 (needed to enable booting from boot partition)
Up to this point I am able to get this response when booting the MLO from the eMMC boot partition
U-Boot SPL 2013.04-00366-g5f72750-dirty (Dec 03 2013 - 21:40:19)
DRA752 ES1.0
OMAP SD/MMC: 1
spl: wrong MMC boot mode
spl_mmc_load_image:
spl_boot_mode = 0 (MMCSD_MODE_UNDEFINED)
spl_boot_device = 6 (BOOT_DEVICE_MMC2)
### ERROR ### Please RESET the board ###
3. I realize that the MLO contents (using uboot/tools/omapimage?) needed to say
MMCSD_MODE_RAW for my platform. I am bypassing this problem by by hard coding the response
arch/arm/cpu/armv7/omap-common/boot-common.c::spl_boot_mode() to always says MMCSD_MODE_RAW.
This seems to work and I am past the hang() code.
4. Now, MLO is ready to (raw) load uboot binary from the eMMC boot partition (i.e. /dev/mmcblk1boot0).
Unfortunately, at this point I don't know how to make the platform recognize the eMMC boot partitions.
I think they are not modelled yet in uboot. Only the User-Data-Area (UDA)
is recognized in uboot (called mmc 1)
My understanding is that for mmc boot partition recognition, we need to
extend drivers/mmc/omap_hsmmc.c::omap_mmc_init() to be able to handle it?
or is there a better place?
Question 1:
Is my understanding of the current state all correct?
Question 2:
How should I proceed to add support for /dev/mmcblk1boot0 into uboot?
I am thinking the solution should self parse the ext_csd to find out which boot
partition is active and then load the uboot raw from a known offset there.
I saw the linux patch adding eMMC boot partition at:
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/Documentation/mmc/mmc-dev-parts.txt?id=371a689f64b0da140c3bcd3f55305ffa1c3a58ef
But I don't see how to adapt it into uboot...
Thanks for everyone's time.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [U-Boot] eMMC boot partition support in uboot
2013-12-05 18:46 [U-Boot] eMMC boot partition support in uboot Richard Retanubun
@ 2013-12-05 19:09 ` Tom Rini
2013-12-05 20:21 ` Richard Retanubun
0 siblings, 1 reply; 3+ messages in thread
From: Tom Rini @ 2013-12-05 19:09 UTC (permalink / raw)
To: u-boot
On Thu, Dec 05, 2013 at 01:46:40PM -0500, Richard Retanubun wrote:
> Hi guys,
>
> Recap: I am trying to boot MLO + uboot from eMMC boot partition on DRA7xx_EVM eval platform.
> SW-Baseline: uboot p-ti-uboot-2013.04 & p-ti-linux-3.8.y from omapzoom.
Please note that this list is for the mainline U-Boot tree, and to
contact your TI reps for help with the TI trees. I'm answering in
general since I know how the mainline code works, and what I suspect
needs doing there in general to allow what you want to work:
[snip]
> 3. I realize that the MLO contents (using uboot/tools/omapimage?) needed to say
> MMCSD_MODE_RAW for my platform. I am bypassing this problem by by hard coding the response
> arch/arm/cpu/armv7/omap-common/boot-common.c::spl_boot_mode() to always says MMCSD_MODE_RAW.
> This seems to work and I am past the hang() code.
It's possible that the ROM simply doesn't support a dos-style partition
table and a FAT partition on the eMMC boot partition so the right answer
here is to do what you're doing and hard-code raw only. I strongly
suspect this to be true, even.
> 4. Now, MLO is ready to (raw) load uboot binary from the eMMC boot partition (i.e. /dev/mmcblk1boot0).
> Unfortunately, at this point I don't know how to make the platform recognize the eMMC boot partitions.
> I think they are not modelled yet in uboot. Only the User-Data-Area (UDA)
> is recognized in uboot (called mmc 1)
Not quite true, no. You'll need code similar to what we have in
common/env_mmc.c to switch the partition to the boot partition.
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20131205/c2487070/attachment.pgp>
^ permalink raw reply [flat|nested] 3+ messages in thread
* [U-Boot] eMMC boot partition support in uboot
2013-12-05 19:09 ` Tom Rini
@ 2013-12-05 20:21 ` Richard Retanubun
0 siblings, 0 replies; 3+ messages in thread
From: Richard Retanubun @ 2013-12-05 20:21 UTC (permalink / raw)
To: u-boot
On 05/12/13 02:09 PM, Tom Rini wrote:
> On Thu, Dec 05, 2013 at 01:46:40PM -0500, Richard Retanubun wrote:
>
>> Hi guys,
>>
>> Recap: I am trying to boot MLO + uboot from eMMC boot partition on DRA7xx_EVM eval platform.
>> SW-Baseline: uboot p-ti-uboot-2013.04 & p-ti-linux-3.8.y from omapzoom.
>
> Please note that this list is for the mainline U-Boot tree, and not to
> contact your TI reps for help with the TI trees. I'm answering in
> general since I know how the mainline code works, and what I suspect
> needs doing there in general to allow what you want to work:
Sorry if I appear as abusing the mailing list. That was not the intent
and I will stop doing it for this issue.
The main reason I am including the mailing list is to share notes on what
had to be done even to get the MLO loaded and booting in alternate boot mode.
I realize my problem may be ti tree specific, but I think the EXT_CSD settings
in the eMMC I found is of value on many other CPUs booting over eMMC.
> [snip]
>> 3. I realize that the MLO contents (using uboot/tools/omapimage?) needed to say
>> MMCSD_MODE_RAW for my platform. I am bypassing this problem by by hard coding the response
>> arch/arm/cpu/armv7/omap-common/boot-common.c::spl_boot_mode() to always says MMCSD_MODE_RAW.
>> This seems to work and I am past the hang() code.
>
> It's possible that the ROM simply doesn't support a dos-style partition
> table and a FAT partition on the eMMC boot partition so the right answer
> here is to do what you're doing and hard-code raw only. I strongly
> suspect this to be true, even.
>
>> 4. Now, MLO is ready to (raw) load uboot binary from the eMMC boot partition (i.e. /dev/mmcblk1boot0).
>> Unfortunately, at this point I don't know how to make the platform recognize the eMMC boot partitions.
>> I think they are not modelled yet in uboot. Only the User-Data-Area (UDA)
>> is recognized in uboot (called mmc 1)
>
> Not quite true, no. You'll need code similar to what we have in
> common/env_mmc.c to switch the partition to the boot partition.
>
I'll have a look at that then, Tom. Thank you for your time.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-12-05 20:21 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-05 18:46 [U-Boot] eMMC boot partition support in uboot Richard Retanubun
2013-12-05 19:09 ` Tom Rini
2013-12-05 20:21 ` Richard Retanubun
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox