bc10

Create bootable SD card

Extract the downloaded file, bc10-boot-sd-image--release20101001.tar.gz, bc10-boot-sd-image--release20101013.tar.gz, there are
two archives inside the directory.

fat32.tar.gz
ext3.tar.gz

These files, fat32.tar.gz and ext3.tar.gz, are written into the FAT32 partition and EXT3 partition of the SD card, respectively.
This section explains the instructions of how to place these files into the SD card.

Unmount SD card

To partition and format the SD card, the SD card is unmounted if it is mounted.
Assume that a SD card is mounted in the way defined below.

$ [df -h]
Filesystem            Size  Used Avail Use% Mounted on
...
/dev/sdc1             400M   94M  307M  24% /media/disk
...

Unmount the SD card

$ [umount /media/disk]

Initialize and configure partitions

Execute fdisk command. The device file of the SD card is used for the parameter of the command. The location of SD card differ
and it depends on the working environment. Please check up the directories before start working on this process.

$ [sudo fdisk /dev/sdc]
Command (m for help): [p]

Disk /dev/sdc: 2021 MB, 2021654528 bytes
255 heads, 63 sectors/track, 245 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1   *           1         246     1974240+   c  W95 FAT32 (LBA)
Partition 1 has different physical/logical endings:
     phys=(244, 254, 63) logical=(245, 200, 19)

Write down the number of bytes on the SD card. The number will use later. (In this example 2021654528)
Remove all existing partitions in the SD card.

Command (m for help): [d]
Selected partition 1

Shift the mode to the expert mode.

Command (m for help): [x]

The number of headers is selected as 255.

Expert Command (m for help): [h]
Number of heads (1-256, default xxx): [255]

The number of sectors is chosen as 63.

Expert Command (m for help): [s]
Number of sectors (1-63, default xxx): [63]

The cylinder number is depending on SD cards, By the figure shown below, calculate the number of cylinders.
(Round toward zero below (omit dismals))

#cylinders = FLOOR (the number of Bytes on the SD Card (from above) / #heads / #sectors / 512 )  

For this example SD card, the number of cylinders is defined as below.

2021654528 / 255 / 63 / 512 = 245.79
-> 245

Enter the number of cylinders. In this example, the number is 245.

Expert Command (m for help): [c]
Number of cylinders (1-256, default xxx): 

Turn to the normal mode.

Expert Command (m for help): [r]

Create FAT32 partition.

Command (m for help): [n]
Command action
   e   extended
   p   primary partition (1-4)
[p]
Partition number (1-4): [1]
First cylinder (1-245, default 1): [(press Enter)]
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-245, default 245): [+50]

Command (m for help): [t]
Selected partition 1
Hex code (type L to list codes): [c]
Changed system type of partition 1 to c (W95 FAT32 (LBA))

Configure boot flag.

Command (m for help): [a]
Partition number (1-4): [1]

Create EXT3 partition.

Command (m for help): [n]
Command action
   e   extended
   p   primary partition (1-4)
[p]
Partition number (1-4): [2]
First cylinder (52-245, default 52): [(press Enter)]
Using default value 52
Last cylinder or +size or +sizeM or +sizeK (52-245, default 245): [(press Enter)]
Using default value 245

Check the configuration of partition.

Command (m for help): [p]

Disk /dev/sdc: 2021 MB, 2021654528 bytes
255 heads, 63 sectors/track, 245 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1   *           1          51      409626    c  W95 FAT32 (LBA)
/dev/sdc2              52         245     1558305   83  Linux

Save the changes in the partition table.

Command (m for help): [w]
The partition table has been altered!

Calling ioctl() to re-read partition table.

WARNING: Re-reading the partition table failed with error 16: Device or resource busy.
The kernel still uses the old table.
The new table will be used at the next reboot.

WARNING: If you have created or modified any DOS 6.x
partitions, please see the fdisk manual page for additional
information.
Syncing disks.

Format file system

Format FAT32 and EXT3 partitions. In the process of formatting, the name of partition is asked. Please enter the names of these
partitions, and the names will be used for the levels of the partitions.

$ [sudo mkfs.msdos -F 32 /dev/sdc1 -n FAT32]
mkfs.msdos 2.11 (12 Mar 2005)

$ [sudo mkfs.ext3 -L EXT3 /dev/sdc2]
mke2fs 1.40-WIP (14-Nov-2006)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
195072 inodes, 389576 blocks
19478 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=402653184
12 block groups
32768 blocks per group, 32768 fragments per group
16256 inodes per group
Superblock backups stored on blocks: 
        32768, 98304, 163840, 229376, 294912

Writing inode tables: done                            
Creating journal (8192 blocks): done
Writing superblocks and filesystem accounting information: 

Place files

These image files are placed into the SD card. Gently pushing the SD card, Mount the SD card again. The mount point of
SD card may differ, depending on system. Change the mounting point which is suitable to your system most.

Place FAT32 partition

There are strict rules for placing files on FAT32 partition. Extract the archive and put the files in the working directory,
temporarily.

$ [tar xvfz fat32.tar.gz]

Extract the archive, and these files are included.

$ ls fat32
MLO  boot.scr  u-boot.bin  uImage

MOL is the first bootloader, X-Loader, and there are rules for placing MOL. Please follow these rules listed below.

  • MOL is first file to be placed right after the formatting process of FAT32 is completed.
  • Put the file on the top directly.
$ [cp MLO /media/FAT32/]

Other files do not have any rules and restrictions as being placed on the SD card. Copy the files to the SD card.

$ [cp u-boot.bin boot.scr uImage /media/FAT32/]

If mistake to the order of placing file or the work order, restart from the FAT32 partition format for sure.

Put files on EXT 3partition.

There are no rules and/or restrictions on writing files into ext3. Extract the archive directly inside SD card.

$ [sudo tar xvfz ext3.tar.gz -C /media/EXT3]

This is the end of placing pre-build image on the SD card.
Execute sync, then unmount the SD card.

$ [sudo sync]
$ [umount /media/EXT3]
$ [umount /media/FAT32]

Boot from SD card.

Insert the SD card, in which the image files have already been placed, and turn on the power supply. At the first boot,
Android takes extra time to create the DB for configuring SQLite3 and Dalvik EXecutable (.dex) file and writes in some
information. The initial boot takes longer than usual.

Revision History

  • 2010/10/08 The article is initially uploaded.
  • 2010/10/28 The pre-build image is updated.

Front page   Edit Freeze Diff Backup Upload Copy Rename Reload   New List of pages Search Recent changes   RSS of recent changes
Last-modified: 2010-11-12 (Fri) 11:45:02 (2839d)