summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGabriel Ionescu <gabriel.ionescu@enea.com>2018-11-22 13:55:53 +0100
committerGabriel Ionescu <gabriel.ionescu@enea.com>2018-11-22 13:55:53 +0100
commit0de7f6ae2a1e75d1afad2d06c65175d93d1699ed (patch)
tree9b863e7c68f125db1a76cf3fc30e7fac678fb6f9
parentfe75dcddb122fe06ebfd9d545295dcd8ce358a43 (diff)
downloadmeta-el-nfv-access-0de7f6ae2a1e75d1afad2d06c65175d93d1699ed.tar.gz
OSTree: Add OSTree kernel parameters to enable live booting
Change-Id: I9275a7a3a7ebf5f7f3a8c1384d8eade98cd8043c Signed-off-by: Gabriel Ionescu <gabriel.ionescu@enea.com>
-rw-r--r--images/enea-nfv-access-host-common.inc12
1 files changed, 12 insertions, 0 deletions
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() {
26 if bb.utils.contains('DISTRO_FEATURES', 'sota', True, False, d): 26 if bb.utils.contains('DISTRO_FEATURES', 'sota', True, False, d):
27 d.appendVarFlag("do_bootimg", "depends", " %s:do_image_otaimg" % d.getVar("IMAGE_BASENAME", True)) 27 d.appendVarFlag("do_bootimg", "depends", " %s:do_image_otaimg" % d.getVar("IMAGE_BASENAME", True))
28} 28}
29
30# Append OSTree specific parameters to the kernel command line before creating the live image
31python do_bootimg_prepend () {
32 if bb.utils.contains('DISTRO_FEATURES', 'sota', True, False, d):
33 ostree_osname = d.getVar('OSTREE_OSNAME')
34 checksum = bb.utils.sha256_file(d.getVar('DEPLOY_DIR_IMAGE') + "/" + d.getVar('OSTREE_KERNEL'))
35
36 # The boot tree is identified through a sha256 checksum over the kernel binary
37 ostree_params = " ostree=/ostree/boot.1/" + ostree_osname + "/" + checksum + "/0"
38
39 d.setVar("APPEND", d.getVar("APPEND") + ostree_params)
40}