The Embedian Debian Linux SDK combines community‑supported Debian software with NXP‑specific components to deliver a convenient development solution on ARM64 platforms. Using Flexbuild, developers can generate BSP firmware (ATF, U‑Boot, OP‑TEE, kernel, DTB, peripheral firmware, initramfs), as well as Debian desktop and server RootFS images. Hardware‑accelerated modules for GPU, NPU, VPU, ISP, security, Wi‑Fi/Bluetooth, and audio are compiled against Debian runtime dependencies.
Flexbuild enables flexible builds of RootFS, kernel, BSP, and user applications across graphics, multimedia, networking, connectivity, security, and AI/ML use cases, supporting streamlined customization and CI/CD. With flex‑installer, distributions can be easily deployed to SD/eMMC or USB/SATA/NVMe storage. Embedian provides both source packages and prebuilt demo images to simplify evaluation and development.
OVERVIEW OF DEBIAN LINUX SDK | |
Distro Variant | • Debian Base (basic packages) • Debian Server (more packages without GUI Desktop) • Debian Desktop (with GNOME GUI Desktop besides the packages of Debian server) |
Deployment of the prebuilt Debian distro images | NXP provides a script tool flex-installer to automatically download and install the prebuilt BSP image and Debian RootFS image with customizable partitions of the target storage device. The entire disk space of the SD/eMMC card or USB/SATA disk is accessible with the formatted EXT4 partition. flex-installer can also convert the tarball images to a single .wic image. Optionally, you can use the balena Etcher tool to flash the BSP composite firmware into the SD card on the Windows host machine if the Linux host is not available. |
Supported boards | • SMARC-iMX93 • SMARC-iMX8QM • SMARC-iMX8MP • SMARC-iMX8MQ • SMARC-iMX8MM • pITX-MX8M-PLUS • OSM-iMX93-SF • pITX-OSM-iMX93 |
Host Requirement to build Debian Linux SDK with Flexbuild | • Debian 12. • Build in Docker hosted on Ubuntu 22.04 LTS or Ubuntu 24.04 LTS. |
Duration of build | 30 minutes – 3 hours. |
Consumed disk space | 30 GB – 50 GB. |
Installing a new package | Installing a package is as simple as running apt install <package> since there is a deb package manager for Debian. |
Patching source of component | It is easy to patch board-specific components in Flexbuild, but inconvenient to patch the upstream Debian package because they are installed as deb packages. |

