From: Philippe Coval Date: Tue, 7 Oct 2014 10:21:03 +0000 (+0200) Subject: efi: set default boot script to fs0: X-Git-Tag: accepted/tizen/common/20141008.190603^0 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fadaptation%2Fsetup-scripts.git;a=commitdiff_plain;h=e759fb56caad0383843773b83e7fc86bcb09ec97 efi: set default boot script to fs0: Tizen efi image was tested on minnowboardmax sdcard Change-Id: If744946937606b5b2cd5c6b6e45ee4909a48fb26 Bug-Tizen: TC-1513/related Signed-off-by: Philippe Coval --- diff --git a/setup-scripts-boot b/setup-scripts-boot index 60b42f8..e050dd9 100755 --- a/setup-scripts-boot +++ b/setup-scripts-boot @@ -31,21 +31,35 @@ install_gummiboot() local installdir="$bootdir/EFI/boot" local gummiboot_path="$(installerfw_mnt_prefix "/usr/lib/gummiboot")" + local src32="$gummiboot_path/gummibootia32.efi" + local src64="$gummiboot_path/gummibootx64.efi" + local src="" + local dst="" + + # Autoboot from fs0 by default + local efi_bootdir="fs0:" # Make sure gummiboot is installed in the system - if ! ([ -f $gummiboot_path/gummibootia32.efi ] || \ - [ -f $gummiboot_path/gummibootx64.efi ]); then + if ! ([ -f "$src32" ] || [ -f "$src64" ]); then fatal "\"$gummiboot_path/gummiboot*.efi\" files not found!" fi # Install gummiboot mkdir -p $verbose -- "$installdir" >&2 - [ -f "$gummiboot_path/gummibootia32.efi" ] && \ - cp $verbose "$gummiboot_path/gummibootia32.efi" \ - "$installdir/bootia32.efi" >&2 - [ -f "$gummiboot_path/gummibootx64.efi" ] && \ - cp $verbose "$gummiboot_path/gummibootx64.efi" \ - "$installdir/bootx64.efi" + + if [ -f "$src64" ] ; then + src="$src64" + dst="$installdir/bootx64.efi" + elif [ -f "$src32" ] ; then + src="$src32" + dst="$installdir/bootia32.efi" + fi + + if [ -f "$src" ] ; then + local basename=$(basename -- "$dst") + cp $verbose "$src" "$dst" 2>&2 + echo "${efi_bootdir}\\EFI\\boot\\$basename" > "${bootdir}/startup.nsh" + fi verbose "installed gummiboot to $bootdir" }