Bbblfs

Flash your BeagleBone Black via USB

Download as .zip Download as .tar.gz View on GitHub

BBBlfs

Build Status

Beagle Bone Black Linux Flash System

This project provides a way to flash a BeagleBone Black via USB from a Linux machine. The project was developed during Google Summer of Code '13.

Build

sudo apt-get install libusb-1.0-0-dev
./autogen.sh
./configure
make

Usage

Press the S2 button on the BeagleBone Black and apply power to the board. The board should start now into USB boot mode.

Connect the board to the host PC. The kernel should now identify your board as an RNDIS interface. Be sure you do not have any BOOTP servers on your network.

Go to bin/ and execute flash_script.sh It needs the flashing image as argument to be provided.

For now only .xz compressed images are supported.

sudo ./flash_script.sh [ debian | ubuntu | image.xz ]

If there are bugs please feel free to contact me.

How to build the binary blobs

The full system works as follow:

Building U-Boot for USB booting

make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- am335x_evm_usbspl_defconfig
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi-

Now you have u-boot.img which is the uboot binary and spl/u-boot-spl.bin which is the spl binary

Building the Kernel

git checkout 3.14
./patch.sh
cp configs/beaglebone kernel/arch/arm/configs/beaglebone_defconfig
wget http://arago-project.org/git/projects/?p=am33x-cm3.git\;a=blob_plain\;f=bin/am335x-pm-firmware.bin\;hb=HEAD -O kernel/firmware/am335x-pm-firmware.bin
cd kernel
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- beaglebone_defconfig -j4
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- zImage dtbs modules -j4

Building the ramdisk

mkdir initramfs
mkdir -p initramfs/{bin,sbin,etc,proc,sys}
cd initramfs
wget -O init https://raw.githubusercontent.com/ungureanuvladvictor/BBBlfs/master/tools/init
chmod +x init
git clone git://git.busybox.net/busybox
cd busybox
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- defconfig
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- menuconfig
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- -j4
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- install CONFIG_PREFIX=/path/to/initramfs
cd /path/to/kernel/sources
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- modules_install INSTALL_MOD_PATH=/path/to/initramfs

Packing things up

mkdir maker
cd /path/to/initramfs
find . | cpio -H newc -o > ../initramfs.cpio
cd .. && cat initramfs.cpio | gzip > initramfs.gz
mv initramfs.gz /path/to/maker/folder/ramdisk.cpio.gz
sudo apt-get update
sudo apt-get install u-boot-tools device-tree-compiler
cd /path/to/maker/folder
wget -O maker.its https://raw.githubusercontent.com/ungureanuvladvictor/BBBlfs/master/tools/maker.its
cp /path/to/kernel/arch/arm/boot/zImage .
cp /path/to/kernel/arch/arm/boot/dts/am335x-boneblack.dtb .
mkimage -f maker.its FIT

Contact

[email protected]

vvu on #beagle, #beagle-gsoc