Update: uMon is now booting from SD

Ed Sutter edsutterjr at gmail.com
Tue Jul 7 00:10:13 UTC 2015


Jarielle,
Excellent!
Couple of  comments...
1. Since you've got so much detail in there, you may want to include the names of
the TRM chapter and sections that you reference.  I say this because a later revision may insert
a chapter or a section and that will make the chapter/section numbers you have confusing.
2. For raw mode description, in the 'dd' line, change "of=/dev/sdc" to "of=<device>" (where <device> is the sd card).
3. For fat mode description, you may want to add a "dd if=/dev/zero of=<device> bs=1M count=1" as the first step just to
      make sure there is no partition table at the base of the SD card.  If there is, then the first 'n' in your instructions
      may not do what you want.  I know you mention that the card is assumed to not be formatted.  This just
      makes sure of that.  So, I walked through your steps, using this to automate:

    export SDDEV=/dev/sdc  # User should verify this device.
    sudo dd if=/dev/zero of=${SDDEV} bs=128K count=1
    echo "n\np\n1\n\n+1M\nt\nc\na\n1\np\nw\n" | fdisk ${SDDEV}

      But when I did the mkfs line in your text, it returned an error: Not enough clusters for a 32bit FAT.
      So, I just did "mkfs.vfat /dev/sdc1" and that worked fine. Honestly, I don't know the details here,
      so if you can investigate this, that would be great.  Suggest adding something like the script above as
      a shortcut.

4. For UART boot mode, mention that the uMon image that is transferred is boot.bin, not the MLO.

Some other stuff you could add:
- To know for sure what device is your uSD card in your linux box, run "cat /proc/partitions" before and after
inserting the card and note the difference.

Good stuff,
Ed

> Ed,
>
> I finished the first draft of the document.  It can be found here:
> https://github.com/jrcatbagan/umon/commit/7f751486d5ca3ba5f6449adf5561df527a5cfde1
> . Please feel free to give me any suggestions on how I can improve it
> or if I am missing something.  Once you give the green light, I'll
> send it to umon-devel as a patch.
>
> Thanks.
>
> On Mon, Jul 6, 2015 at 5:21 AM, Ed Sutter <ed.sutter at alcatel-lucent.com> wrote:
>> On 7/5/2015 6:46 PM, Chris Johns wrote:
>>> On 5/07/2015 4:19 am, Ed Sutter wrote:
>>>> Ok, I managed to get it to boot using only Linux for formatting the card.
>>>> It wasn't working for me until I just read your email and realized I did
>>>> not mark
>>>> the partition active.  After doing that it booted!
>>>> So here are the steps I walked through
>>>> (extracted from: http://forum.xda-developers.com/showthread.php?t=502095)
>>>> :
>>>>
>>>> 1. Verify the partition that the SD card installs as:
>>>>        - cat /proc/paritions (without the uSD)
>>>>        - Insert uSD card
>>>>        - cat /proc/paritions (note the difference)
>>>> Using /dev/sdc as our partition:
>>>> 2. sudo fdisk /dev/sdc
>>>>       - delete all paritions with 'd' command (d1/d2/d3/d4) as needed
>>>>       - use 'n' command to create partition 1
>>>>       - use 't' command to relabel partition 1 to 'c'
>>>>       - use 'a' command to make the parition active
>>>>       - use 'p' to show something like:
>>>>
>>>>      Device Boot      Start         End      Blocks   Id  System
>>>> /dev/sdc1   *        2048     3932159     1965056    c  W95 FAT32 (LBA)
>>>>
>>>>        - use 'w' to write to the card
>>>>
>>>> 3. Run sudo mkfs.vfat /dev/sdc1
>>>> 4. Mount /dev/sdc1 as /media/boot (or whatever)
>>>> 5. Copy MLO to /media/boot
>>>> 6. Run sync; unmount /media/boot
>>>> 7. Put card in BBB, reset with boot button depressed.
>>>>
>>> A simple request to place in the doco early is to create a root
>>> partition only as large as you need and not use whole disk size in the
>>> root partition. Users should be encouraged to add other partitions they
>>> can mount as read/write to store a kernel and/or user data.
>>>
>>> Chris
>>> _______________________________________________
>>>
>> Yep, for sure... my example above was lame...
>> Functionally ok, but not considering the fact that the SD card will have
>> other "stuff".  Also, Chris, IIRC, you mentioned that FAT-booting may not be
>> the right way to go ultimately.  So, for now at least, it will be good to
>> cover
>> both modes of booting until we get a better grip on which approach to
>> take.
>> Jarielle, I can add detail on raw mode to whatever you initially write up
>> if you want me to...
>> Ed
>>
>> _______________________________________________
>> umon-devel mailing list
>> umon-devel at rtems.org
>> http://lists.rtems.org/mailman/listinfo/umon-devel
> _______________________________________________
> umon-devel mailing list
> umon-devel at rtems.org
> http://lists.rtems.org/mailman/listinfo/umon-devel
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/umon-devel/attachments/20150706/03b98d15/attachment-0002.html>


More information about the umon-devel mailing list