<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">Jarielle,<br>
      Since I already did it, attached is the cfg_header.S file I used
      for raw mode.<br>
      <br>
      Ed<br>
    </div>
    <blockquote
cite="mid:CANjxxd3mB4ROb2WGk0gxTxW24D8qpsFVSUzQQN_gaBuiHshoig@mail.gmail.com"
      type="cite">
      <p dir="ltr"><br>
        On Jul 7, 2015 4:49 AM, "Ed Sutter" <<a
          moz-do-not-send="true"
          href="mailto:ed.sutter@alcatel-lucent.com">ed.sutter@alcatel-lucent.com</a>>
        wrote:<br>
        ><br>
        > Jarielle,<br>
        > Great!<br>
        > Two (last) minor suggestions...<br>
        > 1. Mention the script in the documentation file.<br>
        > 2. In the script you may as well include the final step
        that you have in the documentation<br>
        > for copying the MLO file to the card...<br>
        ><br>
        >    cd ~<br>
        >    mkdir mnt<br>
        >    ...<br>
        >    rmdir mnt<br>
        ><br>
        > Other than that, it looks good to me.<br>
        > Good hunting regarding the cluster error issue!<br>
        > Ed</p>
      <p dir="ltr">Thanks.  Doc and script are now updated to reflect
        the minor suggestions.  I added a part in the "FAT Mode" section
        to refer to the script and I added the last remaining steps in
        the doc to the script.  The links to the files are the same as
        before.</p>
      <p dir="ltr">How are the doc and script so far?</p>
      <p dir="ltr">Just for completeness, I'm going to get the raw mode
        image built as well with the Configuration Header and GP Header
        prepended.  I'm thinking of also updating the script even
        further to allow the user to select whether they would want to
        format the SD card for "raw" or FAT mode.</p>
      <p dir="ltr">I'll then send another draft of the files for your
        review.</p>
      <p dir="ltr">><br>
        >> Ed,<br>
        >><br>
        >> Thank you for your suggestions.  I have taken them into
        account when<br>
        >> improving the document.<br>
        >><br>
        >> Here is the second draft of the doc:<br>
        >> <a moz-do-not-send="true"
href="https://github.com/jrcatbagan/umon/blob/dev/ports/beagleboneblack/README">https://github.com/jrcatbagan/umon/blob/dev/ports/beagleboneblack/README</a><br>
        >> .<br>
        >><br>
        >> I have also created a script that automates the process
        of setting up<br>
        >> the SD card.  It can be found here:<br>
        >> <a moz-do-not-send="true"
