Difference between pages "Compiling Angstrom for pico-SAM9G45" and "Building an image from scratch"

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 "<h1>Compile using the new meta-angstrom distribution based on meta-openembedded branch (new branch)</h1> git clone git://github.com/Angstrom-distribution/setup-scripts.git -...")
 
(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...")
 
Line 1: Line 1:
<h1>Compile using the new meta-angstrom distribution based on meta-openembedded branch (new branch)</h1>
+
=microSD Formatting=
  git clone git://github.com/Angstrom-distribution/setup-scripts.git -b angstrom-v2012.05-yocto1.2
+
==Building an image from scratch==
  cd setup-scripts/sources
+
The microSD card must use a special partition layout so it can be used for booting in pico-SAM9G45.<br>
  git clone git://gitorious.org/picopc-tools/meta-picosam9.git
+
Steps to follow when you're installing a custom OS:
  cd ..
+
* [http://arm.mini-box.com/index.php?title=Using_dd#Identifying_the_microSD_device_name See this page] for identifying the microSD device name
  echo 'EXTRALAYERS="${TOPDIR}/sources/meta-picosam9"' >> conf/bblayers.conf
+
* Create a '''FAT16''' (important!) partition at the beginning of the disk. You should use a small partition size for this (<= 24Mb).
  MACHINE=picosam9 ./oebb.sh config picosam9
+
* 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.
  
<h1> Start building</h1>
+
* 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.
If you want to build only the kernel:
+
The prebuild kernel expects init binary to be located on /.
 
+
<br><br>
  MACHINE=picosam9 ./oebb.sh bitbake virtual/kernel
+
==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>
or if you want a small base image:
+
* Download [http://gitorious.org/picopc-tools/picopc-tools/blobs/master/setup-sdcard/setup-sdcard.sh Setup SD card script].<br>
 
+
* Run this script with:
  MACHINE=picosam9 ./oebb.sh bitbake console-image
+
   <pre style="font-size: medium">setup-sdcard.sh <target_device></pre>
 
+
(ie: ./setup-sdcard.sh /dev/sdf).<br>
 
+
This script will create the partition layout automatically as described above.
<h1>Compile using the classic angstrom distribution based on openembedded.dev branch (old branch)</h1>
 
This is obsolete and kept for reference. All development and maintenance are done on the new meta-angstrom.
 
 
 
  git clone git://gitorious.org/picopc-tools/picopc-angstrom-setup.git
 
  cd picopc-angstrom-setup
 
  MACHINE=picosam9 ./oebb.sh update
 
  MACHINE=picosam9 ./oebb.sh config picosam9
 
 
 
The script will also download and install picosam9 recipes for angstrom from here: [https://gitorious.org/picopc-tools/picopc-angstrom  https://gitorious.org/picopc-tools/picopc-angstrom]
 
 
 
To get the same build as the binary ones provided by mini-box.com you can use (note: this recipes only work on old openembedded.dev branch NOT the new meta-angstrom):
 
   MACHINE=picosam9 ./oebb.sh bitbake picosam9-gpe-image
 
  MACHINE=picosam9 ./oebb.sh bitbake picosam9-console-image
 
 
 
<h2>Notes</h2>
 
* The build process builds kernel and a rootfs, you will still need to copy those file to a microSD respecting the info here: http://arm.mini-box.com/index.php?title=Main_Page#Building_an_image_from_scratch
 
 
 
* The BOOT.BIN bootstrap is not built by angstrom. You can get a binary from:http://resources.mini-box.com/online/pico-SAM9G45/android/BOOT.BIN or [http://arm.mini-box.com/index.php?title=Bootstrap compile] your own version.
 
 
 
* Latest version that our '''classic''' angstrom build (openembedded.dev) has been tested is: ''tested_2011-01-13''. Other versions might have a different behavior. You can get this version by doing:
 
 
 
  cd sources/openembedded
 
  git checkout tested_2011-01-13 -b tested_2011-01-13
 
 
 
* The version of bitbake used is:
 
 
 
  cd sources/bitbake
 
  git checkout 1.12
 
 
 
* All above commands from step #2 downward must be issued from the picopc-angstrom-setup/ folder.
 

Latest revision as of 06:36, 20 October 2020

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

setup-sdcard.sh <target_device>

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