At the time of writing, barebox officially supports the BeagleBone but not u-boot.Barebox also is more similar to GNU/Linux command line than u-boot.
Theses instructions require:
- An USB/Serial adapter to get the serial console
- A microUSB cable
- A computer with Parabola
- Optionally 4GB of space for backing up the internal eMMC in case something goes wrong.
- Optionally a 4GB microSD for recovery
First make sure that you have a compiler that can produce arm binaries
$ sudo pacman -S arm-none-eabi-gcc
Then we have to download and build barebox since we have no packages or binaries yet:
$ git clone git://git.pengutronix.de/barebox $ cd barebox $ export ARCH=arm $ export CROSS_COMPILE=arm-none-eabi- $ make am335x_mlo_defconfig $ make $ make am335x_defconfig $ make
This will produce many binaries, for many different devices. The only ones that interest us here are:
Then we will backup the default image for recovery purpose and use the default u-boot to install barebox.
First interrupt the startup in u-boot by following what it says on the serial console, then in u-boot a prompt will appear. You can then access the internal eMMC with this command:
ums 0 mmc 1
You can make a backup of it with ddrescue:
ddrescue /dev/sdZ beaglebone-eMMC.img beaglebone-eMMC.log
To install barebox, use fdisk to format the disk with MBR paritions: Remove any existing partitions and create the first partition at the beginning as FAT32 Then set it bootable (not sure if it's required) Then format it as vfat:
mkfs.vfat -n BOOT /dev/sdZ1
Then mount it and copy barebox on it:
$ sudo mount /dev/sdZ1 /mnt $ sudo cp images/barebox-am33xx-beaglebone-mlo.img /mnt/MLO $ sudo cp images/barebox-am33xx-beaglebone-mlo.img /mnt/barebox.bin
Then at next power on, the board will be running barebox.