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.

Problems preparing SD card to boot android on beagle board XM

Hi,

I have been trying to prepare an sd card using mkmmc-andriod.sh. I used the following on the command line.

mkmmc-andriod.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

I get the follwing errors. Any help would be appreciated.

Thanks,

Lou

[root@tw4 format]# mkmmc-andriod.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
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]#

 

 

  • Hi,

    You appear to be pointing mkmmc-android to a partition(sdd1) rather than the sdcard device (sdd). The script partitions the card and then copies the data.

    Try this:

    mkmmc-andriod.sh /dev/sdd 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

     

    HTH,

    Vishveshwar

  • Hi,

    I have checked the name of the card. I have seen it’s device name as /dev/sdd and /dev/sdd1. I have tried the script both ways.

    Is the version of Linux and issue?

    Using Red hat 2.6.9-89.29 64 bit.

    Am I using the correct file system, rootfs_am37x.tar.bz2 for the beagleboard XM ? The processor is DM3730CBP.

    Had some here at work try to format the sd card manually using fdisk with the following steps. This created the two partitions and put the files on each partition but the system would not boot?

    Thanks,

    Lou

    Umount

    dd if=/dev/zero of=/dev/sdd bs=1024 count=1024

     

    Command (m for help): ?

    ?: unknown command

    Command action

       a   toggle a bootable flag

       b   edit bsd disklabel

       c   toggle the dos compatibility flag

       d   delete a partition

       l   list known partition types

       m   print this menu

       n   add a new partition

       o   create a new empty DOS partition table

       p   print the partition table

       q   quit without saving changes

       s   create a new empty Sun disklabel

       t   change a partition's system id

       u   change display/entry units

       v   verify the partition table

       w   write table to disk and exit

       x   extra functionality (experts only)

     

    Command (m for help): m

    Command action

       a   toggle a bootable flag

       b   edit bsd disklabel

       c   toggle the dos compatibility flag

       d   delete a partition

       l   list known partition types

       m   print this menu

       n   add a new partition

       o   create a new empty DOS partition table

       p   print the partition table

       q   quit without saving changes

       s   create a new empty Sun disklabel

       t   change a partition's system id

       u   change display/entry units

       v   verify the partition table

       w   write table to disk and exit

       x   extra functionality (experts only)

     

    Command (m for help): n

    Command action

       e   extended

       p   primary partition (1-4)

    p

    Partition number (1-4): 1

    First cylinder (1-1023, default 1):   

    Using default value 1

    Last cylinder or +size or +sizeM or +sizeK (1-1023, default 1023): 100  

     

    Command (m for help): n

    Command action

       e   extended

       p   primary partition (1-4)

    p

    Partition number (1-4): 2

    First cylinder (101-1023, default 101):

    Using default value 101

    Last cylinder or +size or +sizeM or +sizeK (101-1023, default 1023):

    Using default value 1023

     

    Command (m for help): p

     

    Disk /dev/sdd: 3965 MB, 3965190144 bytes

    122 heads, 62 sectors/track, 1023 cylinders Units = cylinders of 7564 * 512 =

    3872768 bytes

     

       Device Boot      Start         End      Blocks   Id  System

    /dev/sdd1               1         100      378169   83  Linux

    /dev/sdd2             101        1023     3490786   83  Linux

     

    Command (m for help): m

    Command action

       a   toggle a bootable flag

       b   edit bsd disklabel

       c   toggle the dos compatibility flag

       d   delete a partition

       l   list known partition types

       m   print this menu

       n   add a new partition

       o   create a new empty DOS partition table

       p   print the partition table

       q   quit without saving changes

       s   create a new empty Sun disklabel

       t   change a partition's system id

       u   change display/entry units

       v   verify the partition table

       w   write table to disk and exit

       x   extra functionality (experts only)

     

    Command (m for help): w

    The partition table has been altered!

     

    Calling ioctl() to re-read partition table.

    Syncing disks.

    [root@tw4 /]#

     

     

    =============

    [root@tw4 /]# mkfs.vfat -F 32 -n boot /dev/sdd1 mkfs.vfat 2.8 (28 Feb 2001)

    [root@tw4 /]# mkfs.ext3 -L rootfs /dev/sdd2 mke2fs 1.35 (28-Feb-2004)

    Filesystem label=rootfs OS type: Linux Block size=4096 (log=2) Fragment

    size=4096 (log=2)

    437184 inodes, 872696 blocks

    43634 blocks (5.00%) reserved for the super user First data block=0 Maximum

    filesystem blocks=897581056

    27 block groups

    32768 blocks per group, 32768 fragments per group

    16192 inodes per group

    Superblock backups stored on blocks:

            32768, 98304, 163840, 229376, 294912, 819200

     

    Writing inode tables: done                          

    Creating journal (8192 blocks): done

    Writing superblocks and filesystem accounting information: done

     

    This filesystem will be automatically checked every 24 mounts or 180 days,

    whichever comes first.  Use tune2fs -c or -i to override.

    mount /dev/sdd1 /mnt

    cp beagleboard/MLO /mnt/MLO

    cp beagleboard/u-boot.bin /mnt/u-boot.bin

    cp beagleboard/uImage /mnt/uImage

    cp beagleboard/boot.scr /mnt/boot.scr

    umount /dev/sdd1 /mnt

     

    mount /dev/sdd2 /mnt

    tar jxvf  /home/tw2/lab1/android/TI_Android_Eclair_DevKit-V1/Filesystem/rootfs_am37x.tar.bz2 -C /mnt &> /dev/null

    chmod 755 /mnt

    umount /dev/sdd2 /mnt

     

  • Hi,

    I have checked the name of the card. I have seen it’s device name as /dev/sdd and /dev/sdd1. I have tried the script both ways.

    Is the version of Linux and issue?

    Using Red hat 2.6.9-89.29 64 bit.

    Am I using the correct file system, rootfs_am37x.tar.bz2 for the beagleboard XM ? The processor is DM3730CBP.

    Had some here at work try to format the sd card manually using fdisk with the following steps. This created the two partitions and put the files on each partition but the system would not boot?

    Thanks,

    Lou

    Umount

    dd if=/dev/zero of=/dev/sdd bs=1024 count=1024

     

    Command (m for help): ?

    ?: unknown command

    Command action

       a   toggle a bootable flag

       b   edit bsd disklabel

       c   toggle the dos compatibility flag

       d   delete a partition

       l   list known partition types

       m   print this menu

       n   add a new partition

       o   create a new empty DOS partition table

       p   print the partition table

       q   quit without saving changes

       s   create a new empty Sun disklabel

       t   change a partition's system id

       u   change display/entry units

       v   verify the partition table

       w   write table to disk and exit

       x   extra functionality (experts only)

     

    Command (m for help): m

    Command action

       a   toggle a bootable flag

       b   edit bsd disklabel

       c   toggle the dos compatibility flag

       d   delete a partition

       l   list known partition types

       m   print this menu

       n   add a new partition

       o   create a new empty DOS partition table

       p   print the partition table

       q   quit without saving changes

       s   create a new empty Sun disklabel

       t   change a partition's system id

       u   change display/entry units

       v   verify the partition table

       w   write table to disk and exit

       x   extra functionality (experts only)

     

    Command (m for help): n

    Command action

       e   extended

       p   primary partition (1-4)

    p

    Partition number (1-4): 1

    First cylinder (1-1023, default 1):   

    Using default value 1

    Last cylinder or +size or +sizeM or +sizeK (1-1023, default 1023): 100  

     

    Command (m for help): n

    Command action

       e   extended

       p   primary partition (1-4)

    p

    Partition number (1-4): 2

    First cylinder (101-1023, default 101):

    Using default value 101

    Last cylinder or +size or +sizeM or +sizeK (101-1023, default 1023):

    Using default value 1023

     

    Command (m for help): p

     

    Disk /dev/sdd: 3965 MB, 3965190144 bytes

    122 heads, 62 sectors/track, 1023 cylinders Units = cylinders of 7564 * 512 =

    3872768 bytes

     

       Device Boot      Start         End      Blocks   Id  System

    /dev/sdd1               1         100      378169   83  Linux

    /dev/sdd2             101        1023     3490786   83  Linux

     

    Command (m for help): m

    Command action

       a   toggle a bootable flag

       b   edit bsd disklabel

       c   toggle the dos compatibility flag

       d   delete a partition

       l   list known partition types

       m   print this menu

       n   add a new partition

       o   create a new empty DOS partition table

       p   print the partition table

       q   quit without saving changes

       s   create a new empty Sun disklabel

       t   change a partition's system id

       u   change display/entry units

       v   verify the partition table

       w   write table to disk and exit

       x   extra functionality (experts only)

     

    Command (m for help): w

    The partition table has been altered!

     

    Calling ioctl() to re-read partition table.

    Syncing disks.

    [root@tw4 /]#

     

     

    =============

    [root@tw4 /]# mkfs.vfat -F 32 -n boot /dev/sdd1 mkfs.vfat 2.8 (28 Feb 2001)

    [root@tw4 /]# mkfs.ext3 -L rootfs /dev/sdd2 mke2fs 1.35 (28-Feb-2004)

    Filesystem label=rootfs OS type: Linux Block size=4096 (log=2) Fragment

    size=4096 (log=2)

    437184 inodes, 872696 blocks

    43634 blocks (5.00%) reserved for the super user First data block=0 Maximum

    filesystem blocks=897581056

    27 block groups

    32768 blocks per group, 32768 fragments per group

    16192 inodes per group

    Superblock backups stored on blocks:

            32768, 98304, 163840, 229376, 294912, 819200

     

    Writing inode tables: done                          

    Creating journal (8192 blocks): done

    Writing superblocks and filesystem accounting information: done

     

    This filesystem will be automatically checked every 24 mounts or 180 days,

    whichever comes first.  Use tune2fs -c or -i to override.

    mount /dev/sdd1 /mnt

    cp beagleboard/MLO /mnt/MLO

    cp beagleboard/u-boot.bin /mnt/u-boot.bin

    cp beagleboard/uImage /mnt/uImage

    cp beagleboard/boot.scr /mnt/boot.scr

    umount /dev/sdd1 /mnt

     

    mount /dev/sdd2 /mnt

    tar jxvf  /home/tw2/lab1/android/TI_Android_Eclair_DevKit-V1/Filesystem/rootfs_am37x.tar.bz2 -C /mnt &> /dev/null

    chmod 755 /mnt

    umount /dev/sdd2 /mnt

     

  • You have replied in another thread that the problem is solved.

    http://e2e.ti.com/support/embedded/f/509/t/72783.aspx

     

    If that is indeed the case, please close this thread.