[bootlin/training-materials updates] master: labs/yocto-first-build-stm32: use ready-made sstate (6391dbf0)

Michael Opdenacker michael.opdenacker at bootlin.com
Mon Oct 23 17:17:35 CEST 2023


Repository : https://github.com/bootlin/training-materials
On branch  : master
Link       : https://github.com/bootlin/training-materials/commit/6391dbf0d3c47568badbd75f94ad204c1eec00c2

>---------------------------------------------------------------

commit 6391dbf0d3c47568badbd75f94ad204c1eec00c2
Author: Michael Opdenacker <michael.opdenacker at bootlin.com>
Date:   Mon Oct 23 17:17:08 2023 +0200

    labs/yocto-first-build-stm32: use ready-made sstate
    
    Signed-off-by: Michael Opdenacker <michael.opdenacker at bootlin.com>


>---------------------------------------------------------------

6391dbf0d3c47568badbd75f94ad204c1eec00c2
 .../yocto-first-build-stm32.tex                    | 24 ++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/labs/yocto-first-build-stm32/yocto-first-build-stm32.tex b/labs/yocto-first-build-stm32/yocto-first-build-stm32.tex
index f7f0d499..8f518201 100644
--- a/labs/yocto-first-build-stm32/yocto-first-build-stm32.tex
+++ b/labs/yocto-first-build-stm32/yocto-first-build-stm32.tex
@@ -63,6 +63,30 @@ STM32MP layers. Edit the layer configuration file
 \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:




More information about the training-materials-updates mailing list