Commit graph

2368 commits

Author SHA1 Message Date
Robert Millan
8040619d88 2010-01-18 Robert Millan <rmh.grub@aybabtu.com>
* include/grub/i386/linux.h (GRUB_VIDEO_TYPE_TEXT): Rename to ...
	(GRUB_VIDEO_LINUX_TYPE_TEXT): ... this.  Update all users.
	(GRUB_VIDEO_TYPE_VLFB): Rename to ...
	(GRUB_VIDEO_LINUX_TYPE_VESA): ... this.  Update all users.
	(GRUB_VIDEO_TYPE_EFI): Rename to ...
	(GRUB_VIDEO_LINUX_TYPE_SIMPLE): ... this.  Update all users.
2010-01-18 07:49:50 +00:00
Robert Millan
a0c2a0f6ff 2010-01-17 Robert Millan <rmh.grub@aybabtu.com>
* include/grub/test.h: Add license header.
	* tests/example_functional_test.c: Likewise.
	* tests/example_unit_test.c: Likewise.
	* tests/lib/functional_test.c: Likewise.
	* tests/lib/test.c: Likewise.
	* tests/lib/unit_test.c: Likewise.
2010-01-17 17:29:57 +00:00
Vladimir 'phcoder' Serbinenko
b0b139075e 2010-01-17 Vladimir Serbinenko <phcoder@gmail.com>
Use flag-based instead of hook-based video mode selection and "auto"
	keyword.

	* include/grub/video.h (grub_video_adapter): Changed 'setup' member.
	(grub_video_set_mode): Changed prototype. All users updated.
	(grub_video_check_mode_flag): New inline function.
	* video/video.c (parse_modespec): New function.
	(grub_video_set_mode): Parse flags and keywords.
2010-01-17 17:52:01 +01:00
carles
ea379330f9 2010-01-17 Carles Pina i Estany <carles@pina.cat>
* util/misc.c (grub_util_info): Fix the order of the parameters in a
	fprintf call.