Development Board
EVK-STD-CARRIER-S20 (universal carrier board for all SMARC 2.0 modules) from Embedian
Release Note
What is new in this release
The Debian Linux SDK 25.06 release has the following new features:
- Flexbuild upgraded to 2.18.2506.
- Debian 12.9 (base, desktop, server) RootFS with update.
- Linux kernel upgraded to LTS 6.6.52.
- GPU driver upgraded to imx-gpu-viv-6.4.11.p2.10-aarch64 (compiled based on Debian 12 runtime dependency).
- VPU driver upgraded to imx-vpu-hantro-vc-1.10.1 (based on Debian 12).
- Supports eIQ AI/ML and GoPoint Demos.
- DPDK L2FWD and L3FWD applications.
- GStreamer 1.24.7 and various plugins for i.MX.
Supported board features
- Debian 12.9 Desktop by default, Weston Desktop supported alternatively
- Desktop GUI with GPU acceleration
- Multimedia video playback with VPU codec
- Web browsers (Chromium, Firefox)
- Qt6 application support
- Wi-Fi + Bluetooth
- eIQ TensorFlow Lite support
- Gstreamer support
- DPDK for networking acceleration
- GoPoint Demos support in both GUI and TUI mode
Building Debian Images with Flexbuild
Flexbuild is a component-oriented lightweight build system and integration platform with capabilities of flexible, ease-to-use, scalable system building, and Distro deployment, developed by NXP.
Flexbuild provides a set of scripts, tools, and make files to compile NXP board-specific driver components, create board-specific BSP composite firmware, boot image, and custom Debian (base, desktop, server) RootFS image. It provides an easy way to create a full-fledged Debian Distro with hardware-accelerated components for NXP platforms, using a single command. Once the image is built, users can directly deploy it onto an SD card.
Build Environment
Host prerequisites to build the Debian Distro:
Debian 12, Ubuntu 22.04, or Ubuntu 24.04 with Docker installed.
Perform the following steps to install the Docker:
$ sudo apt install docker.io
Users must have the sudo permission for Docker commands or be added to the Docker group as follows.
Change the current group to ”docker”, and add the account to it and restart the Docker service.
$ sudo newgrp – docker
$ sudo usermod -aG docker
$ sudo gpasswd -a docker
$ sudo service docker restart
Getting Flexbuild
Run the following command to clone the repository:
$ git clone https://github.com/embedian/flexbuild.git -b lsdk2506
The following is the source tree of the Flexbuild repository structure.
├── LICENSE-Flexbuild-BSD-3-CLAUSE.txt
├── LICENSE_SDK.txt
├── README.md
├── SCR.txt
├── build_lsdk2506
│ ├── apps
│ ├── bsp
│ ├── images
│ ├── linux
│ └── rfs
├── components_lsdk2506
│ ├── apps
│ └── linux
├── configs
│ ├── board
│ ├── buildroot
│ ├── debian
│ ├── linux
│ ├── ml.yml
│ ├── poky
│ ├── sdk-emb.yml
│ └── sdk.yml
├── docker
│ ├── debian
│ └── ubuntu
├── docs
│ ├── FAQ-add-new-package-and-board.md
│ ├── FAQ-docker-setup.md
│ ├── build_and_deploy_distro.md
│ ├── flexbuild_usage.md
│ ├── flexbuild_workflow.txt
│ ├── host_requirement.md
│ ├── memory_layout.txt
│ ├── nxp_linux_sdk.md
│ └── proxy.md
├── include
│ ├── repo.mk
│ └── repo_update.inc
├── logs
├── patch
│ ├── apitrace
│ ├── atf
│ ├── cheese
│ ├── clutter_gst
│ ├── cogl
│ ├── cryptodev_linux
│ ├── gst_plugins_bad
│ ├── gst_plugins_base
│ ├── gst_plugins_good
│ ├── gstreamer
│ ├── gtec_demo_framework
│ ├── imx_demo_experience
│ ├── imx_demos_list
│ ├── imx_firmware
│ ├── imx_gst_plugin
│ ├── imx_mkimage
│ ├── imx_smart_kitchen
│ ├── imx_voiceplayer
│ ├── linux
│ ├── nnstreamer
│ ├── openssl
│ ├── optee_os
│ ├── uboot
│ ├── vkmark
│ ├── vpp
│ ├── wayland
│ └── weston
├── setup.env
├── src
│ ├── Makefile
│ ├── apps
│ ├── bsp
│ ├── linux
│ └── system
└── tools
├── bld -> flex-builder
├── chroot.sh
├── clean_components
├── create_bootpartition
├── create_composite_firmware
├── distro_buildroot
├── distro_debian
├── distro_poky
├── flash_images
├── flex-builder
├── flex-installer
├── getvariable
├── make_emmc
├── parse_yaml
├── repo_update
├── resizerfs
└── secure_sign_image
Building Debian images in Flexbuild
Run the following commands for the first time to set up the build environment.
$ cd flexbuild
$ . setup.env (in host environment)
$ bld docker (create or attach to docker)
$ . setup.env (in docker environment)
$ bld host-dep (install host dependent packages)
$ export LOG_LEVEL=0 (Optional, enable detailed log. The default value is 2, which means ”mute all possible log”.)
Flexbuild usage:
$ bld -m <machine>
or
$ bld <target> [<option>]
Notes
machine name for Embedian SMARC-iMX8MQ platform are imx8mq-smarc-2g or i.mx8mq-smarc-4g.
Automatically build BSP composite firmware + kernel + iMX-specific driver
components + Debian RootFS
$ bld -m imx8mq-smarc-4g
$ bld -m imx8mq-smarc-2g
Most used example with separate build:
Notes
$ bld uboot -m imx8mq-smarc-4g
(compile u-boot image for imx8mq-smarc-4g)
$ bld atf -m imx8mq-smarc-4g -b sd
(compile ATF image for SD boot on imx8mq-smarc-4g)
$ bld linux
(compile linux kernel for all arm64 i.MX machines)
$ bld linux:menuconfig
(customize kernel config options in menu)
$ bld boot
(generate boot partition tarball including kernel, dtb, modules, distro bootscript for iMX machines)
$ bld bsp -m imx8mq-smarc-4g
(generate BSP firmware including atf, u-boot, optee_os, kernel, dtb, peripheral-
firmware,initramfs)
$ bld rfs -r debian:desktop
(generate Debian desktop rootfs with more graphics and multimedia packages for
GUI Desktop)
$ bld rfs -r debian:server
(generate Debian server rootfs with server related packages, no GUI Desktop)
$ bld rfs -r debian:base
(generate Debian base rootfs with base packages)
$ bld apps -r debian:server
(compile iMX-specific apps against runtime dependencies of Debian server RootFS)
$ bld merge-apps
(merge iMX-specific apps into target Debian desktop RootFS)
$ bld merge-apps -r debian:server
(merge iMX-specific apps into target Debian server RootFS)
$ bld packrfs
(pack and compress target rootfs as rootfs_lsdk_debian_desktop_arm64.tar.zst)
$ bld packapps
(pack and compress target app components as apps_arm64_debian_desktop.tar.zst)
$ bld list
(list enabled machines and supported components)
$ bld docker
(create or attach docker container to build in docker)
$ bld clean
(clean all obsolete firmware/linux/apps images except rootfs image)
$ bld clean-apps
(clean obsolete apps images based on debian desktop)
$ bld clean-apps -r debian:server
(clean obsolete apps images based on debian server)
$ bld clean-rfs
(clean target debian-desktop RootFS, ’-r debian:desktop’ by default)
$ bld clean-rfs -r debian:server
(clean target debian-server RootFS)
$ bld clean-bsp
(clean obsolete bsp image)
$ bld clean-linux
(clean obsolete linux image)
$ bld dpdk
(build DPDK component based on Debian Desktop for i.MX platforms)
Setup SD Card
When the building is successfully completed, the generated image is located in the directory
build_lsdk2506/images/.
Use the following command to flash the SD card.
$ cd build_lsdk2506/images
$ flex-installer -i pf -d /dev/sdo -p 3P=512M:10G:-1 (Format SD card)
$ flex-installer -m imx8mq-smarc-4g -t smarc-hdmi -f firmware_imx8mq-smarc-4g_sdboot.img -b boot_IMX_arm64_lts_6.6.52.tar.zst -r rootfs_lsdk2506_debian_desktop_arm64.tar.zst -d /dev/sdX
Notes
1. 3P=512:10G:-1, default 3 partitions, 512MB as boot partition and 10G as system partition. -1 indicates the remaining space for backup storage.
flex-installer command options
Description | Command option | Supported value |
Carries out some operational commands. | -i <instruction> | • auto: Automatically downloads and installs distro images to the storage device. • pf: Partitions and formats storage device. • download: Only downloads distro images without installation. • mkwic: Creates all-in-one sdcard. • wic image including composite BSP firmware, boot image, and rootfs. |
Refers to the board name. | -m <machine> | • imx8mq-smarc-4g • imx8mq-smarc-2g |
Refers to the firmware image. | -f <firmware> | firmware_<machine>_<boottype>.img |
Default device tree to be used. | -t <device tree> | • N/A: no display output. • smarc-hdmi: HDMI display output • smarc-dp: Display Port (DP) output. • smarc-lcdif-lvds: LVDS display output (vis LCDIF controller) • smarc-dcss-lvds: LVDS display output (via DCSS controller) • smarc-dual-display: dual display output (HDMI + LVDS) |
Refers to the bootpartition image. There is a set of bootpartition images for each of the Linux kernel versions and platform (64-bit) supported by Debian. | -b <boot_partition> | • boot_IMX_arm64_lts_ 6.6.52 (as a directory). • boot_IMX_arm64_<lts_version>.tar.zst for i.MX platforms. |
Refers to the NXP Debian RootFS image. | -r <rootfs> | • rootfs_lsdk2506_debian_server_arm64.tar.zst (compressed tarball). • rootfs_lsdk2506_debian_server_arm64 (as a directory). |
The SD storage drive in the Linux PC is detected as /dev/sdX. Where, X is a letter, such as a, b, c. Ensure to choose the correct device name, because the data on this device will be replaced. | -d <device> | /dev/<device_name>. |
Specifies the URL of the distro web server to override the default one for automatically downloading distro. | -u <url> | URL of the distro web server. |
Backup image to SD card
When all development work is completed, you can use the following command to back up the software from each partition to the third partition of the SD card. This backup will be used later when flashing the on-module eMMC.
$ flex-installer -m imx8mq-smarc-4g -i backup -d /dev/sdX
Remove SD card from host computer and insert into your device SD connector. Shunt cross TEST# pin to GND (SD boot) and set BOOT_SET to ON OFF OFF. You can see Debian bookworm desktop boot up from SER3.
Setup eMMC
Shunt the cross TEST# pin to ground and set BOOT_SEL to ON OFF OFF, then boot from your SD card. Run the following command as the root user.”
$ make_emmc -s /dev/mmcblk1p3 -d /dev/mmcblk0
Notes
The ”-s” parameter specifies the source partition of SD card. The SD card in SMARC-iMX8MQ is always emulated as /dev/mmcblk1 in this case.
The ”-d” parameter specifies the destination device (eMMC). The eMMC in SMARC-iMX8MQ is always emulated as /dev/mmcblk0 in this case.
Shutting down device. Remove TEST# pin jumper block and set BOOT_SEL to OFF ON ON. The device now boot up from on-module eMMC.
FAQs
Where is the source code stored?
Note: You must have successfully compiled a complete machine previously. Otherwise, the source directories do not exist. This means that you should have run a command similar to: $ bld -m imx8mq-smarc-4g.
How to modify and recompile the source code?
- To modify the Linux or Device Tree Blob (DTB):
- Navigate to the Linux source directory:
$ cd components_lsdk2506/linux/ - Update your source code or DTB files.
- Go back to the previous directory:
$ cd – - Compile the Linux kernel (using the i.MX platform as an example):
$ LOG_LEVEL=0 bld linux -p IMX - The compiled output is in the build_lsdk2506/linux/linux/arm64/IMX directory. Copy the necessary image or DTB files to your target board for use.
Note: To use the flex-installer tool to flash the newly generated kernel image or DTB, run the following command to generate the boot image boot_IMX_arm64_lts_6.6.52.tar.zst:
$ LOG_LEVEL=0 bld boot -p IMX
- Navigate to the Linux source directory:
- To modify the U-Boot or ATF Code:
- Navigate to the U-Boot or ATF source directory:
$ cd components_lsdk2506/bsp/uboot/ or components_lsdk2506/bsp/atf/ - Update the source code.
- Compile U-Boot (replacing with your specific machine name):
$ LOG_LEVEL=0 bld uboot -m imx8mq-smarc-4g - The compiled results is in build_lsdk2506/bsp/u-boot/.
- Navigate to the U-Boot or ATF source directory:
Note: Typically, U-Boot or ATF files alone cannot be used independently. You need to generate a boot image using the following command:
$ bld bsp -m imx8mq-smarc-4g
The result is located at build_lsdk2506/images/firmware_imx8mq-smarc-4g_sdboot.img. This file can be installed using flex-installer.
- To modify and Use the Application Source Code:
- Navigate to the application module’s directory (using imx_lib as an example):
$ cd components_lsdk2506/apps/multimedia/imx_lib/ - Modify the relevant code. Go back to the previous directory:
$ cd – - Compile the application module
$ bld imx_lib -m imx8mq-smarc-4g - The compiled code is located under build_lsdk2506/apps/apps_arm64_debian_<distro_type>/. Usually, the compiled output of a single component consists of multiple files, making them inconvenient for standalone use. In such cases, perform the following steps:
- Merge applications into the target root filesystem:
$ bld merge-apps -r debian:<variant> - Repackage to generate a new root filesystem:
$ bld packrfs -r debian:<variant>
- Merge applications into the target root filesystem:
- Navigate to the application module’s directory (using imx_lib as an example):
The new root filesystem is located at build_lsdk2506/images/rootfs_lsdk2506_debian_<variant>_arm64.tar.zst, which can then be installed using flex-installer.
How to modify code using patches
You can modify code using patches in two scenarios, depending on whether a patch directory already exists for the component you want to change.
- If a patch directory already exists for the component:
If there is already a patch/<component> directory for your component, perform the following steps:- Place your new patch:
Copy your generated patch file into the patch/<components> directory, alongside with any existing patches. - Delete the component’s source directory:
This ensures that during your recompilation, the system applies all patches, including the new one. Take imx_lib as an example:
$ rm -rf components_lsdk2506/apps/multimedia/imx_lib/ - Recompile the source code. The new patch is then automatically applied during this process.
- Place your new patch:
- If no patch directory exists for the component:
If there is no existing patch/ directory for your component, create one and add the patch application logic:- Create the component’s patch directory:
$ mkdir patch/<component> - Copy your patch:
Place your patch file into the new patch/<component> directory. - Modify the component’s source code to apply the patch:
Add the code to the component’s build script (or a similar location) that applies the patches.
See the GStreamer patch application snippet as an example:
————————————————————————————————————————————
if [ ! -f .patchdone ]; then \
git am $(FBDIR)/patch/gstreamer/*.patch $(LOG_MUTE) && touch .patchdone;
\
fi && \
———————————————————————————————————————————–
This snippet checks if the patches have been applied (.patchdone file). If not, it applies all .patch files from the $(FBDIR)/patch/gstreamer/ directory using git am, and then creates a .patchdone file to mark the completion. - Recompile the source code. The new patch is then automatically incorporated.
- Create the component’s patch directory:
How to add a new custom component in Flexbuild
To add a new component called hello_world, perform the following steps:
- Set the relevant URL and tag/commit information for the new component.
You can edit configs/sdk-emb.yml to set the repository URL with a tag or commit for the hello_world Git tree if needed. - Create a makefile src/apps//hello_world.mk to add the build object for this component. According to the various types of the build system (e.g., make, cmake, meson) in the new component, refer to the following examples to add the hello_world.mk file.
- For building with make, refer to src/apps/utils/imx_test.mk.
- For building with cmake, refer to src/apps/graphics/gputop.mk.
- For building with meson, refer to src/apps/multimedia/cheese.mk.
- Build the new component based on the target ARM64 Debian RootFS.
$ bld <component> [ -r <distro_type:distro_variant>]
e.g.
$ bld hello_world
(Add ’-r debian:server’ for server version, ’-r debian:desktop’ can be omitted by default) - Merger the new component into the target Debian RootFS.
$ bld merge-apps
(Add ’-r debian:server’ for server version, ’-r debian:desktop’ can be omitted by default) - Pack the target Debian RootFS.
$ bld packrfs
(Add ’-r debian:server’ for server version, ’-r debian:desktop’ can be omitted by default)
version 1.0a, 10/28/2024
Last updated 2024-10-28