[oe] how to create a new layer

Richard Cagley rcagley at gmail.com
Wed May 21 20:05:41 UTC 2014


On Wed, May 21, 2014 at 12:26 PM, Robert Calhoun
<rcalhoun at shotspotter.com> wrote:
>
>
> On 5/21/14 2:26 PM, "Richard Cagley" <rcagley at gmail.com> wrote:
>
>>I'd like to create a new machine that inherits from an existing
>>machine. What's the easiest way to do this?
>>
>>Looking through the yocto documentation I see "yocot-bsp create" but I
>>don't seem to have that executable. Do I need to use this or is there
>>an alternate method?
>
> The script is in: poky/scripts/yocto-bsp
>
> You don't really need it. The script creates a directory structure for you
> and generates some files, but there is nothing magical about it; you can
> create those manually using the meta-yocto-bsp layer as an example.
> Machine configs are in poky/meta-yocto-bsp/conf/machine.
>
> To make bitbake use your new layer:
> a) add your layer to poky/build/conf/bblayers.conf so that that bitbake
> knows what directories to search
> b) set your machine name in poky/build/conf/local.conf
>
> I would recommend putting your own layer into git (or scm of choice).
> Switching branches on poky will make the build fail if your .bbappends no
> longer match up with recipes in oe-core, so it's helpful to be able to
> switch between e.g. "a version of my layer that works with branch daisy"
> and "a version of my layer that works with branch master".
>
> Rob Calhoun
>
oh, I don't think I'm using poky so I guess that's the reason I didn't
find yocto-bsp

I'm using oe-core/meta-xilinx and for testing I've created a new test
layer "meta-me" so my bblayers looks like this

BBLAYERS ?= " \
  /home/rcagley/oe-zed-gcc-min/openembedded-core/meta \
  /home/rcagley/oe-zed-gcc-min/meta-xilinx \
  /home/rcagley/oe-zed-gcc-min/meta-oe/meta-oe \
  /home/rcagley/oe-zed-gcc-min/meta-me \
  "

In my local.conf I have
MACHINE ??= "zedboard-zynq7"

My current main goal is to make my build consume a .bbappend file I
have in meta-me/recipes-kernel/linux.

1.) What is the minimum set of files I need to do this? I'd guess at
least meta-me/conf/local.conf. Anything else?
2.) Do I need to change the machine name? If so, how to I inherit
zedboard-zynq7?

The yocto manuals talk to creating a new layer, but I'm less clear on
how to basically inherit everything.

BTW, thanks for the tip about git/matching branches. That's a good idea.



More information about the Openembedded-devel mailing list