Beaglebone

From Void Linux Wiki
Jump to: navigation, search

To install Void on a Beaglebone (Black) board, start by downloading the latest rootfs image for it:

For the glibc version:

$ wget https://repo.voidlinux.eu/live/current/void-beaglebone-PLATFORMFS-<date>.tar.xz

For the musl version:

$ wget https://repo.voidlinux.eu/live/current/void-beaglebone-musl-PLATFORMFS-<date>.tar.xz

In either case, make sure to check that sha256 is correct. The hash is stored in the sha256sums.txt file.

Preparing the SD card

The SD card must have at least 2 partitions, one formatted as FAT32 for /boot and another one as ext4 (the default kernel cmdline expects the rootfs to be in ext4) for /; let's begin preparing the partitions and mounting them in a directory:

$ parted /dev/sda ← change this to match your SD card
# Create the FAT32 partition of 64MB and make it bootable
(parted) mktable msdos
(parted) mkpart primary fat32 2048s 64MB
(parted) toggle 1 boot
# Create the rootfs partition until end of device
(parted) mkpart primary ext4 64MB -1
(parted) quit

Now let's create the filesystems in the SD card:

$ mkfs.vfat /dev/sdx1
$ mkfs.ext4 -O ^has_journal /dev/sdx2 ← change sdx in both lines to match your SD card's device

The -O ^has_journal option disables journaling on the ext4 partition. This will extend the life of your drive, as they are usually flash drives.

Preparing target rootfs directory

$ mkdir -p ~/rootfs
# mount /dev/sda2 ~/rootfs/

Unpack the rootfs into the target rootfs directory and sync to make sure files are written to storage:

# tar xvfJp void-beaglebone-PLATFORMFS-<date>.tar.xz -C ~/rootfs
# sync
Note: Do not forget to unpack the rootfs as root and with the -p flag to set appropriate permissions.

The U-Boot bootloader must be written to the FAT32 partition, and MLO must be written to the first sectors for booting:

# cp ~/rootfs/boot/MLO ~/rootfs
# cp ~/rootfs/boot/u-boot.img ~/rootfs
# mount /dev/sda1 ~/rootfs/boot
# mv ~/rootfs/MLO ~/rootfs/boot/
# mv ~/rootfs/u-boot.img ~/rootfs/boot/
# touch ~/rootfs/boot/uEnv.txt
# sync
Note: Additional settings should be appended to the uEnv.txt file stored in the FAT32 boot partition.

Umount the SD card filesystems from target rootfs directory:

# umount -Rv ~/rootfs

Now insert the SD card and verify that the BeagleBone/BeagleBone Black boots correctly. Remember, the root password is voidlinux.

By default dhcpcd, ntpd and sshd are started, so you should be able to establish a ssh connection to it.

Installing X11

At the very least this is the list of required packages:

# xbps-install -Sy xorg-minimal xf86-video-fbturbo

To install all X client applications:

# xbps-install -Sy xorg-apps

To install all X font packages:

# xbps-install -Sy xorg-fonts
Note: As a final step, make sure the user running X is part of groups audio and video.