Build#

  • Create a directory for storing all files required for building a yocto image:

mkdir yocto
cd yocto
YOCTO_DIR=$(pwd)
  • Clone required repositories:

cd $YOCTO_DIR
repo init -u https://github.com/arduino/lmp-manifest.git -m arduino.xml -b release
repo sync
  • Build manufacturing tools (once):

cd $YOCTO_DIR
DISTRO=lmp-mfgtool MACHINE=portenta-x8 . setup-environment
echo "ACCEPT_FSL_EULA = \"1\"" >> conf/local.conf
echo "MFGTOOL_FLASH_IMAGE = \"lmp-devel-arduino-image\"" >> conf/local.conf
bitbake mfgtool-files
  • Apply patches:

cd $YOCTO_DIR/layers/meta-partner-arduino
git remote add pika-spark https://github.com/pika-spark/meta-partner-arduino
git fetch --all
git checkout feature/add-pika-spark-support
cd $YOCTO_DIR/layers/meta-lmp
git remote add maxpayne86 https://github.com/MaxPayne86Arduino/meta-lmp.git
git fetch --all
git checkout feature/add-wayland-to-base-distro-lmp-88
cd $YOCTO_DIR
DISTRO=lmp-base-xwayland MACHINE=portenta-x8 . setup-environment
echo "ACCEPT_FSL_EULA = \"1\"" >> conf/local.conf
bitbake lmp-devel-arduino-image

Note: Edit conf/local.conf to prevent Yocto from hogging all of your cores

-BB_NUMBER_THREADS ?= "${@oe.utils.cpu_count()}"
+#BB_NUMBER_THREADS ?= "${@oe.utils.cpu_count()}"
...
-PARALLEL_MAKE ?= "-j ${@oe.utils.cpu_count()}"
+#PARALLEL_MAKE ?= "-j ${@oe.utils.cpu_count()}"
...
+BB_NUMBER_PARSE_THREADS = "4"
+BB_NUMBER_THREADS = "4"
+PARALLEL_MAKE = "-j 4"