Ticket Name: Linux/TDA2: TDA2xx/linux CMEM Error Query Text: Part Number: TDA2 Tool/software: Linux i run a opencl usecase, my MAKECONFIG?= tda2xx_evm_linux_opencx,The following error occurred: CMEM Error: init: Failed to open /dev/cmem: 'No such file or directory' TIOCL FATAL: The cmemk kernel module is not installed I noticed that when my MAKECONFIG?= tda2xx_evm_linux_opencx ,there is no file generated in /vision_sdk/binaries/apps/tda2xx_evm_linux_opencx/hlos/linux/boot. Is this CMEM Error caused by this reason? Responses: Hi, did you followed "vision_sdk/docs/FeatureSpecificUserGuides/VisionSDK_UserGuide_opencx.pdf"? There is a chapter about installing cmem module. Regards, Yordan Hi Yordan, I follow the documentation, “In the above wiki, refer to the ‘Build Environment Setup’ and ‘Building Test Binaries’ sections to set up the build environment to build cmem user and kernel modules.” I follow the link processors.wiki.ti.com/.../CMEM_Overview , and i have down the linuxutils_4_00_01_08.tar.gz . and i cd linuxutils_4_00_01_08/src/cmem/module; and make . An error occurred: Making module release... make -C /db/atree/rt/git/linux-davinci M=`pwd` ARCH= CROSS_COMPILE=/cs/arm/arm-2010q1/bin/arm-none-linux-gnueabi- \ EXTRA_CFLAGS="-I /home/hancan/linuxutils_4_00_01_08/include" modules make: *** /db/atree/rt/git/linux-davinci: No such file or directory. Stop. make: *** [release] Error 2 Is my procedure correct? thanks, Xie Baojian Hi Xie Baojian, Please check chapter "2.4.2.1.1 Clone kernel" in vision_sdk/docs/Linux/VisionSDK_Linux_UserGuide.pdf for instructions how to clone cmem and which tag to checkout. For the error I suspect you didn't export KERNEL_INSTALL_DIR variable which should point to your kernel tree. Regards, Yordan Hi Yordan, I have done the chapter 2.4.2.1.1, and what should i do to export KERNEL_INSTALL_DIR variable point to my kernel tree? Regards, Xie Baojian Hi Xie Baojian, before running make command can you run this command: export KERNEL_INSTALL_DIR="$INSTALL_DIR/ti_components/os_tools/linux/kernel" Regards, Yordan Hi Yordan, I have done export KERNEL_INSTALL_DIR="$INSTALL_DIR/ti_components/os_tools/linux/kernel". and i cd /home/hancan/linuxutils_4_00_01_08/src/cmem/module to run make; But it still can not compile success. the info is: hancan@hancan-virtual-machine:~/linuxutils_4_00_01_08/src/cmem/module$ make Making module release... make -C /home/hancan/PROCESSOR_SDK_VISION_03_02_00_00/ti_components/os_tools/linux/kernel M=`pwd` ARCH= CROSS_COMPILE=/cs/arm/arm-2010q1/bin/arm-none-linux-gnueabi- \ EXTRA_CFLAGS="-I /home/hancan/linuxutils_4_00_01_08/include" modules make[1]: Entering directory `/home/hancan/PROCESSOR_SDK_VISION_03_02_00_00/ti_components/os_tools/linux/kernel' make[1]: *** No rule to make target `modules'. Stop. make[1]: Leaving directory `/home/hancan/PROCESSOR_SDK_VISION_03_02_00_00/ti_components/os_tools/linux/kernel' make: *** [release] Error 2 Do I have other needs to do? Regards, Xie Baojian Hi Xie Baujian, My bad - the kernel is in "omap" subdirectory. Can you try with: export KERNEL_INSTALL_DIR="$INSTALL_DIR/ti_components/os_tools/linux/kernel/omap" Regards, Yordan Hi Yordan, I have done export KERNEL_INSTALL_DIR="$INSTALL_DIR/ti_components/os_tools/linux/kernel/omap". the info is: hancan@hancan-virtual-machine:~/linuxutils_4_00_01_08/src/cmem/module$ make Making module release... make -C /home/hancan/PROCESSOR_SDK_VISION_03_02_00_00/ti_components/os_tools/linux/kernel/omap M=`pwd` ARCH=arm CROSS_COMPILE=/cs/arm/arm-2010q1/bin/arm-none-linux-gnueabi- \ EXTRA_CFLAGS="-I /home/hancan/linuxutils_4_00_01_08/include" modules make[1]: /cs/arm/arm-2010q1/bin/arm-none-linux-gnueabi-gcc: Command not found make[1]: Entering directory `/home/hancan/PROCESSOR_SDK_VISION_03_02_00_00/ti_components/os_tools/linux/kernel/omap' CC [M] /home/hancan/linuxutils_4_00_01_08/src/cmem/module/cmemk.o /bin/sh: 1: /cs/arm/arm-2010q1/bin/arm-none-linux-gnueabi-gcc: not found make[2]: *** [/home/hancan/linuxutils_4_00_01_08/src/cmem/module/cmemk.o] Error 127 make[1]: *** [_module_/home/hancan/linuxutils_4_00_01_08/src/cmem/module] Error 2 make[1]: Leaving directory `/home/hancan/PROCESSOR_SDK_VISION_03_02_00_00/ti_components/os_tools/linux/kernel/omap' make: *** [release] Error 2 Regards, Xie Baojian Hi Xie Baojian, can you also export: export TOOLCHAIN_PREFIX=arm-linux-gnueabihf- export PATH="$PATH:$INSTALL_DIR/ti_components/os_tools/linux/linaro/gcc-linaro-5.3-2016.02-x86_64_arm-linux-gnueabihf/bin" Regards, Yordan Hi Yordan, I have try that, but it seems i do not have /arch//Makefile file. the info is : hancan@hancan-virtual-machine:~/linuxutils_4_00_01_08/src/cmem/module$ make Making module release... make -C /home/hancan/PROCESSOR_SDK_VISION_03_02_00_00/ti_components/os_tools/linux/kernel/omap M=`pwd` ARCH= CROSS_COMPILE=arm-linux-gnueabihf- \ EXTRA_CFLAGS="-I /home/hancan/linuxutils_4_00_01_08/include" modules make[1]: Entering directory `/home/hancan/PROCESSOR_SDK_VISION_03_02_00_00/ti_components/os_tools/linux/kernel/omap' Makefile:617: arch//Makefile: No such file or directory make[1]: *** No rule to make target `arch//Makefile'. Stop. make[1]: Leaving directory `/home/hancan/PROCESSOR_SDK_VISION_03_02_00_00/ti_components/os_tools/linux/kernel/omap' make: *** [release] Error 2 Thanks, Xie Baojian Hi Xie Baojian, can you also export: export ARCH=arm Regards, Yordan Hi Yordan, I have the last question. the compile error info is: CC [M] /home/hancan/linuxutils_4_00_01_08/src/cmem/module/cmemk.o /home/hancan/linuxutils_4_00_01_08/src/cmem/module/cmemk.c: In function 'cmem_seq_show': /home/hancan/linuxutils_4_00_01_08/src/cmem/module/cmemk.c:988:5: error: void value not ignored as it ought to be rv = seq_printf(s, "id %d: phys addr %#llx\n", entry->id, ^ /home/hancan/linuxutils_4_00_01_08/src/cmem/module/cmemk.c: In function 'ioctl': /home/hancan/linuxutils_4_00_01_08/src/cmem/module/cmemk.c:1425:8: error: implicit declaration of function 'dmac_map_area' [-Werror=implicit-function-declaration] dmac_map_area(virtp, size, DMA_FROM_DEVICE); ^ When I commented the function seq_printf and dmac_map_area, it can compile successfully. Is the version I downloaded wrong? Or other issues. My version is linuxutils_4_00_01_08. Regards, Xie Baojian Hi Xie Baojian, you need to clone cmem from git and checkout a particular tag (VisionSDK_Linux_UserGuide.pdf - "2.4.2.1.1 Clone kernel"): cd $INSTALL_DIR/ti_components/os_tools/linux/kernel/cmem git clone git://git.ti.com/ipc/ludev.git cd ludev/ git checkout -b cmem_dev d6d3e84 Or git checkout tags/4.12.00.00 Regards, Yordan HI Yordan, I've done above before, Another method, Can you help me compile this source code in your linux environment? and Give me a successful target code of cmem.ko. linuxutils_4_00_01_08.tar.gz Regards, Xie Baojian Hi Xie Baojian, this version of cmem look older and probably will not work with the VisionSDK. Please download cmem from git and checkout the appropriate version as described in the User Guide. Regards, Yordan