2010-01-17 14:42:19 +00:00
Felix Zielcke
e15c215ebd 2010-01-16 Grégoire Sutre <gregoire.sutre@gmail.com>
* genmk.rb (class SCRIPT): Replace option -i of sed by a pipe.
2010-01-16 11:57:47 +01:00
carles
409ae1c92a 2010-01-16 Carles Pina i Estany <carles@pina.cat>
* util/grub-editenv.c (usage): Use `program_name' instead of hardcoded
	string.
	* util/grub-emu.c (usage): Likewise.
	* util/grub-mkpasswd-pbkdf2.c (usage): Likewise.
	* util/i386/efi/grub-mkimage.c (usage): Likewise.
	* util/i386/pc/grub-mkimage.c (usage): Likewise.
	* util/i386/pc/grub-setup.c (usage): Likewise.
2010-01-16 00:39:14 +00:00
carles
70a14d3d49 2010-01-16 Carles Pina i Estany <carles@pina.cat>
* util/misc.c (grub_util_warn): Gettextizze, print full stop after
	the message.
	(grub_util_info): Likewise.
	(grub_util_error): Likewise.
	* util/elf/grub-mkimage.c: Fix capitalisation, quotes, full stops
	and/or new lines in `grub_util_warna', `grub_util_info',
	`grub_util_error' calls.
	* util/getroot.c: Likewise.
	* util/grub-editenv.c: Likewise.
	* util/grub-emu.c: Likewise.
	* util/grub-fstest.c: Likewise.
	* util/grub-mkdevicemap.c: Likewise.
	* util/grub-mkfont.c: Likewise.
	* util/grub-mkpasswd-pbkdf2.c: Likewise.
	* util/grub-mkrelpath.c: Likewise.
	* util/grub-pe2elf.c: Likewise.
	* util/grub-probe.c: Likewise.
	* util/hostdisk.c: Likewise.
	* util/i386/efi/grub-mkimage.c: Likewise.
	* util/i386/pc/grub-mkimage.c: Likewise.
	* util/i386/pc/grub-setup.c: Likewise.
	* util/ieee1275/ofpath.c: Likewise.
	* util/mkisofs/eltorito.c: Likewise.
	* util/mkisofs/rock.c: Likewise.
	* util/mkisofs/write.c: Likewise.
	* util/raid.c: Likewise.
	* util/sparc64/ieee1275/grub-mkimage.c: Likewise.
	* util/sparc64/ieee1275/grub-setup.c: Likewise.
2010-01-16 00:26:52 +00:00
Vladimir 'phcoder' Serbinenko
a0b766fc9b 2010-01-15 Vladimir Serbinenko <phcoder@gmail.com>
Enable multiboot on non-pc.

	* conf/i386-coreboot.rmk, conf/i386-pc.rmk (pkglib_MODULES): Move
	multiboot.mod and multiboot2.mod to ...
	* conf/i386.rmk (pkglib_MODULES): ... here.
	* conf/i386-coreboot.rmk, conf/i386-pc.rmk (multiboot_mod_SOURCES):
	Moved to ...
	* conf/i386.rmk (multiboot_mod_SOURCES): .. here.
	* conf/i386-coreboot.rmk, conf/i386-pc.rmk (multiboot_mod_CFLAGS):
	Moved to ...
	* conf/i386.rmk (multiboot_mod_CFLAGS): .. here.
	* conf/i386-coreboot.rmk, conf/i386-pc.rmk (multiboot_mod_ASFLAGS):
	Moved to ...
	* conf/i386.rmk (multiboot_mod_ASFLAGS): .. here.
	* conf/i386-coreboot.rmk, conf/i386-pc.rmk (multiboot_mod_LDFLAGS):
	Moved to ...
	* conf/i386.rmk (multiboot_mod_LDFLAGS): .. here.
	* conf/x86_64-efi.rmk (pkglib_MODULES): Remove ata.mod and
	relocator.mod.
	(ata_mod_SOURCES): Removed.
	(ata_mod_CFLAGS): Likewise.
	(ata_mod_LDFLAGS): Likewise.
	(relocator_mod_SOURCES): Removed.
	(relocator_mod_CFLAGS): Likewise.
	(relocator_mod_ASFLAGS): Likewise.
	(relocator_mod_LDFLAGS): Likewise.
	Include i386.mk.
	* include/grub/x86_64/multiboot.h: New file.
	* loader/i386/multiboot.c (grub_multiboot_boot) [GRUB_MACHINE_EFI]:
	Terminate EFI.
2010-01-15 21:11:51 +01:00
Vladimir 'phcoder' Serbinenko
884ade5654 2010-01-15 Vladimir Serbinenko <phcoder@gmail.com>
Video multiboot support.

	* include/grub/multiboot.h (grub_multiboot_set_accepts_video):
	New prototype.
	* include/multiboot.h: Resynced with multiboot specification.
	* include/multiboot2.h: Likewise.
	* loader/i386/multiboot.c (UNSUPPORTED_FLAGS): Support video flags.
	(grub_multiboot): Parse MULTIBOOT_VIDEO_MODE fields.
	* loader/i386/multiboot_mbi.c (DEFAULT_VIDEO_MODE): New constant.
	(HAS_VGA_TEXT): Likewise.
	(accepts_video): New variable.
	(grub_multiboot_set_accepts_video): New function.
	(grub_multiboot_get_mbi_size): Account for video structures.
	(set_video_mode): New function.
	(retrieve_video_parameters): Likewise.
	(grub_multiboot_make_mbi): Fill video fields.
2010-01-15 16:30:57 +01:00
Vladimir 'phcoder' Serbinenko
0d90e8a6fb 2010-01-15 Vladimir Serbinenko <phcoder@gmail.com>
Video driver ids.

	* include/grub/video.h (grub_video_driver_id): New type.
	(grub_video_adapter): New member 'id'. All users updated.
	(grub_video_get_driver_id): New proto.
	* video/video.c (grub_video_get_driver_id): New function.
2010-01-15 16:11:18 +01:00
carles
5c71db1b9b 2010-01-14 Carles Pina i Estany <carles@pina.cat>
* util/grub.d/30_os-prober.in: Use `set var=val' rather than plain
	`var=val'.
2010-01-14 23:20:13 +00:00
carles
cca15b52c1 2010-01-14 Carles Pina i Estany <carles@pina.cat>
* normal/cmdline.c (print_completion): Gettextizze.
2010-01-14 23:07:44 +00:00
carles
c586fbb206 2001-01-14 Carles Pina i Estany <carles@pina.cat>
* loader/i386/pc/chainloader.c: Include `<grub/mm.h>'.
2010-01-14 23:04:49 +00:00
carles
ba2f6848e0 2010-01-14 Carles Pina i Estany <carles@pina.cat>
* gettext/gettext.c (grub_gettext_translate): Push and pop
	grub_errno.
	(grub_gettext_delete_list): Change comment style.
	* kern/err.c (grub_error): Gettextizze.
	(grub_fatal): Gettextizze.
