Beagle Bone Black (BBB) Building a Custom Kernel – Active – git://

Last Modified 2015.04.07

Ubuntu 14.04.2 – Beagle Bone Black (BBB) Building a Custom Kernel – Active but no UARTs – git://

01. Install prerequisite software on BBB Ubuntu build system (Virtualbox VM install of Ubuntu 14.04.2 32bit Desktop):
$ sudo apt-get update
$ sudo apt-get install aptitude ssh
$ sudo aptitude full-upgrade –full-resolver
$ sudo aptitude install automake autoconf binfmt-support bridge-utils build-essential cpu-checker curl debootstrap fakeroot fuseext2 gawk gcc-arm-linux-gnueabi genext2fs gettext gnome-shell ubuntu-gnome-desktop gnome-tweak-tool elementary-icon-theme gnome-system-tools gobjc++-arm-linux-gnueabi hwdata kvm-ipxe libaio1 libfdt1 libglib2.0-dev libltdl-dev libncurses5-dev librados2 librbd1 libsdl1.2debian libssl-dev libtool libvde0 libvdeplug2 libwrap0-dev lzop make module-assistant msr-tools pkg-config python python-software-properties qemu-common qemu-keymaps qemu-kvm qemu-system qemu-user qemu-user-static qemu-utils seabios software-properties-common subversion sysfsutils u-boot-tools vde2 vgabios xmlto xmltoman
$ reboot
$ sudo apt-get install –install-recommends linux-generic-lts-utopic xserver-xorg-lts-utopic libgl1-mesa-glx-lts-utopic libegl1-mesa-drivers-lts-utopic
$ reboot

After reboot install Virtualbox guest additions.

02. Install latest GIT:
$ sudo add-apt-repository ppa:git-core/ppa
$ sudo apt-get update
$ sudo apt-get install git git-core
$ git config –global “”

03. U-Boot:
$ cd /root
$ mkdir /root/beaglebone/ && mkdir /root/beaglebone/u-boot/
$ cd /root/beaglebone/u-boot/
$ wget
$ tar -xjf u-boot-latest.tar.bz2
$ cd /root/beaglebone/u-boot/u-boot-2015.01
$ make sandbox_defconfig tools-only
$ sudo install tools/mkimage /usr/local/bin
$ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- am335x_boneblack_defconfig
$ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi-

04. Compiling the BeagleBone Black (BBB) Kernel:
$ cd /root/beaglebone/
$ git clone git://
$ linux/scripts/patch-kernel linux #If you see, “cannot find patch file: patch-3.14.xx” no patch is needed, you have the current source.
$ cd /root/beaglebone/linux
$ git checkout 3.14
$ wget\;a=blob_plain\;f=bin/am335x-pm-firmware.bin\;hb=HEAD -O firmware/am335x-pm-firmware.bin
$ cp /root/beaglebone/linux/arch/arm/configs/bb.org_defconfig /root/beaglebone/linux/.config

Steps 04a through 04c are done in the “/root/beaglebone/linux” directory.

04a. Edit the .config file to reflect your changes, if any:
$ nano /root/beaglebone/linux/.config


04a. You could also use menuconfig to edit the .config file:
$ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- menuconfig

04b. Build the kernel for the BBB. Takes 20 minutes or more:

$ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- uImage am335x-boneblack.dtb LOADADDR=0x80008000 -j4

04c. Build the kernel modules. Takes 45 minutes or more:

$ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- modules -j4

The following steps assume you already have a working Ubuntu 14.04.2 MicroSD with boot and rootfs partitions.

05. Update u-boot:
$ su
$ cd /root
$ mkdir boot
$ fdisk -l
$ mount /dev/sdX1 boot
$ cp /root/beaglebone/u-boot/u-boot-2015.01/MLO /root/boot
$ cp /root/beaglebone/u-boot/u-boot-2015.01/u-boot.img /root/boot
$ sync
$ cd /root
$ umount boot

06. Update rootfs and zImage (kernel):
$ su
$ cd /root
$ mkdir rootfs
$ fdisk -l
$ mount /dev/sdX2 rootfs
$ cd /root/beaglebone/linux
$ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- INSTALL_MOD_PATH=/root/rootfs modules_install
$ cp /root/beaglebone/linux/arch/arm/boot/zImage /root/rootfs/boot/
$ cp /root/beaglebone/linux/.config /root/rootfs/boot/
$ sync
$ cd /root
$ umount rootfs

Remove the MicroSD card from your adapter, and then boot into your custom kernel.


N01. Check current running kernel .config:
$ cat /proc/config.gz | gunzip > running.config

N02. References:


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s