Hi team,
I have a Apalis i.MX8QM SOM with ixora v1.3 carrier board. I created a Yocto build linux with the
tdx-reference-multimedia-image.
Packages i have additionally added in the local.conf
CORE_IMAGE_EXTRA_INSTALL += "curl"
CORE_IMAGE_EXTRA_INSTALL += "git"
CORE_IMAGE_EXTRA_INSTALL += "bash"
CORE_IMAGE_EXTRA_INSTALL += "python3-pip"
CORE_IMAGE_EXTRA_INSTALL += "rsync"
CORE_IMAGE_EXTRA_INSTALL += "glibc-utils"
CORE_IMAGE_EXTRA_INSTALL += "zip"
CORE_IMAGE_EXTRA_INSTALL += "make"
CORE_IMAGE_EXTRA_INSTALL += "cmake"
CORE_IMAGE_EXTRA_INSTALL += "gcc"
CORE_IMAGE_EXTRA_INSTALL += "file"
CORE_IMAGE_EXTRA_INSTALL += "ninja"
CORE_IMAGE_EXTRA_INSTALL += "clang"
CORE_IMAGE_EXTRA_INSTALL += "pkgconfig"
CORE_IMAGE_EXTRA_INSTALL += "gtk+3-dev"
CORE_IMAGE_EXTRA_INSTALL += "gtk+3"
CORE_IMAGE_EXTRA_INSTALL += "pango"
CORE_IMAGE_EXTRA_INSTALL += "autoconf automake libtool"
CORE_IMAGE_EXTRA_INSTALL += "python3-pip"
CORE_IMAGE_EXTRA_INSTALL += "meson"
CORE_IMAGE_EXTRA_INSTALL += "glib-2.0"
CORE_IMAGE_EXTRA_INSTALL += "bison"
CORE_IMAGE_EXTRA_INSTALL += "flex"
CORE_IMAGE_EXTRA_INSTALL += "packagegroup-core-buildessential"
CORE_IMAGE_EXTRA_INSTALL += "libgpiod libgpiod-tools libgpiod-dev"
CORE_IMAGE_EXTRA_INSTALL += "wayland-protocols"
CORE_IMAGE_EXTRA_INSTALL += "libclc-imx"
CORE_IMAGE_EXTRA_INSTALL += "libclc-imx-dev"
CORE_IMAGE_EXTRA_INSTALL += "libgles1-imx"
CORE_IMAGE_EXTRA_INSTALL += "libgles1-imx-dev"
CORE_IMAGE_EXTRA_INSTALL += "libgles2-imx"
CORE_IMAGE_EXTRA_INSTALL += "libgles2-imx-dev"
CORE_IMAGE_EXTRA_INSTALL += "libgles3-imx-dev"
CORE_IMAGE_EXTRA_INSTALL += "libglslc-imx"
CORE_IMAGE_EXTRA_INSTALL += "libopencl-imx"
CORE_IMAGE_EXTRA_INSTALL += "libegl-imx"
CORE_IMAGE_EXTRA_INSTALL += "libegl-imx-dev"
CORE_IMAGE_EXTRA_INSTALL += "libgal-imx"
CORE_IMAGE_EXTRA_INSTALL += "libgal-imx-dev"
CORE_IMAGE_EXTRA_INSTALL += "libvsc-imx"
CORE_IMAGE_EXTRA_INSTALL += "libgbm-imx"
CORE_IMAGE_EXTRA_INSTALL += "libgbm-imx-dev"
CORE_IMAGE_EXTRA_INSTALL += "libvulkan-imx"
CORE_IMAGE_EXTRA_INSTALL += "libopenvx-imx"
CORE_IMAGE_EXTRA_INSTALL += "libopenvx-imx-dev"
CORE_IMAGE_EXTRA_INSTALL += "libnn-imx"
CORE_IMAGE_EXTRA_INSTALL += "imx-gpu-viv-tools"
CORE_IMAGE_EXTRA_INSTALL += "apitrace"
CORE_IMAGE_EXTRA_INSTALL += "cmake"
CORE_IMAGE_EXTRA_INSTALL += "compiler-rt-dev"
CORE_IMAGE_EXTRA_INSTALL += "libcxx-dev"
CORE_IMAGE_EXTRA_INSTALL += "ca-certificates"
CORE_IMAGE_EXTRA_INSTALL += "atk"
CORE_IMAGE_EXTRA_INSTALL += "cairo-dev"
CORE_IMAGE_EXTRA_INSTALL += "fontconfig"
CORE_IMAGE_EXTRA_INSTALL += "libdrm-dev"
CORE_IMAGE_EXTRA_INSTALL += "libxkbcommon"
CORE_IMAGE_EXTRA_INSTALL += "perl"
CORE_IMAGE_EXTRA_INSTALL += "perl-modules"
CORE_IMAGE_EXTRA_INSTALL += "unzip"
CORE_IMAGE_EXTRA_INSTALL += "gtk4-dev"
CORE_IMAGE_EXTRA_INSTALL += "upower-dev"
CORE_IMAGE_EXTRA_INSTALL += "xdg-user-dirs"
CORE_IMAGE_EXTRA_INSTALL += "weston"
CORE_IMAGE_EXTRA_INSTALL += "weston-launch"
CORE_IMAGE_EXTRA_INSTALL += "weston-init"
CORE_IMAGE_EXTRA_INSTALL += "wayland-utils"
DISTRO_FEATURES += "systemd wayland vulkan opengl opengles2 egl gles gles2"
When i ran the below below program, i got the error related to opengl. But there is a blank white screen window is showing in the display with a text ‘No GL implementation is available’
Program:
root@apalis-imx8-07307228:~/opengl# cat gtk_gl_test.c
#include <gtk/gtk.h>
#include <epoxy/gl.h>
#include <epoxy/egl.h>
static void on_realize(GtkGLArea *area) {
gtk_gl_area_make_current(area);
if (gtk_gl_area_get_error(area) != NULL) {
printf("Failed to create GL context\n");
return;
}
printf("GL Version: %s\n", glGetString(GL_VERSION));
}
static void activate(GtkApplication *app, gpointer user_data) {
GtkWidget *window = gtk_application_window_new(app);
GtkWidget *gl_area = gtk_gl_area_new();
gtk_gl_area_set_use_es(GTK_GL_AREA(gl_area), TRUE); // Use OpenGL ES
gtk_gl_area_set_required_version(GTK_GL_AREA(gl_area), 3, 2); // Require OpenGL ES 3.2
g_signal_connect(gl_area, "realize", G_CALLBACK(on_realize), NULL);
gtk_container_add(GTK_CONTAINER(window), gl_area);
gtk_widget_show_all(window);
}
int main(int argc, char **argv) {
GtkApplication *app = gtk_application_new("org.gtk.example", G_APPLICATION_FLAGS_NONE);
g_signal_connect(app, "activate", G_CALLBACK(activate), NULL);
int status = g_application_run(G_APPLICATION(app), argc, argv);
g_object_unref(app);
return status;
}
Error:
root@apalis-imx8-07307228:~/opengl# gcc -o gtk_gl_test gtk_gl_test.c $(pkg-config --cflags --libs gtk+-3.0 epoxy)
root@apalis-imx8-07307228:~/opengl# ./gtk_gl_test
Failed to create GL context
^C
root@apalis-imx8-07307228:~/opengl#
The ultimate goal is runnig flutter application. When i ran the flutter application, same issue is happening.
Any help will be appreciated.
Regards,
Hareendran