Difference between revisions of "BeagleBoardDebian"

From eLinux.org
Jump to: navigation, search
m (Development PC: Setup U-boot for Normal Boot)
m (SGX Video Acceleration: sync with ubuntu)
Line 233: Line 233:
 
== SGX Video Acceleration ==
 
== SGX Video Acceleration ==
  
Note: With 3_01_00_07 we don't have to register any more, the file is fully wget-able..
+
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)
 
 
http://tigraphics.blogspot.com/2010/08/sgx-graphics-sdk-3010007-now-available.html.
 
 
 
Requirements: 2.6-stable from launchpad or 2.6.35.3-x1+ deb's from rcn-ee.net
 
 
   https://code.launchpad.net/~beagleboard-kernel/+junk/2.6-stable
 
   https://code.launchpad.net/~beagleboard-kernel/+junk/2.6-stable
  
Line 245: Line 241:
  
 
Download the latest version of the "create_sgx_package.sh" script
 
Download the latest version of the "create_sgx_package.sh" script
  http://bazaar.launchpad.net/~beagleboard-kernel/%2Bjunk/2.6-stable/annotate/head:/create_sgx_package.sh (click: download file)
+
  wget http://rcn-ee.homeip.net:81/dl/updates/2.6-stable/create_sgx_package.sh
 
 
:~/temp$ ls
 
create_sgx_package.sh
 
  
 
Make script executable
 
Make script executable
Line 260: Line 253:
 
  :~/temp$ ls
 
  :~/temp$ ls
 
  create_sgx_package.sh
 
  create_sgx_package.sh
  GFX_3_01_00_07_libs.tar.gz                      : -> Copy to Beagle (System Libs)
+
  GFX_4_00_00_01_libs.tar.gz                      : -> Copy to Beagle (System Libs)
 
  GFX_Linux_SDK.tar.gz                            : -> Copy to Beagle (DEMO's)
 
  GFX_Linux_SDK.tar.gz                            : -> Copy to Beagle (DEMO's)
  OMAP35x_Graphics_SDK_setuplinux_3_01_00_07.bin
+
  Graphics_SDK_setuplinux_4_00_00_01.bin
 
  SDK
 
  SDK
 
  SDK_BIN
 
  SDK_BIN
Line 268: Line 261:
 
=== Beagle: GFX_*_libs.tar.gz ===
 
=== Beagle: GFX_*_libs.tar.gz ===
  
  tar xf GFX_3_01_00_07_libs.tar.gz  (extracts install-SGX.sh and run-SGX.sh)
+
  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)
 
  ./install-SGX.sh (copies necessary SGX libs and startup script)
 
  ./run-SGX.sh (force run the new init script, or you can just reboot...)
 
  ./run-SGX.sh (force run the new init script, or you can just reboot...)

Revision as of 12:38, 30 December 2010

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:

  • 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

Debian NetInstall

You will need a 1GB SD card or greater.

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

Debian Squeeze

Currently in beta-2 but the netinstall is pretty reliable. (12/30/2010)

git clone git://github.com/RobertCNelson/netinstall-omap.git
cd netinstall-omap
./mk_mmc.sh --mmc /dev/sdX --distro squeeze --firmware
  • Options:
    • --distro : squeeze, lucid
    • --firmware : installs firmware
    • --serial-mode : debian-installer uses Serial Port

On first boot, hold down the user button, this enables the debian-installer..

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-omap/scripts/dvi.cmd
gedit ./netinstall-omap/scripts/serial.cmd

Normal Boot Settings:
gedit ./netinstall-omap/scripts/dvi-normal-squeeze.cmd
gedit ./netinstall-omap/scripts/serial-normal-squeeze.cmd

Debian Lenny

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

50 MiB Primary Partition, fat32
Leave remaining space for the Debian-Installer
Mount your SD card fat32 partition. (/media/disk/)
cd /media/disk/
sudo wget http://rcn-ee.net/deb/kernel/CC-beagle-v2.6.29-58cf2f1-oer44.1.uImage
sudo wget http://ftp.debian.org/debian/dists/lenny/main/installer-armel/current/images/versatile/netboot/initrd.gz
sudo mv CC-beagle-v2.6.29-58cf2f1-oer44.1.uImage uImage
sudo gzip -d initrd.gz
sudo dd if=initrd of=initrd.pad ibs=8388608 conv=sync

Create U-boot boot script for netinstall:

Debian Install over DVI Port

sudo nano netinstall.cmd
setenv bootcmd 'mmc init; fatload mmc 0:1 0x80300000 uImage; fatload mmc 0:1 0x81600000 initrd.pad; bootm 0x80300000'
setenv bootargs 'console=tty0 ramdisk_size=8192 root=/dev/ram0 rw rootfstype=ext2 initrd=0x81600000,8M omapfb.mode=dvi:1280x720MR-16@60'
boot

Debian Install over the Serial Port

sudo nano netinstall.cmd
setenv bootcmd 'mmc init; fatload mmc 0:1 0x80300000 uImage; fatload mmc 0:1 0x81600000 initrd.pad; bootm 0x80300000'
setenv bootargs 'console=ttyS2,115200n8 ramdisk_size=8192 root=/dev/ram0 rw rootfstype=ext2 initrd=0x81600000,8M'
boot

Create U-boot *.scr file:

sudo mkimage -A arm -O linux -T script -C none -a 0 -e 0 -n "Debian Lenny" -d ./netinstall.cmd ./boot.scr

Sync and Unmount your mmc card and boot the beagle, it should find the 'boot.scr' file on your first partition while booting.

Beagleboard: NetInstall

Choose a language
 C - No localization
 English - English
Configure the network:
 usb0: USB net <- See below for 2.6.29. Could not find usb0 with B7 installing 2.6.28.
 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? : <yes>
Partition disks: This partitioner doesn't have the inform.....? : <yes>
 Logical Volume Manager not available: <Continue>
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? : <yes>
No installable kernel was found in the defined APT sources? : 
 Continue without installing a kernel? : <yes>
Standard System
No BootLoader: <ok>

Development PC: Setup U-boot for Normal Boot

(IGNORE WITH SQUEEZE)

Planning to remove this section, pending Squeeze's Release... I moved the relevant data to: http://elinux.org/BeagleBoardDebian#U-boot_Scripts

Create a U-boot normal boot script:

DVI Port
sudo nano normal.cmd
setenv bootcmd 'mmc init; fatload mmc 0:1 0x80300000 uImage; bootm 0x80300000'
setenv bootargs 'console=tty0 root=/dev/mmcblk0p2 rootwait rootfstype=ext3 ro omapfb.mode=dvi:1280x720MR-16@60'
boot
Serial Port
sudo nano normal.cmd
setenv bootcmd 'mmc init; fatload mmc 0:1 0x80300000 uImage; bootm 0x80300000'
setenv bootargs 'console=ttyS2,115200n8 root=/dev/mmcblk0p2 rootwait rootfstype=ext3 ro'
boot

Create U-boot *.scr file:

sudo mkimage -A arm -O linux -T script -C none -a 0 -e 0 -n "Debian Lenny" -d ./normal.cmd ./boot.scr

Debian will fix the ext3 partition, it'll try to reboot, after halting remove and reapply power.

Beagleboard: Install Latest Kernel

Script File:

Lenny:
wget http://rcn-ee.net/deb/kernel/beagle/lenny/v2.6.32.11-x13/install-me.sh
sudo /bin/bash install-me.sh

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

Reboot with your new Kernel

Debian Configuration

U-boot Scripts

Create a U-boot normal boot script:

DVI Port
sudo nano normal.cmd
setenv bootcmd 'mmc init; fatload mmc 0:1 0x80300000 uImage; bootm 0x80300000'
setenv bootargs 'console=tty0 root=/dev/mmcblk0p2 rootwait rootfstype=ext3 ro omapfb.mode=dvi:1280x720MR-16@60'
boot
Serial Port
sudo nano normal.cmd
setenv bootcmd 'mmc init; fatload mmc 0:1 0x80300000 uImage; bootm 0x80300000'
setenv bootargs 'console=ttyS2,115200n8 root=/dev/mmcblk0p2 rootwait rootfstype=ext3 ro'
boot

Create U-boot *.scr file:

sudo mkimage -A arm -O linux -T script -C none -a 0 -e 0 -n "Debian Lenny" -d ./normal.cmd ./boot.scr

Debian will fix the ext3 partition, it'll try to reboot, after halting remove and reapply power.

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

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://code.launchpad.net/~beagleboard-kernel/+junk/2.6-stable

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

wget http://rcn-ee.homeip.net:81/dl/updates/2.6-stable/create_sgx_package.sh

Make script executable

chmod a+x ./create_sgx_package.sh

Run script

./create_sgx_package.sh

After Successfully running:

:~/temp$ ls
create_sgx_package.sh
GFX_4_00_00_01_libs.tar.gz                      : -> Copy to Beagle (System Libs)
GFX_Linux_SDK.tar.gz                            : -> Copy to Beagle (DEMO's)
Graphics_SDK_setuplinux_4_00_00_01.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 (Maverick's Alpha-1 needs this....)

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/ChameleonMan
./OGLESChameleonMan

Trouble Shooting

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

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

DSP

Kernel Build

https://launchpad.net/~beagleboard-kernel

Register on launchpad.net, install bzr

sudo apt-get install bzr

Download SRC

bzr branch lp:~beagleboard-kernel/+junk/2.6-stable

Build Kernel

./build_kernel.sh

Build Deb File

./build_deb.sh