From 47921feae0a5eaa41b18c5d15da9c1f6619b40c5 Mon Sep 17 00:00:00 2001 From: Phil Wise Date: Fri, 21 Apr 2017 09:57:01 +0200 Subject: Mount the root filesystem by label rather than path Support identifying the root filesystem via a kernel command line like 'ostree_root=LABEL=mylabel'. Also make it mount a filesystem labeled 'otaroot' by default. This means it is possible to test the Minnowboard build in Qemu. --- recipes-sota/ostree-initrd/files/init.sh | 3 ++- recipes-sota/ostree-initrd/ostree-initrd.bb | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'recipes-sota/ostree-initrd') diff --git a/recipes-sota/ostree-initrd/files/init.sh b/recipes-sota/ostree-initrd/files/init.sh index 806a7b1..1814ca3 100644 --- a/recipes-sota/ostree-initrd/files/init.sh +++ b/recipes-sota/ostree-initrd/files/init.sh @@ -29,10 +29,11 @@ get_ostree_sysroot() { for opt in `cat /proc/cmdline`; do arg=`echo $opt | cut -d'=' -f1` if [ $arg == "ostree_root" ]; then - echo $opt | cut -d'=' -f2 + echo $opt | cut -d'=' -f2- return fi done + echo "LABEL=otaroot" } export PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/lib/ostree diff --git a/recipes-sota/ostree-initrd/ostree-initrd.bb b/recipes-sota/ostree-initrd/ostree-initrd.bb index 5c85bee..b721405 100644 --- a/recipes-sota/ostree-initrd/ostree-initrd.bb +++ b/recipes-sota/ostree-initrd/ostree-initrd.bb @@ -5,15 +5,16 @@ SRC_URI = "file://init.sh" S = "${WORKDIR}" +PV = "2" + do_install() { install -dm 0755 ${D}/etc touch ${D}/etc/initrd-release install -dm 0755 ${D}/dev install -dm 0755 ${D}/sbin - install -m 0755 ${WORKDIR}/init.sh ${D}/sbin/init + install -m 0755 ${WORKDIR}/init.sh ${D}/sbin/init } inherit allarch FILES_${PN} += " /dev /etc/initrd-release /sbin/init " - -- cgit v1.2.3-54-g00ecf