summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xdownload3
-rwxr-xr-xresources/scripts/download/coreboot36
-rwxr-xr-xresources/scripts/download/flashrom17
-rwxr-xr-xresources/scripts/download/grub17
-rwxr-xr-xresources/scripts/download/ich9utils17
-rwxr-xr-xresources/scripts/download/memtest86plus17
-rwxr-xr-xresources/scripts/download/seabios17
7 files changed, 124 insertions, 0 deletions
diff --git a/download b/download
index 7d32a353..8de5e225 100755
--- a/download
+++ b/download
@@ -60,6 +60,9 @@ help() {
coreboot trees by default, but './download coreboot x60' will only download
the coreboot tree required for the target: x60
+ Each program download script should also accept the --help paramater to
+ display the usage of the script.
+
Refer to the documentation for more information.
EOF
}
diff --git a/resources/scripts/download/coreboot b/resources/scripts/download/coreboot
index 6d0aa353..b94b1bc9 100755
--- a/resources/scripts/download/coreboot
+++ b/resources/scripts/download/coreboot
@@ -21,6 +21,42 @@
[ "x${DEBUG+set}" = 'xset' ] && set -v
set -u -e
+list_supported_boards()
+{
+ for board in resources/coreboot/*; do
+ echo $board | sed 's#resources/coreboot/##'
+ done
+}
+
+usage()
+{
+ progname="./download coreboot"
+ printf "Usage:\n"
+ printf "\t%s # %s\n" \
+ "${progname}" \
+ "Download and deblob Coreboot for all the boards"
+ printf "\t%s [board [board] ...] # %s\n" \
+ "${progname}" \
+ "Download and deblob Coreboot for the given boards"
+ printf "\t%s --list-boards # %s\n" \
+ "${progname}" \
+ "Prints this help"
+ printf "\t%s --help # %s\n" \
+ "${progname}" \
+ "List supported boards"
+ printf "\t%s --help # %s\n" \
+ "${progname}" \
+ "Prints this help"
+}
+
+if [ $# -eq 1 -a "$1" == "--help" ] ; then
+ usage
+ exit 0
+elif [ $# -eq 1 -a "$1" == "--list-boards" ] ; then
+ list_supported_boards
+ exit 0
+fi
+
# set this when you want to modify each coreboot tree
# for example, you want to test custom patches
# NODELETE= ./download coreboot
diff --git a/resources/scripts/download/flashrom b/resources/scripts/download/flashrom
index a22f22f2..c5ff4bac 100755
--- a/resources/scripts/download/flashrom
+++ b/resources/scripts/download/flashrom
@@ -21,6 +21,23 @@
[ "x${DEBUG+set}" = 'xset' ] && set -v
set -u -e
+usage()
+{
+ progname="./download flashrom"
+ printf "Usage:\n"
+ printf "\t%s # %s\n" \
+ "${progname}" \
+ "Download flashrom"
+ printf "\t%s --help # %s\n" \
+ "${progname}" \
+ "Prints this help"
+}
+
+if [ $# -ne 0 ] ; then
+ usage
+ exit 0
+fi
+
# Get flashrom at the last previously tested revision
# Remove the old version that may still exist:
diff --git a/resources/scripts/download/grub b/resources/scripts/download/grub
index 47c75bc1..97bae1ed 100755
--- a/resources/scripts/download/grub
+++ b/resources/scripts/download/grub
@@ -21,6 +21,23 @@
[ "x${DEBUG+set}" = 'xset' ] && set -v
set -u -e
+usage()
+{
+ progname="./download grub"
+ printf "Usage:\n"
+ printf "\t%s # %s\n" \
+ "${progname}" \
+ "Download GRUB"
+ printf "\t%s --help # %s\n" \
+ "${progname}" \
+ "Prints this help"
+}
+
+if [ $# -ne 0 ] ; then
+ usage
+ exit 0
+fi
+
# Remove the old version that may still exist
# ------------------------------------------------------------------------------
diff --git a/resources/scripts/download/ich9utils b/resources/scripts/download/ich9utils
index a00f27dd..d8232b03 100755
--- a/resources/scripts/download/ich9utils
+++ b/resources/scripts/download/ich9utils
@@ -21,6 +21,23 @@
[ "x${DEBUG+set}" = 'xset' ] && set -v
set -u -e
+usage()
+{
+ progname="./download ich9utils"
+ printf "Usage:\n"
+ printf "\t%s # %s\n" \
+ "${progname}" \
+ "Download ich9utils"
+ printf "\t%s --help # %s\n" \
+ "${progname}" \
+ "Prints this help"
+}
+
+if [ $# -ne 0 ] ; then
+ usage
+ exit 0
+fi
+
printf "Downloading ich9utils\n"
if [ -d ich9utils ]; then
diff --git a/resources/scripts/download/memtest86plus b/resources/scripts/download/memtest86plus
index 1b3da822..c0897c80 100755
--- a/resources/scripts/download/memtest86plus
+++ b/resources/scripts/download/memtest86plus
@@ -23,6 +23,23 @@
[ "x${DEBUG+set}" = 'xset' ] && set -v
set -u -e
+usage()
+{
+ progname="./download memtest86plus"
+ printf "Usage:\n"
+ printf "\t%s # %s\n" \
+ "${progname}" \
+ "Download MemTest86+"
+ printf "\t%s --help # %s\n" \
+ "${progname}" \
+ "Prints this help"
+}
+
+if [ $# -ne 0 ] ; then
+ usage
+ exit 0
+fi
+
# Get the last version of MemTest86+ used, apply patches, build it.
# Remove the old version that may exist
diff --git a/resources/scripts/download/seabios b/resources/scripts/download/seabios
index 58ea2bb8..a7c4ab5e 100755
--- a/resources/scripts/download/seabios
+++ b/resources/scripts/download/seabios
@@ -19,6 +19,23 @@
[ "x${DEBUG+set}" = 'xset' ] && set -v
set -u -e
+usage()
+{
+ progname="./download seabios"
+ printf "Usage:\n"
+ printf "\t%s # %s\n" \
+ "${progname}" \
+ "Download SeaBIOS"
+ printf "\t%s --help # %s\n" \
+ "${progname}" \
+ "Prints this help"
+}
+
+if [ $# -ne 0 ] ; then
+ usage
+ exit 0
+fi
+
# Get SeaBIOS, revert to commit last used and apply patches.
# Remove the old version that may still exist