element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • 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 Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • 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 63 subscribers
  • Views 22215 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…
Parents
  • Former Member
    Former Member over 11 years ago

    Regarding Patching the Kernel:

     

    My "touchscreen" is in your linux-dev repository, but not in the angstrom source.  Should we do the cp FROM your linux-dev repository TO the ANGSTROM source?

    I pulled the source directly from the Element 14 site, and the file (unzipped) was:  bb-black-kernel-3.8.13-bb-view.tar.bz2.  It doesn't seem to have these files.  If your source already has them, why are we rebuilding the Kernel?

     

    Also, with the addition of the LCD line to the Makefile, can you id where it needs to go (functionally), rather than just mentioning a line numbers, so I know I have this right?

     

    Thanks.

    > 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/

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

    Regarding Patching the Kernel:

     

    My "touchscreen" is in your linux-dev repository, but not in the angstrom source.  Should we do the cp FROM your linux-dev repository TO the ANGSTROM source?

    I pulled the source directly from the Element 14 site, and the file (unzipped) was:  bb-black-kernel-3.8.13-bb-view.tar.bz2.  It doesn't seem to have these files.  If your source already has them, why are we rebuilding the Kernel?

     

    Also, with the addition of the LCD line to the Makefile, can you id where it needs to go (functionally), rather than just mentioning a line numbers, so I know I have this right?

     

    Thanks.

    > 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/

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

    @Matthew Trippy

    Is the rest of the Angstrom source visible? Are the other source folders present and populated?

     

    The reason for copying the angstrom tsc file to the linux-dev was to get most of the changes copied over to the Debian build under linux-dev. You are not building Angstrom, so you don't need to copy from the linux-dev folder back to the Angstrom folder.

     

    The reason for compiling the kernel is to enable touchscreen support. If you don't need the touch screen controller, you don't have to recompile. The LCD7 uses a non-standard connection method, so the analog pins have to be read in a different order, by the tsc driver.

     

    The makefile line placement is not critical. I just included it close to where the other dts files where getting added, so I could find it again if I needed to change anything.

     

    Louis

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

    As far as I can tell, I have all the source.  Somehow maybe I've mixed things up.  The BB-View driver folder structure:

    Alright, I must have been dreaming.  It looks like it's there

     

    OK. I've got some work to do, but it looks like you have this outlined well.  Thanks for checking in.  I'll probably be back...

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

    OK.  My Debian build is up and running with your changes, but the LCD is dead and dark.  When I look at /sys/devices/bone_capemgr.9 and cat slots, I get:

     

    0: 54:PF---

    1: 55:PF---

    2: 56:PF---

    3: 57:PF---

    4: ff:P-O-L Bone-LT-eMMC-2G,00A0,Texas Instrument,BB-BONE-EMMC-2G

    5: ff:P-O-L Bone-Black-HDMI,00A0,Texas Instrument,BB-BONELT-HDMI

     

    When I look in uEnv.txt in /boot/uboot, the lines are in there.  And My HDMI is no longer working, so it seems to be reading it.  Here's the line from uEnv.txt:

     

    ##BeagleBone Black:

    ##Disable HDMI/eMMC

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

     

    Any thoughts?

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

     

     

    [

    DMESG data below:
    [1.710819] bone-capemgr bone_capemgr.9: compatible-baseboard=ti,beaglebone-black
    [1.718720] bone-capemgr bone_capemgr.9: Skipping disabled cape with part# BB-BONELT-HDMI
    [1.727360] bone-capemgr bone_capemgr.9: Skipping disabled cape with part# BB-BONELT-HDMIN
    [1.770775] bone-capemgr bone_capemgr.9: slot #0: No cape found
    [1.815693] bone-capemgr bone_capemgr.9: slot #1: No cape found
    [1.856711] bone-capemgr bone_capemgr.9: slot #2: No cape found
    [1.893820] bone-capemgr bone_capemgr.9: slot #3: No cape found
    [1.900075] bone-capemgr bone_capemgr.9: slot #4: specific override
    [1.906676] bone-capemgr bone_capemgr.9: bone: Using override eeprom data at slot 4
    [1.914709] bone-capemgr bone_capemgr.9: slot #4: 'Bone-LT-eMMC-2G,00A0,Texas Instrument,BB-BONE-EMMC-2G'
    [1.924847] bone-capemgr bone_capemgr.9: slot #5: specific override
    [1.931442] bone-capemgr bone_capemgr.9: bone: Using override eeprom data at slot 5
    [1.939472] bone-capemgr bone_capemgr.9: slot #5: 'Bone-Black-HDMI,00A0,Texas Instrument,BB-BONELT-HDMI'
    [1.949510] bone-capemgr bone_capemgr.9: slot #6: specific override
    [1.956103] bone-capemgr bone_capemgr.9: bone: Using override eeprom data at slot 6
    [1.964135] bone-capemgr bone_capemgr.9: slot #6: 'Bone-Black-HDMIN,00A0,Texas Instrument,BB-BONELT-HDMIN'
    [1.974357] bone-capemgr bone_capemgr.9: enabled_partno part_number 'BB-VIEW-LCD7-01', version 'N/A', prio '0'
    [1.984841] bone-capemgr bone_capemgr.9: slot #7: generic override
    [1.991331] bone-capemgr bone_capemgr.9: bone: Using override eeprom data at slot 7
    [1.999361] bone-capemgr bone_capemgr.9: slot #7: 'Override Board Name,00A0,Override Manuf,BB-VIEW-LCD7-01'
    [2.010081] bone-capemgr bone_capemgr.9: Skipping loading of disabled cape with part# BB-BONELT-HDMI
    [2.019677] bone-capemgr bone_capemgr.9: Skipping loading of disabled cape with part# BB-BONELT-HDMIN
    [2.029601] bone-capemgr bone_capemgr.9: loader: before slot-4 BB-BONE-EMMC-2G:00A0 (prio 1)
    [2.038464] bone-capemgr bone_capemgr.9: loader: check slot-4 BB-BONE-EMMC-2G:00A0 (prio 1)
    [2.047258] bone-capemgr bone_capemgr.9: initialized OK.
    [2.052858] bone-capemgr bone_capemgr.9: loader: before slot-7 BB-VIEW-LCD7-01:00A0 (prio 0)
    [2.061704] bone-capemgr bone_capemgr.9: loader: check slot-7 BB-VIEW-LCD7-01:00A0 (prio 0)
    [2.072605] OneNAND driver initializing
    [2.078261] usbcore: registered new interface driver cdc_ether
    [2.084439] bone-capemgr bone_capemgr.9: loader: check slot-4 BB-BONE-EMMC-2G:00A0 (prio 1)
    [2.093282] usbcore: registered new interface driver rndis_host
    [2.099570] bone-capemgr bone_capemgr.9: loader: after slot-7 BB-VIEW-LCD7-01:00A0 (prio 0)
    [2.108441] usbcore: registered new interface driver cdc_ncm
    [2.114423] bone-capemgr bone_capemgr.9: slot #7: Requesting part number/version based 'BB-VIEW-LCD7-01-00A0.dtbo
    [2.126001] usbcore: registered new interface driver cdc_acm
    [2.131966] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
    [2.140347] Initializing USB Mass Storage driver...
    [2.145500] bone-capemgr bone_capemgr.9: slot #7: Requesting firmware 'BB-VIEW-LCD7-01-00A0.dtbo' for board-name 'Override Board Name', version '00A0'
    [2.159725] usbcore: registered new interface driver usb-storage
    [2.166029] USB Mass Storage support registered.
    [2.170916] bone-capemgr bone_capemgr.9: slot #7: dtbo 'BB-VIEW-LCD7-01-00A0.dtbo' loaded; converting to live tree
    [2.181978] musb-hdrc: version 6.0, ?dma?, otg (peripheral+host)
    [2.189149] bone-capemgr bone_capemgr.9: slot #7: #4 overlays
    [2.195606] musb-hdrc musb-hdrc.0.auto: pdev->id = 0
    [2.200854] musb-hdrc musb-hdrc.0.auto: drivers/usb/musb/musb_dsps.c:468 dsps_musb_init: OK
    [2.211348] ehrpwm 48302200.ehrpwm: unable to select pin group
    [2.221006] pwm-backlight backlight.11: invalid default brightness level: 101, using 100
    [2.229565] musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, bulk combine, bulk split, HB-ISO Rx, HB-ISO Tx, SoftConn)
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 11 years ago in reply to Former Member

    Matthew Trippy wrote:

     

    OK.  My Debian build is up and running with your changes, but the LCD is dead and dark.  When I look at /sys/devices/bone_capemgr.9 and cat slots, I get:

     

    5: ff:P-O-L Bone-Black-HDMI,00A0,Texas Instrument,BB-BONELT-HDMI

    That line suggests that the HDMI virtual cape is still loaded.

     

    You'd want to see something like:

    4:ff:P-O-L Bone-LT-eMMC-2G,00A0,Texas Instrument,BB-BONE-EMMC-2G

    5:ff:P-O-- Bone-Black-HDMI,00A0,Texas Instrument,BB-BONELT-HDMI

    6:ff:P-O-- Bone-Black-HDMIN,00A0,Texas Instrument,BB-BONELT-HDMIN

    7:ff:P-O-L Override Board Name,00A0,Override Manuf,BB-VIEW-LCD7-01

    showing that neither of the HDMI ones are loaded, but the BB-View one is.

     

    Your dmesg log looks like it's correctly loaded the BB-View overlay and skipped the HDMI ones.  Only thing in there that I've not seen is

    [2.211348] ehrpwm 48302200.ehrpwm: unable to select pin group

    which might suggest that the pwm for the backlight wasn't properly enabled.

     

    look for /sys/class/backlight/backlight.11 directory that has contents like

    actual_brightness  bl_power  brightness  device@  max_brightness  power/  subsystem@  type  uevent

     

    In the dmesg output look for some lines like

    [1.107012] tilcdc 4830e000.lcdc: fb0:  frame buffer device

    [1.113133] tilcdc 4830e000.lcdc: registered panic notifier

    [1.119385] [drm] Initialized tilcdc 1.0.0 20121205 on minor 0

    which show the actual lcd display driver being loaded.

     

    and lastly, same sort of questions as to Mipo01... You do have an LCD7 and not an LCD4 ?  You've checked it's all connected up properly ?  Sometimes it's the simplest of things image

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

    I get:

     

    [3.137847] tilcdc 4830e000.fb: No power control GPIO

    then

    [3.216337] tilcdc 4830e000.fb: fb0:  frame buffer device
    [3.222003] tilcdc 4830e000.fb: registered panic notifier
    [3.227789] [drm] Initialized tilcdc 1.0.0 20121205 on minor 0

     

     

    Yes - BB-View 7" LCD and BB Cape from Element 14

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

    I don't see that 'no power control gpio' line at all, but I'm likely using a very different kernel.

     

    What about the /sys/class/backlight/backlight.11 directory?  Backlight not enabled would give the impression that nothing's working even if in reality that's the only thing that's 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

    I'll need to get back to the board later tonight, but what should I do if the backlight.11 directory isn't populated?  Can I manually change/add any settings there?  I did get a "brightness error at startup (I can't find it now, but it basically said the setting was 101, which was not allowed, so it is setting the display to 100)

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

    don't worry about the 100 vs 101 message, I see that too. It's just one of the settings in the dts file and could be fixed fairly easily. It won't stop the lcd from functioning.

     

    I was more interested in whether the "ehrpwm 48302200.ehrpwm: unable to select pin group" line had caused the driver not to load. However even if the driver has loaded, that message could imply that the pin hasn't been configured.  Working that out will be more involved unless you have a scope handy.

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

    I'll need to get back to the board later tonight, but what should I do if the backlight.11 directory isn't populated?  Can I manually change/add any settings there?  I did get a "brightness error at startup (I can't find it now, but it basically said the setting was 101, which was not allowed, so it is setting the display to 1

    • 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