This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux/OMAP3530: Compiling Graphics SDK 4.06.00.03 Against Linux Kernel 2.6.29.6?

Part Number: OMAP3530
Other Parts Discussed in Thread: OMAP3515

Tool/software: Linux

What is the latest version of Graphics SDK that I can use with OMAP3530 running Linux kernel 2.6.29.6?

I am trying to upgrade a legacy device with newer software using Qt 5.8. The device uses OMAP3530 processor with Linux kernel based on 2.6.29.6. (We don't have the option to upgrade to a newer kernel.) Currently, we use Graphics SDK 3.01.00.02 (with a minor patch). In its EGL/eglext.h, this version of SDK uses EGL extension version 3, as indicated by the following macro:

#define EGL_EGLEXT_VERSION 3

QtWebEngine shipped within Qt 5.8 requires that we use EGL extension version 4, which seems to be introduced in Graphics SDK 4.06. However, I cannot seem to compile the kernel modules in the newer SDK against Linux kernel based on 2.6.29.6. Here is my attempt:

precor@SEAL9004:~/Graphics_SDK_4_06_00_03$ make OMAPES=3.x
building the sgx kernel modules...
make[1]: Entering directory `/home/precor/Graphics_SDK_4_06_00_03/GFX_Linux_KM'
make[1]: Leaving directory `/home/precor/Graphics_SDK_4_06_00_03/GFX_Linux_KM'
make[1]: Entering directory `/home/precor/Graphics_SDK_4_06_00_03/GFX_Linux_KM'
make -C /home/precor/workdir/lsp/linux-2.6.29_omap3515 M=`pwd`
make[2]: Entering directory `/home/precor/workdir/lsp/linux-2.6.29_omap3515'
LD /home/precor/Graphics_SDK_4_06_00_03/GFX_Linux_KM/services4/3rdparty/bufferclass_ti/built-in.o
CC [M] /home/precor/Graphics_SDK_4_06_00_03/GFX_Linux_KM/services4/3rdparty/bufferclass_ti/bc_cat.o
LD [M] /home/precor/Graphics_SDK_4_06_00_03/GFX_Linux_KM/services4/3rdparty/bufferclass_ti/bufferclass_ti.o
LD /home/precor/Graphics_SDK_4_06_00_03/GFX_Linux_KM/services4/3rdparty/dc_omapfb3_linux/built-in.o
CC [M] /home/precor/Graphics_SDK_4_06_00_03/GFX_Linux_KM/services4/3rdparty/dc_omapfb3_linux/omaplfb_displayclass.o
CC [M] /home/precor/Graphics_SDK_4_06_00_03/GFX_Linux_KM/services4/3rdparty/dc_omapfb3_linux/omaplfb_linux.o
/home/precor/Graphics_SDK_4_06_00_03/GFX_Linux_KM/services4/3rdparty/dc_omapfb3_linux/omaplfb_linux.c:51: fatal error: linux/omapfb.h: No such file or directory
compilation terminated.
make[4]: *** [/home/precor/Graphics_SDK_4_06_00_03/GFX_Linux_KM/services4/3rdparty/dc_omapfb3_linux/omaplfb_linux.o] Error 1
make[3]: *** [/home/precor/Graphics_SDK_4_06_00_03/GFX_Linux_KM/services4/3rdparty/dc_omapfb3_linux] Error 2
make[2]: *** [_module_/home/precor/Graphics_SDK_4_06_00_03/GFX_Linux_KM] Error 2
make[2]: Leaving directory `/home/precor/workdir/lsp/linux-2.6.29_omap3515'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/precor/Graphics_SDK_4_06_00_03/GFX_Linux_KM'
make: *** [buildkernel] Error 2

The missing file, omapfb.h, is found in my system in a different directory:

precor@SEAL9004:~/Graphics_SDK_4_06_00_03$ locate omapfb.h
/home/precor/workdir/lsp/linux-2.6.29_omap3515/arch/arm/plat-omap/include/mach/omapfb.h
/home/precor/workdir/lsp/linux-2.6.29_omap3515/drivers/video/omap2/omapfb.h

I am not sure if it is as simple as trying to change the path to this include file within dc_omapfb3_linux/omaplfb_linux.c. I have attempted to do so and still get compiler errors.

The last 4.x series SDK that I have been able to successfully compile against the current kernel is 4.03.00.02. Unfortunately, this version does not have the EGL extensions we need.

I have noticed that while compiling 4.03, the system picks up the offending file from a different directory.

4.03.00.02:
Graphics_SDK_4_03_00_02/GFX_Linux_KM/services4/3rdparty/dc_omap3430_linux/omaplfb_linux.c

4.06.00.03:
Graphics_SDK_4_06_00_03/GFX_Linux_KM/services4/3rdparty/dc_omapfb3_linux/omaplfb_linux.c

So it looks like omaplfb_linux.c within dc_omap3430_linux compiles with 2.6.29.6, but the one within dc_omapfb3_linux does not.

I will state my question differently.

What is the minimum Linux kernel version needed to compile 4.06 for OMAP3530? Or better, 5.x of Graphics SDK?

We are using a softfp toolchain.

Here is the patch I need to compile Graphics SDK 4.03.00.02:

diff -rupN Graphics_SDK_4_03_00_02/GFX_Linux_KM/services4/3rdparty/dc_omap3430_linux/omaplfb_linux.c Graphics_SDK_4_03_00_02.patched/GFX_Linux_KM/services4/3rdparty/dc_omap3430_linux/omaplfb_linux.c
--- Graphics_SDK_4_03_00_02/GFX_Linux_KM/services4/3rdparty/dc_omap3430_linux/omaplfb_linux.c 2011-03-08 04:27:35.000000000 -0800
+++ Graphics_SDK_4_03_00_02.patched/GFX_Linux_KM/services4/3rdparty/dc_omap3430_linux/omaplfb_linux.c 2017-06-20 01:06:14.205927036 -0700
@@ -61,7 +61,7 @@ extern int omap_dispc_request_irq(unsign
extern void omap_dispc_free_irq(unsigned long, void (*)(void *), void *);
extern void omap_dispc_set_plane_base(int plane, IMG_UINT32 phys_addr);
#else
-#include <plat/display.h>
+#include <mach/display.h>
#include <linux/console.h>
#include <linux/fb.h>
static omap_dispc_isr_t *pOMAPLFBVSyncISRHandle = NULL;
@@ -123,8 +123,7 @@ static inline int OMAPLFBRegisterVSyncIS

static inline int OMAPLFBUnregisterVSyncISR(OMAPLFB_SWAPCHAIN *psSwapChain)
{
- return omap_dispc_unregister_isr(OMAPLFBVSyncISR, psSwapChain,
- DISPC_IRQ_VSYNC);
+ return omap_dispc_unregister_isr(OMAPLFBVSyncISR);
}

#else
@@ -233,7 +232,7 @@ OMAP_ERROR OMAPLFBUninstallVSyncISR (OMA
#if !defined (CONFIG_OMAP2_DSS)
omap_dispc_free_irq(DISPC_IRQ_VSYNC, OMAPLFBVSyncISR, psSwapChain);
#else
- omap_dispc_unregister_isr (OMAPLFBVSyncISR, psSwapChain, DISPC_IRQ_VSYNC);
+ omap_dispc_unregister_isr (OMAPLFBVSyncISR);
#endif
return OMAP_OK;
}
diff -rupN Graphics_SDK_4_03_00_02/GFX_Linux_KM/services4/srvkm/devices/sgx/sgxinit.c Graphics_SDK_4_03_00_02.patched/GFX_Linux_KM/services4/srvkm/devices/sgx/sgxinit.c
--- Graphics_SDK_4_03_00_02/GFX_Linux_KM/services4/srvkm/devices/sgx/sgxinit.c 2011-03-08 04:27:36.000000000 -0800
+++ Graphics_SDK_4_03_00_02.patched/GFX_Linux_KM/services4/srvkm/devices/sgx/sgxinit.c 2017-06-20 01:06:23.489594761 -0700
@@ -408,7 +408,6 @@ PVRSRV_ERROR SGXInitialise(PVRSRV_SGXDEV
}

#else
- if(cpu_is_omap3630())
OSWriteHWReg(psDevInfo->pvRegsBaseKM, 0xFF08, 0x80000000);//OCP Bypass mode
#endif


  • Hi Salman,

    The last Graphics SDK version which officially supports OMAP35x is 4.06.00.01. For details you can check Graphics SDK release notes at:
    processors.wiki.ti.com/.../OMAP35x_Graphics_SDK_Release_Notes_Archive

    BR
    Tsvetolin Shulev
  • I get errors when I try to compile 4.06.00.01 against Linux kernel 2.6.29.  The release notes mention that the SDK was tested against 2.6.37.  Is there anyway to build it against the older kernel?

    precor@SEAL9004:~/Graphics_SDK_4_06_00_01$ make OMAPES=3.x

    building the sgx kernel modules...
    make[1]: Entering directory `/home/precor/Graphics_SDK_4_06_00_01/GFX_Linux_KM'
    make[1]: Leaving directory `/home/precor/Graphics_SDK_4_06_00_01/GFX_Linux_KM'
    make[1]: Entering directory `/home/precor/Graphics_SDK_4_06_00_01/GFX_Linux_KM'
    make -C /home/precor/workdir/lsp/linux-2.6.29_omap3515 M=`pwd`
    make[2]: Entering directory `/home/precor/workdir/lsp/linux-2.6.29_omap3515'
    LD /home/precor/Graphics_SDK_4_06_00_01/GFX_Linux_KM/services4/3rdparty/bufferclass_ti/built-in.o
    CC [M] /home/precor/Graphics_SDK_4_06_00_01/GFX_Linux_KM/services4/3rdparty/bufferclass_ti/bc_cat.o
    LD [M] /home/precor/Graphics_SDK_4_06_00_01/GFX_Linux_KM/services4/3rdparty/bufferclass_ti/bufferclass_ti.o
    LD /home/precor/Graphics_SDK_4_06_00_01/GFX_Linux_KM/services4/3rdparty/dc_omapfb3_linux/built-in.o
    CC [M] /home/precor/Graphics_SDK_4_06_00_01/GFX_Linux_KM/services4/3rdparty/dc_omapfb3_linux/omaplfb_displayclass.o
    CC [M] /home/precor/Graphics_SDK_4_06_00_01/GFX_Linux_KM/services4/3rdparty/dc_omapfb3_linux/omaplfb_linux.o
    /home/precor/Graphics_SDK_4_06_00_01/GFX_Linux_KM/services4/3rdparty/dc_omapfb3_linux/omaplfb_linux.c:51: fatal error: linux/omapfb.h: No such file or directory
    compilation terminated.
    make[4]: *** [/home/precor/Graphics_SDK_4_06_00_01/GFX_Linux_KM/services4/3rdparty/dc_omapfb3_linux/omaplfb_linux.o] Error 1
    make[3]: *** [/home/precor/Graphics_SDK_4_06_00_01/GFX_Linux_KM/services4/3rdparty/dc_omapfb3_linux] Error 2
    make[2]: *** [_module_/home/precor/Graphics_SDK_4_06_00_01/GFX_Linux_KM] Error 2
    make[2]: Leaving directory `/home/precor/workdir/lsp/linux-2.6.29_omap3515'
    make[1]: *** [all] Error 2
    make[1]: Leaving directory `/home/precor/Graphics_SDK_4_06_00_01/GFX_Linux_KM'
    make: *** [buildkernel] Error 2