Embedded Systems / F&S Boards
Build Embedded Linux with Yocto
Assuming you successfully booted into your Fedora VM, perform these steps.
- Start Visual Studio Code
- Open Terminal. Click View → Terminal.
-
Browse to folder with Yocto environment.
cd cd /home/developer/fsimx8mp-Y2025.12/ - Prepare “build” folder.
./setup-yocto build - When asked for GIT username, press <ENTER>.
- When asked for email, press <ENTER>.
- When asked whether to enable color display, press “y”, then <ENTER>.
- Update “build” folder.
./setup-yocto build -u - Browse into “build” folder.
cd build/yocto-fus - Set environment variables and run setup script.
DISTRO=fus-imx-xwayland MACHINE=fsimx8mp ./fus-setup-release.sh -b build-fsimx8mp-fus-imx-xwayland - When asked to read EULA, press “q” key.
- Accept EULA (press “y”, <ENTER>).
- Make sure you’re in the “build” folder.
cd /home/developer/fsimx8mp-Y2025.12/build/yocto-fus - Load additional environment variables.
DISTRO=fus-imx-xwayland MACHINE=fsimx8mp source setup-environment build-fsimx8mp-fus-imx-xwayland - Install additional packages required for OS build:
sudo dnf install chrpath diffstat lz4 patch zstd rpcgen perl-Archive-Zip - Install further packages required for OS build:
sudo dnf install perl perl-Thread-Queue perl-File-Compare perl-File-Copy \ perl-FindBin perl-Text-ParseWords perl-Data-Dumper perl-bignum perl-locale -
Start OS build process. Take your time. The build process will likely last for several hours.
bitbake fus-image-std
Note: The resulting OS image is stored in folder
/home/developer/fsimx8mp-Y2025.12/build/yocto-fus/
and in subfolder:
build-fsimx8mp-fus-imx-xwayland/tmp/deploy/images/fsimx8mp
Take a good note of this subfolder.
Warning: If you ever close and then re-open MATE terminal, then in order to run bitbake again, run this sequence of commands:
cd /home/developer/fsimx8mp-Y2025.12/build/yocto-fus
DISTRO=fus-imx-xwayland MACHINE=fsimx8mp source setup-environment build-fsimx8mp-fus-imx-xwayland
If you managed to successfully build the OS, it is now time to deploy it to your board and let the OS boot up. Browse into the build output folder, look for the sysimg file and follow instructions from previous article to boot into the OS.
Build Software Development Kit
Should you find yourself in a situation, that you would like to build custom software for your board, you may want to build SDK (Software Development Kit) for it first. The process is essentially the same as described above, however, instead of executing bitbake fus-image-std, execute
bitbake fus-image-std -c populate_sdk
The build may, again, take several hours. However, if you previously built the OS itself, the SDK build will take significantly less, as most of the artifacts will be built by then. Once the SDK is built, perform following steps.
- Open Visual Studio Code terminal.
- Browse into folder:
cd /home/developer/fsimx8mp-Y2025.12/build/yocto-fus/ cd build-fsimx8mp-fus-imx-xwayland/tmp/deploy/sdk - There will be a script (a filename, which ends with .sh). Most likely, the name will be:
fus-imx-xwayland-glibc-x86_64-fus-image-std-cortexa53-fsimx8mp-toolchain-5.0.shNote the name of that script file. Run it. - The script will extract the SDK into directory specified by you. Take good note of the output directory. If you don’t specify any, then default will be used, which is:
/opt/fus-imx-xwayland/5.0. - Now run this command:
source /[SDK DIRECTORY]/environment-setup-cortexa53-fslc-linuxIf you extracted SDK into your default folder, the command is:
source /opt/fus-imx-xwayland/5.0/environment-setup-cortexa53-fslc-linuxThis command modifies environment variables in the current shell so subsequent build commands use the SDK.
- You should now be able build C/C++ projects with
makecommand.
Build C/C++ projects
Now that you built the SDK, you can use your Fedora VM to compile and link C/C++ projects so that they can be run on your embedded board. Here’s a couple of things to try:
- Inspect some important environment variables with:
source /[SDK DIRECTORY]/environment-setup-cortexa53-fslc-linuxIf you extracted SDK into your default folder, the command is:
echo "$CC" echo "$CXX" echo "$SDKTARGETSYSROOT" echo "$OECORE_TARGET_SYSROOT" echo "$PKG_CONFIG_SYSROOT_DIR" - Create a simplistic “Hello world” application:
source /[SDK DIRECTORY]/environment-setup-cortexa53-fslc-linuxIf you extracted SDK into your default folder, the command is:
cat > hello.c <<'EOF' #includeint main(void) { printf("Hello from the i.MX8MP application\n"); return 0; } EOF - Compile it:
$CC hello.c -o hello - If you try to run it:
./hellobash: ./hello: cannot execute binary file: Exec format errorThis is because the file cannot be run on a CPU architecture emulated by your Fedora VM.
- Try this command:
file helloExpected output:
hello: ELF 64-bit LSB pie executable, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, BuildID[sha1]=0a6602234b1c6555dfcda17fe582cae07fa992cd, for GNU/Linux 5.15.0, with debug_info, not stripped - Try to copy the application to your board:
scp hello root@fsimx8mp:/tmpIf “fsimx8mp” hostname cannot be resolved, then type the IP address of your embedded board instead. Of course, for this to work, your embedded board must have the OS booted and it has to be connected to the same local are network as your Fedora VM.
- Once copied, use PuTTY to log into your embedded board. At this point, you may connect either over serial connection, or via ethernet (SSH protocol). Once logged in, do this:
/tmp/helloExpected output:
Hello from the i.MX8MP application
The ARM aarch64 means, the file can only be run on ARM 64 bit processor architecture. Check processor architecture of your Fedora VM with:
uname -m
Expected output:
x86_64
Documentation notice
Information may change over time
Technical details on this page may change as vendor tools, board support packages, operating system images, and runtime versions evolve.
This page was last technically reviewed on June 15, 2026. If your setup differs from the one described here, please contact us for help.
