summaryrefslogtreecommitdiffstats
path: root/classes/override_image_types_ota.inc
Commit message (Collapse)AuthorAgeFilesLines
* classes: Rebase override_image_types_{ota,ostree}Alexandru Avadanii2021-04-091-99/+0
| | | | | | | | | | | | | | | | | | | | | - 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 <Alexandru.Avadanii@enea.com> Signed-off-by: Adrian Dudau <adrian.dudau@enea.com>
* grub: Fix backwards compatibility with OSTreefeature_CPDX-3499Alexandru Avadanii2020-12-171-0/+1
| | | | | | | | | | | | | | | Before NFVA 2.3.0, OSTree only checked for the existence of /boot/grub2/grub.cfg, skipping creating grub.cfg if that file was not present. In NFVA 2.3.0, only /boot/grub/grub.cfg is created, leading to issues when trying to downgrade to an older NFVA release. To maintain backwards compatibility with OSTree versions that only check the old path, create both /boot/{grub,grub2} as symlinks to the loader directory managed by OSTree. Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com> Change-Id: Ic2c89930794e4c9d3ee3b2468d1331e5d7f63834
* grub: Fix loader link, unify grub.cfg locationstest_branchout_newtest_branchoutAlexandru Avadanii2020-09-141-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Fix an obviously broken link created during installation This led to issues creating/editing the grubenv file during NFVA installation calls to `grub-mkconfig`. These errors were not observed before, since stderr was not logged during the installation. Also, the link was fixed later on, so subsequent calls to grub-* utilities no longer complained about it; the error only happened during the NFVA installation. 2. Unify expected locations of grub.cfg Previously, there were 3 possible locations of grub.cfg used throughout the layers/scripts: - /boot/loader/grub.cfg - the proper location, used by NFVA installer components, as well as ostree related tooling; - /boot/grub/grub.cfg - used in some recipes, but not present on the board currently. Also the expected default location of our current grub-* utilites, since we build grub without an explicit `--with-grubdir` configure argument, which defaults (guessing) to the `PACKAGE` name, in our case `grub` (and not `grub2`); - /boot/grub2/grub.cfg - used in OTA image scripts by linking it to /boot/loader/grub.cfg - however the link is later converted into a real file, ending up duplicating the real grub.cfg (although they are identical content-wise, they might confuse the user); To settle this confusion, we will keep only /boot/loader/grub.cfg as the true configuration file and convert /boot/grub2 to a symlink pointing at /boot/loader, while also renaming it to /boot/grub. This has the benefit of "fixing" all grub-* tools which try to write their configuration files to /boot/grub. An alternative for that would be building grub2 with the configure flag `--with-grubdir=loader`, but that might break other things, so a symlink for the traditional /boot/grub is safer. Before creating this link, `grub-editenv list` would not work without explicitly providing the filepath of the `/boot/loader/grubenv` file, which might not be obvious for the end user. Also, before this link, `grub-mkconfig` required explicitly setting the `-p` (prefix) to '/' while running on the target. Both of these issues will be fixed with the new link. Since our ostree version (2018.7) is quite old, it requires one backport for it to also check for /boot/grub/grub.cfg and not only /boot/grub2/grub.cfg. The backport will be handled in the meta-enea-virtualiation layer, hence this change's dependency. Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com> Depends-on: I6bdc80e08a272e1534dd63717348bfaa50807d93 Change-Id: If8a61c89200414922a3f36e6c8fca58d7d3b6495
* ostree and otaimg enhancementsMatei Valeanu2019-06-261-0/+98
override_image_types_ostree.inc - do_image_ostree task: -add dirs, cleandirs flags, to avoid mktemp, rm, cd, and to also remove at clean -add subimages, imgsuffix flags, to use automatic link creation -create image in IMGDEPLOYDIR, instead of DEPLOY_DIR_IMAGE to use the automatic deploy and clean mechanism (also helps in cleaning old images) override_image_types_ota.inc - do_image_otaimg task: -add dirs, cleandirs flags, to avoid mktemp, rm, cd, and to also remove at clean -avoid untar-ing the ostree image, and use OSTREE_ROOTFS -create image in IMGDEPLOYDIR, instead of DEPLOY_DIR_IMAGE to use the automatic deploy and clean mechanism Move OSTREE_REPO to "${WORKDIR}/ostree-repo", instead of DEPLOY_DIR_IMAGE, this repo is needed for otaimg creation sota_xeon-d.bbclass sota_atom-c3000.bbclass: -set ROOTFS_sota to IMGDEPLOYDIR insted of DEPLOY_DIR_IMAGE, as this is where the otaimg is now created; also use IMAGE_LINK_NAME istead of IMAGE_NAME, to have the correct reference to the image, even if the image was built in a previous run (IMAGE_NAME differs in this case) Change-Id: I44e87311d1819b80d34f924630d09e429d411d41 Signed-off-by: Matei Valeanu <Matei.Valeanu@enea.com>