Personal tools

Log in

Changes

From IGEP - ISEE Wiki

Jump to: navigation, search

How to get the Ubuntu distribution

1,420 bytes added, 14:29, 17 July 2010
no edit summary
*Ubuntu will likely have a different set of kernels than Debian (although the specific set is still under discussion).
=== Overview of How-To ===This How-To is meant to be a starting point for people to learn install an Ubuntu image for OMAP3-based IGEP v2 devices platforms as quickly and easily as possible.
This Unless otherwise noted, this How-To works with the '''Ubuntu 8.04 IGEP v2.0 SDK Virtual Machine''' but most of the contents are valid also for other GNU/Linux distributions. We do not issue any guarantee that this will work on other distributions.
This How-To will start out by a '''Make a bootable MMC card on Linux'''.
And then, we will cover the '''Getting a copy of a ubuntu root file system'''for various Ubuntu releases. These should give you a good basis overview of creating an ubuntu-based ARM root filesystem.
=== Requirements ===*'''Ubuntu 8.04 IGEP v2.0 SDK Virtual Machine'''
*A SD card at least 2GB ( recommended 4GB )
=== Feedback and Contributing === If you want to contribute to GeeXboX please subscribe to the [http://geexbox.org/en/mailing.html development list] (devel at geexbox.org).
Creating articles in the wiki is a collaborative process, at any point, if you see a mistake you can contribute to this article.
Consult the [http://www.mediawiki.org/wiki/Help:Contents User's Guide] for information on using the wiki software.
=== References === 
Much of this How-To is extracted from different sources. If you would like to read some of the original articles or resources, please visit them and thank the authors:
*ARM rootfs from scratch ( https://wiki.ubuntu.com/ARM/RootfsFromScratch )
=== Make a bootable MMC card on Linux ===
Thanks to Graeme Gregory and Steve Sakoman, you can now use [http://www.sakoman.com/OMAP3/a-script-for-partitioningformatting-a-bootable-sdmicrosd-card.html a script to automate the tedious process of creating a bootable SD/microSD card.]
Having followed this excellent tutorial it's time to mount your SD card boot partition (/media/boot). With your preferred editor create a boot-ini.source file like this.
<pre> # Set bootargs for ubuntu MMC boot setenv bootargs 'mem=512M console=ttyS2,115200n8 console=tty0 omapfb.mode=dvi:1024x768MR-16@60 root=/dev/mmcblk0p2 rw rootwait ' # Read kernel from OneNAND onenand read 80200000 280000 400000 # and boot ... bootm 80200000</pre>
And use the mkimage tool to convert this file into a script image which can be executed using U-Boot's source command.
<pre> $ source /usr/local/poky/eabi-glibc/arm/environment-setup $ mkimage -A arm -O linux -T script -C none -a 0 -e 0 -n 'Boot setup script' -d boot-ini.source boot.ini</pre>
The result will be a boot.ini file which you will copy to SD card boot partition
<pre>
$ cp boot.ini /media/boot
</pre>
$ cp boot.ini /media/boot ==Ubuntu 10.04 (Jaunty Jackalope) = Getting = WORK IN PROGRESS, please contribute. This has been tested on Ubuntu 10.04, other distributions may require some things to be done differently. Start installing some required packages  $ sudo apt-get install rootstock uboot-mkimage Next, create a copy minimal rootfs with  $ sudo rootstock --fqdn ubuntu --login jdoe --password letmein --imagesize 2G \ --seed wget,nano,linux-firmware,wireless-tools,usbutils --dist lucid \ --serial ttyS2 --components "main universe multiverse" \ --kernel-image http://www.rcn-ee.net/deb/lucid/v2.6.33.5-l3/linux-image-2.6.33.5-l3_1.0lucid_armel.deb The result will be these files: *armel-rootfs-<date>.tgz: Root file System, dump to ext2/3 partition of SD card*vmlinuz-2.6.<version>: Boot Image, use mkimage to create uImage and dump to the first fat16 partition of SD card*initrd.img-2.6.<version>: Boot initramfs, use mkimage to create uInitrd and dump to the first fat16 partition of SD card convert to u-boot compatible images  $ mkimage -A arm -O linux -T kernel -C none -a ubuntu root file system 0x80008000 -e 0x80008000 -n "Linux" -d vmlinuz-2.6.33.4-l3 uImage $ mkimage -A arm -O linux -T ramdisk -C none -a 0 -e 0 -n initramfs -d initrd.img-2.6.33.4-l3 uInitrd create a boot script  fatload mmc 0:1 0x80000000 uImage fatload mmc 0:1 0x82000000 uInitrd setenv bootargs vram=12M omapfb.mode=dvi:1280x720MR-16@60 bootm 0x80000000 0x82000000  $ mkimage -A arm -O linux -T script -C none -a 0 -e 0 -n "Boot Script" -d boot.source boot.ini SD card boot partition $ cp uImage uInitrd /media/boot $ cp boot.ini /media/boot SD card rootfs partition $ sudo tar xzpf armel-rootfs-<date>.tgz -C /media/rootfs/ ... ==Ubuntu 9.04 (Jaunty Jackalope) ==
In order to get a copy of a ARM ubuntu root file system, you will need to install qemu and a recent version of debootstrap and the qemu package
<pre> $ sudo apt-get install qemu $ wget http://ports.ubuntu.com/pool/main/d/debootstrap/debootstrap_1.0.12_all.deb $ sudo dpkg -i debootstrap_1.0.12_all.deb</pre>
Next, you will download a helper program to build the rootfs
<pre> $ wget http://launchpad.net/project-rootstock/trunk/0.1/+download/rootstock-0.1.3.tar.gz $ tar xzf rootstock-0.1.3.tar.gz $ cd rootstock-0.1.3</pre>
The following example will create a tarball of ubuntu-desktop based image for your target device:
<pre> $ sudo ./rootstock --fqdn ubuntu --login jdoe --password letmein --imagesize 3G --seed ubuntu-desktop --dist jaunty</pre>
Typical images (example settings):
To build a xubuntu-desktop image use the following options:
<pre>
--imagesize 2G --seed xubuntu-desktop
</pre>
For an ubuntu-desktop image (a similar size is needed if you want a kubuntu image):
<pre>
--imagesize 3G --seed ubuntu-desktop
</pre>
A typical remote development comandline environment if you run an armel board headless (note that you should edit /etc/network/interfaces and set up your network device on first login for this):
<pre>
--imagesize 3G --seed build-essential,openssh-server
</pre>
A very light desktop (lxde):
<pre>
--seed lxde,gdm
</pre>
After few hours, a file named armel-rootfs-[date].tgz will be in your working directory
Next, mount your SD card ext3 partition (/media/rootfs) and untar the rootfs
<pre> $ sudo tar xzf armel-rootfs-[date].tgz -C /media/rootfs</pre>
Finally, umount the SD card, insert the card in your board and power up.
0
edits