diff options
author | Matthias Hentges <oe@hentges.net> | 2006-01-23 18:21:48 +0000 |
---|---|---|
committer | OpenEmbedded Project <openembedded-devel@lists.openembedded.org> | 2006-01-23 18:21:48 +0000 |
commit | 782dc3c20561aea0fb13529d543fb814fda208f7 (patch) | |
tree | 3cd4fdb7b3cf6ec9f649c3bb8390db44b6bfe7b9 /packages/altboot/files/altboot-menu/Advanced | |
parent | 6b447a6a8392db239d0f57457d5b59b0ec30aec0 (diff) |
altboot:
- Fixed a bug where the /media/ROM mountpoint wasn't moved into the new rootfs
- Added support for booting off USB storage devices
Diffstat (limited to 'packages/altboot/files/altboot-menu/Advanced')
-rw-r--r-- | packages/altboot/files/altboot-menu/Advanced/30-bootUSB-Stick | 53 | ||||
-rw-r--r-- | packages/altboot/files/altboot-menu/Advanced/40-bootNFS | 4 |
2 files changed, 55 insertions, 2 deletions
diff --git a/packages/altboot/files/altboot-menu/Advanced/30-bootUSB-Stick b/packages/altboot/files/altboot-menu/Advanced/30-bootUSB-Stick new file mode 100644 index 0000000000..5a1d049976 --- /dev/null +++ b/packages/altboot/files/altboot-menu/Advanced/30-bootUSB-Stick @@ -0,0 +1,53 @@ +# !/bin/sh +# +# Copyright Matthias Hentges (c) 2005 +# +# License: GPL (see http://www.gnu.org/licenses/gpl.txt for a copy of the GPL) + + +M_TITLE="Boot USB Storage" + +die() { + echo "ERROR: $1" >/dev/tty0 + exec $SH_SHELL </dev/tty0 >/dev/tty0 2>&1 +} + +# This function is activated by init.altboot by calling this script with the "run" option +run_module() { + + test -e /etc/altboot.func && . /etc/altboot.func || die "ERROR: /etc/altboot.func not found. Check your installation!" + + echo -n "Mounting rootfs rw..." >/dev/tty0 + mount -o remount,rw / >/dev/tty0 2>&1 && echo ok >/dev/tty0|| die "mount -o remount,rw / failed" + + echo -n "Generating device files..." >/dev/tty0 + /etc/init.d/devices start && echo ok >/dev/tty0|| die "FAILED" + + echo "Starting USB..." + + for module in $USB_STORAGE_MODULES + do + echo -en "\t - $module: " + modprobe "$module" >/dev/null 2>&1 && echo ok || die "Failed to modprobe [$module]" + done + + echo -n "Mounting $USB_STORAGE_PARTITION..." >/dev/tty0 + + mkdir -p /media/usb-storage >/dev/null 2>&1 + + sleep "$USB_STORAGE_WAIT" + + /bin/mount -t auto -o defaults,noatime $USB_STORAGE_PARTITION /media/usb-storage >/dev/null 2>&1 && echo ok >/dev/tty0|| die "/bin/mount -t auto -o defaults,noatime $SD_DEVICE $SD_MOUNTPOINT failed" + + echo "" + + # Check for a real fs and loop-images. + check_target "/media/usb-storage" >/dev/tty0 +} + + +case "$1" in +title) echo "$M_TITLE";; +run) run_module "$2";; +esac + diff --git a/packages/altboot/files/altboot-menu/Advanced/40-bootNFS b/packages/altboot/files/altboot-menu/Advanced/40-bootNFS index b5b93a5929..e83a2867c5 100644 --- a/packages/altboot/files/altboot-menu/Advanced/40-bootNFS +++ b/packages/altboot/files/altboot-menu/Advanced/40-bootNFS @@ -36,7 +36,7 @@ run_module() { # After the PCMCIA service is started, an inserted WLAN card should automatically # activate itself. - /etc/init.d/pcmcia start || die "/etc/init.d/pcmcia/start failed!" + /etc/init.d/pcmcia start >/dev/null 2>&1 || die "/etc/init.d/pcmcia/start failed!" nfs_host="`cat /etc/fstab | grep -v ^# | grep nfs | awk '{print $1}'|sed -n "s/\(.*\)\:\(.*\)/\1/p" `" nfs_mounts="`cat /etc/fstab | grep -v ^# | grep nfs | awk '{print $1}'`" @@ -67,7 +67,7 @@ run_module() { then echo "Restarting udhcpc" killall udhcpc - udhcpc -i wlan0 -H `cat /etc/hostname` + udhcpc -i wlan0 -H `cat /etc/hostname` >/dev/null 2>&1 else die "Failed to activate WLAN!" break |