Merge mainline into install

This commit is contained in:
Vladimir 'phcoder' Serbinenko 2010-08-30 19:58:00 +02:00
commit 00cf36062b
4 changed files with 16 additions and 41 deletions

View file

@ -233,6 +233,15 @@
* grub-core/kern/i386/pc/startup.S (grub_hard_stop) * grub-core/kern/i386/pc/startup.S (grub_hard_stop)
2010-08-30 Vladimir Serbinenko <phcoder@gmail.com>
Remove leftover embedding of font objects.
* include/grub/kernel.h (OBJ_TYPE_FONT): Removed.
* util/grub-install.in (font): Removed.
* util/grub-mkimage.c (generate_image): Remove font support. All users
updated.
2010-08-30 Vladimir Serbinenko <phcoder@gmail.com> 2010-08-30 Vladimir Serbinenko <phcoder@gmail.com>
* docs/grub.texi (Network): Fix reference to pxe_blksize. * docs/grub.texi (Network): Fix reference to pxe_blksize.

View file

@ -26,8 +26,7 @@ enum
{ {
OBJ_TYPE_ELF, OBJ_TYPE_ELF,
OBJ_TYPE_MEMDISK, OBJ_TYPE_MEMDISK,
OBJ_TYPE_CONFIG, OBJ_TYPE_CONFIG
OBJ_TYPE_FONT
}; };
/* The module header. */ /* The module header. */

View file

@ -30,7 +30,6 @@ PACKAGE_VERSION=@PACKAGE_VERSION@
target_cpu=@target_cpu@ target_cpu=@target_cpu@
platform=@platform@ platform=@platform@
host_os=@host_os@ host_os=@host_os@
font=@datadir@/@PACKAGE_TARNAME@/ascii.pf2
pkglibdir=${libdir}/`echo ${PACKAGE_TARNAME}/${target_cpu}-${platform} | sed ${transform}` pkglibdir=${libdir}/`echo ${PACKAGE_TARNAME}/${target_cpu}-${platform} | sed ${transform}`
localedir=@datadir@/locale localedir=@datadir@/locale
@ -104,11 +103,6 @@ if [ "${target_cpu}-${platform}" = "i386-ieee1275" ] || [ "${target_cpu}-${platf
cat <<EOF cat <<EOF
--no-nvram don't update the boot-device NVRAM variable --no-nvram don't update the boot-device NVRAM variable
EOF EOF
fi
if [ "${target_cpu}-${platform}" = "mips-yeeloong" ] ; then
cat <<EOF
--font=FILE font file to use
EOF
fi fi
cat <<EOF cat <<EOF
@ -154,10 +148,11 @@ do
--modules=*) --modules=*)
modules=`echo "$option" | sed 's/--modules=//'` ;; modules=`echo "$option" | sed 's/--modules=//'` ;;
# Accept and ignore for compatibility
--font) --font)
font=`argument $option "$@"`; shift;; shift;;
--font=*) --font=*)
font=`echo "$option" | sed 's/--font=//'` ;; ;;
--root-directory) --root-directory)
rootdir=`argument $option "$@"`; shift;; rootdir=`argument $option "$@"`; shift;;

View file

@ -507,12 +507,12 @@ struct fixup_block_list
static void static void
generate_image (const char *dir, char *prefix, FILE *out, char *mods[], generate_image (const char *dir, char *prefix, FILE *out, char *mods[],
char *memdisk_path, char *font_path, char *config_path, char *memdisk_path, char *config_path,
struct image_target_desc *image_target, int note) struct image_target_desc *image_target, int note)
{ {
char *kernel_img, *core_img; char *kernel_img, *core_img;
size_t kernel_size, total_module_size, core_size, exec_size; size_t kernel_size, total_module_size, core_size, exec_size;
size_t memdisk_size = 0, font_size = 0, config_size = 0, config_size_pure = 0; size_t memdisk_size = 0, config_size = 0, config_size_pure = 0;
char *kernel_path; char *kernel_path;
size_t offset; size_t offset;
struct grub_util_path_list *path_list, *p, *next; struct grub_util_path_list *path_list, *p, *next;
@ -536,12 +536,6 @@ generate_image (const char *dir, char *prefix, FILE *out, char *mods[],
total_module_size += memdisk_size + sizeof (struct grub_module_header); total_module_size += memdisk_size + sizeof (struct grub_module_header);
} }
if (font_path)
{
font_size = ALIGN_ADDR (grub_util_get_image_size (font_path));
total_module_size += font_size + sizeof (struct grub_module_header);
}
if (config_path) if (config_path)
{ {
config_size_pure = grub_util_get_image_size (config_path) + 1; config_size_pure = grub_util_get_image_size (config_path) + 1;
@ -625,20 +619,6 @@ generate_image (const char *dir, char *prefix, FILE *out, char *mods[],
offset += memdisk_size; offset += memdisk_size;
} }
if (font_path)
{
struct grub_module_header *header;
header = (struct grub_module_header *) (kernel_img + offset);
memset (header, 0, sizeof (struct grub_module_header));
header->type = grub_host_to_target32 (OBJ_TYPE_FONT);
header->size = grub_host_to_target32 (font_size + sizeof (*header));
offset += sizeof (*header);
grub_util_load_image (font_path, kernel_img + offset);
offset += font_size;
}
if (config_path) if (config_path)
{ {
struct grub_module_header *header; struct grub_module_header *header;
@ -1241,7 +1221,6 @@ Make a bootable image of GRUB.\n\
-d, --directory=DIR use images and modules under DIR [default=%s/@platform@]\n\ -d, --directory=DIR use images and modules under DIR [default=%s/@platform@]\n\
-p, --prefix=DIR set grub_prefix directory [default=%s]\n\ -p, --prefix=DIR set grub_prefix directory [default=%s]\n\
-m, --memdisk=FILE embed FILE as a memdisk image\n\ -m, --memdisk=FILE embed FILE as a memdisk image\n\
-f, --font=FILE embed FILE as a boot font\n\
-c, --config=FILE embed FILE as boot config\n\ -c, --config=FILE embed FILE as boot config\n\
-n, --note add NOTE segment for CHRP Open Firmware\n\ -n, --note add NOTE segment for CHRP Open Firmware\n\
-o, --output=FILE output a generated image to FILE [default=stdout]\n\ -o, --output=FILE output a generated image to FILE [default=stdout]\n\
@ -1330,13 +1309,6 @@ main (int argc, char *argv[])
prefix = xstrdup ("(memdisk)/boot/grub"); prefix = xstrdup ("(memdisk)/boot/grub");
break; break;
case 'f':
if (font)
free (font);
font = xstrdup (optarg);
break;
case 'c': case 'c':
if (config) if (config)
free (config); free (config);
@ -1401,7 +1373,7 @@ main (int argc, char *argv[])
} }
generate_image (dir, prefix ? : DEFAULT_DIRECTORY, fp, generate_image (dir, prefix ? : DEFAULT_DIRECTORY, fp,
argv + optind, memdisk, font, config, argv + optind, memdisk, config,
image_target, note); image_target, note);
fclose (fp); fclose (fp);