Skip to end of metadata
Go to start of metadata

This is a page about TI's BeagleBone.

Availability:

BeagleBone at Digi-Key
BeagleBone DVI Cape at Digi-Key
BeagleBone 3inch LCD Cape at Digi-Key
BeagleBone 7inch LCD Cape at Digi-Key
BeagleBone BreadBoard Cape at Digi-Key
BeagleBone Breakout Cape at Digi-Key

Basic Requirements

GCC Toolchain

Bootloader

Das U-Boot – the Universal Boot Loader http://www.denx.de/wiki/U-Boot

U-Boot Download:

Download U-Boot via git:

U-Boot Patches:

U-Boot Configure and Build:

Linux Kernel

Linux Build Script:

For Mainline v3.8.x (in development)

Testing

Status

usb host

works, but not hotplug

reset

works

DVI Cape

works

Run Build Script:

The kernel zImage and modules will be under the deploy directory.

Debian 7.0.0 (Wheezy) Root File System

Default User: debian
Password: temppwd

Root User: root
Root Password: root

verify the image with:

Extract Image:

Ubuntu 13.04 (Raring) Root File System

Default User: ubuntu
Password: temppwd

verify the image with:

Extract Image:

Setup microSD card

For these instruction, we are assuming: DISK=/dev/mmcblk0, "sudo fdisk -l" is useful for determining the device id..

Erase microSD card:

Setup Boot Partition:

Set Boot Flag

Format Boot Partition as vfat:

Setup Root File System Partition:

Format rootfs as ext4:

Mount Partitions:

Note: On most systems these partitions will be auto-mounted...

Install Bootloaders:

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

uEnv.txt based bootscript

Requires: v2013.04

Create "uEnv.txt" boot script: (nano uEnv.txt)

uEnv.txt

Copy uEnv.txt to the boot partition:

Install Kernel and Root File System:

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

Copy and Paste that "export kernel_version=3.X.Y-Z" exactly as shown in your own build/desktop environment:

Copy Kernel zImage:

Copy Kernel dtbs (Device Tree v3.6.x++):

Copy Root File System:

Copy Kernel modules:

Setup /etc/fstab:

Add:

/etc/fstab
Enable Networking:

Add:

/etc/network/interfaces
Networking: Using a shared SD card with Multiple BeagleBone:

To always enable the Ethernet interface as eth0..

/etc/udev/rules.d/70-persistent-net.rules
Enable Serial Login:

Debian:

Add at end of file:

/etc/inittab

Ubuntu:

Add:

/etc/init/serial.conf

Remove microSD card:

FAQ

CircuitCo LCD3 Backlight:

Turn on Backlight:

CircuitCo LCD3/LCD7 TouchScreen:

Add to /etc/modules:

/etc/modules

Comments

Comments, feedback, and questions can be sent to eewiki@digikey.com.

Comments Page

