Commit graph

250 commits

Author SHA1 Message Date
Robert Millan
d94000ed13 Merge from trunk 2009-12-25 22:29:47 +00:00
Robert Millan
d0e158c2f3 2009-12-24 Robert Millan <rmh.grub@aybabtu.com>
* util/grub-install.in (host_os): New variable.
	* util/i386/efi/grub-install.in (host_os): Likewise.
2009-12-24 22:23:22 +00:00
Felix Zielcke
a2c1332b70 2009-12-23 Felix Zielcke <fzielcke@z-51.de>
* commands/i386/pc/drivemap.c: Remove all trailing whitespace.
	* commands/lspci.c: Likewise.
	* commands/probe.c: Likewise.
	* commands/xnu_uuid.c: Likewise.
	* conf/i386-coreboot.rmk: Likewise.
	* conf/i386-efi.rmk: Likewise.
	* conf/i386-ieee1275.rmk: Likewise.
	* conf/i386-pc.rmk: Likewise.
	* conf/powerpc-ieee1275.rmk: Likewise.
	* conf/sparc64-ieee1275.rmk: Likewise.
	* conf/x86_64-efi.rmk: Likewise.
	* fs/i386/pc/pxe.c: Likewise.
	* gettext/gettext.c: Likewise.
	* include/grub/efi/graphics_output.h: Likewise.
	* include/grub/i386/pc/memory.h: Likewise.
	* kern/env.c: Likewise.
	* kern/i386/qemu/startup.S: Likewise.
	* lib/i386/pc/biosnum.c: Likewise.
	* lib/i386/relocator.c: Likewise.
	* lib/i386/relocator_asm.S: Likewise.
	* lib/relocator.c: Likewise.
	* loader/i386/bsd.c: Likewise.
	* loader/i386/multiboot.c: Likewise.
	* loader/i386/pc/chainloader.c: Likewise.
	* loader/i386/xnu.c: Likewise.
	* loader/xnu.c: Likewise.
	* normal/main.c: Likewise.
	* normal/menu_text.c: Likewise.
	* util/getroot.c: Likewise.
	* util/grub-mkconfig_lib.in: Likewise.
	* util/grub.d/00_header.in: Likewise.
	* util/i386/pc/grub-mkimage.c: Likewise.
	* util/mkisofs/eltorito.c: Likewise.
	* util/mkisofs/exclude.h: Likewise.
	* util/mkisofs/hash.c: Likewise.
	* util/mkisofs/iso9660.h: Likewise.
	* util/mkisofs/joliet.c: Likewise.
	* util/mkisofs/mkisofs.c: Likewise.
	* util/mkisofs/mkisofs.h: Likewise.
	* util/mkisofs/multi.c: Likewise.
	* util/mkisofs/name.c: Likewise.
	* util/mkisofs/rock.c: Likewise.
	* util/mkisofs/tree.c: Likewise.
	* util/mkisofs/write.c: Likewise.
	* video/efi_gop.c: Likewise.
2009-12-23 17:41:32 +01:00
Vladimir 'phcoder' Serbinenko
de15bf8e7f 2009-12-20 Vladimir Serbinenko <phcoder@gmail.com>
* util/i386/pc/grub-setup.c (setup): Don't install on non-GPT,
	non-MSDOS paritions.
2009-12-20 21:08:03 +01:00
Vladimir 'phcoder' Serbinenko
68693c0743 Reimpliment grub-dumpdevtree 2009-12-18 04:57:29 +01:00
Vladimir 'phcoder' Serbinenko
7ea73643f5 merge mtrunk into xnu 2009-12-18 03:57:32 +01:00
Colin Watson
e8b2988803 merge from trunk 2009-12-08 00:55:17 +00:00
Vladimir 'phcoder' Serbinenko
df2e3593f3 merge mainline into mips 2009-12-05 18:37:15 +01:00
Vladimir 'phcoder' Serbinenko
c8dea671ff 2009-12-02 Vladimir Serbinenko <phcoder@gmail.com>
Rename kernel.mod to kernel.img.

	* conf/i386-efi.rmk (pkglib_MODULES): Change kernel.mod to kernel.img.
	(kernel_mod_EXPORTS): Rename to ...
	(kernel_img_EXPORTS): ... this.
	(kernel_mod_SOURCES): Rename to ...
	(kernel_img_SOURCES): ... this.
	(kernel_mod_HEADERS): Rename to ...
	(kernel_img_HEADERS): ... this. All users updated.
	(kernel_mod_CFLAGS): Rename to ...
	(kernel_img_CFLAGS): ... this.
	(kernel_mod_ASFLAGS): Rename to ...
	(kernel_img_ASFLAGS): ... this.
	(kernel_mod_LDFLAGS): Rename to ...
	(kernel_img_LDFLAGS): ... this.
	* conf/x86_64-efi.rmk: Likewise.
	* util/i386/efi/grub-mkimage.c (read_kernel_module): Rename to ...
	(read_kernel_image): ... this. All users updated.
	(read_kernel_image): Read "kernel.img" instead of "kernel.mod".
2009-12-02 17:13:45 +01:00
Vladimir 'phcoder' Serbinenko
4f41a23d4e merge mainline into mips 2009-12-02 09:51:36 +01:00
Felix Zielcke
242668a26a 2009-11-26 Felix Zielcke <fzielcke@z-51.de>
* util/i386/efi/grub-mkimage.c: Include "progname.h".
	(main): Use `program_name' instead of nonexistent `progname'.
2009-11-26 17:15:16 +01:00
Vladimir 'phcoder' Serbinenko
bde358ac91 merged with mainline 2009-11-25 23:17:32 +01:00
Felix Zielcke
4501250b6c 2009-11-24 Felix Zielcke <fzielcke@z-51.de>
* util/grub-mkrelpath.c: New file.
	* conf/common.rmk (bin_UTILITIES): Add grub-mkrelpath.
	(grub_mkrelpath_SOURCES): New variable.
	* include/grub/util/misc.h: New function prototype.
	* util/misc.c (make_system_path_relative_to_its_root): New function.

	* util/grub-mkconfig_lib.in (bindir): New variable.
	(grub_mkrelpath): Likewise.
	(make_system_path_relative_to_its_root): Use grub-mkrelpath.

	* util/probe.c (probe): Make the file path relative to its root.
	Change a info message to use the GRUB path.  Enable again the
	check if we can read the file with GRUB facilities.

	* util/i386/pc/grub-setup.c (setup): Make core.img path relative
	to its root.
