summaryrefslogtreecommitdiffstats
path: root/meta/recipes-bsp/grub/files
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2020-12-19 14:35:40 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-12-20 00:03:05 +0000
commit554b9adb0fe739b40bc1d7071a95260b3b7ff1c4 (patch)
tree1baabd460a44cd5917e0bf4b99cdbfd76dc56dc7 /meta/recipes-bsp/grub/files
parent4fab901c65ff871fa31813894b11083cb8c0b20e (diff)
downloadpoky-554b9adb0fe739b40bc1d7071a95260b3b7ff1c4.tar.gz
grub: Fix build reproducibility issue
We're seeing reproducibility issue on the autobuilder due to changing module dependency ordering. Add some sorting to an awk script to fix this. (From OE-Core rev: 925ddd5edccbfec52ff45c1b54ab2ae1bfe0d57c) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-bsp/grub/files')
-rw-r--r--meta/recipes-bsp/grub/files/determinism.patch24
1 files changed, 24 insertions, 0 deletions
diff --git a/meta/recipes-bsp/grub/files/determinism.patch b/meta/recipes-bsp/grub/files/determinism.patch
new file mode 100644
index 0000000000..c4b1d3a2a8
--- /dev/null
+++ b/meta/recipes-bsp/grub/files/determinism.patch
@@ -0,0 +1,24 @@
1The output in moddep.lst generated from syminfo.lst using genmoddep.awk is
2not deterministic since the order of the dependencies on each line can vary
3depending on how awk sorts the values in the array.
4
5Be deterministic in the output by sorting the dependencies on each line.
6
7Upstream-Status: Pending
8Richard Purdie <richard.purdie@linuxfoundation.org>
9
10Index: grub-2.04/grub-core/genmoddep.awk
11===================================================================
12--- grub-2.04.orig/grub-core/genmoddep.awk
13+++ grub-2.04/grub-core/genmoddep.awk
14@@ -59,7 +59,9 @@ END {
15 }
16 modlist = ""
17 depcount[mod] = 0
18- for (depmod in uniqmods) {
19+ n = asorti(uniqmods, w)
20+ for (i = 1; i <= n; i++) {
21+ depmod = w[i]
22 modlist = modlist " " depmod;
23 inverse_dependencies[depmod] = inverse_dependencies[depmod] " " mod
24 depcount[mod]++