How to build core-image-minimal with meta-freescale/poky for an imx8mmevk board?

Introduction

This work is sponsored by Reliable Embedded Systems. You can find more information about our training/consulting services here.

Objectives

So you want to get away from the funny golden NXP SDK? I can totally understand that. Now we will be without funny setup scripts, we need to do it the "standard" Yocto/OE way. Are you ready?

Install my build environment

If not don't complain to me that something didn't work as outlined here. Watch the video on how to install it:

 
Having said that - it should also work without my build environment. I just didn't test it like that. I will give you hints which layers to check out without it.

You didn't follow my instructions - Get two layers manually

If you did what I told you to do you already have poky and meta-freescale (and loads of other layers) in /workdir/sources. If not you are on your own and need to check them out manually.
 
student@e450-tr1:~⟫ cd /workdir/sources
student@e450-tr1:/workdir/sources$ git clone --branch dunfell git://git.yoctoproject.org/poky
student@e450-tr1:/workdir/sources$ git clone --branch dunfell git://github.com/Freescale/meta-freescale.git
student@e450-tr1:/workdir/sources$ 

Build setup

I describe the steps with my build environment. You can interpolate how this will work with yours if you didn't follow my steps so far.

I build in /workdir/build/<something>. Since we want to build for an imx8mmevk board we'll build in /workdir/build/imx8mmevk.

Enter my build docker container and source oe-init-build-env

Please note that whenever you see "student" on the shell prompt we are on a host machine and whenever you see "pokyuser" we are in a docker build container.

student@e450-tr1:/workdir$ ./resy-poky-container.sh 
+ docker pull reliableembeddedsystems/poky-container:2020-07-26-master-local-gcc-9-gui-ub18
2020-07-26-master-local-gcc-9-gui-ub18: Pulling from reliableembeddedsystems/poky-container
Digest: sha256:9c8f984136026066a2ab27df09bc8b29a829b2c91ed86d957c4b9d156873c5ee
Status: Image is up to date for reliableembeddedsystems/poky-container:2020-07-26-master-local-gcc-9-gui-ub18
docker.io/reliableembeddedsystems/poky-container:2020-07-26-master-local-gcc-9-gui-ub18
+ set +x
 -- interactive mode --
source /workdir/resy-cooker.sh in container
+ press <ENTER> to go on

+ docker run --name poky_container --rm -it -v /home/student/projects:/projects -v /opt:/nfs -v /workdir:/workdir -v /workdir:/workdir reliableembeddedsystems/poky-container:2020-07-26-master-local-gcc-9-gui-ub18 --workdir=/workdir
pokyuser@50ef4b00e8ec:/workdir$ cd /workdir/build
pokyuser@50ef4b00e8ec:/workdir/build$ source /workdir/sources/poky/oe-init-build-env imx8mmevk
You had no conf/local.conf file. This configuration file has therefore been
created for you with some default values. You may wish to edit it to, for
example, select a different MACHINE (target hardware). See conf/local.conf
for more information as common configuration options are commented.

You had no conf/bblayers.conf file. This configuration file has therefore been
created for you with some default values. To add additional metadata layers
into your configuration please add entries to conf/bblayers.conf.

The Yocto Project has extensive documentation about OE including a reference
manual which can be found at:
    http://yoctoproject.org/documentation

For more information about OpenEmbedded see their website:
    http://www.openembedded.org/


### Shell environment set up for builds. ###

You can now run 'bitbake <target>'

Common targets are:
    core-image-minimal
    core-image-sato
    meta-toolchain
    meta-ide-support

You can also run generated qemu images with a command like 'runqemu qemux86'


Other commonly useful commands are:
 - 'devtool' and 'recipetool' handle common recipe tasks
 - 'bitbake-layers' handles common layer tasks
 - 'oe-pkgdata-util' handles common target package tasks
pokyuser@50ef4b00e8ec:/workdir/build/imx8mmevk$ 

Inspect the auto generated directory structure

The first time you run this it creates for you this structure:
 
pokyuser@50ef4b00e8ec:/workdir/build/imx8mmevk$ tree /workdir/build/imx8mmevk
/workdir/build/imx8mmevk
└── conf
    ├── bblayers.conf
    ├── local.conf
    └── templateconf.cfg

1 directory, 3 files
pokyuser@50ef4b00e8ec:/workdir/build/imx8mmevk$
 
That's a good start, structure wise, but we need to configure it now to build for the imx8mmevk board.

MACHINE configuration

The machine configuration for this board is here:
 
pokyuser@50ef4b00e8ec:/workdir/build/imx8mmevk$ find /workdir/sources/meta-freescale/ | grep imx8mmevk
/workdir/sources/meta-freescale/conf/machine/imx8mmevk.conf
pokyuser@50ef4b00e8ec:/workdir/build/imx8mmevk$ 

git magic

You don't just want to type what you see here, but maybe understand what you are doing. Right? So before we start changing things let's put the conf directory under version control so we can track what changed and why:
 
pokyuser@50ef4b00e8ec:/workdir/build/imx8mmevk$ cd conf/
pokyuser@50ef4b00e8ec:/workdir/build/imx8mmevk/conf$ ls
bblayers.conf  local.conf  templateconf.cfg
pokyuser@50ef4b00e8ec:/workdir/build/imx8mmevk/conf$ git init
Initialized empty Git repository in /workdir/build/imx8mmevk/conf/.git/
pokyuser@50ef4b00e8ec:/workdir/build/imx8mmevk/conf$ git add .
pokyuser@50ef4b00e8ec:/workdir/build/imx8mmevk/conf$ git commit -m "initial commit"
[master (root-commit) 7ce64e7] initial commit
 3 files changed, 280 insertions(+)
 create mode 100644 bblayers.conf
 create mode 100644 local.conf
 create mode 100644 templateconf.cfg
