2008-01-12 Robert Millan <rmh@aybabtu.com>
* include/grub/util/getroot.h (grub_dev_abstraction_types): New enum. (grub_util_get_dev_abstraction): New function prototype. * util/getroot.c: Include `<grub/util/getroot.h>' (grub_util_get_grub_dev): Move detection of abstraction type to ... (grub_util_get_dev_abstraction): ... here (new function). * util/grub-probe.c: Convert PRINT_* to an enum. Add `PRINT_ABSTRACTION'. (probe): Probe for abstraction type when requested. (main): Understand `--target=abstraction'. * util/i386/efi/grub-install.in: Add abstraction module to core image when it is found to be necessary. * util/i386/pc/grub-install.in: Likewise. * util/powerpc/ieee1275/grub-install.in: Likewise. * util/update-grub_lib.in (font_path): Return system path without converting to GRUB path. * util/update-grub.in: Convert system path returned by font_path() to a GRUB path. Use `grub-probe -t abstraction' to determine what abstraction module is needed for loading fonts (if any). Export that as `GRUB_PRELOAD_MODULES'. * util/grub.d/00_header.in: Process `GRUB_PRELOAD_MODULES' (print insmod commands).
This commit is contained in:
parent
52bd3de956
commit
1eb8c80241
10 changed files with 135 additions and 43 deletions
|
@ -1,5 +1,5 @@
|
|||
# Helper library for update-grub
|
||||
# Copyright (C) 2007 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2007,2008 Free Software Foundation, Inc.
|
||||
#
|
||||
# GRUB is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
@ -93,19 +93,14 @@ convert_system_path_to_grub_path ()
|
|||
|
||||
font_path ()
|
||||
{
|
||||
if [ "x${GRUB_FONT_PATH}" = "x" ] ; then : ; else
|
||||
echo "${GRUB_FONT_PATH}"
|
||||
return 0
|
||||
fi
|
||||
|
||||
# Prefer system path for space reasons (/boot/grub might be a very small
|
||||
# partition in case of OpenFirmware, etc).
|
||||
for dir in ${pkgdatadir} /usr/share/grub /boot/grub ; do
|
||||
# Prefer complete fonts over incomplete ones.
|
||||
for basename in unicode unifont ascii ; do
|
||||
if path=`convert_system_path_to_grub_path ${dir}/${basename}.pff` ; then
|
||||
GRUB_FONT_PATH="${path}"
|
||||
echo "${GRUB_FONT_PATH}"
|
||||
path="${dir}/${basename}.pff"
|
||||
if convert_system_path_to_grub_path ${path} > /dev/null ; then
|
||||
echo "${path}"
|
||||
return 0
|
||||
fi
|
||||
done
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue