layers and adding a new system
Patrick Venture
venture at google.com
Sat Sep 2 05:35:46 AEST 2017
Chris;
I think this is valuable to point out -- and especially the value of
MACHINE_OVERRIDES. Because Google is building OpenBMC from a single
bblayer file, all the recipes we pickup need specific overrides. So
it might be worth emphasizing the danger a little more that even
things in a separate folder that is machine specific may get picked up
depending on how things are organized.
On Fri, Sep 1, 2017 at 10:27 AM, Chris Austen <austenc at us.ibm.com> wrote:
> As the popularity of OpenBMC grows the project will hopefully find itself
> with additional pull requests to support more systems. As I did when I first
> started out you could easily be allured to simply copy/past the entire
> contents of a similar system under meta-openbmc-machines/... and call it
> your own. However scale that to anything greater then a few machines and the
> shier volume of duplicate code will become bulky and unmanageable. Yocto
> recognized this as an issue and has provided support to reduce. I would like
> to build a list of recommendations on how to add new hardware in to the
> OpenBMC Project.
>
>
> For hardware based on a similar design this is...
>
> Not good
> ========
> meta-mfg/meta-redfish/
> meta-mfg/meta-bluefish/
> meta-mfg/meta-yellowfish/
> meta-mfg/meta-greenfish/
>
>
> Good
> ========
> meta-mfg/meta-fish/
>
>
> So how can you do that? With a single variable in your local.conf...
> MACHINE. You change the MACHINE variable per system type but let default and
> use the base platform for common items.
>
> MACHINE = "bluefish"
>
> A bbappend that are specific to the bluefish system you append the _bluefish
>
> FILESEXTRAPATHS_prepend_bluefish := "${THISDIR}/${PN}:"
> SRC_URI_append_bluefish = " file://0001-blueworms.patch"
>
> A bbappend that make a common change to all of the fish type. This means
> anyone adding the meta-fish layer gets this bbappend and the rainbowworms.
>
> FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
> SRC_URI_append = " file://0001-rainbowworms.patch"
>
> Machine and default are all good until If you use a bluefish system but you
> have a company policy use the MACHINEOVERRIDES variable
>
> FILESEXTRAPATHS_prepend_orgXfis := "${THISDIR}/${PN}:"
> SRC_URI_append_orgXfis = " file://0001-blueXworms.patch"
>
> Note yocto matches and runs every hit. That means if you add a default,
> machine and machine override in the same bbappend, you get all three files.
> So use with caution...
>
> FILESEXTRAPATHS_prepend_orgXfis := "${THISDIR}/${PN}:"
> SRC_URI_append_orgXfis = " file://0001-blueXworms.patch"
> SRC_URI_append = " file://0001-rainbowworms.patch"
> SRC_URI_append_bluefish = " file://0001-blueworms.patch"
>
> $ ls
> 0001-blueXworms.patch
> 0001-rainbowworms.patch
> 0001-blueworms.patch
>
>
> TBD.. need to add example of something being added, replaced and kernel
> device tree needs.
>
>
> Thoughts?
There is an effort to write up some system component bring-up with
OpenBMC, that's already had some results -- configuring LEDs. By
adding something, are you referring to adding a new system's
configuration or a new package to OpenBMC?
>
>
>
> Chris Austen
>
More information about the openbmc
mailing list