This document provides instructions for advanced users how Embedian offers patches and builds a customized version of u-boot and linux kernel for Embedian's pITX-MX8M-PLUS product platform and how to install the images to bring the evaluation board up and running.
Our aim is to fully support our hardware through device drivers. We also provide unit tests so that testing a board is easy and custom development can start precisely.
The host Linux machine is recommended Ubuntu 20.04 or 22.04.
Once you have Ubuntu 20.04 or 22.04 LTS running, install the additional required support packages using the following console command:
|
pITX-MX8M-PLUS at Embedian
pITX-IOB-2201 (Expansion IO board for pITX-MX8M-PLUS) at Embedian
This is a pre-built (32bit) version of Linaro GCC that runs on generic linux, so 64bit users need to make sure they have installed the 32bit libraries for their distribution.
debian based | extra | pkgs: (sudo apt-get update ; sudo apt-get install xyz) |
---|---|---|
Ubuntu 20.04 |
| ia32-libs |
Debian 11 (Bullseye) | sudo dpkg --add-architecture i386 | libc6:i386 libstdc++6:i386 libncurses5:i386 zlib1g:i386 |
Ubuntu 20.10 -> 22.04 |
| libc6:i386 libstdc++6:i386 libncurses5:i386 zlib1g:i386 |
Red Hat/Centos/Fedora |
| libstdc++.i686 ncurses-devel.i686 zlib.i686 |
Red Hat based (rpm) | extra | pkgs: (yum install xyz) |
Red Hat/Centos/Fedora |
| libstdc++.i686 ncurses-devel.i686 zlib.i686 |
Ubuntu 22.04 |
| ia32-libs |
Ubuntu 20.10 -> 22.04 |
| libc6:i386 libstdc++6:i386 libncurses5:i386 zlib1g:i386 |
To build Embedian’s pITX-MX8M-PLUS u-boot and linux kernel, you will need to install the following ARM compiler:
For u-boot 2022.04, you need to use the following Arm compiler.
|
Test:
If this test fails, verify that you have the 32bit libraries installed on your development system.
|
We recommend you use SSH keys to establish a secure connection between your computer and Embedian Gitlab server. The steps below will walk you through generating an SSH key and then adding the public key to our Gitlab account.
First, we need to check for existing ssh keys on your computer. Open up Git Bash and run:
$ cd ~/.ssh $ ls # Lists the files in your .ssh directory |
Check the directory listing to see if you have a file named either id_rsa.pub
or id_dsa.pub
. If you don't have either of those files go to step 2. Otherwise, you already have an existing keypair, and you can skip to step 3.
To generate a new SSH key, enter the code below. We want the default settings so when asked to enter a file in which to save the key, just press enter.
$ ssh-keygen -t ed25519 -C "your_email@example.com" Generating public/private ed25519 key pair. Enter file in which to save the key (/home/eric/.ssh/id_ed25519): Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /home/eric/.ssh/id_ed25519 Your public key has been saved in /home/eric/.ssh/id_ed25519.pub The key fingerprint is: SHA256:SS9opo/QHxT2cCwlX+ulhn3ZUVdhdG88vvliOVHJ/6c your_email@example.com The key's randomart image is: +--[ED25519 256]--+ | . . . .+B| | = . . .o+| | = = . . o.=| | . O * o o.=o| | = S * o .o.| | . = o . . +| | . o . =.| | . + . = +| | . o .E+o| +----[SHA256]-----+ |
Copy the key to your clipboard.
$ cat ~/.ssh/id_ed25519 ssh-rsa AAAAB3NzaC1yc2EAAABDAQABAAABAQDQUEnh8uGpfxaZVU6+uE4bsDrs/tEE5/BPW7jMAxak 6qgOh6nUrQGBWS+VxMM2un3KzwvLRJSj8G4TnTK2CSmlBvR+X8ZeXNTyAdaDxULs/StVhH+QRtFEGy4o iMIzvIlTyORY89jzhIsgZzwr01nqoSeWWASd+59JWtFjVy0nwVNVtbek7NfuIGGAPaijO5Wnshr2uChB Pk8ScGjQ3z4VqNXP6CWhCXTqIk7EQl7yX2GKd6FgEFrzae+5Jf63Xm8g6abbE3ytCrMT/jYy5OOj2XSg 6jlxSFnKcONAcfMTWkTXeG/OgeGeG5kZdtqryRtOlGmOeuQe1dd3I+Zz3JyT your_email@example.c om |
Go to Embedian Git Server. At Profile Setting --> SSH Keys --> Add SSH Key
Paste your public key and press "Add Key" and your are done.
The boot file is called flash.bin. It is made up of some pieces of programs. This section instruct you how to generate flash.bin.
1. Download the imx-mkimage tool and apply Embedian's patch to accept Embedian's device tree blob.
|
2. Get and Build the ARM Trusted firmware and copy bl31.bin to imx-mkimage/iMX8MP directory.
|
3. Get the DDR firmware and copy to imx-mkimage/iMX8M/ directory.
|
4. Clone the U-Boot source code from Embedian Git Server and copy related files to imx-mkimage/iMX8M/ directory.
Download:
For u-boot v2022.04:
$ git clone git@git.embedian.com:developer/smarc-t335x-uboot.git v2022.04 -b emb_lf_v2022.04 |
Configure and Build:
|
Note1: If the board is 2GB LPDDR4 in commercial or industrial temperature, use If the board is 4GB LPDDR4, use If the board is 6GB LPDDR4, use Note 2: The pITX-MX8M-PLUS module always boot up from the on-module eMMC flash. The factory default will be flash.bin pre-installed. In some cases when the eMMC flash is empty or needs to be upgraded. Users can set SW2 port 1-3 as (ON ON ON). In this way, the pITX-MX8M-PLUS module will boot up to carrier microSD card. The flash.bin image for eMMC and microSD card is the same, the difference is how you flash flash.bin and how SW2 port 1-3 is set. This will be explained in the "Setup microSD card" section. |
Copy u-boot-nodtb.bin spl/u-boot-spl.bin arch/arm/dts/imx8mp-pitx.dtb
to imx-mkimage/iMX8M
directory and copy tools/mkimage
to imx-mkimage/iMX8M/mkimage_uboot
|
5. Generate flash.bin file.
|
The flash.bin file will be located at imx-mkimage/iMX8M directory. Go to "Setup SD Card" section to instruct you how to flash this file into microSD card.
Download:
For 5.15.71 (Based on NXP imx_lf-5.15.y official release):
$ git clone git@git.embedian.com:developer/smarc-fsl-linux-kernel.git v5.15.71 -b emb_imx_lf-5.15.y |
Configure and Build:
$ make ARCH=arm CROSS_COMPILE=${CC} distclean $ make ARCH=arm CROSS_COMPILE=${CC} emb_imx_v8_defconfig $ make ARCH=arm CROSS_COMPILE=${CC} Image modules dtbs |
Selecting display configuration is a matter of selecting an appropriate DTB file under arch/arm64/boot/dts/embedian
.
All available DTB files are listed in the table below.
DTB File Name | Description |
---|---|
imx8mp-pitx.dtb | Device tree blob for no display configuration. |
imx8mp-pitx-hdmi.dtb | Device tree blob for HDMI display configuration. |
imx8mp-pitx-lvds.dtb | Device tree blob for LVDS display configuration. |
imx8mp-pitx-m7.dtb | Device tree blob for Cortex-M7 co-processor configuration. |
Debian 11 Bullseys:
User | Password |
---|---|
root | root |
Debian 11 Bullseye Download:
$ wget -c ftp://ftp.embedian.com/public/dev/minfs/debian/bulleyes/pitximx8mp-bulleys-arm64.tar.gz |
Verify:
$ md5sum pitximx8mp-bulleys-arm64.tar.gz a446a2a0191b64f895a56cf2dd6ee04c pitximx8mp-bulleys-arm64.tar.gz |
Yocto Kirkstone Build Root File System:
User | Password |
---|---|
root | N/A |
Find the yocto pre-built root file systems here at Embedian's ftp site based on your module CPU variants.
|
For these instruction, we are assuming: DISK=/dev/mmcblk0, "lsblk" is very useful for determining the device id.
|
Erase microSD card:
$ |
Create Partition Layout:
With util-linux v2.26, sfdisk was rewritten and is now based on libfdisk.
$ sudo sfdisk --version sfdisk from util-linux 2.34 |
Create Partitions:
$ 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/ |
If on-module eMMC Flash is empty
In 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.
Fuse flash.bin to the microSD card.
$ sudo dd if=iMX8M/flash.bin of=${DISK} bs=1024 seek=32 |
If on-module eMMC Flash is not empty
The flash.bin 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 on the 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 flash.bin 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 (The flash.bin file is located at imx-mkimage/iMX8M/ directory).
$ sudo cp -v imx-mkimage/iMX8M/flash.bin /media/rootfs/home/root/ |
Fuse flash.bin to the on-module eMMC flash. (The eMMC flash is emulated as /dev/mmcblk2 in pITX-MX8M-PLUS)
|
|
Create "uEnv.txt" boot script: ($ vim uEnv.txt)
|
Copy uEnv.txt to the boot partition:
|
Copy Image to the boot partition:
|
|
All available DTB files are listed in the table below.
DTB File Name | Description |
---|---|
imx8mp-pitx.dtb | Device tree blob for no display configuration. |
imx8mp-pitx-hdmi.dtb | Device tree blob for HDMI display configuration. |
imx8mp-pitx-lvds.dtb | Device tree blob for LVDS display configuration. |
imx8mp-pitx-m7.dtb | Device tree blob for Cortex-M7 co-processor configuration. |
The device tree name in your microSD card has be to |
Yocto Pre-Built Rootfs:
|
Debian 11 Bulleyes:
|
|
|
Networking:
Edit: /etc/network/interfaces
|
Add:
auto lo iface lo inet loopback auto eth0 iface eth0 inet dhcp |
Remove microSD card:
$ sync $ sudo umount /media/boot $ sudo umount /media/rootfs |
Setting up eMMC usually is the last step at development stage after the development work is done at your microSD card or NFS environments. From software point of view, eMMC is nothing but a non-removable SD card on board. For pITX-MX8M-PLUS, the microSD card is always emulated as /dev/mmcblk1 and on-module eMMC is always emulated as /dev/mmcblk2. Setting up eMMC now is nothing but changing the device descriptor.
This section gives a step-by-step procedure to setup eMMC flash. Users can write a shell script your own at production to simplify the steps.
First, we need to backup the final firmware from your microSD card or NFS.
Insert microSD card into your Linux PC. For these instructions, we are assuming: DISK=/dev/mmcblk0, "lsblk" is very useful for determining the device id.
For these instruction, we are assuming: DISK=/dev/mmcblk0, "lsblk" is very useful for determining the device id.
|
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/ |
Copy Image to rootfs partition:
|
|
Copy uEnv.txt to rootfs partition:
Copy and paste the following contents to /media/rootfs/home/root
($ sudo vim /media/rootfs/home/root/uEnv.txt
)
|
Copy device tree blob to rootfs partition:
$ sudo cp -v /media/boot/dtbs/<device tree name> /media/rootfs/home/root/imx8mp-pitx.dtb |
Copy boot file to rootfs partition:
|
Copy real rootfs to rootfs partition:
Yocto Built Root File Systems
|
Debiab Bulleyes Root File Systems
|
Unmount microSD card.
$ sync $ sudo umount /media/boot $ sudo umount /media/rootfs |
It is safe to remove microSD card now.
Insert this microSD card into your pITX-MX8M-PLUS device and boot into SD card.
Now it will be almost the same as you did when setup your microSD card, but the eMMC device descriptor is /dev/mmcblk2 now.
|
Erase microSD card:
$ |
Create Partition Layout:
2M , 48M , 0x83 ,* 50M,,, __EOF__ |
Format Partitions:
$ sudo mkfs.vfat -F 16 ${DISK}p1 -n boot $ sudo mkfs.ext4 ${DISK}p2 -L rootfs |
Mount Partitions:
$ sudo mkdir -p /media/boot/ $ sudo mkdir -p /media/rootfs/ $ sudo mount ${DISK}p1 /media/boot/ $ sudo mount ${DISK}p2 /media/rootfs/ |
Copy uEnv.txt/Image/*.dtb to the boot partition
$ sudo cp -v Image uEnv.txt /media/boot/ |
|
|
Unmount eMMC:
$ sync $ sudo umount /media/boot $ sudo umount /media/rootfs |
Flash boot file
$ sudo dd if=flash.bin of=${DISK} bs=1024 seek=32 |
Switch your Boot Select to eMMC and you will be able to boot up from eMMC now.
For playing video, we can use three solutions to support it.
a) # gplay-1.0 <video file>
b) # gst-launch-1.0 playbin uri=file://<video absolute path>
c) ( 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
The BSP includes NXP 88W8997 wifi chipset. Users can choose mPCIe or M.2 key E form factor wifi modules based on NXP 88W8997 chipset.
M.2 Form Factor:
AzureWave P/N: AW-CM276MA-PUR
Laird Connectivity P/N: 60-2230C
Embedded Artists 1YM M.2 Module
mPCIe Factor:
Globascale Technologies NXP 88W8997 2x2 WiFi 802.11ac+BT 5.0 mini PCIe Card w/ Two External SMA Antennas
Boot up the device and load the driver modules in the kernel.
|
Verify that the module is now visible to the system.
|
In case you need to see which network and you can scan it and select the one you need.
|
Identify the network and add it to the WPA supplicant file.
|
|
Associate the Wi-Fi with config
|
Check if you have right SSID associated.
|
Use DHCP to get IP
|
You should be able to ping local network now.
|
Modify /etc/resolv.conf of your preference, you will be able to ping out.
|
|
|
version 1.0a, 08/10/2023
Last updated 2023-08-10