From 5f980c14dafb466e1d71e0b6e7487aa522ade9f9 Mon Sep 17 00:00:00 2001 From: Adrian Dudau Date: Wed, 24 Mar 2021 11:58:07 +0100 Subject: Upgrade to gatesgarth This is an initial commit, containing quick fixes and hacks to allow building the images. All these issues will be re-evaluated and fixed properly in their own commits. Signed-off-by: Adrian Dudau --- classes/sota_atom-c3000.bbclass | 2 +- classes/sota_xeon-d.bbclass | 2 +- conf/distro/eneanfvaccess.conf | 2 +- conf/template.atom-c3000/bblayers.conf.sample | 1 + conf/template.atom-c3000/local.conf.sample | 2 ++ conf/template.xeon-d/bblayers.conf.sample | 1 + conf/template.xeon-d/local.conf.sample | 2 ++ images/enea-nfv-access-common.inc | 4 ++-- images/enea-nfv-access-host-common.inc | 12 ++++++++---- images/enea-nfv-access.bb | 1 - 10 files changed, 19 insertions(+), 10 deletions(-) diff --git a/classes/sota_atom-c3000.bbclass b/classes/sota_atom-c3000.bbclass index dff4294..cb44af4 100644 --- a/classes/sota_atom-c3000.bbclass +++ b/classes/sota_atom-c3000.bbclass @@ -7,7 +7,7 @@ WKS_FILE_sota = "efiimage-sota.wks" OSTREE_INITRAMFS_FSTYPES ?= "ext4.gz" # Set .otaimg to be used as source for generating hddimg -ROOTFS_sota = "${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.otaimg" +ROOTFS_sota = "${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.ota-ext4" # OSTree initrd needs 'ramdisk_size' and 'rw' parameters in order to boot OSTREE_KERNEL_ARGS ?= "rw" diff --git a/classes/sota_xeon-d.bbclass b/classes/sota_xeon-d.bbclass index dff4294..cb44af4 100644 --- a/classes/sota_xeon-d.bbclass +++ b/classes/sota_xeon-d.bbclass @@ -7,7 +7,7 @@ WKS_FILE_sota = "efiimage-sota.wks" OSTREE_INITRAMFS_FSTYPES ?= "ext4.gz" # Set .otaimg to be used as source for generating hddimg -ROOTFS_sota = "${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.otaimg" +ROOTFS_sota = "${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.ota-ext4" # OSTree initrd needs 'ramdisk_size' and 'rw' parameters in order to boot OSTREE_KERNEL_ARGS ?= "rw" diff --git a/conf/distro/eneanfvaccess.conf b/conf/distro/eneanfvaccess.conf index ae26b2d..c31363d 100644 --- a/conf/distro/eneanfvaccess.conf +++ b/conf/distro/eneanfvaccess.conf @@ -8,7 +8,7 @@ DISTRO_VERSION = "${DISTRO_VERSION_MAJOR}${DISTRO_VERSION_MINOR}" SDK_VERSION := "${@'${DISTRO_VERSION}'.replace('snapshot-${DATE}','snapshot')}" INHERIT += "distrooverrides" -DISTRO_FEATURES_append = " odm efi-secure-boot" +DISTRO_FEATURES_append = " odm efi-secure-boot usrmerge" DISTRO_FEATURES_OVERRIDES += "odm efi-secure-boot" PREFERRED_PROVIDER_virtual/java-initial-native = "cacao-initial-native" diff --git a/conf/template.atom-c3000/bblayers.conf.sample b/conf/template.atom-c3000/bblayers.conf.sample index 71c77cc..f5d25ce 100644 --- a/conf/template.atom-c3000/bblayers.conf.sample +++ b/conf/template.atom-c3000/bblayers.conf.sample @@ -28,4 +28,5 @@ BBLAYERS ?= " \ ##OEROOT##/meta-secure-core/meta-signing-key \ ##OEROOT##/meta-secure-core/meta-efi-secure-boot \ ##OEROOT##/meta-enea-user-keys \ + ##OEROOT##/meta-python2 \ " diff --git a/conf/template.atom-c3000/local.conf.sample b/conf/template.atom-c3000/local.conf.sample index b015f43..374cace 100644 --- a/conf/template.atom-c3000/local.conf.sample +++ b/conf/template.atom-c3000/local.conf.sample @@ -273,3 +273,5 @@ USERADD_GID_TABLES = "files/group" # Unfortunately, setting the variable below breaks the build, so do not set it # for now # USERADD_ERROR_DYNAMIC = "1" + +IMAGE_INSTALL += "dpdk" diff --git a/conf/template.xeon-d/bblayers.conf.sample b/conf/template.xeon-d/bblayers.conf.sample index 71c77cc..f5d25ce 100644 --- a/conf/template.xeon-d/bblayers.conf.sample +++ b/conf/template.xeon-d/bblayers.conf.sample @@ -28,4 +28,5 @@ BBLAYERS ?= " \ ##OEROOT##/meta-secure-core/meta-signing-key \ ##OEROOT##/meta-secure-core/meta-efi-secure-boot \ ##OEROOT##/meta-enea-user-keys \ + ##OEROOT##/meta-python2 \ " diff --git a/conf/template.xeon-d/local.conf.sample b/conf/template.xeon-d/local.conf.sample index 5cfebf5..fd14580 100644 --- a/conf/template.xeon-d/local.conf.sample +++ b/conf/template.xeon-d/local.conf.sample @@ -274,3 +274,5 @@ USERADD_GID_TABLES = "files/group" # Unfortunately, setting the variable below breaks the build, so do not set it # for now # USERADD_ERROR_DYNAMIC = "1" + +IMAGE_INSTALL += "dpdk" diff --git a/images/enea-nfv-access-common.inc b/images/enea-nfv-access-common.inc index 5472056..a10e2e2 100644 --- a/images/enea-nfv-access-common.inc +++ b/images/enea-nfv-access-common.inc @@ -18,9 +18,9 @@ rootfs_postinstall_dpkg_cleanup () { } ROOTFS_POSTINSTALL_COMMAND_append += " rootfs_postinstall_dpkg_cleanup;" -IMAGE_FSTYPES = "ext4 ext4.gz tar.gz" +IMAGE_FSTYPES += "ext4 ext4.gz tar.gz" # Add ostree specific image types if sota support is set -IMAGE_FSTYPES += "${@bb.utils.contains('DISTRO_FEATURES', 'sota', 'otaimg wic', ' ', d)}" +IMAGE_FSTYPES += "${@bb.utils.contains('DISTRO_FEATURES', 'sota', 'ota-ext4 wic', ' ', d)}" SOTA_CLIENT = "" SOTA_CLIENT_PROV = "" diff --git a/images/enea-nfv-access-host-common.inc b/images/enea-nfv-access-host-common.inc index 1cde827..c0cd896 100644 --- a/images/enea-nfv-access-host-common.inc +++ b/images/enea-nfv-access-host-common.inc @@ -3,8 +3,6 @@ REQUIRE_FILES = " \ classes/override_grub-efi.inc \ " REQUIRE_FILES_append_df-efi-secure-boot = " \ - classes/override_image_types_ostree.inc \ - classes/override_image_types_ota.inc \ classes/override_grub-efi_secureboot.inc \ images/secure-boot.inc \ " @@ -16,6 +14,12 @@ IMAGE_INSTALL += " \ packagegroup-enea-virtualization-4gusb-modems \ " +#This should not be needed, it's a hack. Without it it complains hddimg is not recognize +#See image.bbclass +13. +#inherit image-live + +IMAGE_FSTYPES += "hddimg" + # Set labels for GRUB and SYSLINUX LABELS_LIVE = "installer live-boot" @@ -30,13 +34,13 @@ AUTO_SYSLINUXMENU_x86-64 = "0" # grub-efi-native is needed in recipe-sysroot-native to generate the initial # configuration file for grub -DEPENDS_append += " grub-efi-native" +DEPENDS_append += " grub-efi-native qemuwrapper-cross" # If building with sota enabled, build the otaimg before the hddimg, because # the hddimg needs it as a base image python __anonymous() { if bb.utils.contains('DISTRO_FEATURES', 'sota', True, False, d): - d.appendVarFlag("do_bootimg", "depends", " %s:do_image_otaimg" % d.getVar("IMAGE_BASENAME", True)) + d.appendVarFlag("do_bootimg", "depends", " %s:do_image_ota_ext4" % d.getVar("IMAGE_BASENAME", True)) } # Append OSTree specific parameters to the kernel command line before creating the live image diff --git a/images/enea-nfv-access.bb b/images/enea-nfv-access.bb index 9311992..08239ae 100644 --- a/images/enea-nfv-access.bb +++ b/images/enea-nfv-access.bb @@ -3,5 +3,4 @@ DESCRIPTION = "Image for the host side of the Enea NFV Access Platform with ODM require images/enea-nfv-access-host-common.inc IMAGE_INSTALL += " \ - element-vcpe \ " -- cgit v1.2.3-54-g00ecf From 24c464744901765d1a0f03b2d95b2f8e7f5a4662 Mon Sep 17 00:00:00 2001 From: Adrian Dudau Date: Wed, 7 Apr 2021 16:37:11 +0200 Subject: enea-nfv-access: Add hddimg IMG_FSTYPE before includes Adding IMG_FSTYPES += "hddimg" must be done before inheriting core-image (in enea-image-common.inc) to avoid parsing errors. Further, override_grub-efi_secureboot.inc overrides some functions brought in by adding hddimg image type, so adding it after the include would render the override useless. Change-Id: Id87fc69c5dd5d0de953fbe014f639d382c3714e8 Signed-off-by: Adrian Dudau --- images/enea-nfv-access-host-common.inc | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/images/enea-nfv-access-host-common.inc b/images/enea-nfv-access-host-common.inc index c0cd896..6b9c99e 100644 --- a/images/enea-nfv-access-host-common.inc +++ b/images/enea-nfv-access-host-common.inc @@ -1,3 +1,5 @@ +IMAGE_FSTYPES += "hddimg" + REQUIRE_FILES = " \ images/enea-nfv-access-common.inc \ classes/override_grub-efi.inc \ @@ -14,12 +16,6 @@ IMAGE_INSTALL += " \ packagegroup-enea-virtualization-4gusb-modems \ " -#This should not be needed, it's a hack. Without it it complains hddimg is not recognize -#See image.bbclass +13. -#inherit image-live - -IMAGE_FSTYPES += "hddimg" - # Set labels for GRUB and SYSLINUX LABELS_LIVE = "installer live-boot" -- cgit v1.2.3-54-g00ecf From 17dae722fbab32bd477a650b3f6b412b7dc7b20f Mon Sep 17 00:00:00 2001 From: Alexandru Avadanii Date: Mon, 22 Mar 2021 20:55:06 +0100 Subject: do_image_ostree: Fix dpkg data mv While at it, remove one obsoleted workaround from do_image_otaimg: grub:do_populate_sysroot was removed from do_image_otaimg (do_image_ota_ext4) deps in [1]. [1] https://github.com/advancedtelematic/meta-updater/commit/850801c Change-Id: I45f77010aa9cd62dec2e37b278539dc4d28605c5 Signed-off-by: Alexandru Avadanii --- images/enea-nfv-access-host-common.inc | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/images/enea-nfv-access-host-common.inc b/images/enea-nfv-access-host-common.inc index 6b9c99e..b3f110a 100644 --- a/images/enea-nfv-access-host-common.inc +++ b/images/enea-nfv-access-host-common.inc @@ -51,19 +51,11 @@ python do_bootimg_prepend () { d.setVar("APPEND", d.getVar("APPEND") + ostree_params) } -# Get rid of GRUB dependencies added by ostree. See: -# https://git.enea.com/cgit/linux/meta-updater.git/tree/classes/image_types_ota.bbclass#n45 -python __anonymous () { - d.delVarFlag("do_image_otaimg", "depends") - d.setVarFlag("do_image_otaimg", "depends", "e2fsprogs-native:do_populate_sysroot") -} - # Before building the OSTree image, move DPKG data to /usr/dpkg, because # OSTree does not preserve the contents of /var IMAGE_CMD_ostree_prepend () { - - install -d ${IMAGE_ROOTFS}/usr/dpkg/lib/dpkg - if [ "$(ls -A ${IMAGE_ROOTFS}/var/lib/dpkg)" ]; then - mv ${IMAGE_ROOTFS}/var/lib/dpkg/* ${IMAGE_ROOTFS}/usr/dpkg/lib/dpkg/ + mkdir -p usr/dpkg/lib/dpkg + if [ "$(ls -A var/lib/dpkg)" ]; then + mv var/lib/dpkg/* usr/dpkg/lib/dpkg/ fi } -- cgit v1.2.3-54-g00ecf From a14950444f22e7aaed1cce3c061c860572cf262f Mon Sep 17 00:00:00 2001 From: Alexandru Avadanii Date: Mon, 29 Mar 2021 19:09:53 +0200 Subject: classes: Rebase override_image_types_{ota,ostree} - override_image_types_ostree.inc is no longer required; - override_image_types_ota.inc is mostly superseded by upstream, except the creation of /boot/grub as a symlink to /boot/loader (note that /boot/grub2 is a real dir with /boot/grub2/grub.cfg being a symlink to /boot/loader/grub.cfg - it would be quite complicated to override the whole IMAGE_CMD_ota just to keep symlinking the parent dir instead of grub.cfg directly); /boot/grub should be a symlink so that /boot/grub/grubenv also points to /boot/loader/grubenv); fold its contents into enea-nfv-access-host-common.inc as it doesn't override a class anymore Note: Previously, OSTree did not follow symlinks, so the symlink /boot/grub2/grub.cfg was being overwritten with a real file, this is no longer an issue. Change-Id: I38ec2b3a791ef7068b97caa49010eee62b7f4aee Signed-off-by: Alexandru Avadanii Signed-off-by: Adrian Dudau --- classes/override_image_types_ostree.inc | 155 -------------------------------- classes/override_image_types_ota.inc | 99 -------------------- images/enea-nfv-access-host-common.inc | 10 +++ 3 files changed, 10 insertions(+), 254 deletions(-) delete mode 100644 classes/override_image_types_ostree.inc delete mode 100644 classes/override_image_types_ota.inc diff --git a/classes/override_image_types_ostree.inc b/classes/override_image_types_ostree.inc deleted file mode 100644 index 011e27e..0000000 --- a/classes/override_image_types_ostree.inc +++ /dev/null @@ -1,155 +0,0 @@ -# overrides meta-updater/classes/image_types_ostree.bbclass -# - add do_image_ostree flags: -# - dirs, cleandirs: to avoid mktemp, rm, cd, and to also remove at clean -# - subimages, imgsuffix: to use automatic link creation -# - override of IMAGE_CMD_ostree -# - use the added flags -# - IMGDEPLOYDIR, instead of DEPLOY_DIR_IMAGE - -OSTREE_ROOTFS="${WORKDIR}/ostree-root" -do_image_ostree[dirs] = "${OSTREE_ROOTFS}" -do_image_ostree[cleandirs] = "${OSTREE_ROOTFS}" -do_image_ostree[subimages] = "rootfs.ostree.tar.bz2" -do_image_ostree[imgsuffix] = "." -export OSTREE_ROOTFS - -IMAGE_CMD_ostree () { - if [ -z "$OSTREE_REPO" ]; then - bbfatal "OSTREE_REPO should be set in your local.conf" - fi - - if [ -z "$OSTREE_BRANCHNAME" ]; then - bbfatal "OSTREE_BRANCHNAME should be set in your local.conf" - fi - - cp -a ${IMAGE_ROOTFS}/* ${OSTREE_ROOTFS} - chmod a+rx ${OSTREE_ROOTFS} - sync - - for d in var/*; do - if [ "${d}" != "var/local" ]; then - rm -rf ${d} - fi - done - - # Create sysroot directory to which physical sysroot will be mounted - mkdir sysroot - ln -sf sysroot/ostree ostree - - rm -rf tmp/* - ln -sf sysroot/tmp tmp - - mkdir -p usr/rootdirs - - mv etc usr/ - # Implement UsrMove - dirs="bin sbin lib" - - for dir in ${dirs} ; do - if [ -d ${dir} ] && [ ! -L ${dir} ] ; then - mv ${dir} usr/rootdirs/ - rm -rf ${dir} - ln -sf usr/rootdirs/${dir} ${dir} - fi - done - - if [ -n "$SYSTEMD_USED" ]; then - mkdir -p usr/etc/tmpfiles.d - tmpfiles_conf=usr/etc/tmpfiles.d/00ostree-tmpfiles.conf - echo "d /var/rootdirs 0755 root root -" >>${tmpfiles_conf} - echo "L /var/rootdirs/home - - - - /sysroot/home" >>${tmpfiles_conf} - else - mkdir -p usr/etc/init.d - tmpfiles_conf=usr/etc/init.d/tmpfiles.sh - echo '#!/bin/sh' > ${tmpfiles_conf} - echo "mkdir -p /var/rootdirs; chmod 755 /var/rootdirs" >> ${tmpfiles_conf} - echo "ln -sf /sysroot/home /var/rootdirs/home" >> ${tmpfiles_conf} - - ln -s ../init.d/tmpfiles.sh usr/etc/rcS.d/S20tmpfiles.sh - fi - - # Preserve OSTREE_BRANCHNAME for future information - mkdir -p usr/share/sota/ - echo -n "${OSTREE_BRANCHNAME}" > usr/share/sota/branchname - - # Preserve data in /home to be later copied to /sysroot/home by sysroot - # generating procedure - mkdir -p usr/homedirs - if [ -d "home" ] && [ ! -L "home" ]; then - mv home usr/homedirs/home - ln -sf var/rootdirs/home home - fi - - # Move persistent directories to /var - dirs="opt mnt media srv" - - for dir in ${dirs}; do - if [ -d ${dir} ] && [ ! -L ${dir} ]; then - if [ "$(ls -A $dir)" ]; then - bbwarn "Data in /$dir directory is not preserved by OSTree. Consider moving it under /usr" - fi - - if [ -n "$SYSTEMD_USED" ]; then - echo "d /var/rootdirs/${dir} 0755 root root -" >>${tmpfiles_conf} - else - echo "mkdir -p /var/rootdirs/${dir}; chown 755 /var/rootdirs/${dir}" >>${tmpfiles_conf} - fi - rm -rf ${dir} - ln -sf var/rootdirs/${dir} ${dir} - fi - done - - if [ -d root ] && [ ! -L root ]; then - if [ "$(ls -A root)" ]; then - bberror "Data in /root directory is not preserved by OSTree." - exit 1 - fi - - if [ -n "$SYSTEMD_USED" ]; then - echo "d /var/roothome 0755 root root -" >>${tmpfiles_conf} - else - echo "mkdir -p /var/roothome; chown 755 /var/roothome" >>${tmpfiles_conf} - fi - - rm -rf root - ln -sf var/roothome root - fi - - if [ -n "${SOTA_SECONDARY_ECUS}" ]; then - mkdir -p var/sota/ecus - cp ${SOTA_SECONDARY_ECUS} var/sota/ecus - fi - - # Creating boot directories is required for "ostree admin deploy" - - mkdir -p boot/loader.0 - mkdir -p boot/loader.1 - ln -sf loader.0 boot/loader - - checksum=`sha256sum ${DEPLOY_DIR_IMAGE}/${OSTREE_KERNEL} | cut -f 1 -d " "` - - # Copy kernel and initramfs and their signature files - cp ${DEPLOY_DIR_IMAGE}/${OSTREE_KERNEL} boot/vmlinuz-${checksum} - cp ${DEPLOY_DIR_IMAGE}/${OSTREE_KERNEL}.p7b boot/vmlinuz-${checksum}.p7b - cp ${DEPLOY_DIR_IMAGE}/${OSTREE_INITRAMFS_IMAGE}-${MACHINE}${RAMDISK_EXT} boot/initramfs-${checksum} - cp ${DEPLOY_DIR_IMAGE}/${OSTREE_INITRAMFS_IMAGE}-${MACHINE}${RAMDISK_EXT}.p7b boot/initramfs-${checksum}.p7b - - # Copy image manifest - cat ${IMAGE_MANIFEST} | cut -d " " -f1,3 > usr/package.manifest - - # Create a tarball that can be then commited to OSTree repo - OSTREE_TAR=${IMGDEPLOYDIR}/${IMAGE_NAME}.rootfs.ostree.tar.bz2 - tar -C ${OSTREE_ROOTFS} --xattrs --xattrs-include='*' -cjf ${OSTREE_TAR} . - sync - - if ! ostree --repo=${OSTREE_REPO} refs 2>&1 > /dev/null; then - ostree --repo=${OSTREE_REPO} init --mode=archive-z2 - fi - - # Commit the result - ostree --repo=${OSTREE_REPO} commit \ - --tree=dir=${OSTREE_ROOTFS} \ - --skip-if-unchanged \ - --branch=${OSTREE_BRANCHNAME} \ - --subject="Commit-id: ${IMAGE_NAME}" -} diff --git a/classes/override_image_types_ota.inc b/classes/override_image_types_ota.inc deleted file mode 100644 index da920c1..0000000 --- a/classes/override_image_types_ota.inc +++ /dev/null @@ -1,99 +0,0 @@ -# overrides meta-updater/classes/image_types_ota.bbclass -# - add do_image_otaimg flags: -# - dirs, cleandirs: to avoid mktemp, rm, cd, and to also remove at clean -# - override of IMAGE_CMD_otaimg -# - use the added flags -# - avoid untar-ing the ostree image, and use OSTREE_ROOTFS -# - IMGDEPLOYDIR, instead of DEPLOY_DIR_IMAGE - -OSTREE_REPO = "${WORKDIR}/ostree-repo" -PHYS_SYSROOT = "${WORKDIR}/ota-sysroot" - -do_image_otaimg[dirs] = "${PHYS_SYSROOT}" -do_image_otaimg[cleandirs] = "${PHYS_SYSROOT}" - -IMAGE_CMD_otaimg () { - if ${@bb.utils.contains('IMAGE_FSTYPES', 'otaimg', 'true', 'false', d)}; then - if [ -z "$OSTREE_REPO" ]; then - bbfatal "OSTREE_REPO should be set in your local.conf" - fi - - if [ -z "$OSTREE_OSNAME" ]; then - bbfatal "OSTREE_OSNAME should be set in your local.conf" - fi - - if [ -z "$OSTREE_BRANCHNAME" ]; then - bbfatal "OSTREE_BRANCHNAME should be set in your local.conf" - fi - - ostree admin --sysroot=${PHYS_SYSROOT} init-fs ${PHYS_SYSROOT} - ostree admin --sysroot=${PHYS_SYSROOT} os-init ${OSTREE_OSNAME} - - mkdir -p ${PHYS_SYSROOT}/boot/loader.0 - ln -s loader.0 ${PHYS_SYSROOT}/boot/loader - - if [ "${OSTREE_BOOTLOADER}" = "grub" ]; then - ln -s loader ${PHYS_SYSROOT}/boot/grub - ln -s loader ${PHYS_SYSROOT}/boot/grub2 - touch ${PHYS_SYSROOT}/boot/grub/grub.cfg - elif [ "${OSTREE_BOOTLOADER}" = "u-boot" ]; then - touch ${PHYS_SYSROOT}/boot/loader/uEnv.txt - else - bberror "Invalid bootloader: ${OSTREE_BOOTLOADER}" - fi; - - ostree_target_hash=$(cat ${OSTREE_REPO}/refs/heads/${OSTREE_BRANCHNAME}) - - ostree --repo=${PHYS_SYSROOT}/ostree/repo pull-local --remote=${OSTREE_OSNAME} ${OSTREE_REPO} ${ostree_target_hash} - export OSTREE_BOOT_PARTITION="/boot" - kargs_list="" - for arg in ${OSTREE_KERNEL_ARGS}; do - kargs_list="${kargs_list} --karg-append=$arg" - done - - ostree admin --sysroot=${PHYS_SYSROOT} deploy ${kargs_list} --os=${OSTREE_OSNAME} ${ostree_target_hash} - - cp -a ${IMAGE_ROOTFS}/var/sota ${PHYS_SYSROOT}/ostree/deploy/${OSTREE_OSNAME}/var/ || true - # Create /var/sota if it doesn't exist yet - mkdir -p ${PHYS_SYSROOT}/ostree/deploy/${OSTREE_OSNAME}/var/sota - # Ensure the permissions are correctly set - chmod 700 ${PHYS_SYSROOT}/ostree/deploy/${OSTREE_OSNAME}/var/sota - - cp -a ${OSTREE_ROOTFS}/var/local ${PHYS_SYSROOT}/ostree/deploy/${OSTREE_OSNAME}/var/ || true - cp -a ${OSTREE_ROOTFS}/usr/homedirs/home ${PHYS_SYSROOT}/ || true - # Ensure that /var/local exists (AGL symlinks /usr/local to /var/local) - install -d ${PHYS_SYSROOT}/ostree/deploy/${OSTREE_OSNAME}/var/local - # Set package version for the first deployment - target_version=${ostree_target_hash} - if [ -n "${GARAGE_TARGET_VERSION}" ]; then - target_version=${GARAGE_TARGET_VERSION} - elif [ -e "${STAGING_DATADIR_NATIVE}/target_version" ]; then - target_version=$(cat "${STAGING_DATADIR_NATIVE}/target_version") - fi - mkdir -p ${PHYS_SYSROOT}/ostree/deploy/${OSTREE_OSNAME}/var/sota/import - echo "{\"${ostree_target_hash}\":\"${GARAGE_TARGET_NAME}-${target_version}\"}" > ${PHYS_SYSROOT}/ostree/deploy/${OSTREE_OSNAME}/var/sota/import/installed_versions - - # Calculate image type - OTA_ROOTFS_SIZE=$(calculate_size `du -ks ${PHYS_SYSROOT} | cut -f 1` "${IMAGE_OVERHEAD_FACTOR}" "${IMAGE_ROOTFS_SIZE}" "${IMAGE_ROOTFS_MAXSIZE}" `expr ${IMAGE_ROOTFS_EXTRA_SPACE}` "${IMAGE_ROOTFS_ALIGNMENT}") - - if [ $OTA_ROOTFS_SIZE -lt 0 ]; then - exit -1 - fi - eval local COUNT=\"0\" - eval local MIN_COUNT=\"60\" - if [ $OTA_ROOTFS_SIZE -lt $MIN_COUNT ]; then - eval COUNT=\"$MIN_COUNT\" - fi - - # create image - dd if=/dev/zero of=${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.otaimg seek=${OTA_ROOTFS_SIZE} count=${COUNT} bs=1024 - mkfs.ext4 -O ^64bit ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.otaimg -L otaroot -d ${PHYS_SYSROOT} - rm -f ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.otaimg - ln -s ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.otaimg ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.otaimg - # for forward compatibility - rm -f ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.ota-ext4 - ln -s ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.otaimg ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.ota-ext4 - fi -} - -IMAGE_TYPEDEP_otaimg = "ostree" diff --git a/images/enea-nfv-access-host-common.inc b/images/enea-nfv-access-host-common.inc index b3f110a..82e9792 100644 --- a/images/enea-nfv-access-host-common.inc +++ b/images/enea-nfv-access-host-common.inc @@ -59,3 +59,13 @@ IMAGE_CMD_ostree_prepend () { mv var/lib/dpkg/* usr/dpkg/lib/dpkg/ fi } + +IMAGE_CMD_ota_prepend () { + if [ "${OSTREE_BOOTLOADER}" = "grub" ]; then + # Upstream bbclass creates /boot/grub2, complement it with /boot/grub + # Note: /boot/grub2 is a dir with /boot/grub2/grub.cfg -> ../loader/grub.cfg symlink + # while /boot/grub -> loader is a symlink to also account for /boot/grub/grubenv + mkdir -p ${OTA_SYSROOT}/boot + ln -s loader ${OTA_SYSROOT}/boot/grub + fi +} -- cgit v1.2.3-54-g00ecf From a66a367e9656f0f4e2f9e9f8932714cf9bee1725 Mon Sep 17 00:00:00 2001 From: Alexandru Avadanii Date: Sun, 21 Mar 2021 18:15:52 +0100 Subject: classes/override_grub* sync with upstream renames While at it, replace some hardcoded p7b extenstions with ${SB_FILE_EXT} and vmlinuz references with the appropiate variable (upstream no longer renames bzImage to vmlinuz in ISO root after [1]). [1] https://git.yoctoproject.org/cgit.cgi/poky/commit/?id=b6e36c01977 Change-Id: I5ce414a2f281ff2f1aeb0e26f35608cd8750855d Signed-off-by: Alexandru Avadanii Signed-off-by: Adrian Dudau --- classes/override_grub-efi-cfg.inc | 94 ++++++++++++++++++++++++++++++++ classes/override_grub-efi.inc | 89 ------------------------------ classes/override_grub-efi_secureboot.inc | 31 ----------- classes/override_live-vm-common.inc | 29 ++++++++++ images/enea-nfv-access-host-common.inc | 4 +- 5 files changed, 125 insertions(+), 122 deletions(-) create mode 100644 classes/override_grub-efi-cfg.inc delete mode 100644 classes/override_grub-efi.inc delete mode 100644 classes/override_grub-efi_secureboot.inc create mode 100644 classes/override_live-vm-common.inc diff --git a/classes/override_grub-efi-cfg.inc b/classes/override_grub-efi-cfg.inc new file mode 100644 index 0000000..42d89b7 --- /dev/null +++ b/classes/override_grub-efi-cfg.inc @@ -0,0 +1,94 @@ +## ENEA_start ## +GRUB_GRAPHICS ?= "console=tty0" +## ENEA_end ## + +python build_efi_cfg() { + import sys + + workdir = d.getVar('WORKDIR') + if not workdir: + bb.error("WORKDIR not defined, unable to package") + return + + gfxserial = d.getVar('GRUB_GFXSERIAL') or "" + + labels = d.getVar('LABELS') + if not labels: + bb.debug(1, "LABELS not defined, nothing to do") + return + + if labels == []: + bb.debug(1, "No labels, nothing to do") + return + + cfile = d.getVar('GRUB_CFG') + if not cfile: + bb.fatal('Unable to read GRUB_CFG') + + try: + cfgfile = open(cfile, 'w') + except OSError: + bb.fatal('Unable to open %s' % cfile) + + cfgfile.write('# Automatically created by OE\n') + + opts = d.getVar('GRUB_OPTS') + if opts: + for opt in opts.split(';'): + cfgfile.write('%s\n' % opt) + + cfgfile.write('default=%s\n' % (labels.split()[0])) + + timeout = d.getVar('GRUB_TIMEOUT') + if timeout: + cfgfile.write('timeout=%s\n' % timeout) + else: + cfgfile.write('timeout=50\n') + + root = d.getVar('GRUB_ROOT') + if not root: + bb.fatal('GRUB_ROOT not defined') + + if gfxserial == "1": + ## ENEA_start ## + btypes = [ [ " serial console", d.getVar('GRUB_SERIAL') or "" ], + [ " graphics console", d.getVar('GRUB_GRAPHICS') or "" ] ] + ## ENEA_end ## + else: + btypes = [ [ "", "" ] ] + + for label in labels.split(): + localdata = d.createCopy() + + overrides = localdata.getVar('OVERRIDES') + if not overrides: + bb.fatal('OVERRIDES not defined') + + localdata.setVar('OVERRIDES', 'grub_' + label + ':' + overrides) + + for btype in btypes: + cfgfile.write('\nmenuentry \'%s%s\'{\n' % (label, btype[0])) + lb = label + if label == "install": + lb = "install-efi" + kernel = localdata.getVar('KERNEL_IMAGETYPE') + cfgfile.write('linux /%s LABEL=%s' % (kernel, lb)) + + cfgfile.write(' %s' % replace_rootfs_uuid(d, root)) + + append = localdata.getVar('APPEND') + initrd = localdata.getVar('INITRD') + + if append: + append = replace_rootfs_uuid(d, append) + cfgfile.write(' %s' % (append)) + + cfgfile.write(' %s' % btype[1]) + cfgfile.write('\n') + + if initrd: + cfgfile.write('initrd /initrd') + cfgfile.write('\n}\n') + + cfgfile.close() +} diff --git a/classes/override_grub-efi.inc b/classes/override_grub-efi.inc deleted file mode 100644 index 15a7063..0000000 --- a/classes/override_grub-efi.inc +++ /dev/null @@ -1,89 +0,0 @@ -GRUB_GRAPHICS ?= "console=tty0" - -python build_efi_cfg() { - import sys - - workdir = d.getVar('WORKDIR') - if not workdir: - bb.error("WORKDIR not defined, unable to package") - return - - gfxserial = d.getVar('GRUB_GFXSERIAL') or "" - - labels = d.getVar('LABELS') - if not labels: - bb.debug(1, "LABELS not defined, nothing to do") - return - - if labels == []: - bb.debug(1, "No labels, nothing to do") - return - - cfile = d.getVar('GRUB_CFG') - if not cfile: - bb.fatal('Unable to read GRUB_CFG') - - try: - cfgfile = open(cfile, 'w') - except OSError: - bb.fatal('Unable to open %s' % cfile) - - cfgfile.write('# Automatically created by OE\n') - - opts = d.getVar('GRUB_OPTS') - if opts: - for opt in opts.split(';'): - cfgfile.write('%s\n' % opt) - - cfgfile.write('default=%s\n' % (labels.split()[0])) - - timeout = d.getVar('GRUB_TIMEOUT') - if timeout: - cfgfile.write('timeout=%s\n' % timeout) - else: - cfgfile.write('timeout=50\n') - - root = d.getVar('GRUB_ROOT') - if not root: - bb.fatal('GRUB_ROOT not defined') - - if gfxserial == "1": - btypes = [ [ " serial console", d.getVar('GRUB_SERIAL') or "" ], - [ " graphics console", d.getVar('GRUB_GRAPHICS') or "" ] ] - else: - btypes = [ [ "", "" ] ] - - for label in labels.split(): - localdata = d.createCopy() - - overrides = localdata.getVar('OVERRIDES') - if not overrides: - bb.fatal('OVERRIDES not defined') - - for btype in btypes: - localdata.setVar('OVERRIDES', label + ':' + overrides) - - cfgfile.write('\nmenuentry \'%s%s\'{\n' % (label, btype[0])) - lb = label - if label == "install": - lb = "install-efi" - cfgfile.write('linux /vmlinuz LABEL=%s' % (lb)) - - cfgfile.write(' %s' % replace_rootfs_uuid(d, root)) - - append = localdata.getVar('APPEND') - initrd = localdata.getVar('INITRD') - - if append: - append = replace_rootfs_uuid(d, append) - cfgfile.write(' %s' % (append)) - - cfgfile.write(' %s' % btype[1]) - cfgfile.write('\n') - - if initrd: - cfgfile.write('initrd /initrd') - cfgfile.write('\n}\n') - - cfgfile.close() -} diff --git a/classes/override_grub-efi_secureboot.inc b/classes/override_grub-efi_secureboot.inc deleted file mode 100644 index b944ec8..0000000 --- a/classes/override_grub-efi_secureboot.inc +++ /dev/null @@ -1,31 +0,0 @@ -efi_populate() { - # DEST must be the root of the image so that EFIDIR is not - # nested under a top level directory. - DEST=$1 - - install -d ${DEST}${EFIDIR} - - GRUB_IMAGE="grub-efi-bootia32.efi" - DEST_IMAGE="bootia32.efi" - if [ "${TARGET_ARCH}" = "x86_64" ]; then - GRUB_IMAGE="grub-efi-bootx64.efi" - DEST_IMAGE="bootx64.efi" - fi - - #Install EFI binaries - install -m 0644 ${IMAGE_ROOTFS}/boot/efi${EFIDIR}/*.* ${DEST}${EFIDIR} - - #Install kernel and initramfs sig - install -m 0644 ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}.p7b ${DEST}/vmlinuz.p7b - install -m 0644 ${INITRD_LIVE}.p7b ${DEST}/initrd.p7b - - EFIPATH=$(echo "${EFIDIR}" | sed 's/\//\\/g') - printf 'fs0:%s\%s\n' "$EFIPATH" "$DEST_IMAGE" >${DEST}/startup.nsh - - install -m 0644 ${GRUB_CFG} ${DEST}${EFIDIR}/grub.cfg - - #Install UEFI keys - install -d ${DEST}/uefi_sb_keys - install -m 0644 ${DEPLOY_DIR_IMAGE}/user-keys/uefi_sb_keys/*.crt ${DEST}/uefi_sb_keys/ - install -m 0644 ${DEPLOY_DIR_IMAGE}/user-keys/uefi_sb_keys/*.esl ${DEST}/uefi_sb_keys/ -} diff --git a/classes/override_live-vm-common.inc b/classes/override_live-vm-common.inc new file mode 100644 index 0000000..dc8e076 --- /dev/null +++ b/classes/override_live-vm-common.inc @@ -0,0 +1,29 @@ +# efi_populate_common DEST BOOTLOADER +efi_populate_common() { + # DEST must be the root of the image so that EFIDIR is not + # nested under a top level directory. + DEST=$1 + + install -d ${DEST}${EFIDIR} + + ## ENEA_start ## + # install -m 0644 ${DEPLOY_DIR_IMAGE}/$2-${EFI_BOOT_IMAGE} ${DEST}${EFIDIR}/${EFI_BOOT_IMAGE} + ## ENEA_end ## + + EFIPATH=$(echo "${EFIDIR}" | sed 's/\//\\/g') + printf 'fs0:%s\%s\n' "$EFIPATH" "${EFI_BOOT_IMAGE}" >${DEST}/startup.nsh + + ## ENEA_start ## + # Install EFI binaries + install -m 0644 ${IMAGE_ROOTFS}/boot/efi${EFIDIR}/*.* ${DEST}${EFIDIR} + + # Install kernel and initramfs sig + install -m 0644 ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}${SB_FILE_EXT} ${DEST}/${KERNEL_IMAGETYPE}${SB_FILE_EXT} + install -m 0644 ${INITRD_LIVE}${SB_FILE_EXT} ${DEST}/initrd${SB_FILE_EXT} + + # Install UEFI keys + install -d ${DEST}/uefi_sb_keys + install -m 0644 ${DEPLOY_DIR_IMAGE}/user-keys/uefi_sb_keys/*.crt ${DEST}/uefi_sb_keys/ + install -m 0644 ${DEPLOY_DIR_IMAGE}/user-keys/uefi_sb_keys/*.esl ${DEST}/uefi_sb_keys/ + ## ENEA_end ## +} diff --git a/images/enea-nfv-access-host-common.inc b/images/enea-nfv-access-host-common.inc index 82e9792..d984f95 100644 --- a/images/enea-nfv-access-host-common.inc +++ b/images/enea-nfv-access-host-common.inc @@ -2,10 +2,10 @@ IMAGE_FSTYPES += "hddimg" REQUIRE_FILES = " \ images/enea-nfv-access-common.inc \ - classes/override_grub-efi.inc \ + classes/override_grub-efi-cfg.inc \ " REQUIRE_FILES_append_df-efi-secure-boot = " \ - classes/override_grub-efi_secureboot.inc \ + classes/override_live-vm-common.inc \ images/secure-boot.inc \ " -- cgit v1.2.3-54-g00ecf From 4caf6e53092b84f37183e696d43bf16c8c9bc112 Mon Sep 17 00:00:00 2001 From: Alexandru Avadanii Date: Sun, 21 Mar 2021 13:57:45 +0100 Subject: classes/sota: INITRAMFS_TYPES: s/ext4/cpio/ Upstream meta-updater switched from initrd to initramfs in [1], so the image format changed from ext4.gz to cpio.gz. [1] https://github.com/advancedtelematic/meta-updater/commit/212d71d2 Change-Id: Ibb1239eeba319877624fc76209f733862f52cb35 Signed-off-by: Alexandru Avadanii --- classes/sota_atom-c3000.bbclass | 2 +- classes/sota_xeon-d.bbclass | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/classes/sota_atom-c3000.bbclass b/classes/sota_atom-c3000.bbclass index cb44af4..a6bc65f 100644 --- a/classes/sota_atom-c3000.bbclass +++ b/classes/sota_atom-c3000.bbclass @@ -4,7 +4,7 @@ PREFERRED_PROVIDER_virtual/bootloader_sota = "grub-efi" WKS_FILE_sota = "efiimage-sota.wks" -OSTREE_INITRAMFS_FSTYPES ?= "ext4.gz" +OSTREE_INITRAMFS_FSTYPES ?= "cpio.gz" # Set .otaimg to be used as source for generating hddimg ROOTFS_sota = "${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.ota-ext4" diff --git a/classes/sota_xeon-d.bbclass b/classes/sota_xeon-d.bbclass index cb44af4..a6bc65f 100644 --- a/classes/sota_xeon-d.bbclass +++ b/classes/sota_xeon-d.bbclass @@ -4,7 +4,7 @@ PREFERRED_PROVIDER_virtual/bootloader_sota = "grub-efi" WKS_FILE_sota = "efiimage-sota.wks" -OSTREE_INITRAMFS_FSTYPES ?= "ext4.gz" +OSTREE_INITRAMFS_FSTYPES ?= "cpio.gz" # Set .otaimg to be used as source for generating hddimg ROOTFS_sota = "${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.ota-ext4" -- cgit v1.2.3-54-g00ecf From ec1e1f71f2fbb751c2155639a866bfcf247295a2 Mon Sep 17 00:00:00 2001 From: Alexandru Avadanii Date: Mon, 22 Mar 2021 21:50:02 +0100 Subject: sota: Remove aktualizr aktualizr-info from images These were added to all images inheriting sota.bbclass. We don't use them, so spare some unexpected dependencies by removing them. [1] https://github.com/advancedtelematic/meta-updater/commit/3bb86635 Change-Id: I01334024b70c161d1614bf2e7296cd3f7146ee13 Signed-off-by: Alexandru Avadanii --- images/enea-nfv-access-common.inc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/images/enea-nfv-access-common.inc b/images/enea-nfv-access-common.inc index a10e2e2..df93026 100644 --- a/images/enea-nfv-access-common.inc +++ b/images/enea-nfv-access-common.inc @@ -24,3 +24,11 @@ IMAGE_FSTYPES += "ext4 ext4.gz tar.gz" IMAGE_FSTYPES += "${@bb.utils.contains('DISTRO_FEATURES', 'sota', 'ota-ext4 wic', ' ', d)}" SOTA_CLIENT = "" SOTA_CLIENT_PROV = "" + +# Remove aktualizr from the image, we don't use it and creates odd dependencies, e.g. +# it creates a systemd unit that depends on network-online.target, which leads to enabling +# NetworkManager-wait-online.service, delaying boot up. +IMAGE_INSTALL_remove = " \ + aktualizr \ + aktualizr-info \ + " -- cgit v1.2.3-54-g00ecf From e79eac4f77fd48cc93a8e7417732cf2034a14ee5 Mon Sep 17 00:00:00 2001 From: Matei Valeanu Date: Tue, 20 Apr 2021 15:17:15 +0200 Subject: conf: Update default distro version to 2.5.0 Change-Id: I2cd5cc806e9264151897124b2dae42752f102afb Signed-off-by: Matei Valeanu --- conf/distro/eneanfvaccess.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/distro/eneanfvaccess.conf b/conf/distro/eneanfvaccess.conf index ae26b2d..1b6c693 100644 --- a/conf/distro/eneanfvaccess.conf +++ b/conf/distro/eneanfvaccess.conf @@ -1,7 +1,7 @@ require conf/distro/enea.conf DISTRO_NAME = "Enea NFV Access" -DISTRO_VERSION_MAJOR ??= "2.4" +DISTRO_VERSION_MAJOR ??= "2.5" DISTRO_VERSION_MINOR ??= ".0" DISTRO_VERSION = "${DISTRO_VERSION_MAJOR}${DISTRO_VERSION_MINOR}" -- cgit v1.2.3-54-g00ecf From 8a666dac9fce6e073c34768e3b8a80eaaedfd887 Mon Sep 17 00:00:00 2001 From: Andreas Wellving Date: Tue, 20 Apr 2021 14:04:41 +0200 Subject: Add element-vcpe to enea-nfv-access image Signed-off-by: Adrian Calianu Signed-off-by: Alexandru Avadanii Signed-off-by: Andreas Wellving Change-Id: I8892684cf302edaca98f50448d424432545df8de --- images/enea-nfv-access.bb | 1 + 1 file changed, 1 insertion(+) diff --git a/images/enea-nfv-access.bb b/images/enea-nfv-access.bb index 08239ae..9311992 100644 --- a/images/enea-nfv-access.bb +++ b/images/enea-nfv-access.bb @@ -3,4 +3,5 @@ DESCRIPTION = "Image for the host side of the Enea NFV Access Platform with ODM require images/enea-nfv-access-host-common.inc IMAGE_INSTALL += " \ + element-vcpe \ " -- cgit v1.2.3-54-g00ecf From 9eceb046982de3da1921d97cedf4a3393e875d9a Mon Sep 17 00:00:00 2001 From: Adrian Calianu Date: Thu, 22 Apr 2021 10:50:42 +0100 Subject: Revert "Add element-vcpe to enea-nfv-access image" This reverts commit 8a666dac9fce6e073c34768e3b8a80eaaedfd887. Change-Id: I96ea9fc565974bd66a252e178a0615e1b4bc0e9e --- images/enea-nfv-access.bb | 1 - 1 file changed, 1 deletion(-) diff --git a/images/enea-nfv-access.bb b/images/enea-nfv-access.bb index 9311992..08239ae 100644 --- a/images/enea-nfv-access.bb +++ b/images/enea-nfv-access.bb @@ -3,5 +3,4 @@ DESCRIPTION = "Image for the host side of the Enea NFV Access Platform with ODM require images/enea-nfv-access-host-common.inc IMAGE_INSTALL += " \ - element-vcpe \ " -- cgit v1.2.3-54-g00ecf From 511186d28fb9d6e6ec851cd5e3a1e0a62d937b9d Mon Sep 17 00:00:00 2001 From: Alexandru Avadanii Date: Mon, 19 Apr 2021 09:05:24 +0200 Subject: conf/local.conf: Drop 'dpdk' from IMAGE_INSTALL This was added as a workaround during the gatesgarth rebase and is no longer needed. Signed-off-by: Alexandru Avadanii Change-Id: I627c75b77d1fc2ec4fb6de9c45ac3712cce7966f --- conf/template.atom-c3000/local.conf.sample | 2 -- conf/template.xeon-d/local.conf.sample | 2 -- 2 files changed, 4 deletions(-) diff --git a/conf/template.atom-c3000/local.conf.sample b/conf/template.atom-c3000/local.conf.sample index 374cace..b015f43 100644 --- a/conf/template.atom-c3000/local.conf.sample +++ b/conf/template.atom-c3000/local.conf.sample @@ -273,5 +273,3 @@ USERADD_GID_TABLES = "files/group" # Unfortunately, setting the variable below breaks the build, so do not set it # for now # USERADD_ERROR_DYNAMIC = "1" - -IMAGE_INSTALL += "dpdk" diff --git a/conf/template.xeon-d/local.conf.sample b/conf/template.xeon-d/local.conf.sample index fd14580..5cfebf5 100644 --- a/conf/template.xeon-d/local.conf.sample +++ b/conf/template.xeon-d/local.conf.sample @@ -274,5 +274,3 @@ USERADD_GID_TABLES = "files/group" # Unfortunately, setting the variable below breaks the build, so do not set it # for now # USERADD_ERROR_DYNAMIC = "1" - -IMAGE_INSTALL += "dpdk" -- cgit v1.2.3-54-g00ecf From 5a148a1ebb40ff729a62251ca04c4cf9918e8888 Mon Sep 17 00:00:00 2001 From: Alexandru Avadanii Date: Wed, 14 Apr 2021 09:35:27 +0200 Subject: host image: drop obsolete DEPENDS - qemucross-wrapper was added during the gatesgarth rebase as a workaround and is not currently needed; - grub-efi-native was added during the initial SOTA grub integration and is no longer needed (fixed by adding the correct DEPENDS in the grub-efi recipe); Change-Id: Ib415fcd80dbcbccb6e25068abd1c5a6bbad3a460 Signed-off-by: Alexandru Avadanii --- images/enea-nfv-access-host-common.inc | 4 ---- 1 file changed, 4 deletions(-) diff --git a/images/enea-nfv-access-host-common.inc b/images/enea-nfv-access-host-common.inc index d984f95..c91e1e7 100644 --- a/images/enea-nfv-access-host-common.inc +++ b/images/enea-nfv-access-host-common.inc @@ -28,10 +28,6 @@ SYSLINUX_DEFAULT_CONSOLE_x86-64 = "console=ttyS0,115200" GRUB_TIMEOUT_x86-64 = "0" AUTO_SYSLINUXMENU_x86-64 = "0" -# grub-efi-native is needed in recipe-sysroot-native to generate the initial -# configuration file for grub -DEPENDS_append += " grub-efi-native qemuwrapper-cross" - # If building with sota enabled, build the otaimg before the hddimg, because # the hddimg needs it as a base image python __anonymous() { -- cgit v1.2.3-54-g00ecf From 82e1dd381f46548e65dac1b3341c44f8bbbed1c4 Mon Sep 17 00:00:00 2001 From: Alexandru Avadanii Date: Wed, 5 May 2021 09:30:15 +0200 Subject: layer.conf: LAYERSERIES_COMPAT: add gatesgarth Signed-off-by: Alexandru Avadanii Change-Id: I0de2153af16f32309afd96402366ab0bb3edbf85 --- conf/layer.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/conf/layer.conf b/conf/layer.conf index 7fec7c8..bd9ac81 100644 --- a/conf/layer.conf +++ b/conf/layer.conf @@ -11,3 +11,4 @@ BBFILE_COLLECTIONS += "el-nfv-access" BBFILE_PATTERN_el-nfv-access = "^${LAYERDIR}/" BBFILE_PRIORITY_el-nfv-access = "7" LAYERDEPENDS_el-nfv-access = "nfv-access-common enea-virtualization" +LAYERSERIES_COMPAT_el-nfv-access = "gatesgarth" -- cgit v1.2.3-54-g00ecf From 8ebb8350582b45f776614f2158f4c08343e0bb8e Mon Sep 17 00:00:00 2001 From: Catalin Iova Date: Wed, 28 Apr 2021 09:40:22 +0200 Subject: images: Change name to Enea Edge Change name into Enea Edge for build output files Change-Id: I760411db66617f6eabc2041db42be24fc3633c33 Signed-off-by: Catalin Iova --- conf/distro/eneanfvaccess.conf | 2 +- conf/template.atom-c3000-debug/conf-notes.txt | 2 +- conf/template.atom-c3000/conf-notes.txt | 2 +- conf/template.qemux86-64-esdk/conf-notes.txt | 2 +- conf/template.qemux86-64/conf-notes.txt | 2 +- conf/template.xeon-d-debug/conf-notes.txt | 2 +- conf/template.xeon-d/conf-notes.txt | 2 +- images/enea-edge-common.inc | 26 ++++++++++ images/enea-edge-host-common.inc | 69 +++++++++++++++++++++++++++ images/enea-edge-runtime-debug.bb | 9 ++++ images/enea-edge-runtime-esdk.bb | 7 +++ images/enea-edge-runtime-sdk.bb | 11 +++++ images/enea-edge-runtime.bb | 7 +++ images/enea-edge-vnf.bb | 16 +++++++ images/enea-nfv-access-common.inc | 26 ---------- images/enea-nfv-access-debug.bb | 9 ---- images/enea-nfv-access-esdk.bb | 7 --- images/enea-nfv-access-host-common.inc | 69 --------------------------- images/enea-nfv-access-sdk.bb | 11 ----- images/enea-nfv-access-vnf.bb | 16 ------- images/enea-nfv-access.bb | 7 --- 21 files changed, 152 insertions(+), 152 deletions(-) create mode 100644 images/enea-edge-common.inc create mode 100644 images/enea-edge-host-common.inc create mode 100644 images/enea-edge-runtime-debug.bb create mode 100644 images/enea-edge-runtime-esdk.bb create mode 100644 images/enea-edge-runtime-sdk.bb create mode 100644 images/enea-edge-runtime.bb create mode 100644 images/enea-edge-vnf.bb delete mode 100644 images/enea-nfv-access-common.inc delete mode 100644 images/enea-nfv-access-debug.bb delete mode 100644 images/enea-nfv-access-esdk.bb delete mode 100644 images/enea-nfv-access-host-common.inc delete mode 100644 images/enea-nfv-access-sdk.bb delete mode 100644 images/enea-nfv-access-vnf.bb delete mode 100644 images/enea-nfv-access.bb diff --git a/conf/distro/eneanfvaccess.conf b/conf/distro/eneanfvaccess.conf index 1b6c693..ed7383e 100644 --- a/conf/distro/eneanfvaccess.conf +++ b/conf/distro/eneanfvaccess.conf @@ -1,6 +1,6 @@ require conf/distro/enea.conf -DISTRO_NAME = "Enea NFV Access" +DISTRO_NAME = "Enea Edge Runtime" DISTRO_VERSION_MAJOR ??= "2.5" DISTRO_VERSION_MINOR ??= ".0" DISTRO_VERSION = "${DISTRO_VERSION_MAJOR}${DISTRO_VERSION_MINOR}" diff --git a/conf/template.atom-c3000-debug/conf-notes.txt b/conf/template.atom-c3000-debug/conf-notes.txt index 1c1c026..d4da82b 100644 --- a/conf/template.atom-c3000-debug/conf-notes.txt +++ b/conf/template.atom-c3000-debug/conf-notes.txt @@ -1,2 +1,2 @@ Common targets are: - enea-nfv-access-debug + enea-edge-runtime-debug diff --git a/conf/template.atom-c3000/conf-notes.txt b/conf/template.atom-c3000/conf-notes.txt index ebd6162..580c5c9 100644 --- a/conf/template.atom-c3000/conf-notes.txt +++ b/conf/template.atom-c3000/conf-notes.txt @@ -1,2 +1,2 @@ Common targets are: - enea-nfv-access + enea-edge-runtime diff --git a/conf/template.qemux86-64-esdk/conf-notes.txt b/conf/template.qemux86-64-esdk/conf-notes.txt index e939ec6..14d7575 100644 --- a/conf/template.qemux86-64-esdk/conf-notes.txt +++ b/conf/template.qemux86-64-esdk/conf-notes.txt @@ -1,2 +1,2 @@ Common targets are: - enea-nfv-access-esdk + enea-edge-runtime-esdk diff --git a/conf/template.qemux86-64/conf-notes.txt b/conf/template.qemux86-64/conf-notes.txt index e55e538..2b65747 100644 --- a/conf/template.qemux86-64/conf-notes.txt +++ b/conf/template.qemux86-64/conf-notes.txt @@ -1,2 +1,2 @@ Common targets are: - enea-nfv-access-vnf + enea-edge-vnf diff --git a/conf/template.xeon-d-debug/conf-notes.txt b/conf/template.xeon-d-debug/conf-notes.txt index 1c1c026..d4da82b 100644 --- a/conf/template.xeon-d-debug/conf-notes.txt +++ b/conf/template.xeon-d-debug/conf-notes.txt @@ -1,2 +1,2 @@ Common targets are: - enea-nfv-access-debug + enea-edge-runtime-debug diff --git a/conf/template.xeon-d/conf-notes.txt b/conf/template.xeon-d/conf-notes.txt index ebd6162..580c5c9 100644 --- a/conf/template.xeon-d/conf-notes.txt +++ b/conf/template.xeon-d/conf-notes.txt @@ -1,2 +1,2 @@ Common targets are: - enea-nfv-access + enea-edge-runtime diff --git a/images/enea-edge-common.inc b/images/enea-edge-common.inc new file mode 100644 index 0000000..5472056 --- /dev/null +++ b/images/enea-edge-common.inc @@ -0,0 +1,26 @@ +require images/enea-image-common.inc + +IMAGE_FEATURES += "ssh-server-openssh" + +IMAGE_INSTALL += " \ + packagegroup-enea-virtualization \ + kernel-modules \ + " + +# run-postinsts duplicates dpkg-configure if package_deb is used +PACKAGE_INSTALL_remove = "${@bb.utils.contains('PACKAGE_CLASSES', 'package_deb', 'run-postinsts', '', d)}" + +# After installing packages inside the rootfs, remove backup DPKG status file +rootfs_postinstall_dpkg_cleanup () { + if ${@bb.utils.contains('PACKAGE_CLASSES', 'package_deb', 'true', 'false', d)}; then + rm -f ${IMAGE_ROOTFS}/var/lib/dpkg/status-old + fi +} +ROOTFS_POSTINSTALL_COMMAND_append += " rootfs_postinstall_dpkg_cleanup;" + +IMAGE_FSTYPES = "ext4 ext4.gz tar.gz" + +# Add ostree specific image types if sota support is set +IMAGE_FSTYPES += "${@bb.utils.contains('DISTRO_FEATURES', 'sota', 'otaimg wic', ' ', d)}" +SOTA_CLIENT = "" +SOTA_CLIENT_PROV = "" diff --git a/images/enea-edge-host-common.inc b/images/enea-edge-host-common.inc new file mode 100644 index 0000000..6d446a0 --- /dev/null +++ b/images/enea-edge-host-common.inc @@ -0,0 +1,69 @@ +REQUIRE_FILES = " \ + images/enea-edge-common.inc \ + classes/override_grub-efi.inc \ + " +REQUIRE_FILES_append_df-efi-secure-boot = " \ + classes/override_image_types_ostree.inc \ + classes/override_image_types_ota.inc \ + classes/override_grub-efi_secureboot.inc \ + images/secure-boot.inc \ + " + +require ${REQUIRE_FILES} + +IMAGE_INSTALL += " \ + packagegroup-enea-virtualization-host \ + packagegroup-enea-virtualization-4gusb-modems \ + " + +# Set labels for GRUB and SYSLINUX +LABELS_LIVE = "installer live-boot" + +GRUB_GFXSERIAL_x86-64 = "1" +# Append default parameters for x86-64 targets +APPEND_x86-64 = "quiet" +SYSLINUX_DEFAULT_CONSOLE_x86-64 = "console=ttyS0,115200" + +# Skip menu and boot installer immediately +GRUB_TIMEOUT_x86-64 = "0" +AUTO_SYSLINUXMENU_x86-64 = "0" + +# grub-efi-native is needed in recipe-sysroot-native to generate the initial +# configuration file for grub +DEPENDS_append += " grub-efi-native" + +# If building with sota enabled, build the otaimg before the hddimg, because +# the hddimg needs it as a base image +python __anonymous() { + if bb.utils.contains('DISTRO_FEATURES', 'sota', True, False, d): + d.appendVarFlag("do_bootimg", "depends", " %s:do_image_otaimg" % d.getVar("IMAGE_BASENAME", True)) +} + +# Append OSTree specific parameters to the kernel command line before creating the live image +python do_bootimg_prepend () { + if bb.utils.contains('DISTRO_FEATURES', 'sota', True, False, d): + ostree_osname = d.getVar('OSTREE_OSNAME') + checksum = bb.utils.sha256_file(d.getVar('DEPLOY_DIR_IMAGE') + "/" + d.getVar('OSTREE_KERNEL')) + + # The boot tree is identified through a sha256 checksum over the kernel binary + ostree_params = " ostree=/ostree/boot.1/" + ostree_osname + "/" + checksum + "/0" + + d.setVar("APPEND", d.getVar("APPEND") + ostree_params) +} + +# Get rid of GRUB dependencies added by ostree. See: +# https://git.enea.com/cgit/linux/meta-updater.git/tree/classes/image_types_ota.bbclass#n45 +python __anonymous () { + d.delVarFlag("do_image_otaimg", "depends") + d.setVarFlag("do_image_otaimg", "depends", "e2fsprogs-native:do_populate_sysroot") +} + +# Before building the OSTree image, move DPKG data to /usr/dpkg, because +# OSTree does not preserve the contents of /var +IMAGE_CMD_ostree_prepend () { + + install -d ${IMAGE_ROOTFS}/usr/dpkg/lib/dpkg + if [ "$(ls -A ${IMAGE_ROOTFS}/var/lib/dpkg)" ]; then + mv ${IMAGE_ROOTFS}/var/lib/dpkg/* ${IMAGE_ROOTFS}/usr/dpkg/lib/dpkg/ + fi +} diff --git a/images/enea-edge-runtime-debug.bb b/images/enea-edge-runtime-debug.bb new file mode 100644 index 0000000..4736f24 --- /dev/null +++ b/images/enea-edge-runtime-debug.bb @@ -0,0 +1,9 @@ +DESCRIPTION = "Image for the host side of the Enea Edge Runtime with ODM and NETCONF Edgelink customizations" + +require images/enea-edge-host-common.inc + +IMAGE_INSTALL += " \ + element-vcpe \ + gdbserver \ + oprofile \ + " diff --git a/images/enea-edge-runtime-esdk.bb b/images/enea-edge-runtime-esdk.bb new file mode 100644 index 0000000..d424ef6 --- /dev/null +++ b/images/enea-edge-runtime-esdk.bb @@ -0,0 +1,7 @@ +DESCRIPTION = "Image for building the ESDK for the Host side" + +require images/enea-image-common.inc + +IMAGE_FEATURES += "ssh-server-openssh" + +IMAGE_FEATURES += "dbg-pkgs dev-pkgs" diff --git a/images/enea-edge-runtime-sdk.bb b/images/enea-edge-runtime-sdk.bb new file mode 100644 index 0000000..c6a15b4 --- /dev/null +++ b/images/enea-edge-runtime-sdk.bb @@ -0,0 +1,11 @@ +DESCRIPTION = "Image for building the SDK for the host side of the Enea Edge Runtime with ODM customizations" + +require images/enea-edge-host-common.inc + +IMAGE_INSTALL += " \ + element-odm-sdk \ + " + +TOOLCHAIN_TARGET_TASK_append = " kernel-devsrc" + +IMAGE_FEATURES += "dbg-pkgs dev-pkgs" diff --git a/images/enea-edge-runtime.bb b/images/enea-edge-runtime.bb new file mode 100644 index 0000000..5071619 --- /dev/null +++ b/images/enea-edge-runtime.bb @@ -0,0 +1,7 @@ +DESCRIPTION = "Image for the host side of the Enea Edge Runtime with ODM and NETCONF Edgelink customizations" + +require images/enea-edge-host-common.inc + +IMAGE_INSTALL += " \ + element-vcpe \ + " diff --git a/images/enea-edge-vnf.bb b/images/enea-edge-vnf.bb new file mode 100644 index 0000000..9351160 --- /dev/null +++ b/images/enea-edge-vnf.bb @@ -0,0 +1,16 @@ +DESCRIPTION = "VNF image of the Enea Edge Runtime, includes kernel, rootfs and boot parameters" + +require images/enea-edge-common.inc + +IMAGE_FSTYPES += "wic.qcow2" +WKS_FILE = "enea-edge-vnf-qemux86-64.wks" + +CLOUDINITPKGS = "cloud-init util-linux-blkid" +CLOUDINITPKGS += " ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'cloud-init-systemd', '', d)}" + +IMAGE_INSTALL += " \ + packagegroup-enea-virtualization-guest \ + nfv-init \ + iperf3 \ + ${CLOUDINITPKGS} \ + " diff --git a/images/enea-nfv-access-common.inc b/images/enea-nfv-access-common.inc deleted file mode 100644 index 5472056..0000000 --- a/images/enea-nfv-access-common.inc +++ /dev/null @@ -1,26 +0,0 @@ -require images/enea-image-common.inc - -IMAGE_FEATURES += "ssh-server-openssh" - -IMAGE_INSTALL += " \ - packagegroup-enea-virtualization \ - kernel-modules \ - " - -# run-postinsts duplicates dpkg-configure if package_deb is used -PACKAGE_INSTALL_remove = "${@bb.utils.contains('PACKAGE_CLASSES', 'package_deb', 'run-postinsts', '', d)}" - -# After installing packages inside the rootfs, remove backup DPKG status file -rootfs_postinstall_dpkg_cleanup () { - if ${@bb.utils.contains('PACKAGE_CLASSES', 'package_deb', 'true', 'false', d)}; then - rm -f ${IMAGE_ROOTFS}/var/lib/dpkg/status-old - fi -} -ROOTFS_POSTINSTALL_COMMAND_append += " rootfs_postinstall_dpkg_cleanup;" - -IMAGE_FSTYPES = "ext4 ext4.gz tar.gz" - -# Add ostree specific image types if sota support is set -IMAGE_FSTYPES += "${@bb.utils.contains('DISTRO_FEATURES', 'sota', 'otaimg wic', ' ', d)}" -SOTA_CLIENT = "" -SOTA_CLIENT_PROV = "" diff --git a/images/enea-nfv-access-debug.bb b/images/enea-nfv-access-debug.bb deleted file mode 100644 index 63a2322..0000000 --- a/images/enea-nfv-access-debug.bb +++ /dev/null @@ -1,9 +0,0 @@ -DESCRIPTION = "Image for the host side of the Enea NFV Access Platform with ODM and NETCONF Edgelink customizations" - -require images/enea-nfv-access-host-common.inc - -IMAGE_INSTALL += " \ - element-vcpe \ - gdbserver \ - oprofile \ - " diff --git a/images/enea-nfv-access-esdk.bb b/images/enea-nfv-access-esdk.bb deleted file mode 100644 index d424ef6..0000000 --- a/images/enea-nfv-access-esdk.bb +++ /dev/null @@ -1,7 +0,0 @@ -DESCRIPTION = "Image for building the ESDK for the Host side" - -require images/enea-image-common.inc - -IMAGE_FEATURES += "ssh-server-openssh" - -IMAGE_FEATURES += "dbg-pkgs dev-pkgs" diff --git a/images/enea-nfv-access-host-common.inc b/images/enea-nfv-access-host-common.inc deleted file mode 100644 index 1cde827..0000000 --- a/images/enea-nfv-access-host-common.inc +++ /dev/null @@ -1,69 +0,0 @@ -REQUIRE_FILES = " \ - images/enea-nfv-access-common.inc \ - classes/override_grub-efi.inc \ - " -REQUIRE_FILES_append_df-efi-secure-boot = " \ - classes/override_image_types_ostree.inc \ - classes/override_image_types_ota.inc \ - classes/override_grub-efi_secureboot.inc \ - images/secure-boot.inc \ - " - -require ${REQUIRE_FILES} - -IMAGE_INSTALL += " \ - packagegroup-enea-virtualization-host \ - packagegroup-enea-virtualization-4gusb-modems \ - " - -# Set labels for GRUB and SYSLINUX -LABELS_LIVE = "installer live-boot" - -GRUB_GFXSERIAL_x86-64 = "1" -# Append default parameters for x86-64 targets -APPEND_x86-64 = "quiet" -SYSLINUX_DEFAULT_CONSOLE_x86-64 = "console=ttyS0,115200" - -# Skip menu and boot installer immediately -GRUB_TIMEOUT_x86-64 = "0" -AUTO_SYSLINUXMENU_x86-64 = "0" - -# grub-efi-native is needed in recipe-sysroot-native to generate the initial -# configuration file for grub -DEPENDS_append += " grub-efi-native" - -# If building with sota enabled, build the otaimg before the hddimg, because -# the hddimg needs it as a base image -python __anonymous() { - if bb.utils.contains('DISTRO_FEATURES', 'sota', True, False, d): - d.appendVarFlag("do_bootimg", "depends", " %s:do_image_otaimg" % d.getVar("IMAGE_BASENAME", True)) -} - -# Append OSTree specific parameters to the kernel command line before creating the live image -python do_bootimg_prepend () { - if bb.utils.contains('DISTRO_FEATURES', 'sota', True, False, d): - ostree_osname = d.getVar('OSTREE_OSNAME') - checksum = bb.utils.sha256_file(d.getVar('DEPLOY_DIR_IMAGE') + "/" + d.getVar('OSTREE_KERNEL')) - - # The boot tree is identified through a sha256 checksum over the kernel binary - ostree_params = " ostree=/ostree/boot.1/" + ostree_osname + "/" + checksum + "/0" - - d.setVar("APPEND", d.getVar("APPEND") + ostree_params) -} - -# Get rid of GRUB dependencies added by ostree. See: -# https://git.enea.com/cgit/linux/meta-updater.git/tree/classes/image_types_ota.bbclass#n45 -python __anonymous () { - d.delVarFlag("do_image_otaimg", "depends") - d.setVarFlag("do_image_otaimg", "depends", "e2fsprogs-native:do_populate_sysroot") -} - -# Before building the OSTree image, move DPKG data to /usr/dpkg, because -# OSTree does not preserve the contents of /var -IMAGE_CMD_ostree_prepend () { - - install -d ${IMAGE_ROOTFS}/usr/dpkg/lib/dpkg - if [ "$(ls -A ${IMAGE_ROOTFS}/var/lib/dpkg)" ]; then - mv ${IMAGE_ROOTFS}/var/lib/dpkg/* ${IMAGE_ROOTFS}/usr/dpkg/lib/dpkg/ - fi -} diff --git a/images/enea-nfv-access-sdk.bb b/images/enea-nfv-access-sdk.bb deleted file mode 100644 index a957add..0000000 --- a/images/enea-nfv-access-sdk.bb +++ /dev/null @@ -1,11 +0,0 @@ -DESCRIPTION = "Image for building the SDK for the host side of the Enea NFV Access Platform with ODM customizations" - -require images/enea-nfv-access-host-common.inc - -IMAGE_INSTALL += " \ - element-odm-sdk \ - " - -TOOLCHAIN_TARGET_TASK_append = " kernel-devsrc" - -IMAGE_FEATURES += "dbg-pkgs dev-pkgs" diff --git a/images/enea-nfv-access-vnf.bb b/images/enea-nfv-access-vnf.bb deleted file mode 100644 index a3902c2..0000000 --- a/images/enea-nfv-access-vnf.bb +++ /dev/null @@ -1,16 +0,0 @@ -DESCRIPTION = "VNF image of the Enea NFV Access Platform, includes kernel, rootfs and boot parameters" - -require images/enea-nfv-access-common.inc - -IMAGE_FSTYPES += "wic.qcow2" -WKS_FILE = "enea-nfv-access-vnf-qemux86-64.wks" - -CLOUDINITPKGS = "cloud-init util-linux-blkid" -CLOUDINITPKGS += " ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'cloud-init-systemd', '', d)}" - -IMAGE_INSTALL += " \ - packagegroup-enea-virtualization-guest \ - nfv-init \ - iperf3 \ - ${CLOUDINITPKGS} \ - " diff --git a/images/enea-nfv-access.bb b/images/enea-nfv-access.bb deleted file mode 100644 index 9311992..0000000 --- a/images/enea-nfv-access.bb +++ /dev/null @@ -1,7 +0,0 @@ -DESCRIPTION = "Image for the host side of the Enea NFV Access Platform with ODM and NETCONF Edgelink customizations" - -require images/enea-nfv-access-host-common.inc - -IMAGE_INSTALL += " \ - element-vcpe \ - " -- cgit v1.2.3-54-g00ecf From 6fe33809b5751b96a35b70e06802eb908de3cfb7 Mon Sep 17 00:00:00 2001 From: Alexandru Avadanii Date: Wed, 12 May 2021 07:33:05 +0100 Subject: Add element-vcpe to enea-nfv-access image This reverts commit 9eceb046982de3da1921d97cedf4a3393e875d9a. Change-Id: I9f9eb70af6d6548f25f16f1031ba43bf298cb9e2 --- images/enea-nfv-access.bb | 1 + 1 file changed, 1 insertion(+) diff --git a/images/enea-nfv-access.bb b/images/enea-nfv-access.bb index 08239ae..9311992 100644 --- a/images/enea-nfv-access.bb +++ b/images/enea-nfv-access.bb @@ -3,4 +3,5 @@ DESCRIPTION = "Image for the host side of the Enea NFV Access Platform with ODM require images/enea-nfv-access-host-common.inc IMAGE_INSTALL += " \ + element-vcpe \ " -- cgit v1.2.3-54-g00ecf From 42c3273a33618457d31a8c22c9110b846f088e4e Mon Sep 17 00:00:00 2001 From: Catalin Iova Date: Thu, 13 May 2021 10:45:48 +0200 Subject: scripts: Rename wks file with new Enea Edge name Change-Id: Ia340aa58508bb3fd211a2a8ec715f43756424d8a Signed-off-by: Catalin Iova --- scripts/lib/wic/canned-wks/enea-edge-vnf-qemux86-64.wks | 5 +++++ scripts/lib/wic/canned-wks/enea-nfv-access-vnf-qemux86-64.wks | 5 ----- 2 files changed, 5 insertions(+), 5 deletions(-) create mode 100644 scripts/lib/wic/canned-wks/enea-edge-vnf-qemux86-64.wks delete mode 100644 scripts/lib/wic/canned-wks/enea-nfv-access-vnf-qemux86-64.wks diff --git a/scripts/lib/wic/canned-wks/enea-edge-vnf-qemux86-64.wks b/scripts/lib/wic/canned-wks/enea-edge-vnf-qemux86-64.wks new file mode 100644 index 0000000..89c8e4d --- /dev/null +++ b/scripts/lib/wic/canned-wks/enea-edge-vnf-qemux86-64.wks @@ -0,0 +1,5 @@ +# short-description: Create an MBR partition table with PCBIOS +# long-description: Create an MBR partition table with PCBIOS +part /boot --source bootimg-pcbios --label boot --active --part-type C12A7328-F81F-11D2-BA4B-00A0C93EC93B --use-uuid --align 1024 +part / --source rootfs --fstype=ext4 --label access --part-type 0FC63DAF-8483-4772-8E79-3D69D8477DE4 --use-uuid --align 1024 +bootloader --ptable gpt --timeout=5 --append="console=ttyS0,115200 hugepagesz=2M hugepages=256 isolcpus=1 nohz_full=1 rcu_nocbs=1 audit=0 quiet" diff --git a/scripts/lib/wic/canned-wks/enea-nfv-access-vnf-qemux86-64.wks b/scripts/lib/wic/canned-wks/enea-nfv-access-vnf-qemux86-64.wks deleted file mode 100644 index 89c8e4d..0000000 --- a/scripts/lib/wic/canned-wks/enea-nfv-access-vnf-qemux86-64.wks +++ /dev/null @@ -1,5 +0,0 @@ -# short-description: Create an MBR partition table with PCBIOS -# long-description: Create an MBR partition table with PCBIOS -part /boot --source bootimg-pcbios --label boot --active --part-type C12A7328-F81F-11D2-BA4B-00A0C93EC93B --use-uuid --align 1024 -part / --source rootfs --fstype=ext4 --label access --part-type 0FC63DAF-8483-4772-8E79-3D69D8477DE4 --use-uuid --align 1024 -bootloader --ptable gpt --timeout=5 --append="console=ttyS0,115200 hugepagesz=2M hugepages=256 isolcpus=1 nohz_full=1 rcu_nocbs=1 audit=0 quiet" -- cgit v1.2.3-54-g00ecf From 5987e0c051babe954238f0bce420d06da5b04b74 Mon Sep 17 00:00:00 2001 From: Adrian Calianu Date: Tue, 11 May 2021 20:29:06 +0200 Subject: core-image-minimal-initramfs: remove ixgbe since it is building from kernel source tree Change-Id: Iaaed6e3cb6d55b4f1db398def68344cc6d7de575 Signed-off-by: Adrian Calianu --- images/core-image-minimal-initramfs.bbappend | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/images/core-image-minimal-initramfs.bbappend b/images/core-image-minimal-initramfs.bbappend index 67ab251..5512158 100644 --- a/images/core-image-minimal-initramfs.bbappend +++ b/images/core-image-minimal-initramfs.bbappend @@ -1,4 +1,4 @@ -PACKAGE_INSTALL += " nfv-installer kernel-modules ixgbe" +PACKAGE_INSTALL += " nfv-installer kernel-modules" # ostree-switchroot is used by the init script to switch root to the # ostree version specified in the kernel command line -- cgit v1.2.3-54-g00ecf From 5f44786c4370a77b7724df474b017c19914d99e3 Mon Sep 17 00:00:00 2001 From: Alexandru Avadanii Date: Thu, 29 Apr 2021 16:30:41 +0200 Subject: installer: grub: merge serial/gfx boot entries - drop our class override that basically reverted the boot menu entry order and used to make serial the first (default) boot entry instead of graphical; - unset GRUB_GFXSERIAL that creates 2 boot entries instead of one; - extend APPEND to contain both tty0 (graphical) and ttyS0 (serial): * ttyS0 is last, so it has priority for selection as /dev/console; Change-Id: I9be029bfea00d9aca61527046fedbe30e7ec58c2 Signed-off-by: Alexandru Avadanii --- classes/override_grub-efi-cfg.inc | 94 ---------------------------------- images/enea-nfv-access-host-common.inc | 4 +- 2 files changed, 1 insertion(+), 97 deletions(-) delete mode 100644 classes/override_grub-efi-cfg.inc diff --git a/classes/override_grub-efi-cfg.inc b/classes/override_grub-efi-cfg.inc deleted file mode 100644 index 42d89b7..0000000 --- a/classes/override_grub-efi-cfg.inc +++ /dev/null @@ -1,94 +0,0 @@ -## ENEA_start ## -GRUB_GRAPHICS ?= "console=tty0" -## ENEA_end ## - -python build_efi_cfg() { - import sys - - workdir = d.getVar('WORKDIR') - if not workdir: - bb.error("WORKDIR not defined, unable to package") - return - - gfxserial = d.getVar('GRUB_GFXSERIAL') or "" - - labels = d.getVar('LABELS') - if not labels: - bb.debug(1, "LABELS not defined, nothing to do") - return - - if labels == []: - bb.debug(1, "No labels, nothing to do") - return - - cfile = d.getVar('GRUB_CFG') - if not cfile: - bb.fatal('Unable to read GRUB_CFG') - - try: - cfgfile = open(cfile, 'w') - except OSError: - bb.fatal('Unable to open %s' % cfile) - - cfgfile.write('# Automatically created by OE\n') - - opts = d.getVar('GRUB_OPTS') - if opts: - for opt in opts.split(';'): - cfgfile.write('%s\n' % opt) - - cfgfile.write('default=%s\n' % (labels.split()[0])) - - timeout = d.getVar('GRUB_TIMEOUT') - if timeout: - cfgfile.write('timeout=%s\n' % timeout) - else: - cfgfile.write('timeout=50\n') - - root = d.getVar('GRUB_ROOT') - if not root: - bb.fatal('GRUB_ROOT not defined') - - if gfxserial == "1": - ## ENEA_start ## - btypes = [ [ " serial console", d.getVar('GRUB_SERIAL') or "" ], - [ " graphics console", d.getVar('GRUB_GRAPHICS') or "" ] ] - ## ENEA_end ## - else: - btypes = [ [ "", "" ] ] - - for label in labels.split(): - localdata = d.createCopy() - - overrides = localdata.getVar('OVERRIDES') - if not overrides: - bb.fatal('OVERRIDES not defined') - - localdata.setVar('OVERRIDES', 'grub_' + label + ':' + overrides) - - for btype in btypes: - cfgfile.write('\nmenuentry \'%s%s\'{\n' % (label, btype[0])) - lb = label - if label == "install": - lb = "install-efi" - kernel = localdata.getVar('KERNEL_IMAGETYPE') - cfgfile.write('linux /%s LABEL=%s' % (kernel, lb)) - - cfgfile.write(' %s' % replace_rootfs_uuid(d, root)) - - append = localdata.getVar('APPEND') - initrd = localdata.getVar('INITRD') - - if append: - append = replace_rootfs_uuid(d, append) - cfgfile.write(' %s' % (append)) - - cfgfile.write(' %s' % btype[1]) - cfgfile.write('\n') - - if initrd: - cfgfile.write('initrd /initrd') - cfgfile.write('\n}\n') - - cfgfile.close() -} diff --git a/images/enea-nfv-access-host-common.inc b/images/enea-nfv-access-host-common.inc index c91e1e7..c096600 100644 --- a/images/enea-nfv-access-host-common.inc +++ b/images/enea-nfv-access-host-common.inc @@ -2,7 +2,6 @@ IMAGE_FSTYPES += "hddimg" REQUIRE_FILES = " \ images/enea-nfv-access-common.inc \ - classes/override_grub-efi-cfg.inc \ " REQUIRE_FILES_append_df-efi-secure-boot = " \ classes/override_live-vm-common.inc \ @@ -19,9 +18,8 @@ IMAGE_INSTALL += " \ # Set labels for GRUB and SYSLINUX LABELS_LIVE = "installer live-boot" -GRUB_GFXSERIAL_x86-64 = "1" # Append default parameters for x86-64 targets -APPEND_x86-64 = "quiet" +APPEND_x86-64 = "quiet console=tty0 console=ttyS0,115200" SYSLINUX_DEFAULT_CONSOLE_x86-64 = "console=ttyS0,115200" # Skip menu and boot installer immediately -- cgit v1.2.3-54-g00ecf From a3d29a419e80277de3c86ab24434bb66f9ee16a9 Mon Sep 17 00:00:00 2001 From: Adrian Calianu Date: Thu, 20 May 2021 10:27:54 +0200 Subject: enea-nfv-access-vnf: cloud-init-systemd package not found removed cloud-init-systemd package from VNF image since the content of this package is included now in cloud-init package. /usr/lib/systemd folder which supposed to be part of cloud-init-systemd is copied in cloud-init package(by default poky copy /usr/lib in ${PN}). So it result an empty folder which is not used to create cloud-init-systemd package anymore. Change-Id: I49a592f4a076df34f1d845a219d185b14722f80e Signed-off-by: Adrian Calianu --- images/enea-nfv-access-vnf.bb | 1 - 1 file changed, 1 deletion(-) diff --git a/images/enea-nfv-access-vnf.bb b/images/enea-nfv-access-vnf.bb index a3902c2..d7b810b 100644 --- a/images/enea-nfv-access-vnf.bb +++ b/images/enea-nfv-access-vnf.bb @@ -6,7 +6,6 @@ IMAGE_FSTYPES += "wic.qcow2" WKS_FILE = "enea-nfv-access-vnf-qemux86-64.wks" CLOUDINITPKGS = "cloud-init util-linux-blkid" -CLOUDINITPKGS += " ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'cloud-init-systemd', '', d)}" IMAGE_INSTALL += " \ packagegroup-enea-virtualization-guest \ -- cgit v1.2.3-54-g00ecf From 20e1f95b49cb2dfb321b770b260b0d82d49fe699 Mon Sep 17 00:00:00 2001 From: Alexandru Avadanii Date: Mon, 26 Apr 2021 14:03:43 +0200 Subject: grub: Fix duplicate/unused grubx64.efi, cleanup 1. EFI_PREFIX: Fix duplicate grubx64.efi binaries by aligning paths: * by default, upstream meta-oe and meta-secure-core both install grubx64.efi, but in different locations (/boot/EFI/BOOT vs /boot/efi/EFI/BOOT) unless we explicitely override some vars to align the 2 paths; use the old behavior (/boot/efi/EFI/BOOT), as meta-secure-core has multiple recipes that reference it, while meta-oe allows changing the path via a single var override; * note that in an OSTree deployment, these paths don't even exist on target, we explicity install grubx64.efi during Enea Edge installation by copying grubx64.efi from /EFI/BOOT in hddimg; 2. live-vm-common: use ${EFI_FILES_PATH} instead of hardcoding it; 3. core-image-minimal-initramfs, enea-nfv-access: Blacklist grub-common-extras package on x86-64 machines if OSTree is used; Depends-On: I703b53fd09c5ed75731375414f3e711ec3dadc3e Change-Id: I3735bc004ece62f94172108f2e7ed4596942deea Signed-off-by: Alexandru Avadanii --- classes/override_live-vm-common.inc | 2 +- conf/distro/eneanfvaccess.conf | 2 ++ images/core-image-minimal-initramfs.bbappend | 2 ++ images/enea-nfv-access-common.inc | 2 ++ 4 files changed, 7 insertions(+), 1 deletion(-) diff --git a/classes/override_live-vm-common.inc b/classes/override_live-vm-common.inc index dc8e076..6fabbf0 100644 --- a/classes/override_live-vm-common.inc +++ b/classes/override_live-vm-common.inc @@ -15,7 +15,7 @@ efi_populate_common() { ## ENEA_start ## # Install EFI binaries - install -m 0644 ${IMAGE_ROOTFS}/boot/efi${EFIDIR}/*.* ${DEST}${EFIDIR} + install -m 0644 ${IMAGE_ROOTFS}${EFI_FILES_PATH}/*.* ${DEST}${EFIDIR} # Install kernel and initramfs sig install -m 0644 ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}${SB_FILE_EXT} ${DEST}/${KERNEL_IMAGETYPE}${SB_FILE_EXT} diff --git a/conf/distro/eneanfvaccess.conf b/conf/distro/eneanfvaccess.conf index c31363d..2c81393 100644 --- a/conf/distro/eneanfvaccess.conf +++ b/conf/distro/eneanfvaccess.conf @@ -15,6 +15,8 @@ PREFERRED_PROVIDER_virtual/java-initial-native = "cacao-initial-native" PREFERRED_PROVIDER_virtual/java-native = "jamvm-native" PREFERRED_PROVIDER_virtual/javac-native = "ecj-bootstrap-native" +# Override ESP mount path set by meta/conf/image-uefi.conf to align with meta-secure-core paths +EFI_PREFIX_df-efi-secure-boot = "/boot/efi" SBFOLDER = "bootloader" HOSTTOOLS_append = " scp" diff --git a/images/core-image-minimal-initramfs.bbappend b/images/core-image-minimal-initramfs.bbappend index 5512158..013463a 100644 --- a/images/core-image-minimal-initramfs.bbappend +++ b/images/core-image-minimal-initramfs.bbappend @@ -7,6 +7,8 @@ PACKAGE_INSTALL_append_sota = " ostree-switchroot" # run-postinsts does not belong in the minimal initramfs PACKAGE_INSTALL_remove = "run-postinsts" +PACKAGE_EXCLUDE_x86-64_sota += "grub-common-extras" + create_enea_symlink() { # enea image used in bare metal installation cd ${DEPLOY_DIR_IMAGE} diff --git a/images/enea-nfv-access-common.inc b/images/enea-nfv-access-common.inc index df93026..2a7a8c6 100644 --- a/images/enea-nfv-access-common.inc +++ b/images/enea-nfv-access-common.inc @@ -10,6 +10,8 @@ IMAGE_INSTALL += " \ # run-postinsts duplicates dpkg-configure if package_deb is used PACKAGE_INSTALL_remove = "${@bb.utils.contains('PACKAGE_CLASSES', 'package_deb', 'run-postinsts', '', d)}" +PACKAGE_EXCLUDE_x86-64_sota += "grub-common-extras" + # After installing packages inside the rootfs, remove backup DPKG status file rootfs_postinstall_dpkg_cleanup () { if ${@bb.utils.contains('PACKAGE_CLASSES', 'package_deb', 'true', 'false', d)}; then -- cgit v1.2.3-54-g00ecf From bee43bc3d4896603e4cb1839f5a4e8c30c771e5c Mon Sep 17 00:00:00 2001 From: Alexandru Avadanii Date: Tue, 27 Apr 2021 08:53:16 +0200 Subject: distro conf: require sota.conf.inc for atom, xeon Depends-on: I658c86f562743a50e5c078899e133e279b96027b Change-Id: I7165753a5f609ef337fd1f0b450f055a5768059e Signed-off-by: Alexandru Avadanii --- conf/distro/eneanfvaccess.conf | 3 +++ conf/template.atom-c3000-debug/local.conf.sample | 11 +---------- conf/template.atom-c3000/local.conf.sample | 11 +---------- conf/template.xeon-d-debug/local.conf.sample | 11 +---------- conf/template.xeon-d/local.conf.sample | 11 +---------- images/enea-nfv-access-common.inc | 18 +++++++++++------- 6 files changed, 18 insertions(+), 47 deletions(-) diff --git a/conf/distro/eneanfvaccess.conf b/conf/distro/eneanfvaccess.conf index 2c81393..3dcec36 100644 --- a/conf/distro/eneanfvaccess.conf +++ b/conf/distro/eneanfvaccess.conf @@ -7,6 +7,9 @@ DISTRO_VERSION = "${DISTRO_VERSION_MAJOR}${DISTRO_VERSION_MINOR}" SDK_VERSION := "${@'${DISTRO_VERSION}'.replace('snapshot-${DATE}','snapshot')}" +# OSTree integration +require ${@bb.utils.contains('SOTA_MACHINE', '${MACHINE}', 'conf/distro/sota.conf.inc', '', d)} + INHERIT += "distrooverrides" DISTRO_FEATURES_append = " odm efi-secure-boot usrmerge" DISTRO_FEATURES_OVERRIDES += "odm efi-secure-boot" diff --git a/conf/template.atom-c3000-debug/local.conf.sample b/conf/template.atom-c3000-debug/local.conf.sample index 60e8955..b96bf48 100644 --- a/conf/template.atom-c3000-debug/local.conf.sample +++ b/conf/template.atom-c3000-debug/local.conf.sample @@ -155,6 +155,7 @@ EXTRA_IMAGE_FEATURES = " \ # - 'image-swab' to perform host system intrusion detection # NOTE: if listing mklibs & prelink both, then make sure mklibs is before prelink # NOTE: mklibs also needs to be explicitly enabled for a given image, see local.conf.extended +# NOTE: image-prelink is removed by sota.conf.inc USER_CLASSES ?= "buildstats image-mklibs image-prelink" # @@ -241,16 +242,6 @@ CONF_VERSION = "1" SKIP_META_VIRT_SANITY_CHECK = "1" -# -# OSTree integration -# - -SOTA_MACHINE ?= "${MACHINE}" - -DISTRO_FEATURES_append = " sota" -DISTRO_FEATURES_NATIVE_append = " sota" -INHERIT += " sota" - # Various packages dynamically add users and groups to the system at package # install time. For programs that do not care what the uid/gid is of the # resulting users/groups, the order of the install will determine the final diff --git a/conf/template.atom-c3000/local.conf.sample b/conf/template.atom-c3000/local.conf.sample index b015f43..c6cbdba 100644 --- a/conf/template.atom-c3000/local.conf.sample +++ b/conf/template.atom-c3000/local.conf.sample @@ -152,6 +152,7 @@ EXTRA_IMAGE_FEATURES = "debug-tweaks" # - 'image-swab' to perform host system intrusion detection # NOTE: if listing mklibs & prelink both, then make sure mklibs is before prelink # NOTE: mklibs also needs to be explicitly enabled for a given image, see local.conf.extended +# NOTE: image-prelink is removed by sota.conf.inc USER_CLASSES ?= "buildstats image-mklibs image-prelink" # @@ -238,16 +239,6 @@ CONF_VERSION = "1" SKIP_META_VIRT_SANITY_CHECK = "1" -# -# OSTree integration -# - -SOTA_MACHINE ?= "${MACHINE}" - -DISTRO_FEATURES_append = " sota" -DISTRO_FEATURES_NATIVE_append = " sota" -INHERIT += " sota" - # Various packages dynamically add users and groups to the system at package # install time. For programs that do not care what the uid/gid is of the # resulting users/groups, the order of the install will determine the final diff --git a/conf/template.xeon-d-debug/local.conf.sample b/conf/template.xeon-d-debug/local.conf.sample index 6474a37..4be1706 100644 --- a/conf/template.xeon-d-debug/local.conf.sample +++ b/conf/template.xeon-d-debug/local.conf.sample @@ -156,6 +156,7 @@ EXTRA_IMAGE_FEATURES = " \ # - 'image-swab' to perform host system intrusion detection # NOTE: if listing mklibs & prelink both, then make sure mklibs is before prelink # NOTE: mklibs also needs to be explicitly enabled for a given image, see local.conf.extended +# NOTE: image-prelink is removed by sota.conf.inc USER_CLASSES ?= "buildstats image-mklibs image-prelink" # @@ -242,16 +243,6 @@ CONF_VERSION = "1" SKIP_META_VIRT_SANITY_CHECK = "1" -# -# OSTree integration -# - -SOTA_MACHINE ?= "${MACHINE}" - -DISTRO_FEATURES_append = " sota" -DISTRO_FEATURES_NATIVE_append = " sota" -INHERIT += " sota" - # Various packages dynamically add users and groups to the system at package # install time. For programs that do not care what the uid/gid is of the # resulting users/groups, the order of the install will determine the final diff --git a/conf/template.xeon-d/local.conf.sample b/conf/template.xeon-d/local.conf.sample index 5cfebf5..a1a874d 100644 --- a/conf/template.xeon-d/local.conf.sample +++ b/conf/template.xeon-d/local.conf.sample @@ -153,6 +153,7 @@ EXTRA_IMAGE_FEATURES = "debug-tweaks" # - 'image-swab' to perform host system intrusion detection # NOTE: if listing mklibs & prelink both, then make sure mklibs is before prelink # NOTE: mklibs also needs to be explicitly enabled for a given image, see local.conf.extended +# NOTE: image-prelink is removed by sota.conf.inc USER_CLASSES ?= "buildstats image-mklibs image-prelink" # @@ -239,16 +240,6 @@ CONF_VERSION = "1" SKIP_META_VIRT_SANITY_CHECK = "1" -# -# OSTree integration -# - -SOTA_MACHINE ?= "${MACHINE}" - -DISTRO_FEATURES_append = " sota" -DISTRO_FEATURES_NATIVE_append = " sota" -INHERIT += " sota" - # Various packages dynamically add users and groups to the system at package # install time. For programs that do not care what the uid/gid is of the # resulting users/groups, the order of the install will determine the final diff --git a/images/enea-nfv-access-common.inc b/images/enea-nfv-access-common.inc index 2a7a8c6..b174064 100644 --- a/images/enea-nfv-access-common.inc +++ b/images/enea-nfv-access-common.inc @@ -22,15 +22,19 @@ ROOTFS_POSTINSTALL_COMMAND_append += " rootfs_postinstall_dpkg_cleanup;" IMAGE_FSTYPES += "ext4 ext4.gz tar.gz" -# Add ostree specific image types if sota support is set -IMAGE_FSTYPES += "${@bb.utils.contains('DISTRO_FEATURES', 'sota', 'ota-ext4 wic', ' ', d)}" -SOTA_CLIENT = "" -SOTA_CLIENT_PROV = "" - -# Remove aktualizr from the image, we don't use it and creates odd dependencies, e.g. +# Remove aktualizr packages from the image, we don't use it and creates odd dependencies, e.g. # it creates a systemd unit that depends on network-online.target, which leads to enabling # NetworkManager-wait-online.service, delaying boot up. -IMAGE_INSTALL_remove = " \ +SOTA_CLIENT_PROV = "" +IMAGE_INSTALL_remove_sota = " \ aktualizr \ aktualizr-info \ " + +# We currently don't use automatic push/sign/check to a backend server, so skip running useless +# OSTree tasks during image build. +IMAGE_FSTYPES_remove_sota = " \ + ostreepush \ + garagesign \ + garagecheck \ + " -- cgit v1.2.3-54-g00ecf From 59fdd6839f38976e7e6a751500629067baeaa9e9 Mon Sep 17 00:00:00 2001 From: Andreas Wellving Date: Wed, 12 May 2021 14:19:36 +0200 Subject: Add dhcpcd to group and passwd files Change-Id: Ic7ddb4b8eafb1196bbbbc5e54b6854b25336affc Signed-off-by: Andreas Wellving --- files/group | 1 + files/passwd | 1 + 2 files changed, 2 insertions(+) diff --git a/files/group b/files/group index 99cb628..cc37138 100644 --- a/files/group +++ b/files/group @@ -38,6 +38,7 @@ staff:x:50: games:x:60: shutdown:x:70: users:x:100: +dhcpcd:x:984: systemd-bus-proxy:x:985: systemd-resolve:x:986: systemd-network:x:987: diff --git a/files/passwd b/files/passwd index 2c21e09..5a26de4 100644 --- a/files/passwd +++ b/files/passwd @@ -15,6 +15,7 @@ backup:x:34:34:backup:/var/backups:/bin/sh list:x:38:38:Mailing List Manager:/var/list:/bin/sh irc:x:39:39:ircd:/var/run/ircd:/bin/sh gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +dhcpcd:x:988:984::/var/lib/dhcpcd:/bin/false systemd-bus-proxy:x:989:985::/:/bin/nologin systemd-resolve:x:990:986::/:/bin/nologin systemd-network:x:991:987::/:/bin/nologin -- cgit v1.2.3-54-g00ecf From fa7f6e8be5b9d1ceba03d2d17accdefa25eb3bf4 Mon Sep 17 00:00:00 2001 From: Alexandru Avadanii Date: Sat, 22 May 2021 13:44:22 +0200 Subject: initramfs: Cleanup upstream scripts, dependencies - do not install initramfs-module-* scripts that we won't use, e.g. initramfs-module-install, initramfs-module-install-efi; this removes their unused dependencies (e.g. grub-pc, parted), making the initramfs smaller; Depends-on: I6ce592a609650f0528314c14e6a0a2a4984ba864 Change-Id: I59143aad9ae80ad4a9a7fcbfc066d4783bcf4f2a Signed-off-by: Alexandru Avadanii --- images/core-image-minimal-initramfs.bbappend | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/images/core-image-minimal-initramfs.bbappend b/images/core-image-minimal-initramfs.bbappend index 013463a..88dd198 100644 --- a/images/core-image-minimal-initramfs.bbappend +++ b/images/core-image-minimal-initramfs.bbappend @@ -1,8 +1,10 @@ PACKAGE_INSTALL += " nfv-installer kernel-modules" -# ostree-switchroot is used by the init script to switch root to the -# ostree version specified in the kernel command line -PACKAGE_INSTALL_append_sota = " ostree-switchroot" +INITRAMFS_SCRIPTS = " \ + initramfs-framework-base \ + initramfs-module-udev \ + initramfs-module-setup-live \ +" # run-postinsts does not belong in the minimal initramfs PACKAGE_INSTALL_remove = "run-postinsts" -- cgit v1.2.3-54-g00ecf From 7b1345384ecb9feaaab3cd1d2255733c5db19140 Mon Sep 17 00:00:00 2001 From: Alexandru Avadanii Date: Mon, 24 May 2021 19:24:19 +0200 Subject: host image: drop rootfs.wic image artifact meta-intel and meta-updater both add "wic" to IMAGE_FSTYPES. However, it is not correctly configured for Enea Edge and it is not used, so let's just remove it. This also removes some build time tasks, e.g. building systemd-boot and their corresponding (unused) artifacts (systemd-bootx64.efi, linuxx64.stub.efi) from the deploy dir. Change-Id: Ib8e477bb7461708b6b7c74726a04a120b80d06d9 Signed-off-by: Alexandru Avadanii --- images/enea-nfv-access-host-common.inc | 1 + 1 file changed, 1 insertion(+) diff --git a/images/enea-nfv-access-host-common.inc b/images/enea-nfv-access-host-common.inc index c096600..8d1a5ff 100644 --- a/images/enea-nfv-access-host-common.inc +++ b/images/enea-nfv-access-host-common.inc @@ -1,4 +1,5 @@ IMAGE_FSTYPES += "hddimg" +IMAGE_FSTYPES_remove = "wic" REQUIRE_FILES = " \ images/enea-nfv-access-common.inc \ -- cgit v1.2.3-54-g00ecf From 10dfa22f6f20453dc15f801d098b693dac38265e Mon Sep 17 00:00:00 2001 From: Alexandru Avadanii Date: Tue, 25 May 2021 11:52:46 +0200 Subject: qemux86-64: bblayers: Drop meta-cloud-services meta-cloud-services/meta-openstack was used for its cloud-init recipe, which has meanwhile been moved to meta-virtualization. Change-Id: I05561cf7611a5a4de3d3a076b9c3ee0e3feea173 Signed-off-by: Alexandru Avadanii --- conf/template.qemux86-64/bblayers.conf.sample | 2 -- 1 file changed, 2 deletions(-) diff --git a/conf/template.qemux86-64/bblayers.conf.sample b/conf/template.qemux86-64/bblayers.conf.sample index ea5510a..214386c 100644 --- a/conf/template.qemux86-64/bblayers.conf.sample +++ b/conf/template.qemux86-64/bblayers.conf.sample @@ -21,6 +21,4 @@ BBLAYERS ?= " \ ##OEROOT##/meta-openembedded/meta-filesystems \ ##OEROOT##/meta-openembedded/meta-python \ ##OEROOT##/meta-openembedded/meta-webserver \ - ##OEROOT##/meta-cloud-services \ - ##OEROOT##/meta-cloud-services/meta-openstack \ " -- cgit v1.2.3-54-g00ecf From 580595398d36da3cde87046b3b03b9c2c3831249 Mon Sep 17 00:00:00 2001 From: Alexandru Avadanii Date: Mon, 26 Apr 2021 14:04:04 +0200 Subject: OSTree /boot dir: Remove unused artifacts OSTree handles the contents of /boot separately from the rest of the filesystem, see [1]. By default, upstream yocto rootfs generation stores the following artifacts in /boot: - kernel-image (bzImage) as /boot/bzImage-...; - multiple packages that deploy grub.cfg, grubenv and EFI binaries: * dpkg -S /boot/efi/EFI/BOOT shim, seloader, ovmf-pkcs7-efi, grub-efi, grub-bootconf, efitools However, none of these are ever used in Enea Edge, due to the way our initial installation and subsequent upgrade work: * live image building copies the kernel image from yocto deploy dir, EFI binaries from rootfs /boot (this patch changes this to also copy from the yocto deploy dir "bootloader" dir for uniformity) to the root of the hddimg image; * Enea Edge Installer (via utils.sh) creates the ESP partition and copies all artifacts from hddimg to ESP under /EFI/BOOT [2]; * (currently) subsequent upgrades do _not_ update the contents of the ESP /EFI/BOOT directory after initial installation; * subsequent upgrades copy the kernel and ostree-initramfs from OSTree rootfs (from /usr/lib/modules where ostree-kernel package resides) to the ESP for SELoader validation; This flow leaves unused (duplicate) artifacts in the following path: /ostree/boot.x/poky//0/boot/ While the kernel-image package can be omitted from installation, since ostree-kernel package already installs the same binaries in /usr/lib/modules (where OSTree will look for it), the rest of the packages (shim, seloader etc.) also install other files to the rootfs (e.g. CLI tools) and/or are used by the live image (hddimg) build process as sources when copying said artifacts to the hddimg image; so we can't simply skip installing them inside the rootfs. Also, we want non-SOTA artifacts (e.g. rootfs.ext4) to still contain these artifacts. So the only sensible solution to avoiding confusion and removing unused artifacts from OSTree images is to remove them right before creating the OSTree image. While at it, add some ENEA-specific comment markers to our prepend/ append fragments to make them stand out. [1] https://github.com/ostreedev/ostree/blob/v2020.8/docs/\ atomic-upgrades.md#the-ostreeboot-directory [2] http://sestogerrit02/cgit/linux/meta-enea-virtualization.git/tree/ recipes-enea/nfv-installer/nfv-installer/utils.sh?h=rocko#n230 Change-Id: I470c1c3d19f301cae4b8fbe184aa2906d4a25ddf Signed-off-by: Alexandru Avadanii --- classes/override_live-vm-common.inc | 2 +- images/enea-nfv-access-host-common.inc | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/classes/override_live-vm-common.inc b/classes/override_live-vm-common.inc index 6fabbf0..3ac92b9 100644 --- a/classes/override_live-vm-common.inc +++ b/classes/override_live-vm-common.inc @@ -15,7 +15,7 @@ efi_populate_common() { ## ENEA_start ## # Install EFI binaries - install -m 0644 ${IMAGE_ROOTFS}${EFI_FILES_PATH}/*.* ${DEST}${EFIDIR} + install -m 0644 ${DEPLOY_DIR_IMAGE}/${SBFOLDER}/*.efi ${DEST}${EFIDIR} # Install kernel and initramfs sig install -m 0644 ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}${SB_FILE_EXT} ${DEST}/${KERNEL_IMAGETYPE}${SB_FILE_EXT} diff --git a/images/enea-nfv-access-host-common.inc b/images/enea-nfv-access-host-common.inc index 8d1a5ff..a8c984f 100644 --- a/images/enea-nfv-access-host-common.inc +++ b/images/enea-nfv-access-host-common.inc @@ -30,12 +30,15 @@ AUTO_SYSLINUXMENU_x86-64 = "0" # If building with sota enabled, build the otaimg before the hddimg, because # the hddimg needs it as a base image python __anonymous() { + ## ENEA_start ## if bb.utils.contains('DISTRO_FEATURES', 'sota', True, False, d): d.appendVarFlag("do_bootimg", "depends", " %s:do_image_ota_ext4" % d.getVar("IMAGE_BASENAME", True)) + ## ENEA_end ## } # Append OSTree specific parameters to the kernel command line before creating the live image python do_bootimg_prepend () { + ## ENEA_start ## if bb.utils.contains('DISTRO_FEATURES', 'sota', True, False, d): ostree_osname = d.getVar('OSTREE_OSNAME') checksum = bb.utils.sha256_file(d.getVar('DEPLOY_DIR_IMAGE') + "/" + d.getVar('OSTREE_KERNEL')) @@ -44,18 +47,32 @@ python do_bootimg_prepend () { ostree_params = " ostree=/ostree/boot.1/" + ostree_osname + "/" + checksum + "/0" d.setVar("APPEND", d.getVar("APPEND") + ostree_params) + ## ENEA_end ## } # Before building the OSTree image, move DPKG data to /usr/dpkg, because # OSTree does not preserve the contents of /var IMAGE_CMD_ostree_prepend () { + ## ENEA_start ## + # Note: We do configure DPKG admindir at build time, but we can't do the same for APT since + # yocto hardcodes /var/lib/dpkg paths in various places in OE-core, which we can't override, + # so instead we move the contents to their expected location here and configure apt at runtime + # via a configuration fragment to use the new location. mkdir -p usr/dpkg/lib/dpkg if [ "$(ls -A var/lib/dpkg)" ]; then mv var/lib/dpkg/* usr/dpkg/lib/dpkg/ fi + # In Enea Edge, the EFI binaries (shim, seloader etc.) are copied from the yocto deploy dir to + # the installation image (hddimg) - see "classes/override_live-vm-common.inc" in this repo; + # and during Enea Edge installation (via utils.sh) from hddimg to the destination disk. + # Files installed by the package manager end up under OSTree /boot hardlink tree, but are + # never actually used. To avoid confusion and save some resources, clean them up. + rm -rf boot/* + ## ENEA_end ## } IMAGE_CMD_ota_prepend () { + ## ENEA_start ## if [ "${OSTREE_BOOTLOADER}" = "grub" ]; then # Upstream bbclass creates /boot/grub2, complement it with /boot/grub # Note: /boot/grub2 is a dir with /boot/grub2/grub.cfg -> ../loader/grub.cfg symlink @@ -63,4 +80,5 @@ IMAGE_CMD_ota_prepend () { mkdir -p ${OTA_SYSROOT}/boot ln -s loader ${OTA_SYSROOT}/boot/grub fi + ## ENEA_end ## } -- cgit v1.2.3-54-g00ecf From bb55303af0e7e1b3f24c8fd2f38f7d5028676400 Mon Sep 17 00:00:00 2001 From: Adrian Calianu Date: Mon, 14 Jun 2021 19:31:20 +0200 Subject: layer: compatible with hardknott Change-Id: Iccc5c24fe95e0f0a3cad70b9c400902787d45476 Signed-off-by: Adrian Calianu --- conf/layer.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/layer.conf b/conf/layer.conf index bd9ac81..db496a4 100644 --- a/conf/layer.conf +++ b/conf/layer.conf @@ -11,4 +11,4 @@ BBFILE_COLLECTIONS += "el-nfv-access" BBFILE_PATTERN_el-nfv-access = "^${LAYERDIR}/" BBFILE_PRIORITY_el-nfv-access = "7" LAYERDEPENDS_el-nfv-access = "nfv-access-common enea-virtualization" -LAYERSERIES_COMPAT_el-nfv-access = "gatesgarth" +LAYERSERIES_COMPAT_el-nfv-access = "hardknott" -- cgit v1.2.3-54-g00ecf From b0b7aa09e307af9678a94bdf27a310a326b9034b Mon Sep 17 00:00:00 2001 From: Adrian Calianu Date: Tue, 15 Jun 2021 15:02:11 +0200 Subject: [tmp] allow python2 support for element-vcpe Temporary solution until we upgrade vcpe to python3 and remove python2 support! python2 is out of support for long time, read https://www.python.org/doc/sunset-python-2/ https://python3statement.org/ and if you really have to temporarily use this, then set I_SWEAR_TO_MIGRATE_TO_PYTHON3 to "yes" Change-Id: If20d79fb4051633a941c368f71443ae9bf10ad6a Signed-off-by: Adrian Calianu --- conf/template.atom-c3000-debug/local.conf.sample | 3 +++ conf/template.atom-c3000/local.conf.sample | 3 +++ conf/template.xeon-d-debug/local.conf.sample | 3 +++ conf/template.xeon-d/local.conf.sample | 3 +++ 4 files changed, 12 insertions(+) diff --git a/conf/template.atom-c3000-debug/local.conf.sample b/conf/template.atom-c3000-debug/local.conf.sample index b96bf48..b5e3f8c 100644 --- a/conf/template.atom-c3000-debug/local.conf.sample +++ b/conf/template.atom-c3000-debug/local.conf.sample @@ -267,3 +267,6 @@ USERADD_GID_TABLES = "files/group" # Unfortunately, setting the variable below breaks the build, so do not set it # for now # USERADD_ERROR_DYNAMIC = "1" + +# to be removed together with python2 layer +I_SWEAR_TO_MIGRATE_TO_PYTHON3 = "yes" diff --git a/conf/template.atom-c3000/local.conf.sample b/conf/template.atom-c3000/local.conf.sample index c6cbdba..558e110 100644 --- a/conf/template.atom-c3000/local.conf.sample +++ b/conf/template.atom-c3000/local.conf.sample @@ -264,3 +264,6 @@ USERADD_GID_TABLES = "files/group" # Unfortunately, setting the variable below breaks the build, so do not set it # for now # USERADD_ERROR_DYNAMIC = "1" + +# to be removed together with python2 layer +I_SWEAR_TO_MIGRATE_TO_PYTHON3 = "yes" diff --git a/conf/template.xeon-d-debug/local.conf.sample b/conf/template.xeon-d-debug/local.conf.sample index 4be1706..e80ee61 100644 --- a/conf/template.xeon-d-debug/local.conf.sample +++ b/conf/template.xeon-d-debug/local.conf.sample @@ -268,3 +268,6 @@ USERADD_GID_TABLES = "files/group" # Unfortunately, setting the variable below breaks the build, so do not set it # for now # USERADD_ERROR_DYNAMIC = "1" + +# to be removed together with python2 layer +I_SWEAR_TO_MIGRATE_TO_PYTHON3 = "yes" diff --git a/conf/template.xeon-d/local.conf.sample b/conf/template.xeon-d/local.conf.sample index a1a874d..2b10f27 100644 --- a/conf/template.xeon-d/local.conf.sample +++ b/conf/template.xeon-d/local.conf.sample @@ -265,3 +265,6 @@ USERADD_GID_TABLES = "files/group" # Unfortunately, setting the variable below breaks the build, so do not set it # for now # USERADD_ERROR_DYNAMIC = "1" + +# to be removed together with python2 layer +I_SWEAR_TO_MIGRATE_TO_PYTHON3 = "yes" -- cgit v1.2.3-54-g00ecf From e73962113957e3c83792e3273a071bec9ade6b38 Mon Sep 17 00:00:00 2001 From: Matei Valeanu Date: Wed, 23 Jun 2021 09:32:56 +0200 Subject: Update .gitreview to track remote branch Change-Id: I52ae3d7ba29d225711a55bad678f73390590b511 Signed-off-by: Matei Valeanu --- .gitreview | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .gitreview diff --git a/.gitreview b/.gitreview new file mode 100644 index 0000000..39fc438 --- /dev/null +++ b/.gitreview @@ -0,0 +1,5 @@ +[gerrit] +host=gerrit.enea.se +port=29418 +project=linux/meta-el-nfv-access.git +track=1 -- cgit v1.2.3-54-g00ecf From eea99925d3bef32434653aa6c2fabe6de24be950 Mon Sep 17 00:00:00 2001 From: Matei Valeanu Date: Thu, 24 Jun 2021 17:29:04 +0200 Subject: Update UID/GID New groups and users: -g - kvm: added by libvirt [2] -g - render: added by systemd, after boot-up introduced in [1] Removed groups and users: -g and u - systemd-resolve and systemd-network: both were only kept for backward compatibility, not needed anymore -g - lock: systemd_246.9.bb no longer adds it in GROUPADD_PARAM, unlike systemd version on 2.4.0-2 -g and u - polkitd: systemd_246.9.bb no longer adds polkit in PACKAGECONFIG -g and u - ntp: meta-enea-virtualization/recipes-enea/ntp-user-stub/\ ntp-user-stub_1.0.bb removed -g - netdev: dbus_1.12.20.bb no longer adds netdev in GROUPADD_PARAM Added systemd_246.9.bbappend to overwrite basic.conf.in and add 'render' using GROUPADD_PARAM at build-time instead on boot-time Add new groups/users in basic.conf.in using fixed ids, in sync with /files/{group,passwd} [1] https://github.com/systemd/systemd/commit/4e15a7343cb [2] https://git.yoctoproject.org/cgit/cgit.cgi/meta-virtualization/\ commit/recipes-extended/libvirt?h=gatesgarth&id=b5b5defc78ea03c8 Change-Id: If1768a544c53552bf2eff1d8051830975ae0ed2f Signed-off-by: Matei Valeanu --- files/group | 9 ++---- files/passwd | 5 --- recipes-core/systemd/files/basic.conf.in | 50 +++++++++++++++++++++++++++++ recipes-core/systemd/systemd_247.6.bbappend | 19 +++++++++++ 4 files changed, 71 insertions(+), 12 deletions(-) create mode 100644 recipes-core/systemd/files/basic.conf.in create mode 100644 recipes-core/systemd/systemd_247.6.bbappend diff --git a/files/group b/files/group index cc37138..ffb9c82 100644 --- a/files/group +++ b/files/group @@ -34,24 +34,19 @@ utmp:x:43: video:x:44: sasl:x:45: plugdev:x:46: +kvm:x:47:qemu staff:x:50: games:x:60: shutdown:x:70: users:x:100: -dhcpcd:x:984: +render:x:983: systemd-bus-proxy:x:985: -systemd-resolve:x:986: -systemd-network:x:987: systemd-timesync:x:988: systemd-journal:x:989: -lock:x:990: sshd:x:991: qemu:x:992: -polkitd:x:993: -ntp:x:994: docker:x:995: messagebus:x:996: -netdev:x:997: bind:x:998: _apt:x:999: nogroup:x:65534: diff --git a/files/passwd b/files/passwd index 5a26de4..2b3f831 100644 --- a/files/passwd +++ b/files/passwd @@ -15,15 +15,10 @@ backup:x:34:34:backup:/var/backups:/bin/sh list:x:38:38:Mailing List Manager:/var/list:/bin/sh irc:x:39:39:ircd:/var/run/ircd:/bin/sh gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh -dhcpcd:x:988:984::/var/lib/dhcpcd:/bin/false systemd-bus-proxy:x:989:985::/:/bin/nologin -systemd-resolve:x:990:986::/:/bin/nologin -systemd-network:x:991:987::/:/bin/nologin systemd-timesync:x:992:988::/:/bin/nologin sshd:x:993:991::/var/run/sshd:/bin/false qemu:x:994:992::/home/qemu:/bin/sh -polkitd:x:995:993::/etc/polkit-1:/bin/sh -ntp:x:996:994::/var/lib/ntp:/bin/false messagebus:x:997:996::/var/lib/dbus:/bin/false bind:x:998:998::/var/cache/bind:/bin/sh _apt:x:999:999::/nonexistent:/bin/false diff --git a/recipes-core/systemd/files/basic.conf.in b/recipes-core/systemd/files/basic.conf.in new file mode 100644 index 0000000..6532f64 --- /dev/null +++ b/recipes-core/systemd/files/basic.conf.in @@ -0,0 +1,50 @@ +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. + +# The superuser +u root 0 "Super User" /root + +# Administrator group: can *see* more than normal users +g adm - - - + +# Access to certain kernel and userspace facilities +g kmem - - - +g tty @TTY_GID@ - - +g utmp - - - + +# Hardware access groups +g audio - - - +g cdrom - - - +g dialout - - - +g disk - - - +g input - - - +g lp - - - +g tape - - - +g video - - - + +# Default group for normal users +g users @USERS_GID@ - - +## ENEA_start ## +# Handle systemd-sysusers hardcoded users/groups interfering with OSTree upgrades: +# - nothing in NFVA uses the wheel group, do not create it; +# - the 'nobody' group was automatically created for the existing 'nobody' user, +# which is not necessary, NFVA already has 'nogroup' (GID 65534); +# +# Administrator group: can *do* more than normal users +# g wheel - - - +# The nobody user for NFS file systems +# u @NOBODY_USER_NAME@ 65534 "Nobody" - +# +# Keep the next users/groups in sync with those in /files/{passwd,group} +# If an upgrade updates /etc/{passwd,group} then the next users and groups already exist +# and the next lines will do nothing. If the upgrade did not update /etc/{passwd,group} +# we must dynamically add them, with fixed ids. Ids are the same as in +# /files/{passwd,group} +g kvm 47 - - +m qemu kvm +g render 983 - - +## ENEA_end ## diff --git a/recipes-core/systemd/systemd_247.6.bbappend b/recipes-core/systemd/systemd_247.6.bbappend new file mode 100644 index 0000000..871da64 --- /dev/null +++ b/recipes-core/systemd/systemd_247.6.bbappend @@ -0,0 +1,19 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/files:" + +SRC_URI_append_sota = " file://basic.conf.in" + +GROUPADD_PARAM_${PN}_append_sota = "; -r render" + +# systemd uses certain groups unless configured not to (e.g. journal logs are more +# broadly available to the 'wheel' group unless told otherwise), while some resources +# are using to the 'nobody' group. Configure systemd to: +# - not use the 'wheel' group (journal access will be restriced to root user); +# - use the proper group for 'nobody', which should have GID 65534 (for NFVA 'nogroup'); +EXTRA_OEMESON += " \ + -Dwheel-group=false \ + -Dnobody-group=nogroup \ +" + +do_configure_prepend_sota() { + cp ${WORKDIR}/basic.conf.in ${S}/sysusers.d/basic.conf.in +} -- cgit v1.2.3-54-g00ecf From b99118b3140a973c34f56101dd5534ba605c569f Mon Sep 17 00:00:00 2001 From: Adrian Calianu Date: Thu, 1 Jul 2021 14:42:03 +0200 Subject: conf: remove python2 from EneaEdge Signed-off-by: Adrian Calianu Change-Id: Ic7f02246a56515284b62281ea053d431b5eb68cb --- conf/template.atom-c3000-debug/local.conf.sample | 3 --- conf/template.atom-c3000/bblayers.conf.sample | 1 - conf/template.atom-c3000/local.conf.sample | 3 --- conf/template.xeon-d-debug/local.conf.sample | 3 --- conf/template.xeon-d/bblayers.conf.sample | 1 - conf/template.xeon-d/local.conf.sample | 3 --- 6 files changed, 14 deletions(-) diff --git a/conf/template.atom-c3000-debug/local.conf.sample b/conf/template.atom-c3000-debug/local.conf.sample index b5e3f8c..b96bf48 100644 --- a/conf/template.atom-c3000-debug/local.conf.sample +++ b/conf/template.atom-c3000-debug/local.conf.sample @@ -267,6 +267,3 @@ USERADD_GID_TABLES = "files/group" # Unfortunately, setting the variable below breaks the build, so do not set it # for now # USERADD_ERROR_DYNAMIC = "1" - -# to be removed together with python2 layer -I_SWEAR_TO_MIGRATE_TO_PYTHON3 = "yes" diff --git a/conf/template.atom-c3000/bblayers.conf.sample b/conf/template.atom-c3000/bblayers.conf.sample index f5d25ce..71c77cc 100644 --- a/conf/template.atom-c3000/bblayers.conf.sample +++ b/conf/template.atom-c3000/bblayers.conf.sample @@ -28,5 +28,4 @@ BBLAYERS ?= " \ ##OEROOT##/meta-secure-core/meta-signing-key \ ##OEROOT##/meta-secure-core/meta-efi-secure-boot \ ##OEROOT##/meta-enea-user-keys \ - ##OEROOT##/meta-python2 \ " diff --git a/conf/template.atom-c3000/local.conf.sample b/conf/template.atom-c3000/local.conf.sample index 558e110..c6cbdba 100644 --- a/conf/template.atom-c3000/local.conf.sample +++ b/conf/template.atom-c3000/local.conf.sample @@ -264,6 +264,3 @@ USERADD_GID_TABLES = "files/group" # Unfortunately, setting the variable below breaks the build, so do not set it # for now # USERADD_ERROR_DYNAMIC = "1" - -# to be removed together with python2 layer -I_SWEAR_TO_MIGRATE_TO_PYTHON3 = "yes" diff --git a/conf/template.xeon-d-debug/local.conf.sample b/conf/template.xeon-d-debug/local.conf.sample index e80ee61..4be1706 100644 --- a/conf/template.xeon-d-debug/local.conf.sample +++ b/conf/template.xeon-d-debug/local.conf.sample @@ -268,6 +268,3 @@ USERADD_GID_TABLES = "files/group" # Unfortunately, setting the variable below breaks the build, so do not set it # for now # USERADD_ERROR_DYNAMIC = "1" - -# to be removed together with python2 layer -I_SWEAR_TO_MIGRATE_TO_PYTHON3 = "yes" diff --git a/conf/template.xeon-d/bblayers.conf.sample b/conf/template.xeon-d/bblayers.conf.sample index f5d25ce..71c77cc 100644 --- a/conf/template.xeon-d/bblayers.conf.sample +++ b/conf/template.xeon-d/bblayers.conf.sample @@ -28,5 +28,4 @@ BBLAYERS ?= " \ ##OEROOT##/meta-secure-core/meta-signing-key \ ##OEROOT##/meta-secure-core/meta-efi-secure-boot \ ##OEROOT##/meta-enea-user-keys \ - ##OEROOT##/meta-python2 \ " diff --git a/conf/template.xeon-d/local.conf.sample b/conf/template.xeon-d/local.conf.sample index 2b10f27..a1a874d 100644 --- a/conf/template.xeon-d/local.conf.sample +++ b/conf/template.xeon-d/local.conf.sample @@ -265,6 +265,3 @@ USERADD_GID_TABLES = "files/group" # Unfortunately, setting the variable below breaks the build, so do not set it # for now # USERADD_ERROR_DYNAMIC = "1" - -# to be removed together with python2 layer -I_SWEAR_TO_MIGRATE_TO_PYTHON3 = "yes" -- cgit v1.2.3-54-g00ecf From 42cf32a044657fd1d1db8eb9d8f57c019cea47c6 Mon Sep 17 00:00:00 2001 From: Alexandru Avadanii Date: Fri, 2 Jul 2021 08:41:52 +0200 Subject: systemd: udev: /dev/kvm: change mode 0666 to 0660 Change-Id: I6363d78023ded97865f93307408150c7f2f6bbda Signed-off-by: Alexandru Avadanii --- recipes-core/systemd/systemd_247.6.bbappend | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/recipes-core/systemd/systemd_247.6.bbappend b/recipes-core/systemd/systemd_247.6.bbappend index 871da64..eb2b118 100644 --- a/recipes-core/systemd/systemd_247.6.bbappend +++ b/recipes-core/systemd/systemd_247.6.bbappend @@ -17,3 +17,9 @@ EXTRA_OEMESON += " \ do_configure_prepend_sota() { cp ${WORKDIR}/basic.conf.in ${S}/sysusers.d/basic.conf.in } + +do_install_append () { + # Update default udev rules for /dev/kvm to be less permissive + sed -e 's/\(KERNEL=="kvm".*\)0666/\10660/' \ + -i ${D}${rootlibexecdir}/udev/rules.d/50-udev-default.rules +} -- cgit v1.2.3-54-g00ecf From a56dcb5ce1ec5ea3c9f35c5a902efc03f7bb8118 Mon Sep 17 00:00:00 2001 From: Matei Valeanu Date: Thu, 8 Jul 2021 20:19:49 +0200 Subject: Exclude some variables from signatures SAMPLE_UEFI_SB_KEYS_DIR and SAMPLE_BOOT_KEYS_DIR are defined in meta-secure-core/meta-signing-key/conf/layer.conf using ${LAYERDIR}, which changes at each automatic build. efitools and grub-efi recipes reference the 2 variables. The variables values change at each build, and this causes efitools and grub-efi to rebuild. To avoid the rebuild, exclude the 2 variables from task signatures. Change-Id: Ib3c51c14fa1e516b64e16adbee09ab28f2f818a7 Signed-off-by: Matei Valeanu --- conf/distro/eneanfvaccess.conf | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/conf/distro/eneanfvaccess.conf b/conf/distro/eneanfvaccess.conf index 070bbb8..608c103 100644 --- a/conf/distro/eneanfvaccess.conf +++ b/conf/distro/eneanfvaccess.conf @@ -23,3 +23,8 @@ EFI_PREFIX_df-efi-secure-boot = "/boot/efi" SBFOLDER = "bootloader" HOSTTOOLS_append = " scp" + +BB_HASHBASE_WHITELIST_append += "\ + SAMPLE_UEFI_SB_KEYS_DIR \ + SAMPLE_BOOT_KEYS_DIR \ +" -- cgit v1.2.3-54-g00ecf From 06cb3727c2a013ff6927f85b9cdd708177e17609 Mon Sep 17 00:00:00 2001 From: Dan Andresan Date: Fri, 16 Jul 2021 15:58:25 +0200 Subject: distro/eneanfvaccess.conf: remove unused features Remove graphical and audio features from the distribution Change-Id: Ic5d1628d6daca0bdbd5699d5520d7f206db38865 Signed-off-by: Dan Andresan --- conf/distro/eneanfvaccess.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/conf/distro/eneanfvaccess.conf b/conf/distro/eneanfvaccess.conf index 608c103..13845e9 100644 --- a/conf/distro/eneanfvaccess.conf +++ b/conf/distro/eneanfvaccess.conf @@ -12,6 +12,7 @@ require ${@bb.utils.contains('SOTA_MACHINE', '${MACHINE}', 'conf/distro/sota.con INHERIT += "distrooverrides" DISTRO_FEATURES_append = " odm efi-secure-boot usrmerge" +DISTRO_FEATURES_remove = "x11 opengl wayland vulkan pulseaudio alsa" DISTRO_FEATURES_OVERRIDES += "odm efi-secure-boot" PREFERRED_PROVIDER_virtual/java-initial-native = "cacao-initial-native" -- cgit v1.2.3-54-g00ecf