BeagleBone Black (BBB) is a credit card sized computer having the capability to run many image processing algorithms and low power embedded applications. Main attraction of this hardware that its an OpenHardware. One can get, modify design files or build your own BBB clones and will reduce the Time to Market.
Ths post will give some idea about the Kernel compilation steps for BeagleBone. The instructions were tested in LinuxMint-17 and can be used with any debian based distros. Kernel version chosen is 3.14, as it is the latest officially supported Kernel from the makers of BBB.
The commands are run in Host system, with ARM cross compilation toolchain preinstalled. For installing GCC ARM toolchain in Ubuntu/LinuxMint run the following command
sudo apt-get install gcc-4.7-arm-linux-gnueabihf ncurses-dev uboot-mkimage build-essential
Note: The instructions below is deprecated. Please follow the new instructions from https://github.com/beagleboard/linux
git clone git://github.com/beagleboard/kernel.git cd kernel git checkout 3.14 ./patch.sh
Copy configuration file needed for BeagleBone kernel compilation. This step is important and should be implemented without errors.
cp configs/beaglebone kernel/arch/arm/configs/beagleboneblack_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
Change directory by typing the following
Make sure you are able to cross compile. Just run “arm-linux-gnueabi-gcc” in your host system terminal. Terminal should complain as follows
arm-linux-gnueabi-gcc: fatal error: no input files compilation terminated.
This indicated that your cross compilation toolchain for ARM is installed and is on your System Path. For more idea please check into your /usr/bin directory.
Next run the following commands in its given order
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- beagleboneblack_defconfig make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- -j4 uImage dtbs LOADADDR=0x80008000 -j4 make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- -j4 modules
Next set a Rootfs directory in your home directory by
Install rootfs to this directory
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- INSTALL_MOD_PATH=/home/<username>/rootfs modules_install
Next copy the output files to BBB filesystem after inserting your SD Card with BBB OS.
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- uImage-dtb.am335x-boneblack rm -f /media/Angstrom/boot/uImage cp arch/arm/boot/uImage /media/Angstrom/boot/ cp arch/arm/boot/dts/am335x-bone.dtb /media/Angstrom/boot/