pokyuser@50ef4b00e8ec:/workdir/build/imx8mmevk/conf$ 

Let's change the MACHINE to build for the imx8mmevk board and I would like to use ipk instead of rpm as a package manager. The second change is optional. The MACHINE needs to be changed accordingly unless you want to build for some qemux86-64.

pokyuser@50ef4b00e8ec:/workdir/build/imx8mmevk/conf$ git tag "01-initial-commit"
pokyuser@50ef4b00e8ec:/workdir/build/imx8mmevk/conf$ vim local.conf
pokyuser@50ef4b00e8ec:/workdir/build/imx8mmevk/conf$ git diff
diff --git a/local.conf b/local.conf
index b555f1d..b88d8fa 100644
--- a/local.conf
+++ b/local.conf
@@ -35,6 +35,7 @@
 #
 # This sets the default machine to be qemux86-64 if no other machine is selected:
 MACHINE ??= "qemux86-64"
+MACHINE = "imx8mmevk"
 
 #
 # Where to place downloads
@@ -104,7 +105,7 @@ DISTRO ?= "poky"
 #  - 'package_rpm' for rpm style packages
 # E.g.: PACKAGE_CLASSES ?= "package_rpm package_deb package_ipk"
 # We default to rpm:
-PACKAGE_CLASSES ?= "package_rpm"
+PACKAGE_CLASSES ?= "package_ipk"
 
 #
 # SDK target architecture
pokyuser@50ef4b00e8ec:/workdir/build/imx8mmevk/conf$ git add local.conf
pokyuser@50ef4b00e8ec:/workdir/build/imx8mmevk/conf$ git commit -m "imx8mmevk, rpm->ipk"
[master 5fb334f] imx8mmevk, rpm->ipk
 1 file changed, 2 insertions(+), 1 deletion(-)
pokyuser@50ef4b00e8ec:/workdir/build/imx8mmevk/conf$ git tag "02-imx8mmevk-ipk"
pokyuser@50ef4b00e8ec:/workdir/build/imx8mmevk/conf$ 

(optional) site.conf

I'll add a site.conf, which is optional and if you want to do that you will need to adjust it to your needs. If you don't know what a site.conf is just skip this step.
 
If you know what site.conf, is and would like to see how mine looks like check here.

Add the meta-freescale layer

pokyuser@50ef4b00e8ec:/workdir/build/imx8mmevk$ pushd conf
/workdir/build/imx8mmevk/conf /workdir/build/imx8mmevk
pokyuser@50ef4b00e8ec:/workdir/build/imx8mmevk/conf$ git add bblayers.conf 
pokyuser@50ef4b00e8ec:/workdir/build/imx8mmevk/conf$ git commit -m "meta-freescale added"
[master 34bbbe9] meta-freescale added
 1 file changed, 1 insertion(+)
pokyuser@50ef4b00e8ec:/workdir/build/imx8mmevk/conf$ git tag 04-meta-freescale
pokyuser@50ef4b00e8ec:/workdir/build/imx8mmevk/conf$ git diff HEAD^
diff --git a/bblayers.conf b/bblayers.conf
index d7ea0f4..09d5626 100644
--- a/bblayers.conf
+++ b/bblayers.conf
@@ -9,4 +9,5 @@ BBLAYERS ?= " \
   /workdir/sources/poky/meta \
   /workdir/sources/poky/meta-poky \
   /workdir/sources/poky/meta-yocto-bsp \
+  /workdir/sources/meta-freescale \
   "
pokyuser@50ef4b00e8ec:/workdir/build/imx8mmevk/conf$ popd
/workdir/build/imx8mmevk
pokyuser@50ef4b00e8ec:/workdir/build/imx8mmevk$ 

meta-freescale dependencies (Bitbake first attempt)

The meta-freescale layer will need some more layers (which you can also see in the readme of it). But let's see what will happen when we start a build:
 
pokyuser@50ef4b00e8ec:/workdir/build/imx8mmevk$ bitbake core-image-minimal
NOTE: Started PRServer with DBfile: /workdir/build/imx8mmevk/cache/prserv.sqlite3, IP: 127.0.0.1, PORT: 43931, PID: 151
Parsing recipes: 100% |#######################################################################################################################################| Time: 0:00:35
Parsing of 907 .bb files complete (0 cached, 907 parsed). 1467 targets, 133 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies
ERROR: Nothing PROVIDES 'python3-pycrypto-native' (but /workdir/sources/meta-freescale/recipes-security/optee-imx/optee-os_3.2.0.imx.bb DEPENDS on or otherwise requires it). Close matches:
  python3-pycairo-native
  python3-pycryptodome-native
  python3-pycryptodomex-native
ERROR: Required build target 'core-image-minimal' has no buildable providers.
Missing or unbuildable dependency chain was: ['core-image-minimal', 'imx-boot', 'optee-os', 'python3-pycrypto-native']

Summary: There were 2 ERROR messages shown, returning a non-zero exit code.
pokyuser@50ef4b00e8ec:/workdir/build/imx8mmevk$ 

meta-python3 (meta-openembedded/meta-python) is needed and meta-openembedded/meta-python needs meta-openembedded/meta-oe. Hint: https://github.com/openembedded/meta-openembedded/tree/dunfell if you still don't want to use my build environment. 

