Skip to end of metadata
Go to start of metadata

This is a page about TI's Cortex-A8 based; BeagleBoard.


BeagleBoard xM at Digi-Key

Basic Requirements

ARM Cross Compiler: GCC

This is a pre-built (64bit) version of Linaro GCC that runs on generic linux, sorry (32bit) x86 users, it's time to upgrade...

wget -c https://releases.linaro.org/components/toolchain/binaries/6.3-2017.05/arm-linux-gnueabihf/gcc-linaro-6.3.1-2017.05-x86_64_arm-linux-gnueabihf.tar.xz
tar xf gcc-linaro-6.3.1-2017.05-x86_64_arm-linux-gnueabihf.tar.xz
export CC=`pwd`/gcc-linaro-6.3.1-2017.05-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-

Test Cross Compiler:

${CC}gcc --version
arm-linux-gnueabihf-gcc (Linaro GCC 6.3-2017.05) 6.3.1 20170404
Copyright (C) 2016 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO

Bootloader: U-Boot

Das U-Boot – the Universal Boot Loader: http://www.denx.de/wiki/U-Boot
eewiki.net patch archive: https://github.com/eewiki/u-boot-patches

git clone https://github.com/u-boot/u-boot
cd u-boot/
git checkout v2017.09 -b tmp


wget -c https://rcn-ee.com/repos/git/u-boot-patches/v2017.09/0001-omap3_beagle-uEnv.txt-bootz-n-fixes.patch
patch -p1 < 0001-omap3_beagle-uEnv.txt-bootz-n-fixes.patch

Configure and Build:

make ARCH=arm CROSS_COMPILE=${CC} distclean
make ARCH=arm CROSS_COMPILE=${CC} omap3_beagle_defconfig

Linux Kernel

This script will build the kernel, modules, device tree binaries and copy them to the deploy directory.

git clone https://github.com/RobertCNelson/armv7-multiplatform
cd armv7-multiplatform/

For v4.4.x (Longterm 4.4.x):

git checkout origin/v4.4.x -b tmp

For v4.4.x-rt (Longterm 4.4.x + Real-Time Linux):

git checkout origin/v4.4.x-rt -b tmp

For v4.9.x (Longterm 4.9.x):

git checkout origin/v4.9.x -b tmp

For v4.9.x-rt (Longterm 4.9.x + Real-Time Linux):

git checkout origin/v4.9.x-rt -b tmp

For v4.12.x (Stable):

git checkout origin/v4.12.x -b tmp

For v4.13.x (Prepatch):

git checkout origin/v4.13.x -b tmp



Root File System

Debian 9








wget -c https://rcn-ee.com/rootfs/eewiki/minfs/debian-9.1-minimal-armhf-2017-08-08.tar.xz


sha256sum debian-9.1-minimal-armhf-2017-08-08.tar.xz
ba8f801ee1907f362c61b1c10e7fa1a4c59d766eecfe32803588f33f29f69dd4  debian-9.1-minimal-armhf-2017-08-08.tar.xz


tar xf debian-9.1-minimal-armhf-2017-08-08.tar.xz

Ubuntu 16.04 LTS






wget -c https://rcn-ee.com/rootfs/eewiki/minfs/ubuntu-16.04.3-minimal-armhf-2017-08-08.tar.xz


sha256sum ubuntu-16.04.3-minimal-armhf-2017-08-08.tar.xz
cc2689fc2d7cd9457f1b5fd2beff2a19123b4c95fb62848584f06c7158ecfe34  ubuntu-16.04.3-minimal-armhf-2017-08-08.tar.xz


tar xf ubuntu-16.04.3-minimal-armhf-2017-08-08.tar.xz

Setup microSD card

For these instruction we are assuming, DISK=/dev/mmcblk0, lsblk is very useful for determining the device id.

export DISK=/dev/mmcblk0

Erase partition table/labels on microSD card:

sudo dd if=/dev/zero of=${DISK} bs=1M count=20

Create Partition Layout:
With util-linux v2.26, sfdisk was rewritten and is now based on libfdisk.

sudo sfdisk --version
sfdisk from util-linux 2.27.1
sfdisk >= 2.26.x
sudo sfdisk ${DISK} <<-__EOF__
sfdisk <= 2.25.x
sudo sfdisk --unit M ${DISK} <<-__EOF__

Format Partition:

for: DISK=/dev/mmcblk0
sudo mkfs.vfat -F 16 -n BOOT ${DISK}p1
sudo mkfs.ext4 -L rootfs ${DISK}p2
for: DISK=/dev/sdX
sudo mkfs.vfat -F 16 -n BOOT ${DISK}1
sudo mkfs.ext4 -L rootfs ${DISK}2

Mount Partition:
On most systems these partitions may will be auto-mounted...

sudo mkdir -p /media/boot/
sudo mkdir -p /media/rootfs/
for: DISK=/dev/mmcblk0
sudo mount ${DISK}p1 /media/boot/
sudo mount ${DISK}p2 /media/rootfs/
for: DISK=/dev/sdX
sudo mount ${DISK}1 /media/boot/
sudo mount ${DISK}2 /media/rootfs/

Install Bootloader

Copy MLO/u-boot.img to the boot partition

sudo cp -v ./u-boot/MLO /media/boot/
sudo cp -v ./u-boot/u-boot.img /media/boot/

Install Kernel and Root File System

To help new users, since the kernel version can change on a daily basis. The kernel building scripts listed on this page will now give you a hint of what kernel version was built.

Script Complete
eewiki.net: [user@localhost:~$ export kernel_version=4.X.Y-Z]

Copy and paste that "export kernel_version=4.X.Y-Z" exactly as shown in your own build/desktop environment and hit enter to create an environment variable to be used later.

export kernel_version=4.X.Y-Z

Copy Root File System

sudo tar xfvp ./*-*-*-armhf-*/armhf-rootfs-*.tar -C /media/rootfs/
sudo chown root:root /media/rootfs/
sudo chmod 755 /media/rootfs/

Set uname_r in /boot/uEnv.txt

sudo sh -c "echo 'uname_r=${kernel_version}' >> /media/rootfs/boot/uEnv.txt"

Copy Kernel Image

Kernel Image:

sudo cp -v ./armv7-multiplatform/deploy/${kernel_version}.zImage /media/rootfs/boot/vmlinuz-${kernel_version}

Copy Kernel Device Tree Binaries

sudo mkdir -p /media/rootfs/boot/dtbs/${kernel_version}/
sudo tar xfv ./armv7-multiplatform/deploy/${kernel_version}-dtbs.tar.gz -C /media/rootfs/boot/dtbs/${kernel_version}/

Copy Kernel Modules

sudo tar xfv ./armv7-multiplatform/deploy/${kernel_version}-modules.tar.gz -C /media/rootfs/

File Systems Table (/etc/fstab)

sudo sh -c "echo '/dev/mmcblk0p2  /  auto  errors=remount-ro  0  1' >> /media/rootfs/etc/fstab"
sudo sh -c "echo '/dev/mmcblk0p1  /boot/uboot  auto  defaults  0  2' >> /media/rootfs/etc/fstab"

Remove microSD/SD card

sudo umount /media/boot
sudo umount /media/rootfs


Comments, feedback, and questions can be sent to: eewiki@digikey.com
Please use the Digi-Key's TechForum: TechForum


  1. Hi Robert,

    I have a question about module-install. After built the kernel, I got a file name x.y.z-modules.tar.gz with the size ~14MB. Extract that to /media/rootfs, the /lib/modules/x.y.z/build (of the sd-card) actually is just a symbolic link to the stable-kernel/KERNEL, which I think is the reason why I always get "FATAL Could not load /lib/modules..." when booting. 

    How do you think about this?

    1. Hi Shi Na,

      For reference, here's a full boot log on my Beagle xM C http://pastebin.com/p5mE8Tft

      First, the /lib/modules/x.y.z/build symbolic link is only used when building external modules, so when you cross build from one machine (x86) and then run on another (arm), it's mostly invalid, so for me it's:

      /lib/modules/3.2.26-x14/build -> /opt/eewiki/omap/stable-kernel/KERNEL

      So, /lib/modules/3.2.26-x14/build is on my arm machine, and /opt/eewiki/omap/stable-kernel/KERNEL is the directory of where i build the source..

      So, you can always, copy the source code to your arm device and adjust that symlink, but it's only useful for building external modules on your arm board..

      Second, "FATAL Could not load /lib/modules..." where does that occur? Usually it happens if the kernel you booted doesn't have any modules installed.. You can quickly check via:

      debian@devel:~$ uname -r
      debian@devel:~$ ls /lib/modules/`uname -r`/
      build              modules.builtin      modules.devname  modules.symbols.bin
      kernel             modules.builtin.bin  modules.order    source
      modules.alias      modules.dep          modules.softdep
      modules.alias.bin  modules.dep.bin      modules.symbols

      and we can see we have external modules loaded:

      debian@devel:~$ lsmod
      Module                  Size  Used by
      smsc95xx               11302  0
      snd_soc_omap3beagle     2195  0
      rtc_twl                 4418  0
      snd_soc_twl4030        37284  1
      snd_soc_omap            3353  1
      snd_soc_omap_mcbsp      8230  1
      snd_soc_core          105726  4 snd_soc_omap_mcbsp,snd_soc_omap,snd_soc_twl4030,snd_soc_omap3beagle
      regmap_spi              1231  1 snd_soc_core
      snd_pcm                80381  4 snd_soc_core,snd_soc_omap_mcbsp,snd_soc_omap,snd_soc_twl4030
      snd_page_alloc          4959  1 snd_pcm
      snd_timer              19979  1 snd_pcm
      snd                    58205  3 snd_timer,snd_pcm,snd_soc_core
      soundcore               7465  1 snd
      gpio_keys               6945  0

      So my first guess, your not running the same kernel version as the modules installed on your rootfs partition...


      1. >> So my first guess, your not running the same kernel version as the modules installed on your rootfs partition...

        Yes. Actually, I used your pre-built Ubuntu image to create the sd-card. And then build my custom kernel using stable-kernel source. Finally, I copied the kernel image, extract the modules and lib tar files to the sd-card.

        1. Hi Shi Na,

          Look closely at your boot scripts, are you actually booting the new kernel image or is it booting something else?

          As a last resort, there is a script in the stable-kernel repo that you can run.. Just make sure to carefully set "MMC=xyz" in system.sh, if your not careful you could mess up your system.. When it's set run: "./tools/install_image.sh" it'll take a look at your sd card and add the files where appropriate..


  2. Hi Robert,

    I've been looking for Beagleboard C5 source for ages since circuito only has image files. Your postings mean so much. But just to be sure, your instructions are up to date as of august 2012 for C5's new micron memory... right?

    Thank you very much,

    1. Hi Daniel,

      The C5's micron memory is taken care of in u-boot's memory initialization routines.. Therefore the kernel actually doesn't care, in fact to to the kernel just see's it as C4 with a larger nand area..

      See: http://git.denx.de/?p=u-boot.git;a=blob;f=board/ti/beagle/beagle.c;hb=HEAD#l158

      In that REVISION_C4 case, we have 3 boards:
      Special White Label 512Mb Beagle C4
      Beagle C4
      Beagle C5


  3. One more thing, since I'm very new to this business. During make, I get this error:

    `.config' \-> `/home/jsohn123/stable-kernel/patches/defconfig'
    make \-j9 ARCH=arm LOCALVERSION=-x14 CROSS_COMPILE="ccache arm-linux-gnueabi-"  zImage modules
    arm-linux-gnueabi-gcc: No such file or directory
    scripts/kconfig/conf \--silentoldconfig Kconfig
    arm-linux-gnueabi-gcc: No such file or directory
      WRAP    arch/arm/include/generated/asm/auxvec.h
      WRAP    arch/arm/include/generated/asm/bitsperlong.h
      WRAP    arch/arm/include/generated/asm/cputime.h
      WRAP    arch/arm/include/generated/asm/emergency-restart.h
      CHK     include/linux/version.h
      WRAP    arch/arm/include/generated/asm/errno.h
      WRAP    arch/arm/include/generated/asm/ioctl.h
      UPD     include/linux/version.h
      WRAP    arch/arm/include/generated/asm/irq_regs.h
      WRAP    arch/arm/include/generated/asm/kdebug.h
      WRAP    arch/arm/include/generated/asm/local.h
      WRAP    arch/arm/include/generated/asm/local64.h
      WRAP    arch/arm/include/generated/asm/percpu.h
      WRAP    arch/arm/include/generated/asm/poll.h
      WRAP    arch/arm/include/generated/asm/resource.h
      WRAP    arch/arm/include/generated/asm/sections.h
      WRAP    arch/arm/include/generated/asm/siginfo.h
      WRAP    arch/arm/include/generated/asm/sizes.h
      CHK     include/generated/utsrelease.h
      UPD     include/generated/utsrelease.h
      HOSTCC  scripts/dtc/checks.o
      HOSTCC  scripts/dtc/data.o
      HOSTCC  scripts/genksyms/genksyms.o
      SHIPPED scripts/genksyms/lex.lex.c
      HOSTCC  scripts/kallsyms
      CC      scripts/mod/empty.o
    arm-linux-gnueabi-gcc: No such file or directory
    make\[2\]: \**\* \[scripts/mod/empty.o\] Error 1
    make\[1\]: \**\* \[scripts/mod\] Error 2
    make\[1\]: \**\* Waiting for unfinished jobs....
      SHIPPED scripts/genksyms/keywords.hash.c
      SHIPPED scripts/dtc/dtc-lexer.lex.c
      HOSTCC  scripts/selinux/genheaders/genheaders
      Generating include/generated/mach-types.h
      SHIPPED scripts/dtc/dtc-parser.tab.h
      SHIPPED scripts/dtc/dtc-parser.tab.c
      SHIPPED scripts/genksyms/parse.tab.h
      HOSTCC  scripts/dtc/dtc.o
      HOSTCC  scripts/dtc/flattree.o
      HOSTCC  scripts/selinux/mdp/mdp
    scripts/dtc/flattree.c: In function ‘flat_read_mem_reserve’:
    scripts/dtc/flattree.c:700:14: warning: variable ‘p’ set but not used \[-Wunused-but-set-variable\]
    scripts/dtc/dtc.c: In function ‘main’:
    scripts/dtc/dtc.c:102:17: warning: variable ‘check’ set but not used \[-Wunused-but-set-variable\]
      HOSTCC  scripts/dtc/fstree.o
      SHIPPED scripts/genksyms/parse.tab.c
      HOSTCC  scripts/genksyms/lex.lex.o
      CC      kernel/bounds.s
    arm-linux-gnueabi-gcc: No such file or directory
    make\[1\]: \**\* \[kernel/bounds.s\] Error 1
    make: \**\* \[prepare0\] Error 2
    make: \**\* Waiting for unfinished jobs....
      HOSTCC  scripts/genksyms/parse.tab.o
      HOSTCC  scripts/dtc/livetree.o
      HOSTCC  scripts/dtc/srcpos.o
      HOSTCC  scripts/dtc/treesource.o
      HOSTCC  scripts/dtc/util.o
      HOSTCC  scripts/dtc/dtc-lexer.lex.o
      HOSTCC  scripts/dtc/dtc-parser.tab.o
      HOSTLD  scripts/dtc/dtc
      HOSTLD  scripts/genksyms/genksyms
    make: \**\* \[scripts\] Error 2

    I did change the

    1.echo "Debug: using Cross Compiler"
    2. "LINUX_GIT=${HOME}/stable-kernel/"         (instead of linux-stable)
    3.##For TI: OMAP3/4/AM35xx

    What did I misplace?

    Thank you for your patience and help,

    (edited: rcn, added code block as chrome wouldn't render. (wink)

    1. Hi Daniel,

      Can you please confirm your CC variable, as for some reason, this wiki software didn't save the original.. (1: won't work, 2 is correct) This also assumes you installed the arm-linux-gnueabi pkg in ubuntu...

      1: CC=arm-linux-gnueabi\-
      2: CC=arm-linux-gnueabi-

      But moving on:

      arm-linux-gnueabi-gcc: No such file or directory

      This should be detected by: https://github.com/RobertCNelson/stable-kernel/blob/master/system.sh.sample#L33

      I wonder why it wasn't, can you please post the output of:

      arm-linux-gnueabi-gcc -v

      Second, why did you change this?

      2. "LINUX_GIT=${HOME}/stable-kernel/"         (instead of linux-stable)

      As it should be the linux kernel source git directory, not the directory of the stable-kernel script (as the script can figure that out on it's own): https://github.com/RobertCNelson/stable-kernel/blob/master/system.sh.sample#L59

      The script detects this error, and overrides the variable: https://github.com/RobertCNelson/stable-kernel/blob/master/scripts/git.sh#L52

      such that it'll continue on with a safe default... But it's a bad thing to change, specially if you end up putting the directions on another wiki/blog and others users end up changing it the same way.. (wink)


  4. Thank you for your fast reply.

    CC was just adding some \ while copying and pasting for comment.

    as for arm-linux-gnueabi-gcc -v:

    jsohn123@jsohn123-N53SN:~/stable-kernel$ arm-linux-gnueabi-gcc -v
    Using built-in specs.
    Target: arm-linux-gnueabi
    Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.6.1-9ubuntu3' --with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs --enable-languages=c,c+,fortran,objc,obj-c+ --prefix=/usr --program-suffix=-4.6 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/arm-linux-gnueabi/include/c++/4.6.1 --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-plugin --enable-objc-gc --enable-multilib --disable-sjlj-exceptions --with-arch=armv7-a --with-float=softfp --with-fpu=vfpv3-d16 --with-mode=thumb --disable-werror --enable-checking=release --build=i686-linux-gnu --host=i686-linux-gnu --target=arm-linux-gnueabi --program-prefix=arm-linux-gnueabi- --includedir=/usr/arm-linux-gnueabi/include --with-headers=/usr/arm-linux-gnueabi/include --with-libs=/usr/arm-linux-gnueabi/lib
    Thread model: posix
    gcc version 4.6.1 (Ubuntu/Linaro 4.6.1-9ubuntu3)

    Also, deleted and retraced the steps with "linux stable".The following commands were executed in sequence:
    git clone git://github.com/RobertCNelson/stable-kernel.gitcd stable-kernel/
    cd ~/
    git clone git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
    Then update "CC=arm-linux-gnueabi-", "LINUX_GIT" to "LINUX_GIT=~/linux-stable/"

    This still gives me the same error.


    1. No ideas, it looks like there's something wrong with your system configuration..

      Using gcc version 4.6.1 (Ubuntu/Linaro 4.6.1-9ubuntu3) as a reference I install Ubuntu Oneiric on a virtual machine, then:

      voodoo@oneiric:~$ lsb_release -a
      No LSB modules are available.
      Distributor ID: Ubuntu
      Description:    Ubuntu 11.10
      Release:        11.10
      Codename:       oneiric
      voodoo@oneiric:~$ sudo apt-get install git-core u-boot-tools ccache device-tree-compiler libncurses5-dev build-essential gcc-arm-linux-gnueabi
      voodoo@oneiric:~$ arm-linux-gnueabi-gcc -v
      Using built-in specs.
      Target: arm-linux-gnueabi
      Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.6.1-9ubuntu3' --with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.6 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/arm-linux-gnueabi/include/c++/4.6.1 --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-plugin --enable-objc-gc --enable-multilib --disable-sjlj-exceptions --with-arch=armv7-a --with-float=softfp --with-fpu=vfpv3-d16 --with-mode=thumb --disable-werror --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=arm-linux-gnueabi --program-prefix=arm-linux-gnueabi- --includedir=/usr/arm-linux-gnueabi/include --with-headers=/usr/arm-linux-gnueabi/include --with-libs=/usr/arm-linux-gnueabi/lib
      Thread model: posix
      gcc version 4.6.1 (Ubuntu/Linaro 4.6.1-9ubuntu3)
      voodoo@oneiric:~$ git clone git://github.com/RobertCNelson/stable-kernel.git
      voodoo@oneiric:~$ cd stable-kernel/
      voodoo@oneiric:~/stable-kernel$ ./build_kernel.sh 
      + Detected build host [debian-]
      Debug: found libncurses.so: /usr/lib/libncurses.so
      Debug: using Cross Compiler
      Debug: using arm-linux-gnueabi-gcc (Ubuntu/Linaro 4.6.1-9ubuntu3) 4.6.1
      Copyright (C) 2011 Free Software Foundation, Inc.
      This is free software; see the source for copying conditions.  There is NO

      Here's my system.sh: http://paste.ubuntu.com/1143685/

      And here's the full build log, from a fresh install to build.. (did find one bug and pushed it upstream)


      Missing lzma pkg, bug fix:


      So unless your actually running a different version of ubuntu it should work..


      1. I really appreciate your help. I'll make several attempts and let you know if it works.


        1. Perhaps this happens since I'm on ubuntu 11.04 Natty? I think I'll try apt-get remove for gcc tool chain, repeat, and see how that does.

          1. Oh, NVM. I forgot about linaro tool chains...no surprise it fails without it.

            1. Hi Daniel,

              Did you happen to use one of the linaro tool chains from: https://launchpad.net/linaro-toolchain-binaries

              with Natty, or?

              If you did, you'll need to actually provide the full system path to CC variable in system.sh as CC=arm-linux-gnueabi- won't be enough...


              1. When saw my problem, I didn't get any of linaro toolchains binaries separately

                (I just did sudo apt-get install gcc-arm-linux-gnueabi). Didn't notice the linaro requirement of the above. This maybe the cause of the problem?

                If I do get the tool chain binaries separately for next attempt, what do you mean by the full system path? path to what (I'm pretty new to this)?


                1. That's fine, the package "gcc-arm-linux-gnueabi" actually comes from the linaro group.. The linaro toolchain dependicy is only important if your not running ubuntu...

                  But I don't remember if Natty works with the script. (I had assumed you were using Oneiric based on the gcc version..)


                  1. I see. It amazes me how people coming up with scripts keep track of all the tool chains scattered everywhere.

                    At least I have uboot working to compile and study the source code....

                    Thank you for your help.

                    1. Nope, not that... Clean install of Ubuntu Natty works perfectly fine..


                      However, your version of arm-linux-gnueabi-gcc does not match Natty's..

                      voodoo@natty:~/stable-kernel$ arm-linux-gnueabi-gcc -v
                      Using built-in specs.
                      Target: arm-linux-gnueabi
                      Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.5.2-8ubuntu3' --with-bugurl=file:///usr/share/doc/gcc-4.5/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.5 --enable-shared --enable-multiarch --with-multiarch-defaults=x86_64-linux-gnu --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/arm-linux-gnueabi/include/c++/4.5.2 --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-plugin --enable-gold --enable-ld=default --with-plugin-ld=ld.gold --enable-objc-gc --disable-sjlj-exceptions --with-arch=armv7-a --with-float=softfp --with-fpu=vfpv3-d16 --with-mode=thumb --disable-werror --enable-checking=release --program-prefix=arm-linux-gnueabi- --includedir=/usr/arm-linux-gnueabi/include --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=arm-linux-gnueabi --with-headers=/usr/arm-linux-gnueabi/include --with-libs=/usr/arm-linux-gnueabi/lib
                      Thread model: posix
                      gcc version 4.5.2 (Ubuntu/Linaro 4.5.2-8ubuntu3) 

                      So what distro are you actually running?

                      voodoo@natty:~/stable-kernel$ lsb_release -a
                      No LSB modules are available.
                      Distributor ID: Ubuntu
                      Description:    Ubuntu 11.04
                      Release:        11.04
                      Codename:       natty


                      1. Silly me, I just remembered that I did upgrade mine to 11.10 oneiric....tried apt-get remove and getting gcc again still giving me same errors.

                        Even worse, I ended up in the development branch of Oneiric (?!!!). Perhaps this explains why.

                        1. Hi Daniel,

                          Strange, I'd really look into re-installing your OS, as currently things seem really messed up on it. Oneiric (11.10) is now over 10 months old with Precise (12.04) already have been released, so you shouldn't be on the development branch at this point..


                          1. Yep, that was it. Wrong branch. I just finished compiling successfully.

                            Thank you for your constant feedback. 

                            One more thing in general:

                            If I want to control peripherals like external camera or sensor through uart, spi, or gpio,

                            I can either use sys entry functions for that on a shell script or come up with a driver, compile

                            and insmod it .... right? Then when u-boot initializes spi and uarts and so on, what is the relationship between that and device drivers? I eventually want to come up with a mechatronic +data aquisition system and I'm still learning the relationship between components like MLO, uboot, Xloader, kernel, and rootfs.

                            I know the above questions of mine are scatter brained, but it would be great if I can figure out the general direction and know what kind of questions I should be asking, hopefully with your guidance.

                            Would it be ok if I ask more questions about beagle embedded dev in the future?


  5. Hi,

      Great instructions as I was able to build everything following along. I'm a n00b so not too sure about things. But the ethernet doesn't seem to be active.  When I do a

    "ifconfig -a"

    I only see devices:



    How do I activate the ethernet to see the 'eth0'? or is my build bad?

    Using BeagleBoard xM w/ rootfs 6.0.5 

    1. Hi Mitchell,

      This question does come up time to time, so I added it as an FAQ:


      Please let me know if this solves or doesn't solve the issue your seeing.


      1. Thanks for the help Robert!

        The FAQ helped me pinpoint my LAN LED lights off issue. I'd forgotten to copy over the modules after I reconfigured the kernel.

        Also, I needed to edit the /etc/network/interfaces file to uncomment out eth0. Then I did a /etc/init.d/networking restart to have the internet up.


        1. Thanks Mitchell,

          That's good to hear it's working... I also added a note about /etc/network/interfaces as I was sure it was enabled by default, but looking at my rootfs generation script it was disabled for boards that lack Ethernet.


  6. Hello again,

    I tried the debian armel route, followed the edit instructions, but I'm getting stuck in this routine:

    Full Bootlog: http://pastebin.com/vAB38bpE

    [    0.000000] Linux version 3.2.28-x14 (jsohn123@jsohn123-N53SN) (gcc version 2
    [    0.000000] Kernel command line: console=ttyO2,115200n8 console=tty0 vram=12e
    [    0.053344] OMAP3 Beagle Rev: C4
    [   22.550140] sshd (625): /proc/625/oom_adj is deprecated, please use /proc/625/oom_score_ad.

    What does the last line mean?

    Thank you!

    Edited: rcn, moved full log to pastebin.com and pulled out the important bits...

    1. Hi Daniel,

      Currently the /proc/<pid>/oom_adj warning is safe to ignore, as it's just deprecated, it hasn't been removed from the kernel yet.. http://www.kernel.org/doc/Documentation/ABI/obsolete/proc-pid-oom_adj

      However, I'm going to assume your serial console hasn't come up, so your still stuck at that last message..

      1. You've set the serial console correctly, console=ttyO2,115200n8 and serial data is being dumped on the serial port (otherwise we wouldn't have a log). So double check the last line in /etc/inittab and make sure you used ttyO2, with the O as in OMAP, not 0 as in the number Zero...
      2. Your using a C4 board, which by default doesn't have an Ethernet interface, did you uncomment eth0 in /etc/network/interfaces ? If you did, the bootup process will usually wait (in this case forever) for eth0 to come up before continuing to boot...


      1. Yep, it was inittab ttyO2, not tty02. That solved the problem and I'm in debian world now. Thank you so much.


        1. One thing - now that I have debian to play with and I want access to IO (PWM, GPIO, and ADC)... I already played with GPIO LED from sys/platform/omap, but I'm not so sure about other functions. Where can I find the documentation necessary to track these IO modules and to know what commands I can give them via cat/echo? Also, where can I use mmap call to access the registers directly?

          Thank you!

  7. Hi Robert,

    I have a question, though it is not much relate to the content of the article. I want to use an uEye camera with a BB running Ubuntu. I found this driver, unfortunately, it is for Angstrom. Though I managed to install the driver (on Ubuntu), and the deamon is running without problem (as it seems), it still cannot detect the camera. During googling process, I also known that you have experience with IDS camera and I greatly appreciate if you could help.


    - Shi Na -

    1. Hi Shi Na,

      For general Beagle questions, http://groups.google.com/group/beagleboard is always the best place. I kinda remember that conversation, uEye http://www.ids-imaging.com/ in the past has provided arm built driver/libraries for there devices. Looking back at the conversation on the forum, it doesn't look like he confirmed that other kernel worked as the thread had been hijacked.. But, considering the age of those drivers and the move to armhf, I'd actually re-contact ids-imaging and see if they will rebuild their current driver for v3.2/v3.4 armhf..


      1. Indeed, I contacted them before asking you and they gave me the 3.9 driver as in my post before. I've tested it with old kernel driver (2.6), both Angstrom and Ubuntu and it works fine. With 3.x kernel, the camera cannot be detected. I guess it was the lack of support for new kernel. 

        ps: I also tried to use BeagleBoard google group before, but few days has past and I'm still in the pending queue...

        1. Hi Shi Na,

          According to their site, they recommend v3.2 for their 4.02 release http://www.ids-imaging.de/frontend/files/ReadMe_4.02_Linux.txt...

          Did you register? It's the only way Gerald/Company can guarantee you are not a spam bot, as that list gets a lot of traffic..


          1. Do you mean this?
                   NOTE USB3: These distributions were tested with a Kernel version >= 3.2.
                   However we recommend for a better USB3 support a kernel version >= 3.4.
            I think this is for x86/amd64 architecture.

            When I asked about support for ARM (in this case, the BeagleBoard), they gave me http://goo.gl/qTXmx, but it seems just work with old kernel (I've tested with 2.6).

            1. Correct, that exactly what I meant... If they have it for x86/amd64, there's no reason to not have it for arm/sparc/etc. (wink) Specially since it's a usb device...

              But that is the price we pay for companies binary blobs... Not sure how I can help, right now I'm not working on anything older then v3.2 and actively working on fixing v3.5.x to replace that... Anything less then v3.2 you'll have to "git checkout" one of the older branches from my git repo.. Like v2.6.39.x, which I updated 3months ago when bisecting a bug, but it's really unsupported...


  8. Hello Robert,

    I've made some changes (added a practice driver c file on stable-kernel/drivers/char/examples, modified Kconfig and Makefile in char folder). Since I don't want to rebuild the entire tree, I ran ./tools/rebuild.sh as listed in README.

    I'm getting this error:

    N53SN:~/stable-kernel$ ./tools/rebuild.sh
    + Detected build host [debian-]
    Debug: found libncurses.so: /usr/lib/libncurses.so
    Debug Using: arm-linux-gnueabi-gcc (Ubuntu/Linaro 4.6.1-9ubuntu3) 4.6.1
    Copyright (C) 2011 Free Software Foundation, Inc.
    This is free software; see the source for copying conditions.  There is NO
    scripts/kconfig/mconf Kconfig

    *** End of the configuration.
    *** Execute 'make' to start the build or try 'make help'.

    `.config' -> `/home/jsohn123/stable-kernel/patches/defconfig'
    make -j9 ARCH=arm LOCALVERSION=x14 CROSS_COMPILE="ccache arm-linux-gnueabi"  zImage modules
    scripts/kconfig/conf --silentoldconfig Kconfig

    *** Error during update of the configuration.

    make[2]: *** [silentoldconfig] Error 1
    make[1]: *** [silentoldconfig] Error 2
    make: *** No rule to make target `include/config/auto.conf', needed by `include/config/kernel.release'.  Stop.

    Thanks in advance for your help,


    1. Hi Daniel,

      *** Error during update of the configuration.

      I'm going to guess it's the changes you made to the Kconfig...


  9. Yes, I addded c file "hello.c" on KERNEL/drivers/char/example.

    On Kconfig, I put (+is from diff)

    +config EXAMPLES
    +       tristate "Enable Examples"
    +       default m
    +       ---help---
    +         Enable compilation option for Embedded Linux Primer
    +         driver examples

    On Makefile located in drivers/char, I added:

    obj-$(CONFIG_EXAMPLES) += examples/

    I guess if that's done I should make the rest update and be in sync....what's the best way to do this without taking too much time?


    1. Hi Daniel,

      That's because the guide your following http://elinux.org/ECE497_Listings_for_Embedded_Linux_Primer_Chapter_8 is old...

      Here's a fix, that includes a Makefile for "hello.o":

      Once properly patched: it builds prefectly fine with "./tools/rebuild.sh" http://pastebin.com/BJxSpScW

      If your taking Mark A. Yoder's ECE497 class, your better talk to him about updating the wiki. (wink)


      1. HAHA. Nice. Thank you for your help. So the problem was that there was no separate makefile on the examples folder? (I'm still getting used to diff)


  10. Would it be possible to add some instructions for OpenGL support. My understanding is neither the debian or ubuntu filesystems have OpenGL libraries. Please correct if wrong.

    1. Hi Mitchell,

      We actually just have OpenGL ES1 & OpenGL ES2 support.. I wish we had the normal OpenGL... For armel based systems you can use the v3.2 based kernel with the ./create_sgx_package.sh in the stable-kernel repo.. For armhf systems, we received a special build from TI, but you need to run the v3.5.x branch, and then run ./sgx_build_modules.sh script. Both scripts create a script and tar package that you need to copy to the end target and run.. In the case of the v3.5.x branch, you need the zImage/modules too, as they are built directly against that version... Since they are binary blobs, there really is no support...


      1. Hi Robert,

          I've been trying out the sgx packages following the instructions from http://elinux.org/BeagleBoardUbuntu#SGX_Video_Acceleration. However, after the reboot from runing install-sgx.sh and lsmod does not show the bufferclass_ti, omaplfb, or the pvrsrvkm.I'm testing on the 3.5.x branch with the debian wheezy rootfs.

        Here is the output from run-sgx.sh:
        pvrsrvkm: no symbol version for module layout
        ERROR: could not insert 'omaplfb': Exec format error
        pvrsrvkm: no symbol version for module layout
        ERROR: could not insert 'bufferclass_ti': Exec format error
        mknod: missing operand after '0'
        Try 'mknod --help' for more information.
        chmod: cannot access '/dev/pvrsrvkm': No such file or directory

        Any helpful pointers?


        1. Hi Mitchell,

          I just pushed an update (to both v3.5.x and v3.4.x branches) to fix this issue:

          The module now loads, with v3.5.4-x5 on the Beagle xM

          Module                  Size  Used by
          bufferclass_ti          5759  0 
          omaplfb                11516  0 
          pvrsrvkm              165224  2 bufferclass_ti,omaplfb

          From: eglinfo:

          Just wish we had a quick egl/opengl es1/2 demo built for armhf so we could easily test...


          1. Thanks Robert! Can see the modules now and the 

            /usr/bin/armhf/es5.0$ ./sgx_blit_test

            test ran OK.

  11. Robert, Thank you so much for all your help. I was able to successfully compile and insert my other useless kernel module. Couldn't have done it without your patience.

    I have a question regarding the the kernel build configuration. I did search elsewhere (http://elinux.org/BeagleBoard/GSoC/2010_Projects/Pulse_Width_Modulation) and found out that there's a certain CONFIG_OMAP_RESET_CLOCKS that needs to be turned off. But it seems my menuconfig for zImage does not have that option. Do you have any suggestions/advice regarding this PWM implementation?

    Thank you,

    1. Hi Daniel,

      It's enabled by default in the v3.2.x based trunk of the stable-kernel repo..

      voodoo@e350:/opt/github/stable-kernel$ cat patches/defconfig | grep OMAP_RESET_CLOCKS


  12. Hi Robert,

    1. Why do we start using more zImage for OMAP instead of uImage? Is It because Freescale iMX having problem with uImage?

    2. I have some errors during booting up, it eventually goes through and prompt for login though. It's related to rootfs mounting per google research, but I cant can quite figure out what's wrong. Do you have any idea?

    [    3.743682] devtmpfs: mounted
    [    3.751464] Freeing init memory: 360K
    [    4.344085] init: Failed to create pty - disabling logging for job
    [    4.354827] init: Temporary process spawn error: No space left on device
    [    4.430877] init: Failed to create pty - disabling logging for job
    [    4.442840] init: Temporary process spawn error: No space left on device
    [    4.478057] init: Failed to create pty - disabling logging for job
    [    4.489959] init: Temporary process spawn error: No space left on device
    [    4.507812] init: Failed to create pty - disabling logging for job
    [    4.518859] init: Temporary process spawn error: No space left on device
    [    4.708953] init: ureadahead main process (56) terminated with status 5
    [    5.009796] init: Failed to create pty - disabling logging for job
    [    5.020782] init: Temporary process spawn error: No space left on device
    [    5.066040] init: Failed to create pty - disabling logging for job
    [    5.077117] init: Temporary process spawn error: No space left on device
    [    5.194519] init: Failed to create pty - disabling logging for job
    [    5.206298] init: Temporary process spawn error: No space left on device
    Ubuntu 12.04.1 LTS devel ttyO2

    1. Hi Kevin..

      1: It's more for sanity purposes, off the top of your head, what is easier to remember:

      mkimage -A arm -O linux -T kernel -C none -a 0x80008000 -e 0x80008000 -n 3.6.0-x1 -d /boot/vmlinuz-3.6.0-x1 /boot/uboot/uImage


      cp /boot/vmlinuz-3.6.0-x1 /boot/uboot/zImage

      Yeah, I switched all my guides/images as soon as the u-boot patched landed, we have other things to work on. (wink)

      2: That happens, because "Ubuntu" essentially requires an initramfs, but to create one you need to be running Ubuntu on the same "arch"...

      sudo update-initramfs -c -k $(uname -r)
      sudo cp -v /boot/initrd.img-$(uname -r) /boot/uboot/initrd.img

      Then edit "uEnv.txt" and switch it to use the commented out #zImage and initrd section and reboot...


  13. Hi Robert,

    I've been trying to get playstation eye OV534 driver working on debian squeeze armel and this site's most recent kernel (4 days ago).

    When the usb eye webcam is plugged in, I can see gspca_main and ov534 come up in lsmod.

    modinfo gspca-ov534
    filename:       /lib/modules/3.6.1-x2/kernel/drivers/media/video/gspca/gspca_ov534.ko
    license:        GPL
    description:    GSPCA/OV534 USB Camera Driver
    author:         Antonio Ospite <ospite@studenti.unina.it>
    srcversion:     32C5B7A2A8CCEBD6FEBE356
    alias:          usb:v06F8p3002d*dc*dsc*dp*ic*isc*ip*in*
    alias:          usb:v1415p2000d*dc*dsc*dp*ic*isc*ip*in*
    depends:        gspca_main
    intree:         Y
    vermagic:       3.6.1-x2 SMP mod_unload modversions ARMv7 p2v8

    This was strange since it wasn't listing any parameters as seen in internet posts.

    When I plug in the camera,

    [  159.760528] usb 1-2: new high-speed USB device number 2 using ehci-omap
    [  159.943145] usb 1-2: New USB device found, idVendor=1415, idProduct=2000
    [  159.954223] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
    [  159.965637] usb 1-2: Product: USB Camera-B4.09.24.1
    [  159.974609] usb 1-2: Manufacturer: OmniVision Technologies, Inc.
    [  160.146057] gspca_main: v2.14.0 registered
    [  160.172332] gspca_main: ov534-2.14.0 probing 1415:2000
    [  162.497131] usbcore: registered new interface driver ov534
    [  162.681823] ALSA sound/usb/clock.c:243 current rate 23332 is different from the runtime rat0
    [  162.713867] ALSA sound/usb/mixer.c:866 3:1: cannot get min/max values for control 2 (id 3)
    [  162.729278] usbcore: registered new interface driver snd-usb-audio

    this is different from what happens in angstrom image that I built from narcissus (and webcam worked):

    gspca: probing 1415:2000
    ov534: sensor is ov7721
    ov534: frame_rate: 30
    gspca: probe ok

    Did the driver get changed somehow? I couldn't diff it with angstrom's codes because I'm still having loads of problem trying to figure out kernel modules in openembedded bitbaking setting (got kernel compiled but don't even know where the source is for changing - all meta stuff I don't get).

    This is what I get when I try to run uvccapture to store a frame.

    Unable to query buffer (22).
     Init v4L2 failed !! exit fatal

    What should I do? I've been searching for a week and I'm out of options (angstrom works, but I'm having trouble modifying and building from there to enable SPIDEV).

    Thank you.

    1. Hi Daniel,

      There's been a few changes:

      So only, about 10 months worth of development... (wink)

      Have you verified if this device works in my v3.2.x branch? As we pushed a lot of my v3.2.x tree to angstrom, but they did end up customized their config... Are you running the latest version of the uvccapture software?

      BTW: This driver is supported by:

      description:    GSPCA/OV534 USB Camera Driver
      author:         Antonio Ospite <ospite@studenti.unina.it>

      So, in the last week while searching have you talked to him?


      1. I see. I've been running uvccapture 0.5. perhaps that was problematic. I'll let you know by the end of this week with new branches and uvc. I haven't emailed the author (can I really do that and expect a prompt reply??!!! wow).


        1. Daniel,

          It really depends, every driver maintainer is different. Some are paid to maintain their linux drivers, while others do it just in their free time. So never assume... (wink)

          Either way, it's currently listed as his driver. So if it worked in v3.2.x and now according to you it doesn't work in v3.6.x so he would be the first to contact.


          1. Well, same error for 3.2 and 3.6 with apt-get install uvccapture libjpeg8. The working angstrom uses 2.6.32 kernel although I got if from narcissus 4days ago. Perhaps this explains why. I'll try checking out to you 2.6.x and see if I can get it running and keep you updated. I'll also send email to the author.

            As always, thank you very much

            1. Daniel,

              2.6.32 was released on December 2009... There's been a lot of changes in almost 3 years now of kernel development...


              1. yeah......I guess my options are contacting the author and try from there. For me, Angstrom build using bitbake is confusing so I'll try my best to stick to your configs.


                1. An aftermath report, Antonio promptly helped me out in figuring things out. Apparently the uvccapture (recent apt-get installation) does not work with the driver, but it's not the driver's fault. v4l2-ctl command from v4l2-utils verified this for me. Since my beagleboard C4 didn't have displays, I resorted to installing opencv and writing simple program for capturing frame and saving it to jpg. It works and I'm moving on to getting SPI to work (I hear it's a pain - any advice?).


                  1. Cool, I'm glad Antonio was able to help out! spi should work out of the box, as long as you replace




                    in your u-boot boot script: uEnv.txt. Then you'll have userspace access to /dev/spidevX.Y...


                    1. Thanks. What is buddy arg in u-boot? I looked it up http://www.denx.de/wiki/view/DULG/Manual and nothing showed up.


                      1. Look up, it's on this page under "Create U-Boot "uEnv.txt" boot script: (nano uEnv.txt)"


                        1. Oh, I knew that the buddy line is already in the boot script. What I meant to ask was what does the command line do (how do I use it if I wish to apply in other situations)?


                          1. The buddy argument came from the beagleboard.org community to aid in supporting 3rd party expansion boards connected to the expansion interface on the Beagle. Due to kernel limitations it was easier to first detect and then pass expansion board info from u-boot to the kernel. The beagle board file knows to look for this buddy argument and based on it's value will automatically make pinmux/interface changes. For other devices you would have to write similar infrastructure code to accomplish the same thing. For complete details look at the individual expansion patches for v3.6.x:



  14. Hi Robert,

    Your guidance is very helpful! I have a Beagleboard-XM Rev C. and it exhibits the USB shutdown problem (USB comes up fine at boot, but then after a period of minutes to hours the entire USB subsystem shuts down and can only be started again with a re-boot). After much searching, I found a description of the sprz319 erratum and your kernel patch here http://rcn-ee.homeip.net:81/testing/beagleboard/ 

    There are several versions of the patch, so I used the latest one and it seems to have resolved the problem.

    My questions are:

    1. Is this a common problem with the Beagleboard-xm? Or, is it rare and I'm just very unlucky? From reading some of the descriptions, it sounds like the root cause has to do with clocking of the USB subsystem and how that aligns with the CPU clock. Is there any evidence that the issue gets better or worse with environmental conditions like temperature and voltage (which could affect clocking and PLL behavior)? Also, is there any information on how effective the patch is? The reason I'm asking this is that I am building a system that needs to be always on and accessible, so I'd like to know what to expect in terms of reliability and failure rate for this issue.

    2. If this is fairly common, perhaps you should provide some guidance/instructions on this page regarding the issue and the patch. I've seen sparse information about it on various blogs and message boards, but those were hard to find and not very comprehensive. Maybe add to the FAQ a brief description of the problem and instructions on how to apply the patch? Also, one thing I discovered in my investigation is that the most recent kernels do not have this patch applied because it breaks the standard Beagleboards. So, people will continue to encounter this issue.


    1. Hi Bruce,

      This is a rare issue that so far as seemed to crop up more often in later/newer boards.. Thus a lot of the omap kernel developers who purchased the initial boards have not seen the issue. I myself have a half a dozen xM's I've picked up over the last few years, but unfortunately none of which show the issue, so I haven't been able to personally test this issue for end users.

      To answer you questions, it seems that the PLL driving the USB clock is drifting over time, enough to miss some of the USB transaction (thus triggers the USB EMI issues dmesg)...

      The patch is disabled by default in my kernel builds (but it is included in the git repo), as it breaks booting on the original Beagle's. You can enable it yourself in the patch.sh script, via un-commenting the sprz319_erratum line: https://github.com/RobertCNelson/stable-kernel/blob/v3.7.x/patch.sh#L359 and then it'll be included when building via the build_kernel.sh script in this wiki..

      Btw: Since we are moving to v3.7.x for my next image, can you quickly verify this fix still works by running:
      http://rcn-ee.homeip.net:81/testing/beagleboard/sprz319-erratum-2.1-3.7.1-x5.1/ (there was a few tweaks needed for the patch for v3.7.x and I don't have an xM with the issue..)


      1. Robert,

        Yes, I will try the v3.7.x patch and see if it still works. BTW, I'm just copying the zImage file to my boot directory (overwrites the existing one) and then untarring the modules file to my rootfs partition. I'm not doing anything with the other files in the erratum repository. I hope that's correct (there aren't any instructions on how to apply the patch....). That's what I did with the earlier version of the patch and it worked.


        1. Hi Bruce,

          Yeah, you only need the zImage/modules for booting. The other files just get copied by default with that script on my server, as users do sometimes ask for the patch/config used when building.


          1. Hi Robert,

            I tried both methods you described above: enabling the patch in the kernel build process (with version 3.7.2-x6), and also applying the patch from the repository (version 3.7.1-x5). Both seem to have fixed the issue. The only reason I'm saying "seem to have fixed" is that I've tested for about 12-15hrs with each one and have not seen any failures. Without the erratum fix, the USB bug manifests itself in anwhere from minutes to 8+ hours. Of course I'll let you know if I ever see any problems with the patch going forward.

            You mentioned that you do not have an XM board that exhibits the problem. Would you be interested in exchanging one of your XM boards wiithout the problem for mine?  I purchased it a few weeks ago so it's in good shape other than the sprz319 bug.


            1. Hi Bruce,

              Thanks for testing, sounds like the changes I made for the fix is good for v3.7.x too. So I'll offically push out a v3.7.x image for all users.

              Most of my xM's have other modifications, so it wouldn't be fair to swap one of those. I've put in a purchase order for a new xM this morning, as soon as I get it I'll start an overnight stress test on the usb today to see if it suffers from sprz319 (later this evening). If it passes, I'd like to swap it for the xM that you have that suffers from sprz319.

              Please email me at my digikey.com account tied to this profile, then I get can get your shipping address.