Sunday, June 28, 2009

Ubuntu on Beagleboard

(1) Format SD card at Host
Insert SD card to SD slot of the host
$ sudo apt-get install gparted
$ sudo gparted
device /dev/sdc
Partition
/dev/sdc1 : fat32 : /media/disk-1 : 62.72 MB
/dev/sdc2 : ext3 : /media/disk-2 : 1.80 GB

(2) Download prebuilt Linux kernel and install it to the fat32 partition of SD card
Get stable version: 2.6.29-oer34
$ wget http://www.rcn-ee.com/deb/kernel/beagle/lenny/v2.6.29-58cf2f1-oer34/uImage
$ copy uImage /media/disk-1
$ sudo umount /media/disk-1

(3) Make Ubuntu Root File System on the ext3 partition of SD card
$ cd
$ sudo apt-get install qemu
$ wget http://ports.ubuntu.com/pool/main/d/debootstap/debootstrap_1.0.13~jaunty1_all.deb
$ sudo dpkg -i debootstrap_1.0.13~jaunty1_all.deb
$ wget http://people.ubuntu.com/~ogra/arm/build-arm-rootfs
$ sudo chmod +x build-arm-rootfs
$ sudo ./build-arm-rootfs --fqdn beagleboard --login ubuntu --password passwd --imagesize 2G --seed gcc,make,usbutils
...
$ ls
armel-rootfs-.tgz build-arm-rootfs build-aarm-rootfs-.log
$ sudo tar xfp armel-rootfs-.tgz -C /media/disk-2
$ cd /media/disk-2
$ sudo vi etc/event.d/ttyS2
# ttyS2 - getty
start on runlevel 2
start on runlevel 3

stop on runlevel 0
stop on runlevel 1
stop on runlevel 4
stop on runlevel 5
stop on runlevel 6

respawn
exec /sbin/getty -L 115200 ttyS2

$ cd ..
$ sudo umount /media/disk-2

(4) U-Boot setting and boot Linux at Beagle Board console (U-Boot Reference)
Insert SD card to SD slot of Beagle Board
U-Boot 1.3.3 (Jul 10 2008 - 16:33:09)
OMAP3530-GP rev 2, CPU-OPP2 L3-165MHz
DRAM: 128 MB
NAND: 256 MiB
In: serial
Out: serial
Err: serial
Audio Tone on Speakers ... complete
Hit any key to stop autoboot:
OMAP3 beagleboard.org #
setenv bootcmd 'mmcinit; fatload mmc 0:1 0x80300000 uImage; bootm 0x80300000'
OMAP3 beagleboard.org # setenv bootargs 'console=ttyS2,115200n8 root=/dev/mmcblk0p2 rootwait rootfstype=ext3 rw'

OMAP3 beagleboard.org # saveenv
OMAP3 beagleboard.org # boot
reading uImage ...
...
beagleboard login:

6 comments:

Unknown said...

Thank you for excelent step-by-step explanation.
I believe it will be even better if you could mention additional packages which are reasonable for beagleboard, such as xubuntu-desktop and others.

Ahmet Cihan AKINCA said...

http://www.rcn-ee.com/deb/kernel/beagle/lenny/v2.6.29-58cf2f1-oer34/uImage address doesn't work.

Raj said...

Hi, i am trying to do the same for my beagleBone .Trying to port RTKLIB. i am also stuck at wget. http://www.rcn-ee.com/deb/kernel/beagle/lenny/v2.6.29-58cf2f1-oer34/uImage address doesn't work.

Any other linux kernals i can install. I hope you can help me!
Thanks.

Charles Wang

Unknown said...
This comment has been removed by the author.
Unknown said...
This comment has been removed by the author.
Unknown said...

good.. refer this too..
http://embedmastery.blogspot.in/2013/09/porting-ubuntu-1210-quantal-on-beagle.html