From: Bruce Ashfield <bruce.ashfield@windriver.com>
To: "Robert P. J. Day" <rpjday@crashcourse.ca>, <yocto@yoctoproject.org>
Subject: Re: how to organize my patches for multiple kernels and multiple target boards?
Date: Tue, 1 Mar 2016 00:36:10 -0500 [thread overview]
Message-ID: <56D52A4A.8030300@windriver.com> (raw)
In-Reply-To: <20160229181912.2795661i683s2v40@astoria.ccjclearline.com>
On 2016-02-29 6:19 PM, Robert P. J. Day wrote:
> (i posted a much lengthier version of this on oe-core recently, but i
> want
> to cut it down and ask specific questions to clarify what i *think* is
> going
> on.)
>
> i want to pull in an existing layer with recipes for linux-4.0.bb and
> linux-4.1.bb, and extend them with .bbappend files, to support two
> closely-related
> machines i'm defining -- call them "mach1" and "mach2". AFAICT, my
> patches will
> fall somewhere in a 3x3 matrix of possibilities:
>
> * 3 possibilities of applying against mach1, mach2 or both
> * 3 possibilities of applying against linux-4.0, linux-4.1 or both
>
> so there's my 3x3 matrix.
>
> the obvious kernel recipe directory structure would be:
>
> linux/
> linux-4.0.bbappend
> linux-4.1.bbappend
> linux-4.0/ [4.0-specific patches]
> linux-4.1/ [4.1-specific patches]
> linux/ [patches that apply to both]
>
> which suggests that both my .bbappend files would have to contain the line:
>
> FILESEXTRAPATHS_prepend := "${THISDIR}/${BP}:${THISDIR}/${BPN}"
>
> so the SRC_URI search path for linux-4.0.bbappend entries would be
> prepended with:
>
> * linux-4.0/ [4.0-specific patches]
> * linux/ [patches that apply to both]
>
> and similarly for linux.4.1.bbappend. how am i doing so far? this would
> mean that, for each recipe, the more specific directory would be searched
> before the general directory. but wait ... there's more.
>
> now i want to further categorize patches based on exclusive to mach1,
> exclusive to mach2, or applicable to both, and since the machine name is
> one of the entries in FILESOVERRIDES, i can extend the directory structure
> as:
>
> linux-4.0/
> mach1/
> mach2/
> linux-4.1/
> mach1/
> mach2/
> linux/
> mach1/
> mach2/
>
> and there's my 3x3 matrix of patches, correct? and here's where it gets
> unclear.
>
> i really don't want to have to number all my patches with prefixes like
> 0001-, 0002- and so on, so what is the ordering of processing for .scc,
> .cfg and .patch/.diff files? rather than just lump all the patches into
> a single .scc file, i want to refine the patches across multiple .scc
> files. is there an imposed order on SRC_URI entries, .scc files and so
> on? that's probably all i need to finish this off.
No matter what you method you choose, ordering is as they appear in the
SRC_URI (and normal variable evaluation rules apply)/.
Having maintained more than a few kernel's, my warning is that depending
on your patches, the advantages of mixing version independent patches
with version specific (and board ones) can end up causing a lot of extra
work and maintenance pain. It of course all comes down to what parts of
the kernel they touch, but assuming a normal set of patches you'll find
that you end up tweaking things for order, and then moving patches into
version/board specific places, etc. In particular if you update the base
kernel's to have things like -stable, or other patches that touch lots
of code.
Outside of the kernel version handling (see my warning above), managing
the patches by the SRC_URI works, as would .scc files. Since the entire
point of .scc files is to define a board entry point (the top level .scc
file), and then have it include common patches, configs, etc, all from
that file.
There is another alternative to that management of patches/configs/boards,
and you can create a kernel-cache directory and refer to it on the
SRC_URI. In master, that's how all the boards and patches are managed.
Cheers,
Bruce
>
> rday
>
>
>
prev parent reply other threads:[~2016-03-01 5:36 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-29 23:19 how to organize my patches for multiple kernels and multiple target boards? Robert P. J. Day
2016-03-01 0:05 ` Andrea Adami
2016-03-01 10:44 ` Robert P. J. Day
2016-03-01 14:21 ` Bruce Ashfield
2016-03-01 20:19 ` Robert P. J. Day
2016-03-02 5:40 ` Bruce Ashfield
2016-03-02 15:41 ` Robert P. J. Day
2016-03-02 21:46 ` Bruce Ashfield
2016-03-01 5:36 ` Bruce Ashfield [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=56D52A4A.8030300@windriver.com \
--to=bruce.ashfield@windriver.com \
--cc=rpjday@crashcourse.ca \
--cc=yocto@yoctoproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.