[bootlin/training-materials updates] master: yocto-image: add a wic .wks.in example (cc8c801f)

Thomas Petazzoni thomas.petazzoni at bootlin.com
Fri Oct 29 10:46:36 CEST 2021

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


commit cc8c801f478310a86b900409e698a0204a13ec9a
Author: Alexandre Belloni <alexandre.belloni at bootlin.com>
Date:   Thu Apr 29 21:59:35 2021 +0200

    yocto-image: add a wic .wks.in example
    Signed-off-by: Alexandre Belloni <alexandre.belloni at bootlin.com>


 slides/yocto-image/yocto-image.tex | 32 ++++++++++++++++++++++++++++++--
 1 file changed, 30 insertions(+), 2 deletions(-)

diff --git a/slides/yocto-image/yocto-image.tex b/slides/yocto-image/yocto-image.tex
index d1cb8133..8c08875a 100644
--- a/slides/yocto-image/yocto-image.tex
+++ b/slides/yocto-image/yocto-image.tex
@@ -120,18 +120,46 @@ LICENSE = "MIT"
     \item It can create partitions.
     \item It can select which files are located in
       which partition through the use of plugins.
-    \item The final image layout is described in a \code{.wks} file.
+    \item The final image layout is described in a \code{.wks} or
+      \code{.wks.in} file.
     \item It can be extended in any layer.
     \item Usage example:
-WKS_FILE = "imx-uboot.wks"
+WKS_FILE = "imx-uboot-custom.wks.in"
 IMAGE_FSTYPES = "wic.bmap wic"
+  \frametitle{imx-uboot-custom.wks.in}
+      \begin{block}{}
+        \fontsize{7}{7}\selectfont
+        \begin{minted}{sh}
+part u-boot --source rawcopy --sourceparams="file=imx-boot" --ondisk sda --no-table --align ${IMX_BOOT_SEEK}
+part /boot --source bootimg-partition --ondisk sda --fstype=vfat --label boot --active --align 8192 --size 64
+part / --source rootfs --ondisk sda --fstype=ext4 --label root --exclude-path=home/ --exclude-path=opt/ --align 8192
+part /home --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/home --ondisk sda --fstype=ext4 --label home --align 8192
+part /opt --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/opt --ondisk sda --fstype=ext4 --label opt --align 8192
+bootloader --ptable msdos
+        \end{minted}
+      \end{block}
+  \begin{itemize}
+  \item Copies \code{imx-boot} from \code{$DEPLOY_DIR} in the image,
+    aligned on (and so at that offset) \code{${IMX_BOOT_SEEK}}.
+  \item Creates a first partition, formatted in FAT32, with the files
+    listed in the \code{IMAGE_BOOT_FILES} variable.
+  \item Creates an \code{ext4} partition with the contents on the root
+    filesystem, excluding the content of \code{/home} and \code{/opt}
+  \item Creates two \code{ext4} partitions, one with the content of
+    \code{/home}, the other one with the content of \code{/opt}, from
+    the image root filesystem.
+  \end{itemize}
 \subsection{Package groups}

More information about the training-materials-updates mailing list