summaryrefslogtreecommitdiff
path: root/packages/altboot/files/fic-gta01
diff options
context:
space:
mode:
authorRolf Leggewie <oe-devel@rolf.leggewie.biz>2007-03-15 17:15:24 +0000
committerRolf Leggewie <oe-devel@rolf.leggewie.biz>2007-03-15 17:15:24 +0000
commit4927b4e5fc6051e475acdbd699bd0526a177f627 (patch)
treeca01495eeb670b592f51a2e1f1861cd3812a06a5 /packages/altboot/files/fic-gta01
parentb753652b5eb4a8e697ff652b5bc9bb5eb38b495f (diff)
parent10c51fbb2fe9394445c658541db485fd5a83e7c1 (diff)
merge of '286930242424d10b2503eb290dbc31c7975bab74'
and 'b7e38ccba43c893e20bc2db30dfbdd9a3f6c2053'
Diffstat (limited to 'packages/altboot/files/fic-gta01')
-rw-r--r--packages/altboot/files/fic-gta01/.mtn2git_empty0
-rw-r--r--packages/altboot/files/fic-gta01/altboot-2.6.cfg41
-rw-r--r--packages/altboot/files/fic-gta01/altboot-menu/.mtn2git_empty0
-rw-r--r--packages/altboot/files/fic-gta01/altboot-menu/00-Default14
-rw-r--r--packages/altboot/files/fic-gta01/altboot-menu/15-bootSD32
-rw-r--r--packages/altboot/files/fic-gta01/altboot-menu/Advanced/.mtn2git_empty0
-rw-r--r--packages/altboot/files/fic-gta01/altboot-menu/Advanced/30-bootUSB-Stick47
-rw-r--r--packages/altboot/files/fic-gta01/altboot-menu/Advanced/40-bootNFS110
8 files changed, 244 insertions, 0 deletions
diff --git a/packages/altboot/files/fic-gta01/.mtn2git_empty b/packages/altboot/files/fic-gta01/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/altboot/files/fic-gta01/.mtn2git_empty
diff --git a/packages/altboot/files/fic-gta01/altboot-2.6.cfg b/packages/altboot/files/fic-gta01/altboot-2.6.cfg
new file mode 100644
index 0000000000..2ad9406083
--- /dev/null
+++ b/packages/altboot/files/fic-gta01/altboot-2.6.cfg
@@ -0,0 +1,41 @@
+#
+# Altboot machine configuration for: Akita / Kernel 2.6
+#
+
+# Handled by /sbin/init.altboot
+# Allow booting images from SD or CF instead of booting
+# the ROM.
+ENABLE_ALTBOOT="yes"
+TIMEOUT="4"
+REAL_INIT="/sbin/init.sysvinit"
+SH_SHELL="/bin/sh"
+
+ENABLE_SOUND="yes"
+
+IMAGE_PATH="boot-images"
+IMAGE_TYPE="ext2"
+FSCK_IMAGES="yes"
+ENABLE_IMAGECONF="no"
+
+SD_DEVICE="/dev/mmcblk0p1"
+SD_KERNEL_MODULE="s3cmci.ko"
+
+USB_HOST_AVAILABLE="yes"
+USB_STORAGE_MODULES="ohci_hcd usb_storage sd_mod"
+USB_STORAGE_PARTITION="/dev/sda1"
+USB_STORAGE_WAIT="4"
+
+USB_NETWORKING_AVAILABLE="yes"
+USB_NW_MODULES="usbcore pxa27x_udc ohci-hcd g_ether"
+USB_NW_DEVICE="usb0"
+
+KEXEC_KERNEL_DIR="/boot"
+KEXEC_BIN="/usr/sbin/kexec"
+
+INIT_RUNLEVEL="5"
+NO_GUI_RL="2"
+MASTER_PASSWORD=""
+ASK_PW_ON_BOOT="no"
+
+SD_MOUNTPOINT="/media/card"
+CF_MOUNTPOINT="/media/cf"
diff --git a/packages/altboot/files/fic-gta01/altboot-menu/.mtn2git_empty b/packages/altboot/files/fic-gta01/altboot-menu/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/altboot/files/fic-gta01/altboot-menu/.mtn2git_empty
diff --git a/packages/altboot/files/fic-gta01/altboot-menu/00-Default b/packages/altboot/files/fic-gta01/altboot-menu/00-Default
new file mode 100644
index 0000000000..9d29fdae2a
--- /dev/null
+++ b/packages/altboot/files/fic-gta01/altboot-menu/00-Default
@@ -0,0 +1,14 @@
+# !/bin/sh
+M_TITLE="Normal Boot"
+
+
+run_module() {
+ exec $REAL_INIT "$INIT_RUNLEVEL"
+ exit 0
+}
+
+case "$1" in
+title) echo "$M_TITLE";;
+run) run_module;;
+esac
+
diff --git a/packages/altboot/files/fic-gta01/altboot-menu/15-bootSD b/packages/altboot/files/fic-gta01/altboot-menu/15-bootSD
new file mode 100644
index 0000000000..3cf49deea5
--- /dev/null
+++ b/packages/altboot/files/fic-gta01/altboot-menu/15-bootSD
@@ -0,0 +1,32 @@
+# !/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"
+
+test "$DISABLE_SD_BOOT" = yes && exit 0
+
+# 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!"
+
+ # Mount /proc, etc
+ init_rootfs
+
+ mount_sd
+
+ # 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/fic-gta01/altboot-menu/Advanced/.mtn2git_empty b/packages/altboot/files/fic-gta01/altboot-menu/Advanced/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/altboot/files/fic-gta01/altboot-menu/Advanced/.mtn2git_empty
diff --git a/packages/altboot/files/fic-gta01/altboot-menu/Advanced/30-bootUSB-Stick b/packages/altboot/files/fic-gta01/altboot-menu/Advanced/30-bootUSB-Stick
new file mode 100644
index 0000000000..b573e7a10c
--- /dev/null
+++ b/packages/altboot/files/fic-gta01/altboot-menu/Advanced/30-bootUSB-Stick
@@ -0,0 +1,47 @@
+# !/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"
+
+test "$USB_HOST_AVAILABLE" = "yes" || exit 0
+
+# 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!"
+
+ # Mount /proc, etc
+ init_rootfs
+
+ 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/fic-gta01/altboot-menu/Advanced/40-bootNFS b/packages/altboot/files/fic-gta01/altboot-menu/Advanced/40-bootNFS
new file mode 100644
index 0000000000..4f5c195be2
--- /dev/null
+++ b/packages/altboot/files/fic-gta01/altboot-menu/Advanced/40-bootNFS
@@ -0,0 +1,110 @@
+#! /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: 40-bootNFS
+# Date: 14-Apr-06
+
+
+M_TITLE="Boot from NFS"
+
+test "$DISABLE_NFS_BOOT" = yes && exit 0
+
+# 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!"
+
+ # Mount /proc, etc
+ init_rootfs
+
+ 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}'`"
+ nfs_mountpoints="`cat /etc/fstab | grep -v ^# | grep nfs | awk '{print $2}'`"
+
+ start_networking "$nfs_host"
+
+ if test -z "$nfs_host"
+ then
+ mdie "${C_RED}No configured NFS drives found in /etc/fstab$C_RESET"
+
+ fi
+
+
+ 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
+ stty echo
+ echo -n "Boot NFS root: "
+
+ 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
+ do
+ if test "$junk" = "$cnt"
+ then
+ selection="$nfs_mount"
+ echo "$junk" > /etc/.altboot-bootNFS-source.last
+ 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 || mdie "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 || mdie "mount -t nfs "$selection" /media/nfsroot failed!"
+
+ # Use configured resolv.conf in the pivoted rootfs
+ #echo -n "Copying resolv.conf..."
+ #cp /etc/resolv.conf /media/nfsroot/etc && echo ok || echo "FAILED"
+
+ check_target "/media/nfsroot" bootNFS
+
+}
+
+case "$1" in
+title) echo "$M_TITLE";;
+run) run_module "$2";;
+esac
+