diff options
author | Ryan Eatmon <reatmon@ti.com> | 2024-08-02 17:28:38 -0500 |
---|---|---|
committer | Ryan Eatmon <reatmon@ti.com> | 2024-08-04 12:02:01 -0500 |
commit | 84d5cee1f1aa23897a32b0d1bd59ab76d391b1d1 (patch) | |
tree | a4c91a43fbd76a61bc7e7acfca2d2cda3c453020 /meta-ti-bsp/recipes-kernel | |
parent | 4a3918009f44c8e6cf487a920b247ac2c8ee1e8b (diff) | |
download | meta-ti-84d5cee1f1aa23897a32b0d1bd59ab76d391b1d1.tar.gz |
linux: Reproducibility patches from meta-ti-upstream for 6.10
Backport the reproducibility patches from meta-ti-upstream for the v6.10
mainline kernel.
Signed-off-by: Ryan Eatmon <reatmon@ti.com>
Diffstat (limited to 'meta-ti-bsp/recipes-kernel')
3 files changed, 120 insertions, 0 deletions
diff --git a/meta-ti-bsp/recipes-kernel/linux/files/0001-drivers-gpu-drm-msm-registers-improve-reproducibilit.patch b/meta-ti-bsp/recipes-kernel/linux/files/0001-drivers-gpu-drm-msm-registers-improve-reproducibilit.patch new file mode 100644 index 00000000..56a06e01 --- /dev/null +++ b/meta-ti-bsp/recipes-kernel/linux/files/0001-drivers-gpu-drm-msm-registers-improve-reproducibilit.patch | |||
@@ -0,0 +1,55 @@ | |||
1 | From 2c78d22a78584f2a17eb33b5b5fd6fa602c2af8d Mon Sep 17 00:00:00 2001 | ||
2 | From: Ryan Eatmon <reatmon@ti.com> | ||
3 | Date: Wed, 17 Jul 2024 16:19:20 -0500 | ||
4 | Subject: [PATCH] drivers: gpu: drm: msm: registers: improve reproducibility | ||
5 | |||
6 | The files generated by gen_header.py capture the source path to the | ||
7 | input files and the date. While that can be informative, it varies | ||
8 | based on where and when the kernel was built as the full path is | ||
9 | captured. | ||
10 | |||
11 | Since all of the files that this tool is run on is under the drivers | ||
12 | directory, this modifies the application to strip all of the path before | ||
13 | drivers. Additionally it prints <stripped> instead of the date. | ||
14 | |||
15 | Both changes solve the reproducibility issue. | ||
16 | |||
17 | Upstream-Status: Inappropriate | ||
18 | |||
19 | Signed-off-by: Ryan Eatmon <reatmon@ti.com> | ||
20 | --- | ||
21 | drivers/gpu/drm/msm/registers/gen_header.py | 8 +++++--- | ||
22 | 1 file changed, 5 insertions(+), 3 deletions(-) | ||
23 | |||
24 | diff --git a/drivers/gpu/drm/msm/registers/gen_header.py b/drivers/gpu/drm/msm/registers/gen_header.py | ||
25 | index 3926485bb197..a409404627c7 100644 | ||
26 | --- a/drivers/gpu/drm/msm/registers/gen_header.py | ||
27 | +++ b/drivers/gpu/drm/msm/registers/gen_header.py | ||
28 | @@ -11,6 +11,7 @@ import collections | ||
29 | import argparse | ||
30 | import time | ||
31 | import datetime | ||
32 | +import re | ||
33 | |||
34 | class Error(Exception): | ||
35 | def __init__(self, message): | ||
36 | @@ -877,13 +878,14 @@ The rules-ng-ng source files this header was generated from are: | ||
37 | """) | ||
38 | maxlen = 0 | ||
39 | for filepath in p.xml_files: | ||
40 | - maxlen = max(maxlen, len(filepath)) | ||
41 | + new_filepath = re.sub("^.+drivers","drivers",filepath) | ||
42 | + maxlen = max(maxlen, len(new_filepath)) | ||
43 | for filepath in p.xml_files: | ||
44 | - pad = " " * (maxlen - len(filepath)) | ||
45 | + pad = " " * (maxlen - len(new_filepath)) | ||
46 | filesize = str(os.path.getsize(filepath)) | ||
47 | filesize = " " * (7 - len(filesize)) + filesize | ||
48 | filetime = time.ctime(os.path.getmtime(filepath)) | ||
49 | - print("- " + filepath + pad + " (" + filesize + " bytes, from " + filetime + ")") | ||
50 | + print("- " + new_filepath + pad + " (" + filesize + " bytes, from <stripped>)") | ||
51 | if p.copyright_year: | ||
52 | current_year = str(datetime.date.today().year) | ||
53 | print() | ||
54 | -- | ||
55 | 2.17.1 | ||
diff --git a/meta-ti-bsp/recipes-kernel/linux/files/0001-vt-conmakehash-improve-reproducibility-for-v6.10.patch b/meta-ti-bsp/recipes-kernel/linux/files/0001-vt-conmakehash-improve-reproducibility-for-v6.10.patch new file mode 100644 index 00000000..f9fdece8 --- /dev/null +++ b/meta-ti-bsp/recipes-kernel/linux/files/0001-vt-conmakehash-improve-reproducibility-for-v6.10.patch | |||
@@ -0,0 +1,60 @@ | |||
1 | From 4907fa9ff1dbdd72ce9fa7855091fb604a35a62d Mon Sep 17 00:00:00 2001 | ||
2 | From: Ryan Eatmon <reatmon@ti.com> | ||
3 | Date: Wed, 17 Jul 2024 14:55:10 -0500 | ||
4 | Subject: [PATCH] vt/conmakehash: improve reproducibility for v6.10 | ||
5 | |||
6 | The file generated by conmakehash capture the application | ||
7 | path used to generate the file. While that can be informative, | ||
8 | it varies based on where the kernel was built, as the full | ||
9 | path is captured. | ||
10 | |||
11 | We tweak the application to use a second input as the "capture | ||
12 | name", and then modify the Makefile to pass the basename of | ||
13 | the source, making it reproducible. | ||
14 | |||
15 | This could be improved by using some sort of path mapping, | ||
16 | or the application manipualing argv[1] itself, but for now | ||
17 | this solves the reprodicibility issue. | ||
18 | |||
19 | Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> | ||
20 | |||
21 | Upstream-Status: Inappropriate | ||
22 | |||
23 | Signed-off-by: Denys Dmytriyenko <denys@konsulko.com> | ||
24 | |||
25 | This is a minior rework of Bruce's original patch for the v6.10 kernel. | ||
26 | |||
27 | Signed-off-by: Ryan Eatmon <reatmon@ti.com> | ||
28 | --- | ||
29 | drivers/tty/vt/Makefile | 2 +- | ||
30 | drivers/tty/vt/conmakehash.c | 2 ++ | ||
31 | 2 files changed, 3 insertions(+), 1 deletion(-) | ||
32 | |||
33 | diff --git a/drivers/tty/vt/Makefile b/drivers/tty/vt/Makefile | ||
34 | index 2c8ce8b592ed..8532077ed3bb 100644 | ||
35 | --- a/drivers/tty/vt/Makefile | ||
36 | +++ b/drivers/tty/vt/Makefile | ||
37 | @@ -15,7 +15,7 @@ clean-files := consolemap_deftbl.c defkeymap.c | ||
38 | hostprogs += conmakehash | ||
39 | |||
40 | quiet_cmd_conmk = CONMK $@ | ||
41 | - cmd_conmk = $(obj)/conmakehash $< > $@ | ||
42 | + cmd_conmk = $(obj)/conmakehash $< $(shell basename $<) > $@ | ||
43 | |||
44 | $(obj)/consolemap_deftbl.c: $(src)/$(FONTMAPFILE) $(obj)/conmakehash | ||
45 | $(call cmd,conmk) | ||
46 | diff --git a/drivers/tty/vt/conmakehash.c b/drivers/tty/vt/conmakehash.c | ||
47 | index dc2177fec715..9cd4096a8ffa 100644 | ||
48 | --- a/drivers/tty/vt/conmakehash.c | ||
49 | +++ b/drivers/tty/vt/conmakehash.c | ||
50 | @@ -112,6 +112,8 @@ int main(int argc, char *argv[]) | ||
51 | else | ||
52 | rel_tblname = tblname; | ||
53 | |||
54 | + rel_tblname = argv[2]; | ||
55 | + | ||
56 | /* For now we assume the default font is always 256 characters. */ | ||
57 | fontlen = 256; | ||
58 | |||
59 | -- | ||
60 | 2.17.1 | ||
diff --git a/meta-ti-bsp/recipes-kernel/linux/ti-kernel.inc b/meta-ti-bsp/recipes-kernel/linux/ti-kernel.inc index 1831ba66..4cd5886a 100644 --- a/meta-ti-bsp/recipes-kernel/linux/ti-kernel.inc +++ b/meta-ti-bsp/recipes-kernel/linux/ti-kernel.inc | |||
@@ -15,6 +15,11 @@ KERNEL_DTBVENDORED = "1" | |||
15 | 15 | ||
16 | KERNEL_PATCHES = "" | 16 | KERNEL_PATCHES = "" |
17 | 17 | ||
18 | KERNEL_PATCHES:bsp-mainline = " \ | ||
19 | file://0001-vt-conmakehash-improve-reproducibility-for-v6.10.patch \ | ||
20 | file://0001-drivers-gpu-drm-msm-registers-improve-reproducibilit.patch \ | ||
21 | " | ||
22 | |||
18 | KERNEL_PATCHES:bsp-ti-6_6 = " \ | 23 | KERNEL_PATCHES:bsp-ti-6_6 = " \ |
19 | file://0001-lib-build_OID_registry-fix-reproducibility-issues.patch \ | 24 | file://0001-lib-build_OID_registry-fix-reproducibility-issues.patch \ |
20 | file://0001-vt-conmakehash-improve-reproducibility.patch \ | 25 | file://0001-vt-conmakehash-improve-reproducibility.patch \ |