Go to previous topic
Go to next topic
Last Post 04 May 2012 03:36 PM by  glennj@logicpd.com
Article: L138 -- How to Create SD Card as Removable Media
 0 Replies
Author Messages
glennj@logicpd.com
New Member
New Member
Posts:


--
04 May 2012 03:36 PM
    Q: Can the SD Card be used as removable media?

    A:
    Creating the removable media
    The examples below assume a 2GB media mapped in Linux as /dev/sda

    Make sure the media being modified is the correct one! If used without care, Parted can inadvertedly erase the contents of your Hard Disk!

    To be sure the correct disk will be modified, use the option print of parted to show the device information:

    sudo /sbin/parted /dev/sda print

    Take note of the number of partitions in the column Number and the maximum size of the removable media shown in Disk /dev/sda:.

    Remove all the existing partitions: (the example below shows the removal of two)

    sudo /sbin/parted /dev/sda rm 1
    sudo /sbin/parted /dev/sda rm 2

    Note: It might be needed to unmount the partitions that will be removed.

    MMC/SD card procedure

    For the MMC/SD card, only one ext2 partition is needed:

    sudo /sbin/parted /dev/sda mkpartfs primary ext2 0 2048M

    If the Linux distribution has an automount feature, after running this command additional icons in your desktop and (maybe) file browser screens should appear in the screen. If it does not have the automount feature, the partition(s) must be mounted manually in a previously created directory (the example below assumes disk).

    mount -t ext2 /dev/sda1 /media/disk

    Now copy the target filesystem to the ext2 partition. Assuming that the target filesystem is at /home/<useracct>/workdir/filesys:

    sudo cp -Rf /home/<useracct>/workdir/filesys /media/disk

    All modules should be properly copied onto the target filesystem.

    DaVinci GIT based SDK

    --If using the default Linux kernel provided with the installation:

    sudo cp -Rf <sdk_install_dir>/images/kernel/omapl1x(7/8)/modules/* /media/disk-1

    --Or if using a compiled Linux kernel, the modules can be installed directly to the target filesystem.

    make modules modules_install INSTALL_MOD_PATH=/media/disk-1 ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi-


    PRODUCTS Included:
    OMAP-L138, AM1808, C6748


    ---