This layer provides support for SolidRun's iMX8mp based platforms for use with OpenEmbedded and Yocto Freescale's BSP layer.
-
Create working folder for sources and build files:
$ mkdir imx-yocto $ cd imx-yocto
-
Get NXP Ycoto sources(require repo app):
$ repo init -u https://github.com/SolidRun/meta-solidrun-arm-imx8 -b kirkstone-imx8m -m sr-imx-5.15.71-2.2.0.xml $ repo sync
-
Add the meta-solidrun-arm-imx8 layer (curent git repository) into the sources directory, the directory layout should be like this:
. ├── sources │ ├── base │ ├── meta-browser │ ├── meta-freescale │ ├── meta-freescale-3rdparty │ ├── meta-freescale-distro │ ├── meta-fsl-bsp-release │ ├── meta-hailo │ ├── meta-openembedded │ ├── meta-qt5 │ ├── meta-rust │ ├── meta-solidrun-arm-imx8 │ ├── meta-timesys │ └── poky │ ├── downloads └── ...
-
Configure imx8mpsolidrun board, Distro for xwayland support and create the build environment: After running the following commands, you need to accept the EULA (scrool down and run "y")
$ DISTRO=fsl-imx-xwayland MACHINE=imx8mpsolidrun source imx-setup-release.sh -b build-xwayland-imx8mpsolidrun
-
Build Yocto image for imx8mp solidrun, by running the first, which is a minimal image (lacks firmwares) and then second which is full image including demos: (The following command can take several hours)
$ bitbake core-image-minimal $ bitbake imx-image-full $ bitbake imx-hailo-demo-image
The image will be ready at tmp/deploy/images/imx8mpsolidrun and should look as follow:
tmp/deploy/images/imx8mpsolidrun/core-image-minimal-imx8mpsolidrun.wic.zst
or
tmp/deploy/images/imx8mpsolidrun/imx-image-full-imx8mpsolidrun.wic.zst
To flash the image to a micro SD run -
zstd -d -c tmp/deploy/images/imx8mpsolidrun/imx-image-full-imx8mpsolidrun.wic.zst | sudo dd of=/dev/sdX bs=1M
Or for a multi-core machine this can done faster using
pzstd -d -c tmp/deploy/images/imx8mpsolidrun/imx-image-full-imx8mpsolidrun.wic.zst | sudo dd of=/dev/sdX bs=4M conv=fsync
(Notice that /dev/sdX is the block device points to your micro SD)
Since this release of Yocto doesn't support latest disribution releases the following instructions provides information how to build under a container.
When performing this the following is valid -
- The contained build environment and the user's workdir is shared under same UID and GUID
- The user can build inside the container, but deploy on a micro SD, eMMC or anything else outside of the container.
Follow the commands below to; first clone this branch and run the following command only once -
cd docker
docker build --tag yocto-build-image:latest .
docker run --rm -it -v "$PWD":/home/build/work/imx8mp/ yocto-build-image:latest /bin/bash
git config --global user.name "Your Name"
git config --global user.email "[email protected]"
wget https://storage.googleapis.com/git-repo-downloads/repo
chmod a+x repo
and then follow the above instructions on how to build (Notice that /home//work/imx8mp directory now is shared between the container and the outside deplelopment environment)
To achieve better performance on the platform you can enable building the source with LTO (Link Time Optimization) enabled. To do this add the following lines to your local.conf
require conf/distro/include/lto.inc
DISTRO_FEATURES:append = " lto"
If you prefer to use NetworkManager and ModemManager rather than the default Yocto configuration of connman and ofono please add the following snippet to your local.conf IMAGE_INSTALL_remove += " ofono connman connman-gnome connman-conf" IMAGE_INSTALL_remove += " packagegroup-core-tools-testapps" PACKAGE_EXCLUDE += "ofono connman connman-gnome connman-conf" PACKAGE_EXCLUDE += "connman-client connman-tools" PACKAGE_EXCLUDE += "packagegroup-core-tools-testapps" DISTRO_FEATURES_remove = " 3g" IMAGE_INSTALL_append = " networkmanager networkmanager-nmcli modemmanager" IMAGE_INSTALL_append = " networkmanager-bash-completion" PACKAGECONFIG_append_pn-networkmanager = " modemmanager ppp"
You can enable mender OTA with these steps:
-
Add mender-core to bblayers.conf:
BBLAYERS += "${BSPDIR}/sources/meta-mender/meta-mender-core"
-
Configure mender. You can find sample configuration in conf/sample/local.conf.mender.sample