element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Single-Board Computers
  • Products
  • Dev Tools
  • Single-Board Computers
  • More
  • Cancel
Single-Board Computers
Forum [How-to] BB-View on latest Debian
  • Blog
  • Forum
  • Documents
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Single-Board Computers to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • Replies 142 replies
  • Subscribers 64 subscribers
  • Views 23762 views
  • Users 0 members are here
  • debian
  • embedded_linux
  • bb-view
  • bbb
Related

[How-to] BB-View on latest Debian

compeoree
compeoree over 11 years ago

I thought some others might like to know how to get the BB-View working under the latest Debian beta images.

 

Unfortunately, you are going to have to recompile the Kernel. The video works fine without a recompile (the red/blue swap is easy to fix), but the touchscreen control connections are not the same as the standard TI 4-wire interface. I tried to patch the ti_am335x_tsc.c file, so the changes would be limited to a dts recompile, but I haven't been able to get that working yet (I'm pretty sure it is a state machine / bit assignment issue). But anyway, here are the steps that you need to perform.....

 

Overview

1) Download the necessary files

     a) Robert Nelson's handy tools for compiling the Beaglebone kernel

     b) BB-View source for Angstrom

2) Build the default kernel

3) Patch the Kernel and perform a fast recompile

4) Copy the new kernel to the Beaglebone

5) Edit the xorg.conf file to correct the Red/Blue color swap

6) Revel in the 4 days you just saved image

 

Let's Get Started

I am using Ubuntu 12.04 LTS 64 bit running in a VirtualBox VM to compile the kernel:

Make a new folder called bb-view, this is where our build will happen.

> mkdir bb-view

> cd bb-view

 

Install git, if you haven't already:

> apt-get install git

 

Clone Robert Nelson's linux-dev project locally. Be prepared for a large download (~100 Mb for the cross-compiler and ~700 Mb for the kernel source).

> git clone https://github.com/RobertCNelson/linux-dev.git

 

Change into the new linux-dev folder and select branch/tag that matches the Debian version.

> cd linux-dev

> git checkout 3.8.13-bone37 -b tmp

 

Now we need to build the base image, so our cape drivers folder gets populated. The script will tell you if you need to do or install anything else.

> ./build_kernel.sh

 

Come back in an hour or so.....(You might want to download the Angstrom source from element14 now)

 

Patching the Kernel

Extract two files from the Angstrom source:

> unzip angstrom-source.zip

> tar -zxf bb-black-kernel-3.8.13-bb-view.tar.bz2

> cp ./kernel/kernel/drivers/input/touchscreen/ti_am335x_tsc.c  ~/bb-view/linux-dev/KERNEL/drivers/input/touchscreen/

> cp ./kernel/kernel/firmware/capes/BB-VIEW-LCD7-01-00A0.dts  ~/bb-view/linux-dev/KERNEL/firmware/capes/

 

Now we need to let the compiler know that we want to add the firmware to the build:

> nano   ~/bb-view/linux-dev/KERNEL/firmware/Makefile

 

Add the following line somewhere near line 192 (CTRL-C will display current cursor position):

BB-VIEW-LCD7-01-00A0.dtbo \

 

Don't forget the trailing backslash....it is important. Now save and exit by doing CTRL-O, Enter, CTRL-X.

Change back to the linux-dev root folder:

> cd   ~/bb-view/linux-dev

 

Now issue the kernel rebuild command, this won't take very long at all:

> ./tools/rebuild.sh

 

 

Copy Kernel to BBB

The following instructions assume that you already have the Debian beta installed and booted up on the BBB.

The easiest way is to copy the files over the network, via the 'scp' command:

> scp   ~/bb-view/linux-dev/deploy/3.8.13-bone37.zImage   debian@192.168.7.2:/home/debian

Replace debian (both instances) with the username you are running on the BBB and 192.168.7.2 with the IP address of the BBB.

 

Now log into the BBB and copy the kernel image to the boot partition:

> ssh debian@192.168.7.2

bbb>  sudo cp 3.8.13-bone37.zImage   /boot/uboot/zImage

 

We need to do one more thing before the LCD will work. Since the cape doesn't have an EEPROM, we need to black-list the HDMI drivers and force-load the BB-VIEW drivers in the boot command file:

bbb>  sudo  nano  /boot/uboot/uEnv.txt

 

Find the "optargs" line and edit it to be:

optargs=capemgr.disable_partno=BB-BONELT-HDMI,BB-BONELT-HDMIN  capemgr.enable_partno=BB-VIEW-LCD7-01

Notice that the preceding "#" has been removed. You don't want to disable BB-BONE-EMMC-2G, or you won't be able to boot from eMMC.

