Skip to contentSkip to conversation

dra7xx: booting from eMMC raw boot partition

U-Boot Richard Retanubun 5 participants 10 messages Nov 20, 2013 – Nov 21, 2013

lore
Share & tools
lore
#0 lore raw

Hi Shankar and Michael,

I am using the ti dra7xx_evm platform, which comes with a Micron MTFC4GVMEA-4M IT device that has two 16MB boot partitions. I want to load the MLO and uboot into the eMMC's boot partition and boot from it in eMMC automotive peripheral mode.

I am able to write the MLO into the beginning of /dev/mmcblk1boot0 or /dev/mmcblk1boot1 or /dev/mmcblk1 (using dd) I then used mmc-utils to make sure that CONFIG_PARTITION in the eMMC's extcsd is set to allow booting from boot1 (with ACK).

However, the CPU does not print anything back on the console...

The only way I can get raw eMMC boot mode to work is if I put the MLO on /dev/mmcblk1 (which is the user data area).

by working, I mean that it prints something like this:

U-Boot SPL 2013.04-09402-gc831bca (Nov 19 2013 - 22:05:38) DRA752 ES1.0
OMAP SD/MMC: 1
...

I have tried the MLO built from both sources from both uboot master from denx and p-ti-u-boot-2013.04 from omapzoom.

I think the SYSBOOT[5:0] settings are correct because it is able to boot the MLO from the eMMC's user data area.

Does the MLO for raw boot mode needs to be different that the MLO for raw user data area? Is there an errata limitation with the dra7xx for booting MLO from eMMC boot partition?

Am I missing something obvious?

Thank you for everyone's time.

Signature · 1 line
-- Richard Retanubun
#1 lore raw
Quoted 30 lines · Richard Retanubun

Hi Shankar and Michael,

I am using the ti dra7xx_evm platform, which comes with a Micron MTFC4GVMEA-4M IT device that has two 16MB boot partitions.
I want to load the MLO and uboot into the eMMC's boot partition and boot from it in eMMC automotive peripheral mode.

I am able to write the MLO into the beginning of /dev/mmcblk1boot0 or /dev/mmcblk1boot1 or /dev/mmcblk1 (using dd)
I then used mmc-utils to make sure that CONFIG_PARTITION in the eMMC's extcsd is set to allow booting from boot1 (with ACK).

However, the CPU does not print anything back on the console...

The only way I can get raw eMMC boot mode to work is if I put the MLO on /dev/mmcblk1 (which is the user data area).

by working, I mean that it prints something like this:

U-Boot SPL 2013.04-09402-gc831bca (Nov 19 2013 - 22:05:38) DRA752 ES1.0
OMAP SD/MMC: 1
...

I have tried the MLO built from both sources from both uboot master from denx and p-ti-u-boot-2013.04 from omapzoom.

I think the SYSBOOT[5:0] settings are correct because it is able to boot the MLO from the eMMC's user data area.

Quoted 8 lines

Does the MLO for raw boot mode needs to be different that the MLO for raw user data area?
Is there an errata limitation with the dra7xx for booting MLO from eMMC boot partition?

Am I missing something obvious?

Thank you for everyone's time.

Hi Richard,
Are you trying to boot Android kernel or Linux kernel? Building u-boot with android config will give you access to fastboot which can help you partition the eMMC and boot out of it.

Regards
Shankar

#2 lore raw
In reply to Richard Retanubun

Hi Richard,

Quoted 4 lines · Richard Retanubun

However, the CPU does not print anything back on the console...

The only way I can get raw eMMC boot mode to work is if I put the MLO on /dev/mmcblk1 (which is the user data area).

I have not seen a reference manual for dra7xx, so this may not apply, but it is worth noting that many SoCs that support booting from eMMC do not actually use the boot mode, and simply boot directly from the user data area. The boot mode is described in the eMMC spec in a section titled "Boot operation mode" (Section 7.3 in eMMC 4.4). Basically, it provides a different initialization sequence that will sequentially read out the partition selected in CONFIG_PARTITION. If the SoC is not utilizing this boot mode, it may unconditionally read from the user data area.

Quoted 2 lines

Does the MLO for raw boot mode needs to be different that the MLO for raw user data area?

If both MLO and U-Boot are to be in the boot partition, booted using eMMC boot mode, MLO will likely need to behave differently in order to correctly read U-Boot. Boot mode sequentially reads out the selected partition, without using the standard commands, so MLO will need to understand this and perform the appropriate clocking of the eMMC. I am unsure if there is currently support for that.

Hopefully this is helpful!
Michael Pratt

#3 lore raw

Hi Guys, thanks for the responses. my comments are below.

Quoted 4 lines · Richard Retanubun

Hi Richard,
Are you trying to boot Android kernel or Linux kernel? Building u-boot with android config will give you access to fastboot which can help you partition the eMMC and boot out of it.

I am trying to boot Linux kernel. The plan is to put MLO and uboot in the eMMC's boot partition and a GPT partitioned linux in the user data area.

I think there are some errata in the ROM bootcode about booting over QSPI1, I am concerned that I am hitting another errata condition. Can you help me confirm this?

Quoted 9 lines · Michael Pratt

Hi Richard,

Quoted 4 lines · Richard Retanubun

However, the CPU does not print anything back on the console...

The only way I can get raw eMMC boot mode to work is if I put the MLO on /dev/mmcblk1 (which is the user data area).

Quoted 9 lines

I have not seen a reference manual for dra7xx, so this may not apply, but it is worth noting that many SoCs that support booting from eMMC do not actually use the boot mode, and simply boot directly from the user data area. The boot mode is described in the eMMC spec in a section titled "Boot operation mode" (Section 7.3 in eMMC 4.4). Basically, it provides a different initialization sequence that will sequentially read out the partition selected in CONFIG_PARTITION. If the SoC is not utilizing this boot mode, it may unconditionally read from the user data area.

Yep. These are the sequence I am trying to do (the "Alternate boot operation")

Quoted 10 lines
Quoted 3 lines

Does the MLO for raw boot mode needs to be different that the MLO for raw user data area?

If both MLO and U-Boot are to be in the boot partition, booted using eMMC boot mode, MLO will likely need to behave differently in order to correctly read U-Boot. Boot mode sequentially reads out the selected partition, without using the standard commands, so MLO will need to understand this and perform the appropriate clocking of the eMMC. I am unsure if there is currently support for that.

I am aware that the MLO will have to behave differently. But I expect that at least the beginning (version printing) is common. I am trying to use that as a quick-and-dirty test to confirm the SoC's ability to boot over eMMC boot partition.

I am aware that there is no support in denx mainline. In the ti omapzoom repo/u-boot there are code that looks hopeful. (ref: /drivers/mmc/spl_mmc.c::spl_mmc_load_image_raw())

Once I can get the SoC to boot the MLO, I plan to use that for the MLO to find and load uboot.

Quoted 4 lines

Hopefully this is helpful!
Michael Pratt

Thanks for both your time.

#4 lore raw
In reply to Richard Retanubun

+Amar
Amar, can you help Richard with eMMC booting?

Thanks
Shankar

-----Original Message-----
From: Richard Retanubun [mailto:richardretanubun at ruggedcom.com]
Sent: Wednesday, November 20, 2013 4:28 PM
To: Rao, Shankar; Shklyarman, Michael
Cc: SIFW-Richard Retanubun; u-boot at lists.denx.de
Subject: dra7xx: booting from eMMC raw boot partition

Hi Shankar and Michael,

I am using the ti dra7xx_evm platform, which comes with a Micron MTFC4GVMEA-4M IT device that has two 16MB boot partitions. I want to load the MLO and uboot into the eMMC's boot partition and boot from it in eMMC automotive peripheral mode.

I am able to write the MLO into the beginning of /dev/mmcblk1boot0 or /dev/mmcblk1boot1 or /dev/mmcblk1 (using dd) I then used mmc-utils to make sure that CONFIG_PARTITION in the eMMC's extcsd is set to allow booting from boot1 (with ACK).

However, the CPU does not print anything back on the console...

The only way I can get raw eMMC boot mode to work is if I put the MLO on /dev/mmcblk1 (which is the user data area).

