Skip to content

Commit

Permalink
labs/yocto-first-build-stm32: use ready-made sstate
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Opdenacker <[email protected]>
  • Loading branch information
Michael Opdenacker committed Oct 23, 2023
1 parent 0611367 commit 6391dbf
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions labs/yocto-first-build-stm32/yocto-first-build-stm32.tex
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,30 @@ \section{Set up the build environment}
\code{meta-openembedded/meta-oe}, \code{meta-openembedded/meta-python} and \code{meta-st-stm32mp} directory to the
\code{BBLAYERS} variable.
\section{Configure the reuse of prebuilt artifacts}
On the STM32MP platform, the first build can take a very long time, in
particular because of the need to build the Rust compiler to build
Python cryptographic modules necessary to build the firmware (op-tee)
binaries.
Unless you have a very fast machine or plenty of time ahead of you, we
recommend to configure your build so that it can reuse prebuilt
artifacts. Such artifacts do not carry the risk to generate wrong
binaries, because if they don't match the actual sources or build
platform that you have, the binaries will be generated from source.
This is one of the mechanisms that make BitBake run successive builds
much faster, reusing binaries from previous runs whenever applicable.
So add the below lines to your \code{conf/local.conf}:
\begin{verbatim}
BB_SIGNATURE_HANDLER = "OEEquivHash"
BB_HASHSERVE = "auto"
SSTATE_MIRRORS ?= "file://.* http://bootlin.com/yocto/sstate/stm32mp1/PATH;downloadfilename=PATH"
\end{verbatim}
\section{Build your first image}
Now that you're ready to start the compilation, simply run:
Expand Down

0 comments on commit 6391dbf

Please sign in to comment.