Commit graph

6591 commits

Author SHA1 Message Date
Vladimir 'phcoder' Serbinenko
49de079bbe * grub-core/disk/diskfilter.c (is_lv_readable): New argument "easily".
All users updated. If easily=1 require raid-5/-6 to be full.
	(is_node_readable): Likewise.
	(scan_devices): Scan incomplete but readable LVs at the end.
	(grub_diskfilter_memberlist): Pull missing devices.
	(insert_array): Skip scanning until device is complete or scan is
	done otherwise.
	* grub-core/disk/mdraid1x_linux.c (grub_mdraid_detect): Fix wrong
	check.
	* include/grub/diskfilter.h (grub_diskfilter_lv): New member scanned.
	* util/raid.c (grub_util_raid_getmembers): Handle "removed" disks.
2012-03-04 01:33:09 +01:00
Matthew Garrett
aff05d45f9 Avoid EFI boot services when loading Linux.
* grub-core/lib/i386/relocator.c (grub_relocator32_boot): New argument
	avoid_efi_bootservices. All users updated.
	* grub-core/lib/relocator.c (grub_relocator_alloc_chunk_align): New
	argument avoid_efi_bootservices. All users updated.
	Use grub_efi_mmap_iterate on EFI, grub_mmap_iterate if available.
	* grub-core/loader/i386/linux.c (allocate_pages): New arguments
	align, min_align, relocatable, prefered_address. All users updated.
	Allocate avoiding boot services if kernel is relocatable.
	(grub_cmd_linux): Check if kernel is relocatable.
	* grub-core/mmap/efi/mmap.c (grub_machine_mmap_iterate): Move most to ..
	(grub_efi_mmap_iterate): ... here. New argument avoid_efi_boot_services.
	Skip GRUB_EFI_BOOT_SERVICES_DATA and GRUB_EFI_BOOT_SERVICES_CODE if
	avoid_efi_boot_services.
	(grub_machine_mmap_iterate): Wrap grub_efi_mmap_iterate.
	* include/grub/i386/linux.h (linux_kernel_header): Update to 2.10.
	(linux_kernel_params): Likewise.

	Also-By: Vladimir Serbinenko <phcoder@gmail.com>
2012-03-04 01:10:55 +01:00
Matthew Garrett
3935dde2f2 Use EDID on EFI.
* grub-core/kern/efi/efi.c (grub_efi_get_variable): New argument
	datasize_out.
	* grub-core/video/efi_gop.c (check_protocol): Check that GOP has usable
	modes. Set gop_handle.
	(grub_video_gop_get_edid): New function.
	(grub_gop_get_preferred_mode): Likewise.
	(grub_video_gop_setup): Use grub_gop_get_preferred_mode.
	(grub_video_efi_gop_adapter): Set .get_edid.
	* include/grub/efi/edid.h: New file.
	* include/grub/efi/efi.h (grub_efi_get_variable): Update proto.

	Also-By: Vladimir Serbinenko <phcoder@gmail.com>
2012-03-04 00:48:21 +01:00
Vladimir 'phcoder' Serbinenko
32107ec02a * util/grub-install.in: Load efivars unconditionally. 2012-03-03 23:15:18 +01:00
Vladimir 'phcoder' Serbinenko
b81550843d merge mainline into reloc 2012-03-03 21:47:00 +01:00
Vladimir 'phcoder' Serbinenko
e70a2c50fa * po/Rules-piglatin: Change suffix from .po-update-en to
.po-update-en-piglatin.
2012-03-03 21:43:06 +01:00
Vladimir 'phcoder' Serbinenko
123f9c50eb Fix FTBFS on mips and ppc 2012-03-03 20:53:54 +01:00
Vladimir 'phcoder' Serbinenko
1e95b56e59 Fix compile error 2012-03-03 20:12:03 +01:00
Vladimir 'phcoder' Serbinenko
9be4c45dbe boot services avoid code based on the patch by Matthew Garrett 2012-03-03 20:06:41 +01:00
Matthew Garrett
86e5ab4b81 2012-03-03 18:05:16 +01:00
Vladimir 'phcoder' Serbinenko
8f9cace1aa Add a pig farm. 2012-03-03 16:17:21 +01:00
Vladimir 'phcoder' Serbinenko
8f95d002fe * grub-core/commands/date.c (GRUB_MOD_INIT): Remove non-uniform
"Command for ...".
	* grub-core/commands/hdparm.c (options): Use "Display" rather than
	"Check" since we don't check anything.
	* grub-core/commands/i386/cpuid.c (options): Clarify that long mode
	is 64-bit one.
	* grub-core/commands/search_wrap.c (options): Clarify the conditions.
	* grub-core/disk/geli.c (grub_md_sha256_real): Fix typo.
	(grub_md_sha512_real): Likewise.
