How are meta-plnx-generated and meta-user related in PetaLinux 2019.1?



This post lists how meta-plnx-generated and meta-user are related. It's intended to show how meta-user is able to specialize meta-plnx-generated files, i.e. how users are intended to extend the autogenerated files produced by PetaLinux Tools.



The following files in a BSP are used to add the .bb and .bbappend files in the meta-plnx-generated and meta-user directories:


meta-plnx-generated's layer.conf from ZCU102 BSP which adds BBFILES


~/plxprjs/xilinx-zcu102-2019.1/project-spec/meta-plnx-generated/conf/layer.conf

# We have a conf and classes directory, add to BBPATH
BBPATH .= ":${LAYERDIR}"

# We have recipes-* directories, add to BBFILES
BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
            ${LAYERDIR}/recipes-*/*/*.bbappend"

BBFILE_COLLECTIONS += "meta-plnx-generated"
BBFILE_PATTERN_meta-plnx-generated = "^${LAYERDIR}/"
BBFILE_PRIORITY_meta-plnx-generated = "6"

LAYERDEPENDS_meta-plnx-generated = "core"
LAYERSERIES_COMPAT_meta-plnx-generated = "thud"

meta-user's layer.conf from ZCU102 BSP which adds BBFILES


Note: This allows users to add their own layers t the generated files.


~/plxprjs/xilinx-zcu102-2019.1/project-spec/meta-user/conf/layer.conf

# We have a conf and classes directory, add to BBPATH
BBPATH .= ":${LAYERDIR}"

# We have recipes-* directories, add to BBFILES
BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
	${LAYERDIR}/recipes-*/*/*.bbappend"

BBFILE_COLLECTIONS += "meta-user"
BBFILE_PATTERN_meta-user = "^${LAYERDIR}/"
BBFILE_PRIORITY_meta-user = "6"
LAYERSERIES_COMPAT_meta-user = "thud"

LAYERDIR comes from a list that originates in the PetaLinux Tools build:


Origin of conf/bblayers.conf in a BSP's Build Dir


Note: "The bblayers.conf file tells BitBake what layers you want considered during the build."


find ~/petalinux -name bblayers.conf

/home/demo/petalinux/2019.1/components/yocto/source/aarch64/conf/bblayers.conf

/home/demo/petalinux/2019.1/components/yocto/source/aarch64/layers/core/bitbake/lib/layerindexlib/tests/testdata/build/conf/bblayers.conf

/home/demo/petalinux/2019.1/components/yocto/source/microblaze_full/conf/bblayers.conf

/home/demo/petalinux/2019.1/components/yocto/source/microblaze_full/layers/core/bitbake/lib/layerindexlib/tests/testdata/build/conf/bblayers.conf

/home/demo/petalinux/2019.1/components/yocto/source/microblaze_lite/conf/bblayers.conf

/home/demo/petalinux/2019.1/components/yocto/source/microblaze_lite/layers/core/bitbake/lib/layerindexlib/tests/testdata/build/conf/bblayers.conf

/home/demo/petalinux/2019.1/components/yocto/source/arm/conf/bblayers.conf

/home/demo/petalinux/2019.1/components/yocto/source/arm/layers/core/bitbake/lib/layerindexlib/tests/testdata/build/conf/bblayers.conf


/home/demo/petalinux/2019.1/components/yocto/source/aarch64/conf/bblayers.conf

# WARNING: this configuration has been automatically generated and in
# most cases should not be edited. If you need more flexibility than
# this configuration provides, it is strongly suggested that you set
# up a proper instance of the full build system and use that instead.

LCONF_VERSION = "7"

BBPATH = "${TOPDIR}"
SDKBASEMETAPATH = "${TOPDIR}"
BBLAYERS := " \
    ${SDKBASEMETAPATH}/layers/core/meta \
    ${SDKBASEMETAPATH}/layers/core/meta-poky \
    ${SDKBASEMETAPATH}/layers/meta-openembedded/meta-perl \
    ${SDKBASEMETAPATH}/layers/meta-openembedded/meta-python \
    ${SDKBASEMETAPATH}/layers/meta-openembedded/meta-filesystems \
    ${SDKBASEMETAPATH}/layers/meta-openembedded/meta-gnome \
    ${SDKBASEMETAPATH}/layers/meta-openembedded/meta-multimedia \
    ${SDKBASEMETAPATH}/layers/meta-openembedded/meta-networking \
    ${SDKBASEMETAPATH}/layers/meta-openembedded/meta-webserver \
    ${SDKBASEMETAPATH}/layers/meta-openembedded/meta-xfce \
    ${SDKBASEMETAPATH}/layers/meta-openembedded/meta-initramfs \
    ${SDKBASEMETAPATH}/layers/meta-openembedded/meta-oe \
    ${SDKBASEMETAPATH}/layers/meta-browser \
    ${SDKBASEMETAPATH}/layers/meta-qt5 \
    ${SDKBASEMETAPATH}/layers/meta-xilinx/meta-xilinx-bsp \
    ${SDKBASEMETAPATH}/layers/meta-xilinx/meta-xilinx-contrib \
    ${SDKBASEMETAPATH}/layers/meta-xilinx-tools \
    ${SDKBASEMETAPATH}/layers/meta-petalinux \
    ${SDKBASEMETAPATH}/layers/meta-virtualization \
    ${SDKBASEMETAPATH}/layers/meta-openamp \
    ${SDKBASEMETAPATH}/workspace \
    "


...and gets updated and modified during a petalinux-create:


bblayers.conf After Adding meta-plnx-generated and meta-user


find ~/plxprjs/xilinx-zcu102-2019.1 -name bblayers.conf

/home/demo/plxprjs/xilinx-zcu102-2019.1/build/conf/bblayers.conf

# WARNING: this configuration has been automatically generated and in
# most cases should not be edited. If you need more flexibility than
# this configuration provides, it is strongly suggested that you set
# up a proper instance of the full build system and use that instead.

LCONF_VERSION = "7"

BBPATH = "${TOPDIR}"
SDKBASEMETAPATH = "/home/demo/petalinux/2019.1/components/yocto/source/aarch64"
BBLAYERS := " \
  ${SDKBASEMETAPATH}/layers/core/meta \
  ${SDKBASEMETAPATH}/layers/core/meta-poky \
  ${SDKBASEMETAPATH}/layers/meta-openembedded/meta-perl \
  ${SDKBASEMETAPATH}/layers/meta-openembedded/meta-python \
  ${SDKBASEMETAPATH}/layers/meta-openembedded/meta-filesystems \
  ${SDKBASEMETAPATH}/layers/meta-openembedded/meta-gnome \
  ${SDKBASEMETAPATH}/layers/meta-openembedded/meta-multimedia \
  ${SDKBASEMETAPATH}/layers/meta-openembedded/meta-networking \
  ${SDKBASEMETAPATH}/layers/meta-openembedded/meta-webserver \
  ${SDKBASEMETAPATH}/layers/meta-openembedded/meta-xfce \
  ${SDKBASEMETAPATH}/layers/meta-openembedded/meta-initramfs \
  ${SDKBASEMETAPATH}/layers/meta-openembedded/meta-oe \
  ${SDKBASEMETAPATH}/layers/meta-browser \
  ${SDKBASEMETAPATH}/layers/meta-qt5 \
  ${SDKBASEMETAPATH}/layers/meta-xilinx/meta-xilinx-bsp \
  ${SDKBASEMETAPATH}/layers/meta-xilinx/meta-xilinx-contrib \
  ${SDKBASEMETAPATH}/layers/meta-xilinx-tools \
  ${SDKBASEMETAPATH}/layers/meta-petalinux \
  ${SDKBASEMETAPATH}/layers/meta-virtualization \
  ${SDKBASEMETAPATH}/layers/meta-openamp \
  ${SDKBASEMETAPATH}/workspace \
  /home/demo/plxprjs/xilinx-zcu102-2019.1/project-spec/meta-plnx-generated \
  /home/demo/plxprjs/xilinx-zcu102-2019.1/project-spec/meta-user \
  "


cookerdata.py then uses this list to set LAYERDIR


Where does LAYERDIR get set?


/home/demo/petalinux/2019.1/components/yocto/source/aarch64/layers/core/bitbake/lib/bb/cookerdata.py


Heavily excerpted:

           layers = (data.getVar('BBLAYERS') or "").split()
            for layer in layers:
                data.setVar('LAYERDIR', layer)

An example of the files recipes-*/*/ resolve to from layer.conf


