i just want some confirmation that i'm on the right track for designing a
BSP layer to handle a particular combination of kernel versions and machines,
so all i'm after is mostly a, "yeah, that's how i'd do it," or a, "no,
that's idiotic."

  the situation -- handle all possible combinations of:

  * two kernel versions (say, 4.0 and 4.1)
  * three machines:
    * m1           (based on powerpc mpc8260)
    * m2a, m2b     (two closely related machines, based on mpc8360)

the additional wrinkle there is that, although there are three machines,
two of them are closely-related enough that there is the possibility that
.scc, .cfg or .patch files could apply in the following ways.

  first, they could apply to a specific version of the kernel, or to any
version. no problem, that's easy.

  regarding machines, those patches could possibly apply to:

  * a single, specific machine
  * all machines
  * just to the mpc8360-based machines

so here's my idea.

  in a linux.inc file, have the lines:

  FILESEXTRAPATHS_prepend := "${THISDIR}/${BP}:${THISDIR}/${BPN}:"

  MACHINEOVERRIDES_prepend_m2a = "mpc8360:"
  MACHINEOVERRIDES_prepend_m2b = "mpc8360:"

that first line obviously extends my search path based on the kernel
version to look in (say, for kernel 4.0) in:

  * linux-4.0/
  * linux/

those next two lines deal with the fact that, for powerpc in this case,
with:

FILESOVERRIDES=${TRANSLATED_TARGET_ARCH}:${MACHINEOVERRIDES}:${DISTROOVERRIDES}

  TRANSLATED_TARGET_ARCH = "powerpc"
  MACHINEOVERRIDES = "machine name"

so between the two of them, i want to sneak in "mpc8360" so that the search
order is specific machine, followed by the more general "mpc8360". sound good
so far?

next, for full flexibility, i can define three .bbappend files:

  * linux_4.1.bbappend
  * linux_4.0.bbappend
  * linux_%.bbappend

since (as bruce mentioned recently), *all* matching bbappend files will
be processed in the (hopefully) intuitive order. (not sure i'll need that
wildcard .bbappend file, but i'll keep it in reserve, just in case.)

  and, ***finally***, given all of the above, i'll have three directories
for SRC_URI items:

  * linux-4.1/
  * linux-4.0/
  * linux/

where each directory will have the internal substructure:

  * m1/
  * m2a/
  * m2b/
  * mpc8360/

given all of the above, i think i've covered every conceivable possibility
for when patches might be applied. have i missed anything? is there an
easier way to do this?

rday





--
_______________________________________________
yocto mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/yocto

Reply via email to