summaryrefslogtreecommitdiff
path: root/packages/initrdscripts
diff options
context:
space:
mode:
authorPaul Sokolovsky <pmiscml@gmail.com>2008-03-08 18:37:36 +0000
committerPaul Sokolovsky <pmiscml@gmail.com>2008-03-08 18:37:36 +0000
commitc00dd1a2ce70e2d41b2b4555249b28ad2495e195 (patch)
tree82fb80823a9b993099cde601da38250e41adf3b7 /packages/initrdscripts
parent03727f56ee88df4ea41213414c1f49c00984cf34 (diff)
initramfs-uniboot: Add support for early-init plugins.
* Extend plugin protocol: plugins matching pattern '0*' are early-init, executed ASAP after boot, before kernel command and block devices are scanned. And thus, they can affect parsing of kernel command line (by overriding $CMDLINE) or detection of block devices (e.g. by loading additional modules).
Diffstat (limited to 'packages/initrdscripts')
-rw-r--r--packages/initrdscripts/files/init.sh8
-rw-r--r--packages/initrdscripts/initramfs-uniboot_1.0.bb2
2 files changed, 6 insertions, 4 deletions
diff --git a/packages/initrdscripts/files/init.sh b/packages/initrdscripts/files/init.sh
index 8b9fe12429..e250e3928a 100644
--- a/packages/initrdscripts/files/init.sh
+++ b/packages/initrdscripts/files/init.sh
@@ -25,7 +25,7 @@ dev_setup()
}
read_args() {
- CMDLINE=`cat /proc/cmdline`
+ [ -z "$CMDLINE" ] && CMDLINE=`cat /proc/cmdline`
for arg in $CMDLINE; do
optarg=`expr "x$arg" : 'x[^=]*=\(.*\)'`
case $arg in
@@ -40,7 +40,7 @@ read_args() {
}
load_modules() {
- for module in $MODULE_DIR/*; do
+ for module in $MODULE_DIR/$1; do
echo "initramfs: Loading $module module"
source $module
done
@@ -60,6 +60,7 @@ fatal() {
echo "Starting initramfs boot..."
early_setup
+load_modules '0*'
read_args
if [ -n "$rootdelay" ]; then
@@ -69,7 +70,8 @@ fi
dev_setup
-load_modules
+load_modules '[1-9]*'
+
[ -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."
diff --git a/packages/initrdscripts/initramfs-uniboot_1.0.bb b/packages/initrdscripts/initramfs-uniboot_1.0.bb
index e0f726582e..10c9459bfb 100644
--- a/packages/initrdscripts/initramfs-uniboot_1.0.bb
+++ b/packages/initrdscripts/initramfs-uniboot_1.0.bb
@@ -1,5 +1,5 @@
SRC_URI = "file://init.sh"
-PR = "r4"
+PR = "r5"
DESCRIPTON = "A modular initramfs init script system."
RRECOMMENDS = "kernel-module-mtdblock"