I know you don't follow my instructions, since they might even work. Manually you clone like this:

student@e450-tr1:/workdir/build/imx8mmtest⟫ cd /workdir/sources/
student@e450-tr1:/workdir/sources⟫ git clone --branch dunfell  git://github.com/openembedded/meta-openembedded.git
student@e450-tr1:/workdir/sources⟫ 

Let's add the additional layers (dependencies):
 
pokyuser@50ef4b00e8ec:/workdir/build$ cd /workdir/build/imx8mmevk
pokyuser@50ef4b00e8ec:/workdir/build/imx8mmevk$ bitbake-layers add-layer /workdir/sources/meta-openembedded/meta-oe/
NOTE: Starting bitbake server...
pokyuser@50ef4b00e8ec:/workdir/build/imx8mmevk$ bitbake-layers add-layer /workdir/sources/meta-openembedded/meta-python
NOTE: Starting bitbake server...
pokyuser@50ef4b00e8ec:/workdir/build/imx8mmevk$ pushd conf
/workdir/build/imx8mmevk/conf /workdir/build/imx8mmevk
pokyuser@50ef4b00e8ec:/workdir/build/imx8mmevk/conf$ git add bblayers.conf 
pokyuser@50ef4b00e8ec:/workdir/build/imx8mmevk/conf$ git commit -m "meta-python3 added"
[master cd5798b] meta-python3 added
 1 file changed, 2 insertions(+)
pokyuser@50ef4b00e8ec:/workdir/build/imx8mmevk/conf$ git tag "05-python3-added"
pokyuser@50ef4b00e8ec:/workdir/build/imx8mmevk/conf$ git diff HEAD^
diff --git a/bblayers.conf b/bblayers.conf
index 09d5626..a033a5d 100644
--- a/bblayers.conf
+++ b/bblayers.conf
@@ -10,4 +10,6 @@ BBLAYERS ?= " \
   /workdir/sources/poky/meta-poky \
   /workdir/sources/poky/meta-yocto-bsp \
   /workdir/sources/meta-freescale \
+  /workdir/sources/meta-openembedded/meta-oe \
+  /workdir/sources/meta-openembedded/meta-python \
   "
pokyuser@50ef4b00e8ec:/workdir/build/imx8mmevk/conf$ popd
/workdir/build/imx8mmevk
pokyuser@50ef4b00e8ec:/workdir/build/imx8mmevk$ 

Bitbake it

Bitbake second attempt

Now we can give it another try to build and it should bring us a step further:

pokyuser@50ef4b00e8ec:/workdir/build/imx8mmevk$ bitbake core-image-minimal
NOTE: Started PRServer with DBfile: /workdir/build/imx8mmevk/cache/prserv.sqlite3, IP: 127.0.0.1, PORT: 45139, PID: 218
Parsing recipes: 100% |#######################################################################################################################################| Time: 0:01:03
Parsing of 2041 .bb files complete (0 cached, 2041 parsed). 3125 targets, 191 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies

Build Configuration:
BB_VERSION           = "1.46.0"
BUILD_SYS            = "x86_64-linux"
NATIVELSBSTRING      = "ubuntu-18.04"
TARGET_SYS           = "aarch64-poky-linux"
MACHINE              = "imx8mmevk"
DISTRO               = "poky"
DISTRO_VERSION       = "3.1.2"
TUNE_FEATURES        = "aarch64 cortexa53 crc crypto"
TARGET_FPU           = ""
meta                 
meta-poky            
meta-yocto-bsp       = "2020-08-28-dunfell-3.1.2+:d3d80fa6fbf15189f6183a33c95fa90053535ae2"
meta-freescale       = "2020-08-28-dunfell:3fc701d11b4b096ba016110c83fe1b48c5f3a256"
meta-oe              
meta-python          = "2020-04-30-dunfell-3.1:17fd382f3467e20308924499b7531ae8b789f056"

Initialising tasks: 100% |####################################################################################################################################| Time: 0:00:02
Sstate summary: Wanted 1127 Found 285 Missed 842 Current 0 (25% match, 0% complete)

Freescale EULA

But of course there is (at least) one more problem to deal with:

pokyuser@50ef4b00e8ec:/workdir/build/imx8mmevk$ bitbake core-image-minimal
NOTE: Started PRServer with DBfile: /workdir/build/imx8mmevk/cache/prserv.sqlite3, IP: 127.0.0.1, PORT: 45139, PID: 218
Parsing recipes: 100% |#######################################################################################################################################| Time: 0:01:03
Parsing of 2041 .bb files complete (0 cached, 2041 parsed). 3125 targets, 191 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies

Build Configuration:
BB_VERSION           = "1.46.0"
BUILD_SYS            = "x86_64-linux"
NATIVELSBSTRING      = "ubuntu-18.04"
TARGET_SYS           = "aarch64-poky-linux"
MACHINE              = "imx8mmevk"
DISTRO               = "poky"
DISTRO_VERSION       = "3.1.2"
TUNE_FEATURES        = "aarch64 cortexa53 crc crypto"
TARGET_FPU           = ""
meta                 
meta-poky            
meta-yocto-bsp       = "2020-08-28-dunfell-3.1.2+:d3d80fa6fbf15189f6183a33c95fa90053535ae2"
meta-freescale       = "2020-08-28-dunfell:3fc701d11b4b096ba016110c83fe1b48c5f3a256"
meta-oe              
meta-python          = "2020-04-30-dunfell-3.1:17fd382f3467e20308924499b7531ae8b789f056"