2009-11-24 15:00:25 +01:00
Vladimir 'phcoder' Serbinenko
d00e2a0b4c Merge mainstream into mips 2009-11-23 11:07:31 +01:00
Robert Millan
87d58298fd 2009-11-22 Robert Millan <rmh.grub@aybabtu.com>
* util/i386/pc/grub-mkimage.c: Ungettextize grub_util_info() strings.
        * util/i386/pc/grub-setup.c: Likewise.
2009-11-22 10:20:14 +00:00
Vladimir 'phcoder' Serbinenko
5afcd00788 merge mainstream into mips 2009-11-21 21:45:32 +01:00
Colin Watson
242f0731c7 reimported savedefault by cjwatson and myself
Also-By: Vladimir 'phcoder' Serbinenko <phcoder@gmail.com>
2009-11-20 09:41:20 +01:00
Robert Millan
f577f7a09d 2009-11-19 Robert Millan <rmh.grub@aybabtu.com>
* conf/i386-pc.rmk (grub_setup_SOURCES): Add `gnulib/progname.c'.
        * util/i386/pc/grub-setup.c: Include `<grub/i18n.h>'.
        Include `"progname.h"'.
        (main): Initialize gettext.
        * util/i386/pc/grub-setup.c: Gettexttize.
        * util/i386/pc/grub-mkimage.c: Likewise.

        * Makefile.in (po/*.po): Redefine as ...
        ($(foreach lang, $(LINGUAS), po/$(lang).po)): ... this.

        * po/POTFILES: Add `util/i386/pc/grub-setup.c'.
2009-11-18 23:20:22 +00:00
Robert Millan
336262f829 2009-11-17 Robert Millan <rmh.grub@aybabtu.com>
* configure.ac: Call AM_GNU_GETTEXT() (defines localedir, among
        other things).
        * Makefile.in (CPPFLAGS): Add `-DLOCALEDIR=\"$(localedir)\"'.
        * util/i386/pc/grub-mkimage.c (main): Issue setlocale() and
        bindtextdomain() calls for gettext initialization.
2009-11-17 10:47:22 +00:00
Robert Millan
548643e528 * gnulib/progname.c: New file (imported from Gnulib).
* gnulib/progname.h: Likewise.
        * conf/i386-pc.rmk (grub_mkimage_SOURCES): Add `gnulib/progname.c'.
        * util/i386/pc/grub-mkimage.c: Include `"progname.h"'.
        (usage): Replace `progname' with `program_name'.
        (main): Use set_program_name() for program name initialization.
2009-11-17 10:40:43 +00:00
Robert Millan
9a90f817a0 Move i18n declarations to their own file. 2009-11-17 09:52:08 +00:00
Robert Millan
f5e9dadb58 Use PACKAGE instead of hardcoding "grub". 2009-11-16 20:03:14 +00:00
Robert Millan
ed101e8122 Initial support for gettext in build system. 2009-11-15 23:11:01 +00:00
Robert Millan
fc2208b0ef 2009-11-14 Robert Millan <rmh.grub@aybabtu.com>
* conf/i386-coreboot.rmk (grub_mkrescue_SOURCES): Replace
        `util/i386/coreboot/grub-mkrescue.in' with `util/grub-mkrescue.in'.
        * conf/i386-pc.rmk (grub_mkrescue_SOURCES): Replace
        `util/i386/pc/grub-mkrescue.in' with `util/grub-mkrescue.in'.
        (bin_SCRIPTS): Add `grub-mkfloppy'.
        (grub_mkfloppy_SOURCES): New variable.

        * util/grub-mkrescue.in: New file.
        * util/i386/pc/grub-mkfloppy.in: New file.

        * util/i386/coreboot/grub-mkrescue.in: Remove.
        * util/i386/pc/grub-mkrescue.in: Remove.
2009-11-14 18:38:11 +00:00
Felix Zielcke
f4c62ed6ed Merge trunk 2009-11-13 14:15:36 +01:00
Robert Millan
7f2b34d84e 2009-11-12 Robert Millan <rmh.grub@aybabtu.com>
* util/i386/pc/grub-install.in: Move from here ...
        * util/grub-install.in: ... to here.  Update all users.
2009-11-12 12:23:11 +00:00
Felix Zielcke
cdfc5ad1b3 2009-11-11 Felix Zielcke <fzielcke@z-51.de>
* util/i386/pc/grub-setup.c (setup): Make core.img path relative
	to its root.
2009-11-11 21:10:58 +01:00
Felix Zielcke
af7d4de5c2 2009-11-11 Felix Zielcke <fzielcke@z-51.de>
Fix the generation of the man page.

	* util/pc/i386/grub-install.in: Source
	`${libdir}/grub/grub-mkconfig_lib' after options have been parsed.
