Hi,

2018-01-29 11:37 GMT+01:00 Michael Olbrich <m.olbrich@pengutronix.de>:
Hi,

On Mon, Jan 29, 2018 at 10:51:07AM +0100, Guillermo Rodriguez Garcia wrote:
> 2018-01-26 13:58 GMT+01:00 Michael Olbrich <m.olbrich@pengutronix.de>:
> > On Fri, Jan 26, 2018 at 01:40:31PM +0100, Alexander Dahl wrote:
> > > On Fri, Jan 26, 2018 at 08:58:52AM +0100, Guillermo Rodriguez Garcia
> > wrote:
> > > > I am creating a ptxdist BSP and have a series.<platform> patchset for a
> > > > given kernel version. I have noticed that this patchset is ignored
> > when the
> > > > KERNEL_HEADER package is built -- instead, a "series" file is
> > automatically
> > > > created and used.
> > > >
> > > > Is this normal/expected? Shouldn't the series.<platform> file be used
> > > > instead?
> > >
> > > It is at least known. I stumbled over this last year:
> > >
> > > https://www.mail-archive.com/ptxdist@pengutronix.de/msg12233.html
> > >
> > > Michael gave some hints for possible workarounds.
> >
> >
> > Right, check that thread.
> >
> > Also, why do you need a 'series.<platform>' instead of a normal series
> > file?
> >
>
> I used series.<platform> because the BSP currently supports two platforms
> (two boards), and some of the patches are platform-specific.
>
>
> > And why do you need the patches for the kernel headers?
> >
>
> This is because I am building imx6 specific packages which require a set of
> kernel headers, and these must include imx6-specific bits.
>
> In the thread that Alexander mentioned in his reply you mention the
> following:
>
> 1. Move the patches to configs/platform-XXX/patches/linux-4.9.47/ and just
> use 'series'.

In most cases, that's the correct way to handle this. All platform specific
files should be in configs/platform-XXX/ anyways.

Keeping the patches Toplevel has one use-case:
Some patches are used by both platforms. I'd still move the patches to the
platforms and use symlinks to share: Patches can be in subdirs, so just on
Symlink to the common set of patches is enough.

> I guess this solves my problem, however, just out of curiosity: If the
> kernel headers package will pick up the correct patchset from
> configs/platform-XXX/patches/linux-4.9.47, shouldn't it also pick it up if
> it lives in patches/linux-4.9.47/series.XXX ?

Checking in configs/platform-XXX/patches/ is a generic PTXdist mechanism.
Using 'series.XXX' is a hack in the Kernel patches to work with bad
patches. It's a mechanism that I'd like to get rid of. But there are still
people using it.
It's not something I want to spread to other packages.

Thank you for the explanation, I know understand the background and motivations.

Still I would suggest to either get rid of the "series.XXX" hack (perhaps with a check and a warning) or make it applicable to kernel headers as well. The current behaviour is a bit surprising.

Anyway my problem is solved now so thank you again.
Guillermo Rodriguez Garcia