mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] Patch series for package per project?
@ 2022-03-03  9:17 Christian Melki
  2022-03-03 13:40 ` Michael Olbrich
  0 siblings, 1 reply; 11+ messages in thread
From: Christian Melki @ 2022-03-03  9:17 UTC (permalink / raw)
  To: ptxdist

Hi.

I want to use the same bootloader (barebox) for various projects.
But patches are slightly different. series.<project> doesn't seem to work.
Have I missed something? I just assumed that per project patch series 
for packages would be possible.
I can see that kernel can steer the use of series file name, but how 
does that work for other packages?

I can also see that there is search for various directory paths, but 
nothing regarding series.<project>?

It would be nice if I could use the same steering analogy as _alternative.

Regards,
Christian

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de


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

* Re: [ptxdist] Patch series for package per project?
  2022-03-03  9:17 [ptxdist] Patch series for package per project? Christian Melki
@ 2022-03-03 13:40 ` Michael Olbrich
  2022-03-03 14:22   ` Christian Melki
  0 siblings, 1 reply; 11+ messages in thread
From: Michael Olbrich @ 2022-03-03 13:40 UTC (permalink / raw)
  To: Christian Melki; +Cc: ptxdist

Hi,

On Thu, Mar 03, 2022 at 10:17:07AM +0100, Christian Melki wrote:
> I want to use the same bootloader (barebox) for various projects.
> But patches are slightly different. series.<project> doesn't seem to work.
> Have I missed something? I just assumed that per project patch series for
> packages would be possible.
> I can see that kernel can steer the use of series file name, but how does
> that work for other packages?
> 
> I can also see that there is search for various directory paths, but nothing
> regarding series.<project>?
> 
> It would be nice if I could use the same steering analogy as _alternative.

I'm not sure what you mean. Do you have multiple barebox packages in the
same BSP? Or something else?

Michael

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de


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

* Re: [ptxdist] Patch series for package per project?
  2022-03-03 13:40 ` Michael Olbrich
@ 2022-03-03 14:22   ` Christian Melki
  2022-03-03 17:07     ` Felix Mellmann
  0 siblings, 1 reply; 11+ messages in thread
From: Christian Melki @ 2022-03-03 14:22 UTC (permalink / raw)
  To: ptxdist



On 3/3/22 2:40 PM, Michael Olbrich wrote:
> Hi,
> 
> On Thu, Mar 03, 2022 at 10:17:07AM +0100, Christian Melki wrote:
>> I want to use the same bootloader (barebox) for various projects.
>> But patches are slightly different. series.<project> doesn't seem to work.
>> Have I missed something? I just assumed that per project patch series for
>> packages would be possible.
>> I can see that kernel can steer the use of series file name, but how does
>> that work for other packages?
>>
>> I can also see that there is search for various directory paths, but nothing
>> regarding series.<project>?
>>
>> It would be nice if I could use the same steering analogy as _alternative.
> 
> I'm not sure what you mean. Do you have multiple barebox packages in the
> same BSP? Or something else?
> 

Just one barebox version, but for different archs, with different 
patchsets. I'd like the patches to live in the same place as they've 
always done, i.e. under patches/package/...
But patches/package/series.$platform or similar does not seem to work?

Christian

> Michael
> 

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de


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

