Skip to contentSkip to conversation

linux: Reproducibility patches from meta-ti-upstream for 6.10

PATCH Superseded Ryan Eatmon 1 participant 1 message Jul 19, 2024

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 linux: Reproducibility patches from meta-ti-upstream for 6.10

Backport the reproducibility patches from meta-ti-upstream for the v6.10 mainline and next kernels.

---
 ...msm-registers-improve-reproducibilit.patch | 56 +++++++++++++++++
 ...sh-improve-reproducibility-for-v6.10.patch | 61 +++++++++++++++++++
 .../recipes-kernel/linux/ti-kernel.inc        | 10 +++
 3 files changed, 127 insertions(+)
 create mode 100644 meta-ti-bsp/recipes-kernel/linux/files/0001-drivers-gpu-drm-msm-registers-improve-reproducibilit.patch
 create mode 100644 meta-ti-bsp/recipes-kernel/linux/files/0001-vt-conmakehash-improve-reproducibility-for-v6.10.patch
meta-ti-bsp/recipes-kernel/linux/files/0001-drivers-gpu-drm-msm-registers-improve-reproducibilit.patch new file +56 -0
new file mode 100644
index 00000000..f83746ee
@@ -0,0 +1,56 @@
+From 2c78d22a78584f2a17eb33b5b5fd6fa602c2af8d Mon Sep 17 00:00:00 2001
+From: Ryan Eatmon <[email protected]>
+Date: Wed, 17 Jul 2024 16:19:20 -0500
+Subject: [PATCH] drivers: gpu: drm: msm: registers: improve reproducibility
+
+The files generated by gen_header.py capture the source path to the
+input files and the date.  While that can be informative, it varies
+based on where and when the kernel was built as the full path is
+captured.
+
+Since all of the files that this tool is run on is under the drivers
+directory, this modifies the application to strip all of the path before
+drivers.  Additionally it prints <stripped> instead of the date.
+
+Both changes solve the reproducibility issue.
+
+Upstream-Status: Inappropriate
+
+Signed-off-by: Ryan Eatmon <[email protected]>
+---
+ drivers/gpu/drm/msm/registers/gen_header.py | 8 +++++---
+ 1 file changed, 5 insertions(+), 3 deletions(-)
+
+diff --git a/drivers/gpu/drm/msm/registers/gen_header.py b/drivers/gpu/drm/msm/registers/gen_header.py
+index 3926485bb197..a409404627c7 100644
+--- a/drivers/gpu/drm/msm/registers/gen_header.py
++++ b/drivers/gpu/drm/msm/registers/gen_header.py
+@@ -11,6 +11,7 @@ import collections
+ import argparse
+ import time
+ import datetime
++import re
+ 
+ class Error(Exception):
+ 	def __init__(self, message):
+@@ -877,13 +878,14 @@ The rules-ng-ng source files this header was generated from are:
+ """)
+ 	maxlen = 0
+ 	for filepath in p.xml_files:
+-		maxlen = max(maxlen, len(filepath))
++		new_filepath = re.sub("^.+drivers","drivers",filepath)
++		maxlen = max(maxlen, len(new_filepath))
+ 	for filepath in p.xml_files:
+-		pad = " " * (maxlen - len(filepath))
++		pad = " " * (maxlen - len(new_filepath))
+ 		filesize = str(os.path.getsize(filepath))
+ 		filesize = " " * (7 - len(filesize)) + filesize
+ 		filetime = time.ctime(os.path.getmtime(filepath))
+-		print("- " + filepath + pad + " (" + filesize + " bytes, from " + filetime + ")")
++		print("- " + new_filepath + pad + " (" + filesize + " bytes, from <stripped>)")
+ 	if p.copyright_year:
+ 		current_year = str(datetime.date.today().year)
+ 		print()
+-- 
+2.17.1
+
meta-ti-bsp/recipes-kernel/linux/files/0001-vt-conmakehash-improve-reproducibility-for-v6.10.patch new file +61 -0

61 lines not on this page · raw message

meta-ti-bsp/recipes-kernel/linux/ti-kernel.inc +10 -0
index 1831ba66..5e27bcff 100644
@@ -15,6 +15,16 @@ KERNEL_DTBVENDORED = "1"
 
 KERNEL_PATCHES = ""
 
+KERNEL_PATCHES:bsp-mainline = " \
+    file://0001-vt-conmakehash-improve-reproducibility-for-v6.10.patch \
+    file://0001-drivers-gpu-drm-msm-registers-improve-reproducibilit.patch \
+"
+
+KERNEL_PATCHES:bsp-next = " \
+    file://0001-vt-conmakehash-improve-reproducibility-for-v6.10.patch \
+    file://0001-drivers-gpu-drm-msm-registers-improve-reproducibilit.patch \
+"
+
 KERNEL_PATCHES:bsp-ti-6_6 = " \
     file://0001-lib-build_OID_registry-fix-reproducibility-issues.patch \
     file://0001-vt-conmakehash-improve-reproducibility.patch \
Signature · 1 line
2.17.1