2012-03-03 13:09:14 +01:00
Vladimir 'phcoder' Serbinenko
805a8dccc8 * grub-core/commands/gptsync.c: Fix typographic quoting.
* grub-core/commands/ieee1275/suspend.c: Likewise.
	* grub-core/commands/parttool.c: Likewise.
	* grub-core/commands/search_wrap.c: Likewise.
	* grub-core/commands/videoinfo.c: Likewise.
	* grub-core/gfxmenu/gui_label.c: Likewise.
	* grub-core/hello/hello.c: Likewise.
	* grub-core/kern/emu/main.c: Likewise.
	* grub-core/net/net.c: Likewise.
	* grub-core/normal/menu.c: Likewise.
	* grub-core/normal/menu_text.c: Likewise.
	* grub-core/normal/misc.c: Likewise.
	* util/grub-editenv.c: Likewise.
	* util/grub-install.in: Likewise.
	* util/grub-kbdcomp.in: Likewise.
	* util/grub-mkconfig.in: Likewise.
	* util/grub-mknetdir.in: Likewise.
	* util/grub-mkrescue.in: Likewise.
	* util/grub-mkstandalone.in: Likewise.
	* util/grub-reboot.in: Likewise.
	* util/grub-set-default.in: Likewise.
	* util/grub-setup.c: Likewise.
	* util/powerpc/ieee1275/grub-mkrescue.in: Likewise.
2012-03-03 13:05:08 +01:00
Vladimir 'phcoder' Serbinenko
40211ab884 * grub-core/commands/acpihalt.c: Add TRANSLATORS comments.
* grub-core/commands/keystatus.c: Likewise.
	* grub-core/commands/loadenv.c: Likewise.
	* grub-core/commands/probe.c: Likewise.
	* grub-core/commands/regexp.c: Likewise.
	* grub-core/commands/true.c: Likewise.
	* grub-core/commands/videoinfo.c: Likewise.
	* grub-core/disk/cryptodisk.c: Likewise.
	* grub-core/disk/ldm.c: Likewise.
	* grub-core/disk/loopback.c: Likewise.
	* grub-core/disk/luks.c: Likewise.
	* grub-core/fs/zfs/zfsinfo.c: Likewise.
	* grub-core/kern/disk.c: Likewise.
	* grub-core/kern/emu/hostdisk.c: Likewise.
2012-03-03 12:59:28 +01:00
Vladimir 'phcoder' Serbinenko
0c7d99c7c2 * grub-core/fs/zfs/zfsinfo.c (print_vdev_info): Add TRANSLATORS comment.
* util/grub-install.in: Add missing quote in the comment.
2012-03-02 21:08:38 +01:00
Vladimir 'phcoder' Serbinenko
e7d2559bc1 * grub-core/commands/i386/pc/drivemap.c: Add TRANSLATORS comments.
* grub-core/commands/lsmmap.c: Likewise.
	* grub-core/commands/minicmd.c: Likewise.
	* grub-core/commands/mips/loongson/lsspd.c: Likewise.
	* grub-core/commands/regexp.c: Likewise.
	* grub-core/gdb/gdb.c: Likewise.
	* grub-core/term/gfxterm.c: Likewise.
	* util/grub-mkconfig.in: Likewise.
	* util/grub-mkfont.c: Likewise.
	* util/grub-mklayout.c: Likewise.
	* util/grub-mknetdir.in: Likewise.
	* util/grub-mkrescue.in: Likewise.
	* util/grub.d/30_os-prober.in: Likewise.
2012-03-02 15:09:10 +01:00
Vladimir 'phcoder' Serbinenko
49ce9e50eb * grub-core/commands/videoinfo.c (hook): Replace "Direct"
with "Direct color" and "Packed" with "Packed pixel".
	(grub_cmd_videoinfo): Simplify legend.
2012-03-02 15:05:30 +01:00
Vladimir 'phcoder' Serbinenko
e4b791fabe * util/getroot.c (grub_make_system_path_relative_to_its_root): Fix
absolutely unclear error message.
2012-03-02 14:58:53 +01:00
Vladimir 'phcoder' Serbinenko
fd1265cb29 * util/grub-mkstandalone.in: Remove confusing leftover print. 2012-03-02 14:56:47 +01:00
Vladimir 'phcoder' Serbinenko
8822a8a02b * grub-core/fs/zfs/zfsinfo.c (print_vdev_info): Add TRANSLATORS
comments.
	* grub-core/gdb/gdb.c (grub_cmd_gdbstub): Likewise.
	(GRUB_MOD_INIT): Likewise.
	* grub-core/loader/i386/linux.c (grub_cmd_linux): Clarify that it's
	VGA mode.
	* grub-core/net/net.c (grub_net_route_address): Add TRANSLATORS
	comments.
	* util/grub-install.in (usage): Likewise.
	Spell ID in whole letters.
	Add missing ending dot.
	Quote variables.
	* util/grub-reboot.in: Fix capitalisation.
	* util/grub-set-default.in: Likewise.
