BeagleBoardDebian

From eLinux.org
Revision as of 13:06, 15 August 2008 by RobertCNelson (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

QEMU method

Note: this guide references Aurélien Jarno's excellent howto: Debian on an emulated ARM machine

install qemu

apt-get install qemu

Format SD Card (1GB or greater)

Follow this guide to setup a 50-100MB FAT partition on your SD Card. LinuxBootDisk

For reference, this is a 2GB sd card after installing debian.

Disk /dev/sde: 2032 MB, 2032664576 bytes
255 heads, 63 sectors/track, 247 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x000ab123

  Device Boot      Start         End      Blocks   Id  System
/dev/sde1               1           6       48163+   6  FAT16
/dev/sde2  *            7         228     1783215   83  Linux
/dev/sde3             229         247      152617+   5  Extended
/dev/sde5             229         247      152586   82  Linux swap / Solaris

Prepare QEMU

To stay organized create working directory.

wget http://people.debian.org/~aurel32/arm-versatile/vmlinuz-2.6.18-6-versatile
wget http://people.debian.org/~aurel32/arm-versatile/initrd.img-2.6.18-6-versatile 
wget http://ftp.de.debian.org/debian/dists/etch/main/installer-arm/current/images/rpc/netboot/initrd.gz 

Install Debian - QEMU

sudo qemu-system-arm -M versatilepb -kernel vmlinuz-2.6.18-6-versatile -initrd initrd.gz -hda /dev/sde -append "root=/dev/ram"

Note: sudo access is required to access /dev/sde directly.

Debian-Installer will complain that it can't find kernel modules, answer [yes] to continue the install. We will be providing our own kernel.

Running Debian - QEMU

sudo qemu-system-arm -M versatilepb -kernel vmlinuz-2.6.18-6-versatile -initrd initrd.img-2.6.18-6-versatile -hda /dev/sde -append "root=/dev/sda2"

Note: Time will be incorrect.

login as root, change password
apt-get install ntpdate
ntpdate pool.ntp.org
reboot.. relogin change password...

Stop QEMU and remount SD card to copy uImage to FAT partition

cd /media/disk-1/
wget http://beagleboard.googlecode.com/files/uImage_OTG

Beagleboard

Insert SD Card and power up beagleboard. Using a serial program stop u-boot and add these commands:

setenv bootcmd 'mmcinit; fatload mmc 0:1 0x80300000 uImage_OTG; bootm 0x80300000'
setenv bootargs 'console=ttyS2,115200n8 noinitrd root=/dev/mmcblk0p2 rootfstype=ext3 rw rootdelay=5 nohz=off'
boot

To force the Beagleboard to always boot the sd card image:

setenv bootcmd 'mmcinit; fatload mmc 0:1 0x80300000 uImage_OTG; bootm 0x80300000'
setenv bootargs 'console=ttyS2,115200n8 noinitrd root=/dev/mmcblk0p2 rootfstype=ext3 rw rootdelay=5 nohz=off'
saveenv
boot

Debian on Beagleboard

Console log = Serial Terminal
User Console = HDMI port + usb (keyboard,etc)

Current Issues

#Swap disabled: change /dev/hda5 -> /dev/mmcblk0p5 in /etc/fstab (artifact of qemu install to /dev/hdaX)
#RTC seems to be not enabled: use ntpdate when ethernet works, or issue date MMDDHHMMSSYYYY