This document provides instructions for advanced users how Embedian offers patches and builds Debian Buster for Embedian's SMARC-iMX8MM 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 recommended host environment is Ubuntu 16.04.
SMARC-iMX8MM from Embedian
EVK-STD-CARRIER-S20 (universal carrier board for all SMARC 2.0 modules) from Embedian
We recommend you use SSH keys to establish a secure connection between your computer and Embedian Gitlab server. To download u-boot and kernel source codes from Embedian server. You need to register from Embedian's Gitlab server and put your ssh public key there. 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 rsa -C "your_email@example.com" # Creates a new ssh key, using the provided email as a label # Generating public/private rsa key pair. # Enter file in which to save the key (/c/Users/you/.ssh/id_rsa): [Press enter] $ ssh-add id_rsa |
Now you need to enter a passphrase.
Enter passphrase (empty for no passphrase): [Type a passphrase] Enter same passphrase again: [Type passphrase again] |
Which should give you something like this:
Your identification has been saved in /c/Users/you/.ssh/id_rsa. Your public key has been saved in /c/Users/you/.ssh/id_rsa.pub. The key fingerprint is: 01:0f:f4:3b:ca:85:d6:17:a1:7d:f0:68:9d:f0:a2:db your_email@example.com |
Copy the key to your clipboard.
$ cat ~/.ssh/id_rsa.pub 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.
On Ubuntu machine:
$ sudo apt-get install binfmt-support qemu qemu-user-static debootstrap kpartx \
|
Download archive containing the build script and support files for building Debian Buster
$
$ |
This environment prepared to build.
If the LPDDR4 is 2GB on your SMARC module, the MACHINE name will be |
The internet connection in your host PC has to be available.
|
If the LPDDR4 is 2GB on your SMARC module, the MACHINE name will be
|
|
|
|
|
If the LPDDR4 is 2GB on your SMARC module, the MACHINE name will be |
|
where "/dev/sdX" is the SD block device in your host system. Shunt the "TEST#" pin of your device to Ground. Insert the SD card and you will see SMARC-iMX8MM booting with Debian Buster. Console port is defined on SER3.
The device tree file of SMARC-iMX8MM is fsl-smarcimx8mm.dtb |
For these instruction, we are assuming: DISK=/dev/mmcblk0, "lsblk" is very useful for determining the device id.
|
Erase SD card:
$ |
Create Partition Layout: Leave 2MB offset for flash.bin.
With util-linux v2.26, sfdisk was rewritten and is now based on libfdisk.
$ sudo sfdisk --version sfdisk from util-linux 2.27.1 |
Create Partitions:
$ sudo sfdisk ${DISK} <<-__EOF__ 2M , 48M , 0x83 ,* 50M,,, __EOF__ |
$ sudo sfdisk --in-order --Linux --unit M ${DISK} <<-__EOF__ 2, 48 , 0x83 ,* ,,,- __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/ |
Users need to shunt cross the TEST# pin to ground. In this way, SMARC-iMX8MM will always boot up from SD card.
Fuse flash.bin to the SD card.
$ cd ~/smarc_mx8_debian $ sudo dd if=output/imx-boot-sd.bin of=${DISK} bs=1024 seek=33 |
Copy uEnv.txt to the boot partition:
|
Copy Image to the boot partition:
|
|
The device tree name in your SD card has be to fsl-smarcimx8mm.dtb |
|
|
Remove SD card:
$ sync $ sudo umount /media/boot $ sudo umount /media/rootfs |
The resulted images are locared in ~/smarc_mx8_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 |
User Name | User Password | User Descriptor |
---|---|---|
root | root | system administrator |
user | user | local user |
x_user | used for X session access |
Shunt TEST# pin to Ground and boot up from your SD card. Run the following command as root
user.
|
To modify the kernel configuration (add/remove features and drivers). Please follow the step below.
|
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>
version 1.0a, 7/17/2020
Last updated 2020-07-17