summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArtem Bityutskiy <artem.bityutskiy@linux.intel.com>2013-06-26 14:22:40 +0300
committerArtem Bityutskiy <artem.bityutskiy@linux.intel.com>2013-06-26 14:25:54 +0300
commitadb3e86d99cdcc8918c15f76154c718998ecca1a (patch)
treeed8c4b806002bc0a687f4f43a1d983134fc93dc2
parent7c7ebc28c16aff10ffb7b4fe6a7beba50c9be2ce (diff)
downloadsetup-efi-ivi-adb3e86d99cdcc8918c15f76154c718998ecca1a.tar.gz
setup-efi-ivi-adb3e86d99cdcc8918c15f76154c718998ecca1a.tar.bz2
setup-efi-ivi-adb3e86d99cdcc8918c15f76154c718998ecca1a.zip
setup-efi-ivi: use less hard-coding
We do require that the boot partition is under /boot. But let's do it in less places. Once we know the boot partition number (N), use the INSTALLERFW_PARTN_MOUNTPOINT instead. Also, remove the vfat type checking - it is an unneeded complication. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
-rwxr-xr-xsetup-efi-ivi16
1 files changed, 5 insertions, 11 deletions
diff --git a/setup-efi-ivi b/setup-efi-ivi
index 60dc818..7860497 100755
--- a/setup-efi-ivi
+++ b/setup-efi-ivi
@@ -13,8 +13,7 @@
# 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
+# 4. INSTALLERFW_MOUNT_PREFIX - where the target partitions are mounted (the
# "root" directory of the file-system we install gummiboot to)
PROG="setup-efi-ivi"
@@ -30,10 +29,10 @@ fatal()
[ "${INSTALLERFW_PART_COUNT:+x}" == "x" ] ||
fatal "installer framework environment variables not found"
-# Find the root and boot paritions
+# Find the required root and boot parition parameters
pnum=0
root_partuuid=
-boot_fstype=
+boot_mountpoint=
while [ "$pnum" -lt "$INSTALLERFW_PART_COUNT" ]; do
mountpoint="INSTALLERFW_PART${pnum}_MOUNTPOINT"
@@ -45,19 +44,14 @@ while [ "$pnum" -lt "$INSTALLERFW_PART_COUNT" ]; do
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="$(eval printf "%s" '$'$boot_fstype)"
+ boot_mountpoint="$mountpoint"
fi
pnum="$((pnum+1))"
done
-# Make sure that the boot partition has a FAT file-system
-[ "$boot_fstype" == "vfat" ] || \
- fatal "boot partition has to have type \"vfat\""
-
# Get the ESP location
-esp="$INSTALLERFW_MOUNT_PREFIX/boot"
+esp="$INSTALLERFW_MOUNT_PREFIX/$boot_mountpoint"
# Make sure gummiboot is installed in the system
if ! ([ -f /usr/lib/gummiboot/gummibootia32.efi ] || \