* Re: [ptxdist] Patch series for package per project?
  2022-03-03 14:22   ` Christian Melki
@ 2022-03-03 17:07     ` Felix Mellmann
  2022-03-03 19:37       ` Christian Melki
  0 siblings, 1 reply; 11+ messages in thread
From: Felix Mellmann @ 2022-03-03 17:07 UTC (permalink / raw)
  To: ptxdist

On 03.03.22 15:22, Christian Melki wrote:
>
>
> On 3/3/22 2:40 PM, Michael Olbrich wrote:
>> Hi,
>>
>> On Thu, Mar 03, 2022 at 10:17:07AM +0100, Christian Melki wrote:
>>> I want to use the same bootloader (barebox) for various projects.
>>> But patches are slightly different. series.<project> doesn't seem to 
>>> work.
>>> Have I missed something? I just assumed that per project patch 
>>> series for
>>> packages would be possible.
>>> I can see that kernel can steer the use of series file name, but how 
>>> does
>>> that work for other packages?
>>>
>>> I can also see that there is search for various directory paths, but 
>>> nothing
>>> regarding series.<project>?
>>>
>>> It would be nice if I could use the same steering analogy as 
>>> _alternative.
>>
>> I'm not sure what you mean. Do you have multiple barebox packages in the
>> same BSP? Or something else?
>>
>
> Just one barebox version, but for different archs, with different 
> patchsets. I'd like the patches to live in the same place as they've 
> always done, i.e. under patches/package/...
> But patches/package/series.$platform or similar does not seem to work?
>
Would it be an option to put the patches below each of the platformdirs?

I ran into a similiar situation when starting to migrate to a different 
CPU platform. After a couple of years putting serveral "platformconfig" 
files within the same directory as "ptxconfig" I'm now using separate 
subdirs for each platform where separate sets of platform dependent 
patches are lying.

Felix

> Christian
>
>> Michael
>>
>
> _______________________________________________
> ptxdist mailing list
> ptxdist@pengutronix.de
> To unsubscribe, send a mail with subject "unsubscribe" to 
> ptxdist-request@pengutronix.de

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de


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

* Re: [ptxdist] Patch series for package per project?
  2022-03-03 17:07     ` Felix Mellmann
@ 2022-03-03 19:37       ` Christian Melki
  2022-03-03 20:11         ` Alexander Dahl
  0 siblings, 1 reply; 11+ messages in thread
From: Christian Melki @ 2022-03-03 19:37 UTC (permalink / raw)
  To: ptxdist

On 3/3/22 18:07, Felix Mellmann wrote:
> On 03.03.22 15:22, Christian Melki wrote:
>>
>>
>> On 3/3/22 2:40 PM, Michael Olbrich wrote:
>>> Hi,
>>>
>>> On Thu, Mar 03, 2022 at 10:17:07AM +0100, Christian Melki wrote:
>>>> I want to use the same bootloader (barebox) for various projects.
>>>> But patches are slightly different. series.<project> doesn't seem to 
>>>> work.
>>>> Have I missed something? I just assumed that per project patch 
>>>> series for
>>>> packages would be possible.
>>>> I can see that kernel can steer the use of series file name, but how 
>>>> does
>>>> that work for other packages?
>>>>
>>>> I can also see that there is search for various directory paths, but 
>>>> nothing
>>>> regarding series.<project>?
>>>>
>>>> It would be nice if I could use the same steering analogy as 
>>>> _alternative.
>>>
>>> I'm not sure what you mean. Do you have multiple barebox packages in the
>>> same BSP? Or something else?
>>>
>>
>> Just one barebox version, but for different archs, with different 
>> patchsets. I'd like the patches to live in the same place as they've 
>> always done, i.e. under patches/package/...
>> But patches/package/series.$platform or similar does not seem to work?
>>
> Would it be an option to put the patches below each of the platformdirs?
> 
> I ran into a similiar situation when starting to migrate to a different 
> CPU platform. After a couple of years putting serveral "platformconfig" 
> files within the same directory as "ptxconfig" I'm now using separate 
> subdirs for each platform where separate sets of platform dependent 
> patches are lying.
> 
> Felix
> 

Hi Felix.

Thanks for the suggestion.

Ideally not. It irks me a bit that patches have to go to a different
place because they belong to another platform than the "default". Or
that they have to go somewhere else altogether because they need to be
split into platforms.
It doesn't make much sense to me.

Regards,
Christian

