[oe-commits] org.oe.angstrom-2007.12-stable Merge from .dev:

pfalcon commit openembedded-commits at lists.openembedded.org
Thu Feb 21 14:48:41 UTC 2008


Merge from .dev:

6453c1938bbcd0ab830b8bc186e501a3ec4ebb10 initramfs-module-bootmenu, initramfs-module-kexecboot: Fixes for kexecing. (PaulS, Koen)
766dada8a567205427a8c1eefb0fbe5923190602 initramfs-uniboot: Modprobe mtdblock and factor out fatal(). (PaulS, Koen)
461df56d5cc4fa62e620c9efe56f3253258ee0f5 initramfs-module-block: Accept additional FSTYPE param, handle mount failure. (PaulS, Koen)
f6ab5be390e4400fb993f0e449049b62daece68e initramfs-module-bootmenu: Add support for jffs2 booting and "drop to shell" option. (PaulS, Koen)
bfa62d5baf96a6142cf2f6eb0833399d79630633 initramfs-uniboot: FSTYPE -> ROOT_FSTYPE, set from rootfstype= command line param. (PaulS, Koen)

Author: pfalcon at openembedded.org
Branch: org.openembedded.angstrom-2007.12-stable
Revision: 6fbe552c10dbb8aa63d89cc3cee12dfd167c5fb5
ViewMTN: http://monotone.openembedded.org/revision/info/6fbe552c10dbb8aa63d89cc3cee12dfd167c5fb5
Files:
1
packages/initrdscripts/files/10-initfs.sh
packages/initrdscripts/files/30-bootmenu.sh
packages/initrdscripts/files/85-blockboot.sh
packages/initrdscripts/files/87-kexecboot.sh
packages/initrdscripts/files/init.sh
packages/initrdscripts/initramfs-module-block_1.0.bb
packages/initrdscripts/initramfs-module-bootmenu_1.0.bb
packages/initrdscripts/initramfs-module-initfs_1.0.bb
packages/initrdscripts/initramfs-module-kexecboot_1.0.bb
packages/initrdscripts/initramfs-uniboot_1.0.bb
Diffs:

#
# mt diff -rdc7c2c353b6e1171533cfd4b443ff57f209c2517 -r6fbe552c10dbb8aa63d89cc3cee12dfd167c5fb5
#
# 
# 
# patch "packages/initrdscripts/files/10-initfs.sh"
#  from [31e75b6e96fa83b4f7cf734dd5852b1f4aab02e9]
#    to [5f0d6f2403263afd21f7a7a0b34c979666f7a4ef]
# 
# patch "packages/initrdscripts/files/30-bootmenu.sh"
#  from [217e6fb3656133f0b3da59e7967d23f3bdf7a59a]
#    to [b378e73bcd2daa97bd9e9134000a2ade7fe2538f]
# 
# patch "packages/initrdscripts/files/85-blockboot.sh"
#  from [e1e0ab71a19561305b6a02ff169c7e789c5359ae]
#    to [e0ae45c3c5c308f37255fd249ea75bdacb3d5f67]
# 
# patch "packages/initrdscripts/files/87-kexecboot.sh"
#  from [d2082585f4d6be02d62797744802d10c9ddce372]
#    to [73528951640012dc82e2f85bfa592a5762cc3f45]
# 
# patch "packages/initrdscripts/files/init.sh"
#  from [d6057201f9ee2a9e2d44ed71124d43142bc1a05f]
#    to [96fb4bc0a57019aa64a5b8316e5868a507195f87]
# 
# patch "packages/initrdscripts/initramfs-module-block_1.0.bb"
#  from [1d63081f1074144e693737bd6ca954bd64c1b1a2]
#    to [7ce2aaa3caaaea18e4f89c97ac9fda1e79b2f1a4]
# 
# patch "packages/initrdscripts/initramfs-module-bootmenu_1.0.bb"
#  from [394be03a399dd523d0e97625df53ae15512e0a5d]
#    to [ed86798f2ad4cb2713e525c7939d02a161e7465a]
# 
# patch "packages/initrdscripts/initramfs-module-initfs_1.0.bb"
#  from [e8b2ca5b6f8808155c08371d32e7b42f94caa7bb]
#    to [71d1fee98407e78577c2537c60488436d5a31c88]
# 
# patch "packages/initrdscripts/initramfs-module-kexecboot_1.0.bb"
#  from [8f53faf60c2ed70390b85b76940ba0ca9619e5a3]
#    to [50b73fbc6eac528a3565056e247019833cf00d3b]
# 
# patch "packages/initrdscripts/initramfs-uniboot_1.0.bb"
#  from [716f3127ca0421f8c9920adbb82ec03ace9a4717]
#    to [614ab72976521dc2833ecb9383e5556d18c05fa6]
# 
============================================================
--- packages/initrdscripts/files/10-initfs.sh	31e75b6e96fa83b4f7cf734dd5852b1f4aab02e9
+++ packages/initrdscripts/files/10-initfs.sh	5f0d6f2403263afd21f7a7a0b34c979666f7a4ef
@@ -1,5 +1,6 @@ modprobe -q ext3 >/dev/null 2>&1
 #!/bin/sh
 
 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
