Update: Oct, 2014
After not using the BeagleBoard for a while, I discovered that it was very difficult to find information on how to get it to boot up a recent kernel/distribution.
Finally found that information here.
Much of the information below is probably not relevant anymore, but I am leaving it in case there is anything helpful.
Running Debian on Beagleboard xM (Rev. C)
These are the steps I took to get Debian running on Beagle. Knowledge of basic Linux environments is assumed; i.e. how to mount USB drives, how to make a file executable, etc.
If you are starting from the included Angstrom distribution, you need to install/obtain Debootstrap, a tool for creating a Debian installation from scratch. A .tar.gz package is available from the Debian site. I manually installed the .deb by using ar -x to extract the contents of the .deb file, then copied the appropriate files to /usr.
If Angstrom complains that packages are missing, you can manually intstall them like so (reference):
# most packages can be downloaded from this filesystem: http://ftp.debian.org/pool/ # for example, http://ftp.debian.org/pool/main/s/sed/sed_4.1.5-6_armel.deb. # You can find the package you need via a web browser, then copy the link. wget http://ftp.debian.org/pool/main/d/debootstrap/debootstrap_1.0.26+squeeze1_all.deb ar -x debootstrap_1.0.26+squeeze1_all.deb WORK_DIR=`pwd` cd / zcat $WORK_DIR/data.tar.gz | tar xv
If you need the Beagleboard Angstrom distribution, here is a link to one that works with C4. I obtained this from Beagle support, so if they ask me to take it down I will. I won’t go into installing it, but this can be done using dd.
- Make sure networking is available on your Beagle, from an Ethernet cable, the USB Ethernet gadget, or elsewhere.
- I installed Debian onto a micro-SD card which was connected to the Beagle through a USB micro-SD adapter. I kept having problems with the USB EHCI bus resetting whenever I tried to remount my filesystem after installing the base system; so essentially I had to install the base system in one try before a successful boot.
- Do not mount the SD card. If it is mounted, unmount it.
- Create a bootable filesystem on the card.
- If the script doesn’t work, the key point is that the card geometry must be 255 heads, 63 sectors/track, Total bytes/255/63/512 cylinders, partitioned into 2 partitions- 1 – VFAT, 2 – Ext3, and formatted.
Script requires the packages: bc, kpartx, dosfstools.
kpartx isn’t available on Angstrom, but it works without it.
opkg install bc #for Angstrom. ./omap3-mkcard.sh /dev/sda
mkdir /mnt/sda1 /mnt/sda2 mount /dev/sda1 /mnt/sda1 mount /dev/sda2 /mnt/sda2
The u-boot files are already on the Angstrom partition 1. If you’re in Angstrom, that should be in /media/mmcblk0p1/. Copy all of them to the first partition of your sdcard (/mnt/sda1 in this example).
cp /media/mmcblk0p1/* /mnt/sda1/
IMPORTANT: If you plan on using a kernel >= 2.6.32, edit the uEnv.txt file’s last line, and change the console from ttyS2 to ttyO2.
cd /mnt/sda2 debootstrap --arch=armel --foreign sid . chroot /mnt/sda2 bash debootstrap/debootstrap --second-stage mount -t proc proc /proc mount -t sysfs sysfs /sys mount -t devpts devpts /dev/pts aptitude install screen #this is optional but comes in handy. aptitude install wget #if wget isn't already installed
- You should now be inside of a fully functioning Debian environment. We now need to be able to boot this, so we need a kernel.
Install a kernel from http://rcn-ee.net/deb/. The below is only an example using the latest sid kernel; you can choose your own; the process is similar.
wget http://rcn-ee.net/deb/sid/v3.0.4-x3/install-me.sh mv install-me.sh /root/ cd /root
Open install-me.sh, and manually run the commands in the script (this system isn’t configured in the way this script expects). You can use screen to split the screen and view the text file on top while running commands on the bottom.
Here are the essentials of this script for the kernel above.
apt-get install -y uboot-mkimage initramfs-tools wget -c http://rcn-ee.net/deb/sid/v3.0.4-x3/linux-image-3.0.4-x3_1.0sid_armel.deb dpkg -i linux-image-3.0.4-x3_1.0sid_armel.deb mkimage -A arm -O linux -T kernel -C none -a 0x80008000 -e 0x80008000 -n 3.0.4-x3 -d /boot/vmlinuz-3.0.4-x3 uImage mkimage -A arm -O linux -T ramdisk -C none -a 0 -e 0 -n initramfs -d /boot/initrd.img-3.0.4-x3 uInitrd
Edit /etc/inittab to enable the serial console when booting. Find and un-comment the T0 and T1 lines (shown below), and add T2. Remember: if your kernel >= 2.6.32, you need to use /dev/ttyO2 for the Beagle serial console.
# Example how to put a getty on a serial line (for a terminal) # T0:23:respawn:/sbin/getty -L ttyO0 115200 vt100 #<-- uncommented this (optional) T1:23:respawn:/sbin/getty -L ttyO1 115200 vt100 #<-- uncommented this (optional) T2:23:respawn:/sbin/getty -L ttyO2 115200 vt100 #<-- created this line (non-optional for serial boot)
exit exit #exit out of the Debian environment cp /mnt/sda2/boot/uI* /mnt/sda1/
- You should be able to reboot into a functioning Debian environment now.
Add the following to /etc/network/interfaces:
auto lo iface lo inet loopback
You could also install the base system onto the key by running debootstrap --arch=armel --foreign sid . on any available Debian system. However, you need to run the –second-stage on the physical ARM hardware.
ADB Binary for Beagleboard
If you would like to run the ADB tool on Beagleboard, here is the binary. Download, copy it to your Beagleboard Linux installation, and rename it from “_adb” to “adb”. (Note, 2017-01-06: Unfortunately, I must have lost the binary when moving servers.)
This binary was compiled on 9/9/2011 from the git source at codeaurora.org (Kernel.org has been down recently due to a hack.
Confirmed that this works on Angstrom distro for Beagleboard xM; beagleboard 2.6.32 #3 PREEMPT and also on Linux beagleboard 126.96.36.199-x3 #1 SMP
Compiling ADB for Linux
I have a full Debian environment on my Droid Incredible (DINC), so I was able to native compile it on my phone.
$ sudo apt-get install build-essential libncurses5-dev $ git clone git://codeaurora.org/platform/system/core.git system/core $ git clone git://codeaurora.org/platform/build.git build $ git clone git://codeaurora.org/platform/external/zlib.git external/zlib $ git clone git://codeaurora.org/platform/bionic.git bionic
Then, download the Makefile from here (it downloads in tar.gz format so you have to uncompress it).
Note that as of 9/9/2011, the ADB sources are in system/core/adb after you download the source. That is where I put the Makefile.
Since I native-compiled it on an ARM platform, I changed the line:
Then, cd’ing into system/core/adb and running make worked like a charm. Then copied it from the DINC to the Beagleboard and it ran perfectly.
Fix xM’s GDM Greeter
Beagleboard-xM Angstrom image comes with a blank password for root, and automatically logs in to gdm.
When you try to change the root password and add a user, the “greeter” is blank and does not display any logins.
To fix, I ran:
opkg --force-reinstall install dbus