reproducible.rst 669 B

123456789101112131415161718192021222324252627
  1. Reproducible builds
  2. ===================
  3. In order to achieve reproducible builds, timestamps used in the U-Boot build
  4. process have to be set to a fixed value.
  5. This is done using the SOURCE_DATE_EPOCH environment variable which specifies
  6. the number of seconds since 1970-01-01T00:00:00Z.
  7. Example
  8. -------
  9. To build the sandbox with 2023-01-01T00:00:00Z as timestamp we can use:
  10. .. code-block:: bash
  11. make sandbox_defconfig
  12. SOURCE_DATE_EPOCH=1672531200 make
  13. This date is shown when we launch U-Boot:
  14. .. code-block:: console
  15. ./u-boot -T
  16. U-Boot 2023.01 (Jan 01 2023 - 00:00:00 +0000)
  17. The same effect can be obtained with buildman using the `-r` flag.