Saturday, April 27, 2024
Username: Password:
Preparing the SD card

Start by connecting the SD card to a ready installed Linux box. You'll need to create 2 partitions on it:
- a small 50MB FAT32 partition to hold the Linux kernel
- a large ext3 partition that fills the remaining disk space

Use fdisk for this task:

# fdisk -l /dev/mmcblk0

Disk /dev/mmcblk0: 8040 MB, 8040480768 bytes
136 heads, 54 sectors/track, 2138 cylinders
Units = cylinders of 7344 * 512 = 3760128 bytes
Disk identifier: 0x00000000

        Device Boot     Start         End     Blocks Id System
/dev/mmcblk0p1             1         14     51381    b W95 FAT32
/dev/mmcblk0p2             15        2138     7799328 83 Linux


If you use a SD -> USB dongle, the SD card will appear at /dev/sdX, not /dev/mmcblkY.

Next, format the partitions:

mkfs.vfat /dev/mmcblk0p1
mkfs.ext3 -m 0 /dev/mmcblk0p2


Note: you might need to install the dosfstools package (or equivalent) for the mkfs.vfat command.


Copying the kernel and Gentoo image

Mount the fat32 partition and copy the kernel on it.

mkdir /mnt/fat
mount -t vfat /dev/mmcblk0p1 /mnt/fat
cd /mnt/fat
wget http://media.slashorg.net/beagleboard/uImage-latest
mv uImage-latest uImage
cd /root && umount /mnt/fat


Now we're going to deploy the Gentoo image on the second partition. The tar command will probably take some time.

mkdir /mnt/gentoo
mount /dev/mmcblk0p2 /mnt/gentoo
cd /mnt/gentoo
wget http://media.slashorg.net/beagleboard/gentoo-stage3-latest.tar.bz2
tar xvjf gentoo-stage3-latest.tar.bz2 && rm -f gentoo-stage3-latest.tar.bz2
cd /root && umount /mnt/gentoo



Booting for the first time

You should now be ready to boot Gentoo on the Beagleboard. After a little bit of configuring u-boot, that is. wink.gif

Insert the SD card in the Beagleboard, boot the board and interrupt the boot sequence by hitting any key.

ff42fc0b7727f0b4-2009-11-21-16-29-04-thumb.png


Using the usual u-boot commands (setenv, printenv, saveenv...), you'll need to set the following:

setenv sd_bootargs 'console=ttyS2,115200n8 root=/dev/mmcblk0p2 rw rootdelay=5 omapfb.mode=dvi:1280x720MR-16@60'
setenv sd_boot 'setenv bootargs ${sd_bootargs}; mmcinit; fatload mmc 0:1 0x80300000 uImage; bootm 0x80300000'
setenv bootcmd 'run sd_boot'
saveenv


Notes:
- if you're not using ttyS2 (the RS232 P9 connector on the board), then you'll need to change that for something else.
- use mmc init instead of mmcinit with recent uboot versions.

Now, if you type boot, Gentoo should boot.

bf8266743620c6dc-2009-11-21-16-28-05-thumb.png



Finishing up

Once the board has finished loading, login as root/admin. Use passwd to change the root password.

You'll probably want to install the portage tree:



Note: the tar command will take some time. Be patient!

And build the portage cache:

emerge --metadata



Need help?

You can use the dedicated forum to discuss the project or ask for help!