2010-01-14 22:31:06 +00:00
Robert Millan
0a46429a55 2010-01-14 Robert Millan <rmh.grub@aybabtu.com>
* include/grub/i386/loader.h (grub_linux16_boot): Renamed to ...
	(grub_linux16_real_boot): ... this.
	* kern/i386/loader.S: Likewise.
	* loader/i386/pc/linux.c: Include `<grub/video.h>' and `<grub/mm.h>'.
	(grub_linux16_boot): New function.  Switches to text mode and calls
	grub_linux16_real_boot().
	
	* loader/i386/bsd.c: Include `<grub/video.h>'.
	(grub_freebsd_boot, grub_openbsd_boot, grub_netbsd_boot): Switch to
	text mode before calling grub_unix_real_boot().
	
	* loader/i386/multiboot.c: Include `<grub/video.h>'.
	(grub_multiboot_boot): Switch to text mode before calling
	grub_relocator32_boot().
	
	* loader/i386/pc/chainloader.c: Include `<grub/video.h>'.
	(grub_chainloader_boot): Switch to text mode before calling
	grub_chainloader_real_boot().
2010-01-14 21:08:31 +00:00
Robert Millan
d6f93a661c 2010-01-05 Jordan Uggla <jordan.uggla@gmail.com>
2010-01-05  Colin Watson  <cjwatson@ubuntu.com>
	
	* util/grub-reboot.in: Make sure prev_saved_entry always gets a
	non-empty value.
2010-01-14 18:52:39 +00:00
Colin Watson
6d1e76899b fix changelog dates 2010-01-14 14:06:36 +00:00
Colin Watson
7d1468e4b6 merge from trunk 2010-01-14 14:04:44 +00:00
BVK Chaitanya
0934d18466 2010-01-14 BVK Chaitanya <bvk.groups@gmail.com>
Unit testing framework for GRUB.

	* Makefile.in: Test framework build rules for 'make check'.
	* conf/tests.rmk: Build rules for individual tests and framework.

	* include/grub/test.h: Header file for whitebox tests.
	* tests/lib/functional_test.c: Framework support for whitebox
	functional tests.
	* tests/lib/test.c: Common whitebox testing code for unit and
	functional tests.
	* tests/lib/unit_test.c: Framework support for whitebox unit
	tests.

	* tests/util/grub-shell-tester.in: Support utility for grub-script
	tests.
	* tests/util/grub-shell.in: Utility to execute grub-script
	commands in a Qemu instance.

	* tests/example_functional_test.c: Example whitebox functional
	test.
	* tests/example_grub_script_test.in: Example grub-script test.
	* tests/example_scripted_test.in: Example scripted test.
	* tests/example_unit_test.c: Example whitebox unit test.
2010-01-14 19:15:21 +05:30
BVK Chaitanya
96f60752d1 merge trunk 2010-01-14 18:45:19 +05:30
BVK Chaitanya
2285d4642a use qemu-system-i386 instead of qemu 2010-01-14 18:39:12 +05:30
BVK Chaitanya
0b8891c276 removed unnecessary grub_test_* wrappers 2010-01-14 17:17:51 +05:30
Vladimir 'phcoder' Serbinenko
9c4ffeebf5 2010-01-14 Vladimir Serbinenko <phcoder@gmail.com>
* conf/i386-coreboot.rmk (multiboot_mod_SOURCES):
	Add loader/i386/multiboot_mbi.c.
	(multiboot2_mod_SOURCES): Likewise.
	* conf/i386-pc.rmk (multiboot_mod_SOURCES): Likewise.
	(multiboot2_mod_SOURCES): Likewise.
	* include/grub/multiboot.h (grub_multiboot_get_mbi_size): New proto.
	(grub_multiboot_make_mbi): Likewise.
	(grub_multiboot_free_mbi): Likewise.
	(grub_multiboot_init_mbi): Likewise.
	(grub_multiboot_add_module): Likewise.
	(grub_multiboot_set_bootdev): Likewise.
	* loader/i386/multiboot.c (mbi): Removed.
	(mbi_dest): Likewise.
	(alloc_mbi): New variable.
	(grub_multiboot_payload_size): Removed. All users updated.
	(grub_multiboot_pure_size): New variable.
	(grub_multiboot_boot): Use grub_multiboot_make_mbi.
	(grub_multiboot_unload): Use grub_multiboot_free_mbi.
	(grub_get_multiboot_mmap_len): Moved to loader/i386/multiboot_mbi.c.
	(grub_fill_multiboot_mmap): Likewise.
	(grub_multiboot_get_bootdev): Likewise.
	(grub_multiboot): Use multiboot_mbi functions.
	* loader/i386/multiboot_mbi.c: New file.
2010-01-14 12:40:55 +01:00
Vladimir 'phcoder' Serbinenko
05847c24e1 Merge mainline into abstractmbi 2010-01-14 12:34:23 +01:00
Vladimir 'phcoder' Serbinenko
17383dfe96 2010-01-13 Vladimir Serbinenko <phcoder@gmail.com>
* kern/efi/init.c (grub_efi_fini): Don't call grub_efi_mm_fini as
	it would result in module crash.
2010-01-13 22:53:12 +01:00
Vladimir 'phcoder' Serbinenko
c1f2882010 2010-01-13 Vladimir Serbinenko <phcoder@gmail.com>
* term/ieee1275/ofconsole.c (grub_ofconsole_putchar): Handle '\r'.
	(grub_ofconsole_getwh): Split to ...
	(grub_ofconsole_getwh): ... this.
	(grub_ofconsole_dimensions): ...and this.
	(grub_ofconsole_init_output): Call grub_ofconsole_dimensions.
2010-01-13 20:43:48 +01:00
Robert Millan
58655a160b 2010-01-13 Robert Millan <rmh.grub@aybabtu.com>
* util/mkisofs/rock.c (generate_rock_ridge_attributes): Fix a typo.
2010-01-13 19:10:57 +00:00
Vladimir 'phcoder' Serbinenko
b16ff4662e Small cleanup 2010-01-12 19:47:02 +01:00
Vladimir 'phcoder' Serbinenko
10891398fd 2010-01-12 Vladimir Serbinenko <phcoder@gmail.com>
* loader/i386/pc/multiboot2.c: Removed stalled file.
2010-01-12 17:56:05 +01:00
Vladimir 'phcoder' Serbinenko
0b8a223cb1 2010-01-12 Vladimir Serbinenko <phcoder@gmail.com>
* util/grub-mkpasswd-pbkdf2.c (main): Use grub_util_init_nls.
	Reported by: Grégoire Sutre
2010-01-12 13:36:44 +01:00
BVK Chaitanya
4d362fde58 build only functional tests on make 2010-01-12 15:49:40 +05:30
BVK Chaitanya
528aeaeabb merge trunk 2010-01-12 11:02:49 +05:30
BVK Chaitanya
afafb37e9b added boot device selection to grub-shell 2010-01-12 10:54:37 +05:30
BVK Chaitanya
c5431d4029 build tests on make, but run on make check 2010-01-12 10:16:17 +05:30
BVK Chaitanya
350285caae removed unnecessary EXPORT_* macro usage 2010-01-12 09:23:24 +05:30
BVK Chaitanya
afdc9ad006 fixed an error message 2010-01-12 09:00:55 +05:30
Robert Millan
92ab12b092 2010-01-11 Robert Millan <rmh.grub@aybabtu.com>
* util/misc.c (canonicalize_file_name): New function.
	(make_system_path_relative_to_its_root): Use canonicalize_file_name()
	instead of realpath().
2010-01-11 14:55:20 +00:00
Colin Watson
a788afb626 2010-01-11 Colin Watson <cjwatson@ubuntu.com>
* util/grub-install.in (usage): Clarify meaning of --root-directory,
	and make it clearer that it's optional.  Based on confusion
	witnessed on IRC.
2010-01-11 12:00:57 +00:00
Vladimir 'phcoder' Serbinenko
ffa8e3d277 2010-01-10 Vladimir Serbinenko <phcoder@gmail.com>
* term/i386/pc/vga_text.c (inc_y): Fix off-by-one error which resulted
	in premature implicit newline.
2010-01-10 22:35:46 +01:00
Vladimir 'phcoder' Serbinenko
e9060a9d3b 2010-01-10 Vladimir Serbinenko <phcoder@gmail.com>
* normal/cmdline.c (grub_cmdline_get): Fix off-by-one error
	which resulted in garbled command line at the end of screen.
2010-01-10 22:34:25 +01:00
Vladimir 'phcoder' Serbinenko
cd0514794a MAnipulate mbi in abstract way 2010-01-10 18:58:18 +01:00
Robert Millan
f0d0c0b726 2010-01-10 Robert Millan <rmh.grub@aybabtu.com>
* loader/i386/ieee1275/linux.c (grub_linux_boot): Rework video position
	initialization with similar approach as with other Linux loaders.
2010-01-10 01:43:42 +00:00
Robert Millan
0e60bae74e 2010-01-10 Robert Millan <rmh.grub@aybabtu.com>
Fix i386-ieee1275 build.
	
	* loader/i386/ieee1275/linux.c (grub_linux_boot): Use grub_term_width()
	and grub_term_height() for video_{width,height} initialization.
2010-01-10 01:10:39 +00:00
Robert Millan
cdec4d3193 2010-01-09 Robert Millan <rmh.grub@aybabtu.com>
Fix grub-emu build.
	
	* conf/any-emu.rmk (grub_emu_SOURCES): Remove `kern/reader.c'.
2010-01-10 00:47:19 +00:00
Robert Millan
cdb3f378d6 Merge multiterm branch 2010-01-09 22:49:18 +00:00
Robert Millan
822873a7da Eliminate grub_term_register_{input,output}_active. Default terminals are
automatically activated because they're the only terminal that has been loaded.

This solution is temporary.  In the future, all terminals should auto-enable,
but this is non-trivial due to resource conflict, and it shouldn't prevent
merge in trunk.
2010-01-09 23:42:17 +01:00
Robert Millan
75cc5b682e Merge from trunk 2010-01-09 23:22:48 +01:00
Robert Millan
1a064917fe 2010-01-09 Robert Millan <rmh.grub@aybabtu.com>
Make loader output a bit more user-friendly.
	
	* util/grub.d/10_hurd.in: Print message indicating that GNU Mach
	is being loaded.  Likewise for the Hurd.
	
	* util/grub.d/10_kfreebsd.in (kfreebsd_entry): Print message indicating
	that kernel of FreeBSD ${version} is being loaded.
	
	* loader/i386/linux.c (grub_cmd_linux): Move debug info to
	grub_dprintf().
	(grub_cmd_initrd): Likewise.
	* util/grub.d/10_linux.in (linux_entry): Print message indicating
	that Linux ${version} is being loaded.  Likewise for initrd.
