summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/functions15
-rwxr-xr-xscripts/init-top/all_generic_ide5
-rwxr-xr-xscripts/init-top/framebuffer17
3 files changed, 29 insertions, 8 deletions
diff --git a/scripts/functions b/scripts/functions
index 299c29c..f715e68 100644
--- a/scripts/functions
+++ b/scripts/functions
@@ -55,7 +55,7 @@ panic()
maybe_break()
{
- if [ "${break}" = "$1" ]; then
+ if [ "${break:-}" = "$1" ]; then
panic "Spawning shell within the initramfs"
fi
}
@@ -238,7 +238,7 @@ parse_numeric() {
/*)
return
;;
- *:*)
+ [0-9]*:[0-9]*)
minor=${1#*:}
major=${1%:*}
;;
@@ -261,20 +261,21 @@ configure_networking()
# networking already configured thus bail out
[ -n "${DEVICE}" ] && [ -e /tmp/net-"${DEVICE}".conf ] && return 0
- # support ip options see linux sources Documentation/nfsroot.txt
+ # support ip options see linux sources
+ # Documentation/filesystems/nfsroot.txt
case ${IPOPTS} in
none|off)
# Do nothing
;;
""|on|any)
# Bring up device
- ipconfig ${DEVICE}
+ ipconfig -t 180 ${DEVICE}
;;
dhcp|bootp|rarp|both)
- ipconfig -c ${IPOPTS} -d ${DEVICE}
+ ipconfig -t 180 -c ${IPOPTS} -d ${DEVICE}
;;
*)
- ipconfig -d $IPOPTS
+ ipconfig -t 180 -d $IPOPTS
# grab device entry from ip option
NEW_DEVICE=${IPOPTS#*:*:*:*:*:*}
@@ -303,6 +304,6 @@ configure_networking()
# Wait for queued kernel/udev events
wait_for_udev()
{
- [ -x "$(command -v udevadm)" ] && return 0
+ [ -x "$(command -v udevadm)" ] || return 0
udevadm settle ${1:+--timeout=$1}
}
diff --git a/scripts/init-top/all_generic_ide b/scripts/init-top/all_generic_ide
index 28b519a..3274ee8 100755
--- a/scripts/init-top/all_generic_ide
+++ b/scripts/init-top/all_generic_ide
@@ -18,5 +18,10 @@ for x in $(cat /proc/cmdline); do
all_generic_ide)
modprobe ide-generic
;;
+ all_generic_ide=*)
+ if [ ${x#all_generic_ide=} ]; then
+ modprobe ide-generic
+ fi
+ ;;
esac
done
diff --git a/scripts/init-top/framebuffer b/scripts/init-top/framebuffer
index 21a6b19..0ed798e 100755
--- a/scripts/init-top/framebuffer
+++ b/scripts/init-top/framebuffer
@@ -72,11 +72,16 @@ for x in $(cat /proc/cmdline); do
esac
done
-# Map command line name to module name
+# Map command line name to module name and other tweaks
case ${FB} in
matroxfb)
FB=matroxfb_base
;;
+uvesafb)
+ # v86d requires /dev/zero and dev/mem, but udev haven't been started yet
+ [ -e /dev/zero ] || mknod -m 0666 /dev/zero c 1 5
+ [ -e /dev/mem ] || mknod -m 0640 /dev/mem c 1 1
+ ;;
*)
;;
esac
@@ -85,3 +90,13 @@ if [ -n "${FB}" ]; then
modprobe fbcon
modprobe ${FB} ${OPTS}
fi
+
+if [ -e /proc/fb ]; then
+ while read fbno desc; do
+ if [ $(($fbno < 32)) ]; then
+ mknod -m 0640 /dev/fb${fbno} c 29 ${fbno}
+ fi
+ done < /proc/fb
+else
+ mknod -m 0640 /dev/fb0 c 29 0
+fi