* [PATCH] linux-custom: support to add linux-libc-dev package with kernel name @ 2025-01-12 19:00 'Arulpandiyan Vadivel' via isar-users 2025-01-12 20:46 ` 'cedric.hombourger@siemens.com' via isar-users 0 siblings, 1 reply; 24+ messages in thread From: 'Arulpandiyan Vadivel' via isar-users @ 2025-01-12 19:00 UTC (permalink / raw) To: isar-users; +Cc: cedric.hombourger, srikanth.krishnakar, Arulpandiyan Vadivel Add support to build linux-libc-dev package with KERNEL_NAME_PROVIDED. With this change the user is able to update the apt feeds with user desired package for their architecture. With current approach for a single architecture only one linux-libc-dev package is possible for the components. In few scenarios where multiple BSP's were supported for same architecture adding them to the same component of apt feeds might not be possible with reprepro. Signed-off-by: Arulpandiyan Vadivel <arulpandiyan.vadivel@siemens.com> --- doc/custom_kernel.md | 2 +- meta/recipes-kernel/linux/files/debian/control.tmpl | 6 ++++-- meta/recipes-kernel/linux/files/debian/isar/common.tmpl | 2 +- meta/recipes-kernel/linux/files/debian/isar/install.tmpl | 2 +- meta/recipes-kernel/linux/linux-custom.inc | 2 +- 5 files changed, 8 insertions(+), 6 deletions(-) diff --git a/doc/custom_kernel.md b/doc/custom_kernel.md index ce5f1bf7..89c7c088 100644 --- a/doc/custom_kernel.md +++ b/doc/custom_kernel.md @@ -51,7 +51,7 @@ The linux-custom recipe provides support for: Only the `host` specific package is built automatically at cross builds. - 10. Produce a `linux-libc-dev` package to support user-land builds + 10. Produce a `linux-libc-dev-${KERNEL_NAME_PROVIDED}` package to support user-land builds 11. Only build/ship the `linux-libc-dev` package if instructed to (`KERNEL_LIBC_DEV_DEPLOY` equals to `"1"`) diff --git a/meta/recipes-kernel/linux/files/debian/control.tmpl b/meta/recipes-kernel/linux/files/debian/control.tmpl index 04ad0f4f..a4c0ed9e 100644 --- a/meta/recipes-kernel/linux/files/debian/control.tmpl +++ b/meta/recipes-kernel/linux/files/debian/control.tmpl @@ -22,10 +22,12 @@ Description: ${KERNEL_NAME_PROVIDED} Linux kernel headers for @KR@ . This is useful for people who need to build external modules -Package: linux-libc-dev +Package: linux-libc-dev-${KERNEL_NAME_PROVIDED} Build-Profiles: <!nolibcdev kernel> Section: devel -Provides: linux-kernel-headers +Conflicts: linux-libc-dev +Provides: linux-libc-dev +Replaces: linux-libc-dev Architecture: any Description: Linux support headers for userspace development This package provides userspaces headers from the Linux kernel. These headers diff --git a/meta/recipes-kernel/linux/files/debian/isar/common.tmpl b/meta/recipes-kernel/linux/files/debian/isar/common.tmpl index def8480e..bab41757 100644 --- a/meta/recipes-kernel/linux/files/debian/isar/common.tmpl +++ b/meta/recipes-kernel/linux/files/debian/isar/common.tmpl @@ -8,7 +8,7 @@ set -e ARCH=${KERNEL_ARCH} KERNEL_PKG_IMAGE=linux-image-${KERNEL_NAME_PROVIDED} KERNEL_PKG_KERN_HEADERS=linux-headers-${KERNEL_NAME_PROVIDED} -KERNEL_PKG_LIBC_HEADERS=linux-libc-dev +KERNEL_PKG_LIBC_HEADERS=linux-libc-dev-${KERNEL_NAME_PROVIDED} KERNEL_PKG_LIBC_HEADERS_CROSS=linux-libc-dev-${DISTRO_ARCH}-cross KERNEL_PKG_KERN_KBUILD=linux-kbuild-${KERNEL_NAME_PROVIDED} KERNEL_PKG_KERN_KBUILD_CROSS=${KERNEL_PKG_KERN_KBUILD}-${DISTRO_ARCH}-cross diff --git a/meta/recipes-kernel/linux/files/debian/isar/install.tmpl b/meta/recipes-kernel/linux/files/debian/isar/install.tmpl index 0a7bdd66..e1602b9d 100644 --- a/meta/recipes-kernel/linux/files/debian/isar/install.tmpl +++ b/meta/recipes-kernel/linux/files/debian/isar/install.tmpl @@ -225,7 +225,7 @@ install_headers() { if dpkg --compare-versions "${krel}" "lt" "5.4.24"; then headers_check fi - [ -z ${kern_pkgs["linux-libc-dev"]} ] || libc_headers + [ -z ${kern_pkgs["linux-libc-dev-${KERNEL_NAME_PROVIDED}"]} ] || libc_headers kernel_headers } diff --git a/meta/recipes-kernel/linux/linux-custom.inc b/meta/recipes-kernel/linux/linux-custom.inc index bf6c879b..26fd8719 100644 --- a/meta/recipes-kernel/linux/linux-custom.inc +++ b/meta/recipes-kernel/linux/linux-custom.inc @@ -145,7 +145,7 @@ ISAR_CROSS_COMPILE:class-kbuildtarget = "0" RECIPE_PROVIDES = " \ linux-image-${KERNEL_NAME_PROVIDED} \ linux-headers-${KERNEL_NAME_PROVIDED} \ - linux-libc-dev \ + linux-libc-dev-${KERNEL_NAME_PROVIDED} \ linux-libc-dev-${DISTRO_ARCH}-cross \ linux-image-${KERNEL_NAME_PROVIDED}-dbg \ linux-kbuild-${KERNEL_NAME_PROVIDED} \ -- 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/20250112190000.69110-1-arulpandiyan.vadivel%40siemens.com. ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH] linux-custom: support to add linux-libc-dev package with kernel name 2025-01-12 19:00 [PATCH] linux-custom: support to add linux-libc-dev package with kernel name 'Arulpandiyan Vadivel' via isar-users @ 2025-01-12 20:46 ` 'cedric.hombourger@siemens.com' via isar-users 2025-01-13 8:07 ` [PATCH V2] " 'Arulpandiyan Vadivel' via isar-users 0 siblings, 1 reply; 24+ messages in thread From: 'cedric.hombourger@siemens.com' via isar-users @ 2025-01-12 20:46 UTC (permalink / raw) To: isar-users, Vadivel, Arulpandiyan; +Cc: srikanth.krishnakar On Mon, 2025-01-13 at 00:30 +0530, Arulpandiyan Vadivel wrote: > Add support to build linux-libc-dev package with > KERNEL_NAME_PROVIDED. > With this change the user is able to update the apt feeds with user > desired > package for their architecture. > With current approach for a single architecture only one linux-libc- > dev > package is possible for the components. > In few scenarios where multiple BSP's were supported for same > architecture > adding them to the same component of apt feeds might not be possible > with reprepro. The commit log should IMO be reworded as you are using terms and concepts that are potentially specific to our downstream projects. This change is however relevant to Isar. Below my attempt to describe the change and our motivation (further details may be required by the maintainers). Debian and Ubuntu use unified kernel headers and a single linux-libc- dev package is shipped. In contrast, Isar may build multiple kernel variants with different versions and/or patches and their packages but linux-libc-dev are suffixed with -${KERNEL_NAME_PROVIDED}: this allows each variant to exist in isar-apt (reprepro may not have more than one version of a given package for a given suite). Apply the same suffix to linux-libc-dev and a Provides: clause. > > Signed-off-by: Arulpandiyan Vadivel > <arulpandiyan.vadivel@siemens.com> > --- > doc/custom_kernel.md | 2 +- > meta/recipes-kernel/linux/files/debian/control.tmpl | 6 ++++-- > meta/recipes-kernel/linux/files/debian/isar/common.tmpl | 2 +- > meta/recipes-kernel/linux/files/debian/isar/install.tmpl | 2 +- > meta/recipes-kernel/linux/linux-custom.inc | 2 +- > 5 files changed, 8 insertions(+), 6 deletions(-) > > diff --git a/doc/custom_kernel.md b/doc/custom_kernel.md > index ce5f1bf7..89c7c088 100644 > --- a/doc/custom_kernel.md > +++ b/doc/custom_kernel.md > @@ -51,7 +51,7 @@ The linux-custom recipe provides support for: > > Only the `host` specific package is built automatically at cross > builds. > > - 10. Produce a `linux-libc-dev` package to support user-land builds > + 10. Produce a `linux-libc-dev-${KERNEL_NAME_PROVIDED}` package to > support user-land builds > > 11. Only build/ship the `linux-libc-dev` package if instructed to > (`KERNEL_LIBC_DEV_DEPLOY` equals to `"1"`) > diff --git a/meta/recipes-kernel/linux/files/debian/control.tmpl > b/meta/recipes-kernel/linux/files/debian/control.tmpl > index 04ad0f4f..a4c0ed9e 100644 > --- a/meta/recipes-kernel/linux/files/debian/control.tmpl > +++ b/meta/recipes-kernel/linux/files/debian/control.tmpl > @@ -22,10 +22,12 @@ Description: ${KERNEL_NAME_PROVIDED} Linux kernel > headers for @KR@ > . > This is useful for people who need to build external modules > > -Package: linux-libc-dev > +Package: linux-libc-dev-${KERNEL_NAME_PROVIDED} > Build-Profiles: <!nolibcdev kernel> > Section: devel > -Provides: linux-kernel-headers > +Conflicts: linux-libc-dev > +Provides: linux-libc-dev > +Replaces: linux-libc-dev > Architecture: any > Description: Linux support headers for userspace development > This package provides userspaces headers from the Linux kernel. > These headers > diff --git a/meta/recipes-kernel/linux/files/debian/isar/common.tmpl > b/meta/recipes-kernel/linux/files/debian/isar/common.tmpl > index def8480e..bab41757 100644 > --- a/meta/recipes-kernel/linux/files/debian/isar/common.tmpl > +++ b/meta/recipes-kernel/linux/files/debian/isar/common.tmpl > @@ -8,7 +8,7 @@ set -e > ARCH=${KERNEL_ARCH} > KERNEL_PKG_IMAGE=linux-image-${KERNEL_NAME_PROVIDED} > KERNEL_PKG_KERN_HEADERS=linux-headers-${KERNEL_NAME_PROVIDED} > -KERNEL_PKG_LIBC_HEADERS=linux-libc-dev > +KERNEL_PKG_LIBC_HEADERS=linux-libc-dev-${KERNEL_NAME_PROVIDED} > KERNEL_PKG_LIBC_HEADERS_CROSS=linux-libc-dev-${DISTRO_ARCH}-cross > KERNEL_PKG_KERN_KBUILD=linux-kbuild-${KERNEL_NAME_PROVIDED} > KERNEL_PKG_KERN_KBUILD_CROSS=${KERNEL_PKG_KERN_KBUILD}- > ${DISTRO_ARCH}-cross > diff --git a/meta/recipes-kernel/linux/files/debian/isar/install.tmpl > b/meta/recipes-kernel/linux/files/debian/isar/install.tmpl > index 0a7bdd66..e1602b9d 100644 > --- a/meta/recipes-kernel/linux/files/debian/isar/install.tmpl > +++ b/meta/recipes-kernel/linux/files/debian/isar/install.tmpl > @@ -225,7 +225,7 @@ install_headers() { > if dpkg --compare-versions "${krel}" "lt" "5.4.24"; then > headers_check > fi > - [ -z ${kern_pkgs["linux-libc-dev"]} ] || libc_headers > + [ -z ${kern_pkgs["linux-libc-dev-${KERNEL_NAME_PROVIDED}"]} ] || > libc_headers > kernel_headers > } > > diff --git a/meta/recipes-kernel/linux/linux-custom.inc > b/meta/recipes-kernel/linux/linux-custom.inc > index bf6c879b..26fd8719 100644 > --- a/meta/recipes-kernel/linux/linux-custom.inc > +++ b/meta/recipes-kernel/linux/linux-custom.inc > @@ -145,7 +145,7 @@ ISAR_CROSS_COMPILE:class-kbuildtarget = "0" > RECIPE_PROVIDES = " \ > linux-image-${KERNEL_NAME_PROVIDED} \ > linux-headers-${KERNEL_NAME_PROVIDED} \ > - linux-libc-dev \ > + linux-libc-dev-${KERNEL_NAME_PROVIDED} \ We could keep linux-libc-dev and add linux-libc-dev- ${KERNEL_NAME_PROVIDED} > linux-libc-dev-${DISTRO_ARCH}-cross \ What about the -cross package? A similar issue may exist > linux-image-${KERNEL_NAME_PROVIDED}-dbg \ > linux-kbuild-${KERNEL_NAME_PROVIDED} \ -- Cedric Hombourger 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/8b5a84a18e2a506ad199c7c034d18dd83d5b3f3d.camel%40siemens.com. ^ permalink raw reply [flat|nested] 24+ messages in thread
* [PATCH V2] linux-custom: support to add linux-libc-dev package with kernel name 2025-01-12 20:46 ` 'cedric.hombourger@siemens.com' via isar-users @ 2025-01-13 8:07 ` 'Arulpandiyan Vadivel' via isar-users 2025-01-13 14:04 ` 'cedric.hombourger@siemens.com' via isar-users 0 siblings, 1 reply; 24+ messages in thread From: 'Arulpandiyan Vadivel' via isar-users @ 2025-01-13 8:07 UTC (permalink / raw) To: isar-users; +Cc: cedric.hombourger, srikanth.krishnakar, Arulpandiyan Vadivel Debian and Ubuntu use unified kernel headers and a single linux-libc-dev package is shipped. In contrast, Isar may build multiple kernel variants with different versions and/or patches and their packages. But linux-libc-dev are suffixed with -${KERNEL_NAME_PROVIDED}: this allows each variant to exist in isar-apt (reprepro may not have more than one version of a given package for a given suite). Apply the same suffix to linux-libc-dev and a Provides: clause. Signed-off-by: Arulpandiyan Vadivel <arulpandiyan.vadivel@siemens.com> --- doc/custom_kernel.md | 2 +- meta/recipes-kernel/linux/files/debian/control.tmpl | 10 +++++++--- .../recipes-kernel/linux/files/debian/isar/common.tmpl | 4 ++-- .../linux/files/debian/isar/install.tmpl | 2 +- meta/recipes-kernel/linux/linux-custom.inc | 2 ++ 5 files changed, 13 insertions(+), 7 deletions(-) diff --git a/doc/custom_kernel.md b/doc/custom_kernel.md index ce5f1bf7..89c7c088 100644 --- a/doc/custom_kernel.md +++ b/doc/custom_kernel.md @@ -51,7 +51,7 @@ The linux-custom recipe provides support for: Only the `host` specific package is built automatically at cross builds. - 10. Produce a `linux-libc-dev` package to support user-land builds + 10. Produce a `linux-libc-dev-${KERNEL_NAME_PROVIDED}` package to support user-land builds 11. Only build/ship the `linux-libc-dev` package if instructed to (`KERNEL_LIBC_DEV_DEPLOY` equals to `"1"`) diff --git a/meta/recipes-kernel/linux/files/debian/control.tmpl b/meta/recipes-kernel/linux/files/debian/control.tmpl index 04ad0f4f..e440b492 100644 --- a/meta/recipes-kernel/linux/files/debian/control.tmpl +++ b/meta/recipes-kernel/linux/files/debian/control.tmpl @@ -22,19 +22,23 @@ Description: ${KERNEL_NAME_PROVIDED} Linux kernel headers for @KR@ . This is useful for people who need to build external modules -Package: linux-libc-dev +Package: linux-libc-dev-${KERNEL_NAME_PROVIDED} Build-Profiles: <!nolibcdev kernel> Section: devel -Provides: linux-kernel-headers +Conflicts: linux-libc-dev +Provides: linux-libc-dev +Replaces: linux-libc-dev Architecture: any Description: Linux support headers for userspace development This package provides userspaces headers from the Linux kernel. These headers are used by the installed headers for GNU glibc and other system libraries. -Package: linux-libc-dev-${DISTRO_ARCH}-cross +Package: linux-libc-dev-${DISTRO_ARCH}-cross-${KERNEL_NAME_PROVIDED} Build-Profiles: <!nolibcdev cross !kbuild> Section: devel +Conflicts: linux-kernel-headers-${DISTRO_ARCH}-cross Provides: linux-kernel-headers-${DISTRO_ARCH}-cross +Replaces: linux-kernel-headers-${DISTRO_ARCH}-cross Architecture: all Description: Linux Kernel Headers for development (for cross-compiling) This package provides headers from the Linux kernel. These headers diff --git a/meta/recipes-kernel/linux/files/debian/isar/common.tmpl b/meta/recipes-kernel/linux/files/debian/isar/common.tmpl index def8480e..b200930c 100644 --- a/meta/recipes-kernel/linux/files/debian/isar/common.tmpl +++ b/meta/recipes-kernel/linux/files/debian/isar/common.tmpl @@ -8,8 +8,8 @@ set -e ARCH=${KERNEL_ARCH} KERNEL_PKG_IMAGE=linux-image-${KERNEL_NAME_PROVIDED} KERNEL_PKG_KERN_HEADERS=linux-headers-${KERNEL_NAME_PROVIDED} -KERNEL_PKG_LIBC_HEADERS=linux-libc-dev -KERNEL_PKG_LIBC_HEADERS_CROSS=linux-libc-dev-${DISTRO_ARCH}-cross +KERNEL_PKG_LIBC_HEADERS=linux-libc-dev-${KERNEL_NAME_PROVIDED} +KERNEL_PKG_LIBC_HEADERS_CROSS=linux-libc-dev-${DISTRO_ARCH}-cross-${KERNEL_NAME_PROVIDED} KERNEL_PKG_KERN_KBUILD=linux-kbuild-${KERNEL_NAME_PROVIDED} KERNEL_PKG_KERN_KBUILD_CROSS=${KERNEL_PKG_KERN_KBUILD}-${DISTRO_ARCH}-cross diff --git a/meta/recipes-kernel/linux/files/debian/isar/install.tmpl b/meta/recipes-kernel/linux/files/debian/isar/install.tmpl index 0a7bdd66..e1602b9d 100644 --- a/meta/recipes-kernel/linux/files/debian/isar/install.tmpl +++ b/meta/recipes-kernel/linux/files/debian/isar/install.tmpl @@ -225,7 +225,7 @@ install_headers() { if dpkg --compare-versions "${krel}" "lt" "5.4.24"; then headers_check fi - [ -z ${kern_pkgs["linux-libc-dev"]} ] || libc_headers + [ -z ${kern_pkgs["linux-libc-dev-${KERNEL_NAME_PROVIDED}"]} ] || libc_headers kernel_headers } diff --git a/meta/recipes-kernel/linux/linux-custom.inc b/meta/recipes-kernel/linux/linux-custom.inc index bf6c879b..f67bba2b 100644 --- a/meta/recipes-kernel/linux/linux-custom.inc +++ b/meta/recipes-kernel/linux/linux-custom.inc @@ -146,7 +146,9 @@ RECIPE_PROVIDES = " \ linux-image-${KERNEL_NAME_PROVIDED} \ linux-headers-${KERNEL_NAME_PROVIDED} \ linux-libc-dev \ + linux-libc-dev-${KERNEL_NAME_PROVIDED} \ linux-libc-dev-${DISTRO_ARCH}-cross \ + linux-libc-dev-${DISTRO_ARCH}-cross-${KERNEL_NAME_PROVIDED} \ linux-image-${KERNEL_NAME_PROVIDED}-dbg \ linux-kbuild-${KERNEL_NAME_PROVIDED} \ ${BPN}-pseudo-native \ -- 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/20250113080753.72286-1-arulpandiyan.vadivel%40siemens.com. ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH V2] linux-custom: support to add linux-libc-dev package with kernel name 2025-01-13 8:07 ` [PATCH V2] " 'Arulpandiyan Vadivel' via isar-users @ 2025-01-13 14:04 ` 'cedric.hombourger@siemens.com' via isar-users 2025-01-14 16:33 ` [PATCH V3] " 'Arulpandiyan Vadivel' via isar-users 0 siblings, 1 reply; 24+ messages in thread From: 'cedric.hombourger@siemens.com' via isar-users @ 2025-01-13 14:04 UTC (permalink / raw) To: isar-users, Vadivel, Arulpandiyan; +Cc: srikanth.krishnakar On Mon, 2025-01-13 at 13:37 +0530, Arulpandiyan Vadivel wrote: > Debian and Ubuntu use unified kernel headers and a single linux-libc- > dev > package is shipped. In contrast, Isar may build multiple kernel > variants > with different versions and/or patches and their packages. > But linux-libc-dev are suffixed with -${KERNEL_NAME_PROVIDED}: this There was not "." between "their packages" and "but" in my proposal because "but" in that context really meant "except". This changes the meaning. Carefully review the git commit log and make sure it makes sense. You do not have to go with the version I proposed (was just a proposal); we need to make sure that the problem statement and solution are clear and relevant to isar-users > allows > each variant to exist in isar-apt (reprepro may not have more than > one > version of a given package for a given suite). > Apply the same suffix to linux-libc-dev and a Provides: clause. > > Signed-off-by: Arulpandiyan Vadivel > <arulpandiyan.vadivel@siemens.com> > --- > doc/custom_kernel.md | 2 +- > meta/recipes-kernel/linux/files/debian/control.tmpl | 10 +++++++- > -- > .../recipes-kernel/linux/files/debian/isar/common.tmpl | 4 ++-- > .../linux/files/debian/isar/install.tmpl | 2 +- > meta/recipes-kernel/linux/linux-custom.inc | 2 ++ > 5 files changed, 13 insertions(+), 7 deletions(-) > > diff --git a/doc/custom_kernel.md b/doc/custom_kernel.md > index ce5f1bf7..89c7c088 100644 > --- a/doc/custom_kernel.md > +++ b/doc/custom_kernel.md > @@ -51,7 +51,7 @@ The linux-custom recipe provides support for: > > Only the `host` specific package is built automatically at cross > builds. > > - 10. Produce a `linux-libc-dev` package to support user-land builds > + 10. Produce a `linux-libc-dev-${KERNEL_NAME_PROVIDED}` package to > support user-land builds > > 11. Only build/ship the `linux-libc-dev` package if instructed to > (`KERNEL_LIBC_DEV_DEPLOY` equals to `"1"`) > diff --git a/meta/recipes-kernel/linux/files/debian/control.tmpl > b/meta/recipes-kernel/linux/files/debian/control.tmpl > index 04ad0f4f..e440b492 100644 > --- a/meta/recipes-kernel/linux/files/debian/control.tmpl > +++ b/meta/recipes-kernel/linux/files/debian/control.tmpl > @@ -22,19 +22,23 @@ Description: ${KERNEL_NAME_PROVIDED} Linux kernel > headers for @KR@ > . > This is useful for people who need to build external modules > > -Package: linux-libc-dev > +Package: linux-libc-dev-${KERNEL_NAME_PROVIDED} > Build-Profiles: <!nolibcdev kernel> > Section: devel > -Provides: linux-kernel-headers > +Conflicts: linux-libc-dev > +Provides: linux-libc-dev > +Replaces: linux-libc-dev > Architecture: any > Description: Linux support headers for userspace development > This package provides userspaces headers from the Linux kernel. > These headers > are used by the installed headers for GNU glibc and other system > libraries. > > -Package: linux-libc-dev-${DISTRO_ARCH}-cross > +Package: linux-libc-dev-${DISTRO_ARCH}-cross-${KERNEL_NAME_PROVIDED} > Build-Profiles: <!nolibcdev cross !kbuild> > Section: devel > +Conflicts: linux-kernel-headers-${DISTRO_ARCH}-cross > Provides: linux-kernel-headers-${DISTRO_ARCH}-cross > +Replaces: linux-kernel-headers-${DISTRO_ARCH}-cross > Architecture: all > Description: Linux Kernel Headers for development (for cross- > compiling) > This package provides headers from the Linux kernel. These headers > diff --git a/meta/recipes-kernel/linux/files/debian/isar/common.tmpl > b/meta/recipes-kernel/linux/files/debian/isar/common.tmpl > index def8480e..b200930c 100644 > --- a/meta/recipes-kernel/linux/files/debian/isar/common.tmpl > +++ b/meta/recipes-kernel/linux/files/debian/isar/common.tmpl > @@ -8,8 +8,8 @@ set -e > ARCH=${KERNEL_ARCH} > KERNEL_PKG_IMAGE=linux-image-${KERNEL_NAME_PROVIDED} > KERNEL_PKG_KERN_HEADERS=linux-headers-${KERNEL_NAME_PROVIDED} > -KERNEL_PKG_LIBC_HEADERS=linux-libc-dev > -KERNEL_PKG_LIBC_HEADERS_CROSS=linux-libc-dev-${DISTRO_ARCH}-cross > +KERNEL_PKG_LIBC_HEADERS=linux-libc-dev-${KERNEL_NAME_PROVIDED} > +KERNEL_PKG_LIBC_HEADERS_CROSS=linux-libc-dev-${DISTRO_ARCH}-cross- > ${KERNEL_NAME_PROVIDED} > KERNEL_PKG_KERN_KBUILD=linux-kbuild-${KERNEL_NAME_PROVIDED} > KERNEL_PKG_KERN_KBUILD_CROSS=${KERNEL_PKG_KERN_KBUILD}- > ${DISTRO_ARCH}-cross > > diff --git a/meta/recipes-kernel/linux/files/debian/isar/install.tmpl > b/meta/recipes-kernel/linux/files/debian/isar/install.tmpl > index 0a7bdd66..e1602b9d 100644 > --- a/meta/recipes-kernel/linux/files/debian/isar/install.tmpl > +++ b/meta/recipes-kernel/linux/files/debian/isar/install.tmpl > @@ -225,7 +225,7 @@ install_headers() { > if dpkg --compare-versions "${krel}" "lt" "5.4.24"; then > headers_check > fi > - [ -z ${kern_pkgs["linux-libc-dev"]} ] || libc_headers > + [ -z ${kern_pkgs["linux-libc-dev-${KERNEL_NAME_PROVIDED}"]} ] || > libc_headers > kernel_headers > } > > diff --git a/meta/recipes-kernel/linux/linux-custom.inc > b/meta/recipes-kernel/linux/linux-custom.inc > index bf6c879b..f67bba2b 100644 > --- a/meta/recipes-kernel/linux/linux-custom.inc > +++ b/meta/recipes-kernel/linux/linux-custom.inc > @@ -146,7 +146,9 @@ RECIPE_PROVIDES = " \ > linux-image-${KERNEL_NAME_PROVIDED} \ > linux-headers-${KERNEL_NAME_PROVIDED} \ > linux-libc-dev \ > + linux-libc-dev-${KERNEL_NAME_PROVIDED} \ > linux-libc-dev-${DISTRO_ARCH}-cross \ > + linux-libc-dev-${DISTRO_ARCH}-cross-${KERNEL_NAME_PROVIDED} \ > linux-image-${KERNEL_NAME_PROVIDED}-dbg \ > linux-kbuild-${KERNEL_NAME_PROVIDED} \ > ${BPN}-pseudo-native \ -- Cedric Hombourger 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/9e1dc2deaeefabddb25be2b2246e4a790703d1d6.camel%40siemens.com. ^ permalink raw reply [flat|nested] 24+ messages in thread
* [PATCH V3] linux-custom: support to add linux-libc-dev package with kernel name 2025-01-13 14:04 ` 'cedric.hombourger@siemens.com' via isar-users @ 2025-01-14 16:33 ` 'Arulpandiyan Vadivel' via isar-users 2025-01-17 13:25 ` 'Jan Kiszka' via isar-users 0 siblings, 1 reply; 24+ messages in thread From: 'Arulpandiyan Vadivel' via isar-users @ 2025-01-14 16:33 UTC (permalink / raw) To: isar-users; +Cc: cedric.hombourger, srikanth.krishnakar, Arulpandiyan Vadivel Debian and Ubuntu use unified kernel headers and a single linux-libc-dev package is shipped. In contrast, Isar may build multiple kernel variants with different versions and/or patches and their packages but linux-libc-dev are suffixed with -${KERNEL_NAME_PROVIDED}: this allows each variant to exist in isar-apt (reprepro may not have more than one version of a given package for a given suite). Apply the same suffix to linux-libc-dev and a Provides: clause. Signed-off-by: Arulpandiyan Vadivel <arulpandiyan.vadivel@siemens.com> --- Changes since v2 - Updated commit message as suggested - Added KERNEL_NAME_PROVIDED for cross packages of linux-libc-dev as well --- doc/custom_kernel.md | 2 +- meta/recipes-kernel/linux/files/debian/control.tmpl | 10 +++++++--- .../recipes-kernel/linux/files/debian/isar/common.tmpl | 4 ++-- .../linux/files/debian/isar/install.tmpl | 2 +- meta/recipes-kernel/linux/linux-custom.inc | 2 ++ 5 files changed, 13 insertions(+), 7 deletions(-) diff --git a/doc/custom_kernel.md b/doc/custom_kernel.md index ce5f1bf7..89c7c088 100644 --- a/doc/custom_kernel.md +++ b/doc/custom_kernel.md @@ -51,7 +51,7 @@ The linux-custom recipe provides support for: Only the `host` specific package is built automatically at cross builds. - 10. Produce a `linux-libc-dev` package to support user-land builds + 10. Produce a `linux-libc-dev-${KERNEL_NAME_PROVIDED}` package to support user-land builds 11. Only build/ship the `linux-libc-dev` package if instructed to (`KERNEL_LIBC_DEV_DEPLOY` equals to `"1"`) diff --git a/meta/recipes-kernel/linux/files/debian/control.tmpl b/meta/recipes-kernel/linux/files/debian/control.tmpl index 04ad0f4f..e440b492 100644 --- a/meta/recipes-kernel/linux/files/debian/control.tmpl +++ b/meta/recipes-kernel/linux/files/debian/control.tmpl @@ -22,19 +22,23 @@ Description: ${KERNEL_NAME_PROVIDED} Linux kernel headers for @KR@ . This is useful for people who need to build external modules -Package: linux-libc-dev +Package: linux-libc-dev-${KERNEL_NAME_PROVIDED} Build-Profiles: <!nolibcdev kernel> Section: devel -Provides: linux-kernel-headers +Conflicts: linux-libc-dev +Provides: linux-libc-dev +Replaces: linux-libc-dev Architecture: any Description: Linux support headers for userspace development This package provides userspaces headers from the Linux kernel. These headers are used by the installed headers for GNU glibc and other system libraries. -Package: linux-libc-dev-${DISTRO_ARCH}-cross +Package: linux-libc-dev-${DISTRO_ARCH}-cross-${KERNEL_NAME_PROVIDED} Build-Profiles: <!nolibcdev cross !kbuild> Section: devel +Conflicts: linux-kernel-headers-${DISTRO_ARCH}-cross Provides: linux-kernel-headers-${DISTRO_ARCH}-cross +Replaces: linux-kernel-headers-${DISTRO_ARCH}-cross Architecture: all Description: Linux Kernel Headers for development (for cross-compiling) This package provides headers from the Linux kernel. These headers diff --git a/meta/recipes-kernel/linux/files/debian/isar/common.tmpl b/meta/recipes-kernel/linux/files/debian/isar/common.tmpl index def8480e..b200930c 100644 --- a/meta/recipes-kernel/linux/files/debian/isar/common.tmpl +++ b/meta/recipes-kernel/linux/files/debian/isar/common.tmpl @@ -8,8 +8,8 @@ set -e ARCH=${KERNEL_ARCH} KERNEL_PKG_IMAGE=linux-image-${KERNEL_NAME_PROVIDED} KERNEL_PKG_KERN_HEADERS=linux-headers-${KERNEL_NAME_PROVIDED} -KERNEL_PKG_LIBC_HEADERS=linux-libc-dev -KERNEL_PKG_LIBC_HEADERS_CROSS=linux-libc-dev-${DISTRO_ARCH}-cross +KERNEL_PKG_LIBC_HEADERS=linux-libc-dev-${KERNEL_NAME_PROVIDED} +KERNEL_PKG_LIBC_HEADERS_CROSS=linux-libc-dev-${DISTRO_ARCH}-cross-${KERNEL_NAME_PROVIDED} KERNEL_PKG_KERN_KBUILD=linux-kbuild-${KERNEL_NAME_PROVIDED} KERNEL_PKG_KERN_KBUILD_CROSS=${KERNEL_PKG_KERN_KBUILD}-${DISTRO_ARCH}-cross diff --git a/meta/recipes-kernel/linux/files/debian/isar/install.tmpl b/meta/recipes-kernel/linux/files/debian/isar/install.tmpl index 0a7bdd66..e1602b9d 100644 --- a/meta/recipes-kernel/linux/files/debian/isar/install.tmpl +++ b/meta/recipes-kernel/linux/files/debian/isar/install.tmpl @@ -225,7 +225,7 @@ install_headers() { if dpkg --compare-versions "${krel}" "lt" "5.4.24"; then headers_check fi - [ -z ${kern_pkgs["linux-libc-dev"]} ] || libc_headers + [ -z ${kern_pkgs["linux-libc-dev-${KERNEL_NAME_PROVIDED}"]} ] || libc_headers kernel_headers } diff --git a/meta/recipes-kernel/linux/linux-custom.inc b/meta/recipes-kernel/linux/linux-custom.inc index bf6c879b..f67bba2b 100644 --- a/meta/recipes-kernel/linux/linux-custom.inc +++ b/meta/recipes-kernel/linux/linux-custom.inc @@ -146,7 +146,9 @@ RECIPE_PROVIDES = " \ linux-image-${KERNEL_NAME_PROVIDED} \ linux-headers-${KERNEL_NAME_PROVIDED} \ linux-libc-dev \ + linux-libc-dev-${KERNEL_NAME_PROVIDED} \ linux-libc-dev-${DISTRO_ARCH}-cross \ + linux-libc-dev-${DISTRO_ARCH}-cross-${KERNEL_NAME_PROVIDED} \ linux-image-${KERNEL_NAME_PROVIDED}-dbg \ linux-kbuild-${KERNEL_NAME_PROVIDED} \ ${BPN}-pseudo-native \ -- 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/20250114163337.77749-1-arulpandiyan.vadivel%40siemens.com. ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH V3] linux-custom: support to add linux-libc-dev package with kernel name 2025-01-14 16:33 ` [PATCH V3] " 'Arulpandiyan Vadivel' via isar-users @ 2025-01-17 13:25 ` 'Jan Kiszka' via isar-users 2025-01-17 17:37 ` 'Arulpandiyan Vadivel' via isar-users 0 siblings, 1 reply; 24+ messages in thread From: 'Jan Kiszka' via isar-users @ 2025-01-17 13:25 UTC (permalink / raw) To: Arulpandiyan Vadivel, isar-users; +Cc: cedric.hombourger, srikanth.krishnakar On 14.01.25 17:33, 'Arulpandiyan Vadivel' via isar-users wrote: > Debian and Ubuntu use unified kernel headers and a single linux-libc-dev > package is shipped. In contrast, Isar may build multiple kernel variants > with different versions and/or patches and their packages but linux-libc-dev > are suffixed with -${KERNEL_NAME_PROVIDED}: this allows > each variant to exist in isar-apt (reprepro may not have more than one > version of a given package for a given suite). > Apply the same suffix to linux-libc-dev and a Provides: clause. > > Signed-off-by: Arulpandiyan Vadivel <arulpandiyan.vadivel@siemens.com> > --- > Changes since v2 > - Updated commit message as suggested > - Added KERNEL_NAME_PROVIDED for cross packages of linux-libc-dev as well > --- > doc/custom_kernel.md | 2 +- > meta/recipes-kernel/linux/files/debian/control.tmpl | 10 +++++++--- > .../recipes-kernel/linux/files/debian/isar/common.tmpl | 4 ++-- > .../linux/files/debian/isar/install.tmpl | 2 +- > meta/recipes-kernel/linux/linux-custom.inc | 2 ++ > 5 files changed, 13 insertions(+), 7 deletions(-) > > diff --git a/doc/custom_kernel.md b/doc/custom_kernel.md > index ce5f1bf7..89c7c088 100644 > --- a/doc/custom_kernel.md > +++ b/doc/custom_kernel.md > @@ -51,7 +51,7 @@ The linux-custom recipe provides support for: > > Only the `host` specific package is built automatically at cross builds. > > - 10. Produce a `linux-libc-dev` package to support user-land builds > + 10. Produce a `linux-libc-dev-${KERNEL_NAME_PROVIDED}` package to support user-land builds > Why changing the name here > 11. Only build/ship the `linux-libc-dev` package if instructed to but not here? Also, KERNEL_NAME_PROVIDED is not introduced in this document, or in any other manual. > (`KERNEL_LIBC_DEV_DEPLOY` equals to `"1"`) > diff --git a/meta/recipes-kernel/linux/files/debian/control.tmpl b/meta/recipes-kernel/linux/files/debian/control.tmpl > index 04ad0f4f..e440b492 100644 > --- a/meta/recipes-kernel/linux/files/debian/control.tmpl > +++ b/meta/recipes-kernel/linux/files/debian/control.tmpl > @@ -22,19 +22,23 @@ Description: ${KERNEL_NAME_PROVIDED} Linux kernel headers for @KR@ > . > This is useful for people who need to build external modules > > -Package: linux-libc-dev > +Package: linux-libc-dev-${KERNEL_NAME_PROVIDED} > Build-Profiles: <!nolibcdev kernel> > Section: devel > -Provides: linux-kernel-headers > +Conflicts: linux-libc-dev > +Provides: linux-libc-dev > +Replaces: linux-libc-dev > Architecture: any > Description: Linux support headers for userspace development > This package provides userspaces headers from the Linux kernel. These headers > are used by the installed headers for GNU glibc and other system libraries. > > -Package: linux-libc-dev-${DISTRO_ARCH}-cross > +Package: linux-libc-dev-${DISTRO_ARCH}-cross-${KERNEL_NAME_PROVIDED} > Build-Profiles: <!nolibcdev cross !kbuild> > Section: devel > +Conflicts: linux-kernel-headers-${DISTRO_ARCH}-cross > Provides: linux-kernel-headers-${DISTRO_ARCH}-cross > +Replaces: linux-kernel-headers-${DISTRO_ARCH}-cross > Architecture: all > Description: Linux Kernel Headers for development (for cross-compiling) > This package provides headers from the Linux kernel. These headers > diff --git a/meta/recipes-kernel/linux/files/debian/isar/common.tmpl b/meta/recipes-kernel/linux/files/debian/isar/common.tmpl > index def8480e..b200930c 100644 > --- a/meta/recipes-kernel/linux/files/debian/isar/common.tmpl > +++ b/meta/recipes-kernel/linux/files/debian/isar/common.tmpl > @@ -8,8 +8,8 @@ set -e > ARCH=${KERNEL_ARCH} > KERNEL_PKG_IMAGE=linux-image-${KERNEL_NAME_PROVIDED} > KERNEL_PKG_KERN_HEADERS=linux-headers-${KERNEL_NAME_PROVIDED} > -KERNEL_PKG_LIBC_HEADERS=linux-libc-dev > -KERNEL_PKG_LIBC_HEADERS_CROSS=linux-libc-dev-${DISTRO_ARCH}-cross > +KERNEL_PKG_LIBC_HEADERS=linux-libc-dev-${KERNEL_NAME_PROVIDED} > +KERNEL_PKG_LIBC_HEADERS_CROSS=linux-libc-dev-${DISTRO_ARCH}-cross-${KERNEL_NAME_PROVIDED} > KERNEL_PKG_KERN_KBUILD=linux-kbuild-${KERNEL_NAME_PROVIDED} > KERNEL_PKG_KERN_KBUILD_CROSS=${KERNEL_PKG_KERN_KBUILD}-${DISTRO_ARCH}-cross > > diff --git a/meta/recipes-kernel/linux/files/debian/isar/install.tmpl b/meta/recipes-kernel/linux/files/debian/isar/install.tmpl > index 0a7bdd66..e1602b9d 100644 > --- a/meta/recipes-kernel/linux/files/debian/isar/install.tmpl > +++ b/meta/recipes-kernel/linux/files/debian/isar/install.tmpl > @@ -225,7 +225,7 @@ install_headers() { > if dpkg --compare-versions "${krel}" "lt" "5.4.24"; then > headers_check > fi > - [ -z ${kern_pkgs["linux-libc-dev"]} ] || libc_headers > + [ -z ${kern_pkgs["linux-libc-dev-${KERNEL_NAME_PROVIDED}"]} ] || libc_headers > kernel_headers > } > > diff --git a/meta/recipes-kernel/linux/linux-custom.inc b/meta/recipes-kernel/linux/linux-custom.inc > index bf6c879b..f67bba2b 100644 > --- a/meta/recipes-kernel/linux/linux-custom.inc > +++ b/meta/recipes-kernel/linux/linux-custom.inc > @@ -146,7 +146,9 @@ RECIPE_PROVIDES = " \ > linux-image-${KERNEL_NAME_PROVIDED} \ > linux-headers-${KERNEL_NAME_PROVIDED} \ > linux-libc-dev \ > + linux-libc-dev-${KERNEL_NAME_PROVIDED} \ > linux-libc-dev-${DISTRO_ARCH}-cross \ > + linux-libc-dev-${DISTRO_ARCH}-cross-${KERNEL_NAME_PROVIDED} \ > linux-image-${KERNEL_NAME_PROVIDED}-dbg \ > linux-kbuild-${KERNEL_NAME_PROVIDED} \ > ${BPN}-pseudo-native \ The logic of the changes makes sense to me - given that very special (and surely not recommendable) situation you have. But a RECIPE-API-CHANGELOG.md entry is missing. Jan -- 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/073e7edb-8033-43b1-9124-247bb3350671%40siemens.com. ^ permalink raw reply [flat|nested] 24+ messages in thread
* [PATCH V3] linux-custom: support to add linux-libc-dev package with kernel name 2025-01-17 13:25 ` 'Jan Kiszka' via isar-users @ 2025-01-17 17:37 ` 'Arulpandiyan Vadivel' via isar-users 2025-01-17 17:40 ` 'Jan Kiszka' via isar-users 0 siblings, 1 reply; 24+ messages in thread From: 'Arulpandiyan Vadivel' via isar-users @ 2025-01-17 17:37 UTC (permalink / raw) To: isar-users; +Cc: cedric.hombourger, srikanth.krishnakar, Arulpandiyan Vadivel Debian and Ubuntu use unified kernel headers and a single linux-libc-dev package is shipped. In contrast, Isar may build multiple kernel variants with different versions and/or patches and their packages but linux-libc-dev are suffixed with -${KERNEL_NAME_PROVIDED}: this allows each variant to exist in isar-apt (reprepro may not have more than one version of a given package for a given suite). Apply the same suffix to linux-libc-dev / linux-libc-dev-${DISTRO_ARCH}-cross and a Provides: clause. Signed-off-by: Arulpandiyan Vadivel <arulpandiyan.vadivel@siemens.com> --- RECIPE-API-CHANGELOG.md | 12 ++++++++++++ doc/custom_kernel.md | 4 ++-- meta/recipes-kernel/linux/files/debian/control.tmpl | 10 +++++++--- .../linux/files/debian/isar/install.tmpl | 2 +- meta/recipes-kernel/linux/linux-custom.inc | 2 ++ 5 files changed, 24 insertions(+), 6 deletions(-) diff --git a/RECIPE-API-CHANGELOG.md b/RECIPE-API-CHANGELOG.md index f310553a..5d470c94 100644 --- a/RECIPE-API-CHANGELOG.md +++ b/RECIPE-API-CHANGELOG.md @@ -702,3 +702,15 @@ enable cross-compilation. Otherwize ISAR_CROSS_COMPILE = "0" now should be set in local.conf to disable cross-compilation for all the recipes. Sample local.conf from meta-isar used by isar-init-build-env is also changed to enable cross-compilation by default. + +### Enable linux-libc-dev package with KERNEL_NAME_PROVIDED + +By default linux-libc-dev and linux-libc-dev-${DISTRO_ARCH}-cross package +was generated for architecture it builds for. + +This change helps to generate the `linux-libc-dev-${KERNEL_NAME_PROVIDED}` and +`linux-libc-dev-cross-${KERNEL_NAME_PROVIDED}`. +For example, If `KERNEL_NAME_PROVIDED` is configured as `foo` for arm64, now +`linux-libc-dev-foo` and `linux-libc-dev-arm64-cross-foo` package will be +generated. This will help to have multiple versions of linux-libc-dev packages +available for respective bsps in apt feeds. diff --git a/doc/custom_kernel.md b/doc/custom_kernel.md index ce5f1bf7..ade4ad7a 100644 --- a/doc/custom_kernel.md +++ b/doc/custom_kernel.md @@ -51,9 +51,9 @@ The linux-custom recipe provides support for: Only the `host` specific package is built automatically at cross builds. - 10. Produce a `linux-libc-dev` package to support user-land builds + 10. Produce a `linux-libc-dev-${KERNEL_NAME_PROVIDED}` package to support user-land builds - 11. Only build/ship the `linux-libc-dev` package if instructed to + 11. Only build/ship the `linux-libc-dev-${KERNEL_NAME_PROVIDED}` package if instructed to (`KERNEL_LIBC_DEV_DEPLOY` equals to `"1"`) 12. Support both native and cross compiles (`ISAR_CROSS_COMPILE`) diff --git a/meta/recipes-kernel/linux/files/debian/control.tmpl b/meta/recipes-kernel/linux/files/debian/control.tmpl index ec0da1ab..a79b86c4 100644 --- a/meta/recipes-kernel/linux/files/debian/control.tmpl +++ b/meta/recipes-kernel/linux/files/debian/control.tmpl @@ -22,19 +22,23 @@ Description: ${KERNEL_NAME_PROVIDED} Linux kernel headers for @KR@ . This is useful for people who need to build external modules -Package: linux-libc-dev +Package: linux-libc-dev-${KERNEL_NAME_PROVIDED} Build-Profiles: <!nolibcdev kernel> Section: devel -Provides: linux-kernel-headers +Conflicts: linux-libc-dev +Provides: linux-libc-dev +Replaces: linux-libc-dev Architecture: ${KERNEL_LIBC_DEV_ARCH} Description: Linux support headers for userspace development This package provides userspaces headers from the Linux kernel. These headers are used by the installed headers for GNU glibc and other system libraries. -Package: linux-libc-dev-${DISTRO_ARCH}-cross +Package: linux-libc-dev-${DISTRO_ARCH}-cross-${KERNEL_NAME_PROVIDED} Build-Profiles: <!nolibcdev cross !kbuild> Section: devel +Conflicts: linux-kernel-headers-${DISTRO_ARCH}-cross Provides: linux-kernel-headers-${DISTRO_ARCH}-cross +Replaces: linux-kernel-headers-${DISTRO_ARCH}-cross Architecture: all Description: Linux Kernel Headers for development (for cross-compiling) This package provides headers from the Linux kernel. These headers diff --git a/meta/recipes-kernel/linux/files/debian/isar/install.tmpl b/meta/recipes-kernel/linux/files/debian/isar/install.tmpl index 6d742f02..290a7d56 100644 --- a/meta/recipes-kernel/linux/files/debian/isar/install.tmpl +++ b/meta/recipes-kernel/linux/files/debian/isar/install.tmpl @@ -248,7 +248,7 @@ install_headers() { if dpkg --compare-versions "${krel}" "lt" "5.4.24"; then headers_check fi - [ -z ${kern_pkgs["linux-libc-dev"]} ] || libc_headers + [ -z ${kern_pkgs["linux-libc-dev-${KERNEL_NAME_PROVIDED}"]} ] || libc_headers kernel_headers } diff --git a/meta/recipes-kernel/linux/linux-custom.inc b/meta/recipes-kernel/linux/linux-custom.inc index 77700a5d..4f68f4cd 100644 --- a/meta/recipes-kernel/linux/linux-custom.inc +++ b/meta/recipes-kernel/linux/linux-custom.inc @@ -152,7 +152,9 @@ RECIPE_PROVIDES = " \ linux-image-${KERNEL_NAME_PROVIDED} \ linux-headers-${KERNEL_NAME_PROVIDED} \ linux-libc-dev \ + linux-libc-dev-${KERNEL_NAME_PROVIDED} \ linux-libc-dev-${DISTRO_ARCH}-cross \ + linux-libc-dev-${DISTRO_ARCH}-cross-${KERNEL_NAME_PROVIDED} \ linux-image-${KERNEL_NAME_PROVIDED}-dbg \ linux-kbuild-${KERNEL_NAME_PROVIDED} \ ${BPN}-pseudo-native \ -- 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/20250117173715.89204-1-arulpandiyan.vadivel%40siemens.com. ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH V3] linux-custom: support to add linux-libc-dev package with kernel name 2025-01-17 17:37 ` 'Arulpandiyan Vadivel' via isar-users @ 2025-01-17 17:40 ` 'Jan Kiszka' via isar-users 2025-01-17 17:44 ` 'Jan Kiszka' via isar-users 0 siblings, 1 reply; 24+ messages in thread From: 'Jan Kiszka' via isar-users @ 2025-01-17 17:40 UTC (permalink / raw) To: Arulpandiyan Vadivel, isar-users; +Cc: cedric.hombourger, srikanth.krishnakar On 17.01.25 18:37, 'Arulpandiyan Vadivel' via isar-users wrote: > Debian and Ubuntu use unified kernel headers and a single linux-libc-dev > package is shipped. In contrast, Isar may build multiple kernel variants > with different versions and/or patches and their packages but linux-libc-dev > are suffixed with -${KERNEL_NAME_PROVIDED}: this allows > each variant to exist in isar-apt (reprepro may not have more than one > version of a given package for a given suite). > Apply the same suffix to linux-libc-dev / linux-libc-dev-${DISTRO_ARCH}-cross > and a Provides: clause. > > Signed-off-by: Arulpandiyan Vadivel <arulpandiyan.vadivel@siemens.com> > --- > RECIPE-API-CHANGELOG.md | 12 ++++++++++++ > doc/custom_kernel.md | 4 ++-- > meta/recipes-kernel/linux/files/debian/control.tmpl | 10 +++++++--- > .../linux/files/debian/isar/install.tmpl | 2 +- > meta/recipes-kernel/linux/linux-custom.inc | 2 ++ > 5 files changed, 24 insertions(+), 6 deletions(-) > > diff --git a/RECIPE-API-CHANGELOG.md b/RECIPE-API-CHANGELOG.md > index f310553a..5d470c94 100644 > --- a/RECIPE-API-CHANGELOG.md > +++ b/RECIPE-API-CHANGELOG.md > @@ -702,3 +702,15 @@ enable cross-compilation. Otherwize ISAR_CROSS_COMPILE = "0" now should be set > in local.conf to disable cross-compilation for all the recipes. > Sample local.conf from meta-isar used by isar-init-build-env is also changed > to enable cross-compilation by default. > + > +### Enable linux-libc-dev package with KERNEL_NAME_PROVIDED > + > +By default linux-libc-dev and linux-libc-dev-${DISTRO_ARCH}-cross package > +was generated for architecture it builds for. > + > +This change helps to generate the `linux-libc-dev-${KERNEL_NAME_PROVIDED}` and > +`linux-libc-dev-cross-${KERNEL_NAME_PROVIDED}`. > +For example, If `KERNEL_NAME_PROVIDED` is configured as `foo` for arm64, now > +`linux-libc-dev-foo` and `linux-libc-dev-arm64-cross-foo` package will be > +generated. This will help to have multiple versions of linux-libc-dev packages > +available for respective bsps in apt feeds. > diff --git a/doc/custom_kernel.md b/doc/custom_kernel.md > index ce5f1bf7..ade4ad7a 100644 > --- a/doc/custom_kernel.md > +++ b/doc/custom_kernel.md > @@ -51,9 +51,9 @@ The linux-custom recipe provides support for: > > Only the `host` specific package is built automatically at cross builds. > > - 10. Produce a `linux-libc-dev` package to support user-land builds > + 10. Produce a `linux-libc-dev-${KERNEL_NAME_PROVIDED}` package to support user-land builds KERNEL_NAME - this is what the user will deal with. KERNEL_NAME_PROVIDED is internal to the kernel recipes. > > - 11. Only build/ship the `linux-libc-dev` package if instructed to > + 11. Only build/ship the `linux-libc-dev-${KERNEL_NAME_PROVIDED}` package if instructed to > (`KERNEL_LIBC_DEV_DEPLOY` equals to `"1"`) Same here. > > 12. Support both native and cross compiles (`ISAR_CROSS_COMPILE`) > diff --git a/meta/recipes-kernel/linux/files/debian/control.tmpl b/meta/recipes-kernel/linux/files/debian/control.tmpl > index ec0da1ab..a79b86c4 100644 > --- a/meta/recipes-kernel/linux/files/debian/control.tmpl > +++ b/meta/recipes-kernel/linux/files/debian/control.tmpl > @@ -22,19 +22,23 @@ Description: ${KERNEL_NAME_PROVIDED} Linux kernel headers for @KR@ > . > This is useful for people who need to build external modules > > -Package: linux-libc-dev > +Package: linux-libc-dev-${KERNEL_NAME_PROVIDED} > Build-Profiles: <!nolibcdev kernel> > Section: devel > -Provides: linux-kernel-headers > +Conflicts: linux-libc-dev > +Provides: linux-libc-dev > +Replaces: linux-libc-dev > Architecture: ${KERNEL_LIBC_DEV_ARCH} > Description: Linux support headers for userspace development > This package provides userspaces headers from the Linux kernel. These headers > are used by the installed headers for GNU glibc and other system libraries. > > -Package: linux-libc-dev-${DISTRO_ARCH}-cross > +Package: linux-libc-dev-${DISTRO_ARCH}-cross-${KERNEL_NAME_PROVIDED} > Build-Profiles: <!nolibcdev cross !kbuild> > Section: devel > +Conflicts: linux-kernel-headers-${DISTRO_ARCH}-cross > Provides: linux-kernel-headers-${DISTRO_ARCH}-cross > +Replaces: linux-kernel-headers-${DISTRO_ARCH}-cross > Architecture: all > Description: Linux Kernel Headers for development (for cross-compiling) > This package provides headers from the Linux kernel. These headers > diff --git a/meta/recipes-kernel/linux/files/debian/isar/install.tmpl b/meta/recipes-kernel/linux/files/debian/isar/install.tmpl > index 6d742f02..290a7d56 100644 > --- a/meta/recipes-kernel/linux/files/debian/isar/install.tmpl > +++ b/meta/recipes-kernel/linux/files/debian/isar/install.tmpl > @@ -248,7 +248,7 @@ install_headers() { > if dpkg --compare-versions "${krel}" "lt" "5.4.24"; then > headers_check > fi > - [ -z ${kern_pkgs["linux-libc-dev"]} ] || libc_headers > + [ -z ${kern_pkgs["linux-libc-dev-${KERNEL_NAME_PROVIDED}"]} ] || libc_headers > kernel_headers > } > > diff --git a/meta/recipes-kernel/linux/linux-custom.inc b/meta/recipes-kernel/linux/linux-custom.inc > index 77700a5d..4f68f4cd 100644 > --- a/meta/recipes-kernel/linux/linux-custom.inc > +++ b/meta/recipes-kernel/linux/linux-custom.inc > @@ -152,7 +152,9 @@ RECIPE_PROVIDES = " \ > linux-image-${KERNEL_NAME_PROVIDED} \ > linux-headers-${KERNEL_NAME_PROVIDED} \ > linux-libc-dev \ > + linux-libc-dev-${KERNEL_NAME_PROVIDED} \ > linux-libc-dev-${DISTRO_ARCH}-cross \ > + linux-libc-dev-${DISTRO_ARCH}-cross-${KERNEL_NAME_PROVIDED} \ > linux-image-${KERNEL_NAME_PROVIDED}-dbg \ > linux-kbuild-${KERNEL_NAME_PROVIDED} \ > ${BPN}-pseudo-native \ Jan -- 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/447a6a96-6df0-43bd-878c-0288abb036af%40siemens.com. ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH V3] linux-custom: support to add linux-libc-dev package with kernel name 2025-01-17 17:40 ` 'Jan Kiszka' via isar-users @ 2025-01-17 17:44 ` 'Jan Kiszka' via isar-users 2025-01-17 17:59 ` 'Arulpandiyan Vadivel' via isar-users 2025-01-17 18:02 ` [PATCH V4] " 'Arulpandiyan Vadivel' via isar-users 0 siblings, 2 replies; 24+ messages in thread From: 'Jan Kiszka' via isar-users @ 2025-01-17 17:44 UTC (permalink / raw) To: Arulpandiyan Vadivel, isar-users; +Cc: cedric.hombourger, srikanth.krishnakar On 17.01.25 18:40, Jan Kiszka wrote: > On 17.01.25 18:37, 'Arulpandiyan Vadivel' via isar-users wrote: >> Debian and Ubuntu use unified kernel headers and a single linux-libc-dev >> package is shipped. In contrast, Isar may build multiple kernel variants >> with different versions and/or patches and their packages but linux-libc-dev >> are suffixed with -${KERNEL_NAME_PROVIDED}: this allows >> each variant to exist in isar-apt (reprepro may not have more than one >> version of a given package for a given suite). >> Apply the same suffix to linux-libc-dev / linux-libc-dev-${DISTRO_ARCH}-cross >> and a Provides: clause. >> >> Signed-off-by: Arulpandiyan Vadivel <arulpandiyan.vadivel@siemens.com> >> --- >> RECIPE-API-CHANGELOG.md | 12 ++++++++++++ >> doc/custom_kernel.md | 4 ++-- >> meta/recipes-kernel/linux/files/debian/control.tmpl | 10 +++++++--- >> .../linux/files/debian/isar/install.tmpl | 2 +- >> meta/recipes-kernel/linux/linux-custom.inc | 2 ++ >> 5 files changed, 24 insertions(+), 6 deletions(-) >> >> diff --git a/RECIPE-API-CHANGELOG.md b/RECIPE-API-CHANGELOG.md >> index f310553a..5d470c94 100644 >> --- a/RECIPE-API-CHANGELOG.md >> +++ b/RECIPE-API-CHANGELOG.md >> @@ -702,3 +702,15 @@ enable cross-compilation. Otherwize ISAR_CROSS_COMPILE = "0" now should be set >> in local.conf to disable cross-compilation for all the recipes. >> Sample local.conf from meta-isar used by isar-init-build-env is also changed >> to enable cross-compilation by default. >> + >> +### Enable linux-libc-dev package with KERNEL_NAME_PROVIDED >> + >> +By default linux-libc-dev and linux-libc-dev-${DISTRO_ARCH}-cross package >> +was generated for architecture it builds for. >> + >> +This change helps to generate the `linux-libc-dev-${KERNEL_NAME_PROVIDED}` and >> +`linux-libc-dev-cross-${KERNEL_NAME_PROVIDED}`. >> +For example, If `KERNEL_NAME_PROVIDED` is configured as `foo` for arm64, now >> +`linux-libc-dev-foo` and `linux-libc-dev-arm64-cross-foo` package will be >> +generated. This will help to have multiple versions of linux-libc-dev packages >> +available for respective bsps in apt feeds. And for explaining this situation better, have a look at https://github.com/ilbers/isar/blob/master/RECIPE-API-CHANGELOG.md#using-custom-package-name-for-linux-kernel-and-headers Jan >> diff --git a/doc/custom_kernel.md b/doc/custom_kernel.md >> index ce5f1bf7..ade4ad7a 100644 >> --- a/doc/custom_kernel.md >> +++ b/doc/custom_kernel.md >> @@ -51,9 +51,9 @@ The linux-custom recipe provides support for: >> >> Only the `host` specific package is built automatically at cross builds. >> >> - 10. Produce a `linux-libc-dev` package to support user-land builds >> + 10. Produce a `linux-libc-dev-${KERNEL_NAME_PROVIDED}` package to support user-land builds > > KERNEL_NAME - this is what the user will deal with. KERNEL_NAME_PROVIDED > is internal to the kernel recipes. > >> >> - 11. Only build/ship the `linux-libc-dev` package if instructed to >> + 11. Only build/ship the `linux-libc-dev-${KERNEL_NAME_PROVIDED}` package if instructed to >> (`KERNEL_LIBC_DEV_DEPLOY` equals to `"1"`) > > Same here. > >> >> 12. Support both native and cross compiles (`ISAR_CROSS_COMPILE`) >> diff --git a/meta/recipes-kernel/linux/files/debian/control.tmpl b/meta/recipes-kernel/linux/files/debian/control.tmpl >> index ec0da1ab..a79b86c4 100644 >> --- a/meta/recipes-kernel/linux/files/debian/control.tmpl >> +++ b/meta/recipes-kernel/linux/files/debian/control.tmpl >> @@ -22,19 +22,23 @@ Description: ${KERNEL_NAME_PROVIDED} Linux kernel headers for @KR@ >> . >> This is useful for people who need to build external modules >> >> -Package: linux-libc-dev >> +Package: linux-libc-dev-${KERNEL_NAME_PROVIDED} >> Build-Profiles: <!nolibcdev kernel> >> Section: devel >> -Provides: linux-kernel-headers >> +Conflicts: linux-libc-dev >> +Provides: linux-libc-dev >> +Replaces: linux-libc-dev >> Architecture: ${KERNEL_LIBC_DEV_ARCH} >> Description: Linux support headers for userspace development >> This package provides userspaces headers from the Linux kernel. These headers >> are used by the installed headers for GNU glibc and other system libraries. >> >> -Package: linux-libc-dev-${DISTRO_ARCH}-cross >> +Package: linux-libc-dev-${DISTRO_ARCH}-cross-${KERNEL_NAME_PROVIDED} >> Build-Profiles: <!nolibcdev cross !kbuild> >> Section: devel >> +Conflicts: linux-kernel-headers-${DISTRO_ARCH}-cross >> Provides: linux-kernel-headers-${DISTRO_ARCH}-cross >> +Replaces: linux-kernel-headers-${DISTRO_ARCH}-cross >> Architecture: all >> Description: Linux Kernel Headers for development (for cross-compiling) >> This package provides headers from the Linux kernel. These headers >> diff --git a/meta/recipes-kernel/linux/files/debian/isar/install.tmpl b/meta/recipes-kernel/linux/files/debian/isar/install.tmpl >> index 6d742f02..290a7d56 100644 >> --- a/meta/recipes-kernel/linux/files/debian/isar/install.tmpl >> +++ b/meta/recipes-kernel/linux/files/debian/isar/install.tmpl >> @@ -248,7 +248,7 @@ install_headers() { >> if dpkg --compare-versions "${krel}" "lt" "5.4.24"; then >> headers_check >> fi >> - [ -z ${kern_pkgs["linux-libc-dev"]} ] || libc_headers >> + [ -z ${kern_pkgs["linux-libc-dev-${KERNEL_NAME_PROVIDED}"]} ] || libc_headers >> kernel_headers >> } >> >> diff --git a/meta/recipes-kernel/linux/linux-custom.inc b/meta/recipes-kernel/linux/linux-custom.inc >> index 77700a5d..4f68f4cd 100644 >> --- a/meta/recipes-kernel/linux/linux-custom.inc >> +++ b/meta/recipes-kernel/linux/linux-custom.inc >> @@ -152,7 +152,9 @@ RECIPE_PROVIDES = " \ >> linux-image-${KERNEL_NAME_PROVIDED} \ >> linux-headers-${KERNEL_NAME_PROVIDED} \ >> linux-libc-dev \ >> + linux-libc-dev-${KERNEL_NAME_PROVIDED} \ >> linux-libc-dev-${DISTRO_ARCH}-cross \ >> + linux-libc-dev-${DISTRO_ARCH}-cross-${KERNEL_NAME_PROVIDED} \ >> linux-image-${KERNEL_NAME_PROVIDED}-dbg \ >> linux-kbuild-${KERNEL_NAME_PROVIDED} \ >> ${BPN}-pseudo-native \ > > Jan > -- 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/e39cf095-ba9f-4249-b532-ab0aa9ae76c3%40siemens.com. ^ permalink raw reply [flat|nested] 24+ messages in thread
* [PATCH V3] linux-custom: support to add linux-libc-dev package with kernel name 2025-01-17 17:44 ` 'Jan Kiszka' via isar-users @ 2025-01-17 17:59 ` 'Arulpandiyan Vadivel' via isar-users 2025-01-17 18:02 ` [PATCH V4] " 'Arulpandiyan Vadivel' via isar-users 1 sibling, 0 replies; 24+ messages in thread From: 'Arulpandiyan Vadivel' via isar-users @ 2025-01-17 17:59 UTC (permalink / raw) To: isar-users; +Cc: cedric.hombourger, srikanth.krishnakar, Arulpandiyan Vadivel Debian and Ubuntu use unified kernel headers and a single linux-libc-dev package is shipped. In contrast, Isar may build multiple kernel variants with different versions and/or patches and their packages but linux-libc-dev are suffixed with -${KERNEL_NAME_PROVIDED}: this allows each variant to exist in isar-apt (reprepro may not have more than one version of a given package for a given suite). Apply the same suffix to linux-libc-dev / linux-libc-dev-${DISTRO_ARCH}-cross and a Provides: clause. Signed-off-by: Arulpandiyan Vadivel <arulpandiyan.vadivel@siemens.com> --- Changes since v3 - Updated commit message to include cross packages - Added an entry in RECIPE_API_CHANGELOG.md - updated doc/custom_kernel.md documentation Changes since v2 - Updated commit message as suggested - Added KERNEL_NAME_PROVIDED for cross packages of linux-libc-dev as well --- RECIPE-API-CHANGELOG.md | 12 ++++++++++++ doc/custom_kernel.md | 4 ++-- meta/recipes-kernel/linux/files/debian/control.tmpl | 10 +++++++--- .../linux/files/debian/isar/install.tmpl | 2 +- meta/recipes-kernel/linux/linux-custom.inc | 2 ++ 5 files changed, 24 insertions(+), 6 deletions(-) diff --git a/RECIPE-API-CHANGELOG.md b/RECIPE-API-CHANGELOG.md index f310553a..5d470c94 100644 --- a/RECIPE-API-CHANGELOG.md +++ b/RECIPE-API-CHANGELOG.md @@ -702,3 +702,15 @@ enable cross-compilation. Otherwize ISAR_CROSS_COMPILE = "0" now should be set in local.conf to disable cross-compilation for all the recipes. Sample local.conf from meta-isar used by isar-init-build-env is also changed to enable cross-compilation by default. + +### Enable linux-libc-dev package with KERNEL_NAME_PROVIDED + +By default linux-libc-dev and linux-libc-dev-${DISTRO_ARCH}-cross package +was generated for architecture it builds for. + +This change helps to generate the `linux-libc-dev-${KERNEL_NAME_PROVIDED}` and +`linux-libc-dev-cross-${KERNEL_NAME_PROVIDED}`. +For example, If `KERNEL_NAME_PROVIDED` is configured as `foo` for arm64, now +`linux-libc-dev-foo` and `linux-libc-dev-arm64-cross-foo` package will be +generated. This will help to have multiple versions of linux-libc-dev packages +available for respective bsps in apt feeds. diff --git a/doc/custom_kernel.md b/doc/custom_kernel.md index ce5f1bf7..ade4ad7a 100644 --- a/doc/custom_kernel.md +++ b/doc/custom_kernel.md @@ -51,9 +51,9 @@ The linux-custom recipe provides support for: Only the `host` specific package is built automatically at cross builds. - 10. Produce a `linux-libc-dev` package to support user-land builds + 10. Produce a `linux-libc-dev-${KERNEL_NAME_PROVIDED}` package to support user-land builds - 11. Only build/ship the `linux-libc-dev` package if instructed to + 11. Only build/ship the `linux-libc-dev-${KERNEL_NAME_PROVIDED}` package if instructed to (`KERNEL_LIBC_DEV_DEPLOY` equals to `"1"`) 12. Support both native and cross compiles (`ISAR_CROSS_COMPILE`) diff --git a/meta/recipes-kernel/linux/files/debian/control.tmpl b/meta/recipes-kernel/linux/files/debian/control.tmpl index ec0da1ab..a79b86c4 100644 --- a/meta/recipes-kernel/linux/files/debian/control.tmpl +++ b/meta/recipes-kernel/linux/files/debian/control.tmpl @@ -22,19 +22,23 @@ Description: ${KERNEL_NAME_PROVIDED} Linux kernel headers for @KR@ . This is useful for people who need to build external modules -Package: linux-libc-dev +Package: linux-libc-dev-${KERNEL_NAME_PROVIDED} Build-Profiles: <!nolibcdev kernel> Section: devel -Provides: linux-kernel-headers +Conflicts: linux-libc-dev +Provides: linux-libc-dev +Replaces: linux-libc-dev Architecture: ${KERNEL_LIBC_DEV_ARCH} Description: Linux support headers for userspace development This package provides userspaces headers from the Linux kernel. These headers are used by the installed headers for GNU glibc and other system libraries. -Package: linux-libc-dev-${DISTRO_ARCH}-cross +Package: linux-libc-dev-${DISTRO_ARCH}-cross-${KERNEL_NAME_PROVIDED} Build-Profiles: <!nolibcdev cross !kbuild> Section: devel +Conflicts: linux-kernel-headers-${DISTRO_ARCH}-cross Provides: linux-kernel-headers-${DISTRO_ARCH}-cross +Replaces: linux-kernel-headers-${DISTRO_ARCH}-cross Architecture: all Description: Linux Kernel Headers for development (for cross-compiling) This package provides headers from the Linux kernel. These headers diff --git a/meta/recipes-kernel/linux/files/debian/isar/install.tmpl b/meta/recipes-kernel/linux/files/debian/isar/install.tmpl index 6d742f02..290a7d56 100644 --- a/meta/recipes-kernel/linux/files/debian/isar/install.tmpl +++ b/meta/recipes-kernel/linux/files/debian/isar/install.tmpl @@ -248,7 +248,7 @@ install_headers() { if dpkg --compare-versions "${krel}" "lt" "5.4.24"; then headers_check fi - [ -z ${kern_pkgs["linux-libc-dev"]} ] || libc_headers + [ -z ${kern_pkgs["linux-libc-dev-${KERNEL_NAME_PROVIDED}"]} ] || libc_headers kernel_headers } diff --git a/meta/recipes-kernel/linux/linux-custom.inc b/meta/recipes-kernel/linux/linux-custom.inc index 77700a5d..4f68f4cd 100644 --- a/meta/recipes-kernel/linux/linux-custom.inc +++ b/meta/recipes-kernel/linux/linux-custom.inc @@ -152,7 +152,9 @@ RECIPE_PROVIDES = " \ linux-image-${KERNEL_NAME_PROVIDED} \ linux-headers-${KERNEL_NAME_PROVIDED} \ linux-libc-dev \ + linux-libc-dev-${KERNEL_NAME_PROVIDED} \ linux-libc-dev-${DISTRO_ARCH}-cross \ + linux-libc-dev-${DISTRO_ARCH}-cross-${KERNEL_NAME_PROVIDED} \ linux-image-${KERNEL_NAME_PROVIDED}-dbg \ linux-kbuild-${KERNEL_NAME_PROVIDED} \ ${BPN}-pseudo-native \ -- 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/20250117175935.90086-1-arulpandiyan.vadivel%40siemens.com. ^ permalink raw reply [flat|nested] 24+ messages in thread
* [PATCH V4] linux-custom: support to add linux-libc-dev package with kernel name 2025-01-17 17:44 ` 'Jan Kiszka' via isar-users 2025-01-17 17:59 ` 'Arulpandiyan Vadivel' via isar-users @ 2025-01-17 18:02 ` 'Arulpandiyan Vadivel' via isar-users 2025-01-21 9:47 ` [PATCH] " 'Arulpandiyan Vadivel' via isar-users 1 sibling, 1 reply; 24+ messages in thread From: 'Arulpandiyan Vadivel' via isar-users @ 2025-01-17 18:02 UTC (permalink / raw) To: isar-users; +Cc: cedric.hombourger, srikanth.krishnakar, Arulpandiyan Vadivel Debian and Ubuntu use unified kernel headers and a single linux-libc-dev package is shipped. In contrast, Isar may build multiple kernel variants with different versions and/or patches and their packages but linux-libc-dev are suffixed with -${KERNEL_NAME_PROVIDED}: this allows each variant to exist in isar-apt (reprepro may not have more than one version of a given package for a given suite). Apply the same suffix to linux-libc-dev / linux-libc-dev-${DISTRO_ARCH}-cross and a Provides: clause. Signed-off-by: Arulpandiyan Vadivel <arulpandiyan.vadivel@siemens.com> --- Changes since v3 - Updated commit message to include cross packages - Added an entry in RECIPE_API_CHANGELOG.md - updated doc/custom_kernel.md documentation Changes since v2 - Updated commit message as suggested - Added KERNEL_NAME_PROVIDED for cross packages of linux-libc-dev as well --- RECIPE-API-CHANGELOG.md | 12 ++++++++++++ doc/custom_kernel.md | 4 ++-- meta/recipes-kernel/linux/files/debian/control.tmpl | 10 +++++++--- .../linux/files/debian/isar/install.tmpl | 2 +- meta/recipes-kernel/linux/linux-custom.inc | 2 ++ 5 files changed, 24 insertions(+), 6 deletions(-) diff --git a/RECIPE-API-CHANGELOG.md b/RECIPE-API-CHANGELOG.md index f310553a..64c0f34a 100644 --- a/RECIPE-API-CHANGELOG.md +++ b/RECIPE-API-CHANGELOG.md @@ -702,3 +702,15 @@ enable cross-compilation. Otherwize ISAR_CROSS_COMPILE = "0" now should be set in local.conf to disable cross-compilation for all the recipes. Sample local.conf from meta-isar used by isar-init-build-env is also changed to enable cross-compilation by default. + +### Enable linux-libc-dev package with KERNEL_NAME + +By default linux-libc-dev and linux-libc-dev-${DISTRO_ARCH}-cross package +was generated for architecture it builds for. + +This change helps to generate the `linux-libc-dev-${KERNEL_NAME}` and +`linux-libc-dev-${DISTRO_ARCH}-cross-${KERNEL_NAME}`. +For example, If `KERNEL_NAME` is configured as `foo` for arm64, now +`linux-libc-dev-foo` and `linux-libc-dev-arm64-cross-foo` package will be +generated. This will help to have multiple versions of linux-libc-dev packages +available for respective bsps in apt feeds. diff --git a/doc/custom_kernel.md b/doc/custom_kernel.md index ce5f1bf7..2dca577c 100644 --- a/doc/custom_kernel.md +++ b/doc/custom_kernel.md @@ -51,9 +51,9 @@ The linux-custom recipe provides support for: Only the `host` specific package is built automatically at cross builds. - 10. Produce a `linux-libc-dev` package to support user-land builds + 10. Produce a `linux-libc-dev-${KERNEL_NAME}` package to support user-land builds - 11. Only build/ship the `linux-libc-dev` package if instructed to + 11. Only build/ship the `linux-libc-dev-${KERNEL_NAME}` package if instructed to (`KERNEL_LIBC_DEV_DEPLOY` equals to `"1"`) 12. Support both native and cross compiles (`ISAR_CROSS_COMPILE`) diff --git a/meta/recipes-kernel/linux/files/debian/control.tmpl b/meta/recipes-kernel/linux/files/debian/control.tmpl index ec0da1ab..a79b86c4 100644 --- a/meta/recipes-kernel/linux/files/debian/control.tmpl +++ b/meta/recipes-kernel/linux/files/debian/control.tmpl @@ -22,19 +22,23 @@ Description: ${KERNEL_NAME_PROVIDED} Linux kernel headers for @KR@ . This is useful for people who need to build external modules -Package: linux-libc-dev +Package: linux-libc-dev-${KERNEL_NAME_PROVIDED} Build-Profiles: <!nolibcdev kernel> Section: devel -Provides: linux-kernel-headers +Conflicts: linux-libc-dev +Provides: linux-libc-dev +Replaces: linux-libc-dev Architecture: ${KERNEL_LIBC_DEV_ARCH} Description: Linux support headers for userspace development This package provides userspaces headers from the Linux kernel. These headers are used by the installed headers for GNU glibc and other system libraries. -Package: linux-libc-dev-${DISTRO_ARCH}-cross +Package: linux-libc-dev-${DISTRO_ARCH}-cross-${KERNEL_NAME_PROVIDED} Build-Profiles: <!nolibcdev cross !kbuild> Section: devel +Conflicts: linux-kernel-headers-${DISTRO_ARCH}-cross Provides: linux-kernel-headers-${DISTRO_ARCH}-cross +Replaces: linux-kernel-headers-${DISTRO_ARCH}-cross Architecture: all Description: Linux Kernel Headers for development (for cross-compiling) This package provides headers from the Linux kernel. These headers diff --git a/meta/recipes-kernel/linux/files/debian/isar/install.tmpl b/meta/recipes-kernel/linux/files/debian/isar/install.tmpl index 6d742f02..290a7d56 100644 --- a/meta/recipes-kernel/linux/files/debian/isar/install.tmpl +++ b/meta/recipes-kernel/linux/files/debian/isar/install.tmpl @@ -248,7 +248,7 @@ install_headers() { if dpkg --compare-versions "${krel}" "lt" "5.4.24"; then headers_check fi - [ -z ${kern_pkgs["linux-libc-dev"]} ] || libc_headers + [ -z ${kern_pkgs["linux-libc-dev-${KERNEL_NAME_PROVIDED}"]} ] || libc_headers kernel_headers } diff --git a/meta/recipes-kernel/linux/linux-custom.inc b/meta/recipes-kernel/linux/linux-custom.inc index 77700a5d..4f68f4cd 100644 --- a/meta/recipes-kernel/linux/linux-custom.inc +++ b/meta/recipes-kernel/linux/linux-custom.inc @@ -152,7 +152,9 @@ RECIPE_PROVIDES = " \ linux-image-${KERNEL_NAME_PROVIDED} \ linux-headers-${KERNEL_NAME_PROVIDED} \ linux-libc-dev \ + linux-libc-dev-${KERNEL_NAME_PROVIDED} \ linux-libc-dev-${DISTRO_ARCH}-cross \ + linux-libc-dev-${DISTRO_ARCH}-cross-${KERNEL_NAME_PROVIDED} \ linux-image-${KERNEL_NAME_PROVIDED}-dbg \ linux-kbuild-${KERNEL_NAME_PROVIDED} \ ${BPN}-pseudo-native \ -- 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/20250117180207.90250-1-arulpandiyan.vadivel%40siemens.com. ^ permalink raw reply [flat|nested] 24+ messages in thread
* [PATCH] linux-custom: support to add linux-libc-dev package with kernel name 2025-01-17 18:02 ` [PATCH V4] " 'Arulpandiyan Vadivel' via isar-users @ 2025-01-21 9:47 ` 'Arulpandiyan Vadivel' via isar-users 2025-02-06 11:50 ` 'Vadivel, Arulpandiyan' via isar-users ` (2 more replies) 0 siblings, 3 replies; 24+ messages in thread From: 'Arulpandiyan Vadivel' via isar-users @ 2025-01-21 9:47 UTC (permalink / raw) To: isar-users; +Cc: cedric.hombourger, srikanth.krishnakar, Arulpandiyan Vadivel Debian and Ubuntu use unified kernel headers and a single linux-libc-dev package is shipped. In contrast, Isar may build multiple kernel variants with different versions and/or patches and their packages but linux-libc-dev are suffixed with -${KERNEL_NAME_PROVIDED}: this allows each variant to exist in isar-apt (reprepro may not have more than one version of a given package for a given suite). Apply the same suffix to linux-libc-dev / linux-libc-dev-${DISTRO_ARCH}-cross and a Provides: clause. Signed-off-by: Arulpandiyan Vadivel <arulpandiyan.vadivel@siemens.com> --- Changes since v4 - Updated KERNEL_PKG_LIBC_HEADERS path with KERNEL_NAME_PROVIDED Changes since v3 - Updated commit message to include cross packages - updated doc/custom_kernel.md documentation Changes since v2 - Updated commit message as suggested - Added KERNEL_NAME_PROVIDED for cross packages of linux-libc-dev as well --- --- RECIPE-API-CHANGELOG.md | 12 ++++++++++++ doc/custom_kernel.md | 4 ++-- meta/recipes-kernel/linux/files/debian/control.tmpl | 10 +++++++--- .../linux/files/debian/isar/common.tmpl | 2 +- .../linux/files/debian/isar/install.tmpl | 2 +- meta/recipes-kernel/linux/linux-custom.inc | 2 ++ 6 files changed, 25 insertions(+), 7 deletions(-) diff --git a/RECIPE-API-CHANGELOG.md b/RECIPE-API-CHANGELOG.md index f310553a..64c0f34a 100644 --- a/RECIPE-API-CHANGELOG.md +++ b/RECIPE-API-CHANGELOG.md @@ -702,3 +702,15 @@ enable cross-compilation. Otherwize ISAR_CROSS_COMPILE = "0" now should be set in local.conf to disable cross-compilation for all the recipes. Sample local.conf from meta-isar used by isar-init-build-env is also changed to enable cross-compilation by default. + +### Enable linux-libc-dev package with KERNEL_NAME + +By default linux-libc-dev and linux-libc-dev-${DISTRO_ARCH}-cross package +was generated for architecture it builds for. + +This change helps to generate the `linux-libc-dev-${KERNEL_NAME}` and +`linux-libc-dev-${DISTRO_ARCH}-cross-${KERNEL_NAME}`. +For example, If `KERNEL_NAME` is configured as `foo` for arm64, now +`linux-libc-dev-foo` and `linux-libc-dev-arm64-cross-foo` package will be +generated. This will help to have multiple versions of linux-libc-dev packages +available for respective bsps in apt feeds. diff --git a/doc/custom_kernel.md b/doc/custom_kernel.md index ce5f1bf7..2dca577c 100644 --- a/doc/custom_kernel.md +++ b/doc/custom_kernel.md @@ -51,9 +51,9 @@ The linux-custom recipe provides support for: Only the `host` specific package is built automatically at cross builds. - 10. Produce a `linux-libc-dev` package to support user-land builds + 10. Produce a `linux-libc-dev-${KERNEL_NAME}` package to support user-land builds - 11. Only build/ship the `linux-libc-dev` package if instructed to + 11. Only build/ship the `linux-libc-dev-${KERNEL_NAME}` package if instructed to (`KERNEL_LIBC_DEV_DEPLOY` equals to `"1"`) 12. Support both native and cross compiles (`ISAR_CROSS_COMPILE`) diff --git a/meta/recipes-kernel/linux/files/debian/control.tmpl b/meta/recipes-kernel/linux/files/debian/control.tmpl index ec0da1ab..a79b86c4 100644 --- a/meta/recipes-kernel/linux/files/debian/control.tmpl +++ b/meta/recipes-kernel/linux/files/debian/control.tmpl @@ -22,19 +22,23 @@ Description: ${KERNEL_NAME_PROVIDED} Linux kernel headers for @KR@ . This is useful for people who need to build external modules -Package: linux-libc-dev +Package: linux-libc-dev-${KERNEL_NAME_PROVIDED} Build-Profiles: <!nolibcdev kernel> Section: devel -Provides: linux-kernel-headers +Conflicts: linux-libc-dev +Provides: linux-libc-dev +Replaces: linux-libc-dev Architecture: ${KERNEL_LIBC_DEV_ARCH} Description: Linux support headers for userspace development This package provides userspaces headers from the Linux kernel. These headers are used by the installed headers for GNU glibc and other system libraries. -Package: linux-libc-dev-${DISTRO_ARCH}-cross +Package: linux-libc-dev-${DISTRO_ARCH}-cross-${KERNEL_NAME_PROVIDED} Build-Profiles: <!nolibcdev cross !kbuild> Section: devel +Conflicts: linux-kernel-headers-${DISTRO_ARCH}-cross Provides: linux-kernel-headers-${DISTRO_ARCH}-cross +Replaces: linux-kernel-headers-${DISTRO_ARCH}-cross Architecture: all Description: Linux Kernel Headers for development (for cross-compiling) This package provides headers from the Linux kernel. These headers diff --git a/meta/recipes-kernel/linux/files/debian/isar/common.tmpl b/meta/recipes-kernel/linux/files/debian/isar/common.tmpl index f9cc2f02..b004214f 100644 --- a/meta/recipes-kernel/linux/files/debian/isar/common.tmpl +++ b/meta/recipes-kernel/linux/files/debian/isar/common.tmpl @@ -8,7 +8,7 @@ set -e ARCH=${KERNEL_ARCH} KERNEL_PKG_IMAGE=linux-image-${KERNEL_NAME_PROVIDED} KERNEL_PKG_KERN_HEADERS=linux-headers-${KERNEL_NAME_PROVIDED} -KERNEL_PKG_LIBC_HEADERS=linux-libc-dev +KERNEL_PKG_LIBC_HEADERS=linux-libc-dev-${KERNEL_NAME_PROVIDED} KERNEL_PKG_LIBC_HEADERS_CROSS=linux-libc-dev-${DISTRO_ARCH}-cross KERNEL_PKG_KERN_KBUILD=linux-kbuild-${KERNEL_NAME_PROVIDED} KERNEL_PKG_KERN_KBUILD_CROSS=${KERNEL_PKG_KERN_KBUILD}-${DISTRO_ARCH}-cross diff --git a/meta/recipes-kernel/linux/files/debian/isar/install.tmpl b/meta/recipes-kernel/linux/files/debian/isar/install.tmpl index 6d742f02..290a7d56 100644 --- a/meta/recipes-kernel/linux/files/debian/isar/install.tmpl +++ b/meta/recipes-kernel/linux/files/debian/isar/install.tmpl @@ -248,7 +248,7 @@ install_headers() { if dpkg --compare-versions "${krel}" "lt" "5.4.24"; then headers_check fi - [ -z ${kern_pkgs["linux-libc-dev"]} ] || libc_headers + [ -z ${kern_pkgs["linux-libc-dev-${KERNEL_NAME_PROVIDED}"]} ] || libc_headers kernel_headers } diff --git a/meta/recipes-kernel/linux/linux-custom.inc b/meta/recipes-kernel/linux/linux-custom.inc index 77700a5d..4f68f4cd 100644 --- a/meta/recipes-kernel/linux/linux-custom.inc +++ b/meta/recipes-kernel/linux/linux-custom.inc @@ -152,7 +152,9 @@ RECIPE_PROVIDES = " \ linux-image-${KERNEL_NAME_PROVIDED} \ linux-headers-${KERNEL_NAME_PROVIDED} \ linux-libc-dev \ + linux-libc-dev-${KERNEL_NAME_PROVIDED} \ linux-libc-dev-${DISTRO_ARCH}-cross \ + linux-libc-dev-${DISTRO_ARCH}-cross-${KERNEL_NAME_PROVIDED} \ linux-image-${KERNEL_NAME_PROVIDED}-dbg \ linux-kbuild-${KERNEL_NAME_PROVIDED} \ ${BPN}-pseudo-native \ -- 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/20250121094736.99179-1-arulpandiyan.vadivel%40siemens.com. ^ permalink raw reply [flat|nested] 24+ messages in thread
* RE: [PATCH] linux-custom: support to add linux-libc-dev package with kernel name 2025-01-21 9:47 ` [PATCH] " 'Arulpandiyan Vadivel' via isar-users @ 2025-02-06 11:50 ` 'Vadivel, Arulpandiyan' via isar-users 2025-02-07 7:48 ` Uladzimir Bely 2025-09-10 13:55 ` 'Jan Kiszka' via isar-users 2 siblings, 0 replies; 24+ messages in thread From: 'Vadivel, Arulpandiyan' via isar-users @ 2025-02-06 11:50 UTC (permalink / raw) To: isar-users; +Cc: cedric.hombourger, srikanth.krishnakar, ubely Hello Everyone, Can you please help to merge this change request, If there are no review comments or suggestions ? Regards, Arulpandiyan V. -----Original Message----- From: Vadivel, Arulpandiyan (FT FDS CES LX PBU RSOL) <arulpandiyan.vadivel@siemens.com> Sent: 21 January 2025 15:18 To: isar-users@googlegroups.com Cc: Hombourger, Cedric (FT FDS CES LX) <cedric.hombourger@siemens.com>; Krishnakar, Srikanth (FT FDS CES LX PBU RSOL) <srikanth.krishnakar@siemens.com>; Vadivel, Arulpandiyan (FT FDS CES LX PBU RSOL) <arulpandiyan.vadivel@siemens.com> Subject: [PATCH] linux-custom: support to add linux-libc-dev package with kernel name Debian and Ubuntu use unified kernel headers and a single linux-libc-dev package is shipped. In contrast, Isar may build multiple kernel variants with different versions and/or patches and their packages but linux-libc-dev are suffixed with -${KERNEL_NAME_PROVIDED}: this allows each variant to exist in isar-apt (reprepro may not have more than one version of a given package for a given suite). Apply the same suffix to linux-libc-dev / linux-libc-dev-${DISTRO_ARCH}-cross and a Provides: clause. Signed-off-by: Arulpandiyan Vadivel <arulpandiyan.vadivel@siemens.com> --- Changes since v4 - Updated KERNEL_PKG_LIBC_HEADERS path with KERNEL_NAME_PROVIDED Changes since v3 - Updated commit message to include cross packages - updated doc/custom_kernel.md documentation Changes since v2 - Updated commit message as suggested - Added KERNEL_NAME_PROVIDED for cross packages of linux-libc-dev as well --- --- RECIPE-API-CHANGELOG.md | 12 ++++++++++++ doc/custom_kernel.md | 4 ++-- meta/recipes-kernel/linux/files/debian/control.tmpl | 10 +++++++--- .../linux/files/debian/isar/common.tmpl | 2 +- .../linux/files/debian/isar/install.tmpl | 2 +- meta/recipes-kernel/linux/linux-custom.inc | 2 ++ 6 files changed, 25 insertions(+), 7 deletions(-) diff --git a/RECIPE-API-CHANGELOG.md b/RECIPE-API-CHANGELOG.md index f310553a..64c0f34a 100644 --- a/RECIPE-API-CHANGELOG.md +++ b/RECIPE-API-CHANGELOG.md @@ -702,3 +702,15 @@ enable cross-compilation. Otherwize ISAR_CROSS_COMPILE = "0" now should be set in local.conf to disable cross-compilation for all the recipes. Sample local.conf from meta-isar used by isar-init-build-env is also changed to enable cross-compilation by default. + +### Enable linux-libc-dev package with KERNEL_NAME + +By default linux-libc-dev and linux-libc-dev-${DISTRO_ARCH}-cross +package was generated for architecture it builds for. + +This change helps to generate the `linux-libc-dev-${KERNEL_NAME}` and +`linux-libc-dev-${DISTRO_ARCH}-cross-${KERNEL_NAME}`. +For example, If `KERNEL_NAME` is configured as `foo` for arm64, now +`linux-libc-dev-foo` and `linux-libc-dev-arm64-cross-foo` package will +be generated. This will help to have multiple versions of +linux-libc-dev packages available for respective bsps in apt feeds. diff --git a/doc/custom_kernel.md b/doc/custom_kernel.md index ce5f1bf7..2dca577c 100644 --- a/doc/custom_kernel.md +++ b/doc/custom_kernel.md @@ -51,9 +51,9 @@ The linux-custom recipe provides support for: Only the `host` specific package is built automatically at cross builds. - 10. Produce a `linux-libc-dev` package to support user-land builds + 10. Produce a `linux-libc-dev-${KERNEL_NAME}` package to support + user-land builds - 11. Only build/ship the `linux-libc-dev` package if instructed to + 11. Only build/ship the `linux-libc-dev-${KERNEL_NAME}` package if + instructed to (`KERNEL_LIBC_DEV_DEPLOY` equals to `"1"`) 12. Support both native and cross compiles (`ISAR_CROSS_COMPILE`) diff --git a/meta/recipes-kernel/linux/files/debian/control.tmpl b/meta/recipes-kernel/linux/files/debian/control.tmpl index ec0da1ab..a79b86c4 100644 --- a/meta/recipes-kernel/linux/files/debian/control.tmpl +++ b/meta/recipes-kernel/linux/files/debian/control.tmpl @@ -22,19 +22,23 @@ Description: ${KERNEL_NAME_PROVIDED} Linux kernel headers for @KR@ . This is useful for people who need to build external modules -Package: linux-libc-dev +Package: linux-libc-dev-${KERNEL_NAME_PROVIDED} Build-Profiles: <!nolibcdev kernel> Section: devel -Provides: linux-kernel-headers +Conflicts: linux-libc-dev +Provides: linux-libc-dev +Replaces: linux-libc-dev Architecture: ${KERNEL_LIBC_DEV_ARCH} Description: Linux support headers for userspace development This package provides userspaces headers from the Linux kernel. These headers are used by the installed headers for GNU glibc and other system libraries. -Package: linux-libc-dev-${DISTRO_ARCH}-cross +Package: linux-libc-dev-${DISTRO_ARCH}-cross-${KERNEL_NAME_PROVIDED} Build-Profiles: <!nolibcdev cross !kbuild> Section: devel +Conflicts: linux-kernel-headers-${DISTRO_ARCH}-cross Provides: linux-kernel-headers-${DISTRO_ARCH}-cross +Replaces: linux-kernel-headers-${DISTRO_ARCH}-cross Architecture: all Description: Linux Kernel Headers for development (for cross-compiling) This package provides headers from the Linux kernel. These headers diff --git a/meta/recipes-kernel/linux/files/debian/isar/common.tmpl b/meta/recipes-kernel/linux/files/debian/isar/common.tmpl index f9cc2f02..b004214f 100644 --- a/meta/recipes-kernel/linux/files/debian/isar/common.tmpl +++ b/meta/recipes-kernel/linux/files/debian/isar/common.tmpl @@ -8,7 +8,7 @@ set -e ARCH=${KERNEL_ARCH} KERNEL_PKG_IMAGE=linux-image-${KERNEL_NAME_PROVIDED} KERNEL_PKG_KERN_HEADERS=linux-headers-${KERNEL_NAME_PROVIDED} -KERNEL_PKG_LIBC_HEADERS=linux-libc-dev +KERNEL_PKG_LIBC_HEADERS=linux-libc-dev-${KERNEL_NAME_PROVIDED} KERNEL_PKG_LIBC_HEADERS_CROSS=linux-libc-dev-${DISTRO_ARCH}-cross KERNEL_PKG_KERN_KBUILD=linux-kbuild-${KERNEL_NAME_PROVIDED} KERNEL_PKG_KERN_KBUILD_CROSS=${KERNEL_PKG_KERN_KBUILD}-${DISTRO_ARCH}-cross diff --git a/meta/recipes-kernel/linux/files/debian/isar/install.tmpl b/meta/recipes-kernel/linux/files/debian/isar/install.tmpl index 6d742f02..290a7d56 100644 --- a/meta/recipes-kernel/linux/files/debian/isar/install.tmpl +++ b/meta/recipes-kernel/linux/files/debian/isar/install.tmpl @@ -248,7 +248,7 @@ install_headers() { if dpkg --compare-versions "${krel}" "lt" "5.4.24"; then headers_check fi - [ -z ${kern_pkgs["linux-libc-dev"]} ] || libc_headers + [ -z ${kern_pkgs["linux-libc-dev-${KERNEL_NAME_PROVIDED}"]} ] || + libc_headers kernel_headers } diff --git a/meta/recipes-kernel/linux/linux-custom.inc b/meta/recipes-kernel/linux/linux-custom.inc index 77700a5d..4f68f4cd 100644 --- a/meta/recipes-kernel/linux/linux-custom.inc +++ b/meta/recipes-kernel/linux/linux-custom.inc @@ -152,7 +152,9 @@ RECIPE_PROVIDES = " \ linux-image-${KERNEL_NAME_PROVIDED} \ linux-headers-${KERNEL_NAME_PROVIDED} \ linux-libc-dev \ + linux-libc-dev-${KERNEL_NAME_PROVIDED} \ linux-libc-dev-${DISTRO_ARCH}-cross \ + linux-libc-dev-${DISTRO_ARCH}-cross-${KERNEL_NAME_PROVIDED} \ linux-image-${KERNEL_NAME_PROVIDED}-dbg \ linux-kbuild-${KERNEL_NAME_PROVIDED} \ ${BPN}-pseudo-native \ -- 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/SEZPR06MB5000FEB1788543F684D5BB749AF62%40SEZPR06MB5000.apcprd06.prod.outlook.com. ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH] linux-custom: support to add linux-libc-dev package with kernel name 2025-01-21 9:47 ` [PATCH] " 'Arulpandiyan Vadivel' via isar-users 2025-02-06 11:50 ` 'Vadivel, Arulpandiyan' via isar-users @ 2025-02-07 7:48 ` Uladzimir Bely 2025-09-10 13:55 ` 'Jan Kiszka' via isar-users 2 siblings, 0 replies; 24+ messages in thread From: Uladzimir Bely @ 2025-02-07 7:48 UTC (permalink / raw) To: Arulpandiyan Vadivel, isar-users On Tue, 2025-01-21 at 15:17 +0530, 'Arulpandiyan Vadivel' via isar- users wrote: > Debian and Ubuntu use unified kernel headers and a single linux-libc- > dev > package is shipped. In contrast, Isar may build multiple kernel > variants > with different versions and/or patches and their packages but linux- > libc-dev > are suffixed with -${KERNEL_NAME_PROVIDED}: this allows > each variant to exist in isar-apt (reprepro may not have more than > one > version of a given package for a given suite). > Apply the same suffix to linux-libc-dev / linux-libc-dev- > ${DISTRO_ARCH}-cross > and a Provides: clause. > > Signed-off-by: Arulpandiyan Vadivel > <arulpandiyan.vadivel@siemens.com> > > --- > Changes since v4 > - Updated KERNEL_PKG_LIBC_HEADERS path with KERNEL_NAME_PROVIDED > > Changes since v3 > - Updated commit message to include cross packages > - updated doc/custom_kernel.md documentation > > Changes since v2 > - Updated commit message as suggested > - Added KERNEL_NAME_PROVIDED for cross packages of linux-libc-dev as > well > > --- > --- > RECIPE-API-CHANGELOG.md | 12 > ++++++++++++ > doc/custom_kernel.md | 4 ++-- > meta/recipes-kernel/linux/files/debian/control.tmpl | 10 +++++++--- > .../linux/files/debian/isar/common.tmpl | 2 +- > .../linux/files/debian/isar/install.tmpl | 2 +- > meta/recipes-kernel/linux/linux-custom.inc | 2 ++ > 6 files changed, 25 insertions(+), 7 deletions(-) > > diff --git a/RECIPE-API-CHANGELOG.md b/RECIPE-API-CHANGELOG.md > index f310553a..64c0f34a 100644 > --- a/RECIPE-API-CHANGELOG.md > +++ b/RECIPE-API-CHANGELOG.md > @@ -702,3 +702,15 @@ enable cross-compilation. Otherwize > ISAR_CROSS_COMPILE = "0" now should be set > in local.conf to disable cross-compilation for all the recipes. > Sample local.conf from meta-isar used by isar-init-build-env is also > changed > to enable cross-compilation by default. > + > +### Enable linux-libc-dev package with KERNEL_NAME > + > +By default linux-libc-dev and linux-libc-dev-${DISTRO_ARCH}-cross > package > +was generated for architecture it builds for. > + > +This change helps to generate the `linux-libc-dev-${KERNEL_NAME}` > and > +`linux-libc-dev-${DISTRO_ARCH}-cross-${KERNEL_NAME}`. > +For example, If `KERNEL_NAME` is configured as `foo` for arm64, now > +`linux-libc-dev-foo` and `linux-libc-dev-arm64-cross-foo` package > will be > +generated. This will help to have multiple versions of linux-libc- > dev packages > +available for respective bsps in apt feeds. > diff --git a/doc/custom_kernel.md b/doc/custom_kernel.md > index ce5f1bf7..2dca577c 100644 > --- a/doc/custom_kernel.md > +++ b/doc/custom_kernel.md > @@ -51,9 +51,9 @@ The linux-custom recipe provides support for: > > Only the `host` specific package is built automatically at cross > builds. > > - 10. Produce a `linux-libc-dev` package to support user-land builds > + 10. Produce a `linux-libc-dev-${KERNEL_NAME}` package to support > user-land builds > > - 11. Only build/ship the `linux-libc-dev` package if instructed to > + 11. Only build/ship the `linux-libc-dev-${KERNEL_NAME}` package if > instructed to > (`KERNEL_LIBC_DEV_DEPLOY` equals to `"1"`) > > 12. Support both native and cross compiles (`ISAR_CROSS_COMPILE`) > diff --git a/meta/recipes-kernel/linux/files/debian/control.tmpl > b/meta/recipes-kernel/linux/files/debian/control.tmpl > index ec0da1ab..a79b86c4 100644 > --- a/meta/recipes-kernel/linux/files/debian/control.tmpl > +++ b/meta/recipes-kernel/linux/files/debian/control.tmpl > @@ -22,19 +22,23 @@ Description: ${KERNEL_NAME_PROVIDED} Linux kernel > headers for @KR@ > . > This is useful for people who need to build external modules > > -Package: linux-libc-dev > +Package: linux-libc-dev-${KERNEL_NAME_PROVIDED} > Build-Profiles: <!nolibcdev kernel> > Section: devel > -Provides: linux-kernel-headers > +Conflicts: linux-libc-dev > +Provides: linux-libc-dev > +Replaces: linux-libc-dev > Architecture: ${KERNEL_LIBC_DEV_ARCH} > Description: Linux support headers for userspace development > This package provides userspaces headers from the Linux kernel. > These headers > are used by the installed headers for GNU glibc and other system > libraries. > > -Package: linux-libc-dev-${DISTRO_ARCH}-cross > +Package: linux-libc-dev-${DISTRO_ARCH}-cross-${KERNEL_NAME_PROVIDED} > Build-Profiles: <!nolibcdev cross !kbuild> > Section: devel > +Conflicts: linux-kernel-headers-${DISTRO_ARCH}-cross > Provides: linux-kernel-headers-${DISTRO_ARCH}-cross > +Replaces: linux-kernel-headers-${DISTRO_ARCH}-cross > Architecture: all > Description: Linux Kernel Headers for development (for cross- > compiling) > This package provides headers from the Linux kernel. These headers > diff --git a/meta/recipes-kernel/linux/files/debian/isar/common.tmpl > b/meta/recipes-kernel/linux/files/debian/isar/common.tmpl > index f9cc2f02..b004214f 100644 > --- a/meta/recipes-kernel/linux/files/debian/isar/common.tmpl > +++ b/meta/recipes-kernel/linux/files/debian/isar/common.tmpl > @@ -8,7 +8,7 @@ set -e > ARCH=${KERNEL_ARCH} > KERNEL_PKG_IMAGE=linux-image-${KERNEL_NAME_PROVIDED} > KERNEL_PKG_KERN_HEADERS=linux-headers-${KERNEL_NAME_PROVIDED} > -KERNEL_PKG_LIBC_HEADERS=linux-libc-dev > +KERNEL_PKG_LIBC_HEADERS=linux-libc-dev-${KERNEL_NAME_PROVIDED} > KERNEL_PKG_LIBC_HEADERS_CROSS=linux-libc-dev-${DISTRO_ARCH}-cross > KERNEL_PKG_KERN_KBUILD=linux-kbuild-${KERNEL_NAME_PROVIDED} > KERNEL_PKG_KERN_KBUILD_CROSS=${KERNEL_PKG_KERN_KBUILD}- > ${DISTRO_ARCH}-cross > diff --git a/meta/recipes-kernel/linux/files/debian/isar/install.tmpl > b/meta/recipes-kernel/linux/files/debian/isar/install.tmpl > index 6d742f02..290a7d56 100644 > --- a/meta/recipes-kernel/linux/files/debian/isar/install.tmpl > +++ b/meta/recipes-kernel/linux/files/debian/isar/install.tmpl > @@ -248,7 +248,7 @@ install_headers() { > if dpkg --compare-versions "${krel}" "lt" "5.4.24"; then > headers_check > fi > - [ -z ${kern_pkgs["linux-libc-dev"]} ] || libc_headers > + [ -z ${kern_pkgs["linux-libc-dev-${KERNEL_NAME_PROVIDED}"]} ] || > libc_headers > kernel_headers > } > > diff --git a/meta/recipes-kernel/linux/linux-custom.inc > b/meta/recipes-kernel/linux/linux-custom.inc > index 77700a5d..4f68f4cd 100644 > --- a/meta/recipes-kernel/linux/linux-custom.inc > +++ b/meta/recipes-kernel/linux/linux-custom.inc > @@ -152,7 +152,9 @@ RECIPE_PROVIDES = " \ > linux-image-${KERNEL_NAME_PROVIDED} \ > linux-headers-${KERNEL_NAME_PROVIDED} \ > linux-libc-dev \ > + linux-libc-dev-${KERNEL_NAME_PROVIDED} \ > linux-libc-dev-${DISTRO_ARCH}-cross \ > + linux-libc-dev-${DISTRO_ARCH}-cross-${KERNEL_NAME_PROVIDED} \ > linux-image-${KERNEL_NAME_PROVIDED}-dbg \ > linux-kbuild-${KERNEL_NAME_PROVIDED} \ > ${BPN}-pseudo-native \ > -- > 2.39.5 > Applied to next, thanks. -- Best regards, Uladzimir. -- 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/ef269256329920679936e19979be59ab65ef6c16.camel%40ilbers.de. ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH] linux-custom: support to add linux-libc-dev package with kernel name 2025-01-21 9:47 ` [PATCH] " 'Arulpandiyan Vadivel' via isar-users 2025-02-06 11:50 ` 'Vadivel, Arulpandiyan' via isar-users 2025-02-07 7:48 ` Uladzimir Bely @ 2025-09-10 13:55 ` 'Jan Kiszka' via isar-users 2025-09-10 17:22 ` 'Jan Kiszka' via isar-users 2 siblings, 1 reply; 24+ messages in thread From: 'Jan Kiszka' via isar-users @ 2025-09-10 13:55 UTC (permalink / raw) To: Arulpandiyan Vadivel, isar-users; +Cc: cedric.hombourger, srikanth.krishnakar On 21.01.25 10:47, 'Arulpandiyan Vadivel' via isar-users wrote: > Debian and Ubuntu use unified kernel headers and a single linux-libc-dev > package is shipped. In contrast, Isar may build multiple kernel variants > with different versions and/or patches and their packages but linux-libc-dev > are suffixed with -${KERNEL_NAME_PROVIDED}: this allows > each variant to exist in isar-apt (reprepro may not have more than one > version of a given package for a given suite). > Apply the same suffix to linux-libc-dev / linux-libc-dev-${DISTRO_ARCH}-cross > and a Provides: clause. > > Signed-off-by: Arulpandiyan Vadivel <arulpandiyan.vadivel@siemens.com> > > --- > Changes since v4 > - Updated KERNEL_PKG_LIBC_HEADERS path with KERNEL_NAME_PROVIDED > > Changes since v3 > - Updated commit message to include cross packages > - updated doc/custom_kernel.md documentation > > Changes since v2 > - Updated commit message as suggested > - Added KERNEL_NAME_PROVIDED for cross packages of linux-libc-dev as well > > --- > --- > RECIPE-API-CHANGELOG.md | 12 ++++++++++++ > doc/custom_kernel.md | 4 ++-- > meta/recipes-kernel/linux/files/debian/control.tmpl | 10 +++++++--- > .../linux/files/debian/isar/common.tmpl | 2 +- > .../linux/files/debian/isar/install.tmpl | 2 +- > meta/recipes-kernel/linux/linux-custom.inc | 2 ++ > 6 files changed, 25 insertions(+), 7 deletions(-) > > diff --git a/RECIPE-API-CHANGELOG.md b/RECIPE-API-CHANGELOG.md > index f310553a..64c0f34a 100644 > --- a/RECIPE-API-CHANGELOG.md > +++ b/RECIPE-API-CHANGELOG.md > @@ -702,3 +702,15 @@ enable cross-compilation. Otherwize ISAR_CROSS_COMPILE = "0" now should be set > in local.conf to disable cross-compilation for all the recipes. > Sample local.conf from meta-isar used by isar-init-build-env is also changed > to enable cross-compilation by default. > + > +### Enable linux-libc-dev package with KERNEL_NAME > + > +By default linux-libc-dev and linux-libc-dev-${DISTRO_ARCH}-cross package > +was generated for architecture it builds for. > + > +This change helps to generate the `linux-libc-dev-${KERNEL_NAME}` and > +`linux-libc-dev-${DISTRO_ARCH}-cross-${KERNEL_NAME}`. > +For example, If `KERNEL_NAME` is configured as `foo` for arm64, now > +`linux-libc-dev-foo` and `linux-libc-dev-arm64-cross-foo` package will be > +generated. This will help to have multiple versions of linux-libc-dev packages > +available for respective bsps in apt feeds. > diff --git a/doc/custom_kernel.md b/doc/custom_kernel.md > index ce5f1bf7..2dca577c 100644 > --- a/doc/custom_kernel.md > +++ b/doc/custom_kernel.md > @@ -51,9 +51,9 @@ The linux-custom recipe provides support for: > > Only the `host` specific package is built automatically at cross builds. > > - 10. Produce a `linux-libc-dev` package to support user-land builds > + 10. Produce a `linux-libc-dev-${KERNEL_NAME}` package to support user-land builds > > - 11. Only build/ship the `linux-libc-dev` package if instructed to > + 11. Only build/ship the `linux-libc-dev-${KERNEL_NAME}` package if instructed to > (`KERNEL_LIBC_DEV_DEPLOY` equals to `"1"`) > > 12. Support both native and cross compiles (`ISAR_CROSS_COMPILE`) > diff --git a/meta/recipes-kernel/linux/files/debian/control.tmpl b/meta/recipes-kernel/linux/files/debian/control.tmpl > index ec0da1ab..a79b86c4 100644 > --- a/meta/recipes-kernel/linux/files/debian/control.tmpl > +++ b/meta/recipes-kernel/linux/files/debian/control.tmpl > @@ -22,19 +22,23 @@ Description: ${KERNEL_NAME_PROVIDED} Linux kernel headers for @KR@ > . > This is useful for people who need to build external modules > > -Package: linux-libc-dev > +Package: linux-libc-dev-${KERNEL_NAME_PROVIDED} > Build-Profiles: <!nolibcdev kernel> > Section: devel > -Provides: linux-kernel-headers > +Conflicts: linux-libc-dev > +Provides: linux-libc-dev > +Replaces: linux-libc-dev > Architecture: ${KERNEL_LIBC_DEV_ARCH} > Description: Linux support headers for userspace development > This package provides userspaces headers from the Linux kernel. These headers > are used by the installed headers for GNU glibc and other system libraries. > > -Package: linux-libc-dev-${DISTRO_ARCH}-cross > +Package: linux-libc-dev-${DISTRO_ARCH}-cross-${KERNEL_NAME_PROVIDED} > Build-Profiles: <!nolibcdev cross !kbuild> > Section: devel > +Conflicts: linux-kernel-headers-${DISTRO_ARCH}-cross > Provides: linux-kernel-headers-${DISTRO_ARCH}-cross > +Replaces: linux-kernel-headers-${DISTRO_ARCH}-cross > Architecture: all > Description: Linux Kernel Headers for development (for cross-compiling) > This package provides headers from the Linux kernel. These headers > diff --git a/meta/recipes-kernel/linux/files/debian/isar/common.tmpl b/meta/recipes-kernel/linux/files/debian/isar/common.tmpl > index f9cc2f02..b004214f 100644 > --- a/meta/recipes-kernel/linux/files/debian/isar/common.tmpl > +++ b/meta/recipes-kernel/linux/files/debian/isar/common.tmpl > @@ -8,7 +8,7 @@ set -e > ARCH=${KERNEL_ARCH} > KERNEL_PKG_IMAGE=linux-image-${KERNEL_NAME_PROVIDED} > KERNEL_PKG_KERN_HEADERS=linux-headers-${KERNEL_NAME_PROVIDED} > -KERNEL_PKG_LIBC_HEADERS=linux-libc-dev > +KERNEL_PKG_LIBC_HEADERS=linux-libc-dev-${KERNEL_NAME_PROVIDED} > KERNEL_PKG_LIBC_HEADERS_CROSS=linux-libc-dev-${DISTRO_ARCH}-cross This broke the cross libc-dev package. Fix is being tested. Seems we are lacking tests for this scenario: found via xenomai-images only, and there we were lacking CI for the affected path as well :(. Jan -- 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/a44131e6-2700-4a7b-88dd-5941516c6c98%40siemens.com. ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH] linux-custom: support to add linux-libc-dev package with kernel name 2025-09-10 13:55 ` 'Jan Kiszka' via isar-users @ 2025-09-10 17:22 ` 'Jan Kiszka' via isar-users 2025-09-11 5:11 ` 'Jan Kiszka' via isar-users 0 siblings, 1 reply; 24+ messages in thread From: 'Jan Kiszka' via isar-users @ 2025-09-10 17:22 UTC (permalink / raw) To: Arulpandiyan Vadivel, isar-users; +Cc: cedric.hombourger, srikanth.krishnakar On 10.09.25 15:55, 'Jan Kiszka' via isar-users wrote: > On 21.01.25 10:47, 'Arulpandiyan Vadivel' via isar-users wrote: >> Debian and Ubuntu use unified kernel headers and a single linux-libc-dev >> package is shipped. In contrast, Isar may build multiple kernel variants >> with different versions and/or patches and their packages but linux-libc-dev >> are suffixed with -${KERNEL_NAME_PROVIDED}: this allows >> each variant to exist in isar-apt (reprepro may not have more than one >> version of a given package for a given suite). >> Apply the same suffix to linux-libc-dev / linux-libc-dev-${DISTRO_ARCH}-cross >> and a Provides: clause. >> >> Signed-off-by: Arulpandiyan Vadivel <arulpandiyan.vadivel@siemens.com> >> >> --- >> Changes since v4 >> - Updated KERNEL_PKG_LIBC_HEADERS path with KERNEL_NAME_PROVIDED >> >> Changes since v3 >> - Updated commit message to include cross packages >> - updated doc/custom_kernel.md documentation >> >> Changes since v2 >> - Updated commit message as suggested >> - Added KERNEL_NAME_PROVIDED for cross packages of linux-libc-dev as well >> >> --- >> --- >> RECIPE-API-CHANGELOG.md | 12 ++++++++++++ >> doc/custom_kernel.md | 4 ++-- >> meta/recipes-kernel/linux/files/debian/control.tmpl | 10 +++++++--- >> .../linux/files/debian/isar/common.tmpl | 2 +- >> .../linux/files/debian/isar/install.tmpl | 2 +- >> meta/recipes-kernel/linux/linux-custom.inc | 2 ++ >> 6 files changed, 25 insertions(+), 7 deletions(-) >> >> diff --git a/RECIPE-API-CHANGELOG.md b/RECIPE-API-CHANGELOG.md >> index f310553a..64c0f34a 100644 >> --- a/RECIPE-API-CHANGELOG.md >> +++ b/RECIPE-API-CHANGELOG.md >> @@ -702,3 +702,15 @@ enable cross-compilation. Otherwize ISAR_CROSS_COMPILE = "0" now should be set >> in local.conf to disable cross-compilation for all the recipes. >> Sample local.conf from meta-isar used by isar-init-build-env is also changed >> to enable cross-compilation by default. >> + >> +### Enable linux-libc-dev package with KERNEL_NAME >> + >> +By default linux-libc-dev and linux-libc-dev-${DISTRO_ARCH}-cross package >> +was generated for architecture it builds for. >> + >> +This change helps to generate the `linux-libc-dev-${KERNEL_NAME}` and >> +`linux-libc-dev-${DISTRO_ARCH}-cross-${KERNEL_NAME}`. >> +For example, If `KERNEL_NAME` is configured as `foo` for arm64, now >> +`linux-libc-dev-foo` and `linux-libc-dev-arm64-cross-foo` package will be >> +generated. This will help to have multiple versions of linux-libc-dev packages >> +available for respective bsps in apt feeds. >> diff --git a/doc/custom_kernel.md b/doc/custom_kernel.md >> index ce5f1bf7..2dca577c 100644 >> --- a/doc/custom_kernel.md >> +++ b/doc/custom_kernel.md >> @@ -51,9 +51,9 @@ The linux-custom recipe provides support for: >> >> Only the `host` specific package is built automatically at cross builds. >> >> - 10. Produce a `linux-libc-dev` package to support user-land builds >> + 10. Produce a `linux-libc-dev-${KERNEL_NAME}` package to support user-land builds >> >> - 11. Only build/ship the `linux-libc-dev` package if instructed to >> + 11. Only build/ship the `linux-libc-dev-${KERNEL_NAME}` package if instructed to >> (`KERNEL_LIBC_DEV_DEPLOY` equals to `"1"`) >> >> 12. Support both native and cross compiles (`ISAR_CROSS_COMPILE`) >> diff --git a/meta/recipes-kernel/linux/files/debian/control.tmpl b/meta/recipes-kernel/linux/files/debian/control.tmpl >> index ec0da1ab..a79b86c4 100644 >> --- a/meta/recipes-kernel/linux/files/debian/control.tmpl >> +++ b/meta/recipes-kernel/linux/files/debian/control.tmpl >> @@ -22,19 +22,23 @@ Description: ${KERNEL_NAME_PROVIDED} Linux kernel headers for @KR@ >> . >> This is useful for people who need to build external modules >> >> -Package: linux-libc-dev >> +Package: linux-libc-dev-${KERNEL_NAME_PROVIDED} >> Build-Profiles: <!nolibcdev kernel> >> Section: devel >> -Provides: linux-kernel-headers >> +Conflicts: linux-libc-dev >> +Provides: linux-libc-dev >> +Replaces: linux-libc-dev >> Architecture: ${KERNEL_LIBC_DEV_ARCH} >> Description: Linux support headers for userspace development >> This package provides userspaces headers from the Linux kernel. These headers >> are used by the installed headers for GNU glibc and other system libraries. >> >> -Package: linux-libc-dev-${DISTRO_ARCH}-cross >> +Package: linux-libc-dev-${DISTRO_ARCH}-cross-${KERNEL_NAME_PROVIDED} >> Build-Profiles: <!nolibcdev cross !kbuild> >> Section: devel >> +Conflicts: linux-kernel-headers-${DISTRO_ARCH}-cross >> Provides: linux-kernel-headers-${DISTRO_ARCH}-cross >> +Replaces: linux-kernel-headers-${DISTRO_ARCH}-cross This was also wrong. >> Architecture: all >> Description: Linux Kernel Headers for development (for cross-compiling) >> This package provides headers from the Linux kernel. These headers >> diff --git a/meta/recipes-kernel/linux/files/debian/isar/common.tmpl b/meta/recipes-kernel/linux/files/debian/isar/common.tmpl >> index f9cc2f02..b004214f 100644 >> --- a/meta/recipes-kernel/linux/files/debian/isar/common.tmpl >> +++ b/meta/recipes-kernel/linux/files/debian/isar/common.tmpl >> @@ -8,7 +8,7 @@ set -e >> ARCH=${KERNEL_ARCH} >> KERNEL_PKG_IMAGE=linux-image-${KERNEL_NAME_PROVIDED} >> KERNEL_PKG_KERN_HEADERS=linux-headers-${KERNEL_NAME_PROVIDED} >> -KERNEL_PKG_LIBC_HEADERS=linux-libc-dev >> +KERNEL_PKG_LIBC_HEADERS=linux-libc-dev-${KERNEL_NAME_PROVIDED} >> KERNEL_PKG_LIBC_HEADERS_CROSS=linux-libc-dev-${DISTRO_ARCH}-cross > > This broke the cross libc-dev package. Fix is being tested. > > Seems we are lacking tests for this scenario: found via xenomai-images > only, and there we were lacking CI for the affected path as well :(. > There is another issue with this patch which was likely hard to predict: It broke automatic downgrades, possibly also updates, of libc-dev in the sbuild-chroots. As xenomai-images is currently broken in other regards as well, I cannot easily point to a demo case, but I reproduced that locally: After reverting this change, I can build libevl, which really needs the custom kernel's libc-dev because of extra headers, without any extra dependency. [...] Reading package lists... Building dependency tree... Reading state information... Calculating upgrade... The following packages will be upgraded: linux-libc-dev 1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. [...] With this change, I would now have to add the explicit Build-Depends on linux-libc-dev-${KERNEL_NAME} or the corresponding cross package. That is a very ugly recipe API change that was also not documented. So, I'm not very happy with having this pattern here by default and would prefer only using it if there are actually multiple kernels that also deploy their libc-dev packages. Unless someone has a good idea quickly, we should revert this first and retry later. Jan -- 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/a1e2e1c9-358a-481b-86e4-faf1808338bf%40siemens.com. ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH] linux-custom: support to add linux-libc-dev package with kernel name 2025-09-10 17:22 ` 'Jan Kiszka' via isar-users @ 2025-09-11 5:11 ` 'Jan Kiszka' via isar-users 2025-09-11 5:21 ` Arulpandiyan Vadivel 2025-09-11 7:02 ` 'cedric.hombourger@siemens.com' via isar-users 0 siblings, 2 replies; 24+ messages in thread From: 'Jan Kiszka' via isar-users @ 2025-09-11 5:11 UTC (permalink / raw) To: Arulpandiyan Vadivel, isar-users; +Cc: cedric.hombourger, srikanth.krishnakar On 10.09.25 19:22, 'Jan Kiszka' via isar-users wrote: > On 10.09.25 15:55, 'Jan Kiszka' via isar-users wrote: >> On 21.01.25 10:47, 'Arulpandiyan Vadivel' via isar-users wrote: >>> Debian and Ubuntu use unified kernel headers and a single linux-libc-dev >>> package is shipped. In contrast, Isar may build multiple kernel variants >>> with different versions and/or patches and their packages but linux-libc-dev >>> are suffixed with -${KERNEL_NAME_PROVIDED}: this allows >>> each variant to exist in isar-apt (reprepro may not have more than one >>> version of a given package for a given suite). >>> Apply the same suffix to linux-libc-dev / linux-libc-dev-${DISTRO_ARCH}-cross >>> and a Provides: clause. >>> >>> Signed-off-by: Arulpandiyan Vadivel <arulpandiyan.vadivel@siemens.com> >>> >>> --- >>> Changes since v4 >>> - Updated KERNEL_PKG_LIBC_HEADERS path with KERNEL_NAME_PROVIDED >>> >>> Changes since v3 >>> - Updated commit message to include cross packages >>> - updated doc/custom_kernel.md documentation >>> >>> Changes since v2 >>> - Updated commit message as suggested >>> - Added KERNEL_NAME_PROVIDED for cross packages of linux-libc-dev as well >>> >>> --- >>> --- >>> RECIPE-API-CHANGELOG.md | 12 ++++++++++++ >>> doc/custom_kernel.md | 4 ++-- >>> meta/recipes-kernel/linux/files/debian/control.tmpl | 10 +++++++--- >>> .../linux/files/debian/isar/common.tmpl | 2 +- >>> .../linux/files/debian/isar/install.tmpl | 2 +- >>> meta/recipes-kernel/linux/linux-custom.inc | 2 ++ >>> 6 files changed, 25 insertions(+), 7 deletions(-) >>> >>> diff --git a/RECIPE-API-CHANGELOG.md b/RECIPE-API-CHANGELOG.md >>> index f310553a..64c0f34a 100644 >>> --- a/RECIPE-API-CHANGELOG.md >>> +++ b/RECIPE-API-CHANGELOG.md >>> @@ -702,3 +702,15 @@ enable cross-compilation. Otherwize ISAR_CROSS_COMPILE = "0" now should be set >>> in local.conf to disable cross-compilation for all the recipes. >>> Sample local.conf from meta-isar used by isar-init-build-env is also changed >>> to enable cross-compilation by default. >>> + >>> +### Enable linux-libc-dev package with KERNEL_NAME >>> + >>> +By default linux-libc-dev and linux-libc-dev-${DISTRO_ARCH}-cross package >>> +was generated for architecture it builds for. >>> + >>> +This change helps to generate the `linux-libc-dev-${KERNEL_NAME}` and >>> +`linux-libc-dev-${DISTRO_ARCH}-cross-${KERNEL_NAME}`. >>> +For example, If `KERNEL_NAME` is configured as `foo` for arm64, now >>> +`linux-libc-dev-foo` and `linux-libc-dev-arm64-cross-foo` package will be >>> +generated. This will help to have multiple versions of linux-libc-dev packages >>> +available for respective bsps in apt feeds. >>> diff --git a/doc/custom_kernel.md b/doc/custom_kernel.md >>> index ce5f1bf7..2dca577c 100644 >>> --- a/doc/custom_kernel.md >>> +++ b/doc/custom_kernel.md >>> @@ -51,9 +51,9 @@ The linux-custom recipe provides support for: >>> >>> Only the `host` specific package is built automatically at cross builds. >>> >>> - 10. Produce a `linux-libc-dev` package to support user-land builds >>> + 10. Produce a `linux-libc-dev-${KERNEL_NAME}` package to support user-land builds >>> >>> - 11. Only build/ship the `linux-libc-dev` package if instructed to >>> + 11. Only build/ship the `linux-libc-dev-${KERNEL_NAME}` package if instructed to >>> (`KERNEL_LIBC_DEV_DEPLOY` equals to `"1"`) >>> >>> 12. Support both native and cross compiles (`ISAR_CROSS_COMPILE`) >>> diff --git a/meta/recipes-kernel/linux/files/debian/control.tmpl b/meta/recipes-kernel/linux/files/debian/control.tmpl >>> index ec0da1ab..a79b86c4 100644 >>> --- a/meta/recipes-kernel/linux/files/debian/control.tmpl >>> +++ b/meta/recipes-kernel/linux/files/debian/control.tmpl >>> @@ -22,19 +22,23 @@ Description: ${KERNEL_NAME_PROVIDED} Linux kernel headers for @KR@ >>> . >>> This is useful for people who need to build external modules >>> >>> -Package: linux-libc-dev >>> +Package: linux-libc-dev-${KERNEL_NAME_PROVIDED} >>> Build-Profiles: <!nolibcdev kernel> >>> Section: devel >>> -Provides: linux-kernel-headers >>> +Conflicts: linux-libc-dev >>> +Provides: linux-libc-dev >>> +Replaces: linux-libc-dev >>> Architecture: ${KERNEL_LIBC_DEV_ARCH} >>> Description: Linux support headers for userspace development >>> This package provides userspaces headers from the Linux kernel. These headers >>> are used by the installed headers for GNU glibc and other system libraries. >>> >>> -Package: linux-libc-dev-${DISTRO_ARCH}-cross >>> +Package: linux-libc-dev-${DISTRO_ARCH}-cross-${KERNEL_NAME_PROVIDED} >>> Build-Profiles: <!nolibcdev cross !kbuild> >>> Section: devel >>> +Conflicts: linux-kernel-headers-${DISTRO_ARCH}-cross >>> Provides: linux-kernel-headers-${DISTRO_ARCH}-cross >>> +Replaces: linux-kernel-headers-${DISTRO_ARCH}-cross > > This was also wrong. > >>> Architecture: all >>> Description: Linux Kernel Headers for development (for cross-compiling) >>> This package provides headers from the Linux kernel. These headers >>> diff --git a/meta/recipes-kernel/linux/files/debian/isar/common.tmpl b/meta/recipes-kernel/linux/files/debian/isar/common.tmpl >>> index f9cc2f02..b004214f 100644 >>> --- a/meta/recipes-kernel/linux/files/debian/isar/common.tmpl >>> +++ b/meta/recipes-kernel/linux/files/debian/isar/common.tmpl >>> @@ -8,7 +8,7 @@ set -e >>> ARCH=${KERNEL_ARCH} >>> KERNEL_PKG_IMAGE=linux-image-${KERNEL_NAME_PROVIDED} >>> KERNEL_PKG_KERN_HEADERS=linux-headers-${KERNEL_NAME_PROVIDED} >>> -KERNEL_PKG_LIBC_HEADERS=linux-libc-dev >>> +KERNEL_PKG_LIBC_HEADERS=linux-libc-dev-${KERNEL_NAME_PROVIDED} >>> KERNEL_PKG_LIBC_HEADERS_CROSS=linux-libc-dev-${DISTRO_ARCH}-cross >> >> This broke the cross libc-dev package. Fix is being tested. >> >> Seems we are lacking tests for this scenario: found via xenomai-images >> only, and there we were lacking CI for the affected path as well :(. >> > > There is another issue with this patch which was likely hard to predict: > It broke automatic downgrades, possibly also updates, of libc-dev in the > sbuild-chroots. As xenomai-images is currently broken in other regards > as well, I cannot easily point to a demo case, but I reproduced that > locally: After reverting this change, I can build libevl, which really > needs the custom kernel's libc-dev because of extra headers, without any > extra dependency. > > [...] > Reading package lists... > Building dependency tree... > Reading state information... > Calculating upgrade... > The following packages will be upgraded: > linux-libc-dev > 1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. > [...] > > With this change, I would now have to add the explicit Build-Depends on > linux-libc-dev-${KERNEL_NAME} or the corresponding cross package. That > is a very ugly recipe API change that was also not documented. > > So, I'm not very happy with having this pattern here by default and > would prefer only using it if there are actually multiple kernels that > also deploy their libc-dev packages. > > Unless someone has a good idea quickly, we should revert this first and > retry later. > This is a design challenge: Do we really need per-KERNEL_NAME linux-libc-dev packages, or is it enough to tell the users to enable KERNEL_LIBC_DEV_DEPLOY only for one of them? I think that in way of 90% of the use cases the latter will be enough because the kernels only differ in configuration or in patches that do not create conflicting changes to the UAPI headers. But can someone think of a case where this is not enough? Jan -- 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/6c32b82c-c2b6-42c0-b947-f0b3ee07fe93%40siemens.com. ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH] linux-custom: support to add linux-libc-dev package with kernel name 2025-09-11 5:11 ` 'Jan Kiszka' via isar-users @ 2025-09-11 5:21 ` Arulpandiyan Vadivel 2025-09-11 5:28 ` 'Jan Kiszka' via isar-users 2025-09-11 7:02 ` 'cedric.hombourger@siemens.com' via isar-users 1 sibling, 1 reply; 24+ messages in thread From: Arulpandiyan Vadivel @ 2025-09-11 5:21 UTC (permalink / raw) To: isar-users [-- Attachment #1.1: Type: text/plain, Size: 8420 bytes --] On Thursday, 11 September 2025 at 10:41:19 UTC+5:30 Jan Kiszka wrote: On 10.09.25 19:22, 'Jan Kiszka' via isar-users wrote: > On 10.09.25 15:55, 'Jan Kiszka' via isar-users wrote: >> On 21.01.25 10:47, 'Arulpandiyan Vadivel' via isar-users wrote: >>> Debian and Ubuntu use unified kernel headers and a single linux-libc-dev >>> package is shipped. In contrast, Isar may build multiple kernel variants >>> with different versions and/or patches and their packages but linux-libc-dev >>> are suffixed with -${KERNEL_NAME_PROVIDED}: this allows >>> each variant to exist in isar-apt (reprepro may not have more than one >>> version of a given package for a given suite). >>> Apply the same suffix to linux-libc-dev / linux-libc-dev-${DISTRO_ARCH}-cross >>> and a Provides: clause. >>> >>> Signed-off-by: Arulpandiyan Vadivel <arulpandiy...@siemens.com> >>> >>> --- >>> Changes since v4 >>> - Updated KERNEL_PKG_LIBC_HEADERS path with KERNEL_NAME_PROVIDED >>> >>> Changes since v3 >>> - Updated commit message to include cross packages >>> - updated doc/custom_kernel.md documentation >>> >>> Changes since v2 >>> - Updated commit message as suggested >>> - Added KERNEL_NAME_PROVIDED for cross packages of linux-libc-dev as well >>> >>> --- >>> --- >>> RECIPE-API-CHANGELOG.md | 12 ++++++++++++ >>> doc/custom_kernel.md | 4 ++-- >>> meta/recipes-kernel/linux/files/debian/control.tmpl | 10 +++++++--- >>> .../linux/files/debian/isar/common.tmpl | 2 +- >>> .../linux/files/debian/isar/install.tmpl | 2 +- >>> meta/recipes-kernel/linux/linux-custom.inc | 2 ++ >>> 6 files changed, 25 insertions(+), 7 deletions(-) >>> >>> diff --git a/RECIPE-API-CHANGELOG.md b/RECIPE-API-CHANGELOG.md >>> index f310553a..64c0f34a 100644 >>> --- a/RECIPE-API-CHANGELOG.md >>> +++ b/RECIPE-API-CHANGELOG.md >>> @@ -702,3 +702,15 @@ enable cross-compilation. Otherwize ISAR_CROSS_COMPILE = "0" now should be set >>> in local.conf to disable cross-compilation for all the recipes. >>> Sample local.conf from meta-isar used by isar-init-build-env is also changed >>> to enable cross-compilation by default. >>> + >>> +### Enable linux-libc-dev package with KERNEL_NAME >>> + >>> +By default linux-libc-dev and linux-libc-dev-${DISTRO_ARCH}-cross package >>> +was generated for architecture it builds for. >>> + >>> +This change helps to generate the `linux-libc-dev-${KERNEL_NAME}` and >>> +`linux-libc-dev-${DISTRO_ARCH}-cross-${KERNEL_NAME}`. >>> +For example, If `KERNEL_NAME` is configured as `foo` for arm64, now >>> +`linux-libc-dev-foo` and `linux-libc-dev-arm64-cross-foo` package will be >>> +generated. This will help to have multiple versions of linux-libc-dev packages >>> +available for respective bsps in apt feeds. >>> diff --git a/doc/custom_kernel.md b/doc/custom_kernel.md >>> index ce5f1bf7..2dca577c 100644 >>> --- a/doc/custom_kernel.md >>> +++ b/doc/custom_kernel.md >>> @@ -51,9 +51,9 @@ The linux-custom recipe provides support for: >>> >>> Only the `host` specific package is built automatically at cross builds. >>> >>> - 10. Produce a `linux-libc-dev` package to support user-land builds >>> + 10. Produce a `linux-libc-dev-${KERNEL_NAME}` package to support user-land builds >>> >>> - 11. Only build/ship the `linux-libc-dev` package if instructed to >>> + 11. Only build/ship the `linux-libc-dev-${KERNEL_NAME}` package if instructed to >>> (`KERNEL_LIBC_DEV_DEPLOY` equals to `"1"`) >>> >>> 12. Support both native and cross compiles (`ISAR_CROSS_COMPILE`) >>> diff --git a/meta/recipes-kernel/linux/files/debian/control.tmpl b/meta/recipes-kernel/linux/files/debian/control.tmpl >>> index ec0da1ab..a79b86c4 100644 >>> --- a/meta/recipes-kernel/linux/files/debian/control.tmpl >>> +++ b/meta/recipes-kernel/linux/files/debian/control.tmpl >>> @@ -22,19 +22,23 @@ Description: ${KERNEL_NAME_PROVIDED} Linux kernel headers for @KR@ >>> . >>> This is useful for people who need to build external modules >>> >>> -Package: linux-libc-dev >>> +Package: linux-libc-dev-${KERNEL_NAME_PROVIDED} >>> Build-Profiles: <!nolibcdev kernel> >>> Section: devel >>> -Provides: linux-kernel-headers >>> +Conflicts: linux-libc-dev >>> +Provides: linux-libc-dev >>> +Replaces: linux-libc-dev >>> Architecture: ${KERNEL_LIBC_DEV_ARCH} >>> Description: Linux support headers for userspace development >>> This package provides userspaces headers from the Linux kernel. These headers >>> are used by the installed headers for GNU glibc and other system libraries. >>> >>> -Package: linux-libc-dev-${DISTRO_ARCH}-cross >>> +Package: linux-libc-dev-${DISTRO_ARCH}-cross-${KERNEL_NAME_PROVIDED} >>> Build-Profiles: <!nolibcdev cross !kbuild> >>> Section: devel >>> +Conflicts: linux-kernel-headers-${DISTRO_ARCH}-cross >>> Provides: linux-kernel-headers-${DISTRO_ARCH}-cross >>> +Replaces: linux-kernel-headers-${DISTRO_ARCH}-cross > > This was also wrong. > >>> Architecture: all >>> Description: Linux Kernel Headers for development (for cross-compiling) >>> This package provides headers from the Linux kernel. These headers >>> diff --git a/meta/recipes-kernel/linux/files/debian/isar/common.tmpl b/meta/recipes-kernel/linux/files/debian/isar/common.tmpl >>> index f9cc2f02..b004214f 100644 >>> --- a/meta/recipes-kernel/linux/files/debian/isar/common.tmpl >>> +++ b/meta/recipes-kernel/linux/files/debian/isar/common.tmpl >>> @@ -8,7 +8,7 @@ set -e >>> ARCH=${KERNEL_ARCH} >>> KERNEL_PKG_IMAGE=linux-image-${KERNEL_NAME_PROVIDED} >>> KERNEL_PKG_KERN_HEADERS=linux-headers-${KERNEL_NAME_PROVIDED} >>> -KERNEL_PKG_LIBC_HEADERS=linux-libc-dev >>> +KERNEL_PKG_LIBC_HEADERS=linux-libc-dev-${KERNEL_NAME_PROVIDED} >>> KERNEL_PKG_LIBC_HEADERS_CROSS=linux-libc-dev-${DISTRO_ARCH}-cross >> >> This broke the cross libc-dev package. Fix is being tested. >> >> Seems we are lacking tests for this scenario: found via xenomai-images >> only, and there we were lacking CI for the affected path as well :(. >> > > There is another issue with this patch which was likely hard to predict: > It broke automatic downgrades, possibly also updates, of libc-dev in the > sbuild-chroots. As xenomai-images is currently broken in other regards > as well, I cannot easily point to a demo case, but I reproduced that > locally: After reverting this change, I can build libevl, which really > needs the custom kernel's libc-dev because of extra headers, without any > extra dependency. > > [...] > Reading package lists... > Building dependency tree... > Reading state information... > Calculating upgrade... > The following packages will be upgraded: > linux-libc-dev > 1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. > [...] > > With this change, I would now have to add the explicit Build-Depends on > linux-libc-dev-${KERNEL_NAME} or the corresponding cross package. That > is a very ugly recipe API change that was also not documented. > > So, I'm not very happy with having this pattern here by default and > would prefer only using it if there are actually multiple kernels that > also deploy their libc-dev packages. > > Unless someone has a good idea quickly, we should revert this first and > retry later. > This is a design challenge: Do we really need per-KERNEL_NAME linux-libc-dev packages, or is it enough to tell the users to enable KERNEL_LIBC_DEV_DEPLOY only for one of them? When a single apt feeds to support multiple BSP's with same or different architecture for a linux-libc-dev package, without this change we may not be able to support them. I think that in way of 90% of the use cases the latter will be enough because the kernels only differ in configuration or in patches that do not create conflicting changes to the UAPI headers. But can someone think of a case where this is not enough? Yes. I agree UAPI headers might be common in 99% cases unless we have specific BSP changes pushed and maintained Jan -- 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/98fd0659-9067-4a2c-a9e4-125c0fce6862n%40googlegroups.com. [-- Attachment #1.2: Type: text/html, Size: 11518 bytes --] ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH] linux-custom: support to add linux-libc-dev package with kernel name 2025-09-11 5:21 ` Arulpandiyan Vadivel @ 2025-09-11 5:28 ` 'Jan Kiszka' via isar-users 2025-09-11 5:38 ` Arulpandiyan Vadivel 0 siblings, 1 reply; 24+ messages in thread From: 'Jan Kiszka' via isar-users @ 2025-09-11 5:28 UTC (permalink / raw) To: Arulpandiyan Vadivel, isar-users On 11.09.25 07:21, Arulpandiyan Vadivel wrote: > > > On Thursday, 11 September 2025 at 10:41:19 UTC+5:30 Jan Kiszka wrote: > > On 10.09.25 19:22, 'Jan Kiszka' via isar-users wrote: > > On 10.09.25 15:55, 'Jan Kiszka' via isar-users wrote: > >> On 21.01.25 10:47, 'Arulpandiyan Vadivel' via isar-users wrote: > >>> Debian and Ubuntu use unified kernel headers and a single linux- > libc-dev > >>> package is shipped. In contrast, Isar may build multiple kernel > variants > >>> with different versions and/or patches and their packages but > linux-libc-dev > >>> are suffixed with -${KERNEL_NAME_PROVIDED}: this allows > >>> each variant to exist in isar-apt (reprepro may not have more > than one > >>> version of a given package for a given suite). > >>> Apply the same suffix to linux-libc-dev / linux-libc-dev- > ${DISTRO_ARCH}-cross > >>> and a Provides: clause. > >>> > >>> Signed-off-by: Arulpandiyan Vadivel <arulpandiy...@siemens.com> > >>> > >>> --- > >>> Changes since v4 > >>> - Updated KERNEL_PKG_LIBC_HEADERS path with KERNEL_NAME_PROVIDED > >>> > >>> Changes since v3 > >>> - Updated commit message to include cross packages > >>> - updated doc/custom_kernel.md documentation > >>> > >>> Changes since v2 > >>> - Updated commit message as suggested > >>> - Added KERNEL_NAME_PROVIDED for cross packages of linux-libc- > dev as well > >>> > >>> --- > >>> --- > >>> RECIPE-API-CHANGELOG.md | 12 ++++++++++++ > >>> doc/custom_kernel.md | 4 ++-- > >>> meta/recipes-kernel/linux/files/debian/control.tmpl | 10 +++++++--- > >>> .../linux/files/debian/isar/common.tmpl | 2 +- > >>> .../linux/files/debian/isar/install.tmpl | 2 +- > >>> meta/recipes-kernel/linux/linux-custom.inc | 2 ++ > >>> 6 files changed, 25 insertions(+), 7 deletions(-) > >>> > >>> diff --git a/RECIPE-API-CHANGELOG.md b/RECIPE-API-CHANGELOG.md > >>> index f310553a..64c0f34a 100644 > >>> --- a/RECIPE-API-CHANGELOG.md > >>> +++ b/RECIPE-API-CHANGELOG.md > >>> @@ -702,3 +702,15 @@ enable cross-compilation. Otherwize > ISAR_CROSS_COMPILE = "0" now should be set > >>> in local.conf to disable cross-compilation for all the recipes. > >>> Sample local.conf from meta-isar used by isar-init-build-env is > also changed > >>> to enable cross-compilation by default. > >>> + > >>> +### Enable linux-libc-dev package with KERNEL_NAME > >>> + > >>> +By default linux-libc-dev and linux-libc-dev-${DISTRO_ARCH}- > cross package > >>> +was generated for architecture it builds for. > >>> + > >>> +This change helps to generate the `linux-libc-dev- > ${KERNEL_NAME}` and > >>> +`linux-libc-dev-${DISTRO_ARCH}-cross-${KERNEL_NAME}`. > >>> +For example, If `KERNEL_NAME` is configured as `foo` for arm64, > now > >>> +`linux-libc-dev-foo` and `linux-libc-dev-arm64-cross-foo` > package will be > >>> +generated. This will help to have multiple versions of linux- > libc-dev packages > >>> +available for respective bsps in apt feeds. > >>> diff --git a/doc/custom_kernel.md b/doc/custom_kernel.md > >>> index ce5f1bf7..2dca577c 100644 > >>> --- a/doc/custom_kernel.md > >>> +++ b/doc/custom_kernel.md > >>> @@ -51,9 +51,9 @@ The linux-custom recipe provides support for: > >>> > >>> Only the `host` specific package is built automatically at cross > builds. > >>> > >>> - 10. Produce a `linux-libc-dev` package to support user-land > builds > >>> + 10. Produce a `linux-libc-dev-${KERNEL_NAME}` package to > support user-land builds > >>> > >>> - 11. Only build/ship the `linux-libc-dev` package if instructed to > >>> + 11. Only build/ship the `linux-libc-dev-${KERNEL_NAME}` > package if instructed to > >>> (`KERNEL_LIBC_DEV_DEPLOY` equals to `"1"`) > >>> > >>> 12. Support both native and cross compiles (`ISAR_CROSS_COMPILE`) > >>> diff --git a/meta/recipes-kernel/linux/files/debian/control.tmpl > b/meta/recipes-kernel/linux/files/debian/control.tmpl > >>> index ec0da1ab..a79b86c4 100644 > >>> --- a/meta/recipes-kernel/linux/files/debian/control.tmpl > >>> +++ b/meta/recipes-kernel/linux/files/debian/control.tmpl > >>> @@ -22,19 +22,23 @@ Description: ${KERNEL_NAME_PROVIDED} Linux > kernel headers for @KR@ > >>> . > >>> This is useful for people who need to build external modules > >>> > >>> -Package: linux-libc-dev > >>> +Package: linux-libc-dev-${KERNEL_NAME_PROVIDED} > >>> Build-Profiles: <!nolibcdev kernel> > >>> Section: devel > >>> -Provides: linux-kernel-headers > >>> +Conflicts: linux-libc-dev > >>> +Provides: linux-libc-dev > >>> +Replaces: linux-libc-dev > >>> Architecture: ${KERNEL_LIBC_DEV_ARCH} > >>> Description: Linux support headers for userspace development > >>> This package provides userspaces headers from the Linux kernel. > These headers > >>> are used by the installed headers for GNU glibc and other system > libraries. > >>> > >>> -Package: linux-libc-dev-${DISTRO_ARCH}-cross > >>> +Package: linux-libc-dev-${DISTRO_ARCH}-cross- > ${KERNEL_NAME_PROVIDED} > >>> Build-Profiles: <!nolibcdev cross !kbuild> > >>> Section: devel > >>> +Conflicts: linux-kernel-headers-${DISTRO_ARCH}-cross > >>> Provides: linux-kernel-headers-${DISTRO_ARCH}-cross > >>> +Replaces: linux-kernel-headers-${DISTRO_ARCH}-cross > > > > This was also wrong. > > > >>> Architecture: all > >>> Description: Linux Kernel Headers for development (for cross- > compiling) > >>> This package provides headers from the Linux kernel. These headers > >>> diff --git a/meta/recipes-kernel/linux/files/debian/isar/ > common.tmpl b/meta/recipes-kernel/linux/files/debian/isar/common.tmpl > >>> index f9cc2f02..b004214f 100644 > >>> --- a/meta/recipes-kernel/linux/files/debian/isar/common.tmpl > >>> +++ b/meta/recipes-kernel/linux/files/debian/isar/common.tmpl > >>> @@ -8,7 +8,7 @@ set -e > >>> ARCH=${KERNEL_ARCH} > >>> KERNEL_PKG_IMAGE=linux-image-${KERNEL_NAME_PROVIDED} > >>> KERNEL_PKG_KERN_HEADERS=linux-headers-${KERNEL_NAME_PROVIDED} > >>> -KERNEL_PKG_LIBC_HEADERS=linux-libc-dev > >>> +KERNEL_PKG_LIBC_HEADERS=linux-libc-dev-${KERNEL_NAME_PROVIDED} > >>> KERNEL_PKG_LIBC_HEADERS_CROSS=linux-libc-dev-${DISTRO_ARCH}-cross > >> > >> This broke the cross libc-dev package. Fix is being tested. > >> > >> Seems we are lacking tests for this scenario: found via xenomai- > images > >> only, and there we were lacking CI for the affected path as well :(. > >> > > > > There is another issue with this patch which was likely hard to > predict: > > It broke automatic downgrades, possibly also updates, of libc-dev > in the > > sbuild-chroots. As xenomai-images is currently broken in other > regards > > as well, I cannot easily point to a demo case, but I reproduced that > > locally: After reverting this change, I can build libevl, which > really > > needs the custom kernel's libc-dev because of extra headers, > without any > > extra dependency. > > > > [...] > > Reading package lists... > > Building dependency tree... > > Reading state information... > > Calculating upgrade... > > The following packages will be upgraded: > > linux-libc-dev > > 1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. > > [...] > > > > With this change, I would now have to add the explicit Build- > Depends on > > linux-libc-dev-${KERNEL_NAME} or the corresponding cross package. > That > > is a very ugly recipe API change that was also not documented. > > > > So, I'm not very happy with having this pattern here by default and > > would prefer only using it if there are actually multiple kernels > that > > also deploy their libc-dev packages. > > > > Unless someone has a good idea quickly, we should revert this > first and > > retry later. > > > > This is a design challenge: Do we really need per-KERNEL_NAME > linux-libc-dev packages, or is it enough to tell the users to enable > KERNEL_LIBC_DEV_DEPLOY only for one of them? > > When a single apt feeds to support multiple BSP's with same or different > architecture for a linux-libc-dev package, without this change we may > not be able to support them. If BSPs are breaking the UAPIs of each other, then we may not even consider them valid BSPs (they should not change the UAPI at all, in theory) - but I agree that this case is imaginable. > > I think that in way of 90% of the use cases the latter will be enough > because the kernels only differ in configuration or in patches that do > not create conflicting changes to the UAPI headers. But can someone > think of a case where this is not enough? > > > Yes. I agree UAPI headers might be common in 99% cases unless we have > specific BSP changes pushed and maintained So, any ideas how to model a recipe API where you can opt-in to build multiple linux-libc-dev (which will no longer be simple replacements of the upstream packages)? Or do you have any idea how to fix the issue that the sbuild envs are not up/downgrading the linux-libc-dev packages anymore when they have different names? Reverting all this is not nice as well because we already broke the recipe API, but it's currently the only good option I see. Jan -- 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/57ea3343-a94b-49d9-9bdd-b4cace7c5f03%40siemens.com. ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH] linux-custom: support to add linux-libc-dev package with kernel name 2025-09-11 5:28 ` 'Jan Kiszka' via isar-users @ 2025-09-11 5:38 ` Arulpandiyan Vadivel 2025-09-11 8:33 ` 'Jan Kiszka' via isar-users 0 siblings, 1 reply; 24+ messages in thread From: Arulpandiyan Vadivel @ 2025-09-11 5:38 UTC (permalink / raw) To: isar-users [-- Attachment #1.1: Type: text/plain, Size: 10048 bytes --] I understand the issue reported , Can you please help to share/provide the steps to reproduce the issue where I can check for the solutions Regards Arulpandiyan V. On Thursday, 11 September 2025 at 10:58:45 UTC+5:30 Jan Kiszka wrote: > On 11.09.25 07:21, Arulpandiyan Vadivel wrote: > > > > > > On Thursday, 11 September 2025 at 10:41:19 UTC+5:30 Jan Kiszka wrote: > > > > On 10.09.25 19:22, 'Jan Kiszka' via isar-users wrote: > > > On 10.09.25 15:55, 'Jan Kiszka' via isar-users wrote: > > >> On 21.01.25 10:47, 'Arulpandiyan Vadivel' via isar-users wrote: > > >>> Debian and Ubuntu use unified kernel headers and a single linux- > > libc-dev > > >>> package is shipped. In contrast, Isar may build multiple kernel > > variants > > >>> with different versions and/or patches and their packages but > > linux-libc-dev > > >>> are suffixed with -${KERNEL_NAME_PROVIDED}: this allows > > >>> each variant to exist in isar-apt (reprepro may not have more > > than one > > >>> version of a given package for a given suite). > > >>> Apply the same suffix to linux-libc-dev / linux-libc-dev- > > ${DISTRO_ARCH}-cross > > >>> and a Provides: clause. > > >>> > > >>> Signed-off-by: Arulpandiyan Vadivel <arulpandiy...@siemens.com> > > >>> > > >>> --- > > >>> Changes since v4 > > >>> - Updated KERNEL_PKG_LIBC_HEADERS path with KERNEL_NAME_PROVIDED > > >>> > > >>> Changes since v3 > > >>> - Updated commit message to include cross packages > > >>> - updated doc/custom_kernel.md documentation > > >>> > > >>> Changes since v2 > > >>> - Updated commit message as suggested > > >>> - Added KERNEL_NAME_PROVIDED for cross packages of linux-libc- > > dev as well > > >>> > > >>> --- > > >>> --- > > >>> RECIPE-API-CHANGELOG.md | 12 ++++++++++++ > > >>> doc/custom_kernel.md | 4 ++-- > > >>> meta/recipes-kernel/linux/files/debian/control.tmpl | 10 +++++++--- > > >>> .../linux/files/debian/isar/common.tmpl | 2 +- > > >>> .../linux/files/debian/isar/install.tmpl | 2 +- > > >>> meta/recipes-kernel/linux/linux-custom.inc | 2 ++ > > >>> 6 files changed, 25 insertions(+), 7 deletions(-) > > >>> > > >>> diff --git a/RECIPE-API-CHANGELOG.md b/RECIPE-API-CHANGELOG.md > > >>> index f310553a..64c0f34a 100644 > > >>> --- a/RECIPE-API-CHANGELOG.md > > >>> +++ b/RECIPE-API-CHANGELOG.md > > >>> @@ -702,3 +702,15 @@ enable cross-compilation. Otherwize > > ISAR_CROSS_COMPILE = "0" now should be set > > >>> in local.conf to disable cross-compilation for all the recipes. > > >>> Sample local.conf from meta-isar used by isar-init-build-env is > > also changed > > >>> to enable cross-compilation by default. > > >>> + > > >>> +### Enable linux-libc-dev package with KERNEL_NAME > > >>> + > > >>> +By default linux-libc-dev and linux-libc-dev-${DISTRO_ARCH}- > > cross package > > >>> +was generated for architecture it builds for. > > >>> + > > >>> +This change helps to generate the `linux-libc-dev- > > ${KERNEL_NAME}` and > > >>> +`linux-libc-dev-${DISTRO_ARCH}-cross-${KERNEL_NAME}`. > > >>> +For example, If `KERNEL_NAME` is configured as `foo` for arm64, > > now > > >>> +`linux-libc-dev-foo` and `linux-libc-dev-arm64-cross-foo` > > package will be > > >>> +generated. This will help to have multiple versions of linux- > > libc-dev packages > > >>> +available for respective bsps in apt feeds. > > >>> diff --git a/doc/custom_kernel.md b/doc/custom_kernel.md > > >>> index ce5f1bf7..2dca577c 100644 > > >>> --- a/doc/custom_kernel.md > > >>> +++ b/doc/custom_kernel.md > > >>> @@ -51,9 +51,9 @@ The linux-custom recipe provides support for: > > >>> > > >>> Only the `host` specific package is built automatically at cross > > builds. > > >>> > > >>> - 10. Produce a `linux-libc-dev` package to support user-land > > builds > > >>> + 10. Produce a `linux-libc-dev-${KERNEL_NAME}` package to > > support user-land builds > > >>> > > >>> - 11. Only build/ship the `linux-libc-dev` package if instructed to > > >>> + 11. Only build/ship the `linux-libc-dev-${KERNEL_NAME}` > > package if instructed to > > >>> (`KERNEL_LIBC_DEV_DEPLOY` equals to `"1"`) > > >>> > > >>> 12. Support both native and cross compiles (`ISAR_CROSS_COMPILE`) > > >>> diff --git a/meta/recipes-kernel/linux/files/debian/control.tmpl > > b/meta/recipes-kernel/linux/files/debian/control.tmpl > > >>> index ec0da1ab..a79b86c4 100644 > > >>> --- a/meta/recipes-kernel/linux/files/debian/control.tmpl > > >>> +++ b/meta/recipes-kernel/linux/files/debian/control.tmpl > > >>> @@ -22,19 +22,23 @@ Description: ${KERNEL_NAME_PROVIDED} Linux > > kernel headers for @KR@ > > >>> . > > >>> This is useful for people who need to build external modules > > >>> > > >>> -Package: linux-libc-dev > > >>> +Package: linux-libc-dev-${KERNEL_NAME_PROVIDED} > > >>> Build-Profiles: <!nolibcdev kernel> > > >>> Section: devel > > >>> -Provides: linux-kernel-headers > > >>> +Conflicts: linux-libc-dev > > >>> +Provides: linux-libc-dev > > >>> +Replaces: linux-libc-dev > > >>> Architecture: ${KERNEL_LIBC_DEV_ARCH} > > >>> Description: Linux support headers for userspace development > > >>> This package provides userspaces headers from the Linux kernel. > > These headers > > >>> are used by the installed headers for GNU glibc and other system > > libraries. > > >>> > > >>> -Package: linux-libc-dev-${DISTRO_ARCH}-cross > > >>> +Package: linux-libc-dev-${DISTRO_ARCH}-cross- > > ${KERNEL_NAME_PROVIDED} > > >>> Build-Profiles: <!nolibcdev cross !kbuild> > > >>> Section: devel > > >>> +Conflicts: linux-kernel-headers-${DISTRO_ARCH}-cross > > >>> Provides: linux-kernel-headers-${DISTRO_ARCH}-cross > > >>> +Replaces: linux-kernel-headers-${DISTRO_ARCH}-cross > > > > > > This was also wrong. > > > > > >>> Architecture: all > > >>> Description: Linux Kernel Headers for development (for cross- > > compiling) > > >>> This package provides headers from the Linux kernel. These headers > > >>> diff --git a/meta/recipes-kernel/linux/files/debian/isar/ > > common.tmpl b/meta/recipes-kernel/linux/files/debian/isar/common.tmpl > > >>> index f9cc2f02..b004214f 100644 > > >>> --- a/meta/recipes-kernel/linux/files/debian/isar/common.tmpl > > >>> +++ b/meta/recipes-kernel/linux/files/debian/isar/common.tmpl > > >>> @@ -8,7 +8,7 @@ set -e > > >>> ARCH=${KERNEL_ARCH} > > >>> KERNEL_PKG_IMAGE=linux-image-${KERNEL_NAME_PROVIDED} > > >>> KERNEL_PKG_KERN_HEADERS=linux-headers-${KERNEL_NAME_PROVIDED} > > >>> -KERNEL_PKG_LIBC_HEADERS=linux-libc-dev > > >>> +KERNEL_PKG_LIBC_HEADERS=linux-libc-dev-${KERNEL_NAME_PROVIDED} > > >>> KERNEL_PKG_LIBC_HEADERS_CROSS=linux-libc-dev-${DISTRO_ARCH}-cross > > >> > > >> This broke the cross libc-dev package. Fix is being tested. > > >> > > >> Seems we are lacking tests for this scenario: found via xenomai- > > images > > >> only, and there we were lacking CI for the affected path as well :(. > > >> > > > > > > There is another issue with this patch which was likely hard to > > predict: > > > It broke automatic downgrades, possibly also updates, of libc-dev > > in the > > > sbuild-chroots. As xenomai-images is currently broken in other > > regards > > > as well, I cannot easily point to a demo case, but I reproduced that > > > locally: After reverting this change, I can build libevl, which > > really > > > needs the custom kernel's libc-dev because of extra headers, > > without any > > > extra dependency. > > > > > > [...] > > > Reading package lists... > > > Building dependency tree... > > > Reading state information... > > > Calculating upgrade... > > > The following packages will be upgraded: > > > linux-libc-dev > > > 1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. > > > [...] > > > > > > With this change, I would now have to add the explicit Build- > > Depends on > > > linux-libc-dev-${KERNEL_NAME} or the corresponding cross package. > > That > > > is a very ugly recipe API change that was also not documented. > > > > > > So, I'm not very happy with having this pattern here by default and > > > would prefer only using it if there are actually multiple kernels > > that > > > also deploy their libc-dev packages. > > > > > > Unless someone has a good idea quickly, we should revert this > > first and > > > retry later. > > > > > > > This is a design challenge: Do we really need per-KERNEL_NAME > > linux-libc-dev packages, or is it enough to tell the users to enable > > KERNEL_LIBC_DEV_DEPLOY only for one of them? > > > > When a single apt feeds to support multiple BSP's with same or different > > architecture for a linux-libc-dev package, without this change we may > > not be able to support them. > > If BSPs are breaking the UAPIs of each other, then we may not even > consider them valid BSPs (they should not change the UAPI at all, in > theory) - but I agree that this case is imaginable. > > > > > I think that in way of 90% of the use cases the latter will be enough > > because the kernels only differ in configuration or in patches that do > > not create conflicting changes to the UAPI headers. But can someone > > think of a case where this is not enough? > > > > > > Yes. I agree UAPI headers might be common in 99% cases unless we have > > specific BSP changes pushed and maintained > > So, any ideas how to model a recipe API where you can opt-in to build > multiple linux-libc-dev (which will no longer be simple replacements of > the upstream packages)? > > Or do you have any idea how to fix the issue that the sbuild envs are > not up/downgrading the linux-libc-dev packages anymore when they have > different names? > > Reverting all this is not nice as well because we already broke the > recipe API, but it's currently the only good option I see. > > Jan > > -- > 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/4be9f176-71d2-4f61-bd98-70d91385574fn%40googlegroups.com. [-- Attachment #1.2: Type: text/html, Size: 13937 bytes --] ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH] linux-custom: support to add linux-libc-dev package with kernel name 2025-09-11 5:38 ` Arulpandiyan Vadivel @ 2025-09-11 8:33 ` 'Jan Kiszka' via isar-users 2025-09-11 11:05 ` 'Jan Kiszka' via isar-users 0 siblings, 1 reply; 24+ messages in thread From: 'Jan Kiszka' via isar-users @ 2025-09-11 8:33 UTC (permalink / raw) To: Arulpandiyan Vadivel, isar-users On 11.09.25 07:38, Arulpandiyan Vadivel wrote: > I understand the issue reported , Can you please help to share/provide > the steps to reproduce the issue where I can check for the solutions > 1. Fix all the urgent mistakes of the patch: diff --git a/meta/recipes-kernel/linux/files/debian/control.tmpl b/meta/recipes-kernel/linux/files/debian/control.tmpl index a79b86c4..6a4866da 100644 --- a/meta/recipes-kernel/linux/files/debian/control.tmpl +++ b/meta/recipes-kernel/linux/files/debian/control.tmpl @@ -36,9 +36,9 @@ Description: Linux support headers for userspace development Package: linux-libc-dev-${DISTRO_ARCH}-cross-${KERNEL_NAME_PROVIDED} Build-Profiles: <!nolibcdev cross !kbuild> Section: devel -Conflicts: linux-kernel-headers-${DISTRO_ARCH}-cross -Provides: linux-kernel-headers-${DISTRO_ARCH}-cross -Replaces: linux-kernel-headers-${DISTRO_ARCH}-cross +Conflicts: linux-libc-dev-${DISTRO_ARCH}-cross +Provides: linux-kernel-headers-${DISTRO_ARCH}-cross, linux-libc-dev-${DISTRO_ARCH}-cross +Replaces: linux-libc-dev-${DISTRO_ARCH}-cross Architecture: all Description: Linux Kernel Headers for development (for cross-compiling) This package provides headers from the Linux kernel. These headers diff --git a/meta/recipes-kernel/linux/files/debian/isar/common.tmpl b/meta/recipes-kernel/linux/files/debian/isar/common.tmpl index b004214f..83505fda 100644 --- a/meta/recipes-kernel/linux/files/debian/isar/common.tmpl +++ b/meta/recipes-kernel/linux/files/debian/isar/common.tmpl @@ -9,7 +9,7 @@ ARCH=${KERNEL_ARCH} KERNEL_PKG_IMAGE=linux-image-${KERNEL_NAME_PROVIDED} KERNEL_PKG_KERN_HEADERS=linux-headers-${KERNEL_NAME_PROVIDED} KERNEL_PKG_LIBC_HEADERS=linux-libc-dev-${KERNEL_NAME_PROVIDED} -KERNEL_PKG_LIBC_HEADERS_CROSS=linux-libc-dev-${DISTRO_ARCH}-cross +KERNEL_PKG_LIBC_HEADERS_CROSS=linux-libc-dev-${DISTRO_ARCH}-cross-${KERNEL_NAME_PROVIDED} KERNEL_PKG_KERN_KBUILD=linux-kbuild-${KERNEL_NAME_PROVIDED} KERNEL_PKG_KERN_KBUILD_CROSS=${KERNEL_PKG_KERN_KBUILD}-${DISTRO_ARCH}-cross 2. Build a kernel that has KERNEL_LIBC_DEV_DEPLOY = "1" 3. Build another packages and check if the self-built linux-libc-dev (-cross) is pulled into the sbuild-chroot I got some idea how the latter could possible be restored, even when using libc-dev packages with different names. Will try that out later. Jan -- 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/34bc7c07-25ca-4375-8ca5-dcbdc3bdcbf0%40siemens.com. ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH] linux-custom: support to add linux-libc-dev package with kernel name 2025-09-11 8:33 ` 'Jan Kiszka' via isar-users @ 2025-09-11 11:05 ` 'Jan Kiszka' via isar-users 2025-09-11 13:59 ` 'Jan Kiszka' via isar-users 0 siblings, 1 reply; 24+ messages in thread From: 'Jan Kiszka' via isar-users @ 2025-09-11 11:05 UTC (permalink / raw) To: Arulpandiyan Vadivel, isar-users On 11.09.25 10:33, Jan Kiszka wrote: > On 11.09.25 07:38, Arulpandiyan Vadivel wrote: >> I understand the issue reported , Can you please help to share/provide >> the steps to reproduce the issue where I can check for the solutions >> > > 1. Fix all the urgent mistakes of the patch: > > diff --git a/meta/recipes-kernel/linux/files/debian/control.tmpl b/meta/recipes-kernel/linux/files/debian/control.tmpl > index a79b86c4..6a4866da 100644 > --- a/meta/recipes-kernel/linux/files/debian/control.tmpl > +++ b/meta/recipes-kernel/linux/files/debian/control.tmpl > @@ -36,9 +36,9 @@ Description: Linux support headers for userspace development > Package: linux-libc-dev-${DISTRO_ARCH}-cross-${KERNEL_NAME_PROVIDED} > Build-Profiles: <!nolibcdev cross !kbuild> > Section: devel > -Conflicts: linux-kernel-headers-${DISTRO_ARCH}-cross > -Provides: linux-kernel-headers-${DISTRO_ARCH}-cross > -Replaces: linux-kernel-headers-${DISTRO_ARCH}-cross > +Conflicts: linux-libc-dev-${DISTRO_ARCH}-cross > +Provides: linux-kernel-headers-${DISTRO_ARCH}-cross, linux-libc-dev-${DISTRO_ARCH}-cross > +Replaces: linux-libc-dev-${DISTRO_ARCH}-cross > Architecture: all > Description: Linux Kernel Headers for development (for cross-compiling) > This package provides headers from the Linux kernel. These headers > diff --git a/meta/recipes-kernel/linux/files/debian/isar/common.tmpl b/meta/recipes-kernel/linux/files/debian/isar/common.tmpl > index b004214f..83505fda 100644 > --- a/meta/recipes-kernel/linux/files/debian/isar/common.tmpl > +++ b/meta/recipes-kernel/linux/files/debian/isar/common.tmpl > @@ -9,7 +9,7 @@ ARCH=${KERNEL_ARCH} > KERNEL_PKG_IMAGE=linux-image-${KERNEL_NAME_PROVIDED} > KERNEL_PKG_KERN_HEADERS=linux-headers-${KERNEL_NAME_PROVIDED} > KERNEL_PKG_LIBC_HEADERS=linux-libc-dev-${KERNEL_NAME_PROVIDED} > -KERNEL_PKG_LIBC_HEADERS_CROSS=linux-libc-dev-${DISTRO_ARCH}-cross > +KERNEL_PKG_LIBC_HEADERS_CROSS=linux-libc-dev-${DISTRO_ARCH}-cross-${KERNEL_NAME_PROVIDED} > KERNEL_PKG_KERN_KBUILD=linux-kbuild-${KERNEL_NAME_PROVIDED} > KERNEL_PKG_KERN_KBUILD_CROSS=${KERNEL_PKG_KERN_KBUILD}-${DISTRO_ARCH}-cross > > > 2. Build a kernel that has KERNEL_LIBC_DEV_DEPLOY = "1" > > 3. Build another packages and check if the self-built linux-libc-dev (-cross) is pulled into the sbuild-chroot > > I got some idea how the latter could possible be restored, even when using libc-dev packages with different names. Will try that out later. > ...but it did not work so far: I tried to inject an explicit build dependency on linux-libc-dev into every package build, but I had to weaken it because KERNEL_LIBC_DEV_DEPLOY is generally off - or there is even no custom kernel. diff --git a/meta/classes/dpkg.bbclass b/meta/classes/dpkg.bbclass index 0e5a495d..149e8577 100644 --- a/meta/classes/dpkg.bbclass +++ b/meta/classes/dpkg.bbclass @@ -115,6 +115,7 @@ dpkg_runbuild() { --no-run-lintian --no-run-piuparts --no-run-autopkgtest --resolve-alternatives \ --bd-uninstallable-explainer=apt \ --no-apt-update --apt-distupgrade \ + --add-depends="linux-libc-dev|linux-libc-dev-${PACKAGE_ARCH}-cross|linux-libc-dev-${KERNEL_NAME}|linux-libc-dev-${PACKAGE_ARCH}-cross-${KERNEL_NAME}" \ --chroot-setup-commands="echo \"Package: *\nPin: release n=${DEBDISTRONAME}\nPin-Priority: 1000\" > /etc/apt/preferences.d/isar-apt" \ --chroot-setup-commands="echo \"APT::Get::allow-downgrades 1;\" > /etc/apt/apt.conf.d/50isar-apt" \ --chroot-setup-commands="rm -f /var/log/dpkg.log" \ But this still does not trigger any automatic updates/downgrades to the self-built libc-dev. Jan -- 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/ac0068a2-af5a-43a8-945f-568739f840e0%40siemens.com. ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH] linux-custom: support to add linux-libc-dev package with kernel name 2025-09-11 11:05 ` 'Jan Kiszka' via isar-users @ 2025-09-11 13:59 ` 'Jan Kiszka' via isar-users 0 siblings, 0 replies; 24+ messages in thread From: 'Jan Kiszka' via isar-users @ 2025-09-11 13:59 UTC (permalink / raw) To: Arulpandiyan Vadivel, isar-users, Cedric Hombourger On 11.09.25 13:05, Jan Kiszka wrote: > On 11.09.25 10:33, Jan Kiszka wrote: >> On 11.09.25 07:38, Arulpandiyan Vadivel wrote: >>> I understand the issue reported , Can you please help to share/provide >>> the steps to reproduce the issue where I can check for the solutions >>> >> >> 1. Fix all the urgent mistakes of the patch: >> >> diff --git a/meta/recipes-kernel/linux/files/debian/control.tmpl b/meta/recipes-kernel/linux/files/debian/control.tmpl >> index a79b86c4..6a4866da 100644 >> --- a/meta/recipes-kernel/linux/files/debian/control.tmpl >> +++ b/meta/recipes-kernel/linux/files/debian/control.tmpl >> @@ -36,9 +36,9 @@ Description: Linux support headers for userspace development >> Package: linux-libc-dev-${DISTRO_ARCH}-cross-${KERNEL_NAME_PROVIDED} >> Build-Profiles: <!nolibcdev cross !kbuild> >> Section: devel >> -Conflicts: linux-kernel-headers-${DISTRO_ARCH}-cross >> -Provides: linux-kernel-headers-${DISTRO_ARCH}-cross >> -Replaces: linux-kernel-headers-${DISTRO_ARCH}-cross >> +Conflicts: linux-libc-dev-${DISTRO_ARCH}-cross >> +Provides: linux-kernel-headers-${DISTRO_ARCH}-cross, linux-libc-dev-${DISTRO_ARCH}-cross >> +Replaces: linux-libc-dev-${DISTRO_ARCH}-cross >> Architecture: all >> Description: Linux Kernel Headers for development (for cross-compiling) >> This package provides headers from the Linux kernel. These headers >> diff --git a/meta/recipes-kernel/linux/files/debian/isar/common.tmpl b/meta/recipes-kernel/linux/files/debian/isar/common.tmpl >> index b004214f..83505fda 100644 >> --- a/meta/recipes-kernel/linux/files/debian/isar/common.tmpl >> +++ b/meta/recipes-kernel/linux/files/debian/isar/common.tmpl >> @@ -9,7 +9,7 @@ ARCH=${KERNEL_ARCH} >> KERNEL_PKG_IMAGE=linux-image-${KERNEL_NAME_PROVIDED} >> KERNEL_PKG_KERN_HEADERS=linux-headers-${KERNEL_NAME_PROVIDED} >> KERNEL_PKG_LIBC_HEADERS=linux-libc-dev-${KERNEL_NAME_PROVIDED} >> -KERNEL_PKG_LIBC_HEADERS_CROSS=linux-libc-dev-${DISTRO_ARCH}-cross >> +KERNEL_PKG_LIBC_HEADERS_CROSS=linux-libc-dev-${DISTRO_ARCH}-cross-${KERNEL_NAME_PROVIDED} >> KERNEL_PKG_KERN_KBUILD=linux-kbuild-${KERNEL_NAME_PROVIDED} >> KERNEL_PKG_KERN_KBUILD_CROSS=${KERNEL_PKG_KERN_KBUILD}-${DISTRO_ARCH}-cross >> >> >> 2. Build a kernel that has KERNEL_LIBC_DEV_DEPLOY = "1" >> >> 3. Build another packages and check if the self-built linux-libc-dev (-cross) is pulled into the sbuild-chroot >> >> I got some idea how the latter could possible be restored, even when using libc-dev packages with different names. Will try that out later. >> > > ...but it did not work so far: I tried to inject an explicit build > dependency on linux-libc-dev into every package build, but I had to > weaken it because KERNEL_LIBC_DEV_DEPLOY is generally off - or there is > even no custom kernel. > > diff --git a/meta/classes/dpkg.bbclass b/meta/classes/dpkg.bbclass > index 0e5a495d..149e8577 100644 > --- a/meta/classes/dpkg.bbclass > +++ b/meta/classes/dpkg.bbclass > @@ -115,6 +115,7 @@ dpkg_runbuild() { > --no-run-lintian --no-run-piuparts --no-run-autopkgtest --resolve-alternatives \ > --bd-uninstallable-explainer=apt \ > --no-apt-update --apt-distupgrade \ > + --add-depends="linux-libc-dev|linux-libc-dev-${PACKAGE_ARCH}-cross|linux-libc-dev-${KERNEL_NAME}|linux-libc-dev-${PACKAGE_ARCH}-cross-${KERNEL_NAME}" \ > --chroot-setup-commands="echo \"Package: *\nPin: release n=${DEBDISTRONAME}\nPin-Priority: 1000\" > /etc/apt/preferences.d/isar-apt" \ > --chroot-setup-commands="echo \"APT::Get::allow-downgrades 1;\" > /etc/apt/apt.conf.d/50isar-apt" \ > --chroot-setup-commands="rm -f /var/log/dpkg.log" \ > > But this still does not trigger any automatic updates/downgrades to the > self-built libc-dev. > We further discussed this internally, and I played around with an artificial test setup as well: It seems more and more unlikely that one can replace an upstream Debian package with one that is differently called and only provides the upstream name. Even with the preferences we configure, dpkg will still prefer the upstream packages over such a replacement when resolving dependencies. Only if anyone can solve that problem above, we would be able to support multiple libc-dev packages in the same build run. For now, I will create a revert patch and propose to roll everything back to single, unified linux-libc-dev per build in isar. Jan -- 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/fad842e5-ff13-4a77-9861-ea72eda373db%40siemens.com. ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH] linux-custom: support to add linux-libc-dev package with kernel name 2025-09-11 5:11 ` 'Jan Kiszka' via isar-users 2025-09-11 5:21 ` Arulpandiyan Vadivel @ 2025-09-11 7:02 ` 'cedric.hombourger@siemens.com' via isar-users 1 sibling, 0 replies; 24+ messages in thread From: 'cedric.hombourger@siemens.com' via isar-users @ 2025-09-11 7:02 UTC (permalink / raw) To: isar-users, Kiszka, Jan, Vadivel, Arulpandiyan; +Cc: srikanth.krishnakar On Thu, 2025-09-11 at 07:11 +0200, Jan Kiszka wrote: > On 10.09.25 19:22, 'Jan Kiszka' via isar-users wrote: > > On 10.09.25 15:55, 'Jan Kiszka' via isar-users wrote: > > > On 21.01.25 10:47, 'Arulpandiyan Vadivel' via isar-users wrote: > > > > Debian and Ubuntu use unified kernel headers and a single > > > > linux-libc-dev > > > > package is shipped. In contrast, Isar may build multiple kernel > > > > variants > > > > with different versions and/or patches and their packages but > > > > linux-libc-dev > > > > are suffixed with -${KERNEL_NAME_PROVIDED}: this allows > > > > each variant to exist in isar-apt (reprepro may not have more > > > > than one > > > > version of a given package for a given suite). > > > > Apply the same suffix to linux-libc-dev / linux-libc-dev- > > > > ${DISTRO_ARCH}-cross > > > > and a Provides: clause. > > > > > > > > Signed-off-by: Arulpandiyan Vadivel > > > > <arulpandiyan.vadivel@siemens.com> > > > > > > > > --- > > > > Changes since v4 > > > > - Updated KERNEL_PKG_LIBC_HEADERS path with > > > > KERNEL_NAME_PROVIDED > > > > > > > > Changes since v3 > > > > - Updated commit message to include cross packages > > > > - updated doc/custom_kernel.md documentation > > > > > > > > Changes since v2 > > > > - Updated commit message as suggested > > > > - Added KERNEL_NAME_PROVIDED for cross packages of linux-libc- > > > > dev as well > > > > > > > > --- > > > > --- > > > > RECIPE-API-CHANGELOG.md | 12 > > > > ++++++++++++ > > > > doc/custom_kernel.md | 4 ++-- > > > > meta/recipes-kernel/linux/files/debian/control.tmpl | 10 > > > > +++++++--- > > > > .../linux/files/debian/isar/common.tmpl | 2 +- > > > > .../linux/files/debian/isar/install.tmpl | 2 +- > > > > meta/recipes-kernel/linux/linux-custom.inc | 2 ++ > > > > 6 files changed, 25 insertions(+), 7 deletions(-) > > > > > > > > diff --git a/RECIPE-API-CHANGELOG.md b/RECIPE-API-CHANGELOG.md > > > > index f310553a..64c0f34a 100644 > > > > --- a/RECIPE-API-CHANGELOG.md > > > > +++ b/RECIPE-API-CHANGELOG.md > > > > @@ -702,3 +702,15 @@ enable cross-compilation. Otherwize > > > > ISAR_CROSS_COMPILE = "0" now should be set > > > > in local.conf to disable cross-compilation for all the > > > > recipes. > > > > Sample local.conf from meta-isar used by isar-init-build-env > > > > is also changed > > > > to enable cross-compilation by default. > > > > + > > > > +### Enable linux-libc-dev package with KERNEL_NAME > > > > + > > > > +By default linux-libc-dev and linux-libc-dev-${DISTRO_ARCH}- > > > > cross package > > > > +was generated for architecture it builds for. > > > > + > > > > +This change helps to generate the `linux-libc-dev- > > > > ${KERNEL_NAME}` and > > > > +`linux-libc-dev-${DISTRO_ARCH}-cross-${KERNEL_NAME}`. > > > > +For example, If `KERNEL_NAME` is configured as `foo` for > > > > arm64, now > > > > +`linux-libc-dev-foo` and `linux-libc-dev-arm64-cross-foo` > > > > package will be > > > > +generated. This will help to have multiple versions of linux- > > > > libc-dev packages > > > > +available for respective bsps in apt feeds. > > > > diff --git a/doc/custom_kernel.md b/doc/custom_kernel.md > > > > index ce5f1bf7..2dca577c 100644 > > > > --- a/doc/custom_kernel.md > > > > +++ b/doc/custom_kernel.md > > > > @@ -51,9 +51,9 @@ The linux-custom recipe provides support for: > > > > > > > > Only the `host` specific package is built automatically at > > > > cross builds. > > > > > > > > - 10. Produce a `linux-libc-dev` package to support user-land > > > > builds > > > > + 10. Produce a `linux-libc-dev-${KERNEL_NAME}` package to > > > > support user-land builds > > > > > > > > - 11. Only build/ship the `linux-libc-dev` package if > > > > instructed to > > > > + 11. Only build/ship the `linux-libc-dev-${KERNEL_NAME}` > > > > package if instructed to > > > > (`KERNEL_LIBC_DEV_DEPLOY` equals to `"1"`) > > > > > > > > 12. Support both native and cross compiles > > > > (`ISAR_CROSS_COMPILE`) > > > > diff --git a/meta/recipes- > > > > kernel/linux/files/debian/control.tmpl b/meta/recipes- > > > > kernel/linux/files/debian/control.tmpl > > > > index ec0da1ab..a79b86c4 100644 > > > > --- a/meta/recipes-kernel/linux/files/debian/control.tmpl > > > > +++ b/meta/recipes-kernel/linux/files/debian/control.tmpl > > > > @@ -22,19 +22,23 @@ Description: ${KERNEL_NAME_PROVIDED} Linux > > > > kernel headers for @KR@ > > > > . > > > > This is useful for people who need to build external modules > > > > > > > > -Package: linux-libc-dev > > > > +Package: linux-libc-dev-${KERNEL_NAME_PROVIDED} > > > > Build-Profiles: <!nolibcdev kernel> > > > > Section: devel > > > > -Provides: linux-kernel-headers > > > > +Conflicts: linux-libc-dev > > > > +Provides: linux-libc-dev > > > > +Replaces: linux-libc-dev > > > > Architecture: ${KERNEL_LIBC_DEV_ARCH} > > > > Description: Linux support headers for userspace development > > > > This package provides userspaces headers from the Linux > > > > kernel. These headers > > > > are used by the installed headers for GNU glibc and other > > > > system libraries. > > > > > > > > -Package: linux-libc-dev-${DISTRO_ARCH}-cross > > > > +Package: linux-libc-dev-${DISTRO_ARCH}-cross- > > > > ${KERNEL_NAME_PROVIDED} > > > > Build-Profiles: <!nolibcdev cross !kbuild> > > > > Section: devel > > > > +Conflicts: linux-kernel-headers-${DISTRO_ARCH}-cross > > > > Provides: linux-kernel-headers-${DISTRO_ARCH}-cross > > > > +Replaces: linux-kernel-headers-${DISTRO_ARCH}-cross > > > > This was also wrong. > > > > > > Architecture: all > > > > Description: Linux Kernel Headers for development (for cross- > > > > compiling) > > > > This package provides headers from the Linux kernel. These > > > > headers > > > > diff --git a/meta/recipes- > > > > kernel/linux/files/debian/isar/common.tmpl b/meta/recipes- > > > > kernel/linux/files/debian/isar/common.tmpl > > > > index f9cc2f02..b004214f 100644 > > > > --- a/meta/recipes-kernel/linux/files/debian/isar/common.tmpl > > > > +++ b/meta/recipes-kernel/linux/files/debian/isar/common.tmpl > > > > @@ -8,7 +8,7 @@ set -e > > > > ARCH=${KERNEL_ARCH} > > > > KERNEL_PKG_IMAGE=linux-image-${KERNEL_NAME_PROVIDED} > > > > KERNEL_PKG_KERN_HEADERS=linux-headers-${KERNEL_NAME_PROVIDED} > > > > -KERNEL_PKG_LIBC_HEADERS=linux-libc-dev > > > > +KERNEL_PKG_LIBC_HEADERS=linux-libc-dev-${KERNEL_NAME_PROVIDED} > > > > KERNEL_PKG_LIBC_HEADERS_CROSS=linux-libc-dev-${DISTRO_ARCH}- > > > > cross > > > > > > This broke the cross libc-dev package. Fix is being tested. > > > > > > Seems we are lacking tests for this scenario: found via xenomai- > > > images > > > only, and there we were lacking CI for the affected path as well > > > :(. > > > > > > > There is another issue with this patch which was likely hard to > > predict: > > It broke automatic downgrades, possibly also updates, of libc-dev > > in the > > sbuild-chroots. As xenomai-images is currently broken in other > > regards > > as well, I cannot easily point to a demo case, but I reproduced > > that > > locally: After reverting this change, I can build libevl, which > > really > > needs the custom kernel's libc-dev because of extra headers, > > without any > > extra dependency. > > > > [...] > > Reading package lists... > > Building dependency tree... > > Reading state information... > > Calculating upgrade... > > The following packages will be upgraded: > > linux-libc-dev > > 1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. > > [...] > > > > With this change, I would now have to add the explicit Build- > > Depends on > > linux-libc-dev-${KERNEL_NAME} or the corresponding cross package. > > That > > is a very ugly recipe API change that was also not documented. > > > > So, I'm not very happy with having this pattern here by default and > > would prefer only using it if there are actually multiple kernels > > that > > also deploy their libc-dev packages. > > > > Unless someone has a good idea quickly, we should revert this first > > and > > retry later. Yes I am in favor. > > > > This is a design challenge: Do we really need per-KERNEL_NAME > linux-libc-dev packages, or is it enough to tell the users to enable > KERNEL_LIBC_DEV_DEPLOY only for one of them? This would break one of our multiconfig projects (and I am not referring to our -distro project that you have seen) but a project where we have several machines and two with vendor-specific headers that are needed by downstream projects to build their userland middleware/applications Since Isar supports and advertises multiconfig (e.g. user manual suggests using bitbake mc:*:isar-image-base), I believe we should make sure recipe-level settings such as KERNEL_LIBC_DEV_DEPLOY will not break. It is surely not an easy task and clearly reinforces the need for more tests with every submission we make. > > I think that in way of 90% of the use cases the latter will be enough > because the kernels only differ in configuration or in patches that > do > not create conflicting changes to the UAPI headers. But can someone > think of a case where this is not enough? > > Jan > -- 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/e35ea8da51b2262d809e18e54f5941a2b2d887e3.camel%40siemens.com. ^ permalink raw reply [flat|nested] 24+ messages in thread
end of thread, other threads:[~2025-09-11 14:00 UTC | newest] Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2025-01-12 19:00 [PATCH] linux-custom: support to add linux-libc-dev package with kernel name 'Arulpandiyan Vadivel' via isar-users 2025-01-12 20:46 ` 'cedric.hombourger@siemens.com' via isar-users 2025-01-13 8:07 ` [PATCH V2] " 'Arulpandiyan Vadivel' via isar-users 2025-01-13 14:04 ` 'cedric.hombourger@siemens.com' via isar-users 2025-01-14 16:33 ` [PATCH V3] " 'Arulpandiyan Vadivel' via isar-users 2025-01-17 13:25 ` 'Jan Kiszka' via isar-users 2025-01-17 17:37 ` 'Arulpandiyan Vadivel' via isar-users 2025-01-17 17:40 ` 'Jan Kiszka' via isar-users 2025-01-17 17:44 ` 'Jan Kiszka' via isar-users 2025-01-17 17:59 ` 'Arulpandiyan Vadivel' via isar-users 2025-01-17 18:02 ` [PATCH V4] " 'Arulpandiyan Vadivel' via isar-users 2025-01-21 9:47 ` [PATCH] " 'Arulpandiyan Vadivel' via isar-users 2025-02-06 11:50 ` 'Vadivel, Arulpandiyan' via isar-users 2025-02-07 7:48 ` Uladzimir Bely 2025-09-10 13:55 ` 'Jan Kiszka' via isar-users 2025-09-10 17:22 ` 'Jan Kiszka' via isar-users 2025-09-11 5:11 ` 'Jan Kiszka' via isar-users 2025-09-11 5:21 ` Arulpandiyan Vadivel 2025-09-11 5:28 ` 'Jan Kiszka' via isar-users 2025-09-11 5:38 ` Arulpandiyan Vadivel 2025-09-11 8:33 ` 'Jan Kiszka' via isar-users 2025-09-11 11:05 ` 'Jan Kiszka' via isar-users 2025-09-11 13:59 ` 'Jan Kiszka' via isar-users 2025-09-11 7:02 ` 'cedric.hombourger@siemens.com' via isar-users
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox