[OE-core] [PATCH 4/5] initramfs-module-e2fs: add
Otavio Salvador
otavio at ossystems.com.br
Tue Dec 6 16:07:30 UTC 2011
Signed-off-by: Otavio Salvador <otavio at ossystems.com.br>
---
.../initrdscripts/initramfs-module-e2fs/e2fs | 28 ++++++++++++++++++++
.../initrdscripts/initramfs-module-e2fs_1.0.bb | 15 ++++++++++
2 files changed, 43 insertions(+), 0 deletions(-)
create mode 100755 meta/recipes-core/initrdscripts/initramfs-module-e2fs/e2fs
create mode 100644 meta/recipes-core/initrdscripts/initramfs-module-e2fs_1.0.bb
diff --git a/meta/recipes-core/initrdscripts/initramfs-module-e2fs/e2fs b/meta/recipes-core/initrdscripts/initramfs-module-e2fs/e2fs
new file mode 100755
index 0000000..29f801a
--- /dev/null
+++ b/meta/recipes-core/initrdscripts/initramfs-module-e2fs/e2fs
@@ -0,0 +1,28 @@
+#!/bin/sh
+# Copyright (C) 2011 O.S. Systems Software LTDA.
+# Licensed on MIT
+
+e2fs_enabled() {
+ return 0
+}
+
+e2fs_run() {
+ filesystems="ext4 ext3 ext2"
+
+ # load modules
+ for fs in $filesystems; do
+ load_kernel_module $fs
+ done
+
+ for fs in $filesystems; do
+ eval "fs_options=\$bootparam_${fs}"
+ if [ -n "$fs_options" ]; then
+ dev=`expr "$fs_options" : '\([^:]*\).*'`
+ path=`expr "$fs_options" : '[^:]*:\([^:]*\).*'`
+
+ info "Mounting $dev as $fs on $path as $fs..."
+ mkdir -p $path
+ mount -t $fs $dev $path
+ fi
+ done
+}
diff --git a/meta/recipes-core/initrdscripts/initramfs-module-e2fs_1.0.bb b/meta/recipes-core/initrdscripts/initramfs-module-e2fs_1.0.bb
new file mode 100644
index 0000000..89f15ae
--- /dev/null
+++ b/meta/recipes-core/initrdscripts/initramfs-module-e2fs_1.0.bb
@@ -0,0 +1,15 @@
+DESCRIPTION = "initramfs support for ext2/ext3/ext3"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
+RDEPENDS = "initramfs-base"
+
+inherit allarch
+
+SRC_URI = "file://e2fs"
+
+do_install() {
+ install -d ${D}/init.d
+ install -m 0755 ${WORKDIR}/e2fs ${D}/init.d/20-e2fs
+}
+
+FILES_${PN} = "/init.d/*"
--
1.7.2.5
More information about the Openembedded-core
mailing list