diff options
author | Yevgeny Popovych <yevgenyp@pointgrab.com> | 2018-07-20 18:14:20 +0300 |
---|---|---|
committer | Phil Wise <philip.wise@here.com> | 2018-08-14 16:03:10 +0200 |
commit | 212d71d273023470b82854c363854b301bd11314 (patch) | |
tree | 7f2fdf96c359f8a39e440624103cd1c5309e3917 /recipes-sota/ostree-initrd/ostree-initrd.bb | |
parent | 625c3a3a7b7390012c26b34ce4bb4cd277d9ed07 (diff) | |
download | meta-updater-212d71d273023470b82854c363854b301bd11314.tar.gz |
ostree-initrd: Make it an initramfs, not initrd
The reasoning here is to allow initramfs generated by this recipe
to be included in FIT.
To do so w/o changing openembedded-core (it allows only cpio format) -
init script should be able to execute from a rootfs (i.e. true initramfs),
not ramdisk (initrd).
See [1] for more information on these keywords.
The gist of this change is switch from `pivot_root` to `switch_root`.
This also allows to get rid of some clutter, since `switch_root` handles
transition to new sysroot all by itself.
Again, see [1] for details on these utility/syscall.
[1] https://www.kernel.org/doc/Documentation/filesystems/ramfs-rootfs-initramfs.txt
Signed-off-by: Yevgeny Popovych <yevgenyp@pointgrab.com>
Diffstat (limited to 'recipes-sota/ostree-initrd/ostree-initrd.bb')
-rw-r--r-- | recipes-sota/ostree-initrd/ostree-initrd.bb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/recipes-sota/ostree-initrd/ostree-initrd.bb b/recipes-sota/ostree-initrd/ostree-initrd.bb index 6046c81..26525c8 100644 --- a/recipes-sota/ostree-initrd/ostree-initrd.bb +++ b/recipes-sota/ostree-initrd/ostree-initrd.bb | |||
@@ -1,20 +1,20 @@ | |||
1 | SUMMARY = "Extremely basic live image init script" | 1 | SUMMARY = "Initramfs for booting into libostree managed system" |
2 | LICENSE = "MIT" | 2 | LICENSE = "MIT" |
3 | LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" | 3 | LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" |
4 | |||
4 | SRC_URI = "file://init.sh" | 5 | SRC_URI = "file://init.sh" |
5 | 6 | ||
6 | S = "${WORKDIR}" | 7 | S = "${WORKDIR}" |
7 | 8 | ||
8 | PV = "3" | 9 | PV = "4" |
9 | 10 | ||
10 | do_install() { | 11 | do_install() { |
11 | install -dm 0755 ${D}/etc | 12 | install -dm 0755 ${D}/etc |
12 | touch ${D}/etc/initrd-release | 13 | touch ${D}/etc/initrd-release |
13 | install -dm 0755 ${D}/dev | 14 | install -dm 0755 ${D}/dev |
14 | install -dm 0755 ${D}/sbin | 15 | install -m 0755 ${WORKDIR}/init.sh ${D}/init |
15 | install -m 0755 ${WORKDIR}/init.sh ${D}/sbin/init | ||
16 | } | 16 | } |
17 | 17 | ||
18 | inherit allarch | 18 | inherit allarch |
19 | 19 | ||
20 | FILES_${PN} += " /dev /etc/initrd-release /sbin/init " | 20 | FILES_${PN} += " /dev /etc/initrd-release /init " |