Commit Graph

803 Commits

Author SHA1 Message Date
Vladimir 'phcoder' Serbinenko b7f3ac299d * util/hostdisk.c (grub_util_biosdisk_get_grub_dev): Remove
disk_info_msg (conflicts with gettexting into languages with cases).
2010-04-10 20:28:25 +02:00
Grégoire Sutre e0fc9e78c1 missing part of patch 2010-04-10 17:09:24 +02:00
Grégoire Sutre 2c7031b135 Add grub-probe support for NetBSD.
* util/getroot.c (find_root_device): Convert block device to
	character device on NetBSD.
	* util/probe.c (probe): Require character device on NetBSD.
	* util/hostdisk.c: NetBSD specific headers.
	(configure_device_driver): new function to tune device driver
	parameters (currently only for NetBSD floppy driver).
	(grub_util_biosdisk_open): NetBSD specific code (get disk size
	via disklabel ioctl).
	(open_device): call configure_device_driver on NetBSD.
	(convert_system_partition_to_system_disk): NetBSD specific code.
	(device_is_wholedisk): Likewise.
	(grub_util_biosdisk_get_grub_dev): Likewise.
	(make_device_name): Fixed a typo in bsd_part_str.
	* configure.ac: check for opendisk() and getrawpartition() on
	NetBSD and set LIBUTIL.
	* Makefile.in: add LIBUTIL to LIBS.
2010-04-10 17:07:33 +02:00
BVK Chaitanya 84a09b2134 merged with mainline 2010-04-10 19:18:24 +05:30
Vladimir 'phcoder' Serbinenko a29e902132 Merge mainline into emu-modload 2010-04-10 01:25:46 +02:00
Vladimir 'phcoder' Serbinenko 4777971126 * util/grub-mkrescue.in: Fix incorrect path in coreboot part.
Reported by: Thomas Schmitt.
	Add -no-emul-boot to grub-mkisofs parameters.
2010-04-09 20:40:14 +02:00
BVK Chaitanya 34bb22dfa5 While and until loops support to GRUB script.
* include/grub/script_sh.h (grub_script_cmdwhile): New struct.
	(grub_script_create_cmdwhile): New function prototype.
	(grub_script_execute_cmdwhile): New function prototype.
	* script/execute.c (grub_script_execute_cmdwhile): New function.
	* script/parser.y (command): New commands.
	(whilecmd): New grammar rule.
	(untilcmd): New grammar rule.
	* script/script.c (grub_script_create_cmdwhile): New function.
	* util/grub-script-check.c (grub_script_execute_cmdwhile): New
	function.

	* tests/grub_script_while1.in: New testcase.
	* conf/tests.rmk: Rule for new testcase.
2010-04-09 22:04:21 +05:30
BVK Chaitanya c41c00eab6 merged with mainline 2010-04-09 21:44:59 +05:30
Vladimir 'phcoder' Serbinenko e215d8e02a * util/grub.d/00_header.in: Add few missing quotes. Recognise *.jpeg
as *.jpg.
2010-04-09 17:44:03 +02:00
Mario Vazquez d7c43ba1c0 GRUB_BACKGROUND support.
* util/grub-mkconfig.in: Export GRUB_BACKGROUND.
	* util/grub.d/00_header.in: Parse GRUB_BACKGROUND.
2010-04-09 17:37:38 +02:00
Vladimir 'phcoder' Serbinenko d64795c0eb Load fonts and modules for gfxmenu in grub-mkconfig.
Idea by: Mario Vasquez

	* util/grub.d/00_header.in: Load pf2 and image modules.
2010-04-09 16:56:07 +02:00
Vladimir 'phcoder' Serbinenko f267f83a13 grub-mkconfig multiple terminal support.
* util/grub-mkconfig.in: Handle multiple terminals correctly.
	* util/grub.d/00_header.in: Likewise.
2010-04-09 16:29:10 +02:00
Colin Watson df60998c64 * util/grub.d/10_linux.in: Only use the first word of
GRUB_DISTRIBUTOR for --class, to avoid problems if somebody puts
spaces in GRUB_DISTRIBUTOR.
* util/grub.d/10_kfreebsd.in: Likewise.
* util/grub.d/10_hurd.in: Likewise.
2010-04-08 10:54:44 +01:00
Grégoire Sutre b9396631bc * util/grub-install.in: Add `|| exit 1' to all grub-probe calls
for which failure is fatal.
2010-04-03 20:52:06 +02:00
Grégoire Sutre 50479febcf * util/grub-install.in: Use mkdir -p to create grub directory.
* util/i386/efi/grub-install.in: Likewise.
	* util/ieee1275/grub-install.in: Likewise.
2010-04-03 20:48:36 +02:00
Grégoire Sutre bd5a6415b0 * util/i386/efi/grub-dumpdevtree: replaced the non-portable `==' by
`=' and added double quotes on operands of this equality test.
2010-04-03 20:23:21 +02:00
Vladimir 'phcoder' Serbinenko d5631db0f2 grub-mkconfig multiple terminal support.
* util/grub-mkconfig.in: Handle multiple terminals correctly.
	* util/grub.d/00_header.in: Likewise.
2010-04-02 21:12:20 +02:00
Grégoire Sutre 394a3120a7 Fix a build failure (-Wundef -Werror) when ENABLE_NLS is not defined,
which is the case with --disabled-nls.

	* include/grub/i18n.h: Use (defined(ENABLE_NLS)
	&& ENABLE_NLS) instead of ENABLE_NLS in all #if preprocessor macros.
	* util/misc.c: Likewise.
	* util/mkisofs/mkisofs.c: Likewise.
	* util/mkisofs/mkisofs.h: Likewise.
2010-03-27 12:19:32 +01:00
BVK Chaitanya baae00df35 merged with mainline 2010-03-26 21:13:06 +05:30
BVK Chaitanya c299f3d6fb merged with mainline 2010-03-26 20:55:07 +05:30
Vladimir 'phcoder' Serbinenko c9ea504d25 merge mainline into nestpart 2010-03-26 15:44:13 +01:00
BVK Chaitanya ba4be5af25 fixed help message for grub-script-check 2010-03-22 13:25:09 +05:30
Colin Watson bed1d3524e * util/grub-install.in: Copy .mo files from @datadir@/locale, to
match where 'make install' puts them.
* util/i386/efi/grub-install.in: Likewise.
2010-03-21 23:04:02 +00:00
BVK Chaitanya dd6fee39fa merged mainline 2010-03-21 11:03:41 +05:30
BVK Chaitanya 8a99e92a69 merge in mainline 2010-03-16 17:42:27 +05:30
BVK Chaitanya 8622549153 merged in mainline 2010-03-14 22:20:55 +05:30
Vladimir 'phcoder' Serbinenko 1d63a066e2 Remove some redundancy in build system.
* Makefile.in (TARGET_CFLAGS): Add -ffreestanding.
	(TARGET_ASFLAGS): Add -nostdinc -fno-builtin.
	(TARGET_LDFLAGS): Add -nostdlib.
	(TARGET_IMG_LDFLAGS): Likewise.
	* commands/lsmmap.c (grub_cmd_lsmmap) [GRUB_MACHINE_EMU]: Don't do
	anything since mmap isn't available.
	* conf/any-emu.rmk (kernel_img_SOURCES): Remove commands/boot.c.
	Add util/time.c.
	(pkglib_MODULES): Remove reboot.mod.
	(reboot_mod_SOURCES): Removed.
	(reboot_mod_CFLAGS): Likewise.
	(reboot_mod_LDFLAGS): Likewise.
	* conf/common.rmk (script/lexer.c_DEPENDENCIES): New variable.
	(MOSTLYCLEANFILES): Add symlist.c kernel_syms.lst.
	(DEFSYMFILES): Add kernel_syms.lst.
	(kernel_img_HEADERS): Add common headers.
	(symlist.c): New target.
	(kernel_syms.lst): Likewise.
	(pkglib_MODULES): Add memdisk.mod.
	(memdisk_mod_SOURCES): New variable.
	(memdisk_mod_CFLAGS): Likewise.
	(memdisk_mod_LDFLAGS): Likewise.
	(pkglib_MODULES): Add reboot.mod.
	(reboot_mod_SOURCES): New variable.
	(reboot_mod_CFLAGS): Likewise.
	(reboot_mod_LDFLAGS): Likewise.
	(pkglib_MODULES): Add date.mod.
	(date_mod_SOURCES): New variable.
	(date_mod_CFLAGS): Likewise.
	(date_mod_LDFLAGS): Likewise.
	(pkglib_MODULES): Add datehook.mod.
	(datehook_mod_SOURCES): New variable.
	(datehook_mod_CFLAGS): Likewise.
	(datehook_mod_LDFLAGS): Likewise.
	(pkglib_MODULES): Add lsmmap.mod.
	(lsmmap_mod_SOURCES): New variable.
	(lsmmap_mod_CFLAGS): Likewise.
	(lsmmap_mod_LDFLAGS): Likewise.
	(pkglib_MODULES): Add boot.mod.
	(boot_mod_SOURCES): New variable.
	(boot_mod_CFLAGS): Likewise.
	(boot_mod_LDFLAGS): Likewise.
	* conf/i386-coreboot.rmk: Removed redundant parts.
	* conf/i386-ieee1275.rmk: Likewise.
	* conf/i386-pc.rmk: Likewise.
	* conf/mips-yeeloong.rmk: Likewise.
	* conf/mips.rmk: Likewise.
	* conf/powerpc-ieee1275.rmk: Likewise.
	* conf/sparc64-ieee1275.rmk: Likewise.
	* conf/x86_64-efi.rmk: Likewise.
	* conf/i386-coreboot.rmk: Moved qemu parts ..
	* conf/i386-qemu.rmk: ... here
	* conf/i386-efi.rmk: Moved common parts to...
	* conf/x86-efi.rmk: ... here.
	* conf/i386.rmk: Added modules common to all x86 variants.
	* configure.ac: Add -m32/-m64 to TARGET_ASFLAGS.
	* disk/memdisk.c: Remove grub/machine/kernel.h.
	* gensymlist.sh.in: Include symbol.h.
	* hook/datehook.c: Correct module name.
	* include/grub/datetime.h (grub_get_datetime) [GRUB_MACHINE_EMU]: Export.
	(grub_set_datetime) [GRUB_MACHINE_EMU]: Likewise.
	* include/grub/i386/efi/serial.h: New file.
	* include/grub/x86_64/efi/serial.h: Likewise.
	* util/time.c: Likewise.
	* video/ieee1275.c (grub_video_ieee1275_setup): Handle 64-bit void *.
2010-03-14 17:17:49 +01:00
Colin Watson 08e46ededa Speed up consecutive hostdisk operations on the same device.
* util/hostdisk.c (struct grub_util_biosdisk_data): New structure.
(grub_util_biosdisk_open): Initialise disk->data.
(struct linux_partition_cache): New structure.
(linux_find_partition): Cache partition start positions; these are
expensive to compute on every read and write.
(open_device): Cache open file descriptor in disk->data, so that we
don't have to reopen it and flush the buffer cache for consecutive
operations on the same device.
(grub_util_biosdisk_close): New function.
(grub_util_biosdisk_dev): Set `close' member.

* conf/common.rmk (grub_probe_SOURCES): Add kern/list.c.
* conf/i386-efi.rmk (grub_setup_SOURCES): Likewise.
* conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
* conf/sparc64-ieee1275.rmk (grub_setup_SOURCES): Likewise.
* conf/x86_64-efi.rmk (grub_setup_SOURCES): Likewise.
2010-03-14 15:39:14 +00:00
Vladimir 'phcoder' Serbinenko dae79b6b05 Merge mainline into emu-mod 2010-03-14 16:27:54 +01:00
Vladimir 'phcoder' Serbinenko 016a671b51 Merge mainline into cleanbuild 2010-03-14 16:01:31 +01:00
Vladimir 'phcoder' Serbinenko 313df2f552 Merge mainline into sparc-mkimage 2010-03-14 15:21:04 +01:00
Thorsten Glaser d68b491ee2 * util/grub-mkrescue.in: Base ISO UUID on UTC. 2010-03-14 13:48:55 +01:00
Matt Kraai 4e02ed5014 2010-03-08 Matt Kraai <kraai@ftbfs.org>
* util/i386/pc/grub-setup.c (setup): Fix a grammatical error (Debian
	bug #559005).
2010-03-08 22:20:02 +00:00
Vladimir 'phcoder' Serbinenko 33e2e6f373 2010-03-06 Vladimir Serbinenko <phcoder@gmail.com>
* util/grub-mkrescue.in: Use mktemp with explicit template.
2010-03-06 17:28:25 +01:00
Vladimir 'phcoder' Serbinenko 60b03859e8 2010-03-05 Vladimir Serbinenko <phcoder@gmail.com>
* util/import_gcry.py: Add autogenerated files to MAINTAINER_CLEANFILES.
2010-03-05 15:38:04 +01:00
Christian Franke 4760f97911 2010-03-04 Christian Franke <franke@computer.org>
* util/grub-pe2elf.c: Add missing include "progname.h".
2010-03-04 16:25:26 +01:00
Vladimir 'phcoder' Serbinenko 08dcd91370 2010-03-04 Vladimir Serbinenko <phcoder@gmail.com>
* util/i386/efi/grub-install.in: Copy gettext files.
2010-03-04 15:12:34 +01:00
Colin Watson c6293875f9 reopen device when the requested access mode changes 2010-03-03 20:03:50 +00:00
Colin Watson 22d7b6137a 2010-03-03 Colin Watson <cjwatson@ubuntu.com>
* util/hostdisk.c (struct grub_util_biosdisk_data): New structure.
	(grub_util_biosdisk_open): Initialise disk->data.
	(struct linux_partition_cache): New structure.
	(linux_find_partition): Cache partition start positions; these are
	expensive to compute on every read and write.
	(open_device): Cache open file descriptor in disk->data, so that we
	don't have to reopen it and flush the buffer cache for consecutive
	operations on the same device.
	(grub_util_biosdisk_close): New function.
	(grub_util_biosdisk_dev): Set `close' member.

	* conf/common.rmk (grub_probe_SOURCES): Add kern/list.c.
	* conf/i386-efi.rmk (grub_setup_SOURCES): Likewise.
	* conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
	* conf/sparc64-ieee1275.rmk (grub_setup_SOURCES): Likewise.
	* conf/x86_64-efi.rmk (grub_setup_SOURCES): Likewise.
2010-03-03 10:44:12 +00:00
Vladimir 'phcoder' Serbinenko 14532662ee merge mainline into sparc-mkimage 2010-03-03 11:24:36 +01:00
Vladimir 'phcoder' Serbinenko 72b286313a 2010-02-26 Vladimir Serbinenko <phcoder@gmail.com>
* util/grub.d/10_linux.in (linux_entry): Don't default to
	gfxpayload=keep if Linux doesn't support video handover.
2010-02-26 14:32:24 +01:00
Colin Watson a0ca21c2d2 2010-02-25 Jordan Uggla <jordan.uggla@gmail.com>
* util/grub-mkconfig.in (GRUB_SAVEDEFAULT): Export new variable.
	* util/grub-mkconfig_lib.in (save_default_entry): Only save a new
	default entry if GRUB_SAVEDEFAULT=true.  This allows using
	GRUB_DEFAULT=saved on its own to let grub-reboot work, without
	saving a new default on every boot.
2010-02-25 13:30:50 +00:00
carles 7dd05b96dc 2010-02-20 Carles Pina i Estany <carles@pina.cat>
* util/grub-mkrawimage.c (usage): Change string formatting to
	improve gettext.
2010-02-20 23:31:35 +00:00
Samuel Thibault 0a39de87d9 2010-02-14 Samuel Thibault <samuel.thibault@ens-lyon.org>
* util/grub-mkconfig.in: Export GRUB_INIT_TUNE.
	* util/grub.d/00_header.in: Handle GRUB_INIT_TUNE.
2010-02-18 08:56:31 +01:00
Vladimir 'phcoder' Serbinenko d27859b2ec 2010-02-14 Vladimir Serbinenko <phcoder@gmail.com>
* util/grub-mkconfig_lib.in (prepare_grub_to_access_device): Enclose
	set root in single quotes to prevent \, from being unescaped.
2010-02-14 14:47:50 +01:00
Vladimir 'phcoder' Serbinenko 10f6389453 Fix raw image addresses 2010-02-13 18:48:33 +01:00
Vladimir 'phcoder' Serbinenko 0b4ab8e54a Merge mainline int sparc-mkimage-unify 2010-02-13 16:49:21 +01:00
Vladimir 'phcoder' Serbinenko a49217cff7 aout image support 2010-02-13 16:26:50 +01:00
Vladimir 'phcoder' Serbinenko bdca260795 2010-02-13 Vladimir Serbinenko <phcoder@gmail.com>
* util/grub-mkrawimage.c (main): Call set_program_name.
2010-02-13 15:57:42 +01:00
Vladimir 'phcoder' Serbinenko da278c4d34 2010-02-13 Vladimir Serbinenko <phcoder@gmail.com>
Properly align 64-bit targets.

	* util/grub-mkrawimage.c (ALIGN_ADDR): New macro.
	(generate_image): Use ALIGN_ADDR.
2010-02-13 15:54:27 +01:00