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.

I fail to make Graphics-SDK work in DM8148 DVR-RDK environment

Hi.

Our setup is Mistral DM8148 EVM with Video-Security card. In this setup we manage to run
the DVR-RDK demos and also to put graphics-overlay using Qt via FBDev.

We now try to compile the Graphics-SDK and run the OpenGL demos (at this state OpenGL
1.1 is sufficient).

Regarding versions: we use DVR-RDK 4.0 and the latest Graphics-SDK 4.10.0.1.

After setting what needed according to the "3D Graphics SDK User's Guide", the compilation
passed successfully.

But when we run the "38xx-demo" script it aborts with the following failure:
"/usr/local/bin/pvrsrvctl: SrvInit failed (already initialized?) (err=34)"

During search in the forum for similar problems, I found 2 posts that seemed relevant.
According one of them I tried to compile the Graphics-SDK with Power-Management
enabled, but it did no solve the issue. From the second I learnt that there is a possiobility
that some software modules in DVR-RDK and Graphics-SDK might not match, but  I failed
to comprehend what specifcaly might not match and how to resolve the issue.

I'll appreciate any insignt/guidance. 

Thank you.

I'm putting below the full sequence of shell messages when executing "38xx-demo":

root@dm814x:/opt/gfxsdkdemos# ./38xx-demo
/dev/mem opened.
Memory mapped at address 0x400d2000.
Value at address 0x48180F04 (0x400d2f04): 0x1
Written 0x0; readback 0x0
/dev/mem opened.
Memory mapped at address 0x402e8000.
Value at address 0x48180900 (0x402e8900): 0x1
Written 0x2; readback 0x2
/dev/mem opened.
Memory mapped at address 0x4013e000.
Value at address 0x48180920 (0x4013e920): 0x70000
Written 0x2; readback 0x2
0x10205
release6.x
SGX Revision is 125...
installing 6.x SGX release user libraries

Installing PowerVR Consumer/Embedded DDK 'sgxddk_1.10@2359475' on target

File system installation root is /

Uninstalling existing version sgxddk_1.10@2359475
Uninstallation completed.
boot script rc.pvr -> /etc/init.d/rc.pvr
kernel module pvrsrvkm.ko -> /lib/modules/2.6.37/extra/pvrsrvkm.ko
kernel module omaplfb.ko -> /lib/modules/2.6.37/extra/omaplfb.ko
shared library libGLES_CM.so -> /usr/lib/libGLES_CM.so.1.10.2359475
shared library libusc.so -> /usr/lib/libusc.so.1.10.2359475
shared library libGLESv2.so -> /usr/lib/libGLESv2.so.1.10.2359475
shared library libglslcompiler.so -> /usr/lib/libglslcompiler.so.1.10.2359475
shared library libIMGegl.so -> /usr/lib/libIMGegl.so.1.10.2359475
shared library libEGL.so -> /usr/lib/libEGL.so.1.10.2359475
shared library libpvr2d.so -> /usr/lib/libpvr2d.so.1.10.2359475
shared library libpvrPVR2D_BLITWSEGL.so -> /usr/lib/libpvrPVR2D_BLITWSEGL.so.1.10.2359475
shared library libpvrPVR2D_FLIPWSEGL.so -> /usr/lib/libpvrPVR2D_FLIPWSEGL.so.1.10.2359475
shared library libpvrPVR2D_FRONTWSEGL.so -> /usr/lib/libpvrPVR2D_FRONTWSEGL.so.1.10.2359475
shared library libpvrPVR2D_LINUXFBWSEGL.so -> /usr/lib/libpvrPVR2D_LINUXFBWSEGL.so.1.10.2359475
shared library libsrv_um.so -> /usr/lib/libsrv_um.so.1.10.2359475
shared library libsrv_init.so -> /usr/lib/libsrv_init.so.1.10.2359475
shared library libPVRScopeServices.so -> /usr/lib/libPVRScopeServices.so.1.10.2359475
binary pvrsrvctl -> /usr/local/bin/pvrsrvctl
binary sgx_init_test -> /usr/local/bin/sgx_init_test
binary services_test -> /usr/local/bin/services_test
binary sgx_blit_test -> /usr/local/bin/sgx_blit_test
binary sgx_clipblit_test -> /usr/local/bin/sgx_clipblit_test
binary sgx_flip_test -> /usr/local/bin/sgx_flip_test
binary sgx_render_flip_test -> /usr/local/bin/sgx_render_flip_test
binary pvr2d_test -> /usr/local/bin/pvr2d_test
shader glsltest1_vertshader.txt -> /usr/local/bin/glsltest1_vertshader.txt
shader glsltest1_fragshaderA.txt -> /usr/local/bin/glsltest1_fragshaderA.txt
shader glsltest1_fragshaderB.txt -> /usr/local/bin/glsltest1_fragshaderB.txt

Installation complete!
You may now reboot your target.

/usr/local/bin/pvrsrvctl: SrvInit failed (already initialized?) (err=34)
root@dm814x:/opt/gfxsdkdemos# Connection closed by foreign host.
user@ubuntu:~$

  • Based on what I read in the forum, I tried to work with Graphics-SDK 4.08.00.02 (instead of the 4.10.00.01 ).
    I get the same failure.

    sharon

  • We now have Graphics-SDK 4.08.00.02 working with DVRRDK 4.0.0.3 .

    The steps that were found to work for us  are the following (seems that order is important):
    - Compile u-boot
    - Compile uImage
    - Compile modules
    - Install modules
    - Compile Graphics-SDK
    - Making SD-card(we boot from SD card at this state)
    - Compiling the DVR-RDK

    We compiled Graphics-SDK with : --es6.x FBDev=yes and X_ORG=0 all

    Boot arguments were set according to the Graphics-SDK quick installation guide (http://processors.wiki.ti.com/index.php/Graphics_SDK_Quick_installation_and_user_guide
    so for DM814x we set:
    mem=128M vram=50M ti814xfb.vram=0:48M,1:1M,2:1M

    step no. 1:  u-boot compilation

    change to the u-boot build dir:
    cd    /…/DVRRDK_4.00.00.03/ti_tools/linux_lsp/u-boot/uboot-dvr-rdk

    and make:
    make ARCH=arm CROSS_COMPILE=arm-arago-linux-gnueabi-   clean
    make ARCH=arm CROSS_COMPILE=arm-arago-linux-gnueabi-

    The result is a “u-boot.bin” file.

    We used a utility that “takes” MLO, u-boot, uImage & boot.scr and write them to SD card. Before this write it partitions the SD to have 2 partitions: “boot” & “rootfs”.

    It's possible at this stage to verify “mkimage” has been created. This file will be used in next step (kernel build). First thing is to change dir to

    /.../ti_tools/linux_lsp/uboot/u-boot-dvr-rdk/tools

    ls –l mkimage

    The “mkimage” is used by the kernel makefile during kernel build. it's path should be added to PATH.

    step no. 2: Kernel compilation

    do:

    cd    DVRRDK_04.00…/ti_tools/linux_lsp/kernel/linux-dvr-rdk

    make clean

    make ARCH=arm CROSS_COMPILE=arm-arago-linux-gnueabi- clean modules uImage

    Now change directory:

    cd arch/arm/boot

    Here you’ll find the “uImage” which is the compilation result.

    Next step is to install the modules:

    cd   DVRRDK_04.00…../ ti_tools/linux_lsp/kernel/linux-dvr-rdk

    make ARCH=arm CROSS_COMPILE=arm-arago-linux-gnueabi-  modules_install  INSTALL_MOD_PATH=/…/ DVRRDK_04.00…/target/rfs_814x

    the result is the following library :
    /.../rfs_814x/lib/modules/2.6.37/kernel

    step no. 3: Graphics-SDK compilation

    cd     /…/Graphics_SDK_4_08_00_02

    make clean

    make   BUILD=release   OMAPES=6.x   FBDEV=yes   SUPPORT_XORG=0    all

    make   BUILD=release   OMAPES=6.x   FBDEV=yes   SUPPORT_XORG=0    install

    Now you have 2 folders under “/.../DVRRDK_04.00…/target/rfs_814x/opt” :
    “gfxlibraries” and “gfxsdkdemos” .

    step no. 4: making SD-card to boot from

    build an SD having 2 partitions: Using the boot & kernel generated in former steps together with the content of rfs_814x/* as FHS :
    boot partition - in it MLO, uboot (built in step 1) & kernel  (built in step 2).
    rootfs partition - in it the file-system copied from  “/.../DVRRDK_04.00…/target/rfs_814x/”.

    Last thing to do is to copy “boot.scr” to the SD-card's boot partition. 

    step no. 5: Compiling DVR-RDK

    Now we need to compile the DVR-RDK to have the vpss & frame_buffer kernel modules.

    cd   /…/DVRRDK_04.00…./dvr_rdk
    make -s all

    We also need to change the “load.sh” script. This can be done by saving “/…/DVRRDK_04.00…./dvr_rdk /bin/ti814x/load.sh” as “load_SGX.sh” and edit it to change the line handling insmod of ti81xxfb.ko to be:
     insmod  ./kernelmod/ti81xxfb.ko  vram=0:48M, 1:1M, 2:1M

    Running the OpenGL demos

    - “cd” to DVRDK folder
    - execute “./init.sh” and after it “./load_SGX.sh” (this is the modified load).
    - change directory to: "/etc.init.d”
    - execute “./38xx-demo”
    - cd to  the OpenGL demos dir (in this case Open1.1) “/opt/gfxsdkdemos/ogles”
    - run one of the demos, say “./OGLESSkybox”