Hi J*h*,
I am sorry ,I did that X11 in maaxboard (yocto sumo) long time ago, because it could not support our hdmi lcd, we did not use it again.
so I only can tell some ideas I can remmeber:
and I got technical info from nxp before, the standard imx-yocto-bsp COULD NOT support chromium-x11(in X11), it only supported chromium-ozone-wayland(wayland). so later we used chromium-ozone-wayland(wayland) in maaxboard yocto zeus.
but at that time, I did not know that the standard imx-yocto-bsp CAN NOT support chromium-x11. It was interesting I passed my building (later I use the standard imx-yocto-bsp sumo and zeus ,I Could not pass)
How I did that ?
I remember I did like that:
so x11 passed builing.
the following is a port of local.conf
MACHINE ??= 'imx8mqevk'DISTRO ?= 'fsl-imx-xwayland'
PARALLEL_MAKE ?= "-j 16"
BB_NUMBER_THREADS ?= "16"
PACKAGE_CLASSES ?= "package_rpm"
EXTRA_IMAGE_FEATURES ?= "debug-tweaks"
USER_CLASSES ?= "buildstats image-mklibs image-prelink"
PATCHRESOLVE = "noop"
IMAGE_INSTALL_append = " rng-tools"
#IMAGE_INSTALL_append +=" chromium-ozone-wayland"
DISTRO_FEATURES_append = " xorg-server-xwayland"
DISTRO_FEATURES_remove = " zeroconf"
#CORE_IMAGE_EXTRA_INSTALL += " chromium-ozone-wayland"
CORE_IMAGE_EXTRA_INSTALL += "chromium-x11"
#2G
IMAGE_ROOTFS_EXTRA_SPACE = "2097152"
IMAGE_FEATURES += "ssh-server-openssh package-management hwcodecs splash dev-pkgs"
DISTRO_FEATURES_append = " pam"
IMAGE_INSTALL_append += " gnupg atftp atftpd ntp ntpdate fping xauth xhost "
EXTRA_IMAGE_FEATURES ?= "tools-debug tools-profile debug-tweaks eclipse-debug tools-sdk dev-pkgs"
IMAGE_INSTALL_append += " \
tcf-agent \
openssh-sftp-server \
gdbserver \
net-tools \
"
IMAGE_INSTALL_append += " \
i2c-tools e2fsprogs-resize2fs imx-test \
bash bc cpio gawk tree rsync ldd vim nano \
diffutils coreutils findutils iputils \
git git-perltools libwebsockets libwebsockets-dev vlan tcpdump ruby-dev \
"
...
you can see CORE_IMAGE_EXTRA_INSTALL += "chromium-x11" , ... xauth xhost " are still in it. I still use the image but I do NOT use it to display, I changed to raspberry pi4 (can support x11) for display.
and for display, you can write a auto script with the below command line: (for my current application, I changed to p4 to display ,so I comment it)
#export XDG_CONFIG_HOME="/tmp/chromium"
#export CHROME_CONFIG_HOME="/tmp/chromium"
#export DISPLAY=:0
#/usr/bin/xhost +SI:localuser:myuser
#/usr/bin/sudo -u myuser /usr/bin/chromium --user-data-dir=/tmp/chromium --gpu-no-context-lost --enable-gpu-rasterization --start-fullscreen --kiosk --no-first-run --incognito
http://localhost:3300/rpi.html > /dev/null 2>&1 &
that's it.
in summary my email:
in sumo yocto structure , it could support in x11 with chromium-x11 before.
after yocto zues , as I knew before , nxp dId not support x11, only support chromium-ozone-wayland(wayland). I tried in zues, COULD not pass building . so I had to use chromium-ozone-wayland (anyway, now we changed to pi4)
so my port of local.conf that below:
MACHINE ??= 'maaxboard-ddr4-2g-sdcard'DISTRO ?= 'fsl-imx-wayland-lite'
PARALLEL_MAKE ?= "-j 16"
BB_NUMBER_THREADS ?= "16"
#PACKAGE_CLASSES ?= 'package_rpm'
PACKAGE_CLASSES ?= "package_ipk"
CORE_IMAGE_EXTRA_INSTALL += " chromium-ozone-wayland"
therefore ,
if you can pass x11 building( it seems you can,I did can not in zeus before ), you add IMAGE_INSTALL_append += " xauth xhost " in local.conf and run chrome in script:
export XDG_CONFIG_HOME="/tmp/chromium"
export CHROME_CONFIG_HOME="/tmp/chromium"
export DISPLAY=:0
/usr/bin/xhost +SI:localuser:myuser
/usr/bin/sudo -u myuser /usr/bin/chromium --user-data-dir=/tmp/chromium --gpu-no-context-lost --enable-gpu-rasterization --start-fullscreen --kiosk --no-first-run --incognito http://localhost:3300/rpi.html > /dev/null 2>&1 &
if x11 not, you have to chromium-ozone-wayland(wayland) , you have to create a service chromium.service at /etc/systemd/system and link (ln -s ) to to /etc/systemd/system/multi-user.target.wants
cat chromium.service
[Unit]
Description=launch chromium
[Service]
User=root
Environment=DISPLAY=:0
Environment=XDG_RUNTIME_DIR="/run/user/0"
Type=oneshot
ExecStart=/bin/sleep 9
ExecStart=/home/myuser/mouse.out &
ExecStart=/usr/bin/chromium --no-sandbox --disable-infobars --user-data-dir=/tmp/chromium --gpu-no-context-lost --enable-gpu-rasterization --start-fullscreen --kiosk --no-first-run --incognito
http://localhost:3300/iframe.html &
[Install]
WantedBy=multi-user.target
good luck.