[oe-commits] Otavio Salvador : initramfs-module-squashfs: add

GIT User account git at amethyst.openembedded.net
Tue Jan 13 18:10:40 UTC 2009


Module: openembedded.git
Branch: org.openembedded.dev
Commit: 039719a866dd668be1dc24c72711f5b882669c6f
URL:    http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=039719a866dd668be1dc24c72711f5b882669c6f

Author: Otavio Salvador <otavio at ossystems.com.br>
Date:   Tue Jan 13 16:03:30 2009 -0200

initramfs-module-squashfs: add

This is used to make the squashfs usage easier for initramfs users. It
has been created by O.S. Systems.

---

 packages/initrdscripts/files/80-squashfs.sh        |   17 +++++++++++++++++
 .../initrdscripts/initramfs-module-squashfs_1.0.bb |   12 ++++++++++++
 2 files changed, 29 insertions(+), 0 deletions(-)

diff --git a/packages/initrdscripts/files/80-squashfs.sh b/packages/initrdscripts/files/80-squashfs.sh
new file mode 100644
index 0000000..22c0954
--- /dev/null
+++ b/packages/initrdscripts/files/80-squashfs.sh
@@ -0,0 +1,17 @@
+squashfs_mount () {
+	modprobe -q squashfs
+
+	mkdir $2
+	mount -t squashfs $1 $2
+}
+
+for arg in $CMDLINE; do
+    optarg=`expr "x$arg" : 'x[^=]*=\(.*\)'`
+    echo $arg xxx $optarg 
+    case $arg in
+        squashfs=*)
+        dev=`expr "$optarg" : '\([^:]*\).*'`
+        path=`expr "$optarg" : '[^:]*:\([^:]*\).*'`
+        squashfs_mount $dev $path ;;
+    esac
+done
diff --git a/packages/initrdscripts/initramfs-module-squashfs_1.0.bb b/packages/initrdscripts/initramfs-module-squashfs_1.0.bb
new file mode 100644
index 0000000..f3d50ff
--- /dev/null
+++ b/packages/initrdscripts/initramfs-module-squashfs_1.0.bb
@@ -0,0 +1,12 @@
+SRC_URI = "file://80-squashfs.sh"
+PR = "r1"
+DESCRIPTION = "An initramfs module for mount squashfs."
+RDEPENDS = "initramfs-uniboot"
+
+do_install() {
+    install -d ${D}/initrd.d
+    install -m 0755 ${WORKDIR}/80-squashfs.sh ${D}/initrd.d/
+}
+
+PACKAGE_ARCH = "all"
+FILES_${PN} += " /initrd.d/* "





More information about the Openembedded-commits mailing list