============================================================
--- packages/initrdscripts/files/30-bootmenu.sh	217e6fb3656133f0b3da59e7967d23f3bdf7a59a
+++ packages/initrdscripts/files/30-bootmenu.sh	b378e73bcd2daa97bd9e9134000a2ade7fe2538f
@@ -95,6 +95,7 @@ add_menu_item "NFS (nfsroot=192.168.2.20
 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,15 +143,23 @@ path=`expr "$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 nfsroot=192.168.2.200:/srv/nfs/oe/image"
+    CMDLINE="$CMDLINE root=/dev/nfs nfsroot=192.168.2.200:/srv/nfs/oe/image"
 elif [ -n "$path" ]; then
     ROOT_DEVICE="/dev/loop"
-    CMDLINE="looproot=/dev/$dev:$path"
+    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
+	ROOT_FSTYPE="jffs2"
+    fi
+    CMDLINE="$CMDLINE root=$ROOT_DEVICE"
 fi
 
 echo ROOT_DEVICE=$ROOT_DEVICE
============================================================
--- packages/initrdscripts/files/85-blockboot.sh	e1e0ab71a19561305b6a02ff169c7e789c5359ae
+++ packages/initrdscripts/files/85-blockboot.sh	e0ae45c3c5c308f37255fd249ea75bdacb3d5f67
@@ -1,8 +1,12 @@ if [ -e "$ROOT_DEVICE" ]; then
 #!/bin/sh
 # Allow booting from a normal block device.
 
 if [ -e "$ROOT_DEVICE" ]; then
     echo "booting from: $ROOT_DEVICE"
-    mount "$ROOT_DEVICE" /mnt
+    type=""
+    if [ -n "$ROOT_FSTYPE" ]; then
+	type="-t $ROOT_FSTYPE"
+    fi
+    mount $type "$ROOT_DEVICE" /mnt || fatal "Unable to mount rootfs device"
     BOOT_ROOT=/mnt
 fi
============================================================
--- packages/initrdscripts/files/87-kexecboot.sh	d2082585f4d6be02d62797744802d10c9ddce372
+++ packages/initrdscripts/files/87-kexecboot.sh	73528951640012dc82e2f85bfa592a5762cc3f45
@@ -1,17 +1,19 @@ if [ -n "$BOOT_ROOT" -a -f "$BOOT_ROOT/b
 #!/bin/sh
 # Allow kexecing to kernel in rootfs
 
 if [ -n "$BOOT_ROOT" -a -f "$BOOT_ROOT/boot/zImage" ]; then
-    echo "Kernel found in rootfs:"
-    ls -l "$BOOT_ROOT/boot/zImage"
-    initramfs=""
-    if [ -f "$BOOT_ROOT/boot/initramfs.bin" ]; then
-	echo "Initramfs found in rootfs:"
-	ls -l "$BOOT_ROOT/boot/initramfs.bin"
-	initramfs="--initrd=$BOOT_ROOT/boot/initramfs.bin"
+    if ! expr "$CMDLINE" : '.*nokexec'; then
+	echo "Kernel found in rootfs:"
+	ls -l "$BOOT_ROOT/boot/zImage"
+	initramfs=""
+	if [ -f "$BOOT_ROOT/boot/initramfs.bin" ]; then
+	    echo "Initramfs found in rootfs:"
+	    ls -l "$BOOT_ROOT/boot/initramfs.bin"
+    	    initramfs="--initrd=$BOOT_ROOT/boot/initramfs.bin"
+        fi
+	echo /usr/sbin/kexec -f "$BOOT_ROOT/boot/zImage" $initramfs --command-line="$CMDLINE nokexec"
+        sleep 10
+	/usr/sbin/kexec -f "$BOOT_ROOT/boot/zImage" $initramfs --command-line="$CMDLINE nokexec"
+        sleep 10000
     fi
-    echo /usr/sbin/kexec -f "$BOOT_ROOT/boot/zImage" $initramfs --command-line="$CMDLINE"
-    sleep 10
-    /usr/sbin/kexec -f "$BOOT_ROOT/boot/zImage" $initramfs --command-line="$CMDLINE"
-    sleep 10000
 fi
============================================================
--- packages/initrdscripts/files/init.sh	d6057201f9ee2a9e2d44ed71124d43142bc1a05f
+++ packages/initrdscripts/files/init.sh	96fb4bc0a57019aa64a5b8316e5868a507195f87
@@ -8,6 +8,7 @@ early_setup() {
     mkdir /proc
     mount -t proc proc /proc
     mkdir /mnt
+    modprobe -q mtdblock
 }
 
 dev_setup()
@@ -30,6 +31,8 @@ read_args() {
         case $arg in
             root=*)
                 ROOT_DEVICE=$optarg ;;
+            rootfstype=*)
+                ROOT_FSTYPE=$optarg ;;
             rootdelay=*)
                 rootdelay=$optarg ;;
         esac
@@ -48,13 +51,13 @@ boot_root() {
     exec switch_root -c /dev/console $BOOT_ROOT /sbin/init
 }
 
-boot_failed() {
-    echo "No valid root device was specified.  Please add root=/dev/something to"
-    echo "the kernel command-line and try again."
+fatal() {
+    echo $1
     echo
     exec sh
 }
 
+
 echo "Starting initramfs boot..."
 early_setup
 read_args
@@ -68,4 +71,5 @@ load_modules
 
 load_modules
 [ -n "$BOOT_ROOT" ] && boot_root
+
+fatal "No valid root device was specified.  Please add root=/dev/something to the kernel command-line and try again."
-boot_failed
============================================================
--- packages/initrdscripts/initramfs-module-block_1.0.bb	1d63081f1074144e693737bd6ca954bd64c1b1a2
+++ packages/initrdscripts/initramfs-module-block_1.0.bb	7ce2aaa3caaaea18e4f89c97ac9fda1e79b2f1a4
@@ -1,5 +1,5 @@ SRC_URI = "file://85-blockboot.sh"
 SRC_URI = "file://85-blockboot.sh"
-PR = "r1"
+PR = "r3"
 RDEPENDS = "initramfs-uniboot"
 DESCRIPTION = "An initramfs module for booting off normal block devices."
 
============================================================
--- packages/initrdscripts/initramfs-module-bootmenu_1.0.bb	394be03a399dd523d0e97625df53ae15512e0a5d
+++ packages/initrdscripts/initramfs-module-bootmenu_1.0.bb	ed86798f2ad4cb2713e525c7939d02a161e7465a
@@ -1,5 +1,5 @@ SRC_URI = "file://30-bootmenu.sh"
 SRC_URI = "file://30-bootmenu.sh"
-PR = "r8"
+PR = "r11"
 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.
============================================================
--- packages/initrdscripts/initramfs-module-initfs_1.0.bb	e8b2ca5b6f8808155c08371d32e7b42f94caa7bb
+++ packages/initrdscripts/initramfs-module-initfs_1.0.bb	71d1fee98407e78577c2537c60488436d5a31c88
@@ -1,5 +1,5 @@ SRC_URI = "file://10-initfs.sh"
 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"
============================================================
--- packages/initrdscripts/initramfs-module-kexecboot_1.0.bb	8f53faf60c2ed70390b85b76940ba0ca9619e5a3
+++ packages/initrdscripts/initramfs-module-kexecboot_1.0.bb	50b73fbc6eac528a3565056e247019833cf00d3b
@@ -1,5 +1,5 @@ SRC_URI = "file://87-kexecboot.sh"
 SRC_URI = "file://87-kexecboot.sh"
-PR = "r0.2"
+PR = "r0.4"
 DESCRIPTION = "An initramfs module for kexecing kernel from rootfs."
 RDEPENDS = "initramfs-uniboot kexec-static"
 
============================================================
--- packages/initrdscripts/initramfs-uniboot_1.0.bb	716f3127ca0421f8c9920adbb82ec03ace9a4717
+++ packages/initrdscripts/initramfs-uniboot_1.0.bb	614ab72976521dc2833ecb9383e5556d18c05fa6
@@ -1,6 +1,7 @@ SRC_URI = "file://init.sh"
 SRC_URI = "file://init.sh"
-PR = "r2"
+PR = "r4"
 DESCRIPTON = "A modular initramfs init script system."
+RRECOMMENDS = "kernel-module-mtdblock"
 
 do_install() {
         install -m 0755 ${WORKDIR}/init.sh ${D}/init






More information about the Openembedded-commits mailing list