port_ubuntu ¶
Ubuntu on ARM
The web http://www.ubuntu.org.cn/products/whatisubuntu/arm/introduces Ubuntu on ARM.'
Other Soc company, example Mavell, TI,Freescaleis referred to web below:
http://www.ubuntu.org.cn/products/whatisubuntu/arm/
The main topic is on the web below:
https://wiki.ubuntu.com/ARM/RootfsFromScratch
OMAP Ubuntu Main
http://www.omappedia.org/wiki/OMAP_Ubuntu_Main
Using rootstock
Rootstockwill automate the creation of a rootfs tarball and exposes some config options to tweak the contents/setup.
First run rootstock to create your rootfs (check ARM/RootStockfor more info about rootstock).
If you're running Ubuntu 9.10 (karmic) or later, you just need to install the rootstock package and it will pull the appropriate dependencies.
Run “sudo apt-get install rootstock” on the terminal. It will install in /usr/bin/rootstock.
If you install rootstock manually or if you are running it from a bzr checkout, you will also need:
qemu (see Installation/QemuEmulator) Arm version is Cortex-A8 in default.
a recent debootstrap: debootstrap_1.0.10ubuntu3_all.deb or newer
To create an armel rootfs tarball of, for instance, xubuntu-desktop:
$ sudo rootstock \ --fqdn myhostname \ --login ubuntu \ --password temppwd \ --imagesize 2G \ --seed xubuntu-desktop
Here's another example for ubuntu-desktop:
$ sudo rootstock \ --fqdn ubuntu \ --login ubuntu \ --password ubuntu \ --imagesize 3G \ --seed ubuntu-desktop
Some typical flags when developing headless (connecting over the network):
--seed build-essential,openssh-server
Note that you should edit /etc/network/interfaces and set up your network device on first login for this.
If you want a really light desktop (lxde), use:
--seed lxde,gdm
The options --fqdn (or -f), --login (or -l) and --password (-p) are required for the initial setup. Calling the script with --help shows you all the additional options that can be used to change the setup of the created rootfs.
Building a root filesystem image instead of a tarball¶
In case you just need a root filesystem for use with qemu and you don't want a rootfs tarball, e.g. for usage with qemu, pass --notarball to rootstock:
$sudo rootstock --fqdn qemu-test \ --login qemu \ --password qemupwd \ --notarball
You can also create a root filesystem from a tarball as follows:¶
Create the blank image file using dd; this example creates a 1GB image; use seek=3072 for 3GB or seek=2048 for 2GB etc.:
dd if=/dev/zero of=ubuntu-arm.img bs=1MB count=0 seek=1024
Create linux filesystem on the newly created image:
mkfs.ext4 -F ubuntu-arm.img
(You might want to pass some extra flags to mkfs to tweak the reserved blocks, labels, or other filesystem options.)
Loop mount the new image:
sudo mount -o loop ubuntu-arm.img /mnt
Extract the rootfs tarball inside the mounted dir and umount:
$ sudo tar -C /mnt -zxf armel-rootfs-200904151837.tgz sudo umount /mnt
Now you are set and ready to use the ubuntu-arm.img.
Please run “sudo ./rootstock –help” if you don’t understand how to use the shell.
Example: Option is following.
-d --dist (jaunty, karmic, lucid or maverick)
Specify Release to build
(default version is dependent on your local PC version).
-i --imagesize <size>M/G
Size of the target filesystem to be created (i.e. 500M)(default: 1G).
--serial <devicename>
Create a serial tty of <devicename> inside the rootfs for login (i.e. ttyS0)
In default the serial port only output the message.
--kernel-image <http url to kernel .deb>
install board specfic kernel package from http accessible deb package inside rootfs.
Take care
1. Rootstock version 0.1.99.3 has bug so you had better upgrade to 0.1.99.4. If you use Ubuntu version after 10.10(Maverick) it will install 0.1.99.4 automatically.
2. Ubuntu Jaunty can build for armv5, Karmic for armv6, Lucid(10,04) for armv7( thumb 2), Maverick(10.10) for armv7( thumb 2), Natty (11.04) for armv7(thumb2). Oneiric(11.10).
3. Option –seed can be Xubuntu-desktop[xfce], Kubuntu-desktop[KDE], ubuntu-desktop[GNOME], ubuntu-netbook. But if option –seed is ubuntu-netbook you run “sudo apt-get install ubuntu-netbook”.
4. On my PC I can only build –seed lxde,gdm. Others does not success. It is bug for building Arm Ubuntu.
5. When you run the img of rootfs you build you may see “ureadhead …… “on the serial port, you can run “sudo mv /etc/init/ureadhead.conf /etc/init/ureadhead.conf.disable” in your rootfs on your PC.
6. When you meet “could not update ……”, you can chown root:root the file you just meet.
7. The size of SD card is more then 4G for storing rootfs. So you had better change flash.sh to 2G for rootfs.
8. You must select lxde before you enter the system ubuntu in the bottom on your board if you build option –seed lxde, gdm.
9. When you tar your rootfs img you must run by sudo.
10. Copy our module to your lib/modules in your rootfs. Run sudo cp –ra 2.6.38-sirf+ your rootfs lib/modules.
11. I have build rootfs in the option –seed lxde,gdm in 8G SD card. The password is ubuntu.