href="https://github.com/jrcatbagan/umon/blob/dev/ports/beagleboneblack/sd-setup.sh">https://github.com/jrcatbagan/umon/blob/dev/ports/beagleboneblack/sd-setup.sh</a><br>
        >> .<br>
        >><br>
        >> I also looked into the error regarding the situation
        where there is<br>
        >> not enough clusters and it turns out that the minimum
        size for the<br>
        >> FAT32 primary partition is around 32MB.  FAT16 on the
        other hand has a<br>
        >> minimum size of around 3MB.  I was using this document
        as reference:<br>
        >> <a moz-do-not-send="true"
          href="https://staff.washington.edu/dittrich/misc/fatgen103.pdf">https://staff.washington.edu/dittrich/misc/fatgen103.pdf</a>
        .   So I went<br>
        >> ahead and had the script create the primary partition
        as FAT16.  I was<br>
        >> able to boot uMon from an SD card that was setup with
        this script.<br>
        >><br>
        >> Please let me know what you think about the doc and
        script so far.<br>
        >><br>
        >> Thanks.<br>
        >><br>
        >> On Mon, Jul 6, 2015 at 5:10 PM, Ed Sutter <<a
          moz-do-not-send="true" href="mailto:edsutterjr@gmail.com">edsutterjr@gmail.com</a>>
        wrote:<br>
        >>><br>
        >>> Jarielle,<br>
        >>> Excellent!<br>
        >>> Couple of  comments...<br>
        >>> 1. Since you've got so much detail in there, you
        may want to include the<br>
        >>> names of<br>
        >>> the TRM chapter and sections that you reference.  I
        say this because a later<br>
        >>> revision may insert<br>
        >>> a chapter or a section and that will make the
        chapter/section numbers you<br>
        >>> have confusing.<br>
        >>> 2. For raw mode description, in the 'dd' line,
        change "of=/dev/sdc" to<br>
        >>> "of=<device>" (where <device> is the sd
        card).<br>
        >>> 3. For fat mode description, you may want to add a
        "dd if=/dev/zero<br>
        >>> of=<device> bs=1M count=1" as the first step
        just to<br>
        >>>       make sure there is no partition table at the
        base of the SD card.  If<br>
        >>> there is, then the first 'n' in your instructions<br>
        >>>       may not do what you want.  I know you mention
        that the card is assumed<br>
        >>> to not be formatted.  This just<br>
        >>>       makes sure of that.  So, I walked through
        your steps, using this to<br>
        >>> automate:<br>
        >>><br>
        >>> export SDDEV=/dev/sdc  # User should verify this
        device.<br>
        >>> sudo dd if=/dev/zero of=${SDDEV} bs=128K count=1<br>
        >>> echo "n\np\n1\n\n+1M\nt\nc\na\n1\np\nw\n" | fdisk
        ${SDDEV}<br>
        >>><br>
        >>>       But when I did the mkfs line in your text, it
        returned an error: Not<br>
        >>> enough clusters for a 32bit FAT.<br>
        >>>       So, I just did "mkfs.vfat /dev/sdc1" and that
        worked fine.  Honestly, I<br>
        >>> don't know the details here,<br>
        >>>       so if you can investigate this, that would be
        great.  Suggest adding<br>
        >>> something like the script above as<br>
        >>>       a shortcut.<br>
        >>><br>
        >>> 4. For UART boot mode, mention that the uMon image
        that is transferred is<br>
        >>> boot.bin, not the MLO.<br>
        >>><br>
        >>> Some other stuff you could add:<br>
        >>> - To know for sure what device is your uSD card in
        your linux box, run "cat<br>
        >>> /proc/partitions" before and after<br>
        >>> inserting the card and note the difference.<br>
        >>><br>
        >>> Good stuff,<br>
        >>> Ed<br>
        >>><br>
        >>> Ed,<br>
        >>><br>
        >>> I finished the first draft of the document.  It can
        be found here:<br>
        >>> <a moz-do-not-send="true"
