diff options
author | Artem Bityutskiy <artem.bityutskiy@linux.intel.com> | 2013-09-25 10:47:38 +0300 |
---|---|---|
committer | Artem Bityutskiy <artem.bityutskiy@linux.intel.com> | 2013-09-25 14:36:42 +0300 |
commit | 4865d33478a240d3503e1e51e1d3af4fc5c5f068 (patch) | |
tree | ba60aa919242549a8586bc7b3c2c4e5a1329a270 | |
parent | 41e1f3703656de7b86eef6b688cb8e5011506a78 (diff) | |
download | setup-efi-ivi-4865d33478a240d3503e1e51e1d3af4fc5c5f068.tar.gz setup-efi-ivi-4865d33478a240d3503e1e51e1d3af4fc5c5f068.tar.bz2 setup-efi-ivi-4865d33478a240d3503e1e51e1d3af4fc5c5f068.zip |
setup-efi-ivi: always use the mount prefix variable
Installer framework exports the INSTALLERFW_MOUNT_PREFIX varable which
basically tells what is the root directory for the system image. Usually this
is just "/". But it may be something else too, for example, when we install the
system to a different disk, all the disk partitions will be temporarily mounted
somewhere like /mnt/install_disk/, and this will be the mount prefix.
So, the problem is that we did not use the mount prefix for searching for
gummiboot. It is really expected to be present on the target
system/environment, not in the system/environment we are currently running.
This patch fixes the issue.
Change-Id: Ic414087fcac454109b8c50aa01643a00886bcb8c
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
-rwxr-xr-x | setup-efi-ivi | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/setup-efi-ivi b/setup-efi-ivi index 209d5ed..f5d9356 100755 --- a/setup-efi-ivi +++ b/setup-efi-ivi @@ -50,21 +50,23 @@ while [ "$pnum" -lt "$INSTALLERFW_PART_COUNT" ]; do pnum="$((pnum+1))" done -# Get the ESP location -esp="$INSTALLERFW_MOUNT_PREFIX/$boot_mountpoint" - +# Path to the gummiboot files +gummiboot_path="$INSTALLERFW_MOUNT_PREFIX/usr/lib/gummiboot" # Make sure gummiboot is installed in the system -if ! ([ -f /usr/lib/gummiboot/gummibootia32.efi ] || \ - [ -f /usr/lib/gummiboot/gummibootx64.efi ]); then - fatal "\"/usr/lib/gummiboot/gummiboot*.efi\" files not found!" +if ! ([ -f $gummiboot_path/gummibootia32.efi ] || \ + [ -f $gummiboot_path/gummibootx64.efi ]); then + fatal "\"$gummiboot_path/gummiboot*.efi\" files not found!" fi +# Get the ESP location +esp="$INSTALLERFW_MOUNT_PREFIX/$boot_mountpoint" + # Install gummiboot mkdir -p "$esp/EFI/boot" -[ -f "/usr/lib/gummiboot/gummibootia32.efi" ] && - cp "/usr/lib/gummiboot/gummibootia32.efi" "$esp/EFI/boot/bootia32.efi" -[ -f "/usr/lib/gummiboot/gummibootx64.efi" ] && - cp "/usr/lib/gummiboot/gummibootx64.efi" "$esp/EFI/boot/bootx64.efi" +[ -f "$gummiboot_path/gummibootia32.efi" ] && + cp "$gummiboot_path/gummibootia32.efi" "$esp/EFI/boot/bootia32.efi" +[ -f "$gummiboot_path/gummibootx64.efi" ] && + cp "$gummiboot_path/gummibootx64.efi" "$esp/EFI/boot/bootx64.efi" # Generate the list of installed kernels kernels="$(ls -1 "$esp" | grep "^vmlinuz-" | sort -r | head -n1)" |