summaryrefslogtreecommitdiffstats
path: root/remote/rootfs/rootfs-stage31/data
diff options
context:
space:
mode:
Diffstat (limited to 'remote/rootfs/rootfs-stage31/data')
-rw-r--r--remote/rootfs/rootfs-stage31/data/inc/functions16
-rw-r--r--remote/rootfs/rootfs-stage31/data/inc/parse_kcl4
-rwxr-xr-xremote/rootfs/rootfs-stage31/data/init13
3 files changed, 31 insertions, 2 deletions
diff --git a/remote/rootfs/rootfs-stage31/data/inc/functions b/remote/rootfs/rootfs-stage31/data/inc/functions
index 5cc56dd7..b5d8f31d 100644
--- a/remote/rootfs/rootfs-stage31/data/inc/functions
+++ b/remote/rootfs/rootfs-stage31/data/inc/functions
@@ -43,7 +43,22 @@ download() {
local FILE_URL="$1"
local TARGET_PATH="$2"
+
+#Files from HD
+if [ "$HDD" = "yes" ]; then
+
+ cp /boot/$FILE_URL $TARGET_PATH
+ RET=$?
+ if [ "x$RET" != "x0" -o ! -e "$TARGET_PATH" ]; then
+ echo "Error - Copying '$FILE_URL' from HD failed. Exit Code: $RET"
+ usleep 50000 # 50ms
+ else
+ echo "Successfully copied '$FILE_URL' from HD."
+ return 0
+ fi
+
+else # Normal Download from server
# Shuffle server list
local SERVERS=$(for SERVER in $SLX_CONFIG_SERVERS $SLX_KCL_SERVERS; do echo "$RANDOM $SERVER"; done | sort -u | sed -r 's/^[0-9]+ //')
@@ -65,6 +80,7 @@ download() {
done
# Max retries reached, no success :-(
return 1
+fi
}
# Add benchmark event to var, including uptime as prefix
diff --git a/remote/rootfs/rootfs-stage31/data/inc/parse_kcl b/remote/rootfs/rootfs-stage31/data/inc/parse_kcl
index 13f9c467..8c81f65d 100644
--- a/remote/rootfs/rootfs-stage31/data/inc/parse_kcl
+++ b/remote/rootfs/rootfs-stage31/data/inc/parse_kcl
@@ -43,6 +43,10 @@ for opts in ${KCL}; do
GFX=nvidia ;;
ati|amd)
GFX=amd ;;
+ hdd_boot=*)
+ HDD='yes'
+ HDD_BOOT=${opts#hdd_boot=} ;; # all stages got from hd
+
esac
done
diff --git a/remote/rootfs/rootfs-stage31/data/init b/remote/rootfs/rootfs-stage31/data/init
index 9daa6d58..d363db51 100755
--- a/remote/rootfs/rootfs-stage31/data/init
+++ b/remote/rootfs/rootfs-stage31/data/init
@@ -69,9 +69,18 @@ if [ $SPLASH -eq 0 ]; then
[ $DEBUG -ge 1 ] && echo "4 4 1 7" > /proc/sys/kernel/printk || echo "1 1 0 1" >/proc/sys/kernel/printk
fi
-[ $DEBUG -ge 4 ] && drop_shell "Requested Debug Shell: before network."
+case $HDD in
+yes)
+ mkdir /boot
+ busybox mount /dev/$HDD_BOOT /boot
+;;
+esac
-. "/inc/setup_network" || . "/inc/setup_network_retry" || drop_shell "Error setting up network"
+[ $DEBUG -ge 4 ] && drop_shell "Requested Debug Shell: before network."
+. "/inc/setup_network"
+if [ "$?" -ne 0 -a "x$HDD" = "x" ]; then
+ . "/inc/setup_network_retry" || drop_shell "Error setting up network"
+fi
bench_event "NETWORK" "Network up and running"
[ $DEBUG -ge 3 ] && drop_shell "Requested Debug Shell: after network/before configuring."