2009-11-11 17:00:27 +01:00
Vladimir 'phcoder' Serbinenko
99145bdc4b Merged with mainline 2009-11-09 21:58:49 +01:00
Vladimir 'phcoder' Serbinenko
da547ac323 merged with mainstream 2009-11-09 21:16:25 +01:00
Vladimir 'phcoder' Serbinenko
1d3c6f1de7 Manually reimported XNU branch 2009-11-09 18:43:53 +01:00
Robert Millan
7c4e16ff88 Integrate grub-mkisofs into the build system. 2009-11-08 23:01:34 +00:00
Robert Millan
79cb3a568b Fix miss-identification as grub-mkimage' (and use $0' when possible). 2009-11-08 21:52:59 +00:00
Robert Millan
ef4b915ad9 Implement grub-mkrescue for coreboot (needs external grub-mkisofs) 2009-11-08 20:56:32 +00:00
Vladimir 'phcoder' Serbinenko
6174923799 merged with upstream 2009-11-02 23:29:51 +01:00
robertmh
805111a4fd 2009-10-30 Robert Millan <rmh.grub@aybabtu.com>
* util/i386/pc/grub-install.in: Remove hint that device.map should be
        checked (grub-install doesn't currently rely on it).
2009-10-30 22:37:38 +00:00
robertmh
4dea1c6f06 2009-10-25 Robert Millan <rmh.grub@aybabtu.com>
* util/i386/pc/grub-setup.c (setup): Add missing parameter to
        grub_util_error() call.
2009-10-25 17:49:27 +00:00
robertmh
042484d78e 2009-10-25 Robert Millan <rmh.grub@aybabtu.com>
* include/grub/fs.h [GRUB_UTIL] (struct grub_fs): Add
        `reserved_first_sector' member.
        * fs/ext2.c [GRUB_UTIL] (grub_ext2_fs): Initialize
        `reserved_first_sector' to 1.
        * fs/fat.c [GRUB_UTIL] (grub_fat_fs): Likewise.
        * fs/ntfs.c [GRUB_UTIL] (grub_ntfs_fs): Likewise.
        * fs/hfsplus.c [GRUB_UTIL] (grub_hfsplus_fs): Likewise.
        * util/i386/pc/grub-setup.c (setup): Add safety check that probes for
        filesystems which begin at first sector.
        (options): New option --skip-fs-probe.   
        (main): Handle --skip-fs-probe and pass it to setup().
2009-10-25 15:23:48 +00:00
phcoder
a9a6948ac3 grub as flash for qemu-gdium 2009-10-18 15:04:14 +02:00
cjwatson
d244281ce6 2009-10-06 Colin Watson <cjwatson@ubuntu.com>
* util/i386/pc/grub-install.in: Source
	${libdir}/grub/grub-mkconfig_lib before option processing, in order
	that the --grub-probe option will work.
	* util/sparc64/ieee1275/grub-install.in: Likewise.
2009-10-05 23:33:36 +00:00
robertmh
6b9b6276d4 2009-09-24 Pavel Roskin <proski@gnu.org>
* include/grub/kernel.h (struct grub_module_header): Remove
        `grub_module_header_types'.  Make `type' unsigned.  Make `size'
        32-bit on all platforms.
        * util/elf/grub-mkimage.c (load_modules): Treat `type' as an
        8-bit field.  Use grub_host_to_target32() for `size'.
        * util/i386/efi/grub-mkimage.c (make_mods_section): Likewise.
        * util/i386/pc/grub-mkimage.c (generate_image): Likewise.
        * util/sparc64/ieee1275/grub-mkimage.c (generate_image): Likewise.
2009-09-24 13:40:40 +00:00
robertmh
c6dcedf6b2 2009-09-24 Robert Millan <rmh.grub@aybabtu.com>
* util/i386/pc/grub-mkimage.c (generate_image): Enclose BIOS-specific
        size check within GRUB_MACHINE_PCBIOS section.
2009-09-24 13:22:19 +00:00
phcoder
aea664ea28 2009-08-25 Vladimir Serbinenko <phcoder@gmail.com>
Fix breakage in grub-setup.

	* util/i386/pc/grub-setup.c (setup): Use "part_msdos" instead of
	"msdos_partition_map".
2009-08-25 08:28:13 +00:00
phcoder
2d21e3e8e0 2009-08-24 Vladimir Serbinenko <phcoder@gmail.com>
Rename *_partition_map to part_*

	* partmap/acorn.c (grub_acorn_partition_map): Set name to 'part_acorn'.
	* partmap/amiga.c (grub_amiga_partition_map): Set name to 'part_amiga'.
	* partmap/apple.c (grub_apple_partition_map): Set name to 'part_apple'.
	* partmap/gpt.c (grub_gpt_partition_map): Set name to 'part_gpt'.
	All users updated.
	* partmap/msdos.c (grub_msdos_partition_map): Set name to 'part_msdos'.
	All users updated.
	* partmap/sun.c (grub_sun_partition_map): Set name to 'part_sun'.
	* util/grub-probe.c (probe_partmap): Don't transform partition name
	to get module name.
2009-08-24 13:34:03 +00:00
phcoder
0b8e386c09 Revert 2 previous commits.
2009-08-23  Vladimir Serbinenko  <phcoder@gmail.com>

	Fix grub-install.

	* util/grub-probe.c (probe_partmap): Prefix partmap with 'part_'.
2009-08-23 23:40:29 +00:00
phcoder
af0f0beafa 2009-08-23 Vladimir Serbinenko <phcoder@gmail.com>
Fix grub-install.

	* util/i386/efi/grub-install.in: Add 'part_' to partmap_module.
	* util/sparc64/ieee1275/grub-install.in: Likewise.
2009-08-23 23:24:33 +00:00
phcoder
cb4735645d 2009-08-23 Vladimir Serbinenko <phcoder@gmail.com>
Fix grub-install.

	* util/i386/pc/grub-install.in: Add 'part_' to partmap_module.
2009-08-23 21:04:44 +00:00
robertmh
71acf5e54b 2009-08-23 Robert Millan <rmh.grub@aybabtu.com>
* partmap/pc.c: Rename to ...
        * partmap/msdos.c: ... this.  Update all users.
        (grub_pc_partition_map): Rename to ...
        (grub_msdos_partition_map): ... this.  Update all users.

        * parttool/pcpart.c: Rename to ...
        * parttool/msdospart.c: ... this.  Update all users.

        * include/grub/pc_partition.h: Rename to ...
        * include/grub/msdos_partition.h: ... this.  Update all users.
        (grub_pc_partition_bsd_entry): Rename to ...
        (grub_msdos_partition_bsd_entry): ... this.  Update all users.
        (grub_pc_partition_disk_label): Rename to ...
        (grub_msdos_partition_disk_label): ... this.  Update all users.
        (grub_pc_partition_entry): Rename to ...
        (grub_msdos_partition_entry): ... this.  Update all users.
        (grub_pc_partition_mbr): Rename to ...
        (grub_msdos_partition_mbr): ... this.  Update all users.
        (grub_pc_partition): Rename to ...
        (grub_msdos_partition): ... this.  Update all users.
        (grub_pc_partition_is_empty): Rename to ...
        (grub_msdos_partition_is_empty): ... this.  Update all users.
        (grub_pc_partition_is_extended): Rename to ...
        (grub_msdos_partition_is_extended): ... this.  Update all users.
        (grub_pc_partition_is_bsd): Rename to ...
        (grub_msdos_partition_is_bsd): ... this.  Update all users.

        * conf/common.rmk (amiga_mod_SOURCES, amiga_mod_CFLAGS)
        (amiga_mod_LDFLAGS, apple_mod_SOURCES, apple_mod_CFLAGS)
        (apple_mod_LDFLAGS, msdos_mod_SOURCES, msdos_mod_CFLAGS)
        (msdos_mod_LDFLAGS, sun_mod_SOURCES, sun_mod_CFLAGS)
        (sun_mod_LDFLAGS, acorn_mod_SOURCES, acorn_mod_CFLAGS)
        (acorn_mod_LDFLAGS, gpt_mod_SOURCES, gpt_mod_CFLAGS)
        (gpt_mod_LDFLAGS): Rename to ...
        (part_amiga_mod_SOURCES, part_amiga_mod_CFLAGS, part_amiga_mod_LDFLAGS)
        (part_apple_mod_SOURCES, part_apple_mod_CFLAGS, part_apple_mod_LDFLAGS)
        (part_msdos_mod_SOURCES, part_msdos_mod_CFLAGS, part_msdos_mod_LDFLAGS)
        (part_sun_mod_SOURCES, part_sun_mod_CFLAGS, part_sun_mod_LDFLAGS)
        (part_acorn_mod_SOURCES, part_acorn_mod_CFLAGS, part_acorn_mod_LDFLAGS)
        (part_gpt_mod_SOURCES, part_gpt_mod_CFLAGS)
        (part_gpt_mod_LDFLAGS): ... this.
        (pkglib_MODULES): Prefix partition modules with `part_'.  Rename
        `pcpart.mod' to `msdospart.mod'.
        (pcpart_mod_SOURCES, pcpart_mod_CFLAGS, pcpart_mod_LDFLAGS): Rename
        to ...
        (msdospart_mod_SOURCES, msdospart_mod_CFLAGS)
        (msdospart_mod_LDFLAGS): ... this.
2009-08-23 12:00:57 +00:00
robertmh
f5d35e7a4b 2009-08-08 Robert Millan <rmh.grub@aybabtu.com>
* util/grub-dumpdevtree: Moved from here ...
        * util/i386/efi/grub-dumpdevtree: ... to here.
        (hexify): New function.  Converts a string to its hex version.
        Generate hex versions of "efi" and "device-properties" by calling
        hexify() on the ASCII strings rather than by hardcoding numbers.
2009-08-08 19:24:58 +00:00
phcoder
a275d9e7c0 2009-07-30 Vladimir Serbinenko <phcoder@gmail.com>
* util/i386/pc/grub-setup.c (setup): Check that no partition is in
	embeding zone, not only the first one.
2009-07-29 22:50:38 +00:00
fzielcke
2ddd36d7a9 2009-07-28 Felix Zielcke <fzielcke@z-51.de>
* util/i386/pc/grub-install: Fix parsing of --disk-module
	option.
2009-07-28 18:32:28 +00:00
fzielcke
c521b62b6c 2009-07-28 Felix Zielcke <fzielcke@z-51.de>
* util/i386/pc/grub-setup.c (setup): Fix 2 incorrect checks
	when embedding.
2009-07-28 15:58:40 +00:00
phcoder
fcaa8b2177 2009-07-24 Vladimir Serbinenko <phcoder@gmail.com>
* util/i386/pc/grub-setup.c (setup): Fix bug when
	installing on partionless disk.
2009-07-24 20:41:31 +00:00
proski
5680109e00 2009-07-19 Pavel Roskin <proski@gnu.org>
* Makefile.in: Remove LIBLZO and enable_lzo.
	* conf/i386-pc.rmk: Remove lzo support.
	* configure.ac: Remove checks for lzo, don't define ENABLE_LZMA.
	* include/grub/i386/pc/kernel.h: Define ENABLE_LZMA.  Remove lzo
	support.
	* kern/i386/pc/lzo1x.S: Remove.
	* kern/i386/pc/startup.S: Remove lzo support.
	* util/i386/pc/grub-mkimage.c: Likewise.
2009-07-19 20:23:33 +00:00
robertmh
211d06b54b 2009-07-01 Robert Millan <rmh.grub@aybabtu.com>
* util/misc.c: Include `<setjmp.h>' and `<grub/machine/machine.h>'.
        (grub_reboot, grub_halt): New functions.

        * util/i386/pc/misc.c: Delete.  Update all users.
        * util/sparc64/ieee1275/misc.c: Likewise.
        * util/powerpc/ieee1275/misc.c: Likewise.
2009-07-01 13:01:33 +00:00
robertmh
8231fb77c6 2009-06-27 Pavel Roskin <proski@gnu.org>
2009-06-27  Robert Millan  <rmh.grub@aybabtu.com>

        * include/grub/dl.h: Include grub/elf.h.
        (struct grub_dl): Add symtab field.
        * kern/dl.c [GRUB_MACHINE_QEMU]: Define
        GRUB_MODULES_MACHINE_READONLY.
        (grub_dl_resolve_symbols): Populate mod->symtab, making a copy
        of the header for read-only modules.
        (grub_dl_unload): Free mod->symtab for read-only modules.
        * kern/i386/dl.c: Use mod->symtab.
        * kern/powerpc/dl.c: Likewise.
        * kern/sparc64/dl.c: Likewise.
        * kern/x86_64/dl.c: Likewise.

        * conf/i386-qemu.rmk: New file.
        * kern/i386/qemu/startup.S: Likewise.
        * kern/i386/qemu/mmap.c: Likewise.
        * boot/i386/qemu/boot.S: Likewise.
        * include/grub/i386/qemu/time.h: Likewise.
        * include/grub/i386/qemu/serial.h: Likewise.
        * include/grub/i386/qemu/kernel.h: Likewise.
        * include/grub/i386/qemu/console.h: Likewise.
        * include/grub/i386/qemu/boot.h: Likewise.
        * include/grub/i386/qemu/init.h: Likewise.
        * include/grub/i386/qemu/machine.h: Likewise.
        * include/grub/i386/qemu/loader.h: Likewise.
        * include/grub/i386/qemu/memory.h: Likewise.

        * conf/i386-coreboot.rmk (GRUB_BOOT_MACHINE_LINK_ADDR)
        (GRUB_KERNEL_MACHINE_LINK_ADDR): New variables.
        [qemu] (pkglib_IMAGES): Add `boot.img'.
        [qemu] (boot_img_SOURCES, boot_img_ASFLAGS, boot_img_LDFLAGS)
        [qemu] (boot_img_FORMAT): New variables.
        [qemu] (bin_UTILITIES): Add `grub-mkimage'.
        [qemu] (grub_mkimage_SOURCES, grub_mkimage_CFLAGS): New variables.
        [qemu] (kernel_img_SOURCES, kernel_img_HEADERS, kernel_img_CFLAGS)
        [qemu] (kernel_img_ASFLAGS, kernel_img_LDFLAGS)
        [qemu] (kernel_img_FORMAT): New variables.

        * configure.ac: Recognise `i386-qemu'.

        * util/i386/pc/grub-mkimage.c (compress_kernel): Add dummy variant
        (for no compression).
        [GRUB_MACHINE_QEMU] (generate_image): Misc adjustments to produce
        a valid i386 ROM image.  Make `GRUB_KERNEL_MACHINE_COMPRESSED_SIZE',
        `GRUB_KERNEL_MACHINE_INSTALL_DOS_PART' and
        `GRUB_KERNEL_MACHINE_INSTALL_BSD_PART' optional features (with
        ifdefs).
2009-06-27 11:18:10 +00:00
proski
c402ab1734 2009-06-26 Pavel Roskin <proski@gnu.org>
* include/grub/types.h: Define GRUB_TARGET_WORDSIZE.
	* include/grub/elf.h: Define symbols without "32" or "64" based
	on GRUB_TARGET_WORDSIZE.
	* include/grub/multiboot2.h: Use GRUB_TARGET_WORDSIZE.
	* efiemu/loadcore32.c: Redefine GRUB_TARGET_WORDSIZE, remove own
	ELF definitions.
	* efiemu/loadcore64.c: Likewise.
	* loader/i386/bsd32.c: Likewise.
	* loader/i386/bsd64.c: Likewise.
	* kern/dl.c: Remove own ELF definitions.
	* util/i386/efi/grub-mkimage.c: Likewise.
2009-06-27 03:01:42 +00:00
robertmh
132a0a595f 2009-06-22 Robert Millan <rmh.grub@aybabtu.com>
* conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): Rename to ...
        (GRUB_KERNEL_MACHINE_LINK_ADDR): ... this.  Update all users.
2009-06-22 19:23:22 +00:00
robertmh
546796c1d7 2009-06-20 Robert Millan <rmh.grub@aybabtu.com>
* util/i386/pc/grub-mkimage.c (main): Oops, free `output' only
        after it's no longer needed.
2009-06-20 14:32:53 +00:00
robertmh
cd7310d5d5 2009-06-20 Robert Millan <rmh.grub@aybabtu.com>
* include/grub/i386/loader.h (grub_linux_prot_size)
        (grub_linux_tmp_addr, grub_linux_real_addr)
        (grub_linux_is_bzimage, grub_linux16_boot): Declare only on
        GRUB_MACHINE_PCBIOS.
        * util/i386/pc/grub-mkimage.c (compress_kernel): Move
        common grub_util_info() call to ...
        (generate_image): ... here.
        Fix use of uninitialized memory, comparison of signed with
        unsigned integers and memory leak.
        Remove bogus module address message.
2009-06-20 14:11:45 +00:00
fzielcke
1bd265f306 2009-06-17 Colin Watson <cjwatson@ubuntu.com>
* util/elf/grub-mkimage.c (usage): Prefix each option line with two
	spaces, for the benefit of help2man.
	* util/i386/efi/grub-mkimage.c (usage): Likewise.
2009-06-17 06:07:36 +00:00
proski
3ef17a2ebf 2009-06-16 Pavel Roskin <proski@gnu.org>
* boot/i386/pc/boot.S: Remove root_drive.  Assert offset of
	boot_drive_check by using GRUB_BOOT_MACHINE_DRIVE_CHECK.  Don't
	save %dx, we only need %dl and we never change it.
	* boot/i386/pc/cdboot.S: Don't set the root drive.
	* boot/i386/pc/pxeboot.S: Likewise.
	* include/grub/i386/pc/boot.h: Remove
	GRUB_BOOT_MACHINE_ROOT_DRIVE, adjust
	GRUB_BOOT_MACHINE_DRIVE_CHECK.
	* include/grub/i386/pc/kernel.h: Remove grub_root_drive.
	* kern/i386/pc/init.c (make_install_device): Remove references
	to grub_root_drive.
	* kern/i386/pc/startup.S: Likewise.
	* util/i386/pc/grub-setup.c (setup): Don't set root_drive.
2009-06-15 23:25:38 +00:00
fzielcke
b39f9d20a9 remove all trailing whitespace 2009-06-10 21:04:23 +00:00
fzielcke
8ec4a6d0e0 2009-06-09 Felix Zielcke <fzielcke@z-51.de>
* util/i386/pc/grub-install.in: Change the error message if UUIDs
	aren't avaible if ata.mod gets used.
2009-06-09 13:22:31 +00:00
fzielcke
255a27d434 2009-06-08 Felix Zielcke <fzielcke@z-51.de>
* util/i386/pc/grub-install.in: Add a parameter --disk-module
	to choose between ata and biosdisk module on i386-pc.
2009-06-08 20:51:16 +00:00
phcoder
fd2bf2e388 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
Fix wrong assumptions with grub-mkimage on EFI
	
	* i386/efi/grub-mkimage.c (read_kernel_module): don't write prefox here
	(relocate_addresses): consider both r_addend and value at offset
	(make_mods_section): zerofill modinfo and header
	(convert_elf): write prefix here
2009-06-04 19:32:46 +00:00
bean
5e898c9d71 2009-05-16 Bean <bean123ch@gmail.com>
* include/grub/kernel.h (grub_module_header_types): Add type
	OBJ_TYPE_CONFIG.

	* kern/main.c (grub_load_config): New function.
	(grub_main): Call grub_load_config to read boot config.

	* grub-mkimage (generate_image): New parameter config_path.
	(options): New option --config.
	(main): Parse --config option, and pass it to generate_image.
2009-05-16 12:12:12 +00:00
proski
6f6a8b2869 2009-05-13 Pavel Roskin <proski@gnu.org>
* util/i386/pc/grub-setup.c (setup): Remove unused variable
	embedding_area_exists.
2009-05-13 21:28:25 +00:00
robertmh
59978c8ae7 2009-05-13 Robert Millan <rmh.grub@aybabtu.com>
Improve warning messages for cases where there's no embedding area,
        or when it is too small (or core.img too large).
2009-05-13 21:13:11 +00:00
robertmh
667712d716 fix indentation for previous commit 2009-05-13 21:01:26 +00:00
robertmh
15fbf4c442 2009-05-13 Robert Millan <rmh.grub@aybabtu.com>
* util/i386/pc/grub-setup.c (setup): Restructure code flow to make
        it easier to understand / work with.
2009-05-13 20:59:45 +00:00
robertmh
901d2f0c27 2009-05-10 Robert Millan <rmh.grub@aybabtu.com>
* util/i386/pc/grub-install.in: Update copyright year.
2009-05-10 15:43:58 +00:00
robertmh
317e1a44b5 2009-05-08 Robert Millan <rmh.grub@aybabtu.com>
* util/i386/pc/grub-setup.c (setup): Factorize find_usable_region(),
        split in two functions (one for msdos and one for gpt).
2009-05-08 19:48:54 +00:00
robertmh
29aa5e8163 2009-05-06 Robert Millan <rmh.grub@aybabtu.com>
* util/i386/pc/grub-setup.c (setup): Fix check for embed region
        existance.
2009-05-06 11:56:17 +00:00
robertmh
ae0c0bdca9 2009-05-04 Robert Millan <rmh.grub@aybabtu.com>
* util/misc.c (grub_util_warn): New function.  Emmits a warning
        unconditionally.
        * include/grub/util/misc.h (grub_util_warn): New declaration.

        * util/i386/pc/grub-install.in: Understand --force and pass it down
        to grub-setup.

        * util/i386/pc/grub-setup.c (main): Understand --force and pass it
        down to setup().
        (setup): Improve error messages and add warnings when requested to
        install in odd layouts.  Refuse to install using blocklists unless
        --force was set.
2009-05-04 16:16:03 +00:00
proski
dfc31a22bb 2009-05-03 Pavel Roskin <proski@gnu.org>
* util/i386/pc/grub-mkrescue.in: Allow for the case when
	efiemu??.o doesn't exist.
	* util/i386/pc/grub-install.in: Likewise.  Use "cp -f" for
	copying.
2009-05-03 19:04:59 +00:00
phcoder
5caf964d75 2009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
Efiemu
 
	* conf/i386-pc.rmk: new modules efiemu, efiemu_acpi, efiemu_pnvram,
	_linux_efi, linux_efi. 
	new files in grub-emu 
	new targets efiemu32.o and efiemu64.o
	* loader/linux_normal_efiemu.c: likewise
	* loader/i386/efi/linux.c: added preliminary efiemu support
	* util/i386/pc/grub-install.in: add efiemu??.o to the list of 
	files to copy
	* include/grub/autoefi.h: new file
	* nclude/grub/i386/efiemu.h: likewise
	* include/grub/i386/pc/efiemu.h: likewise
	* include/grub/efi/api.h: add LL suffix when necessary
	new definitions relating to tables
	* include/grub/efiemu/efiemu.h: new file
	* include/grub/efiemu/runtime.h: likewise
	* efiemu/prepare.c: likewise
	* efiemu/loadcore_common.c: likewise
	* efiemu/loadcore64.c: likewise
	* efiemu/runtime/efiemu.sh: likewise
	* efiemu/runtime/efiemu.S: likewise
	* efiemu/runtime/efiemu.c: likewise
	* efiemu/runtime/config.h: likewise
	* efiemu/prepare32.c: likewise
	* efiemu/main.c: likewise
	* efiemu/modules/pnvram.c: likewise
	* efiemu/modules/i386: likewise
	* efiemu/modules/i386/pc: likewise
	* efiemu/modules/acpi.c: likewise
	* efiemu/i386/pc/cfgtables.c: likewise
	* efiemu/i386/loadcore64.c: likewise
	* efiemu/i386/loadcore32.c: likewise
	* efiemu/prepare64.c: likewise
	* efiemu/loadcore.c: likewise
	* efiemu/symbols.c: likewise
	* efiemu/mm.c: likewise
	* efiemu/loadcore32.c: likewise
2009-05-02 22:40:21 +00:00
phcoder
d9dc87b01b 2009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
Added missing lst to grub-mkrescue

	* util/i386/pc/grub-mkrescue.in: added ${input_dir}/handler.lst
	and ${input_dir}/parttool.lst
2009-05-02 13:34:01 +00:00
fzielcke
c301203905 2009-04-13 Felix Zielcke <fzielcke@z-51.de>
* util/i386/pc/grub-install.in (install_drive): Remove the BSD
	partition number.
	(grub_drive): Likewise.
2009-04-13 11:45:20 +00:00
bean
71b9f36193 2009-03-01 Bean <bean123ch@gmail.com>
* commands/terminal.c: Removed.

	* commands/handler.c: New file.

	* include/grub/list.h: Likewise.

	* include/grub/handler.h: Likewise.

	* kern/list.c: Likewise.

	* kern/handler.c: Likewise.

	* kern/term.h: Include header file <grub/handler.h>.
	(grub_term_input): Move next field to the beginning.
	(grub_term_output): Likewise.
	(grub_term_input_class): New variable.
	(grub_term_output_class): Likewise.
	(grub_term_register_input): Changed to inline function.
	(grub_term_register_output): Likewise.
	(grub_term_unregister_input): Likewise.
	(grub_term_unregister_output): Likewise.
	(grub_term_set_current_input): Likewise.
	(grub_term_set_current_output): Likewise.
	(grub_term_get_current_input): Likewise.
	(grub_term_get_current_output): Likewise.
	(grub_term_iterate_input): Removed.
	(grub_term_iterate_output): Likewise.

	* kern/term.c (grub_term_list_input): Removed.
	(grub_term_list_output): Likewise.
	(grub_term_input_class): New variable.
	(grub_term_output_class): Likewise.
	(grub_cur_term_input): Change varaible as macro.
	(grub_cur_term_output): Likewise.
	(grub_term_register_input): Removed.
	(grub_term_register_output): Likewise.
	(grub_term_unregister_input): Likewise.
	(grub_term_unregister_output): Likewise.
	(grub_term_set_current_input): Likewise.
	(grub_term_set_current_output): Likewise.
	(grub_term_iterate_input): Likewise.
	(grub_term_iterate_output): Likewise.
	(grub_term_get_current_input): Likewise.
	(grub_term_get_current_output): Likewise.

	* util/grub-editenv.c: Include header file <grub/handler.h>.
	(grub_term_get_current_input): Removed.
	(grub_term_get_current_output): Likewise.
	(grub_term_input_class): New variable.
	(grub_term_outout_class): Likewise.

	* util/grub-fstest.c (grub_term_get_current_input): Removed.
	(grub_term_get_current_output): Likewise.
	(grub_term_input_class): New variable.
	(grub_term_outout_class): Likewise.

	* util/grub-probe.c (grub_term_get_current_input): Removed.
	(grub_term_get_current_output): Likewise.
	(grub_term_input_class): New variable.
	(grub_term_outout_class): Likewise.

	* util/i386/pc/grub-setup.c (grub_term_get_current_input): Removed.
	(grub_term_get_current_output): Likewise.
	(grub_term_input_class): New variable.
	(grub_term_outout_class): Likewise.

	* conf/common.rmk (pkglib_MODULES): Replace terminal with handler.
	(terminal_mod_SOURCES): Likewise.
	(terminal_mod_CFLAGS): Likewise.
	(terminal_mod_LDFLAGS): Likewise.

	* conf/i386-pc.rmk (grub_emu_SOURCES): Replace terminal.c with
	handler.c.
	(kernel_img_SOURCES): Add list.c and handler.c.
	(kernel_img_HEADERS): Add list.h and handler.h.

	* conf/i386-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
	handler.c.
	(kernel_mod_SOURCES): Add list.c and handler.c.
	(kernel_mod_HEADERS): Add list.h and handler.h.

	* conf/i386-coreboot.rmk (grub_emu_SOURCES): Replace terminal.c with
	handler.c.
	(kernel_elf_SOURCES): Add list.c and handler.c.
	(kernel_elf_HEADERS): Add list.h and handler.h.

	* conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
	handler.c.
	(kernel_elf_SOURCES): Add list.c and handler.c.
	(kernel_elf_HEADERS): Add list.h and handler.h.

	* conf/x86_64-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
	handler.c.
	(kernel_mod_SOURCES): Add list.c and handler.c.
	(kernel_mod_HEADERS): Add list.h and handler.h.

	* conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
	handler.c.
	(kernel_elf_SOURCES): Add list.c and handler.c.
	(kernel_elf_HEADERS): Add list.h and handler.h.
2009-03-01 17:51:44 +00:00
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
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
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
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
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
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
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
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
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
robertmh
2a5cd121da 2008-08-02 Robert Millan <rmh@aybabtu.com>
* util/i386/pc/grub-install.in: Remove trailing slash from prefix.
2008-08-02 20:30:19 +00:00
robertmh
3bd0a12aca 2008-08-02 Robert Millan <rmh@aybabtu.com>
* disk/memdisk.c (memdisk_size): Don't initialize.
        (GRUB_MOD_INIT(memdisk)): Find memdisk using grub_module_iterate().

        * include/grub/i386/pc/kernel.h
        (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): Remove macro.
        (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Shift.
        (grub_memdisk_image_size, grub_arch_memdisk_addr)
        (grub_arch_memdisk_size): Remove.

        * include/grub/kernel.h (struct grub_module_header): Remove `offset'
        field (was only used to transfer a constant).  Add `type' field to
        support multiple module types.
        (grub_module_iterate): New function.

        * kern/device.c (grub_device_open): Do not hide error messages
        when grub_disk_open() fails.  Use grub_print_error() instead.

        * kern/i386/pc/init.c (grub_arch_modules_addr)
        (grub_arch_memdisk_size): Remove functions.
        (grub_arch_modules_addr): Return the module address in high memory
        (now that it isn't copied anymore).

        * kern/i386/pc/startup.S (grub_memdisk_image_size): Remove variable.
        (codestart): Don't add grub_memdisk_image_size to %ecx in LZMA
        decompression routine (grub_total_module_size already includes that
        now).  Don't copy modules back to low memory.

        * kern/main.c: Include `<grub/mm.h>'.
        (grub_load_modules): Split out (and use) ...
        (grub_module_iterate): ... this function, which iterates through
        module objects and runs a hook.
        Comment out grub_mm_init_region() call, as it would cause non-ELF
        modules to be overwritten.

        * util/i386/pc/grub-mkimage.c (generate_image): Instead of appending
        the memdisk image in its own region, make it part of the module list.
        * util/elf/grub-mkimage.c (options): Add "memdisk"|'m' option.
        (main): Parse --memdisk|-m option, and pass user-provided path as
        parameter to generate_image().
        (add_segments): Pass `memdisk_path' down to load_modules().
        (load_modules): Embed memdisk image in module section when requested.
        * util/i386/efi/grub-mkimage.c (make_mods_section): Initialize
        `header.type' instead of `header.offset'.

        * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add `memdisk.mod'.
        (memdisk_mod_SOURCES, memdisk_mod_CFLAGS)
        (memdisk_mod_LDFLAGS): New variables.
        * conf/i386-coreboot.rmk: Likewise.
        * conf/i386-ieee1275.rmk: Likewise.
2008-08-02 12:17:44 +00:00
robertmh
59198b722c 2008-07-30 Robert Millan <rmh@aybabtu.com>
* include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_DATA_END):
        Increase from 0x50 to 0x60.
        * util/i386/pc/grub-install.in: Detect cross-disk installs, and
        use UUIDs to identify the root drive for them.  If that's not
        possible, abort.
        * util/i386/pc/grub-setup.c (setup): Do not special-case, or even
        check, for cross-disk installs.
2008-07-30 10:44:38 +00:00
chrfranke
3a0fa256ac 2008-07-24 Christian Franke <franke@computer.org>
* util/i386/pc/grub-install.in: If `--debug' is specified,
	pass `--verbose' to grub-setup.
	Abort script if make_system_path_relative_to_its_root() fails.
2008-07-24 19:02:47 +00:00
bean
2001169405 2008-07-17 Bean <bean123ch@gmail.com>
* conf/i386/efi.rmk (pkglib_MODULES): add pci.mod and lspci.mod.
	(appleldr_mod_SOURCE): New variavle.
	(appleldr_mod_CFLAGS): Likewise.
	(appleldr_mod_LDFLAGS): Likewise.
	(pci_mod_SOURCES): Likewise.
	(pci_mod_CFLAGS): Likewise.
	(pci_mod_LDFLAGS): Likewise.
	(lspci_mod_SOURCES): Likewise.
	(lspci_mod_CFLAGS): Likewise.
	(lspci_mod_LDFLAGS): Likewise.

	* conf/x86_64-efi.rmk: New file.

	* disk/efi/efidisk.c (grub_efidisk_read): Wrap efi calls with efi_call_N
	macro.
	(grub_efidisk_write): Likewise.

	* include/efi/api.h (efi_call_0): New macro.
	(efi_call_1): Likewise.
	(efi_call_2): Likewise.
	(efi_call_3): Likewise.
	(efi_call_4): Likewise.
	(efi_call_5): Likewise.
	(efi_call_6): Likewise.

	* include/grub/efi/chainloader.h (grub_chainloader_cmd): Rename to
	grub_rescue_cmd_chainloader.

	* include/grub/efi/pe32.h (GRUB_PE32_MACHINE_X86_64): New macro.
	(grub_pe32_optional_header): Change some fields based on i386 or
	x86_64 platform.
	(GRUB_PE32_PE32_MAGIC): Likewise.

	* include/grub/efi/uga_draw.h: New file.

	* include/grub/elf.h (STN_ABS): New constant.
	(R_X86_64_NONE): Relocation constant for x86_64.
	(R_X86_64_64): Likewise.
	(R_X86_64_PC32): Likewise.
	(R_X86_64_GOT32): Likewise.
	(R_X86_64_PLT32): Likewise.
	(R_X86_64_COPY): Likewise.
	(R_X86_64_GLOB_DAT): Likewise.
	(R_X86_64_JUMP_SLOT): Likewise.
	(R_X86_64_RELATIVE): Likewise.
	(R_X86_64_GOTPCREL): Likewise.
	(R_X86_64_32): Likewise.
	(R_X86_64_32S): Likewise.
	(R_X86_64_16): Likewise.
	(R_X86_64_PC16): Likewise.
	(R_X86_64_8): Likewise.
	(R_X86_64_PC8): Likewise.

	* include/grub/i386/efi/pci.h: New file.

	* include/grub/i386/linux.h (GRUB_LINUX_EFI_SIGNATURE):
	Change it value based on platform.
	(GRUB_LINUX_EFI_SIGNATURE_0204): New constant.
	(GRUB_E820_RAM): Likewise.
	(GRUB_E820_RESERVED): Likewise.
	(GRUB_E820_ACPI): Likewise.
	(GRUB_E820_NVS): Likewise.
	(GRUB_E820_EXEC_CODE): Likewise.
	(GRUB_E820_MAX_ENTRY): Likewise.
	(grub_e820_mmap): New structure.
	(linux_kernel_header): Change the efi field according to different
	kernel version, also field from linux_kernel_header.

	* include/grub/kernel.h (grub_module_info): Add padding for x86_64.

	* include/grub/pci.h (GRUB_PCI_ADDR_SPACE_MASK): New constant.
	(GRUB_PCI_ADDR_SPACE_MEMORY): Likewise.
	(GRUB_PCI_ADDR_SPACE_IO): Likewise.
	(GRUB_PCI_ADDR_MEM_TYPE_MASK): Likewise.
	(GRUB_PCI_ADDR_MEM_TYPE_32): Likewise.
	(GRUB_PCI_ADDR_MEM_TYPE_1M): Likewise.
	(GRUB_PCI_ADDR_MEM_TYPE_64): Likewise.
	(GRUB_PCI_ADDR_MEM_PREFETCH): Likewise.
	(GRUB_PCI_ADDR_MEM_MASK): Likewise.
	(GRUB_PCI_ADDR_IO_MASK): Likewise.

	* include/grub/x86_64/efi/kernel.h: New file.

	* include/grub/x86_64/efi/loader.h: Likewise.

	* include/grub/x86_64/efi/machine.h: Likewise.

	* include/grub/x86_64/efi/pci.h: Likewise.

	* include/grub/x86_64/efi/time.h: Likewise.

	* include/grub/x86_64/linux.h: Likewise.

	* include/grub/x86_64/setjmp.h: Likewise.

	* include/grub/x86_64/time.h: Likewise.

	* include/grub/x86_64/types.h: Likewise.

	* kern/dl.c (GRUB_CPU_SIZEOF_VOID_P): Changed to
	 GRUB_TARGET_SIZEOF_VOID_P.

	* kern/efi/efi.c (grub_efi_locate_protocol): Wrap efi calls.
	(grub_efi_locate_handle): Likewise.
	(grub_efi_open_protocol): Likewise.
	(grub_efi_set_text_mode): Likewise.
	(grub_efi_stall): Likewise.
	(grub_exit): Likewise.
	(grub_reboot): Likewise.
	(grub_halt): Likewise.
	(grub_efi_exit_boot_services): Likewise.
	(grub_get_rtc): Likewise.

	* kern/efi/mm.c (MEMORY_MAP_SIZE): Change to 0x3000 for new models.
	(GRUB_CPU_SIZEOF_VOID_P): Changed to GRUB_TARGET_SIZEOF_VOID_P.
	(grub_efi_allocate_pages): Wrap efi calls.
	(grub_efi_free_pages): Wrap efi calls.
	(grub_efi_get_memory_map): Wrap efi calls.

	* kern/x86_64/dl.c: New file.

	* kern/x86_64/efi/callwrap.S: Likewise.

	* kern/x86_64/efi/startup.S: Likewise.

	* loader/efi/appleloader.c: Likewise.

	* loader/efi/chainloader.c (cmdline): New variable.
	(grub_chainloader_unload): Wrap efi calls.
	(grub_chainloader_boot): Likewise.
	(grub_rescue_cmd_chainloader): Wrap efi calls, handle
	command line.

	* loader/efi/chainloader_normal.c (chainloader_command):
	Change grub_chainloader_cmd to grub_rescue_cmd_chainloader, pass
	command line.

	* loader/i386/efi/linux.c (allocate_pages): Change allocation
	method.
	(grub_e820_add_region): New function.
	(grub_linux_boot): Construct e820 map from efi map, handle x86_64
	booting.
	(grub_find_video_card): New function.
	(grub_linux_setup_video): New function.
	(grub_rescue_cmd_linux): Probe for video information.

	* normal/x86_64/setjmp.S: New file.

	* term/efi/console.c (map_char): New function.
	(grub_console_putchar): Map unicode char.
	(grub_console_checkkey): Wrap efi calls.
	(grub_console_getkey): Likewise.
	(grub_console_getwh): Likewise.
	(grub_console_gotoxy): Likewise.
	(grub_console_cls): Likewise.
	(grub_console_setcolorstate): Likewise.
	(grub_console_setcursor): Likewise.

	* util/i386/efi/grub-mkimage.c: Add support for x86_64.
2008-07-17 09:50:26 +00:00
proski
59652a208f 2008-07-16 Pavel Roskin <proski@gnu.org>
* util/i386/efi/grub-mkimage.c (get_target_address): Return a
	pointer, not an integer.  This fixes a warning and prevents
	precision loss on 64-bit systems.
	(relocate_addresses): Remove unneeded cast.
2008-07-16 06:55:42 +00:00
proski
fe9870876d Fix typos in ChangeLog and comments 2008-07-13 18:13:36 +00:00
bean
aa24b516a2 2008-07-13 Bean <bean123ch@gmail.com>
* Makefile.in (enable_lzo): New rule.

	* conf/i386-pc.rmk (grub_mkimage_SOURCES): New test with enable_lzo.

	* configure.ac (ENABLE_LZO): New option --enable-lzo.

	* boot/i386/pc/lnxboot.S: #include <config.h>.

	* include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE): Change
	its value accordding to the compression algorithm used, lzo or lzma.

	* util/i386/pc/grub-mkimage.c (compress_kernel): Use different
	compression algorithm according to configure macro.

	* kern/i386/pc/startup.S (codestart): Likewise.

	* kern/i386/pc/lzma_decode.S: New file.

	* include/grub/lib/LzFind.h: Likewise.

	* include/grub/lib/LzHash.h: Likewise.

	* include/grub/lib/LzmaDec.h: Likewise.

	* include/grub/lib/LzmaEnc.h: Likewise.

	* include/grub/lib/LzmaTypes.h: Likewise.

	* lib/LzFind.c: Likewise.

	* lib/LzmaDec.c: Likewise.

	* lib/LzmaEnc.c: Likewise.
2008-07-13 01:55:15 +00:00