Enable 3D Graphics Support and GNOME Desktop on NXP SoC Hardware¶
This tutorial describes how to install the NXP firmware to eLxr 12 on the NXP i.MX8, i.MX8+, and i.MX93 SoC boards. Use this procedure to enable full graphics and multimedia support, and install the the NXP GNOME desktop on your eLxr 12 image.
If you do not require full graphics support, you can download and install the elxr-minimal-ostree-imx-12.10.0.0-arm64.img.zst image with console support. For details, see Download the eLxr Image.
You will need a NXP i.MX8, i.MX8+, or i.MX93 hardware device with the eLxr 12 base installation to perform this procedure. For details, see Installing eLxr on a Hardware Device.
Firmware Update Procedure¶
Boot the hardware device with a minimal OSTree i.MX8 image and log in.
Make the image mutable by unlocking OStree.
# ostree admin unlock --hotfix
Download the NXP firmware.
# printf "add_dracutmodules+=\" firmwares \"\nreproducible=yes\n" >> /etc/dracut.conf.d/firmwares.conf # wget https://www.nxp.com/lgfiles/NMG/MAD/YOCTO/firmware-imx-8.21.bin
Warning
Third-party license and agreements apply. We strongly recommend to consult with legal counsel as required.
Set permissions to make the firmware binary file executable.
# chmod a+x firmware-imx-8.21.bin
Run the firmware file to install it. This will create a firmware-imx-8.21/firmware/ directory with the contents of the bin file.
# ./firmware-imx-8.21.bin
Update the contents of the firmware-imx-8.21/firmware/ directory to initramfs.
Make a new directory.
# mkdir -p /lib/firmware/imx
Copy the contents of the firmware-imx-8.21/firmware/ directory to it.
# cp firmware-imx-8.21/firmware/* /lib/firmware/imx/ -Rf
Create the boot image with dracut.
# dracut /boot/ostree/elxr-*/initramfs-*-imx-arm64.img --force
Install the NXP Debian GNOME desktop.
Download the desktop installation package from GitHub.
# wget https://raw.githubusercontent.com/NXP/flexbuild/refs/tags/LSDK-24.12_DEBIAN-12_LF-6.6.36/src/system/debian-post-install-pkg -O /usr/bin/debian-post-install-pkg
Set permissions to make the package executable.
# chmod a+x /usr/bin/debian-post-install-pkg # sed -i 's#Debian base/Debian#eLxr 12/eLxr 12#g' /usr/bin/debian-post-install-pkg
Install the desktop.
# debian-post-install-pkg desktop
Install additional packages to tune the system.
Download the 10-imx.rules and gpuconfig packages and set permissions with the following commands.
# wget https://raw.githubusercontent.com/NXP/flexbuild/refs/tags/LSDK-24.12_DEBIAN-12_LF-6.6.36/src/system/udev/udev-rules-imx/10-imx.rules -O /etc/udev/rules.d/10-imx.rules # udevadm trigger # wget https://raw.githubusercontent.com/NXP/flexbuild/refs/tags/LSDK-24.12_DEBIAN-12_LF-6.6.36/src/system/gpuconfig -O /etc/gpuconfig # chmod a+x /etc/gpuconfig # wget https://raw.githubusercontent.com/NXP/flexbuild/refs/tags/LSDK-24.12_DEBIAN-12_LF-6.6.36/src/system/gpuconfig.service -O /lib/systemd/system/gpuconfig.service
Enable the graphics service.
# systemctl enable gpuconfig.service # systemctl set-default graphical.target
Update the /etc/environment and /etc/ld.so.conf.d/01-sdk.conf files.
# printf "COGL_DRIVER=gles2\nCLUTTER_DRIVER=gles2\nQT_QPA_PLATFORM=wayland\nGDK_GL=gles" >> /etc/environment # printf "/usr/lib\n" >> /etc/ld.so.conf.d/01-sdk.conf
Download the distroplatcfg and platcfg.service files.
# wget https://raw.githubusercontent.com/NXP/flexbuild/refs/tags/LSDK-24.12_DEBIAN-12_LF-6.6.36/src/system/distroplatcfg -O /usr/bin/distroplatcfg # sed -i 's#Debian#eLxr 12#g' /usr/bin/distroplatcfg # chmod a+x /usr/bin/distroplatcfg # wget https://raw.githubusercontent.com/NXP/flexbuild/refs/tags/LSDK-24.12_DEBIAN-12_LF-6.6.36/src/system/platcfg.service -O /lib/systemd/system/platcfg.service
Enable the service and create a symbolic link for the files.
# systemctl enable platcfg.service # ln -s /opt/unit_tests/test-utils.sh /unit_tests/test-utils.sh
Install the patchelf package.
# apt-get install -y patchelf
Create a non-root user for the GNOME session.
# adduser <username>
Reboot the system to let the modifications take place.
# reboot