I'm using the NXP IMX8X from Compulab with a custom Yocto build.
Linux cl-som-imx8 4.14.98-cl-som-imx8-1.1+g5d6cbeafb80c #1 SMP PREEMPT Fri May 13 01:24:54 UTC 2022 aarch64 aarch64 aarch64 GNU/Linux
While trying to get an Hardware Accelerated Renderer SDL fails. In the software we use:
SDL_CreateRenderer(window, -1, SDL_RENDERER_ACCELERATED)
And this results in an error:
Can't find a matching driver to create a renderer
Which as I gather means that no accelerated video driver is available for SDL rendering.
Do you support SDL accelerated rendering?
Otherwise SDL seems unusable, can you recommend something?
Any and all advice is welcome, thank you.
I just added the sdl2 package to my local.conf file.
my bblayers file
LCONF_VERSION = "7"
BBPATH = "${TOPDIR}"
BSPDIR := "${@os.path.abspath(os.path.dirname(d.getVar('FILE', True)) + '/../..')}"
BBFILES ?= ""
BBLAYERS = " \
${BSPDIR}/sources/poky/meta \
${BSPDIR}/sources/poky/meta-poky \
\
${BSPDIR}/sources/meta-openembedded/meta-oe \
${BSPDIR}/sources/meta-openembedded/meta-multimedia \
\
${BSPDIR}/sources/meta-freescale \
${BSPDIR}/sources/meta-freescale-3rdparty \
${BSPDIR}/sources/meta-freescale-distro \
"
# i.MX Yocto Project Release layers
BBLAYERS += " ${BSPDIR}/sources/meta-fsl-bsp-release/imx/meta-bsp "
BBLAYERS += " ${BSPDIR}/sources/meta-fsl-bsp-release/imx/meta-sdk "
BBLAYERS += " ${BSPDIR}/sources/meta-browser "
BBLAYERS += " ${BSPDIR}/sources/meta-openembedded/meta-gnome "
BBLAYERS += " ${BSPDIR}/sources/meta-openembedded/meta-networking "
BBLAYERS += " ${BSPDIR}/sources/meta-openembedded/meta-python "
BBLAYERS += " ${BSPDIR}/sources/meta-openembedded/meta-filesystems "
BBLAYERS += " ${BSPDIR}/sources/meta-qt5 "
BBLAYERS += " \
${BSPDIR}/sources/meta-compulab \
${BSPDIR}/sources/meta-compulab-bsp/meta-desktop \
${BSPDIR}/sources/meta-compulab-bsp/meta-multimedia \
${BSPDIR}/sources/meta-bsp-imx8mq \
"
My local.conf
MACHINE ??= 'cl-som-imx8'
DISTRO ?= 'fsl-imx-xwayland'
PACKAGE_CLASSES ?= "package_rpm"
EXTRA_IMAGE_FEATURES ?= "debug-tweaks dev-pkgs tools-sdk tools-debug tools-profile tools-testapps"
USER_CLASSES ?= "buildstats image-mklibs image-prelink"
PATCHRESOLVE = "noop"
BB_DISKMON_DIRS ??= "\
STOPTASKS,${TMPDIR},1G,100K \
STOPTASKS,${DL_DIR},1G,100K \
STOPTASKS,${SSTATE_DIR},1G,100K \
STOPTASKS,/tmp,100M,100K \
ABORT,${TMPDIR},100M,1K \
ABORT,${DL_DIR},100M,1K \
ABORT,${SSTATE_DIR},100M,1K \
ABORT,/tmp,10M,1K"
PACKAGECONFIG_append_pn-qemu-native = " sdl"
PACKAGECONFIG_append_pn-nativesdk-qemu = " sdl"
CONF_VERSION = "1"
DL_DIR ?= "${BSPDIR}/downloads/"
ACCEPT_FSL_EULA = "1"
CORE_IMAGE_EXTRA_INSTALL += " dhcp-client imx-gpu-viv-demos cl-uboot cl-deploy cl-stest cl-launcher cl-camera u-boot-fw-utils memtester htop iotop tmux iperf3 "
IMAGE_FEATURES += " package-management ssh-server-openssh "
LICENSE_FLAGS_WHITELIST = "commercial"
PREFERRED_RPROVIDER_u-boot-fw-utils = "u-boot-fw-utils"
BBMASK += "meta-compulab/recipes-xfce"
# Users' Configurations
UBOOT_CONFIG = "cfg"
# Add packages
IMAGE_INSTALL_append = " git ffmpeg python3-flask python3-bcrypt python3-jinja2 python3-lxml python3-beautifulsoup4 python3-pyalsaaudio python3-smbus python3-urllib3 libsdl2 libsdl2-mixer libsdl2-image libsdl2-ttf "
Why you add sdl to qemu?
https://lists.yoctoproject.org/g/poky/message/11727
If you want to use sdl in rootfs , you should use image_install_append
This is the default in the configurations from Compulab.
See: https://github.com/compulab-yokneam/meta-bsp-imx8mq
To be clear: I added the libsdl2 package to the 'local.conf' file by adding it to IMAGE_INSTALL_append. I need the libsdl2 package working with an hardware accelerated renderer. So I already added 'libsdl2' to IMAGE_INSTALL_append. Are you saying I should also add 'sdl' to IMAGE_INSTALL_append?
Compulab has added the part with: PACKAGECONFIG_append_pn-qemu-native = " sdl"
I don't know why compulab has done this.
Do you think that accelerated rendering is not working due to Compulab's configuration or is it not supported?
Thank you for your quick response