summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArtem Bityutskiy <artem.bityutskiy@linux.intel.com>2013-06-26 13:25:30 +0300
committerArtem Bityutskiy <artem.bityutskiy@linux.intel.com>2013-06-26 13:25:30 +0300
commiteb1a2437212243066255b8937aafb5a9e46733a4 (patch)
tree2ff09fcc3404822337d5fe819caf6d6ae950433a
parent574ab777e68f0020b2a20fa20b41a66c46b3a765 (diff)
downloadsetup-efi-ivi-eb1a2437212243066255b8937aafb5a9e46733a4.tar.gz
setup-efi-ivi-eb1a2437212243066255b8937aafb5a9e46733a4.tar.bz2
setup-efi-ivi-eb1a2437212243066255b8937aafb5a9e46733a4.zip
setup-efi-ivi: document which environment variables we depend on
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
-rwxr-xr-xsetup-efi-ivi21
1 files changed, 17 insertions, 4 deletions
diff --git a/setup-efi-ivi b/setup-efi-ivi
index f2d3bad..3d3dd96 100755
--- a/setup-efi-ivi
+++ b/setup-efi-ivi
@@ -4,6 +4,19 @@
# Author: Artem Bityutskiy
# License: GPLv2
+#
+# This is a simple script which installs gummiboot to the ESP and creates the
+# gummiboot configuration files. This script requires a number of environment
+# variables to be defined. Namely:
+#
+# 1. INSTALLERFW_PART_COUNT - count of paritions
+# 2. INSTALLERFW_PARTX_MOUNTPOINT - mount point of partition number X
+# (0 <= x < $INSTALLERFW_PART_COUNT)
+# 3. INSTALLERFW_PARTX_PARTUUID - GPT GUID (AKA PARTUUID) of partition number X
+# 4. INSTALLERFW_PARTX_FSTYPE - which file-system format partition number X has
+# 5. INSTALLERFW_MOUNT_PREFIX - where the target partitions are mounted (the
+# "root" directory of the file-system we install gummiboot to)
+
PROG="setup-efi-ivi"
# This is a helper function which prints an error message and exits
@@ -14,7 +27,7 @@ fatal()
}
# Make sure the installer framework variables are defined
-[ "${INSTALLERFW_INSTALLER_NAME:+x}" == "x" ] ||
+[ "${INSTALLERFW_PART_COUNT:+x}" == "x" ] ||
fatal "installer framework environment variables not found"
# Find the root and boot paritions
@@ -28,11 +41,11 @@ while [ "$pnum" -lt "$INSTALLERFW_PART_COUNT" ]; do
# Find out all the required data for the root and boot partition
if [ "$mountpoint" == "/" ]; then
- root_partuuid=INSTALLERFW_PART${pnum}_PARTUUID
+ root_partuuid="INSTALLERFW_PART${pnum}_PARTUUID"
root_partuuid="$(eval printf "%s" '$'$root_partuuid)"
# The boot parition has to be at "/boot"
elif [ "$mountpoint" == "/boot" ]; then
- boot_fstype=INSTALLERFW_PART${pnum}_FSTYPE
+ boot_fstype="INSTALLERFW_PART${pnum}_FSTYPE"
boot_fstype="$(eval printf "%s" '$'$boot_fstype)"
fi
@@ -67,7 +80,7 @@ vmlinuz_version="$(printf "%s" $vmlinuz | sed -e 's/vmlinuz-\(.*\)/\1/')"
mkdir -p "$boot_mountpoint/loader"
cat > "$boot_mountpoint/loader/loader.conf" <<-EOF
-timeout 0
+timeo ut 0
default vmlinuz-$vmlinuz_version.conf
EOF