This guide provides a detailed walkthrough for building and installing the Debian 11 operating system on the Embedian pITX-MX8M-PLUS platform—a compact, high-performance single board computer powered by NXP’s i.MX8M Plus processor. Designed for embedded applications requiring robust multimedia capabilities, machine learning acceleration, and industrial-grade reliability, the pITX-MX8M-PLUS is an ideal candidate for a customized Debian deployment.
Whether you’re developing industrial control systems, edge AI applications, or multimedia interfaces, this guide will help you deploy Debian 11 on the pITX-MX8M-PLUS with confidence and precision. Our goal is to streamline your development process and provide a reliable foundation for your embedded Linux projects. The recommended host environment is Ubuntu 22.04.

I/O Expansion Board
pITX-IOB-2201 (50-pin I/O expansion board) from Embedian
Basic Resources
- AArch64 Cross Compiler
- ARM GNU aarch64: https://launchpad.net/linaro-toolchain-binaries
- Bootloader
- Das U-Boot – the Universal Boot Loader http://www.denx.de/wiki/U-Boot
- Source – http://git.denx.de/?p=u-boot.git;a=summary
- Linux Kernel
- NXP Linux Source Codes: https://github.com/nxp-imx/linux-imx.git
- Embedian Linux Source Codes: https://github.com/embedian/smarc-fsl-linux-kernel.git
Create build environment
Install required packages
On Ubuntu 22.04 machine:
$ sudo apt-get install binfmt-support qemu qemu-user-static debootstrap kpartx \
lvm2 dosfstools gpart binutils git lib32ncurses5-dev python-m2crypto gawk wget \
git-core diffstat unzip texinfo gcc-multilib build-essential chrpath socat libsdl1.2-dev \
autoconf libtool libglib2.0-dev libarchive-dev python-git xterm sed cvs subversion \
coreutils texi2html bc docbook-utils python-pysqlite2 help2man make gcc g++ \
desktop-file-utils libgl1-mesa-dev libglu1-mesa-dev mercurial automake groff curl \
lzop asciidoc u-boot-tools mtd-utils device-tree-compiler
Deploy Sources
Download archive containing the build script and support files for building Debian Bullseye
$ cd ~/
$ git clone https://github.com/embedian/debian-emb.git pitx_mx8mp_debian -b debian_bullseye_pitxmx8mp
$ cd ~/pitx_mx8mp_debian
$ MACHINE=pitximx8mp4g ./pitx_make_debian.sh -c deploy
With the build environment downloaded, we are ready to initiate the Debian 11 build process.
Notes
If the LPDDR4 is 2GB on your pITX-MX8M-PLUS SBC, the MACHINE name will be pitximx8mp2g
Make Debian
Build all
The internet connection in your host PC has to be available.
$ cd ~/pitx_mx8mp_debian
$ sudo MACHINE=pitximx8mp4g ./pitx_make_debian.sh -c all |& tee build.log
Notes
If the LPDDR4 is 2GB on your pITX-MX8M-PLUS SBC, the MACHINE name will be pitximx8mp2g
Build by parts
Build bootloader
$ cd ~/pitx_mx8mp_debian
$ sudo MACHINE=pitximx8mp4g ./pitx_make_debian.sh -c bootloader
Build Kernel, dtb files and kernel modules
$ cd ~/pitx_mx8mp_debian
$ sudo MACHINE=pitximx8mp4g ./pitx_make_debian.sh -c kernel
$ sudo MACHINE=pitximx8mp4g ./pitx_make_debian.sh -c modules
Build rootfs
$ cd ~/pitx_mx8mp_debian
$ sudo MACHINE=pitximx8mp4g ./pitx_make_debian.sh -c rootfs
Pack rootfs
$ cd ~/pitx_mx8mp_debian
$ sudo MACHINE=pitximx8mp4g ./pitx_make_debian.sh -c rtar
Setup SD Card Manually
For these instruction, we are assuming: DISK=/dev/mmcblk0, “lsblk” is very useful for determining the device id.
$ export DISK=/dev/mmcblk0
Erase SD card:
$ sudo dd if=/dev/zero of=${DISK} bs=1M count=160
Create Partition Layout: Leave 2MB offset for boot file. With util-linux v2.26, sfdisk was rewritten and is now based on libfdisk.
(sfdisk)
$ sudo sfdisk –version
sfdisk from util-linux 2.34
Create Partitions:
(sfdisk >=2.26.x)
$ sudo sfdisk ${DISK} <<-__EOF__
2M,48M,0x83,*
50M,,,
__EOF__
Format Partitions:
for: DISK=/dev/mmcblk0
$ sudo mkfs.vfat -F 16 ${DISK}p1 -n boot
$ sudo mkfs.ext4 ${DISK}p2 -L rootfs
for: DISK=/dev/sdX
$ sudo mkfs.vfat -F 16 ${DISK}1 -n boot
$ sudo mkfs.ext4 ${DISK}2 -L rootfs
Mount Partitions:
On some systems, these partitions may be auto-mounted…
$ sudo mkdir -p /media/boot/
$ sudo mkdir -p /media/rootfs/
for: DISK=/dev/mmcblk0
$ sudo mount ${DISK}p1 /media/boot/
$ sudo mount ${DISK}p2 /media/rootfs/
for: DISK=/dev/sdX
$ sudo mount ${DISK}1 /media/boot/
$ sudo mount ${DISK}2 /media/rootfs/
Boot file is factory default flashed at on-module eMMC flash.
Install Boot File (output/imx-boot-sd.bin)
IIn some cases, when eMMC flash is erased or the u-boot is under development, we need a way to boot from microSD card first. Users need to ser SW2 port 1-3 and (ON ON ON). In this way, pITX-iMX8M-PLUS will always boot up from microSD card.
Write imx-boot-sd.bin to SD card.
~/pitx_mx8mp_debian
$ sudo dd if=output/imx-boot-sd.bin of=${DISK} bs=1024 seek=32
The <boot file> is pre-installed in on-module eMMC flash at factory default. pITX-MX8M-PLUS is designed to always boot up from on-module eMMC flash and to load Image, device tree blob and root file systems based onthe setting of SW2 port 1-3. If users need to fuse your own flash.bin or perform u-boot upgrade. This section will instruct you how to do that.
Copy <boot file> to the second partition home directory of your microSD card and boot into microSD card. Go to home directory and you should see flash.bin file
~/pitx_mx8mp_debian
$ sudo cp -v output/imx-boot-sd.bin /media/rootfs/root/
Write imx-boot-sd.bin to the on-module eMMC flash. (The eMMC flash is emulated as /dev/mmcblk2 in pITX-MX8M-PLUS)
(root directory of device)
$ sudo dd if=imx-boot-sd.bin of=/dev/mmcblk2 bs=1024 seek=32
Notes
1. If your u-boot hasn’t been finalized and still under development, it is recommended to set SW2 port 1-3 as (ON ON ON) and boot directly from microSD card first. Once your u-boot is fully tested and finalized, you can fuse your flash.bin to eMMC flash.
2. When SW2 port1-3 on pITX-MX8M-PLUS is set as (OFF ON OFF), it will always boot up from on-module eMMC flash. U-boot will read the SW2 port 1-3 configuration and determine where it should load Image and device tree blob. When SW2 port 1-3 is set (ON ON ON), it will always boot up from microSD card.
Install uEnv.txt based bootscript
Copy uEnv.txt to the boot partition:
~/pitx_mx8_debian
$ sudo cp -v embedian/uEnv.txt /media/boot/
Install Linux Kernel Image
Copy Image to the boot partition:
~/pitx_mx8_debian
$ sudo cp -v output/Image /media/boot/
Install Linux Kernel Device Tree Binary
~/pitx_mx8_debian
$ sudo mkdir -p /media/boot/dtbs
$ sudo cp -v output/<device tree binary> /media/boot/dtbs/imx8mp-pitx.dtb
All available DTB binary files are listed in the table below.
DTB FILENAME | DESCRIPTION |
imx8mp-pitx.dtb | Device tree blob for HDMI display configuration. |
imx8mp-pitx-lvds.dtb | Device tree blob for LVDS display configuration. |
imx8mp-pitx-rs232.dtb | Device tree blob for HDMI display and RS485 configurations. |
imx8mp-pitx-lvds-rs485.dtb | Device tree blob for LVDS display and RS485 configurations. |
Notes
The device tree name in your microSD card has be to imx8mp-pitx.dtb
Install Root Filesystem
Extract the Debian built root filesystem to your microSD card
~/pitx_mx8_debian
$ sudo tar xvfz output/rootfs.tar.gz -C /media/rootfs
Notes
1. pITX-MX8M-PLUS always boots up from on-module eMMC flash first. The firmware in eMMC flash is factory pre-installed from Embedian. It will read the SW2 port 1-3 configuration on your carrier board and load Image and device tree blob from the partition one of the device (could be microSD card or eMMC) that you selected.
2. MAC address is factory pre-installed at on board I2C EEPROM at offset 60 bytes. It starts with Embedian’s vendor code 10:0D:32. u-boot will read it and pass this parameter to kernel.
3. The kernel modules is included in the Yocto rootfs.
Remove microSD card:
$ sync
$ sudo umount /media/boot
$ sudo umount /media/rootfs
Setup microSD Card Automatically
This section tells you how to set up an microSD card automatically. It mainly uses a script to do all the steps in the above section.
$ cd ~/pitx_mx8mp_debian
$ sudo MACHINE=pitximx8mp4g ./pitx_make_debian.sh -c sdcard -d /dev/sdX
Set SW2 port 1-3 as (ON ON ON). The module will boot up from microSD card.
Selecting display configuration is a matter of selecting an appropriate DTB file.
All available DTB files are listed in the table below.
DTB FILENAME | DESCRIPTION |
imx8mp-pitx.dtb | Device tree blob for HDMI display configuration. |
imx8mp-pitx-lvds.dtb | Device tree blob for LVDS display configuration. |
imx8mp-pitx-rs232.dtb | Device tree blob for HDMI display and RS485 configurations. |
imx8mp-pitx-lvds-rs485.dtb | Device tree blob for LVDS display and RS485 configurations. |
Notes
The default display output is hdmi. If you would like to change to default display output to different interfaces, make changes the file pitx_make_debian.sh and find readonly DISPLAY="-lvds"
LVDS : readonly DISPLAY="-lvds"
Build Results
The resulted images are located in ~/pitx_mx8mp_debian/output directory:
Image Name | Description |
rootfs.tar.gz | Root filesystem tarball for installation on SD card and eMMC |
Image | Linux Kernel Image |
imx-boot-sd.bin | Boot file for SD card and eMMC |
Linux Console Access
User Name | User Password | User Description |
root | root | system administrator |
user | user | local user |
x_user | used for X session access |
Setup eMMC
Set SW2 port 1-3 to (ON ON ON), and this will boot up from your microSD card. Run the following command as the root user.”
$ install_debian.sh -d <-lvds>
Notes
The “-d” parameter specifies which device tree blob that you would like copy to eMMC.
LVDS : readonly DISPLAY="-lvds"
Modify the kernel configuration
To modify the kernel configuration (add/remove features and drivers). Please follow the step below.
$ cd ~/pitx_mx8mq_debian/src/kernel
$ sudo make arch=arm64 mrproper
$ sudo make arch=arm64 pitximx8mp_defconfig
$ sudo make ARCH=arm64 savedefconfig
$ sudo cp arch/arm64/configs/pitximx8mp_defconfig arch/arm64/configs/pitximx8mp_defconfig.orig
$ sudo cp .config arch/arm64/configs/pitximx8mp_defconfig
Follow the instructions above to rebuild kernel and modules, repack rootfs images and recreate SD card
Video Decoding
For playing video, we can use three solutions to support it.
1. $ gplay-1.0 <video file>
2. $ gst-launch-1.0 playbin uri=file://<video absolute path>
3. (i) if video container on .mp4 format
$ gst-launch-1.0 filesrc location=<file name.mp4> typefind=true ! video/quicktime ! qtdemux ! queue max-size-time=0 ! vpudec ! queue max-size-time=0 ! kmssink force-hantrope=true sync=false &
(ii) if video container on .ts format
$ gst-launch-1.0 filesrc location=<file name.ts> typefind=true ! video/mpegts ! tsdemux ! queue max-size-time=0 ! vpudec ! queue max-size-time=0 ! waylandsink
version 1.0a, 10/28/2024
Last updated 2024-10-28