Now save and exit by doing CTRL-O, Enter, CTRL-X.

 

Reboot the BBB and the LCD should now work....except the blue and red are reversed.

 

Fixing Red/Blue Color Swap

This is due to errata in the TI AM335x processor when switching between 16 and 24 bit video modes. To fix this, we must first find the name of our screen:

> ssh debian@192.168.7.2

bbb> cat  /var/log/Xorg.0.log  |  grep  screen

Mine was "Builtin Default fbdev Screen 0"

 

Now we edit our X configuration file:

bbb> sudo nano  /usr/share/X11/xorg.conf.d/10-evdev.conf

 

and add a "Screen" section at the end of the file:

Section "Screen"

        Identifier "Builtin Default fbdev Screen 0"

        Monitor "Configured Monitor"

        Device "Configured Video Device"

        DefaultDepth 24

EndSection

Save and exit by doing CTRL-O, Enter, CTRL-X.

Reboot and enjoy!

  • Sign in to reply
  • Cancel

Top Replies

  • Former Member
    Former Member over 11 years ago in reply to Former Member +1
    Hello selsinork, "Which kernel version are you using ?" I use the 3.8. "Did you apply the patch Louis posted ?" I rebuild the kernel with Louis' edits in the "4. Re:[How-to] BB-View on latest Debian" message…
  • Former Member
    Former Member over 11 years ago in reply to Former Member +1
    Ok, so with the overlay loaded then the touch screen driver should be able to work. You can check the proper device using 'evtest' like this: root@lcd:~/evtest# ./evtest No device specified, trying to…
  • Former Member
    Former Member over 11 years ago in reply to Former Member +1
    Interesting. I seem to remember that one of the LEDs on the cape was configured as heartbeat. Perhaps that was the TI-SDK image then as looking at the overlay files I see: gpio-leds-cape-lcd { compatible…
  • Former Member
    Former Member over 11 years ago in reply to Former Member

    Thanks for your answer, maybe I have a clue :

     

    For the moment, I compiled tslib directly on the beagleboard.. Maybe should I compile it on my PC desktop with the same cross compile chain that I used to compile the kernell..?

     

     

    Edit: well I compiled it on my PC desktop with the cross tool chain :

    ./configure --prefix=/usr --sysconfdir=/etc

    make ARCH=arm CROSS_COMPILE=/home/ana/Téléchargements/BBB/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux/bin/arm-linux-gnueabihf-

     

    and copy all files in the "good" directories on the BBB . I mean all needed *.la and *.so in /usr/lib/ts and the all needed binaries like _s_calibrate in /usr/bin .. and I copy also tslib directory with source files (with all *.o thats also seems to be needed) .,


    and now I have this error message:

    ts_calibrate.o: file not recognized: File format not recognized

    collect2: ld return 1 exit statutsn


    It's really a pain to make this works ... Well I think I will stop with my Ubuntu file system and try the [How-to] of this post... I'm really confused because I don't understand what I'm doing wrong...

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 11 years ago in reply to Former Member

    IMHO cross compiling is always a bad idea, it's notoriously hard to get it right.  I natively compile all my code.

     

    Anyway, your problem is likely to be that you didn't tell ./configure that you're cross compiling so it created makefiles for compiling on the host instead.  ARCH=arm CROSS_COMPILE= are things that the kernel build system knows how to handle. Nothing that I can see in the tslib sources uses either of those environment vars.

     

    ./configure --help has this:

    --host=HOST   cross-compile to build programs to run on HOST [BUILD]

    so if you really must cross compile, you'll have to work out exactly what to pass to configure using that option as a start. You may also need to set CC to your cross compiler.  Even then, it may not work as configure often tries to compile and run small pieces of code while testing for features. Getting those Arm-compiled tests to run on your x86 system isn't impossible, but it's an extra challenge. 

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 11 years ago in reply to Former Member

    Hello selsinork,

     

    Thanks for your answer ^^

    well I tried a cross-compile of tslib  just because my natively compiled on the BBB wasn't working...

     

    I understand what you mean by passing options to configure.. I'll try to do this..  (just to be clearer, I'm not trying to run on an x86, but just to compile on it and run it on the BBB)

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 11 years ago in reply to Former Member

    Hello again,

     

    Well I managed to cross compile tslib, but I've got exactly the same problem than with the native compile.

     

    So I think that maybe the problems comes from my *dtb  file because I took the Angstrom ones (I didn't compiled them like I did with the kernell)...  (I've just discovered dtb files, so I'm a little bit disapointed with it.. )

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 11 years ago in reply to Former Member

    Devicetree has been a painful experience for a lot of us, however since they're used to describe what hardware is present it's important to get them right.  On the BBB, depending on which kernel you're using, you'll also have the added challenge of device tree overlays (*.dtbo files).

    While the idea behind overlays could be an interesting one, I've personally come to the conclusion that overlays are unnecessary and mostly just an added complexity. For the large majority of people who will struggle with normal device tree stuff, overlays just are not helpful at all, they're just another barrier.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • mao84
    mao84 over 11 years ago

    Hi Louis,

     

    First of all, thank you for this exhaustive manual on how to make the BB-view work with Debian! That's a great job and thanks to folks like you the youngsters can discover the whole new world of embedded Linux application.

     

    There's one issue I've got - after patching the kernel, the board is not recognized by PC via USB by its IP address anymore. I'm running Ubuntu 12.04 LTS. After re-flashing the BBB back with original Debian image, everything turns normal, i.e. PC recognizes it and one can access the board by 192.168.2.7. I suppose the problem may be in the configuration used for the kernel assembly - ethernet via USB support is not enabled or something like that. Can you please verify this point or maybe I'm doing something wrong?

     

    Thanks and Regards,

    Mao

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • compeoree
    compeoree over 11 years ago in reply to mao84

    You're welcome Mao,

     

    I can't say for sure, as I don't use the USB Ethernet, so I have not verified its operation. You may want to search for gadget or RNDIS services.

     

    Did you modify any of the Kernel configuration? I did not.

     

    Are you only replacing files in the /boot/uboot folder, or others too?

     

    You might run 'systemctl | grep usb' to see if you get something like this:

    debian@beaglebone:~$ systemctl | grep usb

    sys-devi...et-usb0.device loaded active plugged       /sys/devices/ocp.3/47400000.usb/musb-hdrc.0.auto/gadget/net/usb0

    sys-devi...-ttyGS0.device loaded active plugged       /sys/devices/ocp.3/47400000.usb/musb-hdrc.0.auto/gadget/tty/ttyGS0

    ifup@usb0.service         loaded active exited        ifup for usb0

     

    or 'dmesg | grep rndis'

    debian@beaglebone:~$ dmesg | grep rndis

    [    0.704540] usbcore: registered new interface driver rndis_host

    [   13.007932]  gadget: adding 'rndis'/de531200 to config 'Multifunction with RNDIS'/bf8127e0

    [   13.007962] rndis_register: configNr = 0

    [   13.007971] rndis_set_param_medium: 0 0

    [   13.008055]  gadget:   interface 0 = rndis/de531200

    [   13.008064]  gadget:   interface 1 = rndis/de531200

     

    Louis

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • mao84
    mao84 over 11 years ago in reply to compeoree

    Hi Louis,

     

    Well, that's not such a big issue anyway, it was just a bit confusing not to see 192.168.7.2 connected via USB as usually.  I should say that ethernet via eth0 works perfectly.

     

    I didn't modify anything and performed all actions exactly as in your first post. I've only replaced the zImage and edited the documents as described as well (except that my bb-view is four inch so I've used files for 4" and put 4 instead of 7 where it should be put).

     

    systemctl | grep usb doesn't return anything. Here's the copy of my systemctl output

    One can see that the only failed task is:

    'systemd-...s-load.service loaded failed failed Load Kernel Modules'

    'dmesg | grep rndis' output is

    [ 0.742586] usbcore: registered new interface driver rndis_host

     

    Best Regards,

    Mao

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 11 years ago

    Hello everybody,

    and thank you Louis for this good tutorial.

     

    I have two problems with my BB-view:

    1) When I try to fix the color swap, I don't find the name of the screen in /var/log/Xorg.0.log

    Did you know an other way to find this name?

     

    2)When I try to calibrate the touchscreen, the TSLIB calibration utility (ts_calibrate) freezes. The screen displays "touch crosshair to calibrate", but I cant interact with (and no Ctrl-C  available)

    There is someone here who solved this problem?

     

    To build my OS I use this tutorial:

    http://eewiki.net/display/linuxonarm/BeagleBone+Black

    with the debian FS.

     

    Regards,

    arthur

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 11 years ago in reply to Former Member

    Arthur,

    Which kernel version are you using ?

    Did you apply the patch Louis posted ?

    Is the touch-screen driver loaded and did you set TSLIB_TSDEVICE to the appropriate device ?

     

    If kernel 3.8.x check that the BB-VIEW-LCD7-01 overlay has been loaded.

     

    If kernel 3.13 then you'll need to patch the touch screen into the main devicetree file as 3.13 doesn't have the capemanager and so can't load overlays.

     

    You can ssh into the BBB and kill the ts_calibrate task to get local control back.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
<>
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube