Creating The SGX Driver For Ubuntu 14.04

Been trying to compile the SGX driver for Ubuntu 14.04 so that a sample JavaFX 8 program can run, which requires OpenGLES 2.0 support from the video driver. So far various methods have been used in an attempt to create the driver without any luck. At the moment the most promising method on the JavaFX 8 on BeagleBone Black (SGX driver problem?) thread has hit a major hurdle. Getting the following errors when building the video driver:

make BUILD=release OMAPES=8.x PM_RUNTIME=1 all

building the sgx kernel modules…
make[1]: Entering directory /home/a_user/Graphics_SDK_5_01_00_01/GFX_Linux_KM' make[1]: Leaving directory /home/a_user/Graphics_SDK_5_01_00_01/GFX_Linux_KM’
make[1]: Entering directory /home/a_user/Graphics_SDK_5_01_00_01/GFX_Linux_KM' make -C /home/a_user/repos/bbb_kernel/kernel M=pwdmake[2]: Entering directory/home/a_user/repos/bbb_kernel/kernel’

ERROR: Kernel configuration is invalid.
include/generated/autoconf.h or include/config/auto.conf are missing.
Run ‘make oldconfig && make prepare’ on kernel src to fix it.

WARNING: Symbol version dump /home/a_user/repos/bbb_kernel/kernel/Module.symvers
is missing; modules will have no dependencies and modversions.

LD /home/a_user/Graphics_SDK_5_01_00_01/GFX_Linux_KM/services4/3rdparty/bufferclass_ti/built-in.o
CC [M] /home/a_user/Graphics_SDK_5_01_00_01/GFX_Linux_KM/services4/3rdparty/bufferclass_ti/bc_cat.o
In file included from :0:0:
/home/a_user/repos/bbb_kernel/kernel/include/linux/kconfig.h:4:32: fatal error: generated/autoconf.h: No such file or directory
#include <generated/autoconf.h>
^
compilation terminated.
make[4]: *** [/home/a_user/Graphics_SDK_5_01_00_01/GFX_Linux_KM/services4/3rdparty/bufferclass_ti/bc_cat.o] Error 1
make[3]: *** [/home/a_user/Graphics_SDK_5_01_00_01/GFX_Linux_KM/services4/3rdparty/bufferclass_ti] Error 2
make[2]: *** [module/home/a_user/Graphics_SDK_5_01_00_01/GFX_Linux_KM] Error 2
make[2]: Leaving directory /home/a_user/repos/bbb_kernel/kernel' make[1]: *** [all] Error 2 make[1]: Leaving directory /home/a_user/Graphics_SDK_5_01_00_01/GFX_Linux_KM’
make: *** [buildkernel] Error 2

Link to BeagleBone Black (SGX driver problem?) thread.

Don't make me waste time by hardcoding some random check in
"./sgx_build_modules.sh" that you didn't run "./build_kernel.sh"
first..

Regards,

Where do I find build_kernel.sh file? Can’t find the file via a Nemo search. Exactly which kernel are you referring to? I am using the kernel referred to in this eLinux page.

Where do I find build_kernel.sh file? Can't find the file via a Nemo search.
Exactly which kernel are you referring to? I am using the kernel referred to
in this eLinux page.

Okay, so you aren't following the directions from the first post in
that thread you posted..

Look at your error:

ERROR: Kernel configuration is invalid.
        include/generated/autoconf.h or include/config/auto.conf are missing.
        Run 'make oldconfig && make prepare' on kernel src to fix it.

Either, KERNEL_INSTALL_DIR is setup wrong, or you haven't run "make
ARCH=arm zImage modules dtbs" on your kernel sources yet.

Regards,

Ran make ARCH=arm zImage modules dtbs but encountered errors. Below are the error messages:

gcc: error: unrecognized argument in option ‘-mabi=aapcs-linux’
gcc: note: valid arguments to ‘-mabi=’ are: ms sysv
gcc: error: unrecognized command line option ‘-mlittle-endian’
gcc: error: unrecognized command line option ‘-mno-thumb-interwork’
gcc: error: unrecognized command line option ‘-mthumb’
make[1]: *** [kernel/bounds.s] Error 1
make: *** [prepare0] Error 2

