gpuinfo and gputop support for imx8mqevk

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

gpuinfo and gputop support for imx8mqevk

4,666 Views
manizillion
Contributor IV

Hi , how to add gpuinfo and gputop support for imx8mqevk with yacto build environment, iam using 4.19.35 linux kernel.

Regards

Mani

Labels (1)
11 Replies

4,083 Views
manish_bajaj
NXP Employee
NXP Employee

manizillion@gmail.com‌,

May be you can try below line in  $BUILD/conf/local.conf file

CORE_IMAGE_EXTRA_INSTALL += "imx-test gputop "

-Manish

4,083 Views
vsuneja63
Contributor III

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

0 Kudos

4,083 Views
daiane_angolini
NXP Employee
NXP Employee

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

0 Kudos

4,083 Views
vsuneja63
Contributor III

Hi,

Thanks for support!

I could resolve the issue by attaching patch.

Thanks & Regards,

Vipul Kumar 

4,083 Views
manish_bajaj
NXP Employee
NXP Employee

vsuneja63@gmail.com

Please attach patch for other reference.

-Manish

0 Kudos

4,083 Views
vsuneja63
Contributor III

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.

From: "Vipul Suneja" <vsuneja63@gmail.com>
Date: Tue, 24 July 2020 23:15:34
Subject: [PATCH] disable -D_FORTIFY_SOURCE
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2a9bde2..db37f38 100644
--- CMakeLists.txt 2020-07-24 21:23:34.656554304 +0530
+++ CMakeLists.txt 2020-07-24 23:04:57.692606037 +0530
@@ -99,8 +99,7 @@
 if (ENABLE_DEBUG)
  add_definitions(-DUSE_DEBUG=1)
  SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O0 -g3 -ggdb3")
-else()
- add_definitions(-D_FORTIFY_SOURCE=2)
+
 endif()
 
 add_executable(gputop gputop/top.c gputop/debugfs.c)

4,083 Views
manish_bajaj
NXP Employee
NXP Employee

DaianeAngolini‌,

Please help check the log and provide your feedback.

4,083 Views
manish_bajaj
NXP Employee
NXP Employee

manizillion@gmail.com‌,

It should be enabled in  default image.

Check the path /unit_tests/GPU/gpuinfo.sh.

-Manish

0 Kudos

4,083 Views
manizillion
Contributor IV

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

0 Kudos

4,083 Views
radhikasomaiya
Senior Contributor II

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

4,083 Views
manizillion
Contributor IV

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 ?

0 Kudos