mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-21 14:59:34 +00:00
merge with mainline
This commit is contained in:
commit
dc4ca99e2e
20 files changed
+939
-77
No files matched your search
@@ -296,6 +296,7 @@ if test -e "${efi64_dir}" || test -e "${efi32_dir}"; then
|
||||
|
||||
mformat -C -f 2880 -L 16 -i "${iso9660_dir}"/efi.img ::
|
||||
mcopy -s -i "${iso9660_dir}"/efi.img ${efi_dir}/efi ::/
|
||||
rm -rf ${efi_dir}
|
||||
grub_mkisofs_arguments="${grub_mkisofs_arguments} --efi-boot efi.img"
|
||||
fi
|
||||
|
||||
|
||||
+14
-1
@@ -50,6 +50,7 @@
|
||||
enum {
|
||||
PRINT_FS,
|
||||
PRINT_FS_UUID,
|
||||
PRINT_FS_LABEL,
|
||||
PRINT_DRIVE,
|
||||
PRINT_DEVICE,
|
||||
PRINT_PARTMAP,
|
||||
@@ -291,6 +292,16 @@ probe (const char *path, char *device_name)
|
||||
|
||||
printf ("%s\n", uuid);
|
||||
}
|
||||
else if (print == PRINT_FS_LABEL)
|
||||
{
|
||||
char *label;
|
||||
if (! fs->label)
|
||||
grub_util_error ("%s does not support labels", fs->name);
|
||||
|
||||
fs->label (dev, &label);
|
||||
|
||||
printf ("%s\n", label);
|
||||
}
|
||||
|
||||
end:
|
||||
if (dev)
|
||||
@@ -326,7 +337,7 @@ Probe device information for a given path (or device, if the -d option is given)
|
||||
\n\
|
||||
-d, --device given argument is a system device, not a path\n\
|
||||
-m, --device-map=FILE use FILE as the device map [default=%s]\n\
|
||||
-t, --target=(fs|fs_uuid|drive|device|partmap|abstraction)\n\
|
||||
-t, --target=(fs|fs_uuid|fs_label|drive|device|partmap|abstraction)\n\
|
||||
print filesystem module, GRUB drive, system device, partition map module or abstraction module [default=fs]\n\
|
||||
-h, --help display this message and exit\n\
|
||||
-V, --version print version information and exit\n\
|
||||
@@ -375,6 +386,8 @@ main (int argc, char *argv[])
|
||||
print = PRINT_FS;
|
||||
else if (!strcmp (optarg, "fs_uuid"))
|
||||
print = PRINT_FS_UUID;
|
||||
else if (!strcmp (optarg, "fs_label"))
|
||||
print = PRINT_FS_LABEL;
|
||||
else if (!strcmp (optarg, "drive"))
|
||||
print = PRINT_DRIVE;
|
||||
else if (!strcmp (optarg, "device"))
|
||||
|
||||
@@ -137,11 +137,7 @@ case x${GRUB_TERMINAL_INPUT} in
|
||||
;;
|
||||
x*)
|
||||
cat << EOF
|
||||
if terminal_input ${GRUB_TERMINAL_INPUT} ; then true ; else
|
||||
# For backward compatibility with versions of terminal.mod that don't
|
||||
# understand terminal_input
|
||||
terminal ${GRUB_TERMINAL_INPUT}
|
||||
fi
|
||||
terminal_input ${GRUB_TERMINAL_INPUT}
|
||||
EOF
|
||||
;;
|
||||
esac
|
||||
@@ -152,11 +148,7 @@ case x${GRUB_TERMINAL_OUTPUT} in
|
||||
;;
|
||||
x*)
|
||||
cat << EOF
|
||||
if terminal_output ${GRUB_TERMINAL_OUTPUT} ; then true ; else
|
||||
# For backward compatibility with versions of terminal.mod that don't
|
||||
# understand terminal_output
|
||||
terminal ${GRUB_TERMINAL_OUTPUT}
|
||||
fi
|
||||
terminal_output ${GRUB_TERMINAL_OUTPUT}
|
||||
EOF
|
||||
;;
|
||||
esac
|
||||
|
||||
+39
-12
@@ -51,6 +51,10 @@ kfreebsd_entry ()
|
||||
if [ -z "${prepare_boot_cache}" ]; then
|
||||
prepare_boot_cache="$(prepare_grub_to_access_device ${GRUB_DEVICE_BOOT} | sed -e "s/^/\t/")"
|
||||
fi
|
||||
if [ -z "${prepare_module_dir_cache}" ]; then
|
||||
prepare_module_dir_cache="$(prepare_grub_to_access_device $(grub-probe -t device "${module_dir}") | sed -e "s/^/\t/")"
|
||||
fi
|
||||
|
||||
printf '%s\n' "${prepare_boot_cache}"
|
||||
cat << EOF
|
||||
echo '$(printf "$(gettext_quoted "Loading kernel of FreeBSD %s ...")" ${version})'
|
||||
@@ -63,14 +67,34 @@ EOF
|
||||
EOF
|
||||
fi
|
||||
|
||||
if test -n "${acpi_ko}" ; then
|
||||
if test -e "${module_dir}/acpi.ko" ; then
|
||||
printf '%s\n' "${prepare_module_dir_cache}"
|
||||
cat << EOF
|
||||
kfreebsd_module_elf ${acpi_ko_rel_dirname}/${acpi_ko_basename}
|
||||
kfreebsd_module_elf ${module_dir_rel}/acpi.ko
|
||||
EOF
|
||||
fi
|
||||
|
||||
case "${kfreebsd_fs}" in
|
||||
zfs)
|
||||
test -e "${module_dir}/opensolaris.ko"
|
||||
test -e "${module_dir}/zfs.ko"
|
||||
test -e "${dirname}/zfs/zpool.cache"
|
||||
|
||||
printf '%s\n' "${prepare_module_dir_cache}"
|
||||
cat << EOF
|
||||
kfreebsd_module_elf ${module_dir_rel}/opensolaris.ko
|
||||
kfreebsd_module_elf ${module_dir_rel}/zfs.ko
|
||||
EOF
|
||||
|
||||
printf '%s\n' "${prepare_boot_cache}"
|
||||
cat << EOF
|
||||
set kFreeBSD.vfs.root.mountfrom=${kfreebsd_fs}:${GRUB_DEVICE}
|
||||
kfreebsd_module ${rel_dirname}/zfs/zpool.cache type=/boot/zfs/zpool.cache
|
||||
EOF
|
||||
;;
|
||||
esac
|
||||
|
||||
cat << EOF
|
||||
set kFreeBSD.vfs.root.mountfrom=${kfreebsd_fs}:${kfreebsd_device}
|
||||
set kFreeBSD.vfs.root.mountfrom.options=rw
|
||||
}
|
||||
EOF
|
||||
@@ -100,22 +124,25 @@ while [ "x$list" != "x" ] ; do
|
||||
*) kfreebsd_fs=${GRUB_FS} ;;
|
||||
esac
|
||||
|
||||
case ${GRUB_FS} in
|
||||
zfs) kfreebsd_device=$(grub-probe -t label --device ${GRUB_DEVICE}) ;;
|
||||
*) kfreebsd_device=${GRUB_DEVICE} ;;
|
||||
esac
|
||||
|
||||
version=`echo $basename | sed -e "s,^[^0-9]*-,,g;s/\.gz$//g"`
|
||||
alt_version=`echo $version | sed -e "s,\.old$,,g"`
|
||||
|
||||
acpi_ko=
|
||||
for i in "/lib/modules/${version}/acpi.ko" "/lib/modules/${alt_version}/acpi.ko" \
|
||||
"/boot/kernel/acpi.ko"; do
|
||||
module_dir=
|
||||
for i in "/lib/modules/${version}" "/lib/modules/${alt_version}" \
|
||||
"/boot/kernel"; do
|
||||
if test -e "$i" ; then
|
||||
acpi_ko="$i"
|
||||
module_dir="$i"
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -n "${acpi_ko}" ; then
|
||||
echo "Found ACPI module: ${acpi_ko}" >&2
|
||||
acpi_ko_basename=`basename ${acpi_ko}`
|
||||
acpi_ko_dirname=`dirname ${acpi_ko}`
|
||||
acpi_ko_rel_dirname=`make_system_path_relative_to_its_root $acpi_ko_dirname`
|
||||
if test -n "${module_dir}" ; then
|
||||
echo "Found kernel module directory: ${module_dir}" >&2
|
||||
module_dir_rel=$(make_system_path_relative_to_its_root $module_dir)
|
||||
fi
|
||||
|
||||
kfreebsd_entry "${OS}" "${version}"
|
||||
|
||||
@@ -44,7 +44,8 @@ case ${GRUB_DEVICE} in
|
||||
esac
|
||||
|
||||
if [ "x${GRUB_DEVICE_UUID}" = "x" ] || [ "x${GRUB_DISABLE_LINUX_UUID}" = "xtrue" ] \
|
||||
|| ! test -e "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" ; then
|
||||
|| ! test -e "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" \
|
||||
|| uses_abstraction "${GRUB_DEVICE}" lvm; then
|
||||
LINUX_ROOT_DEVICE=${GRUB_DEVICE}
|
||||
else
|
||||
LINUX_ROOT_DEVICE=UUID=${GRUB_DEVICE_UUID}
|
||||
|
||||
@@ -212,7 +212,7 @@ fi
|
||||
# this command is allowed to fail (--target=fs already grants us that the
|
||||
# filesystem will be accessible).
|
||||
partmap_module=
|
||||
for x in `$grub_probe --target=partmap --device ${grub_device} 2> /dev/null`; do
|
||||
for x in `$grub_probe --target=partmap --device-map=${device_map} ${grubdir} 2> /dev/null`; do
|
||||
partmap_module="$partmap_module part_$x";
|
||||
done
|
||||
|
||||
|
||||
+2
-1
@@ -293,7 +293,8 @@ grub_util_init_nls (void)
|
||||
textdomain (PACKAGE);
|
||||
#endif /* (defined(ENABLE_NLS) && ENABLE_NLS) */
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* GRUB_UTIL */
|
||||
|
||||
int
|
||||
grub_dl_ref (grub_dl_t mod)
|
||||
|
||||
Reference in new issue
Block a user