href="https://github.com/jrcatbagan/umon/commit/7f751486d5ca3ba5f6449adf5561df527a5cfde1">https://github.com/jrcatbagan/umon/commit/7f751486d5ca3ba5f6449adf5561df527a5cfde1</a><br>
        >>> . Please feel free to give me any suggestions on
        how I can improve it<br>
        >>> or if I am missing something.  Once you give the
        green light, I'll<br>
        >>> send it to umon-devel as a patch.<br>
        >>><br>
        >>> Thanks.<br>
        >>><br>
        >>> On Mon, Jul 6, 2015 at 5:21 AM, Ed Sutter <<a
          moz-do-not-send="true"
          href="mailto:ed.sutter@alcatel-lucent.com">ed.sutter@alcatel-lucent.com</a>><br>
        >>> wrote:<br>
        >>><br>
        >>> On 7/5/2015 6:46 PM, Chris Johns wrote:<br>
        >>><br>
        >>> On 5/07/2015 4:19 am, Ed Sutter wrote:<br>
        >>><br>
        >>> Ok, I managed to get it to boot using only Linux
        for formatting the card.<br>
        >>> It wasn't working for me until I just read your
        email and realized I did<br>
        >>> not mark<br>
        >>> the partition active.  After doing that it booted!<br>
        >>> So here are the steps I walked through<br>
        >>> (extracted from: <a moz-do-not-send="true"
          href="http://forum.xda-developers.com/showthread.php?t=502095">http://forum.xda-developers.com/showthread.php?t=502095</a>)<br>
        >>> :<br>
        >>><br>
        >>> 1. Verify the partition that the SD card installs
        as:<br>
        >>>        - cat /proc/paritions (without the uSD)<br>
        >>>        - Insert uSD card<br>
        >>>        - cat /proc/paritions (note the difference)<br>
        >>> Using /dev/sdc as our partition:<br>
        >>> 2. sudo fdisk /dev/sdc<br>
        >>>       - delete all paritions with 'd' command
        (d1/d2/d3/d4) as needed<br>
        >>>       - use 'n' command to create partition 1<br>
        >>>       - use 't' command to relabel partition 1 to
        'c'<br>
        >>>       - use 'a' command to make the parition active<br>
        >>>       - use 'p' to show something like:<br>
        >>><br>
        >>>      Device Boot      Start         End     
        Blocks   Id  System<br>
        >>> /dev/sdc1   *        2048     3932159     1965056 
          c  W95 FAT32 (LBA)<br>
        >>><br>
        >>>        - use 'w' to write to the card<br>
        >>><br>
        >>> 3. Run sudo mkfs.vfat /dev/sdc1<br>
        >>> 4. Mount /dev/sdc1 as /media/boot (or whatever)<br>
        >>> 5. Copy MLO to /media/boot<br>
        >>> 6. Run sync; unmount /media/boot<br>
        >>> 7. Put card in BBB, reset with boot button
        depressed.<br>
        >>><br>
        >>> A simple request to place in the doco early is to
        create a root<br>
        >>> partition only as large as you need and not use
        whole disk size in the<br>
        >>> root partition. Users should be encouraged to add
        other partitions they<br>
        >>> can mount as read/write to store a kernel and/or
        user data.<br>
        >>><br>
        >>> Chris<br>
        >>> _______________________________________________<br>
        >>><br>
        >>> Yep, for sure... my example above was lame...<br>
        >>> Functionally ok, but not considering the fact that
        the SD card will have<br>
        >>> other "stuff".  Also, Chris, IIRC, you mentioned
        that FAT-booting may not be<br>
        >>> the right way to go ultimately.  So, for now at
        least, it will be good to<br>
        >>> cover<br>
        >>> both modes of booting until we get a better grip on
        which approach to<br>
        >>> take.<br>
        >>> Jarielle, I can add detail on raw mode to whatever
        you initially write up<br>
        >>> if you want me to...<br>
        >>> Ed<br>
        >>><br>
        >>> _______________________________________________<br>
        >>> umon-devel mailing list<br>
        >>> <a moz-do-not-send="true"
          href="mailto:umon-devel@rtems.org">umon-devel@rtems.org</a><br>
        >>> <a moz-do-not-send="true"
          href="http://lists.rtems.org/mailman/listinfo/umon-devel">http://lists.rtems.org/mailman/listinfo/umon-devel</a><br>
        >>><br>
        >>> _______________________________________________<br>
        >>> umon-devel mailing list<br>
        >>> <a moz-do-not-send="true"
          href="mailto:umon-devel@rtems.org">umon-devel@rtems.org</a><br>
        >>> <a moz-do-not-send="true"
          href="http://lists.rtems.org/mailman/listinfo/umon-devel">http://lists.rtems.org/mailman/listinfo/umon-devel</a><br>
        >>><br>
        >>><br>
        >>><br>
        >>> _______________________________________________<br>
        >>> umon-devel mailing list<br>
        >>> <a moz-do-not-send="true"
          href="mailto:umon-devel@rtems.org">umon-devel@rtems.org</a><br>
        >>> <a moz-do-not-send="true"
          href="http://lists.rtems.org/mailman/listinfo/umon-devel">http://lists.rtems.org/mailman/listinfo/umon-devel</a><br>
        >><br>
        >> _______________________________________________<br>
        >> umon-devel mailing list<br>
        >> <a moz-do-not-send="true"
          href="mailto:umon-devel@rtems.org">umon-devel@rtems.org</a><br>
        >> <a moz-do-not-send="true"
          href="http://lists.rtems.org/mailman/listinfo/umon-devel">http://lists.rtems.org/mailman/listinfo/umon-devel</a><br>
        ><br>
        ><br>
        > _______________________________________________<br>
        > umon-devel mailing list<br>
        > <a moz-do-not-send="true"
          href="mailto:umon-devel@rtems.org">umon-devel@rtems.org</a><br>
        > <a moz-do-not-send="true"
          href="http://lists.rtems.org/mailman/listinfo/umon-devel">http://lists.rtems.org/mailman/listinfo/umon-devel</a><br>
      </p>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
umon-devel mailing list
<a class="moz-txt-link-abbreviated" href="mailto:umon-devel@rtems.org">umon-devel@rtems.org</a>
<a class="moz-txt-link-freetext" href="http://lists.rtems.org/mailman/listinfo/umon-devel">http://lists.rtems.org/mailman/listinfo/umon-devel</a></pre>
    </blockquote>
    <br>
  </body>
</html>