Beaglebone

https://beagleboard.org is well documented down to the schematic level.

Figure 3.2. Beagle Bone

beaglebone

Get image from https://beagleboard.org/latest-images

As the getting started page shows the image can be downloaded and flashed to a SDcard using the balenaEtcher program that runs without installation under Linux.

Power can be 5V on the jack power plus is the pin to run the CPU at full speed

The USB mini connector is just available on the Beaglebone (not Beaglebone Black) and has lot of functions. The secret is it has a USB hub implemented so more than one USB device appears. The functions are:

Since it is Debian, packet installation, update and other things work using the debian commands

Gentoo on Beaglebone

There is the older Beaglebone with its guide to install Gentoo https://wiki.gentoo.org/wiki/BeagleBone_Black and the Beaglebone Black the newer one having HDMI output https://wiki.gentoo.org/wiki/BeagleBone_Black some other help can be found at https://elinux.org/BeagleBone

To have the board up and running a kernel and uboot the bootloader are required.

On New Beaglebone versions there is an embedded NAND flash where the x-loader and boot loader are. This however could become corrupt. In this case hold down the reset (or user) button during reset and it tries locate x-loader and bootloader on the SD card.

Old beagle bones do not have a NAND flash and boot just from the SD card.

The Gentoo documents ask to get kernel and bootloader sources and compile them creating and use a cross compiler. Alternatively this work can be avoided by taking already working bootloaders and kernels that once the system boots can be replaced. Therefore here a very quick guide:

A SD card with at least 4GB is required. First bootable partition has to be around 100MB FAT32 fdisk type c and bootable. The second partition takes the rest and is fdisk type 83 with ext4. It is not recommended to have a swap partition (= SD card killer)

To have a fast gentoo installation, copy all you found as MLO, u-boot.img, uEnv.txt, uImage from the original Angström distribution to a SD cards first bootable partition .

MLO, u-boot.img and uEnv.txt are the bootloader. uImage is the kernel. Gentoo advises that uEnv.txt should hold the following, however it boots also with what the file from Angström

bootfile=uImage
loaduimage=run loaduimagefat; run mmcboot

The bootloader uboot does not need to setup the MBR since Beaglebone is more advanced than most PC's and has an internal ROM where a two stage u-boot bootloader can be installed see http://processors.wiki.ti.com/index.php/AM335x_U-Boot_User%27s_Guide. Just having the first partition setup already allows to test that. When attaching a terminal program as gtkterm (baudrate 115200 and ttyUSB0) it can seen that it boots and starts the kernel, however the kernel then will not find the root filesystem and init and therefore panic.

Note

The kernel used is big an monolithic, this means just the uImage file is necessary and no kernel device driver files in /lib/modules are required

The second partition holds the root filesystem. Obtain and copy from Gentoo mirrors stage3 and portage-snapshot

Important is adjusting /etc/fstab so the kernel will find the root filesystem and init

To be able to login via serial link change in /etc/inittab

s0:12345:respawn:/sbin/agetty -L 9600 ttyS0 vt100

to

s0:12345:respawn:/sbin/agetty -L 115200 ttyO0 vt100

Instead of creating a root password delete it by putting

 root::10770:0:::::

to /etc/shadow

The root password can be later set in the console using passwd

When done, plug SD card into Beaglebone and boot.

To really work with it, it needs to know the time otherwise things as updating and installing packages via emerge would fail. But there is no battery powered real time clock on the board, so set the time zone and set date and time first manually by date <MMDDhhmmYYYY> and then from Internet

emerge net-misc/ntp

rc-update add ntpd default

rc-update add ntp-client default

/etc/init.d/ntp-client start

/etc/init.d/ntpd start

Check the regular Gentoo setup steps from https://wiki.gentoo.org/wiki/Project:ARMas configure network, system logger, cron, keyboard setup, emerge missing packets and maybe think about distcc and crosscompilation.


Linurs startpage