by working, I mean that it prints something like this:

U-Boot SPL 2013.04-09402-gc831bca (Nov 19 2013 - 22:05:38) DRA752 ES1.0
OMAP SD/MMC: 1
...

I have tried the MLO built from both sources from both uboot master from denx and p-ti-u-boot-2013.04 from omapzoom.

I think the SYSBOOT[5:0] settings are correct because it is able to boot the MLO from the eMMC's user data area.

Does the MLO for raw boot mode needs to be different that the MLO for raw user data area? Is there an errata limitation with the dra7xx for booting MLO from eMMC boot partition?

Am I missing something obvious?

Thank you for everyone's time.
--
-- Richard Retanubun

#5 lore raw
In reply to Richard Retanubun
Quoted 12 lines · Richard Retanubun

Hi Shankar and Michael,

I am using the ti dra7xx_evm platform, which comes with a Micron MTFC4GVMEA-4M IT device that has two 16MB boot partitions. I want to load the MLO and uboot into the eMMC's boot partition and boot from it in eMMC automotive peripheral mode.

I am able to write the MLO into the beginning of /dev/mmcblk1boot0 or /dev/mmcblk1boot1 or /dev/mmcblk1 (using dd) I then used mmc-utils to make sure that CONFIG_PARTITION in the eMMC's extcsd is set to allow booting from boot1 (with ACK).

Quoted 4 lines

However, the CPU does not print anything back on the console...

The only way I can get raw eMMC boot mode to work is if I put the MLO on /dev/mmcblk1 (which is the user data area).

Did you change the SYSBOOT pins to use automotive peripheral mode, rather than user data? If you did, you should see an error from MLO saying that you came in from an unsupported boot device (since we don't have the value of what ROM tells us for when we come in that way defined in arch/arm/include/asm/arch-omap5/spl.h). Or there is some other problem. Also note that U-Boot defaults to using these "boot" partitions for storing the environment so you will need to change that part of the config once you use these partitions for something else.

Signature · 8 lines
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/20131121/fcdcb517/attachment.pgp>
#6 lore raw
Quoted 10 lines · Tom Rini
Quoted 2 lines · Richard Retanubun

The only way I can get raw eMMC boot mode to work is if I put the MLO on /dev/mmcblk1 (which is the user data area).

Did you change the SYSBOOT pins to use automotive peripheral mode, rather than user data? If you did, you should see an error from MLO saying that you came in from an unsupported boot device (since we don't have the value of what ROM tells us for when we come in that way defined in arch/arm/include/asm/arch-omap5/spl.h). Or there is some other problem.

I did try both SYSBOOT for automotive peripheral mode.. I wished it did say something (even if it is an error message). My problem is that it does not display anything at all. So, I think I fall under the "some other problem" category. :)

Quoted 4 lines

Also note that U-Boot defaults to using these "boot" partitions for storing the environment so you will need to change that part of the config once you use these partitions for something else.

Thank you for the heads up. I'll watch out for this when I get to this phase.

Tom, since you're both the u-boot-arm maintainer and happens to work for TI, do you know the e.t.a of mainlining the /drivers/mmc/spl_mmc.c and the related code needed to boot from eMMC in raw mode into denx-master?

I rather stick with denx-master mainline if at all possible, but right now the functionality only exist in p-ti-u-boot-2013.04, right?

Thanks a lot for the pointers.

#7 lore raw
Quoted 20 lines · Richard Retanubun
Quoted 10 lines · Tom Rini
Quoted 2 lines · Richard Retanubun

The only way I can get raw eMMC boot mode to work is if I put the MLO on /dev/mmcblk1 (which is the user data area).

Did you change the SYSBOOT pins to use automotive peripheral mode, rather than user data? If you did, you should see an error from MLO saying that you came in from an unsupported boot device (since we don't have the value of what ROM tells us for when we come in that way defined in arch/arm/include/asm/arch-omap5/spl.h). Or there is some other problem.

I did try both SYSBOOT for automotive peripheral mode.. I wished it did say something (even if it is an error message). My problem is that it does not display anything at all. So, I think I fall under the "some other problem" category. :)

Quoted 4 lines

Also note that U-Boot defaults to using these "boot" partitions for storing the environment so you will need to change that part of the config once you use these partitions for something else.

Quoted 8 lines

Thank you for the heads up. I'll watch out for this when I get to this phase.

Tom, since you're both the u-boot-arm maintainer and happens to work for TI, do you know the e.t.a of mainlining the /drivers/mmc/spl_mmc.c and the related code needed to boot from eMMC in raw mode into denx-master?

I rather stick with denx-master mainline if at all possible, but right now the functionality only exist in p-ti-u-boot-2013.04, right?

I've done RAW mode booting on my omap5_uevm as well as am335x-based platforms, on SD card and eMMC. But in the case of eMMC it's always the user partitions. I suspect the answer is that for automotive booting you need silicon that supports that, much like the difference between HS and GP devices. I'm not sure what code in p-ti-u-boot-2013.04 hasn't been merged to mainline but if you can give me some pointers I can go and poke some folks.

Signature · 8 lines
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/20131121/6733ae9b/attachment.pgp>
#8 lore raw
Quoted 5 lines · Tom Rini

I've done RAW mode booting on my omap5_uevm as well as am335x-based platforms, on SD card and eMMC. But in the case of eMMC it's always the user partitions. I suspect the answer is that for automotive booting you need silicon that supports that, much like the difference between HS and GP devices.

Agreed. If by silicon you mean the CPU, then all the docs I've seen (the TRM for DRA7xx and SYSBOOT in automotive peripheral mode seem to indicate that the SoC is capable or Raw eMMC boot partition booting.

Quoted 3 lines

I'm not sure what code in p-ti-u-boot-2013.04 hasn't
been merged to mainline but if you can give me some pointers I can go and poke some folks.

Thanks for the offer, poke gently :)

