type
status
date
slug
summary
tags
category
icon
password
How to Build Ubuntu for I-Pi SMARC IMX8M
This procedure describes how to create Ubuntu image with SD Card for I-Pi SMARC IMX8M Plus with 2G/4G Memory. The version of Ubuntu used is 20.04 (Focal Fossa).
Recommended Hardware
To setup the build environment for Ubuntu image creation, a Linux host with the following configuration is recommended.
- Intel Core-i7 processor (>= 4 cores)
- 8 GB RAM
- 1 TB disk space
- High speed network connectivity
- OS: Ubuntu 18.04 LTS/Ubuntu 16.04 LTS
Update apt repositories list on your host machine and install required packages.
Install kernel and u-boot dependencies.
Install buildroot dependencies.
Getting Started
The following are the steps required to generate Ubuntu image for I-Pi SMARC IMX8M Plus.
Step 1: Create a Ubuntu root file system.
Step 2: Downloading Yocto IMX8MP image.
Step 3: Replacing IMX8MP yocto image rootfs with Ubuntu 20.04 rootfs.
Note: Remember to download yocto image respective to memory. For example, Download 2G image, if you are building Ubuntu image for 2G memory and vice versa.
Step 1: Create a Ubuntu root file system
- Create a new working directory and change directory into it.
- Create a rootfs directory.
- Install deboot strap and its dependencies.
- Add required apt repositories to sources.list
- Configure the Rootfs, Add host name to /etc/hostname. Here is an example,
- Add host entry in /etc/hosts
- Prepare QEMU
- Get your network ready
- Mount the proc sys dev file systems
- Change root
- Add user name
- Install the required tools or utilities
- Configure locales
You will be prompted through GUI menu to make certain selections such as date/time/region. Please make the appropriate selections and proceed.
- Install ubuntu-desktop and necessary packages
- Clean up and exit from chroot
- Unmount the mounted files
- Remove emulator and resolv.conf file
- Use netplan to enable configurations in networking on the system
Create a01-network-manager-all.yaml file under /etc/neplan
- Add the following content, then save it.
#Let network manager manage all devices on this system
network:
version: 2
render: NetworkManager
- Make the Root File System
Execute the commands below to make the rootfs.img
Notice that you need change the “count” value according to the size of the “rootfs” folder
Below command will create new rootfs.img file of size 4 GB (3 GB)
Step 2: Downloading Yocto imx8mp image
Click Here to download the Yocto IMX8MP image
Unzip the file and flash the Image into SD card
(where X will give mounted device id)
Step 3: Replacing IMX8MP Yocto image rootfs with Ubuntu rootfs
- Unmount the mounted partitions.
Note: In our case, /dev/sdb is SD card device name.
- Run GParted in the command line.
Note: GParted is a free partition editor for graphically managing your disk partitions.
- Select SD card as highlighted in above corner in below picture.

img
- Select the rootfs partition and select resize option above. Partition 2 (/dev/sdc2) is the rootfs partition in below picture.
- Size of rootfs before resize as shown below.

img
- Increase the rootfs size i.e /dev/sdb2 here and click on resize button.

img
- Save changes and select apply.

img
- Close the GParted and eject SD card. Also connect your SD Card to the development Linux Host PC.

img
- Run lsblk command to get the path for mounted rootfs partition.

img
- Remove the existing contents as this filesystem is the default build root file system.
- Run the following commands to copy the contents of the Debian rootfs.img to the SD card.
- Eject the SD card. You can directly insert SD card and power on the system to boot using the SD card.
After boot, login to imx8mp user using password set in adduser command.
Note:
Use below command to create a Debian image from SD card.
Use the below command to compress the image from SD card.