From 2ac65d61247df0f984b4c4989c4a480d8d51051f Mon Sep 17 00:00:00 2001 From: Hannu Lyytinen Date: Fri, 22 Mar 2024 10:02:33 +0200 Subject: [PATCH] Configure layers with fragments Signed-off-by: Hannu Lyytinen --- yocto/conf/layers/extra.conf | 4 ++++ .../layers/machine/vm-raspberrypi4-64.conf | 1 + yocto/setup.sh | 18 ++++-------------- 3 files changed, 9 insertions(+), 14 deletions(-) create mode 100644 yocto/conf/layers/extra.conf create mode 100644 yocto/conf/layers/machine/vm-raspberrypi4-64.conf diff --git a/yocto/conf/layers/extra.conf b/yocto/conf/layers/extra.conf new file mode 100644 index 0000000..8d2be86 --- /dev/null +++ b/yocto/conf/layers/extra.conf @@ -0,0 +1,4 @@ +BBLAYERS += "${LAYERS_ROOT}/meta-sel4" +BBLAYERS += "${LAYERS_ROOT}/meta-openembedded/meta-oe" +BBLAYERS += "${LAYERS_ROOT}/meta-openembedded/meta-networking" +BBLAYERS += "${LAYERS_ROOT}/meta-openembedded/meta-python" diff --git a/yocto/conf/layers/machine/vm-raspberrypi4-64.conf b/yocto/conf/layers/machine/vm-raspberrypi4-64.conf new file mode 100644 index 0000000..9ae35fa --- /dev/null +++ b/yocto/conf/layers/machine/vm-raspberrypi4-64.conf @@ -0,0 +1 @@ +BBLAYERS += "${LAYERS_ROOT}/meta-raspberrypi" diff --git a/yocto/setup.sh b/yocto/setup.sh index 8ae709b..7298ae3 100644 --- a/yocto/setup.sh +++ b/yocto/setup.sh @@ -17,18 +17,8 @@ fi . "${LAYERS_ROOT}/poky/oe-init-build-env" "$@" -grep meta-sel4 conf/bblayers.conf 2>/dev/null 1>&2 || \ - printf 'BBLAYERS += "%s/meta-sel4"\n' "$LAYERS_ROOT" >> conf/bblayers.conf +sed -i -e '/LAYERS_ROOT/d' conf/bblayers.conf -grep meta-raspberrypi conf/bblayers.conf 2>/dev/null 1>&2 || \ - printf 'BBLAYERS += "%s/meta-raspberrypi"\n' "$LAYERS_ROOT" >> conf/bblayers.conf - -grep meta-oe conf/bblayers.conf 2>/dev/null 1>&2 || \ - printf 'BBLAYERS += "%s/meta-openembedded/meta-oe"\n' "$LAYERS_ROOT" >> conf/bblayers.conf - -grep meta-networking conf/bblayers.conf 2>/dev/null 1>&2 || \ - printf 'BBLAYERS += "%s/meta-openembedded/meta-networking"\n' "$LAYERS_ROOT" >> conf/bblayers.conf - -# meta-networking needs meta-python -grep meta-python conf/bblayers.conf 2>/dev/null 1>&2 || \ - printf 'BBLAYERS += "%s/meta-openembedded/meta-python"\n' "$LAYERS_ROOT" >> conf/bblayers.conf +echo 'LAYERS_ROOT = "'${LAYERS_ROOT}'"' >> conf/bblayers.conf +echo 'include ${LAYERS_ROOT}/conf/layers/extra.conf' >> conf/bblayers.conf +echo 'include ${LAYERS_ROOT}/conf/layers/machine/${MACHINE}.conf' >> conf/bblayers.conf