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 sudo ./mk_mmc.sh --mmc /dev/sdX --uboot beagle_bx --distro squeeze

Install script for Beagle Cx sudo ./mk_mmc.sh --mmc /dev/sdX --uboot beagle_cx --distro squeeze

Install script for Beagle xM A/B/C sudo ./mk_mmc.sh --mmc /dev/sdX --uboot beagle_xm --distro squeeze

Install script for BeagleBone A2/A3 sudo ./mk_mmc.sh --mmc /dev/sdX --uboot bone --distro squeeze

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


 * Options:
 * --uboot : beagle, panda, bone
 * --distro : squeeze
 * --firmware : installs firmware
 * --serial-mode : debian-installer uses Serial Port

NOTE: There is a bug in the USB Keyboard mapping, the debian-installer will initially fail, if and when the error occurs switch to the option "kernel keymap" and continue installing..

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 export ARCH=armel Beagle/Panda export BOARD=omap BeagleBone export BOARD=omap-psp wget http://rcn-ee.net/deb/${DIST}-${ARCH}/LATEST-${BOARD} wget $(cat ./LATEST-${BOARD} | grep STABLE | awk '{print $3}') /bin/bash install-me.sh

Reboot with your new Kernel

= Debian armhf port =

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

Status: http://wiki.debian.org/ArmHardFloatTodo

Debian Wheezy snapshot 2012-02-03
Image Updated:
 * Feb 3rd: -2012-02-03
 * Switched image to wheezy vs sid..
 * Beagle/Panda: v3.2.2 kernel, ulcd now aligned and touch works
 * BeagleBone: v3.2 kernel, usb works much better, dvi cape works (thanks koen)
 * Dec 7:
 * Switched image to sid vs ports/unstable..

Services Active: Note: Depending on your internal network these may work out the box SSH, Port 22: ssh ubuntu@omap Getty, Serial Port

Default user: debian pass: temppwd

Default root user: root pass: root

Get prebuilt image:

wget http://rcn-ee.net/deb/rootfs/wheezy/wheezy-minimal-armhf-2012-02-03.tar.xz mirrors (will take some time to update): wget http://ynezz.ibawizard.net/beagleboard/wheezy/wheezy-minimal-armhf-2012-02-03.tar.xz

Verify Image with: md5sum wheezy-minimal-armhf-2012-02-03.tar.xz d70a8fbdb4e3ae120f5130c1c24bf590 wheezy-minimal-armhf-2012-02-03.tar.xz

Unpack Image: tar xJf wheezy-minimal-armhf-2012-02-03.tar.xz cd wheezy-minimal-armhf-2012-02-03

Install Image:

Quick Install script for "board" sudo ./setup_sdcard.sh --mmc /dev/sdX --uboot "board"

"board" Options:
 * BeagleBoard Ax/Bx - beagle_bx
 * BeagleBoard Cx   - beagle_cx
 * BeagleBoard xMA/B/C   - beagle_xm
 * BeagleBone Ax   - bone
 * PandaBoard Ax - panda
 * PandaBoard ES - panda_es

So For the BeagleBoard xM: sudo ./setup_sdcard.sh --mmc /dev/sdX --uboot beagle_xm


 * Additional Options
 * --rootfs
 * --swap_file 
 * --addon pico
 * --addon ulcd 
 * --svideo-ntsc <use ntsc over dvi for video)
 * --svideo-pal <use pal over dvi for video)

Advanced: Build Image:

Built with a fork of project-rootstock (ARM native mode, run directly on beagleboard), using a script from omap-image-builder:

git clone git://github.com/RobertCNelson/omap-image-builder.git cd omap-image-builder git checkout v2012.2-1 -b v2012.2-1 ./build_image.sh

= 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.