diff options
Diffstat (limited to 'packages/altboot')
22 files changed, 297 insertions, 630 deletions
diff --git a/packages/altboot/altboot_0.0.0.bb b/packages/altboot/altboot_0.0.0.bb index 7d56cbd3a6..2df0e16792 100644 --- a/packages/altboot/altboot_0.0.0.bb +++ b/packages/altboot/altboot_0.0.0.bb @@ -1,12 +1,12 @@ DESCRIPTION = "A text-based bootmanager allowing a Zaurus to boot from SD, CF, USB-Storage and NFS. \ -Tested machines: Collie, Poodle, Akita, Spitz" +Tested machines: Collie, Poodle, Akita, Spitz, C7x0, Tosa, Borzoi" SECTION = "base" PRIORITY = "optional" MAINTAINER = "Matthias 'CoreDump' Hentges <oe@hentges.net>" LICENSE = "GPL" IGNORE_STRIP_ERRORS = "1" -PR = "r26" +PR = "r34" SRC_URI = "file://altboot-menu \ @@ -44,75 +44,6 @@ pkg_postinst() { update-alternatives --install /sbin/init init /sbin/init.altboot 55 } -pkg_postinst_spitz() { - # Note: Spitz support is a royal pain in the ass. - # Since Spitz pivot_roots by default, there is no real way - # a user can install an altboot.ipk into the flash FS. - # So we need to do that manually (*SIGH*) - - # the 2.6 kernel for spitz boots from HDD, no need to copy to flash - if cat /proc/version | awk '{print $3}' | grep -q '^2.6'; then - update-alternatives --install /sbin/init init /sbin/init.altboot 55 - # no need to copy to flash if we're installing to flash already - elif mount | grep ' / ' | grep -q mtdblock; then - update-alternatives --install /sbin/init init /sbin/init.altboot 55 - else - # /l/m only exists on the HDD on spitz - if test -d /lib/modules - then - if [ -e /media/realroot/sbin/init ]; then - ROOT_MOUNT_POINT="/media/realroot" - elif [ -e /media/ROM/sbin/init ]; then - ROOT_MOUNT_POINT="/media/ROM" - fi - if [ ! "$ROOT_MOUNT_POINT" = "" ]; then - ROOT_MOUNT_DEVICE=`cat /proc/mounts | grep $ROOT_MOUNT_POINT | grep jffs2 | cut -d " " -f 1` - if [ ! "$ROOT_MOUNT_DEVICE" = "" ]; then - mount -oremount,rw $ROOT_MOUNT_DEVICE $ROOT_MOUNT_POINT - cp -R /etc/altboot* $ROOT_MOUNT_POINT/etc - cp /sbin/init.altboot $ROOT_MOUNT_POINT/sbin - if [ -f $ROOT_MOUNT_POINT/sbin/init ]; then - mv $ROOT_MOUNT_POINT/sbin/init $ROOT_MOUNT_POINT/sbin/init.orig - fi - ln -s /sbin/init.altboot $ROOT_MOUNT_POINT/sbin/init - fi - fi - fi - fi -} - pkg_postrm() { update-alternatives --remove init /sbin/init.altboot } - -pkg_postrm_spitz() { - # the 2.6 kernel for spitz boots from HDD, no need to remove from flash - if cat /proc/version | awk '{print $3}' | grep -q '^2.6'; then - update-alternatives --remove init /sbin/init.altboot - # no need to copy to flash if we're removing from flash already - elif mount | grep ' / ' | grep -q mtdblock; then - update-alternatives --remove init /sbin/init.altboot - else - if test -d /lib/modules - then - if [ -e /media/realroot/sbin/init ]; then - ROOT_MOUNT_POINT="/media/realroot" - elif [ -e /media/ROM/sbin/init ]; then - ROOT_MOUNT_POINT="/media/ROM" - fi - if [ ! "$ROOT_MOUNT_POINT" = "" ]; then - ROOT_MOUNT_DEVICE=`cat /proc/mounts | grep $ROOT_MOUNT_POINT | grep jffs2 | cut -d " " -f 1` - if [ ! "$ROOT_MOUNT_DEVICE" = "" ]; then - mount -oremount,rw $ROOT_MOUNT_DEVICE $ROOT_MOUNT_POINT - if [ -f $ROOT_MOUNT_POINT/sbin/init.orig ]; then - rm $ROOT_MOUNT_POINT/sbin/init - rm $ROOT_MOUNT_POINT/sbin/init.altboot - mv $ROOT_MOUNT_POINT/sbin/init.orig $ROOT_MOUNT_POINT/sbin/init - else - echo "$ROOT_MOUNT_POINT/sbin/init.orig not found, not uninstalling altboot!" - fi - fi - fi - fi - fi -} diff --git a/packages/altboot/altboot_1.0.6-rc1.bb b/packages/altboot/altboot_1.0.6-rc1.bb new file mode 100644 index 0000000000..bb99fe31e5 --- /dev/null +++ b/packages/altboot/altboot_1.0.6-rc1.bb @@ -0,0 +1,82 @@ +#! /bin/sh +# +# Copyright Matthias Hentges <devel@hentges.net> (c) 2006 +# License: GPL (see http://www.gnu.org/licenses/gpl.txt for a copy of the license) +# +# Filename: altboot_1.0.5-rc2.bb +# Date: 21-Feb-06 + +DESCRIPTION = "The altboot bootmanager" +MAINTAINER = "Matthias 'CoreDump' Hentges <oe@hentges.net>" +HOMEPAGE = "http://www.hentges.net/misc/openzaurus/index.shtml" + +###################################################################################### + +PR = "r0" + +###################################################################################### + +PACKAGE_ARCH = "${MACHINE}" + +TAG = "${@'v' + bb.data.getVar('PV',d,1).replace('.', '-')}" + +SRC_URI = "cvs://anonymous@hentges.net/hentgescvs;method=pserver;tag=${TAG};module=altboot" + +S = "${WORKDIR}/altboot/" + +###################################################################################### + +do_install() { + install -d ${D}/sbin + install -d ${D}/etc/altboot-menu + install -d ${D}/etc/altboot-menu/Advanced + install -d ${D}/etc/altboot.rc + install -d ${D}/usr/share/doc/altboot + + if test -d ${WORKDIR}/altboot/${MACHINE} + then + install -m 0644 ${WORKDIR}/altboot/${MACHINE}/altboot*.cfg ${D}/etc + else + install -m 0644 ${WORKDIR}/altboot/altboot*.cfg ${D}/etc + fi + + install -m 0644 ${WORKDIR}/altboot/altboot.func ${D}/etc + install -m 0755 ${WORKDIR}/altboot/init.altboot ${D}/sbin + + if test -d ${WORKDIR}/altboot/${MACHINE}/altboot-menu/ + then + install -m 0755 ${WORKDIR}/altboot/${MACHINE}/altboot-menu/*-* ${D}/etc/altboot-menu + else + install -m 0755 ${WORKDIR}/altboot/altboot-menu/*-* ${D}/etc/altboot-menu + fi + + if test -d ${WORKDIR}/altboot/${MACHINE}/altboot-menu/Advanced/ + then + install -m 0755 ${WORKDIR}/altboot/${MACHINE}/altboot-menu/Advanced/*-* ${D}/etc/altboot-menu/Advanced + else + install -m 0755 ${WORKDIR}/altboot/altboot-menu/Advanced/*-* ${D}/etc/altboot-menu/Advanced + fi + + install -m 0755 ${WORKDIR}/altboot/altboot.rc/*.sh ${D}/etc/altboot.rc + install -m 0644 ${WORKDIR}/altboot/altboot.rc/*.txt ${D}/etc/altboot.rc +} + +###################################################################################### + +do_configure() { + cat ${WORKDIR}/altboot/init.altboot | sed "s/^VERSION=.*/VERSION=\"${PV}\"/" > ${WORKDIR}/altboot/init.altboot_ + mv ${WORKDIR}/altboot/init.altboot_ ${WORKDIR}/altboot/init.altboot +} + +###################################################################################### + +pkg_postinst() { + update-alternatives --install /sbin/init init /sbin/init.altboot 55 +} + +###################################################################################### + +pkg_postrm() { + update-alternatives --remove init /sbin/init.altboot +} + diff --git a/packages/altboot/files/akita/altboot-2.6.cfg b/packages/altboot/files/akita/altboot-2.6.cfg index 69f7c8351b..c9a030b348 100644 --- a/packages/altboot/files/akita/altboot-2.6.cfg +++ b/packages/altboot/files/akita/altboot-2.6.cfg @@ -9,6 +9,7 @@ SH_SHELL="/bin/sh" IMAGE_PATH="boot-images" IMAGE_TYPE="ext2" FSCK_IMAGES="yes" +ENABLE_IMAGECONF="yes" SD_DEVICE="/dev/mmcblk0p1" SD_KERNEL_MODULE="" diff --git a/packages/altboot/files/altboot-menu/Advanced/40-bootNFS b/packages/altboot/files/altboot-menu/Advanced/40-bootNFS index 3a41fccf79..e01af7faad 100644 --- a/packages/altboot/files/altboot-menu/Advanced/40-bootNFS +++ b/packages/altboot/files/altboot-menu/Advanced/40-bootNFS @@ -20,11 +20,11 @@ run_module() { init_rootfs # Needed for NFS - /etc/init.d/portmap start >/dev/tty1 2>&1 || die "/etc/init.d/portmap start failed!" + /etc/init.d/portmap start >/dev/null 2>&1 || die "/etc/init.d/portmap start failed!" # For some reason NFS mounts hang if /e/i/networking is not run. # For the time beeing I'm too lazy to investigate ;) - /etc/init.d/networking start || die "/etc/init.d/networking start failed!" + /etc/init.d/networking start >/dev/null 2>&1 || die "/etc/init.d/networking start failed!" sleep 2 @@ -91,7 +91,20 @@ run_module() { do stty echo echo -n "Boot NFS root: " - read junk < /dev/tty1 + + if test "$AUTOBOOT" != "yes" + then + read junk < /dev/tty1 + else + if test -e /etc/.altboot-bootNFS-source.last + then + junk="`cat /etc/.altboot-bootNFS-source.last`" + test -z "$junk" && read junk < /dev/tty1 || echo "$junk (autoboot)" + else + read junk < /dev/tty1 + fi + fi + cnt=1 for nfs_mount in $nfs_mounts @@ -99,6 +112,7 @@ run_module() { if test "$junk" = "$cnt" then selection="$nfs_mount" + echo "$junk" > /etc/.altboot-bootNFS-source.last fi let cnt=$cnt+1 done @@ -112,13 +126,22 @@ run_module() { mkdir -p /media/nfsroot || die "mkdir -p /media/nfsroot failed!" echo -n "Mounting NFS root..." + + if ( mount | grep -q "/media/nfsroot" ) + then + echo "/media/nfsroot already used, tying to umount..." + umount /media/image + losetup -d /dev/loop0 + umount /media/nfsroot || die "umount failed!" + fi + mount -t nfs "$selection" /media/nfsroot && echo ok || die "mount -t nfs "$selection" /media/nfsroot failed!" # Use configured resolv.conf in the pivoted rootfs - echo -n "Copying resolv.conf..." + #echo -n "Copying resolv.conf..." #cp /etc/resolv.conf /media/nfsroot/etc && echo ok || echo "FAILED" - check_target "/media/nfsroot" + check_target "/media/nfsroot" bootNFS } diff --git a/packages/altboot/files/altboot.func b/packages/altboot/files/altboot.func index c6af50a008..0cc59116ce 100644 --- a/packages/altboot/files/altboot.func +++ b/packages/altboot/files/altboot.func @@ -1,6 +1,7 @@ #! /bin/sh # This function checks for the presence of a real filesystem and loop-images on the target # $1 = folder of rootfs, $2 = runlevel (defaults to 5) +# $2 = name of calling module check_target() { # Check if there is a /sbin/init or /sbin/init.sysvinit on the card if test -x $1/sbin/init -o -x $1/$REAL_INIT @@ -31,11 +32,24 @@ check_target() { while test -z "$ans" do echo -n "Your choice: " - read junk < /dev/tty1 + + if test "$AUTOBOOT" != "yes" + then + read junk < /dev/tty1 + else + if test -e /etc/.altboot-real-or-loop.last + then + junk="`cat /etc/.altboot-real-or-loop.last`" + test -z "$junk" && read junk < /dev/tty1 || echo "$junk (autoboot)" + else + read junk < /dev/tty1 + fi + fi if test "$junk" = 1 -o "$junk" = 2 then ans="$junk" + echo "$junk" > /etc/.altboot-real-or-loop.last fi done @@ -59,21 +73,35 @@ check_target() { fi } +boot_new_rootfs_splash() { +C_RED="\033[37;44m" +C_RESET="\033[0m" + + echo -e "${C_RED}+----------------------------------------------------------+${C_RESET}" + echo -e "${C_RED}| |${C_RESET}" + echo -e "${C_RED}| Booting the selected rootfs... |${C_RESET}" + echo -e "${C_RED}| |${C_RESET}" + echo -e "${C_RED}+----------------------------------------------------------+${C_RESET}" + +} + # This function pivot_root's into a real filesystem calling $newrootfs/sbin/init # $1 = The new rootfs pivot_realfs() { - test -z "$2" && RL="5" || RL="$2" + #test -z "$2" && RL="5" || RL="$2" mkdir -p $1/media/ROM || die "mkdir -p $1/media/ROM failed" mount -o remount,ro / >/dev/null 2>&1 + test "$ENABLE_IMAGECONF" = yes && image_conf $1 + do_pivot "$1" "$RL" } # This function loop-mounts an image-file and pivot_root's into it # $1: The new rootfs pivot_image() { - test -z "$2" && RL="5" || RL="$2" + #test -z "$2" && RL="5" || RL="$2" cd $1/$IMAGE_PATH # Check for rootfs images on the card @@ -95,7 +123,18 @@ pivot_image() { while test -z "$IMAGE_NAME" do echo -en "Please choose one of the above: " - read junk < /dev/tty1 + if test "$AUTOBOOT" != "yes" + then + read junk < /dev/tty1 + else + if test -e /etc/.altboot-loopimage.last + then + junk="`cat /etc/.altboot-loopimage.last`" + test -z "$junk" && read junk < /dev/tty1 || echo "$junk (autoboot)" + else + read junk < /dev/tty1 + fi + fi x=0 for file in `ls *rootfs.bin` @@ -103,7 +142,8 @@ pivot_image() { let x=$x+1 if test "$x" = "$junk" then - IMAGE_NAME="$file" + IMAGE_NAME="$file" + echo "$junk" > /etc/.altboot-loopimage.last fi done done @@ -111,28 +151,31 @@ pivot_image() { IMAGE_NAME="`ls *rootfs.bin`" test -z "$IMAGE_NAME" && die "No rootfs found (*rootfs.bin) in $1/$IMAGE_PATH" fi - - echo "Using [$IMAGE_NAME]" + + + echo "" mkdir -p /media/image || die "mkdir -p /media/image failed" - echo "Setting up loopback (/dev/loop0) for $IMAGE_NAME" losetup /dev/loop0 $1/$IMAGE_PATH/$IMAGE_NAME || die "losetup /dev/loop0 $1/$IMAGE_PATH/$IMAGE_NAME failed!" check_fs /dev/loop0 $IMAGE_TYPE - echo -e "\n* * * Booting rootfs image * * *\n" + echo -e "\n* * * Mounting rootfs image * * *\n" # Busybox's "mount" doesn't seem to like "-o loop" for some reason # It works on collie and b0rks on poodle. if [ "$IMAGE_TYPE" = "" ]; then IMAGE_TYPE="auto" fi + # If mount fails it has the tendency to spew out a _lot_ of error messages. # We direct the output to /dev/null so the user can see which step actually failed. mount /dev/loop0 -t $IMAGE_TYPE /media/image >/dev/null 2>&1 || die "mount -t $IMAGE_TYPE /dev/loop0 /media/image failed!" mkdir -p /media/image/media/ROM || die "mkdir -p /media/image/media/ROM failed" + test "$ENABLE_IMAGECONF" = yes && image_conf /media/image + do_pivot /media/image "$RL" } @@ -161,11 +204,11 @@ do_pivot(){ ! test -d "$new_mpt" && mkdir -p "$new_mpt" /bin/busybox mount -o move "$mpt" "$new_mpt" done - + + clear + boot_new_rootfs_splash echo "Calling INIT" - - #read junk - + exec /usr/sbin/chroot . /sbin/init $2 >/dev/tty0 2>&1 else echo "FAILED" @@ -174,6 +217,105 @@ do_pivot(){ } +# $1: Path to mounted rootfs +image_conf(){ + ! test -d "$1" && die "image_conf: [$1] not found / no directory" + + test -e "$1/etc/.image_conf.done" && return + + echo -e "\n\n* * * rootfs configuration * * *\n" + echo -e "This setup lets you reconfigure your new rootfs." + echo "Most probably the rootfs is configured with" + echo "defaults based on a flash installation." + echo "If unsure, go with the defaults by pressing <ENTER>." + echo "" + + if ( cat $1/etc/fstab | grep -v "^#" | grep -q "/home " ) + then + while true + do + echo "Usually your /home directory is located on another flash partition." + echo -n "Do you want me to move /home inside the loop-image? [N|y] " + read junk + + if test "$junk" = "y" -o "$junk" = "Y" + then + cat $1/etc/fstab | sed "/.*\/home.*/s/\/home/\/home.orig/" > $1/etc/fstab_ + mv $1/etc/fstab_ $1/etc/fstab + break + fi + + test "$junk" = "" -o "$junk" = n -o "$junk" = N && break + done + + fi + + echo "" + +# if ( cat $1/etc/fstab | grep -v "^#" | grep -q "/var" ) +# then +# while true +# do +# echo "This is mainly for testing purposes." +# echo -n "Do you want to configure /var as a normal non-tmpfs directory? [N|y] " +# read junk +# +# if test "$junk" = "y" -o "$junk" = "Y" +# then +# cat $1/etc/fstab | sed "/.*\/var.*/s/\(.*\)/#\ \1/" > $1/etc/fstab_ +# mv $1/etc/fstab_ $1/etc/fstab +# break +# fi +# +# test "$junk" = "" -o "$junk" = n -o "$junk" = N && break +# done +# fi + + echo "" + + if ( cat $1/etc/ipkg.conf | grep -q ^lists_dir ) + then + while true + do + echo -e "Wasting RAM is never a good idea.\nOnly say Y if your rootfs is very small in size" + echo -n "Do you want to store ipkg package data in RAM? [N|y] " + read junk + + if test "$junk" = "" -o "$junk" = n -o "$junk" = N + then + cat $1/etc/ipkg.conf | sed "/^lists_dir.*/s/\(.*\)/#\ \1/"> $1/etc/ipkg.conf_ + mv $1/etc/ipkg.conf_ $1/etc/ipkg.conf + break + fi + + test "$junk" = "y" -o "$junk" = "Y" && break + done + fi + + echo "" + + if ( cat $1/etc/ipkg.conf | grep -q "^dest sd" ) + then + while true + do + echo -n "Do you want to keep the SD, CF and /home ipkg install targets? [N|y] " + read junk + + if test "$junk" = "" -o "$junk" = n -o "$junk" = N + then + cat $1/etc/ipkg.conf | sed "/^dest\ \(sd\|cf\|home\).*/s/\(.*\)/#\ \1/" > $1/etc/ipkg.conf_ + mv $1/etc/ipkg.conf_ $1/etc/ipkg.conf + break + fi + + test "$junk" = "y" -o "$junk" = "Y" && break + done + fi + + + touch "$1/etc/.image_conf.done" +} + # This functions configures the master password for altboot if none is set set_password() { mount -o remount,rw / diff --git a/packages/altboot/files/collie/altboot-2.4.cfg b/packages/altboot/files/collie/altboot-2.4.cfg index 9d2560f76b..bc0f9ca054 100644 --- a/packages/altboot/files/collie/altboot-2.4.cfg +++ b/packages/altboot/files/collie/altboot-2.4.cfg @@ -8,7 +8,9 @@ REAL_INIT="/sbin/init.sysvinit" SH_SHELL="/bin/sh" IMAGE_PATH="boot-images" IMAGE_TYPE="ext2" -FSCK_IMAGES="no" +FSCK_IMAGES="yes" +ENABLE_IMAGECONF="yes" + SD_DEVICE="/dev/mmcda1" SD_KERNEL_MODULE="/lib/modules/2.4.18-rmk7-pxa3-embedix/kernel/drivers/block/sharp_mmcsd_m.o" INIT_RUNLEVEL="5" diff --git a/packages/altboot/files/init.altboot b/packages/altboot/files/init.altboot index 850912f20c..22f3e86e83 100644 --- a/packages/altboot/files/init.altboot +++ b/packages/altboot/files/init.altboot @@ -8,7 +8,7 @@ test -e /etc/altboot.func && . /etc/altboot.func || die "ERROR: /etc/altboot.func not found. Check your installation!" CURRENT_ENV="`set`" -VERSION="0.0.4" +VERSION="DEVELOPER SNAPSHOT" # Set some defaults in case altboot.cfg is missing REAL_INIT="/sbin/init.sysvinit" @@ -183,6 +183,13 @@ run_timer() { echo -n "." >/dev/tty1 let cnt=$cnt+1 done + + if test "$launch_altboot" != "yes" + then + AUTOBOOT=yes + else + rm -f /etc/.altboot*.last + fi else launch_altboot=yes fi @@ -236,9 +243,13 @@ wait_for_input() { # above to launch the altboot menu. - # This filters an "<ENTER>" from the user as "any key" - ( while :; do read x< /dev/tty0 2>&1; done; ) > /dev/null 2>&1 & - sleep 1; kill $! + # Bash throws an ugly error on kill + if ! (readlink /bin/sh | grep -q bash) + then + # This filters an "<ENTER>" from the user as "any key" + ( while :; do read x< /dev/tty0 2>&1; done; ) > /dev/null 2>&1 & + sleep 1; kill $! >/dev/null 2>&1 + fi @@ -272,10 +283,12 @@ wait_for_input() { } # * * * * * * This is the main function * * * * * * - -if test "`runlevel`" != "unknown" -a "$1" != "-force" +# Note: this is positivly ugly. If someone knows a better way to detect wheter +# we are already booted into a runlevel _without_ reading /var and / or using `runlevel` +# PLEASE let me know. +if test -f /proc/cmdline -a "`ps ax|wc -l|tr -d " "`" -gt 30 -a "$1" != "-force" then - echo "altboot: Using real init [$REAL_INIT] [$*] *" >/dev/tty1 + echo "altboot: Using real init [$REAL_INIT] [$*] [`ps ax|wc -l|tr -d " "`] *" >/dev/tty1 exec $REAL_INIT $* # exec $SH_SHELL </dev/tty0 >/dev/tty0 2>&1 exit 0 diff --git a/packages/altboot/files/poodle/altboot-2.4.cfg b/packages/altboot/files/poodle/altboot-2.4.cfg index 9d2560f76b..c5bd17050c 100644 --- a/packages/altboot/files/poodle/altboot-2.4.cfg +++ b/packages/altboot/files/poodle/altboot-2.4.cfg @@ -16,5 +16,7 @@ NO_GUI_RL="2" MASTER_PASSWORD="" ASK_PW_ON_BOOT="no" +ENABLE_IMAGECONF="yes" + SD_MOUNTPOINT="/media/card" CF_MOUNTPOINT="/media/cf" diff --git a/packages/altboot/files/spitz/altboot-2.4.cfg b/packages/altboot/files/spitz/altboot-2.4.cfg deleted file mode 100644 index 3c8abc9bae..0000000000 --- a/packages/altboot/files/spitz/altboot-2.4.cfg +++ /dev/null @@ -1,36 +0,0 @@ -# -# Handled by /sbin/init.altboot -# Allow booting images from SD, CF or RAM instead of booting -# the ROM. This is currently broken. -ENABLE_ALTBOOT="yes" -TIMEOUT="3" -REAL_INIT="/sbin/init.sysvinit" -SH_SHELL="/bin/sh" - -IMAGE_PATH="boot-images" -IMAGE_TYPE="ext3" -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" - -INIT_RUNLEVEL="5" -NO_GUI_RL="2" -MASTER_PASSWORD="" -ASK_PW_ON_BOOT="no" - -SD_MOUNTPOINT="/media/card" -CF_MOUNTPOINT="/media/cf" - -HDD3_DEVICE="/dev/hda3" -HDD3_MOUNTPOINT="/media/hdd3" -HDD3_TYPE="vfat" - -SPITZ_HDD_PART="/dev/hda1" -SPITZ_HDD_TYPE="ext3" - diff --git a/packages/altboot/files/borzoi/altboot-2.6.cfg b/packages/altboot/files/spitz/altboot-2.6.cfg index 69f7c8351b..c9a030b348 100644 --- a/packages/altboot/files/borzoi/altboot-2.6.cfg +++ b/packages/altboot/files/spitz/altboot-2.6.cfg @@ -9,6 +9,7 @@ SH_SHELL="/bin/sh" IMAGE_PATH="boot-images" IMAGE_TYPE="ext2" FSCK_IMAGES="yes" +ENABLE_IMAGECONF="yes" SD_DEVICE="/dev/mmcblk0p1" SD_KERNEL_MODULE="" diff --git a/packages/altboot/files/spitz/altboot-menu/.mtn2git_empty b/packages/altboot/files/spitz/altboot-menu/.mtn2git_empty deleted file mode 100644 index e69de29bb2..0000000000 --- a/packages/altboot/files/spitz/altboot-menu/.mtn2git_empty +++ /dev/null diff --git a/packages/altboot/files/spitz/altboot-menu/00-Default b/packages/altboot/files/spitz/altboot-menu/00-Default deleted file mode 100644 index 01818262a3..0000000000 --- a/packages/altboot/files/spitz/altboot-menu/00-Default +++ /dev/null @@ -1,54 +0,0 @@ -# !/bin/sh -M_TITLE="Normal Boot" - -# Note for Spitz: The HDD has already been mounted in /media/hdd from -# /etc/altboot.rc/00-Default.sh - -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!" - - test -z "$SPITZ_HDD_PART" && SPITZ_HDD_PART="/dev/hda1" - echo "Spitz: Mounting [$SPITZ_HDD_PART] as /media/hdd" - mount -t proc proc /proc || echo "Mounting /proc failed!" - - mount -o remount,rw / - - # Note: Redirecting STDIN & STDOUT is required, cardmg will die otherwise - cardmgr -o < /dev/tty0 > /dev/tty0 2>&1 || echo "cardmgr -o failed!" - - check_fs $SPITZ_HDD_PART $SPITZ_HDD_TYPE - if [ "$SPITZ_HDD_TYPE" = "" ]; then - SPITZ_HDD_TYPE="auto" - fi - - # I've seen busybox die a horrible death on "!"... - if (mount -t $SPITZ_HDD_TYPE $SPITZ_HDD_PART /media/hdd) - then - a=a - else - echo "ERROR: mount -t ext3 $SPITZ_HDD_PART /media/hdd failed!" - exec $SH_SHELL </dev/tty0 >/dev/tty0 2>&1 - fi - - # There are no device files on Spitz yet, requires HDD (bad for testing - # with CF) - for n in 0 1 2 3 4 5 - do - ! test -e /dev/loop$n && mknod /dev/loop$n b 7 $n - done - - # Check for /sbin/init and / or loop-images - check_target "/media/hdd" 5 -} - -case "$1" in -title) echo "$M_TITLE";; -run) run_module;; -esac - diff --git a/packages/altboot/files/spitz/altboot-menu/10-noGui b/packages/altboot/files/spitz/altboot-menu/10-noGui deleted file mode 100644 index e4e8b0fe37..0000000000 --- a/packages/altboot/files/spitz/altboot-menu/10-noGui +++ /dev/null @@ -1,47 +0,0 @@ -# !/bin/sh -M_TITLE="Don't launch GUI" - - -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!" - - test -z "$SPITZ_HDD_PART" && SPITZ_HDD_PART="/dev/hda1" - echo "Spitz: Mounting [$SPITZ_HDD_PART] as /media/hdd" - mount -t proc proc /proc || echo "Mounting /proc failed!" - - mount -o remount,rw / - - # Note: Redirecting STDIN & STDOUT is required, cardmg will die otherwise - cardmgr -o < /dev/tty0 > /dev/tty0 2>&1 || echo "cardmgr -o failed!" - - # I've seen busybox die a horrible death on "!"... - if (mount -t auto $SPITZ_HDD_PART /media/hdd) - then - a=a - else - echo "ERROR: mount -t ext3 $SPITZ_HDD_PART /media/hdd failed!" - exec $SH_SHELL </dev/tty0 >/dev/tty0 2>&1 - fi - - # There are no device files on Spitz yet, requires HDD (bad for testing - # with CF) - for n in 1 2 3 4 5 - do - ! test -e /dev/loop$n && mknod /dev/loop$n b 7 $n - done - - # Check for /sbin/init and / or loop-images - check_target "/media/hdd" 2 -} - -case "$1" in -title) echo "$M_TITLE";; -run) run_module;; -esac - diff --git a/packages/altboot/files/spitz/altboot-menu/15-bootSD b/packages/altboot/files/spitz/altboot-menu/15-bootSD deleted file mode 100644 index d22316033c..0000000000 --- a/packages/altboot/files/spitz/altboot-menu/15-bootSD +++ /dev/null @@ -1,64 +0,0 @@ -# !/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 SD card" - -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" - - test -z "$SPITZ_HDD_PART" && SPITZ_HDD_PART="/dev/hda1" - mount -t proc proc /proc || echo "Mounting /proc failed!" - - # Note: Redirecting STDIN & STDOUT is required, cardmg will die otherwise - cardmgr -o < /dev/tty0 > /dev/tty0 2>&1 || echo "cardmgr -o failed!" - - # I've seen busybox die a horrible death on "!"... - if (mount -t auto $SPITZ_HDD_PART /media/hdd) - then - a=a - else - echo "ERROR: mount -t auto $SPITZ_HDD_PART /media/hdd failed!" - exec $SH_SHELL </dev/tty0 >/dev/tty0 2>&1 - fi - -# echo -n "Generating device files..." >/dev/tty0 -# /etc/init.d/devices start && echo ok >/dev/tty0|| die "FAILED" - -# FIXME: generate device-files - - echo -n "Loading SD kernel module..." - /sbin/insmod $SD_KERNEL_MODULE >/dev/null 2>&1 && echo ok || die "insmod failed" - - echo -n "Mounting $SD_MOUNTPOINT..." >/dev/tty0 - /bin/mount -t auto -o defaults,noatime $SD_DEVICE $SD_MOUNTPOINT >/dev/null 2>&1 && echo ok >/dev/tty0|| die "/bin/mount -t auto -o defaults,noatime $SD_DEVICE $SD_MOUNTPOINT failed" - - echo "" - - # Give the SD and CF mounting some time. This is a must for SD - sleep 2 - - # Check for a real fs and loop-images. - check_target "$SD_MOUNTPOINT" >/dev/tty0 - -} - - -case "$1" in -title) echo "$M_TITLE";; -run) run_module "$2";; -esac - diff --git a/packages/altboot/files/spitz/altboot-menu/20-bootCF b/packages/altboot/files/spitz/altboot-menu/20-bootCF deleted file mode 100644 index 3f19b4ee48..0000000000 --- a/packages/altboot/files/spitz/altboot-menu/20-bootCF +++ /dev/null @@ -1,49 +0,0 @@ -# !/bin/sh -# -# Copyright Matthias Hentges (c) 2005 -# -# License: GPL (see http://www.gnu.org/licenses/gpl.txt for a copy of the GPL) - -# FXIME: boot CF on spitz (hdb??) -exit 0 - -M_TITLE="Boot CF card" - -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 -n "Mounting /proc..." >/dev/tty0 - mount /proc >/dev/tty0 2>&1 && echo ok >/dev/tty0|| die "mount /proc failed!" - - /etc/init.d/pcmcia start || die "/etc/init.d/pcmcia/start failed!" - - echo "" - - # Give the SD and CF mounting some time. This is a must for SD - sleep 2 - - # Check for a real fs and loop-images. - check_target "$CF_MOUNTPOINT" - -} - - -case "$1" in -title) echo "$M_TITLE";; -run) run_module "$2";; -esac - diff --git a/packages/altboot/files/spitz/altboot-menu/25-bootHDD3 b/packages/altboot/files/spitz/altboot-menu/25-bootHDD3 deleted file mode 100644 index 4280cdd35c..0000000000 --- a/packages/altboot/files/spitz/altboot-menu/25-bootHDD3 +++ /dev/null @@ -1,80 +0,0 @@ -# !/bin/sh -# -# Copyright Matthias Hentges (c) 2005 -# -# License: GPL (see http://www.gnu.org/licenses/gpl.txt for a copy of the GPL) - - -# This file will teach you how to implement your own scripts while using existing altboot -# code. - -# /sbin/init.altboot searches /etc/altboot-menu for scripts. It will only list scripts which -# return a title when run with the "title" parameter. -# Script which do not return a title will never be shown in the boot menu! -# -M_TITLE="Boot from images on HDD3" - -# The "title" parameter is implemented at the end of this script so it will never be reached -# and the script will simply be ignored by altboot. - - -# The die() function aborts the boot if something goes wrong and sets STDIN / STDERR / STDOUT -# correctly. -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() { - - # altboot.func contains re-useable code. If you intend to use check_target (see below) - # you must keep this line. If not, delete it. - test -e /etc/altboot.func && . /etc/altboot.func || die "ERROR: /etc/altboot.func not found. Check your installation!" - - - # The only thing you'll have to do is get your medium mounted. - # The following lines mount a SD card on 2.4-series kernels on a Zaurus - - ########################################## - - - 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" - - cardmgr -o < /dev/tty0 > /dev/tty0 2>&1 || echo "cardmgr -o failed!" - - check_fs $HDD3_DEVICE $HDD3_TYPE - - echo -n "Mounting $HDD3_MOUNTPOINT..." >/dev/tty0 - if [ "$HDD3_TYPE" = "" ]; then - HDD3_TYPE="auto" - fi - /bin/mount -t $HDD3_TYPE -o defaults,noatime $HDD3_DEVICE $HDD3_MOUNTPOINT >/dev/null 2>&1 && echo ok >/dev/tty0|| die "/bin/mount -t auto -o defaults,noatime $HDD3_DEVICE $HDD3_MOUNTPOINT failed" - - echo "" - - # Give the SD and CF mounting some time. This is a must for SD - sleep 2 - ########################################## - - # Once the medium (be it a CF or SD card, or even a NFS drive) is mounted somewhere, - # just call check_target with the mountpoint as parameter. - # check_target searches the medium for a real filesystem and loop-images and - # asks the user what to boot if there are several choices. - - # Check for a real fs and loop-images. - check_target "$HDD3_MOUNTPOINT" >/dev/tty0 - - # Done :) - -} - - -case "$1" in -title) echo "$M_TITLE";; -run) run_module "$2";; -esac diff --git a/packages/altboot/files/spitz/altboot-menu/99-ownScripts-example b/packages/altboot/files/spitz/altboot-menu/99-ownScripts-example deleted file mode 100644 index 61c0645176..0000000000 --- a/packages/altboot/files/spitz/altboot-menu/99-ownScripts-example +++ /dev/null @@ -1,81 +0,0 @@ -# !/bin/sh -# -# Copyright Matthias Hentges (c) 2005 -# -# License: GPL (see http://www.gnu.org/licenses/gpl.txt for a copy of the GPL) - - -# This file will teach you how to implement your own scripts while using existing altboot -# code. - -# /sbin/init.altboot searches /etc/altboot-menu for scripts. It will only list scripts which -# return a title when run with the "title" parameter. -# Script which do not return a title will never be shown in the boot menu! -# -M_TITLE="altboot sample" - -# We can use that to deactivate certain scripts: -exit 0 - -# The "title" parameter is implemented at the end of this script so it will never be reached -# and the script will simply be ignored by altboot. - - -# The die() function aborts the boot if something goes wrong and sets STDIN / STDERR / STDOUT -# correctly. -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() { - - # altboot.func contains re-useable code. If you intend to use check_target (see below) - # you must keep this line. If not, delete it. - test -e /etc/altboot.func && . /etc/altboot.func || die "ERROR: /etc/altboot.func not found. Check your installation!" - - - # The only thing you'll have to do is get your medium mounted. - # The following lines mount a SD card on 2.4-series kernels on a Zaurus - - ########################################## - - - 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 -n "Loading SD kernel module..." - /sbin/insmod $SD_KERNEL_MODULE >/dev/null 2>&1 && echo ok || die "insmod failed" - - echo -n "Mounting $SD_MOUNTPOINT..." >/dev/tty0 - /bin/mount -t auto -o defaults,noatime $SD_DEVICE $SD_MOUNTPOINT >/dev/null 2>&1 && echo ok >/dev/tty0|| die "/bin/mount -t auto -o defaults,noatime $SD_DEVICE $SD_MOUNTPOINT failed" - - echo "" - - # Give the SD and CF mounting some time. This is a must for SD - sleep 2 - ########################################## - - # Once the medium (be it a CF or SD card, or even a NFS drive) is mounted somewhere, - # just call check_target with the mountpoint as parameter. - # check_target searches the medium for a real filesystem and loop-images and - # asks the user what to boot if there are several choices. - - # Check for a real fs and loop-images. - check_target "$SD_MOUNTPOINT" >/dev/tty0 - - # Done :) - -} - - -case "$1" in -title) echo "$M_TITLE";; -run) run_module "$2";; -esac - diff --git a/packages/altboot/files/spitz/altboot-menu/Advanced/.mtn2git_empty b/packages/altboot/files/spitz/altboot-menu/Advanced/.mtn2git_empty deleted file mode 100644 index e69de29bb2..0000000000 --- a/packages/altboot/files/spitz/altboot-menu/Advanced/.mtn2git_empty +++ /dev/null diff --git a/packages/altboot/files/spitz/altboot-menu/Advanced/40-bootNFS b/packages/altboot/files/spitz/altboot-menu/Advanced/40-bootNFS deleted file mode 100644 index 6cac410019..0000000000 --- a/packages/altboot/files/spitz/altboot-menu/Advanced/40-bootNFS +++ /dev/null @@ -1,97 +0,0 @@ -# !/bin/sh -# -# Copyright Matthias Hentges (c) 2005 -# -# License: GPL (see http://www.gnu.org/licenses/gpl.txt for a copy of the GPL) - -# FIXME: Make this work - -M_TITLE="Boot from NFS" - -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 -n "Mounting /proc..." >/dev/tty0 - mount /proc >/dev/tty0 2>&1 && echo ok >/dev/tty0 || echo failed - - # Needed for NFS - /etc/init.d/portmap start >/dev/tty1 2>&1 || die "/etc/init.d/portmap start failed!" - - # For some reason NFS mounts hang if /e/i/networking is not run. - # For the time beeing I'm to lazy to investigate ;) - /etc/init.d/networking start || die "/etc/init.d/networking start failed!" - - sleep 2 - - # 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!" - - # Give WLAN time to login into the network - echo "Waiting for WLAN..." - sleep 8 - - nfs_mounts="`cat /etc/fstab | grep -v ^# | grep nfs | awk '{print $1}'`" - nfs_mountpoints="`cat /etc/fstab | grep -v ^# | grep nfs | awk '{print $2}'`" - - if test "` echo "$nfs_mountpoints" |wc -l | tr -d " "`" -gt 1 - then - echo -e "Please select your NFS root:\n" - - cnt=1 - for nfs_mount in $nfs_mountpoints - do - echo -e "\t[$cnt] $nfs_mount" - let cnt=$cnt+1 - done - - echo "" - - while test -z "$selection" - do - echo -n "Boot NFS root: " - read junk < /dev/tty1 - - cnt=1 - for nfs_mount in $nfs_mounts - do - if test "$junk" = "$cnt" - then - selection="$nfs_mount" - fi - let cnt=$cnt+1 - done - - done - else - test -z "$nfs_mounts" && die "No NFS mounts configured in /etc/fstab!" - selection="$nfs_mounts" - fi - - mkdir -p /media/nfsroot || die "mkdir -p /media/nfsroot failed!" - - echo -n "Mounting NFS root..." - mount -t nfs "$selection" /media/nfsroot && echo ok || die "mount -t nfs "$selection" /media/nfsroot failed!" - - check_target "/media/nfsroot" - -} - -case "$1" in -title) echo "$M_TITLE";; -run) run_module "$2";; -esac - diff --git a/packages/altboot/files/spitz/altboot-menu/Advanced/55-bin-sh b/packages/altboot/files/spitz/altboot-menu/Advanced/55-bin-sh deleted file mode 100644 index 6db4adaf3a..0000000000 --- a/packages/altboot/files/spitz/altboot-menu/Advanced/55-bin-sh +++ /dev/null @@ -1,23 +0,0 @@ -# !/bin/sh -M_TITLE="init=/bin/sh" - - -run_module() { - - test -e /etc/altboot.func && . /etc/altboot.func || die "ERROR: /etc/altboot.func not found. Check your installation!" - - test "$ASK_PW_ON_BOOT" != "yes" && verify_master_pw >/dev/tty0 - - echo -e "\nBoot system with 'exec /sbin/init 5'\n" - while true - do - exec $SH_SHELL </dev/tty0 >/dev/tty0 2>&1 - echo "WARNING: Shell was killed!" - done -} - -case "$1" in -title) echo "$M_TITLE";; -run) run_module;; -esac - diff --git a/packages/altboot/files/borzoi/.mtn2git_empty b/packages/altboot/files/tosa/.mtn2git_empty index e69de29bb2..e69de29bb2 100644 --- a/packages/altboot/files/borzoi/.mtn2git_empty +++ b/packages/altboot/files/tosa/.mtn2git_empty diff --git a/packages/altboot/files/borzoi/altboot-2.4.cfg b/packages/altboot/files/tosa/altboot-2.4.cfg index 8c404d4768..c463ca0a43 100644 --- a/packages/altboot/files/borzoi/altboot-2.4.cfg +++ b/packages/altboot/files/tosa/altboot-2.4.cfg @@ -9,12 +9,13 @@ SH_SHELL="/bin/sh" IMAGE_PATH="boot-images" IMAGE_TYPE="ext2" FSCK_IMAGES="yes" +ENABLE_IMAGECONF="yes" SD_DEVICE="/dev/mmcda1" -SD_KERNEL_MODULE="/lib/modules/2.4.20/kernel/drivers/block/sharp_mmcsd_m.o" +SD_KERNEL_MODULE="/lib/modules/2.4.18-rmk7-pxa3-embedix/kernel/drivers/block/sharp_mmcsd_m.o" USB_HOST_AVAILABLE="yes" -USB_STORAGE_MODULES="usb_ohci_pxa27x usb-storage" +USB_STORAGE_MODULES="usb_ohci_tc6393 usb-storage" USB_STORAGE_PARTITION="/dev/sda1" USB_STORAGE_WAIT="4" |