>> Christian
>>
>>> Michael
>>>
>>
>> _______________________________________________
>> ptxdist mailing list
>> ptxdist@pengutronix.de
>> To unsubscribe, send a mail with subject "unsubscribe" to 
>> ptxdist-request@pengutronix.de
> 
> _______________________________________________
> ptxdist mailing list
> ptxdist@pengutronix.de
> To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de


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

* Re: [ptxdist] Patch series for package per project?
  2022-03-03 19:37       ` Christian Melki
@ 2022-03-03 20:11         ` Alexander Dahl
  2022-03-03 20:35           ` Alexander Dahl
  0 siblings, 1 reply; 11+ messages in thread
From: Alexander Dahl @ 2022-03-03 20:11 UTC (permalink / raw)
  To: Christian Melki; +Cc: ptxdist


[-- Attachment #1.1: Type: text/plain, Size: 2152 bytes --]

Hello Christian,

On Thu, Mar 03, 2022 at 08:37:45PM +0100, Christian Melki wrote:
> On 3/3/22 18:07, Felix Mellmann wrote:
> > On 03.03.22 15:22, Christian Melki wrote:
> >> Just one barebox version, but for different archs, with different 
> >> patchsets. I'd like the patches to live in the same place as they've 
> >> always done, i.e. under patches/package/...
> >> But patches/package/series.$platform or similar does not seem to work?
> >>
> > Would it be an option to put the patches below each of the platformdirs?
> > 
> > I ran into a similiar situation when starting to migrate to a different 
> > CPU platform. After a couple of years putting serveral "platformconfig" 
> > files within the same directory as "ptxconfig" I'm now using separate 
> > subdirs for each platform where separate sets of platform dependent 
> > patches are lying.
> > 
> > Felix
> > 
> 
> Hi Felix.
> 
> Thanks for the suggestion.
> 
> Ideally not. It irks me a bit that patches have to go to a different
> place because they belong to another platform than the "default". Or
> that they have to go somewhere else altogether because they need to be
> split into platforms.
> It doesn't make much sense to me.

If I understand you correctly, your folder patches/barebox-2022.03.0
(or whatever common version you use) must look like this somehow, all
patches of the different series interleaved?

0001-apples.patch
0001-foo.patch
0001-this.patch
0002-bar.patch
0002-oranges.patch
0002-that.patch
0003-baz.patch
series.one
series.three
series.two

Seriously, that looks messy to me, how should anyone looking at the
directory know which patch belongs to which series without looking at
the series files?  What if someone wants to copy/move all patches
belonging to only one series to a different place?

Puzzled greetings
Alex

-- 
/"\ ASCII RIBBON | »With the first link, the chain is forged. The first
\ / CAMPAIGN     | speech censured, the first thought forbidden, the
 X  AGAINST      | first freedom denied, chains us all irrevocably.«
/ \ HTML MAIL    | (Jean-Luc Picard, quoting Judge Aaron Satie)

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

[-- Attachment #2: Type: text/plain, Size: 181 bytes --]

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de

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

* Re: [ptxdist] Patch series for package per project?
  2022-03-03 20:11         ` Alexander Dahl
@ 2022-03-03 20:35           ` Alexander Dahl
  2022-03-04  8:10             ` Michael Olbrich
  0 siblings, 1 reply; 11+ messages in thread
From: Alexander Dahl @ 2022-03-03 20:35 UTC (permalink / raw)
  To: Christian Melki, ptxdist


[-- Attachment #1.1: Type: text/plain, Size: 3117 bytes --]

Hei hei,

it's me again, I want to add some more thoughts on this. O:-)

On Thu, Mar 03, 2022 at 09:11:39PM +0100, Alexander Dahl wrote:
> Hello Christian,
> 
> On Thu, Mar 03, 2022 at 08:37:45PM +0100, Christian Melki wrote:
> > On 3/3/22 18:07, Felix Mellmann wrote:
> > > On 03.03.22 15:22, Christian Melki wrote:
> > >> Just one barebox version, but for different archs, with different 
> > >> patchsets. I'd like the patches to live in the same place as they've 
> > >> always done, i.e. under patches/package/...
> > >> But patches/package/series.$platform or similar does not seem to work?
> > >>
> > > Would it be an option to put the patches below each of the platformdirs?
> > > 
> > > I ran into a similiar situation when starting to migrate to a different 
> > > CPU platform. After a couple of years putting serveral "platformconfig" 
> > > files within the same directory as "ptxconfig" I'm now using separate 
> > > subdirs for each platform where separate sets of platform dependent 
> > > patches are lying.
> > > 
> > > Felix
> > > 
> > 
> > Hi Felix.
> > 
> > Thanks for the suggestion.
> > 
> > Ideally not. It irks me a bit that patches have to go to a different
> > place because they belong to another platform than the "default". Or
> > that they have to go somewhere else altogether because they need to be
> > split into platforms.
> > It doesn't make much sense to me.
> 
> If I understand you correctly, your folder patches/barebox-2022.03.0
> (or whatever common version you use) must look like this somehow, all
> patches of the different series interleaved?
> 
> 0001-apples.patch
> 0001-foo.patch
> 0001-this.patch
> 0002-bar.patch
> 0002-oranges.patch
> 0002-that.patch
> 0003-baz.patch
> series.one
> series.three
> series.two

Now, what if those series are not mutually exclusive, but certain
patches are part of multiple series?  Even worse: in different places,
like first patch in one, and third patch in the other series?  Each
call of `git ptx-patches` would change the file numbers in the file
names, breaking the other series?

> Seriously, that looks messy to me, how should anyone looking at the
> directory know which patch belongs to which series without looking at
> the series files?  What if someone wants to copy/move all patches
> belonging to only one series to a different place?

What I would do, and in fact I did this with patches for U-Boot for
five different boards: throw all patches into one series.  Why
separate them?  Or if that's not possible, put distinct patch series
configs/platform-XXX/patches/barebox-2022.03.0 as suggested before.

Well, there's one more possibility: put the patch series to different
top layers. ;-)

Any more possibilities?  Happy TIMTOWTDI everyone! ;-)

Greets
Alex

-- 
/"\ ASCII RIBBON | »With the first link, the chain is forged. The first
\ / CAMPAIGN     | speech censured, the first thought forbidden, the
 X  AGAINST      | first freedom denied, chains us all irrevocably.«
/ \ HTML MAIL    | (Jean-Luc Picard, quoting Judge Aaron Satie)

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

[-- Attachment #2: Type: text/plain, Size: 181 bytes --]

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de

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

* Re: [ptxdist] Patch series for package per project?
  2022-03-03 20:35           ` Alexander Dahl
@ 2022-03-04  8:10             ` Michael Olbrich
  2022-03-04  8:24               ` Christian Melki
  2022-03-04 15:16               ` Christian Melki
  0 siblings, 2 replies; 11+ messages in thread
From: Michael Olbrich @ 2022-03-04  8:10 UTC (permalink / raw)
  To: Christian Melki, ptxdist

Hi,

On Thu, Mar 03, 2022 at 09:35:36PM +0100, Alexander Dahl wrote:
> On Thu, Mar 03, 2022 at 09:11:39PM +0100, Alexander Dahl wrote:
> > On Thu, Mar 03, 2022 at 08:37:45PM +0100, Christian Melki wrote:
> > > On 3/3/22 18:07, Felix Mellmann wrote:
> > > > On 03.03.22 15:22, Christian Melki wrote:
> > > >> Just one barebox version, but for different archs, with different 
> > > >> patchsets. I'd like the patches to live in the same place as they've 
> > > >> always done, i.e. under patches/package/...
> > > >> But patches/package/series.$platform or similar does not seem to work?
> > > >>
> > > > Would it be an option to put the patches below each of the platformdirs?
> > > > 
> > > > I ran into a similiar situation when starting to migrate to a different 
> > > > CPU platform. After a couple of years putting serveral "platformconfig" 
> > > > files within the same directory as "ptxconfig" I'm now using separate 
> > > > subdirs for each platform where separate sets of platform dependent 
> > > > patches are lying.

That would be my first suggestion as well.

> > > Ideally not. It irks me a bit that patches have to go to a different
> > > place because they belong to another platform than the "default". Or
> > > that they have to go somewhere else altogether because they need to be
> > > split into platforms.
> > > It doesn't make much sense to me.

I guess that's a matter of perspective. For me, either the patch stack is
shared. Then I out it in the common directory. Or each platform has a
completely separate patch stack. Then it feels natural to have them in
separate locations in each platform.

> > If I understand you correctly, your folder patches/barebox-2022.03.0
> > (or whatever common version you use) must look like this somehow, all
> > patches of the different series interleaved?
> > 
> > 0001-apples.patch
> > 0001-foo.patch
> > 0001-this.patch
> > 0002-bar.patch
> > 0002-oranges.patch
> > 0002-that.patch
> > 0003-baz.patch
> > series.one
> > series.three
> > series.two
> 
> Now, what if those series are not mutually exclusive, but certain
> patches are part of multiple series?  Even worse: in different places,
> like first patch in one, and third patch in the other series?  Each
> call of `git ptx-patches` would change the file numbers in the file
> names, breaking the other series?

Exactly. Maintaining shared patches is a mess. When I have more patches and
especially if they are shared, then I work with a clone of the package
upstream git. I use 'ptxdist local-src' for development and then export a
full patch stack into the BSP.
If the patch stacks for multiple platforms share some patches then they are
in a shared branch in git, but in the BSP each platform has its own copy.


> > Seriously, that looks messy to me, how should anyone looking at the
> > directory know which patch belongs to which series without looking at
> > the series files?  What if someone wants to copy/move all patches
> > belonging to only one series to a different place?
> 
> What I would do, and in fact I did this with patches for U-Boot for
> five different boards: throw all patches into one series.  Why
> separate them?  Or if that's not possible, put distinct patch series
> configs/platform-XXX/patches/barebox-2022.03.0 as suggested before.

I personally don't like having unrelated and unnecessary patches in my
patchstack...

> Well, there's one more possibility: put the patch series to different
> top layers. ;-)

You could also put something like this in platforms/barebox-series.in:

config BAREBOX_SERIES
	string
	default "series${PTXDIST_PLATFORMSUFFIX}"

This will be used automatically and you have a series for each platform.
Or add a prompt and explicitly set the series filename.

Michael

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de


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