Initialising tasks: 100% |####################################################################################################################################| Time: 0:00:02
Sstate summary: Wanted 1127 Found 285 Missed 842 Current 0 (25% match, 0% complete)
NOTE: Executing Tasks
ERROR: firmware-imx-8m-8.5-r0 do_unpack: To use 'firmware-imx-8m' you need to accept the Freescale EULA at '/workdir/sources/meta-freescale/EULA'. Please read it and in case you accept it, write: ACCEPT_FSL_EULA = "1" in your local.conf.
ERROR: Logfile of failure stored in: /workdir/build/imx8mmevk/tmp/work/aarch64-mx8mm-poky-linux/firmware-imx-8m/8.5-r0/temp/log.do_unpack.65663
ERROR: Task (/workdir/sources/meta-freescale/recipes-bsp/firmware-imx/firmware-imx-8m_8.5.bb:do_unpack) failed with exit code '1'
Waiting for 1 running tasks to finish:
0: linux-fslc-imx-5.4.58+gitAUTOINC+74731e66e7-r0 do_fetch (pid 4350)

So let's carefully read the Freescale EULA and if we really agree to it we add ACCEPT_FSL_EULA = "1" to local.conf just like the ERROR message above suggests.
 
pokyuser@50ef4b00e8ec:/workdir/build/imx8mmevk$ cd conf/
pokyuser@50ef4b00e8ec:/workdir/build/imx8mmevk/conf$ vim local.conf
pokyuser@50ef4b00e8ec:/workdir/build/imx8mmevk/conf$ git add local.conf 
pokyuser@50ef4b00e8ec:/workdir/build/imx8mmevk/conf$ git commit -m "agree to EULA"
[master 3e625f0] agree to EULA
 1 file changed, 2 insertions(+)
pokyuser@50ef4b00e8ec:/workdir/build/imx8mmevk/conf$ git tag "06-agree-to-EULA"
pokyuser@50ef4b00e8ec:/workdir/build/imx8mmevk/conf$ git diff HEAD^
diff --git a/local.conf b/local.conf
index b88d8fa..2e07b68 100644
--- a/local.conf
+++ b/local.conf
@@ -266,3 +266,5 @@ PACKAGECONFIG_append_pn-qemu-system-native = " sdl"
 # track the version of this file when it was generated. This can safely be ignored if
 # this doesn't mean anything to you.
 CONF_VERSION = "1"
+
+ACCEPT_FSL_EULA = "1"
pokyuser@50ef4b00e8ec:/workdir/build/imx8mmevk/conf$ cd ..
pokyuser@50ef4b00e8ec:/workdir/build/imx8mmevk$ 

What did we change to make it work? 

bblayers.conf

Let's see what we changed in bblayers.conf:
 
pokyuser@50ef4b00e8ec:/workdir/build/imx8mmevk$ cd conf/
pokyuser@50ef4b00e8ec:/workdir/build/imx8mmevk/conf$ git tag -l
01-initial-commit
02-imx8mmevk-ipk
03-site-conf
04-meta-freescale
05-python3-added
06-agree-to-EULA
pokyuser@50ef4b00e8ec:/workdir/build/imx8mmevk/conf$ ls
bblayers.conf  local.conf  site.conf  templateconf.cfg
pokyuser@50ef4b00e8ec:/workdir/build/imx8mmevk/conf$ git diff 01-initial-commit..06-agree-to-EULA bblayers.conf
diff --git a/bblayers.conf b/bblayers.conf
index d7ea0f4..a033a5d 100644
--- a/bblayers.conf
+++ b/bblayers.conf
@@ -9,4 +9,7 @@ BBLAYERS ?= " \
   /workdir/sources/poky/meta \
   /workdir/sources/poky/meta-poky \
   /workdir/sources/poky/meta-yocto-bsp \
+  /workdir/sources/meta-freescale \
+  /workdir/sources/meta-openembedded/meta-oe \
+  /workdir/sources/meta-openembedded/meta-python \
   "
pokyuser@50ef4b00e8ec:/workdir/build/imx8mmevk/conf$ 

local.conf

And what we changed in local.conf:
 
pokyuser@50ef4b00e8ec:/workdir/build/imx8mmevk/conf$ git diff 01-initial-commit..06-agree-to-EULA local.conf
diff --git a/local.conf b/local.conf
index b555f1d..2e07b68 100644
--- a/local.conf
+++ b/local.conf
@@ -35,6 +35,7 @@
 #
 # This sets the default machine to be qemux86-64 if no other machine is selected:
 MACHINE ??= "qemux86-64"
+MACHINE = "imx8mmevk"
 
 #
 # Where to place downloads
@@ -104,7 +105,7 @@ DISTRO ?= "poky"
 #  - 'package_rpm' for rpm style packages
 # E.g.: PACKAGE_CLASSES ?= "package_rpm package_deb package_ipk"
 # We default to rpm:
-PACKAGE_CLASSES ?= "package_rpm"
+PACKAGE_CLASSES ?= "package_ipk"
 
 #
 # SDK target architecture
@@ -265,3 +266,5 @@ PACKAGECONFIG_append_pn-qemu-system-native = " sdl"
 # track the version of this file when it was generated. This can safely be ignored if
 # this doesn't mean anything to you.
 CONF_VERSION = "1"
+
+ACCEPT_FSL_EULA = "1"
pokyuser@50ef4b00e8ec:/workdir/build/imx8mmevk/conf$ 

Hopefully final Bitbake

