From: Vladimir 'phcoder' Serbinenko Date: Tue, 27 Apr 2010 08:47:29 +0000 (+0200) Subject: merge merge-mkimage into rescue-efi X-Git-Tag: 1.99~901^2~8 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=19ba92760a21f124700a3cee7953ac7404e35a45;p=thirdparty%2Fgrub.git merge merge-mkimage into rescue-efi --- 19ba92760a21f124700a3cee7953ac7404e35a45 diff --cc util/grub-mkrescue.in index 057577272,a5430534a..cf791d108 --- a/util/grub-mkrescue.in +++ b/util/grub-mkrescue.in @@@ -203,35 -191,8 +203,35 @@@ if test -e "${pc_dir}" ; the --embedded-boot ${embed_img}" fi +if test -e "${efi64_dir}" || test -e "${efi32_dir}"; then + efi_dir=`mktemp -d "$MKTEMP_TEMPLATE"` + mkdir -p "${efi_dir}/efi/boot" +else + efi_dir= +fi + +# build bootx64.efi +if test -e "${efi64_dir}" ; then + echo "Enabling EFI64 support ..." - grub-mkimage -d "${efi64_dir}" -o "${efi_dir}"/efi/boot/bootx64.efi --prefix=/boot/grub/x86_64-efi \ ++ grub-mkimage -O x86_64-efi -d "${efi64_dir}" -o "${efi_dir}"/efi/boot/bootx64.efi --prefix=/boot/grub/x86_64-efi \ + search iso9660 configfile sh + + modules="$(cat "${efi64_dir}"/partmap.lst) ${modules}" + (for i in ${modules} ; do + echo "insmod $i" + done ; \ + echo "source /boot/grub/grub.cfg") \ + > "${iso9660_dir}"/boot/grub/x86_64-efi/grub.cfg +fi + +if test x"${efi_dir}" != x; then + mformat -C -f 2880 -L 16 -i "${iso9660_dir}"/efi.img :: + mcopy -s -i "${iso9660_dir}"/efi.img ${efi_dir}/efi ::/ + grub_mkisofs_arguments="${grub_mkisofs_arguments} --efi-boot efi.img" +fi + # build iso image -grub-mkisofs ${grub_mkisofs_arguments} --protective-msdos-label -o ${output_image} -r ${iso9660_dir} ${source} +xorrisofs ${grub_mkisofs_arguments} --protective-msdos-label -o ${output_image} -r ${iso9660_dir} ${source} rm -rf ${iso9660_dir} rm -f ${embed_img}