Search

Technical Discussion Group Forum

This forum is provided for user discussion. While Beacon EmbeddedWorks support staff and engineers participate, Beacon EmbeddedWorks does not guarantee the accuracy of all information within in the Technical Discussion Group (TDG).

The "Articles" forums provide brief Articles written by Beacon EmbeddedWorks engineers that address the most frequently asked technical questions.

To receive email notifications when updates are posted for a Beacon EmbeddedWorks product download, please subscribe to the TDG Forum of interest.

TDG Forum

PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 30 May 2014 01:04 PM by  bradb
Build a rootfs to reside in SD Card
 3 Replies
Sort:
You are not authorized to post a reply.
Author Messages
JS232
New Member
New Member
Posts:9


--
22 Apr 2014 06:24 AM
    How does one boot the AM3703 Torpedo from SD Card with the filesystem residing on the SD Card (and not copied to RAM nor residing on the NAND).

    1) How do I configure ltib to build this SD Card rootfs and kernel image?

    2) How do I partition and format the SD card to contain both bootloaders, kernel and rootfs. I assume that a FAT32 file system is required as the first partition for the bootloaders and kernel image and a second EXT3 partition for the rootfs. Is there a step-by-step guide explaining this?

    Thank you
    bradb
    Basic Member
    Basic Member
    Posts:203


    --
    22 Apr 2014 04:49 PM
    Here are the steps for using the script recently created to work with the DM37x Linux BSP release.

    1. Place the script into the LTIB root directory (i.e. REL-ltib-DM3730-x.x-x)
    2. Give yourself permission to run the script ($ chmod 777 create_sdcard.sh)
    3. Insert a SD Card into your Linux Host PC
    4. Run the script ($ ./create_sdcard.sh)
    5. After the script has completed, remove the SD Card and insert it into your DM37x SOM system
    6. Boot the system and press a key to pause at the u-boot prompt
    7. Update the following u-boot variables: 

    OMAP Logic # nand erase.chip 
    OMAP Logic # env default -f
    OMAP Logic # setenv rootfs_location /dev 
    OMAP Logic # setenv rootfs_type ext3 
    OMAP Logic # setenv rootfs_device /dev/mmcblk0p2 
    OMAP Logic # saveenv 
    OMAP Logic # reset 
    8. Verify your system rootfs is running from /dev/mmcblk0p2
    DM-37x# df 

    Filesystem 1K-blocks Used Available Use% Mounted on 

    /dev/root 3565952 243348 3141460 7% / 

    tmpfs 120400 52 120348 0% /dev 

    /dev/mmcblk0p2 3565952 243348 3141460 7% /mnt/mmcblk0p2 

    /dev/mmcblk0p1 307016 4384 302632 1% /mnt/mmcblk0p1 

    shm 120400 0 120400 0% /dev/shm rwfs 512 0 512 0% /mnt/rwfs 

    DM-37x# cat /proc/cmdline 

    nand-ecc=chip console=ttyO0,115200n8 display=28 ignore_loglevel early_printk no_console_suspend mtdparts=omap2-nand.0:512k(x-loader),1664k(u-boot),384k(u-boot-env),5m(kernel),20m(ramdisk),-(fs) root=/dev/mmcblk0p2 rw rootfstype=ext3 rootwait DM-37x# 

    Expected output when creating the SD Card.
    logic@logic-VirtualBox:~/logic/Logic_BSPs/Linux_3.0/REL-ltib-DM3730-2.4-2$ ./create_sdcard.shDevices available:

     sdb is 3.7GB - Card Reader 
    Enter device: sdb 
    Setting up sdb 

    Do you wish to continue? (y/N) y 
    Partitioning sdb. 
    [sudo] password for logic: 
    mke2fs 1.42 (29-Nov-2011) 
    Mounting bootloader partition 
    Mounting root partition 
    Flushing data to SD card 
    Unmounting bootloader partition 
    Unmounting root partition 
    logic@logic-VirtualBox:~/logic/Logic_BSPs/Linux_3.0/REL-ltib-DM3730-2.4-2$ 

     

    You can download the create_sdcard.sh script from the link below.

    create_sdcard.zip

     



    JS232
    New Member
    New Member
    Posts:9


    --
    30 May 2014 06:15 AM
    In step 7, you need to add
    OMAP Logic # setenv kernel_location mmc
    bradb
    Basic Member
    Basic Member
    Posts:203


    --
    30 May 2014 01:04 PM
    The instructions provided assumed the default u-boot variables were being used.
    To be clearer I have added 'env default -f' just after 'nand erase.chip' to set the default values. This will also set 'kernel_location=mmc'.

    OMAP Logic # nand erase.chip
    OMAP Logic # env default -f
    OMAP Logic # setenv rootfs_location /dev
    OMAP Logic # setenv rootfs_type ext3
    OMAP Logic # setenv rootfs_device /dev/mmcblk0p2
    OMAP Logic # saveenv
    OMAP Logic # reset
    You are not authorized to post a reply.