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 --- images/enea-nfv-access-host-common.inc | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'images') 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