* Re: [ptxdist] Patch series for package per project?
  2022-03-04  8:10             ` Michael Olbrich
@ 2022-03-04  8:24               ` Christian Melki
  2022-03-04 15:16               ` Christian Melki
  1 sibling, 0 replies; 11+ messages in thread
From: Christian Melki @ 2022-03-04  8:24 UTC (permalink / raw)
  To: Michael Olbrich; +Cc: ptxdist



On 3/4/22 9:10 AM, Michael Olbrich wrote:
> Hi,
> 
> On Thu, Mar 03, 2022 at 09:35:36PM +0100, Alexander Dahl wrote:
>> On Thu, Mar 03, 2022 at 09:11:39PM +0100, Alexander Dahl wrote:
>>> On Thu, Mar 03, 2022 at 08:37:45PM +0100, Christian Melki wrote:
>>>> On 3/3/22 18:07, Felix Mellmann wrote:
>>>>> On 03.03.22 15:22, Christian Melki wrote:
>>>>>> Just one barebox version, but for different archs, with different
>>>>>> patchsets. I'd like the patches to live in the same place as they've
>>>>>> always done, i.e. under patches/package/...
>>>>>> But patches/package/series.$platform or similar does not seem to work?
>>>>>>
>>>>> Would it be an option to put the patches below each of the platformdirs?
>>>>>
>>>>> I ran into a similiar situation when starting to migrate to a different
>>>>> CPU platform. After a couple of years putting serveral "platformconfig"
>>>>> files within the same directory as "ptxconfig" I'm now using separate
>>>>> subdirs for each platform where separate sets of platform dependent
>>>>> patches are lying.
> 
> That would be my first suggestion as well.
> 
>>>> Ideally not. It irks me a bit that patches have to go to a different
>>>> place because they belong to another platform than the "default". Or
>>>> that they have to go somewhere else altogether because they need to be
>>>> split into platforms.
>>>> It doesn't make much sense to me.
> 
> I guess that's a matter of perspective. For me, either the patch stack is
> shared. Then I out it in the common directory. Or each platform has a
> completely separate patch stack. Then it feels natural to have them in
> separate locations in each platform.
> 

It is a matter of perspective and taste.
I prefer patches not scattered everywhere.
Ideally a structure at one point in a tree.
I don't like chasing:
"Where did this come from? Oh. Someone placed something somewhere else 
too.", as in other unnamed environments.

>>> If I understand you correctly, your folder patches/barebox-2022.03.0
>>> (or whatever common version you use) must look like this somehow, all
>>> patches of the different series interleaved?
>>>
>>> 0001-apples.patch
>>> 0001-foo.patch
>>> 0001-this.patch
>>> 0002-bar.patch
>>> 0002-oranges.patch
>>> 0002-that.patch
>>> 0003-baz.patch
>>> series.one
>>> series.three
>>> series.two
>>
>> Now, what if those series are not mutually exclusive, but certain
>> patches are part of multiple series?  Even worse: in different places,
>> like first patch in one, and third patch in the other series?  Each
>> call of `git ptx-patches` would change the file numbers in the file
>> names, breaking the other series?
> 
> Exactly. Maintaining shared patches is a mess. When I have more patches and
> especially if they are shared, then I work with a clone of the package
> upstream git. I use 'ptxdist local-src' for development and then export a
> full patch stack into the BSP.
> If the patch stacks for multiple platforms share some patches then they are
> in a shared branch in git, but in the BSP each platform has its own copy.
> 
> 
>>> Seriously, that looks messy to me, how should anyone looking at the
>>> directory know which patch belongs to which series without looking at
>>> the series files?  What if someone wants to copy/move all patches
>>> belonging to only one series to a different place?
>>

Preferably not dumped like that no.
If I could, a directory structure would be nice.

>> What I would do, and in fact I did this with patches for U-Boot for
>> five different boards: throw all patches into one series.  Why
>> separate them?  Or if that's not possible, put distinct patch series
>> configs/platform-XXX/patches/barebox-2022.03.0 as suggested before.
> 
> I personally don't like having unrelated and unnecessary patches in my
> patchstack...
> 
>> Well, there's one more possibility: put the patch series to different
>> top layers. ;-)
> 
> You could also put something like this in platforms/barebox-series.in:
> 
> config BAREBOX_SERIES
> 	string
> 	default "series${PTXDIST_PLATFORMSUFFIX}"
>  > This will be used automatically and you have a series for each platform.
> Or add a prompt and explicitly set the series filename.
> 

Sure. I could copy the kernel handling.
But I'd prefer if that also could go away for a more generic handling.
Ie, kernel has this. If I give barebox this, it would be just cluttering.

Regards,
Christian

> Michael
> 

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de


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

* Re: [ptxdist] Patch series for package per project?
  2022-03-04  8:10             ` Michael Olbrich
  2022-03-04  8:24               ` Christian Melki
@ 2022-03-04 15:16               ` Christian Melki
  2022-03-04 15:34                 ` Michael Olbrich
  1 sibling, 1 reply; 11+ messages in thread
From: Christian Melki @ 2022-03-04 15:16 UTC (permalink / raw)
  To: Michael Olbrich; +Cc: ptxdist



On 3/4/22 9:10 AM, Michael Olbrich wrote:
> Hi,
> 
> On Thu, Mar 03, 2022 at 09:35:36PM +0100, Alexander Dahl wrote:
>> On Thu, Mar 03, 2022 at 09:11:39PM +0100, Alexander Dahl wrote:
>>> On Thu, Mar 03, 2022 at 08:37:45PM +0100, Christian Melki wrote:
>>>> On 3/3/22 18:07, Felix Mellmann wrote:
>>>>> On 03.03.22 15:22, Christian Melki wrote:
>>>>>> Just one barebox version, but for different archs, with different
>>>>>> patchsets. I'd like the patches to live in the same place as they've
>>>>>> always done, i.e. under patches/package/...
>>>>>> But patches/package/series.$platform or similar does not seem to work?
>>>>>>
>>>>> Would it be an option to put the patches below each of the platformdirs?
>>>>>
>>>>> I ran into a similiar situation when starting to migrate to a different
>>>>> CPU platform. After a couple of years putting serveral "platformconfig"
>>>>> files within the same directory as "ptxconfig" I'm now using separate
>>>>> subdirs for each platform where separate sets of platform dependent
>>>>> patches are lying.
> 
> That would be my first suggestion as well.
> 

Hm. My ptxdist setup seems to point to the bin/patches before 
projects/projectname/patches directory if i print the PATH_PATCHES 
variable. Default afaik?

And it doesn't continue if patches are available in some other directory.
So if I have generic patches in bin/patches, or if I want them 
overridden it won't work?

I must have missed something? How is this supposed to work?

>>>> Ideally not. It irks me a bit that patches have to go to a different
>>>> place because they belong to another platform than the "default". Or
>>>> that they have to go somewhere else altogether because they need to be
>>>> split into platforms.
>>>> It doesn't make much sense to me.
> 
> I guess that's a matter of perspective. For me, either the patch stack is
> shared. Then I out it in the common directory. Or each platform has a
> completely separate patch stack. Then it feels natural to have them in
> separate locations in each platform.
> 
>>> If I understand you correctly, your folder patches/barebox-2022.03.0
>>> (or whatever common version you use) must look like this somehow, all
>>> patches of the different series interleaved?
>>>
>>> 0001-apples.patch
>>> 0001-foo.patch
>>> 0001-this.patch
>>> 0002-bar.patch
>>> 0002-oranges.patch
>>> 0002-that.patch
>>> 0003-baz.patch
>>> series.one
>>> series.three
>>> series.two
>>
>> Now, what if those series are not mutually exclusive, but certain
>> patches are part of multiple series?  Even worse: in different places,
>> like first patch in one, and third patch in the other series?  Each
>> call of `git ptx-patches` would change the file numbers in the file
>> names, breaking the other series?
> 
> Exactly. Maintaining shared patches is a mess. When I have more patches and
> especially if they are shared, then I work with a clone of the package
> upstream git. I use 'ptxdist local-src' for development and then export a
> full patch stack into the BSP.
> If the patch stacks for multiple platforms share some patches then they are
> in a shared branch in git, but in the BSP each platform has its own copy.
> 
> 
>>> Seriously, that looks messy to me, how should anyone looking at the
>>> directory know which patch belongs to which series without looking at
>>> the series files?  What if someone wants to copy/move all patches
>>> belonging to only one series to a different place?
>>
>> What I would do, and in fact I did this with patches for U-Boot for
>> five different boards: throw all patches into one series.  Why
>> separate them?  Or if that's not possible, put distinct patch series
>> configs/platform-XXX/patches/barebox-2022.03.0 as suggested before.
> 
> I personally don't like having unrelated and unnecessary patches in my
> patchstack...
> 
>> Well, there's one more possibility: put the patch series to different
>> top layers. ;-)
> 
> You could also put something like this in platforms/barebox-series.in:
> 
> config BAREBOX_SERIES
> 	string
> 	default "series${PTXDIST_PLATFORMSUFFIX}"
> 
> This will be used automatically and you have a series for each platform.
> Or add a prompt and explicitly set the series filename.
> 
> Michael
> 

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de


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

* Re: [ptxdist] Patch series for package per project?
  2022-03-04 15:16               ` Christian Melki
