1. 24 Jul, 2008 1 commit
    • bean's avatar
      2008-07-24 Bean <bean123ch@gmail.com> · 2a8a80e4
      bean authored
      	* 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.
      2a8a80e4
  2. 22 Jul, 2008 1 commit
    • robertmh's avatar
      2008-07-23 Robert Millan <rmh@aybabtu.com> · 12ccdb75
      robertmh authored
              * Makefile.in (UNICODE_ARROWS, UNICODE_LINES): New variables (they
              define the codes for arrows and lines used for the menu).
              (ascii.pff): Generate fonts for $(UNICODE_ARROWS) and $(UNICODE_LINES)
              as well.
      
              * util/update-grub_lib.in (font_path): Prefer ascii.pff over complete
              fonts, because the latter are too slow.
      12ccdb75
  3. 21 Jul, 2008 1 commit
    • bean's avatar
      2008-07-21 Bean <bean123ch@gmail.com> · 18eeaf04
      bean authored
      	* kern/i386/pc/startup.S (gate_a20_try_bios): Change test order for
      	a20. Run keyboard test last, as it will cause macbook to halt.
      18eeaf04
  4. 18 Jul, 2008 5 commits
  5. 17 Jul, 2008 5 commits
    • proski's avatar
      2008-07-17 Pavel Roskin <proski@gnu.org> · f6130a12
      proski authored
      	* aclocal.m4 (grub_PROG_TARGET_CC): New macro.  Check if the
      	target compiler is functional.
      	* configure.ac: Call grub_PROG_TARGET_CC once all target flags
      	are set up.
      f6130a12
    • proski's avatar
      2008-07-17 Pavel Roskin <proski@gnu.org> · 58393a2d
      proski authored
      	* configure.ac: Default to efi platform for x86_64-apple.  Allow
      	powerpc64 CPU, default to ieee1275 platform for it.  Split CPU
      	adjustments from the rest, only do them if target is not
      	explicitly given.  Merge other adjustments with the final sanity
      	check.  Remove an extraneous check for supported CPU.  Be
      	specific which CPU and which platform is not supported.
      58393a2d
    • proski's avatar
      2008-07-17 Pavel Roskin <proski@gnu.org> · 737feb35
      proski authored
      	* configure.ac: Default to pc platform for x86_64.
      737feb35
    • robertmh's avatar
      2008-07-17 Robert Millan <rmh@aybabtu.com> · 546f966a
      robertmh authored
              Partial LinuxBIOS -> Coreboot rename.
      
              * conf/i386-linuxbios.rmk: Renamed to ...
              * conf/i386-coreboot.rmk: ... this.
              * Makefile.in (RMKFILES): s/i386-linuxbios.rmk/i386-coreboot.rmk/g.
              * configure.ac: Accept coreboot as input platform (but maintain
              compatibility with linuxbios).
              * include/grub/i386/linuxbios: Renamed to ...
              * include/grub/i386/coreboot: ... this.
      546f966a
    • bean's avatar
      2008-07-17 Bean <bean123ch@gmail.com> · 20011694
      bean authored
      	* 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.
      20011694
  6. 16 Jul, 2008 2 commits
  7. 15 Jul, 2008 7 commits
  8. 14 Jul, 2008 2 commits
    • proski's avatar
      2008-07-14 Pavel Roskin <proski@gnu.org> · 407aceb4
      proski authored
      	* kern/env.c (grub_register_variable_hook): Don't copy empty
      	string, it leaks memory.  Pass "" to grub_env_set(), it should
      	handle constant strings.
      407aceb4
    • proski's avatar
      2008-07-14 Pavel Roskin <proski@gnu.org> · e4e8eaa5
      proski authored
      	* commands/blocklist.c (grub_cmd_blocklist): Fix format warning.
      	* commands/cmp.c (grub_cmd_cmp): Likewise.
      	* kern/dl.c (grub_dl_flush_cache): Likewise.
      	(grub_dl_load_core): Likewise.
      	* kern/elf.c (grub_elf32_load_phdrs): Likewise.
      	(grub_elf64_load_phdrs): Likewise.
      e4e8eaa5
  9. 13 Jul, 2008 4 commits
    • proski's avatar
      Fix typos in ChangeLog and comments · fe987087
      proski authored
      fe987087
    • proski's avatar
      2008-07-13 Pavel Roskin <proski@gnu.org> · d4e2dad3
      proski authored
      	* lib/LzmaEnc.c (LzmaEnc_SetProps): Fix warning about comparison
      	between signed and unsigned.
      	(LzmaEnc_Finish): Fix warning about an unused parameter.
      d4e2dad3
    • bean's avatar
      2008-07-13 Bean <bean123ch@gmail.com> · aa24b516
      bean authored
      	* 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.
      aa24b516
    • bean's avatar
      2008-07-13 Bean <bean123ch@gmail.com> · 4ae821ac
      bean authored
      	* fs/ext2.c (EXT4_EXTENTS_FLAG): New macro.
      	(grub_ext4_extent_header): New structure.
      	(grub_ext4_extent): Likewise.
      	(grub_ext4_extent_idx): Likewise.
      	(grub_ext4_find_leaf): New function.
      	(grub_ext2_read_block): Handle extents.
      4ae821ac
  10. 12 Jul, 2008 1 commit
  11. 11 Jul, 2008 3 commits
    • robertmh's avatar
      2008-07-11 Robert Millan <rmh@aybabtu.com> · d49a4cf6
      robertmh authored
              * util/grub.d/40_custom.in: New file. Example on how to add custom
              entries to /etc/grub.d.
              * conf/common.rmk (%, update-grub_SCRIPTS, CLEANFILES): Install
              40_custom (implicitly, by merging all the grub.d rules).
      d49a4cf6
    • proski's avatar
      2008-07-11 Pavel Roskin <proski@gnu.org> · 0059cf6f
      proski authored
      	* commands/read.c (grub_getline): Fix invalid memory access.
      	Don't add newline to the variable value.
      0059cf6f
    • proski's avatar
      2008-07-11 Pavel Roskin <proski@gnu.org> · 947414b4
      proski authored
      	* term/i386/pc/serial.c (GRUB_SERIAL_PORT_NUM): New constant.
      	[!GRUB_MACHINE_PCBIOS] (serial_hw_io_addr): Add COM2 and COM3.
      	(serial_hw_get_port): Check validity of the port number.
      	(grub_cmd_serial): Check return value of serial_hw_get_port().
      947414b4
  12. 07 Jul, 2008 1 commit
    • proski's avatar
      2008-07-07 Pavel Roskin <proski@gnu.org> · 62a02d00
      proski authored
      	* boot/i386/pc/diskboot.S (notification_string): Replace
      	"Loading kernel" with just "loading".  This is shorter, less
      	confusing and saves a few bytes for possible future changes.
      62a02d00
  13. 06 Jul, 2008 2 commits
  14. 04 Jul, 2008 4 commits
    • proski's avatar
      2008-07-04 Pavel Roskin <proski@gnu.org> · bcd35b90
      proski authored
      	* kern/i386/linuxbios/init.c (grub_machine_init): Cast addr to
      	grub_addr_t before casting it to the void pointer to fix a
      	warning.  Non-addressable regions are discarded earlier.
      	(grub_arch_modules_addr): Cast _end to grub_addr_t.
      	* kern/i386/linuxbios/table.c: Include grub/misc.h.
      	(check_signature): Don't shadow table_header.
      	(grub_linuxbios_table_iterate): Cast numeric constants to
      	grub_linuxbios_table_header_t.
      	* include/grub/i386/linuxbios/init.h: Add noreturn attribute to
      	grub_stop().
      bcd35b90
    • proski's avatar
      2008-07-04 Pavel Roskin <proski@gnu.org> · af58ab3d
      proski authored
      	* kern/ieee1275/init.c: Cast _start and _end to grub_addr_t to
      	prevent warnings.
      af58ab3d
    • proski's avatar
      2008-07-04 Pavel Roskin <proski@gnu.org> · 1759aa57
      proski authored
      	* include/grub/misc.h (ALIGN_UP): Avoid unnecessary cast to a
      	pointer, which can cause warnings.  Support 64-bit addresses.
      1759aa57
    • proski's avatar
      2008-07-04 Pavel Roskin <proski@gnu.org> · fdecb8fd
      proski authored
      	* util/elf/grub-mkimage.c: Use GRUB_TARGET_SIZEOF_LONG instead
      	of sizeof(long).  This fixes PowerPC image generation on x86_64.
      fdecb8fd
  15. 03 Jul, 2008 1 commit
    • robertmh's avatar
      2008-07-04 Robert Millan <rmh@aybabtu.com> · 8516d2a8
      robertmh authored
              This fixes a performance issue when pc & gpt partmap iterators
              didn't abort iteration even after our hook found what it was
              looking for (often causing expensive probes of non-existant drives).
      
              Some callers relied on previous buggy behaviour, since they would
              rise an error when their own hooks caused early abortion of its
              iteration.
      
              * kern/device.c (grub_device_open): Improve error message.
              * disk/lvm.c (grub_lvm_open): Likewise.
              * disk/raid.c (grub_raid_open): Likewise.
      
              * partmap/pc.c (pc_partition_map_iterate): Abort parent iteration
              when hook requests it, independently of grub_errno.
              (pc_partition_map_probe): Do not fail when find_func() caused
              early abortion of pc_partition_map_iterate().
      
              * partmap/gpt.c (gpt_partition_map_iterate): Abort parent iteration
              when hook requests it, independently of grub_errno.
              (gpt_partition_map_probe): Do not fail when find_func() caused
              early abortion of gpt_partition_map_iterate().
      
              * kern/partition.c (grub_partition_iterate): Abort parent iteration
              when hook requests it, independently of grub_errno.  Do not fail when
              part_map_iterate_hook() caused early abortion of p->iterate().
      
              * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Do not fail
              when grub_partition_iterate() returned with non-zero.
      8516d2a8