make ARCH=arm CC=yadaya zImage modules dtbs

Just a heads up, I'm not planning to walk you thru every step. As it's
futile, it only works in qt with the embedded stack.

Regards,

Ran make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- uImage dtbs which is working so far. Don’t know how long it will take to compile the kernel on a Core 2 Duo laptop though.

Received the following error messages while compiling the kernel modules:

net/wireless/regdb.c:1551:1: error: expected expression before ‘const’
const struct ieee80211_regdomain *reg_regdb[] = {
^
make[2]: *** [net/wireless/regdb.o] Error 1
make[1]: *** [net/wireless] Error 2
make: *** [net] Error 2

fixed

https://github.com/beagleboard/kernel/commit/47045103571894cd516e6af6e6780d594c59cfcc

Regards,

Thanks. Encountered errors when trying to build the video driver using make BUILD=release OMAPES=8.x PM_RUNTIME=1 all. Below is the output:

building the sgx kernel modules…
make[1]: Entering directory /home/a_user/Graphics_SDK_5_01_00_01/GFX_Linux_KM' make[1]: Leaving directory /home/a_user/Graphics_SDK_5_01_00_01/GFX_Linux_KM’
make[1]: Entering directory /home/a_user/Graphics_SDK_5_01_00_01/GFX_Linux_KM' make -C /home/a_user/repos/bbb_kernel/kernel M=pwdmake[2]: Entering directory/home/a_user/repos/bbb_kernel/kernel’
LD /home/a_user/Graphics_SDK_5_01_00_01/GFX_Linux_KM/services4/3rdparty/bufferclass_ti/built-in.o
CC [M] /home/a_user/Graphics_SDK_5_01_00_01/GFX_Linux_KM/services4/3rdparty/bufferclass_ti/bc_cat.o
LD [M] /home/a_user/Graphics_SDK_5_01_00_01/GFX_Linux_KM/services4/3rdparty/bufferclass_ti/bufferclass_ti.o
LD /home/a_user/Graphics_SDK_5_01_00_01/GFX_Linux_KM/services4/3rdparty/dc_ti335x_linux/built-in.o
CC [M] /home/a_user/Graphics_SDK_5_01_00_01/GFX_Linux_KM/services4/3rdparty/dc_ti335x_linux/omaplfb_displayclass.o
CC [M] /home/a_user/Graphics_SDK_5_01_00_01/GFX_Linux_KM/services4/3rdparty/dc_ti335x_linux/omaplfb_linux.o
/home/a_user/Graphics_SDK_5_01_00_01/GFX_Linux_KM/services4/3rdparty/dc_ti335x_linux/omaplfb_linux.c: In function ‘OMAPLFBWaitForVSync’:
/home/a_user/Graphics_SDK_5_01_00_01/GFX_Linux_KM/services4/3rdparty/dc_ti335x_linux/omaplfb_linux.c:710:7: error: implicit declaration of function ‘register_vsync_cb’ [-Werror=implicit-function-declaration]
if (register_vsync_cb((vsync_callback_t)grpx_irq_wait_handler, &completion, psDevInfo->uiFBDevID) != 0)
^
/home/a_user/Graphics_SDK_5_01_00_01/GFX_Linux_KM/services4/3rdparty/dc_ti335x_linux/omaplfb_linux.c:710:30: error: ‘vsync_callback_t’ undeclared (first use in this function)
if (register_vsync_cb((vsync_callback_t)grpx_irq_wait_handler, &completion, psDevInfo->uiFBDevID) != 0)
^
/home/a_user/Graphics_SDK_5_01_00_01/GFX_Linux_KM/services4/3rdparty/dc_ti335x_linux/omaplfb_linux.c:710:30: note: each undeclared identifier is reported only once for each function it appears in
/home/a_user/Graphics_SDK_5_01_00_01/GFX_Linux_KM/services4/3rdparty/dc_ti335x_linux/omaplfb_linux.c:710:47: error: expected ‘)’ before ‘grpx_irq_wait_handler’
if (register_vsync_cb((vsync_callback_t)grpx_irq_wait_handler, &completion, psDevInfo->uiFBDevID) != 0)
^
/home/a_user/Graphics_SDK_5_01_00_01/GFX_Linux_KM/services4/3rdparty/dc_ti335x_linux/omaplfb_linux.c:716:7: error: implicit declaration of function ‘unregister_vsync_cb’ [-Werror=implicit-function-declaration]
if (unregister_vsync_cb((vsync_callback_t)grpx_irq_wait_handler , &completion, psDevInfo->uiFBDevID) != 0)
^
/home/a_user/Graphics_SDK_5_01_00_01/GFX_Linux_KM/services4/3rdparty/dc_ti335x_linux/omaplfb_linux.c:716:49: error: expected ‘)’ before ‘grpx_irq_wait_handler’
if (unregister_vsync_cb((vsync_callback_t)grpx_irq_wait_handler , &completion, psDevInfo->uiFBDevID) != 0)
^
cc1: some warnings being treated as errors
make[4]: *** [/home/a_user/Graphics_SDK_5_01_00_01/GFX_Linux_KM/services4/3rdparty/dc_ti335x_linux/omaplfb_linux.o] Error 1
make[3]: *** [/home/a_user/Graphics_SDK_5_01_00_01/GFX_Linux_KM/services4/3rdparty/dc_ti335x_linux] Error 2
make[2]: *** [module/home/a_user/Graphics_SDK_5_01_00_01/GFX_Linux_KM] Error 2
make[2]: Leaving directory /home/a_user/repos/bbb_kernel/kernel' make[1]: *** [all] Error 2 make[1]: Leaving directory /home/a_user/Graphics_SDK_5_01_00_01/GFX_Linux_KM’
make: *** [buildkernel] Error 2

