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.

SK-TDA4VM: [arago] opencl

Part Number: SK-TDA4VM

Not able to get opencl properly installed on latest Arago release.  What am I missing?

# strace clinfo
execve("/usr/bin/clinfo", ["clinfo"], 0xffffff6bbd30 /* 24 vars */) = 0
brk(NULL)                               = 0xb823000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xffff8eaf6000
faccessat(AT_FDCWD, "/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=16975, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 16975, PROT_READ, MAP_PRIVATE, 3, 0) = 0xffff8eaf1000
close(3)                                = 0
openat(AT_FDCWD, "/usr/lib/libOpenCL.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0\267\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=48472, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 177560, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xffff8ea95000
mmap(0xffff8eaa0000, 112024, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0xffff8eaa0000
munmap(0xffff8ea95000, 45056)           = 0
munmap(0xffff8eabc000, 17816)           = 0
mprotect(0xffff8eaab000, 61440, PROT_NONE) = 0
mmap(0xffff8eaba000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xa000) = 0xffff8eaba000
close(3)                                = 0
openat(AT_FDCWD, "/lib/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0\267\0\1\0\0\0@\264\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\4\0\0\0\24\0\0\0\3\0\0\0GNU\0<\264@\371\250\324\236\\\373\364&\337l\377\1\332"..., 68, 768) = 68
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1630088, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 1805328, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xffff8e8e7000
mmap(0xffff8e8f0000, 1739792, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0xffff8e8f0000
munmap(0xffff8e8e7000, 36864)           = 0
munmap(0xffff8ea99000, 27664)           = 0
mprotect(0xffff8ea77000, 65536, PROT_NONE) = 0
mmap(0xffff8ea87000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x187000) = 0xffff8ea87000
mmap(0xffff8ea8d000, 48144, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xffff8ea8d000
close(3)                                = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xffff8eaef000
set_tid_address(0xffff8eaef0f0)         = 18888
set_robust_list(0xffff8eaef100, 24)     = 0
rseq(0xffff8eaef7c0, 0x20, 0, 0xd428bc00) = 0
mprotect(0xffff8ea87000, 12288, PROT_READ) = 0
mprotect(0xffff8eaba000, 4096, PROT_READ) = 0
mprotect(0x425000, 4096, PROT_READ)     = 0
mprotect(0xffff8eafb000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0xffff8eaf1000, 16975)           = 0
openat(AT_FDCWD, "/etc/OpenCL/vendors", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
futex(0xffff8eabb590, FUTEX_WAKE_PRIVATE, 2147483647) = 0
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x4, 0x42), ...}, AT_EMPTY_PATH) = 0
ioctl(1, TCGETS, {B115200 opost isig icanon echo ...}) = 0
getrandom("\x9b\x7e\xcc\x13\xd8\x72\x38\x11", 8, GRND_NONBLOCK) = 8
brk(NULL)                               = 0xb823000
brk(0xb844000)                          = 0xb844000
write(1, "Number of platforms             "..., 52Number of platforms                               0
) = 52
exit_group(0)                           = ?
+++ exited with 0 +++

My config

#
# Localization
#
DEFAULT_TIMEZONE = "America/Los_Angeles"
ENABLE_BINARY_LOCALE_GENERATION = "1"
IMAGE_LINGUAS:append = " en-us en-gb es-us"
GLIBC_GENERATE_LOCALES:append = " en_US.UTF-8 es_US.UTF-8 en_GB.UTF-8"
IMAGE_INSTALL:append = "\
    tzdata-core \
    tzdata-americas \
    "

DISTRO_FEATURES:append = " opengl opencl wayland bluetooth"
DISTRO_FEATURES:remove = " x11 vulkan zeroconf wireless"
PACKAGECONFIG:append:pn-weston = " remoting"

IMAGE_INSTALL:append = " \
    k3conf \
    \
    ivi-homescreen \
    flutter-gallery \
    \
    opencl-icd-loader \
    libopencl-rogue \
    clinfo \
    libopencl-rogue-tools \
    ti-img-rogue-umlibs-tools \
    \
    optee-client \
    optee-test \
    optee-examples \
    \
    adwaita-icon-theme-cursors \
    liberation-fonts \
    geoclue \
    gsettings-desktop-schemas \
    \
    libcamera \
    libgpiod \
    libserialport \
    os-release \
    upower \
    xdg-user-dirs \
    xkeyboard-config \
    \
    libgpiod-tools \
    i2c-tools \
    spidev-test \
    can-utils \
    \
    bluez5 \
    bluez5-noinst-tools \
    bluez5-obex \
    bluez5-testtools \
    \
    weston \
    weston-init \
    \
    elfutils \
    "

IMAGE_FEATURES:remove = "splash"

#
# Selinux
#
DISTRO_FEATURES:append = " acl xattr pam selinux audit"
PREFERRED_PROVIDER_virtual/refpolicy = "refpolicy-mls"

#
# Security
#
DISTRO_FEATURES:append = " security seccomp"

#
# Virtualization
#
DISTRO_FEATURES:append = " virtualization kvm"
IMAGE_INSTALL:append = " \
    kvmtool dmidecode \
    firecracker jailer curl \
    "

DISTRO_FEATURES:append = " systemd"
DISTRO_FEATURES_BACKFILL_CONSIDERED += "sysvinit"
VIRTUAL-RUNTIME_init_manager = "systemd"
VIRTUAL-RUNTIME_initscripts = "systemd-compat-units"

Layer info

meta-arago-distro    
meta-arago-extras    
meta-arago-demos     = "HEAD:4d7741adb72c626d05b845867c72f157b64d5944"
meta-qt5             = "HEAD:bff5bd937f0776166e81a63f3dd39ede348ef758"
meta-virtualization  = "HEAD:b3b3dbc67504e8cd498d6db202ddcf5a9dd26a9d"
meta-networking      
meta-python          
meta-oe              
meta-gnome           
meta-filesystems     = "HEAD:346753705e49a2486867dc150181a1c7f4d69377"
meta-ti-extras       
meta-ti-bsp          = "HEAD:474af844b0e808f5401ab0b89e59d1ade39f3d16"
meta-arm             
meta-arm-toolchain   = "HEAD:c39bb4ce3b60b73d35c5fb06af012432e70d6b38"
meta                 = "HEAD:200c2783b3f8546f561382fff6bd5268680d403a"
meta-aws             = "HEAD:b72cb364f79aa055242e703e284900b23e61facd"
meta-psdkla          = "HEAD:4b85d0888c8e9fb9d708072cc6e9db33941ea1b2"
meta-perl            = "HEAD:346753705e49a2486867dc150181a1c7f4d69377"
meta-selinux         = "kirkstone:a401f4b2816a0b41ce8d9351542658c721935bcd"
meta-security        = "kirkstone:1a3e42cedbd94ca73be45800d0e902fec35d0f0f"
meta-flutter         = "kirkstone:7d8cf538802a12be9f60673b6e0210266dffcd07"

  • Joel,

    We have opencl enabled in the current release, but it is not stable at the moment. With limited testing, it will be difficult to provide the changes required at the moment.

    What configuration file did you use to initialize your Yocto environment?

    Regards,

    Erick

  • ./oe-layertool-setup.sh -f configs/processor-sdk-linux/processor-sdk-linux-09_00_00_07.txt

  • Joel,

    Thanks, I'll check with the development team on their current testing of the OpenCL feature and get back to you.

    Thanks,

    Erick

  • Joel,

    Just to give you an update. The team has enabled OpenCL, but they have been running into issues currently while running the OpenCL CTS, so it's safe to say it's still not a complete enabled just yet on the SDK.

    In the meanwhile I'm trying to get the same setup as you so I can test this and your other ticket on the graphics instability. I'm behind a proxy, so I keep running into issues pulling some of flutter's dependencies and in the compilation of flutter-engine, but hopefully I'll find a way around those to get to a good state to test on our TDA4x devices.

    Thanks,

    Erick

    FYI This is the compilation error I'm investigating while running  into on the compilation of the flutter-engine:

    | The compiler crashed: WebSocketException: Connection to 'http://127.0.0.1:39371/GAh-cZOn-eg=/ws#' was not upgraded t
    o websocket                                                
    | #0      _WebSocketImpl.connect (dart:_http/websocket_impl.dart:1011:41)                                             
    | #1      WebSocket.connect (dart:_http/websocket.dart:320:22)                             
    | #2      vmServiceConnectUri (package:vm_service/vm_service_io.dart:32:44)                          
    | #3      _currentHeapCapacity (package:compiler/src/common/ram_usage.dart:27:41)
    | <asynchronous suspension>
    | #4      currentHeapCapacityInMb (package:compiler/src/common/ram_usage.dart:38:20)
    | <asynchronous suspension>
    | #5      compile.compilationDone (package:compiler/src/dart2js.dart:886:12)
    | <asynchronous suspension>
    | #6      main (package:compiler/src/dart2js.dart:1241:3)
    | <asynchronous suspension>

  • Hi Erick,

    I have never seen this one.

    What version arago version and meta-flutter branch?  I'm on Fedora 38, and had to patch for rust clang compile issue I provide steps for in other issue.  Otherwise the local.conf appends to base arago build generate an image for me without error.  For Fedora 38 I am using INHERIT:remove = "uninative".

    No change to the flutter-engine package config?

  • Joel,

      1 meta-arago-distro = HEAD:4d7741adb72c626d05b845867c72f157b64d5944
      2 meta-arago-extras = HEAD:4d7741adb72c626d05b845867c72f157b64d5944
      3 meta-arago-demos  = HEAD:4d7741adb72c626d05b845867c72f157b64d5944
      4 meta-qt5          = HEAD:bff5bd937f0776166e81a63f3dd39ede348ef758
      5 meta-virtualization = HEAD:b3b3dbc67504e8cd498d6db202ddcf5a9dd26a9d
      6 meta-networking   = HEAD:346753705e49a2486867dc150181a1c7f4d69377
      7 meta-python       = HEAD:346753705e49a2486867dc150181a1c7f4d69377
      8 meta-oe           = HEAD:346753705e49a2486867dc150181a1c7f4d69377
      9 meta-gnome        = HEAD:346753705e49a2486867dc150181a1c7f4d69377
     10 meta-filesystems  = HEAD:346753705e49a2486867dc150181a1c7f4d69377
     11 meta-perl         = HEAD:346753705e49a2486867dc150181a1c7f4d69377
     12 meta-ti-extras    = HEAD:474af844b0e808f5401ab0b89e59d1ade39f3d16
     13 meta-ti-bsp       = HEAD:474af844b0e808f5401ab0b89e59d1ade39f3d16
     14 meta-arm          = HEAD:c39bb4ce3b60b73d35c5fb06af012432e70d6b38
     15 meta-arm-toolchain = HEAD:c39bb4ce3b60b73d35c5fb06af012432e70d6b38
     16 meta              = HEAD:200c2783b3f8546f561382fff6bd5268680d403a
     17 meta-aws          = HEAD:b72cb364f79aa055242e703e284900b23e61facd
     18 meta-psdkla       = HEAD:4b85d0888c8e9fb9d708072cc6e9db33941ea1b2
     19 meta-flutter      = HEAD:7d8cf538802a12be9f60673b6e0210266dffcd07 -- modified
     20 meta-selinux      = HEAD:a401f4b2816a0b41ce8d9351542658c721935bcd
     21 meta-security     = HEAD:1a3e42cedbd94ca73be45800d0e902fec35d0f0f

    No change to the flutter-engine package config?

    No, the only change I had to make was a bad SRCREV for the following:

    diff --git a/recipes-graphics/toyota/ivi-homescreen_git.bb b/recipes-graphics/toyota/ivi-homescreen_git.bb
    index f3c8fac..09c178b 100644
    --- a/recipes-graphics/toyota/ivi-homescreen_git.bb
    +++ b/recipes-graphics/toyota/ivi-homescreen_git.bb
    @@ -28,7 +28,7 @@ RDEPENDS:${PN} += "\
     
     REQUIRED_DISTRO_FEATURES = "wayland opengl"
     
    -SRCREV ??= "e961ec088a6d92276322ad7417cef1a32e8381a6"
    +SRCREV ??= "5c700accf2ce7171fb551f5b438e61b17ccc3920"

    - Erick

  • Tip of tree is currently at 5c700accf2ce7171fb551f5b438e61b17ccc3920, about to move again.  More churn in the next couple of weeks.

    That aside flutter-engine should just build.  What OS+version are you building on?

  • Joel,

    What OS+version are you building on?

    Ubuntu 22.04.

    Whenever I see anything related to networking, I'm hesitant to think it's related to our corporate network proxy, although this issue seems related to my machine's localhost. I'll give it a try building outside the network and see if there's a difference.

    Thanks,

    Erick

  • Joel,

    I've managed to work around it by connecting the PC through an external network. It's not a viable solution for the future but it worked for the moment.

    FYI This is the compilation error I'm investigating while running  into on the compilation of the flutter-engine:

    This answer seems to point to the solution: https://stackoverflow.com/questions/73778989/flutter-build-web-fails-with-the-compiler-crashed-websocketexception-connectio

    In my case, I only have no_proxy set, I believe I need the capitalized version NO_PROXY as well, I'll give it a try, then I can move a long with testing.

    Thanks,

    Erick

  • Interesting.  I found a recent Flutter issue where NO_PROXY was required.  The example I saw also included IPV6:

    export NO_PROXY="localhost,127.0.0.1,::1"

    I'll add this setting to meta-flutter.  Thanks for digging into this.

  • NO_PROXY support merged to kirkstone branch.
    github.com/.../342

  • Joel,

    Looks like that worked, build is going farther now. Should get an image to test.

    Thanks,

    Erick

  • Joel,

    This thread got locked, but re-opening it to check that you were able to get it working.

    Currently, I was able to get OpenCL built and validated it was working on GPU. The team made updates to support this, please let me know if you still need support.

    Thanks,

    Erick