From 0de7f6ae2a1e75d1afad2d06c65175d93d1699ed Mon Sep 17 00:00:00 2001 From: Gabriel Ionescu Date: Thu, 22 Nov 2018 13:55:53 +0100 Subject: OSTree: Add OSTree kernel parameters to enable live booting Change-Id: I9275a7a3a7ebf5f7f3a8c1384d8eade98cd8043c Signed-off-by: Gabriel Ionescu --- images/enea-nfv-access-host-common.inc | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/images/enea-nfv-access-host-common.inc b/images/enea-nfv-access-host-common.inc index 83d7bd0..5e071ef 100644 --- a/images/enea-nfv-access-host-common.inc +++ b/images/enea-nfv-access-host-common.inc @@ -26,3 +26,15 @@ 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) +} -- cgit v1.2.3-54-g00ecf