Building Bootable Linux Images |
|
This application note explains how to build the bootable Linux images for the Emcraft i.MX 8M System-On-Module from the Yocto distribution. Step through the following procedure:
- Download the NXP Linux L4.9.88_2.0.0 BSP & Multimedia Codecs Documentation from here.
- Unpack the documentation bundle. Refer to the i.MX Yocto Project User's Guide on how to set up the build host. Emcraft has explicitly verified that the build works on the Fedora 26 and Fedora 27 hosts.
- Set up Yocto build environment as per Section 4 of the document.
- Download the Emcraft i.MX 8M add-on Yocto layer.
- Unpack the meta-emcraft tarball in the sources/ directory. Your sources/ directory should look as follows:
[psl@i7 sources]$ ls -l
total 40
drwxrwxr-x. 4 psl psl 4096 Feb 5 17:31 base
drwxrwxr-x. 8 psl psl 4096 Feb 5 17:31 meta-browser
drwxrwxr-x. 9 psl psl 4096 Feb 5 15:18 meta-emcraft
drwxrwxr-x. 21 psl psl 4096 Feb 5 17:31 meta-freescale
drwxrwxr-x. 7 psl psl 4096 Feb 5 17:31 meta-freescale-3rdparty
drwxrwxr-x. 6 psl psl 4096 Feb 5 17:31 meta-freescale-distro
drwxrwxr-x. 4 psl psl 4096 Feb 5 17:31 meta-fsl-bsp-release
drwxrwxr-x. 18 psl psl 4096 Feb 5 17:31 meta-openembedded
drwxrwxr-x. 11 psl psl 4096 Feb 5 17:31 meta-qt5
drwxrwxr-x. 12 psl psl 4096 Feb 5 17:31 poky
[psl@i7 sources]$
- Being the i.MX Yocto top-level direcory, setup the build directory:
[psl@i7 fsl-arm-yocto-bsp]$ DISTRO=fsl-imx-wayland MACHINE=imx8m-som \
source fsl-setup-release.sh -b build-20180308
- Copy meta-emcraft/conf/local.conf.sample as conf/local.conf to your build directory:
[psl@i7 build-20180308]$ cp ../sources/meta-emcraft/conf/local.conf.sample \
conf/local.conf
- Edit conf/local.conf and adjust the DL_DIR variable to an arbitrary directory on your host. This is where Yocto will download the packages for the build.
- Add meta-emcraft to the end of conf/bblayers.conf:
...
BBLAYERS += " ${BSPDIR}/sources/meta-openembedded/meta-filesystems "
BBLAYERS += " ${BSPDIR}/sources/meta-qt5 "
BBLAYERS += " ${BSPDIR}/sources/meta-emcraft "
- Build the bootable U-Boot, Linux images and root filesystem:
[psl@i7 build-20180308]$ bitbake linux-imx u-boot-imx imx-mkimage imx-boot
[psl@i7 build-20180308]$ bitbake emcraft-rootfs
- Ouput of the build will be in tmp/deploy/images/imx8m-som:
- Image - Linux kernel image;
- Image-imx8m-som.dtb - Linux Device Tree Blob (.dtb) image;
- imx-boot-imx8m-som-sd.bin - U-Boot image;
- emcraft-rootfs-imx8m-som.tar.bz2 - Linux root filesystem image.
|