mirror of
https://git.yoctoproject.org/poky
synced 2026-05-08 05:09:24 +00:00
initramfs-framework: add lvm module
lvm module will initial lvm volume to support boot from Logical Volume. (From OE-Core rev: 3a4213f014fc4aa5be05dfc0722d87e01e5ff10c) Signed-off-by: Liwei Song <liwei.song@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
2d15516d40
commit
ba771bf192
@@ -0,0 +1,13 @@
|
||||
#!/bin/sh
|
||||
|
||||
lvm_enabled() {
|
||||
if ! lvscan |grep -i -w "inactive" &>/dev/null;then
|
||||
return 1
|
||||
fi
|
||||
return 0
|
||||
}
|
||||
|
||||
lvm_run() {
|
||||
lvm pvscan --cache --activate ay
|
||||
udevadm trigger --action=add
|
||||
}
|
||||
@@ -17,6 +17,7 @@ SRC_URI = "file://init \
|
||||
file://udev \
|
||||
file://e2fs \
|
||||
file://debug \
|
||||
file://lvm \
|
||||
"
|
||||
|
||||
S = "${WORKDIR}"
|
||||
@@ -45,6 +46,9 @@ do_install() {
|
||||
# debug
|
||||
install -m 0755 ${WORKDIR}/debug ${D}/init.d/00-debug
|
||||
|
||||
# lvm
|
||||
install -m 0755 ${WORKDIR}/lvm ${D}/init.d/09-lvm
|
||||
|
||||
# Create device nodes expected by some kernels in initramfs
|
||||
# before even executing /init.
|
||||
install -d ${D}/dev
|
||||
@@ -59,6 +63,7 @@ PACKAGES = "${PN}-base \
|
||||
initramfs-module-nfsrootfs \
|
||||
initramfs-module-rootfs \
|
||||
initramfs-module-debug \
|
||||
initramfs-module-lvm \
|
||||
"
|
||||
|
||||
FILES_${PN}-base = "/init /init.d/99-finish /dev"
|
||||
@@ -98,3 +103,7 @@ FILES_initramfs-module-rootfs = "/init.d/90-rootfs"
|
||||
SUMMARY_initramfs-module-debug = "initramfs dynamic debug support"
|
||||
RDEPENDS_initramfs-module-debug = "${PN}-base"
|
||||
FILES_initramfs-module-debug = "/init.d/00-debug"
|
||||
|
||||
SUMMARY_initramfs-module-lvm = "initramfs lvm rootfs support"
|
||||
RDEPENDS_initramfs-module-lvm = "${PN}-base"
|
||||
FILES_initramfs-module-lvm = "/init.d/09-lvm"
|
||||
|
||||
Reference in New Issue
Block a user