* grub-core/disk/mdraid1x_linux.c (grub_mdraid_detect): Do not put
elements with invlid index.
* grub-core/disk/mdraid_linux.c (grub_mdraid_detect): Likewise.
* grub-core/disk/raid.c (insert_array): Automatically reallocate
members.
* include/grub/raid.h (grub_raid_member): New struct.
(grub_raid_array): Transform devices and start_sector into usage of
grub_raid_member. All users updated
(allocated_devs): New member.
BVK Chaitanya [Fri, 29 Oct 2010 09:56:16 +0000 (15:26 +0530)]
NetBSD build fix for getline function conflict from gnulib.
* Makefile.util.def (libgrubkern.a): New library for grub kernel
components that depend on gnulib headers.
(libgrubmods.a): Renamed from earlier libgrub.a.
* conf/Makefile.common: Remove gnulib from *_LIBRARY flags.
* grub-core/lib/relocator.c (grub_relocator_subchunk): Remove now
useless field head. All users updated.
(free_subchunk): Correct handling of IN_REGION subchunk.
* util/grub-setup.c (setup): New parameter allow_floppy.
(arguments): New member allow_floppy.
(argp_parser): Handle --allow-floppy.
(main): Pass allow_floppy.
* util/grub-install.in: New option --allow-floppy passed though to
grub-setup.
* grub-core/commands/acpihalt.c [GRUB_DSDT_TEST]: Include userspace
headers and add relevant defines. Don't include standard headers.
(main) [GRUB_DSDT_TEST]: New function.
* include/grub/acpi.h [GRUB_DSDT_TEST]: Don't include standard headers.
Don't declare functions.
* grub-core/term/ns8250.c (do_real_config): Set port->broken to 0.
(serial_hw_put): Wait based on real time rather than port reads. Don't
roken ports.
* include/grub/serial.h (grub_serial_port): New field broken.
Robert Millan [Tue, 12 Oct 2010 12:47:04 +0000 (14:47 +0200)]
2010-10-12 Robert Millan <rmh@gnu.org>
* util/grub-mkconfig.in: Merge `GRUB_DISABLE_LINUX_RECOVERY' and
`GRUB_DISABLE_NETBSD_RECOVERY' into a single `GRUB_DISABLE_RECOVERY'
variable. All references updated.
* util/grub.d/10_kfreebsd.in: Support recovery boot entries.
* grub-core/disk/raid.c (grub_raid_getname) [GRUB_UTIL]: New function.
(insert_array): New argument raid.
* include/grub/disk.h (grub_disk_dev) [GRUB_UTIL]: New member raidname.
* include/grub/raid.h (grub_raid_array) [GRUB_UTIL]: New member driver.
* util/grub-probe.c (probe): PRint raidname instead of plainly "mdraid".
Clear out 0x80 color bit on EFI.
Tested by: decoder
Reported by: decoder and meta tech.
* grub-core/term/efi/console.c (grub_console_standard_color): Removed.
(grub_console_setcolorstate): Clear out 0x80 bit.
Use GRUB_TERM_DEFAULT_STANDARD_COLOR.
(grub_console_output): Use GRUB_TERM_DEFAULT_NORMAL_COLOR.
Use GRUB_TERM_DEFAULT_HIGHLIGHT_COLOR.
Put terminfo into core on ieee1275 and yeeloong (needed for console).
* gentpl.py: New groups terminfoinkernel and terminfomodule.
* grub-core/Makefile.am (KERNEL_HEADER_FILES): Include extcmd.h, arg.h
and terminfo.h when needed.
* grub-core/Makefile.core.def (kernel): Include term/terminfo.c,
term/tparm.c, commands/extcmd.c, lib/arg.c on terminfokernel.
(terminfo): Enable only on terminfokernel.
(extcmd): Likewise.
* include/grub/extcmd.h: Add missing EXPORT_FUNC.
* include/grub/lib/arg.h: Likewise.
* grub-core/term/ieee1275/ofconsole.c (grub_ofconsole_dimensions): Fix
incorrect usage of ->.
* grub-core/loader/i386/multiboot_mbi.c (grub_multiboot_get_mbi_size):
Take VBE info into account even if only text is supported.
(fill_vbe_info): Take into account the case when only VGA text
is supported.
* include/grub/multiboot.h (GRUB_MACHINE_HAS_VBE): Set to zero
on coreboot, multiboot and qemu.
* Makefile.util.def (grub-setup): Add grub-core/lib/reed_solomon.c.
* grub-core/Makefile.am (rs_decoder.S): New target.
(kern/i386/pc/startup.S): Depend on rs_decoder.S.
* grub-core/kern/i386/pc/startup.S (reed_solomon_redundancy): New field.
(multiboot): Move to RS part.
(post_reed_solomon): New label.
(grub_boot_drive): Move to non-RS part since it's modified in memory
on boot.
Include rs_decoder.S.
* grub-core/lib/reed_solomon.c: New file.
* include/grub/offsets.h (GRUB_KERNEL_I386_PC_REED_SOLOMON_REDUNDANCY):
New definition.
(GRUB_KERNEL_I386_PC_MULTIBOOT_SIGNATURE): Removed.
(GRUB_KERNEL_I386_PC_RAW_SIZE): Updated.
(GRUB_KERNEL_I386_PC_NO_REED_SOLOMON_PART): New definition.
* include/grub/partition.h (grub_partition_map): Change prototype of
embed to allow returning additional sectors.
* include/grub/reed_solomon.h: New file.
* util/grub-setup.c (setup): Handle Reed-Solomon.
Robert Millan [Sun, 26 Sep 2010 14:11:33 +0000 (16:11 +0200)]
2010-09-26 Robert Millan <rmh@gnu.org>
Support degraded ZFS arrays in "grub-probe -t device" resolution.
* grub-core/kern/emu/getroot.c (find_root_device_from_libzfs): When
the pool is an array of devices, iterate through it and return the
first device that passes a stat() test (instead of blindly returning
the first one).
Robert Millan [Sun, 26 Sep 2010 13:53:05 +0000 (15:53 +0200)]
2010-09-26 Robert Millan <rmh@gnu.org>
Build fixes for GNU/kFreeBSD.
* Makefile.util.def: Add `$(LIBZFS) $(LIBNVPAIR)' library dependencies
to programs that require ZFS conversion.
* grub-core/kern/emu/hostdisk.c (grub_util_biosdisk_is_floppy): Support
kernels that don't have FLOPPY_MAJOR.
Colin Watson [Fri, 24 Sep 2010 08:48:27 +0000 (09:48 +0100)]
Re-enable grub-extras.
* autogen.sh: Create symlinks to ${GRUB_CONTRIB} if necessary to
avoid confusing Automake. Run autogen only twice, once for the top
level and once for grub-core. Add Makefile.util.def and
Makefile.core.def from extra modules to the appropriate autogen
invocations. If Makefile.common exists in an extra module, include
it in both Makefile.util.am and grub-core/Makefile.core.am;
similarly, include any Makefile.util.common file in Makefile.util.am
and any Makefile.core.common file in grub-core/Makefile.core.am.
* conf/Makefile.common ($(top_srcdir)/grub-core/Makefile.core.am):
Depend on $(top_srcdir)/grub-core/Makefile.gcry.def.
($(top_srcdir)/grub-core/Makefile.gcry.def): Remove.
* grub-core/Makefile.am: Remove inclusion of Makefile.gcry.am.
* gentpl.py (gvar_add): Turn GVARS into a set.
(global_variable_initializers): Sort global variables on output.
(vars_init): New function.
(first_time): Likewise.
(library): Ensure that non-global variable initialisations are
emitted before the first time we emit code for a library block.
Append to variables rather than setting them. Only emit
noinst_LIBRARIES, BUILT_SOURCES, and CLEANFILES the first time for
each conditional path.
(program): installdir() emits an Autogen macro, so must be passed to
var_add rather than gvar_add.
(data): Likewise.
(script): Likewise.
(rules): New function, centralising handling for different target
types. Set up Guile association lists for first_time and vars_init,
and send most output to a diversion so that variable initialisations
can be emitted first.
(module_rules): Use new rules function.
(kernel_rules): Likewise.
(image_rules): Likewise.
(library_rules): Likewise.
(program_rules): Likewise.
(script_rules): Likewise.
(data_rules): Likewise.
* configure.ac: Add AC_PROG_LN_S, for the benefit of ntldr-img.
* .bzrignore: Add contrib and grub-core/contrib. Remove
grub-core/Makefile.gcry.am.
* grub-core/loader/multiboot_mbi2.c (grub_multiboot_load): Declare
new tags as supported.
(acpiv2_size): New function.
(grub_multiboot_get_mbi_size): Take new tags into account.
(grub_multiboot_make_mbi): Add new tags.
* include/grub/multiboot.h (GRUB_MACHINE_HAS_ACPI): New definition.