* A possible bug into linux-custom.inc
@ 2022-09-18 20:04 Roberto A. Foglietta
2022-09-18 22:06 ` Roberto A. Foglietta
2022-09-19 7:20 ` Henning Schild
0 siblings, 2 replies; 5+ messages in thread
From: Roberto A. Foglietta @ 2022-09-18 20:04 UTC (permalink / raw)
To: isar-users
[-- Attachment #1: Type: text/plain, Size: 1157 bytes --]
Hi all,
Considering the last commit by now
dd8157136f63a665b3002ab99d2fe16db117d9fc
then this files includes a debian directory
grep file:// isar/meta/recipes-kernel/linux/linux-custom.inc
SRC_URI += "file://debian"
I created my own layer with a kernel recipe with my files/debian folder
because I want some changes and then I tried - cleaning everything sensible
- but just the isar debian dir is copied in place. Thus, I moved the isar
debian folder
mv isar/meta/recipes-kernel/linux/files/debian
isar/meta/recipes-kernel/linux/files/debian.bak
Then I cleaned and tried to build. This time, the correct debian folder has
been copied in place.
I think this is a bug and I wish to receive some help to fix it. Here
following the recipe
require recipes-kernel/linux/linux-custom.inc
KBUILD_DEPENDS += " dwarves"
KERNEL_DEFCONFIG = "debian-amd64-rt-defconfig"
SRC_URI += "
https://git.kernel.org/pub/scm/linux/kernel/git/cip/linux-cip.git/snapshot/linux-cip-${PV}.tar.gz
"
SRC_URI[sha256sum] =
"9a45929d91ebaddbf6a0ef29750775e33d3c3f56f42f0a9e95e77e5b4eba3c6e"
SRC_URI += "file://${KERNEL_DEFCONFIG}"
S = "${WORKDIR}/linux-cip-${PV}"
Thanks, R.
[-- Attachment #2: Type: text/html, Size: 1649 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: A possible bug into linux-custom.inc
2022-09-18 20:04 A possible bug into linux-custom.inc Roberto A. Foglietta
@ 2022-09-18 22:06 ` Roberto A. Foglietta
2022-09-19 7:20 ` Henning Schild
1 sibling, 0 replies; 5+ messages in thread
From: Roberto A. Foglietta @ 2022-09-18 22:06 UTC (permalink / raw)
To: isar-users
[-- Attachment #1: Type: text/plain, Size: 364 bytes --]
Il giorno dom 18 set 2022 alle ore 22:04 Roberto A. Foglietta <
roberto.foglietta@gmail.com> ha scritto:
>
> I think this is a bug and I wish to receive some help to fix it. Here
> following the recipe
>
I need to copy the .inc file into my layer and require it, in this way
require linux-custom.inc
This solves but is this the expected behaviour?
Cheers, R-
[-- Attachment #2: Type: text/html, Size: 779 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: A possible bug into linux-custom.inc
2022-09-18 20:04 A possible bug into linux-custom.inc Roberto A. Foglietta
2022-09-18 22:06 ` Roberto A. Foglietta
@ 2022-09-19 7:20 ` Henning Schild
2022-09-19 9:14 ` Roberto A. Foglietta
1 sibling, 1 reply; 5+ messages in thread
From: Henning Schild @ 2022-09-19 7:20 UTC (permalink / raw)
To: Roberto A. Foglietta; +Cc: isar-users
Am Sun, 18 Sep 2022 22:04:00 +0200
schrieb "Roberto A. Foglietta" <roberto.foglietta@gmail.com>:
> Hi all,
>
> Considering the last commit by now
>
> dd8157136f63a665b3002ab99d2fe16db117d9fc
>
> then this files includes a debian directory
>
> grep file:// isar/meta/recipes-kernel/linux/linux-custom.inc
> SRC_URI += "file://debian"
>
> I created my own layer with a kernel recipe with my files/debian
> folder because I want some changes and then I tried - cleaning
> everything sensible
> - but just the isar debian dir is copied in place. Thus, I moved the
> isar debian folder
>
> mv isar/meta/recipes-kernel/linux/files/debian
> isar/meta/recipes-kernel/linux/files/debian.bak
Well touching isar is not ideal, you rather want to find a solution
that overrides the bits from isar. Maybe apply a patch to that
debian-folder instead of bringing a modified copy.
I recently tried the same with a custom rules file for a module and
found that the main debian/rules would always win. So i decided to
bring my version in under another name and overwrite it in an
additional task.
SRC_URI += "file://debian/my_rules.tmpl"
do_my_rules() {
mv ${WORKDIR}/debian/my_rules.tmpl ${WORKDIR}/debian/rules.tmpl
}
addtask my_rules after do_unpack before do_transform_template
You could also tell us what you need to change in those original files
and why, maybe your case calls for a patch.
The inc should allow for most common changes people might want, if your
case is not yet supported that is interesting.
regards,
Henning
> Then I cleaned and tried to build. This time, the correct debian
> folder has been copied in place.
>
> I think this is a bug and I wish to receive some help to fix it. Here
> following the recipe
>
> require recipes-kernel/linux/linux-custom.inc
>
> KBUILD_DEPENDS += " dwarves"
> KERNEL_DEFCONFIG = "debian-amd64-rt-defconfig"
>
> SRC_URI += "
> https://git.kernel.org/pub/scm/linux/kernel/git/cip/linux-cip.git/snapshot/linux-cip-${PV}.tar.gz
> "
> SRC_URI[sha256sum] =
> "9a45929d91ebaddbf6a0ef29750775e33d3c3f56f42f0a9e95e77e5b4eba3c6e"
>
> SRC_URI += "file://${KERNEL_DEFCONFIG}"
>
> S = "${WORKDIR}/linux-cip-${PV}"
>
> Thanks, R.
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: A possible bug into linux-custom.inc
2022-09-19 7:20 ` Henning Schild
@ 2022-09-19 9:14 ` Roberto A. Foglietta
2022-09-19 11:33 ` Roberto A. Foglietta
0 siblings, 1 reply; 5+ messages in thread
From: Roberto A. Foglietta @ 2022-09-19 9:14 UTC (permalink / raw)
To: Henning Schild; +Cc: isar-users
[-- Attachment #1: Type: text/plain, Size: 342 bytes --]
Il Lun 19 Set 2022, 09:20 Henning Schild <henning.schild@siemens.com> ha
scritto:
>
> [...]
SRC_URI += "file://debian/my_rules.tmpl"
> do_my_rules() {
> mv ${WORKDIR}/debian/my_rules.tmpl ${WORKDIR}/debian/rules.tmpl
> }
> addtask my_rules after do_unpack before do_transform_template
>
This seems a good way to go. Thanks, R-
>
[-- Attachment #2: Type: text/html, Size: 1144 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: A possible bug into linux-custom.inc
2022-09-19 9:14 ` Roberto A. Foglietta
@ 2022-09-19 11:33 ` Roberto A. Foglietta
0 siblings, 0 replies; 5+ messages in thread
From: Roberto A. Foglietta @ 2022-09-19 11:33 UTC (permalink / raw)
To: Henning Schild; +Cc: isar-users
[-- Attachment #1: Type: text/plain, Size: 1089 bytes --]
Il Lun 19 Set 2022, 11:14 Roberto A. Foglietta <roberto.foglietta@gmail.com>
ha scritto:
> Il Lun 19 Set 2022, 09:20 Henning Schild <henning.schild@siemens.com> ha
> scritto:
>
>>
>> [...]
>
>
> SRC_URI += "file://debian/my_rules.tmpl"
>> do_my_rules() {
>> mv ${WORKDIR}/debian/my_rules.tmpl ${WORKDIR}/debian/rules.tmpl
>> }
>> addtask my_rules after do_unpack before do_transform_template
>>
>
> This seems a good way to go. Thanks, R-
>
A more generalised recipe here below
SRC_URI += " \
file://custom/postinst \
file://custom/rules.tmpl \
"
do_custom_debian_dir() {
cd ${WORKDIR}
mkdir -p debian
for i in ${SRC_URI}; do
i=$(echo "$i" | sed -ne "s,file://\(custom/\),\\1,p")
if [ -f "$i" ]; then mv -f $i debian/; fi
done
cd -
}
addtask custom_debian_dir after do_unpack before do_transform_template
do_prepare_build_prepend() {
rm -rf ${S}/debian
}
N.B.: script are not execute by bash thus substring like ${var/this/that/}
fails. Uhm, why do not use the bash?
Cheers, R-
[-- Attachment #2: Type: text/html, Size: 3089 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2022-09-19 11:34 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-18 20:04 A possible bug into linux-custom.inc Roberto A. Foglietta
2022-09-18 22:06 ` Roberto A. Foglietta
2022-09-19 7:20 ` Henning Schild
2022-09-19 9:14 ` Roberto A. Foglietta
2022-09-19 11:33 ` Roberto A. Foglietta
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox