extend --disk-module to AHCI and USB
This commit is contained in:
parent
d9675dbee3
commit
d1e517eb20
3 changed files with 55 additions and 5 deletions
|
@ -77,7 +77,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
|
||||
|
@ -114,7 +114,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
|
||||
|
@ -486,6 +486,14 @@ 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 uhci 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"
|
||||
|
@ -519,7 +527,7 @@ 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 ] ; then
|
||||
if [ "x$disk_module" != x ] && [ "x$disk_module" != xbiosdisk ]; 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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue