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.

Problems compiling Graphics SDK for OMAP335x Processor (BBB)

Other Parts Discussed in Thread: DA8XX, SYSCONFIG

Hi

I'm trying to compile the Graphics SDK for my BeagleBone Black (OMAP335x).  It is a prerequisite to installing this GPU Compositing (http://processors.wiki.ti.com/index.php/GPU_Compositing). 

I am trying to install these as I am hoping these together will allow me to have my application use OPENGL to resize it's window to 720p from 800x600, as currently it doesn't resize when I select OPENGL scaling within the app; and when I do select it, my Beaglebone black grinds to a halt and is unusable.

I've checked out Robert Nelsons Kernel source and u-boot source to the following directories (using GIT), respectively. I assume I recompile Roberts kernel once I get through all the below steps for installing the GPU Compositing.

/home/arm/dev/linux-dev

/home/arm/dev/u-boot

I've also downloaded the Graphics SDK to the following directory

/home/arm/dev/Graphics_SDK_4_06_00_03

I've run the following command from /home/arm/dev/Graphics_SDK_4_06_00_03

 make BUILD=debug OMAPES=8.x all SUPPORT_XORG=1

and I am getting the following error;

make[2]: Entering directory `/home/arm/dev/linux-dev/KERNEL'
  LD      /home/arm/dev/Graphics_SDK_4_06_00_03/GFX_Linux_KM/services4/3rdparty/bufferclass_ti/built-in.o
  CC [M]  /home/arm/dev/Graphics_SDK_4_06_00_03/GFX_Linux_KM/services4/3rdparty/bufferclass_ti/bc_cat.o
/home/arm/dev/Graphics_SDK_4_06_00_03/GFX_Linux_KM/services4/3rdparty/bufferclass_ti/bc_cat.c: In function ‘bc_cat_init’:
/home/arm/dev/Graphics_SDK_4_06_00_03/GFX_Linux_KM/services4/3rdparty/bufferclass_ti/bc_cat.c:680:6: error: implicit declaration of function ‘cpu_is_omap3530’ [-Werror=implicit-function-declaration]
/home/arm/dev/Graphics_SDK_4_06_00_03/GFX_Linux_KM/services4/3rdparty/bufferclass_ti/bc_cat.c:680:6: error: implicit declaration of function ‘omap_rev’ [-Werror=implicit-function-declaration]
/home/arm/dev/Graphics_SDK_4_06_00_03/GFX_Linux_KM/services4/3rdparty/bufferclass_ti/bc_cat.c:680:56: error: ‘OMAP3430_REV_ES3_0’ undeclared (first use in this function)
/home/arm/dev/Graphics_SDK_4_06_00_03/GFX_Linux_KM/services4/3rdparty/bufferclass_ti/bc_cat.c:680:56: note: each undeclared identifier is reported only once for each function it appears in
cc1: some warnings being treated as errors
make[4]: *** [/home/arm/dev/Graphics_SDK_4_06_00_03/GFX_Linux_KM/services4/3rdparty/bufferclass_ti/bc_cat.o] Error 1
make[3]: *** [/home/arm/dev/Graphics_SDK_4_06_00_03/GFX_Linux_KM/services4/3rdparty/bufferclass_ti] Error 2
make[2]: *** [_module_/home/arm/dev/Graphics_SDK_4_06_00_03/GFX_Linux_KM] Error 2
make[2]: Leaving directory `/home/arm/dev/linux-dev/KERNEL'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/arm/dev/Graphics_SDK_4_06_00_03/GFX_Linux_KM'
make: *** [buildkernel] Error 2

I am running this in an ubuntu VM and have edited the Rules file like so;

#Rules.make

################# FIELDS MODIFIABLE BY THE USER ###############################
############### All the fields below are mandatory ############################

# Set home area (ex /home/user/)
HOME=/home/arm

# Set Toolchain path (ex /home/user/toolchain/arago-2011.09/armv7a)
CSTOOL_DIR=/usr/bin

# Set Tool chain prefix (ex arm-arago-linux-gnueabi- )
CSTOOL_PREFIX=arm-linux-gnueabi-

# Set kernel installation path ( ex /home/user/linux-04.00.01.13 )
KERNEL_INSTALL_DIR=/home/arm/dev/linux-dev/KERNEL

# Set Target filesystem path ( ex /home/user/targetfs )
TARGETFS_INSTALL_DIR=/home/arm/dev/filesys

######################### PRE-DEFINED VARIABLES ###############################
######################## NOT MODIFIABLE BY USER ###############################

# Set installation folder
GRAPHICS_INSTALL_DIR=$(HOME)/dev/Graphics_SDK_4_06_00_03

  • Hi,

    What is the kernel version you are using?

    The graphics SDK release notes mentions the kernel versions it has been validated against. Also this is an older graphics SDK release.

    http://processors.wiki.ti.com/index.php/RN_4_06_00_03#Kernel.28Linux_PSP.29_versions_supported_or_used_for_validation

    The latest graphics SDK release is 04.10.00.01 & can be downloaded from below link-

    http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/gfxsdk/latest/index_FDS.html

    Can you please check with latest graphics SDK release? Also please check the kernel versions listed in release notes.

    Thanks,

    Prathap.

     

  • Thanks for your Reply Prathap.

    1 - I am using Robert C Nelsons 3.8 Kernel for the Beaglebone Black; i get it like so;

    git clone git://github.com/RobertCNelson/linux-dev.git
    cd linux-dev
    git checkout origin/am33x-v3.8 -b tmp
    
    
    2 - I've looked at the release notes for the later SDK version (4.10.00.01).  Here they are below.  Does this mean that the new version will work with the 3.8 kernel above?

    Features in this release

    • NEW - 1.10 RC DDK (1.10@2359475)
    • NEW - Updated wsegl.h, pvr2d.h (with MIT/GPLv2 dual license)included in the top level include folder of release package.This needs to be used while building Qt.
    • NEW - Hardfp minimal demos package
    • PowerVR SDK 3.0
    • Support for compilation against 3.8 kernel.
    • Supports Xorg X Server 1.12


    3 - What is the best way to determine the directory that I should set the following values to?  It's not clear to me what the SDK is looking for as it explains it in the Rules.make file;  Especially the last one.

    # Set kernel installation path ( ex /home/user/linux-04.00.01.13 )
    KERNEL_INSTALL_DIR=

    # Set Target filesystem path ( ex /home/user/targetfs )
    TARGETFS_INSTALL_DIR=


    Thanks again for your help Prathap

  • Hi,

    The Graphics SDK 04.10.00.01 is build tested only against 3.8 kernel as mentioned in the release notes. The kernels used for validation are listed in the release notes

    http://processors.wiki.ti.com/index.php/RN_4_10_00_01#Kernel.28Linux_PSP.29_versions_supported_or_used_for_validation

    The graphics driver depends on the frame buffer driver/uses the frame buffer driver for display. Are you sure the Beaglebone black AM335x frame buffer driver support  is present in the kernel sources you are using? Please check the kernel sources & confirm for the beaglebone black frame buffer driver support.

    For the other queries -

    KERNEL_INSTALL_DIR= This should be set to the path of the kernel sources you are building graphics SDK against.

    Make sure the kernel sources are built first before building the graphics SDK.

    TARGETFS_INSTALL_DIR= This should be set to the path of the target file system which you are planning to use.

    When you do an install step with graphics SDK after build, the 3D demos, SGX driver & the libraries will be installed onto the path provided in TARGETFS_INSTALL_DIR.

    Thanks,

    Prathap.

     

     

     

  • Thanks again for your prompt response.

    Im not sure what you mean re 3.8 kernel.  Are you suggesting it's been build against the 3.8 kernel but is only going to work on a 3.2 kernel?

    Im not sure how to check for the frame buffer driver support you refer to, can you point me in that direction?

  • Hi,

    In the release notes we mention the kernel version we have validated the graphics SDK release against. This is basically driven by the Linux PSP releases/kernel sources that are validated agaisnt in the TI AMSDK releases. Its right now 3.2 kernel for AM335x.

    http://processors.wiki.ti.com/index.php/AMSDK_Linux_User's_Guide#Additional_Information

    Beyond this, to help the people trying against mainline kernel, we try to build against the kernel sources & if any build issues, fix them & incorporate in the release. So that is what is mentioned in release notes.

    You should see the file drivers/video/da8xx-fb.c in kernel sources. This has the lcdc frame buffer driver support for AM335x.

    In your kernel .config, you should see CONFIG_FB=y , CONFIG_FB_DA8XX=y.

    On bootup, you should see the framebuffer device node & fbset should give you the current frame buffer configuration -

    root@am335x-evm:~# ls /dev/fb0
    /dev/fb0
    root@am335x-evm:~# fbset

    mode "800x480-62"
        # D: 30.000 MHz, H: 32.433 kHz, V: 61.895 Hz
        geometry 800 480 800 960 32
        timings 33333 39 39 29 13 47 2
        rgba 8/16,8/8,8/0,8/24
    endmode

    You can also post your query in the forum or from the location where you picked up the kernel sources regarding the frame buffer driver support.

    Thanks,

    Prathap.

     

     

  • So in short, it's built against a 3.8 kernel and it compiles OK, but it's only been validated and confirmed to function correctly on a 3.2 kernel?

    This is a little bit out of my league, so trying to understand each component that is missing.

    So this whole thing relies on who producing what files / drivers etc?

  • That's right. The graphics driver depends on the frame buffer driver support.

    The frame buffer driver is part of the linux kernel sources & right now its on 3.2 as already mentioned.

    If your kernel sources supports the beaglebone black frame buffer driver & if the frame buffer driver is validated & known to be working fine for beaglebone black, then only  you can try the graphics SDK against this kernel.

    Otherwise download the 3.2 kernel which has the required frame buffer driver support & against which graphics SDK is validated -

    http://processors.wiki.ti.com/index.php/AM335x-PSP_04.06.00.10_Release_Notes

    Thanks,

    Prathap.

     

  • Hi Prathap.

    I've been doing some digging, and I've spoken with Robert Nelson who has been doing a lot of work to produce the 3.8 kernel for the BeagleBone Black.

    Robert says 'we do not have the 3.8 kms/drm bits for the am335x...'

    Is this something TI will produce so we can start using the graphics, and in turn the OPENGL drivers?

    If so, do you know when TI will make these available?

  • Hi Chris,

    Have you checked the below kernel sources?  Can you try building the below kernel sources by enabling the frame buffer driver support through menuconfig if not already enabled?

    http://www.eewiki.net/display/linuxonarm/BeagleBone+Black#BeagleBoneBlack-LinuxKernel

    The graphics driver needs frame buffer driver support & not kms/drm.

    Also any reasons for being particular on 3.8 kernel for your work? Did you get a chance to try with the suggested 3.2 kernel ?

    Thanks,

    Prathap.

  • Hi Prathap

    3.2 Kernel does not work on the BeagleBone Black, only the 3.8

    I'm rebuilding the kernel now, and I'm in the menu.  I can't find the 'frame buffer driver'.  Can you direct me where I should look?  Is it just called 'Frame buffer driver'?

  • Actually - I've just found this menu option

    ->Support for frame buffer devices

    ---->DA8xx/OMAP-L1xx Frambuffer support

    This is checked

    Here are the options which are selected, so it looks like the frame buffer support is there.

    [*] Enable firmware EDID │ │
    │ │ [*] Framebuffer foreign endianness support ---> │ │
    │ │ [*] Enable Video Mode Handling Helpers │ │
    │ │ [*] Enable Tile Blitting Support │ │
    │ │ *** Frame buffer hardware drivers *** │ │
    │ │ < > Userspace VESA VGA graphics support │ │
    │ │ < > Epson S1D13XXX framebuffer support │ │
    │ │ < > Toshiba Mobile IO FrameBuffer support │ │
    │ │ < > SMSC UFX6000/7000 USB Framebuffer support │ │
    │ │ < > Displaylink USB Framebuffer support │ │
    │ │ <*> DA8xx/OMAP-L1xx Framebuffer support │ │
    │ │ < > Virtual Frame Buffer support (ONLY FOR TESTING!) │ │
    │ │ < > E-Ink Metronome/8track controller support │ │
    │ │ < > E-Ink Broadsheet/Epson S1D13521 controller support │ │
    │ │ < > AUO-K190X EPD controller support │ │
    │ │ <*> ST7735 framebuffer support │ │
    │ │

    The other problem is, when I Download the .bin files i cannot run them on the ubuntu server I am running (ARM Processor) because it doesn't recognise them.  Are there ARM versions of the SDK .bin files?

  • Hi,

    Thanks for the update. You need to install the .bin on your Linux PC (i686) & cross compile for ARM.

    Thanks,

    Prathap.

  • Thanks for this.

    I've done what you've said, and I've setup the Rules.make file as stated in the instructions.  I run the following, in the Graphics SDK directory;

    make BUILD=debug OMAPES=8.x FBDEV=yes SUPPORT_XORG=1

    and I get the following output after a few seconds

    CC [M] /home/ubuntu/Graphics_SDK_4_10_00_01/GFX_Linux_KM/services4/3rdparty/linux_drm/drm_pci.o
    CC [M] /home/ubuntu/Graphics_SDK_4_10_00_01/GFX_Linux_KM/services4/3rdparty/linux_drm/drm_sysfs.o
    CC [M] /home/ubuntu/Graphics_SDK_4_10_00_01/GFX_Linux_KM/services4/3rdparty/linux_drm/drm_hashtab.o
    make[4]: *** No rule to make target `/home/ubuntu/Graphics_SDK_4_10_00_01/GFX_Linux_KM/services4/3rdparty/linux_drm/drm_sman.o', needed by `/home/ubuntu/Graphics_SDK_4_10_00_01/GFX_Linux_KM/services4/3rdparty/linux_drm/drm.o'. Stop.
    make[3]: *** [/home/ubuntu/Graphics_SDK_4_10_00_01/GFX_Linux_KM/services4/3rdparty/linux_drm] Error 2
    make[2]: *** [_module_/home/ubuntu/Graphics_SDK_4_10_00_01/GFX_Linux_KM] Error 2
    make[2]: Leaving directory `/home/ubuntu/linux-dev/KERNEL'
    make[1]: *** [all] Error 2
    make[1]: Leaving directory `/home/ubuntu/Graphics_SDK_4_10_00_01/GFX_Linux_KM'
    make: *** [buildkernel] Error 2

    I'm not sure where I would find this 'rule' that it requires?

  • Sry - I have found this page

    http://processors.wiki.ti.com/index.php/SGXDbg#Unable_to_build_graphics_SDK_with_SUPPORT_XORG.3D1_for_3.3_.26_above_kernels

    But In the file GFX_Linux_KM/services4/3rdparty/linux_drm/Kbuild There is commented out sections for the 3.8 kernel

    # For greater than/equal to 3.4 till 3.8 kernel
    #drm-y := pvr_drm_stubs.o drm_auth.o drm_bufs.o drm_cache.o drm_context.o drm_dma.o drm_drv.o drm_fops.o drm_gem.o drm_ioctl.o drm_irq.o \
    # drm_lock.o drm_memory.o drm_proc.o drm_stub.o drm_vm.o \
    # drm_agpsupport.o drm_scatter.o ati_pcigart.o drm_pci.o \
    # drm_sysfs.o drm_hashtab.o drm_mm.o \
    # drm_crtc.o drm_modes.o drm_edid.o \
    # drm_info.o drm_debugfs.o drm_encoder_slave.o drm_global.o drm_platform.o drm_trace_points.o drm_prime.o

    as well as this section at the top

    obj-m := drm.o
    ifeq ($(TI_PLATFORM),omap4)
    drm-y := pvr_drm_stubs.o drm_auth.o drm_bufs.o drm_cache.o drm_context.o drm_dma.o drm_drawable.o drm_drv.o drm_fops.o drm_gem.o drm_ioctl.o drm_irq.o \
    drm_lock.o drm_memory.o drm_proc.o drm_stub.o drm_vm.o \
    drm_agpsupport.o drm_scatter.o ati_pcigart.o drm_pci.o \
    drm_sysfs.o drm_hashtab.o drm_sman.o drm_mm.o \
    drm_crtc.o drm_modes.o drm_edid.o \
    drm_info.o drm_debugfs.o drm_encoder_slave.o
    else
    # Works for 2.6.37 till 3.2 kernel
    drm-y := pvr_drm_stubs.o drm_auth.o drm_bufs.o drm_cache.o drm_context.o drm_dma.o drm_drv.o drm_fops.o drm_gem.o drm_ioctl.o drm_irq.o \
    drm_lock.o drm_memory.o drm_proc.o drm_stub.o drm_vm.o \
    drm_agpsupport.o drm_scatter.o ati_pcigart.o drm_pci.o \
    drm_sysfs.o drm_hashtab.o drm_sman.o drm_mm.o \
    drm_crtc.o drm_modes.o drm_edid.o \
    drm_info.o drm_debugfs.o drm_encoder_slave.o drm_global.o drm_platform.o drm_trace_points.o
    endif

    I'm not sure if I'm just removing the drm_sman.o and adding drm_prime.o to the already uncommented section of the omap4 part, or if I am uncommenting the 3.8 part and commenting out the omap4 part?

    I'm on an OMAP4 system I beleive (Bealgebone Black)

    ---

    If I try without XORG support, I get the following

    CC [M] /home/ubuntu/Graphics_SDK_4_10_00_01/GFX_Linux_KM/services4/system/ti335x/sysutils.o
    In file included from /home/ubuntu/Graphics_SDK_4_10_00_01/GFX_Linux_KM/services4/system/ti335x/sysutils.c:46:0:
    /home/ubuntu/Graphics_SDK_4_10_00_01/GFX_Linux_KM/services4/system/ti335x/sysutils_linux.c: In function ‘AcquireGPTimer’:
    /home/ubuntu/Graphics_SDK_4_10_00_01/GFX_Linux_KM/services4/system/ti335x/sysutils_linux.c:495:14: warning: unused variable ‘sys_ck’ [-Wunused-variable]
    struct clk *sys_ck;
    ^
    CC [M] /home/ubuntu/Graphics_SDK_4_10_00_01/GFX_Linux_KM/services4/system/ti335x/sysconfig.o
    LD [M] /home/ubuntu/Graphics_SDK_4_10_00_01/GFX_Linux_KM/pvrsrvkm.o
    Building modules, stage 2.
    MODPOST 3 modules
    CC /home/ubuntu/Graphics_SDK_4_10_00_01/GFX_Linux_KM/pvrsrvkm.mod.o
    LD [M] /home/ubuntu/Graphics_SDK_4_10_00_01/GFX_Linux_KM/pvrsrvkm.ko
    CC /home/ubuntu/Graphics_SDK_4_10_00_01/GFX_Linux_KM/services4/3rdparty/bufferclass_ti/bufferclass_ti.mod.o
    LD [M] /home/ubuntu/Graphics_SDK_4_10_00_01/GFX_Linux_KM/services4/3rdparty/bufferclass_ti/bufferclass_ti.ko
    CC /home/ubuntu/Graphics_SDK_4_10_00_01/GFX_Linux_KM/services4/3rdparty/dc_ti335x_linux/omaplfb.mod.o
    LD [M] /home/ubuntu/Graphics_SDK_4_10_00_01/GFX_Linux_KM/services4/3rdparty/dc_ti335x_linux/omaplfb.ko
    make[2]: Leaving directory `/home/ubuntu/linux-dev/KERNEL'
    make[1]: Leaving directory `/home/ubuntu/Graphics_SDK_4_10_00_01/GFX_Linux_KM'
    copying the sgx kernel modules to appropriate folder...
    building devmem2...
    make[1]: Entering directory `/home/ubuntu/Graphics_SDK_4_10_00_01/tools/devmem2'
    rm -rf ./Obj *.o
    make[1]: Leaving directory `/home/ubuntu/Graphics_SDK_4_10_00_01/tools/devmem2'
    make[1]: Entering directory `/home/ubuntu/Graphics_SDK_4_10_00_01/tools/devmem2'
    mkdir -p ./Obj
    arm-linux-gnueabihf-gcc -Wall -DRELEASE -O2 -c devmem2.c -o Obj/devmem2.o
    devmem2.c: In function ‘main’:
    devmem2.c:104:5: warning: format ‘%X’ expects argument of type ‘unsigned int’, but argument 2 has type ‘off_t’ [-Wformat=]
    printf("Value at address 0x%X (%p): 0x%lX\n", target, virt_addr, read_result);
    ^
    devmem2.c:123:3: warning: format ‘%X’ expects argument of type ‘unsigned int’, but argument 2 has type ‘long unsigned int’ [-Wformat=]
    printf("Written 0x%X; readback 0x%lX\n", writeval, read_result);
    ^
    mkdir -p ./Obj
    arm-linux-gnueabihf-g++ -o ./Obj/devmem2 ./Obj/devmem2.o -Wl,-lm -ldl
    make[1]: Leaving directory `/home/ubuntu/Graphics_SDK_4_10_00_01/tools/devmem2'
    make[1]: Entering directory `/home/ubuntu/Graphics_SDK_4_10_00_01/tools/devmem2'
    cp ./Obj/devmem2 ../../targetfs/
    make[1]: Leaving directory `/home/ubuntu/Graphics_SDK_4_10_00_01/tools/devmem2'


  • Hi,

    From the logs provided, your non-Xorg build is successful against the kernel you are using. Good to know that.

    Now for the xorg build, the default Kbuild works for 3.2 kernel. For 3.8, you need to remove drm_sman & add drm_prime as suggested in wiki page. Beaglebone black is based on AM335x & not OMAP4. So you need to do this in else part of omap4.

    Thanks,

    Prathap.

  • Thank you for this Prathap.

    I've gotten 1 error when I run it, but it looks to still create the files.

    devmem2.c: In function ‘main’:
    devmem2.c:104:5: warning: format ‘%X’ expects argument of type ‘unsigned int’, but argument 2 has type ‘off_t’ [-Wformat=]
    printf("Value at address 0x%X (%p): 0x%lX\n", target, virt_addr, read_result);
    ^
    devmem2.c:123:3: warning: format ‘%X’ expects argument of type ‘unsigned int’, but argument 2 has type ‘long unsigned int’ [-Wformat=]
    printf("Written 0x%X; readback 0x%lX\n", writeval, read_result);
    ^

    So now I have a series of files that are created, but no idea how to move them over to my BeagleBone Black SDCard Image.  

    My 'targetfs' directory was set to 

    /home/ubuntu/Graphics_SDK_4_10_00_01/targetfs.

    I notice there are new files in there, and I also notice that there are some new files here;

    /home/ubuntu/Graphics_SDK_4_10_00_01/gfx_rel_es8.x

    They are;

    pvrsrvkm.ko

    drm.ko

    bufferclass_ti.ko

    Reading through the rest of the install instructions (Step 1, Step 2, etc) it always makes reference to demos.  I installed the BinOnly and am not running any demo/s  Nor did I mount the filesystem over NFS?  All I'm trying to do is install some graphics drivers so my machine doesn't grind to a halt when I scale it to 1920 x 1080.  I'm not interested in demo's etc.

    Where do I move these files to on my SD Card?

    Thanks again.  This must be a painful process for you 8-)

  • Hi,

    Any process on that? I am currently trying to do the same and also got the same files as result. If someone has an idea please let me know.