2012-03-02 11:53:50 +01:00
Vladimir 'phcoder' Serbinenko
937fd0cc0c * util/getroot.c (strip_extra_slashes) [CYGWIN]: #ifdef-out.
(exec_pipe) [CYGWIN || MINGW32]: Likewise.
	(find_root_devices_from_poolname) [CYGWIN || MINGW32]: Likewise.
	(find_root_devices_from_libzfs) [CYGWIN || MINGW32]: Likewise.
	Disable -Werror for -Wdeprecated-declarations.
	(grub_guess_root_devices) [CYGWIN || MINGW32]: #ifdef-out.
	(get_dm_uuid) [!HAVE_DEVICE_MAPPER]: Likewise.
	(grub_util_get_dm_abstraction) [! __linux__]: #ifdef-out.
	(grub_util_get_grub_dev): Make luks handling dependent on
	HAVE_DEVICE_MAPPER and not __linux__.
	(get_win32_path): Fix format security.
	(grub_find_zpool_from_dir) [CYGWIN || MINGW32]: #ifdef-out.
	(grub_make_system_path_relative_to_its_root) [CYGWIN || MINGW32]:
	Don't try grub_find_zpool_from_dir.
	(grub_make_system_path_relative_to_its_root) [!__linux__]:
	#ifdef-out paresdir.
2012-03-02 11:36:07 +01:00
Vladimir 'phcoder' Serbinenko
1bab1ae335 * util/grub-pe2elf.c (usage): Add missing noreturn.
(write_section_data): Rename name to shname to avoid shadowing.
	(write_symbol_table): Rename name to symname to avoid shadowing.
	Fix write_reloc_section call.
2012-03-02 11:27:48 +01:00
Vladimir 'phcoder' Serbinenko
ef023e42a2 * grub-core/boot/i386/pc/startup_raw.S: Move decompressor_end to .bss
to ensure that it's after the last byte of .text.
2012-03-02 11:24:24 +01:00
Vladimir 'phcoder' Serbinenko
48afcb75fa * util/ieee1275/ofpath.c (my_isdigit): New function.
(trailing_digits): Use my_isdigit.
	(strip_trailing_digits): Likewise.
2012-03-02 11:21:01 +01:00
Vladimir 'phcoder' Serbinenko
88d51eff35 * util/resolve.c (read_dep_list): Use grub_isspace instead of isspace.
* grub-core/kern/emu/hostdisk.c (read_device_map): Likewise.
2012-03-02 11:18:11 +01:00
Vladimir 'phcoder' Serbinenko
17edc2ba56 * grub-core/kern/i386/pc/startup.S: Define __start. 2012-03-02 11:15:42 +01:00
Vladimir 'phcoder' Serbinenko
ad5518d79b * gentpl.py (kernel): Remove the use of TARGET_OBJ2ELF after strip since
strip already transforms he format.
2012-03-02 11:11:00 +01:00
Vladimir 'phcoder' Serbinenko
9e95e1bf6b * conf/i386-pc-cygwin-img-ld.sc: Define also _edata and __edata. 2012-03-02 11:08:33 +01:00
Vladimir 'phcoder' Serbinenko
9cc3ee5c2b * util/grub-install.in: Add missing gettext init.
* util/grub-kbdcomp.in: Likewise.
	* util/grub-mkconfig.in: Likewise.
	* util/grub-mknetdir.in: Likewise.
	* util/grub-mkrescue.in: Likewise.
	* util/grub-mkstandalone.in: Likewise.
	* util/grub-reboot.in: Likewise.
	* util/grub-set-default.in: Likewise.
	* util/grub.d/00_header.in: Likewise.
	* util/grub.d/10_hurd.in: Likewise.
	* util/grub.d/10_windows.in: Likewise.
	* util/grub.d/30_os-prober.in: Likewise.
	* util/powerpc/ieee1275/grub-mkrescue.in: Likewise.
2012-03-01 00:40:02 +01:00
Vladimir 'phcoder' Serbinenko
49e08a064a * po/Rules-swiss: Fix header comment. 2012-03-01 00:38:11 +01:00
Andreas Vogel
3809cb41bc * grub-core/kern/misc.c (grub_xvasprintf): Fix an exit path which
resulted in leak of arguments.
2012-02-29 19:35:19 +01:00
Vladimir 'phcoder' Serbinenko
fa6ec5734f * grub-core/boot/i386/pc/startup_raw.S: Use separate
reed_solomon_size const definition instead of computing it since
	Apple assembler doesn't support the later.
