public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
* [PATCH] linux-custom: Fix logic for find command in `install_kbuild()`
@ 2025-11-17 15:49 'Stefan Koch' via isar-users
  2025-11-17 15:56 ` 'Jan Kiszka' via isar-users
  2025-11-26  9:45 ` Zhihang Wei
  0 siblings, 2 replies; 4+ messages in thread
From: 'Stefan Koch' via isar-users @ 2025-11-17 15:49 UTC (permalink / raw)
  To: isar-users
  Cc: stefan-koch, jan.kiszka, christian.storm, cedric.hombourger,
	adriaan.schmidt, felix.moessbauer, quirin.gylstorff, ubely

Previously, two paths in `install_kbuild()` were combined with AND,
which always returned an empty file list.
This change switches to OR logic, providing the files excluded
by the corresponding find call in `kernel_headers()`.

Signed-off-by: Stefan Koch <stefan-koch@siemens.com>
---
 meta/recipes-kernel/linux/files/debian/isar/install.tmpl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-kernel/linux/files/debian/isar/install.tmpl b/meta/recipes-kernel/linux/files/debian/isar/install.tmpl
index a1b00d39..6fa94508 100644
--- a/meta/recipes-kernel/linux/files/debian/isar/install.tmpl
+++ b/meta/recipes-kernel/linux/files/debian/isar/install.tmpl
@@ -252,7 +252,7 @@ install_kbuild() {
 
     mkdir -p ${destdir}
 
-    (cd ${S}; find . -path './scripts/*' -a -path './tools/*' -a \( -name 'Makefile*' -o -name 'Kconfig*' -o -name '*.pl' \)) >>${src_kbuild_files}
+    (cd ${S}; find . \( -path './scripts/*' -o -path './tools/*' \) -a \( -name 'Makefile*' -o -name 'Kconfig*' -o -name '*.pl' \)) >>${src_kbuild_files}
     (cd ${S}; find scripts -type f -o -type l) >>${src_kbuild_files}
 
     (cd ${O}; find scripts -type f) >>${obj_kbuild_files}
-- 
2.39.5

-- 
You received this message because you are subscribed to the Google Groups "isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/isar-users/20251117154942.1985172-1-stefan-koch%40siemens.com.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] linux-custom: Fix logic for find command in `install_kbuild()`
  2025-11-17 15:49 [PATCH] linux-custom: Fix logic for find command in `install_kbuild()` 'Stefan Koch' via isar-users
@ 2025-11-17 15:56 ` 'Jan Kiszka' via isar-users
  2025-11-17 16:17   ` 'Koch, Stefan' via isar-users
  2025-11-26  9:45 ` Zhihang Wei
  1 sibling, 1 reply; 4+ messages in thread
From: 'Jan Kiszka' via isar-users @ 2025-11-17 15:56 UTC (permalink / raw)
  To: Stefan Koch, isar-users
  Cc: christian.storm, cedric.hombourger, adriaan.schmidt,
	felix.moessbauer, quirin.gylstorff, ubely

On 17.11.25 16:49, Stefan Koch wrote:
> Previously, two paths in `install_kbuild()` were combined with AND,
> which always returned an empty file list.
> This change switches to OR logic, providing the files excluded
> by the corresponding find call in `kernel_headers()`.
> 

So, what was the result of this issue? Was kbuild broken, or when
exactly was it?

Jan

> Signed-off-by: Stefan Koch <stefan-koch@siemens.com>
> ---
>  meta/recipes-kernel/linux/files/debian/isar/install.tmpl | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/meta/recipes-kernel/linux/files/debian/isar/install.tmpl b/meta/recipes-kernel/linux/files/debian/isar/install.tmpl
> index a1b00d39..6fa94508 100644
> --- a/meta/recipes-kernel/linux/files/debian/isar/install.tmpl
> +++ b/meta/recipes-kernel/linux/files/debian/isar/install.tmpl
> @@ -252,7 +252,7 @@ install_kbuild() {
>  
>      mkdir -p ${destdir}
>  
> -    (cd ${S}; find . -path './scripts/*' -a -path './tools/*' -a \( -name 'Makefile*' -o -name 'Kconfig*' -o -name '*.pl' \)) >>${src_kbuild_files}
> +    (cd ${S}; find . \( -path './scripts/*' -o -path './tools/*' \) -a \( -name 'Makefile*' -o -name 'Kconfig*' -o -name '*.pl' \)) >>${src_kbuild_files}
>      (cd ${S}; find scripts -type f -o -type l) >>${src_kbuild_files}
>  
>      (cd ${O}; find scripts -type f) >>${obj_kbuild_files}

-- 
Siemens AG, Foundational Technologies
Linux Expert Center

-- 
You received this message because you are subscribed to the Google Groups "isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/isar-users/dcf2b022-120a-41c6-b730-e3f3d2b22bed%40siemens.com.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] linux-custom: Fix logic for find command in `install_kbuild()`
  2025-11-17 15:56 ` 'Jan Kiszka' via isar-users
@ 2025-11-17 16:17   ` 'Koch, Stefan' via isar-users
  0 siblings, 0 replies; 4+ messages in thread
From: 'Koch, Stefan' via isar-users @ 2025-11-17 16:17 UTC (permalink / raw)
  To: isar-users, Kiszka, Jan
  Cc: quirin.gylstorff, Storm, Christian, Schmidt, Adriaan,
	cedric.hombourger, ubely, MOESSBAUER, Felix

On Mon, 2025-11-17 at 16:56 +0100, Jan Kiszka wrote:
> On 17.11.25 16:49, Stefan Koch wrote:
> > Previously, two paths in `install_kbuild()` were combined with AND,
> > which always returned an empty file list.
> > This change switches to OR logic, providing the files excluded
> > by the corresponding find call in `kernel_headers()`.
> > 
> 
> So, what was the result of this issue? Was kbuild broken, or when
> exactly was it?
This is only a minor issue. Kbuild was working anyway, I don't noticed
any failure case because of that.

related line from kernel_headers():
(cd ${S}; find . -not -path './scripts/*' -a -not -path './tools/*' -a
\( -name 'Makefile*' -o -name 'Kconfig*' -o -name '*.pl' \))
>>${src_hdr_files}

*patched* line from install_kbuild():
(cd ${S}; find . \( -path './scripts/*' -o -path './tools/*' \) -a \( -
name 'Makefile*' -o -name 'Kconfig*' -o -name '*.pl' \))
>>${src_kbuild_files}

The subset excluded by one line should be included by the other line.

The *unpatched* line.
(cd ${S}; find . -path './scripts/*' -a -path './tools/*' -a \( -name
'Makefile*' -o -name 'Kconfig*' -o -name '*.pl' \))
>>${src_kbuild_files}

combines two paths in an AND operation, which will never be true.
So the line is useless.

The patch fixes only this logical issue with both subsets.

This was not a big blocker at all, because the next line in
install_kbuild():
(cd ${S}; find scripts -type f -o -type l) >>${src_kbuild_files}

also adds the scripts subdir. Only the tools subdir was missing here,
but that seems to be working in most cases, even without it.

> 
> Jan
> 
> > Signed-off-by: Stefan Koch <stefan-koch@siemens.com>
> > ---
> >  meta/recipes-kernel/linux/files/debian/isar/install.tmpl | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/meta/recipes-
> > kernel/linux/files/debian/isar/install.tmpl b/meta/recipes-
> > kernel/linux/files/debian/isar/install.tmpl
> > index a1b00d39..6fa94508 100644
> > --- a/meta/recipes-kernel/linux/files/debian/isar/install.tmpl
> > +++ b/meta/recipes-kernel/linux/files/debian/isar/install.tmpl
> > @@ -252,7 +252,7 @@ install_kbuild() {
> >  
> >      mkdir -p ${destdir}
> >  
> > -    (cd ${S}; find . -path './scripts/*' -a -path './tools/*' -a
> > \( -name 'Makefile*' -o -name 'Kconfig*' -o -name '*.pl' \))
> > >>${src_kbuild_files}
> > +    (cd ${S}; find . \( -path './scripts/*' -o -path './tools/*'
> > \) -a \( -name 'Makefile*' -o -name 'Kconfig*' -o -name '*.pl' \))
> > >>${src_kbuild_files}
> >      (cd ${S}; find scripts -type f -o -type l)
> > >>${src_kbuild_files}
> >  
> >      (cd ${O}; find scripts -type f) >>${obj_kbuild_files}
> 

Best regards
-- 
Stefan Koch
Siemens AG
www.siemens.com

-- 
You received this message because you are subscribed to the Google Groups "isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/isar-users/3a6b07411b6b6fdf1d81371c4af2631b0e904c80.camel%40siemens.com.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] linux-custom: Fix logic for find command in `install_kbuild()`
  2025-11-17 15:49 [PATCH] linux-custom: Fix logic for find command in `install_kbuild()` 'Stefan Koch' via isar-users
  2025-11-17 15:56 ` 'Jan Kiszka' via isar-users
@ 2025-11-26  9:45 ` Zhihang Wei
  1 sibling, 0 replies; 4+ messages in thread
From: Zhihang Wei @ 2025-11-26  9:45 UTC (permalink / raw)
  To: Stefan Koch, isar-users
  Cc: jan.kiszka, christian.storm, cedric.hombourger, adriaan.schmidt,
	felix.moessbauer, quirin.gylstorff, ubely

Applied to next, thanks.

On 11/17/25 16:49, 'Stefan Koch' via isar-users wrote:
> Previously, two paths in `install_kbuild()` were combined with AND,
> which always returned an empty file list.
> This change switches to OR logic, providing the files excluded
> by the corresponding find call in `kernel_headers()`.
>
> Signed-off-by: Stefan Koch <stefan-koch@siemens.com>
> ---
>   meta/recipes-kernel/linux/files/debian/isar/install.tmpl | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/meta/recipes-kernel/linux/files/debian/isar/install.tmpl b/meta/recipes-kernel/linux/files/debian/isar/install.tmpl
> index a1b00d39..6fa94508 100644
> --- a/meta/recipes-kernel/linux/files/debian/isar/install.tmpl
> +++ b/meta/recipes-kernel/linux/files/debian/isar/install.tmpl
> @@ -252,7 +252,7 @@ install_kbuild() {
>   
>       mkdir -p ${destdir}
>   
> -    (cd ${S}; find . -path './scripts/*' -a -path './tools/*' -a \( -name 'Makefile*' -o -name 'Kconfig*' -o -name '*.pl' \)) >>${src_kbuild_files}
> +    (cd ${S}; find . \( -path './scripts/*' -o -path './tools/*' \) -a \( -name 'Makefile*' -o -name 'Kconfig*' -o -name '*.pl' \)) >>${src_kbuild_files}
>       (cd ${S}; find scripts -type f -o -type l) >>${src_kbuild_files}
>   
>       (cd ${O}; find scripts -type f) >>${obj_kbuild_files}

-- 
You received this message because you are subscribed to the Google Groups "isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/isar-users/fe62ca13-8318-455b-a14f-11bc61694092%40ilbers.de.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-11-26  9:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-11-17 15:49 [PATCH] linux-custom: Fix logic for find command in `install_kbuild()` 'Stefan Koch' via isar-users
2025-11-17 15:56 ` 'Jan Kiszka' via isar-users
2025-11-17 16:17   ` 'Koch, Stefan' via isar-users
2025-11-26  9:45 ` Zhihang Wei

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox