Commit graph

318 commits

Author SHA1 Message Date
robertmh
b941342428 2009-02-27 Robert Millan <rmh@aybabtu.com>
Patch from Alexandre Bique <bique.alexandre@gmail.com>
        * util/i386/pc/grub-setup.c (setup): Fix directory path.
2009-02-27 21:01:25 +00:00
bean
6e09b8b72e 2009-02-24 Bean <bean123ch@gmail.com>
* configure.ac: Check for -mcmodel=large in x86_64 target.

	* include/grub/efi/api.h (efi_call_10): New macro.
	(efi_wrap_10): New function.

	* include/grub/efi/pe32.h (GRUB_PE32_REL_BASE_HIGH): New macro.
	(GRUB_PE32_REL_BASED_HIGH): Likewise.
	(GRUB_PE32_REL_BASED_LOW): Likewise.
	(GRUB_PE32_REL_BASED_HIGHLOW): Likewise.
	(GRUB_PE32_REL_BASED_HIGHADJ): Likewise.
	(GRUB_PE32_REL_BASED_MIPS_JMPADDR): Likewise.
	(GRUB_PE32_REL_BASED_SECTION): Likewise.
	(GRUB_PE32_REL_BASED_REL): Likewise.
	(GRUB_PE32_REL_BASED_IA64_IMM64): Likewise.
	(GRUB_PE32_REL_BASED_DIR64): Likewise.
	(GRUB_PE32_REL_BASED_HIGH3ADJ): Likewise.

	* kern/x86_64/dl.c (grub_arch_dl_relocate_symbols): Fixed relocation
	issue.

	* kern/x86_64/efi/callwrap.S (efi_wrap_6): Bug fix.
	(efi_wrap_10): New function.

	* kern/x86_64/efi/startup.S (codestart): Use relative addressing.

	* loader/efi/appleloader.c (devpath_5): Add support for late 2008
	MB/MBP model (NV chipset).
	(devdata_devs): Add devpath_5 to the list.

	* load/i386/efi/linux.c (video_base): Remove variable.
	(RGB_MASK): New macro.
	(RGB_MAGIC): Likewise.
	(LINE_MIN): Likewise.
	(LINE_MAX): Likewise.
	(FBTEST_STEP): Likewise.
	(FBTEST_COUNT): Likewise.
	(fb_list): New variable.
	(grub_find_video_card): Remove function.
	(find_framebuf): New function.
	(grub_linux_setup_video): Use find_framebuf to get frame buffer and
	line length.

	* util/i386/efi/grub-mkimage.c (grub_reloc_section): Fix relocation
	problem for x86_64.
2009-02-24 13:19:46 +00:00
chaac
74b21bee5c 2009-02-22 Vesa Jääskeläinen <chaac@nic.fi>
Patch #25624 by Kevin Lacquement <kevin@lacqui>.

	* util/grub-mkconfig.in: Use ${grub_mkdevicemap} instead of hard
	coding tool name.
2009-02-22 21:55:49 +00:00
robertmh
16ac430e8c 2009-02-11 Robert Millan <rmh@aybabtu.com>
* util/grub.d/00_header.in: Update old reference to `font' command.
2009-02-11 00:36:58 +00:00
robertmh
d64399b562 2009-02-08 Marco Gerards <marco@gnu.org>
* Makefile.in (enable_grub_emu_usb): New variable.
        * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/scsi.c'.
        (grub_emu_SOURCES) [grub_emu_SOURCES]: Add `disk/usbms.c',
        `util/usb.c', `bus/usb/usb.c' and `commands/usbtest.c'.
        (grub_emu_LDFLAGS): Add `$(LIBUSB)'.
        (pkglib_MODULES): Add `usb.mod', `uhci.mod', `ohci.mod',
        `usbtest.mod' and `usbms.mod'.
        (usb_mod_SOURCES, usb_mod_CFLAGS, usb_mod_LDFLAGS)
        (usbtest_mod_SOURCES, usbtest_mod_CFLAGS, usbtest_mod_LDFLAGS)
        (uhci_mod_SOURCES, uhci_mod_CFLAGS, uhci_mod_LDFLAGS,
        (ohci_mod_SOURCES, ohci_mod_CFLAGS, ohci_mod_LDFLAGS)
        (usbms_mod_SOURCES, usbms_mod_CFLAGS, usbms_mod_LDFLAGS): New
        variables.

        * disk/usbms.c: New file.

        * include/grub/usb.h: Likewise.

        * include/grub/usbtrans.h: Likewise.

        * include/grub/usbdesc.h: Likewise.

        * bus/usb/usbtrans.c: Likewise.

        * bus/usb/ohci.c: Likewise.

        * bus/usb/uhci.c: Likewise.

        * bus/usb/usbhub.c: Likewise.

        * bus/usb/usb.c: Likewise.

        * commands/usbtest.c: Likewise.

        * util/usb.c: Likewise.

        * include/grub/err.h (grub_err_t): Add `GRUB_ERR_IO'.

        * configure.ac: Test for libusb presence.

        * util/grub-emu.c (main) [HAVE_LIBUSB_H]: Call `grub_libusb_init'.
2009-02-08 17:58:32 +00:00
robertmh
f821ce593a 2009-02-08 Robert Millan <rmh@aybabtu.com>
* fs/cpio.c: Split tar functionality to ...
        * fs/tar.c: ... here (new file).  Update all users.
2009-02-07 23:38:01 +00:00
fzielcke
3143cc1c5f 2009-02-04 Felix Zielcke <fzielcke@z-51.de>
util/getroot.c (grub_util_get_grub_dev): Add support for /dev/mdNpN and
	/dev/md/NpN style mdraid devices.
2009-02-04 10:52:25 +00:00
fzielcke
9cba6fce00 2009-02-03 Felix Zielcke <fzielcke@z-51.de>
* util/unifont2pff.rb: Remove.
2009-02-03 20:23:33 +00:00
chaac
6a7eab2c13 2009-01-27 Vesa Jääskeläinen <chaac@nic.fi>
* disk/scsi.c (grub_scsi_read): Fix sign problem.

	* term/i386/pc/vga_text.c (grub_vga_text_init_fini). Fix declaration.

	* util/grub-mkfont.c (usage): Fix typo.

	* util/elf/grub-mkimage.c (load_modules): Fix warning.
2009-01-27 18:26:09 +00:00
fzielcke
4fa809981f 2009-01-17 Felix Zielcke <fzielcke@z-51.de>
* Makefile.in: Change font compilation to use new grub-mkfont instead
	of java version.

	* util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: Remove.
	* util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
	* util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
	* util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
	* util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
	* util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
	* util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
	* util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
	* util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
2009-01-17 09:38:38 +00:00
proski
4a412913d1 2009-01-13 Carles Pina i Estany <carles@pina.cat>
* util/grub-editenv.c (main): Use fseeko(), not fseek().
2009-01-14 00:17:12 +00:00
bean
d913988ca9 2009-01-13 Bean <bean123ch@gmail.com>
* util/grub-mkfont.c (write_font): forget to remove some debug code.
2009-01-13 17:03:13 +00:00
bean
e52db1f722 2009-01-13 Bean <bean123ch@gmail.com>
* Makefile.in: (enable_grub_mkfont): New variable.
	(freetype_cflags): Likewise.
	(freetype_libs): Likewise.

	* common.rmk (bin_UTILITIES): Add `grub-mkfont' if requested.
	(grub_mkfont_SOURCES): New variable.
	(grub_mkfont_CFLAGS): Likewise.
	(grub_mkfont_LDFLAGS): Likewise.

	* configure.ac (--enable-grub-mkfont): New option. Check for freetype2
	library if `--enable-grub-mkfont' is requested.
	(enable_grub_mkfont): New variable.
	(freetype_cflags): Likewise.
	(freetype_libs): Likewise.

	* util/grub-mkfont.c: New file.
2009-01-13 16:34:26 +00:00
robertmh
f36cc10867 2009-01-10 Robert Millan <rmh@aybabtu.com>
Update a few copyright years which we forgot to do in 2008 (only for
            files whose changes made in 2008 were copyright-significant)

            * Makefile.in: Add 2008 to Copyright line.
            * disk/ieee1275/ofdisk.c: Likewise.
            * disk/efi/efidisk.c: Likewise.
            * kern/dl.c: Likewise.
            * kern/sparc64/ieee1275/init.c: Likewise.
            * kern/mm.c: Likewise.
            * kern/efi/mm.c: Likewise.
            * boot/i386/pc/boot.S: Likewise.
            * genfslist.sh: Likewise.
            * fs/iso9660.c: Likewise.
            * fs/hfs.c: Likewise.
            * fs/jfs.c: Likewise.
            * fs/minix.c: Likewise.
            * fs/ufs.c: Likewise.
            * gensymlist.sh.in: Likewise.
            * genkernsyms.sh.in: Likewise.
            * include/grub/misc.h: Likewise.
            * include/grub/types.h: Likewise.
            * include/grub/symbol.h: Likewise.
            * include/grub/elf.h: Likewise.
            * include/grub/kernel.h: Likewise.
            * include/grub/disk.h: Likewise.
            * include/grub/dl.h: Likewise.
            * include/grub/i386/linux.h: Likewise.
            * include/grub/i386/pc/biosdisk.h: Likewise.
            * include/grub/efi/api.h: Likewise.
            * include/grub/efi/pe32.h: Likewise.
            * include/grub/util/misc.h: Likewise.
            * normal/execute.c: Likewise.
            * normal/arg.c: Likewise.
            * normal/completion.c: Likewise.
            * normal/lexer.c: Likewise.
            * normal/parser.y: Likewise.
            * normal/misc.c: Likewise.
            * commands/i386/pc/vbeinfo.c: Likewise.
            * commands/hexdump.c: Likewise.
            * commands/terminal.c: Likewise.
            * commands/ls.c: Likewise.
            * commands/help.c: Likewise.
            * partmap/pc.c: Likewise.
            * loader/efi/chainloader.c: Likewise.
            * loader/multiboot_loader.c: Likewise.
            * loader/i386/pc/multiboot2.c: Likewise.
            * term/efi/console.c: Likewise.
            * term/i386/pc/serial.c: Likewise.
            * util/lvm.c: Likewise.
            * util/console.c: Likewise.
            * util/i386/efi/grub-mkimage.c: Likewise.
            * util/raid.c: Likewise.
2009-01-10 13:07:44 +00:00
chaac
1e901a7573 2009-01-02 Colin D Bennett <colin@gibibit.com>
New font engine.
	
	Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to
	build system and fixed gfxterm.c to work with different	sized fonts.

	* configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF.
	
	* configure: Re-generated.
	
	* DISTLIST: Removed font/manager.c.
	Added font/font.c.
	Added font/font_cmd.c.
	
	* Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF.  Added Font tool
	compilation.
	
	* include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype.  Changed users.
	
	* kern/misc.c (grub_utf8_to_ucs4): Changed prototype. 

	* kern/term.c: Changed users of grub_utf8_to_ucs4.
	
	* normal/menu.c: Likewise.
		
	* conf/common.rmk (font_mod_SOURCES): Removed font/manager.c.
	(font_mod_SOURCES): Added font/font_cmd.c, font/font.c.
	
	* include/grub/font.h: Replaced with new file.
	
	* include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value.
	(GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise.
	(GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise.
	(GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added.
	(grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED.
	(grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha, 
	fg_red, fg_green, fg_blue, fg_alpha.
	(grub_video_adapter): Removed blit_glyph.
	(grub_video_blit_glyph): Removed.	
	
	* font/manager.c: Removed file.
	
	* font/font.c: New file. 
	
	* font/font_cmd.c: Likewise.
	
	* video/video.c (grub_video_blit_glyph): Removed.
	
	* video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support.
	(grub_video_vbe_map_rgba): Likewise.
	(grub_video_vbe_unmap_color_int): Likewise.
	(grub_video_vbe_blit_glyph): Removed.
	(grub_video_vbe_adapter): Removed blit_glyph.
	
	* video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support.
	(get_pixel): Likewise.
	(set_pixel): Likewise. 
	
	* commands/videotest.c (grub_cmd_videotest): Added more tests for fonts.
	
	* term/gfxterm.c: Adapted to new font engine.
	
	* term/i386/pc/vesafb.c: Marked as deprecated.  Made it compile.
	
	* term/i386/pc/vga.c: Likewise.
	
	* util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file.
	
	* util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
	
	* util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
	
	* util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
	
	* util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
	
	* util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
	
	* util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
	
	* util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
	
	* util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.

	* util/grub.d/00_header.in: Changed to use new loadfont command.
	
	* util/grub-mkconfig_lib.in: Changed font extension.
2009-01-02 15:26:06 +00:00
fzielcke
278922e80b 2008-12-28 Felix Zielcke <fzielcke@z-51.de>
* util/getroot.c (grub_util_get_grub_dev): Add support for
	/dev/md/dNNpNN style partitionable mdraid devices.
2008-12-28 16:20:30 +00:00
robertmh
15257703eb Provide grub-install on coreboot.
* conf/i386-coreboot.rmk (sbin_SCRIPTS): Add `grub-install'.
        (grub_install_SOURCES): New variable.
        * util/i386/pc/grub-install.in: Add a few condition checks to make it
        usable on coreboot.
2008-11-28 20:06:55 +00:00
fzielcke
9fc5388a5d 2008-11-25 Felix Zielcke <fzielcke@z-51.de>
* util/grub-fstest.c (grub_term_get_current_input): Change return type
	to `grub_term_input_t'.
	(grub_term_get_current_output): Change return type to
	`grub_term_output_t'.
2008-11-25 16:40:17 +00:00
robertmh
73e8e268b7 * util/grub-mkconfig_lib.in (grub_warn): New function.
(convert_system_path_to_grub_path): Use grub_warn() when issuing
        warnings, to obtain consistent formatting.
        * util/grub.d/00_header.in: Likewise.
        * util/update-grub_lib.in: Likewise.
2008-11-20 19:22:20 +00:00
robertmh
6c529df74c 2008-11-10 Robert Millan <rmh@aybabtu.com>
* util/grub.d/00_header.in: Add backward compatibility check for
        versions of terminal.mod that don't understand `terminal_input' or
        `terminal_output'.
2008-11-10 08:49:26 +00:00
robertmh
0025933a5e 2008-11-08 Robert Millan <rmh@aybabtu.com>
* term/i386/pc/vesafb.c (grub_vesafb_term): Change type to
        `struct  grub_term_output'.  Remove `.checkkey' and `.getkey'
        members.  Update all users.
        * util/console.c (grub_ncurses_term): Split in ...
        (grub_ncurses_term_input): ... this, and ...
        (grub_ncurses_term_output): ... this.  Update all users.
2008-11-08 12:17:51 +00:00
proski
b6c15a2d2a 2008-11-07 Pavel Roskin <proski@gnu.org>
* util/grub.d/00_header.in: Remove incorrect space before
	"serial".
2008-11-07 22:30:24 +00:00
robertmh
651c29b79e 2008-11-07 Robert Millan <rmh@aybabtu.com>
Modularize at_keyboard.mod:

            * conf/i386.rmk (pkglib_MODULES): Add `at_keyboard.mod'.
            (at_keyboard_mod_SOURCES, at_keyboard_mod_CFLAGS)
            (at_keyboard_mod_LDFLAGS): New variables.

            Actual terminal split:

            * include/grub/term.h (struct grub_term): Split in ...
            (struct grub_term_input): ... this, and ...
            (struct grub_term_output): ... this.  Update all users.
            (grub_term_set_current): Split in ...
            (grub_term_set_current_input): ... this, and ...
            (grub_term_set_current_output): ... this.
            (grub_term_get_current): Split in ...
            (grub_term_get_current_input): ... this, and ...
            (grub_term_get_current_output): ... this.
            (grub_term_register): Split in ...
            (grub_term_register_input): ... this, and ...
            (grub_term_register_output): ... this.
            (grub_term_unregister): Split in ...
            (grub_term_unregister_input): ... this, and ...
            (grub_term_unregister_output): ... this.
            (grub_term_iterate): Split in ...
            (grub_term_iterate_input): ... this, and ...
            (grub_term_iterate_output): ... this.

            * kern/term.c (grub_term_list): Split in ...
            (grub_term_list_input): ... this, and ...
            (grub_term_list_output): ... this.  Update all users.
            (grub_cur_term): Split in ...
            (grub_cur_term_input): ... this, and ...
            (grub_cur_term_output): ... this.  Update all users.
            (grub_term_set_current): Split in ...
            (grub_term_set_current_input): ... this, and ...
            (grub_term_set_current_output): ... this.
            (grub_term_get_current): Split in ...
            (grub_term_get_current_input): ... this, and ...
            (grub_term_get_current_output): ... this.
            (grub_term_register): Split in ...
            (grub_term_register_input): ... this, and ...
            (grub_term_register_output): ... this.
            (grub_term_unregister): Split in ...
            (grub_term_unregister_input): ... this, and ...
            (grub_term_unregister_output): ... this.
            (grub_term_iterate): Split in ...
            (grub_term_iterate_input): ... this, and ...
            (grub_term_iterate_output): ... this.

            * kern/misc.c (grub_abort): Split use of grub_term_get_current() into
            a check for input and one for output (and only attempt to get keys
            from user when input works).

            * util/grub-probe.c (grub_term_get_current): Split in ...
            (grub_term_get_current_input): ... this, and ...
            (grub_term_get_current_output): ... this.
            * util/grub-fstest.c: Likewise.
            * util/i386/pc/grub-setup.c: Likewise.
            * util/grub-editenv.c: Likewise.

            Portability adjustments:

            * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Remove
            `term/i386/pc/at_keyboard.c'.
            * kern/ieee1275/init.c [__i386__] (grub_machine_init): Remove call to
            grub_keyboard_controller_init() (now handled by terminal .init).
            * kern/i386/coreboot/init.c (grub_machine_init): Add call to
            grub_at_keyboard_init().
            * include/grub/i386/ieee1275/console.h (grub_keyboard_controller_init)
            (grub_console_checkkey, grub_console_getkey): Remove (now provided by
            at_keyboard.mod via input terminal interface).
            * include/grub/i386/coreboot/console.h: Convert into a stub for
            `<grub/i386/pc/console.h>'.

            Migrate full terminals to new API:

            * term/efi/console.c (grub_console_term): Split into ...
            (grub_console_term_input): ... this, and ...
            (grub_console_term_output): ... this.  Update all users.
            * term/ieee1275/ofconsole.c: Remove __i386__ hack.
            (grub_ofconsole_init): Split into ...
            (grub_ofconsole_init_input): ... this, and ...
            (grub_ofconsole_init_output): ... this.
            (grub_ofconsole_term): Split into ...
            (grub_ofconsole_term_input): ... this, and ...
            (grub_ofconsole_term_output): ... this.  Update all users.
            * term/i386/pc/serial.c (grub_serial_term): Split into ...
            (grub_serial_term_input): ... this, and ...
            (grub_serial_term_output): ... this.  Update all users.
            * term/i386/pc/console.c (grub_console_term): Split into ...
            (grub_console_term_input): ... this, and ...
            (grub_console_term_output): ... this.  Update all users.
            (grub_console_term_input): Only enable it on PC/BIOS platform.
            (grub_console_init): Remove grub_keyboard_controller_init() call.

            Migrate input terminals to new API:

            * term/i386/pc/at_keyboard.c: Replace `cpu' and `machine' with
            `i386' and `i386/pc' to enable build on x86_64 (this driver is
            i386-specific anyway).
            (grub_console_checkkey): Rename to ...
            (grub_at_keyboard_checkkey): ... this.  Static-ize.  Update all
            users.
            (grub_keyboard_controller_orig): New variable.
            (grub_console_getkey): Rename to ...
            (grub_at_keyboard_getkey): ... this.  Static-ize.  Update all
            users.
            (grub_keyboard_controller_init): Static-ize.  Save original
            controller value so that it can be restored ...
            (grub_keyboard_controller_fini): ... here (new function).
            (grub_at_keyboard_term): New structure.
            (GRUB_MOD_INIT(at_keyboard), GRUB_MOD_FINI(at_keyboard)): New
            functions.

            Migrate output terminals to new API:

            * term/i386/pc/vga.c (grub_vga_term): Change type to
            `struct  grub_term_output'.  Remove `.checkkey' and `.getkey'
            members.  Update all users.
            * term/gfxterm.c (grub_video_term): Change type to
            `struct  grub_term_output'.  Remove `.checkkey' and `.getkey'
            members.  Update all users.
            * include/grub/i386/pc/console.h (grub_console_checkkey)
            (grub_console_getkey): Do not export (no longer needed by gfxterm,
            etc).

            Migrate `terminal' command and userland tools to new API:

            * commands/terminal.c (grub_cmd_terminal): Split into ...
            (grub_cmd_terminal_input): ... this, and ...
            (grub_cmd_terminal_output): ... this.
            (GRUB_MOD_INIT(terminal)): Split `terminal' command in two commands:
            `terminal_input' and `terminal_output'.
            * util/grub.d/00_header.in: Adjust `terminal' calls to new
            `terminal_input' / `terminal_output' API.
            * util/grub-mkconfig.in: Export ${GRUB_TERMINAL_INPUT} and
            ${GRUB_TERMINAL_OUTPUT} instead of ${GRUB_TERMINAL} (and if user
            provided ${GRUB_TERMINAL}, convert it).
2008-11-07 19:11:39 +00:00
robertmh
96e5d876a4 2008-11-04 Robert Millan <rmh@aybabtu.com>
* util/grub.d/10_freebsd.in: New file.  Generate grub configuration
        for FreeBSD.
        * conf/common.rmk (grub-mkconfig_SCRIPTS): Add 10_freebsd.
2008-11-04 15:20:35 +00:00
robertmh
7ab28c2157 2008-10-29 Robert Millan <rmh@aybabtu.com>
* util/i386/pc/grub-install.in: Handle empty string as output from
        make_system_path_relative_to_its_root().
2008-10-29 19:14:12 +00:00
fzielcke
c9618ab2fa 2008-10-03 Felix Zielcke <fzielcke@z-51.de>
* util/i386/pc: Source grub-mkconfig_lib instead of update-grub_lib.
2008-10-03 18:05:21 +00:00
fzielcke
bf981c620b 2008-10-03 Felix Zielcke <fzielcke@z-51.de>
* util/update-grub_lib.in: Mention filename in warning message.
2008-10-03 07:22:45 +00:00
fzielcke
18ade780ed 2008-09-29 Felix Zielcke <fzielcke@z-51.de>
* util/update-grub_lib.in: Copy to ...
	* util/grub-mkconfig_lib.in: ... this.  Update all users.
	* util/update-grub_lib.in: Make it a stub to `grub-mkconfigig_lib.in'.
	* util/update-grub.in: Rename to ...
	* util/grub-mkconfig.in: ... this.  Update all users.  Remove `-y'
	option. Add `--output' option to allow users to specify the generated
	configuration file.  Default to stdout.
	(update_grub_dir): Rename to ...
	(grub_mkconfig_dir): ... this.
	(grub_cfg): Default to an empty string.
	* conf/common.rmk (update-grub): Rename to ...
	(grub-mkconfig): ... this.
	(update-grub_lib): Copy to ...
	(grub-mkconfig_lib): ... this.
	(update-grub_SCRIPTS): Copy to ...
	(grub-mkconfig_SCRIPTS): ... this. Update all users.
	(update-grub_DATA): Rename to ...
	(grub-mkconfig_DATA): ... this.
2008-09-29 14:57:05 +00:00
robertmh
add6f17a17 2008-09-25 Robert Millan <rmh@aybabtu.com>
* util/grub-mkdevicemap.c (make_device_map): Actually replace all
        instances of grub_util_get_disk_name() (see previous commit).
2008-09-25 14:40:59 +00:00
robertmh
0e981d36bb Forgot to remove files / run autogen.sh 2008-09-25 14:17:43 +00:00
robertmh
d2a367b86f 2008-09-25 Robert Millan <rmh@aybabtu.com>
* conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Remove
        `util/i386/get_disk_name.c'.
        * conf/i386-efi.rmk: Likewise.
        * conf/x86_64-efi.rmk: Likewise.
        * conf/i386-coreboot.rmk: Likewise.
        * conf/i386-ieee1275.rmk: Likewise.
        * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Remove
        `util/ieee1275/get_disk_name.c'.
        * include/grub/util/misc.h (grub_util_get_disk_name): Remove.
        * util/ieee1275/get_disk_name.c: Remove file.
        * util/i386/get_disk_name.c: Remove file.
        * util/grub-mkdevicemap.c (make_device_map): Back to hardcoding
        "hd%d" for device.map entries, rather than using
        grub_util_get_disk_name().
2008-09-25 14:15:24 +00:00
fzielcke
7fd75377be 2008-09-09 Felix Zielcke <fzielcke@z-51.de>
* util/hostdisk.c: Change #include <grub/util/biosdisk.h> to
        #include <grub/util/hostdisk.h>.
2008-09-09 07:28:17 +00:00
robertmh
40da438f10 2008-09-08 Robert Millan <rmh@aybabtu.com>
* util/hostdisk.c (open_device): Replace a grub_util_info() call
        with grub_dprintf("hostdisk", ...), as it was so verbose that it
        clobbered useful information.
2008-09-08 14:00:29 +00:00
robertmh
ddbf5556a7 2008-09-08 Robert Millan <rmh@aybabtu.com>
* include/grub/util/biosdisk.h: Move to ...
        * include/grub/util/hostdisk.h: ... here.  Update all users.
        * util/biosdisk.c: Move to ...
        * util/hostdisk.c: ... here.  Update all users.
2008-09-08 13:52:30 +00:00
fzielcke
4ee5592137 2008-09-04 Felix Zielcke <fzielcke@z-51.de>
* util/getroot.c: Include <config.h>.
        (grub_util_get_grub_dev): Rewrite to use asprintf for mdraid devices,
        add support for /dev/md/N devices and handle LVM double dash escaping.
2008-09-04 19:54:59 +00:00
robertmh
64d2d53c6b 2008-08-31 Colin D Bennett <colin@gibibit.com>
* util/i386/pc/grub-mkrescue.in: Support multiple overlay directories.
2008-08-31 16:28:32 +00:00
proski
7c5d8d950c 2008-08-30 Pavel Roskin <proski@gnu.org>
* util/genmoddep.c: Remove for real this time.
	* DISTLIST: Remove util/genmoddep.c.
2008-08-31 02:19:17 +00:00
bean
6e5a42fe9a 2008-08-29 Bean <bean123ch@gmail.com>
* configure.ac: Change host_os to cygwin for mingw.
	(asprintf): New check for function.

	* include/grub/symbol.h: Replace #ifndef __CYGWIN__ with
	#if ! defined (__CYGWIN__) && ! defined (__MINGW32__).

	* include/grub/util/misc.h: #include <config.h> and <grub/types.h>,
	declear asprintf if HAVE_ASPRINTF is not set, declear fseeko, ftello,
	sync, sleep and grub_util_get_disk_size for mingw.

	* util/biosdisk.c (grub_util_biosdisk_open): Use grub_util_get_disk_size
	to get size in mingw.
	(open_device): Use flag O_BINARY if it's defined.
	(find_root_device): Add dummy code for mingw.

	* util/grub-mkdevicemap.c (get_floppy_disk_name): Return 0 for mingw.
	(get_ide_disk_name): Return //./PHYSICALDRIVE%d for mingw.
	(get_scsi_disk_name): Return 0 for mingw.

	* util/hostfs.c: #include <grub/util/misc.h>.
	(grub_hostfs_open): Use "rb" flag to open file, use
	grub_util_get_disk_size to get disk size for mingw.

	* util/misc.c: #include <windows.h> and <winioctl.h> in mingw.
	(asprintf): New function if HAVE_ASPRINTF is not set.
	(sync): New function for mingw.
	(sleep): Likewise.
	(grub_util_get_disk_size): Likewise.
2008-08-29 19:55:23 +00:00
robertmh
1c282483bf 2008-08-28 Robert Millan <rmh@aybabtu.com>
* util/biosdisk.c (find_grub_drive): Declare missing `i' variable.
2008-08-28 19:08:21 +00:00
robertmh
678e849cd3 2008-08-28 Robert Millan <rmh@aybabtu.com>
Change find_grub_drive() syntax so it doesn't prevent it from
        detecting NULL names as errors.

        * util/biosdisk.c (find_grub_drive): Move free slot search code
        from here ...
        (find_free_slot): ... to here.
        (read_device_map): Use find_free_slot() to search for free slots.
2008-08-28 14:36:18 +00:00
robertmh
c07ae501cb 2008-08-26 Robert Millan <rmh@aybabtu.com>
* util/biosdisk.c (grub_util_biosdisk_open, open_device)
        (grub_util_biosdisk_get_grub_dev): Make error messages a bit more
        descriptive.
2008-08-26 19:09:07 +00:00
bean
5ed20adcb9 2008-08-23 Bean <bean123ch@gmail.com>
* conf/common.rmk (grub_probe_SOURCES): Add disk/mdraid_linux.c.
	(grub_fstest_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
	disk/mdraid_linux.c and disk/dmraid_nvidia.c and lib/crc.c.
	(pkglib_MODULES): Add raid5rec.mod, raid6rec.mod, mdraid.mod and
	dm_nv.mod.
	(raid5rec_mod_SOURCES): New macro.
	(raid5rec_mod_CFLAGS): Likewise.
	(raid5rec_mod_LDFLAGS): Likewise.
	(raid6rec_mod_SOURCES): Likewise.
	(raid6rec_mod_CFLAGS): Likewise.
	(raid6rec_mod_LDFLAGS): Likewise.
	(mdraid_mod_SOURCES): Likewise.
	(mdraid_mod_CFLAGS): Likewise.
	(mdraid_mod_LDFLAGS): Likewise.
	(dm_nv_mod_SOURCES): Likewise.
	(dm_nv_mod_CFLAGS): Likewise.
	(dm_nv_mod_LDFLAGS): Likewise.

	* conf/i386-pc.rmk (grub_setup_SOURCES): Add disk/mdraid_linux.c.
	(grub_emu_SOURCES):  Add disk/raid5_recover.c, disk/raid6_recover.c,
	disk/mdraid_linux.c and disk/dmraid_nvidia.c.

	* conf/i386-coreboot.rmk (grub_emu_SOURCES): Add disk/raid5_recover.c,
	disk/raid6_recover.c, disk/mdraid_linux.c and disk/dmraid_nvidia.c.

	* conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.

	* conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.

	* conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.

	* conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.

	* disk/raid5_recover.c: New file.

	* disk/raid6_recover.c: Likewise.

	* disk/mdraid_linux.c: Likewise.

	* disk/dmraid_nvidia.c: Likewise.

	* disk/i386/pc/biosdisk.c: Set total_sectors of cdrom device to
	ULONG_MAX.

	* disk/raid.c (grub_raid_open): Use the size of the smallest disk to
	calculate the size of raid device.
	(grub_raid_read): Simplify raid0 code. Support raid4, raid6 and four
	different layout of raid5.
	(grub_raid_scan_device): Remove code specific to mdraid.
	(grub_raid_list): New variable.
	(free_array): New function.
	(grub_raid_register): Likewise.
	(grub_raid_unregister): Likewise.
	(grub_raid_rescan): Likewise.
	(GRUB_MOD_INIT): Don't iterate device here.
	(GRUB_MOD_FINI): Use free_array to release resource.

	* include/grub/raid.h: Remove macro and structure specific to mdraid.
	(grub_raid5_recover_func_t): New function variable type.
	(grub_raid6_recover_func_t): Likewise.
	(grub_raid5_recover_func): New variable.
	(grub_raid6_recover_func): Likewise.
	(grub_raid_register): New function.
	(grub_raid_unregister): Likewise.
	(grub_raid_rescan): Likewise.
	(grub_raid_block_xor): Likewise.

	* util/grub-fstest.c: Add #include <grub/raid.h> and <grub/lib/crc.h>.
	(CMD_CRC): New macro.
	(part): Removed.
	(read_file): Handle device as well as file.
	(cmd_crc): New function.
	(fstest): Handle multiple disks.
	(options): Remove part, raw and long, add root and diskcount.
	(usage): Add crc, remove -p, -r, -l, add -r and -c.
	(main): Find the first non option entry and ignore subsequence options,
	add handling for the new options, support multiple disks.

	* util/grub-probe.c (probe): Add mdraid to abstraction_name.
2008-08-23 14:51:19 +00:00
robertmh
8415f2617c 2008-08-23 Robert Millan <rmh@aybabtu.com>
* util/getroot.c (find_root_device): Skip anything that starts with
        a dot, not just directories.  This avoids things like /dev/.tmp.md0.
2008-08-23 12:19:43 +00:00
fzielcke
d5a7dc5b74 2008-08-22 Felix Zielcke <fzielcke@z-51.de>
* util/update-grub.in (GRUB_GFXMODE): Export variable.
	* util/grub.d/00_header.in: Allow the administrator to change default
	gfxmode via ${GRUB_GFXMODE}.
2008-08-22 12:58:46 +00:00
robertmh
eba0ce9f97 2008-08-14 Robert Millan <rmh@aybabtu.com>
* conf/common.rmk (bin_UTILITIES): Add `grub-mkelfimage'.
        (grub_mkelfimage_SOURCES): New variable.
        (util/elf/grub-mkimage.c_DEPENDENCIES): Likewise.

        * conf/i386-coreboot.rmk (bin_UTILITIES, grub_mkimage_SOURCES)
        (grub_mkimage_LDFLAGS, util/elf/grub-mkimage.c_DEPENDENCIES): Remove.
        * conf/powerpc-ieee1275.rmk: Likewise.
        * conf/i386-ieee1275.rmk: Likewise.

        * kern/ieee1275/init.c: Include `<grub/cpu/kernel.h>'.
        * kern/i386/coreboot/init.c: Likewise.

        * kern/i386/ieee1275/startup.S: Replace `<grub/machine/kernel.h>'
        with `<grub/cpu/kernel.h>'.
        (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Renamed
        to ...
        (GRUB_KERNEL_CPU_PREFIX, GRUB_KERNEL_CPU_DATA_END): ... this.
        * kern/i386/coreboot/startup.S: Likewise.

        * include/grub/powerpc/ieee1275/kernel.h (GRUB_MOD_ALIGN)
        (GRUB_MOD_GAP): Remove.
        * include/grub/powerpc/kernel.h: New file.
        * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX)
        (GRUB_KERNEL_MACHINE_DATA_END): Remove.
        * include/grub/i386/kernel.h: New file.
        * include/grub/i386/coreboot/kernel.h (GRUB_MOD_ALIGN)
        (GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_PREFIX)
        (GRUB_KERNEL_MACHINE_DATA_END): Remove.

        * util/ieee1275/grub-install.in (grub_mkimage): Initialize to use
        `grub-mkelfimage'.
        Use --directory when invoking grub_mkimage.

        * util/elf/grub-mkimage.c: Include `<grub/cpu/kernel.h>'.
        (add_segments): Replace GRUB_KERNEL_MACHINE_DATA_END and
        GRUB_KERNEL_MACHINE_PREFIX with GRUB_KERNEL_CPU_DATA_END
        and GRUB_KERNEL_CPU_PREFIX.
2008-08-14 18:59:33 +00:00
fzielcke
b86408f869 2008-08-14 Felix Zielcke <fzielcke@z-51.de>
* include/grub/err.h (grub_err_printf): New function prototype.
        * util/misc.c (grub_err_printf): New function.
        * kern/misc.c [! GRUB_UTIL] (grub_err_printf): New alias for
        grub_printf.
        * kern/err.c (grub_print_error): Use grub_err_printf.
2008-08-14 18:46:47 +00:00
robertmh
042bd419da 2008-08-08 Robert Millan <rmh@aybabtu.com>
* kern/disk.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
        (grub_last_time): Change type to grub_uint64_t.
        (grub_disk_open): Migrate code from to using grub_get_time_ms().
        (grub_disk_close): Likewise.

        * normal/menu.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
        (run_menu): Migrate code from to using grub_get_time_ms().

        * util/misc.c (grub_get_time_ms): New function.
2008-08-07 23:48:13 +00:00
chrfranke
1cbb58ac62 2008-08-06 Christian Franke <franke@computer.org>
* conf/common.rmk: Build and install `10_windows'.
	* util/grub.d/10_windows.in: New script.
2008-08-06 18:45:51 +00:00
bean
6977d49f98 2008-08-05 Bean <bean123ch@gmail.com>
* util/console.c (grub_console_cur_color): New variable.
	(grub_console_standard_color): Likewise.
	(grub_console_normal_color): Likewise.
	(grub_console_highlight_color): Likewise.
	(color_map): Likewise.
	(use_color): Likewise.
	(NUM_COLORS): New macro.
	(grub_ncurses_setcolorstate): Handle color properly.
	(grub_ncurses_setcolor): Don't change color here, just remember the
	settings, color will be set in grub_ncurses_setcolorstate.
	(grub_ncurses_getcolor): New function.
	(grub_ncurses_init): Initialize color pairs.
	(grub_ncurses_term): New member grub_ncurses_getcolor.
2008-08-05 14:20:00 +00:00
robertmh
52768e37c2 2008-08-03 Robert Millan <rmh@aybabtu.com>
* util/grub.d/00_header.in: Be platform-agnostic.  Probe for existence
        of modules instead of assuming which platform provides what.
        * util/update-grub.in: Likewise.
2008-08-03 16:38:40 +00:00