Commit Graph

122 Commits

Author SHA1 Message Date
bean 2a8a80e4f4 2008-07-24 Bean <bean123ch@gmail.com>
* common.rmk (bin_UTILITIES): Add grub-pe2elf.
	(grub_pe2elf_SOURCES): New macro.
	(CLEANFILES): Add grub-pe2elf.

	* include/grub/efi/pe32.h (GRUB_PE32_SCN_ALIGN_1BYTES): New constant.
	(GRUB_PE32_SCN_ALIGN_2BYTES): Likewise.
	(GRUB_PE32_SCN_ALIGN_4BYTES): Likewise.
	(GRUB_PE32_SCN_ALIGN_8BYTES): Likewise.
	(GRUB_PE32_SCN_ALIGN_16BYTES): Likewise.
	(GRUB_PE32_SCN_ALIGN_32BYTES): Likewise.
	(GRUB_PE32_SCN_ALIGN_64BYTES): Likewise.
	(GRUB_PE32_SCN_ALIGN_SHIFT): Likewise.
	(GRUB_PE32_SCN_ALIGN_MASK): Likewise.
	(GRUB_PE32_SYM_CLASS_EXTERNAL): Likewise.
	(GRUB_PE32_SYM_CLASS_STATIC): Likewise.
	(GRUB_PE32_SYM_CLASS_FILE): Likewise.
	(GRUB_PE32_DT_FUNCTION): Likewise.
	(GRUB_PE32_REL_I386_DIR32): Likewise.
	(GRUB_PE32_REL_I386_REL32): Likewise.
	(grub_pe32_symbol): New structure.
	(grub_pe32_reloc): Likewise.

	* util/grub-pe2elf.c: New file.

	* configure.ac: Set TARGET_OBJ2ELF if host os is cygwin. Don't test for
	start symbol in non pc platform.

	* genmk.rb: Use TARGET_OBJ2ELF to convert native object format to elf.

	The following patches are from Christian Franke.

	* include/grub/dl.h: Remove .previous, gas supports this only
	for ELF format.

	* include/grub/symbol.h [__CYGWIN__] (#define FUNCTION/VARIABLE):
	Remove .type, gas supports this only for ELF format.

	* kern/dl.c (grub_dl_resolve_dependencies): Add check for trailing
	nullbytes in symbol table. This fixes an infinite loop if table is
	zero filled.

	* Makefile.in: Add autoconf replacements TARGET_IMG_LDSCRIPT,
	TARGET_IMG_LDFLAGS and EXEEXT.

	* aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Replace -Wl,-N by
	TARGET_IMG_LDFLAGS_AC.
	(grub_CHECK_STACK_ARG_PROBE): New function.

	* conf/i386-pc.rmk: Replace -Wl,-N by TARGET_IMG_LDFLAGS.

	* conf/i386-pc-cygwin-ld-img.sc: New linker script.

	* configure.ac: Add check for linker script "conf/${target}-img-ld.c"
	to set TARGET_IMG_LD* accordingly.
	Add check for Cygwin to set TARGET_MOD_OBJCOPY accordingly.
	Add call to grub_CHECK_STACK_ARG_PROBE.
	Use TARGET_IMG_LDFLAGS to check start, bss_start, end symbols.

	* genkernsyms.sh.in: Handle HAVE_ASM_USCORE case.

	* genmk.rb: Add EXEEXT to CLEANFILES.
2008-07-24 14:56:30 +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
proski 47395a42d7 2008-06-19 Pavel Roskin <proski@gnu.org>
* conf/i386-efi.rmk: Recompile grub-mkimage.c if Makefile has
	changed.  This is needed in case GRUB_LIBDIR changes.
	* conf/i386-ieee1275.rmk: Likewise.
	* conf/i386-linuxbios.rmk: Likewise.
	* conf/i386-pc.rmk: Likewise.
	* conf/powerpc-ieee1275.rmk: Likewise.
2008-06-19 05:14:16 +00:00
proski 22f16596ae 2008-05-30 Pavel Roskin <proski@gnu.org>
* conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Remove, as
	compiling execute.c doesn't need grub_script.tab.h anymore.
	(normal/command.c_DEPENDENCIES): Likewise.
	(normal/function.c_DEPENDENCIES): Likewise.
	* conf/i386-ieee1275.rmk: Likewise.
	* conf/i386-linuxbios.rmk: Likewise.
	* conf/i386-pc.rmk: Likewise.
	* conf/powerpc-ieee1275.rmk: Likewise.
	* conf/sparc64-ieee1275.rmk: Likewise.
2008-05-30 04:20:48 +00:00
bean 86cb4f54b4 2008-03-31 Bean <bean123ch@gmail.com>
* conf/common.rmk (pkgdata_MODULES): Add afs.mod.
	(grub_probe_SOURCES): Add fs/afs.c.
	(grub_fstest_SOURCES): Likewise.
	(afs_mod_SOURCES): New variable.
	(afs_mod_CFLAGS): Likewise.
	(afs_mod_LDFLAGS): Likewise.

	* conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/afs.c.
	(grub_emu_SOURCES): Likewise.

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

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

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

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

	* fs/afs.c: New file.
2008-03-31 11:18:00 +00:00
bean 0d16e571f1 2008-02-24 Bean <bean123ch@gmail.com>
* fs/iso9660.c (GRUB_ISO9660_VOLDESC_BOOT): New macro.
	(GRUB_ISO9660_VOLDESC_PRIMARY): Likewise.
	(GRUB_ISO9660_VOLDESC_SUPP): Likewise.
	(GRUB_ISO9660_VOLDESC_PART): Likewise.
	(GRUB_ISO9660_VOLDESC_END): Likewise.
	(grub_iso9660_primary_voldesc): New member escape.
	(grub_iso9660_data): New member joliet.
	(grub_iso9660_convert_string): New function.
	(grub_iso9660_mount): Detect joliet extension.
	(grub_iso9660_iterate_dir): Convert filename when joliet is detected.
	(grub_iso9660_iso9660_label): Likewise.

	* conf/common.rmk (pkgdata_MODULES): Add udf.mod.
	(grub_setup_SOURCES): Add fs/udf.c.
	(grub_fstest_SOURCES): Likewise.
	(udf_mod_SOURCES): New variable.
	(udf_mod_CFLAGS): Likewise.
	(udf_mod_LDFLAGS): Likewise.

	* conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/udf.c.
	(grub_emu_SOURCES): Likewise.

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

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

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

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

	* fs/udf.c: New file.
2008-02-24 15:34:15 +00:00
robertmh 8a594a17c7 2008-02-24 Robert Millan <rmh@aybabtu.com>
* conf/i386-efi.rmk (normal/function.c_DEPENDENCIES)
        (normal/lexer.c_DEPENDENCIES): New variables.
        * conf/i386-ieee1275.rmk (normal/function.c_DEPENDENCIES)
        (normal/lexer.c_DEPENDENCIES): Likewise.
        * conf/i386-linuxbios.rmk (normal/function.c_DEPENDENCIES)
        (normal/lexer.c_DEPENDENCIES): Likewise.
        * conf/i386-pc.rmk (normal/function.c_DEPENDENCIES)
        (normal/lexer.c_DEPENDENCIES): Likewise.
        * conf/powerpc-ieee1275.rmk (normal/function.c_DEPENDENCIES)
        (normal/lexer.c_DEPENDENCIES): Likewise.
        * conf/sparc64-ieee1275.rmk (normal/function.c_DEPENDENCIES)
        (normal/lexer.c_DEPENDENCIES): Likewise.
2008-02-24 15:06:30 +00:00
bean d38e24c285 2008-02-19 Bean <bean123ch@gmail.com>
* conf/i386-pc.rmk (pkglib_MODULES): Add aout.mod _bsd.mod and bsd.mod.
	(aout_mod_SOURCES): New variable.
	(aout_mod_CFLAGS): Likewise.
	(aout_mod_LDFLAGS): Likewise.
	(_bsd_mod_SOURCES): New variable.
	(_bsd_mod_CFLAGS): Likewise.
	(_bsd_mod_LDFLAGS): Likewise.
	(bsd_mod_SOURCES): New variable.
	(bsd_mod_CFLAGS): Likewise.
	(bsd_mod_LDFLAGS): Likewise.

	* include/grub/aout.h: New file.

	* include/grub/i386/loader.h (grub_unix_real_boot): New function.

	* include/grub/i386/bsd.h: New file.

	* include/grub/i386/pc/init.h (grub_get_mmap_entry): Use EXPORT_FUNC
	to make it public.

	* kern/elf.c (grub_elf32_load): Get the physical address after the hook
	function is called, so that it's possible to change it inside the hook.
	(grub_elf64_load): Likewise.
	(grub_elf_file): Don't close the file if elf header is not found.
	(grub_elf_close): Close the file if grub_elf_file fails (The new
	grub_elf_file won't close it).
	(grub_elf32_size): Use NESTED_FUNC_ATTR for nested function calcsize.
	(grub_elf64_size): Likewise.

	* kern/i386/loader.S (grub_unix_real_boot): New function.

	* loader/aout.c: New file.

	* loader/i386/bsd.c: New file.

	* loader/i386/bsd_normal.c: New file.

	* loader/i386/pc/multiboot.c (grub_multiboot): Handle a.out format.

	* loader/multiboot2.c (grub_multiboot2): Reset grub_errno so that it
	can test othe formats.
2008-02-19 16:40:45 +00:00
boeglin f714229e34 2008-02-12 Alexandre Boeglin <alex@boeglin.org>
* conf/i386-efi.rmk (grub_emu_SOURCES): Replace commands/i386/pc/halt.c and
  reboot.c by commands/halt.c and reboot.c.
  (grub_install_SOURCES): Add halt.mod and reboot.mod.
  (halt_mod_SOURCES): New variable.
  (halt_mod_CFLAGS): Likewise.
  (halt_mod_LDFLAGS): Likewise.
  (reboot_mod_SOURCES): Likewise.
  (reboot_mod_CFLAGS): Likewise.
  (reboot_mod_LDFLAGS): Likewise.

  * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace commands/ieee1275/halt.c
  and reboot.c by commands/halt.c and reboot.c.
  (halt_mod_SOURCES): Likewise.
  (reboot_mod_SOURCES): Likewise.

  * conf/i386-pc.rmk (grub_emu_SOURCES): Replace commands/i386/pc/reboot.c by
  commands/reboot.c.
  (reboot_mod_SOURCES): Likewise.

  * commands/i386/pc/reboot.c: merge this file ...

  * commands/ieee1275/reboot.c: ... and this file ...

  * commands/reboot.c: ... to this file.
  Add some precompiler directive to include the correct header for each
  machine.

  * commands/ieee1275/halt.c: move this file ...

  * commands/halt.c: ... to here.
  Add some precompiler directive to include the correct header for each
  machine.

  * include/grub/efi/efi.h (grub_reboot): New function declaration.
  (grub_halt): Likewise.

  * kern/efi/efi.c (grub_reboot): New function.
  (grub_halt): Likewise.
2008-02-12 23:47:07 +00:00
robertmh bf7486424d 2008-02-10 Robert Millan <rmh@aybabtu.com>
* conf/i386-efi.rmk (grub_emu_SOURCES): Add `disk/raid.c' and
        `disk/lvm.c'.
        * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
        * conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.

        * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Move `disk/raid.c' and
        `disk/lvm.c' to the end of the list.
        * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
        * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
2008-02-10 20:00:37 +00:00
bean 9be665dd11 2008-01-31 Bean <bean123ch@gmail.com>
* conf/i386-pc.rmk (pkglib_IMAGES): Add cdboot.img.
        (cdboot_img_SOURCES): New variable.
        (cdboot_img_ASFLAGS): New variable.
        (cdboot_img_LDFLAGS): New variable.

        * boot/i386/pc/cdboot.S: New file.

        * disk/i386/pc/biosdisk.c (cd_start): New variable.
        (cd_count): Likewise.
        (grub_biosdisk_get_drive): Add support for cd device.
        (grub_biosdisk_call_hook): Likewise.
        (grub_biosdisk_iterate): Likewise.
        (grub_biosdisk_open): Likewise.
        (GRUB_BIOSDISK_CDROM_RETRY_COUNT): New macro.
        (grub_biosdisk_rw): Support reading from cd device.
        (GRUB_MOD_INIT): Iterate cd devices.

        * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_FLAG_CDROM): New macro.
        (GRUB_BIOSDISK_MACHINE_CDROM_START): Likewise.
        (GRUB_BIOSDISK_MACHINE_CDROM_END): Likewise.

        * kern/i386/pc/init.c (make_install_device): Check for cd device.
2008-02-03 08:27:15 +00:00
marco_g 58c6922006 2008-02-02 Marco Gerards <marco@gnu.org>
* bus/pci.c: New file.

	* include/grub/pci.h: Likewise.

	* include/grub/i386/pc/pci.h: Likewise.

	* commands/lspci.c: Likewise.

	* conf/i386-pc.rmk (pkglib_MODULES): Add `pci.mod' and
	`lspci.mod'.
	(pci_mod_SOURCES): New variable.
	(pci_mod_CFLAGS): Likewise.
	(pci_mod_LDFLAGS): Likewise.
	(lspci_mod_SOURCES): Likewise.
	(lspci_mod_CFLAGS): Likewise.
	(lspci_mod_LDFLAGS): Likewise.
2008-02-02 15:33:05 +00:00
robertmh f95562bf52 2008-02-01 Robert Millan <rmh@aybabtu.com>
Correct a mistake in previous commit.

        * conf/i386-pc.rmk (normal/execute.c_DEPENDENCIES): Move to the
        top.
        (normal/command.c_DEPENDENCIES): New variable.
2008-02-01 18:54:52 +00:00
robertmh 7d31f41fc6 2008-02-01 Robert Millan <rmh@aybabtu.com>
* conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Move to the
        top.
        (normal/command.c_DEPENDENCIES): New variable.
        (grub-emu_DEPENDENCIES, normal_mod_DEPENDENCIES): Remove variables.
        * conf/i386-ieee1275.rmk: Likewise.
        * conf/i386-linuxbios.rmk: Likewise.
        * conf/i386-pc.rmk: Likewise.
        * conf/sparc64-ieee1275.rmk: Likewise.
        * conf/powerpc-ieee1275.rmk: Likewise.
        (grub_emu_SOURCES): Add `fs/fshelp.c'.

        * genmk.rb: Add `$(#{src}_DEPENDENCIES)' in targets that require it.
2008-02-01 15:45:17 +00:00
robertmh ccaa8a5f50 2008-01-30 Robert Millan <rmh@aybabtu.com>
* conf/i386-pc.rmk (sbin_UTILITIES): Remove `grub-probe'.
        (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Moved from here ...
        * conf/common.rmk (util/grub-probe.c_DEPENDENCIES)
        (grub_probe_SOURCES): ... to here.

        * conf/i386-efi.rmk (sbin_UTILITIES): Remove `grub-probe'.
        (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Remove.
        * conf/i386-ieee1275.rmk: Likewise.
        * conf/i386-linuxbios.rmk: Likewise.
        * conf/powerpc-ieee1275.rmk: Likewise.
2008-01-30 15:32:56 +00:00
bean 6a4d50ead0 2008-01-29 Bean <bean123ch@gmail.com>
* conf/i386-pc.rmk (pkglib_MODULES): Add `png.mod'.
        (png_mod_SOURCES): New variable.
        (png_mod_CFLAGS): Likewise.
        (png_mod_LDFLAGS): Likewise.

        * video/readers/png.c: New file.
2008-01-29 09:45:06 +00:00
robertmh e1907778a1 2008-01-27 Robert Millan <rmh@aybabtu.com>
Get grub-emu to build again (including parallel builds).

        * conf/i386-pc.rmk (util/grub-emu.c_DEPENDENCIES): Remove variable.
        Split into ...
        (util/grub-emu.c_DEPENDENCIES): ... this, ...
        (normal/execute.c_DEPENDENCIES): ... this, ...
        (grub-emu_DEPENDENCIES): ... and this.

        * conf/i386-efi.rmk: Likewise.
        * conf/i386-linuxbios.rmk: Likewise.
        * conf/i386-ieee1275.rmk: Likewise.
        * conf/powerpc-ieee1275.rmk: Likewise.
        (grub_emu_SOURCES): Remove duplicated `kern/file.c'.
2008-01-27 22:44:02 +00:00
robertmh f75172d9e7 2008-01-27 Robert Millan <rmh@aybabtu.com>
Fix parallel builds with grub-emu.  Based on earlier commit for
        grub-probe and grub-setup.

        * conf/i386-pc.rmk (grub-emu_DEPENDENCIES): Renamed to ...
        (util/grub-emu.c_DEPENDENCIES): ... this.
        * conf/i386-efi.rmk (grub-emu_DEPENDENCIES): Renamed to ...
        (util/grub-emu.c_DEPENDENCIES): ... this.
        * conf/i386-linuxbios.rmk (grub-emu_DEPENDENCIES): Renamed to ...
        (util/grub-emu.c_DEPENDENCIES): ... this.
        * conf/i386-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
        (util/grub-emu.c_DEPENDENCIES): ... this.
        * conf/powerpc-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
        (util/grub-emu.c_DEPENDENCIES): ... this.
2008-01-27 21:35:44 +00:00
robertmh 2a9525e6c3 2008-01-25 Robert Millan <rmh@aybabtu.com>
* conf/i386-pc.rmk (grub_setup_SOURCES, grub_emu_SOURCES): Regroup to
        make all filesystem sources appear together (possibly fixing omissions
        while at it).
        * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
        * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
        * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
        * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.

        * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.  Additionally,
        add `kern/file.c'.
        * conf/i386-efi.rmk (grub_probe_SOURCES): Likewise.
        * conf/i386-ieee1275.rmk (grub_probe_SOURCES): Likewise.
        * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Likewise.
        * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Likewise.

        * util/grub-probe.c: Include `<grub/file.h>' and `<sys/stat.h>'.
        (probe): Add a sanity check to make sure of our ability to read
        requested files when probing for filesystem type.

        * genmk.rb: Update copyright year (2007).

        * include/grub/fs.h (grub_fat_init, grub_fat_fini, grub_ext2_init)
        (grub_ext2_fini, grub_ufs_init, grub_ufs_fini, grub_minix_init)
        (grub_minix_fini, grub_hfs_init, grub_hfs_fini, grub_jfs_init)
        (grub_jfs_fini, grub_xfs_init, grub_xfs_fini, grub_affs_init)
        (grub_affs_fini, grub_sfs_init, grub_sfs_fini, grub_iso9660_init)
        : Remove function prototypes.
2008-01-25 22:33:57 +00:00
bean 34842f2d6b 2008-01-22 Bean <bean123ch@gmail.com>
* conf/i386-pc.rmk (pkglib_MODULES): Add `jpeg.mod'.
        (jpeg_mod_SOURCES): New variable.
        (jpeg_mod_CFLAGS): Likewise.
        (jpeg_mod_LDFLAGS): Likewise.

        * video/readers/jpeg.c : New file.
2008-01-22 13:50:38 +00:00
robertmh 261bd4bc56 2008-01-21 Robert Millan <rmh@aybabtu.com>
* conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): New variable.
        (kernel_img_LDFLAGS): Use `GRUB_MEMORY_MACHINE_LINK_ADDR' as link
        address.
        (grub_mkimage_CFLAGS): Propagate `GRUB_MEMORY_MACHINE_LINK_ADDR' as
        a C macro.
        * include/grub/i386/pc/memory.h (GRUB_MEMORY_MACHINE_UPPER): New macro.
        Indicates start of upper memory.
        * util/i386/pc/grub-mkimage.c: Include `<grub/machine/memory.h>'.
        (generate_image): Abort when image size is big enough to corrupt
        upper memory.

        * include/grub/i386/pc/vga.h: Include `<grub/machine/memory.h>'.
        (GRUB_MEMORY_MACHINE_VGA_ADDR): Alias for `GRUB_MEMORY_MACHINE_UPPER'.
        * term/i386/pc/vga.c (VGA_MEM): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
        instead of hardcoding 0xA0000.
        * video/i386/pc/vbe.c: Include `<grub/machine/vga.h>'.
        (grub_vbe_set_video_mode): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
        instead of hardcoding 0xA0000.
2008-01-21 15:48:27 +00:00
robertmh 55a581dc06 2008-01-21 Robert Millan <rmh@aybabtu.com>
* conf/i386-pc.rmk (kernel_img_HEADERS): Add `machine/kernel.h'.
        (pkglib_MODULES): Add `memdisk.mod'.
        (memdisk_mod_SOURCES): New variable.
        (memdisk_mod_CFLAGS): Likewise.
        (memdisk_mod_LDFLAGS): Likewise.

        * disk/memdisk.c: New file.

        * include/grub/disk.h (grub_disk_dev_id): Add
        `GRUB_DISK_DEVICE_MEMDISK_ID'.

        * include/grub/i386/pc/kernel.h
        (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): New macro.
        (GRUB_KERNEL_MACHINE_PREFIX): Increment by 4.
        (grub_kernel_image_size): New variable declaration.
        (grub_total_module_size): Likewise.
        (grub_memdisk_image_size): Likewise.

        * include/grub/i386/pc/memory.h
        (GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR): New macro.

        * include/grub/kernel.h: Include `<grub/symbol.h>'.
        (grub_arch_memdisk_addr): New variable declaration.
        (grub_arch_memdisk_size): Likewise.

        * kern/i386/pc/init.c (grub_arch_memdisk_addr): New function.
        (grub_arch_memdisk_size): Likewise.

        * kern/i386/pc/startup.S (grub_memdisk_image_size): New variable.
        (codestart): Replace hardcoded `0x100000' with
        `GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR' macro.

        * util/i386/pc/grub-mkimage.c: Include `<grub/misc.h>'.
        (generate_image): Add `memdisk_path' parameter.  When `memdisk_path' is
        not NULL, append the contents of the file it refers to, at the end of
        the compressed kernel image.  Initialize `grub_memdisk_image_size'
        variable (at `GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE' offset).
        (options): Add "memdisk"|'m' option.
        (main): Parse --memdisk|-m option, and pass user-provided path as
        parameter to generate_image().
2008-01-20 23:20:36 +00:00
okuji f5db429174 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
* fs/reiserfs.c (grub_reiserfs_iterate_dir): ENTRY_ITEM must be
    allocated from the heap, due to the fshelp implementation.
    (grub_reiserfs_dir): Free NODE, due to the same reason.
2008-01-06 15:34:11 +00:00
robertmh 0ece25b1e1 2008-01-05 Robert Millan <rmh@aybabtu.com>
* include/grub/normal.h (grub_env_write_color_normal): New prototype.
	(grub_env_write_color_highlight): Likewise.
	(grub_wait_after_message): Likewise.

	* normal/color.c: New file.

	* conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/color.c'.
	(normal_mod_DEPENDENCIES): Likewise.

	* conf/i386-efi.rmk (grub_emu_SOURCES): Add `normal/color.c'.
	(normal_mod_DEPENDENCIES): Likewise.

	* conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add `normal/color.c'.
	(normal_mod_DEPENDENCIES): Likewise.

	* conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `normal/color.c'.
	(normal_mod_DEPENDENCIES): Likewise.

	* normal/menu_entry.c (run): Rely on grub_wait_after_message()
	for waiting after a message is printed.
	* normal/main.c (read_config_file): Likewise.
	(grub_normal_init): Register grub_env_write_color_normal() and
	grub_env_write_color_highlight() hooks.  Mark `color_normal' and
	`color_highlight' variables as global.

	* normal/menu.c (grub_wait_after_message): New function.
	(grub_color_menu_normal): New variable.  Replaces ...
	(GRUB_COLOR_MENU_NORMAL): ... this macro.
	(grub_color_menu_highlight): New variable.  Replaces ...
	(GRUB_COLOR_MENU_HIGHLIGHT): ... this macro.
	(draw_border): Set color state to `GRUB_TERM_COLOR_NORMAL' instead of
	`GRUB_TERM_COLOR_STANDARD'.
	(print_message): Use `grub_setcolorstate' to reload colors.  Rename
	`normal_code' and `highlight_code' to `old_color_normal' and
	`old_color_highlight', respectively.
	(grub_menu_init_page): Update colors when drawing the menu, based on
	`menu_color_normal' and `menu_color_highlight' variables.
	(grub_menu_run): Rely on grub_wait_after_message() for waiting after
	a message is printed.
2008-01-05 12:10:28 +00:00
robertmh fc6e896cc5 2007-12-26 Bean <bean123ch@gmail.com>
* conf/common.rmk (pkgdata_MODULES): Add cpio.mod.
	(cpio_mod_SOURCES): New variable.
	(cpio_mod_CFLAGS): Likewise.
	(cpio_mod_LDFLAGS): Likewise.

	* fs/cpio.c: New file.

	* conf/i386-pc.rmk (grub_emu_SOURCES): Add cpio.c.

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

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

	* conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2007-12-26 07:51:19 +00:00
robertmh 4931827fe4 2007-12-25 Robert Millan <rmh@aybabtu.com>
* configure.ac: Search for possible unifont.hex locations, and
	define UNIFONT_HEX if found.

	* Makefile.in (UNIFONT_HEX): Define variable.
	(DATA): Rename to ...
	(PKGLIB): ... this.  Update all users.
	(PKGDATA): New variable.
	(pkgdata_IMAGES): Rename to ...
	(pkglib_IMAGES): ... this. Update all users.
	(pkgdata_MODULES): Rename to ...
	(pkglib_MODULES): ... this. Update all users.
	(pkgdata_PROGRAMS): Rename to ...
	(pkglib_PROGRAMS): ... this. Update all users.
	(pkgdata_DATA): Rename to ...
	(pkglib_DATA): ... this. Update all users.
	(CLEANFILES): Redefine to `$(pkglib_DATA) $(pkgdata_DATA)'.
	(unicode.pff, ascii.pff): New rules.
	(all-local): Add `$(PKGDATA)' dependency.
	(install-local): Process `$(PKGDATA)'.

	* util/update-grub_lib.in (font_path): Search for *.pff files in
	a few more locations, including `${pkgdata}'.
2007-12-25 09:09:43 +00:00
robertmh 4bc72aa96f 2007-12-21 Bean <bean123ch@gmail.com>
* conf/common.rmk (pkgdata_MODULES): Add ntfscomp.mod.
	(ntfscomp_mod_SOURCES): New variable.
	(ntfscomp_mod_CFLAGS): Likewise.
	(ntfscomp_mod_LDFLAGS): Likewise.

	* conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfscomp.c.
	(grub_probe_SOURCES): Likewise.
	(grub_emu_SOURCES): Likewise.

	* conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
	(grub_emu_SOURCES): Likewise.

	* conf/i386-linuxbios.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
	(grub_emu_SOURCES): Likewise.

	* conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
	(grub_emu_SOURCES): Likewise.

	* fs/ntfs.c (grub_ntfscomp_func): New variable.
	(read_run_list): Renamed to grub_ntfs_read_run_list.
	(decomp_nextvcn): Moved to ntfscomp.c.
	(decomp_getch): Likewise.
	(decomp_get16): Likewise.
	(decomp_block): Likewise.
	(read_block): Likewise.
	(read_data): Partially moved to ntfscomp.c.
	(fixup): Change unsigned to grub_uint16_t.
	(read_mft): Change unsigned long to grub_uint32_t.
	(read_attr): Likewise.
	(read_data): Likewise.
	(read_run_data): Likewise.
	(read_run_list): Likewise.
	(read_mft): Likewise.

	* fs/ntfscomp.c: New file.

	* include/grub/ntfs.h: New file.
2007-12-21 11:41:23 +00:00
robertmh 84be7599f6 2007-12-15 Bean <bean123ch@gmail.com>
* conf/i386-pc.rmk (pkgdata_IMAGES): Add lnxboot.img.
	(lnxboot_img_SOURCES): New variable.
	(lnxboot_img_ASFLAGS): Likewise.
	(lnxboot_img_LDFLAGS): Likewise.

	* boot/i386/pc/lnxboot.S: New file.
2007-12-15 10:42:17 +00:00
robertmh c405c39191 2007-11-18 Bean <bean123ch@gmail.com>
* conf/common.rmk (pkgdata_MODULES): Add hexdump.mod.
	(hexdump_mod_SOURCES): New variable.
	(hexdump_mod_CFLAGS): Likewise.
	(hexdump_mod_LDFLAGS): Likewise.

	* conf/i386-pc.rmk (grub_emu_SOURCES): Add command/hexdump.c.

	* conf/i386-efi.rmk (grub_emu_SOURCES): Add command/hexdump.c.

	* conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add command/hexdump.c.

	* conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add command/hexdump.c.

	* include/grub/hexdump.h: New file.

	* commands/hexdump.c: New file.
2007-11-18 06:41:46 +00:00
chaac a87783bfa1 2007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
* conf/i386-pc.rmk (pkgdata_MODULES): Added vga.mod.
        (vga_mod_SOURCES): Added.
        (vga_mod_CFLAGS): Likewise.
        (vga_mod_LDFLAGS): Likewise.

        * term/i386/pc/vga.c (get_map_mask): Switch order of arguments in
        grub_outb() calls.
        (set_map_mask): Likewise.
        (set_read_map): Likewise.
        (set_read_address): Likewise.
        (vga_font): Removed variable.
        (get_vga_glyph): Removed function.
        (invalidate_char): Likewise.
        (write_char): Changed to use grub_font_get_glyph() for font
        information.
        (grub_vga_putchar): Likewise.
        (grub_vga_getcharwidth): Likewise.
2007-11-10 18:34:48 +00:00
chaac 6433b448ac 2007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
* conf/i386-pc.rmk (boot_img_LDFLAGS): Use COMMON_LDFLAGS for target
        flags.
        (pxeboot_img_LDFLAGS): Likewise.
        (diskboot_img_LDFLAGS): Likewise.
        (kernel_img_LDFLAGS): Likewise.
2007-11-10 18:30:40 +00:00
marco_g e911ecc1c2 2007-10-31 Marco Gerards <marco@gnu.org>
* conf/i386-pc.rmk (pkgdata_MODULES): Add `ata.mod'.
	(ata_mod_SOURCES): New variable.
	(ata_mod_CFLAGS): Likewise.
	(ata_mod_LDFLAGS): Likewise.

	* disk/ata.c: New file.

	* include/grub/disk.h (grub_disk_dev_id): Add
	`GRUB_DISK_DEV_ATA_ID'.
2007-10-31 22:29:20 +00:00
robertmh 73fcb0f38d 2007-10-22 Robert Millan <rmh@aybabtu.com>
* conf/i386-pc.rmk (kernel_img_SOURCES): Remove `disk/i386/pc/biosdisk.c'.
	(pkgdata_MODULES): Add `biosdisk.mod'.
	(biosdisk_mod_SOURCES, biosdisk_mod_CFLAGS, biosdisk_mod_LDFLAGS): New
	variables.

	* disk/i386/pc/biosdisk.c: Include `<grub/dl.h>'.
	(grub_biosdisk_init): Replace with ...
	(GRUB_MOD_INIT(biosdisk)): ... this.
	(grub_biosdisk_fini): Replace with ...
	(GRUB_MOD_FINI(biosdisk)): ... this.

	* kern/i386/pc/init.c: Remove `<grub/machine/biosdisk.h>'.
	(grub_machine_init): Remove call to grub_biosdisk_init().
	(grub_machine_fini): Remove call to grub_machine_fini().

	* util/i386/pc/grub-install.in (modules): Add `biosdisk'.
2007-10-22 20:05:27 +00:00
robertmh 3381d27403 2007-10-22 Robert Millan <rmh@aybabtu.com>
* include/grub/time.h: New file.
	* include/grub/i386/time.h: Likewise.
	* include/grub/powerpc/time.h: Likewise.
	* include/grub/sparc64/time.h: Likewise.

	* include/grub/i386/pc/time.h (KERNEL_TIME_HEADER): Rename all
	instances to ...
	(KERNEL_MACHINE_TIME_HEADER): ... this.
	* include/grub/powerpc/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
	instances to ...
	(KERNEL_MACHINE_TIME_HEADER): ... this.
	* include/grub/sparc64/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
	instances to ...
	(KERNEL_MACHINE_TIME_HEADER): ... this.

	* kern/i386/efi/init.c: Include `<grub/time.h>'.
	(grub_millisleep): New function.
	* kern/i386/pc/init.c: Include `<grub/time.h>'.
	(grub_millisleep): New function.
	* kern/powerpc/ieee1275/init.c: Include `<grub/time.h>'.
	Remove `grub/machine/time.h' include.
	(grub_millisleep): New function.
	* kern/sparc64/ieee1275/init.c: Include `<grub/time.h>'.
	Remove `grub/machine/time.h' include.
	(grub_millisleep): New function.

	* include/grub/misc.h (grub_div_roundup): New function.

	* kern/misc.c: Include `<grub/time.h>'.
	(grub_millisleep_generic): New function.

	* conf/i386-efi.rmk (kernel_mod_HEADERS): Remove `i386/efi/time.h'.
	Add `time.h'.
	* conf/i386-pc.rmk (kernel_img_HEADERS): Remove `machine/time.h'.
	Add `time.h'.
	* conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Remove
	`machine/time.h'.  Add `time.h'.
	* conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
2007-10-22 19:59:33 +00:00
robertmh 38da651643 2007-08-29 Robert Millan <rmh@aybabtu.com>
Patch from Simon Peter <dn.tlp@gmx.net>:
	* genmk.rb (Utility): Append $(#{src}_DEPENDENCIES) to #{obj} targets.
	* conf/i386-pc.rmk: Replace grub-probe_DEPENDENCIES with
	util/grub-probe.c_DEPENDENCIES.  Replace grub-setup_DEPENDENCIES with
	util/i386/pc/grub-setup.c_DEPENDENCIES.
	* conf/i386-efi.rmk: Replace grub-probe_DEPENDENCIES with
	util/grub-probe.c_DEPENDENCIES.
	* conf/powerpc-ieee1275.rmk: Likewise.
2007-08-29 10:39:42 +00:00
robertmh 29d0928cd7 2007-08-28 Robert Millan <rmh@aybabtu.com>
* util/i386/get_disk_name.c: New.  Implement grub_util_get_disk_name()
	to tell grub-mkdevicemap how to name devices.
	* util/ieee1275/get_disk_name.c: Likewise (using "ofpathname -a"
	feature).

	* conf/i386-efi.rmk (grub_mkdevicemap_SOURCES): Add
	util/i386/get_disk_name.c.
	* conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Likewise.
	* conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Add
	util/ieee1275/get_disk_name.c.

	* include/grub/util/misc.h: grub_util_get_disk_name() declaration.

	* DISTLIST: Add util/i386/get_disk_name.c and
	util/ieee1275/get_disk_name.c.

	* util/grub-mkdevicemap.c: Replace device naming logic with
	grub_util_get_disk_name() calls.
2007-08-28 10:18:10 +00:00
marco_g 8f096014e4 2007-08-02 Bean <bean123ch@gmail.com>
* conf/common.rmk (pkgdata_MODULES): Add ntfs.mod.
	(ntfs_mod_SOURCES): New variable.
	(ntfs_mod_CFLAGS): Likewise.
	(ntfs_mod_LDFLAGS): Likewise.

	* conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfs.c.
	(grub_probe_SOURCES): Likewise.
	(grub_emu_SOURCES): Likewise.

	* conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
	(grub_emu_SOURCES): Likewise.

	* conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
	(grub_emu_SOURCES): Likewise.

	* conf/misc.c (grub_utf16_to_utf8): Fix unicode conversion bug.

	* fs/ntfs.c: New file.
2007-08-02 19:12:52 +00:00
marco_g 0a203f83ff 2007-08-02 Marco Gerards <marco@gnu.org>
* conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/host.c' and
	`util/hostfs.c'.

	* disk/host.c: New file.

	* util/hostfs.c: Likewise.

	* fs/hfsplus.c (grub_hfsplus_mount): When reading out of disk,
	return `GRUB_ERR_BAD_FS'.
	* fs/sfs.c (grub_sfs_mount): Likewise.
	* fs/xfs.c (grub_xfs_mount): Likewise.

	* include/grub/disk.h (enum grub_disk_dev_id): Add
	`GRUB_DISK_DEVICE_HOST_ID'.

	* util/grub-emu.c (main): Initialize and de-initialize hostfs.
2007-08-02 17:24:06 +00:00
jerone e5dfe7775a This patch is to introduce multiboot 2 loading capabilities to grub2
for powerpc & i386-pc. This patch was more so started by Hollis
Blanchard getting multiboot 2 working for powerpc and I added to it
and cleaned it up.

One of the ideas with this patch is to keep everything under one
command for the user. So instead of having a "multiboot2" & "module2"
command, I created a proxy like mechanism so that you have only one
command for both multiboot 1 & 2 ... "multiboot". This is where
"loader/multiboot_loader.c" comes from. I could have integrated things
more but I figure the current approach will less likely break
anything.

So if your OS is multiboot 2 capable, the user would do the following
to load it up from a grub prompt:

grub> multiboot <location of kernel> <kernel args>
grub> module <some image> <multiboot tag> <image arguments>
grub> module <isome mage> <multiboot tag> <image arguments>
grub .....


The other thing that this patch does is it begins to make the
multiboot 1 code a bit more architecture agnostic so IF someone wanted
to implement it on another architecture they can.

A bit of file moving around and definition renaming is also apart of
this patch. I have also taken the time to make sure that it does not
break multiboot 1 loading on i386-pc. But mulitboot 2 may still need a
little more testing and work for i386-pc. Powerpc multiboot 2 has been
heavily tested and does work.
2007-07-25 00:44:03 +00:00
robertmh daf0f0ba3e 2007-07-22 Robert Millan <rmh@aybabtu.com>
* geninitheader.sh: Process file specified in first parameter rather
	than hardcoding grub_modules_init.lst.
	* geninit.sh: Likewise.  Also, construct header name dynamicaly rather
	than hardcoding grub_modules_init.h.

	* conf/common.rmk: Rename grub_modules_init.[ch] files associated with
	grub-emu to grub_emu_init.[ch].  Add rules to build analogous
	grub_probe_init.[ch] and grub_setup_init.[ch].

	* conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Replace
	grub_modules_init.h with grub_emu_init.h.
	(grub_probe_DEPENDENCIES, grub_probe_SOURCES): Add new
	grub_probe_init.[ch] files.
	* conf/i386-efi.rmk: Likewise.
	* conf/i386-pc.rmk: Likewise.
	(grub_setup_DEPENDENCIES, grub_setup_SOURCES): Add new
	grub_setup_init.[ch] files.

	* util/grub-emu.c: Replace grub_modules_init.h with grub_emu_init.h.
	* util/grub-probe.c: Include grub_probe_init.h.  Use grub_init_all()
	to initialize modules rather than a list of hardcoded functions.
	* util/i386/pc/grub-setup.c: Include grub_setup_init.h.  Use
	grub_init_all() to initialize modules rather than a list of hardcoded
	functions.
2007-07-22 19:17:27 +00:00
okuji 969c02ec31 2007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
* conf/i386-pc.rmk (CLEANFILES): Removed for grub-mkrescue,
    because this rule is automatically generated.
    (grub-mkrescue): Removed for the same reason as above.
2007-07-21 23:34:57 +00:00
robertmh eface1dc8a 2007-06-23 Robert Millan <rmh@aybabtu.com>
* conf/i386-pc.rmk: (pkgdata_MODULES): Add serial.mod.
2007-06-23 14:44:37 +00:00
robertmh 7ee367e49b 2007-06-11 Robert Millan <rmh@aybabtu.com>
* util/i386/pc/grub-mkrescue.in: New file.
	* conf/i386-pc.rmk: Add its build declarations.  Put it in bin_SCRIPTS.
	* Makefile.in: Handle bin_SCRIPTS.
2007-06-11 06:26:18 +00:00
robertmh fb36dc2693 2007-06-04 Robert Millan <rmh@aybabtu.com>
* conf/i386-efi.rmk (grub_probe_SOURCES): Add partmap/apple.c.

	* conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.

	* conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add partmap/pc.c.
2007-06-04 19:48:53 +00:00
robertmh 5beb22914d 2007-05-19 Robert Millan <rmh@aybabtu.com>
* commands/i386/cpuid.c: New module.
	* DISTLIST: Add it.
	* conf/i386-efi.rmk: Enable cpuid.mod.
	* conf/i386-pc.rmk: Likewise.
2007-05-20 07:20:43 +00:00
robertmh 8fff7c2f2a 2007-05-16 Robert Millan <rmh@aybabtu.com>
* DISTLIST: Update for the latest changes.
	* conf/i386-pc.rmk: Use the new paths for util/getroot.c,
	util/grub-mkdevicemap.c, util/grub-probe.c and util/biosdisk.c.
	* util/grub-emu.c: Replace grub/i386/pc/util/biosdisk.h with
	grub/util/biosdisk.h.
	* util/i386/pc/grub-setup.c: Replace grub/machine/util/biosdisk.h with
	grub/util/biosdisk.h.
2007-05-16 15:19:38 +00:00
robertmh 20b976586e 2007-05-05 Robert Millan <rmh@aybabtu.com>
* conf/i386-pc.rmk (grub_setup_SOURCES): Add partmap/gpt.c.
	(grub_probe_SOURCES): Likewise.
	* util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): Detect
	GPT and initialize dos_part and bsd_part accordingly.
	* util/i386/pc/grub-setup.c (setup): Ditto for install_dos_part and
	install_bsd_part.
	(main): Activate gpt module for use during partition identification,
	and deactivate it afterwards.
	* util/i386/pc/grub-install.in: Add gpt module to core.img.
	* util/i386/pc/grub-probe.c (main): Activate gpt module for use during
	partition identification, and deactivate it afterwards.
2007-05-04 23:00:56 +00:00
tschwinge 4fe9862ebb 2006-12-13 Thomas Schwinge <tschwinge@gnu.org>
* Makefile.in (enable_grub_emu): New variable.
	* configure.ac (--enable-grub-emu): New option.
	Do the checks for (n)curses only if `--enable-grub-emu' is requested.
	* conf/i386-efi.rmk (sbin_UTILITIES): Add `grub-emu' only if requested.
	* conf/i386-pc.rmk: Likewise.
	* conf/powerpc-ieee1275.rmk: Likewise.
	* conf/sparc64-ieee1275.rmk (bin_UTILITIES): Likewise.
2006-12-13 22:30:19 +00:00
jeroen 790707f254 2006-11-11 Jeroen Dekkers <jeroen@dekkers.cx>
* kern/disk.c (grub_disk_read): When there is a read error, always
	try to read only the necessary data.

	* conf/i386-pc.rmk (grub_probe_SOURCES): Add disk/lvm.c and
	disk/raid.c.
	* include/grub/disk.h [GRUB_UTIL] (grub_raid_init): New
	prototype.
	[GRUB_UTIL] (grub_raid_fini): Likewise.
	[GRUB_UTIL] (grub_lvm_init): Likewise.
	[GRUB_UTIL] (grub_lvm_fini): Likewise.
	* util/i386/pc/grub-probe.c (probe): Check whether DEVICE_NAME is
	RAID device and copy DEVICE_NAME to DRIVE_NAME in that case.
	(main): Call grub_raid_init(), grub_lvm_init(), grub_lvm_fini()
	and grub_raid_fini().
2006-11-10 23:31:55 +00:00
hollisb 2166cc8349 2006-11-03 Hollis Blanchard <hollis@penguinppc.org>
* conf/i386-efi.rmk (grub_emu_SOURCES): Add kern/elf.c.
	* conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
	* conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
	(kernel_elf_SOURCES): Likewise.
	* conf/i386-efi.rmk (kernel_mod_HEADERS): Add elfload.h and cache.h.
	* conf/i386-pc.rmk (kernel_mod_HEADERS): Likewise.
	* conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
	* conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
	* conf/common.rmk (pkgdata_MODULES): Add elf.mod.
	(elf_mod_SOURCES): New variable.
	(elf_mod_CFLAGS): Likewise.
	(elf_mod_LDFLAGS): Likewise.
	* include/grub/types.h (__unused): New macro.
	* include/grub/elfload.h: New file.
	* kern/elf.c: Likewise.
	* loader/powerpc/ieee1275/linux.c: Include elfload.h.
	(ELF32_LOADMASK): New macro.
	(ELF64_LOADMASK): Likewise.
	(vmlinux): Removed.
	(grub_linux_load32): New function.
	(grub_linux_load64): Likewise.
	(grub_rescue_cmd_linux): Call grub_linux_load32 or grub_linux_load64.
	Use grub_elf_t instead of grub_file_t.
2006-11-03 20:28:04 +00:00