aboutsummaryrefslogtreecommitdiff
path: root/doc/build
diff options
context:
space:
mode:
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>2023-01-25 19:15:00 +0100
committerHeinrich Schuchardt <heinrich.schuchardt@canonical.com>2023-01-27 18:32:00 +0100
commit2042365acf0e4620b97a9e519430376d15e95d27 (patch)
treee4743017d4e245797bbe4cb791b50a17ab3b22aa /doc/build
parent0c4759fbfd5be481d14ebb8b7c2d085ec649d04d (diff)
downloadu-boot-2042365acf0e4620b97a9e519430376d15e95d27.zip
u-boot-2042365acf0e4620b97a9e519430376d15e95d27.tar.gz
u-boot-2042365acf0e4620b97a9e519430376d15e95d27.tar.bz2
doc: move 'Reproducible builds'
Move the README section to the HTML documentation. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'doc/build')
-rw-r--r--doc/build/index.rst1
-rw-r--r--doc/build/reproducible.rst25
2 files changed, 26 insertions, 0 deletions
diff --git a/doc/build/index.rst b/doc/build/index.rst
index dc9cde4..64e6649 100644
--- a/doc/build/index.rst
+++ b/doc/build/index.rst
@@ -9,6 +9,7 @@ Build U-Boot
source
gcc
clang
+ reproducible
docker
tools
buildman
diff --git a/doc/build/reproducible.rst b/doc/build/reproducible.rst
new file mode 100644
index 0000000..5423080
--- /dev/null
+++ b/doc/build/reproducible.rst
@@ -0,0 +1,25 @@
+Reproducible builds
+===================
+
+In order to achieve reproducible builds, timestamps used in the U-Boot build
+process have to be set to a fixed value.
+
+This is done using the SOURCE_DATE_EPOCH environment variable which specifies
+the number of seconds since 1970-01-01T00:00:00Z.
+
+Example
+-------
+
+To build the sandbox with 2023-01-01T00:00:00Z as timestamp we can use:
+
+.. code-block:: bash
+
+ make sandbox_defconfig
+ SOURCE_DATE_EPOCH=1672531200 make
+
+This date is shown when we launch U-Boot:
+
+.. code-block:: console
+
+ ./u-boot -T
+ U-Boot 2023.01 (Jan 01 2023 - 00:00:00 +0000)