[PATCH] arm: gen-mach-types: don't include absolute filename

Sascha Hauer posted 1 patch 1 week, 3 days ago
arch/arm/tools/gen-mach-types | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] arm: gen-mach-types: don't include absolute filename
Posted by Sascha Hauer 1 week, 3 days ago
mach-types.h is part of the kapi and as such shipped in the
linux-headers package. The embedded build path makes that package
non-reproducible without going through an extra step of normalizing the
path. YOCTO has similar problems in the kernel debug source package.

Make the path relative to the kernel source tree which is enough to
find the tool that has generated the file.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
This topic comes up every once in a while, without any clear objection
other than "Or just leave it as is. It's in a comment, it doesn't get
into the executable, and thus is harmless.", from which I am not sure if
it actually is an objection. Cced the authors of the previous patches
that I am aware of:

https://lore.kernel.org/all/20241114130021.2802803-1-m.felsch@pengutronix.de/
https://lore.kernel.org/all/13360982.O9o76ZdvQC@steina-w/
https://lore.kernel.org/all/20240213092835.754462-2-u.kleine-koenig@pengutronix.de/
https://lore.kernel.org/all/20241002175049.15219-1-reatmon@ti.com/
---
 arch/arm/tools/gen-mach-types | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/tools/gen-mach-types b/arch/arm/tools/gen-mach-types
index cbe1c33bb8710..65ec262b31e65 100644
--- a/arch/arm/tools/gen-mach-types
+++ b/arch/arm/tools/gen-mach-types
@@ -24,7 +24,7 @@ NF == 3 {
 
 END	{
 	  printf("/*\n");
-	  printf(" * This was automagically generated from %s!\n", FILENAME);
+	  printf(" * This was automagically generated from arch/arm/tools/gen-mach-types!\n");
 	  printf(" * Do NOT edit\n");
 	  printf(" */\n\n");
 	  printf("#ifndef __ASM_ARM_MACH_TYPE_H\n");

---
base-commit: ba3e43a9e601636f5edb54e259a74f96ca3b8fd8
change-id: 20260603-arm-remove-path-from-mach-types-h-a6f528d60e00

Best regards,
-- 
Sascha Hauer <s.hauer@pengutronix.de>
Re: [PATCH] arm: gen-mach-types: don't include absolute filename
Posted by Uwe Kleine-König 1 week, 3 days ago
Hello Sascha,

On Wed, Jun 03, 2026 at 04:12:10PM +0200, Sascha Hauer wrote:
> mach-types.h is part of the kapi and as such shipped in the
> linux-headers package. The embedded build path makes that package
> non-reproducible without going through an extra step of normalizing the
> path. YOCTO has similar problems in the kernel debug source package.
> 
> Make the path relative to the kernel source tree which is enough to
> find the tool that has generated the file.
> 
> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>

Compared to my old patch this is simpler, I like it.

Acked-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>

Thanks
Uwe
Re: [PATCH] arm: gen-mach-types: don't include absolute filename
Posted by Ryan Eatmon 1 week, 3 days ago

On 6/3/2026 10:09 AM, Uwe Kleine-König wrote:
> Hello Sascha,
> 
> On Wed, Jun 03, 2026 at 04:12:10PM +0200, Sascha Hauer wrote:
>> mach-types.h is part of the kapi and as such shipped in the
>> linux-headers package. The embedded build path makes that package
>> non-reproducible without going through an extra step of normalizing the
>> path. YOCTO has similar problems in the kernel debug source package.
>>
>> Make the path relative to the kernel source tree which is enough to
>> find the tool that has generated the file.
>>
>> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
> 
> Compared to my old patch this is simpler, I like it.
> 
> Acked-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>

Agreed.

Acked-by: Ryan Eatmon <reatmon@ti.com>


> Thanks
> Uwe

-- 
Ryan Eatmon                reatmon@ti.com
-----------------------------------------
Texas Instruments, Inc.  -  LCPD  -  MGTS