eLinux.org - Embedded Linux Wiki

BeagleBoardHandheldsMojo

From eLinux.org

Jump to: navigation, search

Note: this is still very experimental project. If you would like a supported system use BeagleBoardDebian or BeagleBoardUbuntu.

This page is about running a (ARM armv5el/armv6el-vfp) Ubuntu based distribution at BeagleBoard provided by Handhelds Mojo. BeagleBoard will boot the (ARM armv5el/armv6el-vfp) Handhelds Mojo distribution from SD card. To prepare the SD card and install (ARM armv5el/armv6el-vfp) Handhelds Mojo on it, QEMU on host PC will be used.

Contents

BIG WARNING

Mojo-Handhelds's future is still in flux, I will continue to build kernel's for hasty as long as they build. (gcc 4.2 based) However, no packages have been built upstream since Mid November 2008, to get the latest and greatest look to Debian or Ubuntu... --RobertCNelson 19:07, 26 April 2009 (UTC)

Ubuntu 9.10 (testing releases) as of last friday is now armv6 too.. therefore 2.6.29 will be the last kernel for hasty... --RobertCNelson 18:45, 31 August 2009 (UTC)

Debian Installer QEMU (hasty-armv5el or hasty-armv6el)

QEMU

Install QEMU on your host PC. This assumes that your host PC is running Debian/Ubuntu as well. If not, install QEMU the way your host PC distribution uses.

sudo apt-get install qemu

Note: I've been seeing some error messages on the irc channel, make sure you rebuild qemu from source if you don't have at least Ubuntu 8.10 (i think 8.04 was okay too, however it's been awhile)

PC: Format SD Card

You will need a 1GB SD card or greater.

Standard System : ~396MB
+ Desktop environment (GNOME) : ~GB

Starting with an empty SD card and using gparted, create:

50 MiB Primary Partition, fat32
Leave remaining space for the Debian-Installer

PC: Preparation

Create a working directory to keep your files organized.

mkdir mojo-beagle
cd mojo-beagle/
wget http://repository.handhelds.org/hasty-armv5el/installer-arm/images/versatilepb/ramdisk.gz
wget http://repository.handhelds.org/hasty-armv5el/installer-arm/images/versatilepb/vmlinuz-926

hasty-arm6el-vfp

mkdir mojo-beagle
cd mojo-beagle 
wget http://repository.handhelds.org/hasty-armv6el-vfp/installer-arm/images/versatilepb/ramdisk.gz
wget http://repository.handhelds.org/hasty-armv6el-vfp/installer-arm/images/versatilepb/vmlinuz-1136

Install Mojo Handhelds thru QEMU with the debian-installer

To install (ARM) Mojo Handhelds inside QEMU:

sudo qemu-system-arm -M versatilepb -kernel vmlinuz-926 -cpu arm926 -initrd ramdisk.gz -m 256M -hda /dev/sdX -append "root=/dev/ram mem=256M"

Note: root/sudo access is required to access /dev/sdX directly & verify /dev/sdX with "sudo fdisk -l"

hasty-armv6el-vfp

sudo qemu-system-arm -M versatilepb -kernel vmlinuz-1136 -cpu arm1136 -initrd ramdisk.gz -m 256M -hda /dev/sdX -append "root=/dev/ram mem=256M"

Gotchas: Standard USB/Keyboard arrow don't work, use the number pads.

Choose Mirror: Enter Information Manually

Ubuntu archive mirror hostname: repository.handhelds.org
Ubuntu archive mirror directory: /hasty-armv5el  (or) /hasty-armv6el-vfp
Continue the install without loading kernel modules? : <yes>

DON'T Select "Guided - use entire disk" <- Loose the fat boot partition.

Recommended: Select Guided - Use the largest continuous free space

Example:

Partition #5 of SCSI1 (0,0,0) (sda) as ext3
Partition #6 of SCSI1 (0,0,0) (sda) as swap
Continue without installing a kernel? : <yes>

Notes: Only select the base install, ubuntu-desktop will not work.

No BootLoader: <ok> 

Quit QEMU

PC: Linux Kernel Preparation

Install uboot-mkimage utility

sudo apt-get install uboot-mkimage 

Remount SD card, Ubuntu remounts SD card like this:

/media/disk/ <fat32>
/media/disk-1/ <ext3>

Download Kernel-Image

cd /media/disk-1/home/<user>/ 
wget http://www.rcn-ee.net/deb/kernel/beagle/hasty/v2.6.29-58cf2f1-oer40.5/linux-image-2.6.29-oer40.5_1.0hasty_arm.deb *Dated 11-August-2009*

Extract linux-image's vmlinuz-*

dpkg -x linux-image* ./temp

Build uboot compatible image and copy to /media/disk/ <fat32 boot partition>

mkimage -A arm -O linux -T kernel -C none -a 0x80008000 -e 0x80008000 -n "Linux" -d ./temp/boot/vmlinuz-*  /media/disk/uImage

Clean up

rm -rfd temp

Sync, umount Partitions and Install sd card in beagleboard

Beagleboard

Uboot

Using a terminal program, stop u-boot and add these commands:

For Linux Kernel 2.6.26 and 2.6.27
setenv bootcmd 'mmcinit; fatload mmc 0:1 0x80300000 uImage; bootm 0x80300000'
setenv bootargs 'console=ttyS2,115200n8 console=tty0 root=/dev/mmcblk0p5 rootdelay=2 rootfstype=ext3 ro video=omapfb:mode:1280x720@60'
saveenv
boot
For Linux Kernel 2.6.28 using DSS2
setenv bootcmd 'mmcinit; fatload mmc 0:1 0x80300000 uImage; bootm 0x80300000'
setenv bootargs 'console=ttyS2,115200n8 console=tty0 root=/dev/mmcblk0p5 rootdelay=2 rootfstype=ext3 ro omap-dss.def_disp=lcd omapfb.video_mode=1280x720MR-24@60'
saveenv
boot
For Linux Kernel 2.6.29 and higher using DSS2
setenv bootcmd 'mmcinit; fatload mmc 0:1 0x80300000 uImage; bootm 0x80300000'
setenv bootargs 'console=ttyS2,115200n8 console=tty0 root=/dev/mmcblk0p2 rootwait rootfstype=ext3 ro omapfb.mode=dvi:1280x720MR-16@60'
saveenv
boot

You shall adapt the resolution to you screen as following :

omapfb.mode=dvi:1280x720MR-16@60
Modes:
"1024x768MR-16@60""800x600MR-16@60" ...

Here is more explanation on dss video options : [1]

The Beagleboard will reboot 3-4 times while the ext3 filesystem is repaired. (may have to remove power etc)

First Boot (HDMI/DVI-D output & USB-Keyboard)

Login & Install linux-image

sudo dpkg -i linux-image*
  <yes> (not sure it matters)

Reboot

sudo reboot (then disconnect power after system has halted, really wish this worked..)

Login, verify additional kernel drivers work & fix date


Notes

Xorg Desktop

sudo aptitude install xorg gdm xfce4  (375Mb)

Modify /etc/X11/xorg.conf

Section "Device"
	Identifier	"Configured Video Device" 
	Option		"UseFBDev"		"true"
	Driver		"fbdev"
EndSection

Image:Ubuntu-grumpy-xine.jpg

Serial Port Console

# ttyS2 - getty
#
# This service maintains a getty on tty6 from the point the system is
# started until it is shut down again.

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

and add ttyS2 to /etc/securetty

Personal tools