Let's bitbake it now:
 
pokyuser@50ef4b00e8ec:/workdir/build/imx8mmevk$ bitbake core-image-minimal
NOTE: Started PRServer with DBfile: /workdir/build/imx8mmevk/cache/prserv.sqlite3, IP: 127.0.0.1, PORT: 38053, PID: 78821
Parsing recipes: 100% |#######################################################################################################################################| Time: 0:00:53
Parsing of 2041 .bb files complete (0 cached, 2041 parsed). 3125 targets, 191 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies

Build Configuration:
BB_VERSION           = "1.46.0"
BUILD_SYS            = "x86_64-linux"
NATIVELSBSTRING      = "universal"
TARGET_SYS           = "aarch64-poky-linux"
MACHINE              = "imx8mmevk"
DISTRO               = "poky"
DISTRO_VERSION       = "3.1.2"
TUNE_FEATURES        = "aarch64 cortexa53 crc crypto"
TARGET_FPU           = ""
meta                 
meta-poky            
meta-yocto-bsp       = "2020-08-28-dunfell-3.1.2+:d3d80fa6fbf15189f6183a33c95fa90053535ae2"
meta-freescale       = "2020-08-28-dunfell:3fc701d11b4b096ba016110c83fe1b48c5f3a256"
meta-oe              
meta-python          = "2020-04-30-dunfell-3.1:17fd382f3467e20308924499b7531ae8b789f056"

Initialising tasks: 100% |####################################################################################################################################| Time: 0:00:02
Sstate summary: Wanted 755 Found 0 Missed 755 Current 372 (0% match, 33% complete)
NOTE: Executing Tasks
NOTE: Tasks Summary: Attempted 2965 tasks of which 1323 didn't need to be rerun and all succeeded.
NOTE: Writing buildhistory
NOTE: Writing buildhistory took: 6 seconds
pokyuser@50ef4b00e8ec:/workdir/build/imx8mmevk$ 

And here is the build output:

