* kernel append file with dts in SRC_URI and subdir
@ 2025-01-27 11:12 David Daniel
2025-01-27 14:10 ` [yocto] " Gyorgy Sarvari
2025-01-27 15:02 ` Quentin Schulz
0 siblings, 2 replies; 8+ messages in thread
From: David Daniel @ 2025-01-27 11:12 UTC (permalink / raw)
To: yocto@lists.yoctoproject.org
Hi
I am trying to figure out why the following snippet of a kernel
.bbappend file does not populate the custom device tree source file in
the proper location:
FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
SRC_URI += "\
file://defconfig;name=config \
file://cf200.dts;name=dts;subdir=git/arch/${ARCH}/boot/dts/freescale \
"
COMPATIBLE_MACHINE = "(cf200)"
It also seems the configuration is not applied. If I rename the
defconfig file to doesntexist the build fails early. The defconfig file
does get placed within the sources-unpack folder though. Within the
sources-unpack folder there is no dts file though and the dts file is
as well not placed within the dts folder of the kernel build or source
folder.
Is it possible to modify a kernel somewhat like this? What am I doing
wrong?
Thanks for any hints!
Dave
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [yocto] kernel append file with dts in SRC_URI and subdir
2025-01-27 11:12 kernel append file with dts in SRC_URI and subdir David Daniel
@ 2025-01-27 14:10 ` Gyorgy Sarvari
2025-01-27 14:33 ` David Daniel
2025-01-27 14:48 ` Michael Opdenacker
2025-01-27 15:02 ` Quentin Schulz
1 sibling, 2 replies; 8+ messages in thread
From: Gyorgy Sarvari @ 2025-01-27 14:10 UTC (permalink / raw)
To: yocto, david.daniel
Depending on the order of unpacking, it is possible that your dts file
overwritten by the actual kernel source.
Try adding it as a patch?
On 27.01.25 12:12, David Daniel via lists.yoctoproject.org wrote:
> Hi
>
> I am trying to figure out why the following snippet of a kernel
> .bbappend file does not populate the custom device tree source file in
> the proper location:
>
>
> FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
> SRC_URI += "\
> file://defconfig;name=config \
> file://cf200.dts;name=dts;subdir=git/arch/${ARCH}/boot/dts/freescale \
> "
>
> COMPATIBLE_MACHINE = "(cf200)"
>
> It also seems the configuration is not applied. If I rename the
> defconfig file to doesntexist the build fails early. The defconfig file
> does get placed within the sources-unpack folder though. Within the
> sources-unpack folder there is no dts file though and the dts file is
> as well not placed within the dts folder of the kernel build or source
> folder.
>
> Is it possible to modify a kernel somewhat like this? What am I doing
> wrong?
>
> Thanks for any hints!
> Dave
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#64635): https://lists.yoctoproject.org/g/yocto/message/64635
> Mute This Topic: https://lists.yoctoproject.org/mt/110836825/6084445
> Group Owner: yocto+owner@lists.yoctoproject.org
> Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [skandigraun@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [yocto] kernel append file with dts in SRC_URI and subdir
2025-01-27 14:10 ` [yocto] " Gyorgy Sarvari
@ 2025-01-27 14:33 ` David Daniel
2025-01-27 14:39 ` Gyorgy Sarvari
2025-01-27 14:48 ` Michael Opdenacker
1 sibling, 1 reply; 8+ messages in thread
From: David Daniel @ 2025-01-27 14:33 UTC (permalink / raw)
To: yocto@lists.yoctoproject.org
Ah I see. That's weird though, as the name is unique, it shouldn't
collide with any existing file. But adding as a patch sounds
reasonable. I'll try this instead and see.
Thanks!
Am Montag, dem 27.01.2025 um 15:10 +0100 schrieb Gyorgy Sarvari:
> Depending on the order of unpacking, it is possible that your dts
> file
> overwritten by the actual kernel source.
>
> Try adding it as a patch?
>
> On 27.01.25 12:12, David Daniel via lists.yoctoproject.org wrote:
> > Hi
> >
> > I am trying to figure out why the following snippet of a kernel
> > .bbappend file does not populate the custom device tree source file
> > in
> > the proper location:
> >
> >
> > FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
> > SRC_URI += "\
> > file://defconfig;name=config \
> >
> > file://cf200.dts;name=dts;subdir=git/arch/${ARCH}/boot/dts/freescale
> > \
> > "
> >
> > COMPATIBLE_MACHINE = "(cf200)"
> >
> > It also seems the configuration is not applied. If I rename the
> > defconfig file to doesntexist the build fails early. The defconfig
> > file
> > does get placed within the sources-unpack folder though. Within the
> > sources-unpack folder there is no dts file though and the dts file
> > is
> > as well not placed within the dts folder of the kernel build or
> > source
> > folder.
> >
> > Is it possible to modify a kernel somewhat like this? What am I
> > doing
> > wrong?
> >
> > Thanks for any hints!
> > Dave
> >
> > -=-=-=-=-=-=-=-=-=-=-=-
> > Links: You receive all messages sent to this group.
> > View/Reply Online (#64635):
> > https://lists.yoctoproject.org/g/yocto/message/64635
> > Mute This Topic:
> > https://lists.yoctoproject.org/mt/110836825/6084445
> > Group Owner: yocto+owner@lists.yoctoproject.org
> > Unsubscribe:
> > https://lists.yoctoproject.org/g/yocto/unsub [skandigraun@gmail.com
> > ]
> > -=-=-=-=-=-=-=-=-=-=-=-
> >
--
David Daniel
VR AG
Rütistrasse 18
8952 Schlieren
Telefon:
+41 44 738 32 07
Web: https://vrag.ch
ISO9001 zertifiziert | SWISS LABEL Mitglied | Lehrbetrieb
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [yocto] kernel append file with dts in SRC_URI and subdir
2025-01-27 14:33 ` David Daniel
@ 2025-01-27 14:39 ` Gyorgy Sarvari
2025-01-27 14:54 ` David Daniel
0 siblings, 1 reply; 8+ messages in thread
From: Gyorgy Sarvari @ 2025-01-27 14:39 UTC (permalink / raw)
To: yocto, david.daniel
For git fetcher, if the unpack directory already exists at the time of
unpacking, then it first gets deleted recursively:
https://git.yoctoproject.org/poky/tree/bitbake/lib/bb/fetch2/git.py#n660
- it doesn't check if the content conflicts or not :)
On 27.01.25 15:33, David Daniel via lists.yoctoproject.org wrote:
> Ah I see. That's weird though, as the name is unique, it shouldn't
> collide with any existing file. But adding as a patch sounds
> reasonable. I'll try this instead and see.
> Thanks!
>
> Am Montag, dem 27.01.2025 um 15:10 +0100 schrieb Gyorgy Sarvari:
>> Depending on the order of unpacking, it is possible that your dts
>> file
>> overwritten by the actual kernel source.
>>
>> Try adding it as a patch?
>>
>> On 27.01.25 12:12, David Daniel via lists.yoctoproject.org wrote:
>>> Hi
>>>
>>> I am trying to figure out why the following snippet of a kernel
>>> .bbappend file does not populate the custom device tree source file
>>> in
>>> the proper location:
>>>
>>>
>>> FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
>>> SRC_URI += "\
>>> file://defconfig;name=config \
>>>
>>> file://cf200.dts;name=dts;subdir=git/arch/${ARCH}/boot/dts/freescale
>>> \
>>> "
>>>
>>> COMPATIBLE_MACHINE = "(cf200)"
>>>
>>> It also seems the configuration is not applied. If I rename the
>>> defconfig file to doesntexist the build fails early. The defconfig
>>> file
>>> does get placed within the sources-unpack folder though. Within the
>>> sources-unpack folder there is no dts file though and the dts file
>>> is
>>> as well not placed within the dts folder of the kernel build or
>>> source
>>> folder.
>>>
>>> Is it possible to modify a kernel somewhat like this? What am I
>>> doing
>>> wrong?
>>>
>>> Thanks for any hints!
>>> Dave
>>>
>>>
>>>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#64639): https://lists.yoctoproject.org/g/yocto/message/64639
> Mute This Topic: https://lists.yoctoproject.org/mt/110836825/6084445
> Group Owner: yocto+owner@lists.yoctoproject.org
> Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [skandigraun@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [yocto] kernel append file with dts in SRC_URI and subdir
2025-01-27 14:10 ` [yocto] " Gyorgy Sarvari
2025-01-27 14:33 ` David Daniel
@ 2025-01-27 14:48 ` Michael Opdenacker
1 sibling, 0 replies; 8+ messages in thread
From: Michael Opdenacker @ 2025-01-27 14:48 UTC (permalink / raw)
To: yocto, skandigraun, david.daniel; +Cc: michael.opdenacker
Hi Dave,
On 1/27/25 15:10, Gyorgy Sarvari via lists.yoctoproject.org wrote:
> Depending on the order of unpacking, it is possible that your dts file
> overwritten by the actual kernel source.
>
> Try adding it as a patch?
I agree. As far as I have seen, it's more frequent to use a patch to add
files to the sources.
>
> On 27.01.25 12:12, David Daniel via lists.yoctoproject.org wrote:
>> Hi
>>
>> I am trying to figure out why the following snippet of a kernel
>> .bbappend file does not populate the custom device tree source file in
>> the proper location:
>>
>>
>> FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
>> SRC_URI += "\
>> file://defconfig;name=config \
>> file://cf200.dts;name=dts;subdir=git/arch/${ARCH}/boot/dts/freescale \
>> "
I guess you're using "name=" for checksums, right?
Did you check that ARCH is defined here? You may try to hardcore its
value here.
Cheers
Michael.
--
Michael Opdenacker
Root Commit
Yocto Project and OpenEmbedded Training course - Learn by doing:
https://rootcommit.com/training/yocto/
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [yocto] kernel append file with dts in SRC_URI and subdir
2025-01-27 14:39 ` Gyorgy Sarvari
@ 2025-01-27 14:54 ` David Daniel
0 siblings, 0 replies; 8+ messages in thread
From: David Daniel @ 2025-01-27 14:54 UTC (permalink / raw)
To: yocto@lists.yoctoproject.org
Ah ok, it might first place the file there, then go ahead delete the
directory and rewrite it with the git checkout. That's probably the
reason why adding it as a patch does work, since there is some magic
that detects the file as a patch to apply to the checkout.
Thanks for clarifying!
Am Montag, dem 27.01.2025 um 15:39 +0100 schrieb Gyorgy Sarvari:
> For git fetcher, if the unpack directory already exists at the time
> of
> unpacking, then it first gets deleted recursively:
> https://git.yoctoproject.org/poky/tree/bitbake/lib/bb/fetch2/git.py#n660
>
> - it doesn't check if the content conflicts or not :)
>
> On 27.01.25 15:33, David Daniel via lists.yoctoproject.org wrote:
> > Ah I see. That's weird though, as the name is unique, it shouldn't
> > collide with any existing file. But adding as a patch sounds
> > reasonable. I'll try this instead and see.
> > Thanks!
> >
> > Am Montag, dem 27.01.2025 um 15:10 +0100 schrieb Gyorgy Sarvari:
> > > Depending on the order of unpacking, it is possible that your dts
> > > file
> > > overwritten by the actual kernel source.
> > >
> > > Try adding it as a patch?
> > >
> > > On 27.01.25 12:12, David Daniel via lists.yoctoproject.org wrote:
> > > > Hi
> > > >
> > > > I am trying to figure out why the following snippet of a kernel
> > > > .bbappend file does not populate the custom device tree source
> > > > file
> > > > in
> > > > the proper location:
> > > >
> > > >
> > > > FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
> > > > SRC_URI += "\
> > > > file://defconfig;name=config \
> > > >
> > > > file://cf200.dts;name=dts;subdir=git/arch/${ARCH}/boot/dts/freescale
> > > > \
> > > > "
> > > >
> > > > COMPATIBLE_MACHINE = "(cf200)"
> > > >
> > > > It also seems the configuration is not applied. If I rename the
> > > > defconfig file to doesntexist the build fails early. The
> > > > defconfig
> > > > file
> > > > does get placed within the sources-unpack folder though. Within
> > > > the
> > > > sources-unpack folder there is no dts file though and the dts
> > > > file
> > > > is
> > > > as well not placed within the dts folder of the kernel build or
> > > > source
> > > > folder.
> > > >
> > > > Is it possible to modify a kernel somewhat like this? What am I
> > > > doing
> > > > wrong?
> > > >
> > > > Thanks for any hints!
> > > > Dave
> > > >
> > > >
> > > >
> >
> > -=-=-=-=-=-=-=-=-=-=-=-
> > Links: You receive all messages sent to this group.
> > View/Reply Online (#64639):
> > https://lists.yoctoproject.org/g/yocto/message/64639
> > Mute This Topic:
> > https://lists.yoctoproject.org/mt/110836825/6084445
> > Group Owner: yocto+owner@lists.yoctoproject.org
> > Unsubscribe:
> > https://lists.yoctoproject.org/g/yocto/unsub [skandigraun@gmail.com
> > ]
> > -=-=-=-=-=-=-=-=-=-=-=-
> >
--
David Daniel
VR AG
Rütistrasse 18
8952 Schlieren
Telefon:
+41 44 738 32 07
Web: https://vrag.ch
ISO9001 zertifiziert | SWISS LABEL Mitglied | Lehrbetrieb
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [yocto] kernel append file with dts in SRC_URI and subdir
2025-01-27 11:12 kernel append file with dts in SRC_URI and subdir David Daniel
2025-01-27 14:10 ` [yocto] " Gyorgy Sarvari
@ 2025-01-27 15:02 ` Quentin Schulz
2025-01-27 16:04 ` David Daniel
1 sibling, 1 reply; 8+ messages in thread
From: Quentin Schulz @ 2025-01-27 15:02 UTC (permalink / raw)
To: yocto, david.daniel
Hi David,
On 1/27/25 12:12 PM, David Daniel via lists.yoctoproject.org wrote:
> Hi
>
> I am trying to figure out why the following snippet of a kernel
> .bbappend file does not populate the custom device tree source file in
> the proper location:
>
>
> FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
> SRC_URI += "\
> file://defconfig;name=config \
> file://cf200.dts;name=dts;subdir=git/arch/${ARCH}/boot/dts/freescale \
> "
>
You should consider putting this dts in a separate recipe, see
https://docs.yoctoproject.org/ref-manual/classes.html#devicetree for how
to do it.
> COMPATIBLE_MACHINE = "(cf200)"
>
> It also seems the configuration is not applied. If I rename the
> defconfig file to doesntexist the build fails early. The defconfig file
It depends on what the kernel recipe is doing with that defconfig. Could
also be trying to apply fragments afterwards for example. Without having
a look at the recipe, it'll be difficult to tell. You haven't said to
which recipe this bbappend is supposed to apply though and there are
many ways and many kernel recipes around :)
Cheers,
Quentin
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [yocto] kernel append file with dts in SRC_URI and subdir
2025-01-27 15:02 ` Quentin Schulz
@ 2025-01-27 16:04 ` David Daniel
0 siblings, 0 replies; 8+ messages in thread
From: David Daniel @ 2025-01-27 16:04 UTC (permalink / raw)
To: yocto@lists.yoctoproject.org
You're right, sorry, I thought it wouldn't matter much but I intended
to append to an imx kernel (linux-imx from freescale). And yes, I have
finally taken the route of a separate kernel recipe - it makes
everything easier in the end as I can now simply include the source dts
file and don't have to create a patch for it.
And you're right of course, it seems the defconfig was ignored and
instead another predefined default got caught (one I didn't override
correctly I guess).
Thanks for all this great help! Really amazing ❤️
Am Montag, dem 27.01.2025 um 16:02 +0100 schrieb Quentin Schulz:
> Hi David,
>
> On 1/27/25 12:12 PM, David Daniel via lists.yoctoproject.org wrote:
> > Hi
> >
> > I am trying to figure out why the following snippet of a kernel
> > .bbappend file does not populate the custom device tree source file
> > in
> > the proper location:
> >
> >
> > FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
> > SRC_URI += "\
> > file://defconfig;name=config \
> >
> > file://cf200.dts;name=dts;subdir=git/arch/${ARCH}/boot/dts/freescale
> > \
> > "
> >
>
> You should consider putting this dts in a separate recipe, see
> https://docs.yoctoproject.org/ref-manual/classes.html#devicetree for
> how
> to do it.
>
> > COMPATIBLE_MACHINE = "(cf200)"
> >
> > It also seems the configuration is not applied. If I rename the
> > defconfig file to doesntexist the build fails early. The defconfig
> > file
>
> It depends on what the kernel recipe is doing with that defconfig.
> Could
> also be trying to apply fragments afterwards for example. Without
> having
> a look at the recipe, it'll be difficult to tell. You haven't said to
> which recipe this bbappend is supposed to apply though and there are
> many ways and many kernel recipes around :)
>
> Cheers,
> Quentin
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2025-01-27 16:04 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-27 11:12 kernel append file with dts in SRC_URI and subdir David Daniel
2025-01-27 14:10 ` [yocto] " Gyorgy Sarvari
2025-01-27 14:33 ` David Daniel
2025-01-27 14:39 ` Gyorgy Sarvari
2025-01-27 14:54 ` David Daniel
2025-01-27 14:48 ` Michael Opdenacker
2025-01-27 15:02 ` Quentin Schulz
2025-01-27 16:04 ` David Daniel
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.