Building an image from scratch

From Low cost, low power, android ARM system board by - pico WiKi
Jump to navigation Jump to search

microSD Formatting

Building an image from scratch

The microSD card must use a special partition layout so it can be used for booting in pico-SAM9G45.
Steps to follow when you're installing a custom OS:

  • See this page for identifying the microSD device name
  • Create a FAT16 (important!) partition at the beginning of the disk. You should use a small partition size for this (<= 24Mb).
  • Create an ext3 partition for the rest of the space that will hold a linux or android root file system.
  • Format the FAT16 partition with mkfs.msdos <your device 1st partition> (ie: mkfs.msdos /dev/sdf1)
  • Format the ext3 partition with mkfs.ext3 <your device 2nd paritition> (ie: mkfs.ext3 /dev/sdf2)
  • On the FAT16 partition copy the bootstrap (you can use the prebuild binary BOOT.BIN) that will load the linux kernel (linux.bin)

If you intend to compile a custom kernel follow the steps from the Kernel Building page, and make sure you compile the kernel in the uImage format and you specify the boot kernel parameters on the kernel configure step.

  • On the ext3 partition copy your OS root file system, making sure that the init binary from your OS has the correct patch setup in the kernel boot kernel parameters when you configured the kernel.

The prebuild kernel expects init binary to be located on /.

Automatic formatting of microSD card with a script <target_device>

(ie: ./ /dev/sdf).
This script will create the partition layout automatically as described above.