BBFILES Concatnation


ls /home/demo/plxprjs/xilinx-zcu102-2019.1/project-spec/meta-user/recipes-*/*/

home/demo/plxprjs/xilinx-zcu102-2019.1/project-spec/meta-user/recipes-apps/gpio-demo/:
files  gpio-demo.bb

/home/demo/plxprjs/xilinx-zcu102-2019.1/project-spec/meta-user/recipes-apps/peekpoke/:
files  peekpoke.bb

/home/demo/plxprjs/xilinx-zcu102-2019.1/project-spec/meta-user/recipes-bsp/device-tree/:
device-tree.bbappend  files

/home/demo/plxprjs/xilinx-zcu102-2019.1/project-spec/meta-user/recipes-bsp/u-boot/:
files  u-boot-xlnx_%.bbappend

/home/demo/plxprjs/xilinx-zcu102-2019.1/project-spec/meta-user/recipes-core/images/:
petalinux-image-full.bbappend

/home/demo/plxprjs/xilinx-zcu102-2019.1/project-spec/meta-user/recipes-kernel/linux/:
linux-xlnx  linux-xlnx_%.bbappend

ls /home/demo/plxprjs/xilinx-zcu102-2019.1/project-spec/meta-plnx-generated/recipes-*/*/

/home/demo/plxprjs/xilinx-zcu102-2019.1/project-spec/meta-plnx-generated/recipes-bsp/arm-trusted-firmware/:
arm-trusted-firmware_%.bbappend

