* [PATCH 1/2] linux-module: create S if not existing @ 2022-07-07 15:46 Felix Moessbauer 2022-07-07 15:46 ` [PATCH 2/2] Add support for build dependencies in linux-module Felix Moessbauer 2022-07-07 16:00 ` [PATCH 1/2] linux-module: create S if not existing Henning Schild 0 siblings, 2 replies; 10+ messages in thread From: Felix Moessbauer @ 2022-07-07 15:46 UTC (permalink / raw) To: isar-users; +Cc: jan.kiszka, Felix Moessbauer We copy the debian folder into S, but at do_prepare_build time S might not have been created yet. This patch makes sure that the directory is created if it does not exist. Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com> --- meta/recipes-kernel/linux-module/module.inc | 1 + 1 file changed, 1 insertion(+) diff --git a/meta/recipes-kernel/linux-module/module.inc b/meta/recipes-kernel/linux-module/module.inc index 50acfe14..97eff294 100644 --- a/meta/recipes-kernel/linux-module/module.inc +++ b/meta/recipes-kernel/linux-module/module.inc @@ -28,6 +28,7 @@ TEMPLATE_FILES = "debian/control.tmpl \ debian/rules.tmpl" TEMPLATE_VARS += "KERNEL_NAME KERNEL_TYPE KERNEL_IMAGE_PKG KERNEL_HEADERS_PKG PN" +do_prepare_build[dirs] += "${S}" do_prepare_build() { cp -r ${WORKDIR}/debian ${S}/ -- 2.30.2 ^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 2/2] Add support for build dependencies in linux-module 2022-07-07 15:46 [PATCH 1/2] linux-module: create S if not existing Felix Moessbauer @ 2022-07-07 15:46 ` Felix Moessbauer 2022-07-07 15:57 ` Henning Schild 2022-07-14 9:17 ` Anton Mikanovich 2022-07-07 16:00 ` [PATCH 1/2] linux-module: create S if not existing Henning Schild 1 sibling, 2 replies; 10+ messages in thread From: Felix Moessbauer @ 2022-07-07 15:46 UTC (permalink / raw) To: isar-users; +Cc: jan.kiszka, Felix Moessbauer This patch adds support to add additional build dependencies when building a linux-module by using DEBIAN_BUILD_DEPENDS. Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com> --- meta/recipes-kernel/linux-module/files/debian/control.tmpl | 2 +- meta/recipes-kernel/linux-module/module.inc | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/meta/recipes-kernel/linux-module/files/debian/control.tmpl b/meta/recipes-kernel/linux-module/files/debian/control.tmpl index d3f4dfe9..67b08244 100644 --- a/meta/recipes-kernel/linux-module/files/debian/control.tmpl +++ b/meta/recipes-kernel/linux-module/files/debian/control.tmpl @@ -2,7 +2,7 @@ Source: ${PN} Section: kernel Priority: optional Standards-Version: 3.9.6 -Build-Depends: ${KERNEL_HEADERS_PKG} +Build-Depends: ${DEBIAN_BUILD_DEPENDS} Maintainer: ISAR project <isar-users@googlegroups.com> Package: ${PN} diff --git a/meta/recipes-kernel/linux-module/module.inc b/meta/recipes-kernel/linux-module/module.inc index 97eff294..a5c4336a 100644 --- a/meta/recipes-kernel/linux-module/module.inc +++ b/meta/recipes-kernel/linux-module/module.inc @@ -16,6 +16,7 @@ PN .= "-${KERNEL_NAME}" KERNEL_IMAGE_PKG ??= "linux-image-${KERNEL_NAME}" KERNEL_HEADERS_PKG ??= "linux-headers-${KERNEL_NAME}" DEPENDS += "${KERNEL_HEADERS_PKG}" +DEBIAN_BUILD_DEPENDS = "${KERNEL_HEADERS_PKG}" SRC_URI += "file://debian/" @@ -26,7 +27,7 @@ inherit dpkg TEMPLATE_FILES = "debian/control.tmpl \ debian/changelog.tmpl \ debian/rules.tmpl" -TEMPLATE_VARS += "KERNEL_NAME KERNEL_TYPE KERNEL_IMAGE_PKG KERNEL_HEADERS_PKG PN" +TEMPLATE_VARS += "KERNEL_NAME KERNEL_TYPE KERNEL_IMAGE_PKG KERNEL_HEADERS_PKG DEBIAN_BUILD_DEPENDS PN" do_prepare_build[dirs] += "${S}" do_prepare_build() { -- 2.30.2 ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 2/2] Add support for build dependencies in linux-module 2022-07-07 15:46 ` [PATCH 2/2] Add support for build dependencies in linux-module Felix Moessbauer @ 2022-07-07 15:57 ` Henning Schild 2022-07-07 16:00 ` Moessbauer, Felix 2022-07-14 9:17 ` Anton Mikanovich 1 sibling, 1 reply; 10+ messages in thread From: Henning Schild @ 2022-07-07 15:57 UTC (permalink / raw) To: Felix Moessbauer; +Cc: isar-users, jan.kiszka Am Thu, 7 Jul 2022 17:46:34 +0200 schrieb Felix Moessbauer <felix.moessbauer@siemens.com>: > This patch adds support to add additional build dependencies > when building a linux-module by using DEBIAN_BUILD_DEPENDS. > > Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com> > --- > meta/recipes-kernel/linux-module/files/debian/control.tmpl | 2 +- > meta/recipes-kernel/linux-module/module.inc | 3 ++- > 2 files changed, 3 insertions(+), 2 deletions(-) > > diff --git > a/meta/recipes-kernel/linux-module/files/debian/control.tmpl > b/meta/recipes-kernel/linux-module/files/debian/control.tmpl index > d3f4dfe9..67b08244 100644 --- > a/meta/recipes-kernel/linux-module/files/debian/control.tmpl +++ > b/meta/recipes-kernel/linux-module/files/debian/control.tmpl @@ -2,7 > +2,7 @@ Source: ${PN} Section: kernel Priority: optional > Standards-Version: 3.9.6 > -Build-Depends: ${KERNEL_HEADERS_PKG} > +Build-Depends: ${DEBIAN_BUILD_DEPENDS} > Maintainer: ISAR project <isar-users@googlegroups.com> > > Package: ${PN} > diff --git a/meta/recipes-kernel/linux-module/module.inc > b/meta/recipes-kernel/linux-module/module.inc index > 97eff294..a5c4336a 100644 --- > a/meta/recipes-kernel/linux-module/module.inc +++ > b/meta/recipes-kernel/linux-module/module.inc @@ -16,6 +16,7 @@ PN .= > "-${KERNEL_NAME}" KERNEL_IMAGE_PKG ??= "linux-image-${KERNEL_NAME}" > KERNEL_HEADERS_PKG ??= "linux-headers-${KERNEL_NAME}" > DEPENDS += "${KERNEL_HEADERS_PKG}" > +DEBIAN_BUILD_DEPENDS = "${KERNEL_HEADERS_PKG}" > > SRC_URI += "file://debian/" > > @@ -26,7 +27,7 @@ inherit dpkg > TEMPLATE_FILES = "debian/control.tmpl \ > debian/changelog.tmpl \ > debian/rules.tmpl" > -TEMPLATE_VARS += "KERNEL_NAME KERNEL_TYPE KERNEL_IMAGE_PKG > KERNEL_HEADERS_PKG PN" +TEMPLATE_VARS += "KERNEL_NAME KERNEL_TYPE > KERNEL_IMAGE_PKG KERNEL_HEADERS_PKG DEBIAN_BUILD_DEPENDS PN" In general such lists are way easier to maintain and look at diffs as multiline. i.e. TEMPLATE_VARS += "\ FOO\ BAR\ BLA\ " You want to not just add the new but likely also drop the old right? Henning > do_prepare_build[dirs] += "${S}" > do_prepare_build() { ^ permalink raw reply [flat|nested] 10+ messages in thread
* RE: [PATCH 2/2] Add support for build dependencies in linux-module 2022-07-07 15:57 ` Henning Schild @ 2022-07-07 16:00 ` Moessbauer, Felix 0 siblings, 0 replies; 10+ messages in thread From: Moessbauer, Felix @ 2022-07-07 16:00 UTC (permalink / raw) To: Schild, Henning; +Cc: isar-users, jan.kiszka > -----Original Message----- > From: Schild, Henning (T CED SES-DE) <henning.schild@siemens.com> > Sent: Thursday, July 7, 2022 5:57 PM > To: Moessbauer, Felix (T CED SES-DE) <felix.moessbauer@siemens.com> > Cc: isar-users@googlegroups.com; Kiszka, Jan (T CED) > <jan.kiszka@siemens.com> > Subject: Re: [PATCH 2/2] Add support for build dependencies in linux-module > > Am Thu, 7 Jul 2022 17:46:34 +0200 > schrieb Felix Moessbauer <felix.moessbauer@siemens.com>: > > > This patch adds support to add additional build dependencies when > > building a linux-module by using DEBIAN_BUILD_DEPENDS. > > > > Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com> > > --- > > meta/recipes-kernel/linux-module/files/debian/control.tmpl | 2 +- > > meta/recipes-kernel/linux-module/module.inc | 3 ++- > > 2 files changed, 3 insertions(+), 2 deletions(-) > > > > diff --git > > a/meta/recipes-kernel/linux-module/files/debian/control.tmpl > > b/meta/recipes-kernel/linux-module/files/debian/control.tmpl index > > d3f4dfe9..67b08244 100644 --- > > a/meta/recipes-kernel/linux-module/files/debian/control.tmpl +++ > > b/meta/recipes-kernel/linux-module/files/debian/control.tmpl @@ -2,7 > > +2,7 @@ Source: ${PN} Section: kernel Priority: optional > > Standards-Version: 3.9.6 > > -Build-Depends: ${KERNEL_HEADERS_PKG} > > +Build-Depends: ${DEBIAN_BUILD_DEPENDS} > > Maintainer: ISAR project <isar-users@googlegroups.com> > > > > Package: ${PN} > > diff --git a/meta/recipes-kernel/linux-module/module.inc > > b/meta/recipes-kernel/linux-module/module.inc index 97eff294..a5c4336a > > 100644 --- a/meta/recipes-kernel/linux-module/module.inc +++ > > b/meta/recipes-kernel/linux-module/module.inc @@ -16,6 +16,7 @@ PN .= > > "-${KERNEL_NAME}" KERNEL_IMAGE_PKG ??= "linux-image- > ${KERNEL_NAME}" > > KERNEL_HEADERS_PKG ??= "linux-headers-${KERNEL_NAME}" > > DEPENDS += "${KERNEL_HEADERS_PKG}" > > +DEBIAN_BUILD_DEPENDS = "${KERNEL_HEADERS_PKG}" > > > > SRC_URI += "file://debian/" > > > > @@ -26,7 +27,7 @@ inherit dpkg > > TEMPLATE_FILES = "debian/control.tmpl \ > > debian/changelog.tmpl \ > > debian/rules.tmpl" > > -TEMPLATE_VARS += "KERNEL_NAME KERNEL_TYPE KERNEL_IMAGE_PKG > > KERNEL_HEADERS_PKG PN" +TEMPLATE_VARS += "KERNEL_NAME > KERNEL_TYPE > > KERNEL_IMAGE_PKG KERNEL_HEADERS_PKG DEBIAN_BUILD_DEPENDS PN" > > In general such lists are way easier to maintain and look at diffs as multiline. i.e. > > TEMPLATE_VARS += "\ > FOO\ > BAR\ > BLA\ > " True, but I don't like these cosmetic changes as well. > > You want to not just add the new but likely also drop the old right? No, it is still used in the debian/rules. This is fine, as the values do not necessarily carry the same value. Felix > > Henning > > > do_prepare_build[dirs] += "${S}" > > do_prepare_build() { ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 2/2] Add support for build dependencies in linux-module 2022-07-07 15:46 ` [PATCH 2/2] Add support for build dependencies in linux-module Felix Moessbauer 2022-07-07 15:57 ` Henning Schild @ 2022-07-14 9:17 ` Anton Mikanovich 1 sibling, 0 replies; 10+ messages in thread From: Anton Mikanovich @ 2022-07-14 9:17 UTC (permalink / raw) To: Felix Moessbauer, isar-users; +Cc: jan.kiszka 07.07.2022 18:46, Felix Moessbauer wrote: > This patch adds support to add additional build dependencies > when building a linux-module by using DEBIAN_BUILD_DEPENDS. > > Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com> Applied p2 to next, thanks. ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 1/2] linux-module: create S if not existing 2022-07-07 15:46 [PATCH 1/2] linux-module: create S if not existing Felix Moessbauer 2022-07-07 15:46 ` [PATCH 2/2] Add support for build dependencies in linux-module Felix Moessbauer @ 2022-07-07 16:00 ` Henning Schild 2022-07-07 16:54 ` Jan Kiszka 1 sibling, 1 reply; 10+ messages in thread From: Henning Schild @ 2022-07-07 16:00 UTC (permalink / raw) To: Felix Moessbauer; +Cc: isar-users, jan.kiszka Am Thu, 7 Jul 2022 17:46:33 +0200 schrieb Felix Moessbauer <felix.moessbauer@siemens.com>: > We copy the debian folder into S, but at do_prepare_build > time S might not have been created yet. > This patch makes sure that the directory is created if > it does not exist. > > Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com> > --- > meta/recipes-kernel/linux-module/module.inc | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/meta/recipes-kernel/linux-module/module.inc > b/meta/recipes-kernel/linux-module/module.inc index > 50acfe14..97eff294 100644 --- > a/meta/recipes-kernel/linux-module/module.inc +++ > b/meta/recipes-kernel/linux-module/module.inc @@ -28,6 +28,7 @@ > TEMPLATE_FILES = "debian/control.tmpl \ debian/rules.tmpl" > TEMPLATE_VARS += "KERNEL_NAME KERNEL_TYPE KERNEL_IMAGE_PKG > KERNEL_HEADERS_PKG PN" > +do_prepare_build[dirs] += "${S}" > do_prepare_build() { > cp -r ${WORKDIR}/debian ${S}/ A little weird but i know the module you write that for is weird on its own ... nvidia. But what we do here is put packaging metadata into the code, which should be there after unpack ... everything else is "weird" ... no code no packaging needed. But hey it does not hurt. Henning ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 1/2] linux-module: create S if not existing 2022-07-07 16:00 ` [PATCH 1/2] linux-module: create S if not existing Henning Schild @ 2022-07-07 16:54 ` Jan Kiszka 2022-07-08 14:31 ` Moessbauer, Felix 0 siblings, 1 reply; 10+ messages in thread From: Jan Kiszka @ 2022-07-07 16:54 UTC (permalink / raw) To: Henning Schild, Felix Moessbauer; +Cc: isar-users On 07.07.22 18:00, Henning Schild wrote: > Am Thu, 7 Jul 2022 17:46:33 +0200 > schrieb Felix Moessbauer <felix.moessbauer@siemens.com>: > >> We copy the debian folder into S, but at do_prepare_build >> time S might not have been created yet. >> This patch makes sure that the directory is created if >> it does not exist. >> >> Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com> >> --- >> meta/recipes-kernel/linux-module/module.inc | 1 + >> 1 file changed, 1 insertion(+) >> >> diff --git a/meta/recipes-kernel/linux-module/module.inc >> b/meta/recipes-kernel/linux-module/module.inc index >> 50acfe14..97eff294 100644 --- >> a/meta/recipes-kernel/linux-module/module.inc +++ >> b/meta/recipes-kernel/linux-module/module.inc @@ -28,6 +28,7 @@ >> TEMPLATE_FILES = "debian/control.tmpl \ debian/rules.tmpl" >> TEMPLATE_VARS += "KERNEL_NAME KERNEL_TYPE KERNEL_IMAGE_PKG >> KERNEL_HEADERS_PKG PN" >> +do_prepare_build[dirs] += "${S}" >> do_prepare_build() { >> cp -r ${WORKDIR}/debian ${S}/ > > A little weird but i know the module you write that for is weird on its > own ... nvidia. But what we do here is put packaging metadata into the > code, which should be there after unpack ... everything else is "weird" > ... no code no packaging needed. > > But hey it does not hurt. It is definitely weird and will lead to new error patterns when folks specify a wrong S value - did you check that? If a broken S will not silently generate a nop-recipe now, we can take this, but I would like to see more reasoning of the case where S is filled with code AFTER do_prepare_build. Jan -- Siemens AG, Technology Competence Center Embedded Linux ^ permalink raw reply [flat|nested] 10+ messages in thread
* RE: [PATCH 1/2] linux-module: create S if not existing 2022-07-07 16:54 ` Jan Kiszka @ 2022-07-08 14:31 ` Moessbauer, Felix 2022-07-14 8:22 ` Anton Mikanovich 0 siblings, 1 reply; 10+ messages in thread From: Moessbauer, Felix @ 2022-07-08 14:31 UTC (permalink / raw) To: jan.kiszka, Schild, Henning; +Cc: isar-users > -----Original Message----- > From: Kiszka, Jan (T CED) <jan.kiszka@siemens.com> > Sent: Thursday, July 7, 2022 6:54 PM > To: Schild, Henning (T CED SES-DE) <henning.schild@siemens.com>; > Moessbauer, Felix (T CED SES-DE) <felix.moessbauer@siemens.com> > Cc: isar-users@googlegroups.com > Subject: Re: [PATCH 1/2] linux-module: create S if not existing > > On 07.07.22 18:00, Henning Schild wrote: > > Am Thu, 7 Jul 2022 17:46:33 +0200 > > schrieb Felix Moessbauer <felix.moessbauer@siemens.com>: > > > >> We copy the debian folder into S, but at do_prepare_build time S > >> might not have been created yet. > >> This patch makes sure that the directory is created if it does not > >> exist. > >> > >> Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com> > >> --- > >> meta/recipes-kernel/linux-module/module.inc | 1 + > >> 1 file changed, 1 insertion(+) > >> > >> diff --git a/meta/recipes-kernel/linux-module/module.inc > >> b/meta/recipes-kernel/linux-module/module.inc index > >> 50acfe14..97eff294 100644 --- > >> a/meta/recipes-kernel/linux-module/module.inc +++ > >> b/meta/recipes-kernel/linux-module/module.inc @@ -28,6 +28,7 @@ > >> TEMPLATE_FILES = "debian/control.tmpl \ debian/rules.tmpl" > >> TEMPLATE_VARS += "KERNEL_NAME KERNEL_TYPE KERNEL_IMAGE_PKG > >> KERNEL_HEADERS_PKG PN" > >> +do_prepare_build[dirs] += "${S}" > >> do_prepare_build() { > >> cp -r ${WORKDIR}/debian ${S}/ > > > > A little weird but i know the module you write that for is weird on > > its own ... nvidia. But what we do here is put packaging metadata into > > the code, which should be there after unpack ... everything else is "weird" > > ... no code no packaging needed. > > > > But hey it does not hurt. > > It is definitely weird and will lead to new error patterns when folks specify a > wrong S value - did you check that? Well, not really. The module.inc already copies the Debian folder to S, so at worst in S will only be the Debian folder. Prior to this patch, this lead to an error message that the Debian folder could not be copied. > > If a broken S will not silently generate a nop-recipe now, we can take this, but I > would like to see more reasoning of the case where S is filled with code AFTER > do_prepare_build. Yes, it might lead to a nop recipe, but we need a way to manually extract and move-around the artifacts that are downloaded to WORKDIR. Prior to this patch S has only been created by the do_unpack task when unpacking things into S. Having non-filled S is not so uncommon. Esp. in case the sources are provided by a Debian-binary package like "nvidia-kernel-source" which is added as a build dependency. Felix > > Jan > > -- > Siemens AG, Technology > Competence Center Embedded Linux ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 1/2] linux-module: create S if not existing 2022-07-08 14:31 ` Moessbauer, Felix @ 2022-07-14 8:22 ` Anton Mikanovich 2022-07-14 9:05 ` Moessbauer, Felix 0 siblings, 1 reply; 10+ messages in thread From: Anton Mikanovich @ 2022-07-14 8:22 UTC (permalink / raw) To: isar-users, Felix Moessbauer; +Cc: Baurzhan Ismagulov 08.07.2022 17:31, Moessbauer, Felix wrote: >> -----Original Message----- >> From: Kiszka, Jan (T CED) <jan.kiszka@siemens.com> >> Sent: Thursday, July 7, 2022 6:54 PM >> To: Schild, Henning (T CED SES-DE) <henning.schild@siemens.com>; >> Moessbauer, Felix (T CED SES-DE) <felix.moessbauer@siemens.com> >> Cc: isar-users@googlegroups.com >> Subject: Re: [PATCH 1/2] linux-module: create S if not existing >> >> On 07.07.22 18:00, Henning Schild wrote: >>> Am Thu, 7 Jul 2022 17:46:33 +0200 >>> schrieb Felix Moessbauer <felix.moessbauer@siemens.com>: >>> >>>> We copy the debian folder into S, but at do_prepare_build time S >>>> might not have been created yet. >>>> This patch makes sure that the directory is created if it does not >>>> exist. >>>> >>>> Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com> >>>> --- >>>> meta/recipes-kernel/linux-module/module.inc | 1 + >>>> 1 file changed, 1 insertion(+) >>>> >>>> diff --git a/meta/recipes-kernel/linux-module/module.inc >>>> b/meta/recipes-kernel/linux-module/module.inc index >>>> 50acfe14..97eff294 100644 --- >>>> a/meta/recipes-kernel/linux-module/module.inc +++ >>>> b/meta/recipes-kernel/linux-module/module.inc @@ -28,6 +28,7 @@ >>>> TEMPLATE_FILES = "debian/control.tmpl \ debian/rules.tmpl" >>>> TEMPLATE_VARS += "KERNEL_NAME KERNEL_TYPE KERNEL_IMAGE_PKG >>>> KERNEL_HEADERS_PKG PN" >>>> +do_prepare_build[dirs] += "${S}" >>>> do_prepare_build() { >>>> cp -r ${WORKDIR}/debian ${S}/ >>> A little weird but i know the module you write that for is weird on >>> its own ... nvidia. But what we do here is put packaging metadata into >>> the code, which should be there after unpack ... everything else is "weird" >>> ... no code no packaging needed. >>> >>> But hey it does not hurt. >> It is definitely weird and will lead to new error patterns when folks specify a >> wrong S value - did you check that? > Well, not really. > The module.inc already copies the Debian folder to S, so at worst in S will only be the Debian folder. > Prior to this patch, this lead to an error message that the Debian folder could not be copied. > >> If a broken S will not silently generate a nop-recipe now, we can take this, but I >> would like to see more reasoning of the case where S is filled with code AFTER >> do_prepare_build. > Yes, it might lead to a nop recipe, but we need a way to manually extract and move-around the artifacts that are downloaded to WORKDIR. > Prior to this patch S has only been created by the do_unpack task when unpacking things into S. > > Having non-filled S is not so uncommon. > Esp. in case the sources are provided by a Debian-binary package like "nvidia-kernel-source" which is added as a build dependency. > > Felix > >> Jan >> >> -- >> Siemens AG, Technology >> Competence Center Embedded Linux Can you provide recipe example for that case? I think those weird recipes should be fixed by placing do_prepare_build[dirs] += "${S}" in downsteam recipe itself, but not in Isar. Having incorrect ${S} is probably much more common case during development, so we can't just allow it to be masked. ^ permalink raw reply [flat|nested] 10+ messages in thread
* RE: [PATCH 1/2] linux-module: create S if not existing 2022-07-14 8:22 ` Anton Mikanovich @ 2022-07-14 9:05 ` Moessbauer, Felix 0 siblings, 0 replies; 10+ messages in thread From: Moessbauer, Felix @ 2022-07-14 9:05 UTC (permalink / raw) To: Anton Mikanovich, isar-users; +Cc: Baurzhan Ismagulov > -----Original Message----- > From: Anton Mikanovich <amikan@ilbers.de> > Sent: Thursday, July 14, 2022 10:23 AM > To: isar-users@googlegroups.com; Moessbauer, Felix (T CED SES-DE) > <felix.moessbauer@siemens.com> > Cc: Baurzhan Ismagulov <ibr@ilbers.de> > Subject: Re: [PATCH 1/2] linux-module: create S if not existing > > 08.07.2022 17:31, Moessbauer, Felix wrote: > >> -----Original Message----- > >> From: Kiszka, Jan (T CED) <jan.kiszka@siemens.com> > >> Sent: Thursday, July 7, 2022 6:54 PM > >> To: Schild, Henning (T CED SES-DE) <henning.schild@siemens.com>; > >> Moessbauer, Felix (T CED SES-DE) <felix.moessbauer@siemens.com> > >> Cc: isar-users@googlegroups.com > >> Subject: Re: [PATCH 1/2] linux-module: create S if not existing > >> > >> On 07.07.22 18:00, Henning Schild wrote: > >>> Am Thu, 7 Jul 2022 17:46:33 +0200 > >>> schrieb Felix Moessbauer <felix.moessbauer@siemens.com>: > >>> > >>>> We copy the debian folder into S, but at do_prepare_build time S > >>>> might not have been created yet. > >>>> This patch makes sure that the directory is created if it does not > >>>> exist. > >>>> > >>>> Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com> > >>>> --- > >>>> meta/recipes-kernel/linux-module/module.inc | 1 + > >>>> 1 file changed, 1 insertion(+) > >>>> > >>>> diff --git a/meta/recipes-kernel/linux-module/module.inc > >>>> b/meta/recipes-kernel/linux-module/module.inc index > >>>> 50acfe14..97eff294 100644 --- > >>>> a/meta/recipes-kernel/linux-module/module.inc +++ > >>>> b/meta/recipes-kernel/linux-module/module.inc @@ -28,6 +28,7 @@ > >>>> TEMPLATE_FILES = "debian/control.tmpl \ debian/rules.tmpl" > >>>> TEMPLATE_VARS += "KERNEL_NAME KERNEL_TYPE KERNEL_IMAGE_PKG > >>>> KERNEL_HEADERS_PKG PN" > >>>> +do_prepare_build[dirs] += "${S}" > >>>> do_prepare_build() { > >>>> cp -r ${WORKDIR}/debian ${S}/ > >>> A little weird but i know the module you write that for is weird on > >>> its own ... nvidia. But what we do here is put packaging metadata > >>> into the code, which should be there after unpack ... everything else is > "weird" > >>> ... no code no packaging needed. > >>> > >>> But hey it does not hurt. > >> It is definitely weird and will lead to new error patterns when folks > >> specify a wrong S value - did you check that? > > Well, not really. > > The module.inc already copies the Debian folder to S, so at worst in S will only > be the Debian folder. > > Prior to this patch, this lead to an error message that the Debian folder could > not be copied. > > > >> If a broken S will not silently generate a nop-recipe now, we can > >> take this, but I would like to see more reasoning of the case where S > >> is filled with code AFTER do_prepare_build. > > Yes, it might lead to a nop recipe, but we need a way to manually extract and > move-around the artifacts that are downloaded to WORKDIR. > > Prior to this patch S has only been created by the do_unpack task when > unpacking things into S. > > > > Having non-filled S is not so uncommon. > > Esp. in case the sources are provided by a Debian-binary package like "nvidia- > kernel-source" which is added as a build dependency. > > > > Felix > > > >> Jan > >> > >> -- > >> Siemens AG, Technology > >> Competence Center Embedded Linux > > Can you provide recipe example for that case? > I think those weird recipes should be fixed by placing do_prepare_build[dirs] += > "${S}" > in downsteam recipe itself, but not in Isar. > Having incorrect ${S} is probably much more common case during development, > so we can't just allow it to be masked. Agreed. Then let's better drop this patch. Nonetheless, P2 of this series should be fine. Felix ^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2022-07-14 9:17 UTC | newest] Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2022-07-07 15:46 [PATCH 1/2] linux-module: create S if not existing Felix Moessbauer 2022-07-07 15:46 ` [PATCH 2/2] Add support for build dependencies in linux-module Felix Moessbauer 2022-07-07 15:57 ` Henning Schild 2022-07-07 16:00 ` Moessbauer, Felix 2022-07-14 9:17 ` Anton Mikanovich 2022-07-07 16:00 ` [PATCH 1/2] linux-module: create S if not existing Henning Schild 2022-07-07 16:54 ` Jan Kiszka 2022-07-08 14:31 ` Moessbauer, Felix 2022-07-14 8:22 ` Anton Mikanovich 2022-07-14 9:05 ` Moessbauer, Felix
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox