Building Linux kernel?

I am not a newbie; I’m a professional programmer with many years of experience, mostly on Linux I have tried all day, but I cannot find anywhere on the web a set of complete, accurate, up-to-date, working instructions on how to build the Linux kernel for the BBB. The instructions on the beaglebone site point to sites that no longer exist. The instructions on the Yocto project site fail. So exactly how is it built? I have a small (about 20-line) change I need to make in one of the drivers (which I have tested on another machine), but otherwise I want exactly the same kernel that ships with the board. Is that possible, or is this simply in a broken state because of the transition to Yocto?

How is the Yocto build failing? (It works for me)
What is your Yocto setup like & which kernel are you trying to use/adjust?

I’ve had success following the readme of this git repo

had to add the flag “CROSS_COMPILE=arm-linux-gnueabi-” to the make command

NOTE: I have had success building the official linux-stable and linus’ torvalds branch for the BBB. However I always run into a problem getting the root file system mounted. applying the patches to these branches caused a lot of problems for me.

Once "edma" & the mmc dtb changes hits mainline that problem will go
away.. (v3.13-rc1 should work now..)


Thanks. I finally got it working by correcting the instructions in the beaglebone/kernel git repository to use the right cross-compiler as you note below (though on branch 3.8 which my board is currently using; I wanted to do a minimal patch, not upgrade). I also finally got the Yocto build working for core-image-sato (core-image-minimal as shown in the instructions still fails). This seems to build a whole distribution, not just a kernel, and takes hours on my old machine. I may try to install that if my simple patch works.

Oops, spoke too soon about my success. Github repository build fails with: “No rule to make target `firmware/am335x-pm-firmware.bin’…”

This patch should have fixed that.

It’s applied automatically using the script in the repo I posted earlier. If you’re using the beaglebone config file, but using a different kernel tree from the one created from the quoted repo, this may give you problems. Try removing it from the .config file. (grep the .config for the term “am335x-pm-firmware” to see what you can comment away). You can also remove this dependency using menuconfig, but I’ve forgotten specifically where to do that.

Thanks, but that patch is not applied by (in the 3.8 branch). I was able to get the file directly from, copy it into the kernel directory, and go from there.