]> git.openpandora.org Git - openembedded.git/commitdiff
altboot
authorMatthias Hentges <oe@hentges.net>
Sun, 12 Feb 2006 13:57:42 +0000 (13:57 +0000)
committerOpenEmbedded Project <openembedded-devel@lists.openembedded.org>
Sun, 12 Feb 2006 13:57:42 +0000 (13:57 +0000)
- 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)

packages/altboot/altboot.bb
packages/altboot/files/akita/altboot-2.4.cfg
packages/altboot/files/akita/altboot-2.6.cfg
packages/altboot/files/altboot-menu/Advanced/30-bootUSB-Stick
packages/altboot/files/altboot-menu/Advanced/40-bootNFS
packages/altboot/files/altboot-menu/Advanced/60-orig-init
packages/altboot/files/altboot-menu/Advanced/70-install-tgz
packages/altboot/files/init.altboot
packages/altboot/files/spitz/altboot-2.4.cfg

index ef87e880c9904a681f6ba595cd38983a5711b549..ce586f6f4bb647faeebc13adad6a21d158dba039 100644 (file)
@@ -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 \
index 9175cb1b06385860fe9aa1f0073844123a345154..8c404d47683f4966117f3e8ed5ec8a2f15cbe086 100644 (file)
@@ -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"
index ad15f7169ec24bd4d9088b4ee3d3e6983d51b08f..42f096813480880d4d2dab4693023d6d0bbcf2ab 100644 (file)
@@ -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"
index 3ef17764d0526b7d9cbed07b91c6ecda14aaf819..c5222800e55776f79296a00cb4ac70f426116b58 100644 (file)
@@ -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
index 818a93943d3d0496846dd97847e66b434e27f8fd..cf1d1da8e6521a2ad77b797ac706165390bcd1e7 100644 (file)
@@ -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"
        
index 9f4ff78388b76d6ebfef33ee7208c832bb0db3df..ad9f2c78e14ec1a40cf4a49579042b62aae5f577 100644 (file)
@@ -1,6 +1,7 @@
 # !/bin/sh
 M_TITLE="Boot original INIT"
 
+exit 0
 
 run_module() {
        
index acf148efb34d0a20b1821cea5c72ed81216d03f7..2ff380418dae634b82a0b9866be08a482742cca9 100644 (file)
@@ -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!"
index eb321ad456af04e5a5d3447c623f91479715aa4e..2ba6f654b5f81d28b95264e7bf3438e1a7e1f65b 100644 (file)
@@ -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
index 7a161b7a9cde474d3903b6b2f83fbe882d162ea8..3c8abc9bae4004b64e0dba7e8623253a4fc675ac 100644 (file)
@@ -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"