pokyuser@50ef4b00e8ec:/workdir/build/imx8mmevk$ ls -lah tmp/deploy/images/imx8mmevk/
total 230M
drwxr-xr-x 3 pokyuser pokyuser 4.0K Sep  3 00:06 .
drwxr-xr-x 3 pokyuser pokyuser 4.0K Sep  2 23:19 ..
-rw-r--r-- 2 pokyuser pokyuser 1.6K Sep  3 00:06 core-image-minimal.env
-rw-r--r-- 2 pokyuser pokyuser  798 Sep  3 00:06 core-image-minimal-imx8mmevk-20200902221651.rootfs.manifest
-rw-r--r-- 2 pokyuser pokyuser 3.1K Sep  3 00:06 core-image-minimal-imx8mmevk-20200902221651.rootfs.wic.bmap
-rw-r--r-- 2 pokyuser pokyuser  15M Sep  3 00:06 core-image-minimal-imx8mmevk-20200902221651.rootfs.wic.gz
-rw-r--r-- 2 pokyuser pokyuser 309K Sep  3 00:06 core-image-minimal-imx8mmevk-20200902221651.testdata.json
lrwxrwxrwx 2 pokyuser pokyuser   59 Sep  3 00:06 core-image-minimal-imx8mmevk.manifest -> core-image-minimal-imx8mmevk-20200902221651.rootfs.manifest
lrwxrwxrwx 2 pokyuser pokyuser   57 Sep  3 00:06 core-image-minimal-imx8mmevk.testdata.json -> core-image-minimal-imx8mmevk-20200902221651.testdata.json
lrwxrwxrwx 2 pokyuser pokyuser   59 Sep  3 00:06 core-image-minimal-imx8mmevk.wic.bmap -> core-image-minimal-imx8mmevk-20200902221651.rootfs.wic.bmap
lrwxrwxrwx 2 pokyuser pokyuser   57 Sep  3 00:06 core-image-minimal-imx8mmevk.wic.gz -> core-image-minimal-imx8mmevk-20200902221651.rootfs.wic.gz
-rw-r--r-- 2 pokyuser pokyuser  961 Sep  3 00:06 core-image-minimal-imx-imx-boot-bootpart.wks
lrwxrwxrwx 2 pokyuser pokyuser   63 Sep  2 23:52 Image -> Image--5.4.58+git0+74731e66e7-r0.2-imx8mmevk-20200902221651.bin
-rw-r--r-- 2 pokyuser pokyuser  26M Sep  2 23:52 Image--5.4.58+git0+74731e66e7-r0.2-imx8mmevk-20200902221651.bin
lrwxrwxrwx 2 pokyuser pokyuser   63 Sep  2 23:52 Image-imx8mmevk.bin -> Image--5.4.58+git0+74731e66e7-r0.2-imx8mmevk-20200902221651.bin
-rw-r--r-- 2 pokyuser pokyuser  44K Sep  2 23:56 imx8mm-ddr4-evk--5.4.58+git0+74731e66e7-r0.2-imx8mmevk-20200902221651.dtb
lrwxrwxrwx 2 pokyuser pokyuser   73 Sep  2 23:56 imx8mm-ddr4-evk.dtb -> imx8mm-ddr4-evk--5.4.58+git0+74731e66e7-r0.2-imx8mmevk-20200902221651.dtb
lrwxrwxrwx 2 pokyuser pokyuser   73 Sep  2 23:56 imx8mm-ddr4-evk-imx8mmevk.dtb -> imx8mm-ddr4-evk--5.4.58+git0+74731e66e7-r0.2-imx8mmevk-20200902221651.dtb
-rw-r--r-- 2 pokyuser pokyuser  44K Sep  2 23:56 imx8mm-ddr4-evk-revb--5.4.58+git0+74731e66e7-r0.2-imx8mmevk-20200902221651.dtb
lrwxrwxrwx 2 pokyuser pokyuser   78 Sep  2 23:56 imx8mm-ddr4-evk-revb.dtb -> imx8mm-ddr4-evk-revb--5.4.58+git0+74731e66e7-r0.2-imx8mmevk-20200902221651.dtb
lrwxrwxrwx 2 pokyuser pokyuser   78 Sep  2 23:56 imx8mm-ddr4-evk-revb-imx8mmevk.dtb -> imx8mm-ddr4-evk-revb--5.4.58+git0+74731e66e7-r0.2-imx8mmevk-20200902221651.dtb
-rw-r--r-- 2 pokyuser pokyuser  44K Sep  2 23:56 imx8mm-ddr4-evk-revb-rm67191--5.4.58+git0+74731e66e7-r0.2-imx8mmevk-20200902221651.dtb
lrwxrwxrwx 2 pokyuser pokyuser   86 Sep  2 23:56 imx8mm-ddr4-evk-revb-rm67191.dtb -> imx8mm-ddr4-evk-revb-rm67191--5.4.58+git0+74731e66e7-r0.2-imx8mmevk-20200902221651.dtb
lrwxrwxrwx 2 pokyuser pokyuser   86 Sep  2 23:56 imx8mm-ddr4-evk-revb-rm67191-imx8mmevk.dtb -> imx8mm-ddr4-evk-revb-rm67191--5.4.58+git0+74731e66e7-r0.2-imx8mmevk-20200902221651.dtb
-rw-r--r-- 2 pokyuser pokyuser  44K Sep  2 23:56 imx8mm-ddr4-evk-rm67191--5.4.58+git0+74731e66e7-r0.2-imx8mmevk-20200902221651.dtb
lrwxrwxrwx 2 pokyuser pokyuser   81 Sep  2 23:56 imx8mm-ddr4-evk-rm67191.dtb -> imx8mm-ddr4-evk-rm67191--5.4.58+git0+74731e66e7-r0.2-imx8mmevk-20200902221651.dtb
lrwxrwxrwx 2 pokyuser pokyuser   81 Sep  2 23:56 imx8mm-ddr4-evk-rm67191-imx8mmevk.dtb -> imx8mm-ddr4-evk-rm67191--5.4.58+git0+74731e66e7-r0.2-imx8mmevk-20200902221651.dtb
-rw-r--r-- 2 pokyuser pokyuser  43K Sep  2 23:56 imx8mm-evk--5.4.58+git0+74731e66e7-r0.2-imx8mmevk-20200902221651.dtb
-rw-r--r-- 2 pokyuser pokyuser  43K Sep  2 23:56 imx8mm-evk-ak4497--5.4.58+git0+74731e66e7-r0.2-imx8mmevk-20200902221651.dtb
lrwxrwxrwx 2 pokyuser pokyuser   75 Sep  2 23:56 imx8mm-evk-ak4497.dtb -> imx8mm-evk-ak4497--5.4.58+git0+74731e66e7-r0.2-imx8mmevk-20200902221651.dtb
lrwxrwxrwx 2 pokyuser pokyuser   75 Sep  2 23:56 imx8mm-evk-ak4497-imx8mmevk.dtb -> imx8mm-evk-ak4497--5.4.58+git0+74731e66e7-r0.2-imx8mmevk-20200902221651.dtb
-rw-r--r-- 2 pokyuser pokyuser  43K Sep  2 23:56 imx8mm-evk-ak5558--5.4.58+git0+74731e66e7-r0.2-imx8mmevk-20200902221651.dtb
lrwxrwxrwx 2 pokyuser pokyuser   75 Sep  2 23:56 imx8mm-evk-ak5558.dtb -> imx8mm-evk-ak5558--5.4.58+git0+74731e66e7-r0.2-imx8mmevk-20200902221651.dtb
lrwxrwxrwx 2 pokyuser pokyuser   75 Sep  2 23:56 imx8mm-evk-ak5558-imx8mmevk.dtb -> imx8mm-evk-ak5558--5.4.58+git0+74731e66e7-r0.2-imx8mmevk-20200902221651.dtb
-rw-r--r-- 2 pokyuser pokyuser  43K Sep  2 23:56 imx8mm-evk-audio-tdm--5.4.58+git0+74731e66e7-r0.2-imx8mmevk-20200902221651.dtb
lrwxrwxrwx 2 pokyuser pokyuser   78 Sep  2 23:56 imx8mm-evk-audio-tdm.dtb -> imx8mm-evk-audio-tdm--5.4.58+git0+74731e66e7-r0.2-imx8mmevk-20200902221651.dtb
lrwxrwxrwx 2 pokyuser pokyuser   68 Sep  2 23:56 imx8mm-evk.dtb -> imx8mm-evk--5.4.58+git0+74731e66e7-r0.2-imx8mmevk-20200902221651.dtb
lrwxrwxrwx 2 pokyuser pokyuser   68 Sep  2 23:56 imx8mm-evk-imx8mmevk.dtb -> imx8mm-evk--5.4.58+git0+74731e66e7-r0.2-imx8mmevk-20200902221651.dtb
-rw-r--r-- 2 pokyuser pokyuser  24K Sep  2 23:56 imx8mm-evk-inmate--5.4.58+git0+74731e66e7-r0.2-imx8mmevk-20200902221651.dtb
lrwxrwxrwx 2 pokyuser pokyuser   75 Sep  2 23:56 imx8mm-evk-inmate.dtb -> imx8mm-evk-inmate--5.4.58+git0+74731e66e7-r0.2-imx8mmevk-20200902221651.dtb
lrwxrwxrwx 2 pokyuser pokyuser   75 Sep  2 23:56 imx8mm-evk-inmate-imx8mmevk.dtb -> imx8mm-evk-inmate--5.4.58+git0+74731e66e7-r0.2-imx8mmevk-20200902221651.dtb
-rw-r--r-- 2 pokyuser pokyuser  43K Sep  2 23:56 imx8mm-evk-revb--5.4.58+git0+74731e66e7-r0.2-imx8mmevk-20200902221651.dtb
lrwxrwxrwx 2 pokyuser pokyuser   73 Sep  2 23:56 imx8mm-evk-revb.dtb -> imx8mm-evk-revb--5.4.58+git0+74731e66e7-r0.2-imx8mmevk-20200902221651.dtb
lrwxrwxrwx 2 pokyuser pokyuser   73 Sep  2 23:56 imx8mm-evk-revb-imx8mmevk.dtb -> imx8mm-evk-revb--5.4.58+git0+74731e66e7-r0.2-imx8mmevk-20200902221651.dtb
-rw-r--r-- 2 pokyuser pokyuser  43K Sep  2 23:56 imx8mm-evk-rm67191--5.4.58+git0+74731e66e7-r0.2-imx8mmevk-20200902221651.dtb
lrwxrwxrwx 2 pokyuser pokyuser   76 Sep  2 23:56 imx8mm-evk-rm67191.dtb -> imx8mm-evk-rm67191--5.4.58+git0+74731e66e7-r0.2-imx8mmevk-20200902221651.dtb
lrwxrwxrwx 2 pokyuser pokyuser   76 Sep  2 23:56 imx8mm-evk-rm67191-imx8mmevk.dtb -> imx8mm-evk-rm67191--5.4.58+git0+74731e66e7-r0.2-imx8mmevk-20200902221651.dtb
-rw-r--r-- 2 pokyuser pokyuser  44K Sep  2 23:56 imx8mm-evk-root--5.4.58+git0+74731e66e7-r0.2-imx8mmevk-20200902221651.dtb
lrwxrwxrwx 2 pokyuser pokyuser   73 Sep  2 23:56 imx8mm-evk-root.dtb -> imx8mm-evk-root--5.4.58+git0+74731e66e7-r0.2-imx8mmevk-20200902221651.dtb
lrwxrwxrwx 2 pokyuser pokyuser   73 Sep  2 23:56 imx8mm-evk-root-imx8mmevk.dtb -> imx8mm-evk-root--5.4.58+git0+74731e66e7-r0.2-imx8mmevk-20200902221651.dtb
-rw-r--r-- 2 pokyuser pokyuser  44K Sep  2 23:56 imx8mm-evk-rpmsg--5.4.58+git0+74731e66e7-r0.2-imx8mmevk-20200902221651.dtb
lrwxrwxrwx 2 pokyuser pokyuser   74 Sep  2 23:56 imx8mm-evk-rpmsg.dtb -> imx8mm-evk-rpmsg--5.4.58+git0+74731e66e7-r0.2-imx8mmevk-20200902221651.dtb
lrwxrwxrwx 2 pokyuser pokyuser   74 Sep  2 23:56 imx8mm-evk-rpmsg-imx8mmevk.dtb -> imx8mm-evk-rpmsg--5.4.58+git0+74731e66e7-r0.2-imx8mmevk-20200902221651.dtb
lrwxrwxrwx 2 pokyuser pokyuser   35 Sep  3 00:00 imx-boot -> imx-boot-imx8mmevk-sd.bin-flash_evk
-rw-r--r-- 2 pokyuser pokyuser 1.5M Sep  3 00:00 imx-boot-imx8mmevk-sd.bin-flash_evk
drwxr-xr-x 2 pokyuser pokyuser 4.0K Sep  3 00:00 imx-boot-tools
-rw-r--r-- 2 pokyuser pokyuser 1.7K Sep  2 23:31 lpddr4_pmu_train_1d_dmem.bin
-rw-r--r-- 2 pokyuser pokyuser  32K Sep  2 23:31 lpddr4_pmu_train_1d_imem.bin
-rw-r--r-- 2 pokyuser pokyuser 1.4K Sep  2 23:31 lpddr4_pmu_train_2d_dmem.bin
-rw-r--r-- 2 pokyuser pokyuser  23K Sep  2 23:31 lpddr4_pmu_train_2d_imem.bin
-rw-r--r-- 2 pokyuser pokyuser 186M Sep  2 23:56 modules--5.4.58+git0+74731e66e7-r0.2-imx8mmevk-20200902221651.tgz
lrwxrwxrwx 2 pokyuser pokyuser   65 Sep  2 23:56 modules-imx8mmevk.tgz -> modules--5.4.58+git0+74731e66e7-r0.2-imx8mmevk-20200902221651.tgz
-rw-r--r-- 2 pokyuser pokyuser 103K Sep  2 23:31 signed_dp_imx8m.bin
-rw-r--r-- 2 pokyuser pokyuser 103K Sep  2 23:31 signed_hdmi_imx8m.bin
lrwxrwxrwx 2 pokyuser pokyuser   16 Sep  2 23:19 tee.bin -> tee.mx8mmevk.bin
-rwxr-xr-x 2 pokyuser pokyuser 319K Sep  2 23:19 tee.mx8mmevk.bin
lrwxrwxrwx 2 pokyuser pokyuser   24 Sep  2 23:31 u-boot.bin -> u-boot-sd-2019.04-r0.bin
lrwxrwxrwx 2 pokyuser pokyuser   24 Sep  2 23:31 u-boot.bin-sd -> u-boot-sd-2019.04-r0.bin
lrwxrwxrwx 2 pokyuser pokyuser   24 Sep  2 23:31 u-boot-imx8mmevk.bin -> u-boot-sd-2019.04-r0.bin
lrwxrwxrwx 2 pokyuser pokyuser   24 Sep  2 23:31 u-boot-imx8mmevk.bin-sd -> u-boot-sd-2019.04-r0.bin
lrwxrwxrwx 2 pokyuser pokyuser   46 Sep  2 23:31 u-boot-imx-initial-env-imx8mmevk-sd -> u-boot-imx-initial-env-imx8mmevk-sd-2019.04-r0
-rw-r--r-- 2 pokyuser pokyuser 2.3K Sep  2 23:31 u-boot-imx-initial-env-imx8mmevk-sd-2019.04-r0
lrwxrwxrwx 2 pokyuser pokyuser   46 Sep  2 23:31 u-boot-imx-initial-env-sd -> u-boot-imx-initial-env-imx8mmevk-sd-2019.04-r0
-rw-r--r-- 2 pokyuser pokyuser 724K Sep  2 23:31 u-boot-sd-2019.04-r0.bin
lrwxrwxrwx 2 pokyuser pokyuser   49 Sep  2 23:31 u-boot-spl.bin -> u-boot-spl.bin-imx8mmevk-2019.04-r0-sd-2019.04-r0
lrwxrwxrwx 2 pokyuser pokyuser   49 Sep  2 23:31 u-boot-spl.bin-imx8mmevk -> u-boot-spl.bin-imx8mmevk-2019.04-r0-sd-2019.04-r0
-rw-r--r-- 2 pokyuser pokyuser  95K Sep  2 23:31 u-boot-spl.bin-imx8mmevk-2019.04-r0-sd-2019.04-r0
lrwxrwxrwx 2 pokyuser pokyuser   49 Sep  2 23:31 u-boot-spl.bin-imx8mmevk-sd -> u-boot-spl.bin-imx8mmevk-2019.04-r0-sd-2019.04-r0
lrwxrwxrwx 2 pokyuser pokyuser   49 Sep  2 23:31 u-boot-spl.bin-sd -> u-boot-spl.bin-imx8mmevk-2019.04-r0-sd-2019.04-r0
pokyuser@50ef4b00e8ec:/workdir/build/imx8mmevk$