2012-02-29 19:12:16 +01:00
Vladimir 'phcoder' Serbinenko
22899b9c03 * gentpl.py (kernel): Rewrite Apple part. 2012-02-29 19:07:32 +01:00
Vladimir 'phcoder' Serbinenko
a132afc371 * include/grub/kernel.h (FOR_MODULES): Check module magic. 2012-02-29 19:02:18 +01:00
Vladimir 'phcoder' Serbinenko
9d742bd431 * util/grub-mkimagexx.c (locate_sections): Support non-standard
ELF section gap.
	(load_image): Likewise.
2012-02-29 18:57:43 +01:00
Vladimir 'phcoder' Serbinenko
f04a9a216c * configure.ac: Fix a typo in previous commit. 2012-02-29 17:50:27 +01:00
Vladimir 'phcoder' Serbinenko
46cf439c98 Don't add -Wl,-N on Apple platform.
* configure.ac (TARGET_LDFLAGS_OLDMAGIC): New subst.
	* conf/Makefile.common: Use TARGET_LDFLAGS_OLDMAGIC instead of -Wl,-N
2012-02-29 16:30:20 +01:00
Vladimir 'phcoder' Serbinenko
c4c48c541c * grub-core/Makefile.core.def (lzma_decompress): Use
TARGET_IMG_BASE_LDOPT rather than hardcoding -Wl,-Ttext.
2012-02-29 16:28:26 +01:00
Vladimir 'phcoder' Serbinenko
31a12124a0 * grub-core/genmod.sh.in: Rewrite the Apple part. 2012-02-29 16:00:27 +01:00
Vladimir 'phcoder' Serbinenko
4f3aa1af70 * grub-core/loader/machoXX.c (grub_macho_load): Fix signed vs unsigned
comparison.
2012-02-29 15:48:57 +01:00
Vladimir 'phcoder' Serbinenko
7bd8b0c776 * acinclude.m4 (grub_CHECK_PIC): New test.
* configure.ac: Add -fno-PIC to TARGET_CFLAGS if -fPIC is default.
2012-02-29 15:30:11 +01:00
Vladimir 'phcoder' Serbinenko
97304d7c53 * include/grub/libgcc.h (__STDC_VERSION__): Define if it's not yet so
to avoid the warning.
2012-02-29 15:28:02 +01:00
Vladimir 'phcoder' Serbinenko
fb88381212 * grub-core/boot/i386/pc/diskboot.S (firstlist): Rename to ...
(LOCAL(firstlist)): ... this. Move it before the firstlist and not
	after. All users updated.
2012-02-29 15:26:42 +01:00
Vladimir 'phcoder' Serbinenko
a121c9648e Use the common size routine in hostfs so we can read disks as well.
* grub-core/kern/emu/hostdisk.c (grub_util_get_fd_sectors): Rename to ..
	(grub_util_get_fd_size): ... this. Return size in bytes.
	All users updated.
	* grub-core/kern/emu/hostfs.c (grub_hostfs_open): Use
	grub_util_get_fd_size.
2012-02-29 15:23:31 +01:00
Vladimir 'phcoder' Serbinenko
c66d641020 * grub-core/kern/emu/hostdisk.c (grub_util_get_fd_sectors) [__APPLE__]:
Add blocksize retrieval.
2012-02-29 15:17:59 +01:00
Vladimir 'phcoder' Serbinenko
dfc8aeb042 * configure.ac: Restore CFLAGS after efiemu check. 2012-02-29 15:12:31 +01:00
Vladimir 'phcoder' Serbinenko
403e25a539 * configure.ac: Move -fnested-functions to CPPFLAGS to workaround
Apple bug.
2012-02-29 15:10:13 +01:00
Vladimir 'phcoder' Serbinenko
382775d1ac * grub-core/Makefile.am (MACHO2IMG): Add missing variable. 2012-02-29 15:08:08 +01:00
Vladimir 'phcoder' Serbinenko
6fd4e6e4d0 * grub-core/commands/i386/pc/halt.c (grub_halt): Add noreturn attribute.
(grub_cmd_halt): Likewise.
2012-02-29 15:06:39 +01:00
Vladimir 'phcoder' Serbinenko
bea359d657 * grub-core/lib/i386/relocator16.S: Declare LOCAL(relocator16_end)
for local arithmetics.
	Break %sp init into 2 instructions.
	Add 0 byte at the end.
2012-02-29 15:00:54 +01:00