/home/demo/plxprjs/xilinx-zcu102-2019.1/project-spec/meta-plnx-generated/recipes-bsp/device-tree/:
device-tree.bbappend

/home/demo/plxprjs/xilinx-zcu102-2019.1/project-spec/meta-plnx-generated/recipes-bsp/fsbl/:
files  fsbl_%.bbappend

/home/demo/plxprjs/xilinx-zcu102-2019.1/project-spec/meta-plnx-generated/recipes-bsp/pmu-firmware/:
pmu-firmware_%.bbappend

/home/demo/plxprjs/xilinx-zcu102-2019.1/project-spec/meta-plnx-generated/recipes-bsp/u-boot/:
configs  u-boot-xlnx_%.bbappend

/home/demo/plxprjs/xilinx-zcu102-2019.1/project-spec/meta-plnx-generated/recipes-core/busybox/:
busybox_1.%.bbappend  files

/home/demo/plxprjs/xilinx-zcu102-2019.1/project-spec/meta-plnx-generated/recipes-core/images/:
petalinux-user-image.bb

/home/demo/plxprjs/xilinx-zcu102-2019.1/project-spec/meta-plnx-generated/recipes-core/init-ifupdown/:
files  init-ifupdown_%.bbappend

/home/demo/plxprjs/xilinx-zcu102-2019.1/project-spec/meta-plnx-generated/recipes-kernel/linux/:
configs  linux-xlnx_%.bbappend


References


69 views0 comments

Recent Posts

See All

©2018 by Centennial Software Solutions LLC. Proudly created with Wix.com