Fixed that in my v3.13.x tree:

https://github.com/RobertCNelson/bb-kernel/blob/am33x-v3.13/patches/sgx/0005-hack-port-da8xx-changes-from-ti-3.12-repo.patch

Regards,

BBB is currently running Ubuntu 14.04 with the 3.13 kernel. Is it possible to just install the SGX module to the BBB once the module is built?

Tried building the kernel maintained by Robert Nelson using the build_kernel file and ended up with a failed dependency check error. Below is the output:

  • Detected build host [Linux Mint 17 Qiana]
  • host: [i686]
  • git HEAD commit: [03ed3adc765644274981c461d25d1e576adceeff]
    Dependency check skipped, you are on your own.

Does build_kernel.sh correctly detect a PC running Ubuntu 14.04? Linux Mint 17 uses Ubuntu 14.04 as its base.

Linux mint and Linux mint debian edition are probably the two worst distro’s to use for cross compiling. I recommend using Debian as the cross compile system, but I also run Debian on my Beaglebone Black.
The thing is, you’re going to run into loads of trouble if you don’t.

I suppose Ubuntu could work too, but Linux mint is based off of Debian testing ( at least for Debian edition ), and the packages used between stable, and testing are often not the same. So, you can use Debian as your cross system, OR you’re going to be on your own. No one on this group is going to make a full time job of helping you do what you want to achieve.

That’s not me being a smart-ass or being funny. That is the cold hard truth.

Dependency check skipped, you are on your own.
-----------------------------
Unrecognized deb based system:

-----------------------------

The above says it all.

Also, for what it is worth. If you have a problem using Debian as your desktop system, that is fine. You can use virtualbox to run Debian in a VM. Which works perfectly fine, and is also exactly what I do.

all synced up:

https://github.com/RobertCNelson/bb-kernel/commit/5b1bee1b83112928ff4cecc0fb343ee5d5c7f72b

(i really should have had all the scripts in a separate repo 5 years
ago, but it's easy to sync up with meld.. :wink: )

Regards,

Atleast Mint is staying on 14.04 for awhile now, they are
traditionally a little laggy on naming their release, so i didn't know
it was equal to trusty till around this date:

https://github.com/RobertCNelson/stable-kernel/commit/9eb0b648e3d274bb23e6a595245ded6939cc4c4d

Regards,

Well, you know I am not a big fan of Ubuntu. My own personal experiences with it was several years ago, and it wound up going similar to how it seems to be going for Nick here. Which is why l left Angstrom in the ditch over a year ago.

e.g. I do not want an OS that argues with me, or wants to fight at every step i take in a custom direction.