merge mainline into hints
This commit is contained in:
commit
17785932df
448 changed files with 43023 additions and 10176 deletions
|
@ -31,6 +31,7 @@ PACKAGE_VERSION=@PACKAGE_VERSION@
|
|||
target_cpu=@target_cpu@
|
||||
platform=@platform@
|
||||
host_os=@host_os@
|
||||
datarootdir=@datarootdir@
|
||||
pkglibdir="${libdir}/`echo ${PACKAGE_TARNAME}/${target_cpu}-${platform} | sed ${transform}`"
|
||||
localedir="@datadir@/locale"
|
||||
|
||||
|
@ -73,7 +74,7 @@ if [ "${target_cpu}-${platform}" = "i386-pc" ] ; then
|
|||
elif [ "${platform}" = "ieee1275" ] || [ "${platform}" = "efi" ] ; then
|
||||
disk_module=
|
||||
else
|
||||
disk_module=ata
|
||||
disk_module=native
|
||||
fi
|
||||
|
||||
# Usage: usage
|
||||
|
@ -109,7 +110,7 @@ Install GRUB on your drive.
|
|||
EOF
|
||||
if [ "${target_cpu}-${platform}" = "i386-pc" ] ; then
|
||||
cat <<EOF
|
||||
--disk-module=MODULE disk module to use
|
||||
--disk-module=MODULE disk module to use (biosdisk or native)
|
||||
EOF
|
||||
fi
|
||||
if [ "${target_cpu}-${platform}" = "i386-ieee1275" ] || [ "${target_cpu}-${platform}" = "powerpc-ieee1275" ] ; then
|
||||
|
@ -261,6 +262,8 @@ do
|
|||
esac
|
||||
done
|
||||
|
||||
. ${libdir}/@PACKAGE@/grub-mkconfig_lib
|
||||
|
||||
if test "x$install_device" = x && ([ "${target_cpu}-${platform}" = "i386-pc" ] \
|
||||
|| [ "${target_cpu}-${platform}" = "sparc64-ieee1275" ]); then
|
||||
echo "install_device not specified." 1>&2
|
||||
|
@ -331,6 +334,12 @@ if [ x"$platform" = xefi ]; then
|
|||
if test "x$install_device" != "x`"$grub_mkdevicemap" --device-map=/dev/stdout | "$grub_probe" --target=device --device-map=/dev/stdin "${bootdir}"`"; then
|
||||
efidir="${bootdir}/efi"
|
||||
fi
|
||||
elif test -d "${bootdir}/EFI"; then
|
||||
install_device="`"$grub_mkdevicemap" --device-map=/dev/stdout | "$grub_probe" --target=device --device-map=/dev/stdin "${bootdir}/EFI"`"
|
||||
# Is it a mount point?
|
||||
if test "x$install_device" != "x`"$grub_mkdevicemap" --device-map=/dev/stdout | "$grub_probe" --target=device --device-map=/dev/stdin "${bootdir}"`"; then
|
||||
efidir="${bootdir}/EFI"
|
||||
fi
|
||||
elif test -n "$rootdir" && test "x$rootdir" != "x/"; then
|
||||
# The EFI System Partition may have been given directly using
|
||||
# --root-directory.
|
||||
|
@ -444,6 +453,8 @@ for dir in "${localedir}"/*; do
|
|||
fi
|
||||
done
|
||||
|
||||
is_path_readable_by_grub "${grubdir}" || (echo "${grubdir}" not readable 1>&2 ; exit 1)
|
||||
|
||||
# Write device to a variable so we don't have to traverse /dev every time.
|
||||
grub_device="`"$grub_probe" --device-map="${device_map}" --target=device "${grubdir}"`" || exit 1
|
||||
|
||||
|
@ -477,6 +488,18 @@ done
|
|||
# Device abstraction module, if any (lvm, raid).
|
||||
devabstraction_module="`"$grub_probe" --device-map="${device_map}" --target=abstraction --device "${grub_device}"`"
|
||||
|
||||
if [ "x$disk_module" = xata ]; then
|
||||
disk_module=pata
|
||||
fi
|
||||
|
||||
if [ "x$disk_module" = xnative ]; then
|
||||
disk_module="pata ahci ohci"
|
||||
if [ "x$target_cpu" = "xi386" ] || [ "x$target_cpu" = "xx86_64" ]; then
|
||||
disk_module="$disk_module uhci"
|
||||
fi
|
||||
disk_module="$disk_module usbms"
|
||||
fi
|
||||
|
||||
# The order in this list is critical. Be careful when modifying it.
|
||||
modules="$modules $disk_module"
|
||||
modules="$modules $fs_module $partmap_module $devabstraction_module"
|
||||
|
@ -510,11 +533,11 @@ if [ "x${devabstraction_module}" = "x" ] ; then
|
|||
# Strip partition number
|
||||
grub_partition="`echo "${grub_drive}" | sed -e 's/^[^,]*[,)]//; s/)$//'`"
|
||||
grub_drive="`echo "${grub_drive}" | sed -e s/,[a-z0-9,]*//g`"
|
||||
if [ "$disk_module" = ata ] || [ "x${grub_drive}" != "x${install_drive}" ] || ([ "x$platform" != xefi ] && [ "x$platform" != xpc ] && [ x"${target_cpu}-${platform}" != x"sparc64-ieee1275" ]) ; then
|
||||
if ([ "x$disk_module" != x ] && [ "x$disk_module" != xbiosdisk ]) || [ "x${grub_drive}" != "x${install_drive}" ] || ([ "x$platform" != xefi ] && [ "x$platform" != xpc ] && [ x"${platform}" != x"ieee1275" ]); then
|
||||
# generic method (used on coreboot and ata mod)
|
||||
uuid="`"$grub_probe" --device-map="${device_map}" --target=fs_uuid --device "${grub_device}"`"
|
||||
if [ "x${uuid}" = "x" ] ; then
|
||||
if [ "x$platform" != xefi ] && [ "x$platform" != xpc ] && [ x"${target_cpu}-${platform}" != x"sparc64-ieee1275" ]; then
|
||||
if [ "x$platform" != xefi ] && [ "x$platform" != xpc ] && [ x"${platform}" != x"ieee1275" ]; then
|
||||
echo "UUID needed with $platform, but the filesystem containing ${grubdir} does not support UUIDs." 1>&2
|
||||
elif [ "$disk_module" = ata ]; then
|
||||
echo "UUID needed with ata mod, but the filesystem containing ${grubdir} does not support UUIDs." 1>&2
|
||||
|
@ -543,7 +566,7 @@ if [ "x${devabstraction_module}" = "x" ] ; then
|
|||
echo 'set prefix=($root)'"${relative_grubdir}" >> "${grubdir}/load.cfg"
|
||||
config_opt="-c ${grubdir}/load.cfg "
|
||||
modules="$modules search_fs_uuid"
|
||||
elif [ "x$platform" = xefi ] || [ "x$platform" = xpc ]; then
|
||||
else
|
||||
# we need to hardcode the partition number in the core image's prefix.
|
||||
if [ x"$grub_partition" = x ]; then
|
||||
prefix_drive="()"
|
||||
|
@ -552,6 +575,13 @@ if [ "x${devabstraction_module}" = "x" ] ; then
|
|||
fi
|
||||
fi
|
||||
else
|
||||
if [ x$GRUB_CRYPTODISK_ENABLE = xy ]; then
|
||||
for uuid in "`"${grub_probe}" --device "${grub_device}" --target=cryptodisk_uuid`"; do
|
||||
echo "cryptomount -u $uuid" >> "${grubdir}/load.cfg"
|
||||
done
|
||||
config_opt="-c ${grubdir}/load.cfg "
|
||||
fi
|
||||
|
||||
prefix_drive=`"$grub_probe" --device-map="${device_map}" --target=drive --device "${grub_device}"` || exit 1
|
||||
fi
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue