[PATCH] buildman: Disable CONFIG_CMD_CONFIG for reproduceable build
Simon Glass
sjg at chromium.org
Mon Sep 11 02:13:35 CEST 2023
When the ordering of CONFIG options changes, the gzipped CONFIG list can
change in size and contents. This makes it hard to compare commits which
only different in CONFIG ordering.
Disable this when -r is given, to make this easier. Update the
documentation as well.
Signed-off-by: Simon Glass <sjg at chromium.org>
---
tools/buildman/buildman.rst | 3 ++-
tools/buildman/control.py | 4 ++++
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/tools/buildman/buildman.rst b/tools/buildman/buildman.rst
index aae2477b5c3d..4cca97dbda8c 100644
--- a/tools/buildman/buildman.rst
+++ b/tools/buildman/buildman.rst
@@ -1021,7 +1021,8 @@ various files to be rebuilt even if no source changes are made, which in turn
requires that the final U-Boot binary be re-linked. This unnecessary work can
be avoided by turning off the timestamp feature. This can be achieved using
the `-r` flag, which enables reproducible builds by setting
-`SOURCE_DATE_EPOCH=0` when building.
+`SOURCE_DATE_EPOCH=0` when building, as well as disabling `LOCALVERSION_AUTO`
+and `CONFIG_CMD_CONFIG`.
Combining all of these options together yields the command-line shown below.
This will provide the quickest possible feedback regarding the current content
diff --git a/tools/buildman/control.py b/tools/buildman/control.py
index f2ffb7f5b4aa..0ce4f2e2f3b5 100644
--- a/tools/buildman/control.py
+++ b/tools/buildman/control.py
@@ -575,6 +575,10 @@ def calc_adjust_cfg(adjust_cfg, reproducible_builds):
print('Not dropping LOCALVERSION_AUTO for reproducible build')
else:
adjust_cfg['LOCALVERSION_AUTO'] = '~'
+ if 'CMD_CONFIG' in adjust_cfg:
+ print('Not dropping CMD_CONFIG for reproducible build')
+ else:
+ adjust_cfg['CMD_CONFIG'] = '~'
return adjust_cfg
--
2.42.0.283.g2d96d420d3-goog
More information about the U-Boot
mailing list