Snowball: falling back to booting from emmc when there is no SD doesn't work

Bug #1095747 reported by Andrey Konovalov
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Linaro Image Tools
Fix Released
High
Milo Casagrande
Linaro U-Boot
Invalid
Undecided
John Rigby

Bug Description

The hwpack for snowball is created with mmc_id=1:1 (i.e. the SD card is used by default). But if booting from the SD card fails, u-boot should fall back to booting from emmc. In particular, the same hwpack could be used to boot from SD card and emmc - just the correct --dev must have been specified for linaro-media-create. This worked in U-Boot 2009.11 (Mar 28 2012 - 23:18:21):

https://pastebin.linaro.org/1356/

, but stopped working starting from U-Boot 2012.04.01 (Jul 19 2012 - 17:47:52):

https://pastebin.linaro.org/1354/

The issue is present in the U-Boot 2013.01.-rc1 (Dec 08 2012 - 12:36:53) as well:

https://pastebin.linaro.org/1355/

Related branches

Fathi Boudra (fboudra)
Changed in u-boot-linaro:
assignee: nobody → John Rigby (jcrigby)
milestone: none → 13.01
Revision history for this message
John Rigby (jcrigby) wrote :

After looking at this for a bit I can confirm that yes things are broken.

The boot.txt/boot.scr file generated by linaro-media-create generates "fatload mmc 1:1" independent of the device chosen snowball_emmc or snowball_sd. It seems that this should be "fatload mmc 0:0" for the snowball_emmc case.

I personally believe that the boot method on snowball is so broken that we should just have the proprietary bootloader on emmc and u-boot, kernel, etc on sd. In this way emmc would function like the bios rom on a pc.

Revision history for this message
John Rigby (jcrigby) wrote :

linaro-media-create needs fixing to really fix this bug but I'm not sure it makes sense. I suppose we should at least fix the documentation to explain how the boot sequence on snowball is different than expected.

Changed in u-boot-linaro:
status: New → Invalid
Revision history for this message
John Rigby (jcrigby) wrote :

After thinking about this more, I believe changing linaro-media-create to use a different fatload mmc N:M for emmc is the right fix. Looking at the android case it seems "fatload mmc 0:2" is the correct setting.

Fathi Boudra (fboudra)
Changed in linaro-image-tools:
milestone: none → 2013.02
Revision history for this message
Данило Шеган (danilo) wrote :

Stevan, please investigate why is this happening: when did we introduce a hard-coded 1:1 to establish if this is a regression or something that was broken for a long time? Also, check if this is something that can be pulled out of a hwpack, and if so, why we are not doing that already?

Changed in linaro-image-tools:
status: New → Triaged
assignee: nobody → Stevan Radaković (stevanr)
Revision history for this message
Данило Шеган (danilo) wrote :

John, will changing fatload command to "fatload mmc 0:2" make it try both with snowball, or should we perhaps look into putting several manual fatload's in for snowball? I'd rather look at how we can put that into a hwpack, but if all else fails, perhaps we'll need to hard-code something along those lines.

Changed in linaro-image-tools:
importance: Undecided → High
Revision history for this message
John Rigby (jcrigby) wrote :

I think the more general problem is that boards that have on board soldered on flash like emmc are confusing given that we create images for sd cards. Snowball will not even boot from SD so we always boot from emmc then switch (or not) to SD. I'm thinking we should treat boards like this as having a fixed boot loader like a bios on a pc the we only deal with the bits that go on SD (or USB or whatever) in l-m-c.

Of course we will still need to produce bits for the on board flash but that could be a separate issue and one that only happens infrequently like a bios upgrade.

David Zinman (dzinman)
Changed in linaro-image-tools:
milestone: 2013.02 → 2013.03
Fathi Boudra (fboudra)
Changed in linaro-image-tools:
milestone: 2013.03 → 2013.04
assignee: Stevan Radaković (stevanr) → nobody
Milo Casagrande (milo)
Changed in linaro-image-tools:
assignee: nobody → Milo Casagrande (milo)
Revision history for this message
Milo Casagrande (milo) wrote :

As per comment #3, the linked branch changes the MMC value for Snowball EMMC board to '0:2'.

Milo Casagrande (milo)
Changed in linaro-image-tools:
status: Triaged → In Progress
Milo Casagrande (milo)
Changed in linaro-image-tools:
status: In Progress → Fix Committed
Milo Casagrande (milo)
Changed in linaro-image-tools:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.