Introduction


Most Linux distributions are not optimized for the OMAP3. This leads to weak performances and a huge memory usage.
Gentoo is a optimized Linux distribution and therefor ideal to use in combination with the OMAP3 core.
This tutorial explains how to install Gentoo on a BeagleBoard.

The SD-card partitions

To create the partitions, we can use fdisk or Gparted. ( When you're using fdisk, make sure that the partitions are unmounted )
*We use an SD-card of 2GB and create 2 partitions.
The first partition is the boot-partition which is 24MB, this partition uses a FAT16 filesystem.
The second partition is the root-partition and is 1.7GB, this partition uses a EXT3 filesystem.

*Make sure you format those partitions before continuing to the next step. (when you're using GParted, formatting the SD-card is performed by applying the changes)
    • First partition: <pre> mkdosfs -n BeagleBoot -F16 /dev/mmcblk0p1 </pre>
    • Second partition: <pre> mke2fs -j -L BeagleRoot -N 360000 -m 0 /dev/mmcblk0p2 </pre>

Download Gentoo on SD-card


*Mount the BeagleRoot partition and browse to this partition:

cd /media/BeagleRoot

*Download a stage 3 gentoo for an arm7a hardfloat Cortex core and extract this on the Root Partition

sudo wget http://media.slashorg.net/beagleboard/gentoo-stage3-latest.tar.bz2
sudo tar xvjpf gentoo-stage3-latest.tar.bz2
sudo rm -v *.tar.bz2

  • Download the package manager and extract this on the Root Partition
sudo wget ftp://mirrors.tera-byte.com/pub/gentoo/snapshots/portage-latest.tar.bz2
sudo tar xvjf portage-latest.tar.bz2 -C usr
sudo rm -v *.tar.bz2



*Mount the BeagleBoot partition and browse to this partition:

cd /media/BeagleBoot

*Download a kernel that is optimized for the BeagleBoard

wget http://media.slashorg.net/beagleboard/uImage-latest
cp uImage-latest uImage

Configuration of U-boot on BeagleBoard


*Insert the SD-card into the card-reader of the BeagleBoard
*Connect the RS232 connector of the BeagleBoard to an RS232 connector on your PC
*Power up the beagle board while a terminal (hyperteminal or minicom window) is active.
**When the correct RS232 interface is selected on the PC, some terminal information is shown in this window.

*Hit a key to interrupt the startup procedure.

*Type into the terminal window:
setenv sd_bootargs 'console=ttyS2,115200n8 console=tty0 root=/dev/mmcblk0p2 rw rootdelay=5 omapfb.mode=dvi:1024x768MR-16@60'
setenv sd_boot 'setenv bootargs ${sd_bootargs}; mmcinit;fatload mmc 0:1 0x80300000 uImage; bootm 0x80300000'
setenv bootcmd 'run sd_boot'
saveenv

*The U-boot is now correct configured. Restart the BeagleBoard, it will now startup correctly.

Ethernet on BeagleBoard

  • use a USB-Ethernet adapter
  • DNS setting:
<pre> nano /etc/resolv.conf </pre>
<pre> nameserver ${NAMESERVER1} </pre>
Make sure you substitute ${NAMESERVER1} with the appropriate nameserver address.
  • IP-setting:
<pre> nano /etc/conf.d/net </pre>
<pre># For static IP using netmask notation
config_eth0="192.168.0.7 netmask 255.255.255.0"
routes_eth0="default via 192.168.0.1"</pre>

SSH on BeagleBoard

  • You can start the daemon by issuing:<pre> /etc/init.d/sshd start </pre>

*To start it automatically:<pre> rc-update add sshd default </pre>

OpenCV on BeagleBoard

  • update package: <pre> emerge -a1O portage </pre>
*

Update Gentoo

<pre>emerge --sync
emerge portage</pre>