[FE training-materials-updates] buildroot-rootfs: add one more step to the lab

Thomas Petazzoni thomas.petazzoni at free-electrons.com
Wed May 6 15:01:45 CEST 2015


Repository : git://git.free-electrons.com/training-materials.git

On branch  : master
Link       : http://git.free-electrons.com/training-materials/commit/?id=a8f73919f3a64d8b1bea89d4af75e49f4d6d6cab

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

commit a8f73919f3a64d8b1bea89d4af75e49f4d6d6cab
Author: Thomas Petazzoni <thomas.petazzoni at free-electrons.com>
Date:   Wed May 6 15:01:23 2015 +0200

    buildroot-rootfs: add one more step to the lab
    
    Signed-off-by: Thomas Petazzoni <thomas.petazzoni at free-electrons.com>


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

a8f73919f3a64d8b1bea89d4af75e49f4d6d6cab
 labs/buildroot-rootfs/buildroot-rootfs.tex   | 13 +++++++++++++
 slides/buildroot-rootfs/buildroot-rootfs.tex |  1 +
 2 files changed, 14 insertions(+)

diff --git a/labs/buildroot-rootfs/buildroot-rootfs.tex b/labs/buildroot-rootfs/buildroot-rootfs.tex
index 71e745b..6d7e59f 100644
--- a/labs/buildroot-rootfs/buildroot-rootfs.tex
+++ b/labs/buildroot-rootfs/buildroot-rootfs.tex
@@ -4,6 +4,7 @@
   \begin{itemize}
   \item Explore the build output
   \item Customize the root filesystem using a {\em rootfs overlay}
+  \item Use a post-build script
   \item Customize the kernel with patches and additional configuration
     options
   \item Add more packages
@@ -168,6 +169,18 @@ Reflash the root filesystem on the SD card, and boot your BeagleBone
 Black. It should now have an IP address configured for \code{eth0} by
 default.
 
+\section{Use a post-build script}
+
+Write a shell script that creates a file named \code{/etc/build-id} in
+the root filesystem, containing the Git commit id of the Buildroot
+sources, as well as the current date. Since this script will be
+executed as a post-build script, remember that the first argument
+passed to the script is \code{$(TARGET_DIR)}.
+
+Register this script as a post-build script in your Buildroot
+configuration, run a build, and verify that \code{/etc/build-id} is
+created as expected.
+
 \section{Linux kernel customization}
 
 Now, we would like to connect an additional peripheral to our system:
diff --git a/slides/buildroot-rootfs/buildroot-rootfs.tex b/slides/buildroot-rootfs/buildroot-rootfs.tex
index 1610381..147333a 100644
--- a/slides/buildroot-rootfs/buildroot-rootfs.tex
+++ b/slides/buildroot-rootfs/buildroot-rootfs.tex
@@ -327,6 +327,7 @@ test         8000  wheel   -1    =          -         /bin/sh -           Test u
   \begin{itemize}
   \item Explore the build output
   \item Customize the root filesystem using a rootfs overlay
+  \item Use a post-build script
   \item Customize the kernel with patches and additional configuration
     options
   \item Add more packages



More information about the training-materials-updates mailing list