Step 4 - Building the Custom Kernel

For this next step we need to set up the kernel for out Linux boot disk. The thing to remember about kernels is that they establish how the software interfaces with the hardware, so for a non-normal board like a BB-xM we're going to need a non-normal kernel to go along with it. The other thing to remember is that re-writing a kernel on your own is f**king hard, its a big complicated mess and debugging it is a lot of work that is best avoided if possible. So for this part we will use some code which creates a custom kernel, written by Robert C Nelson, (our friend responsible for our custom Linux build).

  1. Go to whatever directory you want to save stuff into and run the following command
    git clone
    This should download RCN's latest build onto your PC into a folder called "stable-kernel".

A note from the handsome author: Now the next few steps I will follow the procedure I took, however I STRONGLY STRONGLY recommend checking the readme file of the stable kernel folder. If the stable=kernel files have been modified since the completion of this wiki entry then these steps below may not work, while the correct ones can always be found in the readme. In fact, thats a fairly solid rule anyway. Always read the ReadMe, its got all sorts of tasty tidbits... Anyway...
  1. Before we can start anything, we'll need the necessary bits and pieces. So run the following lines of code and install them
    sudo apt-get install gcc-arm-linux-gnueabihf
  2. Now swap to the stable kernel directory and run the following command
    git checkout origin/v3.1.x -b v3.7.x <--------------This should change our version of the build to the one specific to our BB-xM. Again, check the readme to make sure you are using the correct one for your board
  3. git clone git://
    This last line will download a file thats about 500Mb to whatever directory you specify, (for simplicities sake place it in the top folder of your user directory, the same one that "stable-kernel" should be in. It may take a bit to download but unfortunately is necessary. This download is the basic kernel we will be building our custom one from)
  4. We need to modify a file called file, but it doesn't exist!!! Open with gedit and save it as
  5. Now fire the new up in gedit using the following code in the stable-kernel directory
  6. First thing we need to change for now is the CC line, on line 18. Change this to
    Check exactly what we need to change this to in the readme, as it is dependent upon the version of Linux were building the kernel for. Our version is Ubuntu 12.10, we need gnueabihf
  7. Finally, we need to upload this to our SD card, change line 57 to the following
    where X=letter for SD drive. Save your changes.
  8. Now that everythings (finally) set up, build the kernel by running the following code
    *This will take about 15 minutes... Coffee break!
  9. Upload the image. Last step, RCN was nice enough to give us some code to upload the kernel, so run the following code from the "stable-kernel" directory
-- AlYoung - 2013-01-08
Topic revision: r3 - 2013-02-19 - AhmetSekercioglu
This site is powered by the TWiki collaboration platformCopyright © 2008-2020 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback