summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Hentges <oe@hentges.net>2006-02-12 13:57:42 +0000
committerOpenEmbedded Project <openembedded-devel@lists.openembedded.org>2006-02-12 13:57:42 +0000
commit6dcf5a170c84ec3fe59ba939b3d37bd8ae06012f (patch)
treeb1c1cf23d15ea7c3b06056c0012d813523994880
parentabcdf8c3bf548acab0534763a377f41f501da3bf (diff)
altboot
- Do not show option for USB boot on devices w/o USB host - Disable "Boot original INIT" - Do not drop into emergency shell on die() but restart altboot with menu (doesn't work for every plugin, yet) - Some fixes / enhancements for tar.gz installer - Remove "orce" error message when cmdline "-force" is used (should have seen this coming heh)
-rw-r--r--packages/altboot/altboot.bb2
-rw-r--r--packages/altboot/files/akita/altboot-2.4.cfg1
-rw-r--r--packages/altboot/files/akita/altboot-2.6.cfg1
-rw-r--r--packages/altboot/files/altboot-menu/Advanced/30-bootUSB-Stick1
-rw-r--r--packages/altboot/files/altboot-menu/Advanced/40-bootNFS2
-rw-r--r--packages/altboot/files/altboot-menu/Advanced/60-orig-init1
-rw-r--r--packages/altboot/files/altboot-menu/Advanced/70-install-tgz53
-rw-r--r--packages/altboot/files/init.altboot8
-rw-r--r--packages/altboot/files/spitz/altboot-2.4.cfg1
9 files changed, 49 insertions, 21 deletions
diff --git a/packages/altboot/altboot.bb b/packages/altboot/altboot.bb
index ef87e880c9..ce586f6f4b 100644
--- a/packages/altboot/altboot.bb
+++ b/packages/altboot/altboot.bb
@@ -6,7 +6,7 @@ MAINTAINER = "Matthias 'CoreDump' Hentges <oe@hentges.net>"
LICENSE = "GPL"
IGNORE_STRIP_ERRORS = "1"
-PR = "r19"
+PR = "r20"
SRC_URI = "file://altboot-menu \
diff --git a/packages/altboot/files/akita/altboot-2.4.cfg b/packages/altboot/files/akita/altboot-2.4.cfg
index 9175cb1b06..8c404d4768 100644
--- a/packages/altboot/files/akita/altboot-2.4.cfg
+++ b/packages/altboot/files/akita/altboot-2.4.cfg
@@ -13,6 +13,7 @@ FSCK_IMAGES="yes"
SD_DEVICE="/dev/mmcda1"
SD_KERNEL_MODULE="/lib/modules/2.4.20/kernel/drivers/block/sharp_mmcsd_m.o"
+USB_HOST_AVAILABLE="yes"
USB_STORAGE_MODULES="usb_ohci_pxa27x usb-storage"
USB_STORAGE_PARTITION="/dev/sda1"
USB_STORAGE_WAIT="4"
diff --git a/packages/altboot/files/akita/altboot-2.6.cfg b/packages/altboot/files/akita/altboot-2.6.cfg
index ad15f7169e..42f0968134 100644
--- a/packages/altboot/files/akita/altboot-2.6.cfg
+++ b/packages/altboot/files/akita/altboot-2.6.cfg
@@ -13,6 +13,7 @@ FSCK_IMAGES="yes"
SD_DEVICE="/dev/mmcblk0p1"
SD_KERNEL_MODULE=""
+USB_HOST_AVAILABLE="no"
USB_STORAGE_MODULES="usb_ohci_pxa27x usb-storage"
USB_STORAGE_PARTITION="/dev/sda1"
USB_STORAGE_WAIT="4"
diff --git a/packages/altboot/files/altboot-menu/Advanced/30-bootUSB-Stick b/packages/altboot/files/altboot-menu/Advanced/30-bootUSB-Stick
index 3ef17764d0..c5222800e5 100644
--- a/packages/altboot/files/altboot-menu/Advanced/30-bootUSB-Stick
+++ b/packages/altboot/files/altboot-menu/Advanced/30-bootUSB-Stick
@@ -7,6 +7,7 @@
M_TITLE="Boot USB Storage"
+test "$USB_HOST_AVAILABLE" = "yes" || exit 0
die() {
echo "ERROR: $1" >/dev/tty0
exec $SH_SHELL </dev/tty0 >/dev/tty0 2>&1
diff --git a/packages/altboot/files/altboot-menu/Advanced/40-bootNFS b/packages/altboot/files/altboot-menu/Advanced/40-bootNFS
index 818a93943d..cf1d1da8e6 100644
--- a/packages/altboot/files/altboot-menu/Advanced/40-bootNFS
+++ b/packages/altboot/files/altboot-menu/Advanced/40-bootNFS
@@ -116,7 +116,7 @@ run_module() {
# Use configured resolv.conf in the pivoted rootfs
echo -n "Copying resolv.conf..."
- cp /etc/resolv.conf /media/nfsroot/etc >/dev/null 2>&1 && echo ok || echo "FAILED"
+ cp /etc/resolv.conf /media/nfsroot/etc && echo ok || echo "FAILED"
check_target "/media/nfsroot"
diff --git a/packages/altboot/files/altboot-menu/Advanced/60-orig-init b/packages/altboot/files/altboot-menu/Advanced/60-orig-init
index 9f4ff78388..ad9f2c78e1 100644
--- a/packages/altboot/files/altboot-menu/Advanced/60-orig-init
+++ b/packages/altboot/files/altboot-menu/Advanced/60-orig-init
@@ -1,6 +1,7 @@
# !/bin/sh
M_TITLE="Boot original INIT"
+exit 0
run_module() {
diff --git a/packages/altboot/files/altboot-menu/Advanced/70-install-tgz b/packages/altboot/files/altboot-menu/Advanced/70-install-tgz
index acf148efb3..2ff380418d 100644
--- a/packages/altboot/files/altboot-menu/Advanced/70-install-tgz
+++ b/packages/altboot/files/altboot-menu/Advanced/70-install-tgz
@@ -2,10 +2,10 @@
M_TITLE="Install RootFS from tar.gz"
-die() {
- echo "ERROR: $1" >/dev/tty0
- exec $SH_SHELL </dev/tty0 >/dev/tty0 2>&1
-}
+# die() {
+# echo "ERROR: $1" >/dev/tty0
+# exec $SH_SHELL </dev/tty0 >/dev/tty0 2>&1
+# }
run_module(){
test -e /etc/altboot.func && . /etc/altboot.func || die "ERROR: /etc/altboot.func not found. Check your installation!"
@@ -56,9 +56,9 @@ run_module(){
esac
done
- echo -e "\nPlease choose the method of this installation:\n"
+ echo -e "\nPlease choose the type of this installation:\n"
- echo -e "\t [1] ImageFile (loopfile)"
+ echo -e "\t [1] Imagefile (loopfile)"
echo -e "\t [2] Direct Install"
echo ""
@@ -145,21 +145,40 @@ install_rootfs_image(){
read junk
if test -n "$junk"
- then
- echo -n "Use [$junk] as name? [Y|n] "
- read junk2
-
- case "$junk2" in
- "Y"|"y"|"") rootfs_image_name="${junk}-rootfs.bin"
- break ;;
- *) echo "err ]$junk]";;
- esac
+ then
+ if test -e "$1/boot-images/${junk}-rootfs.bin"
+ then
+ echo -e "\nFile [$1/boot-images/${junk}-rootfs.bin] already exists."
+
+ while true
+ do
+ echo -n "Overwrite? [N|y] "
+ read junk2
+
+ case "$junk2" in
+ Y|y) break;;
+ n|N|"") install_rootfs_image "$1"
+ exit 0;;
+ esac
+ done
+ rootfs_image_name="${junk}-rootfs.bin"
+ break
+ else
+ echo -n "Use [$junk] as name? [Y|n] "
+ read junk2
+
+ case "$junk2" in
+ "Y"|"y"|"") rootfs_image_name="${junk}-rootfs.bin"
+ break ;;
+ *) echo "err ]$junk]";;
+ esac
+ fi
fi
done
echo ""
echo "Please enter the image size in MegaBytes"
- echo "Must be at least 50Mb"
+ echo "Must be at least 30Mb"
echo ""
while true
@@ -194,7 +213,7 @@ install_rootfs_image(){
echo "Please wait..."
mkdir -p "$1/boot-images"
- ! test -e "$1/boot-images/$rootfs_image_name" && dd if=/dev/zero of="$1/boot-images/$rootfs_image_name" bs=1024k count=$rootfs_image_size >/dev/null
+ dd if=/dev/zero of="$1/boot-images/$rootfs_image_name" bs=1024k count=$rootfs_image_size >/dev/null
echo -n "Creating an ext2 filesystem on $rootfs_image_name..."
losetup /dev/loop0 "$1/boot-images/$rootfs_image_name" || die "losetup /dev/loop0 \"$1/boot-images/$rootfs_image_name\" failed!"
diff --git a/packages/altboot/files/init.altboot b/packages/altboot/files/init.altboot
index eb321ad456..2ba6f654b5 100644
--- a/packages/altboot/files/init.altboot
+++ b/packages/altboot/files/init.altboot
@@ -33,7 +33,11 @@ C_RESET="\033[0m"
die() {
echo "ERROR: $1" >/dev/tty0
- exec $SH_SHELL </dev/tty0 >/dev/tty0 2>&1
+ #exec $SH_SHELL </dev/tty0 >/dev/tty0 2>&1
+
+ echo -e "\nPress <ENTER> to launch the altboot menu"
+ read junk
+ exec /sbin/init.altboot -force</dev/tty0 >/dev/tty0 2>&1
}
@@ -300,7 +304,7 @@ else
# When started with -force, always print the menu
- echo "$*" | grep -q "-force" && TIMEOUT=0
+ echo "$*" | grep -q -- "-force" && TIMEOUT=0
# This timeout works by reading /proc/interrupts to see if the keyboard interrupt
diff --git a/packages/altboot/files/spitz/altboot-2.4.cfg b/packages/altboot/files/spitz/altboot-2.4.cfg
index 7a161b7a9c..3c8abc9bae 100644
--- a/packages/altboot/files/spitz/altboot-2.4.cfg
+++ b/packages/altboot/files/spitz/altboot-2.4.cfg
@@ -14,6 +14,7 @@ FSCK_IMAGES="yes"
SD_DEVICE="/dev/mmcda1"
SD_KERNEL_MODULE="/media/hdd/lib/modules/2.4.20/kernel/drivers/block/sharp_mmcsd_m.o"
+USB_HOST_AVAILABLE="yes"
USB_STORAGE_MODULES="usb_ohci_pxa27x usb-storage"
USB_STORAGE_PARTITION="/dev/sda1"
USB_STORAGE_WAIT="4"