Write SD card

I would search for .wic files:
 
pokyuser@50ef4b00e8ec:/workdir/build/imx8mmevk$ ls -lah tmp/deploy/images/imx8mmevk/*wic*
-rw-r--r-- 2 pokyuser pokyuser 3.1K Sep  3 00:06 tmp/deploy/images/imx8mmevk/core-image-minimal-imx8mmevk-20200902221651.rootfs.wic.bmap
-rw-r--r-- 2 pokyuser pokyuser  15M Sep  3 00:06 tmp/deploy/images/imx8mmevk/core-image-minimal-imx8mmevk-20200902221651.rootfs.wic.gz
lrwxrwxrwx 2 pokyuser pokyuser   59 Sep  3 00:06 tmp/deploy/images/imx8mmevk/core-image-minimal-imx8mmevk.wic.bmap -> core-image-minimal-imx8mmevk-20200902221651.rootfs.wic.bmap
lrwxrwxrwx 2 pokyuser pokyuser   57 Sep  3 00:06 tmp/deploy/images/imx8mmevk/core-image-minimal-imx8mmevk.wic.gz -> core-image-minimal-imx8mmevk-20200902221651.rootfs.wic.gz
pokyuser@50ef4b00e8ec:/workdir/build/imx8mmevk$ 

... and flash them with the bmaptool[1] to an SD card:
 
 
e.g. sudo apt install bmap-tools

student@e450-tr1:/workdir/build/imx8mmevk$ pushd /workdir/build/imx8mmevk/tmp/deploy/images/imx8mmevk/
/workdir/build/imx8mmevk/tmp/deploy/images/imx8mmevk /workdir/build/imx8mmevk
student@e450-tr1:/workdir/build/imx8mmevk/tmp/deploy/images/imx8mmevk$ sudo bmaptool copy  core-image-minimal-imx8mmevk.wic.gz /dev/< device your SD card is>
student@e450-tr1:/workdir/build/imx8mmevk/tmp/deploy/images/imx8mmevk$ popd

Boot log

Zandrey, my brother in arms in the fight against evil and to put Open Source forward provided a boot log of the image I built here

Conclusion

It's not too hard if you know what you are doing. But for the unititiated it might be a big hurdle to build a simple image even if everything is ready made for you.    

Something does not work!

Do you use my build environment? If not - use it.

Still something does not work!

Does core-image-minimal build? If not - built it.

Still something does not work!

core-image-minimal builds, but does not run - send me a board and whenever I have time I can add it to my board farm see for myself ;)

For quicker response/other requests please contact me for training/consulting services here.

Comments

Popular posts from this blog

Yocto: BitBake and Dependencies - e.g. One recipe to use output of another recipe

Yocto: kernel modules not showing up in the rootfs

Compiler tunes benchmarks with the Yocto Project