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

  1. Boot the hardware device with a minimal OSTree i.MX8 image and log in.

  2. Make the image mutable by unlocking OStree.

    # ostree admin unlock --hotfix
    
  3. 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.

  4. Set permissions to make the firmware binary file executable.

    # chmod a+x firmware-imx-8.21.bin
    
  5. 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
    
  6. Update the contents of the firmware-imx-8.21/firmware/ directory to initramfs.

    1. Make a new directory.

      # mkdir -p /lib/firmware/imx
      
    2. Copy the contents of the firmware-imx-8.21/firmware/ directory to it.

      # cp firmware-imx-8.21/firmware/* /lib/firmware/imx/ -Rf
      
    3. Create the boot image with dracut.

      # dracut /boot/ostree/elxr-*/initramfs-*-imx-arm64.img --force
      
  7. Install the NXP Debian GNOME desktop.

    1. 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
      
    2. 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
      
    3. Install the desktop.

      # debian-post-install-pkg desktop
      
  8. Install additional packages to tune the system.

    1. 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
      
    2. Enable the graphics service.

      # systemctl enable gpuconfig.service
      # systemctl set-default graphical.target
      
    3. 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
      
    4. 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
      
    5. 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
      
    6. Install the patchelf package.

      # apt-get install -y patchelf
      
  9. Create a non-root user for the GNOME session.

    # adduser <username>
    
  10. Reboot the system to let the modifications take place.

    # reboot