eLinux.org - Embedded Linux Wiki

BeagleBoardHandheldsMojo

From eLinux.org

Jump to: navigation, search

Note: this is still very experimental. If you want a stable working system use BeagleBoardDebian.

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

Recommended Kernel

So like any big document, it's hard to keep everything up to date. So if your trying Debian/Mojo for the first time, here's what i recommend, (and it's the same thing i'm running on the build beagle (running debian lenny).)

Considered Stable: 2.6.27-oer4 + Hasty: for Hasty http://www.rcn-ee.com/deb/kernel/hasty/v2.6.27-2a3408b-oer4/

Uboot: 2008-rc2 or +

TEST Debian Installer Native (hasty-armv5el or hasty-armv6el-vfp) (NOT WORKING AT THE MOMENT)

Just got things kinda working, hoping someone has some hints and improvements for a working .config

Note: This is broken at the moment while we get a couple patches upstream, however the Debian Based one is now working.

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: Setup SD uboot Partition

Mount your SD card fat32 partition. (/media/disk/)

cd /media/disk/
wget http://repository.handhelds.org/hasty-armv5el/installer-arm/images/versatilepb/ramdisk.gz
wget http://www.rcn-ee.com/deb/CC-v2.6.27-2a3408b-mojo-oer3
mv CC-v2.6.27-2a3408b-mojo-oer3 uImage
gzip -d ramdisk.gz
dd if=ramdisk of=raminit ibs=8388608 conv=sync

Beagleboard

Mount SD card

setenv bootcmd 'mmcinit; fatload mmc 0:1 0x80300000 uImage; fatload mmc 0:1 0x81600000 raminit; bootm 0x80300000'
setenv bootargs 'console=ttyS2,115200n8 console=tty0 ramdisk_size=8192 root=/dev/ram0 rw rootfstype=ext2 initrd=0x81600000,8M video=omapfb:mode:1280x720@60'
boot

BUG: The omapfb will fail to load so this is far as you can get with it. On my last build I either didn't include the omapfb as builtin or it's overwriting something.

Switch to F2, 'mount -a', now framebuffer will load

BUG: Can't detect mmc partitions.

This Patch in lenny looks like will fix it: http://www.nabble.com/-RFC--Support-for-MMC-SD-cards---OK-for-Lenny--td19719370.html

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)

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

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

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

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.com/deb/hasty/v2.6.27-2a3408b-oer4/linux-image-2.6.27-oer4_1.0hasty_arm.deb

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:

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
video=omapfb:mode:1280x720@60
Modes:
"640x480@60""800x600@60""1024x768@60""1280x720@60"480p60""576p50""720p50""720p60""1080p24""1080p25""1080p30",

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


Deb Builder

Auto builds for lenny, sid, and mojo's; linux-image and linux-headers's in appropriate schroot's.

Latest Images Changelog

Personal tools