Hi , how to add gpuinfo and gputop support for imx8mqevk with yacto build environment, iam using 4.19.35 linux kernel.
Regards
Mani
May be you can try below line in $BUILD/conf/local.conf file
CORE_IMAGE_EXTRA_INSTALL += "imx-test gputop "
-Manish
Hi Manish,
I am facing do_compile issue with gputop, added in local.conf as you suggested but same issue. Here are the logs:
ERROR: gputop-1.4.0-r0 do_compile: Function failed: do_compile (log file is located at /home/vipulkumar/platform/AGL_Master/build/tmp/work/aarch64-agl-linux/gputop/1.4.0-r0/temp/log.do_compile.6023)
ERROR: Logfile of failure stored in: /home/vipulkumar/platform/AGL_Master/build/tmp/work/aarch64-agl-linux/gputop/1.4.0-r0/temp/log.do_compile.6023
Log data follows:
| DEBUG: Executing shell function do_compile
| NOTE: VERBOSE=1 cmake --build /home/vipulkumar/platform/AGL_Master/build/tmp/work/aarch64-agl-linux/gputop/1.4.0-r0/build --target all -- -j 8
| [1/3] /home/vipulkumar/platform/AGL_Master/build/tmp/work/aarch64-agl-linux/gputop/1.4.0-r0/recipe-sysroot-native/usr/bin/aarch64-agl-linux/aarch64-agl-linux-gcc -DGIT_SHA=149973a467e4 -DHAVE_DDR_PERF=1 -D_FORTIFY_SOURCE=2 -D_POSIX_C_SOURCE=200809L -I/home/vipulkumar/platform/AGL_Master/build/tmp/work/aarch64-agl-linux/gputop/1.4.0-r0/recipe-sysroot/usr/include -fstack-protector-strong -D_FORTIFY_SOURCE=0 -Wformat -Wformat-security -Werror=format-security --sysroot=/home/vipulkumar/platform/AGL_Master/build/tmp/work/aarch64-agl-linux/gputop/1.4.0-r0/recipe-sysroot -O2 -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=/home/vipulkumar/platform/AGL_Master/build/tmp/work/aarch64-agl-linux/gputop/1.4.0-r0=/usr/src/debug/gputop/1.4.0-r0 -fdebug-prefix-map=/home/vipulkumar/platform/AGL_Master/build/tmp/work/aarch64-agl-linux/gputop/1.4.0-r0/recipe-sysroot= -fdebug-prefix-map=/home/vipulkumar/platform/AGL_Master/build/tmp/work/aarch64-agl-linux/gputop/1.4.0-r0/recipe-sysroot-native= -fstack-protector-strong -D_FORTIFY_SOURCE=0 -Wformat -Wformat-security -Werror=format-security --sysroot=/home/vipulkumar/platform/AGL_Master/build/tmp/work/aarch64-agl-linux/gputop/1.4.0-r0/recipe-sysroot -fPIC -Wall -Wextra -Werror -Wstrict-prototypes -Wmissing-prototypes -std=c99 -O2 -MD -MT CMakeFiles/gputop.dir/gputop/debugfs.c.o -MF CMakeFiles/gputop.dir/gputop/debugfs.c.o.d -o CMakeFiles/gputop.dir/gputop/debugfs.c.o -c /home/vipulkumar/platform/AGL_Master/build/tmp/work/aarch64-agl-linux/gputop/1.4.0-r0/git/gputop/debugfs.c
| FAILED: CMakeFiles/gputop.dir/gputop/debugfs.c.o
| /home/vipulkumar/platform/AGL_Master/build/tmp/work/aarch64-agl-linux/gputop/1.4.0-r0/recipe-sysroot-native/usr/bin/aarch64-agl-linux/aarch64-agl-linux-gcc -DGIT_SHA=149973a467e4 -DHAVE_DDR_PERF=1 -D_FORTIFY_SOURCE=2 -D_POSIX_C_SOURCE=200809L -I/home/vipulkumar/platform/AGL_Master/build/tmp/work/aarch64-agl-linux/gputop/1.4.0-r0/recipe-sysroot/usr/include -fstack-protector-strong -D_FORTIFY_SOURCE=0 -Wformat -Wformat-security -Werror=format-security --sysroot=/home/vipulkumar/platform/AGL_Master/build/tmp/work/aarch64-agl-linux/gputop/1.4.0-r0/recipe-sysroot -O2 -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=/home/vipulkumar/platform/AGL_Master/build/tmp/work/aarch64-agl-linux/gputop/1.4.0-r0=/usr/src/debug/gputop/1.4.0-r0 -fdebug-prefix-map=/home/vipulkumar/platform/AGL_Master/build/tmp/work/aarch64-agl-linux/gputop/1.4.0-r0/recipe-sysroot= -fdebug-prefix-map=/home/vipulkumar/platform/AGL_Master/build/tmp/work/aarch64-agl-linux/gputop/1.4.0-r0/recipe-sysroot-native= -fstack-protector-strong -D_FORTIFY_SOURCE=0 -Wformat -Wformat-security -Werror=format-security --sysroot=/home/vipulkumar/platform/AGL_Master/build/tmp/work/aarch64-agl-linux/gputop/1.4.0-r0/recipe-sysroot -fPIC -Wall -Wextra -Werror -Wstrict-prototypes -Wmissing-prototypes -std=c99 -O2 -MD -MT CMakeFiles/gputop.dir/gputop/debugfs.c.o -MF CMakeFiles/gputop.dir/gputop/debugfs.c.o.d -o CMakeFiles/gputop.dir/gputop/debugfs.c.o -c /home/vipulkumar/platform/AGL_Master/build/tmp/work/aarch64-agl-linux/gputop/1.4.0-r0/git/gputop/debugfs.c
| <command-line>: error: "_FORTIFY_SOURCE" redefined [-Werror]
| <command-line>: note: this is the location of the previous definition
| cc1: all warnings being treated as errors
| [2/3] /home/vipulkumar/platform/AGL_Master/build/tmp/work/aarch64-agl-linux/gputop/1.4.0-r0/recipe-sysroot-native/usr/bin/aarch64-agl-linux/aarch64-agl-linux-gcc -DGIT_SHA=149973a467e4 -DHAVE_DDR_PERF=1 -D_FORTIFY_SOURCE=2 -D_POSIX_C_SOURCE=200809L -I/home/vipulkumar/platform/AGL_Master/build/tmp/work/aarch64-agl-linux/gputop/1.4.0-r0/recipe-sysroot/usr/include -fstack-protector-strong -D_FORTIFY_SOURCE=0 -Wformat -Wformat-security -Werror=format-security --sysroot=/home/vipulkumar/platform/AGL_Master/build/tmp/work/aarch64-agl-linux/gputop/1.4.0-r0/recipe-sysroot -O2 -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=/home/vipulkumar/platform/AGL_Master/build/tmp/work/aarch64-agl-linux/gputop/1.4.0-r0=/usr/src/debug/gputop/1.4.0-r0 -fdebug-prefix-map=/home/vipulkumar/platform/AGL_Master/build/tmp/work/aarch64-agl-linux/gputop/1.4.0-r0/recipe-sysroot= -fdebug-prefix-map=/home/vipulkumar/platform/AGL_Master/build/tmp/work/aarch64-agl-linux/gputop/1.4.0-r0/recipe-sysroot-native= -fstack-protector-strong -D_FORTIFY_SOURCE=0 -Wformat -Wformat-security -Werror=format-security --sysroot=/home/vipulkumar/platform/AGL_Master/build/tmp/work/aarch64-agl-linux/gputop/1.4.0-r0/recipe-sysroot -fPIC -Wall -Wextra -Werror -Wstrict-prototypes -Wmissing-prototypes -std=c99 -O2 -MD -MT CMakeFiles/gputop.dir/gputop/top.c.o -MF CMakeFiles/gputop.dir/gputop/top.c.o.d -o CMakeFiles/gputop.dir/gputop/top.c.o -c /home/vipulkumar/platform/AGL_Master/build/tmp/work/aarch64-agl-linux/gputop/1.4.0-r0/git/gputop/top.c
| FAILED: CMakeFiles/gputop.dir/gputop/top.c.o
| /home/vipulkumar/platform/AGL_Master/build/tmp/work/aarch64-agl-linux/gputop/1.4.0-r0/recipe-sysroot-native/usr/bin/aarch64-agl-linux/aarch64-agl-linux-gcc -DGIT_SHA=149973a467e4 -DHAVE_DDR_PERF=1 -D_FORTIFY_SOURCE=2 -D_POSIX_C_SOURCE=200809L -I/home/vipulkumar/platform/AGL_Master/build/tmp/work/aarch64-agl-linux/gputop/1.4.0-r0/recipe-sysroot/usr/include -fstack-protector-strong -D_FORTIFY_SOURCE=0 -Wformat -Wformat-security -Werror=format-security --sysroot=/home/vipulkumar/platform/AGL_Master/build/tmp/work/aarch64-agl-linux/gputop/1.4.0-r0/recipe-sysroot -O2 -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=/home/vipulkumar/platform/AGL_Master/build/tmp/work/aarch64-agl-linux/gputop/1.4.0-r0=/usr/src/debug/gputop/1.4.0-r0 -fdebug-prefix-map=/home/vipulkumar/platform/AGL_Master/build/tmp/work/aarch64-agl-linux/gputop/1.4.0-r0/recipe-sysroot= -fdebug-prefix-map=/home/vipulkumar/platform/AGL_Master/build/tmp/work/aarch64-agl-linux/gputop/1.4.0-r0/recipe-sysroot-native= -fstack-protector-strong -D_FORTIFY_SOURCE=0 -Wformat -Wformat-security -Werror=format-security --sysroot=/home/vipulkumar/platform/AGL_Master/build/tmp/work/aarch64-agl-linux/gputop/1.4.0-r0/recipe-sysroot -fPIC -Wall -Wextra -Werror -Wstrict-prototypes -Wmissing-prototypes -std=c99 -O2 -MD -MT CMakeFiles/gputop.dir/gputop/top.c.o -MF CMakeFiles/gputop.dir/gputop/top.c.o.d -o CMakeFiles/gputop.dir/gputop/top.c.o -c /home/vipulkumar/platform/AGL_Master/build/tmp/work/aarch64-agl-linux/gputop/1.4.0-r0/git/gputop/top.c
| <command-line>: error: "_FORTIFY_SOURCE" redefined [-Werror]
| <command-line>: note: this is the location of the previous definition
| /home/vipulkumar/platform/AGL_Master/build/tmp/work/aarch64-agl-linux/gputop/1.4.0-r0/git/gputop/top.c: In function 'gtop_retrieve_perf_counters':
| /home/vipulkumar/platform/AGL_Master/build/tmp/work/aarch64-agl-linux/gputop/1.4.0-r0/git/gputop/top.c:1894:18: error: format not a string literal and no format arguments [-Werror=format-security]
| fprintf(stdout, clear_screen);
| ^~~~~~~~~~~~
| cc1: all warnings being treated as errors
| ninja: build stopped: subcommand failed.
| WARNING: exit code 1 from a shell command.
| ERROR: Function failed: do_compile (log file is located at /home/vipulkumar/platform/AGL_Master/build/tmp/work/aarch64-agl-linux/gputop/1.4.0-r0/temp/log.do_compile.6023)
ERROR: Task (/home/vipulkumar/platform/AGL_Master/bsp/meta-fsl-bsp-release/imx/meta-sdk/recipes-graphics/libgpuperfcnt/gputop_1.4.0.bb:do_compile) failed with exit code '1'
NOTE: Tasks Summary: Attempted 2011 tasks of which 2003 didn't need to be rerun and 1 failed.
Summary: 1 task failed:
/home/vipulkumar/platform/AGL_Master/bsp/meta-fsl-bsp-release/imx/meta-sdk/recipes-graphics/libgpuperfcnt/gputop_1.4.0.bb:do_compile
Hi vsuneja63@gmail.com, can you, please, share which is the operating system you have installed on your host machine?
I have Ubuntu 18.04 and I was able to build gputop from BSP 5.4 with success, but I might try some other variation
Hi Manish,
Thanks!
Prepared the patch to remove "FORTIFY_SOURCE" from CMakeLists.txt. I didn't find the file attach option so adding the content of patch file.
Please help check the log and provide your feedback.
It should be enabled in default image.
Check the path /unit_tests/GPU/gpuinfo.sh.
-Manish
Hi Manish,
I am unable to find /unit_tests/GPU/gpuinfo.s in my build. Is there any thing to be added in local.conf file to add this in the build ?
Regards
Mani
Hi Manivannan s,
You need to add the below line to your local.conf and rebuild the image. You can then get finale rootfs included with the unit-tests.
IMAGE_INSTALL_append = "imx-test"
Regards,
Radhika Somaiya
Hi Radhika,
This info was helpfull, the build is happening when added IMAGE_iNSTALL_append = "imx-test" in local.conf. I can see the imx-test folder generating in build directory. But its not getting copied into the target image, have to manually copy it. Is there some thing to be done for copying these build into target image automatically ?