Pull image
docker pull arcturusnetworks/yocto:imx8mp-sdk
Mount a folder from the host OS to be used for all source code
mkdir -p ~/src
docker rm -f yocto-imx8mp-sdk
docker run --name yocto-imx8mp-sdk -e USERID=$(id -u) -e GROUPID=$(id -g) -dit -v $(realpath ~/src):/src --workdir /src arcturusnetworks/yocto:imx8mp-sdk
docker exec -it yocto-imx8mp-sdk bash
Inside the container,
groupmod --gid $GROUPID developer
usermod --uid $USERID --gid $GROUPID developer
su developer
cd /sdk
./fsl-*.sh
It's a good idea to commit this container after installing the SDK.
exit
exit
docker commit yocto-imx8mp-sdk yocto-imx8mp-sdk
An alias sourcesdk can be used to set up your environment for cross compilation going forward.
docker exec -it yocto-imx8mp-sdk bash
su developer
sourcesdk
Now you can build source code for the target
git clone <repo>
cd <repo>
mkdir build
cd build
cmake -D CMAKE_INSTALL_PREFIX:PATH=/usr ..
make -j install DESTDIR=../install
Once building is complete, install it to the target using scp,
scp -r ../install/* root@<ip_address_of_imx8mp>:/
Then ssh into the target, and test it out,
ssh root@<ip_address_of_imx8mp>
cd /usr/share/myawesomecrosscompiledapp
./myawesomeexecutable
If you run into errors regarding absl while compiling code that links to tensorflow lite, issue the following command inside the running container:
sudo cp -rv /opt/fsl-imx-xwayland/5.4-zeus/sysroots/aarch64-poky-linux/usr/include/tensorflow/lite/tools/make/downloads/absl/absl /opt/fsl-imx-xwayland/5.4-zeus/sysroots/aarch64-poky-linux/usr/include/
If armnn headers are not installed in the SDK,
docker create --name imx8mp-armnn arcturusnetworks/yocto:imx8mp-armnn
docker cp imx8mp-armnn:/armnn ~/src
docker exec -it yocto-imx8mp-sdk bash
cp -rv /src/armnn/* /opt/fsl-imx-xwayland/5.4-zeus/sysroots/aarch64-poky-linux/
exit
docker commit yocto-imx8mp-sdk yocto-imx8mp-sdk
Pull image
docker pull arcturusnetworks/yocto:imx8mp
Mount a folder from the host OS to be used for all source code
mkdir -p ~/src
docker run --name yocto-imx8mp -e USERID=$(id -u) -e GROUPID=$(id -g) -it -v $(realpath ~/src):/src arcturusnetworks/yocto:imx8mp
Inside the container,
groupmod --gid $GROUPID developer
usermod --uid $USERID --gid $GROUPID developer
su developer
cd /src
mkdir imx-yocto-bsp
cd imx-yocto-bsp
repo init -u https://source.codeaurora.org/external/imx/imx-manifest -b imx-linux-zeus -m imx-5.4.47-2.2.0.xml
repo sync
DISTRO=fsl-imx-xwayland MACHINE=imx8mpevk source imx-setup-release.sh -b build-xwayland
At this point, hold the space bar down and then agree to the EULA by pressing y and hitting Enter. Then,
bitbake imx-image-full
Depending on your internet speed and more importantly how powerful your computer is (number of cores, memory, SSD vs. spinning disk) it can take anywhere from a few hours to a day for the above command to finish.
Going forward, to access commands like bitbake and devtool,
cd /src/imx-yocto-bsp
source setup-environment build-xwayland
Searching for a package
devtool search gstreamer
Building a package
bitbake gstreamer1.0
Installing package to SDK
cp -rv /src/imx-yocto-bsp/build-xwayland/tmp/work/aarch64-poky-linux/gstreamer1.0/1.16.2-imx-r0/package/* /opt/fsl-imx-xwayland/5.4-zeus/sysroots/aarch64-poky-linux/
Content type
Image
Digest
sha256:606385310…
Size
104.2 MB
Last updated
about 4 years ago
docker pull arcturusnetworks/yocto:target-install