October 9, 2012   Posted by: Dr. Ace Jeangle

How to build kernel for Beaglebone for custom cape support

In this How-to we will try to build kernel for Beaglebone that will support our LVDS cape.

Download and install all required sources:

sudo apt-get install gcc-arm-linux-gnueabi git ccache libncurses5-dev u-boot-tools lzma
cd ~
git clone git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
git clone git://github.com/RobertCNelson/linux-dev.git
cd linux-dev
git checkout origin/am33x-v3.2 -b am33x-v3.2
cp system.sh.sample system.sh

Then make the following changes in system.sh:
– uncomment line CC=arm-linux-gnueabi-
– uncomment line LINUX_GIT=~/linux-stable/
– uncomment line ZRELADDR=0x80008000
– uncomment line BUILD_UIMAGE=1
– uncomment and change line MMC=/dev/sde to your SD card system name (mine is /dev/sdb)

Next commands:


will bring you directly to kernel config GUI, and then will assemble it.

After kernel is compiled, please make changes to file ~/linux-dev/KERNEL/arch/arm/mach-omap2/board-am335xevm.c (see below), then recompile kernel again (command “tools/rebuild.sh”). Once the build had completed there will be a uImage file in ~/linux-dev/deploy. You can install this to your SD card with:


Built kernel modules are located in ~/linux-dev/deploy/mod/lib

To add support for our LVDS cape you need to patch file board-am335xevm.c located in /kernel/arch/arm/mach-omap2. You should find function beaglebone_cape_setup(struct
memory_accessor *mem_acc, void *context)
in this file and change it to always invoke function dvi_init(0,0). The easiest way is to put
the following lines:

pr_info("BeagleBone cape: initializing DVI cape\n");

at the beginning of function.

19 comments posted in: How-To
  1. Nilesh Mane
    Oct 20, 2012

    Hello Dr. Ace Jeangle, I have an chalkboard 10in and 11 inch lcd’s i want to connect them with pandaboard es (ubuntu). So where do i get the source code for ubuntu.

      • Nilesh Mane
        Oct 29, 2012

        I have successfully build and deploy the Ubuntu on Pandaboard_es. But After some time there is screen saver (all the colors and B/W bands) on 11inch LCD. How can i disable it.

        • Dr. Ace Jeangle
          Oct 30, 2012

          killall gnome-screensaver
          export DISPLAY=:0.0
          xset s off
          xset –dpms

          • Nilesh Mane
            Nov 24, 2012

            This works and the tesing mode never came back. The Prebuild Image of ubutu works fine, But When i tried to build with this source and default configuration the Ethernet was not working. is there any need to change the default configuration file.

          • Dr. Ace Jeangle
            Nov 25, 2012

            I would suggest to check kernel config for Ethernet drivers/modules – probably you forgot to build/install kernel modules.

          • Nilesh Mane
            Dec 07, 2012

            thank you. I have forget to copy modules . One more thing , how can i calibrate touch screen as here no x-server running.

          • Dr. Ace Jeangle
            Dec 10, 2012

            Capacitive touch does not require any calibration. Resistive touch can be calibrated in standard way – with help of ts_calibrate util.

  2. mickeyf
    Oct 25, 2012

    ” then recompile kernel again”

    You may want to mention that you do this via tools/rebuild.sh – running ./build_kernel again will overwrite your changes.

  3. CK Sim
    Nov 07, 2012


    I have followed the instructions above for the recompiling of the kernel.

    However, when the kernel boots, I get the following error messages and the booting stops.

    [ 0.490541] kobject_add_internal failed for da8xx_lcdc.0 with -EEXIST, don’t try to register things.
    [ 0.504692] omap_device: da8xx_lcdc: build failed (-17)
    [ 0.512436] kobject_add_internal failed for da8xx_lcdc.0 with -EEXIST, don’t try to register things.
    [ 0.526560] omap_device: da8xx_lcdc: build failed (-17)
    [ 0.534271] kobject_add_internal failed for da8xx_lcdc.0 with -EEXIST, don’t try to register things.
    [ 0.548369] omap_device: da8xx_lcdc: build failed (-17)

    I also noted that I only have “install_image.sh” instead “load_ulamge.sh” in tools directory.

    Please help.

    Thanks and Regards.

    • Dr. Ace Jeangle
      Nov 09, 2012

      Looks like problem of your setup or compilation. I would suggest to get pre-built image.

      • CK Sim
        Nov 09, 2012

        Does a pre-built image supports the LVDS cape ?
        FYI, I have tried with a pre-built image but there is no display on the LCD.

      • CK Sim
        Nov 09, 2012

        Does a pre-built image support the LVDS cape ?

        FYI, I have tried with a pre-built image but there is no display on the LCD.

  4. CK Sim
    Nov 11, 2012


    An add-on to my message earlier.

    I have bought the 10″ LG panel kit for the BeagleBone but have yet to successfully see any display on the LCD.

    I have used the pre-built image for the BeagleBone (dated June 2012). It boots to the AngStrom login prompt.

    With the “boneLVDS” board connected, using dmesg, I noted that the board is detected as DVI-D cape board. Hence, I believe the boneLVDS board is detected.

    With this, how can make some test on the LCD to ensure that the LCD is working fine ?

    Thanks and Regards.

    • Dr. Ace Jeangle
      Nov 11, 2012

      I believe your problem is that you forgot to set correct LCD resolution in boot arguments. In any case, here is link to full SD card image (at least 4Gb) that we use to test capes before shipping: http://goo.gl/Zb0Sr

  5. Dr. Ace Jeangle
    Nov 14, 2012

    Drop me email to support@chalk-elec.com

  6. Dr. Ace Jeangle
    Dec 14, 2012

    Drop me email to suport@chalk-elec.com with detailed description of your problem, and version of your OS.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Follow us