Labels
  • No labels
  1. The build the kernel procedure fails for me at "git checkout origin/am33x_v3.2 -b am33x_v3.2" with "fatal: git checkout: updating paths in incompatible with switching branches."

    1. In the linux-dev directory, rerun both "git pull" and "git fetch"...

      1. I ran "git pull" and "git fetch", but the behavior was the same.  Any other ideas?  Thanks.

        1. Maybe a "git checkout -f master" might help, otherwise what version of git are you using and what distro?

          It works fine here, and there's nothing special with the git commands used..

          Regards,

  2. Thanks for the instructions. Worked like a charm.

    However, the new kernel I've built + rootfs combination (Squeeze) doesn't list eth0 anymore when I do an ifconfig.

    Do I need to load a specific kernel module or force a special driver to be included in the kernel?

    1. Hi Francis,

      With the kernel config in this git repo build script, it's enabled by default..

      Any chance is this an A4 board? Please take a look at: http://beagleboard.org/static/beaglebone/latest/README.htm

      Specifically the Revision section under "A4" resistor/100Mbit ethernet.

      Regards,

      1. Hi,

        I have an A6 board and the stock Angstrom release works with regards to Ethernet. The modules listed above are effectively built-in the kernel.

        more modules.builtin
        kernel/drivers/net/ethernet/smsc/smc91x.ko
        kernel/drivers/net/ethernet/smsc/smsc911x.ko
        kernel/drivers/net/ethernet/ti/davinci_mdio.ko
        kernel/drivers/net/ethernet/ti/davinci_cpdma.ko
        kernel/drivers/net/ethernet/ti/ti_cpsw.ko

        root@devel:/proc# ifconfig
        lo        Link encap:Local Loopback
                  inet addr:127.0.0.1  Mask:255.0.0.0
                  inet6 addr: ::1/128 Scope:Host
                  UP LOOPBACK RUNNING  MTU:16436  Metric:1
                  RX packets:0 errors:0 dropped:0 overruns:0 frame:0
                  TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
                  collisions:0 txqueuelen:0
                  RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

        root@devel:/proc# dmesg | grep davinci
        [    1.682803] davinci_mdio davinci_mdio.0: davinci mdio revision 1.6
        [    1.689256] davinci_mdio davinci_mdio.0: detected phy mask fffffffe
        [    1.696640] davinci_mdio.0: probed
        [    1.700191] davinci_mdio davinci_mdio.0: phy[0]: device 0:00, driver SMSC LAN8710/LAN8720

        apparently I'm missing an entry for cpsw such as:

        [   12.512462] CPSW phy found : id is : 0x7c0f1
        [   12.513232] PHY 0:01 not found
        [   12.536693] ADDRCONF(NETDEV_UP): eth0: link is not ready
        [   15.512047] PHY: 0:00 - Link is Up - 100/Full
        [   15.512287] ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready

        Any clue of what could cause this?

        1. Hi Francis,

          Strange, I haven't personally seen any A6's in the field yet, can you please pastebin.com your full dmesg with 3.2-psp17 release I tagged last night.. (head of the am33x-v3.2 branch)

          fyi: Angstrom and this script share the same kernel source, just a slight modification to the defconfig..

          Regards,

          1. Hi Robert,
            I've moved to the new release and I've noticed the same issue.

            http://pastebin.com/u2aP2kRp
            (converted to pastebin by: Robert Nelson)

            1. Hi Francis,

              I think I'll need to pick up an A6.. My A5, doesn't show that issue at all..

              A5 boot: http://pastebin.com/kgHNYS9r

              diff (A5 is the +): http://pastebin.com/26RCWdTw

              Nothing really stands out...

              fyi: for verification, I just powered my A5, via usb to more match your config, no change, Ethernet works just fine..

              BTW: if you have time, can you replace the patches/defconfig with this file from angstrom; ( https://github.com/beagleboard/kernel/blob/beaglebone-3.2/patches/beaglebone/defconfig ).. Then you'll be building the exact same kernel as Angstrom's.. It would be useful in figuring out what config broke the A6..

              Regards,

              1. I'm rebuilding wit the new defconfig (had to modify the build script to pause after it copies the defconfig file so I could overwrite it) though the diff is very minimal. I'll let you know the result.

                Otherwise, at this point, I think the issue resides with the cpsw driver as it is not loaded in my case. I'll investigate if I have the time. Meanwhile I'll try to progress on other other fronts for my project.

                thx

                1. Actually just copy it right over patches/defconfig before running "./build_kernel.sh" or "./tools/rebuild.sh" as the git tree is setup for that release...

                  So with a brand new A6, (using the same sd card as yesterday), it's working here:

                  http://pastebin.com/qjD6Kvn6

                  Very, very strange...

                  Regards,

  3. Hmmm. So for the linux kernel source I'm using the omap branch. your instructions lists 2 kernel sources: Linus' and omap. which one do you use as in the setup process we need to change the config to refer to that directory.

    1. Hi Francis,

      Thanks for noticing, I had forgotten to document where most of the am33x linux patchset came from. I've now updated the kernel source list with a link to the TI arago project tree. Moving forward, for a normal mainline based kernel, we might be able to finally move to v3.6-rc1 (after the arm-soc merge) for the BeagleBone. (it will of course be using device tree's)

      Regards,

  4. Actually, the Kernel fetching / building process is not clear and that may be the cause of the issue I have.

    For U-Boot, if someone follows the instructions as is everything works fine.

    Now for the Kernel it is a different story. I if clone you project, checkout the branch and launch build_kernel.sh I get the following error: need to copy system.sh and configure it.

    From that file I concluded I had to at least clone the kernel project and update the path in the system.sh file. There are however 3 references to the kernel at the top of your page so it is not clear which one we should clone the kernel from (if it matters). Also the links aren't git:// urls so someone must be minimally knowledgeable to understand how to get that url from the web page you reference.

    So I think it would be beneficial if you could provide the exact instructions as for u-boot about how to clone the right kernel, modify the system.sh file before someone attempts to launch a kernel build.

    Hope this will solve my problem and help others.

    Here is what I'm trying after trashing my previous kernel:git clone git://github.com/RobertCNelson/linux-dev.gitcd linux-dev/
    git checkout origin/am33x-v3.2 -b am33x-v3.2

    cd ..; git clone git://arago-project.org/git/projects/linux-am33x.git

    cd linux-dev; cp system.sh.sample system.sh

    modify LINUX_GIT=~/linux-stable/ in system.sh to point to the location of the linux-am3x directory

    ./build_kernel.sh

    1. The git repo behind "LINUX_GIT" really doesn't matter, as it's just a starting point. The build_kernel.sh script will use "LINUX_GIT" as a "git clone --shared" reference and pull in tags from the linus and linux-stable tree's to checkout a pristine starting point.. (in this branch v3.2)

      What I want users todo is:

      This is shown when it errors out the first time when running "./build_kernel.sh"

      https://github.com/RobertCNelson/linux-dev/blob/am33x-v3.2/build_kernel.sh#L76

      I'm not sure how I can make this clearer without doing it on my own in the script, which i have a couple reasons for not doing it automatically..

      1: For me, I have 3 repo's.. linux-dev (ti development), stable-kernel (ti stable), and imx-devel (freescale devel/stable).. Having 3 identical "linux-stable" repo's is a waste of space.

      2: Most kernel dev's have already cloned linus's tree at once, so no reason to re-download another massive git tree, when it's can be easily linked.

      Regards,

      1. Ok. Didn't initially pulled from linux-stable.

        should work now. will let you know.

    2. got this error:

      Debug: LINUX_GIT setup...
      /home/r48910/linux/manual/kernel/linux-am33x
      [core]
          repositoryformatversion = 0
          filemode = true
          bare = false
          logallrefupdates = true
      [remote "origin"]
          fetch = +refs/heads/*:refs/remotes/origin/*
          url = git://arago-project.org/git/projects/linux-am33x.git
      [branch "master"]
          remote = origin
          merge = refs/heads/master
      Updating LINUX_GIT tree via: git fetch
      /home/r48910/linux/manual/kernel/linux-dev
      Cloning into '/home/r48910/linux/manual/kernel/linux-dev/KERNEL'...
      done.
      Resolve operation not in progress, we are not resuming.
      git tree is clean...
      [master 805545e] empty cleanup commit
       Committer: ubuntu <r48910@ubuntu.(none)>
      Your name and email address were configured automatically based
      on your username and hostname. Please check that they are accurate.
      You can suppress this message by setting them explicitly:

          git config --global user.name "Your Name"
          git config --global user.email you@example.com

      After doing this, you may fix the identity used for this commit with:

          git commit --amend --reset-author

      Branch tmp-master set up to track remote branch master from origin.
      Switched to a new branch 'tmp-master'
      Branch master set up to track remote branch master from origin.
      Switched to a new branch 'master'
      Already up-to-date.
      fatal: git checkout: updating paths is incompatible with switching branches.
      Did you intend to checkout 'v3.2' which can not be resolved as commit?

      1. Thanks for your support.

        After fetching the right Linux project and rebuilding the kernel I could see eth0 with ifconfig -a.

        After updating the /etc/network/interfaces file, eth0 is now powering up automatically.

  5. Thanks for a great job and clearer than usual instructions on setting things up.  I've got an A6 Beaglebone running your Ubuntu 12.04 system with kernel 3.2.23-psp18, everything seems to work.

    But git protocol is blocked here so I'm having a hard time figuring out how to get the kernel source/headers so I can cross compile a driver module to install on the BeagleBone.

    Are there any alternatives?

    For my purposes I don't much care if I run Angstrom 3.2.25#1 or Ubuntu 12.04 3.2.23-psp18 as with both systems I've been able to compile local sample programs and run cross-compiled sample programs transfered via USB stick.

    I thought I could compile my module on the BeagleBone out of tree if I could get the kernel headers,  using the procedure described here (stackoverflow.com/questions/4025320/building-out-of-tree-kernel-modules-depmod-and-why-reboot) but:

    sudo apt-get install kernel-headers-$(uname -r)

    didn't work: Unable to locate package kernel-headers-3.2.23-psp18

    1. Hello,

      Yeah, your not going to find my custom kernel in the ubuntu repo's...

      To get the kernel/header source, without using git, for BeagleBone's 3.2.23-psp18, first download:

      Then, just:

      Regards,

      1. Thank you so much for this solution.

        Before I attempt to cross-compile, I'd like to try installing the kernel headers to my BeagleBone SD card and trying the out of tree module build on the running kernel.  Is there a convenient way to just extract the headers from the linux-3.2 tree (like the way Debian/Ubuntu packages them up) or is it best to just copy the entire source tree even though I will only need the headers?

        Will renaming the linux-3.2 directory to say linux-3.2.23-psp18 break anything?

        I haven't had to do kernel building (other than the "Debian way" of :  fakeroot debian/rules clean ; dpkg-buildpackage -B -uc -us) since RedHat 6, linux 2.2.14 when I was setting up rtlinux a long time ago,  I recall once patching started things got pretty fragile.  Hopefully the process has improved.

        1. Hello,

          Unfortunately, with the arm arch the simplified 'kernel headers' are almost useless at this point. Alot of the SOC specific (sub-arch) headers doesn't get pulled into the package.

          The best thing to do is, just copy the fully patched kernel source and add two symlinks to that source directory from:

          • Really, only one is needed just don't remember which one specifically off hand...

          For building, unless you want to share the image in a nice *.deb package, don't bother with the debian pkg scripts. (there is nice in kernel make deb-pkg (wink))

          • On native arm builds an empty CROSS_COMPILE= is still needed...

          Regards,

  6. Hi Robert,

    when I used "make menuconfig" to enable "device drivers->usb support-> USB Gadget Support-> USB Gadget Drivers -> Compile HID Gadget as Module", then running with "make"  would give me error as

    CC [M]  drivers/mtd/nand/nand_base.o
    drivers/mtd/nand/nand_base.c: In function ‘nand_command_lp’:
    drivers/mtd/nand/nand_base.c:728:3: error: implicit declaration of function ‘dmb’ [-Werror=implicit-function-declaration]
    cc1: some warnings being treated as errors
    make[3]: *** [drivers/mtd/nand/nand_base.o] Error 1
    make[2]: *** [drivers/mtd/nand] Error 2
    make[1]: *** [drivers/mtd] Error 2
    make: *** [drivers] Error 2

    later on, then I fix the problem by defining "#define dmb() _asm_ _volatile_ ("" : : : "memory")" into nand_base.c and make again, it gave me error as

      LD      arch/x86/built-in.o
      CHK     kernel/config_data.h
      CC [M]  drivers/usb/musb/musb_procfs.o
    drivers/usb/musb/musb_procfs.c:39:35: fatal error: mach/hardware.h: No such file or directory
    compilation terminated.

    so I have to remove the line "include <mach/hardware.h>" from musb_procfs.c. But make again, gave me

    LD      .tmp_vmlinux1
    drivers/built-in.o: In function `d_can_plat_probe':
    d_can_platform.c:(.devinit.text+0x4324): undefined reference to `clk_get'
    d_can_platform.c:(.devinit.text+0x444c): undefined reference to `clk_get_rate'
    d_can_platform.c:(.devinit.text+0x44fd): undefined reference to `clk_put'
    make: *** [.tmp_vmlinux1] Error 1

    if you can help me with this would be much appreciated.

    I am using ubuntu Precise on a virtual box.

    Cheers,

    1. Hi Damien,

      Unless your more specific on what you actually changed.. git diff

      Build just fine using...

      PS.. Remember this is massive fork based on 3.2.x stable, so not every config option will build...

      Regards,

  7. Hi Robert,

    I got the compilation problem fixed. But now, I changed somthing on the "board-am335xevm.c" file. However, everytime when I run the "build_kernel.sh", my changes would get lost. Is there any way that I can put my change into a patch file and get applied everything when running the "build_kernel.sh".

    Please note, you have a patch file to "board-am335xevm.c" already, how can I apply your patch first, then follow with my one?

    Cheers,

    1. Hi Damien,

      Yes there is... After you've first run the ./build_kernel.sh script to initially setup the KERNEL directory... Make your changes, then run ./tool/rebuild.sh to just rebuild the kernel image... Once your satisfied with your patch, just run:

      and then add that *.patch to patch.sh script so that it will get automatically added when running ./build_kernel.sh...

      Regards,

      1. Thanks Robert, the commands you gave works fine.

        Now, I have a few more questions.

        1) Are the patch files generated with command above transferable? I mean, can I bring the patch files with the modified pathch.sh file to different computer without any other files - since other files can be get with commands listed on this page.

        2) I built the hid module with the kernel source referred on the page, but when I insmod into my kernel, I got "insmod: error inserting './g_hid.ko': -1 Invalid module format" error. Checked with syslog file, it says "./syslog:Sep  3 21:29:16 bone2 kernel: [430281.750457] g_hid: disagrees about version of symbol module_layout", I am thinking this may due to my kernel is 3.2.23-psp18, while the kernel source referred at this page is 3.2.28-xxxx, so, I followed the steps stated a couple of conversation above to build the HID module with 3.2.23, but this time, when I insmod the module, I got error as "insmod: error inserting 'g_hid.ko': -1 No such device", what could be wrong?

        To build the hid module, there is no source code change, all my changes are:

        diff --git a/patches/defconfig b/patches/defconfig
        index 999f67f..19bda00 100644
        --- a/patches/defconfig
        +++ b/patches/defconfig
        @@ -3321,7 +3321,7 @@ CONFIG_USB_GADGET_MUSB_HDRC=y
         CONFIG_USB_GADGET_DUALSPEED=y
         # CONFIG_USB_ZERO is not set
         # CONFIG_USB_AUDIO is not set
        -CONFIG_USB_ETH=y
        +CONFIG_USB_ETH=m
         # CONFIG_USB_ETH_RNDIS is not set
         # CONFIG_USB_ETH_EEM is not set
         # CONFIG_USB_G_NCM is not set
        @@ -3336,7 +3336,7 @@ CONFIG_USB_ETH=y
         # CONFIG_USB_G_NOKIA is not set
         # CONFIG_USB_G_ACM_MS is not set
         # CONFIG_USB_G_MULTI is not set
        -# CONFIG_USB_G_HID is not set
        +CONFIG_USB_G_HID=m
         # CONFIG_USB_G_DBGP is not set
         # CONFIG_USB_G_WEBCAM is not set

        Cheers,

        1. Hi Damien,

          Remember, this kernel tree for the BeagleBone is a massive fork based on v3.2.x so not everything works at the moment... Right now the BeagleBone developers are working on a v3.6.x based replacement, but it's not even close for general use at this point in time...

          Thus: I had it set as: # CONFIG_USB_G_HID is not set

          Regards,

          1. Hi Robert,

            If this is the situation, can I know the insturctions to build with kernel "2.6.32"? - because someone on the net said, this kernel is alright.

            If you can previous install instructions and links to a prebuilt ubuntu with 2.6.32 kernel would be much appreciated.

            Cheers,

            1. Hi Damien,

              2.6.32 was release on Dec 3, 2009, whereas the BeagleBone was announced in Nov of 2011... So unless you back-port it yourself, that is not going to happen. Instead it would be more useful for the community for you to debug the driver with both v3.2.x using any patches/diff from v3.6-rc4 and report it to kernel.org bugzilla...

              Regards,

          2. Hi Robert,

            I am just coming back from other projects and downloaded the 3.2.33-psp26.1 kernel. I realized that CONFIG_USB_G_HID is settable within this kernel now. Does it means that the issue of inserting of module g_hid.ko mentioned above been addressed?

            Cheers,

  8. Hi Robert,

    How can I patch this Kernel to Real-Time. If I patch same Kernel to Real-Time and then use your scripts "build_kernel.sh", support RT is disappear. How I must it properly?

    Or can you tell me how to compile kernel with RT patch on BeagleBone (with am3359)?

    1. Hi Maslak,

      ./build_kernel.sh will always reset the KERNEL directory to a known working (or whatever is in patch.sh at the time of running).. So once you run that script to setup the tree, stop the build process, then apply the Real Time patch set. Once your patch is applied, run ./tools/rebuild.sh as this other script will only build what is in the KERNEL directory...

      Regards,

      1. Thanks for your help.

        Your script work good, but I have some question. Did you run Basic RT on BeagleBone? I'm trying but I keep encounter when I choose 'Basic RT' option in "Kernel features > Preemption model".

        Under is my logs. Do you know what I must check or uncheck?

        log.txt

        1. Hi Maslak,

          I've seen that same error from a another user with the rt42 patchset, seems to be a regression. (I've only boot tested the rt38 patchset on the BeagleBone..).. Can you share your "git diff patches/defconfig" and i'll take a look at this again..

          Regards,

          1. Hi Robert,

            I've tried it with rt38 patch and I have the same situation.

            I upload my "git diff patches/defconfig" under:

            diff.txt

          2. Sorry I've given you not all "git diff patches/defconfig". Under I actualize "diff.txt" and add log from run BeagleBone with RT (which doesn't start) and without RT (which work good). When I build Kernel without RT I change only one option (in Kernel features > Preemption model) and it works.

            diff-a.txt

            log-withoutRT.txt

            log-withRT.txt

            Do you have some idea, what I should change?

            Regards,

            1. Hi Maslak,

              I just rebased the repo on v3.2.29, a few angstrom patches and the rt42 patchset. (the rt42 patchset isn't enabled by default, so make sure you enable it at the bottom of patch.sh) So far I've only tested with this enabled:

              v3.2.29 + rt42 patchset:
              https://raw.github.com/RobertCNelson/linux-dev/am33x-v3.2/patches/rt/config.diff

              v3.2.29 + rt42 patchset + CONFIG_PREEMPT__LL=y
              https://raw.github.com/RobertCNelson/linux-dev/am33x-v3.2/patches/rt/CONFIG_PREEMPT__LL.diff

              In the past, on omap we've had problems with enabling certain levels of preemption.

              So don't currently go beyond CONFIG_PREEMPT__LL=y as,
              v3.2.29 + rt42 patchset + CONFIG_PREEMPT_RT_BASE=y
              Just fails with lots of ext4 errors...

              Regards,

  9. Hi Robert,

    when i switch on FULL RT the kernel will not be build. So, what can i do to get a kernel with full RT support ?

    Is it possible to change your scripts to get an older version of linux with RT patch running ?

    Regards,

    1. Hi Erol,

      Patches welcome, see above about the discussion on the RT patchset, currently anything beyond CONFIG_PREEMPT__LL will not boot with the current v3.2.x fork..

      Regards,

  10. Great guide! Worked as expected.

    Thank you!

  11. Cannot make /dev/fb1 to appear. :(

    config has:

    CONFIG_FB_OMAP2_NUM_FBS=3

    CONFIG_FB_OMAP2_DEBUG_SUPPORT=y

    CONFIG_OMAP2_DSS_DEBUG_SUPPORT=y

    Kernel command line:

    vram=8M omapfb.vram=0:4M,1:4M,2:4M omapfb.debug=y omapfb.test=y omapdss.debug=y

    During booting:

    - my display is recognized.

    - NO omapfb ot omapdss debug prints.

    After boot-up:

    /dev/fb0 device is avaiable and I can even play videos on it using "mplayer2"

    - no /dev/fb1, /dev/fb2 devices.

    How to make /dev/fb1 or /dev/fb1 to appear?

    1. Hi Pavel,

      Well that's expected as the BeagleBone is based on the TI am335x family, which doesn't have the OMAP2 based display hardware, it has the DaVinci display hardware... So "omapfb.*" boot args and kernel configs are not utilized...

      Take a look at the da8xx-fb driver: http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=blob;f=drivers/video/da8xx-fb.c;hb=HEAD

      Regards,

      1. Hi Robert,

        Thank you for the answer.

        I have another question:

        I'm trying to play a video file H.264, 1280x720 on 800x480 display.

        I'm using mplayer and gstreamer to do that.

        With or without scaling the playback performance is quite poor:

        - gstreamer with NN-scaling : 16 FPS

        - mplayer with fast bilinear : 17 FPS

        It looks like the HW video acceleration support is missing.

        My target is to get around 30-40 FPS, wich seems to be quite unreacheable.

        Is there any way to enable HW accelerated decoding or scaling on beaglebone?

        Or it is already enabled?

        1. Hi Pavel,

          To my current knowledge, TI has not released any HW based Video Acceleration for playback on the am335x used on the BeagleBone.. There is SGX acceleration (OpenGL ES,etc): http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/gfxsdk/ but I have not tried using it yet..

          Regards,

  12. Hi Robert,

    I am trying to build a kernel with Xenomai real time support. Compiling the kernel using your procedure works on my virtual machine, however I have a couple of (newbie/simple) questions.

    1) The resulting build is of a 3.6.x kernel, is that now supported for the beaglebone (in the comments you mention that only 3.2.x is currently supported)?

    2) I need to compile a 3.2.23 kernel since that is the latest version supported by Xenomai. I am unsure exactly how to do that since the build_kernel.sh script seems to update to the latest version automatically. How can I check out that particular version via git and how to prevent the script from updating it?

    3) Am I correct in thinking that after the initial build_kernel run, I need to apply the Xenomai patch to the kernel source files located in /linux-dev/KERNEL and then run the rebuild.sh script?

    Thanks!

    1. Hi Stefan,

      1. I'm not planning on replacing v3.2.x with v3.6.x at this point in time, but there is really no future for v3.2.x in mainline as much of the code that we have written for it will get thrown out, but v3.2.x will get replaced eventually by v3.6+i.x. (it'll probally be v3.7: as we now have a capebus https://github.com/beagleboard/kernel/commit/044bde86ed265c387e4757fbb82b49ccb20dd1ac)
      2. Every release is tagged, so you can easily checkout one of the v3.2.23 tags, but I'd recommend you actually port Xenomai to v3.2.31 as the diff v3.2.23..v3.2.31 is just driver fixes...
      3. Correct, use ./build_kernel.sh to setup the tree, apply your work in progress patch, and rebuild with ./tools/rebuild.sh till you get yoru patch-set working right..

      Regards,

      1. Hi Robert,

        First off -- thanks for the quick reply!

        I've checked out v3.2.21 by doing "git checkout v3.2.21", as well as commented out the application of the 3.2.30 patches in the patch.sh file. However, I still end up with the following error while trying to patch Xenomai in:

        prepare-kerne.sh: Unable to patch kernel 3.2.29 with ipipe-core-3.2.21-arm-1.patch

        This should mean that I am trying to patch the Xenomai patch against a v3.2.29 kernel. Where is this upgrade from the checked out 3.2.21 happening and how can I prevent it?

        EDIT: After the above error, I went in the version.sh file and changed KERNEL_REL to 3.2.21 and BUILD to psp16, which I thought should bring the kernel to the required version to be compatible with the Xenomai patch. However, now when I run ./build_kernel.sh I get an error out of the git pull $GIT_OPTS git://github.com/RobertCNelson/linux.git ti_am33x_v3.2-staging_7 :

        Automatic merge failed; fix conflicts and then commit the result.

        Am I right in thinking this is happening because that particular patch is incompatible with that kernel? If so, is there an older version of that patch that I can use?

        EDIT2: I disabled the above git pull command and all the patches after the libertas ones (since they were failing due to the ti_am33_x not going through) and the Xenomai patch goes through. However, I get an error during compilation for drivers/built-in.o

        So this makes me think that the ti_am33_x is necessary (which I would think it is anyway). I'll try to use an earlier version, but I've tried a couple with no luck.

        Thanks again for your help!

        Kind Regards,

        Stefan

        1. Hi Stefan

          I'm really not sure why everyone goes with the perceived easy way "easily checkout one of the v3.2.23 tags" when in reality, forward porting the patchset is actually easier. As there are more things to take in consideration then just the patchset your trying to include...

          First, the kernel we are using for the Beaglebone is massive fork based on v3.2.0, there is simply no way (we tried) to easily merge the arago v3.2-staging and the mainline "3.2.x" stable branch... So DON'T change KERNEL_REL, and don't disable the ti_am33_x pull (unless you don't care about booting the Bone..)..

          So now for the good news, I pushed a patch with the ipipe-core-3.2.21-arm-1.patch re-diffed onto the BeagleBone 3.2-psp24 release commit (3.2.31)

          https://github.com/RobertCNelson/linux-dev/commit/f6ffc6e46dee99ca875318b2c7a8d1a548519a3b

          So if you enable the patchset in patch.sh and copy the defconfig over from "./patches/xenomai/defconfig" to "./patches/defconfig" it will build.. (had to disable pwm, otherwise a custom defconfig is not needed)

          But, it fails to boot. So since I have zero personal interest in xenomai, i'm leaving this support completely up to you. (wink) Once you can get it too boot with a simple patch/config change let me know...

          Regards,

          1. Hi Robert,

            Massive thank you for taking the time to look into this. I'll try to get that going on Monday.

            However, I am wondering if this is going to be the easier way -- I am guessing there is a reason why the Xenomai folks are not supporting anything above v3.2.21. Are you sure that is not the reason why it is not booting? Would it not be easier for me (or anyone else who wants to support Xenomai) to simply checkout your work from its state in July (which I think is roundabout when you were supporting v3.2.21), and build it like that (which is what I think I will try if I fail at making the patch you included work).

            Anyway, thanks once again for helping out, will update you on my progress.

            Kind Regards,

            1. Hi Stefan,

              I think v3.2 is just maintenance for them at this point, as they are also supporting v3.4/v3.5:
              http://git.denx.de/?p=ipipe-2.6.git;a=summary

              Maybe... I just don't remember how well that older kernel supported the Bone, we are always moving forward in kernel versions for fixes... So who knows. the other option, at some point ipipe will move to v3.6/v3.7 and right now the Bone will boot off those and most of the massive kernel fork is now mainline...

              Regards,

              1. Hi Robert,

                After some initial failures and delays, I am finally starting serious work on this.

                I've just verified the ability of my set up to compile the vanilla kernel and run it on the bone. I am almost done compiling the Xenomai capable one, and will test shortly. I expect to have a few questions related to setting up debugging for the kernel (passing some flags for the compilation process and possibly an inline one during the boot process) -- thought I should let you know. 

                I am expecting the following error:

                Kernel stops after "Uncompressing Linux… done, booting the kernel."

                This means that the kernel crashes before the console is enabled. You should enable the CONFIG_EARLY_PRINTK option. For some architectures (blackfin, x86, arm), enabling this option also requires passing the earlyprintk parameter on the kernel command line. See Documentation/kernel-parameters.txt for possible values.

                For the ARM architecture, you have to enable CONFIG_DEBUG_KERNEL and CONFIG_DEBUG_LL in order to be able to enable CONFIG_EARLY_PRINTK.

                How does one go about setting up these flags -- edit the config file directly?

                Kind Regards,

                1. Hi Stefan,

                  Please be more specific, when you reference "vanilla kernel" what is your actual kernel version base?

                  That is correct, with the Xenomai patch I pushed to the v3.2.x branch in the repo a few days ago, it will lock up after "Uncompressing Linux... done, booting the kernel."

                  To use earlyprintk: first add "debug earlyprintk" to your bootargs.

                  For the kernel config, load up menuconfig,

                  Of course, this directions will not work if your using v3.6/v3.7 with device tree.

                  Regards,

                  1. Robert,

                    When I say vanilla kernel -- I mean the kernel that is compiled when using your directions above i.e. v3.2.31-psp24. I guess it's very far from the commonly used definition of vanilla.

                    When you say add "debug earlyprintk" to your bootargs do you mean:

                    Kind Regards,

                    Stefan

                    1. Hi Stefan,

                      Okay, then earlyprintk should work with v3.2.x, other then reading the theory on making it work with v3.6/v3.7 device tree's I haven't been personally tried it yet. (it's a lot different)

                      Correct, that's the bootargs variable...

                      Regards,

                      1. Thanks! I am compiling with the correct config now (decided against testing the non-early debug enabled kernel), should be done in a couple of hrs (kinda slow on my virtual machine).

                        UPDATE: Compiled and tested the kernel -- it seems the issue is with the way the interrupt clock frequency is handled, and some flow controller (or smth of the sort) within the Xenomai codebase. It seems it's something the guys over on the Xenomai mailing list have tackled before. I am waiting for them to respond with a concrete patch which I hope will not be too long from now. 

                        Fingers crossed, I should be able to provide you with a new config file and an updated patch that should work!

                        1. Hi Stefan and Robert,

                          first of all, thanks a lot @Robert for your work!

                          @Stefan: have you manged to achieve your purpose? I am trying to to compile a Xenomai enabled kernel.

                          Regards

                          Davide

                          1. Hi Davide,

                            I have a running Xenomai kernel. However, I went a slightly different way about it.

                            I merged the Arago repository with mainline kernel v3.2.21, and then applied the Xenomai patch.

                            After fixing some timer issues and some interrupt handlers in the codebase, it's working well so far.

                        2. Hallo Stefan,

                          wonder how the Xenomai kernel is turning out - I'd be very interested as wel

                          btw I have Xenomai 2.6.1/3.2.21 running on a raspberry following these instructions:

                          http://diy.powet.eu/2012/07/25/raspberry-pi-xenomai/

                          they had to massage timers into work too, here's the broadcom-specific patch - maybe it's some inspiration:

                          http://powet.eu/raspberrypi/rpi-linux-3.2.21-xenomai-2.6.1.patch

                          - Michael

                          1. Hi Michael,

                            The idea is pretty much the same. If you see my reply to Davide above, the way to get it to run is very similar.

                            I will try to find time this week to go back to this kernel fork and try to get it to run, so that people have an easy way to run Xenomai on the Bone. It took me the better part of 1 week to get the kernel to run on mine, as I had to piece information from many different sources.

  13. Did anybody try to get the RT_PREEMPT patches working on the beaglebone kernel?

    looking at http://www.kernel.org/pub/linux/kernel/projects/rt/3.6/ I think the patch for v3.6.7 is the closest match

    now in  https://github.com/RobertCNelson/linux-dev/commits/am33x-v3.6&nbsp; we have am33x-v3.6 which I think stands at  base v3.6.2

    how should I go about it - take am33x-v3.6, apply v3.6.2...v3.6.7 and then the RT_PREEMPT 3.6.7 patch?

    thanks

    - Michael

    1. Hi Michael,

      I've updated the am33x-v3.6 branch to v3.6.8 and added the real time patchset:

      https://github.com/RobertCNelson/linux-dev/commit/e36c4596350c17baf38501ecba39afc08aa2fbac

      It's disabled by default, so just enable it via uncommenting out "#rt_patchset" in patch.sh.

      It's untested.

      Regards,

      1. Hi Robert,

        thanks - having that in place is really valuable

        Background: I'm adapting the RT parts of the linuxcnc.org platform for ARM processors and non-RTAI based RT kernels; the major options being RT_PREEMPT and Xenomai.

        re Xenomai: there are now several reports of a Xenomai beaglebone working and I have two pointers to (different) patchsets. I note there was an attempt at bringing the ipipe and Xenomai patches in which was backed out. How do you feel about a second attempt after I get it to work reproducibly?

        A second option I was suggested is to post and document Xenomai pre and post patches on the xenomai site, which obviously must refer to a beaglebone kernel commit as a starting point.

        -Michael

        1. Hi Michael,

          I have no problems un-backing out the v3.2.x Xenomai/RealTime patches. However I do have to ask as the v3.2.x branch is pretty much abandoned at this point by the BeagleBoard.org community.

          Any chance do you guys have a v3.7-rcX based patchset?

          As the community is rapidly moving to a v3.7.x based kernel. Our unified tree is here: https://github.com/beagleboard/kernel/tree/3.7

          You can see an early version of this unified tree in my am33x-v3.7 branch as I'm spending some time re-testing a lot of the BeagleBone Capes.

          Regards,

      2. Dear Robert,

        Untill now I was using your 3.2.30-rt45-psp23 kernel version on BeagleBone. As I wanted to move to newer kernel version, I successfully compiled the branch am33x-v3.6 from 

        https://github.com/RobertCNelson/linux-dev

        and also installed it on the Bone.

        But the board is not booting at all. I don't' see any heartbeat of user LEDs. What could be the problem ?

        1. Hi Kaushik,

          Did you follow the v3.6.x directions when installing the kernel from the am33x-v3.6 branch? As going forward we are not using board files, but instead using device trees http://omappedia.org/wiki/Device_Tree

          However if you did follow the v3.6.x directions, it should have booted, can you please log your full serial boot log and copy to http://pastebin.com and I'll take a look at it..

          Regards,

          1. Hello Robert,

            Thanks for your quick reply.

            I didn't find any difference in the way am33x-v3.2 or v3.6 should be compiled. Correct me if I am wrong. For v3.6, I followed the same steps that I used for building v3.2 kernel. Only additional thing I did now is to enable the Ftrace functionality in kernel configuration. Please find attached serial boot log here. As you can see from the output, kernel doesn't start. I am bit stuck now as I wanted to test the RT patch with beaglebone 3.6 kernel

            boot-log-beaglebone-v3.6.x.txt

            Also attached the only modified files which are patch.sh and system.sh

            system.sh

            patch.sh 

            Let me know if you have any suggestions.

            Regards

            Kaushik

            1. Hi Kaushik,

              With v3.6.x and greater this is expected, please reread the http://eewiki.net/display/linuxonarm/BeagleBone?replyToComment=11665670&#BeagleBone-uEnv.txtv3.6.xdevicetreebasedbootscript section.

              Specifically this part:

              Where we are loading the device tree binary "am335x-bone.dtb"...

              BTW: you should also really upgrade your version of u-boot, there's known issues with loading device tree binaries with that version..

              Regards,

              1. I am running the Angstrom flavour on BeagleBone. Are these above mentioned steps applicable for Angstrom also ?

                1. Hi Kaushik,

                  It actually doesn't matter what Linux based OS your running on the Bone. If you don't edit your "uEnv.txt" to properly boot the *.dtb file as shown in this wiki, it's just not going to boot with my kernel build scripts...

                  BTW, i just pushed an update of the rt patchset:
                  https://github.com/RobertCNelson/linux-dev/commit/4ca144074cd260819e9eff6d2f43181cde39f331

                  Regards,

                  1. Hello Robert,

                    I have edited uEnv.txt and also updated the u-boot.  But now I get the following message continuously after booting and the shell prompt doesn't come up

                    musb_bus_suspend 2308: trying to suspend as a_wait_bcon while active

                    See the attached boot log

                    file.txt

                    1. Hi Kaushik,

                      For reference, v3.6.x will never be production ready, as all developers are working on v3.8-rc...

                      But it should still boot, as it does here..

                      Looking at your bootlog, are you using an external usb drive? If not, your boot args are wrong..

                      Change:

                      Regards,

                      1. For installing the image on SD card, I am using an external USB card reader. But after installinng the image, I place it back into the micro SD slot of BeagleBone. My question is how BeagleBone will see this SD card while booting - whether as /dev/sdx or as /dev/mmcblk0p2. I tried changing to /dev/mmcblk0p2 in uEnv.txt. But then, I don't see any output in my serial terminal which is /dev/ttyUSB1.

                        Also I have one more question. The console is metioned as /dev/ttyO0 in uEnv.txt, but I am able to see boot log in /dev/ttyUSB1 ? How is that possible.

                        Let me know if I am troubling you too much with questions. I really need to get this RT patch working as I want to see how the real time features work on BeagleBone

                        1. Hi Kaushik,

                          Your confusing the device names used by the drivers used on two different systems.

                          On the BeagleBone, the device name /dev/mmcblk is used by the omap/mmc kernel driver when accessing the mmc card, (/dev/mmcblkp2) in this case..

                          On the BeagleBone, the device name /dev/ttyO is used by the omap/serial kernel driver when accessing the serial port, (/dev/ttyO0) in this case..

                          Regards,

                          1. Hello Robert,

                            Thanks for the reply. I have changed from root=/dev/sdb2 -> root=/dev/mmcblk0p2 in uEnv.txt.

                            But still no success and I still get the same message.

                            musb_bus_suspend 2308: trying to suspend as a_wait_bcon while active

                            I don't know what is causing this problem.

                            Are you going to provide RT patch support in v3.8. I will wait till then. At present, I am stuck at v3.2 RT patch through which only low latency desktop preemption model can be enabled.

                            1. Hi Kaushik,

                              musb_bus_suspend 2308: trying to suspend as a_wait_bcon while active

                              Is a known issue with the am335-v3.6 branch, patches welcome...

                              Back to the console problem, Angstrom is not supported here, if you were to follow the wiki directions as is, this would be the result:

                              beaglebone-v2013.01-v3.6.11-bone0.4.txt

                              Regards,

                              1. Thanks. Now I have put the kernel update on hold. 

                                I tried to execute cyclictest for latency check on 3.2 RT kernel. But it says "unable to change scheduling policy. Run as super user"

                                But even if I run as super user cyclictest doesn't run.

                                Have you ever tried Cyclictest on the 3.2 kernel for BeagleBone

    2. Should anyone succeed in building a 3.6 real-time system who is interested in using /dev/spidev (userspace spi driver) I'd appreciate if you'd download, compile, and run the test program for the Pandaboard I've posted here:

      https://groups.google.com/forum/?fromgroups=#!topic/pandaboard/00wxMmGw1AE

      and report the results.

      On a 3.4.7-rt Pandaboard system I'm finding spidev breaks realtime performance with latencies 3-15 mS when used in a 1 mS servo loop to write a waveform to an spi D/A chip (only 192 bits per sample need be shifed out the spi port which should take maybe 8 uS).  Basically spidev on Pandaboard seems unusable for anything that requires less than about 25 mS servo loop.  If anything, the RT_PREEMPT patches made things a little worse. :(

      The test program generates a 500Hz square wave with essentially perfect performance when toggling a GPIO bit every 1 mS, but not when doing the ioctrl() to wirte the spidev 192 bit message :(

      Of course you'll have to edit the spidev name and gpio bit name strings to match the Beaglebone.

      The program runs without any real-time patches and the gpio square wave is pretty decent with about 200 uS peak "jitter" on the pandaboard.  The nature of the spidev means if you have the spidev.ko module compiled and installed you can run the program and shift out the bits without any spi hardware attached.  You can 'scope the CS CLK and MOSI pins to see it in action.

      I'll be glad to help with enabling the spidev on the Bonebone if you've not done it before.

      I'll be watching this thread for any success in running an RT_PREEMPT kernel on the Beaglebone so I can try it myself eventually.

      --wally.

  14. Hi Robert,

    apparently you are maintaining different kernels: 3.2, 3.6, 3.7 and also 3.8, since you said that all the developers are moving there.

    Just curious: do you have any priorities in terms of cape support ? 

    We know that the most complete is the 3.2, but which one is going to be, in you opinion the next kernel which will have a decent cape support?

    Davide

    1. Hi Davide,

      The priorities of the beagleboard.org project at the moment is to replace v3.2 with v3.8, including support for all capes...

      The main tree is here: https://github.com/beagleboard/kernel/tree/3.8

      Last I looked at it, we also need to build a newer/git version of the device-tree-compiler as the new cape support requires some new device tree features (overlays).

      Regards,

  15. Hi Robert,

    apparently I had a problem with u-boot but it was my fault. never mind

    Davide

  16. I have compiled a 3.2.33 kernel and u-boot and installed the kernel plus modules on a armel-rootfs-201301141020.tar SD card, but the boot hangs after mounting the rootfs partition.

    I have used a ext3 file system, but the result is identical with ext4 (the default).

    I have also tried to use the other two rootfs but with no success, they also hang during boot.

    My Beaglebone has a Breadboard attached and it boots fine from the same SD card if I download the standard images from www angstrom distribution org.

    1. Hi Adam,

      How are you powering the BeagleBone, based on your error message, it looks like similar errors when powering via the otg usb plug? Please retry with a 5Volt DC adapter...

      Regards,

      1. Hi Robert,

        I have tried booting the http://www.angstrom-distribution.org images and they work fine without the 5 VDC adapter.

        Attaching a 5VDC adapter doesn't solve the problem in this instance.

        Is there a flag in the defconfig file I can switch on so I get better details in the error messages?

        Regards,

        1. Hi Adam,

          Nope, the error is very common for users powering their BeagleBone's via the usb-otg plug. Most users reported back that switching to 5 Vdc fixed the issue.. The other option is to try a different micro sd card...

          Btw, 3.2.x is pretty much considered legacy at this point, care to retest with v3.8.x? I'm about to push a few patches for usb support that i'm currently testing, so that's disabled right now in the repo..

          Regards,

          1. Well, I have only used 3.2.3N builds because that's what Beaglebone is shipped with per default and a colleague used a 3.2.NN kernel to get the D_CAN up and running. That is one of the purposes of this board. Basically I need:

            1) D_CAN up and running
            2) plus a functional opkg package installer in the rootfs so I can easily install things without having to cross-compile them. I cheat a bit by downloading libraries I need for the application to Beaglebone and compiling them natively there instead of cross-compiling them on my workstation.

            Oh, I need USB support for the application so I'm sorry, I can't use your 3.8.x build if it doesn't have USB support.

            I will try to reformat the SD card again with gparted and see what happens and make sure to use the 5VDC at all times in the future.

            / Adam

  17. Hi -

    I'm trying to get my beaglebone patched with xenomai - however I seem to have some issues with the versions that match.

    Any ideas?

    Just an update - I've patched the linux 3.2.21 kernel with xenomai. See the following link for (hopefully) thorough details:

    http://yapatel.org/wiki/index.php/Installing_Xenomai_on_a_beaglebone

    1. Hi Yogi,

      I produced a Xenomai kernel which we use for LinuxCNC development, you might try from here: http://git.mah.priv.at/gitweb/linuxcnc-kernel.git/shortlog/refs/heads/xenomai-3.2.21-bb-roosen-v3.2-staging-merged

      notice there's an open fatal error with that kernel which is currently discussed on the xenomai list, it looks I need to upgrade this to xenomai master from 2.6.1; other than that it should get you started.

      You might also want to check http://wiki.linuxcnc.org/cgi-bin/wiki.pl?BeagleboneDevsetup

      - Michael

      1. Hi,

        I noticed that there are other heads beaglebone-3.2.21-xenomai-2.6.2 and beaglebone-3.2.21-2.6.2-kappertz.

        Don't you suggest to use them? Will compiled images be available soon?

        Davide

        1. Davide,

          yes there are.

          The heads beaglebone-3.2.21-xenomai-2.6.2 is an upgrade of the http://git.mah.priv.at/gitweb/linuxcnc-kernel.git/shortlog/refs/heads/xenomai-3.2.21-bb-roosen-v3.2-staging-merged to use Xenomai 2.6.2. The linux-*z files here: http://static.mah.priv.at/public/beaglebone/ are built from that. If you are using the ubuntu rootfs image mentioned above, these tar files should be extracted into it to get the upgraded kernel. The original one has issues - it doesnt run the Xenomai regression tests properly; this one does.

          The  beaglebone-3.2.21-2.6.2-kappertz head is untried of yet, I got a config from Stephan and give it a try shortly.

          There is some major confusion as to what actually constitutes a sensible base kernel version to build Xenomai upon: you might want to read the emc-developers list and search for subjects like 'xenomai' and 'beaglebone'.

          - Michael

          1. meanwhile I've tried the Stephan Kappertz branch, it builds and runs: http://git.mah.priv.at/gitweb/linuxcnc-kernel.git/shortlog/refs/heads/beaglebone-3.2.21-2.6.2-kappertz

            I build binaries using my config from the other branch as a base

            binaries: http://static.mah.priv.at/public/beaglebone/linux-3.2.21-xeno-kappertz+.tar.gz

            the boot dmesg log: http://static.mah.priv.at/public/beaglebone/linux-3.2.21-xeno-kappertz+.dmesg.log

            not tested extensively, but NFS boots on abovementioned ubuntu rootfs image

            - Michael

      2. Does this linuxcnc system support /dev/spidev driver?

        I'm having problems with /dev/spidev breaking real-time performance trying to run a 1 mS servo loop.

        Attached is a simple test program to show the problem, real-time is essentially perfect writing to a GPIO pin, but breaks badly when writing to spidev instead. All the extra latency is in the spidev call.

        This test code is written for the PandaboardES so the GPIO and spidev names will need to be adjusted for the Beaglebone.

        swave_spidev.c

  18. Hi Robert,

    I need a couple of helps on the u-boot version 2013.0.0.1.

    1) I would like to enable fatwrite, so I defined CONFIG_FAT_WRITE into file am335x_emv.h and rebuild u-boot. Then I added:

    to the uEnv.txt file and reboot the machine, I was expecting a file fatwr would be created at the time of bootup, but it doesn't. Is there anything wrong?

    2) I have a DVI-D expansion board with my beaglebone. How can I enable u-boot messages being displayed on the monitor that attached to the DVI expansion board?

    I had removed definition CONFIG_SYS_CONSOLE_INFO_QUIET from am335x_evm.h, but there is still nothing come up until Linux was up.

    Cheers,

    1. Hi Damien,

      Based on the u-boot docs, the changes you did to "uEnv.txt" should have written a block of data to fatwr from address 0x80300000 0x400 bytes long..

      Your best bet is to ask on the u-boot mailing list http://lists.denx.de/mailman/listinfo/u-boot and get some feedback from the fatwrite developers.

      Well, you'd have to interface with the da8xx-fb driver and finish porting it to am335x devices first.

      http://git.denx.de/?p=u-boot.git;a=blob;f=drivers/video/da8xx-fb.c;hb=HEAD

      Regards,

      1. Thanks Robert for the message.

        Regarding the fatwrite issue, after investigation, I believe the problem can be fixed at function "set_cluster" within file fat_write.c under directory /fs/fat (patch file is
        given at below).

        The reason of the issue is: If function "set_cluster" was called with size equals ZERO, then the function would only issue the write instruction to MMC driver without data, this caused the MMC to be in a wait state for data and inhibiting further commands. As all subsequent commands to MMC would first check whether MMC is in inhibit state before actual command being issued, this check would always fail and time out occur.

        edit: rcn: it's more readable with code blocks...

        1. YUCK!! Never ever use "diff -cr" use "git diff" format.

          Please post u-boot patches to:
          http://lists.denx.de/mailman/listinfo/u-boot

          They will get lost and ignored in comment sections.

          Regards,

  19. Hello Robert,

    I am facing issues in booting up the linux kernel v3.8 on my beaglebone setup (Boardname: A335BONE, Board Rev: A6).

    I followed the steps mentioned in this link to download and build the uboot, kernel, ubuntu RFS. I created uEnv.txt and copied the uEnv.txt v3.6.x device tree based bootscript into it.

    When i power up the board, i get the following messages. I see my zImage and am335x-bone.dtb file placed inside /boot folder of the sd card.

    1. Hi Rajkumar,

      Please reread http://eewiki.net/display/linuxonarm/BeagleBone#BeagleBone-CopyingKernelandrelatedfiles the boot files (zImage/dtb's) need to be installed in the boot partition /media/boot/, not the boot directory on the rootfs partition /media/rootfs/boot/..

      Where X= the current kernel version...

      Regards,

      1. Hello Robert,

        Thanks for your quick reply.

        I meant to say in my last post that i had actually placed the zImage under /media/boot/zImage and dtb file under /media/boot/dtbs/ path not /boot folder .

        Sorry for the typo. 

        Regards,

        T. Rajkumar

        1. Hi Rajkumar,

          Okay, then from u-boot, can you double check the files are present? (fatls mmc 0:1):

          Regards,

          1. Hello Robert,

            I have the following files/folders only.

            1) dtbs/

            2) MLO

            3) u-boot.img

            4) uEnv.txt

            5) zImage

            It looks i miss initrd.img and soc.sh files and backup and tools directory. Where to find those files/folders?

            Regards,

            T. Rajkumar

            1. Those are not required for the directions on this wiki. They are just installed from the image I quickly flashed to my BeagleBone to quickly show the "fatls mmc 0:1" usage. BTW, what file sizes where shown when you ran the command.. (I was kinda of hoping you would have shown the same type printout as I had done..) If they are in the ballpark, that only leaves an error in "uEnv.txt" (please pastebin.com your version of that file) or an error in your compilation process of u-boot. As I already re-verified this page again on "Feb 18"...

              Edit: Your uEnv.txt looks fine... I'd really just try reformatting the microSD card and following the directions from scratch, something got corrupted.

              Regards,

              1. Hello Robert,

                I didn't get any compilation errors while building u-boot.
                Regards,
                T.Rajkumar

                1. Hi Rajkumar,

                  Everything looks fine. I'll retry it again tonight.

                  Regards,

                  1. Hello Robert,

                    Thanks. Let me know after you retried.

                    I reformatted my SD card and retried again from scratch. This time i used setup_sdcard.sh found ubuntu-12-10.minimal-armhf-2013-02-17.tar.xz file. 

                    The command i used to run the setup_sdcard.sh is (sudo ./setup_sdcard.sh --mmc /dev/sdc --uboot bone).

                    I ended up with the same status as before. 

                    But when i check the uEnv.txt file inside my sd card, the contents looks different than what you specified under section uEnv.txt v3.6.x device tree based bootscript

                    which one i need to take? either the auto generated one from setup_sdcard.sh or the one given at section uEnv.txt v3.6.x device tree based bootscript.

                    Regards,

                    T. Rajkumar

                    1. Hi Rajkumar,

                      Odd, that image fails too? What OS are you running on your HOST system, virtual/arch/etc??? (Debian Wheezy amd64 here) Do you have a second system available? Of course with a second sd/mmc usb writer...

                      Well yes, it should look different as, (--uboot bone) actually corresponds with the v3.2.x directions on this wiki.

                      There's a second target included in that image (--uboot bone_dtb) that matches up with the v3.6.x based instructions.

                      BTW: Just so we do not go crazy, can you quickly retest this image using the same host system/sd/etc..

                      http://circuitco.com/support/index.php?title=BeagleBone#Image_Files

                      Update: The directions still work as. (made a few quick updates on the kernel version listed) Here's my bootlog:
                      bone_march1.log

                      Regards,

                      1. Hello Robert,

                        I had tried the http://circuitco.com/support/index.php?title=BeagleBone#Image_Files image. It works fine in my setup.

                        Then i went back i tried with bone_dtb (--ubot boot_dtb) in the setup_sdcard.sh. I still end up with the same issue.

                        Regarding the HOST system, i use Ubuntu 11.04 system.

                        Regards,

                        T. Rajkumar

                        1. Hi Rajkumar,

                          Thanks for testing the CircuitCo image, they use dd, so it's a good comparison and confirms your usb/sd/mmc adapter works correctly and your BeagleBone is operating correctly. So that leaves the userland tools we use to copy the files to the SD card.

                          Unfortunately, Ubuntu 11.04 (Natty) went eol (28 October 2012) please retest with either Ubuntu 12.04 LTS or Debian Wheezy.

                          Regards,

                          1. Dear Robert,

                            Is there any plan to support full RT(Real-Time) kernel for BeagleBone ? Currenly maximum CONFIG_PREEMPT__LL=y is supported

                            Regards

                            Kaushik

                            1. Hi Kaushik,

                              I am not one of the Real-Timer Kernel developers so I can't answer this question for them. Just note, the v3.2.x tree has been abandoned by me and all work is going on v3.8.x/v3.9-rcX...

                              It's not that a maximum of PREEMPT_LL is supported, it's just that a maximum of that actually works

                              Regards,

                            2. Hi, Kaushik -

                              I've patched the linux 3.2.21 kernel with xenomai. See the following link for (hopefully) thorough details:

                              http://yapatel.org/wiki/index.php/Installing_Xenomai_on_a_beaglebone

                              Email me if you run into any issues.

                          2. Hello Robert,

                            Just a dumb question. Are you referring to RFS or the host machine

                            where i run the serial console to get debug log. If it is RFS, i use 

                            ubuntu 12.10 (Quantal) given in this link.

                            Regards,

                            T. Rajkumar

                            1. Hi Rajkumar,

                              Regarding the HOST system, i use Ubuntu 11.04 system.

                              Unfortunately, Ubuntu 11.04 (Natty) went eol (28 October 2012) please retest with either Ubuntu 12.04 LTS or Debian Wheezy running on your HOST machine.

                              Regards,

                          3. Hello Robert,

                            I am trying to integrate drivers (from v3.2) for the camera cape into the 3.8 kernel build.

                            I see the driver folder is changed. i dont see /drivers/media/video folder. 

                            Instead i heard capemgr is used to scan the available cape and load firmware, 

                            instead of modifying the board file.

                            Since i am new to 3.8 kernel, please guide me how to integrate my camera patch

                            into 3.8 build.

                            Regards,

                            T. Rajkumar

                            1. Hi Rajkumar,

                              We are all pretty new to v3.8.x I'd recommend you post your current v3.2.x patch and question to the beagleboard google group: https://groups.google.com/forum/?fromgroups#!forum/beagleboard...

                              I'm still figuring out capemgr myself...

                              Regards,

                              1. Robert,

                                Thanks Robert. Do you have any documents/links on capemgr 

                                for me to start with. i didnt get any good material in google on this.

                                Regards,

                                T. Rajkumar

                                1. Hi Rajkumar,

                                  Google isn't going to find much, as capemgr is still in development. You can find the author's tree at: https://github.com/pantoniou/linux-bbxm and follow it's development.

                                  Regards,

  20. Hi,

    Build the kernel (and u-boot) for an vanilla beagle bone and getting this:

    reading uEnv.txt
    812 bytes read in 4 ms (198.2 KiB/s)
    Loaded environment from uEnv.txt
    Importing environment from mmc ...
    reading zImage
    3421280 bytes read in 396 ms (8.2 MiB/s)
    reading /dtbs/am335x-bonelt.dtb
    20443 bytes read in 10 ms (1.9 MiB/s)
    Booting from mmc ...
    ## Flattened Device Tree blob at 815f0000
       Booting using the fdt blob at 0x815f0000
       Loading Device Tree to 8fe3a000, end 8fe41fda ... OK
    Starting kernel ...

    Then nothing.

    Tried with both am335x-bone and bonelt. Having a real hard time finding info on the differences between these dtbs. Tried on a rev A01 and rev A06, with same results.

    Any ideas on how to debug why the kernel hangs??

    I should mention that I turned modules off and removed the keyword "modules" target from the build script. But I'm pretty sure I built-in all relevant hardware drivers before un-selecting modules in menuconfig (I'm old fashioned, like to have a kernel with all necessary hardware support and no modules). I suppose the next step would be to go back to the default config (which drives me insane because it compiles as modules just about everything on the face of the planet). Do you need an initrd to make it work with the defconfig+modules (i.e.: are there any essential drivers compiled as modules instead of linked in with the default config?)

    Appreciate any input.

    Thanks,
    Gilles
    .

    PS: Built from 3.7.10-x9 tag

    PS2: Built the rootfs with buildboot but I know it's good as it worked with the (older) kernel built by buildroot (besides, we're not getting anywhere near loading the rootfs). BTW: no blinking LEDs and the console is directed to ttyO0 as it should.

    1. Hi Giles,

      The am335x-bonelt.dtb is for unreleased hardware, so unless you have that hardware I wouldn't expect it to work.

      Since your not following the directions on this wiki (which accomplish this: bone_march1.log), please ask your questions at https://groups.google.com/forum/?fromgroups#!forum/beagleboard..

      The 3.7.10-x9 tag from the stable-kernel repo does not support BeagleBone Hardware. Support for the BeagleBone is only available under my linux-dev repo: http://eewiki.net/display/linuxonarm/BeagleBone#BeagleBone-LinuxBuildScript%3A

      Regards,

      1. Thank you Robert,

        I must admit it's is difficult for those of us who just begin in the ARM world (even seasoned Linux developers like myself) to figure out where things are. Google points to a multitude of places be it quilt or patches or even a git repo (which is in fact what I was looking for though that one had not been updated in a year so one thinks its not maintained)... Your posts have been the most helpful.

        To be honest, I did try to build from that other link you point me to but the u-boot would not load the kernel complaining that the signature was invalid. I suppose I can give it one more try. I think the reason why I gave up is because I saw a patch related to DTB and knew that DT weren't part of kernel v3.2 so I assumed it was the wrong u-boot instructions. Also, I hate to begin a project with an old version of the kernel knowing that other people are already using 3.6 or above. And I wanted to use DTBs because our hardware is going to be quite different when it's all said and done so we will have to create our own board support. Hate to create a platform today only to change it to a DTS later.

        I must say the instructions on this page created a wonderful git repo with tags for all sort of versions including pre 3. I was quite fond of the result. Would any of these tags work for the beaglebone? Is the lack of support for bone just a DTB issue? Could it be fixed by just adjusting the DTB or are the patches inadequate all together for the hardware?

        Anyway, I'm rambling. Thanks for the pointers. I'll post the result of my fresh recompilation on the other page.

        Cheers,

        Gilles

        .

        1. Hi Gilles,

          The signature was invalid can mean a few different things. For one, I've actually patched u-boot on this wiki to do some things that the default mainline u-boot for this target can not do. Hence why it is SO important to follow the directions. (As of today's date, the beaglebone u-boot config can only load/run uImage's, not the zImage's i use here. (there's a patch in Tom's queue, so it might be enabled by default in v2013.04-rc2))

          Careful, not every tag in the linux-dev repo will work on the BeagleBone, the repo is much older then the BeagleBone. In the past I used the master branch of linux-dev mainly as a staging area for my stable-kernel repo for the BeagleBoard/PandaBoard. Due to the shear size of the initial BeagleBone patchset, I just used a branch on this same repo, as much of the patches would be dumped in the merge churn..

          However for the BeagleBone, there are 5 branches available, in varying states:

          • am33x-v3.1 - Abandoned: do not use
          • am33x-v3.2 - Old Stable - Cape Support
          • am33x-v3.6 - Abandoned: do not use
          • am33x-v3.7 - Abandoned: do not use
          • am33x-v3.8 - New Stable - Limited Cape Support

          If you want pre v3.x kernel's for the BeagleBone good luck, as you'll just back port everything in a new kernel anyways... (wink)

          Regards,

  21. Hello Robert,

    thank you for your Git repro for beaglebone everything went fine and i installed a 3.8 kernel.

    I want to use the uart2 on the beaglebone and don't now where to start. Any idea where to get an example or explanation how to modify the am335x-bone-common.dtsi . Is it the right file and is it the only one to modify to use uart2 on the expansion connector.

    Thank you

    Pet

    1. Hi Peter,

      That's okay, with this wiki software, I'm actually trying to move all comments to a secondary page, (just like MediaWiki does with their talk page..) BeagleBone_Comments

      So, uart2 is actually defined in am33xx.dtsi:

      So to enable in am335x-bone-common.dtsi for am335x-bone.dts. Under ( ocp: ocp { ) add:

      Then under ( am33xx_pinmux: pinmux@44e10800 { ) you need to add: (I think, UNTESTED, so please confirm...)

      Regards,

      1. Hi Robert,

        if i do it this way i get

        ......

        DTC     arch/arm/boot/dts/am335x-bone.dtb
         DTC     arch/arm/boot/dts/am335x-boneblack.dtb
        ERROR (duplicate_label): ERROR (duplicate_label): Duplicate label 'uart2' on /ocp/serial@4802200 and /ocp/serial@48022000

        .......

        But Uart1 looks indentical and there is no error?

        Regards,

        Pet

        1. Hi Peter,

          Give this a try: 0001-am335x-bone.dts-enable-usart2.patch only build tested. I based it off a few omap3/igepv2 patches heading mainline for v3.10. Still not 100% on the pinmux, but you can test it now..

          Regards,

  22. Hi Robert,

    stable v3.8 is not booting anymore on beaglebone. "It hangs after Uncompressing Linux... done, booting the kernel." ?? 2 days a go everything went fine.

    Regards,

    Peter

    1. Hi Peter,

      It's probably from the v3.8.4 stable merge, there is a few more patches in the community tree, so I'm going to sync my patchset this morning...

      Edit: Seems to boot just fine: bb-3.8.4-bone8.log

      Regards,

      1. Rebert,

        Would you mind posting the hash tag of the checkout which produced your working bb-3.8.4-bone8.log above?

        Now, was that one the new beagle bone with HDMI or would that same tag work on the older bone (A6 or similar)?

        Thanks,

        Gilles

        .

        1. Hi Gilles,

          So anytime I push out a dot 0 release, the tag gets automatically created.
          https://github.com/RobertCNelson/linux-dev/blob/master/tools/push-n-tag-release.sh

          That log was with a BeagleBone and a DVI Cape...

          Regards,

          1. Hi Robert,

            Sorry to be such a pain but I still can't get that 3.8.4-bone8 to work (get a kernel NULL pointer) and I'm a bit uncertain about what you meant above. What do you call a "dot 0" release? Is that a release you've tested as working and so gets tagged?

            Would the following log bring back "deja vu" with your experiments?

            Thank you,
            Gilles
            .

            1. Hi Gilles,

              I remember seeing, this before

              In your git tree, when you run git diff does it indicate any modifications to patches/defconfig..

              Otherwise, you really should switch to the head commit of the am33x-v3.8 branch as i've been pushing a lot of fixes in.
              https://github.com/RobertCNelson/linux-dev/commits/am33x-v3.8

              From: "linux-dev"

              Regards,

              1. Hi Robert,

                Yes, quite a lot of changes in fact. Here's just a summary:

                I will try the repo above. I'll try the 3.8.6-bone12.

                Thanks,
                Gilles
                .

                1. Hi Gilles,

                  With all those changes you were not truly running 3.8.4-bone8 then.

                  Would have reset your 3.8.4-bone8 back to default..

                  Regards,

      2. Hi Robert,

        I checked out 3.8.4-bone8 from linux-dev and it is booting. But 3.8.x from stable won't boot so i will work on dev.

        Thanks for testing.

        Regards,

        Pet

        1. Hi Peter,

          That is expected and is exactly why this page only references the "linux-dev" repo. The patch set is synced, but the .config is still different, those differences allow the BeagleBone to boot (and vice versa)...

          Regards,

          1. Hi Robert,

            Sorry, don't mean to interject here but may I say I noticed the .config and that is a very nice touch.

            There was almost nothing to be done in menu config where usually, one has to turn every option off on the face of the planet from the kernel.

            Thanks for this repo!

            Gilles

            .

  23. Hi Robert,

    I am trying the freshly baked RT Preempt Patch for kernel 3.8.4 and it works (apparently). On the other hand, I am not able to load my can bus on the new kernel 3.8 (I am using Wheezy).

    I used to follow the instruction I found on internet, i.e. commands like: 

    ip link set can0 up type can bitrate 125000

    gets the answer 

    Cannot find device "can0".

    But if I use the command

     ip link set can up type can

    I get something more juicy:

    [   51.518629] can: controller area network core (rev 20120528 abi 9)
    [   51.529052] NET: Registered protocol family 29
    [   51.538679] Loading kernel module for a network device with CAP_SYS_MODULE (deprecated).  Use CAP_NET_ADMIN and alias netdev-can instead.
    Cannot find device "can"

    Any clue?

    1. Hi Davide,

      Based on google, that looks to be a common error... I still have no idea either. It looks to be an old can userspace/application...

      Regards,

  24. Hi Robert,

    Congratulations for this fantastic content. I went through the steps using the Linux Build Script (v3.8.x) and the Ubuntu 12.10 as the FS. I did also created the microSD card. Everything worked great so i decided to set up an NFS server to load the kernel and the FS over the network to ease the development (u-boot and other bootloading files are stored on the SD since they won't change for now).

    So it was time to get my hands on the kernel hacking issue, i checked the Kernel Configuration under:

    And i saw that the following:

    Three boards seem to be selected: OMAP3 BEAGLE board, IGEP v2 board and OMAP4 Panda Board. I need to know which code is being executed so i decided to put printks on the three of them to figure out which one was being executed. Well i did it but nothing, the board boots exactly as before, no changes (i'm rebuilding using the tools/rebuild.sh). I thought it was a bit weird so i decided to unset the three boards and see if there was something that i was missing. Once the three boards were deselected i was hoping the the kernel wouldn't boot but surprisingly it does so.

    I read that previously somebody mentioned the "board-am335xevm.c" but that's not on my kernel tree (3.8.4). Would you mind telling me if i'm missing something? Which board configuration file is loading?

    Regards,

    1. Hi Víctor,

      So, you must have missed Linus's rant 2 years ago.http://lwn.net/Articles/439314/

      What basically came out of it, board files where becoming an un-maintainable mess, and device tree's were selected to be the future http://elinux.org/Device_Trees. So after that, any board files posted for inclusion would be outright nak'ed. The BeagleBone, which was released after the rant, fell under that, so no board-am335xevm.c file was pushed mainline. Which is why this wiki has two direction paths, a v3.2.x board based kernel and an v3.6+ based device tree kernel...

      So the files that boot the BeagleBone that you are interested in are:

      Regards,

      1. Robert,

        Thanks. That was it. Clearly I was outdated.

        Regards,

  25. Hi Robert,

    Thank you for your scripts. I have compiled and successfully installed kernel 3.8.

    As i can see, the cape manager use capes / slots mechanism, so registering a platform device such as tscadc is impossible without standard cape with eeprom on i2c. Would you recommend a way for breaking this mechanism so i can use the touchscreen functionality with custom cape (without eeprom) with display and touchscreen.

    Regards,

    1. Hi Toshe,

      Take a look at: arch/arm/boot/dts/am335x-bone-common.dtsi specifically:

      From this, you can see when you have the "ti,beaglebone-black" it's creating a 4th slot, which loads the emmc-2g cape automatically on bootup.

      So look under "firmware/capes/" and do something similar for your device.

      If you dig into: drivers/misc/cape/beaglebone/capemgr.c & Documentation/devicetree/bindings/misc/capes-beaglebone.txt there are also bootargs available.

      Regards,

      1. Hi Robert,

        Thank you for pointing this out. Obviously I was blind for the Documentation folder and I didn't saw the comment header above the slots definition in arch/arm/boot/dts/am335x-bone-common.dtsi "... without an EEPROM".

        What I did:

        I wrote an override slot using the compatible=ti,beaglebone as trigger field for loading the firmware;

        Placed the device tree source file in firmware/capes and modified firmware/Makefile in order to compile it;

        Finally I placed the device tree filename in capemaps in arch/arm/boot/dts/am335x-bone-common.dtsi.

        Now I can see capemgr populating slot #4 and firmware is loaded successfully. Next I would try compatible = "kernel-command-line", "runtime"; to trigger loading firmware. That way seems more flexible.

        Regards,

  26. Thank you very much for the link, it really helped.

    Thanks,

    Mahanth

  27. Hi Robert,

    Can two USB gadget modules be loaded simultaneously? For example, running command "sudo insmod g_hid.ko"  and then followed with "sudo insmod g_ether.ko".

    Regards.

    Damien

    1. Hi Damien,

      You really should use modprobe over insmod as it also takes care of dependices.

      No, you would have to remove g_hid.ko before loading g_ether.ko... If you need more then one feature at a time, there are a two "multi" modules:
      https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/drivers/usb/gadget/Kconfig#n862

      Jan also shows an example on this page:
      http://www.lvr.com/beaglebone.htm

      Regards,

  28. Hi Robert & everybody

    I do have a question:

    -I do have an BeagleBone for which I generated using Yocto Project and rootfs (kernel 3.8.5)

    -my "distribution" is working fine

    In my plan is to buy from CircuitCo and LCD4.

    For this LCD I don't know what modification I have to do in the kernel.

    I have to use an driver and I don't know which one, what are the option from kernel point of view, etc

    Can you be so king and guide me ?

    Thank you in advance and all the best

    Mihai M

    1. Hi Mihai,

      I'm not involved with the Yocto Project. BUT if they are using a kernel based on Koen's 3.8.x beaglebone branch the LCD4 should be working out of the box. (which is based on: https://github.com/beagleboard/kernel/tree/3.8)

      should: I don't have the LCD4 to test it myself (I have the LCD3/LCD7).

      Regards,

      1. Hi Robert

        I know that you are not involved with Yocto; anyway I don't know what branch they are using.

        Reading in more details all the messages I saw that BeagleBone use DaVinci driver, so I need to find in the kernel option regarding this driver driver. It OK in this way ?.  Any hint will be a great help-it could be for LCD3/7 also

        Regards,

        Mihai

        1. Hi Mihai,

          Actually the LCD3/LCD7 already works out of the box with the older v3.2.x based kernel shown on this wiki page. Look over the FAQ section for Backlight/Touch Screen userspace hints.

          No kernel options are needed, the LCD3/LCD4/LCD7 are auto detected on bootup and the kernel will setup the video settings. The v3.8.x branch is still be actively developed.

          BTW: CircuitCo (designers/builders of the LCD4) are also the maintainers of the beagleboard.org tree: https://github.com/beagleboard/kernel/tree/3.8

          Regards,

  29. I just finished following the instructions to set up an SD card building: kernel_version=3.8.6-bone12.1 with Ubuntu 12.10 rootfs, went as smooth as could be expected.

    My only issues with the instructions were that the fdisk EOF steps EOF didn't work with cut and paste (unlike all the other "code" sections) so I did them manually to create the two partitions, not clear at all what I was supposed to do here.  Also the section about shared SD card To always enable the Ethernet interface as eth0.. made no sense, so I skipped it, perhaps a link or an explanation as to what this is about would be helpful.

    Booting my new Beaglebone has two problems.  It didn't boot automatically on power up -- I had to give the bootz command in the serial console, maybe I've forgotten about a jumper or switch setting.

    But the showstopper for me is the kernel that was built has no /dev/spidev installed.  I wasted so much time trying to get the spidev to work editing the board files and now I've no earthy idea on how to do it with "device tree" and have found no clues via Google so far.

    Does anyone know how to get the userspace spidev driver working with these new device trees?

    The 3.2 kernels for Beaglebone and Pandaboard have problems with random long latencies in the spidev driver that break our application, trying a 3.8 kernel is the last step before junking the boards and moving to something else.

    I posted test code here that shows perfect timing if toggling a GPIO pin instead of calling spidev

    I haven't tested networking or anything else as at this point the board is scrap without the spidev userspace driver.

    Edit:

    My 3.2.23-psp18 SD card automatically booted, so its not forgotten switch or jumper on this board.

    1. Hi Mr Greene,

      Correct, every command should be cut and paste.. What version of fdisk do you have on your system? The directions on the wiki page assume:

      aka: Debian Wheezy's default package...

      The modification to make sure udev always defines the interface as eth0 is only useful for people who move the same microSD card between multiple BeagleBone and expect ssh/apache to automatically startup on every board. Normally udev would see a different MAC address and define the interface as eth1 on the 2nd BeagleBone. This udev rule modification stops that.

      It should have booted automatically, this was from a few weeks ago and u-boot/uEnv.txt has not changed since then: bb-3.8.4-bone8.log So double check your uEnv.txt boot script. PS.. I've been re-writing the u-boot patches so only a minimal uEnv.txt file is required for out of the box. See http://eewiki.net/display/linuxonarm/BeagleBoard#BeagleBoard-UBootuserenviromentvariables%3AuEnv.txt you only "un-comment" things you actually use...

      The v3.8: spidev patches are currently being discussed here:
      https://groups.google.com/forum/?fromgroups=#!topic/beagleboard/-Lum76JL5VY

      Regards,

      1. Thanks for the quick reply.

        OK it looks like fdisk on my Ubuntu 10.04 is "old" and apparently I must have hit an extra <Enter> when I started the screen command for the USB serial port that interrupted the boot, as I tried it again and it did boot automatically.

        Adding your explanation about the udev thing to that section would have  left me feeling good about skipping that step, and would inform me that I should do it before I clone this card for another system.

        I'm trying to digest the spidev patch info in your link, but things like:

        Create a custom dtsi with the code snippet below, create a custom dts 
        which includes your custom dtsi, then add your dts to the Makefile. You 
        don't really want to be altering the beaglebone dts as it will interfere 
        with future updates.

        Are clear as mud right now, but its a start.

        To give my brain a rest for today, next I'll build the 3.8 for the Pandaboard following your similar instructions for it, and then dive into the dtsi stuff tomorrow with a fresh start.

        To clarify, I did all the building on Ubuntu 12.04 (hate the UI!) running in a virtual machine on my 10.04 system.  Then I used 10.04 to format and copy to the SD card, as I'd seen some references to problems writing the SD cards from a Parallels VM.

        Do you work for Digi-Key?  I've enjoyed watching them grow from a hobby parts supplier in the back of Popular Electronics into one of the largest distributors.  I left hardware for software in the late 80's but things like the Pi, Beaglebone, Pandaboard, etc. may draw me back in during my soon to happen retirement.

        --wally.

        1. Wally,

          You should read about device trees which are new to all of us who are used to deal with older kernels where the device platform board file was the only way to change which drivers were loaded. 

          What the "clear as mud" text is saying is that it is preferable to ADD your own DT (device tree) code in a separate file rather than modify the beaglebone existing files for the obvious reason of not having to make that change every time you upgrade. BTW: dsti are the files you edit and dst are the files that get compiled by the make command and used as the final device tree blob. If you search wiki on DT, this will all make sense. 

          Cheers,

          Gilles

          .

          1. Thanks,

            "BTW: dsti are the files you edit and dst are the files that get compiled by the make command and used as the final device tree blob."

            This is useful information at this point.  Although I'd rather a working recipe instead of a learning curve as I've nothing but hope that 3.8 will fix the latency issues.  

            I was shocked that a 3.4-rt  kernel for the Pandaboard didn't fix the problem.  That is when I wrote the test code to isolate the latency to the /dev/spidev write and show that is was not a userspace to kernel transition issue by showing perfect timing when toggling a GPIO pin instead.

            1. Hi Wally,

              One reason we do not have a working recipe right now, we are still effectively building the device tree infrastructure for the BeagleBone/CapeManager... (wink) Once we have it working, it will be easily enabled like the buddy=spidev option we have for BeagleBoard/PandaBoard...

              Regards,

              1. Thanks, useful info,  I'm building your Pandaboard 3.9 kernel now, I started with the Beaglebone as its worst case latencies were smaller so I guessed it might need smaller improvement to meet our needs.  I see the instructions for enabling spidev are in the Pandaboard wiki.

        2. Parallels:

          Yeah, we still haven't figured out a reliable way to create sd cards in that environment. Really any VM creates odd latencies when writing to the drive. When your stuck in that environment, sometimes it's easier to get one board up and running, and then over ssh use that board to create your other SD cards. That's one advantage of running a full distro such as ubuntu/debian on these devices.

          Regards,

  30. I got the Pandaboard ES setup and spidev enabled,  it'll be great when the Beaglebone is that easy!

    kernel-3.9 on the Pandaboard ES didn't seem to fix my spidev latency issue :(  Details in the Pandaboard wiki.

    At this point it doesn't seem its worth my effort to get spidev working on the Beaglebone 3.8 kernel since the Panadboard 3.9 still has the problems.

    Thanks for your help!

    Doing the cross-compiles in a virtual machine has the advantage of being able to quickly move the development tools to the machines where we can attach the Panda/Beagle hardware, we have idiotic networking restrictions that make life miserable for these kinds of things :(   But at least they pay my normal rate for wasting my time :)

    Its easy enough to export the the results from the VM to the host and write the SD card from the host,  I just wasn't aware of any significant differences with fdisk since Ubuntu 10.04

    --wally.

  31. removed question as I see it now on the google group.

    Thanks,

    Greg

    1. Hi Michael,

      The script relies on a specific starting point, look at version.sh/patch.sh after which every patch is based on the previous, so to add those two patches you need to find something common with both tree's.. PS, due to content in the 2nd patch you posted, this will not be trivial. as "baseboard-mityarm335x-devkit.c" defiantly doesn't exist in our shared beagleboard.org tree.

      Regards,

  32. Hello Robert,

    Thankyou for putting the beagle pages together.

    I am having a problem with :-

    sudo tar xofv ./linux-dev/deploy/${kernel_version}-dtbs.tar.gz -C /media/boot/dtbs/

    after the build I don't have a *-dtbs.tar file in /linux-dev/deploy

    The zImage has build


    I have rebuilt with ./tools/rebuild.sh

    and get:-

    I know your working on 3.8, but I was concerned with the usb status, as I need this to work so I used the 3.2 version.I have no *.dtb file in ./arch/arm/boot to copy into deploy/tmp dir, but the compile said it  has nothing to do?

    Thanks

    Paul S

    PS I was having problems with "git://" which I have changed to "http://" to solve.

    1. Hi Paul,

      dtb's didn't exist in the v3.2.x based branch for this target. I tried to document this in the kernel copying section via:

      Regards,


      1. Hello Robert,

        Thanks, YES that worked I now have 3.2 kernel running, ethernet works, serial over usb works, but no USB mass storage.

        I do need USB mass storage to work, so I can start to interface with pcb.

        When I plug the std USB sick I get no devices in /dev.

        The boot trace indicates the support is there:-

        [    1.721923] USB Mass Storage support registered.

        If I boot with the stick in or insert after boot I get nothing, not trace, no device to mount and no light on the stick.

        Thanks

        Paul S

        1. Hi Paul,

          USB mass storage has always been enabled. Please verify that you are using a 5volt DC jack connector to power the beaglebone, try another USB storage device and that it is plugged in before power up on the old v3.2 based kernel.  Or you could just switch to the newer v3.8.x based branch which includes a lot of USB fixes for this target.

          Regards,

          1. Hello Robert,

            Thanks, looks like i had a 1 in 3 chance of this working and yes I picked the one stick that does not work.

            But my nxp code on our pcb does.

            thanks

            Paul S