2010-01-09 22:02:00 +00:00
carles
5ce0a83a15 2010-01-09 Carles Pina i Estany <carles@pina.cat>
* gettext/gettext.c (GRUB_MOD_INIT): Gettextizze.
2010-01-09 20:20:27 +00:00
carles
809bbfebfe 2010-01-08 Carles Pina i Estany <carles@pina.cat>
* loader/efi/appleloader.c: Include `<grub/i18n.h>'.
	(GRUB_MOD_INIT): Gettextizze.
	* loader/efi/chainloader.c: Include `<grub/i18n.h>'.
	(GRUB_MOD_INIT): Gettextizze.
	* loader/i386/efi/linux.c: Include `<grub/i18n.h>'.
	(grub_cmd_linux): Capitalise Linux.
	(GRUB_MOD_INIT): Gettextizze.
	* loader/i386/ieee1275/linux.c: Include `<grub/i18n.h>'.
	(grub_cmd_linux): Capitalise Linux.
	(GRUB_MOD_INIT): Gettextizze.
	* loader/i386/linux.c: Include `<grub/i18n.h>'.
	(grub_cmd_linux): Capitalise Linux.
	(GRUB_MOD_INIT): Gettextizze.
	* loader/i386/pc/chainloader.c: Include `<grub/i18n.h>'.
	(GRUB_MOD_INIT): Gettextizze.
	* loader/i386/pc/linux.c: Include `<grub/i18n.h>'.
	(grub_cmd_linux): Capitalise Linux.
	(GRUB_MOD_INIT): Gettextizze.
	* loader/i386/xnu.c: Include `<grub/i18n.h>'.
	(grub_cpu_xnu_init): Gettextizze.
	* loader/multiboot_loader.c: Include `<grub/i18n.h>'.
	(GRUB_MOD_INIT): Gettextizze.
	* loader/powerpc/ieee1275/linux.c: Include `<grub/i18n.h>'.
	(GRUB_MOD_INIT): Gettextizze.
	* loader/sparc64/ieee1275/linux.c: Include `<grub/i18n.h>'.
	(grub_linux_load64): Capitalise Linux.
	(GRUB_MOD_INIT): Gettextizze.
	* loader/xnu.c: Include `<grub/i18n.h>'.
	(GRUB_MOD_INIT): Gettextizze.
	* po/POTFILES: Add `loader/efi/appleloader.c',
	`loader/efi/chainloader.c', `loader/i386/efi/linux.c',
	`loader/i386/ieee1275/linux.c', `loader/i386/linux.c',
	`loader/i386/pc/chainloader.c', `loader/i386/pc/linux.c',
	`loader/i386/xnu.c', `loader/multiboot_loader.c',
	`loader/powerpc/ieee1275/linux.c', `loader/sparc64/ieee1275/linux.c'
	and `loader/xnu.c'.
2010-01-08 21:35:38 +00:00