SPi, I2C, GPIO and Qt5 on BBB

Hi all,

while waiting for the new kernel to compile, I ask for advices !

I have a new project about reading sensors, analyzing them, and graph them on a portable unit.

I studied the “doable” thing on a PIC. It was fine to a certain point using a FT800 Eve chip for graphical LCD.
Until… the mechanical engineer asked for new features like 20KSps sampling of 4 sensors…
Too much amount of data for a simple pic circuitry. To be able to do that, I’ll have to use buffers and so on…
So exit the PIC, welcome BBB.

Recordings will be made using AD8326 ADCs in a SPI like bus, that I’ll drive using bit-banging IOs. This way I’m able to read n Adcs at a time because I need data to be sampled at the exact same time for each sensor.

Will use the PRU route because of precise timing needed.

For now I’m experimenting on the freshly arrived BBB.

I played a bit on cross compiling Qt4, was fine without OpenGLES will try with it and might even try Qt5.

Where I need advices is about this:

  • which kernel and/or distribution (testing on debian for now ) to use in order to be able to use QtQuick, mean openGLES as I read ?
  • I use Robert miraculous scripts, but I’d like to strip down the distribution to almost bare, I’ll be using just SSH and Qt qws for display.
  • which are the mandatory kernel drivers for the BBB board in order to have it running with LCD cape with openGL, SPI , I2c and GPIO available for Qt ?

I read a lot, but information is surprisingly fast outdated.
I’m new to linux kernel. Even if I maintain some servers, I never had a look at the kernel building.
I’m used to FreeBSD one as I have been building a few things around Geode processors and played a lot at shrinking system to fit on small CF cards. But that’s another life :slight_smile:

Thanks for your help and guidelines.

Cedric, Hi,

For starters: http://eewiki.net/display/linuxonarm/BeagleBone+Black this is Roberts “build your own” guide.

http://eewiki.net/display/linuxonarm/BeagleBone+Black#BeagleBoneBlack-RootFileSystem%28smallflash%29 This base image is around 75M in size for me without anything else installed. WIth openssh-server, and ntpdate, I think around 91M size total.

As for the rest of your questions: I do not know personally. I do not use QT, or an LCD. As I run headless, and have no interest in either for my own purposes. Instead I use my own BBB as kind of a network appliance by using Nodejs.

Thanks William,

I tried to compile kernel 3.13, GFX libraries , all fine.
Copied all the stuff on a SD card and booted… well, everything here but screen !

I need to find how to enable LCD4 cape with new kernel.

That said, I tried to compile qt4.8.6 with opengl es2 and I have an error:

make[4]: entrant dans le répertoire « /home/cedric/qt4-bbb/downloads/qt-everywhere-opensource-src-4.8.6/src/plugins/gfxdrivers/powervr/QWSWSEGL »
/home/cedric/bb-kernel/dl/gcc-linaro-arm-linux-gnueabihf-4.8-2014.04_linux/bin/arm-linux-gnueabihf-gcc -c -pipe -O3 -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=hard -Wall -W -fPIC -DQT_NO_QWS_CURSOR -DQT_QWS_CLIENTBLIT -I…/…/…/…/…/mkspecs/qws/linux-TIarmv7-sgx-g++ -I. -I/home/cedric/qt4-bbb/downloads/tslib/src -I/home/cedric/bb-kernel/ignore/SDK_BIN/Graphics_SDK_setuplinux_5_01_01_01/GFX_Linux_SDK/OGLES2/SDKPackage/Builds/OGLES2/Include -I/home/cedric/bb-kernel/ignore/SDK_BIN/Graphics_SDK_setuplinux_5_01_01_01/GFX_Linux_SDK/OGLES2/SDKPackage/Builds/OGLES2/LinuxOMAP3/Include/ -I/home/cedric/bb-kernel/ignore/SDK_BIN/Graphics_SDK_setuplinux_5_01_01_01/include -I/home/cedric/bb-kernel/ignore/SDK_BIN/Graphics_SDK_setuplinux_5_01_01_01/GFX_Linux_SDK/OGLES/SDKPackage/Builds/OGLES/Include -o .obj/release-shared-emb-arm/pvrqwsdrawable.o pvrqwsdrawable.c
In file included from pvrqwsdrawable.c:42:0:
pvrqwsdrawable_p.h:56:19: fatal error: pvr2d.h: Aucun fichier ou dossier de ce type
#include <pvr2d.h>

Means no such file, although I have applied patches from https://github.com/prabindh/qt-configs/tree/master/qt4.8

Still trying…

If you get OpenGLES working on the BBB I’d be interested in how you did it. I like to read about geeky things like this :wink: However last I remember this was not possible with the way software support is. Hopefully that will change if not already.

I just followed http://eewiki.net/display/linuxonarm/BeagleBone+Black#BeagleBoneBlack-SGX for the opengl part, built against v3.13.11-bone12

Must say I feel lost with all those features appearing and disappearing with the kernel releases.

Ah right, I was thinking in the context of 3.8.x version. 3.13.x is EOL I believe ( meaning end of life ) That appears to be OpenGLES2, but frame buffer support only.

From what I understand, TI made the choice of “supporting” 3.13.x branch with the SGX hardware. capremgr was in 3.8.x, and based on Roberts guide, 3.15.x has better ethernet, and usb support.

As for why the branches are done this way ? I’m not a kernel developer so I’m not 100% sure. However I could imagine that it is a lot of work setting all this up plus scripts / instructions for building etc. I’ve seen Robert say several times “patches welcome”, so I’m assuming he may not wish to duplicate his own work across branches. But this is just speculation on my own behalf.

I’d be willing myself to work on getting capemgr as is working on 3.8.x into 3.15.x myself. But since I’m fairly inexperienced in this area I’d need time, and a mentor ( as in to guide me, not to pay me ).

Ah right, I was thinking in the context of 3.8.x version. 3.13.x is EOL I believe ( meaning end of life ) That appears to be OpenGLES2, but frame buffer support only.

From what I understand, TI made the choice of “supporting” 3.13.x branch with the SGX hardware. capremgr was in 3.8.x, and based on Roberts guide, 3.15.x has better ethernet, and usb support.

As for why the branches are done this way ? I’m not a kernel developer so I’m not 100% sure. However I could imagine that it is a lot of work setting all this up plus scripts / instructions for building etc. I’ve seen Robert say several times “patches welcome”, so I’m assuming he may not wish to duplicate his own work across branches. But this is just speculation on my own behalf.

I’d be willing myself to work on getting capemgr as is working on 3.8.x into 3.15.x myself. But since I’m fairly inexperienced in this area I’d need time, and a mentor ( as in to guide me, not to pay me ).

Have a look here for everything you need:

https://github.com/pantoniou/linux-beagle-track-mainline/commits/dt-ng/bbb

Pantelis Antoniou is the original author of cape manager and this is what he is trying to get accepted into mainline. You can read about his efforts here:

https://lkml.org/lkml/2014/4/17/367

Regards,
John

John,
thanks for the link.
I’ll get an eye on that.

On another hand I found a patch to enable LCD cape here: http://www.spinics.net/lists/linux-omap/msg109735.html

I applied the patch against kernel tree but got a dtc fatal error on the first line of the dts.
I checked out Robert dtc patch, tried again and stil got an error.

I tried the dtc on another dts in the tree, same fatal error…

Really weird

I won’t give up !!

Ah right, I was thinking in the context of 3.8.x version. 3.13.x is EOL I believe ( meaning end of life ) That appears to be OpenGLES2, but frame buffer support only.

From what I understand, TI made the choice of “supporting” 3.13.x branch with the SGX hardware. capremgr was in 3.8.x, and based on Roberts guide, 3.15.x has better ethernet, and usb support.

As for why the branches are done this way ? I’m not a kernel developer so I’m not 100% sure. However I could imagine that it is a lot of work setting all this up plus scripts / instructions for building etc. I’ve seen Robert say several times “patches welcome”, so I’m assuming he may not wish to duplicate his own work across branches. But this is just speculation on my own behalf.

I’d be willing myself to work on getting capemgr as is working on 3.8.x into 3.15.x myself. But since I’m fairly inexperienced in this area I’d need time, and a mentor ( as in to guide me, not to pay me ).

Looks like the capemgr functionality will be in V3.17:

https://lkml.org/lkml/2014/7/27/57

Regards,
John

So all that remains is SGX / OGL support too . . . Is this likely ?

So all that remains is SGX / OGL support too . . . Is this likely ?

Robert’s build script does do this for you now. Perhaps he will find a way to simplify the process when he has time. TI still have to add xorg support. Not sure when that is going to happen.

I think that adding QT5 + Wayland to the BBB repository would be helpful. Several people are working on this so hopefully something will happen soon.

Regards,
John

Looks like promising.

Yes Qt5 and wayland would be great for devs like me.
Qt without quick is like going steps back

Cédric Malitte

I have made a demo on iMX6

https://www.dropbox.com/s/ltnedy59gv5i70j/VID_20140723_084207.mp4

I have made a demo on iMX6

https://www.dropbox.com/s/ltnedy59gv5i70j/VID_20140723_084207.mp4

How did you get it to start so quickly? Do you have build instructions for what you did?

Regards,
John

http://www.github.com/liyaoshi/buildroot