BeagleBoardDebian

This page is about running a (ARM EABI) Debian distribution at BeagleBoard. BeagleBoard will boot the (ARM EABI) Debian distribution from SD card. Debian's NetInstall will be used to install Debian onto your Beagle.

Note: Debian armel deb's are compiled for armv4t, this allows debian to support a larger number of arm devices with a single port, at only the sacrifice of speed.

= Help =

If you need any help:


 * Kernel related help:
 * Email Beagleboard user group *Recommended method
 * #beagle: Beagle irc on freenode, accessible also by web interface (logs)
 * Kernel Tree's
 * Stable Kernel 2.6.39 src
 * Development Kernel src


 * When asking for help, please provide some debugging information:
 * U-Boot Version installed on board
 * Kernel Version: uname -a
 * pastebin dmesg
 * Copy from serial port or use "dmesg | pastebinit" (sudo apt-get install pastebinit)

= Recommended Beagle Software =

X-loader/MLO (1.4.4ss) & U-Boot (2010.03) (Zippy1 & Zippy2 Support)
 * All Bx, C2/3/4 Boards are required to upgrade to atleast these MLO and U-Boot versions.
 * XM Boards have no NAND, so u-boot.bin is always required on the first partition
 * Directions: Upgrade X-loader and U-Boot

= Debian NetInstall =

You will need a 1GB SD card or greater. Standard System : ~455MB + Desktop environment (GNOME) : ~2.9GB

Debian Squeeze
git clone git://github.com/RobertCNelson/netinstall.git cd netinstall

Install script for Beagle Bx ./mk_mmc.sh --mmc /dev/sdX --uboot beagle_bx --distro squeeze

Install script for Beagle Cx, xM A/B/C ./mk_mmc.sh --mmc /dev/sdX --uboot beagle --distro squeeze

Install script for Panda ./mk_mmc.sh --mmc /dev/sdX --uboot panda --distro squeeze


 * Options:
 * --uboot : beagle, (panda only serial, display not working)
 * --distro : squeeze
 * --firmware : installs firmware
 * --serial-mode : debian-installer uses Serial Port
 * --usb-rootfs : (uImage on /dev/mmcblkp0 and rootfs on external usb drive /dev/sda1)

Note: The default options work for most people, but if you'd like to tweak boot settings, edit these before running the script. NetInstall boot Settings: gedit ./netinstall/scripts/dvi.cmd gedit ./netinstall/scripts/serial.cmd Normal Boot Settings: gedit ./netinstall/scripts/dvi-normal-squeeze.cmd gedit ./netinstall/scripts/serial-normal-squeeze.cmd

Beagleboard: NetInstall
Choose a language C - No localization English - English

Configure the network: usb0: USB net <- (usually the OTG port, but could also be the smsc95xx adapter on the beagle and panda) usb1: USB net <- (usually the smsc95xx adapter on the beagle and panda, when usb0 exist) eth0: Ethernet <- Your usb-ethernet device wlan0: Wifi <- Your usb-wifi device.. See BeagleBoardDebianWifiInstallInfo for my hack to set it up.

usb0 howto
There's a lot of question on irc about this, it might make sense to add a wiki page going thru with linux/winxp etc.. --RobertCNelson 00:55, 23 April 2010 (UTC)

Configuring usb0 network bridge for 2.6.29: While you chose your keyboard layout, setup a bridge with ethX and usbX. # ifconfig ethX 0.0.0.0 # ifconfig usbX 0.0.0.0 # brctl addbr brX # brctl addif brX ethX # brctl addif brX usbX # ifconfig brX up  # dhclient brX *Sometimes the first beagle DHCP will fail(probably due PC trying autoconnect), just run the auto configuration again and it will configure it right.

Continue the install without loading kernel modules? :

Partition disks: This partitioner doesn't have the inform.....? :  Logical Volume Manager not available: 

Partition disks: Guided - Use the largest continuous free space

Partitioning scheme....

Example: MMC/SD card #1 (mmcblk0) - 2.0 GB Unknown > #1 primary  57.5 MB     fat32 > #2 primary   1.8 GB B f ext3  / > #5 logical 148.0 MB   f swap  swap Finish partitioning and write changes to disk Write the changes to disk? :

No installable kernel was found in the defined APT sources? :  Continue without installing a kernel? :

Standard System

No BootLoader: 

Beagleboard: Install Latest Kernel
Script File:

Lenny: wget http://rcn-ee.net/deb/lenny/v2.6.39.3-old3/install-me.sh sudo /bin/bash install-me.sh Squeeze: export DIST=squeeze wget http://rcn-ee.net/deb/${DIST}/LATEST-omap wget $(cat ./LATEST-omap | grep STABLE | awk '{print $3}') /bin/bash install-me.sh

Reboot with your new Kernel

= Debian armhf port =

The armhf port of Debian is still only on the ports server, it hasn't been merged to main..

Port Details: http://wiki.debian.org/ArmHardFloatPort Status: http://wiki.debian.org/ArmHardFloatTodo

armhf Demo Image
Default user: debian pass: temppwd Default root user: root pass: root

Get prebuilt image:

wget http://rcn-ee.net/deb/rootfs/unstable/unstable-minimal-armhf-omap-2011-07-10.tar.xz mirrors (will take some time to update): wget http://ynezz.ibawizard.net/beagleboard/unstable/unstable-minimal-armhf-omap-2011-07-10.tar.xz

Verify Image with: md5sum unstable-minimal-armhf-omap-2011-07-10.tar.xz 0f7caad69252aaf8d24c58b8241fe07c unstable-minimal-armhf-omap-2011-07-10.tar.xz

Unpack Image: tar xJf unstable-minimal-armhf-omap-2011-07-10.tar.xz cd unstable-minimal-armhf-omap-2011-07-10

Install Image:

Quick Install script for Beagle Bx sudo ./setup_sdcard.sh --mmc /dev/sdX --uboot beagle_bx

Quick Install script for Beagle Cx, xM A/B/C sudo ./setup_sdcard.sh --mmc /dev/sdX --uboot beagle

Quick Install script for Panda sudo ./setup_sdcard.sh --mmc /dev/sdX --uboot panda


 * Additional Options
 * --rootfs
 * --swap_file 
 * --addon

You should now be able to unmount the SD card from you PC, insert into your BeagleBoard, reboot and have Ubuntu Maverick loaded.

Advanced: Build Image:

fixup.sh: https://github.com/RobertCNelson/omap-image-builder/raw/master/tools/fixup.sh

Built with rootstock trunk (ARM native mode, run directly on beagleboard): sudo ./rootstock --fqdn omap --imagesize 2G --dist unstable --serial ttyO2 \ --login debian --password temppwd \ --seed initramfs-tools,btrfs-tools,i2c-tools,nano,pastebinit,uboot-envtools,uboot-mkimage,usbutils,wget,wireless-tools,wpasupplicant \ --script fixup.sh --components "main" --arch armhf --mirror http://ftp.debian-ports.org/debian/ \ --kernel-image http://rcn-ee.net/deb/unstable/v2.6.39.3-x2/linux-image-2.6.39.3-x2_1.0unstable_armhf.deb

rootstock for armhf
Using: https://github.com/RobertCNelson/project-rootstock

Must have, these options for debian armhf... --components "main" --arch armhf --mirror http://ftp.debian-ports.org/debian/

= Debian Configuration =

Serial Ports
Lenny

edit /etc/inittab and add: S:2345:respawn:/sbin/getty 115200 ttyS2

For root access over the serial port add ttyS2 to /etc/securetty

Squeeze

edit /etc/inittab and add: S:2345:respawn:/sbin/getty 115200 ttyO2

WiFi
See BeagleBoard Debian WiFi install info.

SGX Video Acceleration
Requirements: 2.6-stable from launchpad or 2.6.35.3-x1+ deb's from rcn-ee.net. (the Demo Images hosted on rcn-ee.net meet this requirement) https://github.com/RobertCNelson/stable-kernel

Note: An older version of these instructions was adapted for the IGEPv2 platform - if you are following this tutorial and have an IGEPv2, consider using http://wiki.jmaustin.org/wiki/IgepSGXUbuntu instead

SDK unPackage Script
Download the latest version of the "create_sgx_package.sh" script 2.6.37 wget https://github.com/RobertCNelson/stable-kernel/raw/master/create_sgx_package_2.6.37.sh 2.6.38+ wget https://github.com/RobertCNelson/stable-kernel/raw/master/create_sgx_package.sh

Make script executable chmod a+x ./create_sgx_package.sh

Run script ./create_sgx_package.sh

After Successfully running:

GFX_Linux_SDK.tar.gz                           : -> Copy to Beagle (DEMO's) Graphics_SDK_setuplinux_X_XX_XX_XX.bin SDK SDK_BIN

Beagle: GFX_*_libs.tar.gz
tar xf GFX_4_00_00_01_libs.tar.gz (extracts install-SGX.sh and run-SGX.sh) ./install-SGX.sh (copies necessary SGX libs and startup script) ./run-SGX.sh (force run the new init script, or you can just reboot...)

On Successful install: Stopping PVR Starting PVR Starting SGX fixup for ES2.x (or ES3.x) (or ES5.x xM)

Reboot for good measure sudo reboot

Beagle: GFX_Linux_SDK.tar.gz
tar xf GFX_Linux_SDK.tar.gz cd GFX_Linux_SDK tar xf OGLES.tar.gz

Test SGX with a DEMO
cd OGLES/SDKPackage/Binaries/CommonX11/Demos/EvilSkull ./OGLESEvilSkull

Trouble Shooting
sudo rm /etc/powervr-esrev sudo depmod -a omaplfb sudo /etc/init.d/pvr restart

gst-dsp
Seems to work on all Beagle's, with atleast 2.6.38+ now...

Requirements: 2.6-stable from launchpad or 2.6.38+ deb's from rcn-ee.net. (the Demo Images hosted on rcn-ee.net meet this requirement) https://github.com/RobertCNelson/stable-kernel

Download the latest version of the "create_dsp_package.sh" script wget https://github.com/RobertCNelson/stable-kernel/raw/master/create_dsp_package.sh

Make script executable chmod a+x ./create_dsp_package.sh

Package script: ./create_dsp_package.sh

Copy DSP_Install_libs.tar.gz to beagle

Setup network...

Extract: tar xf DSP_Install_libs.tar.gz

Install ./install-DSP.sh

Build gst-dsp stuff.. ./install-gst-dsp.sh

Playbin: sudo gst-launch playbin2 uri=file://(file)

Xorg omapfb Drivers
By default Debian will try* to use the FBDEV video driver, however for the beagleboard we can take advantage of a more software optimized driver (still not using the sgx video hardware) using the NEON extensions of the Cortex-A8 core.

Lenny might need this xorg.conf, but it's best to use omapfb later in this guide..

/etc/X11/xorg.conf: Section "Device" Identifier	"Configured Video Device" Option		"UseFBDev"		"true" Driver		"fbdev" EndSection

cat /var/log/Xorg.0.log | grep FBDEV (II) FBDEV: driver for framebuffer: fbdev (II) FBDEV(0): using default device (II) FBDEV(0): Creating default Display subsection in Screen section (==) FBDEV(0): Depth 16, (==) framebuffer bpp 16 (==) FBDEV(0): RGB weight 565

Login into Debian and open a new terminal, xorg has to be running..

xvinfo -display :0.0 X-Video Extension version 2.2 screen #0 no adaptors present

Drivers
Note: These are built with neon optimizations: http://git.debian.org/?p=collab-maint/xf86-video-omapfb.git;a=blob;f=debian/rules;h=c2f0d5391c96c5abb60b1e691ad86bb27e0c17d8;hb=HEAD (line 48/49)

Lenny: wget -c http://rcn-ee.homeip.net:81/dl/deb-sbuild/lenny/xorg-drivers/xserver-xorg-video-omap3_0.1.1-2_armel.deb sudo dpkg -i xserver-xorg-video-omap3_0.1.1-2_armel.deb

Squeeze/Sid: sudo apt-get install xserver-xorg-video-omap3

xorg.conf
/etc/X11/xorg.conf

Section "Monitor" Identifier "Configured Monitor" EndSection Section "Screen" Identifier "Default Screen" Device "Configured Video Device" #Limited by SGX? DefaultDepth 16 EndSection Section "Device" Identifier "Configured Video Device" Driver "omapfb" Option "fb" "/dev/fb0" EndSection

To verify it was correctly installed, reboot and:

cat /var/log/Xorg.0.log | grep omapfb (II) LoadModule: "omapfb" (II) Loading /usr/lib/xorg/modules/drivers//omapfb_drv.so (II) Module omapfb: vendor="X.Org Foundation" (II) omapfb: Driver for OMAP framebuffer (omapfb) and external LCD controllers: (WW) Error opening /sys/devices/platform/omapfb/ctrl/name: No such file or directory (II) omapfb(0): VideoRAM: 1800KiB (SDRAM) (II) omapfb(0): Creating default Display subsection in Screen section (**) omapfb(0): Depth 16, (--) framebuffer bpp 16 (==) omapfb(0): RGB weight 565 (==) omapfb(0): Default visual is TrueColor (--) omapfb(0): Virtual size is 1280x720 (pitch 1280) (**) omapfb(0): Built-in mode "current" (==) omapfb(0): DPI set to (96, 96) (II) omapfb(0): DPMS enabled (II) omapfb(0): Video plane capabilities: (II) omapfb(0): Video plane supports the following image formats: (II) omapfb(0): XVideo extension initialized

Login into Debian and open a new terminal, xorg has to be running..

xvinfo -display :0.0 X-Video Extension version 2.2 screen #0 Adaptor #0: "OMAP XV adaptor" number of ports: 1 port base: 56 operations supported: PutImage supported visuals: depth 16, visualID 0x21 number of attributes: 1 etc..

Building Kernel
https://github.com/RobertCNelson/stable-kernel

Download SRC git clone git://github.com/RobertCNelson/stable-kernel.git

Build Kernel ./build_kernel.sh

Optional Building Deb File ./build_deb.sh

= Upgrading from Debian 5 to Debian 6 =

Upgrading from Debian 5 to Debian 6 report and tutorial.