I think it is essentially all the code that touches /drivers/mmc/spl_mmc.c on the ti tree here:

http://git.omapzoom.org/?p=repo/u-boot.git;a=history;f=drivers/mmc/spl_mmc.c;h=bd7e34bed35a1518d714232a8aedbc2e38d43632;hb=refs/heads/p-ti-u-boot-2013.04

Thanks for your time, Tom.

#9 lore raw
Quoted 10 lines · Richard Retanubun
Quoted 5 lines · Tom Rini

I've done RAW mode booting on my omap5_uevm as well as am335x-based platforms, on SD card and eMMC. But in the case of eMMC it's always the user partitions. I suspect the answer is that for automotive booting you need silicon that supports that, much like the difference between HS and GP devices.

Agreed. If by silicon you mean the CPU, then all the docs I've seen (the TRM for DRA7xx and SYSBOOT in automotive peripheral mode seem to indicate that the SoC is capable or Raw eMMC boot partition booting.

Well, I think it's a little more than that, perhaps depending on eFuse stuff or similar as well.

Quoted 8 lines
Quoted 3 lines

I'm not sure what code in p-ti-u-boot-2013.04 hasn't
been merged to mainline but if you can give me some pointers I can go and poke some folks.

Thanks for the offer, poke gently :)

I think it is essentially all the code that touches /drivers/mmc/spl_mmc.c on the ti tree here:

http://git.omapzoom.org/?p=repo/u-boot.git;a=history;f=drivers/mmc/spl_mmc.c;h=bd7e34bed35a1518d714232a8aedbc2e38d43632;hb=refs/heads/p-ti-u-boot-2013.04

Ah, OK, I see where the confusion comes from. There are three things in that tree, roughly, from reading the commits on that file:
1) Android Fastboot support
2) A custom version of "falcon mode"
3) Other odds and ends changes

Looking over the code there, one might think mainline doesn't support eMMC booting or needs changes, because we always say "use mmc device 0". That's fine however because SPL looks at if we came in (hardware numbering now) from MMC1 or MMC2 and then only register that MMC device. So we're always s/w wise mmc device 0.

There's a few patches floating around to add Fastboot support to mainline, and I'd love to see one pushed all the way to mainline.

Signature · 8 lines
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/20131121/3b5891bc/attachment.pgp>