Merge branch 'mainline' into mips

This commit is contained in:
phcoder 2009-10-18 16:12:53 +02:00
commit b78f2e6e10
13 changed files with 214 additions and 160 deletions

View file

@ -1,3 +1,86 @@
2009-10-16 Vladimir Serbinenko <phcoder@gmail.com>
Let user specify OpenBSD root device.
* loader/i386/bsd.c (openbsd_root): New variable.
(openbsd_opts): New option 'root'.
(OPENBSD_ROOT_ARG): New macro.
(grub_openbsd_boot): Use 'openbsd_root'.
(grub_cmd_openbsd): Fill 'openbsd_root'.
2009-10-16 Robert Millan <rmh.grub@aybabtu.com>
* NEWS: Misc adjustments.
2009-10-16 Vladimir Serbinenko <phcoder@gmail.com>
* NEWS: Mentioned XNU, ACPI, gptsync, password and parttool.
2009-10-16 Robert Millan <rmh.grub@aybabtu.com>
* configure.ac: Bump version to 1.97.
2009-10-16 Colin Watson <cjwatson@ubuntu.com>
* configure.ac (TARGET_CFLAGS): Add -mno-mmx -mno-sse -mno-sse2
-mno-3dnow on x86 architectures. Some toolchains enable these
features by default, but they rely on registers that aren't enabled
in GRUB. Thanks to Vladimir Serbinenko for the suggestion.
2009-10-15 Robert Millan <rmh.grub@aybabtu.com>
Make entry text a bit more readable.
* util/grub.d/10_linux.in: Add `with' before `Linux'.
2009-10-15 Vladimir Serbinenko <phcoder@gmail.com>
* loader/i386/pc/xnu.c (grub_xnu_set_video): Fix loading splash image.
2009-10-15 Vladimir Serbinenko <phcoder@gmail.com>
* commands/xnu_uuid.c (grub_cmd_xnu_uuid): Remove duplicated bitwise
operations.
2009-10-15 Vladimir Serbinenko <phcoder@gmail.com>
* configure.ac: Add missing dollar.
2009-10-15 Vladimir Serbinenko <phcoder@gmail.com>
Revert 2009-06-10 Pavel Roskin <proski@gnu.org>
* configure.ac: Put checks for __bswapsi2 and __bswapdi2.
* include/grub/powerpc/libgcc.h: Don't use weak attribute for all
exports.
* include/grub/sparc64/libgcc.h: Likewise. Use
preprocessor conditionals.
2009-10-14 Robert Millan <rmh.grub@aybabtu.com>
* conf/common.rmk (grub-dumpbios): Remove rule.
(sbin_SCRIPTS, CLEANFILES): Remove `grub-dumpbios'.
* util/grub-dumpbios.in: Remove file.
2009-10-14 Robert Millan <rmh.grub@aybabtu.com>
Refer to kernel of FreeBSD "kFreeBSD" to avoid confusion between
the Operating System (FreeBSD) and its kernel (kernel of FreeBSD).
* loader/i386/bsd.c (grub_freebsd_boot): Read kernel environment
from "kFreeBSD" namespace (rather than "FreeBSD"). Update all
users.
(GRUB_MOD_INIT (bsd)): Rename "freebsd" command to "kfreebsd",
"openbsd" to "kopenbsd", "netbsd" to "knetbsd", "freebsd_loadenv"
to "kfreebsd_loadenv", "freebsd_module" to "kfreebsd_module",
and "freebsd_module_elf" to "kfreebsd_module_elf". Update all
users.
2009-10-12 Robert Millan <rmh.grub@aybabtu.com>
* term/tparm.c: Switch to GPLv3.
2009-10-09 Robert Millan <rmh.grub@aybabtu.com> 2009-10-09 Robert Millan <rmh.grub@aybabtu.com>
* include/grub/i386/cpuid.h: Add header protection. * include/grub/i386/cpuid.h: Add header protection.

20
NEWS
View file

@ -1,5 +1,15 @@
New in 1.97 - : New in 1.97 - :
* Add support for loading XNU (MacOS X kernel).
* ACPI override support.
* Integrated gptsync.
* Password protection support.
* Partition manipulation tool.
* Add `keystatus' command. * Add `keystatus' command.
* Unicode fonts are now used by default. * Unicode fonts are now used by default.
@ -12,9 +22,7 @@ New in 1.97 - :
* Add support for RAID levels 4,6 and 10. * Add support for RAID levels 4,6 and 10.
* Add support for lua scripts. * update-grub is replaced by grub-mkconfig.
* update-grub is renamed to grub-mkconfig.
* When booting from PXE, PXE can be used to load files. * When booting from PXE, PXE can be used to load files.
@ -26,8 +34,6 @@ New in 1.97 - :
* Add Cygwin support. * Add Cygwin support.
* Add grub-pe2elf to convert PE modules to ELF modules.
* Add x86_64 EFI support. * Add x86_64 EFI support.
* Use LZMA compression instead of LZO. * Use LZMA compression instead of LZO.
@ -47,13 +53,13 @@ New in 1.97 - :
* grub-mkconfig supports os-prober to add operating systems to the * grub-mkconfig supports os-prober to add operating systems to the
boot menu. boot menu.
* The ATA driver supports filesystems bigger than 2TB. * The ATA driver supports devices bigger than 2 TiB.
* Add support for the UDF, AFS and EXT4 filesystems. * Add support for the UDF, AFS and EXT4 filesystems.
* The ISO9660 filesystem supports the Joliet extension * The ISO9660 filesystem supports the Joliet extension
* Add aout and BSD kernel loaders. * Add support for loading kernels of FreeBSD, NetBSD and OpenBSD.
* Add new command `sleep'. * Add new command `sleep'.

View file

@ -349,8 +349,6 @@ grub_cmd_xnu_uuid (grub_command_t cmd __attribute__ ((unused)),
grub_memcpy (hashme.prefix, hash_prefix, sizeof (hashme.prefix)); grub_memcpy (hashme.prefix, hash_prefix, sizeof (hashme.prefix));
md5 ((char *) &hashme, sizeof (hashme), (char *) xnu_uuid); md5 ((char *) &hashme, sizeof (hashme), (char *) xnu_uuid);
xnu_uuid[6] = (xnu_uuid[6] & 0xf) | 0x30;
xnu_uuid[8] = (xnu_uuid[8] & 0x3f) | 0x80;
grub_sprintf (uuid_string, grub_sprintf (uuid_string,
"%02x%02x%02x%02x-%02x%02x-%02x%02x-%02x%02x-%02x%02x%02x%02x%02x%02x", "%02x%02x%02x%02x-%02x%02x-%02x%02x-%02x%02x-%02x%02x%02x%02x%02x%02x",
(unsigned int) xnu_uuid[0], (unsigned int) xnu_uuid[1], (unsigned int) xnu_uuid[0], (unsigned int) xnu_uuid[1],

View file

@ -161,13 +161,6 @@ CLEANFILES += $(grub-mkconfig_SCRIPTS)
grub-mkconfig_DATA += util/grub.d/README grub-mkconfig_DATA += util/grub.d/README
# For grub-dumpbios
grub-dumpbios: util/grub-dumpbios.in config.status
./config.status --file=$@:$<
chmod +x $@
sbin_SCRIPTS += grub-dumpbios
CLEANFILES += grub-dumpbios
# Filing systems. # Filing systems.
pkglib_MODULES += fshelp.mod fat.mod ufs1.mod ufs2.mod ext2.mod ntfs.mod \ pkglib_MODULES += fshelp.mod fat.mod ufs1.mod ufs2.mod ext2.mod ntfs.mod \
ntfscomp.mod minix.mod hfs.mod jfs.mod iso9660.mod xfs.mod \ ntfscomp.mod minix.mod hfs.mod jfs.mod iso9660.mod xfs.mod \

View file

@ -31,7 +31,7 @@ dnl (such as TARGET_CC, TARGET_CFLAGS, etc.) are used for the target
dnl type. dnl type.
AC_INIT([GRUB],[1.97~beta4],[bug-grub@gnu.org]) AC_INIT([GRUB],[1.97],[bug-grub@gnu.org])
AC_PREREQ(2.59) AC_PREREQ(2.59)
AC_CONFIG_SRCDIR([include/grub/dl.h]) AC_CONFIG_SRCDIR([include/grub/dl.h])
AC_CONFIG_HEADER([config.h]) AC_CONFIG_HEADER([config.h])
@ -266,6 +266,10 @@ if test "x$TARGET_CFLAGS" = x; then
else else
TARGET_CFLAGS="$TARGET_CFLAGS -malign-jumps=1 -malign-loops=1 -malign-functions=1" TARGET_CFLAGS="$TARGET_CFLAGS -malign-jumps=1 -malign-loops=1 -malign-functions=1"
fi fi
# Some toolchains enable these features by default, but they need
# registers that aren't set up properly in GRUB.
TARGET_CFLAGS="$TARGET_CFLAGS -mno-mmx -mno-sse -mno-sse2 -mno-3dnow"
fi fi
# By default, GCC 4.4 generates .eh_frame sections containing unwind # By default, GCC 4.4 generates .eh_frame sections containing unwind
@ -431,6 +435,9 @@ fi
CPPFLAGS="$TARGET_CPPFLAGS" CPPFLAGS="$TARGET_CPPFLAGS"
LDFLAGS="$TARGET_LDFLAGS" LDFLAGS="$TARGET_LDFLAGS"
# Check for target functions.
AC_CHECK_FUNCS(__bswapsi2 __bswapdi2)
# Defined in aclocal.m4. # Defined in aclocal.m4.
grub_PROG_TARGET_CC grub_PROG_TARGET_CC
if test "x$TARGET_APPLE_CC" != x1 ; then if test "x$TARGET_APPLE_CC" != x1 ; then
@ -555,7 +562,7 @@ AC_CHECK_LIB([usb], [usb_claim_interface], [LIBUSB="-lusb"],
AC_CHECK_HEADERS([usb.h], [], AC_CHECK_HEADERS([usb.h], [],
[grub_emu_usb_excuse=["need libusb headers"]]) [grub_emu_usb_excuse=["need libusb headers"]])
[fi] [fi]
if test x"enable_grub_emu_usb" = xyes && test x"$grub_emu_usb_excuse" != x ; then if test x"$enable_grub_emu_usb" = xyes && test x"$grub_emu_usb_excuse" != x ; then
AC_MSG_ERROR([USB support for grub-emu was explicitly requested but can't be compiled]) AC_MSG_ERROR([USB support for grub-emu was explicitly requested but can't be compiled])
fi fi
if test x"$grub_emu_usb_excuse" = x ; then if test x"$grub_emu_usb_excuse" = x ; then

View file

@ -16,9 +16,9 @@
* along with GRUB. If not, see <http://www.gnu.org/licenses/>. * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
*/ */
void EXPORT_FUNC (memset) (void) __attribute__ ((weak)); void EXPORT_FUNC (memset) (void);
void EXPORT_FUNC (__ashldi3) (void) __attribute__ ((weak)); void EXPORT_FUNC (__ashldi3) (void);
void EXPORT_FUNC (__ashrdi3) (void) __attribute__ ((weak)); void EXPORT_FUNC (__ashrdi3) (void);
void EXPORT_FUNC (__lshrdi3) (void) __attribute__ ((weak)); void EXPORT_FUNC (__lshrdi3) (void);
void EXPORT_FUNC (__trampoline_setup) (void) __attribute__ ((weak)); void EXPORT_FUNC (__trampoline_setup) (void);
void EXPORT_FUNC (__ucmpdi2) (void) __attribute__ ((weak)); void EXPORT_FUNC (__ucmpdi2) (void);

View file

@ -20,8 +20,12 @@
void EXPORT_FUNC (memset) (void); void EXPORT_FUNC (memset) (void);
#ifdef HAVE___BSWAPSI2
typedef int SItype __attribute__ ((mode (SI))); typedef int SItype __attribute__ ((mode (SI)));
SItype EXPORT_FUNC (__bswapsi2) (SItype) __attribute__ ((weak)); SItype EXPORT_FUNC (__bswapsi2) (SItype);
#endif
#ifdef HAVE___BSWAPDI2
typedef int DItype __attribute__ ((mode (DI))); typedef int DItype __attribute__ ((mode (DI)));
DItype EXPORT_FUNC (__bswapdi2) (DItype) __attribute__ ((weak)); DItype EXPORT_FUNC (__bswapdi2) (DItype);
#endif

View file

@ -58,6 +58,7 @@ static char *mod_buf;
static grub_uint32_t mod_buf_len, mod_buf_max, kern_end_mdofs; static grub_uint32_t mod_buf_len, mod_buf_max, kern_end_mdofs;
static int is_elf_kernel, is_64bit; static int is_elf_kernel, is_64bit;
static char *netbsd_root = NULL; static char *netbsd_root = NULL;
static grub_uint32_t openbsd_root;
static const struct grub_arg_option freebsd_opts[] = static const struct grub_arg_option freebsd_opts[] =
{ {
@ -94,6 +95,7 @@ static const struct grub_arg_option openbsd_opts[] =
{"config", 'c', 0, "Change configured devices.", 0, 0}, {"config", 'c', 0, "Change configured devices.", 0, 0},
{"single", 's', 0, "Boot into single mode.", 0, 0}, {"single", 's', 0, "Boot into single mode.", 0, 0},
{"kdb", 'd', 0, "Enter in KDB on boot.", 0, 0}, {"kdb", 'd', 0, "Enter in KDB on boot.", 0, 0},
{"root", 'r', 0, "Set root device.", "wdXY", ARG_TYPE_STRING},
{0, 0, 0, 0, 0, 0} {0, 0, 0, 0, 0, 0}
}; };
@ -103,6 +105,8 @@ static const grub_uint32_t openbsd_flags[] =
OPENBSD_RB_SINGLE, OPENBSD_RB_KDB, 0 OPENBSD_RB_SINGLE, OPENBSD_RB_KDB, 0
}; };
#define OPENBSD_ROOT_ARG (ARRAY_SIZE (openbsd_flags) - 1)
static const struct grub_arg_option netbsd_opts[] = static const struct grub_arg_option netbsd_opts[] =
{ {
{"no-smp", '1', 0, "Disable SMP.", 0, 0}, {"no-smp", '1', 0, "Disable SMP.", 0, 0},
@ -444,9 +448,9 @@ grub_freebsd_boot (void)
auto int iterate_env (struct grub_env_var *var); auto int iterate_env (struct grub_env_var *var);
int iterate_env (struct grub_env_var *var) int iterate_env (struct grub_env_var *var)
{ {
if ((!grub_memcmp (var->name, "FreeBSD.", 8)) && (var->name[8])) if ((!grub_memcmp (var->name, "kFreeBSD.", sizeof("kFreeBSD.") - 1)) && (var->name[sizeof("kFreeBSD.") - 1]))
{ {
grub_strcpy (p, &var->name[8]); grub_strcpy (p, &var->name[sizeof("kFreeBSD.") - 1]);
p += grub_strlen (p); p += grub_strlen (p);
*(p++) = '='; *(p++) = '=';
grub_strcpy (p, var->value); grub_strcpy (p, var->value);
@ -565,7 +569,6 @@ grub_openbsd_boot (void)
char *buf = (char *) GRUB_BSD_TEMP_BUFFER; char *buf = (char *) GRUB_BSD_TEMP_BUFFER;
struct grub_openbsd_bios_mmap *pm; struct grub_openbsd_bios_mmap *pm;
struct grub_openbsd_bootargs *pa; struct grub_openbsd_bootargs *pa;
grub_uint32_t bootdev, biosdev, unit, slice, part;
auto int NESTED_FUNC_ATTR hook (grub_uint64_t, grub_uint64_t, grub_uint32_t); auto int NESTED_FUNC_ATTR hook (grub_uint64_t, grub_uint64_t, grub_uint32_t);
int NESTED_FUNC_ATTR hook (grub_uint64_t addr, grub_uint64_t size, grub_uint32_t type) int NESTED_FUNC_ATTR hook (grub_uint64_t addr, grub_uint64_t size, grub_uint32_t type)
@ -614,11 +617,7 @@ grub_openbsd_boot (void)
pa->ba_type = OPENBSD_BOOTARG_END; pa->ba_type = OPENBSD_BOOTARG_END;
pa++; pa++;
grub_bsd_get_device (&biosdev, &unit, &slice, &part); grub_unix_real_boot (entry, bootflags, openbsd_root, OPENBSD_BOOTARG_APIVER,
bootdev = (OPENBSD_B_DEVMAGIC + (unit << OPENBSD_B_UNITSHIFT) +
(part << OPENBSD_B_PARTSHIFT));
grub_unix_real_boot (entry, bootflags, bootdev, OPENBSD_BOOTARG_APIVER,
0, (grub_uint32_t) (grub_mmap_get_upper () >> 10), 0, (grub_uint32_t) (grub_mmap_get_upper () >> 10),
(grub_uint32_t) (grub_mmap_get_lower () >> 10), (grub_uint32_t) (grub_mmap_get_lower () >> 10),
(char *) pa - buf, buf); (char *) pa - buf, buf);
@ -1015,11 +1014,39 @@ grub_cmd_freebsd (grub_extcmd_t cmd, int argc, char *argv[])
static grub_err_t static grub_err_t
grub_cmd_openbsd (grub_extcmd_t cmd, int argc, char *argv[]) grub_cmd_openbsd (grub_extcmd_t cmd, int argc, char *argv[])
{ {
grub_uint32_t bootdev;
kernel_type = KERNEL_TYPE_OPENBSD; kernel_type = KERNEL_TYPE_OPENBSD;
bootflags = grub_bsd_parse_flags (cmd->state, openbsd_flags); bootflags = grub_bsd_parse_flags (cmd->state, openbsd_flags);
if (cmd->state[OPENBSD_ROOT_ARG].set)
{
const char *arg = cmd->state[OPENBSD_ROOT_ARG].arg;
int unit, part;
if (*(arg++) != 'w' || *(arg++) != 'd')
return grub_error (GRUB_ERR_BAD_ARGUMENT,
"Only device specifications of form "
"wd<number><lowercase letter> are supported.");
unit = grub_strtoul (arg, (char **) &arg, 10);
if (! (arg && *arg >= 'a' && *arg <= 'z'))
return grub_error (GRUB_ERR_BAD_ARGUMENT,
"Only device specifications of form "
"wd<number><lowercase letter> are supported.");
part = *arg - 'a';
bootdev = (OPENBSD_B_DEVMAGIC + (unit << OPENBSD_B_UNITSHIFT) +
(part << OPENBSD_B_PARTSHIFT));
}
else
bootdev = 0;
if (grub_bsd_load (argc, argv) == GRUB_ERR_NONE) if (grub_bsd_load (argc, argv) == GRUB_ERR_NONE)
{
grub_loader_set (grub_openbsd_boot, grub_bsd_unload, 1); grub_loader_set (grub_openbsd_boot, grub_bsd_unload, 1);
openbsd_root = bootdev;
}
return grub_errno; return grub_errno;
} }
@ -1112,12 +1139,12 @@ grub_cmd_freebsd_loadenv (grub_command_t cmd __attribute__ ((unused)),
if (*curr) if (*curr)
{ {
char name[grub_strlen (curr) + 8 + 1]; char name[grub_strlen (curr) + sizeof("kFreeBSD.")];
if (*p == '"') if (*p == '"')
p++; p++;
grub_sprintf (name, "FreeBSD.%s", curr); grub_sprintf (name, "kFreeBSD.%s", curr);
if (grub_env_set (name, p)) if (grub_env_set (name, p))
goto fail; goto fail;
} }
@ -1252,26 +1279,26 @@ static grub_command_t cmd_freebsd_module_elf;
GRUB_MOD_INIT (bsd) GRUB_MOD_INIT (bsd)
{ {
cmd_freebsd = grub_register_extcmd ("freebsd", grub_cmd_freebsd, cmd_freebsd = grub_register_extcmd ("kfreebsd", grub_cmd_freebsd,
GRUB_COMMAND_FLAG_BOTH, GRUB_COMMAND_FLAG_BOTH,
"freebsd FILE", "Load kernel of FreeBSD.", "kfreebsd FILE", "Load kernel of FreeBSD.",
freebsd_opts); freebsd_opts);
cmd_openbsd = grub_register_extcmd ("openbsd", grub_cmd_openbsd, cmd_openbsd = grub_register_extcmd ("kopenbsd", grub_cmd_openbsd,
GRUB_COMMAND_FLAG_BOTH, GRUB_COMMAND_FLAG_BOTH,
"openbsd FILE", "Load kernel of OpenBSD.", "kopenbsd FILE", "Load kernel of OpenBSD.",
openbsd_opts); openbsd_opts);
cmd_netbsd = grub_register_extcmd ("netbsd", grub_cmd_netbsd, cmd_netbsd = grub_register_extcmd ("knetbsd", grub_cmd_netbsd,
GRUB_COMMAND_FLAG_BOTH, GRUB_COMMAND_FLAG_BOTH,
"netbsd FILE", "Load kernel of NetBSD.", "knetbsd FILE", "Load kernel of NetBSD.",
netbsd_opts); netbsd_opts);
cmd_freebsd_loadenv = cmd_freebsd_loadenv =
grub_register_command ("freebsd_loadenv", grub_cmd_freebsd_loadenv, grub_register_command ("kfreebsd_loadenv", grub_cmd_freebsd_loadenv,
0, "load FreeBSD env"); 0, "load FreeBSD env");
cmd_freebsd_module = cmd_freebsd_module =
grub_register_command ("freebsd_module", grub_cmd_freebsd_module, grub_register_command ("kfreebsd_module", grub_cmd_freebsd_module,
0, "load FreeBSD kernel module"); 0, "load FreeBSD kernel module");
cmd_freebsd_module_elf = cmd_freebsd_module_elf =
grub_register_command ("freebsd_module_elf", grub_cmd_freebsd_module_elf, grub_register_command ("kfreebsd_module_elf", grub_cmd_freebsd_module_elf,
0, "load FreeBSD kernel module (ELF)"); 0, "load FreeBSD kernel module (ELF)");
my_mod = mod; my_mod = mod;

View file

@ -43,7 +43,6 @@ grub_xnu_set_video (struct grub_xnu_boot_params *params)
{ {
struct grub_video_mode_info mode_info; struct grub_video_mode_info mode_info;
int ret; int ret;
int x,y;
char *tmp, *modevar; char *tmp, *modevar;
void *framebuffer; void *framebuffer;
grub_err_t err; grub_err_t err;
@ -66,11 +65,10 @@ grub_xnu_set_video (struct grub_xnu_boot_params *params)
if (err) if (err)
return err; return err;
ret = grub_video_get_info_and_fini (&mode_info, &framebuffer); if (grub_xnu_bitmap)
if (ret) {
return grub_error (GRUB_ERR_IO, "couldn't retrieve video parameters"); int x, y;
err = GRUB_ERR_NONE;
x = mode_info.width - grub_xnu_bitmap->mode_info.width; x = mode_info.width - grub_xnu_bitmap->mode_info.width;
x /= 2; x /= 2;
y = mode_info.height - grub_xnu_bitmap->mode_info.height; y = mode_info.height - grub_xnu_bitmap->mode_info.height;
@ -91,6 +89,12 @@ grub_xnu_set_video (struct grub_xnu_boot_params *params)
grub_errno = GRUB_ERR_NONE; grub_errno = GRUB_ERR_NONE;
grub_xnu_bitmap = 0; grub_xnu_bitmap = 0;
} }
err = GRUB_ERR_NONE;
}
ret = grub_video_get_info_and_fini (&mode_info, &framebuffer);
if (ret)
return grub_error (GRUB_ERR_IO, "couldn't retrieve video parameters");
params->lfb_width = mode_info.width; params->lfb_width = mode_info.width;
params->lfb_height = mode_info.height; params->lfb_height = mode_info.height;

View file

@ -1,30 +1,20 @@
/**************************************************************************** /*
* Copyright (c) 1998-2003,2004,2005 Free Software Foundation, Inc. * * GRUB -- GRand Unified Bootloader
* * * Copyright (C) 1998-2003,2004,2005 Free Software Foundation, Inc.
* Permission is hereby granted, free of charge, to any person obtaining a * *
* copy of this software and associated documentation files (the * * GRUB is free software: you can redistribute it and/or modify
* "Software"), to deal in the Software without restriction, including * * it under the terms of the GNU General Public License as published by
* without limitation the rights to use, copy, modify, merge, publish, * * the Free Software Foundation, either version 3 of the License, or
* distribute, distribute with modifications, sublicense, and/or sell * * (at your option) any later version.
* copies of the Software, and to permit persons to whom the Software is * *
* furnished to do so, subject to the following conditions: * * GRUB is distributed in the hope that it will be useful,
* * * but WITHOUT ANY WARRANTY; without even the implied warranty of
* The above copyright notice and this permission notice shall be included * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* in all copies or substantial portions of the Software. * * GNU General Public License for more details.
* * *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * * You should have received a copy of the GNU General Public License
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * */
* IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
* THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
* *
* Except as contained in this notice, the name(s) of the above copyright *
* holders shall not be used in advertising or otherwise to promote the *
* sale, use or other dealings in this Software without prior written *
* authorization. *
****************************************************************************/
/********************************************************************** /**********************************************************************
* This code is a modification of lib_tparm.c found in ncurses-5.2. The * This code is a modification of lib_tparm.c found in ncurses-5.2. The

View file

@ -1,58 +0,0 @@
#! /bin/sh
#
# Copyright (C) 2009 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
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# GRUB is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with GRUB. If not, see <http://www.gnu.org/licenses/>.
# Usage: usage
# Print the usage.
usage () {
cat <<EOF
Usage: $0 [OPTION]
Create vbios and int10 dump
-o, --output=DIR set output directory
-h, --help print this message and exit
-v, --version print the version information and exit
Report bugs to <bug-grub@gnu.org>.
EOF
}
# Check the arguments.
for option in "$@"; do
case "$option" in
-h | --help)
usage
exit 0 ;;
-v | --version)
echo "$0 (GNU GRUB @PACKAGE_VERSION@)"
exit 0 ;;
-o)
shift
output_dir=$1
;;
--output=)
output_dir=`echo "$option" | sed 's/--output=//'`
;;
-*)
echo "Unrecognized option \`$option'" 1>&2
usage
exit 1
;;
esac
done
dd if=/dev/mem of=${output_dir}vbios.bin bs=65536 skip=12 count=1
dd if=/dev/mem of=${output_dir}int10.bin bs=4 skip=16 count=1

View file

@ -60,17 +60,17 @@ menuentry "${OS}" {
EOF EOF
prepare_grub_to_access_device ${GRUB_DEVICE_BOOT} | sed -e "s/^/\t/" prepare_grub_to_access_device ${GRUB_DEVICE_BOOT} | sed -e "s/^/\t/"
cat << EOF cat << EOF
freebsd ${kfreebsd_rel_dirname}/${kfreebsd_basename} kfreebsd ${kfreebsd_rel_dirname}/${kfreebsd_basename}
EOF EOF
if [ x"$devices" != "x" ] ; then if [ x"$devices" != "x" ] ; then
cat << EOF cat << EOF
freebsd_loadenv ${devices_rel_dirname}/${devices_basename} kfreebsd_loadenv ${devices_rel_dirname}/${devices_basename}
EOF EOF
fi fi
cat << EOF cat << EOF
set FreeBSD.vfs.root.mountfrom=${kfreebsd_fs}:${GRUB_DEVICE} set kFreeBSD.vfs.root.mountfrom=${kfreebsd_fs}:${GRUB_DEVICE}
set FreeBSD.vfs.root.mountfrom.options=rw set kFreeBSD.vfs.root.mountfrom.options=rw
} }
EOF EOF
fi fi

View file

@ -91,10 +91,10 @@ while [ "x$list" != "x" ] ; do
linux_root_device_thisversion=${GRUB_DEVICE} linux_root_device_thisversion=${GRUB_DEVICE}
fi fi
linux_entry "${OS}, Linux ${version}" \ linux_entry "${OS}, with Linux ${version}" \
"${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}" "${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}"
if [ "x${GRUB_DISABLE_LINUX_RECOVERY}" != "xtrue" ]; then if [ "x${GRUB_DISABLE_LINUX_RECOVERY}" != "xtrue" ]; then
linux_entry "${OS}, Linux ${version} (recovery mode)" \ linux_entry "${OS}, with Linux ${version} (recovery mode)" \
"single ${GRUB_CMDLINE_LINUX}" "single ${GRUB_CMDLINE_LINUX}"
fi fi