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.

PROCESSOR-SDK-TDAX: [TDA4] RTOS+Linux demos mmap failure

Part Number: PROCESSOR-SDK-TDAX


Hello,

When running the single camera demo (vx_app_single_cam.out ) on the J721e EVM board, the following error occurs after mmap:
Operation not permitted: Operation not permitted

After reading about the issue, I found out there is a Linux kernel flag called strict-devmem, which prevents the user from reading /dev/mem.
I am using the kernel, provided from the tisdk-rootfs-image-j7-evm tar from the release.
Is there a possibility that the provided kernel has been compiled with that flag set to true?

This is the log of the single cam demo application (with more verbose prints added for debug purposes).
APP: Init ... !!!
APP_LOG: Mapping 0xb8000000 ...
INITIAL: 3087007744
INITIAL SIZE: 262144
AFTER: 3087007744
AFTER SIZE: 262144
Operation not permitted: Operation not permitted
0xffffffffffffffff
(nil)APP_LOG: Mapped 0xb8000000 -> (nil) of size 262144 bytes
APP_LOG: ERROR: Unable to map memory @ 0xb8000000 of size 262144 bytes !!!
APP: ERROR: Log writer init failed !!!

Best Regards,
Todor

  • Hi Todor,

    you can run:

    zcat /proc/config.gz | grep CONFIG_STRICT_DEVMEM

    to check if this flag is enabled in your kernel.

    You should be able to disable it by adding "strict-devmem=0" in the kernel cmdline.

    Can you try this and see if it works for you?

    Regards,

    Yordan

  • hi Todor,

    I am pretty certain strict-devmem flag is not enabled since we have tried it and also some other customers have tried it.

    But still try the steps mentioned by Yordan.

    I suspect some permissions issue when the filesystem was copied to the SD card.

     

    regards
    Kedar

  • Hello,

    After running the command Yordan suggested, it turned out that the kernel was compiled with that flag set to true.
    The output was:
    CONFIG_STRICT_DEVMEM=y

    Next I stopped the boot process, added strict-devmem=0 to the kernel cmdline, after booting I checked the cmdline with:
    cat /proc/cmdline

    and the parameter was there. But it had no effect and /dev/mem is still restricted.
    I tried setting the parameter to "n", but it had no effect as well.

    Regards,
    Todor

  • Todor,

    The issue is due to specific needed dtbo's not getting loaded as expected.

    To run the demos from vision_apps, a different set of dtbo needs to be used as part of uEnv.txt

    This uEnv.txt is copied when below is done as mentioned in the user guide

    make linux_fs_install_sd

    Make sure all steps mentioned here vision_apps/docs/user_guide/RUN_INSTRUCTIONS.html are followed.

    If this doesn't help, send me the log right from start of boot.

    Also send me the uEnv.txt that you see in your SD card

    regards
    Kedar