]> git.openpandora.org Git - openembedded.git/commitdiff
initramfs-uniboot: Modprobe mtdblock and factor out fatal().
authorPaul Sokolovsky <pmiscml@gmail.com>
Sun, 17 Feb 2008 02:52:18 +0000 (02:52 +0000)
committerPaul Sokolovsky <pmiscml@gmail.com>
Sun, 17 Feb 2008 02:52:18 +0000 (02:52 +0000)
packages/initrdscripts/files/init.sh
packages/initrdscripts/initramfs-uniboot_1.0.bb

index f8d5de91735790460a4e37230ccd4d7b5d961ef0..08163fa04027332a40c7d551e19c6eabc28ac88b 100644 (file)
@@ -8,6 +8,7 @@ early_setup() {
     mkdir /proc
     mount -t proc proc /proc
     mkdir /mnt
+    modprobe -q mtdblock
 }
 
 dev_setup()
@@ -48,13 +49,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 +69,5 @@ dev_setup
 
 load_modules
 [ -n "$BOOT_ROOT" ] && boot_root
-boot_failed
+
+fatal "No valid root device was specified.  Please add root=/dev/something to the kernel command-line and try again."
index 167ce71ffe2a30e8c959452592a339844473372d..786afb972cd6818affdaee432c1628cba85706cf 100644 (file)
@@ -1,6 +1,7 @@
 SRC_URI = "file://init.sh"
-PR = "r2"
+PR = "r3"
 DESCRIPTON = "A modular initramfs init script system."
+RRECOMMENDS = "kernel-module-mtdblock"
 
 do_install() {
         install -m 0755 ${WORKDIR}/init.sh ${D}/init