* initramfs-module-bootmenu: Add support for jffs2 booting and "drop to shell" option.
authorPaul Sokolovsky <pmiscml@gmail.com>
Sun, 17 Feb 2008 02:56:43 +0000 (02:56 +0000)
committerPaul Sokolovsky <pmiscml@gmail.com>
Sun, 17 Feb 2008 02:56:43 +0000 (02:56 +0000)
packages/initrdscripts/files/10-initfs.sh
packages/initrdscripts/files/30-bootmenu.sh
packages/initrdscripts/initramfs-module-bootmenu_1.0.bb
packages/initrdscripts/initramfs-module-initfs_1.0.bb

index bad649e..c2a843e 100644 (file)
@@ -3,3 +3,4 @@
 modprobe -q vfat >/dev/null 2>&1
 modprobe -q ext2 >/dev/null 2>&1
 modprobe -q ext3 >/dev/null 2>&1
+modprobe -q jffs2 >/dev/null 2>&1
index d54a643..a45b55a 100644 (file)
@@ -95,6 +95,7 @@ while read maj min nblk dev; do
 done < /proc/partitions
 
 add_menu_item "NFS (nfsroot=192.168.2.200:/srv/nfs/oe/image)"
+add_menu_item "Shell"
 
 total=`echo -e $list | wc -l`
 num=0
@@ -142,8 +143,11 @@ echo Selected: $sel
 
 dev=`expr "$sel" : '\([^ /]*\)'`
 path=`expr "$sel" : '[^/]*\([^ ]*\).*'`
+fstype=`expr "$sel" : '[^ ]* *\(.*\)'`
 
-if [ "$dev" == "NFS" ]; then
+if [ "$dev" == "Shell" ]; then
+    exec /bin/sh
+elif [ "$dev" == "NFS" ]; then
     ROOT_DEVICE="/dev/nfs"
     CMDLINE="$CMDLINE root=/dev/nfs nfsroot=192.168.2.200:/srv/nfs/oe/image"
 elif [ -n "$path" ]; then
@@ -151,6 +155,10 @@ elif [ -n "$path" ]; then
     CMDLINE="$CMDLINE root=/dev/loop looproot=/dev/$dev:$path"
 else
     ROOT_DEVICE="/dev/$dev"
+    # jffs2 is not recognized by mount automagically
+    if [ "$fstype" == "(jffs2)" ]; then
+       FSTYPE="jffs2"
+    fi
     CMDLINE="$CMDLINE root=$ROOT_DEVICE"
 fi
 
index 8b9a49f..6f3c6ec 100644 (file)
@@ -1,5 +1,5 @@
 SRC_URI = "file://30-bootmenu.sh"
-PR = "r9"
+PR = "r10"
 DESCRIPTION = "An initramfs module with UI for selection of boot device."
 RDEPENDS = "klibc-utils-fstype initramfs-uniboot initramfs-module-block initramfs-module-loop initramfs-module-nfs"
 # For VFAT mounting.
index 64bba4a..2c2ec07 100644 (file)
@@ -1,5 +1,5 @@
 SRC_URI = "file://10-initfs.sh"
-PR = "r2"
+PR = "r4"
 DESCRIPTION = "An initramfs module for initializing filesystems."
 RDEPENDS = "initramfs-uniboot"
 RRECOMMENDS = "kernel-module-vfat kernel-module-ext2"