diff options
Diffstat (limited to 'meta/recipes-bsp/grub/files/determinism.patch')
-rw-r--r-- | meta/recipes-bsp/grub/files/determinism.patch | 58 |
1 files changed, 35 insertions, 23 deletions
diff --git a/meta/recipes-bsp/grub/files/determinism.patch b/meta/recipes-bsp/grub/files/determinism.patch index 3c1f562c71..2828e80975 100644 --- a/meta/recipes-bsp/grub/files/determinism.patch +++ b/meta/recipes-bsp/grub/files/determinism.patch | |||
@@ -1,6 +1,9 @@ | |||
1 | The output in moddep.lst generated from syminfo.lst using genmoddep.awk is | 1 | From b6f9b3f6fa782807c4a7ec16ee8ef868cdfbf468 Mon Sep 17 00:00:00 2001 |
2 | not deterministic since the order of the dependencies on each line can vary | 2 | From: Naveen Saini <naveen.kumar.saini@intel.com> |
3 | depending on how awk sorts the values in the array. | 3 | Date: Mon, 15 Mar 2021 14:56:18 +0800 |
4 | Subject: [PATCH] The output in moddep.lst generated from syminfo.lst using | ||
5 | genmoddep.awk is not deterministic since the order of the dependencies on | ||
6 | each line can vary depending on how awk sorts the values in the array. | ||
4 | 7 | ||
5 | Be deterministic in the output by sorting the dependencies on each line. | 8 | Be deterministic in the output by sorting the dependencies on each line. |
6 | 9 | ||
@@ -13,11 +16,29 @@ keys of the dict. | |||
13 | 16 | ||
14 | Upstream-Status: Pending | 17 | Upstream-Status: Pending |
15 | Richard Purdie <richard.purdie@linuxfoundation.org> | 18 | Richard Purdie <richard.purdie@linuxfoundation.org> |
19 | Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com> | ||
20 | --- | ||
21 | gentpl.py | 1 + | ||
22 | grub-core/genmoddep.awk | 4 +++- | ||
23 | util/import_unicode.py | 2 +- | ||
24 | 3 files changed, 5 insertions(+), 2 deletions(-) | ||
16 | 25 | ||
17 | Index: grub-2.04/grub-core/genmoddep.awk | 26 | diff --git a/gentpl.py b/gentpl.py |
18 | =================================================================== | 27 | index c86550d4f..589285192 100644 |
19 | --- grub-2.04.orig/grub-core/genmoddep.awk | 28 | --- a/gentpl.py |
20 | +++ grub-2.04/grub-core/genmoddep.awk | 29 | +++ b/gentpl.py |
30 | @@ -568,6 +568,7 @@ def foreach_platform_value(defn, platform, suffix, closure): | ||
31 | for group in RMAP[platform]: | ||
32 | for value in defn.find_all(group + suffix): | ||
33 | r.append(closure(value)) | ||
34 | + r.sort() | ||
35 | return ''.join(r) | ||
36 | |||
37 | def platform_conditional(platform, closure): | ||
38 | diff --git a/grub-core/genmoddep.awk b/grub-core/genmoddep.awk | ||
39 | index 04c2863e5..247436392 100644 | ||
40 | --- a/grub-core/genmoddep.awk | ||
41 | +++ b/grub-core/genmoddep.awk | ||
21 | @@ -59,7 +59,9 @@ END { | 42 | @@ -59,7 +59,9 @@ END { |
22 | } | 43 | } |
23 | modlist = "" | 44 | modlist = "" |
@@ -29,22 +50,10 @@ Index: grub-2.04/grub-core/genmoddep.awk | |||
29 | modlist = modlist " " depmod; | 50 | modlist = modlist " " depmod; |
30 | inverse_dependencies[depmod] = inverse_dependencies[depmod] " " mod | 51 | inverse_dependencies[depmod] = inverse_dependencies[depmod] " " mod |
31 | depcount[mod]++ | 52 | depcount[mod]++ |
32 | Index: grub-2.04/gentpl.py | 53 | diff --git a/util/import_unicode.py b/util/import_unicode.py |
33 | =================================================================== | 54 | index 08f80591e..1f434a069 100644 |
34 | --- grub-2.04.orig/gentpl.py | 55 | --- a/util/import_unicode.py |
35 | +++ grub-2.04/gentpl.py | 56 | +++ b/util/import_unicode.py |
36 | @@ -568,6 +568,7 @@ def foreach_platform_value(defn, platfor | ||
37 | for group in RMAP[platform]: | ||
38 | for value in defn.find_all(group + suffix): | ||
39 | r.append(closure(value)) | ||
40 | + r.sort() | ||
41 | return ''.join(r) | ||
42 | |||
43 | def platform_conditional(platform, closure): | ||
44 | Index: grub-2.04/util/import_unicode.py | ||
45 | =================================================================== | ||
46 | --- grub-2.04.orig/util/import_unicode.py | ||
47 | +++ grub-2.04/util/import_unicode.py | ||
48 | @@ -174,7 +174,7 @@ infile.close () | 57 | @@ -174,7 +174,7 @@ infile.close () |
49 | 58 | ||
50 | outfile.write ("struct grub_unicode_arabic_shape grub_unicode_arabic_shapes[] = {\n ") | 59 | outfile.write ("struct grub_unicode_arabic_shape grub_unicode_arabic_shapes[] = {\n ") |
@@ -54,3 +63,6 @@ Index: grub-2.04/util/import_unicode.py | |||
54 | try: | 63 | try: |
55 | if arabicsubst[x]['join'] == "DUAL": | 64 | if arabicsubst[x]['join'] == "DUAL": |
56 | outfile.write ("{0x%x, 0x%x, 0x%x, 0x%x, 0x%x},\n " % (arabicsubst[x][0], arabicsubst[x][1], arabicsubst[x][2], arabicsubst[x][3], arabicsubst[x][4])) | 65 | outfile.write ("{0x%x, 0x%x, 0x%x, 0x%x, 0x%x},\n " % (arabicsubst[x][0], arabicsubst[x][1], arabicsubst[x][2], arabicsubst[x][3], arabicsubst[x][4])) |
66 | -- | ||
67 | 2.17.1 | ||
68 | |||