[yocto] how to organize my patches for multiple kernels and multiple target boards?

Robert P. J. Day rpjday at crashcourse.ca
Mon Feb 29 15:19:12 PST 2016


   (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.

rday






More information about the yocto mailing list