@ 2022-03-04 15:34                 ` Michael Olbrich
  0 siblings, 0 replies; 11+ messages in thread
From: Michael Olbrich @ 2022-03-04 15:34 UTC (permalink / raw)
  To: Christian Melki; +Cc: ptxdist

On Fri, Mar 04, 2022 at 04:16:23PM +0100, Christian Melki wrote:
> On 3/4/22 9:10 AM, Michael Olbrich wrote:
> > On Thu, Mar 03, 2022 at 09:35:36PM +0100, Alexander Dahl wrote:
> > > On Thu, Mar 03, 2022 at 09:11:39PM +0100, Alexander Dahl wrote:
> > > > On Thu, Mar 03, 2022 at 08:37:45PM +0100, Christian Melki wrote:
> > > > > On 3/3/22 18:07, Felix Mellmann wrote:
> > > > > > On 03.03.22 15:22, Christian Melki wrote:
> > > > > > > Just one barebox version, but for different archs, with different
> > > > > > > patchsets. I'd like the patches to live in the same place as they've
> > > > > > > always done, i.e. under patches/package/...
> > > > > > > But patches/package/series.$platform or similar does not seem to work?
> > > > > > > 
> > > > > > Would it be an option to put the patches below each of the platformdirs?
> > > > > > 
> > > > > > I ran into a similiar situation when starting to migrate to a different
> > > > > > CPU platform. After a couple of years putting serveral "platformconfig"
> > > > > > files within the same directory as "ptxconfig" I'm now using separate
> > > > > > subdirs for each platform where separate sets of platform dependent
> > > > > > patches are lying.
> > 
> > That would be my first suggestion as well.
> > 
> 
> Hm. My ptxdist setup seems to point to the bin/patches before
> projects/projectname/patches directory if i print the PATH_PATCHES variable.
> Default afaik?
> 
> And it doesn't continue if patches are available in some other directory.
> So if I have generic patches in bin/patches, or if I want them overridden it
> won't work?
> 
> I must have missed something? How is this supposed to work?

So I'm not sure, what you mean by bin/patches and
projects/projectname/patches, so I'll explain the search order in general.

I'll refer to the Toplevel directory of the BSP as 'bsp/'. That's the
directory you're in when ptxdist is called. Then there is the directory
where your platformconfig is located. That's typically
'bsp/configs/platform-foo/'. And of course there is PTXdist itself. I'll
use 'ptxdist/' for that.

When ptxdist searches for patches then it goes through a list of
directories and picks the first one that's found. For historical reasons
the order looks like this (for package bar-1.0):

bsp/patches/bar-1.0/
bsp/configs/platform-foo/patches/bar-1.0/

And if there are any layers:

base/bsp/patches/bar-1.0/
base/bsp/configs/platform-foo/patches/bar-1.0/

Repeat this by adding another base/ in each loop.
And finally:

ptxdist/patches/bar-1.0/

So if you want a default patch stack for multiple platforms, then put the
default in base/bsp/patches/bar-1.0/. Then you can overwrite it in on
platform with bsp/configs/platform-foo/patches/bar-1.0/.

Michael

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de


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

end of thread, other threads:[~2022-03-04 15:34 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-03  9:17 [ptxdist] Patch series for package per project? Christian Melki
2022-03-03 13:40 ` Michael Olbrich
2022-03-03 14:22   ` Christian Melki
2022-03-03 17:07     ` Felix Mellmann
2022-03-03 19:37       ` Christian Melki
2022-03-03 20:11         ` Alexander Dahl
2022-03-03 20:35           ` Alexander Dahl
2022-03-04  8:10             ` Michael Olbrich
2022-03-04  8:24               ` Christian Melki
2022-03-04 15:16               ` Christian Melki
2022-03-04 15:34                 ` Michael Olbrich

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