This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

mkmmc-android.sh invoking error to prerare SD card

Other Parts Discussed in Thread: OMAP3530

Hi,

I'm trying to prepare SD card in order to boot Android Froyo (2.2) on OMAP3530 EVM (TMDSEVM3530), but an error comes out when invoking mkmmc-android.sh.

The error means: Disk "/dev/sdc" doesn't include valid partition table. <== Just after "[Partitioning  /dev/sdc...]"

What do I have to do to extract the files successfully to SD card? As long as I read some documents such as README.txt in Prebuilt_Images/OMAP35x directory and DevKit-V2 UserGuide, I didn't find what I should do to work around this problem.

I'm using Ubuntu 10.10 on host Linux PC, USB SD Card reader and 2GBytes SD card.

  • Sho,

    Did the script run to completion? Did you try booting the board with the SD card?

    I believe that error is really just a warning and a bootable SD card is created even if you see that warning message. Make sure you run the script as root (i.e. use sudo)

    Regards,

    Carlos.

     

  • Hi Carlos,

    I confirmed again if the script runs to completion, and it seems not successful. And there seems to be no files created by running the script in the SD card. (<== I tried to open the SD card after running the script on Windows PC, but the PC says "This device is not formatted.")

    The log output from command prompt is shown below.

     --------------------

    ~/Prebuilt_Images/OMAP35X$ sudo ./mkmmc-android.sh /dev/sdb
    Assuming Default Locations for Prebuilt Images
    All data on /dev/sdb now will be destroyed! Continue? [y/n]
    y
    [Unmounting all existing partitions on the device ]
    [Partitioning /dev/sdb...]
    ディスク /dev/sdb は正常なパーティションテーブルを含んでいません <=== [ Disk  /dev/sdb doesn't include valid partition table. ]
    DISK SIZE - bytes
    (standard_in) 1: syntax error
    CYLINDERS -
    expr: 文法エラー  <=== [ syntax error ]
    [Making filesystems...]
    [Copying files...]
    mount: スペシャルデバイス /dev/sdb1 が存在しません <=== [ Special device  /dev/sdb1 doesn't exist. ]
    umount: /dev/sdb1: 見つかりません
    mount: スペシャルデバイス /dev/sdb2 が存在しません <=== [ Special device  /dev/sdb2 doesn't exist. ]
    umount: /dev/sdb2: 見つかりません
    [Copying all clips to data partition]
    mount: スペシャルデバイス /dev/sdb3 が存在しません <=== [ Special device  /dev/sdb3 doesn't exist. ]
    umount: /dev/sdb3: 見つかりません <=== [ /dev/sdb3 cannot be found. ]
    [Done]

     --------------------

    And please let me confirm one more thing: In order to boot from SD card on target device, does a bootloader have to be "u-boot"? Until several days ago, I was testing Windows Embedded CE 6.0 on the target board, so now the bootloader is "e-boot". If the bootloader should be u-boot, how can I write it over e-boot? According to the documents, I guess the flow consists of:

    1. Download "u-boot.bin" to the target board by using "DownloadUtility.exe" utility (for Windows)

    2. Flash "u-boot.bin" to the Micron NAND by executing the following command:

    OMAP3EVM# mw.b 0x80000000 0xFF 0x100000
    OMAP3EVM# tftp 0x80000000 u-boot.bin
    OMAP3EVM# nand unlock
    OMAP3EVM# nand erase 0x80000 0x1C0000
    OMAP3EVM# nandecc sw
    OMAP3EVM# nand write.i 0x80000000 0x80000 0x1C0000
    OMAP3EVM# nand lock

    Actually I would like to download and flash u-boot.bin to the target board only by using Linux PC. Are there any way?

  • Hi Carlos,

    I succeeded to boot Android from SD Card on the target device by manually partitioning SD into three areas ("boot", "rootfs" and "data"), formatting each area, and copying data from Host Linux PC.

    Thank you for your reply.

     Sho

  • Hi,

    Can you show me the process you use to set of the sd card?

    Thanks,

    Lou

  • Hi Lou,

    The process is very simple.

    1) type ls /dev/sd* on your Ubuntu PC and check sd devices avaible

    2) Insert a USB SD card reader with a SD card into your Ubuntu PC.

    3) type ls /dev/sd* again and figure out the name of the new node associated with the sd card (i.e. /dev/sdb)

    4) from the directory where you downloaded the software, run the following command:

    sudo ./mkmmc-android <dev node obained on step 3> For example:
    sudo ./mkmmc-android /dev/sdb

    For more detailed instructions, you can refer to http://processors.wiki.ti.com/index.php?title=TI-Android-FroYo-DevKit-V2.2_UserGuide#Out_of_the_Box_Demo

    Regards,
    Carlos.

     

  • Hi Carlos,

    I have downloaded the TI_Android_Eclair_DevKit-V1 and have run the mkmmc-android.sh too which requires more args then you mentioned in you response.

    I execute is follows.

    mkmmc-android.sh   /dev/sdd1 beagleboard/MLO beagleboard/u-boot.bin beagleboard/uImage beagleboard/boot.scr  /home/tw2/lab1/android/TI_Android_Eclair_DevKit-V1/Filesystem/rootfs_am37x.tar.bz2

    and get the following respons.It complains about the disk being in use when it has been unmoundeted, cant build the file systems and generally does not work.

    I would be thankful forany help,

    Lou

     DevKit-V1/Filesystem/rootfs_am37x.tar.bz2
    All data on /dev/sdd1 now will be destroyed! Continue? [y/n]
    y
    [Unmounting all existing partitions on the device ]
    [Partitioning /dev/sdd1...]
    1024+0 records in
    1024+0 records out
    Disk /dev/sdd1 doesn't contain a valid partition table
    DISK SIZE - 3965133312 bytes
    CYLINDERS - 482
    Checking that no-one is using this disk right now ...
    BLKRRPART: Invalid argument

    This disk is currently in use - repartitioning is probably a bad idea.
    Umount all file systems, and swapoff all swap partitions on this disk.
    Use the --no-reread flag to suppress this check.
    Use the --force flag to overrule all checks.
    [Making filesystems...]
    [Copying files...]
    mount: special device /dev/sdd11 does not exist
    umount: /dev/sdd11: not found
    mount: special device /dev/sdd12 does not exist
    umount: /dev/sdd12: not found
    [Done]
    [root@tw4 format]#

     

  • Lou,

    Can you try with another SD card?

    Thanks,

    Carlos.

  • Hi Carlos,

    downlaoad beagleboardxm.tar.gz.

    Problem resolved.

    Thanks,

    Lou

  • Here's my experience with Android on BeagleBoard.  I used the beagleboard-xm specific build.

    1. Preparation of the SD card - The SD card needs to be unmounted and using the disk utility format to ext4.  When the script fails, it is best to delete all the partitions and start all over.

    2. When the SD card is inserted, the device appears as /dev/mmcblk0.   When partitioned to three areas, Ubuntu gives the following names;  /dev/mmcblk0p1, /dev/mmcblk0p2, and /dev/mmcblk0p3.  However, the script contains ($1)1, ($1)2, and ($1)3.  These references need to be changed to ($1)p1, ($1)p2, and ($1)p3.

    3. The script has some timing issues.  It does not complete all the way by itself.  Understanding what needs to be done, and typing it manually works.  The data partition does not complete, and it takes a while to copy the data.  So, recommend doing these steps manually following the same script.  To get this script running automatically, sleep() statements might be useful.

    4.  After all that work, it takes more than an hour for android to come up, and it still has many errors.  Wasn't really useful.

     

  • Hi Narada Fernando,

    Could you please tell us which version of the android devkit are you using?

    Regards,

    Carlos.

     

  • I downloaded the

    beagleboard-xm.tar.gz  package.

    The link is available on this page listed under Pre-built images for beagleboard xm.  There is no version numbers in the README, or script files, but I assume it is from Android-DevKit-02.00.00

    http://software-dl.ti.com/dsps/dsps_public_sw/sdo_tii/TI_Android_DevKit/02_00_00/index_FDS.html

    Pre-built Images

    BeagleBoard XM

    Narada

  • Narada Fernando,

    You may want to try with a different SD card. We have seen cases where the script doesn't work right due to a corrupted SD card.

    By the way, we release a newer version 2.2 of the Devkit recently. It is available at

    http://software-dl.ti.com/dsps/dsps_public_sw/sdo_tii/TI_Android_DevKit/02_02_00/index_FDS.html

    Regards,

    Carlos.

     

     

  • I tried the version 2.2.  The device for the SD card shows as /dev/mmcblk0, which was my argument for the script.  Ubuntu creates the partitions as p1, p2, and p3, so I changed the script with ($1)p1, ($1)p2, and($1)p3.  The script completed without errors.

    The rest was not that commendable though. 

    The system takes a long time and boots up with android screens (Left it on and went to my paying job). (When returned) Keyboard,  Mouse, and HD Monitor, and the RS232 terminal works.

    From the Home Menu,

    Clock - OK

    Almost all the other applications give the following Warning Window.

                                                               Sorry, Activity Setup xxxx(Application Name) is not responding with options (Force Close), (Wait)

    Ethernet - Not Working.

    Anybody has any luck with faster execution or running the applications?

    Narada

     

  • Hi Narada,

    Did you try with different SD card?

    We observed the cases where the android booting and device response is very slow with some SD cards.

    Best Regards,

    Pankaj Bharadiya.

  • Hello!

    I'm working on Ubuntu 11.10. I'm not expert about this, but i discovery a wrong in mkmmc-android.sh:

    You will have to change this line:

    SIZE=`fdisk -l $DRIVE | grep Disk | awk '{print $5}'`

    by:

    SIZE=`fdisk -l $DRIVE | grep $DRIVE | awk '{print $5}'`

    For me it was OK on BeagleBoard xM