merge with mainline
This commit is contained in:
commit
87220a6881
11 changed files with 124 additions and 32 deletions
63
ChangeLog
63
ChangeLog
|
@ -1,12 +1,71 @@
|
||||||
2010-11-07 BVK Chaitanya <bvk.groups@gmail.com>
|
2010-11-07 BVK Chaitanya <bvk.groups@gmail.com>
|
||||||
|
|
||||||
Suppress shell expansion on echo '*' and echo "*" like cases,
|
Suppress shell expansion on echo '*' and echo "*" like cases.
|
||||||
reported by Jordan Uggla.
|
Reported by: Jordan Uggla.
|
||||||
|
|
||||||
* grub-core/script/execute.c (grub_script_arglist_to_argv): Escape
|
* grub-core/script/execute.c (grub_script_arglist_to_argv): Escape
|
||||||
string arguments before shell expansion.
|
string arguments before shell expansion.
|
||||||
* tests/grub_cmd_echo.in: New testcases.
|
* tests/grub_cmd_echo.in: New testcases.
|
||||||
|
|
||||||
|
2010-11-07 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* grub-core/kern/emu/hostdisk.c
|
||||||
|
(convert_system_partition_to_system_disk): Handle devices like "sdaa1".
|
||||||
|
|
||||||
|
2010-11-06 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* include/grub/emu/misc.h: Don't include grub/util/libzfs.h.
|
||||||
|
* include/grub/emu/misc.h (grub_get_libzfs_handle): Move from here ...
|
||||||
|
* include/grub/util/libzfs.h (grub_get_libzfs_handle): ... here.
|
||||||
|
|
||||||
|
2010-11-06 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* grub-core/fs/ntfs.c (grub_ntfs_uuid): Make uppercase.
|
||||||
|
|
||||||
|
2010-11-06 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* util/grub-install.in: Replace useless recomendation to pass
|
||||||
|
--modules with a recomendation to report a bug.
|
||||||
|
|
||||||
|
2010-11-06 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
Properly register serial terminfo.
|
||||||
|
Reported by: Jordan Uggla
|
||||||
|
|
||||||
|
* grub-core/term/serial.c (grub_serial_terminfo_input_template): New
|
||||||
|
const.
|
||||||
|
(grub_serial_terminfo_output_template): Likewise.
|
||||||
|
(grub_cmd_serial): Register "serial" with terminfo.
|
||||||
|
(GRUB_MOD_INIT(serial)): Fill grub_serial_terminfo_input and
|
||||||
|
grub_serial_terminfo_output.
|
||||||
|
|
||||||
|
2010-11-05 Robert Millan <rmh@gnu.org>
|
||||||
|
|
||||||
|
* util/grub-mkconfig.in: Remove gfxterm.mod probe (no longer
|
||||||
|
needed).
|
||||||
|
|
||||||
|
2010-11-05 Robert Millan <rmh@gnu.org>
|
||||||
|
|
||||||
|
On Yeeloong, pass machine type information to Linux.
|
||||||
|
|
||||||
|
* grub-core/loader/mips/linux.c [GRUB_MACHINE_MIPS_YEELOONG]
|
||||||
|
(LOONGSON_MACHTYPE): New macro, set to
|
||||||
|
"machtype=lemote-yeeloong-2f-8.9inches".
|
||||||
|
[LOONGSON_MACHTYPE] (grub_cmd_linux): Pass LOONGSON_MACHTYPE as
|
||||||
|
additional argument to Linux.
|
||||||
|
|
||||||
|
2010-11-04 Robert Millan <rmh@gnu.org>
|
||||||
|
|
||||||
|
* util/deviceiter.c (grub_util_iterate_devices): Increase SCSI
|
||||||
|
limit to 48 (to cope with Sun Fire X4500), and IDE limit to 96
|
||||||
|
(its SATA disks are detected as slaveless IDE master drives on
|
||||||
|
kFreeBSD).
|
||||||
|
Reported by Carsten Aulbert.
|
||||||
|
|
||||||
|
2010-11-02 Colin Watson <cjwatson@ubuntu.com>
|
||||||
|
|
||||||
|
* util/bin2h.c (main): Fix spelling error in generated output.
|
||||||
|
|
||||||
2010-11-01 Grégoire Sutre <gregoire.sutre@gmail.com>
|
2010-11-01 Grégoire Sutre <gregoire.sutre@gmail.com>
|
||||||
|
|
||||||
* grub-core/partmap/bsdlabel.c (iterate_real): Fix an integer overflow.
|
* grub-core/partmap/bsdlabel.c (iterate_real): Fix an integer overflow.
|
||||||
|
|
|
@ -1072,7 +1072,11 @@ grub_ntfs_uuid (grub_device_t device, char **uuid)
|
||||||
data = grub_ntfs_mount (disk);
|
data = grub_ntfs_mount (disk);
|
||||||
if (data)
|
if (data)
|
||||||
{
|
{
|
||||||
|
char *ptr;
|
||||||
*uuid = grub_xasprintf ("%016llx", (unsigned long long) data->uuid);
|
*uuid = grub_xasprintf ("%016llx", (unsigned long long) data->uuid);
|
||||||
|
if (*uuid)
|
||||||
|
for (ptr = *uuid; *ptr; ptr++)
|
||||||
|
*ptr = grub_toupper (*ptr);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
*uuid = NULL;
|
*uuid = NULL;
|
||||||
|
|
|
@ -1152,16 +1152,22 @@ convert_system_partition_to_system_disk (const char *os_dev, struct stat *st)
|
||||||
|| strncmp ("sd", p, 2) == 0)
|
|| strncmp ("sd", p, 2) == 0)
|
||||||
&& p[2] >= 'a' && p[2] <= 'z')
|
&& p[2] >= 'a' && p[2] <= 'z')
|
||||||
{
|
{
|
||||||
/* /dev/[hsv]d[a-z][0-9]* */
|
char *pp = p + 2;
|
||||||
p[3] = '\0';
|
while (*pp >= 'a' && *pp <= 'z')
|
||||||
|
pp++;
|
||||||
|
/* /dev/[hsv]d[a-z]+[0-9]* */
|
||||||
|
*pp = '\0';
|
||||||
return path;
|
return path;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* If this is a Xen virtual block device. */
|
/* If this is a Xen virtual block device. */
|
||||||
if ((strncmp ("xvd", p, 3) == 0) && p[3] >= 'a' && p[3] <= 'z')
|
if ((strncmp ("xvd", p, 3) == 0) && p[3] >= 'a' && p[3] <= 'z')
|
||||||
{
|
{
|
||||||
/* /dev/xvd[a-z][0-9]* */
|
char *pp = p + 3;
|
||||||
p[4] = '\0';
|
while (*pp >= 'a' && *pp <= 'z')
|
||||||
|
pp++;
|
||||||
|
/* /dev/xvd[a-z]+[0-9]* */
|
||||||
|
*pp = '\0';
|
||||||
return path;
|
return path;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -32,6 +32,14 @@
|
||||||
#include <grub/pci.h>
|
#include <grub/pci.h>
|
||||||
#include <grub/machine/time.h>
|
#include <grub/machine/time.h>
|
||||||
|
|
||||||
|
#ifdef GRUB_MACHINE_MIPS_YEELOONG
|
||||||
|
/* This can be detected on runtime from PMON, but:
|
||||||
|
a) it wouldn't work when GRUB is the firmware
|
||||||
|
and
|
||||||
|
b) for now we only support Yeeloong anyway. */
|
||||||
|
#define LOONGSON_MACHTYPE "machtype=lemote-yeeloong-2f-8.9inches"
|
||||||
|
#endif
|
||||||
|
|
||||||
static grub_dl_t my_mod;
|
static grub_dl_t my_mod;
|
||||||
|
|
||||||
static int loaded;
|
static int loaded;
|
||||||
|
@ -214,6 +222,9 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
|
||||||
|
|
||||||
/* For arguments. */
|
/* For arguments. */
|
||||||
linux_argc = argc;
|
linux_argc = argc;
|
||||||
|
#ifdef LOONGSON_MACHTYPE
|
||||||
|
linux_argc++;
|
||||||
|
#endif
|
||||||
/* Main arguments. */
|
/* Main arguments. */
|
||||||
size = (linux_argc) * sizeof (grub_uint32_t);
|
size = (linux_argc) * sizeof (grub_uint32_t);
|
||||||
/* Initrd address and size. */
|
/* Initrd address and size. */
|
||||||
|
@ -226,6 +237,9 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
|
||||||
/* Normal arguments. */
|
/* Normal arguments. */
|
||||||
for (i = 1; i < argc; i++)
|
for (i = 1; i < argc; i++)
|
||||||
size += ALIGN_UP (grub_strlen (argv[i]) + 1, 4);
|
size += ALIGN_UP (grub_strlen (argv[i]) + 1, 4);
|
||||||
|
#ifdef LOONGSON_MACHTYPE
|
||||||
|
size += ALIGN_UP (sizeof (LOONGSON_MACHTYPE), 4);
|
||||||
|
#endif
|
||||||
|
|
||||||
/* rd arguments. */
|
/* rd arguments. */
|
||||||
size += ALIGN_UP (sizeof ("rd_start=0xXXXXXXXXXXXXXXXX"), 4);
|
size += ALIGN_UP (sizeof ("rd_start=0xXXXXXXXXXXXXXXXX"), 4);
|
||||||
|
@ -263,6 +277,16 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
|
||||||
linux_argv++;
|
linux_argv++;
|
||||||
linux_args += ALIGN_UP (sizeof ("a0"), 4);
|
linux_args += ALIGN_UP (sizeof ("a0"), 4);
|
||||||
|
|
||||||
|
#ifdef LOONGSON_MACHTYPE
|
||||||
|
/* In Loongson platform, it is the responsibility of the bootloader/firmware
|
||||||
|
to supply the OS kernel with machine type information. */
|
||||||
|
grub_memcpy (linux_args, LOONGSON_MACHTYPE, sizeof (LOONGSON_MACHTYPE));
|
||||||
|
*linux_argv = (grub_uint8_t *) linux_args - (grub_uint8_t *) playground
|
||||||
|
+ target_addr;
|
||||||
|
linux_argv++;
|
||||||
|
linux_args += ALIGN_UP (sizeof (LOONGSON_MACHTYPE), 4);
|
||||||
|
#endif
|
||||||
|
|
||||||
for (i = 1; i < argc; i++)
|
for (i = 1; i < argc; i++)
|
||||||
{
|
{
|
||||||
grub_memcpy (linux_args, argv[i], grub_strlen (argv[i]) + 1);
|
grub_memcpy (linux_args, argv[i], grub_strlen (argv[i]) + 1);
|
||||||
|
|
|
@ -69,7 +69,7 @@ serial_fetch (grub_term_input_t term)
|
||||||
return data->port->driver->fetch (data->port);
|
return data->port->driver->fetch (data->port);
|
||||||
}
|
}
|
||||||
|
|
||||||
struct grub_serial_input_state grub_serial_terminfo_input =
|
const struct grub_serial_input_state grub_serial_terminfo_input_template =
|
||||||
{
|
{
|
||||||
.tinfo =
|
.tinfo =
|
||||||
{
|
{
|
||||||
|
@ -77,7 +77,7 @@ struct grub_serial_input_state grub_serial_terminfo_input =
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
struct grub_serial_output_state grub_serial_terminfo_output =
|
const struct grub_serial_output_state grub_serial_terminfo_output_template =
|
||||||
{
|
{
|
||||||
.tinfo =
|
.tinfo =
|
||||||
{
|
{
|
||||||
|
@ -87,6 +87,10 @@ struct grub_serial_output_state grub_serial_terminfo_output =
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct grub_serial_input_state grub_serial_terminfo_input;
|
||||||
|
|
||||||
|
struct grub_serial_output_state grub_serial_terminfo_output;
|
||||||
|
|
||||||
int registered = 0;
|
int registered = 0;
|
||||||
|
|
||||||
static struct grub_term_input grub_serial_term_input =
|
static struct grub_term_input grub_serial_term_input =
|
||||||
|
@ -216,6 +220,8 @@ grub_cmd_serial (grub_extcmd_context_t ctxt, int argc, char **args)
|
||||||
{
|
{
|
||||||
if (!registered)
|
if (!registered)
|
||||||
{
|
{
|
||||||
|
grub_terminfo_output_register (&grub_serial_term_output, "vt100");
|
||||||
|
|
||||||
grub_term_register_input ("serial", &grub_serial_term_input);
|
grub_term_register_input ("serial", &grub_serial_term_input);
|
||||||
grub_term_register_output ("serial", &grub_serial_term_output);
|
grub_term_register_output ("serial", &grub_serial_term_output);
|
||||||
}
|
}
|
||||||
|
@ -337,6 +343,14 @@ GRUB_MOD_INIT(serial)
|
||||||
cmd = grub_register_extcmd ("serial", grub_cmd_serial, 0,
|
cmd = grub_register_extcmd ("serial", grub_cmd_serial, 0,
|
||||||
N_("[OPTIONS...]"),
|
N_("[OPTIONS...]"),
|
||||||
N_("Configure serial port."), options);
|
N_("Configure serial port."), options);
|
||||||
|
grub_memcpy (&grub_serial_terminfo_output,
|
||||||
|
&grub_serial_terminfo_output_template,
|
||||||
|
sizeof (grub_serial_terminfo_output));
|
||||||
|
|
||||||
|
grub_memcpy (&grub_serial_terminfo_input,
|
||||||
|
&grub_serial_terminfo_input_template,
|
||||||
|
sizeof (grub_serial_terminfo_input));
|
||||||
|
|
||||||
#ifndef GRUB_MACHINE_EMU
|
#ifndef GRUB_MACHINE_EMU
|
||||||
grub_ns8250_init ();
|
grub_ns8250_init ();
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -24,7 +24,6 @@
|
||||||
|
|
||||||
#include <grub/symbol.h>
|
#include <grub/symbol.h>
|
||||||
#include <grub/types.h>
|
#include <grub/types.h>
|
||||||
#include <grub/util/libzfs.h>
|
|
||||||
|
|
||||||
#ifdef __CYGWIN__
|
#ifdef __CYGWIN__
|
||||||
# include <sys/fcntl.h>
|
# include <sys/fcntl.h>
|
||||||
|
@ -79,6 +78,4 @@ extern char * canonicalize_file_name (const char *path);
|
||||||
int grub_device_mapper_supported (void);
|
int grub_device_mapper_supported (void);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
libzfs_handle_t *grub_get_libzfs_handle (void);
|
|
||||||
|
|
||||||
#endif /* GRUB_EMU_MISC_H */
|
#endif /* GRUB_EMU_MISC_H */
|
||||||
|
|
|
@ -42,4 +42,6 @@ extern nvlist_t *zpool_get_config (zpool_handle_t *, nvlist_t **);
|
||||||
|
|
||||||
#endif /* ! HAVE_LIBZFS_H */
|
#endif /* ! HAVE_LIBZFS_H */
|
||||||
|
|
||||||
|
libzfs_handle_t *grub_get_libzfs_handle (void);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -96,7 +96,7 @@ main (int argc, char *argv[])
|
||||||
if (b == EOF)
|
if (b == EOF)
|
||||||
goto abort;
|
goto abort;
|
||||||
|
|
||||||
printf ("/* THIS CHUNK OF BYTES IS AUTOMATICALY GENERATED */\n"
|
printf ("/* THIS CHUNK OF BYTES IS AUTOMATICALLY GENERATED */\n"
|
||||||
"unsigned char %s[] =\n{\n", sym);
|
"unsigned char %s[] =\n{\n", sym);
|
||||||
|
|
||||||
while (1)
|
while (1)
|
||||||
|
|
|
@ -601,7 +601,7 @@ grub_util_iterate_devices (int NESTED_FUNC_ATTR (*hook) (const char *, int),
|
||||||
#endif /* __linux__ */
|
#endif /* __linux__ */
|
||||||
|
|
||||||
/* IDE disks. */
|
/* IDE disks. */
|
||||||
for (i = 0; i < 26; i++)
|
for (i = 0; i < 96; i++)
|
||||||
{
|
{
|
||||||
char name[16];
|
char name[16];
|
||||||
|
|
||||||
|
@ -655,7 +655,7 @@ grub_util_iterate_devices (int NESTED_FUNC_ATTR (*hook) (const char *, int),
|
||||||
#endif /* __linux__ */
|
#endif /* __linux__ */
|
||||||
|
|
||||||
/* The rest is SCSI disks. */
|
/* The rest is SCSI disks. */
|
||||||
for (i = 0; i < 26; i++)
|
for (i = 0; i < 48; i++)
|
||||||
{
|
{
|
||||||
char name[16];
|
char name[16];
|
||||||
|
|
||||||
|
|
|
@ -466,9 +466,9 @@ fi
|
||||||
|
|
||||||
# Create the core image. First, auto-detect the filesystem module.
|
# Create the core image. First, auto-detect the filesystem module.
|
||||||
fs_module=`$grub_probe --target=fs --device ${grub_device}`
|
fs_module=`$grub_probe --target=fs --device ${grub_device}`
|
||||||
if test "x$fs_module" = x -a "x$modules" = x; then
|
if test "x$fs_module" = x ; then
|
||||||
echo "Auto-detection of a filesystem module failed." 1>&2
|
echo "Auto-detection of a filesystem of ${grub_device} failed." 1>&2
|
||||||
echo "Please specify the module with the option \`--modules' explicitly." 1>&2
|
echo "Please report this together with the output of \"$grub_probe --target=fs -v ${grubdir}\" to <bug-grub@gnu.org>" 1>&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -168,20 +168,6 @@ fi
|
||||||
|
|
||||||
for x in ${GRUB_TERMINAL_OUTPUT}; do
|
for x in ${GRUB_TERMINAL_OUTPUT}; do
|
||||||
if [ "x${x}" = "xgfxterm" ]; then
|
if [ "x${x}" = "xgfxterm" ]; then
|
||||||
# If this platform supports gfxterm, try to use it.
|
|
||||||
if ! test -e ${GRUB_PREFIX}/gfxterm.mod ; then
|
|
||||||
if [ "x$termoutdefault" != "x1" ]; then
|
|
||||||
echo "gfxterm isn't available on your platform" >&2 ; exit 1
|
|
||||||
fi
|
|
||||||
GRUB_TERMINAL_OUTPUT=
|
|
||||||
break;
|
|
||||||
fi
|
|
||||||
if [ ! -s "${GRUB_PREFIX}/video.lst" ] ; then
|
|
||||||
if [ "x$termoutdefault" != "x1" ]; then
|
|
||||||
echo "No suitable backend could be found for gfxterm." >&2 ; exit 1
|
|
||||||
fi
|
|
||||||
GRUB_TERMINAL_OUTPUT=
|
|
||||||
fi
|
|
||||||
if [ -n "$GRUB_FONT" ] ; then
|
if [ -n "$GRUB_FONT" ] ; then
|
||||||
if is_path_readable_by_grub ${GRUB_FONT} > /dev/null ; then
|
if is_path_readable_by_grub ${GRUB_FONT} > /dev/null ; then
|
||||||
GRUB_FONT_PATH=${GRUB_FONT}
|
GRUB_FONT_PATH=${GRUB_FONT}
|
||||||
|
|
Loading…
Reference in a new issue