Gentoo+installation

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: mkdosfs -n BeagleBoot -F16 /dev/mmcblk0p1
 * Second partition: mke2fs -j -L BeagleRoot -N 360000 -m 0 /dev/mmcblk0p2

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

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
 * Download the package manager and extract this on the Root Partition


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

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
 * Type into the terminal window:


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

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

SSH on BeagleBoard

 * You can start the daemon by issuing: /etc/init.d/sshd start


 * To start it automatically: rc-update add sshd default

OpenCV on BeagleBoard

 * update package: emerge -a1O portage

Update Gentoo
emerge --sync emerge portage