Difference between pages "Building an image from scratch" and "Creating images for deploying to microSD"

From Low cost, low power, android ARM system board by Mini-Box.com - pico WiKi
(Difference between pages)
Jump to navigation Jump to search
(Created page with "=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.<br> Steps to follo...")
 
(Created page with "1. Download the images tools from: https://gitorious.org/picopc-tools/picopc-tools and go to the create-virtual-image/ folder git clone git://gitorious.org/picopc-tools/pic...")
 
Line 1: Line 1:
=microSD Formatting=
+
1. Download the images tools from: https://gitorious.org/picopc-tools/picopc-tools and go to the create-virtual-image/ folder
==Building an image from scratch==
 
The microSD card must use a special partition layout so it can be used for booting in pico-SAM9G45.<br>
 
Steps to follow when you're installing a custom OS:
 
* [http://arm.mini-box.com/index.php?title=Using_dd#Identifying_the_microSD_device_name 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 [http://arm.mini-box.com/releases/kernel_bootstrap/latest/BOOT.BIN BOOT.BIN]) that will load the linux kernel ([http://arm.mini-box.com/releases/kernel_bootstrap/latest/linux.bin 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.
+
  git clone git://gitorious.org/picopc-tools/picopc-tools.git
The prebuild kernel expects init binary to be located on /.
+
  cd picopc-tools
<br><br>
+
  cd create-virtual-image
==Automatic formatting of microSD card with a script==
+
 
* [http://arm.mini-box.com/index.php?title=Using_dd#Identifying_the_microSD_device_name See this page] for identifying the microSD device name<br>
+
2. Create a empty virtual image with:
* Download [http://gitorious.org/picopc-tools/picopc-tools/blobs/master/setup-sdcard/setup-sdcard.sh Setup SD card script].<br>
+
  ./create-virtual-image.sh
* Run this script with:
+
  Creating a 256 MB image with 9% boot partition
   <pre style="font-size: medium">setup-sdcard.sh <target_device></pre>
+
  Creating empty disk image...done
(ie: ./setup-sdcard.sh /dev/sdf).<br>
+
  Creating partitions on /dev/loop0 ...done
This script will create the partition layout automatically as described above.
+
  Setting up virtual partitions...done
 +
  Creating MSDOS filesystem for BOOT partition ...done
 +
  Creating EXT3 filesystem for ROOTFS partition ...done
 +
  Mounting paritions ...done
 +
  All done you can copy your files to ''boot'' and ''rootfs''
 +
   Execute sync-virtual-image.sh to save what you copied when done.
 +
 
 +
3. Copy ''BOOT.BIN'' and ''linux.bin'' to ''boot/'' folder and your root file system to ''rootfs/'' folder
 +
 
 +
4. Create the final archive (the image created with step 1 will be compressed in a zip file)
 +
  ./sync-virtual-image.sh
 +
  Enter name prefix or [ENTER] for default name image-2011-09-28.zip
 +
 
 +
5. The image can be [http://arm.mini-box.com/index.php?title=Main_Page#Creating_a_bootable_microSD written to the microSD] using dd or winimage.

Revision as of 06:37, 20 October 2020

1. Download the images tools from: https://gitorious.org/picopc-tools/picopc-tools and go to the create-virtual-image/ folder

 git clone git://gitorious.org/picopc-tools/picopc-tools.git
 cd picopc-tools
 cd create-virtual-image

2. Create a empty virtual image with:

 ./create-virtual-image.sh
 Creating a 256 MB image with 9% boot partition 
 Creating empty disk image...done
 Creating partitions on /dev/loop0 ...done
 Setting up virtual partitions...done
 Creating MSDOS filesystem for BOOT partition ...done
 Creating EXT3 filesystem for ROOTFS partition ...done
 Mounting paritions ...done
 All done you can copy your files to boot and rootfs
 Execute sync-virtual-image.sh to save what you copied when done.

3. Copy BOOT.BIN and linux.bin to boot/ folder and your root file system to rootfs/ folder

4. Create the final archive (the image created with step 1 will be compressed in a zip file)

 ./sync-virtual-image.sh
 Enter name prefix or [ENTER] for default name image-2011-09-28.zip

5. The image can be written to the microSD using dd or winimage.