1 2008-08-03 Robert Millan <rmh@aybabtu.com>
3 * kern/i386/pc/init.c (make_install_device): Check for `grub_prefix'
4 instead of `grub_install_dos_part' to determine whether a drive needs
5 to be prepended to prefix (`grub_install_dos_part' is not reliable,
6 because it can be overriden when loading GRUB via Multiboot).
8 2008-08-02 Robert Millan <rmh@aybabtu.com>
10 * util/i386/pc/grub-install.in: Remove trailing slash from prefix.
12 2008-08-02 Robert Millan <rmh@aybabtu.com>
14 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Add a pair
15 of informational grub_dprintf() calls.
17 2008-08-02 Robert Millan <rmh@aybabtu.com>
19 * disk/memdisk.c (memdisk_size): Don't initialize.
20 (GRUB_MOD_INIT(memdisk)): Find memdisk using grub_module_iterate().
22 * include/grub/i386/pc/kernel.h
23 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): Remove macro.
24 (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Shift.
25 (grub_memdisk_image_size, grub_arch_memdisk_addr)
26 (grub_arch_memdisk_size): Remove.
28 * include/grub/kernel.h (struct grub_module_header): Remove `offset'
29 field (was only used to transfer a constant). Add `type' field to
30 support multiple module types.
31 (grub_module_iterate): New function.
33 * kern/device.c (grub_device_open): Do not hide error messages
34 when grub_disk_open() fails. Use grub_print_error() instead.
36 * kern/i386/pc/init.c (grub_arch_modules_addr)
37 (grub_arch_memdisk_size): Remove functions.
38 (grub_arch_modules_addr): Return the module address in high memory
39 (now that it isn't copied anymore).
41 * kern/i386/pc/startup.S (grub_memdisk_image_size): Remove variable.
42 (codestart): Don't add grub_memdisk_image_size to %ecx in LZMA
43 decompression routine (grub_total_module_size already includes that
44 now). Don't copy modules back to low memory.
46 * kern/main.c: Include `<grub/mm.h>'.
47 (grub_load_modules): Split out (and use) ...
48 (grub_module_iterate): ... this function, which iterates through
49 module objects and runs a hook.
50 Comment out grub_mm_init_region() call, as it would cause non-ELF
51 modules to be overwritten.
53 * util/i386/pc/grub-mkimage.c (generate_image): Instead of appending
54 the memdisk image in its own region, make it part of the module list.
55 * util/elf/grub-mkimage.c (options): Add "memdisk"|'m' option.
56 (main): Parse --memdisk|-m option, and pass user-provided path as
57 parameter to generate_image().
58 (add_segments): Pass `memdisk_path' down to load_modules().
59 (load_modules): Embed memdisk image in module section when requested.
60 * util/i386/efi/grub-mkimage.c (make_mods_section): Initialize
61 `header.type' instead of `header.offset'.
63 * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add `memdisk.mod'.
64 (memdisk_mod_SOURCES, memdisk_mod_CFLAGS)
65 (memdisk_mod_LDFLAGS): New variables.
66 * conf/i386-coreboot.rmk: Likewise.
67 * conf/i386-ieee1275.rmk: Likewise.
69 2008-08-02 Robert Millan <rmh@aybabtu.com>
71 * loader/i386/pc/multiboot.c (playground, forward_relocator)
72 (backward_relocator): New variables. Used to allocate and relocate
73 the payload, respectively.
74 (grub_multiboot_load_elf32): Load into heap instead of requested
75 address, install the appropiate relocator code in each bound of
76 the payload, and set the entry point such that
77 grub_multiboot_real_boot() will jump to one of them.
79 * kern/i386/loader.S (grub_multiboot_payload_size)
80 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
81 (grub_multiboot_payload_entry_offset): New variables.
82 (grub_multiboot_real_boot): Set cpu context to what the relocator
83 expects, and jump to the relocator instead of the payload.
85 * include/grub/i386/loader.h (grub_multiboot_payload_size)
86 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
87 (grub_multiboot_payload_entry_offset): Export.
89 2008-08-01 Bean <bean123ch@gmail.com>
91 * normal/menu_entry.c (editor_getline): Don't return the original
92 string as result, as it will be released by lexer once it has done
95 2008-08-01 Robert Millan <rmh@aybabtu.com>
97 * util/grub.d/10_linux.in: Use prepare_grub_to_access_device() from
98 within menuentries, not before them.
99 util/grub.d/10_hurd.in: Likewise.
101 2008-08-01 Bean <bean123ch@gmail.com>
103 * conf/common.rmk (pkglib_MODULES): Add bufio.mod.
104 (bufio_mod_SOURCES): New macro.
105 (bufio_mod_CFLAGS): Likewise.
106 (bufio_mod_LDFLAGS): Likewise.
108 * include/grub/bufio.h: New file.
110 * io/bufio.c: Likewise.
112 * video/png.c: Replace <grub/file.h> with <grub/bufio.h>.
113 (grub_video_reader_png): Use grub_buffile_open to open file.
115 * video/jpeg.c: Replace <grub/file.h> with <grub/bufio.h>.
116 (grub_video_reader_jpeg): Use grub_buffile_open to open file.
118 * video/tga.c: Replace <grub/file.h> with <grub/bufio.h>.
119 (grub_video_reader_tga): Use grub_buffile_open to open file.
121 * font/manager.c: Include <grub/bufio.h>.
122 (add_font): Use grub_buffile_open to open file.
124 2008-07-31 Robert Millan <rmh@aybabtu.com>
126 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): When loading
127 ELF segments, use a macro for arbitrarily accessing any of them instead
128 of preparing a pointer that allows access to one at a time.
129 (grub_multiboot_load_elf64): Likewise.
131 2008-07-31 Bean <bean123ch@gmail.com>
133 * boot/i386/pc/lnxboot.S (real_code_2): Replace 0x50 with
134 GRUB_KERNEL_MACHINE_DATA_END.
136 2008-07-30 Robert Millan <rmh@aybabtu.com>
138 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_DATA_END):
139 Increase from 0x50 to 0x60.
140 * util/i386/pc/grub-install.in: Detect cross-disk installs, and
141 use UUIDs to identify the root drive for them. If that's not
143 * util/i386/pc/grub-setup.c (setup): Do not special-case, or even
144 check, for cross-disk installs.
146 2008-07-30 Robert Millan <rmh@aybabtu.com>
148 * kern/ieee1275/init.c (grub_machine_set_prefix): If `grub_prefix'
149 is non-empty, use it to set the `prefix' environment variable instead
150 of the usual approach.
151 * kern/i386/linuxbios/init.c (make_install_device): Remove function.
152 (grub_machine_set_prefix): Use `grub_prefix' to set the `prefix'
153 environment variable instead of dummy make_install_device().
155 * kern/i386/ieee1275/startup.S: Include `<grub/machine/kernel.h>'.
156 (start): Insert a data section, with `grub_prefix' variable.
157 * kern/i386/linuxbios/startup.S: Likewise.
159 * include/grub/powerpc/ieee1275/kernel.h [!ASM_FILE] (grub_prefix):
160 New variable reference.
161 * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX):
162 New macro. Defines offset of `grub_prefix' within startup.S (relative
164 (GRUB_KERNEL_MACHINE_DATA_END): New macro. Defines the end of data
165 section within startup.S (relative to `start').
166 * include/grub/i386/coreboot/kernel.h: Likewise.
168 * util/elf/grub-mkimage.c (add_segments): Receive `prefix' parameter.
169 Overwrite grub_prefix with its contents, at the beginning of the
171 (main): Understand -p|--prefix.
173 2008-07-30 Robert Millan <rmh@aybabtu.com>
175 * util/grub.d/10_hurd.in: Source ${libdir}/grub/update-grub_lib.
177 2008-07-30 Robert Millan <rmh@aybabtu.com>
179 * term/i386/pc/vga_text.c (grub_console_cls): Use
180 grub_console_gotoxy() to go back to beginning of the screen.
181 Found by Patrick Georgi <patrick.georgi@coresystems.de>
183 2008-07-29 Christian Franke <franke@computer.org>
185 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
186 Add conversion of emulated mount points on Cygwin.
188 2008-07-29 Christian Franke <franke@computer.org>
190 * util/update-grub.in: Add a check for admin
192 Remove old `grub.cfg.new' before creation.
193 Add `-f' to `mv' to handle the different filesystem
194 semantics of Windows.
196 2008-07-29 Bean <bean123ch@gmail.com>
198 * normal/main.c (get_line): Fix buffer overflow bug.
200 2008-07-28 Robert Millan <rmh@aybabtu.com>
202 * partmap/apple.c (GRUB_APPLE_HEADER_MAGIC): New macro.
203 (struct grub_apple_header): New struct. Describes the layout of
205 (apple_partition_map_iterate): Check the header magic as well as the
206 partition magic (which was already being checked).
208 2008-07-28 Pavel Roskin <proski@gnu.org>
210 * genmk.rb: Add a warning to the beginning of the output that
211 it's a generated file and should not be edited.
213 2008-07-28 Robert Millan <rmh@aybabtu.com>
215 * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
216 with the same number are found, just use issue a warning with
217 grub_dprintf(), as this error has been reported to be non-fatal.
219 2008-07-27 Robert Millan <rmh@aybabtu.com>
221 * disk/ata.c (grub_ata_dumpinfo): Use grub_dprintf() for debugging
224 2008-07-27 Bean <bean123ch@gmail.com>
226 * fs/fat.c (GRUB_FAT_MAXFILE): New constant.
227 (grub_fat_find_dir): Ignore case when comparing filename.
229 2008-07-27 Bean <bean123ch@gmail.com>
231 * fs/xfs.c (grub_xfs_dir_header): Change field i8count back to
232 smallino, as it's more descriptive, and i8count can be confused with
233 the other field count.
234 (grub_xfs_iterate_dir): Adjust grub_xfs_dir_entry pointer for small
237 2008-07-27 Bean <bean123ch@gmail.com>
239 * commands/crc.c: New file.
241 * lib/crc.c: Likewise.
243 * include/grub/lib/crc.h: Likewise.
245 * util/grub-fstest.c: grub/hexdump.h => grub/lib/hexdump.h.
247 * commands/hexdump.c: grub/hexdump.h => grub/lib/hexdump.h.
248 (hexdump): Move this function to ...
250 * lib/hexdump.c: ... here.
252 * include/grub/hexdump.h: Renamed to ...
254 * include/grub/lib/hexdump.h: ... this.
256 * commands/loadenv.c: grub/envblk.h => grub/lib/envblk.h
258 * util/grub-editenv.c: Likewise.
260 * include/envblk.h: Renamed to ...
262 * include/lib/envblk.h: ... this.
264 * util/envblk.c: Renamed to ...
266 * lib/envblk.c: ... this.
268 * conf/common.rmk (grub_fstest_SOURCES): commands/hexdump.c =>
270 (grub_editenv_SOURCES): util/envblk.c => lib/envblk.c
271 (pkglib_MODULES): Add crc.mod.
272 (hexdump_mod_SOURCES): Add lib/hexdump.c.
273 (loadenv_mod_SOURCES): util/envblk.c => lib/envblk.c.
274 (crc_mod_SOURCES): New macro.
275 (crc_mod_CFLAGS): Likewise.
276 (crc_mod_LDFLAGS): Likewise.
278 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add lib/hexdump.c.
280 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
282 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
284 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
286 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
288 2008-07-27 Felix Zielcke <fzielcke@z-51.de>
290 * commands/help.c: Include <grub/term.h>.
291 (TERM_WIDTH): Removed. Updated all users.
293 2008-07-27 Pavel Roskin <proski@gnu.org>
295 * util/getroot.c (find_root_device): Rephrase a comment to avoid
296 spurious warnings about a comment within a comment.
298 2008-07-25 Robert Millan <rmh@aybabtu.com>
300 * util/getroot.c (find_root_device): Skip devices that match
301 /dev/dm-[0-9]. This lets the real device be found for any type of
302 abstraction (LVM, EVMS, RAID..).
303 (grub_guess_root_device): Do not traverse /dev/mapper (for LVM)
304 and /dev/evms (for EVMS) before traversing /dev. If a /dev/dm-[0-9]
305 device is found first, find_root_device() will now skip it.
307 2008-07-24 Pavel Roskin <proski@gnu.org>
309 * include/grub/types.h: Use __builtin_bswap32() and
310 __builtin_bswap64() with gcc 4.3 and newer.
312 2008-07-24 Christian Franke <franke@computer.org>
314 * util/i386/pc/grub-install.in: If `--debug' is specified,
315 pass `--verbose' to grub-setup.
316 Abort script if make_system_path_relative_to_its_root() fails.
318 2008-07-24 Bean <bean123ch@gmail.com>
320 * configure.ac: Fixed a bug caused by the previous cygwin patch,
321 variable `target_platform' should be `platform'.
323 2008-07-24 Bean <bean123ch@gmail.com>
325 * video/reader/png.c (DEFLATE_HLIT_MAX): Change value.
326 (grub_png_init_fixed_block): New function.
327 (grub_png_decode_image_data): Handle fixed huffman code compression.
329 2008-07-24 Bean <bean123ch@gmail.com>
331 * common.rmk (bin_UTILITIES): Add grub-pe2elf.
332 (grub_pe2elf_SOURCES): New macro.
333 (CLEANFILES): Add grub-pe2elf.
335 * include/grub/efi/pe32.h (GRUB_PE32_SCN_ALIGN_1BYTES): New constant.
336 (GRUB_PE32_SCN_ALIGN_2BYTES): Likewise.
337 (GRUB_PE32_SCN_ALIGN_4BYTES): Likewise.
338 (GRUB_PE32_SCN_ALIGN_8BYTES): Likewise.
339 (GRUB_PE32_SCN_ALIGN_16BYTES): Likewise.
340 (GRUB_PE32_SCN_ALIGN_32BYTES): Likewise.
341 (GRUB_PE32_SCN_ALIGN_64BYTES): Likewise.
342 (GRUB_PE32_SCN_ALIGN_SHIFT): Likewise.
343 (GRUB_PE32_SCN_ALIGN_MASK): Likewise.
344 (GRUB_PE32_SYM_CLASS_EXTERNAL): Likewise.
345 (GRUB_PE32_SYM_CLASS_STATIC): Likewise.
346 (GRUB_PE32_SYM_CLASS_FILE): Likewise.
347 (GRUB_PE32_DT_FUNCTION): Likewise.
348 (GRUB_PE32_REL_I386_DIR32): Likewise.
349 (GRUB_PE32_REL_I386_REL32): Likewise.
350 (grub_pe32_symbol): New structure.
351 (grub_pe32_reloc): Likewise.
353 * util/grub-pe2elf.c: New file.
355 * configure.ac: Set TARGET_OBJ2ELF if host os is cygwin. Don't test for
356 start symbol in non pc platform.
358 * genmk.rb: Use TARGET_OBJ2ELF to convert native object format to elf.
360 The following patches are from Christian Franke.
362 * include/grub/dl.h: Remove .previous, gas supports this only
365 * include/grub/symbol.h [__CYGWIN__] (#define FUNCTION/VARIABLE):
366 Remove .type, gas supports this only for ELF format.
368 * kern/dl.c (grub_dl_resolve_dependencies): Add check for trailing
369 nullbytes in symbol table. This fixes an infinite loop if table is
372 * Makefile.in: Add autoconf replacements TARGET_IMG_LDSCRIPT,
373 TARGET_IMG_LDFLAGS and EXEEXT.
375 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Replace -Wl,-N by
376 TARGET_IMG_LDFLAGS_AC.
377 (grub_CHECK_STACK_ARG_PROBE): New function.
379 * conf/i386-pc.rmk: Replace -Wl,-N by TARGET_IMG_LDFLAGS.
381 * conf/i386-pc-cygwin-ld-img.sc: New linker script.
383 * configure.ac: Add check for linker script "conf/${target}-img-ld.c"
384 to set TARGET_IMG_LD* accordingly.
385 Add check for Cygwin to set TARGET_MOD_OBJCOPY accordingly.
386 Add call to grub_CHECK_STACK_ARG_PROBE.
387 Use TARGET_IMG_LDFLAGS to check start, bss_start, end symbols.
389 * genkernsyms.sh.in: Handle HAVE_ASM_USCORE case.
391 * genmk.rb: Add EXEEXT to CLEANFILES.
393 2008-07-23 Robert Millan <rmh@aybabtu.com>
395 * Makefile.in (UNICODE_ARROWS, UNICODE_LINES): New variables (they
396 define the codes for arrows and lines used for the menu).
397 (ascii.pff): Generate fonts for $(UNICODE_ARROWS) and $(UNICODE_LINES)
400 * util/update-grub_lib.in (font_path): Prefer ascii.pff over complete
401 fonts, because the latter are too slow.
403 2008-07-21 Bean <bean123ch@gmail.com>
405 * kern/i386/pc/startup.S (gate_a20_try_bios): Change test order for
406 a20. Run keyboard test last, as it will cause macbook to halt.
408 2008-07-18 Pavel Roskin <proski@gnu.org>
410 * kern/dl.c: Go back to using GRUB_CPU_SIZEOF_VOID_P. We cannot
411 load foreign architecture modules correctly anyway. Keep
412 support for loading host architecture modules, whether we
415 2008-07-17 Pavel Roskin <proski@gnu.org>
417 * configure.ac: Use -m32 or -m64 regardless of whether we had to
418 change target_cpu. The compiler default can mismatch target_cpu
421 * disk/efi/efidisk.c: Fix format warnings on x86_64.
422 * kern/efi/efi.c: Likewise.
424 * aclocal.m4 (grub_PROG_TARGET_CC): New macro. Check if the
425 target compiler is functional.
426 * configure.ac: Call grub_PROG_TARGET_CC once all target flags
429 * configure.ac: Default to efi platform for x86_64-apple. Allow
430 powerpc64 CPU, default to ieee1275 platform for it. Split CPU
431 adjustments from the rest, only do them if target is not
432 explicitly given. Merge other adjustments with the final sanity
433 check. Remove an extraneous check for supported CPU. Be
434 specific which CPU and which platform is not supported.
436 * configure.ac: Default to pc platform for x86_64.
438 2008-07-17 Robert Millan <rmh@aybabtu.com>
440 Partial LinuxBIOS -> Coreboot rename.
442 * conf/i386-linuxbios.rmk: Renamed to ...
443 * conf/i386-coreboot.rmk: ... this.
444 * Makefile.in (RMKFILES): s/i386-linuxbios.rmk/i386-coreboot.rmk/g.
445 * configure.ac: Accept "coreboot" as input platform (but maintain
446 compatibility with "linuxbios").
447 * include/grub/i386/linuxbios: Renamed to ...
448 * include/grub/i386/coreboot: ... this.
450 2008-07-17 Bean <bean123ch@gmail.com>
452 * conf/i386/efi.rmk (pkglib_MODULES): add pci.mod and lspci.mod.
453 (appleldr_mod_SOURCE): New variable.
454 (appleldr_mod_CFLAGS): Likewise.
455 (appleldr_mod_LDFLAGS): Likewise.
456 (pci_mod_SOURCES): Likewise.
457 (pci_mod_CFLAGS): Likewise.
458 (pci_mod_LDFLAGS): Likewise.
459 (lspci_mod_SOURCES): Likewise.
460 (lspci_mod_CFLAGS): Likewise.
461 (lspci_mod_LDFLAGS): Likewise.
463 * conf/x86_64-efi.rmk: New file.
465 * disk/efi/efidisk.c (grub_efidisk_read): Wrap efi calls with efi_call_N
467 (grub_efidisk_write): Likewise.
469 * include/efi/api.h (efi_call_0): New macro.
470 (efi_call_1): Likewise.
471 (efi_call_2): Likewise.
472 (efi_call_3): Likewise.
473 (efi_call_4): Likewise.
474 (efi_call_5): Likewise.
475 (efi_call_6): Likewise.
477 * include/grub/efi/chainloader.h (grub_chainloader_cmd): Rename to
478 grub_rescue_cmd_chainloader.
480 * include/grub/efi/pe32.h (GRUB_PE32_MACHINE_X86_64): New macro.
481 (grub_pe32_optional_header): Change some fields based on i386 or
483 (GRUB_PE32_PE32_MAGIC): Likewise.
485 * include/grub/efi/uga_draw.h: New file.
487 * include/grub/elf.h (STN_ABS): New constant.
488 (R_X86_64_NONE): Relocation constant for x86_64.
489 (R_X86_64_64): Likewise.
490 (R_X86_64_PC32): Likewise.
491 (R_X86_64_GOT32): Likewise.
492 (R_X86_64_PLT32): Likewise.
493 (R_X86_64_COPY): Likewise.
494 (R_X86_64_GLOB_DAT): Likewise.
495 (R_X86_64_JUMP_SLOT): Likewise.
496 (R_X86_64_RELATIVE): Likewise.
497 (R_X86_64_GOTPCREL): Likewise.
498 (R_X86_64_32): Likewise.
499 (R_X86_64_32S): Likewise.
500 (R_X86_64_16): Likewise.
501 (R_X86_64_PC16): Likewise.
502 (R_X86_64_8): Likewise.
503 (R_X86_64_PC8): Likewise.
505 * include/grub/i386/efi/pci.h: New file.
507 * include/grub/i386/linux.h (GRUB_LINUX_EFI_SIGNATURE):
508 Change it value based on platform.
509 (GRUB_LINUX_EFI_SIGNATURE_0204): New constant.
510 (GRUB_E820_RAM): Likewise.
511 (GRUB_E820_RESERVED): Likewise.
512 (GRUB_E820_ACPI): Likewise.
513 (GRUB_E820_NVS): Likewise.
514 (GRUB_E820_EXEC_CODE): Likewise.
515 (GRUB_E820_MAX_ENTRY): Likewise.
516 (grub_e820_mmap): New structure.
517 (linux_kernel_header): Change the efi field according to different
518 kernel version, also field from linux_kernel_header.
520 * include/grub/kernel.h (grub_module_info): Add padding for x86_64.
522 * include/grub/pci.h (GRUB_PCI_ADDR_SPACE_MASK): New constant.
523 (GRUB_PCI_ADDR_SPACE_MEMORY): Likewise.
524 (GRUB_PCI_ADDR_SPACE_IO): Likewise.
525 (GRUB_PCI_ADDR_MEM_TYPE_MASK): Likewise.
526 (GRUB_PCI_ADDR_MEM_TYPE_32): Likewise.
527 (GRUB_PCI_ADDR_MEM_TYPE_1M): Likewise.
528 (GRUB_PCI_ADDR_MEM_TYPE_64): Likewise.
529 (GRUB_PCI_ADDR_MEM_PREFETCH): Likewise.
530 (GRUB_PCI_ADDR_MEM_MASK): Likewise.
531 (GRUB_PCI_ADDR_IO_MASK): Likewise.
533 * include/grub/x86_64/efi/kernel.h: New file.
535 * include/grub/x86_64/efi/loader.h: Likewise.
537 * include/grub/x86_64/efi/machine.h: Likewise.
539 * include/grub/x86_64/efi/pci.h: Likewise.
541 * include/grub/x86_64/efi/time.h: Likewise.
543 * include/grub/x86_64/linux.h: Likewise.
545 * include/grub/x86_64/setjmp.h: Likewise.
547 * include/grub/x86_64/time.h: Likewise.
549 * include/grub/x86_64/types.h: Likewise.
551 * kern/dl.c (GRUB_CPU_SIZEOF_VOID_P): Changed to
552 GRUB_TARGET_SIZEOF_VOID_P.
554 * kern/efi/efi.c (grub_efi_locate_protocol): Wrap efi calls.
555 (grub_efi_locate_handle): Likewise.
556 (grub_efi_open_protocol): Likewise.
557 (grub_efi_set_text_mode): Likewise.
558 (grub_efi_stall): Likewise.
559 (grub_exit): Likewise.
560 (grub_reboot): Likewise.
561 (grub_halt): Likewise.
562 (grub_efi_exit_boot_services): Likewise.
563 (grub_get_rtc): Likewise.
565 * kern/efi/mm.c (MEMORY_MAP_SIZE): Change to 0x3000 for new models.
566 (GRUB_CPU_SIZEOF_VOID_P): Changed to GRUB_TARGET_SIZEOF_VOID_P.
567 (grub_efi_allocate_pages): Wrap efi calls.
568 (grub_efi_free_pages): Wrap efi calls.
569 (grub_efi_get_memory_map): Wrap efi calls.
571 * kern/x86_64/dl.c: New file.
573 * kern/x86_64/efi/callwrap.S: Likewise.
575 * kern/x86_64/efi/startup.S: Likewise.
577 * loader/efi/appleloader.c: Likewise.
579 * loader/efi/chainloader.c (cmdline): New variable.
580 (grub_chainloader_unload): Wrap efi calls.
581 (grub_chainloader_boot): Likewise.
582 (grub_rescue_cmd_chainloader): Wrap efi calls, handle
585 * loader/efi/chainloader_normal.c (chainloader_command):
586 Change grub_chainloader_cmd to grub_rescue_cmd_chainloader, pass
589 * loader/i386/efi/linux.c (allocate_pages): Change allocation
591 (grub_e820_add_region): New function.
592 (grub_linux_boot): Construct e820 map from efi map, handle x86_64
594 (grub_find_video_card): New function.
595 (grub_linux_setup_video): New function.
596 (grub_rescue_cmd_linux): Probe for video information.
598 * normal/x86_64/setjmp.S: New file.
600 * term/efi/console.c (map_char): New function.
601 (grub_console_putchar): Map unicode char.
602 (grub_console_checkkey): Wrap efi calls.
603 (grub_console_getkey): Likewise.
604 (grub_console_getwh): Likewise.
605 (grub_console_gotoxy): Likewise.
606 (grub_console_cls): Likewise.
607 (grub_console_setcolorstate): Likewise.
608 (grub_console_setcursor): Likewise.
610 * util/i386/efi/grub-mkimage.c: Add support for x86_64.
612 2008-07-16 Pavel Roskin <proski@gnu.org>
614 * loader/i386/efi/linux.c (allocate_pages): Fix warnings in
617 * util/i386/efi/grub-mkimage.c (get_target_address): Return a
618 pointer, not an integer. This fixes a warning and prevents
619 precision loss on 64-bit systems.
620 (relocate_addresses): Remove unneeded cast.
622 2008-07-15 Pavel Roskin <proski@gnu.org>
624 * kern/i386/ieee1275/init.c: Include grub/cache.h.
626 * term/ieee1275/ofconsole.c: Disable code unused on i386.
628 * kern/ieee1275/ieee1275.c (grub_ieee1275_get_integer_property):
629 Fix comparison between signed and unsigned.
631 * include/grub/i386/ieee1275/console.h: Declare
632 grub_console_init() and grub_console_fini().
634 * loader/i386/ieee1275/linux.c (grub_set_bootpath): Remove.
635 It's empty and unused.
637 * fs/ext2.c (grub_ext2_read_block): Initialize blknr in the
638 beginning to avoid warnings with some compilers.
640 * loader/ieee1275/multiboot2.c: Include grub/machine/loader.h.
641 [__i386__] (grub_mb2_arch_boot): Avoid unnecessary cast.
643 2008-07-14 Pavel Roskin <proski@gnu.org>
645 * kern/env.c (grub_register_variable_hook): Don't copy empty
646 string, it leaks memory. Pass "" to grub_env_set(), it should
647 handle constant strings.
649 * commands/blocklist.c (grub_cmd_blocklist): Fix format warning.
650 * commands/cmp.c (grub_cmd_cmp): Likewise.
651 * kern/dl.c (grub_dl_flush_cache): Likewise.
652 (grub_dl_load_core): Likewise.
653 * kern/elf.c (grub_elf32_load_phdrs): Likewise.
654 (grub_elf64_load_phdrs): Likewise.
656 2008-07-13 Pavel Roskin <proski@gnu.org>
658 * lib/LzmaEnc.c (LzmaEnc_SetProps): Fix warning about comparison
659 between signed and unsigned.
660 (LzmaEnc_Finish): Fix warning about an unused parameter.
662 2008-07-13 Bean <bean123ch@gmail.com>
664 * Makefile.in (enable_lzo): New rule.
666 * conf/i386-pc.rmk (grub_mkimage_SOURCES): New test with enable_lzo.
668 * configure.ac (ENABLE_LZO): New option --enable-lzo.
670 * boot/i386/pc/lnxboot.S: #include <config.h>.
672 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE): Change
673 its value according to the compression algorithm used, lzo or lzma.
675 * util/i386/pc/grub-mkimage.c (compress_kernel): Use different
676 compression algorithm according to configure macro.
678 * kern/i386/pc/startup.S (codestart): Likewise.
680 * kern/i386/pc/lzma_decode.S: New file.
682 * include/grub/lib/LzFind.h: Likewise.
684 * include/grub/lib/LzHash.h: Likewise.
686 * include/grub/lib/LzmaDec.h: Likewise.
688 * include/grub/lib/LzmaEnc.h: Likewise.
690 * include/grub/lib/LzmaTypes.h: Likewise.
692 * lib/LzFind.c: Likewise.
694 * lib/LzmaDec.c: Likewise.
696 * lib/LzmaEnc.c: Likewise.
698 2008-07-13 Bean <bean123ch@gmail.com>
700 * fs/ext2.c (EXT4_EXTENTS_FLAG): New macro.
701 (grub_ext4_extent_header): New structure.
702 (grub_ext4_extent): Likewise.
703 (grub_ext4_extent_idx): Likewise.
704 (grub_ext4_find_leaf): New function.
705 (grub_ext2_read_block): Handle extents.
707 2008-07-12 Robert Millan <rmh@aybabtu.com>
709 * util/i386/pc/grub-mkrescue.in: s/grub-install/grub-mkrescue/g.
711 2008-07-11 Robert Millan <rmh@aybabtu.com>
713 * util/grub.d/40_custom.in: New file. Example on how to add custom
714 entries to /etc/grub.d.
715 * conf/common.rmk (%, update-grub_SCRIPTS, CLEANFILES): Install
716 40_custom (implicitly, by merging all the grub.d rules).
718 2008-07-11 Pavel Roskin <proski@gnu.org>
720 * commands/read.c (grub_getline): Fix invalid memory access.
721 Don't add newline to the variable value.
723 * term/i386/pc/serial.c (GRUB_SERIAL_PORT_NUM): New constant.
724 [!GRUB_MACHINE_PCBIOS] (serial_hw_io_addr): Add COM2 and COM3.
725 (serial_hw_get_port): Check validity of the port number.
726 (grub_cmd_serial): Check return value of serial_hw_get_port().
728 2008-07-07 Pavel Roskin <proski@gnu.org>
730 * boot/i386/pc/diskboot.S (notification_string): Replace
731 "Loading kernel" with just "loading". This is shorter, less
732 confusing and saves a few bytes for possible future changes.
734 2008-07-05 Pavel Roskin <proski@gnu.org>
736 * disk/ata.c (grub_ata_dumpinfo): Don't output addressing and
737 size for ATAPI devices, they are undefined. Output sector
738 number in decimal form.
740 * disk/ata.c: Use named constants for status bits.
742 2008-07-04 Pavel Roskin <proski@gnu.org>
744 * kern/i386/linuxbios/init.c (grub_machine_init): Cast addr to
745 grub_addr_t before casting it to the void pointer to fix a
746 warning. Non-addressable regions are discarded earlier.
747 (grub_arch_modules_addr): Cast _end to grub_addr_t.
748 * kern/i386/linuxbios/table.c: Include grub/misc.h.
749 (check_signature): Don't shadow table_header.
750 (grub_linuxbios_table_iterate): Cast numeric constants to
751 grub_linuxbios_table_header_t.
752 * include/grub/i386/linuxbios/init.h: Add noreturn attribute to
755 * kern/ieee1275/init.c: Cast _start and _end to grub_addr_t to
758 * include/grub/misc.h (ALIGN_UP): Avoid unnecessary cast to a
759 pointer, which can cause warnings. Support 64-bit addresses.
761 * util/elf/grub-mkimage.c: Use GRUB_TARGET_SIZEOF_LONG instead
762 of sizeof(long). This fixes PowerPC image generation on x86_64.
764 2008-07-04 Robert Millan <rmh@aybabtu.com>
766 This fixes a performance issue when pc & gpt partmap iterators
767 didn't abort iteration even after our hook found what it was
768 looking for (often causing expensive probes of non-existent drives).
770 Some callers relied on previous buggy behaviour, since they would
771 rise an error when their own hooks caused early abortion of its
774 * kern/device.c (grub_device_open): Improve error message.
775 * disk/lvm.c (grub_lvm_open): Likewise.
776 * disk/raid.c (grub_raid_open): Likewise.
778 * partmap/pc.c (pc_partition_map_iterate): Abort parent iteration
779 when hook requests it, independently of grub_errno.
780 (pc_partition_map_probe): Do not fail when find_func() caused
781 early abortion of pc_partition_map_iterate().
783 * partmap/gpt.c (gpt_partition_map_iterate): Abort parent iteration
784 when hook requests it, independently of grub_errno.
785 (gpt_partition_map_probe): Do not fail when find_func() caused
786 early abortion of gpt_partition_map_iterate().
788 * kern/partition.c (grub_partition_iterate): Abort parent iteration
789 when hook requests it, independently of grub_errno. Do not fail when
790 part_map_iterate_hook() caused early abortion of p->iterate().
792 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Do not fail
793 when grub_partition_iterate() returned with non-zero.
795 2008-07-03 Pavel Roskin <proski@gnu.org>
797 * disk/ata.c (grub_ata_pio_write): Check status before writing,
798 like we do in grub_ata_pio_read().
799 (grub_ata_readwrite): Always write individual sectors. Fix the
800 sector count for the remainder.
801 (grub_ata_write): Enable writing to ATA devices. Correctly
802 report error for ATAPI devices.
804 2008-07-02 Pavel Roskin <proski@gnu.org>
806 * boot/i386/pc/cdboot.S: Add _start entry to fix a linker
809 * disk/ata.c (grub_ata_readwrite): Don't increment sector number
810 for every read sector, we already increment it for the whole
811 batch. This fixes reading more than 256 sectors at once.
813 * util/grub-editenv.c (cmd_info): Cast argument to long
814 explicitly. ptrdiff_t reduces to int on i386.
816 * util/grub-editenv.c (main): Be specific which parameter is
819 * disk/memdisk.c (memdisk_addr): Make a pointer to fix warnings.
820 (memdisk): Make memdisk_orig_addr a pointer.
822 * fs/reiserfs.c (grub_reiserfs_read): Fix misuse of grub_size_t
823 for file offsets, use grub_off_t instead. Fix printf format
826 * fs/reiserfs.c: Remove #warning, TODO list items don't belong
827 there. Real unexpected warnings should not drown in the noise
828 about known problems.
830 * commands/hexdump.c (grub_cmd_hexdump): Fix misuse of
831 grub_disk_addr_t for memory addresses.
833 * loader/aout.c (grub_aout_load): Cast load_addr to pointer
834 explicitly to fix a warning.
836 * util/grub-editenv.c (cmd_info): Fix warning in printf format.
838 * Makefile.in (MODULE_LDFLAGS): New variable.
839 * aclocal.m4 (grub_PROG_LD_BUILD_ID_NONE): New macro. Check if
840 the linker accepts --build-id=none.
841 * configure.ac: Call grub_PROG_LD_BUILD_ID_NONE. Substitute
843 * genmk.rb: Use MODULE_LDFLAGS when linking modules.
845 * fs/xfs.c (struct grub_xfs_dir_header): Use names similar to
846 those in Linux XFS code. Provide a way to access 64-bit parent
848 (grub_xfs_iterate_dir): Use the new names. Avoid reading past
849 the end of struct grub_xfs_dir_header.
851 2008-07-02 Bean <bean123ch@gmail.com>
853 * include/grub/ieee1275.h (grub_ieee1275_flag): New constant
854 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
855 and GRUB_IEEE1275_FLAG_NO_ANSI.
857 * kern/ieee1275/cmain.c (grub_ieee1275_find_options): Set flag
858 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
859 and GRUB_IEEE1275_FLAG_NO_ANSI for Open Hackware.
861 * kern/ieee1275/ieee1275.c (grub_ieee1275_interpret): Return
862 immediately if GRUB_IEEE1275_FLAG_CANNOT_INTERPRET is set.
864 * kern/ieee1275/init.c (grub_claim_heap): Claim memory directly if
865 GRUB_IEEE1275_FLAG_FORCE_CLAIM is set.
867 * term/ieee1275/ofconsole.c (grub_ofconsole_writeesc): Don't output
868 esc sequence on non ANSI terminal.
869 (grub_ofconsole_gotoxy): Emulate backspace key on non ANSI terminal.
871 * util/elf/grub-mkimage.c (add_segments): Move ELF header to the
874 2008-07-02 Bean <bean123ch@gmail.com>
876 * conf/common.rmk (bin_UTILITIES): Add grub-editenv.
877 (grub_editenv_SOURCES): New variable.
878 (pkglib_MODULES): Add loadenv.mod.
879 (loadenv_mod_SOURCES): New variable.
880 (loadenv_mod_CFLAGS): Likewise.
881 (loadenv_mod_LDFLAGS): Likewise.
883 * include/grub/envblk.h: New file.
885 * util/envblk.c: New file.
887 * util/grub-editenv.c: New file.
889 * commands/loadenv.c: New file.
891 2008-07-01 Pavel Roskin <proski@gnu.org>
893 * include/multiboot2.h (struct multiboot_tag_module): Use char,
894 not unsigned char. This fixes warnings and is consistent with
897 * disk/fs_uuid.c (search_fs_uuid): Correctly increment count.
899 * normal/parser.y: Define YYENABLE_NLS as 0 to fix warnings.
901 * term/tparm.c (analyze): Always set *popcount.
903 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Remove useless
904 cast to fix a warning.
906 * loader/i386/pc/multiboot2.c (grub_mb2_arch_module_alloc): Use
907 cast to suppress a warning.
909 * fs/afs.c (grub_afs_read_block): Return grub_disk_addr_t, as
910 grub_fshelp_read_file() expects.
912 * fs/fat.c: Fix UUID calculation on big-endian systems. We
913 write uuid as a 32-bit value in CPU byte order, so declare and
916 * disk/raid.c: Cast grub_dprintf() arguments to unsigned long
917 long if the format specifier expects it.
918 * partmap/gpt.c (gpt_partition_map_iterate): Likewise.
919 * partmap/pc.c (pc_partition_map_iterate): Likewise.
920 * fs/ntfs.c (grub_ntfs_uuid): Cast data->uuid to unsigned long
921 long to fix a warning.
922 * fs/reiserfs.c (grub_reiserfs_read): Change casts in
923 grub_dprintf() arguments to fix warnings.
925 2008-06-30 Pavel Roskin <proski@gnu.org>
927 * util/i386/pc/grub-setup.c (setup): Write install_dos_part and
928 install_bsd_part immediately before core.img is embedded or
929 modified on disk. This fixes core.img verification if core.img
932 * util/i386/pc/grub-setup.c (setup): Use core_path_dev, not
933 core_path to calculate the blocklist.
934 Patch from Javier MartÃn <lordhabbit@gmail.com>
936 2008-06-29 Robert Millan <rmh@aybabtu.com>
938 * fs/xfs.c (GRUB_XFS_FSB_TO_BLOCK): New macro. Maps filesystem
940 (grub_xfs_read_block): Use GRUB_XFS_FSB_TO_BLOCK() on result.
941 Patch from Niels Böhm <bitbucket@arcor.de>
943 2008-06-29 Robert Millan <rmh@aybabtu.com>
945 * util/update-grub_lib.in (font_path): Search for fonts in
946 /boot/grub first, which is more likely to be readable (we aren't
947 deciding where fonts live, just looking for them).
949 2008-06-26 Pavel Roskin <proski@gnu.org>
951 * util/biosdisk.c (read_device_map): Don't leave dead map
952 entries for devices failing stat() check.
954 * util/i386/pc/grub-setup.c (setup): Don't reuse core_path, use
955 core_path_dev for the core.img path on the target device.
957 2008-06-26 Robert Millan <rmh@aybabtu.com>
959 * disk/fs_uuid.c: New file.
960 * conf/common.rmk (pkglib_MODULES): Add `fs_uuid.mod'.
961 (fs_uuid_mod_SOURCES, fs_uuid_mod_CFLAGS)
962 (fs_uuid_mod_LDFLAGS): New variables.
963 * include/grub/disk.h (grub_disk_dev_id): Add
964 `GRUB_DISK_DEVICE_UUID_ID'.
965 * kern/disk.c (grub_disk_dev_iterate): Allow disk devices not to
968 2008-06-26 Robert Millan <rmh@aybabtu.com>
970 * util/grub.d/10_linux.in: Avoid passing UUIDs to Linux when either
971 "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" does not exist, or when a
972 Linux image includes no initrd.
974 2008-06-21 Javier MartÃn <lordhabbit@gmail.com>
976 * util/i386/pc/grub-setup.c (setup): Remove literal "core.img" in a
977 call to resolve the core image location that effectively appended the
980 2008-06-21 Robert Millan <rmh@aybabtu.com>
982 * util/grub.d/00_header.in: Move last prepare_grub_to_access_device()
985 * util/grub.d/10_hurd.in: ... to here ...
986 * util/grub.d/10_linux.in: ... and here.
988 2008-06-19 Robert Millan <rmh@aybabtu.com>
990 * kern/main.c (grub_main): Export `prefix' variable immediately
991 after it has been set by grub_machine_set_prefix().
993 2008-06-19 Robert Millan <rmh@aybabtu.com>
995 * commands/search.c (search_label, search_fs_uuid, search_file): Print
996 search result when not saving to variable, not the other way around.
997 When saving to variable, abort iteration as soon as a match is found.
999 2008-06-19 Robert Millan <rmh@aybabtu.com>
1001 * util/update-grub_lib.in (prepare_grub_to_access_device): Remove
1002 check for partition that provides /boot/grub. Its logic is flawed,
1003 as it prevents prepare_grub_to_access_device() from being called
1006 2008-06-19 Robert Millan <rmh@aybabtu.com>
1008 * util/update-grub_lib.in (prepare_grub_to_access_device): Issue
1009 "insmod" command directly when abstraction modules are needed,
1010 instead of relying on GRUB_PRELOAD_MODULES (which had no effect
1011 since it had already been processed).
1013 2008-06-19 Pavel Roskin <proski@gnu.org>
1015 * conf/i386-efi.rmk: Recompile grub-mkimage.c if Makefile has
1016 changed. This is needed in case GRUB_LIBDIR changes.
1017 * conf/i386-ieee1275.rmk: Likewise.
1018 * conf/i386-linuxbios.rmk: Likewise.
1019 * conf/i386-pc.rmk: Likewise.
1020 * conf/powerpc-ieee1275.rmk: Likewise.
1022 2008-06-18 Pavel Roskin <proski@gnu.org>
1024 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Rename
1025 kernel_elf_symlist.c to symlist.c for consistency with other
1026 architectures. Update all users.
1027 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
1029 2008-06-18 Robert Millan <rmh@aybabtu.com>
1031 * util/i386/pc/grub-install.in: If the drive is LVM or RAID, prepend
1034 * util/i386/pc/grub-setup.c (main): Don't handle prefix at all. Set
1035 `must_embed' to 1 when root_dev is a RAID device. When dest_dev is
1036 a RAID device, run setup() for all members independently on whether
1037 LVM abstraction is being used.
1038 (setup): Don't handle prefix at all; let grub-mkimage take care of it.
1039 If grub-mkimage has set `*install_dos_part == -2', don't override this
1041 Perform *install_dos_part adjustments independently on whether
1042 we're embedding or not.
1043 Clarify error message when image is too big for embedding.
1044 Remove duplicate *install_dos_part stanza.
1046 2008-06-17 Robert Millan <rmh@aybabtu.com>
1048 * term/ieee1275/ofconsole.c (fgcolor, bgcolor): Remove variables.
1049 (grub_ofconsole_normal_color, grub_ofconsole_highlight_color): New
1051 (grub_ofconsole_setcolor, grub_ofconsole_getcolor): Load/store
1052 values in grub_ofconsole_normal_color and
1053 grub_ofconsole_highlight_color (they're not directly related to
1054 background and foreground).
1055 (grub_ofconsole_setcolorstate): Extract background and foreground
1056 from grub_ofconsole_normal_color and grub_ofconsole_highlight_color.
1058 2008-06-17 Robert Millan <rmh@aybabtu.com>
1060 * util/update-grub_lib.in (prepare_grub_to_access_device): Use
1061 /boot/grub for the check in last commit, not /boot (they could be
1062 different partitions).
1064 2008-06-16 Robert Millan <rmh@aybabtu.com>
1066 * util/update-grub_lib.in (prepare_grub_to_access_device): If we were
1067 asked to setup access for the same partition that provides /boot,
1068 don't bother using UUIDs since our root already has the value we
1071 2008-06-16 Robert Millan <rmh@aybabtu.com>
1073 * util/biosdisk.c (convert_system_partition_to_system_disk): Detect
1075 Patch from Sven Mueller <sven@debian.org>.
1077 2008-06-16 Robert Millan <rmh@aybabtu.com>
1079 * util/update-grub.in: Check for $EUID instead of $UID.
1080 Reported by Vincent Zweije.
1082 2008-06-16 Bean <bean123ch@gmail.com>
1084 * fs/ext2.c (grub_ext2_blockgroup): Revert to pre-journal state.
1085 (grub_ext2_read_block): Likewise.
1086 (grub_ext2_read_inode): Likewise.
1087 (grub_ext2_mount): Likewise.
1088 (grub_ext2_close): Likewise.
1089 (grub_ext3_get_journal): Removed.
1091 * fs/reiserfs.c (grub_reiserfs_get_item): Revert to pre-journal state.
1092 (grub_reiserfs_read_symlink): Likewise.
1093 (grub_reiserfs_mount): Likewise.
1094 (grub_reiserfs_open): Likewise.
1095 (grub_reiserfs_read): Likewise.
1096 (grub_reiserfs_close): Likewise.
1097 (grub_reiserfs_get_journal): Removed.
1099 * fs/fshelp.c (grub_fshelp_read): Removed.
1100 (grub_fshelp_map_block): Likewise.
1102 * include/grub/fshelp.h (grub_fshelp_journal_type): Removed.
1103 (grub_fshelp_journal): Likewise.
1104 (grub_fshelp_read): Likewise.
1105 (grub_fshelp_map_block): Likewise.
1107 2008-06-16 Pavel Roskin <proski@gnu.org>
1109 * conf/powerpc-ieee1275.rmk: Remove -msoft-float, we don't use
1110 floating point anymore.
1111 * include/grub/powerpc/libgcc.h: Leave only necessary exports.
1113 2008-06-15 Pavel Roskin <proski@gnu.org>
1115 * commands/ls.c (grub_ls_list_files): Use integer calculations
1116 for human readable format, avoid floating point use.
1117 * kern/misc.c (grub_ftoa): Remove.
1118 (grub_vsprintf): Remove floating point support.
1120 2008-06-15 Robert Millan <rmh@aybabtu.com>
1122 * util/grub.d/10_linux.in: Use the underlying device for loop-AES
1124 Reported by Max Vozeler.
1126 2008-06-15 Robert Millan <rmh@aybabtu.com>
1128 * util/i386/pc/grub-mkimage.c (generate_image): If we included a drive
1129 in our prefix, set install_{dos,bsd}_part = -2 to indicate this can be
1131 (main): If a memdisk was requested, add "(memdisk)" drive explicitly to
1132 the beginning of the prefix.
1134 * kern/i386/pc/init.c (make_install_device): Remove memdisk check.
1135 It is assumed that if we have a memdisk, grub-mkimage has set
1136 grub_prefix to include the "(memdisk)" drive in it.
1138 2008-06-15 Robert Millan <rmh@aybabtu.com>
1140 * term/i386/pc/console.c [GRUB_MACHINE_LINUXBIOS] (grub_console_init):
1141 Initialize keyboard controller after registering the terminal, so that
1142 grub_printf() can be called from grub_keyboard_controller_init().
1144 2008-06-15 Robert Millan <rmh@aybabtu.com>
1146 * fs/sfs.c (grub_sfs_read_extent): Fix the count of nodes in
1147 extent-btree which is written as big endian on disk.
1148 Reported by Alain Greppin <al@chilibi.org>.
1150 2008-06-14 Robert Millan <rmh@aybabtu.com>
1152 * util/i386/efi/grub-install.in (modules): Remove `_chain'.
1153 * util/i386/pc/grub-install.in (modules): Likewise.
1155 2008-06-13 Pavel Roskin <proski@gnu.org>
1157 * commands/ls.c (grub_ls_list_files): Fix format warnings.
1159 2008-06-13 Bean <bean123ch@gmail.com>
1161 * commands/hexdump.c (grub_cmd_hexdump): Adjust offset for partition.
1163 * fs/ext2.c (grub_ext3_get_journal): Fix revoke block handling.
1165 * fs/fshelp.c (grub_fshelp_map_block): Don't map block 0 as it's used
1166 to indicate sparse block.
1168 2008-06-12 Pavel Roskin <proski@gnu.org>
1170 * fs/ext2.c (grub_ext2_read_inode): Don't normalize block
1171 number, grub_fshelp_read() does it for us.
1173 * fs/fshelp.c (grub_fshelp_read): New function. Implement
1174 linear disk read with journal translation.
1175 * fs/ext2.c: Use grub_fshelp_read() instead of grub_disk_read().
1176 * include/grub/fshelp.h: Declare grub_fshelp_read().
1178 2008-06-09 Pavel Roskin <proski@gnu.org>
1180 * fs/minix.c (grub_minix_mount): Handle error reading
1183 2008-06-08 Robert Millan <rmh@aybabtu.com>
1185 * util/i386/pc/grub-setup.c (main): If install drive is an LVM,
1186 don't append the RAID prefix afterwards.
1187 Reported by Clint Adams.
1189 2008-06-08 Robert Millan <rmh@aybabtu.com>
1191 Based on description from Pavel:
1192 * kern/disk.c (grub_disk_check_range): Rename to ...
1193 (grub_disk_adjust_range): ... this. Add a comment explaining the
1194 tasks performed by this function.
1196 2008-06-08 Robert Millan <rmh@aybabtu.com>
1198 * include/grub/ntfs.h (struct grub_ntfs_bpb): Rename `serial_number' to
1199 `num_serial' (for consistency with other variables).
1200 (struct grub_ntfs_data): Add `uuid' member.
1201 * fs/ntfs.c (grub_ntfs_mount): Initialize `data->uuid'.
1202 (grub_ntfs_uuid): New function.
1203 (grub_ntfs_fs): Reference grub_ntfs_uuid() in `uuid' struct member.
1205 2008-06-07 Pavel Roskin <proski@gnu.org>
1207 * util/biosdisk.c (open_device): Revert last change to the
1208 function, it broke installation. The sector needs to be
1209 different dependent on which device is opened.
1211 2008-06-06 Robert Millan <rmh@aybabtu.com>
1213 Ensure GRUB_KERNEL_MACHINE_DATA_END is always consistent with the
1214 rest of GRUB, and breakage doesn't happen if its value were modified.
1216 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
1217 Redefine as an offset from `GRUB_KERNEL_MACHINE_DATA_END' instead of
1218 a constant (same value).
1219 * kern/i386/pc/startup.S: Replace hardcoded `0x50' with
1220 `GRUB_KERNEL_MACHINE_DATA_END' (same value).
1222 2008-06-06 Robert Millan <rmh@aybabtu.com>
1224 * util/biosdisk.c (open_device): Do not modify sector offset when
1225 accessing a partition. kern/disk.c already handles this for us.
1227 2008-06-06 Robert Millan <rmh@aybabtu.com>
1229 * util/grub-emu.c (grub_machine_init): Move code in this function from
1231 (main): ... to here (before grub_util_biosdisk_init() call, to prevent
1232 segfault in case grub_printf() is called).
1234 * util/i386/pc/grub-install.in: Append `--device-map=${device_map}' to
1235 grub_probe. Update all users not to explicitly add it again.
1236 (grub_device): New variable; contains corresponding device for grubdir.
1237 (fs_module, partmap_module, devabstraction_module): Pass
1238 `--device ${grub_device}' to grub_probe to avoid traversing /dev
1241 2008-06-05 Robert Millan <rmh@aybabtu.com>
1243 * normal/misc.c (grub_normal_print_device_info): When a filesystem UUID
1244 is found, print it (same layout as with labels).
1246 2008-06-04 Robert Millan <rmh@aybabtu.com>
1248 * util/biosdisk.c (get_drive): Rename to ...
1249 (find_grub_drive): ... this. Update all users.
1251 (get_os_disk): Rename to ...
1252 (convert_system_partition_to_system_disk): ... this. Update all users.
1254 (find_drive): Rename to ...
1255 (find_system_device): ... this. Update all users.
1257 2008-06-04 Robert Millan <rmh@aybabtu.com>
1259 * util/biosdisk.c (get_os_disk): Handle IDA devices.
1260 * util/grub-mkdevicemap.c (get_mmc_disk_name)
1261 (make_device_map): Likewise.
1263 2008-06-01 Robert Millan <rmh@aybabtu.com>
1265 * util/biosdisk.c (get_drive): Verify that `map[i].drive' is non-NULL
1266 before dereferencing it.
1268 * fs/fat.c (struct grub_fat_bpb): Move fat32-specific fields into a
1269 union with fat12/fat16-specific ones. Add some new fields, including
1270 `num_serial' for both versions.
1271 (struct grub_fat_data): Add `uuid' member.
1272 (grub_fat_mount): Refer to fat32-specific fields in `bpb' by their new
1273 names. Initialize `data->uuid' using `num_serial'.
1274 (grub_fat_uuid): New function.
1275 (grub_fat_fs): Reference grub_fat_uuid() in `uuid' struct member.
1277 * fs/reiserfs.c (grub_reiserfs_superblock): Add `uuid' field.
1278 (grub_reiserfs_uuid): New function.
1279 (grub_reiserfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct
1282 * fs/xfs.c (grub_xfs_sblock): Add `uuid' field.
1283 (grub_xfs_uuid): New function.
1284 (grub_xfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct member.
1286 2008-06-01 Robert Millan <rmh@aybabtu.com>
1288 * util/update-grub_lib.in (prepare_grub_to_access_device): Generate
1289 code that is backward compatible with pre-uuid search command.
1291 2008-05-31 Robert Millan <rmh@aybabtu.com>
1293 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Iterate through
1294 floppies after everything else, to ensure floppy drive isn't accessed
1295 unnecessarily (patch from Bean).
1297 2008-05-31 Robert Millan <rmh@aybabtu.com>
1299 * commands/search.c (search_label, search_fs_uuid, search_file): Do
1300 not print device names when we were asked to set a variable.
1302 2008-05-31 Robert Millan <rmh@aybabtu.com>
1304 * term/ieee1275/ofconsole.c (grub_ofconsole_setcursor): Implement
1305 using "cursor-on" and "cursor-off" commands (understood at least by
1306 the Open Firmware flavour on OLPC).
1308 2008-05-31 Michael Gorven <michael@gorven.za.net>
1310 * term/terminfo.c (grub_terminfo_set_current): Correct vt100 cursor
1311 on and off sequences.
1313 2008-05-31 Robert Millan <rmh@aybabtu.com>
1315 * util/update-grub_lib.in: Replace `grub-probe' with `${grub_probe}'.
1316 * util/update-grub.in: Likewise.
1318 2008-05-30 Pavel Roskin <proski@gnu.org>
1320 * util/biosdisk.c (linux_find_partition): Simplify logic and
1321 make the code more universal. Keep special processing for
1322 devfs, but use a simple rule for all other devices. If the
1323 device ends with a number, append 'p' and the partition number.
1324 Otherwise, append only the partition number.
1326 2008-05-30 Robert Millan <rmh@aybabtu.com>
1328 * util/update-grub.in (GRUB_DISABLE_LINUX_UUID): Export variable.
1329 * util/grub.d/10_linux.in: If GRUB_DEVICE_UUID is set, and
1330 GRUB_DISABLE_LINUX_UUID isn't true, use the filesystem UUIDs as
1331 the `root' parameter to Linux.
1333 2008-05-30 Robert Millan <rmh@aybabtu.com>
1335 * commands/search.c (options): Rename --fs_uuid to --fs-uuid.
1336 * util/update-grub_lib.in (prepare_grub_to_access_device): Replace
1337 --fs_uuid with --fs-uuid.
1338 * util/update-grub.in: Allow filesystem UUID probes to fail (since not
1339 all filesystems support them).
1341 2008-05-30 Robert Millan <rmh@aybabtu.com>
1343 * fs/ext2.c (grub_ext2_uuid): Use `04x' instead of '02x' as
1344 grub_printf() flags, since we're printing in units of 2 bytes.
1346 2008-05-30 Robert Millan <rmh@aybabtu.com>
1348 * util/grub.d/00_header.in: Remove obsolete comment referencing
1349 convert_system_path_to_grub_path().
1350 * util/update-grub.in: Likewise.
1351 * util/update-grub_lib.in (is_path_readable_by_grub): New function.
1352 (convert_system_path_to_grub_path): Add a warning message explaining
1353 that this function is deprecated. Rely on is_path_readable_by_grub()
1354 for the readability checks.
1355 (font_path): Use is_path_readable_by_grub() for the readability
1356 check rather than convert_system_path_to_grub_path().
1358 2008-05-30 Robert Millan <rmh@aybabtu.com>
1360 * util/update-grub_lib.in (prepare_grub_to_access_device): New function.
1361 * util/update-grub.in: Set `GRUB_FONT_PATH' to the system path, without
1362 converting it first.
1363 * util/grub.d/00_header.in: Use prepare_grub_to_access_device() to setup
1364 grub.cfg for access to font file, and afterwards call it again to set
1367 2008-05-30 Robert Millan <rmh@aybabtu.com>
1369 * commands/search.c (options): Add --fs_uuid option.
1370 (search_fs_uuid): New function.
1371 (grub_cmd_search): Fix --set argument passing.
1372 Use search_fs_uuid() when requested via --fs_uuid.
1373 (grub_search_init): Update help message.
1374 * fs/ext2.c (struct grub_ext2_sblock): Rename `unique_id' to `uuid'
1375 and redeclare it as an array of 16-bit words.
1376 (grub_ext2_uuid): New function.
1377 (grub_ext2_fs): Reference grub_ext2_uuid() in `uuid' struct member.
1378 * include/grub/fs.h (struct grub_fs): Add `uuid' struct member.
1379 * util/update-grub.in (GRUB_DEVICE_UUID, GRUB_DEVICE_BOOT)
1380 (GRUB_DEVICE_BOOT_UUID): New variables.
1381 (GRUB_DRIVE. GRUB_DRIVE_BOOT. GRUB_DRIVE_BOOT_GRUB): Remove.
1382 * util/grub.d/00_header.in: Set root using `search --fs_uuid' command
1384 * util/grub.d/10_hurd.in: Avoid explicit use of root drive. Instead,
1385 just assume `root' variable has the right value.
1386 * util/grub.d/10_linux.in: Likewise.
1387 * util/grub-probe.c (probe): Probe for filesystem UUID when requested
1389 (main): Recognise `-t fs_uuid' argument.
1391 2008-05-30 Robert Millan <rmh@aybabtu.com>
1393 * util/biosdisk.c (map): Redefine structure to hold information
1394 about GRUB drive name.
1395 (get_drive): Reimplement without assuming (and verifying) BIOS-like
1397 (call_hook): Remove.
1398 (grub_util_biosdisk_iterate): Access drive names via `.drive' struct
1399 member. Assume drive has partitions.
1400 (grub_util_biosdisk_open): Access device names via `.device' struct
1402 (open_device): Likewise.
1403 (find_drive): Likewise.
1404 (read_device_map): Adjust map[] usage to match the new struct
1405 definition. Don't check for duplicates (still possible, but not cheap
1407 (grub_util_biosdisk_fini): Free malloced buffers referenced by map[].
1408 (make_device_name): Remove assumption of BIOS-like drive names.
1410 2008-05-30 Pavel Roskin <proski@gnu.org>
1412 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Remove, as
1413 compiling execute.c doesn't need grub_script.tab.h anymore.
1414 (normal/command.c_DEPENDENCIES): Likewise.
1415 (normal/function.c_DEPENDENCIES): Likewise.
1416 * conf/i386-ieee1275.rmk: Likewise.
1417 * conf/i386-linuxbios.rmk: Likewise.
1418 * conf/i386-pc.rmk: Likewise.
1419 * conf/powerpc-ieee1275.rmk: Likewise.
1420 * conf/sparc64-ieee1275.rmk: Likewise.
1422 2008-05-29 Pavel Roskin <proski@gnu.org>
1424 * disk/lvm.c (grub_lvm_scan_device): Check for the buffer end
1425 when scanning metadata for volume group name.
1427 * include/grub/script.h: Don't include grub_script.tab.h. It's
1428 a generated file, which may only be included from the files with
1429 DEPENDENCIES rules in the makefile. Don't use typedef YYSTYPE,
1430 use union YYSTYPE, as the later allows forward declaration.
1431 * normal/lexer.c: Don't use typedef YYSTYPE, use union YYSTYPE.
1433 2008-05-29 Robert Millan <rmh@aybabtu.com>
1435 * term/i386/pc/at_keyboard.c: Include `grub/machine/machine.h'.
1436 (OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): New macros.
1437 [GRUB_MACHINE_IEEE1275] (keyboard_map): Add OLPC scan codes
1438 (grub_console_checkkey): Add grub_dprintf() call to report unknown
1441 2008-05-29 Robert Millan <rmh@aybabtu.com>
1443 * term/i386/pc/at_keyboard.c (grub_console_checkkey): Add support for
1444 control key combinations.
1446 2008-05-29 Robert Millan <rmh@aybabtu.com>
1448 * util/powerpc/ieee1275/grub-install.in: Move from here ...
1449 * util/ieee1275/grub-install.in: ... to here.
1450 * powerpc-ieee1275.rmk (grub_install_SOURCES): Update location.
1451 * i386-ieee1275.rmk (sbin_SCRIPTS): New variable.
1452 (grub_install_SOURCES): Likewise.
1454 2008-05-29 Robert Millan <rmh@aybabtu.com>
1456 * fs/affs.c: Update copyright year.
1457 * fs/ext2.c: Likewise.
1458 * fs/fshelp.c: Likewise.
1459 * fs/hfsplus.c: Likewise.
1460 * fs/ntfs.c: Likewise.
1461 * fs/xfs.c: Likewise.
1462 * include/grub/fshelp.h: Likewise.
1463 * util/grub-mkdevicemap.c: Likewise.
1465 2008-05-28 Robert Millan <rmh@aybabtu.com>
1467 * util/update-grub.in: Allow chmod call to fail, since /boot/grub/
1468 might need to be fatfs to support some firmware implementations
1471 2008-05-28 Robert Millan <rmh@aybabtu.com>
1473 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle MMC
1475 * util/grub-mkdevicemap.c (get_mmc_disk_name)
1476 (make_device_map): Likewise.
1478 2008-05-20 Bean <bean123ch@gmail.com>
1480 * fs/fshelp.c (grub_fshelp_map_block): New function.
1481 (grub_fshelp_find_file): Use 64-bit type for pos and block address.
1482 Use `>>' and `&' operator to avoid 64-bit divide and modulo.
1484 * include/grub/fshelp.h (grub_fshelp_journal_type): New enum.
1485 (GRUB_FSHELP_JOURNAL_UNUSED_MAPPING): New macro.
1486 (grub_fshelp_journal): New structure.
1487 (grub_fshelp_map_block): New function prototype.
1488 (grub_fshelp_read_file): Use grub_disk_addr_t as block type.
1489 (grub_fshelp_map_block): Likewise.
1491 * fs/ext2.c (EXT3_FEATURE_COMPAT_HAS_JOURNAL): New macro.
1492 (EXT3_JOURNAL_MAGIC_NUMBER): Likewise.
1493 (EXT3_JOURNAL_DESCRIPTOR_BLOCK): Likewise.
1494 (EXT3_JOURNAL_COMMIT_BLOCK): Likewise.
1495 (EXT3_JOURNAL_SUPERBLOCK_V1): Likewise.
1496 (EXT3_JOURNAL_SUPERBLOCK_V2): Likewise.
1497 (EXT3_JOURNAL_REVOKE_BLOCK): Likewise.
1498 (EXT3_JOURNAL_FLAG_ESCAPE): Likewise.
1499 (EXT3_JOURNAL_FLAG_SAME_UUID): Likewise.
1500 (EXT3_JOURNAL_FLAG_DELETED): Likewise.
1501 (EXT3_JOURNAL_FLAG_LAST_TAG): Likewise.
1502 (grub_ext2_sblock): New members for journal support.
1503 (grub_ext3_journal_header): New structure.
1504 (grub_ext3_journal_revoke_header): Likewise.
1505 (grub_ext3_journal_block_tag): Likewise.
1506 (grub_ext3_journal_sblock): Likewise.
1507 (grub_fshelp_node): New members logfile and journal.
1508 (grub_ext2_read_block): Change block type to grub_disk_addr_t. Use
1509 grub_fshelp_map_block to get real block number.
1510 (grub_ext2_blockgroup): Use grub_fshelp_map_block to get real block
1512 (grub_ext2_read_inode): Likewise.
1513 (grub_ext3_get_journal): New function.
1514 (grub_read_inode): Initialize journal using grub_ext3_get_journal.
1515 (grub_ext2_close): Release memory used by journal.
1517 * fs/reiserfs.c (REISERFS_MAGIC_STRING): Changed to "ReIsEr".
1518 (REISERFS_MAGIC_DESC_BLOCK): New macro.
1519 (grub_reiserfs_transaction_header): Renamed to
1520 grub_reiserfs_description_block, replace field data with real_blocks.
1521 (grub_reiserfs_commit_block): New structure.
1522 (grub_reiserfs_data): New member journal.
1523 (grub_reiserfs_get_item): Use grub_fshelp_map_block to get real block
1525 (grub_reiserfs_read_symlink): Likewise.
1526 (grub_reiserfs_iterate_dir): Likewise.
1527 (grub_reiserfs_open): Likewise.
1528 (grub_reiserfs_read): Likewise.
1529 (grub_reiserfs_get_journal): New function.
1530 (grub_reiserfs_mount): Use "ReIsEr" as super block magic, as there are
1531 three varieties ReIsErFs, ReIsEr2Fs and ReIsEr3Fs. Initialize journal
1532 using grub_reiserfs_get_journal.
1533 (grub_reiserfs_close): Release memory used by journal.
1535 * fs/affs.c (grub_affs_read_block): Change block type to
1536 grub_disk_addr_t. Use grub_divmod64 to do 64-bit division.
1538 * fs/afs.c (grub_afs_read_block): Change block type to grub_disk_addr_t.
1540 * fs/hfsplus.c (grub_hfsplus_read_block): Likewise.
1542 * fs/ntfs.c (grub_ntfs_read_block): Likewise.
1544 * fs/udf.c (grub_udf_read_block): Change block type to
1545 grub_disk_addr_t. Use type cast to avoid warning.
1547 * fs/xfs.c (grub_xfs_read_block): Likewise.
1549 2008-05-16 Christian Franke <franke@computer.org>
1551 * commands/cat.c (grub_cmd_cat): Remove non-ESC keys from keyboard queue
1552 to ensure that break with ESC will always work.
1553 * commands/sleep.c (grub_interruptible_millisleep): Likewise.
1554 Remove ESC from keyboard queue.
1556 2008-05-16 Christian Franke <franke@computer.org>
1558 * util/biosdisk.c: [__CYGWIN__] Add includes.
1559 (grub_util_biosdisk_open): Use Linux code also for Cygwin.
1560 (get_os_disk): Move variable declarations to OS specific
1561 parts to avoid warning.
1562 [__GNU__] (get_os_disk): Fix /dev/sdXsN case.
1563 [__CYGWIN__] (get_os_disk): Add Cygwin /dev/sdXN device names.
1564 (grub_util_biosdisk_get_grub_dev): Use Linux code also for
1566 * util/getroot.c: [__CYGWIN__] Add includes.
1567 (strip_extra_slashes): Fix "/" case.
1568 [__CYGWIN__] (get_win32_path): New function.
1569 [__CYGWIN__] (grub_get_prefix): Add conversion to win32 path.
1570 [__CYGWIN__] (find_root_device): Disable.
1571 [__CYGWIN__] (get_bootsec_serial): New function.
1572 [__CYGWIN__] (find_cygwin_root_device): Likewise.
1573 [__linux__] (grub_guess_root_device): Add early returns to simplify
1575 [__CYGWIN__] (grub_guess_root_device): Call find_cygwin_root_device.
1576 [__linux__] (grub_util_get_dev_abstraction): Enable LVM and RAID
1577 check for Linux only.
1579 2008-05-15 Bean <bean123ch@gmail.com>
1581 * kern/i386/pc/startup.S (grub_console_getkey): Workaround for the
1582 keyboard hang problem in apple's intel mac.
1584 2008-05-09 Robert Millan <rmh@aybabtu.com>
1586 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle Virtio
1588 * util/grub-mkdevicemap.c (get_virtio_disk_name)
1589 (make_device_map): Likewise.
1590 Reported by Aurelien Jarno <aurel32@debian.org>
1592 2008-05-07 Ian Campbell <ijc@hellion.org.uk>
1594 * util/biosdisk.c (get_os_disk): Recognise xvd type disks.
1595 * util/grub-mkdevicemap.c (get_xvd_disk_name): New function.
1596 (make_device_map): Output entries for xvd type disks.
1598 2008-05-07 Robert Millan <rmh@aybabtu.com>
1600 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle CCISS
1602 * util/grub-mkdevicemap.c (get_cciss_disk_name)
1603 (make_device_map): Likewise.
1604 Reported by Roland Dreier <rdreier@cisco.com>
1606 2008-05-07 Robert Millan <rmh@aybabtu.com>
1608 * disk/lvm.c (grub_lvm_scan_device): Detect errors in an additional
1609 grub_strstr() call. Correct a few mistakes in failure path handling.
1611 2008-05-06 Robert Millan <rmh@aybabtu.com>
1613 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
1614 Do not print a trailing slash (therefore, the root directory is an
1616 (convert_system_path_to_grub_path): Do not remove trailing slash
1617 from make_system_path_relative_to_its_root() output.
1619 * util/i386/pc/grub-install.in: Add trailing slash to output from
1620 make_system_path_relative_to_its_root().
1622 2008-05-06 Robert Millan <rmh@aybabtu.com>
1624 * util/grub-fstest.c (grub_refresh): Call `fflush (stdout)'. This
1625 ensures that output lines aren't intermangled with those sent to
1626 stderr (via grub_util_info()).
1627 * util/grub-probe.c (grub_refresh): Likewise.
1628 * util/i386/pc/grub-setup.c (grub_refresh): Likewise.
1630 2008-05-05 Christian Franke <franke@computer.org>
1632 * util/grub-mkdevicemap.c (get_floppy_disk_name) [__CYGWIN__]:
1633 Add Cygwin device names.
1634 (get_ide_disk_name) [__CYGWIN__]: Likewise.
1635 (get_scsi_disk_name) [__CYGWIN__]: Likewise.
1636 (check_device): Return error instead of success on empty name.
1637 (make_device_map): Move label inside linux specific code to
1638 prevent compiler warning.
1640 2008-04-30 Robert Millan <rmh@aybabtu.com>
1642 Based on patch from Fabian Greffrath <greffrath@leat.rub.de>
1643 * util/grub.d/10_linux.in: Add ${GRUB_CMDLINE_LINUX_DEFAULT} to the
1645 * util/update-grub.in: Export GRUB_CMDLINE_LINUX_DEFAULT.
1647 2008-04-29 Robert Millan <rmh@aybabtu.com>
1649 * docs/grub.cfg: New file (example GRUB configuration).
1651 2008-04-26 Robert Millan <rmh@aybabtu.com>
1653 * DISTLIST: Sort (sort -u < DISTLIST | sponge DISTLIST). Add
1654 `loader/i386/ieee1275/linux.c', `loader/i386/ieee1275/linux_normal.c'
1655 and `disk/ieee1275/nand.c'.
1657 2008-04-25 Bean <bean123ch@gmail.com>
1659 * Makefile.in (RMKFILES): Add missing arch i386-ieee1275 and
1662 * commands/hexdump.c (grub_cmd_hexdump): Support dumping of device,
1663 change the buffer size to 4096 for cdrom device.
1665 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add _linux.mod, linux.mod
1667 (_linux_mod_SOURCES): New variable.
1668 (_linux_mod_CFLAGS): Likewise.
1669 (_linux_mod_LDFLAGS): Likewise.
1670 (linux_mod_SOURCES): Likewise.
1671 (linux_mod_CFLAGS): Likewise.
1672 (linux_mod_LDFLAGS): Likewise.
1673 (nand_mod_SOURCES): Likewise.
1674 (nand_mod_CFLAGS): Likewise.
1675 (nand_mod_LDFLAGS): Likewise.
1677 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Return
1678 GRUB_ERR_UNKNOWN_DEVICE instead of GRUB_ERR_BAD_DEVICE if no device
1679 type property. (nand device in olpc don't have this property)
1681 * include/grub/disk.h (grub_disk_dev_id): New macro
1682 GRUB_DISK_DEVICE_NAND_ID.
1684 * include/grub/i386/ieee1275/loader.h (grub_rescue_cmd_linux): New
1686 (grub_rescue_cmd_initrd): Likewise.
1688 * include/grub/i386/linux.h (GRUB_LINUX_OFW_SIGNATURE): New macro.
1689 (linux_kernel_params): Add new member ofw_signature, ofw_num_items,
1690 ofw_cif_handler and ofw_idt, adjust padding number.
1692 * include/grub/i386/pc/memory.h (grub_upper_mem): Export it if
1693 GRUB_MACHINE_IEEE1275 is defined.
1695 * include/grub/ieee1275/ieee1275.h (grub_available_iterate):
1696 Use NESTED_FUNC_ATTR attribute on the hook parameter.
1698 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Use NESTED_FUNC_ATTR
1699 on nested function heap_init.
1700 (grub_upper_mem): New variable for i386-ieee1275.
1701 (grub_get_extended_memory): New function for i386-ieee1275.
1702 (grub_machine_init): Call grub_get_extended_memory for i386-ieee1275.
1704 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Use
1705 NESTED_FUNC_ATTR on the hook parameter. Don't quit if no device type
1708 * loader/i386/ieee1275/linux.c: New file.
1710 * loader/i386/ieee1275/linux_normal.c: New file.
1712 * disk/ieee1275/nand.c: New file.
1714 2008-04-18 Thomas Schwinge <tschwinge@gnu.org>
1716 * util/i386/pc/grub-mkrescue.in (grub_mkimage): Don't overwrite correct
1718 * util/powerpc/ieee1275/grub-mkrescue.in (grub_mkimage): Likewise.
1720 2008-04-18 Robert Millan <rmh@aybabtu.com>
1722 Restructures early code path on ieee1275 to unify grub_main() as
1723 the first C function that is executed in every platform.
1725 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_init): New prototype.
1726 * kern/i386/ieee1275/startup.S (_start): Jump to grub_main() instead of
1728 * kern/powerpc/ieee1275/crt0.S (_start): Likewise.
1729 * kern/ieee1275/cmain.c (cmain): Rename to ...
1730 * kern/ieee1275/cmain.c (grub_ieee1275_init): ... this.
1731 * kern/ieee1275/init.c (grub_machine_init): Call grub_ieee1275_init()
1734 2008-04-18 Robert Millan <rmh@aybabtu.com>
1736 * util/update-grub.in: Fix syntax error when setting
1737 `GRUB_PRELOAD_MODULES'.
1738 Reported by Stephane Chazelas <stephane@artesyncp.com>
1740 2008-04-17 Lubomir Kundrak <lkundrak@redhat.com>
1742 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): take only .text
1743 section into account, newer toolchains generate unique build ids
1744 * configure.ac: remove the test for --build-id=none acceptance,
1745 we want build ids to be preserved
1746 * genmk.rb: add -R .note.gnu.build-id to objcopy, so build id
1747 far from other sections don't cause the raw binary images grow
1750 2008-04-15 Robert Millan <rmh@aybabtu.com>
1752 * disk/lvm.c: Update copyright year.
1753 * kern/misc.c: Likewise.
1755 2008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
1757 * disk/lvm.c (grub_lvm_scan_device): Add forgotten failure path when
1758 there is no memory left for physical volume name.
1760 2008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
1762 * disk/lvm.c (grub_lvm_scan_device): Fix logical volume's physical
1763 volume name mapping to support bigger than 9 character names properly.
1765 2008-04-13 Robert Millan <rmh@aybabtu.com>
1767 * disk/i386/pc/biosdisk.c (grub_biosdisk_rw): Fix CHS limit check,
1768 as per http://www.allensmith.net/Storage/HDDlimit/Int13h.htm
1770 2008-04-13 Christian Franke <franke@computer.org>
1772 * util/i386/pc/grub-mkrescue.in: Add --emulation=floppy
1773 to create a floppy emulation boot CD when non emulation mode
1775 Enable Joliet CD filesystem extension.
1777 2008-04-13 Robert Millan <rmh@aybabtu.com>
1779 * kern/misc.c (grub_strncat): Fix off-by-one error.
1780 Reported by Zhang Huan <zhanghuan@nrchpc.ac.cn>
1782 * kern/env.c (grub_env_context_close): Clear current context, not
1784 Patch from Zhang Huan <zhanghuan@nrchpc.ac.cn>
1786 * kern/misc.c (grub_strcat): Minor speed optimization (same code size).
1788 2008-04-13 Robert Millan <rmh@aybabtu.com>
1790 Improve robustness when handling LVM.
1792 * disk/lvm.c (grub_lvm_getvalue): Return 0 when `*p' is NULL
1793 (and leave `*p' unmodified).
1794 (grub_lvm_iterate): Don't assume `vg->lvs != NULL' when iterating
1796 (grub_lvm_memberlist): Don't assume `lv->vg->pvs != NULL' when
1797 iterating through it.
1798 (grub_lvm_open): Don't assume `vg->lvs != NULL' when iterating
1800 (grub_lvm_scan_device): Check the return value (and fail gracefully
1801 when due) on each grub_lvm_getvalue() or grub_strstr() call.
1802 Don't assume `vg->pvs != NULL' when iterating through it.
1804 2008-04-13 Robert Millan <rmh@aybabtu.com>
1806 * gendistlist.sh (EXTRA_DISTFILES): Add `genpartmaplist.sh'.
1807 * genmk.rb (partmap): New variable.
1808 (CLEANFILES, PARTMAPFILES): Add #{partmap}.
1809 (#{partmap}): New target rule.
1810 * genpartmaplist.sh: New file.
1811 * Makefile.in (pkglib_DATA): Add partmap.lst.
1812 (partmap.lst): New target rule.
1813 * util/i386/pc/grub-mkrescue.in: Generate grub.cfg that loads needed
1814 modules (including all partition maps), instead of preloading them.
1816 2007-04-13 Fabian Greffrath <fabian.greffrath@web.de>
1818 * util/grub.d/30_os-prober.in: New script. Use `os-prober' and
1819 `linux-boot-prober' (if installed) to detect other operating
1820 systems which are installed on the computer and add them to
1822 * conf/common.rmk: Build and install 30_os-prober.
1824 2008-04-12 Robert Millan <rmh@aybabtu.com>
1826 * kern/powerpc/ieee1275/init.c: Move from here ...
1827 * kern/ieee1275/init.c: ... to here. Update all users.
1829 * kern/powerpc/ieee1275/cmain.c: Move from here ...
1830 * kern/ieee1275/cmain.c: ... to here. Update all users.
1832 * kern/powerpc/ieee1275/openfw.c: Move from here ...
1833 * kern/ieee1275/openfw.c: ... to here. Update all users.
1835 * loader/powerpc/ieee1275/multiboot2.c: Move from here ...
1836 * loader/ieee1275/multiboot2.c: ... to here. Update all users.
1838 2008-04-10 Pavel Roskin <proski@gnu.org>
1840 * configure.ac: Always use "_cv_" in cache variables for
1841 compatibility with Autoconf 2.62.
1843 2008-04-07 Robert Millan <rmh@aybabtu.com>
1845 Revert grub/machine/init.h addition by Pavel (since it breaks on
1846 i386-ieee1275 and others):
1847 * util/i386/pc/misc.c: Remove grub/machine/init.h.
1848 * util/powerpc/ieee1275/misc.c: Likewise.
1850 2008-04-07 Robert Millan <rmh@aybabtu.com>
1852 * util/grub-probe.c (probe): Improve error message.
1854 2008-04-07 Robert Millan <rmh@aybabtu.com>
1856 * util/biosdisk.c (read_device_map): Skip devices that don't exist
1857 (this prevents the presence of a bogus entry from ruining the whole
1860 2008-04-06 Pavel Roskin <proski@gnu.org>
1862 * util/biosdisk.c: Include grub/util/biosdisk.h.
1863 * util/grub-fstest.c (execute_command): Make static.
1864 * util/grub-mkdevicemap.c (check_device): Likewise.
1865 * util/i386/pc/misc.c: Include grub/machine/init.h.
1866 * util/powerpc/ieee1275/misc.c: Likewise.
1867 * util/lvm.c: Include grub/util/lvm.h.
1868 * util/misc.c: Include grub/kernel.h, grub/misc.h and
1870 * util/raid.c: Include grub/util/raid.h.
1871 (grub_util_getdiskname): Make static.
1873 * util/grub-emu.c (main): Remove calls to grub_hostfs_init() and
1874 grub_hostfs_fini(), as they are called from grub_init_all() and
1875 grub_fini_all() respectively. This fixes an infinite loop in
1876 grub-fstest due to double registration of hostfs.
1877 Reported by Christian Franke <Christian.Franke@t-online.de>
1879 2008-04-05 Pavel Roskin <proski@gnu.org>
1881 * bus/pci.c (grub_pci_iterate): For multifunction devices, probe
1882 all 8 functions. Otherwise, probe function 0 only.
1884 2008-04-04 Pavel Roskin <proski@gnu.org>
1886 * commands/lspci.c (grub_lspci_iter): Print the bus number
1889 * commands/lspci.c (grub_pci_classes): Fix typos.
1890 (grub_lspci_iter): Don't print func twice. Print vendor ID
1891 before device ID, as it's normally done.
1893 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
1894 Fix signedness warnings.
1895 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate):
1897 * util/ieee1275/get_disk_name.c: Include config.h so that
1898 _GNU_SOURCE is defined and getline() is declared. Mark an
1899 unused argument as such. Fix a signedness warning.
1901 2008-04-02 Pavel Roskin <proski@gnu.org>
1903 * genkernsyms.sh.in: Use more robust assignments for CC and
1904 srcdir. Quote srcdir.
1905 * gensymlist.sh.in: Likewise. Assert at the compile time that
1906 the symbol table is not empty.
1908 * disk/raid.c (grub_raid_memberlist): Fix a signedness warning.
1909 * fs/cpio.c (grub_cpio_read): Likewise.
1911 2008-04-01 Pavel Roskin <proski@gnu.org>
1913 * disk/ata.c (grub_ata_open): Don't lose precision in disk->id.
1914 * disk/host.c (grub_host_open): Likewise.
1915 * disk/loopback.c (grub_loopback_open): Likewise.
1916 * disk/memdisk.c (grub_memdisk_open): Use a string pointer for
1917 disk->id as in disk/host.c, not a multi-character constant.
1919 * util/grub-fstest.c (cmd_cmp): Use fseeko(), not fseek(). The
1920 later is obsolete, potentially dangerous and sets a bad example.
1921 * util/i386/efi/grub-mkimage.c (make_header): Likewise.
1922 * util/misc.c (grub_util_get_image_size): Likewise.
1924 * disk/loopback.c (options): Improve help for "--partitions".
1926 * normal/arg.c (grub_arg_show_help): Fix spacing of the long
1927 options to align them with the short options, e.g. "echo -e".
1929 2008-03-31 Bean <bean123ch@gmail.com>
1931 * video/reader/png.c (grub_png_data): New member is_16bit and
1933 (grub_png_decode_image_header): Detect 16 bit png image.
1934 (grub_png_convert_image): New function to convert 16 bit image to 8 bit.
1935 (grub_png_decode_png): Call grub_png_convert_image for 16 bit image.
1936 (grub_video_reader_png): Release memory occupied by image_data.
1938 * fs/ntfs.c (find_attr): Handle non-resident attribute list larger than
1940 (grub_nfs_mount): Skip the test for sector per cluster.
1942 * include/grub/ntfs.h (MAX_SPC): Removed.
1944 2008-03-31 Bean <bean123ch@gmail.com>
1946 * conf/common.rmk (pkgdata_MODULES): Add afs.mod.
1947 (grub_probe_SOURCES): Add fs/afs.c.
1948 (grub_fstest_SOURCES): Likewise.
1949 (afs_mod_SOURCES): New variable.
1950 (afs_mod_CFLAGS): Likewise.
1951 (afs_mod_LDFLAGS): Likewise.
1953 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/afs.c.
1954 (grub_emu_SOURCES): Likewise.
1956 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
1958 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1960 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
1962 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1964 * fs/afs.c: New file.
1966 2008-03-30 Pavel Roskin <proski@gnu.org>
1968 * disk/host.c: Include grub/misc.h to fix a warning.
1969 * util/hostfs.c: Use GRUB_MOD_INIT and GRUB_MOD_FINI to fix
1970 warnings about implicit declarations.
1972 * fs/udf.c (grub_udf_mount): Fix warning about a shadowing a
1974 * include/grub/i386/loader.h: Change declaration of
1975 grub_linux_boot() to match what grub_loader_set() expects.
1976 * util/getroot.c (grub_guess_root_device): Return const char* to
1978 * util/grub-probe.c (probe): Fix a warning about uninitialized
1979 abstraction_name variable.
1980 * util/i386/get_disk_name.c (grub_util_get_disk_name): Mark
1981 second argument as unused to fix a warning.
1983 * loader/i386/pc/multiboot2.c (grub_mb2_arch_elf64_hook): Add
1984 missing grub_error() call.
1986 * util/update-grub_lib.in: Define datarootdir, since Autoconf
1987 2.60 and newer uses it to define datadir.
1989 * commands/sleep.c: Fix warning about implicit declaration.
1990 * disk/memdisk.c: Likewise.
1991 * loader/aout.c: Likewise.
1992 * loader/i386/bsd_normal.c: Likewise.
1993 * util/grub-probe.c: Likewise.
1995 * commands/i386/cpuid.c (has_longmode): Make static.
1996 * disk/i386/pc/biosdisk.c (cd_drive): Likewise.
1997 * include/grub/i386/bsd.h (bios_memmap_t): Remove, it's unused.
1999 * kern/i386/pc/startup.S (real_to_prot): Use %cs prefix to load
2000 GDT. This is more robust, as %ds can change.
2001 (grub_biosdisk_rw_int13_extensions): Don't clear %ds before
2002 calling real_to_prot().
2003 (grub_biosdisk_get_diskinfo_int13_extensions): Likewise.
2005 2008-03-28 Pavel Roskin <proski@gnu.org>
2007 * kern/i386/pc/startup.S: Assert that uncompressed functions
2008 don't spill beyond GRUB_KERNEL_MACHINE_RAW_SIZE.
2009 * kern/i386/pc/lzo1x.S: Remove all .align directives in the
2010 code, as they push parts of the code (error handlers) beyond
2011 GRUB_KERNEL_MACHINE_RAW_SIZE. Speed is not as important in this
2012 code as correctness and size.
2014 2008-03-28 Pavel Roskin <proski@gnu.org>
2016 * kern/i386/pc/startup.S
2017 (grub_biosdisk_get_diskinfo_int13_extensions): When converting
2018 data block address to the real mode, keep offset minimal. This
2019 works around a bug in AWARD BIOS on old Athlon systems, which
2020 makes CD detection hang.
2022 2008-03-26 Pavel Roskin <proski@gnu.org>
2024 * normal/color.c (grub_parse_color_name_pair): Make `name' a
2026 * include/grub/normal.h: Add grub_parse_color_name_pair()
2029 2008-03-24 Bean <bean123ch@gmail.com>
2031 * disk/i386/pc/biosdisk.c (cd_start): Removed.
2032 (cd_count): Removed.
2033 (cd_drive): New variable.
2034 (grub_biosdisk_get_drive): Don't check for (cdN) device.
2035 (grub_biosdisk_call_hook): Likewise.
2036 (grub_biosdisk_iterate): Change cdrom detection method.
2037 (grub_biosdisk_open): Replace cd_start with cd_drive.
2038 (GRUB_MOD_INIT): Use grub_biosdisk_get_cdinfo_int13_extension to
2039 detect cdrom device.
2041 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_MACHINE_CDROM_START):
2043 (GRUB_BIOSDISK_MACHINE_CDROM_END): Removed.
2044 (GRUB_BIOSDISK_CDTYPE_NO_EMUL): New macro.
2045 (GRUB_BIOSDISK_CDTYPE_1_2_M): Likewise.
2046 (GRUB_BIOSDISK_CDTYPE_1_44_M): Likewise.
2047 (GRUB_BIOSDISK_CDTYPE_2_88_M): Likewise.
2048 (GRUB_BIOSDISK_CDTYPE_HARDDISK): Likewise.
2049 (GRUB_BIOSDISK_CDTYPE_MASK): Likewise.
2050 (grub_biosdisk_cdrp): New structure.
2051 (grub_biosdisk_get_cdinfo_int13_extensions): New function.
2053 * include/grub/i386/pc/kernel.h (grub_boot_drive): Export this variable.
2055 * kern/i386/pc/init.c (make_install_device): Don't use (cdN) as root
2058 * kern/i386/pc/startup.S (grub_biosdisk_get_cdinfo_int13_extensions):
2061 2008-03-20 Robert Millan <rmh@aybabtu.com>
2063 Remove 2 TiB limit in ata.mod.
2064 * disk/ata.c (grub_ata_device): Promote `size' to grub_uint64_t.
2065 (grub_ata_dumpinfo): Print sector count with 0x%llx.
2066 (grub_ata_identify): Interpret `&info16[100]' as a pointer to
2067 grub_uint64_t instead of grub_uint32_t.
2069 2008-03-05 Bean <bean123ch@gmail.com>
2071 * loader/i386/pc/multiboot.c (grub_multiboot_get_bootdev): New function.
2072 (grub_multiboot): Set boot device.
2074 * boot/i386/pc/lnxboot.S (real_code_2): Set %dh to 0xFF.
2076 2008-03-02 Bean <bean123ch@gmail.com>
2078 * fs/reiserfs.c (grub_reiserfs_read_symlink): Add 0 at the end of
2081 2008-03-01 Yoshinori K. Okuji <okuji@enbug.org>
2083 * DISTLIST: Added docs/fdl.texi, docs/grub.texi, docs/mdate-sh and
2086 * docs/grub.texi: New file. Copied from GRUB Legacy, and slightly
2089 * docs/fdl.texi: New file.
2091 * docs/mdate-sh: New file. Copied from gnulib.
2092 * docs/texinfo.tex: Likewise.
2094 * config.guess: Updated from gnulib.
2095 * install-sh: Likewise.
2097 2008-02-28 Robert Millan <rmh@aybabtu.com>
2099 * conf/i386-linuxbios.rmk (pkglib_MODULES): Add aout.mod.
2100 (aout_mod_SOURCES): New variable.
2101 (aout_mod_CFLAGS): Likewise.
2102 (aout_mod_LDFLAGS): Likewise.
2104 * conf/i386-ieee1275.rmk: Likewise.
2106 2008-02-28 Robert Millan <rmh@aybabtu.com>
2108 * util/update-grub.in: Reorganise terminal validity check. Accept
2109 `ieee1275:console' (OLPC) and `*:gfxterm' as valid too.
2110 Based on suggestion by Franklin PIAT.
2112 2008-02-28 Fabian Greffrath <greffrath@leat.rub.de>
2114 * include/grub/util/getroot.h (grub_util_check_block_device): Export new
2116 * util/getroot.c (grub_util_check_block_device): New function that
2117 returns the given argument if it is a block device and returns NULL else.
2118 * util/grub-probe.c (argument_is_device): New variable.
2119 (probe): Promote device_name from a variable to an argument. Receive
2120 device_name from grub_util_check_block_device() if path is NULL and from
2121 grub_guess_root_device() else. Do not free() device_name anymore.
2122 (options): Introduce new parameter '-d, --device'.
2123 (main): Add description of the new parameter to the help screen.
2124 Rename path variable to argument. Set argument_is_device if the '-d'
2125 option is given. Pass argument to probe() depending on
2128 2008-02-24 Bean <bean123ch@gmail.com>
2130 * fs/iso9660.c (GRUB_ISO9660_VOLDESC_BOOT): New macro.
2131 (GRUB_ISO9660_VOLDESC_PRIMARY): Likewise.
2132 (GRUB_ISO9660_VOLDESC_SUPP): Likewise.
2133 (GRUB_ISO9660_VOLDESC_PART): Likewise.
2134 (GRUB_ISO9660_VOLDESC_END): Likewise.
2135 (grub_iso9660_primary_voldesc): New member escape.
2136 (grub_iso9660_data): New member joliet.
2137 (grub_iso9660_convert_string): New function.
2138 (grub_iso9660_mount): Detect joliet extension.
2139 (grub_iso9660_iterate_dir): Convert filename when joliet is detected.
2140 (grub_iso9660_iso9660_label): Likewise.
2142 * conf/common.rmk (pkgdata_MODULES): Add udf.mod.
2143 (grub_setup_SOURCES): Add fs/udf.c.
2144 (grub_fstest_SOURCES): Likewise.
2145 (udf_mod_SOURCES): New variable.
2146 (udf_mod_CFLAGS): Likewise.
2147 (udf_mod_LDFLAGS): Likewise.
2149 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/udf.c.
2150 (grub_emu_SOURCES): Likewise.
2152 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
2154 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2156 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
2158 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2160 * fs/udf.c: New file.
2162 2008-02-24 Robert Millan <rmh@aybabtu.com>
2164 * conf/i386-efi.rmk (normal/function.c_DEPENDENCIES)
2165 (normal/lexer.c_DEPENDENCIES): New variables.
2166 * conf/i386-ieee1275.rmk (normal/function.c_DEPENDENCIES)
2167 (normal/lexer.c_DEPENDENCIES): Likewise.
2168 * conf/i386-linuxbios.rmk (normal/function.c_DEPENDENCIES)
2169 (normal/lexer.c_DEPENDENCIES): Likewise.
2170 * conf/i386-pc.rmk (normal/function.c_DEPENDENCIES)
2171 (normal/lexer.c_DEPENDENCIES): Likewise.
2172 * conf/powerpc-ieee1275.rmk (normal/function.c_DEPENDENCIES)
2173 (normal/lexer.c_DEPENDENCIES): Likewise.
2174 * conf/sparc64-ieee1275.rmk (normal/function.c_DEPENDENCIES)
2175 (normal/lexer.c_DEPENDENCIES): Likewise.
2177 2008-02-23 Robert Millan <rmh@aybabtu.com>
2179 * partmap/gpt.c (grub_gpt_magic): Add `0x' qualifier to each member,
2180 since they were intended to be in hex. This didn't break previously
2181 because of a bug in gpt_partition_map_iterate() (see below).
2183 (gpt_partition_map_iterate): Replace `grub_memcmp' with `! grub_memcmp'
2184 when checking the validity of GPT header.
2185 Remove `partno', since it always provides the same information as `i'.
2187 2008-02-21 Yoshinori K. Okuji <okuji@enbug.org>
2189 * include/grub/efi/time.h: Fix a wrong comment.
2191 2008-02-19 Pavel Roskin <proski@gnu.org>
2193 * kern/rescue.c (grub_enter_rescue_mode): Improve initial
2196 2008-02-19 Bean <bean123ch@gmail.com>
2198 * conf/i386-pc.rmk (pkglib_MODULES): Add aout.mod _bsd.mod and bsd.mod.
2199 (aout_mod_SOURCES): New variable.
2200 (aout_mod_CFLAGS): Likewise.
2201 (aout_mod_LDFLAGS): Likewise.
2202 (_bsd_mod_SOURCES): New variable.
2203 (_bsd_mod_CFLAGS): Likewise.
2204 (_bsd_mod_LDFLAGS): Likewise.
2205 (bsd_mod_SOURCES): New variable.
2206 (bsd_mod_CFLAGS): Likewise.
2207 (bsd_mod_LDFLAGS): Likewise.
2209 * include/grub/aout.h: New file.
2211 * include/grub/i386/loader.h (grub_unix_real_boot): New function.
2213 * include/grub/i386/bsd.h: New file.
2215 * include/grub/i386/pc/init.h (grub_get_mmap_entry): Use EXPORT_FUNC
2218 * kern/elf.c (grub_elf32_load): Get the physical address after the hook
2219 function is called, so that it's possible to change it inside the hook.
2220 (grub_elf64_load): Likewise.
2221 (grub_elf_file): Don't close the file if elf header is not found.
2222 (grub_elf_close): Close the file if grub_elf_file fails (The new
2223 grub_elf_file won't close it).
2224 (grub_elf32_size): Use NESTED_FUNC_ATTR for nested function calcsize.
2225 (grub_elf64_size): Likewise.
2227 * kern/i386/loader.S (grub_unix_real_boot): New function.
2229 * loader/aout.c: New file.
2231 * loader/i386/bsd.c: New file.
2233 * loader/i386/bsd_normal.c: New file.
2235 * loader/i386/pc/multiboot.c (grub_multiboot): Handle a.out format.
2237 * loader/multiboot2.c (grub_multiboot2): Reset grub_errno so that it
2238 can test other formats.
2240 2008-02-19 Robert Millan <rmh@aybabtu.com>
2242 * partmap/gpt.c: Include `<grub/gpt_partition.h>'.
2243 (grub_gpt_partition_type_empty): Redefine with macro from
2244 `<grub/gpt_partition.h>'.
2245 (gpt_partition_map_iterate): Adjust partition type comparison.
2247 Export `entry' as partmap-specific `part.data' struct.
2248 (grub_gpt_header, grub_gpt_partentry): Move from here ...
2250 * include/grub/gpt_partition.h (grub_gpt_header)
2251 (grub_gpt_partentry): ... to here (new file).
2253 * util/i386/pc/grub-setup.c: Include `<grub/gpt_partition.h>'.
2255 (grub_gpt_partition_type_bios_boot): New const variable, defined
2256 with macro from `<grub/gpt_partition.h>'.
2258 (setup): Replace `first_start' with `embed_region', which keeps
2259 track of the embed region (and is partmap-agnostic).
2261 Replace find_first_partition_start() with find_usable_region(),
2262 which finds a usable region for embedding using partmap-specific
2263 knowledge (supports PC/MSDOS and GPT).
2265 Fix all assumptions that the embed region start at sector 1, using
2266 `embed_region.start' from now on. Similarly, use `embed_region.end'
2267 rather than `first_start' to calculate available size.
2269 In grub_util_info() message, replace "into after the MBR" with an
2270 indication of the specific sector our embed region starts at.
2272 2008-02-19 Robert Millan <rmh@aybabtu.com>
2274 * DISTLIST: Replace `commands/ieee1275/halt.c' and
2275 `commands/ieee1275/reboot.c' with `commands/halt.c' and
2276 `commands/reboot.c'.
2277 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
2278 (halt_mod_SOURCES): Likewise.
2279 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
2280 (halt_mod_SOURCES): Likewise.
2282 2008-02-17 Christian Franke <franke@computer.org>
2284 * commands/cat.c (grub_cmd_cat): Add break on GRUB_TERM_ESC key.
2286 2008-02-17 Robert Millan <rmh@aybabtu.com>
2288 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
2289 set `first_start' to 0 for non-PC/MSDOS partition maps.
2291 2008-02-16 Robert Millan <rmh@aybabtu.com>
2293 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
2294 do not assume partition map is PC/MSDOS before performing checks that
2295 are specific to that layout.
2297 2008-02-13 Robert Millan <rmh@aybabtu.com>
2299 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Remove
2300 `commands/i386/pc/halt.c' and `commands/i386/pc/reboot.c'.
2301 * kern/i386/linuxbios/init.c (grub_halt, grub_reboot): Remove stubs.
2303 2008-02-13 Yoshinori K. Okuji <okuji@enbug.org>
2305 * configure.ac: Only a cosmetic change on the handling of
2306 -fno-stack-protector.
2308 2008-02-12 Alexandre Boeglin <alex@boeglin.org>
2310 * conf/i386-efi.rmk (grub_emu_SOURCES): Replace
2311 commands/i386/pc/halt.c and reboot.c by commands/halt.c and
2313 (grub_install_SOURCES): Add halt.mod and reboot.mod.
2314 (halt_mod_SOURCES): New variable.
2315 (halt_mod_CFLAGS): Likewise.
2316 (halt_mod_LDFLAGS): Likewise.
2317 (reboot_mod_SOURCES): Likewise.
2318 (reboot_mod_CFLAGS): Likewise.
2319 (reboot_mod_LDFLAGS): Likewise.
2321 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace
2322 commands/ieee1275/halt.c and reboot.c by commands/halt.c and
2324 (halt_mod_SOURCES): Likewise.
2325 (reboot_mod_SOURCES): Likewise.
2327 * conf/i386-pc.rmk (grub_emu_SOURCES): Replace
2328 commands/i386/pc/reboot.c by commands/reboot.c.
2329 (reboot_mod_SOURCES): Likewise.
2331 * commands/i386/pc/reboot.c: merge this file ...
2333 * commands/ieee1275/reboot.c: ... and this file ...
2335 * commands/reboot.c: ... to this file.
2336 Add some precompiler directive to include the correct header for
2339 * commands/ieee1275/halt.c: move this file ...
2341 * commands/halt.c: ... to here.
2342 Add some precompiler directive to include the correct header for
2345 * include/grub/efi/efi.h (grub_reboot): New function declaration.
2346 (grub_halt): Likewise.
2348 * kern/efi/efi.c (grub_reboot): New function.
2349 (grub_halt): Likewise.
2351 2008-02-12 Robert Millan <rmh@aybabtu.com>
2353 * util/getroot.c (grub_guess_root_device): Inspect /dev/evms before
2354 /dev (like it is done for /dev/mapper). This doesn't provide support
2355 for EVMS, but at least it is now easy to identify the problem when it
2358 2008-02-11 Robert Millan <rmh@aybabtu.com>
2360 * util/biosdisk.c (grub_util_biosdisk_open, linux_find_partition)
2361 (grub_util_biosdisk_get_grub_dev): Check open() exit status by
2362 comparing it with -1, not 0.
2364 2008-02-10 Robert Millan <rmh@aybabtu.com>
2366 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `disk/raid.c' and
2368 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2369 * conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
2371 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Move `disk/raid.c' and
2372 `disk/lvm.c' to the end of the list.
2373 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
2374 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
2376 2008-02-10 Robert Millan <rmh@aybabtu.com>
2378 * kern/main.c (grub_load_normal_mode): Do not reset `grub_errno'. Call
2379 grub_print_error() instead. This will let user know why we're entering
2381 Based on suggestions from Sam Morris.
2383 2008-02-10 Alexandre Boeglin <alex@boeglin.org>
2385 * normal/arg.c (grub_arg_parse): If one of the args is "--", call add_arg()
2386 on remaining N args, instead of "--" arg N times.
2388 2008-02-09 Vesa Jaaskelainen <chaac@nic.fi>
2390 * font/manager.c (unknown_glyph): Added variable for unknown glyph.
2391 (fill_with_default_glyph): Changed to use unknown_glyph for fill
2392 pattern for unknown glyphs.
2394 2008-02-09 Robert Millan <rmh@aybabtu.com>
2396 * configure.ac: Probe for `help2man'.
2397 * Makefile.in (builddir): New variable.
2398 (HELP2MAN): Likewise. Set to `true' when @HELP2MAN@ doesn't provide it,
2399 or otherwise add a few flags/options to it.
2400 (install-local): For every executable utility or script that is
2401 installed, invoke $(HELP2MAN) to install a manpage based on --help
2404 * util/i386/pc/grub-install.in: Move down `update-grub_lib' sourcing, so
2405 that it doesn't prevent --help from working in build tree.
2407 * util/i386/pc/grub-mkrescue.in (usage): Replace `grub-devel@gnu.org'
2408 with `bug-grub@gnu.org'.
2409 * util/powerpc/ieee1275/grub-mkrescue.in (usage): Likewise.
2410 * util/update-grub.in (usage): New function.
2411 Implement proper argument check, with support for --help and --version
2412 (as well as existing -y).
2414 2008-02-09 Christian Franke <franke@computer.org>
2416 * commands/cat.c (grub_cmd_cat): Print '\r' as hex to
2417 avoid overwriting previous output.
2418 * kern/rescue.c (grub_rescue_cmd_cat): Likewise.
2420 2008-02-09 Robert Millan <rmh@aybabtu.com>
2422 * normal/menu.c (run_menu): If timeout is set to zero, don't bother
2425 2008-02-09 Robert Millan <rmh@aybabtu.com>
2427 * commands/sleep.c: New file.
2428 * conf/common.rmk (pkglib_MODULES): Add `commands/sleep.c'.
2429 (sleep_mod_SOURCES): New variable.
2430 (sleep_mod_CFLAGS): Likewise.
2431 (sleep_mod_LDFLAGS): Likewise.
2433 2008-02-09 Robert Millan <rmh@aybabtu.com>
2435 * disk/raid.c (grub_raid_scan_device): Add a pair of sanity checks for
2436 situations in which we can deduce the RAID size and the superblock
2439 2008-02-09 Robert Millan <rmh@aybabtu.com>
2441 * disk/lvm.c [GRUB_UTIL] (grub_lvm_memberlist): New function. Construct
2442 and return a grub_diskmemberlist_t composed of LVM physical volumes.
2443 [GRUB_UTIL] (grub_lvm_dev): Add `memberlist' member.
2445 * disk/raid.c [GRUB_UTIL] (grub_raid_memberlist): New function. Construct
2446 and return a grub_diskmemberlist_t composed of physical array members.
2447 [GRUB_UTIL] (grub_raid_dev): Add `memberlist' member.
2449 * include/grub/disk.h [GRUB_UTIL] (grub_disk_memberlist): New struct
2451 [GRUB_UTIL] (struct grub_disk_dev): Add `memberlist' function pointer.
2452 [GRUB_UTIL] (struct grub_disk_memberlist): New struct declaration.
2453 [GRUB_UTIL] (grub_disk_memberlist_t): New typedef.
2455 * util/grub-probe.c (probe): Move partmap probing code from here ...
2456 (probe_partmap): ... to here.
2457 (probe): Use probe_partmap() once for the disk we're probing, and
2458 additionally, when such disk contains a memberlist() struct member,
2459 once for each disk that is contained in the structure returned by
2462 2008-02-09 Robert Millan <rmh@aybabtu.com>
2464 * util/grub-probe.c (main): When `verbosity > 1', set `debug'
2465 environment variable to 'all' in order to obtain debug output from
2467 * util/i386/pc/grub-setup.c (main): Likewise.
2469 2008-02-08 Robert Millan <rmh@aybabtu.com>
2471 * disk/raid.c (grub_raid_scan_device): Check for
2472 `array->device[sb.this_disk.number]' rather than for
2473 `array->device[sb.this_disk.number]->name', since the latter is not
2474 guaranteed to be accessible.
2476 2008-02-08 Robert Millan <rmh@aybabtu.com>
2478 * disk/raid.c: Update copyright.
2479 * fs/cpio.c: Likewise.
2480 * include/grub/raid.h: Likewise.
2481 * loader/i386/pc/multiboot.c: Likewise.
2482 * util/hostfs.c: Likewise.
2484 2008-02-08 Robert Millan <rmh@aybabtu.com>
2486 * include/grub/raid.h (struct grub_raid_array): Change type of `device'
2487 to a grub_disk_t array.
2488 * disk/raid.c (grub_raid_read): Replace `device[x].disk' accesses with
2490 (grub_raid_scan_device): Replace `device[x].name' accesses with
2491 `device[x]->name'. Simplify initialization of `array->device[x]'.
2493 2008-02-08 Robert Millan <rmh@aybabtu.com>
2495 * disk/raid.c (grub_raid_open, grub_raid_scan_device): Add a few
2496 grub_dprintf() calls.
2497 * kern/disk.c (grub_disk_read): Include grub_errmsg in out of range
2500 2008-02-07 Christian Franke <franke@computer.org>
2502 * util/hostfs.c (grub_hostfs_open): Use fseeko and ftello
2503 instead of fseek and ftell to support large files.
2504 (grub_hostfs_read): Likewise.
2506 2008-02-07 Robert Millan <rmh@aybabtu.com>
2508 Patch from Jeroen Dekkers.
2509 * disk/raid.c (grub_raid_scan_device): Reset `grub_errno' on disk
2510 failure, since successfully reading all array members might not be
2513 2008-02-06 Robert Millan <rmh@aybabtu.com>
2515 * util/grub-probe.c (probe): Simplify partmap probing (with the
2516 assumption that the first word up to the underscore equals to
2519 2008-02-06 Christian Franke <franke@computer.org>
2521 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_NONE
2522 (and set *ofs = 0) instead of GRUB_ERR_FILE_NOT_FOUND on
2523 last block of a cpio or tar stream.
2524 Check for "TRAILER!!!" instead of any empty data
2525 block to detect last block of a cpio stream.
2526 (grub_cpio_dir): Fix constness of variable np.
2527 (grub_cpio_open): Return GRUB_ERR_FILE_NOT_FOUND if
2528 cpio or tar trailer is detected. This fixes a crash
2529 on open of a non existing file.
2531 2008-02-05 Bean <bean123ch@gmail.com>
2533 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Get physical
2535 (grub_multiboot_load_elf64): Likewise.
2536 (grub_multiboot): Initialize mbi structure.
2538 * util/grub-fstest.c: Don't include unused header file script.h.
2540 * conf/common.rmk (grub-fstest.c_DEPENDENCIES): Move to the beginning
2542 (grub_fstest_SOURCES): Likewise.
2544 2008-02-05 Robert Millan <rmh@aybabtu.com>
2546 * include/grub/term.h (GRUB_TERM_LEFT, GRUB_TERM_RIGHT)
2547 (GRUB_TERM_UP, GRUB_TERM_DOWN, GRUB_TERM_HOME, GRUB_TERM_END)
2548 (GRUB_TERM_DC, GRUB_TERM_PPAGE, GRUB_TERM_NPAGE, GRUB_TERM_ESC)
2549 (GRUB_TERM_TAB, GRUB_TERM_BACKSPACE): New macros.
2551 * kern/i386/pc/startup.S: Include `<grub/term.h>'.
2552 (translation_table): Replace hardcoded values with macros
2553 provided by `<grub/term.h>'.
2555 * term/i386/pc/at_keyboard.c: Include `<grub/term.h>'.
2556 (keyboard_map): Correct/add a few values, with macros provided
2558 (keyboard_map_shift): Zero values that don't differ from their
2559 `keyboard_map' equivalents.
2560 (grub_console_checkkey): Optimize KEYBOARD_STATUS_CAPS_LOCK toggling.
2561 Discard the second scan code that is always sent by Caps lock.
2562 Only use `keyboard_map_shift' when it provides a non-zero value,
2563 otherwise fallback to `keyboard_map'.
2565 2008-02-04 Bean <bean123ch@gmail.com>
2567 * Makefile.in (enable_grub_fstest): New variable.
2569 * conf/common.rmk (grub_fstest_init.lst): New rule.
2570 (grub_fstest_init.h): Likewise.
2571 (grub_fstest_init.c): Likewise.
2572 (util/grub-fstest.c_DEPENDENCIES): New variable.
2573 (grub_fstest_SOURCES): Likewise.
2575 * configure.ac (enable_grub_fstest): Check for --enable-grub-fstest.
2577 * util/grub-fstest.c: New file.
2579 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
2581 Make grub-setup handle a separate root device.
2583 * util/i386/pc/grub-setup.c (setup): Always open the root device,
2584 so that the root device can be compared with the destination
2586 When embedding the core image, if the root and destination devices
2587 are different, set ROOT_DRIVE to ROOT_DEV->DISK->ID. Otherwise, to
2589 When not embedding, set ROOT_DRIVE to 0xFF.
2591 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
2593 Add support for having a grub directory in a different drive. This
2594 is still only the data handling part.
2596 * kern/i386/pc/startup.S (multiboot_trampoline): Set %dh to 0xFF.
2597 (codestart): Save %dh in GRUB_ROOT_DRIVE.
2598 (grub_root_drive): New variable.
2600 * kern/i386/pc/init.c (make_install_device): Use GRUB_ROOT_DRIVE
2601 instead of GRUB_BOOT_DRIVE to construct a device name. Set
2602 GRUB_ROOT_DRIVE to GRUB_BOOT_DRIVE if it is 0xFF, otherwise use it
2605 * include/grub/i386/pc/kernel.h (grub_root_drive): New prototype.
2607 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_ROOT_DRIVE): New
2609 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Set to 0x4f.
2611 * boot/i386/pc/pxeboot.S (_start): Set %dh to 0xFF. For now, this
2612 is bogus, because PXE booting does not specify any drive
2615 * boot/i386/pc/lnxboot.S (reg_edx): Set the second byte to 0xFF. I
2616 am not sure if this is really correct.
2618 * boot/i386/pc/cdboot.S: Set %dh to 0xFF, because the root drive
2619 is always identical to the boot drive when booting from a CD.
2621 * boot/i386/pc/boot.S (MOV_MEM_TO_AL): Removed. Not needed any
2623 (root_drive): New variable.
2624 (real_start): Unconditionally set %dh to ROOT_DRIVE.
2625 (setup_sectors): Push %dx right after popping it, because %dh will
2627 (copy_buffer): Restore %dx.
2629 2008-02-03 Robert Millan <rmh@aybabtu.com>
2631 * util/i386/pc/grub-mkrescue.in: Rewrite most of image generation to
2632 use `cdboot.img' for cdrom images.
2634 2008-02-03 Robert Millan <rmh@aybabtu.com>
2636 * util/grub.d/00_header.in: Issue scripting commands for GRUB to
2637 only setup gfxterm when `font' command has succeeded.
2639 2008-02-03 Robert Millan <rmh@aybabtu.com>
2641 * loader/multiboot_loader.c [GRUB_MACHINE_LINUXBIOS]
2642 (grub_rescue_cmd_multiboot_loader)
2643 (grub_rescue_cmd_module_loader): Enable multiboot1 calls.
2645 2008-02-03 Pavel Roskin <proski@gnu.org>
2647 * kern/i386/pc/startup.S (grub_chainloader_real_boot): Pop
2648 %edx and %esi from stack only after grub_gate_a20() is called.
2649 grub_gate_a20() clobbers %edx.
2651 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
2653 * configure.ac (AC_INIT): Bumped to 1.96.
2655 * DISTLIST: Added boot/i386/pc/cdboot.S, bus/pci.c,
2656 commands/lspci.c,disk/memdisk.c, include/grub/pci.h,
2657 include/grub/i386/pc/pci.h, video/readers/jpeg.c, and
2658 video/readers/png.c.
2660 2008-02-03 Bean <bean123ch@gmail.com>
2662 * conf/i386-pc.rmk (pkglib_IMAGES): Add cdboot.img.
2663 (cdboot_img_SOURCES): New variable.
2664 (cdboot_img_ASFLAGS): New variable.
2665 (cdboot_img_LDFLAGS): New variable.
2667 * boot/i386/pc/cdboot.S: New file.
2669 * disk/i386/pc/biosdisk.c (cd_start): New variable.
2670 (cd_count): Likewise.
2671 (grub_biosdisk_get_drive): Add support for cd device.
2672 (grub_biosdisk_call_hook): Likewise.
2673 (grub_biosdisk_iterate): Likewise.
2674 (grub_biosdisk_open): Likewise.
2675 (GRUB_BIOSDISK_CDROM_RETRY_COUNT): New macro.
2676 (grub_biosdisk_rw): Support reading from cd device.
2677 (GRUB_MOD_INIT): Iterate cd devices.
2679 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_FLAG_CDROM): New macro.
2680 (GRUB_BIOSDISK_MACHINE_CDROM_START): Likewise.
2681 (GRUB_BIOSDISK_MACHINE_CDROM_END): Likewise.
2683 * kern/i386/pc/init.c (make_install_device): Check for cd device.
2685 2008-02-02 Robert Millan <rmh@aybabtu.com>
2687 * commands/read.c: New file.
2688 * conf/common.rmk (pkglib_MODULES): Add `commands/read.c'.
2689 (read_mod_SOURCES): New variable.
2690 (read_mod_CFLAGS): Likewise.
2691 (read_mod_LDFLAGS): Likewise.
2693 2008-02-02 Robert Millan <rmh@aybabtu.com>
2695 * normal/main.c (grub_normal_execute): Check for `menu->size' when
2696 determining whether menu has to be displayed.
2698 2008-02-02 Marco Gerards <marco@gnu.org>
2700 * bus/pci.c: New file.
2702 * include/grub/pci.h: Likewise.
2704 * include/grub/i386/pc/pci.h: Likewise.
2706 * commands/lspci.c: Likewise.
2708 * conf/i386-pc.rmk (pkglib_MODULES): Add `pci.mod' and
2710 (pci_mod_SOURCES): New variable.
2711 (pci_mod_CFLAGS): Likewise.
2712 (pci_mod_LDFLAGS): Likewise.
2713 (lspci_mod_SOURCES): Likewise.
2714 (lspci_mod_CFLAGS): Likewise.
2715 (lspci_mod_LDFLAGS): Likewise.
2717 2008-02-02 Bean <bean123ch@gmail.com>
2719 * fs/ufs.c (INODE_BLKSZ): Fix incorrect value.
2720 (grub_ufs_get_file_block): Fix indirect block calculation problem.
2722 * fs/xfs.c (grub_xfs_sblock): New member log2_dirblk.
2723 (grub_xfs_btree_node): New structure.
2724 (grub_xfs_btree_root): New structure.
2725 (grub_xfs_inode): New members nblocks, extsize, nextents and btree.
2726 (GRUB_XFS_EXTENT_OFFSET): Use exts instead of inode->data.extents.
2727 (GRUB_XFS_EXTENT_BLOCK): Likewise.
2728 (GRUB_XFS_EXTENT_SIZE): Likewise.
2729 (grub_xfs_read_block): Support btree format type.
2730 (grub_xfs_iterate_dir): Use NESTED_FUNC_ATTR in call_hook.
2731 Use directory block as basic unit.
2733 * fs/fshelp.c (grub_fshelp_read_file): Bug fix for sparse block.
2735 * aclocal.m4 (grub_i386_CHECK_REGPARM_BUG): Define NESTED_FUNC_ATTR as
2736 __attribute__ ((__regparm__ (1))).
2738 2008-02-01 Robert Millan <rmh@aybabtu.com>
2740 Correct a mistake in previous commit.
2742 * conf/i386-pc.rmk (normal/execute.c_DEPENDENCIES): Move to the
2744 (normal/command.c_DEPENDENCIES): New variable.
2746 2008-02-01 Robert Millan <rmh@aybabtu.com>
2748 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Move to the
2750 (normal/command.c_DEPENDENCIES): New variable.
2751 (grub-emu_DEPENDENCIES, normal_mod_DEPENDENCIES): Remove variables.
2752 * conf/i386-ieee1275.rmk: Likewise.
2753 * conf/i386-linuxbios.rmk: Likewise.
2754 * conf/i386-pc.rmk: Likewise.
2755 * conf/sparc64-ieee1275.rmk: Likewise.
2756 * conf/powerpc-ieee1275.rmk: Likewise.
2757 (grub_emu_SOURCES): Add `fs/fshelp.c'.
2759 * genmk.rb: Add `$(#{src}_DEPENDENCIES)' in targets that require it.
2761 2008-02-01 Robert Millan <rmh@aybabtu.com>
2763 * kern/disk.c (grub_disk_read, grub_disk_write): Add grub_dprintf()
2764 call at beginning of function.
2766 2008-01-31 Pavel Roskin <proski@gnu.org>
2768 * util/powerpc/ieee1275/grub-mkrescue.in: New file.
2769 * conf/powerpc-ieee1275.rmk (bin_SCRIPTS): New variable.
2770 (grub_mkrescue_SOURCES): Likewise.
2771 * DISTLIST: Add util/powerpc/ieee1275/grub-mkrescue.in.
2773 2008-01-30 Robert Millan <rmh@aybabtu.com>
2775 * conf/i386-pc.rmk (sbin_UTILITIES): Remove `grub-probe'.
2776 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Moved from here ...
2777 * conf/common.rmk (util/grub-probe.c_DEPENDENCIES)
2778 (grub_probe_SOURCES): ... to here.
2780 * conf/i386-efi.rmk (sbin_UTILITIES): Remove `grub-probe'.
2781 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Remove.
2782 * conf/i386-ieee1275.rmk: Likewise.
2783 * conf/i386-linuxbios.rmk: Likewise.
2784 * conf/powerpc-ieee1275.rmk: Likewise.
2786 2008-01-30 Tristan Gingold <gingold@free.fr>
2788 * kern/rescue.c: Silently accept empty lines.
2790 2008-01-29 Bean <bean123ch@gmail.com>
2792 * boot/i386/pc/lnxboot.S (data_start): Code cleanup.
2793 (real_code_2): Code cleanup and change comment style.
2794 (move_memory): Avoid using 32-bit address mode.
2796 2008-01-29 Bean <bean123ch@gmail.com>
2798 * conf/i386-pc.rmk (pkglib_MODULES): Add `png.mod'.
2799 (png_mod_SOURCES): New variable.
2800 (png_mod_CFLAGS): Likewise.
2801 (png_mod_LDFLAGS): Likewise.
2803 * video/readers/png.c: New file.
2805 2008-01-28 Robert Millan <rmh@aybabtu.com>
2807 * include/grub/i386/linuxbios/kernel.h (GRUB_MOD_GAP): New macro.
2808 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Remove
2809 `ifndef GRUB_MOD_GAP' hack.
2810 * util/elf/grub-mkimage.c (add_segments): Likewise.
2812 2008-01-27 Robert Millan <rmh@aybabtu.com>
2814 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Skip
2815 `GRUB_MOD_GAP' for platforms in which it's not defined.
2816 * util/elf/grub-mkimage.c (add_segments): Likewise.
2818 2008-01-27 Robert Millan <rmh@aybabtu.com>
2820 Get grub-emu to build again (including parallel builds).
2822 * conf/i386-pc.rmk (util/grub-emu.c_DEPENDENCIES): Remove variable.
2824 (util/grub-emu.c_DEPENDENCIES): ... this, ...
2825 (normal/execute.c_DEPENDENCIES): ... this, ...
2826 (grub-emu_DEPENDENCIES): ... and this.
2828 * conf/i386-efi.rmk: Likewise.
2829 * conf/i386-linuxbios.rmk: Likewise.
2830 * conf/i386-ieee1275.rmk: Likewise.
2831 * conf/powerpc-ieee1275.rmk: Likewise.
2832 (grub_emu_SOURCES): Remove duplicated `kern/file.c'.
2834 2008-01-27 Robert Millan <rmh@aybabtu.com>
2836 * NEWS: Add a few items.
2838 2008-01-27 Robert Millan <rmh@aybabtu.com>
2840 Fix parallel builds with grub-emu. Based on earlier commit for
2841 grub-probe and grub-setup.
2843 * conf/i386-pc.rmk (grub-emu_DEPENDENCIES): Renamed to ...
2844 (util/grub-emu.c_DEPENDENCIES): ... this.
2845 * conf/i386-efi.rmk (grub-emu_DEPENDENCIES): Renamed to ...
2846 (util/grub-emu.c_DEPENDENCIES): ... this.
2847 * conf/i386-linuxbios.rmk (grub-emu_DEPENDENCIES): Renamed to ...
2848 (util/grub-emu.c_DEPENDENCIES): ... this.
2849 * conf/i386-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
2850 (util/grub-emu.c_DEPENDENCIES): ... this.
2851 * conf/powerpc-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
2852 (util/grub-emu.c_DEPENDENCIES): ... this.
2854 2008-01-27 Pavel Roskin <proski@gnu.org>
2856 * include/grub/powerpc/ieee1275/kernel.h: Introduce GRUB_MOD_GAP
2857 to create a gap between _end and the modules added to the image
2858 with grub-mkrescue. That fixes "CLAIM failed" on PowerMAC.
2859 * kern/powerpc/ieee1275/init.c: Use GRUB_MOD_GAP.
2860 * util/elf/grub-mkimage.c (add_segments): Likewise.
2862 2008-01-26 Pavel Roskin <proski@gnu.org>
2864 * kern/dl.c (grub_dl_load): Don't abort if prefix is not set,
2865 just return an error.
2867 2008-01-26 Bean <bean123ch@gmail.com>
2869 * fs/reiserfs.c (grub_fshelp_node): New member next_offset.
2870 (grub_reiserfs_get_item): Save offset of the next item.
2871 (grub_reiserfs_iterate_dir): Use next_offset to find next item.
2873 2008-01-25 Robert Millan <rmh@aybabtu.com>
2875 * conf/i386-pc.rmk (grub_setup_SOURCES, grub_emu_SOURCES): Regroup to
2876 make all filesystem sources appear together (possibly fixing omissions
2878 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
2879 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2880 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
2881 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2883 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise. Additionally,
2885 * conf/i386-efi.rmk (grub_probe_SOURCES): Likewise.
2886 * conf/i386-ieee1275.rmk (grub_probe_SOURCES): Likewise.
2887 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Likewise.
2888 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Likewise.
2890 * util/grub-probe.c: Include `<grub/file.h>' and `<sys/stat.h>'.
2891 (probe): Add a sanity check to make sure of our ability to read
2892 requested files when probing for filesystem type.
2894 * genmk.rb: Update copyright year (2007).
2896 * include/grub/fs.h (grub_fat_init, grub_fat_fini, grub_ext2_init)
2897 (grub_ext2_fini, grub_ufs_init, grub_ufs_fini, grub_minix_init)
2898 (grub_minix_fini, grub_hfs_init, grub_hfs_fini, grub_jfs_init)
2899 (grub_jfs_fini, grub_xfs_init, grub_xfs_fini, grub_affs_init)
2900 (grub_affs_fini, grub_sfs_init, grub_sfs_fini, grub_iso9660_init)
2901 : Remove function prototypes.
2903 2008-01-25 Robert Millan <rmh@aybabtu.com>
2905 Revert my previous commits (based on wrong assumption of how grub_errno
2908 * kern/disk.c (grub_disk_open): Stop resetting grub_errno.
2909 * kern/file.c (grub_file_open): Likewise.
2911 2008-01-24 Pavel Roskin <proski@gnu.org>
2913 * include/grub/ieee1275/ieee1275.h: Introduce flag for firmwares
2914 that hang if GRUB tries to setup colors.
2915 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Don't set
2916 colors for firmwares that don't support it.
2917 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag):
2918 Recognize Open Hack'Ware, set flags to work around its
2921 2008-01-24 Robert Millan <rmh@aybabtu.com>
2923 * kern/file.c (grub_file_open): Do not account previous failures of
2924 unrelated functions when grub_errno is checked for.
2925 Reported by Oleg Strikov.
2927 2008-01-24 Bean <bean123ch@gmail.com>
2929 * fs/ufs.c (GRUB_UFS_VOLNAME_LEN): New macro.
2930 (grub_ufs_sblock): New member volume name.
2931 (grub_ufs_find_file): Fix string copy bug.
2932 (grub_ufs_label): Implement this function properly.
2934 * fs/hfs.c (grub_hfs_cnid_type): New enum.
2935 (grub_hfs_iterate_records): Use the correct file number for extents
2936 and catalog file. Fix problem in next index calculation.
2937 (grub_hfs_find_node): Replace recursive function call with loop.
2938 (grub_hfs_iterate_dir): Replace recursive function call with loop.
2940 2008-01-23 Robert Millan <rmh@aybabtu.com>
2942 * include/grub/i386/ieee1275/loader.h: Include `<grub/types.h>',
2943 `<grub/symbol.h>' and `<grub/multiboot.h>'.
2944 (grub_multiboot2_real_boot): New function prototype.
2946 * include/grub/i386/pc/memory.h: Include `<grub/machine/machine.h>'.
2947 [!GRUB_MACHINE_IEEE1275] (grub_lower_mem, grub_upper_mem): Disable.
2949 * kern/i386/ieee1275/init.c (grub_os_area_addr)
2950 (grub_os_area_size, grub_lower_mem, grub_upper_mem): Remove variables.
2952 2008-01-23 Robert Millan <rmh@aybabtu.com>
2954 * kern/mm.c (grub_mm_init_region): Replace grub_dprintf() call with
2955 #ifdef'ed out grub_printf().
2957 2008-01-23 Robert Millan <rmh@aybabtu.com>
2959 * term/i386/pc/at_keyboard.c (grub_keyboard_isr): #ifdef out
2960 grub_dprintf calls, since they make "debug=all" mode unusable.
2961 (grub_console_checkkey): Likewise.
2963 2008-01-23 Robert Millan <rmh@aybabtu.com>
2965 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
2966 `term/i386/pc/at_keyboard.c'.
2967 (pkglib_MODULES): Add `serial.mod'.
2968 (serial_mod_SOURCES): New variable.
2969 (serial_mod_CFLAGS): Likewise.
2970 (serial_mod_LDFLAGS): Likewise.
2972 * include/grub/i386/ieee1275/console.h: Add `<grub/symbol.h>'. Remove
2973 `<grub/powerpc/ieee1275/console.h>'.
2974 (grub_keyboard_controller_init): New function prototype.
2975 (grub_console_checkkey): Likewise.
2976 (grub_console_getkey): Likewise.
2978 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize AT
2981 * term/ieee1275/ofconsole.c (grub_ofconsole_term): On i386, use
2982 grub_ofconsole_checkkey() and grub_ofconsole_getkey() for input.
2984 2008-01-23 Robert Millan <rmh@aybabtu.com>
2986 * kern/i386/pc/init.c (make_install_device): When memdisk image is
2987 present, "(memdisk)/boot/grub" becomes the default prefix.
2989 * util/i386/pc/grub-mkrescue.in: Switch to a minimal core.img plus
2990 a memdisk tarball with all the modules. Add --overlay=DIR option that
2991 allows users to overlay additional files into the image.
2993 2008-01-23 Robert Millan <rmh@aybabtu.com>
2995 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add `machine/loader.h'
2996 and `machine/memory.h'.
2997 (pkglib_MODULES): Add `multiboot.mod' and `_multiboot.mod'.
2998 (_multiboot_mod_SOURCES): New variable.
2999 (_multiboot_mod_CFLAGS): Likewise.
3000 (_multiboot_mod_LDFLAGS): Likewise.
3001 (multiboot_mod_SOURCES): Likewise.
3002 (multiboot_mod_CFLAGS): Likewise.
3003 (multiboot_mod_LDFLAGS): Likewise.
3005 * include/grub/i386/ieee1275/loader.h: New file.
3007 * include/grub/i386/ieee1275/machine.h: Likewise.
3009 * include/grub/i386/ieee1275/memory.h: Likewise.
3011 * include/grub/i386/pc/init.h (grub_os_area_addr): Remove (redundant)
3012 variable declaration.
3013 (grub_os_area_size): Likewise.
3015 * kern/i386/ieee1275/init.c (grub_os_area_addr, grub_os_area_size)
3016 (grub_lower_mem, grub_upper_mem): New variables.
3017 (grub_stop_floppy): New function (just to make
3018 grub_multiboot2_real_boot() happy).
3020 * kern/i386/ieee1275/startup.S: Include `<grub/machine/memory.h>',
3021 `<grub/cpu/linux.h>', `<multiboot.h>' and `<multiboot2.h>'.
3022 (grub_stop): New function.
3023 Include `"../realmode.S"' and `"../loader.S"'.
3025 * loader/multiboot_loader.c: Include `<grub/machine/machine.h>'.
3026 Replace `__i386__' #ifdefs with `GRUB_MACHINE_PCBIOS'.
3028 * loader/powerpc/ieee1275/multiboot2.c (grub_mb2_arch_boot): On i386,
3029 rely on grub_multiboot2_real_boot() for final boot.
3031 2008-01-22 Robert Millan <rmh@aybabtu.com>
3033 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): When
3034 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag is set, skip any
3035 device that doesn't look like an SD card.
3036 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
3037 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag.
3038 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag): Detect
3039 OLPC laptop, and set `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' when
3042 2008-01-22 Robert Millan <rmh@aybabtu.com>
3044 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Add sanity check to
3045 avoid claiming over our own code.
3047 2008-01-22 Bean <bean123ch@gmail.com>
3049 * conf/i386-pc.rmk (pkglib_MODULES): Add `jpeg.mod'.
3050 (jpeg_mod_SOURCES): New variable.
3051 (jpeg_mod_CFLAGS): Likewise.
3052 (jpeg_mod_LDFLAGS): Likewise.
3054 * video/readers/jpeg.c : New file.
3056 2008-01-22 Bean <bean123ch@gmail.com>
3058 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_FILE_NOT_FOUND when
3059 there are no more items.
3061 2008-01-21 Robert Millan <rmh@aybabtu.com>
3063 * kern/mm.c (grub_mm_init_region): Improve debug message.
3065 2008-01-21 Robert Millan <rmh@aybabtu.com>
3067 * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): New variable.
3068 (kernel_img_LDFLAGS): Use `GRUB_MEMORY_MACHINE_LINK_ADDR' as link
3070 (grub_mkimage_CFLAGS): Propagate `GRUB_MEMORY_MACHINE_LINK_ADDR' as
3072 * include/grub/i386/pc/memory.h (GRUB_MEMORY_MACHINE_UPPER): New macro.
3073 Indicates start of upper memory.
3074 * util/i386/pc/grub-mkimage.c: Include `<grub/machine/memory.h>'.
3075 (generate_image): Abort when image size is big enough to corrupt
3078 * include/grub/i386/pc/vga.h: Include `<grub/machine/memory.h>'.
3079 (GRUB_MEMORY_MACHINE_VGA_ADDR): Alias for `GRUB_MEMORY_MACHINE_UPPER'.
3080 * term/i386/pc/vga.c (VGA_MEM): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
3081 instead of hardcoding 0xA0000.
3082 * video/i386/pc/vbe.c: Include `<grub/machine/vga.h>'.
3083 (grub_vbe_set_video_mode): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
3084 instead of hardcoding 0xA0000.
3086 2008-01-21 Robert Millan <rmh@aybabtu.com>
3088 * disk/memdisk.c (memdisk_size): New variable.
3089 (grub_memdisk_open): Replace grub_arch_memdisk_size() call with
3091 (grub_memdisk_init): Initialize `memdisk_size'. Reallocate memdisk
3092 image to dynamic memory.
3093 (grub_memdisk_fini): Replace grub_arch_memdisk_size() call with
3094 `memdisk_size'. Free memdisk block.
3096 2008-01-21 Robert Millan <rmh@aybabtu.com>
3098 Fix detection of very small filesystems (like tar).
3100 * fs/reiserfs.c (grub_reiserfs_mount): When disk is too small to
3101 contain a ReiserFS, abort with GRUB_ERR_BAD_FS rather than
3102 GRUB_ERR_OUT_OF_RANGE (which made the upper layer think there's
3103 a problem with this disk).
3105 2008-01-21 Robert Millan <rmh@aybabtu.com>
3107 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Add debug message
3108 on grub_biosdisk_rw_standard() error.
3110 2008-01-21 Robert Millan <rmh@aybabtu.com>
3112 * include/grub/ieee1275/ieee1275.h: Add 2008 to Copyright line for
3114 * kern/elf.c: Likewise.
3115 * kern/ieee1275/ieee1275.c: Likewise.
3116 * kern/powerpc/ieee1275/openfw.c: Likewise.
3117 * term/ieee1275/ofconsole.c: Likewise.
3119 2008-01-21 Robert Millan <rmh@aybabtu.com>
3121 * include/grub/i386/pc/kernel.h: Include `<grub/symbol.h>'.
3123 * include/grub/kernel.h (grub_arch_memdisk_addr)
3124 (grub_arch_memdisk_size): Moved from here ...
3126 * include/grub/i386/pc/kernel.h (grub_arch_memdisk_addr)
3127 (grub_arch_memdisk_size): ... to here.
3129 2008-01-21 Robert Millan <rmh@aybabtu.com>
3131 Mostly based on bugfix from Bean.
3133 * kern/elf.c (grub_elf32_phdr_iterate): Use `NESTED_FUNC_ATTR'
3134 attribute with hook() parameter.
3135 (grub_elf32_load): Use `NESTED_FUNC_ATTR' with grub_elf32_load_segment()
3137 (grub_elf64_phdr_iterate): Use `NESTED_FUNC_ATTR'
3138 attribute with hook() parameter.
3139 (grub_elf64_load): Use `NESTED_FUNC_ATTR' with grub_elf64_load_segment()
3142 2008-01-21 Robert Millan <rmh@aybabtu.com>
3144 * conf/i386-pc.rmk (kernel_img_HEADERS): Add `machine/kernel.h'.
3145 (pkglib_MODULES): Add `memdisk.mod'.
3146 (memdisk_mod_SOURCES): New variable.
3147 (memdisk_mod_CFLAGS): Likewise.
3148 (memdisk_mod_LDFLAGS): Likewise.
3150 * disk/memdisk.c: New file.
3152 * include/grub/disk.h (grub_disk_dev_id): Add
3153 `GRUB_DISK_DEVICE_MEMDISK_ID'.
3155 * include/grub/i386/pc/kernel.h
3156 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): New macro.
3157 (GRUB_KERNEL_MACHINE_PREFIX): Increment by 4.
3158 (grub_kernel_image_size): New variable declaration.
3159 (grub_total_module_size): Likewise.
3160 (grub_memdisk_image_size): Likewise.
3162 * include/grub/i386/pc/memory.h
3163 (GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR): New macro.
3165 * include/grub/kernel.h: Include `<grub/symbol.h>'.
3166 (grub_arch_memdisk_addr): New variable declaration.
3167 (grub_arch_memdisk_size): Likewise.
3169 * kern/i386/pc/init.c (grub_arch_memdisk_addr): New function.
3170 (grub_arch_memdisk_size): Likewise.
3172 * kern/i386/pc/startup.S (grub_memdisk_image_size): New variable.
3173 (codestart): Replace hardcoded `0x100000' with
3174 `GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR' macro.
3176 * util/i386/pc/grub-mkimage.c: Include `<grub/misc.h>'.
3177 (generate_image): Add `memdisk_path' parameter. When `memdisk_path' is
3178 not NULL, append the contents of the file it refers to, at the end of
3179 the compressed kernel image. Initialize `grub_memdisk_image_size'
3180 variable (at `GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE' offset).
3181 (options): Add "memdisk"|'m' option.
3182 (main): Parse --memdisk|-m option, and pass user-provided path as
3183 parameter to generate_image().
3185 2008-01-20 Robert Millan <rmh@aybabtu.com>
3187 * kern/sparc64/ieee1275/openfw.c (grub_devalias_iterate): Copy debug
3188 grub_dprintf() calls from here ...
3189 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): ... to here.
3191 2008-01-20 Robert Millan <rmh@aybabtu.com>
3193 Fix detection of "real mode" when /options/real-mode? doesn't exist.
3195 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_mmu): New variable
3197 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_mmu): New variable.
3198 (grub_ieee1275_find_options): If `grub_ieee1275_mmu' is 0, set
3199 `GRUB_IEEE1275_FLAG_REAL_MODE'.
3200 (cmain): Initialize `grub_ieee1275_mmu' (using /chosen/mmu integer
3202 * kern/powerpc/ieee1275/openfw.c (grub_map): Rely on pre-initialized
3203 `grub_ieee1275_mmu' rather than obtaining a handler on every call.
3205 2008-01-19 Robert Millan <rmh@aybabtu.com>
3207 Get rid of confusing function (superseded by
3208 `grub_ieee1275_get_integer_property')
3209 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_decode_int_4): Remove
3211 * kern/ieee1275/ieee1275.c (grub_ieee1275_decode_int_4): Remove
3213 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid use of
3214 grub_ieee1275_decode_int_4(), by obtaining integer properties directly
3215 in native endianness from grub_ieee1275_get_integer_property().
3217 2008-01-19 Robert Millan <rmh@aybabtu.com>
3219 * kern/powerpc/ieee1275/openfw.c (grub_halt): Issue "power-off"
3220 command after "shut-down", since implementations differ on which
3221 the command for halt is.
3223 2008-01-19 Robert Millan <rmh@aybabtu.com>
3225 * include/grub/i386/linuxbios/console.h: Add header protection.
3226 (grub_keyboard_controller_init): New function prototype.
3227 * term/i386/pc/at_keyboard.c (KEYBOARD_COMMAND_ISREADY): New macro.
3228 (KEYBOARD_COMMAND_READ): Likewise.
3229 (KEYBOARD_COMMAND_WRITE): Likewise.
3230 (KEYBOARD_SCANCODE_SET1): Likewise.
3231 (grub_keyboard_controller_write): New function.
3232 (grub_keyboard_controller_read): Likewise.
3233 (grub_keyboard_controller_init): Likewise.
3235 * term/i386/pc/console.c: Include `<grub/machine/machine.h>'.
3236 (grub_console_init): On coreboot/LinuxBIOS, call
3237 grub_keyboard_controller_init().
3239 2008-01-19 Robert Millan <rmh@aybabtu.com>
3241 PowerPC changes provided by Pavel Roskin.
3243 * kern/powerpc/ieee1275/cmain.c (cmain): Don't take any arguments.
3244 * kern/powerpc/ieee1275/crt0.S: Store r5 in grub_ieee1275_entry_fn,
3245 don't rely on cmain() doing it.
3246 * kern/i386/ieee1275/startup.S (_start): Store %eax in
3247 grub_ieee1275_entry_fn, don't rely on cmain() doing it.
3249 2008-01-16 Robert Millan <rmh@aybabtu.com>
3251 * include/grub/i386/linuxbios/memory.h
3252 (GRUB_MEMORY_MACHINE_LINUXBIOS_TABLE_ADDR): Remove macro.
3253 * kern/i386/linuxbios/table.c (grub_linuxbios_table_iterate): Do not
3254 receive `table_header' as argument. Instead, probe for it in the
3255 known memory ranges where it can be present.
3256 (grub_available_iterate): Do not pass a fixed `table_header' address
3257 to grub_linuxbios_table_iterate().
3259 2008-01-15 Robert Millan <rmh@aybabtu.com>
3261 * configure.ac: Add `i386-ieee1275' to the list of supported targets.
3262 * conf/i386-ieee1275.rmk: New file.
3263 * include/grub/i386/ieee1275/console.h: Likewise.
3264 * include/grub/i386/ieee1275/ieee1275.h: Likewise.
3265 * include/grub/i386/ieee1275/kernel.h: Likewise.
3266 * include/grub/i386/ieee1275/time.h: Likewise.
3267 * kern/i386/ieee1275/init.c: Likewise.
3268 * kern/i386/ieee1275/startup.S: Likewise.
3270 2008-01-15 Robert Millan <rmh@aybabtu.com>
3272 * kern/misc.c (grub_vsprintf): Do not reset `longlongfmt' to zero
3273 when pointers are 32-bit (but still do set it to one when they are
3276 2008-01-15 Robert Millan <rmh@aybabtu.com>
3278 * include/grub/ieee1275/ieee1275.h
3279 (grub_ieee1275_get_integer_property): New function prototype.
3281 * kern/ieee1275/ieee1275.c: Include `<grub/types.h>'.
3282 (grub_ieee1275_get_integer_property): New function. Wraps around
3283 grub_ieee1275_get_property() to handle endianness.
3285 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Replace
3286 grub_ieee1275_get_property() with grub_ieee1275_get_integer_property()
3288 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Likewise.
3289 (grub_map): Likewise.
3290 * kern/sparc64/ieee1275/openfw.c (grub_map): Likewise.
3292 2008-01-15 Bean <bean123ch@gmail.com>
3294 * normal/execute.c (grub_script_exec_argument_to_string): Check for undefined variable.
3295 (grub_script_execute_cmdline): Reset grub_errno.
3297 * normal/main.c (read_config_file): Reset grub_errno.
3299 * normal/parse.y (script_init): New.
3300 (script): Move function and menuentry here.
3302 (command): Add delimiter at the end of command.
3303 (commands): Adjust to match the new command.
3304 (commandblock): Remove grub_script_lexer_record_start.
3305 (menuentry): Add grub_script_lexer_record_start, use the new commands.
3306 (if): Use the new commands.
3308 * conf/common.rmk (pkgdata_MODULES): Add echo.mod.
3310 2008-01-15 Robert Millan <rmh@aybabtu.com>
3312 * normal/menu.c (run_menu): Move timeout message from here ...
3313 (print_timeout): ... to here.
3314 (run_menu): Use print_timeout() once during initial draw to print
3315 the whole message, and again in every clock tick to update only
3316 the number of seconds.
3318 2008-01-15 Robert Millan <rmh@aybabtu.com>
3320 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Obtain
3321 actual size of `available' from grub_ieee1275_get_property(), and
3322 restrict parsing to that bound.
3324 2008-01-15 Christian Franke <franke@computer.org>
3326 * util/grub-emu.c: Replace <argp.h> by <getopt.h>.
3327 (argp_program_version): Remove variable.
3328 (argp_program_bug_address): Likewise.
3329 (options): Convert from struct argp_option to struct option.
3330 (struct arguments): Remove.
3331 (parse_opt): Remove.
3332 (usage): New function.
3333 (main): Replace struct args members by simple variables.
3334 Replace argp_parse() by getopt_long().
3335 Add switch to evaluate options.
3336 Add missing "(...)" around root_dev in prefix string.
3338 2008-01-14 Robert Millan <rmh@aybabtu.com>
3340 * kern/powerpc/ieee1275/init.c (grub_exit): Reimplement as a wrapper
3341 for grub_ieee1275_exit(), in order to improve portability.
3343 2008-01-14 Robert Millan <rmh@aybabtu.com>
3345 * util/grub.d/10_linux.in (prefix): Define.
3346 (exec_prefix): Likewise. Both definitions are later used by `libdir'.
3348 2008-01-13 Pavel Roskin <proski@gnu.org>
3350 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Don't use
3351 grub_errno if no errors have been detected.
3353 2008-01-12 Robert Millan <rmh@aybabtu.com>
3355 * include/grub/util/getroot.h (grub_dev_abstraction_types): New enum.
3356 (grub_util_get_dev_abstraction): New function prototype.
3358 * util/getroot.c: Include `<grub/util/getroot.h>'
3359 (grub_util_get_grub_dev): Move detection of abstraction type to ...
3360 (grub_util_get_dev_abstraction): ... here (new function).
3362 * util/grub-probe.c: Convert PRINT_* to an enum. Add
3363 `PRINT_ABSTRACTION'.
3364 (probe): Probe for abstraction type when requested.
3365 (main): Understand `--target=abstraction'.
3367 * util/i386/efi/grub-install.in: Add abstraction module to core
3368 image when it is found to be necessary.
3369 * util/i386/pc/grub-install.in: Likewise.
3370 * util/powerpc/ieee1275/grub-install.in: Likewise.
3372 * util/update-grub_lib.in (font_path): Return system path without
3373 converting to GRUB path.
3374 * util/update-grub.in: Convert system path returned by font_path()
3375 to a GRUB path. Use `grub-probe -t abstraction' to determine what
3376 abstraction module is needed for loading fonts (if any). Export
3377 that as `GRUB_PRELOAD_MODULES'.
3378 * util/grub.d/00_header.in: Process `GRUB_PRELOAD_MODULES' (print
3381 2008-01-12 Yoshinori K. Okuji <okuji@enbug.org>
3383 Remove some unused code from reiserfs.
3385 * fs/reiserfs.c (struct grub_reiserfs_key)
3386 [GRUB_REISERFS_KEYV2_BITFIELD]: Removed offset and type.
3387 (struct grub_reiserfs_node_body): Removed.
3388 (grub_reiserfs_get_key_v2_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
3390 (grub_reiserfs_get_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
3392 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
3394 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
3396 (grub_reiserfs_set_key_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
3398 (grub_reiserfs_iterate_dir) [GRUB_REISERFS_KEYV2_BITFIELD]:
3400 (grub_reiserfs_open) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
3401 (grub_reiserfs_read) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
3402 (grub_reiserfs_dir) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
3404 2008-01-10 Robert Millan <rmh@aybabtu.com>
3406 * util/update-grub_lib.in (grub_file_is_not_garbage): New function.
3407 Determines if a file is garbage left by packaging systems, etc.
3408 * util/update-grub.in: Use grub_file_is_not_garbage() as a condition
3409 for processing /etc/grub.d scripts.
3410 * util/grub.d/10_hurd.in: Fix `GRUB_DISTRIBUTOR' comparison.
3411 * util/grub.d/10_linux.in: Likewise. Use grub_file_is_not_garbage()
3412 as a condition for processing Linux images.
3414 2008-01-10 Pavel Roskin <proski@gnu.org>
3416 * include/grub/powerpc/libgcc.h (__ucmpdi2): New export. Needed
3417 to compile reiserfs.c on PowerPC.
3419 2008-01-10 Robert Millan <rmh@aybabtu.com>
3421 * kern/device.c (grub_device_iterate): Do not abort device iteration
3422 when one of the devices cannot be opened.
3423 * kern/disk.c (grub_disk_open): Do not account previous failures of
3424 unrelated functions when grub_errno is checked for.
3426 2008-01-08 Robert Millan <rmh@aybabtu.com>
3428 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): For
3429 `! grub_linux_is_bzimage', change order of address comparison to make
3430 it more intuitive, and improve "too big zImage" error message.
3432 2008-01-08 Robert Millan <rmh@aybabtu.com>
3434 * Makefile.in (uninstall): Handle `$(update-grub_SCRIPTS)' and
3435 `$(update-grub_DATA)'.
3436 (distcheck): Fix race condition when invoking `$(MAKE)' on multiple
3439 2008-01-07 Robert Millan <rmh@aybabtu.com>
3441 * boot/i386/pc/boot.S (boot_drive_check): Add a comment indicating
3442 which instruction is modified by grub-setup during installation
3443 (since it wasn't obvious by only looking at this file).
3445 2008-01-07 Robert Millan <rmh@aybabtu.com>
3447 * TODO: Rewrite. Just refer to the wiki and the BTS instead of
3448 listing actual TODO items.
3450 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
3452 * fs/reiserfs.c (grub_reiserfs_get_key_v2_type): Handle endianness
3454 (grub_reiserfs_get_key_offset): Likewise.
3455 (grub_reiserfs_set_key_offset): Likewise.
3456 (grub_reiserfs_set_key_type): Likewise.
3457 (grub_reiserfs_iterate_dir): Return 1 if found, otherwise 0.
3459 (GRUB_REISERFS_KEYV2_BITFIELD): Undefined. Probably it would be
3460 better to remove the bitfield version completely.
3462 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
3464 * fs/reiserfs.c (grub_reiserfs_iterate_dir): ENTRY_ITEM must be
3465 allocated from the heap, due to the fshelp implementation.
3466 (grub_reiserfs_dir): Free NODE, due to the same reason.
3468 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
3470 Mostly from Vincent Pelletier:
3472 * fs/reiserfs.c: New file.
3474 * conf/common.rmk (pkglib_MODULES): Added reiserfs.mod.
3475 (reiserfs_mod_SOURCES): New variable.
3476 (reiserfs_mod_CFLAGS): Likewise.
3477 (reiserfs_mod_LDFLAGS): Likewise.
3479 * DISTLIST: Added boot/i386/pc/lnxboot.S, commands/hexdump.c,
3480 disk/ata.c, fs/cpio.c, fs/ntfscomp.c, fs/reiserfs.c,
3481 include/grub/ntfs.h, include/grub/i386/pc/machine.h, and
3484 2008-01-06 Robert Millan <rmh@aybabtu.com>
3486 * normal/color.c: Remove `<grub/env.h>'.
3488 2008-01-05 Jeroen Dekkers <jeroen@dekkers.cx>
3490 * include/grub/normal.h: Include <grub/env.h>.
3492 2008-01-05 Robert Millan <rmh@aybabtu.com>
3494 * util/i386/pc/grub-setup.c (usage): Replace obsolete `(hd0,0)' in
3495 usage example with `(hd0,1)'.
3496 Reported by Samuel Thibault.
3498 2008-01-05 Robert Millan <rmh@aybabtu.com>
3500 * kern/i386/loader.S (grub_linux_is_bzimage): New variable.
3501 (grub_linux_boot_zimage): Rename to ...
3502 (grub_linux_boot): ... this.
3503 (grub_linux_boot_bzimage): Merge with `grub_linux_boot_zimage'.
3504 (grub_linux_boot_zimage): Conditionalize zImage copy.
3506 * include/grub/i386/loader.h (grub_linux_is_bzimage): Add prototype.
3507 (grub_linux_boot_bzimage): Remove prototype.
3508 (grub_linux_boot_zimage): Rename to ...
3509 (grub_linux_boot): ... this.
3511 * loader/i386/pc/linux.c (big_linux): Replace with `grub_linux_is_bzimage'.
3512 (grub_linux_boot): Remove function.
3514 2008-01-05 Robert Millan <rmh@aybabtu.com>
3516 * include/grub/normal.h (grub_env_write_color_normal): New prototype.
3517 (grub_env_write_color_highlight): Likewise.
3518 (grub_wait_after_message): Likewise.
3520 * normal/color.c: New file.
3522 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/color.c'.
3523 (normal_mod_DEPENDENCIES): Likewise.
3525 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `normal/color.c'.
3526 (normal_mod_DEPENDENCIES): Likewise.
3528 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add `normal/color.c'.
3529 (normal_mod_DEPENDENCIES): Likewise.
3531 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `normal/color.c'.
3532 (normal_mod_DEPENDENCIES): Likewise.
3534 * normal/menu_entry.c (run): Rely on grub_wait_after_message()
3535 for waiting after a message is printed.
3536 * normal/main.c (read_config_file): Likewise.
3537 (grub_normal_init): Register grub_env_write_color_normal() and
3538 grub_env_write_color_highlight() hooks. Mark `color_normal' and
3539 `color_highlight' variables as global.
3541 * normal/menu.c (grub_wait_after_message): New function.
3542 (grub_color_menu_normal): New variable. Replaces ...
3543 (GRUB_COLOR_MENU_NORMAL): ... this macro.
3544 (grub_color_menu_highlight): New variable. Replaces ...
3545 (GRUB_COLOR_MENU_HIGHLIGHT): ... this macro.
3546 (draw_border): Set color state to `GRUB_TERM_COLOR_NORMAL' instead of
3547 `GRUB_TERM_COLOR_STANDARD'.
3548 (print_message): Use `grub_setcolorstate' to reload colors. Rename
3549 `normal_code' and `highlight_code' to `old_color_normal' and
3550 `old_color_highlight', respectively.
3551 (grub_menu_init_page): Update colors when drawing the menu, based on
3552 `menu_color_normal' and `menu_color_highlight' variables.
3553 (grub_menu_run): Rely on grub_wait_after_message() for waiting after
3554 a message is printed.
3556 2008-01-05 Robert Millan <rmh@aybabtu.com>
3558 * kern/env.c (grub_env_context_open): Propagate hooks for global
3559 variables to new context.
3561 * kern/main.c (grub_set_root_dev): Export `root' variable.
3563 2008-01-05 Robert Millan <rmh@aybabtu.com>
3565 * util/biosdisk.c (get_os_disk): Check for devfs-style IDE and SCSI
3566 discs unconditionally, since udev and others have options to provide
3569 2008-01-05 Robert Millan <rmh@aybabtu.com>
3571 * normal/completion.c (iterate_dir): Skip `.' and `..' directories.
3573 2008-01-04 Christian Franke <franke@computer.org>
3575 * kern/i386/pc/init.c (grub_machine_init): Fix evaluation
3578 2008-01-03 Pavel Roskin <proski@gnu.org>
3580 * kern/i386/linuxbios/init.c: Put "void" to all function
3581 declarations with no arguments.
3582 * kern/powerpc/ieee1275/init.c: Likewise.
3583 * term/i386/pc/at_keyboard.c: Likewise.
3584 * term/i386/pc/vga_text.c: Likewise.
3585 * util/grub-mkdevicemap.c: Likewise.
3587 2008-01-02 Robert Millan <rmh@aybabtu.com>
3589 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Improve error
3590 message when loaded image is out of bounds.
3591 (grub_multiboot_load_elf64): Likewise.
3593 2008-01-02 Pavel Roskin <proski@gnu.org>
3595 * util/grub.d/10_linux.in: Try version without ".old" when
3596 looking for initrd. It's better to use initrd from the newer
3597 kernel of the same version than no initrd at all.
3599 2008-01-01 Robert Millan <rmh@aybabtu.com>
3601 * util/biosdisk.c (get_os_disk): Fix check for IDE or SCSI discs.
3603 2008-01-01 Vesa Jaaskelainen <chaac@nic.fi>
3605 * include/grub/video.h: Added grub_video_unmap_color and
3606 grub_video_get_active_render_target.
3607 (grub_video_adapter): Added unmap_color and get_active_render_target.
3609 * video/video.c: Added grub_video_unmap_color and
3610 grub_video_get_active_render_target.
3611 (grub_video_get_info): Changed method to accept NULL pointer as an
3612 argument to allow detection of active video adapter.
3614 * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as
3615 grub_video_vbe_unmap_color_int.
3616 Added grub_video_vbe_unmap_color and
3617 grub_video_vbe_get_active_render_target.
3618 (grub_video_vbe_adapter): Added unmap_color and
3619 get_active_render_target.
3621 * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage
3622 with grub_video_vbe_unmap_color_int.
3624 * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added.
3625 (DEFAULT_NORMAL_COLOR): Likewise.
3626 (DEFAULT_HIGHLIGHT_COLOR) Likewise.
3627 (DEFAULT_FG_COLOR): Removed.
3628 (DEFAULT_BG_COLOR): Likewise.
3629 (DEFAULT_CURSOR_COLOR): Changed value.
3630 (grub_virtual_screen): Added standard_color_setting,
3631 normal_color_setting, highlight_color_setting and term_color.
3632 (grub_virtual_screen): Removed fg_color_setting and bg_color_setting.
3633 (bitmap_width): Added.
3634 (bitmap_height): Likewise.
3636 (set_term_color): Likewise.
3637 (grub_virtual_screen_setup): Changed to use new terminal coloring
3639 (grub_gfxterm_init): Added init for bitmap.
3640 (grub_gfxterm_fini): Added destroy for bitmap.
3641 (redraw_screen_rect): Updated to use background bitmap and new
3643 (scroll_up): Added optimization for case when there is no bitmap.
3644 (grub_gfxterm_cls): Fixed to use correct background color.
3645 (grub_virtual_screen_setcolorstate): Changed to use new terminal
3647 (grub_virtual_screen_setcolor): Likewise.
3648 (grub_virtual_screen_getcolor): Added.
3649 (grub_gfxterm_background_image_cmd): Likewise.
3650 (grub_video_term): Added setcolor and getcolor.
3651 (MOD_INIT): Added registration of background_image command.
3652 (MOD_TERM): Added unregistration for background_image command.
3654 2007-12-30 Pavel Roskin <proski@gnu.org>
3656 * loader/multiboot_loader.c: Fix multiboot command
3657 unregistration. Fix all typos in the word "multiboot".
3659 2007-12-29 Pavel Roskin <proski@gnu.org>
3661 * util/grub.d/10_linux.in: Refactor search for initrd. Add
3662 support for initrd names used in Fedora.
3664 2007-12-26 Bean <bean123ch@gmail.com>
3666 * conf/common.rmk (pkgdata_MODULES): Add cpio.mod.
3667 (cpio_mod_SOURCES): New variable.
3668 (cpio_mod_CFLAGS): Likewise.
3669 (cpio_mod_LDFLAGS): Likewise.
3671 * fs/cpio.c: New file.
3673 * conf/i386-pc.rmk (grub_emu_SOURCES): Add cpio.c.
3675 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
3677 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
3679 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3681 2007-12-25 Robert Millan <rmh@aybabtu.com>
3683 * include/grub/term.h (struct grub_term): Add `getcolor' function.
3684 (grub_getcolor): New function.
3686 * kern/term.c (grub_getcolor): New function.
3687 * normal/menu.c (GRUB_COLOR_MENU_NORMAL): New macro.
3688 (GRUB_COLOR_MENU_HIGHLIGHT): New macro.
3689 (print_entry): Set normal and highlight colors to
3690 `GRUB_COLOR_MENU_NORMAL' and `GRUB_COLOR_MENU_HIGHLIGHT',
3691 respectively, before printing and restore them to old
3693 (grub_menu_init_page): Likewise. Fill an additional colored space
3694 that would otherwise be left blank.
3696 * term/efi/console.c (grub_console_getcolor): New function.
3697 (struct grub_console_term.getcolor): New variable.
3698 * term/i386/pc/console.c (grub_console_getcolor): New function.
3699 (struct grub_console_term.getcolor): New variable.
3700 * term/ieee1275/ofconsole.c (grub_ofconsole_getcolor): New function.
3701 (struct grub_console_term.getcolor): New variable.
3703 * term/i386/pc/serial.c (grub_serial_setcolor): Remove function.
3704 (struct grub_console_term.setcolor): Remove variable.
3705 * term/i386/pc/vesafb.c (grub_virtual_screen_setcolor): Remove function.
3706 (struct grub_console_term.setcolor): Remove variable.
3707 * term/i386/pc/vga.c (grub_vga_setcolor): Remove function.
3708 (struct grub_console_term.setcolor): Remove variable.
3709 * term/gfxterm.c (grub_virtual_screen_setcolor): Remove function.
3710 (struct grub_console_term.setcolor): Remove variable.
3712 2007-12-25 Robert Millan <rmh@aybabtu.com>
3714 * configure.ac: Search for possible unifont.hex locations, and
3715 define UNIFONT_HEX if found.
3717 * Makefile.in (UNIFONT_HEX): Define variable.
3718 (DATA): Rename to ...
3719 (PKGLIB): ... this. Update all users.
3720 (PKGDATA): New variable.
3721 (pkgdata_IMAGES): Rename to ...
3722 (pkglib_IMAGES): ... this. Update all users.
3723 (pkgdata_MODULES): Rename to ...
3724 (pkglib_MODULES): ... this. Update all users.
3725 (pkgdata_PROGRAMS): Rename to ...
3726 (pkglib_PROGRAMS): ... this. Update all users.
3727 (pkgdata_DATA): Rename to ...
3728 (pkglib_DATA): ... this. Update all users.
3729 (CLEANFILES): Redefine to `$(pkglib_DATA) $(pkgdata_DATA)'.
3730 (unicode.pff, ascii.pff): New rules.
3731 (all-local): Add `$(PKGDATA)' dependency.
3732 (install-local): Process `$(PKGDATA)'.
3734 * util/update-grub_lib.in (font_path): Search for *.pff files in
3735 a few more locations, including `${pkgdata}'.
3737 2007-12-23 Robert Millan <rmh@aybabtu.com>
3739 Patch from Bean <bean123ch@gmail.com>:
3740 * disk/loopback.c (grub_loopback_read): Add missing bit shift to
3743 2007-12-21 Bean <bean123ch@gmail.com>
3745 * conf/common.rmk (pkgdata_MODULES): Add ntfscomp.mod.
3746 (ntfscomp_mod_SOURCES): New variable.
3747 (ntfscomp_mod_CFLAGS): Likewise.
3748 (ntfscomp_mod_LDFLAGS): Likewise.
3750 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfscomp.c.
3751 (grub_probe_SOURCES): Likewise.
3752 (grub_emu_SOURCES): Likewise.
3754 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
3755 (grub_emu_SOURCES): Likewise.
3757 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
3758 (grub_emu_SOURCES): Likewise.
3760 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
3761 (grub_emu_SOURCES): Likewise.
3763 * fs/ntfs.c (grub_ntfscomp_func): New variable.
3764 (read_run_list): Renamed to grub_ntfs_read_run_list.
3765 (decomp_nextvcn): Moved to ntfscomp.c.
3766 (decomp_getch): Likewise.
3767 (decomp_get16): Likewise.
3768 (decomp_block): Likewise.
3769 (read_block): Likewise.
3770 (read_data): Partially moved to ntfscomp.c.
3771 (fixup): Change unsigned to grub_uint16_t.
3772 (read_mft): Change unsigned long to grub_uint32_t.
3773 (read_attr): Likewise.
3774 (read_data): Likewise.
3775 (read_run_data): Likewise.
3776 (read_run_list): Likewise.
3777 (read_mft): Likewise.
3779 * fs/ntfscomp.c: New file.
3781 * include/grub/ntfs.h: New file.
3783 2007-12-16 Robert Millan <rmh@aybabtu.com>
3785 * util/grub-mkdevicemap.c (make_device_map): Iterate up to 20 for
3786 IDE disk check, since Linux is known to support 20 IDE disks.
3787 Reported by Colin Watson.
3789 2007-12-15 Bean <bean123ch@gmail.com>
3791 * conf/i386-pc.rmk (pkgdata_IMAGES): Add lnxboot.img.
3792 (lnxboot_img_SOURCES): New variable.
3793 (lnxboot_img_ASFLAGS): Likewise.
3794 (lnxboot_img_LDFLAGS): Likewise.
3796 * boot/i386/pc/lnxboot.S: New file.
3798 2007-11-24 Pavel Roskin <proski@gnu.org>
3800 * configure.ac: Test if '--build-id=none' is supported by the
3801 linker. If yes, add it to TARGET_LDFLAGS. Build ID causes
3802 objcopy to generate incorrect binary files (binutils
3803 2.17.50.0.18-1 as shipped by Fedora 8).
3804 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Use LDFLAGS when
3805 linking, so that build ID doesn't break the test.
3807 2007-11-24 Pavel Roskin <proski@gnu.org>
3809 * include/grub/i386/time.h: use "void" in the argument list
3811 * include/grub/powerpc/time.h: Likewise.
3812 * include/grub/sparc64/time.h: Likewise.
3814 2007-11-18 Christian Franke <franke@computer.org>
3816 * util/console.c (grub_ncurses_getkey): Change curses KEY_* mapping,
3817 now return control chars instead of GRUB_CONSOLE_KEY_* constants.
3818 This fixes the problem that function keys did not work in grub-emu.
3820 2007-11-18 Christian Franke <franke@computer.org>
3822 * disk/host.c (grub_host_open): Remove attribute unused from
3823 name parameter. Add check for "host". This fixes the problem
3824 that grub-emu does not find partitions.
3826 2007-11-18 Christian Franke <franke@computer.org>
3828 * util/hostfs.c (is_dir): New function.
3829 (grub_hostfs_dir): Handle missing dirent.d_type case.
3830 (grub_hostfs_read): Add missing fseek().
3831 (grub_hostfs_label): Clear label pointer. This fixes a crash
3832 of grub-emu on "ls (host)".
3834 2007-11-18 Christian Franke <franke@computer.org>
3836 * include/grub/i386/pc/init.h (struct grub_machine_mmap_entry):
3837 Add attribute packed, gcc 3.4.4 on Cygwin aligns this
3838 to 64 bit boundary by default.
3840 2007-11-18 Bean <bean123ch@gmail.com>
3842 * conf/common.rmk (pkgdata_MODULES): Add hexdump.mod.
3843 (hexdump_mod_SOURCES): New variable.
3844 (hexdump_mod_CFLAGS): Likewise.
3845 (hexdump_mod_LDFLAGS): Likewise.
3847 * conf/i386-pc.rmk (grub_emu_SOURCES): Add command/hexdump.c.
3849 * conf/i386-efi.rmk (grub_emu_SOURCES): Add command/hexdump.c.
3851 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add command/hexdump.c.
3853 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add command/hexdump.c.
3855 * include/grub/hexdump.h: New file.
3857 * commands/hexdump.c: New file.
3859 2007-11-10 Robert Millan <rmh@aybabtu.com>
3861 * commands/i386/pc/play.c (beep_off): Switch order of arguments
3862 in grub_outb() calls.
3863 (beep_on): Likewise.
3865 2007-11-10 Christian Franke <franke@computer.org>
3867 * normal/menu.c (run_menu): Check for empty menu to avoid crash.
3868 (grub_menu_run): Likewise.
3870 2007-11-10 Robert Millan <rmh@aybabtu.com>
3872 * include/grub/i386/efi/machine.h: New file.
3873 * include/grub/i386/linuxbios/machine.h: Likewise.
3874 * include/grub/i386/pc/machine.h: Likewise.
3875 * include/grub/powerpc/ieee1275/machine.h: Likewise.
3876 * include/grub/sparc64/ieee1275/machine.h: Likewise.
3878 * term/i386/pc/serial.c: Include <grub/machine/machine.h>.
3879 (serial_hw_io_addr): New variable.
3880 (serial_hw_get_port): Obtain port address from `serial_hw_io_addr'
3881 instead of `(unsigned short *) 0x400'.
3883 2007-11-10 Bean <bean123ch@gmail.com>
3885 * fs/ntfs.c (read_block): Fix a bug caused by adjacent blocks.
3887 2007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
3889 * conf/i386-pc.rmk (pkgdata_MODULES): Added vga.mod.
3890 (vga_mod_SOURCES): Added.
3891 (vga_mod_CFLAGS): Likewise.
3892 (vga_mod_LDFLAGS): Likewise.
3894 * term/i386/pc/vga.c (get_map_mask): Switch order of arguments in
3896 (set_map_mask): Likewise.
3897 (set_read_map): Likewise.
3898 (set_read_address): Likewise.
3899 (vga_font): Removed variable.
3900 (get_vga_glyph): Removed function.
3901 (invalidate_char): Likewise.
3902 (write_char): Changed to use grub_font_get_glyph() for font
3904 (grub_vga_putchar): Likewise.
3905 (grub_vga_getcharwidth): Likewise.
3907 2007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
3909 * conf/i386-pc.rmk (boot_img_LDFLAGS): Use COMMON_LDFLAGS for target
3911 (pxeboot_img_LDFLAGS): Likewise.
3912 (diskboot_img_LDFLAGS): Likewise.
3913 (kernel_img_LDFLAGS): Likewise.
3915 2007-11-06 Robert Millan <rmh@aybabtu.com>
3917 * term/i386/pc/serial.c (serial_hw_put): Switch order of arguments
3918 in grub_outb() calls.
3919 (serial_hw_init): Likewise.
3921 2007-11-05 Robert Millan <rmh@aybabtu.com>
3923 * util/update-grub.in: Allow files in ${update_grub_dir} to contain
3924 spaces. Skip non-regular files.
3926 2007-11-05 Robert Millan <rmh@aybabtu.com>
3928 * kern/disk.c (grub_disk_firmware_fini)
3929 (grub_disk_firmware_is_tainted): New variables.
3931 * include/grub/disk.h (grub_disk_firmware_fini)
3932 (grub_disk_firmware_is_tainted): Likewise.
3934 * disk/i386/pc/biosdisk.c (GRUB_MOD_FINI(biosdisk)): Moved from here ...
3935 (grub_disk_biosdisk_fini): ... to here.
3936 (GRUB_MOD_FINI(biosdisk)): Implement using grub_disk_biosdisk_fini().
3937 (GRUB_MOD_INIT(biosdisk)): Abort when `grub_disk_firmware_is_tainted'
3938 is set. Register grub_disk_biosdisk_fini() in
3939 `grub_disk_firmware_fini'.
3941 * disk/ata.c: Remove `<grub/machine/biosdisk.h>'.
3942 (GRUB_MOD_INIT(ata)): Remove grub_biosdisk_fini() call.
3943 Use `grub_disk_firmware_is_tainted' and `grub_disk_firmware_fini'
3944 to finish existing firmware disk interface.
3946 * conf/i386-linuxbios.rmk (pkgdata_MODULES): Add `ata.mod'.
3947 (ata_mod_SOURCES): New variable.
3948 (ata_mod_CFLAGS): Likewise.
3949 (ata_mod_LDFLAGS): Likewise.
3951 2007-11-05 Robert Millan <rmh@aybabtu.com>
3953 * disk/ata.c: Remove `<grub/machine/time.h>'. Include `<grub/time.h>'.
3954 (grub_ata_wait): Reimplement using grub_millisleep().
3956 * include/grub/misc.h (grub_div_roundup): Fix parenthesization.
3957 * include/grub/i386/time.h (grub_cpu_idle): Disable `hlt' instruction.
3959 2007-11-03 Marco Gerards <marco@gnu.org>
3961 * term/i386/pc/vga_text.c: Include <grub/cpu/io.h>.
3962 (CRTC_ADDR_PORT): New macro.
3963 (CRTC_DATA_PORT): Likewise.
3964 (CRTC_CURSOR): Likewise.
3965 (CRTC_CURSOR_ADDR_HIGH): Likewise.
3966 (CRTC_CURSOR_ADDR_LOW): Likewise.
3967 (update_cursor): New function.
3968 (grub_console_real_putchar): Call `update_cursor'.
3969 (grub_console_gotoxy): Likewise.
3970 (grub_console_cls): Set the default color when clearing the
3972 (grub_console_setcursor): Implemented.
3974 2007-11-03 Marco Gerards <marco@gnu.org>
3976 * disk/ata.c (grub_ata_pio_read): Don't wait for the command to
3978 (grub_ata_pio_write): Likewise.
3980 (grub_atapi_identify): Wait after issuing an ATA command.
3981 (grub_atapi_packet): Likewise.
3982 (grub_ata_identify): Likewise.
3983 (grub_ata_readwrite): Likewise.
3985 2007-11-03 Marco Gerards <marco@gnu.org>
3987 * disk/ata.c (grub_ata_pio_read): Detect and return the error code.
3988 (grub_ata_pio_write): Likewise.
3989 (grub_ata_readwrite): Use `grub_error', instead of
3990 returning `grub_errno'.
3992 2007-11-03 Marco Gerards <marco@gnu.org>
3994 * disk/ata.c (grub_ata_readwrite): Call grub_ata_pio_read and
3995 grub_ata_pio_write once for every single sector, instead of for
3998 2007-10-31 Robert Millan <rmh@aybabtu.com>
4000 * configure.ac: Add `i386-linuxbios' to the list of supported targets.
4002 * conf/i386-linuxbios.rmk: New file.
4004 * kern/i386/pc/hardware.c: Likewise.
4005 * term/i386/pc/at_keyboard.c: Likewise.
4006 * term/i386/pc/vga_text.c: Likewise.
4008 * include/grub/i386/linuxbios/boot.h: Likewise.
4009 * include/grub/i386/linuxbios/console.h: Likewise.
4010 * include/grub/i386/linuxbios/init.h: Likewise.
4011 * include/grub/i386/linuxbios/kernel.h: Likewise.
4012 * include/grub/i386/linuxbios/loader.h: Likewise.
4013 * include/grub/i386/linuxbios/memory.h: Likewise.
4014 * include/grub/i386/linuxbios/serial.h: Likewise.
4015 * include/grub/i386/linuxbios/time.h: Likewise.
4017 * kern/i386/linuxbios/init.c: Likewise.
4018 * kern/i386/linuxbios/startup.S: Likewise.
4019 * kern/i386/linuxbios/table.c: Likewise.
4021 2007-10-31 Marco Gerards <marco@gnu.org>
4023 * conf/i386-pc.rmk (pkgdata_MODULES): Add `ata.mod'.
4024 (ata_mod_SOURCES): New variable.
4025 (ata_mod_CFLAGS): Likewise.
4026 (ata_mod_LDFLAGS): Likewise.
4028 * disk/ata.c: New file.
4030 * include/grub/disk.h (grub_disk_dev_id): Add
4031 `GRUB_DISK_DEV_ATA_ID'.
4033 2007-10-31 Robert Millan <rmh@aybabtu.com>
4035 * include/grub/i386/pc/init.h (grub_lower_mem): Moved from here ...
4036 * include/grub/i386/pc/memory.h (grub_lower_mem): ... to here.
4038 * include/grub/i386/pc/init.h (grub_upper_mem): Moved from here ...
4039 * include/grub/i386/pc/memory.h (grub_upper_mem): ... to here.
4041 * include/grub/i386/pc/memory.h: Include `<grub/symbol.h>' and
4044 * loader/i386/pc/multiboot.c: Include `<grub/machine/memory.h>'.
4046 2007-10-27 Robert Millan <rmh@aybabtu.com>
4048 * include/grub/types.h (ULONG_MAX): Define macro.
4050 2007-10-22 Robert Millan <rmh@aybabtu.com>
4052 * kern/i386/pc/startup.S: Remove `"kern/i386/realmode.S"'. Include
4054 Remove `"kern/i386/loader.S"'. Include `"../loader.S"'.
4056 2007-10-22 Robert Millan <rmh@aybabtu.com>
4058 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove `disk/i386/pc/biosdisk.c'.
4059 (pkgdata_MODULES): Add `biosdisk.mod'.
4060 (biosdisk_mod_SOURCES, biosdisk_mod_CFLAGS, biosdisk_mod_LDFLAGS): New
4063 * disk/i386/pc/biosdisk.c: Include `<grub/dl.h>'.
4064 (grub_biosdisk_init): Replace with ...
4065 (GRUB_MOD_INIT(biosdisk)): ... this.
4066 (grub_biosdisk_fini): Replace with ...
4067 (GRUB_MOD_FINI(biosdisk)): ... this.
4069 * kern/i386/pc/init.c: Remove `<grub/machine/biosdisk.h>'.
4070 (grub_machine_init): Remove call to grub_biosdisk_init().
4071 (grub_machine_fini): Remove call to grub_machine_fini().
4073 * util/i386/pc/grub-install.in (modules): Add `biosdisk'.
4075 2007-10-22 Robert Millan <rmh@aybabtu.com>
4077 * include/grub/time.h: New file.
4078 * include/grub/i386/time.h: Likewise.
4079 * include/grub/powerpc/time.h: Likewise.
4080 * include/grub/sparc64/time.h: Likewise.
4082 * include/grub/i386/pc/time.h (KERNEL_TIME_HEADER): Rename all
4084 (KERNEL_MACHINE_TIME_HEADER): ... this.
4085 * include/grub/powerpc/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
4087 (KERNEL_MACHINE_TIME_HEADER): ... this.
4088 * include/grub/sparc64/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
4090 (KERNEL_MACHINE_TIME_HEADER): ... this.
4092 * kern/i386/efi/init.c: Include `<grub/time.h>'.
4093 (grub_millisleep): New function.
4094 * kern/i386/pc/init.c: Include `<grub/time.h>'.
4095 (grub_millisleep): New function.
4096 * kern/powerpc/ieee1275/init.c: Include `<grub/time.h>'.
4097 Remove `grub/machine/time.h' include.
4098 (grub_millisleep): New function.
4099 * kern/sparc64/ieee1275/init.c: Include `<grub/time.h>'.
4100 Remove `grub/machine/time.h' include.
4101 (grub_millisleep): New function.
4103 * include/grub/misc.h (grub_div_roundup): New function.
4105 * kern/misc.c: Include `<grub/time.h>'.
4106 (grub_millisleep_generic): New function.
4108 * conf/i386-efi.rmk (kernel_mod_HEADERS): Remove `i386/efi/time.h'.
4110 * conf/i386-pc.rmk (kernel_img_HEADERS): Remove `machine/time.h'.
4112 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Remove
4113 `machine/time.h'. Add `time.h'.
4114 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
4116 2007-10-21 Robert Millan <rmh@aybabtu.com>
4118 * include/grub/misc.h (grub_max): New function.
4120 2007-10-21 Robert Millan <rmh@aybabtu.com>
4122 * util/misc.c (grub_util_info): Call fflush() before returning.
4124 2007-10-20 Robert Millan <rmh@aybabtu.com>
4126 * genmk.rb (Image): Copy `extra_flags' from here ...
4127 (PModule): ... to here. Use it in `#{obj}: #{src}' rule.
4129 * commands/i386/cpuid.c (grub_cmd_cpuid): Add __attribute__ ((unused))
4130 to `argc' and `args' arguments.
4132 2007-10-17 Robert Millan <rmh@aybabtu.com>
4134 * kern/i386/loader.S: New file.
4136 * kern/i386/pc/startup.S (grub_linux_prot_size): Moved from here ...
4137 * kern/i386/loader.S (grub_linux_prot_size)... to here.
4138 * kern/i386/pc/startup.S (grub_linux_tmp_addr): Moved from here ...
4139 * kern/i386/loader.S (grub_linux_tmp_addr)... to here.
4140 * kern/i386/pc/startup.S (grub_linux_real_addr): Moved from here ...
4141 * kern/i386/loader.S (grub_linux_real_addr)... to here.
4142 * kern/i386/pc/startup.S (grub_linux_boot_zimage): Moved from here ...
4143 * kern/i386/loader.S (grub_linux_boot_zimage)... to here.
4144 * kern/i386/pc/startup.S (grub_linux_boot_bzimage): Moved from here ...
4145 * kern/i386/loader.S (grub_linux_boot_bzimage)... to here.
4146 * kern/i386/pc/startup.S (grub_multiboot_real_boot): Moved from here ...
4147 * kern/i386/loader.S (grub_multiboot_real_boot)... to here.
4148 * kern/i386/pc/startup.S (grub_multiboot2_real_boot): Moved from here ...
4149 * kern/i386/loader.S (grub_multiboot2_real_boot)... to here.
4151 * kern/i386/realmode.S: New file.
4153 * kern/i386/pc/startup.S (protstack): Moved from here ...
4154 * kern/i386/realmode.S (protstack)... to here.
4155 * kern/i386/pc/startup.S (gdt): Moved from here ...
4156 * kern/i386/realmode.S (gdt)... to here.
4157 * kern/i386/pc/startup.S (prot_to_real): Moved from here ...
4158 * kern/i386/realmode.S (prot_to_real)... to here.
4160 * kern/i386/pc/startup.S: Include `kern/i386/loader.S' and
4161 `kern/i386/realmode.S'.
4163 2007-10-17 Robert Millan <rmh@aybabtu.com>
4165 * include/grub/i386/loader.h: New file.
4167 * include/grub/i386/pc/loader.h (grub_linux_prot_size)
4168 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
4169 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
4170 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
4171 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): Moved from here ...
4172 * include/grub/i386/loader.h (grub_linux_prot_size)
4173 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
4174 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
4175 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
4176 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): ... to here.
4178 * include/grub/i386/pc/loader.h: Include `grub/cpu/loader.h'.
4180 2007-10-15 Robert Millan <rmh@aybabtu.com>
4182 * normal/misc.c (grub_normal_print_device_info): Do not probe for
4183 filesystem when dev->disk is unset.
4184 Do probe for filesystem even when dev->disk->has_partitions is set.
4185 In case a filesystem is found, always report it.
4186 In case it isn't, if dev->disk->has_partitions is set, report that
4187 a partition table was found instead of reporting that no filesystem
4188 could be identified.
4190 2007-10-12 Robert Millan <rmh@aybabtu.com>
4192 * conf/powerpc-ieee1275.rmk (grub_mkimage_SOURCES): Replace reference
4193 to util/powerpc/ieee1275/grub-mkimage.c with util/elf/grub-mkimage.c.
4195 * include/grub/types.h (grub_host_to_target16): New macro.
4196 (grub_host_to_target32): Likewise.
4197 (grub_host_to_target64): Likewise.
4198 (grub_target_to_host16): Likewise.
4199 (grub_target_to_host32): Likewise.
4200 (grub_target_to_host64): Likewise.
4202 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
4204 (GRUB_MOD_ALIGN): ...this. Update all users.
4206 * util/elf/grub-mkimage.c (load_note): Replace grub_cpu_to_be32 with
4207 grub_host_to_target32.
4208 Replace grub_be_to_cpu32 with grub_target_to_host32.
4209 (load_modules): Likewise.
4210 (add_segments): Replace grub_be_to_cpu16 with grub_target_to_host16.
4211 Replace grub_be_to_cpu32 with grub_target_to_host32.
4212 Replace grub_cpu_to_be16 with grub_host_to_target16.
4213 Replace grub_cpu_to_be32 grub_host_to_target32.
4215 2007-10-12 Robert Millan <rmh@aybabtu.com>
4217 * util/powerpc/ieee1275/grub-mkimage.c: Moved to ...
4218 * util/elf/grub-mkimage.c: ... here.
4220 * DISTLIST: Add `util/elf/grub-mkimage.c'. Remove
4221 `util/powerpc/ieee1275/grub-mkimage.c'.
4223 2007-10-07 Robert Millan <rmh@aybabtu.com>
4225 * kern/powerpc/ieee1275/init.c: Rename HEAP_LIMIT to HEAP_MAX_ADDR,
4226 and make it easier to figure out.
4227 Add HEAP_MIN_SIZE and HEAP_MAX_ADDR definitions.
4228 (grub_claim_heap): Use HEAP_MAX_ADDR rather than taking a parameter.
4229 Do not avoid claiming a region above HEAP_MAX_ADDR if that would
4230 leave us with less than HEAP_MIN_SIZE total heap.
4231 Avoid our total amount of heap to surpass HEAP_MAX_SIZE.
4233 2007-10-03 Robert Millan <rmh@aybabtu.com>
4235 * include/grub/i386/io.h: New file.
4236 * commands/i386/pc/play.c (inb): Removed.
4238 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
4240 * term/i386/pc/serial.c (inb): Removed.
4242 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
4244 * term/i386/pc/vga.c (inb): Removed.
4246 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
4249 2007-10-02 Robert Millan <rmh@aybabtu.com>
4251 * conf/i386-efi.rmk (grub_emu_SOURCES): Add util/hostfs.c.
4252 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4253 Reported by Marcin Kurek.
4255 2007-09-07 Robert Millan <rmh@aybabtu.com>
4257 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_test_flag): Detect
4258 SmartFirmware version updates (as released by Sven Luther), and avoid
4259 setting GRUB_IEEE1275_FLAG_NO_PARTITION_0 or
4260 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS unless the running version is
4263 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
4266 * kern/i386/pc/init.c (compact_mem_regions): Decrease NUM_REGIONS
4267 when merging two regions.
4269 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
4271 * kern/rescue.c (grub_enter_rescue_mode): Free ARGS.
4272 * normal/completion.c (grub_normal_do_completion): Likewise.
4273 Reported by Hitoshi Ozeki.
4275 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
4277 Do not use devices at boot in chainloading.
4279 * loader/i386/pc/chainloader.c (boot_drive): New variable.
4280 (boot_part_addr): Likewise.
4281 (grub_chainloader_boot): Simply call grub_chainloader_real_boot
4282 with BOOT_DRIVE and BOOT_PART_ADDR.
4283 (grub_chainloader_cmd): Set BOOT_DRIVE and BOOT_PART_ADDR.
4284 Reported by Hitoshi Ozeki <h-ozeki@ck2.so-net.ne.jp>.
4286 2007-08-29 Robert Millan <rmh@aybabtu.com>
4288 Patch from Simon Peter <dn.tlp@gmx.net>:
4289 * genmk.rb (Utility): Append $(#{src}_DEPENDENCIES) to #{obj} targets.
4290 * conf/i386-pc.rmk: Replace grub-probe_DEPENDENCIES with
4291 util/grub-probe.c_DEPENDENCIES. Replace grub-setup_DEPENDENCIES with
4292 util/i386/pc/grub-setup.c_DEPENDENCIES.
4293 * conf/i386-efi.rmk: Replace grub-probe_DEPENDENCIES with
4294 util/grub-probe.c_DEPENDENCIES.
4295 * conf/powerpc-ieee1275.rmk: Likewise.
4297 2007-08-28 Robert Millan <rmh@aybabtu.com>
4299 * util/i386/get_disk_name.c: New. Implement grub_util_get_disk_name()
4300 to tell grub-mkdevicemap how to name devices.
4301 * util/ieee1275/get_disk_name.c: Likewise (using "ofpathname -a"
4304 * conf/i386-efi.rmk (grub_mkdevicemap_SOURCES): Add
4305 util/i386/get_disk_name.c.
4306 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Likewise.
4307 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Add
4308 util/ieee1275/get_disk_name.c.
4310 * include/grub/util/misc.h: grub_util_get_disk_name() declaration.
4312 * DISTLIST: Add util/i386/get_disk_name.c and
4313 util/ieee1275/get_disk_name.c.
4315 * util/grub-mkdevicemap.c: Replace device naming logic with
4316 grub_util_get_disk_name() calls.
4318 2007-08-20 Robert Millan <rmh@aybabtu.com>
4320 * normal/menu.c (run_menu): Refer to seconds as "s" not "seconds"
4321 (so that it works for both plural and singular quantities).
4323 2007-08-05 Robert Millan <rmh@aybabtu.com>
4325 * util/grub.d/10_linux.in (test_gt): Strip out vmlinu[xz]- prefix
4326 so that [xz] isn't taken into account when determining order.
4328 2007-08-02 Marco Gerards <marco@gnu.org>
4330 * DISTLIST: Add `disk/host.c', `fs/ntfs.c', `include/multiboot.h',
4331 `include/multiboot2.h', `include/grub/elfload.h',
4332 `include/multiboot.h', `include/grub/multiboot.h',
4333 `include/grub/multiboot_loader.h', `include/grub/multiboot2.h',
4334 `include/grub/i386/pc/biosdisk.h', `include/grub/util/biosdisk.h',
4335 `kern/elf.c', `loader/multiboot_loader.c',
4336 `loader/multiboot_loader_normal.c', `loader/multiboot2.c',
4337 `loader/i386/pc/multiboot2.c',
4338 `loader/powerpc/ieee1275/multiboot2.c', `util/hostfs.c' and
4339 `util/i386/pc/grub-mkrescue.in'. Remove
4340 `include/grub/biosdisk.h', `include/grub/i386/pc/multiboot.h',
4341 `include/grub/i386/pc/util/biosdisk.h' and
4342 `include/grub/powerpc/ieee1275/multiboot.h'.
4344 2007-08-02 Bean <bean123ch@gmail.com>
4346 * conf/common.rmk (pkgdata_MODULES): Add ntfs.mod.
4347 (ntfs_mod_SOURCES): New variable.
4348 (ntfs_mod_CFLAGS): Likewise.
4349 (ntfs_mod_LDFLAGS): Likewise.
4351 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfs.c.
4352 (grub_probe_SOURCES): Likewise.
4353 (grub_emu_SOURCES): Likewise.
4355 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
4356 (grub_emu_SOURCES): Likewise.
4358 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
4359 (grub_emu_SOURCES): Likewise.
4361 * conf/misc.c (grub_utf16_to_utf8): Fix unicode conversion bug.
4363 * fs/ntfs.c: New file.
4365 2007-08-02 Bean <bean123ch@gmail.com>
4367 * disk.h (grub_disk): Use NESTED_FUNC_ATTR.
4369 * file.h (grub_file): Likewise.
4371 * fshelp.h (grub_fshelp_read_file): Likewise.
4373 * util/i386/pc/grub-setup.c (setup): Likewise.
4374 (save_first_sector): Likewise.
4375 (save_blocklists): Likewise.
4377 * fs/affs.c (grub_affs_read_file): Likewise.
4379 * fs/ext2.c (grub_ext2_read_file): Likewise.
4381 * fs/fat.c (grub_fat_read_data): Likewise.
4383 * fs/fshelp.c (grub_fshelp_read_file): Likewise.
4385 * fs/hfs.c (grub_hfs_read_file): Likewise.
4387 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
4389 * fs/jfs.c (grub_jfs_read_file): Likewise.
4391 * fs/minix.c (grub_minix_read_file): Likewise.
4393 * fs/sfs.c (grub_sfs_read_file): Likewise.
4395 * fs/ufs.c (grub_ufs_read_file): Likewise.
4397 * fs/xfs.c (grub_xfs_read_file): Likewise.
4399 * command/blocklist.c (read_blocklist): Likewise.
4400 (print_blocklist): Likewise.
4402 2007-08-02 Marco Gerards <marco@gnu.org>
4404 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/host.c' and
4407 * disk/host.c: New file.
4409 * util/hostfs.c: Likewise.
4411 * fs/hfsplus.c (grub_hfsplus_mount): When reading out of disk,
4412 return `GRUB_ERR_BAD_FS'.
4413 * fs/sfs.c (grub_sfs_mount): Likewise.
4414 * fs/xfs.c (grub_xfs_mount): Likewise.
4416 * include/grub/disk.h (enum grub_disk_dev_id): Add
4417 `GRUB_DISK_DEVICE_HOST_ID'.
4419 * util/grub-emu.c (main): Initialize and de-initialize hostfs.
4421 2007-07-24 Jerone Young <jerone@gmail.com>
4423 * conf/i386-pc.rmk: Add Multiboot loader and multiboot 2 to multiboot
4424 modules for compilation.
4425 * conf/powerpc-ieee1275.rmk: Likewise.
4427 * include/multiboot.h: Move multiboot definitions to one file. Rename
4428 many definitions to not get grub specific.
4429 * include/multiboot2.h: Create header with multiboot 2 definitions.
4430 * include/grub/multiboot.h: Header for grub specific function
4431 prototypes and definitions.
4432 * include/grub/multiboot2.h: Likewise.
4433 * include/grub/multiboot_loader.h: Likewise.
4434 * include/grub/i386/pc/multiboot.h: Removed.
4435 * include/grub/powerpc/ieee1275/multiboot.h: Removed.
4437 * loader/multiboot_loader.c: Created to act as a proxy for multiboot 1
4438 and 2 to allow for one multiboot and module commands.
4439 * loader/multiboot2.c: Add multiboot2 functionality.
4440 * loader/i386/pc/multiboot.c: Modify for new multiboot header location
4441 and definition names.
4442 * loader/i386/pc/multiboot2.c: Created to add i386 specific multiboot
4444 * loader/powerpc/ieee1275/multiboot2.c: Created to add powerpc
4445 ieee1275 specific multiboot2 code.
4447 * kern/i386/pc/startup.S: Change headers and definition names for
4448 multiboot. Add function grub_multiboot2_real_boot for multiboot 2.
4450 2007-07-22 Robert Millan <rmh@aybabtu.com>
4452 * geninitheader.sh: Process file specified in first parameter rather
4453 than hardcoding grub_modules_init.lst.
4454 * geninit.sh: Likewise. Also, construct header name dynamically rather
4455 than hardcoding grub_modules_init.h.
4457 * conf/common.rmk: Rename grub_modules_init.[ch] files associated with
4458 grub-emu to grub_emu_init.[ch]. Add rules to build analogous
4459 grub_probe_init.[ch] and grub_setup_init.[ch].
4461 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Replace
4462 grub_modules_init.h with grub_emu_init.h.
4463 (grub_probe_DEPENDENCIES, grub_probe_SOURCES): Add new
4464 grub_probe_init.[ch] files.
4465 * conf/i386-efi.rmk: Likewise.
4466 * conf/i386-pc.rmk: Likewise.
4467 (grub_setup_DEPENDENCIES, grub_setup_SOURCES): Add new
4468 grub_setup_init.[ch] files.
4470 * util/grub-emu.c: Replace grub_modules_init.h with grub_emu_init.h.
4471 * util/grub-probe.c: Include grub_probe_init.h. Use grub_init_all()
4472 to initialize modules rather than a list of hardcoded functions.
4473 * util/i386/pc/grub-setup.c: Include grub_setup_init.h. Use
4474 grub_init_all() to initialize modules rather than a list of hardcoded
4477 2007-07-22 Robert Millan <rmh@aybabtu.com>
4479 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set
4480 GRUB_IEEE1275_FLAG_NO_PARTITION_0 flag when running on SmartFirmware.
4482 2007-07-22 Robert Millan <rmh@aybabtu.com>
4484 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
4485 GRUB_IEEE1275_FLAG_BROKEN_OUTPUT flag.
4486 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set this
4487 flag when running on SmartFirmware.
4488 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid running
4489 "output-device output" command when GRUB_IEEE1275_FLAG_BROKEN_OUTPUT
4492 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
4493 Increase partno when GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS flag is set,
4494 rather than decreasing it.
4496 * util/i386/pc/grub-setup.c (setup): When embedding is required, but
4497 there's not enough space to do it, fail in the same way as when it
4498 can't be done because there are no partitions.
4500 * util/powerpc/ieee1275/grub-install.in: Improve error message shown
4501 when nvsetenv failed.
4503 2007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
4505 * conf/i386-pc.rmk (CLEANFILES): Removed for grub-mkrescue,
4506 because this rule is automatically generated.
4507 (grub-mkrescue): Removed for the same reason as above.
4509 2007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
4511 Migrate to GNU General Public License Version 3.
4513 * COPYING: Replaced with the plain text version of GPLv3.
4515 * config.guess: Updated from gnulib.
4516 * config.sub: Likewise.
4518 * geninit.sh: Output a GPLv3 copyright notice.
4519 * geninitheader.sh: Likewise.
4520 * genmodsrc.sh: Likewise.
4521 * gensymlist.sh.in: Likewise.
4523 * boot/i386/pc/boot.S: Upgraded to GPLv3.
4524 * boot/i386/pc/diskboot.S: Likewise.
4525 * boot/i386/pc/pxeboot.S: Likewise.
4526 * commands/blocklist.c: Likewise.
4527 * commands/boot.c: Likewise.
4528 * commands/cat.c: Likewise.
4529 * commands/cmp.c: Likewise.
4530 * commands/configfile.c: Likewise.
4531 * commands/echo.c: Likewise.
4532 * commands/help.c: Likewise.
4533 * commands/ls.c: Likewise.
4534 * commands/search.c: Likewise.
4535 * commands/terminal.c: Likewise.
4536 * commands/test.c: Likewise.
4537 * commands/videotest.c: Likewise.
4538 * commands/i386/cpuid.c: Likewise.
4539 * commands/i386/pc/halt.c: Likewise.
4540 * commands/i386/pc/play.c: Likewise.
4541 * commands/i386/pc/reboot.c: Likewise.
4542 * commands/i386/pc/vbeinfo.c: Likewise.
4543 * commands/i386/pc/vbetest.c: Likewise.
4544 * commands/ieee1275/halt.c: Likewise.
4545 * commands/ieee1275/reboot.c: Likewise.
4546 * commands/ieee1275/suspend.c: Likewise.
4547 * disk/loopback.c: Likewise.
4548 * disk/lvm.c: Likewise.
4549 * disk/raid.c: Likewise.
4550 * disk/efi/efidisk.c: Likewise.
4551 * disk/i386/pc/biosdisk.c: Likewise.
4552 * disk/ieee1275/ofdisk.c: Likewise.
4553 * font/manager.c: Likewise.
4554 * fs/affs.c: Likewise.
4555 * fs/ext2.c: Likewise.
4556 * fs/fat.c: Likewise.
4557 * fs/fshelp.c: Likewise.
4558 * fs/hfs.c: Likewise.
4559 * fs/hfsplus.c: Likewise.
4560 * fs/iso9660.c: Likewise.
4561 * fs/jfs.c: Likewise.
4562 * fs/minix.c: Likewise.
4563 * fs/sfs.c: Likewise.
4564 * fs/ufs.c: Likewise.
4565 * fs/xfs.c: Likewise.
4566 * hello/hello.c: Likewise.
4567 * include/grub/acorn_filecore.h: Likewise.
4568 * include/grub/arg.h: Likewise.
4569 * include/grub/bitmap.h: Likewise.
4570 * include/grub/boot.h: Likewise.
4571 * include/grub/cache.h: Likewise.
4572 * include/grub/device.h: Likewise.
4573 * include/grub/disk.h: Likewise.
4574 * include/grub/dl.h: Likewise.
4575 * include/grub/elfload.h: Likewise.
4576 * include/grub/env.h: Likewise.
4577 * include/grub/err.h: Likewise.
4578 * include/grub/file.h: Likewise.
4579 * include/grub/font.h: Likewise.
4580 * include/grub/fs.h: Likewise.
4581 * include/grub/fshelp.h: Likewise.
4582 * include/grub/gzio.h: Likewise.
4583 * include/grub/hfs.h: Likewise.
4584 * include/grub/kernel.h: Likewise.
4585 * include/grub/loader.h: Likewise.
4586 * include/grub/lvm.h: Likewise.
4587 * include/grub/misc.h: Likewise.
4588 * include/grub/mm.h: Likewise.
4589 * include/grub/net.h: Likewise.
4590 * include/grub/normal.h: Likewise.
4591 * include/grub/parser.h: Likewise.
4592 * include/grub/partition.h: Likewise.
4593 * include/grub/pc_partition.h: Likewise.
4594 * include/grub/raid.h: Likewise.
4595 * include/grub/rescue.h: Likewise.
4596 * include/grub/script.h: Likewise.
4597 * include/grub/setjmp.h: Likewise.
4598 * include/grub/symbol.h: Likewise.
4599 * include/grub/term.h: Likewise.
4600 * include/grub/terminfo.h: Likewise.
4601 * include/grub/tparm.h: Likewise.
4602 * include/grub/types.h: Likewise.
4603 * include/grub/video.h: Likewise.
4604 * include/grub/efi/api.h: Likewise.
4605 * include/grub/efi/chainloader.h: Likewise.
4606 * include/grub/efi/console.h: Likewise.
4607 * include/grub/efi/console_control.h: Likewise.
4608 * include/grub/efi/disk.h: Likewise.
4609 * include/grub/efi/efi.h: Likewise.
4610 * include/grub/efi/pe32.h: Likewise.
4611 * include/grub/efi/time.h: Likewise.
4612 * include/grub/i386/linux.h: Likewise.
4613 * include/grub/i386/setjmp.h: Likewise.
4614 * include/grub/i386/types.h: Likewise.
4615 * include/grub/i386/efi/kernel.h: Likewise.
4616 * include/grub/i386/efi/loader.h: Likewise.
4617 * include/grub/i386/efi/time.h: Likewise.
4618 * include/grub/i386/pc/biosdisk.h: Likewise.
4619 * include/grub/i386/pc/boot.h: Likewise.
4620 * include/grub/i386/pc/chainloader.h: Likewise.
4621 * include/grub/i386/pc/console.h: Likewise.
4622 * include/grub/i386/pc/init.h: Likewise.
4623 * include/grub/i386/pc/kernel.h: Likewise.
4624 * include/grub/i386/pc/loader.h: Likewise.
4625 * include/grub/i386/pc/memory.h: Likewise.
4626 * include/grub/i386/pc/multiboot.h: Likewise.
4627 * include/grub/i386/pc/serial.h: Likewise.
4628 * include/grub/i386/pc/time.h: Likewise.
4629 * include/grub/i386/pc/vbe.h: Likewise.
4630 * include/grub/i386/pc/vbeblit.h: Likewise.
4631 * include/grub/i386/pc/vbefill.h: Likewise.
4632 * include/grub/i386/pc/vbeutil.h: Likewise.
4633 * include/grub/i386/pc/vga.h: Likewise.
4634 * include/grub/ieee1275/ieee1275.h: Likewise.
4635 * include/grub/ieee1275/ofdisk.h: Likewise.
4636 * include/grub/powerpc/libgcc.h: Likewise.
4637 * include/grub/powerpc/setjmp.h: Likewise.
4638 * include/grub/powerpc/types.h: Likewise.
4639 * include/grub/powerpc/ieee1275/biosdisk.h: Likewise.
4640 * include/grub/powerpc/ieee1275/console.h: Likewise.
4641 * include/grub/powerpc/ieee1275/ieee1275.h: Likewise.
4642 * include/grub/powerpc/ieee1275/kernel.h: Likewise.
4643 * include/grub/powerpc/ieee1275/loader.h: Likewise.
4644 * include/grub/powerpc/ieee1275/multiboot.h: Likewise.
4645 * include/grub/powerpc/ieee1275/time.h: Likewise.
4646 * include/grub/powerpc/ieee1275/util/biosdisk.h: Likewise.
4647 * include/grub/sparc64/libgcc.h: Likewise.
4648 * include/grub/sparc64/setjmp.h: Likewise.
4649 * include/grub/sparc64/types.h: Likewise.
4650 * include/grub/sparc64/ieee1275/console.h: Likewise.
4651 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
4652 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
4653 * include/grub/sparc64/ieee1275/time.h: Likewise.
4654 * include/grub/util/biosdisk.h: Likewise.
4655 * include/grub/util/getroot.h: Likewise.
4656 * include/grub/util/lvm.h: Likewise.
4657 * include/grub/util/misc.h: Likewise.
4658 * include/grub/util/raid.h: Likewise.
4659 * include/grub/util/resolve.h: Likewise.
4660 * io/gzio.c: Likewise.
4661 * kern/device.c: Likewise.
4662 * kern/disk.c: Likewise.
4663 * kern/dl.c: Likewise.
4664 * kern/elf.c: Likewise.
4665 * kern/env.c: Likewise.
4666 * kern/err.c: Likewise.
4667 * kern/file.c: Likewise.
4668 * kern/fs.c: Likewise.
4669 * kern/loader.c: Likewise.
4670 * kern/main.c: Likewise.
4671 * kern/misc.c: Likewise.
4672 * kern/mm.c: Likewise.
4673 * kern/parser.c: Likewise.
4674 * kern/partition.c: Likewise.
4675 * kern/rescue.c: Likewise.
4676 * kern/term.c: Likewise.
4677 * kern/efi/efi.c: Likewise.
4678 * kern/efi/init.c: Likewise.
4679 * kern/efi/mm.c: Likewise.
4680 * kern/i386/dl.c: Likewise.
4681 * kern/i386/efi/init.c: Likewise.
4682 * kern/i386/efi/startup.S: Likewise.
4683 * kern/i386/pc/init.c: Likewise.
4684 * kern/i386/pc/lzo1x.S: Likewise.
4685 * kern/i386/pc/startup.S: Likewise.
4686 * kern/ieee1275/ieee1275.c: Likewise.
4687 * kern/powerpc/cache.S: Likewise.
4688 * kern/powerpc/dl.c: Likewise.
4689 * kern/powerpc/ieee1275/cmain.c: Likewise.
4690 * kern/powerpc/ieee1275/crt0.S: Likewise.
4691 * kern/powerpc/ieee1275/init.c: Likewise.
4692 * kern/powerpc/ieee1275/openfw.c: Likewise.
4693 * kern/sparc64/cache.S: Likewise.
4694 * kern/sparc64/dl.c: Likewise.
4695 * kern/sparc64/ieee1275/init.c: Likewise.
4696 * kern/sparc64/ieee1275/openfw.c: Likewise.
4697 * loader/efi/chainloader.c: Likewise.
4698 * loader/efi/chainloader_normal.c: Likewise.
4699 * loader/i386/efi/linux.c: Likewise.
4700 * loader/i386/efi/linux_normal.c: Likewise.
4701 * loader/i386/pc/chainloader.c: Likewise.
4702 * loader/i386/pc/chainloader_normal.c: Likewise.
4703 * loader/i386/pc/linux.c: Likewise.
4704 * loader/i386/pc/linux_normal.c: Likewise.
4705 * loader/i386/pc/multiboot.c: Likewise.
4706 * loader/i386/pc/multiboot_normal.c: Likewise.
4707 * loader/powerpc/ieee1275/linux.c: Likewise.
4708 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
4709 * normal/arg.c: Likewise.
4710 * normal/cmdline.c: Likewise.
4711 * normal/command.c: Likewise.
4712 * normal/completion.c: Likewise.
4713 * normal/execute.c: Likewise.
4714 * normal/function.c: Likewise.
4715 * normal/lexer.c: Likewise.
4716 * normal/main.c: Likewise.
4717 * normal/menu.c: Likewise.
4718 * normal/menu_entry.c: Likewise.
4719 * normal/misc.c: Likewise.
4720 * normal/parser.y: Likewise.
4721 * normal/script.c: Likewise.
4722 * normal/i386/setjmp.S: Likewise.
4723 * normal/powerpc/setjmp.S: Likewise.
4724 * normal/sparc64/setjmp.S: Likewise.
4725 * partmap/acorn.c: Likewise.
4726 * partmap/amiga.c: Likewise.
4727 * partmap/apple.c: Likewise.
4728 * partmap/gpt.c: Likewise.
4729 * partmap/pc.c: Likewise.
4730 * partmap/sun.c: Likewise.
4731 * term/gfxterm.c: Likewise.
4732 * term/terminfo.c: Likewise.
4733 * term/efi/console.c: Likewise.
4734 * term/i386/pc/console.c: Likewise.
4735 * term/i386/pc/serial.c: Likewise.
4736 * term/i386/pc/vesafb.c: Likewise.
4737 * term/i386/pc/vga.c: Likewise.
4738 * term/ieee1275/ofconsole.c: Likewise.
4739 * util/biosdisk.c: Likewise.
4740 * util/console.c: Likewise.
4741 * util/genmoddep.c: Likewise.
4742 * util/getroot.c: Likewise.
4743 * util/grub-emu.c: Likewise.
4744 * util/grub-mkdevicemap.c: Likewise.
4745 * util/grub-probe.c: Likewise.
4746 * util/lvm.c: Likewise.
4747 * util/misc.c: Likewise.
4748 * util/raid.c: Likewise.
4749 * util/resolve.c: Likewise.
4750 * util/update-grub.in: Likewise.
4751 * util/update-grub_lib.in: Likewise.
4752 * util/grub.d/00_header.in: Likewise.
4753 * util/grub.d/10_hurd.in: Likewise.
4754 * util/grub.d/10_linux.in: Likewise.
4755 * util/i386/efi/grub-install.in: Likewise.
4756 * util/i386/efi/grub-mkimage.c: Likewise.
4757 * util/i386/pc/grub-install.in: Likewise.
4758 * util/i386/pc/grub-mkimage.c: Likewise.
4759 * util/i386/pc/grub-mkrescue.in: Likewise.
4760 * util/i386/pc/grub-setup.c: Likewise.
4761 * util/i386/pc/misc.c: Likewise.
4762 * util/powerpc/ieee1275/grub-install.in: Likewise.
4763 * util/powerpc/ieee1275/grub-mkimage.c: Likewise.
4764 * util/powerpc/ieee1275/misc.c: Likewise.
4765 * video/bitmap.c: Likewise.
4766 * video/video.c: Likewise.
4767 * video/i386/pc/vbe.c: Likewise.
4768 * video/i386/pc/vbeblit.c: Likewise.
4769 * video/i386/pc/vbefill.c: Likewise.
4770 * video/i386/pc/vbeutil.c: Likewise.
4771 * video/readers/tga.c: Likewise.
4773 2007-07-02 Robert Millan <rmh@aybabtu.com>
4775 * conf/i386-efi.rmk: Replace obsolete reference to
4776 util/i386/pc/biosdisk.c with util/biosdisk.c, and util/i386/pc/getroot.c
4777 with util/getroot.c.
4778 * conf/powerpc-ieee1275.rmk: Likewise.
4779 * conf/sparc64-ieee1275.rmk: Likewise.
4781 * util/grub-emu.c (main): Fix unchecked pointer handling.
4783 2007-07-02 Robert Millan <rmh@aybabtu.com>
4785 * util/i386/efi/grub-install.in: Allow `grub_probe --target=partmap'
4786 invocation to fail, in order to support partition-less media.
4788 * util/i386/pc/grub-install.in: Likewise.
4790 * util/powerpc/ieee1275/grub-install.in: Use grub-probe to determine
4791 which fs or partmap modules are needed (akin to its sister scripts).
4793 Also use grub-probe to get rid of unportable /proc/mounts check.
4795 Print the same informational message that the other scripts do, before
4798 2007-06-23 Robert Millan <rmh@aybabtu.com>
4800 * util/update-grub_lib.in (font_path): New function. Determine whether
4801 a font file can be found and, if so, echo the GRUB path to it.
4803 * util/update-grub.in: Handle multiple terminals depending on user
4804 input, platform availability and font file presence. Propagate
4805 variables of our findings to /etc/grub.d/ children.
4807 * util/grub.d/00_header.in: Handle multiple terminals, based on
4808 environment setup by update-grub.
4810 2007-06-23 Robert Millan <rmh@aybabtu.com>
4812 * conf/i386-pc.rmk (pkgdata_MODULES): Add serial.mod.
4814 2007-06-21 Robert Millan <rmh@aybabtu.com>
4816 * include/grub/i386/pc/kernel.h: Define GRUB_KERNEL_MACHINE_DATA_END to
4817 indicate end of data section in kernel image.
4818 * include/grub/i386/efi/kernel.h: Define GRUB_KERNEL_MACHINE_PREFIX and
4819 GRUB_KERNEL_MACHINE_DATA_END.
4821 * kern/i386/pc/startup.S: Do not initialize grub_prefix, only reserve
4823 * kern/i386/efi/startup.S: Likewise.
4825 * util/i386/pc/grub-mkimage.c: Initialize grub_prefix to /boot/grub
4826 during image generation. Implement --prefix option to override this
4828 * util/i386/efi/grub-mkimage.c: Likewise.
4830 * util/update-grub_lib.in (convert_system_path_to_grub_path): Split
4831 code to make path relative to its root into a separate function.
4833 * util/i386/pc/grub-install.in: Use newly provided
4834 make_system_path_relative_to_its_root() to convert ${grubdir}, then
4835 pass the result to grub-install --prefix.
4837 2007-06-13 Robert Millan <rmh@aybabtu.com>
4839 * include/grub/util/misc.h: Define DEFAULT_DIRECTORY and
4841 * util/grub-emu.c: Use above definitions from misc.h instead of
4843 * util/grub-mkdevicemap.c: Likewise.
4844 * util/i386/pc/grub-setup.c: Likewise.
4845 * util/grub-probe.c: Likewise.
4846 (probe): Abort with grub_util_error() when either
4847 grub_guess_root_device or grub_util_get_grub_dev fails.
4849 2007-06-12 Robert Millan <rmh@aybabtu.com>
4851 * normal/command.c (grub_command_execute): Use NULL rather than 0 for
4853 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Likewise for
4855 * util/grub-probe.c (probe): Likewise for "drive_name".
4857 2007-06-11 Robert Millan <rmh@aybabtu.com>
4859 * util/i386/pc/grub-mkrescue.in: Pad both floppy images with zeroes,
4860 not just the cdrom one.
4862 2007-06-11 Robert Millan <rmh@aybabtu.com>
4864 * util/i386/pc/grub-mkrescue.in: Add "set -e".
4865 Add --pkglibdir=DIR option to override pkglibdir.
4866 Mention --image-type=TYPE in help output.
4867 Fix --grub-mkimage (it was a no-op).
4868 Abort gracefully when no parameter is given.
4870 2007-06-11 Robert Millan <rmh@aybabtu.com>
4872 * util/i386/pc/grub-mkrescue.in: New file.
4873 * conf/i386-pc.rmk: Add its build declarations. Put it in bin_SCRIPTS.
4874 * Makefile.in: Handle bin_SCRIPTS.
4876 2007-06-10 Vesa Jaaskelainen <chaac@nic.fi>
4878 * term/gfxterm.c (grub_gfxterm_init): Added support for specifying
4879 list of video modes.
4881 2007-06-06 Robert Millan <rmh@aybabtu.com>
4883 * util/update-grub_lib.in (convert_system_path_to_grub_path): Abort if
4884 file doesn't exist, or if it is in a filesystem grub can't read.
4886 * util/update-grub.in: Set fallback for GRUB_FS check to "unknown". Do
4887 not abort if GRUB_DRIVE could not be defined. Rearrange generated
4888 header comment to fit in 80 columns when the variables are resolved.
4890 * util/grub.d/00_header.in: Only set root variable when GRUB_DRIVE
4891 could be identified by update-grub. Remove redundant check for
4892 unifont.pff existence (since convert_system_path_to_grub_path now
4895 2007-06-04 Robert Millan <rmh@aybabtu.com>
4897 * conf/i386-efi.rmk (grub_probe_SOURCES): Add partmap/apple.c.
4899 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.
4901 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add partmap/pc.c.
4903 2007-06-04 Robert Millan <rmh@aybabtu.com>
4905 * conf/powerpc-ieee1275.rmk: Enable grub-mkdevicemap and grub-probe.
4907 * include/grub/partition.h: Declare grub_apple_partition_map_init and
4908 grub_apple_partition_map_fini.
4911 (grub_util_biosdisk_open): Replace BLKGETSIZE with BLKGETSIZE64 (needed
4912 to access >2 TiB disks).
4914 Print disk->total_sectors with %llu instead of %lu, since this
4915 variable is always 64-bit (prevents wrong disk size from being displayed
4916 on either >2 TiB disk or big-endian CPU).
4918 (grub_util_biosdisk_get_grub_dev): Convert gpt_partition_map handling
4919 into a generic case that supports all (sane) partition maps.
4921 Stop using grub_cpu_to_le32() on dos_part / bsd_part since it actually
4924 * util/grub-probe.c: Call grub_apple_partition_map_init() before probe()
4925 and grub_apple_partition_map_fini() after that.
4927 2007-06-01 Robert Millan <rmh@aybabtu.com>
4929 * util/update-grub.in: Export GRUB_CMDLINE_LINUX.
4931 * util/grub.d/00_header.in: Only enable gfxterm when
4932 convert_system_path_to_grub_path() succeeds.
4934 2007-05-20 Robert Millan <rmh@aybabtu.com>
4936 * util/update-grub_lib.in: New file.
4937 * DISTLIST: Add update-grub_lib.in.
4938 * conf/common.rmk: Generate update-grub_lib and install it in
4940 * Makefile.in: Add install routine for $(lib_DATA).
4942 * util/grub.d/00_header.in: Use convert_system_path_to_grub_path()
4943 function provided by update-grub_lib to support arbitrary paths of
4945 * util/update-grub.in: Use convert_system_path_to_grub_path() to
4946 initialize GRUB_DRIVE_BOOT and GRUB_DRIVE_BOOT_GRUB variables.
4948 2007-05-19 Robert Millan <rmh@aybabtu.com>
4950 * commands/i386/cpuid.c: New module.
4952 * conf/i386-efi.rmk: Enable cpuid.mod.
4953 * conf/i386-pc.rmk: Likewise.
4955 2007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
4957 * kern/disk.c (grub_disk_read): Check return value of
4960 2007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
4962 * util/getroot.c (grub_util_get_grub_dev): Support partitionable
4964 * disk/raid.c (grub_raid_open): Likewise.
4966 2007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
4968 * util/biosdisk.c (linux_find_partition): Allocate real_dev on the
4969 stack instead of on the heap.
4971 * kern/disk.c (grub_disk_read): Make sure tmp_buf is big enough
4972 before doing a read on it.
4974 * configure.ac: Only use -fno-stack-protector for the target
4977 2007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
4979 * video/i386/pc/vbe.c (grub_video_vbe_create_render_target): Add
4980 __attribute_ ((unused)) to mode_type argument.
4982 * util/getroot.c (grub_guess_root_device): Fix #endif.
4984 * kern/misc.c (memcmp): Fix prototype.
4986 * include/grub/partition.h [GRUB_UTIL]
4987 (grub_gpt_partition_map_init): Add prototype.
4988 (grub_gpt_partition_map_fini): Likewise.
4990 * fs/jfs.c (struct grub_jfs_inode): Put __attribute__ ((packed)
4993 * fs/fat.c (grub_fat_mount): Replace ~0UL with ~0U.
4994 (grub_fat_read_data): Likewise.
4995 (grub_fat_find_dir): Likewise.
4997 * font/manager.c (find_glyph): Make table a const.
4998 (grub_font_get_glyph): Remove bitmap from if statement.
5000 2007-05-16 Jeroen Dekkers <jeroen@dekkers.cx>
5002 * util/getroot.c (grub_guess_root_device): Remove RAID and LVM
5003 code, first search for device in /dev/mapper, then in /dev.
5004 (grub_util_get_grub_dev): New function.
5005 * include/grub/util/getroot.h (grub_util_get_grub_dev): Add
5007 * util/grub-probe.c (probe): Remove check for RAID, call
5008 grub_util_get_grub_dev() instead of
5009 grub_util_biosdisk_get_grub_dev().
5010 * util/grub-emu.c (main): Call grub_util_get_grub_dev() instead of
5011 grub_util_biosdisk_get_grub_dev().
5012 * util/i386/pc/grub-setup.c (main): Likewise.
5014 2007-05-16 Robert Millan <rmh@aybabtu.com>
5016 * DISTLIST: Update for the latest changes.
5017 * conf/i386-pc.rmk: Use the new paths for util/getroot.c,
5018 util/grub-mkdevicemap.c, util/grub-probe.c and util/biosdisk.c.
5019 * util/grub-emu.c: Replace grub/i386/pc/util/biosdisk.h with
5020 grub/util/biosdisk.h.
5021 * util/i386/pc/grub-setup.c: Replace grub/machine/util/biosdisk.h with
5022 grub/util/biosdisk.h.
5024 2007-05-16 Robert Millan <rmh@aybabtu.com>
5026 * util/grub.d/00_header.in: Set default gfxmode to `640x480'.
5028 2007-05-16 Robert Millan <rmh@aybabtu.com>
5030 * util/i386/efi/grub-install.in: New.
5031 * conf/i386-efi.rmk: Enable grub-mkdevicemap, grub-probe and the
5032 newly added grub-install.
5033 * util/biosdisk.c: Remove unnecessary grub/machine/biosdisk.h
5035 * util/getroot.c: Replace grub/i386/pc/util/biosdisk.h with
5036 grub/util/biosdisk.h.
5037 * util/grub-probe.c: Replace grub/machine/util/biosdisk.h with
5038 grub/util/biosdisk.h.
5040 2007-05-16 Robert Millan <rmh@aybabtu.com>
5042 * include/grub/i386/pc/util/biosdisk.h: Moved to ...
5043 * include/grub/util/biosdisk.h: ... here.
5044 * util/i386/pc/biosdisk.c: Moved to ...
5045 * util/biosdisk.c: ... here.
5046 * util/i386/pc/getroot.c: Moved to ...
5047 * util/getroot.c: ... here.
5048 * util/i386/pc/grub-mkdevicemap.c: Moved to ...
5049 * util/grub-mkdevicemap.c: ... here.
5050 * util/i386/pc/grub-probe.c: Moved to ...
5051 * util/grub-probe.c: ... here.
5053 2007-05-15 Robert Millan <rmh@aybabtu.com>
5055 * util/update-grub.in: Remove duplicated line in grub.cfg header
5058 2007-05-13 Robert Millan <rmh@aybabtu.com>
5060 * util/update-grub.in: Fix a few assumptions about the devices holding
5061 /, /boot and /boot/grub being the same.
5062 * util/grub.d/00_header.in: Likewise.
5063 * util/grub.d/10_hurd.in: Likewise.
5064 * util/grub.d/10_linux.in: Likewise.
5066 * util/grub.d/10_linux.in: Implement Linux image sorting with arbitrary
5067 patterns. Use that to define the `.old' suffix as older than `'.
5069 * util/grub.d/00_header.in: Set default gfxmode to `800x600x16'.
5071 * util/update-grub.in: Add a reference to ${sysconfdir}/default/grub in
5072 the grub.cfg header message.
5074 2007-05-11 Robert Millan <rmh@aybabtu.com>
5076 * util/update-grub.in: Create device.map if it doesn't already exist,
5077 before attempting to run grub-probe.
5078 Check for grub-probe and grub-mkdevicemap with the same code
5079 grub-install is using.
5082 2007-05-09 Jeroen Dekkers <jeroen@dekkers.cx>
5084 * Makefile.in: Add the datarootdir autoconf variable.
5086 2007-05-09 Robert Millan <rmh@aybabtu.com>
5088 * util/i386/pc/grub-probe.c (probe): When detecting partition map,
5089 fail gracefully if dev->disk->partition == NULL.
5091 2007-05-07 Robert Millan <rmh@aybabtu.com>
5093 * util/i386/pc/grub-probe.c: Add `grub-probe -t partmap' parameter to
5094 determine partition map module.
5095 * util/i386/pc/grub-install.in: Use this feature to decide which
5096 partition module to load, instead of hardcoding pc and gpt.
5098 2007-05-07 Robert Millan <rmh@aybabtu.com>
5100 * Makefile.in: Fix assumption that $(srcdir) has a trailing slash when
5101 source directory differs from build directory.
5103 2007-05-05 Robert Millan <rmh@aybabtu.com>
5105 * util/powerpc/ieee1275/grub-install.in: Fix syntax error in pkglibdir
5108 2007-05-05 Robert Millan <rmh@aybabtu.com>
5110 * util/update-grub.in: Create ${grub_prefix} if it doesn't exist.
5112 2007-05-05 Robert Millan <rmh@aybabtu.com>
5114 * util/grub.d/10_linux.in: Allow the administrator to insert Linux
5115 command-line arguments via ${GRUB_CMDLINE_LINUX}.
5117 2007-05-05 Robert Millan <rmh@aybabtu.com>
5119 * conf/i386-pc.rmk (grub_setup_SOURCES): Add partmap/gpt.c.
5120 (grub_probe_SOURCES): Likewise.
5121 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): Detect
5122 GPT and initialize dos_part and bsd_part accordingly.
5123 * util/i386/pc/grub-setup.c (setup): Ditto for install_dos_part and
5125 (main): Activate gpt module for use during partition identification,
5126 and deactivate it afterwards.
5127 * util/i386/pc/grub-install.in: Add gpt module to core.img.
5128 * util/i386/pc/grub-probe.c (main): Activate gpt module for use during
5129 partition identification, and deactivate it afterwards.
5131 2007-05-05 Robert Millan <rmh@aybabtu.com>
5133 * term/i386/pc/console.c (grub_console_fini): Call
5134 grub_term_set_current() before grub_term_unregister().
5136 2007-05-04 Robert Millan <rmh@aybabtu.com>
5138 * DISTLIST: Add util/update-grub.in, util/grub.d/00_header.in,
5139 util/grub.d/10_hurd.in, util/grub.d/10_linux.in and util/grub.d/README.
5140 * Makefile.in: Build update-grub_SCRIPTS. Install update-grub_SCRIPTS
5141 and update-grub_DATA.
5142 * conf/common.rmk: Build and install update-grub components.
5143 * conf/common.mk: Regenerate.
5144 * util/update-grub.in: New. Core of update-grub.
5145 * util/grub.d/00_header.in: New. Generates grub.cfg header.
5146 * util/grub.d/10_hurd.in: New. Generates boot entries for the Hurd.
5147 * util/grub.d/10_linux.in: New. Generates boot entries for Linux.
5148 * util/grub.d/README: New. Document grub.d directory layout.
5150 2007-05-01 Robert Millan <rmh@aybabtu.com>
5152 * util/grub-emu.c: Move initialization functions
5153 grub_util_biosdisk_init() and grub_init_all() before
5154 grub_util_biosdisk_get_grub_dev(), which relies on them.
5156 2007-04-19 Robert Millan <rmh@aybabtu.com>
5158 * util/powerpc/ieee1275/grub-install.in: Initialize ${bindir}, since
5161 2007-04-18 Jerone Young <jerone@gmail.com>
5163 * kernel/elf.c: Add missing parenthesis for conditional statement
5166 2007-04-10 Jerone Young <jerone@gmail.com>
5168 * util/i386/pc/getroot.c: Update so that if root device is /dev/root ,
5169 continue on and look for device node with real device name.
5171 2007-04-10 Jerone Young <jerone@gmail.com>
5173 * configure.ac: Add argument for autoconf to use transformation
5175 * Makefile.in: Add autoconf package transformation code.
5176 * util/i386/pc/grub-install.in: Likewise.
5177 * util/powerpc/ieee1275/grub-install.in: Likewise.
5179 2007-03-19 Yoshinori K. Okuji <okuji@enbug.org>
5181 * fs/ext2.c (EXT2_GOOD_OLD_REVISION): New macro.
5182 (EXT2_GOOD_OLD_INODE_SIZE): Likewise.
5183 (EXT2_REVISION): Likewise.
5184 (EXT2_INODE_SIZE): Likewise.
5185 (struct grub_ext2_block_group): Added a missing member
5187 (grub_ext2_read_inode): Divide by the inode size in a superblock
5188 instead of 128 to obtain INODES_PER_BLOCK.
5189 Use the macro EXT2_INODE_SIZE instead of directly using
5192 2007-03-18 Yoshinori K. Okuji <okuji@enbug.org>
5194 * fs/ext2.c (grub_ext2_read_inode): Use the inode size in a
5195 superblock instead of the structure size to compute an
5196 offset. This fixes the problem that GRUB could not read a
5197 filesystem when inode size is different from 128-byte.
5199 2007-03-05 Marco Gerards <marco@gnu.org>
5201 * normal/main.c (read_config_file): When "menu" is not set, create
5204 2007-02-21 Hollis Blanchard <hollis@penguinppc.org>
5206 * kern/powerpc/ieee1275/init.c (HEAP_SIZE): Removed.
5207 (HEAP_LIMIT): New macro.
5208 (grub_claim_heap): Claim memory up to `heaplimit'.
5210 2007-02-21 Hollis Blanchard <hollis@penguinppc.org>
5212 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Link at 64KB.
5213 * kern/powerpc/ieee1275/init.c (_end): Add declaration.
5215 (grub_arch_modules_addr): Return address after `_end'.
5216 * util/powerpc/ieee1275/grub-mkimage.c: Include grub/misc.h.
5217 (load_modules): Use new parameter as `p_paddr' and `p_vaddr'.
5218 (add_segments): Calculate `_end' from phdr size and location.
5219 (ALIGN_UP): Moved to ...
5220 * include/grub/misc.h: here.
5221 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
5223 (GRUB_IEEE1275_MODULE_BASE): Removed.
5225 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
5227 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Correct
5230 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
5232 * include/grub/elfload.h (grub_elf32_load_hook_t): Return grub_err_t.
5234 (grub_elf64_load_hook_t): Likewise.
5235 * kern/elf.c: Call `grub_error_push' before `grub_error'. Improve
5238 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
5240 * kern/mm.c: Update copyright.
5241 (grub_mm_debug): Correct syntax error.
5242 (grub_mm_dump_free): New function.
5243 (grub_debug_free): Call `grub_free'.
5244 * include/grub/mm.h: Update copyright.
5245 (grub_mm_dump_free): Add declaration.
5247 2007-02-12 Hollis Blanchard <hollis@penguinppc.org>
5249 * include/grub/ieee1275/ieee1275.h: Update copyright.
5250 * kern/powerpc/ieee1275/init.c: Likewise.
5251 * kern/powerpc/ieee1275/openfw.c: Likewise.
5253 * loader/powerpc/ieee1275/linux.c: Likewise.
5254 * include/grub/elfload.h: Likewise.
5255 * kern/elf.c: Likewise.
5256 (grub_elf32_load): Pass `base' and `size' parameters. Update all
5258 (grub_elf64_load): Likewise.
5259 (grub_elf32_load_segment): Move to a nested function.
5260 (grub_elf64_load_segment): Likewise.
5262 2007-02-12 Hollis Blanchard <hollis@penguinppc.org>
5264 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): New
5266 * kern/powerpc/ieee1275/init.c (grub_heap_start): Removed.
5267 (grub_heap_len): Likewise.
5268 (HEAP_SIZE): New macro.
5269 (grub_claim_heap): New function.
5270 (grub_machine_init): Don't claim heap directly. Call
5272 * kern/powerpc/ieee1275/openfw.c: Include alloca.h.
5273 (grub_available_iterate): New function.
5275 2007-02-03 Thomas Schwinge <tschwinge@gnu.org>
5277 * aclocal.m4 (grub_CHECK_STACK_PROTECTOR): New definition.
5278 * configure.ac: Use it for testing the HOST and TARGET compilers.
5280 2006-12-13 Thomas Schwinge <tschwinge@gnu.org>
5282 * Makefile.in (enable_grub_emu): New variable.
5283 * configure.ac (--enable-grub-emu): New option.
5284 Do the checks for (n)curses only if `--enable-grub-emu' is requested.
5285 * conf/i386-efi.rmk (sbin_UTILITIES): Add `grub-emu' only if requested.
5286 * conf/i386-pc.rmk: Likewise.
5287 * conf/powerpc-ieee1275.rmk: Likewise.
5288 * conf/sparc64-ieee1275.rmk (bin_UTILITIES): Likewise.
5290 2006-12-12 Marco Gerards <marco@gnu.org>
5292 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_MENU'.
5294 * kern/env.c (grub_env_unset): Don't free the member `value' when
5295 the type is GRUB_ENV_VAR_DATA, in this case it's a user defined
5298 * normal/main.c (current_menu): Removed.
5299 (free_menu): Unset the `menu' environment variable.
5300 (grub_normal_menu_addentry): Make use of the environment variable
5301 `menu', instead of using the global `current_menu'. Allocate
5302 memory for the sourcecode of this entry.
5303 (read_config_file): New argument `nested', changed all callers.
5304 Only in the case of a new context, initialize a new menu. Set the
5305 `menu' environment variable.
5306 (grub_normal_execute): Don't set and unset the environment
5307 variable `menu' here anymore. Only free the menu when leaving the
5310 * util/i386/pc/biosdisk.c (linux_find_partition): Fixed a memory
5313 2006-12-11 Marco Gerards <marco@gnu.org>
5315 * normal/menu_entry.c (run): Fix off by one bug so the last line
5316 is executed. Move the loader check to outside the loop.
5318 2006-12-08 Hollis Blanchard <hollis@penguinppc.org>
5320 * kern/powerpc/ieee1275/cmain.c (cmain): Mark r3 and r4 as `UNUSED'.
5322 2006-11-25 Yoshinori K. Okuji <okuji@enbug.org>
5324 * util/i386/pc/grub-mkimage.c (generate_image): Fix the offset of
5325 the number of sectors. Reported by Andrey Shuvikov
5326 <mr_hyro@yahoo.com>.
5328 2006-11-11 Jeroen Dekkers <jeroen@dekkers.cx>
5330 * kern/disk.c (grub_disk_read): When there is a read error, always
5331 try to read only the necessary data.
5333 * conf/i386-pc.rmk (grub_probe_SOURCES): Add disk/lvm.c and
5335 * include/grub/disk.h [GRUB_UTIL] (grub_raid_init): New
5337 [GRUB_UTIL] (grub_raid_fini): Likewise.
5338 [GRUB_UTIL] (grub_lvm_init): Likewise.
5339 [GRUB_UTIL] (grub_lvm_fini): Likewise.
5340 * util/i386/pc/grub-probe.c (probe): Check whether DEVICE_NAME is
5341 RAID device and copy DEVICE_NAME to DRIVE_NAME in that case.
5342 (main): Call grub_raid_init(), grub_lvm_init(), grub_lvm_fini()
5343 and grub_raid_fini().
5345 2006-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
5347 * include/grub/types.h (__unused): Rename to UNUSED.
5348 * kern/elf.c (grub_elf32_size): Use UNUSED instead of __unused.
5349 (grub_elf64_size): Likewise.
5351 2006-11-03 Hollis Blanchard <hollis@penguinppc.org>
5353 * kern/elf.c (grub_elf_file): Call grub_file_seek. Call
5354 grub_error_push and grub_error_pop in the error-handling path.
5355 (grub_elf32_load_segment): Only call grub_file_read with non-zero
5358 2006-11-03 Hollis Blanchard <hollis@penguinppc.org>
5360 * conf/i386-efi.rmk (grub_emu_SOURCES): Add kern/elf.c.
5361 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
5362 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5363 (kernel_elf_SOURCES): Likewise.
5364 * conf/i386-efi.rmk (kernel_mod_HEADERS): Add elfload.h and cache.h.
5365 * conf/i386-pc.rmk (kernel_mod_HEADERS): Likewise.
5366 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
5367 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
5368 * conf/common.rmk (pkgdata_MODULES): Add elf.mod.
5369 (elf_mod_SOURCES): New variable.
5370 (elf_mod_CFLAGS): Likewise.
5371 (elf_mod_LDFLAGS): Likewise.
5372 * include/grub/types.h (__unused): New macro.
5373 * include/grub/elfload.h: New file.
5374 * kern/elf.c: Likewise.
5375 * loader/powerpc/ieee1275/linux.c: Include elfload.h.
5376 (ELF32_LOADMASK): New macro.
5377 (ELF64_LOADMASK): Likewise.
5379 (grub_linux_load32): New function.
5380 (grub_linux_load64): Likewise.
5381 (grub_rescue_cmd_linux): Call grub_linux_load32 or grub_linux_load64.
5382 Use grub_elf_t instead of grub_file_t.
5384 2006-11-02 Hollis Blanchard <hollis@penguinppc.org>
5386 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): Add
5387 `catch_result' to struct set_color_args.
5389 2006-10-28 Yoshinori K. Okuji <okuji@enbug.org>
5391 * normal/menu.c: Include grub/script.h.
5392 * normal/menu_entry.c: Likewise.
5393 * include/grub/normal.h: Do not include grub/script.h.
5395 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
5397 * kern/disk.c (grub_disk_read): Correct debug printf formatting.
5399 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
5401 * kern/disk.c (grub_disk_open): Print debug messages when opening a
5403 (grub_disk_close): Print debug messages when closing a disk.
5404 (grub_disk_read): Print debug messages when disk read fails.
5405 * kern/fs.c (grub_fs_probe): Print debug messages when detecting
5407 * kern/partition.c: Include misc.h.
5408 (grub_partition_iterate): Print debug messages when detecting
5411 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
5413 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Return error if `status'
5415 * kern/ieee1275/ieee1275.c (IEEE1275_IHANDLE_INVALID): Change to 0.
5417 2006-10-26 Hollis Blanchard <hollis@penguinppc.org>
5419 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
5420 Reverse GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS test.
5422 2006-10-25 Jeroen Dekkers <jeroen@dekkers.cx>
5424 * disk/lvm.c (grub_lvm_scan_device): Malloc sizeof(*lv) bytes
5425 instead of sizeof(lv). Patch by Michael Guntsche.
5427 2006-10-18 Jeroen Dekkers <jeroen@dekkers.cx>
5429 * disk/lvm.c: Rename VGS to VG_LIST.
5430 (grub_lvm_iterate): Change VGS->LV to VG-LV.
5431 (grub_lvm_open): Likewise.
5432 Thanks to Michael Guntsche for finding this bug.
5434 2006-10-15 Yoshinori K. Okuji <okuji@enbug.org>
5436 * configure.ac (AC_INIT): Bumped to 1.95.
5438 2006-10-14 Robert Millan <rmh@aybabtu.com>
5440 * util/i386/pc/getroot.c (grub_guess_root_device): Don't compare os_dev
5441 with "/dev/.static/dev/md".
5443 2006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
5445 * util/i386/pc/grub-probe.c (probe): Print DEVICE_NAME instead of
5446 DRIVE_NAME when grub_util_biosdisk_get_grub_dev fails. Open
5447 DRIVE_NAME instead of DEVICE_NAME. Make sure that DEVICE_NAME and
5448 DRIVE_NAME are always freed.
5450 * util/i386/pc/biosdisk.c (make_device_name): Add one into
5451 DOS_PART, as a DOS partition is counted from one instead of zero
5452 now. Reported by Robert Millan.
5454 2006-10-14 Robert Millan <rmh@aybabtu.com>
5456 * util/i386/pc/getroot.c (grub_guess_root_device): Stop using
5457 grub_util_biosdisk_get_grub_dev to convert system device to GRUB device.
5458 * util/grub-emu.c (main): Use grub_util_biosdisk_get_grub_dev with the
5459 string returned by grub_guess_root_device.
5460 * util/i386/pc/grub-setup.c: Likewise.
5461 * util/i386/pc/grub-probefs.c: Likewise.
5463 * util/i386/pc/grub-probefs.c: Rename to ...
5464 * util/i386/pc/grub-probe.c: ... this.
5465 * DISTLIST: Remove grub-probefs, add grub-probe.
5466 * conf/i386-efi.rmk: Likewise.
5467 * conf/i386-pc.rmk: Likewise.
5468 * util/i386/pc/grub-install.in: Likewise.
5470 * util/i386/pc/grub-probe.c: Add --target=(fs|device|drive) option to
5471 choose which information we want to print.
5473 2006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
5475 * DISTLIST: Added commands/echo.c, disk/lvm.c, disk/raid.c,
5476 include/grub/bitmap.h, include/grub/lvm.h, include/grub/raid.h,
5477 include/grub/i386/pc/vbeutil.h, include/grub/util/lvm.h,
5478 include/grub/util/raid.h, util/lvm.c, util/raid.c, video/bitmap.c,
5479 video/readers/tga.c and video/i386/pc/vbeutil.c.
5481 2006-10-14 Jeroen Dekkers <jeroen@dekkers.cx>
5483 Added support for RAID and LVM.
5485 * disk/lvm.c: New file.
5486 * disk/raid.c: Likewise.
5487 * include/grub/lvm.h: Likewise.
5488 * include/grub/raid.h: Likewise.
5489 * include/grub/util/lvm.h: Likewise.
5490 * include/grub/util/raid.h: Likewise.
5491 * util/lvm.c: Likewise.
5492 * util/raid.c: Likewise.
5494 * include/grub/disk.h (grub_disk_dev_id): Add
5495 GRUB_DISK_DEVICE_RAID_ID and GRUB_DISK_DEVICE_LVM_ID.
5496 (grub_disk_get_size): New prototype.
5497 * kern/disk.c (grub_disk_open): Check whether grub_partition_probe()
5498 returns a partition.
5499 (grub_disk_get_size): New function.
5501 * kern/i386/pc/init.c (make_install_device): Copy the prefix
5502 verbatim if grub_install_dos_part is -2.
5504 * util/i386/pc/getroot.c (grub_guess_root_device): Support RAID
5507 * util/i386/pc/grub-setup.c (setup): New argument
5508 MUST_EMBED. Force embedding of GRUB when the argument is
5509 true. Close FILE before returning.
5510 (main): Add support for RAID and LVM.
5512 * conf/common.rmk: Add RAID and LVM modules.
5513 * conf/i386-pc.rmk (grub_setup_SOURCES): Add util/raid.c and
5515 (grub_emu_SOURCES): Add disk/raid.c and disk/lvm.c.
5517 * kern/misc.c (grub_strstr): New function.
5518 * include/grub/misc.h (grub_strstr): New prototype.
5520 2006-10-10 Tristan Gingold <tristan.gingold@bull.net>
5522 * include/grub/efi/api.h (GRUB_EFI_ERROR_CODE): Long constant.
5524 2006-10-05 Tristan Gingold <tristan.gingold@bull.net>
5526 * kern/misc.c (grub_strtoull): Guess the base only if not
5529 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
5531 * kern/powerpc/ieee1275/cmain.c (cmain): Remove incomplete Old World
5534 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
5536 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Cast `size' to long.
5538 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_next_property):
5539 Remove `flags' argument. All callers changed.
5540 * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_ROOT): Removed.
5541 (IEEE1275_IHANDLE_INVALID): New variable.
5542 (IEEE1275_CELL_INVALID): New variable.
5543 (grub_ieee1275_finddevice, grub_ieee1275_get_property,
5544 grub_ieee1275_get_property_length, grub_ieee1275_instance_to_package,
5545 grub_ieee1275_package_to_path, grub_ieee1275_instance_to_path,
5546 grub_ieee1275_peer, grub_ieee1275_child, grub_ieee1275_open,
5547 grub_ieee1275_claim, grub_ieee1275_set_property): Error-check return
5548 codes from Open Firmware. All callers updated.
5549 (grub_ieee1275_next_property): Directly return Open Firmware return
5551 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
5552 Standardize error checking from `grub_ieee1275_get_property'.
5553 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Rename
5554 `devalias' to `aliases'. Correct comments. Consolidate error paths.
5556 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
5558 * kern/ieee1275/ieee1275.c (grub_ieee1275_instance_to_path): Rename
5559 `instance_to_package_args' to `instance_to_path_args'.
5561 * kern/powerpc/ieee1275/init.c (grub_machine_init): Use
5562 `grub_ieee1275_chosen'.
5564 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Call
5565 `grub_ieee1275_interpret'.
5567 2006-09-25 Hollis Blanchard <hollis@penguinppc.org>
5569 * util/powerpc/ieee1275/grub-mkimage.c: Include config.h.
5571 2006-09-25 Hollis Blanchard <hollis@penguinppc.org>
5573 * include/grub/powerpc/libgcc.h (__floatdisf): New prototype.
5574 (__cmpdi): Likewise.
5576 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Pass 0 as
5577 `flags' to `grub_ieee1275_next_property'. Change `pathlen' to type
5580 * kern/powerpc/ieee1275/cmain.c: Include grub/misc.h.
5582 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Change `actual'
5583 to type `grub_ssize_t'.
5584 (grub_rescue_cmd_linux): Cast -1 to `grub_off_t'.
5586 2006-09-22 Marco Gerards <marco@gnu.org>
5588 * normal/script.c (grub_script_create_cmdmenu): Skip leading
5591 2006-09-22 Marco Gerards <marco@gnu.org>
5593 * commands/echo.c: New file.
5595 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/echo.c'.
5597 * conf/common.rmk (echo_mod_SOURCES): New variable.
5598 (echo_mod_CFLAGS): Likewise.
5599 (echo_mod_LDFLAGS): Likewise.
5601 2006-09-22 Marco Gerards <marco@gnu.org>
5603 * normal/main.c (get_line): Malloc memory instead of using
5604 preallocated memory. Removed the arguments `cmdline' and
5605 `max_len'. Updated all callers.
5607 2006-09-22 Marco Gerards <marco@gnu.org>
5609 * conf/i386-efi.rmk (grub_emu_DEPENDENCIES): New variable.
5610 (normal_mod_DEPENDENCIES): Likewise.
5612 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Likewise.
5613 (normal_mod_DEPENDENCIES): Likewise.
5615 * conf/sparc64-ieee1275.rmk (normal_mod_DEPENDENCIES): Likewise.
5617 2006-09-22 Johan Rydberg <jrydberg@gnu.org>
5619 * genmk.rb: Add DEPENDENCIES variables to modules, utilities, and
5621 * conf/i386-pc.rmk (grub_emu_DEPENDENCIES): Declare.
5622 (normal_mod_DEPENDENCIES): Likewise.
5623 * conf/i386-pc.mk: Regenerate.
5624 * conf/i386-efi.mk: Likewise
5625 * conf/common.mk: Likewise.
5626 * conf/powerpc-ieee1275.mk: Likewise.
5627 * conf/sparc64-ieee1275.mk: Likewise.
5629 2006-09-22 Robert Millan <rmh@aybabtu.com>
5631 Sync with i386 version.
5632 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Remove grub-emu, add grub-mkimage.
5633 * conf/powerpc-ieee1275.rmk (sbin_UTILITIES): Remove grub-mkimage, add grub-emu.
5635 2006-09-21 Robert Millan <rmh@aybabtu.com>
5637 Import from GRUB Legacy (lib/device.c):
5638 * util/i386/pc/grub-mkdevicemap.c (get_i2o_disk_name): New function.
5639 (init_device_map) [__linux__]: Add support for I2O devices.
5641 2006-09-14 Marco Gerards <marco@gnu.org>
5643 * conf/i386-pc.rmk (COMMON_LDFLAGS): Use `-m32' instead of
5646 2006-09-14 Robert Millan <rmh@aybabtu.com>
5648 * util/i386/pc/grub-install.in: Skip menu.lst when removing
5651 * util/i386/pc/getroot.c: Don't recurse into dotdirs (e.g. ".static").
5653 * util/i386/pc/grub-mkdevicemap.c: Make sure the floppy device exists
5654 before adding it to device.map.
5656 2006-08-15 Johan Rydberg <jrydberg@gnu.org>
5658 * genmk.rb: Let GCC generate dependencies the first time it
5659 compiles a file; using the -MD option.
5660 * conf/common.mk: Regenerate.
5661 * conf/i386-pc.mk: Likewise.
5662 * conf/i386-efi.mk: Likewise.
5663 * conf/powerpc-ieee1275.mk: Likewise.
5664 * conf/sparc64-ieee1275.mk: Likewise.
5666 2006-08-04 Yoshinori K. Okuji <okuji@enbug.org>
5668 Move the prototypes of grub_setjmp and grub_longjmp to
5669 cpu/setjmp.h, so that each architecture may specify different
5672 * include/grub/i386/setjmp.h (grub_setjmp): New prototype.
5673 (grub_longjmp): Likewise.
5674 * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise..
5675 (grub_longjmp): Likewise.
5676 * include/grub/sparc64/setjmp.h (grub_setjmp): Likewise..
5677 (grub_longjmp): Likewise.
5679 * include/grub/setjmp.h [!GRUB_UTIL] (grub_setjmp): Removed.
5680 [!GRUB_UTIL] (grub_longjmp): Removed.
5682 2006-08-01 Pelletier Vincent <subdino2004@yahoo.fr>
5684 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): IEEE1275
5685 "color!" method does not return any value.
5687 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
5689 * include/grub/bitmap.h: New file.
5691 * include/grub/i386/pc/vbeutil.h: Likewise.
5693 * video/bitmap.c: Likewise.
5695 * video/readers/tga.c: Likewise.
5697 * video/i386/pc/vbeutil.c: Likewise.
5699 * commands/videotest.c: Code cleanup and updated to reflect to new
5702 * term/gfxterm.c: Likewise.
5704 * video/video.c: Likewise.
5706 * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod.
5707 (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c.
5708 (bitmap_mod_SOURCES): New entry.
5709 (bitmap_mod_CFLAGS): Likewise.
5710 (bitmap_mod_LDFLAGS): Likewise.
5711 (tga_mod_SOURCES): Likewise.
5712 (tga_mod_CFLAGS): Likewise.
5713 (tga_mod_LDFLAGS): Likewise.
5715 * include/grub/video.h (grub_video_blit_operators): New enum type.
5716 (grub_video_render_target): Changed as forward declaration and moved
5717 actual definition to be video driver specific.
5718 (grub_video_adapter.blit_bitmap): Added blitting operator.
5719 (grub_video_adapter.blit_render_target): Likewise.
5720 (grub_video_blit_bitmap): Likewise.
5721 (grub_video_blit_render_target): Likewise.
5723 * include/grub/i386/pc/vbe.h (grub_video_render_target): Added
5724 driver specific render target definition.
5725 (grub_video_vbe_map_rgba): Added driver internal helper.
5726 (grub_video_vbe_unmap_color): Updated to use
5727 grub_video_i386_vbeblit_info.
5728 (grub_video_vbe_get_video_ptr): Likewise.
5730 * include/grub/i386/pc/vbeblit.h
5731 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use
5732 grub_video_i386_vbeblit_info.
5733 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
5734 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
5735 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
5736 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
5737 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
5738 (grub_video_i386_vbeblit_index_index): Likewise.
5739 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function.
5740 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
5741 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
5742 (grub_video_i386_vbeblit_blend): Added generic blitter for blend
5744 (grub_video_i386_vbeblit_replace): Added generic blitter for replace
5747 * video/i386/pc/vbeblit.c: Updated to reflect changes on
5748 include/grub/i386/pc/vbeblit.h.
5750 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8):
5751 Updated to use grub_video_i386_vbeblit_info.
5752 (grub_video_i386_vbefill_R8G8B8): Likewise.
5753 (grub_video_i386_vbefill_index): Likewise.
5754 (grub_video_i386_vbefill): Added generic filler.
5756 * video/i386/pc/vbefill.c: Updated to reflect changes on
5757 include/grub/i386/pc/vbefill.h.
5759 * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use
5760 grub_video_i386_vbeblit_info.
5761 (grub_video_vbe_unmap_color): Likewise.
5762 (grub_video_vbe_blit_glyph): Likewise.
5763 (grub_video_vbe_scroll): Likewise.
5764 (grub_video_vbe_draw_pixel): Removed function.
5765 (grub_video_vbe_get_pixel): Likewise.
5766 (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and
5767 updated code to use it.
5768 (common_blitter): Added common blitter for render target and bitmap.
5769 (grub_video_vbe_blit_bitmap): Updated to use common_blitter.
5770 (grub_video_vbe_blit_render_target): Likewise.
5772 2006-07-30 Johan Rydberg <jrydberg@gnu.org>
5774 * kern/efi/efi.c (grub_efi_set_text_mode): Assume console already
5775 is in text mode if there is no console control protocol instance
5778 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
5780 * include/grub/video.h: Code cleanup.
5782 * include/grub/i386/pc/vbe.h: Likewise.
5784 * video/i386/pc/vbe.c: Likewise.
5786 * video/i386/pc/vbeblit.c: Likewise.
5788 * video/i386/pc/vbefill.c: Likewise.
5790 * video/video.c: Likewise. Also added more comments.
5792 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
5794 * disk/i386/pc/biosdisk.c (struct grub_biosdisk_drp): Moved to ...
5795 (struct grub_biosdisk_dap): Likewise.
5797 * include/grub/i386/pc/biosdisk.h: ... to here. Also corrected
5798 linkage settings for all functions.
5800 2006-07-12 Marco Gerards <marco@gnu.org>
5802 * configure.ac (--enable-mm-debug): Fix typo.
5804 * genkernsyms.sh.in: Use proper quoting for `CC'.
5806 2006-07-02 Jeroen Dekkers <jeroen@dekkers.cx>
5808 * conf/i386-pc.rmk (COMMON_ASFLAGS): Add "-m32".
5809 (normal_mod_ASFLAGS): Remove "-m32".
5811 2006-06-14 Yoshinori K. Okuji <okuji@enbug.org>
5813 * util/misc.c: Include config.h.
5814 [!HAVE_MEMALIGN]: Do not include malloc.h.
5815 (grub_memalign): Use posix_memalign, if present. Then, use
5816 memalign, if present. Otherwise, emit an error.
5818 * util/grub-emu.c: Do not include malloc.h.
5820 * include/grub/util/misc.h: Include unistd.h. This is required for
5821 FreeBSD, because off_t is defined in unistd.h. Reported by Harley
5822 D. Eades III <hde@foobar-qux.org>.
5824 * configure.ac (AC_GNU_SOURCE): Added.
5825 (AC_CHECK_FUNCS): Check posix_memalign and memalign for the host
5828 2006-06-09 Yoshinori K. Okuji <okuji@enbug.org>
5830 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Make sure that
5831 ADDR_MAX does not exceed GRUB_LINUX_INITRD_MAX_ADDRESS.
5833 2006-06-07 Jeroen Dekkers <jeroen@dekkers.cx>
5835 * include/grub/types.h (grub_host_addr_t): Rename to
5837 (grub_host_off_t): Rename to grub_target_off_t.
5838 (grub_host_size_t): Rename to grub_target_size_t.
5839 (grub_host_ssize_t): Rename to grub_target_ssize_t.
5840 Refer to GRUB_TARGET_SIZEOF_VOID_P to define those variables.
5842 * include/grub/kernel.h (struct grub_module_header): Change type
5843 of OFFSET to grub_target_off_t and type of SIZE to grub_target_size_t.
5844 (grub_module_info): Likewise.
5846 2006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
5848 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): The conditional
5849 of checking LINUX_MEM_SIZE was reverse. Reported by Jesus
5850 Velazquez <jesus.velazquez@gmail.com>.
5852 2006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
5854 Count partitions from 1 instead of 0 in the string representation
5855 of partitions. Still use 0-based internally.
5857 * partmap/sun.c (grub_sun_is_valid): A cosmetic change.
5858 (sun_partition_map_iterate): Use grub_partition_t instead of
5859 struct grub_partition *. Cast DESC->START_CYLINDER to
5860 grub_uint64_t after converting the endian.
5861 (sun_partition_map_probe): Subtract 1 for PARTNUM.
5862 (sun_partition_map_get_name): Add 1 to P->INDEX.
5864 * partmap/pc.c (grub_partition_parse): Subtract 1 for
5866 (pc_partition_map_get_name): Add 1 into PCDATA->DOS_PART.
5868 * partmap/gpt.c (gpt_partition_map_iterate): Initialize PARTNO to
5869 zero instead of one.
5870 (gpt_partition_map_probe): Subtract 1 for PARTNUM.
5871 (gpt_partition_map_get_name): Add 1 into P->INDEX.
5873 * partmap/apple.c (apple_partition_map_iterate): Change the type
5875 (apple_partition_map_probe): Subtract 1 for PARTNUM.
5876 (apple_partition_map_get_name): Add 1 into P->INDEX.
5878 * partmap/amiga.c (amiga_partition_map_iterate): Change the type
5880 (amiga_partition_map_iterate): Cast NEXT to grub_off_t to
5881 calculate the offset of a partition.
5882 (amiga_partition_map_probe): Subtract 1 for PARTNUM.
5883 (amiga_partition_map_get_name): Add 1 into P->INDEX.
5885 * partmap/acorn.c (acorn_partition_map_find): Change the type of
5886 SECTOR to grub_disk_addr_t.
5887 (acorn_partition_map_iterate): Likewise.
5888 (acorn_partition_map_probe): Subtract 1 for PARTNUM.
5889 Change the type of SECTOR to grub_disk_addr_t. Declare P on the
5891 (acorn_partition_map_get_name): Add 1 into P->INDEX.
5893 * kern/i386/pc/init.c (make_install_device): Add 1 into
5894 GRUB_INSTALL_DOS_PART.
5896 * fs/iso9660.c (grub_iso9660_mount): Fixed a reversed
5899 2006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
5901 Clean up the code to support 64-bit addressing in disks and
5902 files. This change is not enough for filesystems yet.
5904 * util/i386/pc/grub-setup.c (struct boot_blocklist): Change the
5905 type of "start" to grub_uint64_t.
5906 (setup): Change the types of KERNEL_SECTOR and FIRST_SECTOR to
5907 grub_disk_addr_t * and grub_disk_addr_t. Fix the format string in
5908 save_first_sector and save_blocklists. Use grub_le_to_cpu64 to
5911 * util/i386/pc/biosdisk.c (open_device): Change the type of SECTOR
5912 to grub_disk_addr_t.
5914 * partmap/gpt.c (gpt_partition_map_iterate): Fix the format
5917 * partmap/pc.c (pc_partition_map_iterate): Likewise.
5919 * partmap/amiga.c (amiga_partition_map_iterate): Cast RDSK.MAGIC
5922 * normal/script.c (grub_script_parse): Remove unused MEMFREE.
5924 * normal/parser.y (YYLTYPE_IS_TRIVIAL): New macro.
5926 * normal/lexer.c (grub_script_yyerror): Specify unused to LEX.
5928 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf64): Cast -1
5929 to grub_off_t, to detect an error from grub_file_seek.
5930 (grub_multiboot_load_elf32): Likewise.
5932 * kern/misc.c (grub_strtoul): Use grub_strtoull. Return the
5933 maximum unsigned long value when an overflow is detected.
5934 (grub_strtoull): New function.
5935 (grub_divmod64): Likewise.
5936 (grub_lltoa): use grub_divmod64.
5938 * kern/fs.c (struct grub_fs_block): Change the type of "offset" to
5940 (grub_fs_blocklist_open): Increase P if P is not NULL to advance
5941 the pointer to next character. Use grub_strtoull instead of
5943 (grub_fs_blocklist_read): Change the types of SECTOR, OFFSET and
5944 SIZE to grub_disk_addr_t, grub_off_t and grub_size_t,
5947 * kern/file.c (grub_file_read): Prevent an overflow of LEN, as the
5948 return value is signed.
5949 (grub_file_seek): Change the type of OLD to grub_off_t. Do not
5950 test if OFFSET is less than zero, as OFFSET is unsigned now.
5952 * kern/disk.c (struct grub_disk_cache): Change the type of
5953 "sector" to grub_disk_addr_t.
5954 (grub_disk_cache_get_index): Change the type of SECTOR to
5955 grub_disk_addr_t. Calculate the hash with SECTOR casted to
5956 unsigned after shifting.
5957 (grub_disk_cache_invalidate): Change the type of SECTOR to
5959 (grub_disk_cache_unlock): Likewise.
5960 (grub_disk_cache_store): Likewise.
5961 (grub_disk_check_range): Change the types of SECTOR, OFFSET, SIZE,
5962 START and LEN to grub_disk_addr_t *, grub_off_t *, grub_size_t,
5963 grub_disk_addr_t and grub_uint64_t, respectively.
5964 (grub_disk_read): Use an unsigned variable REAL_OFFSET for the
5965 body, as the value of OFFSET is tweaked by
5966 grub_disk_check_range. Change the types of START_SECTOR, LEN and
5967 POS to grub_disk_addr_t, grub_size_t and grub_size_t,
5969 (grub_disk_write): Use an unsigned variable REAL_OFFSET for the
5970 body, as the value of OFFSET is tweaked by
5971 grub_disk_check_range. Change the types of LEN and N to
5974 * io/gzio.c (struct grub_gzio): Change the types of "data_offset"
5975 and "saved_offset" to grub_off_t.
5976 (test_header): Cast BUF to char *.
5977 (get_byte): Cast GZIO->DATA_OFFSET to grub_off_t. Cast GZIO->INBUF
5979 (grub_gzio_read): Change the types of OFFSET and SIZE to
5980 grub_off_t and grub_size_t, respectively.
5982 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_FORCE_LBA):
5984 (GRUB_BOOT_MACHINE_BOOT_DRIVE): Changed to 0x4c.
5985 (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Changed to 0x40.
5986 (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Changed to 0x42.
5987 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Changed to 0x4e.
5988 (GRUB_BOOT_MACHINE_LIST_SIZE): Increased to 12.
5990 * include/grub/types.h (grub_off_t): Unconditionally set to
5992 (grub_disk_addr_t): Changed to grub_uint64_t.
5994 * include/grub/partition.h (struct grub_partition): Change the
5995 types of "start", "len" and "offset" to grub_disk_addr_t,
5996 grub_uint64_t and grub_disk_addr_t, respectively.
5997 (grub_partition_get_start): Return grub_disk_addr_t.
5998 (grub_partition_get_len): Return grub_uint64_t.
6000 * include/grub/misc.h (grub_strtoull): New prototype.
6001 (grub_divmod64): Likewise.
6003 * include/grub/fshelp.h (grub_fshelp_read_file): Change the types
6004 of SECTOR, LEN and FILESIZE to grub_disk_addr_t, grub_size_t and
6005 grub_off_t, respectively.
6006 All callers and references changed.
6008 * include/grub/fs.h (struct grub_fs): Change the type of LEN to
6009 grub_size_t in "read".
6010 All callers and references changed.
6012 * include/grub/file.h (struct grub_file): Change the types of
6013 "offset" and "size" to grub_off_t and grub_off_t,
6014 respectively. Change the type of SECTOR to grub_disk_addr_t in
6016 (grub_file_read): Change the type of LEN to grub_size_t.
6017 (grub_file_seek): Return grub_off_t. Change the type of OFFSET to
6019 (grub_file_size): Return grub_off_t.
6020 (grub_file_tell): Likewise.
6021 All callers and references changed.
6023 * include/grub/disk.h (struct grub_disk_dev): Change the types of
6024 SECTOR and SIZE to grub_disk_addr_t and grub_size_t in "read" and
6026 (struct grub_disk): Change the type of "total_sectors" to
6027 grub_uint64_t. Change the type of SECTOR to grub_disk_addr_t in
6029 (grub_disk_read): Change the types of SECTOR, OFFSET and SIZE to
6030 grub_disk_addr_t, grub_off_t and grub_size_t, respectively.
6031 (grub_disk_write): Likewise.
6032 All callers and references changed.
6034 * fs/iso9660.c (grub_iso9660_susp_iterate): Cast parameters to
6035 char * for grub_strncmp to silence gcc.
6036 (grub_iso9660_mount): Likewise.
6037 (grub_iso9660_mount): Likewise.
6038 (grub_iso9660_read_symlink): Likewise. Also, remove the nonsense
6040 (grub_iso9660_iterate_dir): Likewise.
6041 (grub_iso9660_label): Cast DATA->VOLDESC.VOLNAME to char *.
6043 * fs/hfs.c (grub_hfs_read_file): Change the types of SECTOR and
6044 LEN to grub_disk_addr_t and grub_size_t, respectively.
6046 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
6048 * fs/jfs.c (grub_jfs_read_file): Likewise.
6050 * fs/minix.c (grub_jfs_read_file): Likewise.
6052 * fs/sfs.c (grub_jfs_read_file): Likewise.
6054 * fs/ufs.c (grub_jfs_read_file): Likewise.
6056 * fs/xfs.c (grub_jfs_read_file): Likewise.
6058 * fs/fat.c (grub_fat_read_data): Change the types of SECTOR, LEN
6059 and SIZE to grub_disk_addr_t, grub_size_t and grub_size_t,
6062 * fs/ext2.c (grub_ext2_read_block): When an error happens, set
6063 BLKNR to -1 instead of returning GRUB_ERRNO.
6064 (grub_ext2_read_file): Change the types of SECTOR and
6065 LEN to grub_disk_addr_t and grub_size_t, respectively.
6067 * fs/affs.c (grub_affs_read_file): Change the types of SECTOR and
6068 LEN to grub_disk_addr_t and grub_size_t, respectively.
6070 * font/manager.c (grub_font_get_glyph): Cast BITMAP to char * for
6073 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Fix the format
6074 string. Do not cast SECTOR explicitly.
6076 * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Change the type of
6077 TOTAL_SECTORS to grub_uint64_t. Do not mask DRP->TOTAL_SECTORS.
6078 (grub_biosdisk_rw): Change the types of SECTOR and SIZE to
6079 grub_disk_addr_t and grub_size_t, respectively. If the sector is
6080 over 2TB and LBA mode is not supported, raise an error.
6081 (get_safe_sectors): New function.
6082 (grub_biosdisk_read): Use get_safe_sectors.
6083 (grub_biosdisk_write): Likewise.
6085 * disk/efi/efidisk.c (grub_efidisk_read): Fix the format string.
6086 (grub_efidisk_write): Likewise.
6088 * disk/loopback.c (delete_loopback): Cosmetic changes.
6089 (grub_cmd_loopback): Likewise. Also, test NEWDEV->FILENAME
6091 (grub_loopback_open): Likewise.
6092 (grub_loopback_read): Likewise. Also, change the type of POS to
6093 grub_off_t, and fix the usage of grub_memset.
6095 * commands/i386/pc/play.c: Include grub/machine/time.h.
6097 * commands/ls.c (grub_ls_list_files): Use "llu" instead of "d" to
6100 * commands/configfile.c: Include grub/env.h.
6102 * commands/cmp.c (grub_cmd_cmp): Do not use ERR, but use
6103 GRUB_ERRNO directly instead. Change the type of POS to
6104 grub_off_t. Follow the coding standard.
6106 * commands/blocklist.c: Include grub/partition.h.
6107 (grub_cmd_blocklist): Return an error if the underlying device is
6108 not a disk. Take the starting sector of a partition into account,
6109 if a partition is used.
6111 * boot/i386/pc/diskboot.S (bootloop): Adapted to the new offset of
6113 (lba_mode): Support 64-bit addresses.
6114 (chs_mode): Likewise.
6115 (copy_buffer): Adapted to the new offsets of a length field and a
6117 (blocklist_default_start): Allocate 64-bit space.
6119 * boot/i386/pc/boot.S (force_lba): Removed.
6120 (boot_drive): Moved to under KERNEL_SECTOR.
6121 (kernel_sector): Moved to under KERNEL_SEGMENT. Allocate 64-bit
6123 (real_start): Set %si earlier. Remove code for FORCE_LBA, since it
6125 (lba_mode): Refactored to support a 64-bit address. More size
6127 (setup_sectors): Likewise.
6129 2006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
6131 * DISTLIST: Added include/grub/i386/linux.h. Removed
6132 include/grub/i386/pc/linux.h
6134 * configure.ac (AC_INIT): Bumped to 1.94.
6136 * config.guess: Updated from gnulib.
6137 * config.sub: Likewise.
6138 * install-sh: Likewise.
6139 * mkinstalldirs: Likewise.
6141 2006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
6143 * conf/common.rmk (grub_modules_init.lst): Depended on
6144 grub_emu_SOURCES, excluding grub_emu_init.c, instead of
6147 * genmk.rb (PModule::rule): Reverted the previous change.
6149 2006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
6151 * conf/common.rmk (grub_modules_init.lst): Depends on
6152 $(MODSRCFILES). Grep only the files in $(MODSRCFILES). Make sure
6153 that the target does not exist before producing.
6154 (grub_modules_init.h): Remove the target before generating.
6155 (grub_emu_init.c): Likewise.
6157 * genmk.rb (PModule::rule): Add source files into MODSRCFILES.
6159 2006-05-31 Jeroen Dekkers <jeroen@dekkers.cx>
6161 * configure.ac: Don't set host_m32 for x86_64. Also reset LIBS
6162 for the target-specific tests. Make sure that we also have the
6163 up-to-date target variables for those tests.
6165 2006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
6167 * genmk.rb (Image::rule): Prefix CFLAGS or ASFLAGS with TARGET_.
6168 (PModule::rule): Likewise.
6170 2006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
6172 * genmk.rb (Image::rule): Set FLAG to CFLAGS or ASFLAGS instead of
6173 TARGET_CFLAGS or TARGET_ASFLAGS. There is no reason why
6174 target-specific flags should be prefixed.
6175 (PModule::rule): Likewise.
6177 2006-05-30 Yoshinori K. Okuji <okuji@enbug.org>
6179 * configure.ac (CMP): Check if cmp is available explicitly.
6181 2006-05-29 Yoshinori K. Okuji <okuji@enbug.org>
6183 * util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
6184 (target_cpu): New variable.
6185 (pkglibdir): Use target_cpu instead of host_cpu.
6187 * util/i386/pc/grub-install.in (host_cpu): Removed.
6188 (target_cpu): New variable.
6189 (pkglibdir): Use target_cpu instead of host_cpu.
6191 * util/genmoddep.c: Removed.
6193 * kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
6194 instead of GRUB_HOST_SIZEOF_VOID_P.
6195 * kern/dl.c: Likewise.
6197 * include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
6199 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
6200 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
6201 (GRUB_TARGET_SIZEOF_LONG): ... this.
6202 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
6203 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
6204 * include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
6206 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
6207 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
6208 (GRUB_TARGET_SIZEOF_LONG): ... this.
6209 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
6210 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
6211 * include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
6213 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
6214 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
6215 (GRUB_TARGET_SIZEOF_LONG): ... this.
6216 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
6217 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
6219 * include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
6220 GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
6221 [!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
6222 instead of GRUB_HOST_SIZEOF_LONG.
6223 [!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
6224 GRUB_HOST_WORDS_BIGENDIAN to define or undefine
6225 GRUB_CPU_WORDS_BIGENDIAN.
6226 Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
6227 define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
6230 * conf/i386-efi.rmk (noinst_UTILITIES): Removed.
6231 (genmoddep_SOURCES): Likewise.
6232 * conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
6233 (genmoddep_SOURCES): Likewise.
6234 * conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
6235 (genmoddep_SOURCES): Likewise.
6236 * conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
6238 (genmoddep_SOURCES): Likewise.
6240 * genmoddep.awk: New file.
6242 * genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
6243 TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
6244 CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
6245 (PModule::rule): Likewise.
6246 (Program::rule): Likewise.
6247 (Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
6248 BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
6251 * configure.ac: Rewritten intensively to use host and target
6252 instead of build and host, respectively.
6254 * Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
6255 (host_cpu): Removed.
6256 (target_cpu): New variable.
6257 (CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
6258 (BUILD_CC): Removed.
6259 (BUILD_CFLAGS): Likewise.
6260 (BUILD_CPPFLAGS): Likewise.
6261 (TARGET_CC): New variable.
6262 (TARGET_CFLAGS): Likewise.
6263 (TARGET_CPPFLAGS): Likewise.
6264 (TARGET_LDFLAGS): Likewise.
6266 (include): Use target_cpu instead of host_cpu.
6267 (moddep.lst:): Use genmoddep.awk instead of genmoddep.
6269 * DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
6271 2006-05-29 Vesa Jaaskelainen <chaac@nic.fi>
6273 * include/grub/script.h (grub_script_cmdif): Renamed field 'bool' to
6274 'exec_to_evaluate'. Renamed field 'true' to 'exec_on_true'. Renamed
6275 field 'false' to 'exec_on_false'.
6276 (grub_script_create_cmdif): Renamed argument names to reflect above
6279 * normal/execute.c (grub_script_execute_cmdif): Likewise.
6281 * normal/script.c (grub_script_create_cmdif): Likewise.
6283 2006-05-28 Yoshinori K. Okuji <okuji@enbug.org>
6285 * fs/hfsplus.c (grub_hfsplus_btree_recoffset): Moved to near the
6287 (grub_hfsplus_btree_recptr): Likewise.
6288 (grub_hfsplus_find_block): Do not take RETRY any longer. Use
6289 FILEBLOCK both to pass a block number and store next block
6291 (grub_hfsplus_read_block): Rewritten heavily to support an extent
6292 overflow file correctly. Specify errors appropriately, because
6293 fshelp expects that GRUB_ERRNO is set when fails. Reuse
6294 grub_hfsplus_btree_recptr to get the pointer to a found key.
6295 (grub_hfsplus_btree_search): Return 1 instead of 0 when no match
6298 * conf/i386-efi.rmk (pkgdata_MODULES): Added _linux.mod and
6300 (_linux_mod_SOURCES): New variable.
6301 (_linux_mod_CFLAGS): Likewise.
6302 (_linux_mod_LDFLAGS): Likewise.
6303 (linux_mod_SOURCES): Likewise.
6304 (linux_mod_CFLAGS): Likewise.
6305 (linux_mod_LDFLAGS): Likewise.
6307 * DISTLIST: Added loader/i386/efi/linux.c,
6308 loader/i386/efi/linux_normal.c and
6309 include/grub/i386/efi/loader.h.
6311 * loader/i386/efi/linux.c: New file.
6312 * loader/i386/efi/linux_normal.c: Likewise.
6313 * include/grub/i386/efi/loader.h: Likewise.
6315 2006-05-27 Yoshinori K. Okuji <okuji@enbug.org>
6317 * commands/blocklist.c: New file.
6319 * DISTLIST: Added commands/blocklist.c.
6321 * term/efi/console.c (grub_console_highlight_color): Use a lighter
6322 color for the background, and a darker color for the foreground.
6323 (grub_console_checkkey): Return READ_KEY.
6324 (grub_console_cls): Set the background to
6325 GRUB_EFI_BACKGROUND_BLACK temporarily to clean out the screen.
6327 * kern/efi/efi.c (grub_efi_exit_boot_services): New function.
6329 * include/grub/i386/linux.h (struct linux_kernel_params): Fixed
6330 the size of "padding5", "hd0_drive_info" and "hd1_drive_info".
6332 * include/grub/efi/efi.h (grub_efi_exit_boot_services): New
6335 * include/grub/efi/api.h (GRUB_EFI_TEXT_ATTR): Do not shift
6336 BG. The spec is wrong again.
6338 * include/grub/normal.h [GRUB_UTIL] (grub_blocklist_init): New
6340 [GRUB_UTIL] (grub_blocklist_fini): Likewise.
6342 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
6343 commands/blocklist.c.
6344 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6346 * conf/common.rmk (pkgdata_MODULES): Added blocklist.mod.
6347 (blocklist_mod_SOURCES): New variable.
6348 (blocklist_mod_CFLAGS): Likewise.
6349 (blocklist_mod_LDFLAGS): Likewise.
6351 2006-05-20 Yoshinori K. Okuji <okuji@enbug.org>
6353 * boot/i386/pc/boot.S (real_start): Set %si earlier to eliminate
6355 (lba_mode): Use %eax more intensively to reduce the code size.
6357 2006-05-20 Marco Gerards <marco@gnu.org>
6359 * normal/lexer.c (grub_script_yylex): Don't filter out newlines.
6361 * normal/parser.y (commandblock): Defined as <cmd>. A subroutine
6363 (script): Accept leading newlines.
6364 (newlines): New rule to describe 0 or more newlines.
6365 (commands): Accept `command' with trailing newline. Fixed the
6366 order in which arguments were passed to `grub_script_add_cmd'.
6367 Accept commands separated by newlines.
6368 (function): Changed to accept newlines.
6369 (menuentry) Rewritten.
6371 * normal/script.c (grub_script_create_cmdmenu): Add new entries in
6372 front of the list, instead of to the end.
6374 2006-05-19 Yoshinori K. Okuji <okuji@enbug.org>
6376 * util/i386/pc/grub-install.in (bindir): New variable.
6377 (grub_mkimage): Use BINDIR instead of SBINDIR. Reported by Lee
6378 Shaver <lbgwjl@gmail.com>.
6380 2006-05-14 Yoshinori K. Okuji <okuji@enbug.org>
6382 * kern/i386/pc/startup.S: Include grub/cpu/linux.h instead of
6383 grub/machine/linux.h
6384 * loader/i386/pc/linux.c: Likewise.
6386 * include/grub/i386/pc/linux.h: Moved to ...
6387 * include/grub/i386/linux.h: ... here.
6389 * include/grub/i386/linux.h (struct linux_kernel_params): New
6392 2006-05-09 Vesa Jaaskelainen <chaac@nic.fi>
6394 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Corrected bounds
6396 (grub_video_vbe_blit_glyph): Likewise.
6397 (grub_video_vbe_blit_bitmap): Likewise.
6398 (grub_video_vbe_blit_render_target): Likewise.
6400 2006-05-09 Yoshinori K. Okuji <okuji@enbug.org>
6402 * configure.ac (--with-platform): Properly quote the square
6405 2006-05-08 Marco Gerards <marco@gnu.org>
6407 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Renamed from
6409 (kernel_elf_HEADERS): ...to this. Updated all users.
6410 (grubof_symlist.c): Renamed from this...
6411 (kernel_elf_symlist.c): ...to this. Updated all users.
6412 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
6413 (grubof_SOURCES): Renamed from this...
6414 (kernel_elf_SOURCES): ...to this.
6415 (grubof_HEADERS): Renamed from this...
6416 (kernel_elf_HEADERS): ...to this.
6417 (grubof_CFLAGS): Renamed from this...
6418 (kernel_elf_CFLAGS): ...to this.
6419 (grubof_ASFLAGS): Renamed from this...
6420 (kernel_elf_ASFLAGS): ...to this.
6421 (grubof_LDFLAGS): Renamed from this...
6422 (kernel_elf_LDFLAGS): ...to this.
6424 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Renamed from
6426 (kernel_elf_HEADERS): ...to this. Updated all users.
6427 (grubof_symlist.c): Renamed from this...
6428 (kernel_elf_symlist.c): ...to this. Updated all users.
6429 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
6430 (grubof_SOURCES): Renamed from this...
6431 (kernel_elf_SOURCES): ...to this.
6432 (grubof_HEADERS): Renamed from this...
6433 (kernel_elf_HEADERS): ...to this.
6434 (grubof_CFLAGS): Renamed from this...
6435 (kernel_elf_CFLAGS): ...to this.
6436 (grubof_ASFLAGS): Renamed from this...
6437 (kernel_elf_ASFLAGS): ...to this.
6438 (grubof_LDFLAGS): Renamed from this...
6439 (kernel_elf_LDFLAGS): ...to this.
6441 * util/powerpc/ieee1275/grub-mkimage.c (add_segments): Use
6442 `kernel.elf' instead of `grubof'.
6444 2006-05-08 Yoshinori K. Okuji <okuji@enbug.org>
6446 Add --with-platform to configure. Use pkglibdir instead of
6447 pkgdatadir. This is reported by Roger Leigh.
6449 * util/powerpc/ieee1275/grub-install.in (datadir): Removed.
6450 (host_vendor): Likewise.
6451 (host_os): Likewise.
6452 (pkgdatadir): Likewise.
6453 (platform): New variable.
6454 (pkglibdir): Likewise.
6455 Use PKGLIBDIR instead of PKGDATADIR.
6457 * util/i386/pc/grub-install.in (datadir): Removed.
6458 (host_vendor): Likewise.
6459 (host_os): Likewise.
6460 (pkgdatadir): Likewise.
6461 (platform): New variable.
6462 (pkglibdir): Likewise.
6463 Use PKGLIBDIR instead of PKGDATADIR.
6465 * util/powerpc/ieee1275/grub-mkimage.c (usage): Use GRUB_LIBDIR
6466 instead of GRUB_DATADIR.
6468 * util/i386/pc/grub-mkimage.c (usage): Likewise.
6470 * util/i386/efi/grub-mkimage.c (usage): Likewise.
6473 * configure.ac (--with-platform): New option.
6474 Use PLATFORM instead of HOST_VENDOR to specify a platform.
6476 * Makefile.in: Include a makefile based on PLATFORM instead of
6478 (pkgdatadir): Not appended by the machine type.
6479 (pkglibdir): Appended by the machine type.
6480 (host_vendor): Removed.
6481 (platform): New variable.
6482 (BUILD_CPPFLAGS): Specify GRUB_LIBDIR instead of GRUB_DATADIR.
6483 (install-local): Use PKGLIBDIR instead of PKGDATADIR.
6484 (uninstall): Likewise.
6486 2006-05-07 Yoshinori K. Okuji <okuji@enbug.org>
6488 Use the environment context in the menu. Remove the commands
6489 "default" and "timeout", and use variables instead.
6491 * normal/menu.c: Include grub/env.h.
6492 (print_entry): Cast TITLE to silence gcc.
6493 (get_timeout): New function.
6494 (set_timeout): Likewise.
6495 (get_entry_number): Likewise.
6496 (run_menu): Use a default entry, a fallback entry and a timeout
6497 in the environment variables "default", "fallback" and
6498 "timeout". Also, tweak the default entry if it is not within the
6499 current menu entries.
6500 (grub_menu_run): Use a fallback entry in the environment variable
6503 * normal/main.c (read_config_file): Do not initialize
6504 NEWMENU->DEFAULT_ENTRY, NEWMENU->FALLBACK_ENTRY or
6506 (grub_normal_execute): Use a data slot to store the menu.
6508 * include/grub/normal.h (struct grub_menu): Removed default_entry,
6509 fallback_entry and timeout.
6510 (struct grub_menu_list): Removed.
6511 (grub_menu_list_t): Likewise.
6512 (struct grub_context): Likewise.
6513 (grub_context_t): Likewise.
6514 (grub_context_get): Likewise.
6515 (grub_context_get_current_menu): Likewise.
6516 (grub_context_push_menu): Likewise.
6517 (grub_context_pop_menu): Likewise.
6518 (grub_default_init): Likewise.
6519 (grub_default_fini): Likewise.
6520 (grub_timeout_init): Likewise.
6521 (grub_timeout_fini): Likewise.
6523 * conf/sparc64-ieee1275.rmk (pkgdata_MODULES): Removed default.mod
6525 (normal_mod_SOURCES): Removed normal/context.c.
6527 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Removed
6528 commands/default.c, commands/timeout.c and normal/context.c.
6529 (normal_mod_SOURCES): Removed normal/context.c.
6531 * conf/i386-pc.rmk (grub_emu_SOURCES): Removed commands/default.c,
6532 commands/timeout.c and normal/context.c.
6533 (normal_mod_SOURCES): Removed normal/context.c.
6535 * conf/i386-efi.rmk (grub_emu_SOURCES): Removed
6536 commands/default.c, commands/timeout.c and normal/context.c.
6537 (normal_mod_SOURCES): Removed normal/context.c.
6539 * conf/common.rmk (pkgdata_MODULES): Removed default.mod and
6541 (default_mod_SOURCES): Removed.
6542 (default_mod_CFLAGS): Likewise.
6543 (default_mod_LDFLAGS): Likewise.
6544 (timeout_mod_SOURCES): Removed.
6545 (timeout_mod_CFLAGS): Likewise.
6546 (timeout_mod_LDFLAGS): Likewise.
6548 * DISTLIST: Removed commands/default.c, commands/timeout.c and
6551 * commands/default.c: Removed.
6552 * commands/timeout.c: Likewise.
6553 * normal/context.c: Likewise.
6555 2006-05-07 Vesa Jaaskelainen <chaac@nic.fi>
6557 * kern/i386/pc/startup.S (grub_exit): Added missing .code32 tag.
6559 2006-05-02 Yoshinori K. Okuji <okuji@enbug.org>
6561 * kern/env.c (struct grub_env_context): Removed "sorted". Renamed
6562 "next" to "prev" for readability.
6563 (struct grub_env_sorted_var): New struct.
6564 (grub_env_context): Renamed to ...
6565 (initial_context): ... this.
6566 (grub_env_var_context): Renamed to ...
6567 (current_context): ... this.
6568 (grub_env_find): Look only at CURRENT_CONTEXT.
6569 (grub_env_context_open): Rewritten to copy exported variables from
6571 (grub_env_context_close): Rewritten according to the new
6572 scheme. Also, add an assertion to prevent the initial context from
6574 (grub_env_insert): Removed the code for the sorted list.
6575 (grub_env_remove): Likewise.
6576 (grub_env_export): Simply mark the variable with
6577 GRUB_ENV_VAR_GLOBAL.
6578 (grub_env_set): A cosmetic change for naming consistency.
6579 (grub_env_get): Likewise.
6580 (grub_env_unset): Likewise.
6581 (grub_env_iterate): Rewritten to sort variables within this
6583 (grub_register_variable_hook): Fixed for naming consistency. Call
6584 grub_env_find again, only if NAME is not found at the first time.
6585 (mangle_data_slot_name): New function.
6586 (grub_env_set_data_slot): Likewise.
6587 (grub_env_get_data_slot): Likewise.
6588 (grub_env_unset_data_slot): Likewise.
6590 * include/grub/env.h (grub_env_var_type): New enum.
6591 (GRUB_ENV_VAR_LOCAL): New constant.
6592 (GRUB_ENV_VAR_GLOBAL): Likewise.
6593 (GRUB_ENV_VAR_DATA): Likewise.
6594 (struct grub_env_var): Removed "sort_next" and "sort_prevp". Added
6596 (grub_env_set): Replace VAR with NAME for consistency.
6597 (grub_register_variable_hook): Likewise.
6598 (grub_env_export): Specify the name of the argument.
6599 (grub_env_set_data_slot): New prototype.
6600 (grub_env_get_data_slot): Likewise.
6601 (grub_env_unset_data_slot): Likewise.
6603 2006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
6605 Extend the loader so that GRUB can accept a loader which comes
6606 back to GRUB when a loaded image exits. Also, this change adds
6607 support for a chainloader on EFI.
6609 * term/efi/console.c: Include grub/misc.h.
6610 (grub_console_checkkey): Display a scan code on the top for
6611 debugging. This will be removed once the EFI port gets stable.
6612 Correct the scan code mapping.
6614 * kern/efi/mm.c (sort_memory_map): Sort in a descending order to
6615 allocate memory from larger regions, in order to reduce the number
6616 of allocated regions. Otherwise, the MacOSX loader panics.
6617 (filter_memory_map): Avoid less than 1MB for compatibility with
6619 (add_memory_regions): Allocate from the tail of a region, if
6620 possible, to avoid allocating a region near to 1MB, for the MacOSX
6623 * kern/efi/init.c (grub_efi_set_prefix): Specify
6624 GRUB_EFI_IMAGE_HANDLE to grub_efi_get_loaded_image.
6626 * kern/efi/efi.c (grub_efi_get_loaded_image): Accept a new
6627 argument IMAGE_HANDLE and specify it to get a loaded image.
6628 (grub_arch_modules_addr): Specify GRUB_EFI_IMAGE_HANDLE to
6629 grub_efi_get_loaded_image.
6630 (grub_efi_get_filename): Divide the length by the size of
6632 (grub_efi_get_device_path): New function.
6633 (grub_efi_print_device_path): Print End Device Path nodes. Divide
6634 the length by the size of grub_efi_char16_t for a file path device
6637 * kern/loader.c (grub_loader_noreturn): New variable.
6638 (grub_loader_set): Accept a new argument NORETURN. Set
6639 GRUB_LOADER_NORETURN to NORETURN.
6640 All callers changed.
6641 (grub_loader_boot): If GRUB_LOADER_NORETURN is false, do not call
6644 * include/grub/efi/efi.h (grub_efi_get_device_path): New
6646 (grub_efi_get_loaded_image): Take an argument to specify an image
6649 * include/grub/loader.h (grub_loader_set): Added one more argument
6652 * disk/efi/efidisk.c (make_devices): Use grub_efi_get_device_path
6653 instead of grub_efi_open_protocol.
6654 (grub_efidisk_get_device_name): Likewise.
6655 (grub_efidisk_close): Print a newline.
6656 (grub_efidisk_get_device_handle): Fixed to use
6657 GRUB_EFI_DEVICE_PATH_SUBTYPE instead of
6658 GRUB_EFI_DEVICE_PATH_TYPE.
6660 * disk/efi/efidisk.c (device_path_guid): Moved to ...
6661 * kern/efi/efi.c (device_path_guid): ... here.
6663 * conf/i386-efi.rmk (pkgdata_MODULES): Added _chain.mod and
6665 (kernel_mod_HEADERS): Added efi/disk.h.
6666 (_chain_mod_SOURCES): New variable.
6667 (_chain_mod_CFLAGS): Likewise.
6668 (_chain_mod_LDFLAGS): Likewise.
6669 (chain_mod_SOURCES): Likewise.
6670 (chain_mod_CFLAGS): Likewise.
6671 (chain_mod_LDFLAGS): Likewise.
6673 * DISTLIST: Added include/grub/efi/chainloader.h,
6674 loader/efi/chainloader.c and loader/efi/chainloader_normal.c.
6676 * include/grub/efi/chainloader.h: New file.
6677 * loader/efi/chainloader.c: Likewise.
6678 * loader/efi/chainloader_normal.c: Likewise.
6680 2006-04-30 Marco Gerards <marco@gnu.org>
6682 * commands/configfile.c (grub_cmd_source): New function.
6683 (GRUB_MOD_INIT): Register the commands `source' and `.'.
6684 (GRUB_MOD_FINI): De-register the commands `source' and `.'.
6686 2006-04-30 Marco Gerards <marco@gnu.org>
6688 * normal/execute.c (grub_script_execute_cmd): Change the return
6689 type to `grub_err_t'. Correctly return the error.
6690 (grub_script_execute_cmdline): In case a command line is not a
6691 command or a function, try to interpret it as an assignment.
6693 2006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
6695 * fs/hfsplus.c (grub_hfsplus_read_block): Fixed a memory leak.
6696 (grub_hfsplus_iterate_dir): Reordered to skip unknown nodes. Also,
6697 skip a node whose name is obviously invalid as UTF-16,
6698 i.e. contains a NUL character. Stop the iteration when the last
6699 directory entry is found. Instead of using the return value of
6700 grub_hfsplus_btree_iterate_node, store the value in RET and use
6701 it, because the iterator can be stopped by the last directory
6704 2006-04-30 Marco Gerards <marco@gnu.org>
6706 * include/grub/env.h (grub_env_export): New prototype. Reported
6707 by Jan C. Kleinsorge <jan.kleinsorge@udo.edu>.
6709 2006-04-30 Marco Gerards <marco@gnu.org>
6711 * fs/hfsplus.c (grub_hfsplus_iterate_dir): Correctly calculate the
6712 size of the extents in a catalog file record.
6714 2006-04-29 Marco Gerards <marco@gnu.org>
6716 * commands/configfile.c (grub_cmd_configfile): Execute the
6717 configfile within its own context.
6719 * include/grub/env.h (grub_env_context_open): New prototype.
6720 (grub_env_context_close): Likewise.
6722 * kern/env.c (grub_env): Removed.
6723 (grub_env_sorted): Likewise.
6724 (grub_env_context): New variable.
6725 (grub_env_var_context): Likewise.
6726 (grub_env_find): Search both the active context and the global
6728 (grub_env_context_open): New function.
6729 (grub_env_context_close): Likewise.
6730 (grub_env_insert): Likewise.
6731 (grub_env_remove): Likewise.
6732 (grub_env_export): Likewise.
6733 (grub_env_set): Changed to use helper functions to avoid code
6735 (grub_env_iterate): Rewritten so both the current context and the
6736 global context are being used.
6738 * normal/command.c (export_command): New function.
6739 (grub_command_init): Register the `export' function.
6741 2006-04-26 Yoshinori K. Okuji <okuji@enbug.org>
6743 * util/i386/pc/grub-mkimage.c (compress_kernel): Cast arguments
6744 explicitly to suppress gcc's warnings.
6745 * fs/fat.c (grub_fat_find_dir): Likewise.
6746 (grub_fat_label): Likewise.
6747 * fs/xfs.c (grub_xfs_read_inode): Likewise.
6748 (grub_xfs_mount): Likewise.
6749 (grub_xfs_label): Likewise.
6750 * fs/affs.c (grub_affs_mount): Likewise.
6751 (grub_affs_label): Likewise.
6752 (grub_affs_iterate_dir): Likewise.
6753 * fs/sfs.c (grub_sfs_mount): Likewise.
6754 (grub_sfs_iterate_dir): Likewise.
6755 * fs/ufs.c (grub_ufs_lookup_symlink): Likewise.
6756 * fs/hfs.c (grub_hfs_mount): Likewise.
6757 (grub_hfs_cmp_catkeys): Likewise.
6758 (grub_hfs_find_dir): Likewise.
6759 (grub_hfs_dir): Likewise.
6760 (grub_hfs_label): Likewise.
6761 * fs/jfs.c (grub_jfs_mount): Likewise.
6762 (grub_jfs_opendir): Likewise.
6763 (grub_jfs_getent): Likewise.
6764 (grub_jfs_lookup_symlink): Likewise.
6765 (grub_jfs_label): Likewise.
6766 * fs/hfsplus.c (grub_hfsplus_cmp_catkey): Likewise.
6767 (grub_hfsplus_iterate_dir): Likewise.
6768 (grub_hfsplus_btree_iterate_node): Made static.
6770 * util/grub-emu.c (prefix): New variable.
6771 (grub_machine_set_prefix): New function.
6772 (main): Do not set the environment variable "prefix" here. Only
6773 set PREFIX, which is used later by grub_machine_set_prefix.
6775 * include/grub/video.h: Do not include grub/symbol.h.
6776 (grub_video_register): Not exported. This symbol is not defined in
6778 (grub_video_unregister): Likewise.
6779 (grub_video_iterate): Likewise.
6780 (grub_video_setup): Likewise.
6781 (grub_video_restore): Likewise.
6782 (grub_video_get_info): Likewise.
6783 (grub_video_get_blit_format): Likewise.
6784 (grub_video_set_palette): Likewise.
6785 (grub_video_get_palette): Likewise.
6786 (grub_video_set_viewport): Likewise.
6787 (grub_video_get_viewport): Likewise.
6788 (grub_video_map_color): Likewise.
6789 (grub_video_map_rgb): Likewise.
6790 (grub_video_map_rgba): Likewise.
6791 (grub_video_fill_rect): Likewise.
6792 (grub_video_blit_glyph): Likewise.
6793 (grub_video_blit_bitmap): Likewise.
6794 (grub_video_blit_render_target): Likewise.
6795 (grub_video_scroll): Likewise.
6796 (grub_video_swap_buffers): Likewise.
6797 (grub_video_create_render_target): Likewise.
6798 (grub_video_delete_render_target): Likewise.
6799 (grub_video_set_active_render_target): Likewise.
6801 * include/grub/symbol.h [GRUB_SYMBOL_GENERATOR] (EXPORT_FUNC):
6803 [GRUB_SYMBOL_GENERATOR] (EXPORT_VAR): Likewise.
6805 * conf/sparc64-ieee1275.rmk (grubof_symlist.c): Depended on
6806 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
6807 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
6808 instead of $(srcdir)/genkernsyms.sh.
6810 * conf/powerpc-ieee1275.rmk (grubof_symlist.c): Depended on
6811 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
6812 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
6813 instead of $(srcdir)/genkernsyms.sh.
6815 * conf/i386-pc.rmk (symlist.c): Depended on config.h. Use
6816 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
6817 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
6818 instead of $(srcdir)/genkernsyms.sh.
6820 * conf/i386-efi.rmk (symlist.c): Depended on config.h. Use
6821 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
6822 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
6823 instead of $(srcdir)/genkernsyms.sh.
6825 * configure.ac (AC_CONFIG_FILES): Added gensymlist.sh and
6828 * Makefile.in (DISTCLEANFILES): Added gensymlist.sh and
6830 (gensymlist.sh): New target.
6831 (genkernsyms.sh): Likewise.
6833 * DISTLIST: Removed genkernsyms.sh and gensymlist.sh. Added
6834 genkernsyms.sh.in and gensymlist.sh.in.
6836 * genkernsyms.sh: Removed.
6837 * gensymlist.sh: Likewise.
6839 * genkernsyms.sh.in: New file.
6840 * gensymlist.sh.in: Likewise.
6842 2006-04-25 Hollis Blanchard <hollis@penguinppc.org>
6844 * kern/powerpc/ieee1275/init.c (grub_machine_set_prefix): Do not
6845 clobber "prefix", since we may have already set it manually.
6847 2006-04-25 Hollis Blanchard <hollis@penguinppc.org>
6849 * kern/misc.c (abort): New alias for grub_abort.
6851 2006-04-25 Yoshinori K. Okuji <okuji@enbug.org>
6853 A new machine-specific function "grub_machine_set_prefix" is
6854 defined. This is called after loading modules, so that a prefix
6855 initialization can use modules. Also, this change adds an
6856 intensive debugging feature for the memory manager via the
6857 configure option "--enable-mm-debug".
6859 * partmap/gpt.c (gpt_partition_map_iterate): Add one more into
6862 * kern/sparc64/ieee1275/init.c (abort): Removed.
6863 (grub_stop): Likewise.
6864 (grub_exit): New function.
6865 (grub_set_prefix): Renamed to ...
6866 (grub_machine_set_prefix): ... this.
6867 (grub_machine_init): Do not call grub_set_prefix.
6869 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Renamed to ...
6870 (grub_machine_set_prefix): ... this.
6871 (grub_machine_init): Do not call grub_set_prefix.
6873 * kern/i386/pc/init.c (grub_machine_set_prefix): New function.
6874 (grub_machine_init): Do not set the prefix here.
6876 * kern/i386/efi/init.c (grub_machine_set_prefix): New function.
6878 * kern/efi/init.c: Include grub/mm.h.
6879 (grub_efi_set_prefix): New function.
6881 * kern/efi/efi.c (grub_exit): Call grub_efi_fini.
6882 (grub_efi_get_filename): New function.
6883 (grub_print_device_path): Renamed to ...
6884 (grub_efi_print_device_path): ... this.
6886 * kern/mm.c [MM_DEBUG] (grub_malloc): Undefined.
6887 [MM_DEBUG] (grub_realloc): Likewise.
6888 [MM_DEBUG] (grub_free): Likewise.
6889 [MM_DEBUG] (grub_memalign): Likewise.
6890 [MM_DEBUG] (grub_mm_debug): New variable.
6891 [MM_DEBUG] (grub_debug_malloc): New function.
6892 [MM_DEBUG] (grub_debug_free): New function.
6893 [MM_DEBUG] (grub_debug_realloc): New function.
6894 [MM_DEBUG] (grub_debug_memalign): New function.
6896 * kern/misc.c (grub_abort): Print a newline to distinguish
6899 * kern/main.c (grub_main): Call grub_machine_set_prefix and
6900 grub_set_root_dev after loading modules. This is necessary when
6901 setting a prefix depends on modules.
6903 * include/grub/efi/efi.h (grub_print_device_path): Renamed to ...
6904 (grub_efi_print_device_path): ... this.
6905 (grub_efi_get_filename): New prototype.
6906 (grub_efi_set_prefix): Likewise.
6908 * include/grub/efi/disk.h: Include grub/efi/api.h, grub/symbol.h
6910 (grub_efidisk_get_device_handle): New prototype.
6911 (grub_efidisk_get_device_name): Likewise.
6913 * include/grub/mm.h: Include config.h.
6914 (MM_DEBUG): Removed.
6915 [MM_DEBUG && !GRUB_UTIL] (grub_mm_debug): New prototype.
6916 [MM_DEBUG && !GRUB_UTIL] (grub_malloc): New macro.
6917 [MM_DEBUG && !GRUB_UTIL] (grub_realloc): Likewise.
6918 [MM_DEBUG && !GRUB_UTIL] (grub_memalign): Likewise.
6919 [MM_DEBUG && !GRUB_UTIL] (grub_free): Likewise.
6920 [MM_DEBUG && !GRUB_UTIL] (grub_debug_malloc): New prototype.
6921 [MM_DEBUG && !GRUB_UTIL] (grub_debug_realloc): New prototype.
6922 [MM_DEBUG && !GRUB_UTIL] (grub_debug_memalign): New prototype.
6923 [MM_DEBUG && !GRUB_UTIL] (grub_debug_free): New prototype.
6925 * include/grub/kernel.h (grub_machine_set_prefix): New prototype.
6927 * disk/efi/efidisk.c: Include grub/partition.h.
6928 (iterate_child_devices): New function.
6929 (add_device): First, compare only last device path nodes, so that
6930 devices are sorted by the types.
6931 (grub_efidisk_get_device_handle): New function.
6932 (grub_efidisk_get_device_name): Likewise.
6934 * configure.ac (--enable-mm-debug): New option to enable the
6935 memory manager debugging feature. This makes the binary much
6936 bigger, so is disabled by default.
6938 2006-04-23 Yoshinori K. Okuji <okuji@enbug.org>
6940 Use grub_abort instead of grub_stop, and grub_exit must be
6941 define in each architecture now. Also, this change adds support
6944 * util/i386/pc/grub-probefs.c: Include grub/term.h.
6945 (grub_getkey): New function.
6946 (grub_term_get_current): Likewise.
6948 * util/i386/pc/grub-setup.c: Include grub/term.h.
6949 (grub_getkey): New function.
6950 (grub_term_get_current): Likewise.
6952 * util/misc.c (grub_stop): Renamed to ...
6953 (grub_exit): ... this.
6955 * kern/powerpc/ieee1275/init.c (abort): Renamed to ...
6956 (grub_exit): ... this.
6957 (grub_machine_init): Use grub_abort instead of abort.
6958 (grub_stop): Removed.
6960 * kern/powerpc/ieee1275/cmain.c (cmain): Use grub_abort instead of
6963 * kern/i386/pc/startup.S (grub_exit): New function.
6964 (cold_reboot): New label.
6966 * kern/efi/init.c: Include grub/efi/disk.h and grub/env.h.
6967 (grub_efi_init): Call grub_efidisk_init.
6968 (grub_efi_fini): Call grub_efidisk_fini.
6970 * kern/efi/efi.c: Include grub/mm.h.
6971 (grub_efi_console_control_guid): Renamed to ...
6972 (console_control_guid): ... this.
6973 (grub_efi_loaded_image_guid): Renamed to ...
6974 (loaded_image_guid): ... this.
6975 (grub_efi_locate_handle): New function.
6976 (grub_efi_open_protocol): Likewise.
6977 (grub_efi_set_text_mode): Use CONSOLE_CONTROL_GUID instead of
6978 GRUB_EFI_CONSOLE_CONTROL_GUID.
6979 (grub_efi_exit): Removed.
6980 (grub_stop): Likewise.
6981 (grub_efi_get_loaded_image): Use grub_efi_open_protocol.
6982 (grub_exit): New function.
6983 (grub_print_device_path): Likewise.
6985 * kern/rescue.c (grub_rescue_cmd_exit): New function.
6986 (grub_enter_rescue_mode): Register "exit".
6988 * kern/misc.c (grub_real_dprintf): A cosmetic change.
6989 (grub_abort): New function.
6991 * kern/err.c (grub_fatal): Use grub_abort instead of grub_stop.
6993 * include/grub/sparc64/ieee1275/kernel.h (abort): Removed.
6995 * include/grub/powerpc/ieee1275/kernel.h (abort): Removed.
6997 * include/grub/efi/efi.h (grub_efi_exit): Removed.
6998 (grub_print_device_path): New prototype.
6999 (grub_efi_locate_handle): Likewise.
7000 (grub_efi_open_protocol): Likewise.
7002 * include/grub/efi/disk.h (grub_efidisk_fini): New file.
7003 * disk/efi/efidisk.c: Likewise.
7005 * DISTLIST: Added disk/efi/efidisk.c and include/grub/efi/disk.h.
7007 * include/grub/efi/console_control.h
7008 (GRUB_EFI_CONSOLE_CONTROL_GUID): Use an array for the last 8 bytes.
7010 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): Specify the
7011 last 8 bytes as an array.
7012 (GRUB_EFI_DISK_IO_GUID): New macro.
7013 (GRUB_EFI_BLOCK_IO_GUID): Likewise.
7014 (GRUB_EFI_DEVICE_PATH_GUID): Likewise.
7015 (grub_efi_ipv6_address_t): Change the type to grub_uint16_t from
7017 (struct grub_efi_guid): Use an array to specify the last 8 bytes.
7018 (struct grub_efi_device_path): Rename the member "sub_type" to
7020 (GRUB_EFI_DEVICE_PATH_TYPE): New macro.
7021 (GRUB_EFI_DEVICE_PATH_SUBTYPE): Likewise.
7022 (GRUB_EFI_DEVICE_PATH_LENGTH): Likewise.
7023 (GRUB_EFI_END_DEVICE_PATH_TYPE): Likewise.
7024 (GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE): Likewise.
7025 (GRUB_EFI_END_THIS_DEVICE_PATH_SUBTYPE): Likewise.
7026 (GRUB_EFI_END_ENTIRE_DEVICE_PATH): Likewise.
7027 (GRUB_EFI_NEXT_DEVICE_PATH): Likewise.
7028 (GRUB_EFI_HARDWARE_DEVICE_PATH_TYPE): Likewise.
7029 (GRUB_EFI_PCI_DEVICE_PATH_SUBTYPE): Likewise.
7030 (struct grub_efi_pci_device_path): New structure.
7031 (grub_efi_pci_device_path_t): New type.
7032 (GRUB_EFI_PCCARD_DEVICE_PATH_SUBTYPE): New macro.
7033 (struct grub_efi_pccard_device_path): New structure.
7034 (grub_efi_pccard_device_path_t): New type.
7035 (GRUB_EFI_MEMORY_MAPPED_DEVICE_PATH_SUBTYPE): New macro.
7036 (struct grub_efi_memory_mapped_device_path): New structure.
7037 (grub_efi_memory_mapped_device_path_t): New type.
7038 (GRUB_EFI_VENDOR_DEVICE_PATH_SUBTYPE): New macro.
7039 (struct grub_efi_vendor_device_path): New structure.
7040 (grub_efi_vendor_device_path_t): New type.
7041 (GRUB_EFI_CONTROLLER_DEVICE_PATH_SUBTYPE): New macro.
7042 (struct grub_efi_controller_device_path): New structure.
7043 (grub_efi_controller_device_path_t): New type.
7044 (GRUB_EFI_ACPI_DEVICE_PATH_TYPE): New macro.
7045 (GRUB_EFI_ACPI_DEVICE_PATH_SUBTYPE): Likewise.
7046 (struct grub_efi_acpi_device_path): New structure.
7047 (grub_efi_acpi_device_path_t): New type.
7048 (GRUB_EFI_EXPANDED_ACPI_DEVICE_PATH_SUBTYPE): New macro.
7049 (struct grub_efi_expanded_acpi_device_path): New structure.
7050 (grub_efi_expanded_acpi_device_path_t): New type.
7051 (GRUB_EFI_EXPANDED_ACPI_HIDSTR): New macro.
7052 (GRUB_EFI_EXPANDED_ACPI_UIDSTR): Likewise.
7053 (GRUB_EFI_EXPANDED_ACPI_CIDSTR): Likewise.
7054 (GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE): Likewise.
7055 (GRUB_EFI_ATAPI_DEVICE_PATH_SUBTYPE): Likewise.
7056 (struct grub_efi_atapi_device_path): New structure.
7057 (grub_efi_atapi_device_path_t): New type.
7058 (GRUB_EFI_FIBRE_CHANNEL_DEVICE_PATH_SUBTYPE): New macro.
7059 (struct grub_efi_fibre_channel_device_path): New structure.
7060 (grub_efi_fibre_channel_device_path_t): New type.
7061 (GRUB_EFI_1394_DEVICE_PATH_SUBTYPE): New macro.
7062 (struct grub_efi_1394_device_path): New structure.
7063 (grub_efi_1394_device_path_t): New type.
7064 (GRUB_EFI_USB_DEVICE_PATH_SUBTYPE): New macro.
7065 (struct grub_efi_usb_device_path): New structure.
7066 (grub_efi_usb_device_path_t): New type.
7067 (GRUB_EFI_USB_CLASS_DEVICE_PATH_SUBTYPE): New macro.
7068 (struct grub_efi_usb_class_device_path): New structure.
7069 (grub_efi_usb_class_device_path_t): New type.
7070 (GRUB_EFI_I2O_DEVICE_PATH_SUBTYPE): New macro.
7071 (struct grub_efi_i2o_device_path): New structure.
7072 (grub_efi_i2o_device_path_t): New type.
7073 (GRUB_EFI_MAC_ADDRESS_DEVICE_PATH_SUBTYPE): New macro.
7074 (struct grub_efi_mac_address_device_path): New structure.
7075 (grub_efi_mac_address_device_path_t): New type.
7076 (GRUB_EFI_IPV4_DEVICE_PATH_SUBTYPE): New macro.
7077 (struct grub_efi_ipv4_device_path): New structure.
7078 (grub_efi_ipv4_device_path_t): New type.
7079 (GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE): New macro.
7080 (struct grub_efi_ipv6_device_path): New structure.
7081 (grub_efi_ipv6_device_path_t): New type.
7082 (GRUB_EFI_INFINIBAND_DEVICE_PATH_SUBTYPE): New macro.
7083 (struct grub_efi_infiniband_device_path): New structure.
7084 (grub_efi_infiniband_device_path_t): New type.
7085 (GRUB_EFI_UART_DEVICE_PATH_SUBTYPE): New macro.
7086 (struct grub_efi_uart_device_path): New structure.
7087 (grub_efi_uart_device_path_t): New type.
7088 (GRUB_EFI_VENDOR_MESSAGING_DEVICE_PATH_SUBTYPE): New macro.
7089 (struct grub_efi_vendor_messaging_device_path): New structure.
7090 (grub_efi_vendor_messaging_device_path_t): New type.
7091 (GRUB_EFI_MEDIA_DEVICE_PATH_TYPE): New macro.
7092 (GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE): Likewise.
7093 (struct grub_efi_hard_drive_device_path): New structure.
7094 (grub_efi_hard_drive_device_path_t): New type.
7095 (GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE): New macro.
7096 (struct grub_efi_cdrom_device_path): New structure.
7097 (grub_efi_cdrom_device_path_t): New type.
7098 (GRUB_EFI_VENDOR_MEDIA_DEVICE_PATH_SUBTYPE): New macro.
7099 (struct grub_efi_vendor_media_device_path): New structure.
7100 (grub_efi_vendor_media_device_path_t): New type.
7101 (GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE): New macro.
7102 (struct grub_efi_file_path_device_path): New structure.
7103 (grub_efi_file_path_device_path_t): New type.
7104 (GRUB_EFI_PROTOCOL_DEVICE_PATH_SUBTYPE): New macro.
7105 (struct grub_efi_protocol_device_path): New structure.
7106 (grub_efi_protocol_device_path_t): New type.
7107 (GRUB_EFI_BIOS_DEVICE_PATH_TYPE): New macro.
7108 (GRUB_EFI_BIOS_DEVICE_PATH_SUBTYPE): Likewise.
7109 (struct grub_efi_bios_device_path): New structure.
7110 (grub_efi_bios_device_path_t): New type.
7111 (struct grub_efi_disk_io): New structure.
7112 (grub_efi_disk_io_t): New type.
7113 (struct grub_efi_block_io_media): New structure.
7114 (grub_efi_block_io_media_t): New type.
7115 (struct grub_efi_block_io): New structure.
7116 (grub_efi_block_io_t): New type.
7118 * include/grub/misc.h (grub_stop): Removed.
7119 (grub_exit): New prototype.
7120 (grub_abort): Likewise.
7122 * include/grub/disk.h (enum grub_disk_dev_id): Added
7123 GRUB_DISK_DEVICE_EFIDISK_ID.
7125 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added
7127 (kernel_syms.lst): Remove the target if an error occurs.
7129 2006-04-22 Yoshinori K. Okuji <okuji@enbug.org>
7131 * kern/misc.c (grub_lltoa): Rewritten the decimal conversion part,
7132 as it was simply too buggy.
7134 2006-04-21 Yoshinori K. Okuji <okuji@enbug.org>
7136 * kern/misc.c (grub_lltoa): New function.
7137 (grub_vsprintf): Added support for the long long suffix,
7140 2006-04-20 Hollis Blanchard <hollis@penguinppc.org>
7142 * Makefile.in (LDFLAGS): Add variable.
7143 (LD): Remove variable.
7144 * configure.ac: Add -m32 to LDFLAGS.
7145 * genmk.rb (PModule#rule): Use $(CC) instead of $(LD).
7146 * conf/powerpc-ieee1275.rmk (COMMON_LDFLAGS): Add variable.
7147 (grubof_LDFLAGS): Use $(COMMON_LDFLAGS).
7148 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS, normal_mod_LDFLAGS,
7149 suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS): New
7151 * conf/sparc64-ieee1275.rmk (COMMON_LDFLAGS): Add -nostdlib.
7152 * conf/i386-pc.rmk (COMMON_LDFLAGS): Add -nostdlib.
7153 * conf/i386-efi.rmk (COMMON_LDFLAGS): Add -nostdlib.
7155 2006-04-20 Vesa Jaaskelainen <chaac@nic.fi>
7157 * term/gfxterm.c (grub_gfxterm_getcharwidth): Fixed character
7158 length for unknown glyph.
7160 2006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
7162 Add support for pre-loaded modules into the EFI port.
7164 * util/i386/efi/grub-mkimage.c (make_mods_section): Rewritten
7165 completely. Accept one more argument DIR. The caller has changed.
7167 * kern/i386/efi/init.c (grub_arch_modules_addr): Removed.
7169 * kern/efi/efi.c: Include grub/efi/pe32.h and grub/kernel.h.
7170 (grub_efi_loaded_image_guid): New variable.
7171 (grub_efi_get_loaded_image): New function.
7172 (grub_arch_modules_addr): Likewise.
7174 * include/grub/efi/efi.h (grub_efi_get_loaded_image): New
7177 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): New macro.
7178 (struct grub_efi_loaded_image): New structure.
7179 (grub_efi_loaded_image_t): New type.
7181 2006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
7183 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Compare the file
7184 size with GRUB_OS_AREA_SIZE as grub_size_t instead of
7185 grub_ssize_t. Reported by Jeff Chua <jeff84@silk.corp.fedex.com>.
7187 2006-04-19 Roger Leigh <rleigh@whinlatter.ukfsn.org>
7189 * DISTLIST: Added `util/powerpc/ieee1275/grub-install.in'.
7191 2006-04-19 Yoshinori K. Okuji <okuji@enbug.org>
7193 * DISTLIST: Added include/grub/efi/console.h,
7194 include/grub/efi/time.h, include/grub/i386/efi/kernel.h,
7195 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
7197 * include/grub/efi/console.h: New file.
7198 * include/grub/efi/time.h: Likewise.
7199 * include/grub/i386/efi/kernel.h: Likewise.
7200 * kern/efi/init.c: Likewise.
7201 * kern/efi/mm.c: Likewise.
7202 * term/efi/console.c: Likewise.
7204 * kern/i386/efi/init.c: Do not include grub/machine/time.h.
7205 (grub_stop): Removed.
7206 (grub_get_rtc): Likewise.
7207 (grub_machine_init): Simply call grub_efi_init.
7208 (grub_machine_fini): Call grub_efi_fini.
7210 * kern/efi/efi.c: Include grub/machine/time.h and grub/term.h.
7211 (grub_efi_output_string): Removed.
7212 (grub_efi_stall): New function.
7213 (grub_stop): Likewise.
7214 (grub_get_rtc): Likewise.
7216 * include/grub/efi/efi.h (grub_efi_output_string): Removed.
7217 (grub_efi_stall): New prototype.
7218 (grub_efi_allocate_pages): Likewise.
7219 (grub_efi_free_pages): Likewise.
7220 (grub_efi_get_memory_map): Likewise.
7221 (grub_efi_mm_init): Likewise.
7222 (grub_efi_mm_fini): Likewise.
7223 (grub_efi_init): Likewise.
7224 (grub_efi_fini): Likewise.
7226 * include/grub/i386/efi/time.h: Do not include
7227 grub/symbol.h. Include grub/efi/time.h.
7228 (GRUB_TICKS_PER_SECOND): Removed.
7229 (grub_get_rtc): Likewise.
7231 * include/grub/efi/api.h (struct grub_efi_memory_descriptor):
7232 Added padding. The EFI spec is buggy.
7233 (GRUB_EFI_BLACK): New macro.
7234 (GRUB_EFI_BLUE): Likewise.
7235 (GRUB_EFI_GREEN): Likewise.
7236 (GRUB_EFI_CYAN): Likewise.
7237 (GRUB_EFI_RED): Likewise.
7238 (GRUB_EFI_MAGENTA): Likewise.
7239 (GRUB_EFI_BROWN): Likewise.
7240 (GRUB_EFI_LIGHTGRAY): Likewise.
7241 (GRUB_EFI_BRIGHT): Likewise.
7242 (GRUB_EFI_DARKGRAY): Likewise.
7243 (GRUB_EFI_LIGHTBLUE): Likewise.
7244 (GRUB_EFI_LIGHTGREEN): Likewise.
7245 (GRUB_EFI_LIGHTCYAN): Likewise.
7246 (GRUB_EFI_LIGHTRED): Likewise.
7247 (GRUB_EFI_LIGHTMAGENTA): Likewise.
7248 (GRUB_EFI_YELLOW): Likewise.
7249 (GRUB_EFI_WHITE): Likewise.
7250 (GRUB_EFI_BACKGROUND_BLACK): Likewise.
7251 (GRUB_EFI_BACKGROUND_BLUE): Likewise.
7252 (GRUB_EFI_BACKGROUND_GREEN): Likewise.
7253 (GRUB_EFI_BACKGROUND_CYAN): Likewise.
7254 (GRUB_EFI_BACKGROUND_RED): Likewise.
7255 (GRUB_EFI_BACKGROUND_MAGENTA): Likewise.
7256 (GRUB_EFI_BACKGROUND_BROWN): Likewise.
7257 (GRUB_EFI_BACKGROUND_LIGHTGRAY): Likewise.
7258 (GRUB_EFI_TEXT_ATTR): Likewise.
7260 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added kern/efi/efi.c,
7261 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
7262 (kernel_mod_HEADERS): Added efi/time.h.
7264 2006-04-18 Yoshinori K. Okuji <okuji@enbug.org>
7266 * DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
7267 include/grub/efi/api.h, include/grub/efi/console_control.h,
7268 include/grub/efi/efi.h, include/grub/efi/pe32.h,
7269 include/grub/i386/efi/time.h, kern/efi/efi.c,
7270 kern/i386/efi/init.c, kern/i386/efi/startup.S,
7271 and util/i386/efi/grub-mkimage.c.
7273 * Makefile.in (RMKFILES): Added i386-efi.rmk.
7275 * genmk.rb (PModule#rule): Do not export symbols if
7276 #{prefix}_EXPORTS is set to "no".
7278 * conf/i386-efi.mk: New file.
7279 * conf/i386-efi.rmk: Likewise.
7280 * include/grub/efi/api.h: Likewise.
7281 * include/grub/efi/console_control.h: Likewise.
7282 * include/grub/efi/efi.h: Likewise.
7283 * include/grub/efi/pe32.h: Likewise.
7284 * include/grub/i386/efi/time.h: Likewise.
7285 * kern/efi/efi.c: Likewise.
7286 * kern/i386/efi/init.c: Likewise.
7287 * kern/i386/efi/startup.S: Likewise.
7288 * util/i386/efi/grub-mkimage.c: Likewise.
7290 2006-04-17 Marco Gerards <marco@gnu.org>
7292 * include/grub/script.h: Include <grub/parser.h> and
7293 "grub_script.tab.h".
7294 (struct grub_lexer_param): New struct.
7295 (struct grub_parser_param): Likewise.
7296 (grub_script_create_arglist): Pass the state in an argument.
7297 (grub_script_add_arglist): Likewise.
7298 (grub_script_create_cmdline): Likewise.
7299 (grub_script_create_cmdblock): Likewise.
7300 (grub_script_create_cmdif): Likewise.
7301 (grub_script_create_cmdmenu): Likewise.
7302 (grub_script_add_cmd): Likewise.
7303 (grub_script_arg_add): Likewise.
7304 (grub_script_lexer_ref): Likewise.
7305 (grub_script_lexer_deref): Likewise.
7306 (grub_script_lexer_record_start): Likewise.
7307 (grub_script_lexer_record_stop): Likewise.
7308 (grub_script_mem_record): Likewise.
7309 (grub_script_mem_record_stop): Likewise.
7310 (grub_script_malloc): Likewise.
7311 (grub_script_yylex): Likewise.
7312 (grub_script_yyparse): Likewise.
7313 (grub_script_yyerror): Likewise.
7314 (grub_script_yylex): Likewise.
7315 (grub_script_lexer_init): Return the state.
7317 * normal/lexer.c (grub_script_lexer_state): Removed variable.
7318 (grub_script_lexer_done): Likewise.
7319 (grub_script_lexer_getline): Likewise.
7320 (grub_script_lexer_refs): Likewise.
7322 (newscript): Likewise.
7324 (recording): Likewise.
7325 (recordpos): Likewise.
7326 (recordlen): Likewise.
7327 (grub_script_lexer_init): Return the state instead of setting
7329 (grub_script_lexer_ref): Use the newly added argument for state
7331 (grub_script_lexer_deref): Likewise.
7332 (grub_script_lexer_record_start): Likewise.
7333 (grub_script_lexer_record_stop): Likewise.
7334 (recordchar): Likewise.
7335 (nextchar): Likewise.
7336 (grub_script_yylex2): Likewise.
7337 (grub_script_yylex): Likewise.
7338 (grub_script_yyerror): Likewise.
7340 * normal/parser.y (func_mem): Removed variable.
7341 (menu_entry): Likewise.
7343 (%lex-param): New parser option.
7344 (%parse-param): Likewise.
7345 (script): Always return the AST.
7346 (argument): Pass the state around.
7347 (arguments): Likewise.
7348 (grubcmd): Likewise.
7349 (commands): Likewise.
7350 (function): Likewise.
7351 (menuentry): Likewise.
7352 (if_statement): Likewise.
7355 * normal/script.c (grub_script_memused): Removed variable.
7356 (grub_script_parsed): Likewise.
7357 (grub_script_malloc): Added a state argument. Use that instead of
7359 (grub_script_mem_record): Likewise.
7360 (grub_script_mem_record_stop): Likewise.
7361 (grub_script_arg_add): Likewise.
7362 (grub_script_add_arglist): Likewise.
7363 (grub_script_create_cmdline): Likewise.
7364 (grub_script_create_cmdif): Likewise.
7365 (grub_script_create_cmdmenu): Likewise.
7366 (grub_script_add_cmd): Likewise.
7367 (grub_script_parse): Setup the state before calling the parser.
7369 2006-04-16 Marco Gerards <marco@gnu.org>
7371 * normal/command.c (grub_command_init): Remove the title command.
7373 * normal/lexer.c (grub_script_yylex): Renamed from this...
7374 (grub_script_yylex2): ... to this.
7375 (grub_script_yylex): New function. Temporary
7376 introduced to filter some tokens.
7377 (grub_script_yyerror): Print a newline.
7379 * normal/main.c (read_config_file): Output information about the
7380 lines that contain errors. Wait for a key after all lines have
7381 been processed. Don't return an empty menu.
7383 * normal/parser.y (func_mem): Don't initialize.
7384 (menu_entry): Likewise.
7385 (err): New variable.
7386 (script): Don't return anything when an error was encountered.
7387 (ws, returns): Removed rules.
7388 (argument): Disabled concatenated variable support.
7389 (arguments): Remove explicit separators.
7390 (grubcmd): Likewise.
7391 (function): Likewise.
7392 (menuentry): Likewise.
7394 (commands): Likewise. Add error handling.
7396 * normal/script.c (grub_script_create_cmdline): If
7397 `grub_script_parsed' is 0, assume the parser encountered an error.
7399 2006-04-02 Yoshinori K. Okuji <okuji@enbug.org>
7401 * configure.ac: Add support for EFI. Fix the typo
7402 BUILD_LDDFLAGS. Restore the LDFLAGS after testing.
7404 2006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
7406 * util/unifont2pff.rb: Removed unnecessary byte ordering. Now
7407 foreign multibyte characters should be shown correctly.
7409 2006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
7411 * normal/main.c (grub_normal_menu_addentry): Fixed menu size
7413 (read_config_file): Made it to close file before returning.
7415 2006-03-31 Vesa Jaaskelainen <chaac@nic.fi>
7417 * DISTLIST: Added include/grub/i386/pc/vbeblit.h,
7418 include/grub/i386/pc/vbefill.h, video/i386/pc/vbeblit.c,
7419 video/i386/pc/vbefill.c.
7421 * conf/i386-pc.rmk (vbe_mod_SOURCES): Added video/i386/pc/vbeblit.c,
7422 video/i386/pc/vbefill.c.
7424 * include/grub/video.h (grub_video_blit_format): New enum.
7425 (grub_video_mode_info): Added new member blit_format.
7426 (grub_video_get_blit_format): New function prototype.
7428 * include/grub/i386/pc/vbe.h (grub_video_vbe_get_video_ptr): New
7430 (grub_video_vbe_map_rgb): Likewise.
7431 (grub_video_vbe_unmap_color): Likewise.
7433 * include/grub/i386/pc/vbeblit.h: New file.
7435 * include/grub/i386/pc/vbefill.h: New file.
7437 * video/video.c (grub_video_get_blit_format): New function.
7438 (grub_video_vbe_get_video_ptr): Re-declared as non-static.
7439 (grub_video_vbe_map_rgb): Likewise.
7440 (grub_video_vbe_unmap_color): Likewise.
7442 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Changed to use more
7444 (grub_video_vbe_blit_render_target): Changed to use more optimized
7446 (grub_video_vbe_setup): Added detection for optimized settings.
7447 (grub_video_vbe_create_render_target): Likewise.
7449 * video/i386/pc/vbeblit.c: New file.
7451 * video/i386/pc/vbefill.c: New file.
7453 2006-03-30 Vesa Jaaskelainen <chaac@nic.fi>
7455 * font/manager.c (grub_font_get_glyph): Removed font fixup from
7458 * util/unifont2pff.rb: ... and moved it to here. Improved argument
7459 parsing to support both hex and dec ranges. If filename was missing
7460 show usage information.
7462 2006-03-14 Vesa Jaaskelainen <chaac@nic.fi>
7464 * DISTLIST: Added include/grub/video.h, term/gfxterm.c,
7465 video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c.
7467 * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod,
7468 gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod.
7469 (video_mod_SOURCES): Added.
7470 (video_mod_CFLAGS): Likewise.
7471 (video_mod_LDFLAGS): Likewise.
7472 (gfxterm_mod_SOURCES): Likewise.
7473 (gfxterm_mod_CFLAGS): Likewise.
7474 (gfxterm_mod_LDFLAGS): Likewise.
7475 (videotest_mod_SOURCES): Likewise.
7476 (videotest_mod_CFLAGS): Likewise.
7477 (videotest_mod_LDFLAGS): Likewise.
7478 (vesafb_mod_SOURCES): Removed.
7479 (vesafb_mod_CFLAGS): Likewise.
7480 (vesafb_mod_LDFLAGS): Likewise.
7481 (vga_mod_SOURCES): Likewise.
7482 (vga_mod_CFLAGS): Likewise.
7483 (vga_mod_LDFLAGS): Likewise.
7485 * commands/videotest.c: New file.
7487 * font/manager.c (fill_with_default_glyph): Modified to use
7489 (grub_font_get_glyph): Likewise.
7490 (fontmanager): Renamed from this...
7491 (font_manager): ... to this.
7493 * include/grub/font.h (grub_font_glyph): Added new structure.
7494 (grub_font_get_glyph): Modified to use grub_font_glyph.
7496 * include/grub/misc.h (grub_abs): Added as inline function.
7498 * include/grub/video.h: New file.
7500 * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro.
7501 (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise.
7502 (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise.
7503 (grub_vbe_get_controller_info): Renamed from this...
7504 (grub_vbe_bios_get_controller_info): ... to this.
7505 (grub_vbe_get_mode_info): Renamed from this...
7506 (grub_vbe_bios_get_mode_info): ... to this.
7507 (grub_vbe_set_mode): Renamed from this...
7508 (grub_vbe_bios_set_mode): ... to this.
7509 (grub_vbe_get_mode): Renamed from this...
7510 (grub_vbe_bios_get_mode): ... to this.
7511 (grub_vbe_set_memory_window): Renamed from this...
7512 (grub_vbe_bios_set_memory_window): ... to this.
7513 (grub_vbe_get_memory_window): Renamed from this...
7514 (grub_vbe_bios_get_memory_window): ... to this.
7515 (grub_vbe_set_scanline_length): Renamed from this...
7516 (grub_vbe_set_scanline_length): ... to this.
7517 (grub_vbe_get_scanline_length): Renamed from this...
7518 (grub_vbe_bios_get_scanline_length): ... to this.
7519 (grub_vbe_set_display_start): Renamed from this...
7520 (grub_vbe_bios_set_display_start): ... to this.
7521 (grub_vbe_get_display_start): Renamed from this...
7522 (grub_vbe_bios_get_display_start): ... to this.
7523 (grub_vbe_set_palette_data): Renamed from this...
7524 (grub_vbe_bios_set_palette_data): ... to this.
7525 (grub_vbe_set_pixel_rgb): Removed.
7526 (grub_vbe_set_pixel_index): Likewise.
7528 * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed
7530 (grub_vbe_bios_get_controller_info): ... to this.
7531 (grub_vbe_get_mode_info): Renamed from this...
7532 (grub_vbe_bios_get_mode_info): ... to this.
7533 (grub_vbe_set_mode): Renamed from this...
7534 (grub_vbe_bios_set_mode): ... to this.
7535 (grub_vbe_get_mode): Renamed from this...
7536 (grub_vbe_bios_get_mode): ... to this.
7537 (grub_vbe_set_memory_window): Renamed from this...
7538 (grub_vbe_bios_set_memory_window): ... to this.
7539 (grub_vbe_get_memory_window): Renamed from this...
7540 (grub_vbe_bios_get_memory_window): ... to this.
7541 (grub_vbe_set_scanline_length): Renamed from this...
7542 (grub_vbe_set_scanline_length): ... to this.
7543 (grub_vbe_get_scanline_length): Renamed from this...
7544 (grub_vbe_bios_get_scanline_length): ... to this.
7545 (grub_vbe_set_display_start): Renamed from this...
7546 (grub_vbe_bios_set_display_start): ... to this.
7547 (grub_vbe_get_display_start): Renamed from this...
7548 (grub_vbe_bios_get_display_start): ... to this.
7549 (grub_vbe_set_palette_data): Renamed from this...
7550 (grub_vbe_bios_set_palette_data): ... to this.
7551 (grub_vbe_bios_get_controller_info): Fixed problem with registers
7552 getting corrupted after calling it. Added more pushes and pops.
7553 (grub_vbe_bios_set_mode): Likewise.
7554 (grub_vbe_bios_get_mode): Likewise.
7555 (grub_vbe_bios_get_memory_window): Likewise.
7556 (grub_vbe_bios_set_scanline_length): Likewise.
7557 (grub_vbe_bios_get_scanline_length): Likewise.
7558 (grub_vbe_bios_get_display_start): Likewise.
7559 (grub_vbe_bios_set_palette_data): Likewise.
7561 * normal/cmdline.c (cl_set_pos): Refresh the screen.
7562 (cl_insert): Likewise.
7563 (cl_delete): Likewise.
7565 * term/gfxterm.c: New file.
7567 * term/i386/pc/vesafb.c: Removed file.
7569 * video/video.c: New file.
7571 * video/i386/pc/vbe.c (real2pm): Added new function.
7572 (grub_video_vbe_draw_pixel): Likewise.
7573 (grub_video_vbe_get_video_ptr): Likewise.
7574 (grub_video_vbe_get_pixel): Likewise
7575 (grub_video_vbe_init): Likewise.
7576 (grub_video_vbe_fini): Likewise.
7577 (grub_video_vbe_setup): Likewise.
7578 (grub_video_vbe_get_info): Likewise.
7579 (grub_video_vbe_set_palette): Likewise.
7580 (grub_video_vbe_get_palette): Likewise.
7581 (grub_video_vbe_set_viewport): Likewise.
7582 (grub_video_vbe_get_viewport): Likewise.
7583 (grub_video_vbe_map_color): Likewise.
7584 (grub_video_vbe_map_rgb): Likewise.
7585 (grub_video_vbe_map_rgba): Likewise.
7586 (grub_video_vbe_unmap_color): Likewise.
7587 (grub_video_vbe_fill_rect): Likewise.
7588 (grub_video_vbe_blit_glyph): Likewise.
7589 (grub_video_vbe_blit_bitmap): Likewise.
7590 (grub_video_vbe_blit_render_target): Likewise.
7591 (grub_video_vbe_scroll): Likewise.
7592 (grub_video_vbe_swap_buffers): Likewise.
7593 (grub_video_vbe_create_render_target): Likewise.
7594 (grub_video_vbe_delete_render_target): Likewise.
7595 (grub_video_vbe_set_active_render_target): Likewise.
7596 (grub_vbe_set_pixel_rgb): Remove function.
7597 (grub_vbe_set_pixel_index): Likewise.
7598 (index_color_mode): Remove static variable.
7599 (active_mode): Likewise.
7600 (framebuffer): Likewise.
7601 (bytes_per_scan_line): Likewise.
7602 (grub_video_vbe_adapter): Added new static variable.
7603 (framebuffer): Likewise.
7604 (render_target): Likewise.
7605 (initial_mode): Likewise.
7606 (mode_in_use): Likewise.
7607 (mode_list): Likewise.
7609 2006-03-10 Marco Gerards <marco@gnu.org>
7611 * configure.ac (AC_INIT): Bumped to 1.93.
7613 * DISTLIST: Added `include/grub/hfs.h'.
7615 2006-02-01 Yoshinori K. Okuji <okuji@enbug.org>
7617 * boot/i386/pc/boot.S (general_error): Before looping, try INT
7618 18H, which might help the BIOS falling back to next boot media.
7620 2006-01-25 Yoshinori K. Okuji <okuji@enbug.org>
7622 * util/i386/pc/grub-install.in: Escape a backslash. Reported by
7623 Poe Chen <poe.poechen@gmail.com>.
7625 2006-01-17 Marco Gerards <marco@gnu.org>
7627 * include/grub/normal.h: Include <grub/script.h>.
7628 (grub_command_list): Removed struct.
7629 (grub_command_list_t): Removed type.
7630 (grub_menu_entry): Remove members `num' and `command_list'. Add
7631 members `commands' and `sourcecode'.
7632 * include/grub/script.h: Add inclusion guards.
7633 (grub_script_cmd_menuentry): New struct.
7634 (grub_script_execute_menuentry): New prototype.
7635 (grub_script_lexer_record_start): Likewise.
7636 (grub_script_lexer_record_stop): Likewise.
7637 * normal/execute.c (grub_script_execute_menuentry): New function.
7638 * normal/lexer.c (record, recording, recordpos, recordlen): New
7640 (grub_script_lexer_record_start): New function.
7641 (grub_script_lexer_record_stop): Likewise.
7642 (recordchar): Likewise.
7643 (nextchar): Likewise.
7644 (grub_script_yylex): Use `nextchar' to fetch new characters. Use
7645 2048 as the buffer size. Add the tokens `menuentry' and `@'.
7646 * normal/main.c: Include <grub/parser.h> and <grub/script.h>
7647 (current_menu): New variable.
7648 (free_menu): Mainly rewritten.
7649 (grub_normal_menu_addentry): New function.
7650 (read_config_file): Rewritten.
7651 * normal/menu.c (run_menu_entry): Mainly rewritten.
7652 * normal/menu_entry.c (make_screen): Rewritten the code to insert
7654 (run): Mainly rewritten.
7655 * normal/parser.y (menu_entry): New variable.
7656 (GRUB_PARSER_TOKEN_MENUENTRY): New token.
7657 (menuentry): New rule.
7658 (command): Add `menuentry'.
7659 (if_statement): Allow additional returns before `fi'.
7660 * normal/script.c (grub_script_create_cmdmenu): New function.
7662 2006-01-03 Marco Gerards <marco@gnu.org>
7664 * INSTALL: GNU Bison is required.
7665 * configure.ac: Rewritten the test to detect Bison.
7666 * Makefile.in (YACC): New variable. Reported by Xun Sun
7667 <xun.sun.cn@gmail.com>.
7669 2006-01-03 Marco Gerards <marco@gnu.org>
7671 * fs/hfsplus.c (grub_hfsplus_read_block): Convert the offset of
7672 the HFS+ filesystem to filesystem blocks.
7673 (grub_hfsplus_iterate_dir): Cast the `fileinfo' assignment so a
7674 GCC warning is silenced.
7676 2006-01-03 Marco Gerards <marco@gnu.org>
7678 * partmap/apple.c (apple_partition_map_iterate): Convert the data
7679 read from disk from big endian to host byte order.
7681 2006-01-03 Hollis Blanchard <hollis@penguinppc.org>
7683 * fs/hfs.c: Include <grub/hfs.h>. Added reference to the official
7685 (GRUB_HFS_EMBED_HFSPLUS_SIG): New macro.
7686 (grub_hfs_mount): Grammar fix in error. Make sure this is not an
7687 embedded HFS+ filesystem.
7688 (GRUB_HFS_MAGIC, grub_hfs_extent, grub_hfs_datarecord_t)
7689 (grub_hfs_sblock): Move from here...
7690 * include/grub/hfs.h: To here... New file.
7691 * fs/hfsplus.c: Include <grub/hfs.h>. Added reference to the official
7693 (GRUB_HFSPLUS_MAGIC, GRUB_HFSPLUSX_MAGIC, GRUB_HFSPLUS_SBLOCK):
7695 (grub_hfsplus_volheader): Change type of member `magic' to
7697 (grub_hfsplus_data): Add new member `embedded_offset'.
7698 (grub_hfsplus_read_block): Add the HFS+ wrapper offset to the
7700 (grub_hfsplus_mount): Read the HFS+ wrapper if it exists.
7701 Calculate the offset.
7703 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
7705 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRP_ADDR):
7707 (GRUB_BOOT_MACHINE_DRP_SIZE): Likewise.
7709 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
7711 * kern/env.c (grub_env_set): Check if ENV->VALUE instead of
7712 ENV->NAME is NULL after allocating ENV->VALUE.
7714 2005-12-25 Marco Gerards <marco@gnu.org>
7716 * kern/env.c (grub_env_set): Rewritten the error handling code.
7718 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
7720 * geninit.sh: Made more robust, and more portable.
7722 2005-12-25 Marco Gerards <marco@gnu.org>
7724 Add support for Apple HFS+ filesystems.
7726 * fs/hfsplus.c: New file.
7728 * DISTLIST: Added `fs/hfsplus.c'.
7730 * conf/common.rmk (pkgdata_MODULES): Add `hfsplus.mod'.
7731 (hfsplus_mod_SOURCES): New variable.
7732 (hfsplus_mod_CFLAGS): Likewise.
7733 (hfsplus_mod_LDFLAGS): Likewise.
7734 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/hfsplus.c'.
7735 (grub_setup_SOURCES): Likewise.
7736 (grub_mkdevicemap_SOURCES): Likewise.
7737 (grub_emu_SOURCES): Likewise.
7738 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7740 * fs/fshelp.c (grub_fshelp_log2blksize): New function.
7742 * include/grub/fshelp.h (grub_fshelp_log2blksize): new prototype.
7744 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
7746 * DISTLIST: Added geninitheader.sh, geninit.sh, commands/test.c,
7747 commands/i386/pc/play.c, conf/common.mk, conf/common.rmk,
7748 include/grub/parser.h, include/grub/script.h, kern/parser.c,
7749 kern/sparc64/cache.S, normal/execute.c, normal/function.c,
7750 normal/lexer.c, normal/parser.y, normal/script.c, and
7752 Removed kern/sparc64/cache.c.
7754 * conf/common.rmk (DISTCLEANFILES): Added grub_script.tab.c,
7755 grub_script.tab.h, grub_modules_init.lst, grub_modules_init.h,
7758 * configure.ac (AC_INIT): Bumped to 1.92.
7760 2005-12-24 Vesa Jaaskelainen <chaac@nic.fi>
7762 * kern/err.c (grub_error_push): Added new function to support error
7764 (grub_error_pop): Likewise.
7765 (grub_error_stack_items): New local variable to support error stacks.
7766 (grub_error_stack_pos): Likewise.
7767 (grub_error_stack_assert): Likewise.
7768 (GRUB_ERROR_STACK_SIZE): Added new define to configure maximum error
7770 (grub_print_error): Added support to print errors from error stack.
7772 * include/grub/err.h (grub_error_push): Added function prototype.
7773 (grub_error_pop): Likewise.
7775 2005-12-09 Hollis Blanchard <hollis@penguinppc.org>
7777 * configure.ac: Accept `powerpc64' as host_cpu.
7778 (amd64): Rename to `biarch32'.
7780 * kern/powerpc/cache.S (grub_arch_sync_caches): Handle
7781 non-cacheline-aligned addresses.
7783 * kern/dl.c (grub_dl_load_core): Add grub_dprintf messages.
7784 (grub_dl_flush_cache): Likewise. Only call `grub_arch_sync_caches'
7785 if `size' is non-zero.
7787 2005-12-03 Marco Gerards <mgerards@xs4all.nl>
7789 * conf/common.rmk (grub_modules_init.lst): Use `-printf "%P\n"'
7790 and `cd' to make sure the filename is not prefixed with a
7792 (pkgdata_MODULES): Add `gpt.mod'.
7793 (gpt_mod_SOURCES): New variable.
7794 (gpt_mod_CFLAGS): Likewise.
7795 (gpt_mod_LDFLAGS): Likewise.
7797 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/gpt.c'.
7799 * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_GPT_DISK):
7802 * partmap/gpt.c: New file.
7804 * partmap/pc.c (pc_partition_map_iterate): Don't continue when a
7805 GPT partition map is detected.
7807 2005-12-03 Vincent Pelletier <subdino2004@yahoo.fr>
7809 * commands/i386/pc/play.c: New file.
7810 * conf/i386-pc.rmk (pkgdata_MODULES): Added play.mod.
7811 (play_mod_SOURCES, play_mod_CFLAGS, play_mod_LDFLAGS): New
7814 2005-11-27 Marco Gerards <mgerards@xs4all.nl>
7816 * include/grub/dl.h (GRUB_MOD_INIT): Use `__attribute__
7817 ((unused))' to silence gcc warning.
7819 2005-11-26 Hollis Blanchard <hollis@penguinppc.org>
7821 * configure.ac: Correct `AC_PROG_YACC' test.
7823 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
7825 * util/powerpc/ieee1275/grub-install.in: Run the mount point
7826 check before installing files.
7828 2005-11-22 Mike Small <smallm@panix.com>
7830 * util/powerpc/ieee1275/grub-install.in (grubdir): Fixed partition
7831 number regex so multidigit numbers are recognized correctly.
7833 2005-11-22 Mike Small <smallm@panix.com>
7835 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Add a
7836 debugging message before attempting to claim memory.
7837 (grub_rescue_cmd_initrd): Add a claim debugging message and try
7838 multiple addresses in case of failure.
7840 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
7842 * term/tparm.c (get_space): Remove empty `if' statement.
7844 * fs/ufs.c (grub_ufs_find_file): Remove `grub_le_to_cpu32'.
7846 * kern/parser.c (check_varstate): Rename `state' to 's'.
7848 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
7850 * partmap/acorn.c: Change `unsigned' to `unsigned int'. Move all
7851 variable definitions to the beginning of each function. Sort stack
7853 (find): Rename to `acorn_partition_map_find'. Cast `grub_disk_read'
7854 `buf' argument to `char *'.
7856 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
7858 * conf/powerpc-ieee1275.rmk: Include conf/common.mk.
7859 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
7860 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
7861 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
7862 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
7863 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
7864 configfile.mod, search.mod, gzio.mod and test.mod.
7865 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
7866 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
7867 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
7868 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
7869 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
7870 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
7871 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
7872 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
7873 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
7874 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
7875 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
7876 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
7877 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
7878 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
7879 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
7880 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
7881 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
7882 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
7883 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
7884 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
7885 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
7886 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
7887 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Removed.
7889 * conf/common.mk (grub_modules_init.lst): Use `find' instead of
7891 (pkgdata_MODULES): Add test.mod.
7893 2005-11-18 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
7895 * genmk.rb: Fixed list rules moved to Makefile.in. Recognise
7896 appending to variables with "+=".
7897 (PModule): Use full pathname to generate *.lst filenames.
7899 * Makefile.in: Fixed list rules moved from genmk.rb.
7900 (.DELETE_ON_ERROR): New special target.
7901 (RMKFILES): Add common.rmk and sparc64-ieee1275.rmk.
7903 * conf/i386-pc.rmk: Include conf/common.mk.
7904 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
7905 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
7906 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
7907 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
7908 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
7909 configfile.mod, search.mod, gzio.mod and test.mod.
7910 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
7911 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
7912 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
7913 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
7914 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
7915 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
7916 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
7917 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
7918 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
7919 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
7920 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
7921 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
7922 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
7923 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
7924 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
7925 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
7926 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
7927 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
7928 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
7929 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
7930 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
7931 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
7932 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Move from
7934 * conf/common.rmk: ... to here. New file.
7936 * conf/common.mk: New file.
7938 2005-11-18 Yoshinori K. Okuji <okuji@enbug.org>
7940 * conf/powerpc-ieee1275.rmk (grub_script.tab.h): Unified to ...
7941 (grub_script.tab.c): ... here.
7943 * conf/sparc64-ieee1275.rmk (grub_script.tab.h): Unified to ...
7944 (grub_script.tab.c): ... here.
7946 * conf/i386-pc.rmk (grub_script.tab.h): Unified to ...
7947 (grub_script.tab.c): ... here.
7949 * normal/command.c (grub_command_find): Fixed a memory leak of
7950 MODULE_NAME. Reported by Mike Small <smallm@panix.com>.
7952 2005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
7954 * include/grub/symbol.h: (FUNCTION): Use double quotes instead of
7955 "@" which marks the start of a comment on ARM.
7956 (VARIABLE): Likewise.
7958 2005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
7960 Add support for Linux/ADFS partition tables.
7962 * partmap/acorn.c: New file.
7964 * include/grub/acorn_filecore.h: Likewise.
7966 * DISTLIST: Added `partmap/acorn.c' and
7967 `include/grub/acorn_filecore.h'.
7969 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
7971 (pkgdata_MODULES): Add `acorn.mod'.
7972 (acorn_mod_SOURCES): New variable.
7973 (acorn_mod_CFLAGS): Likewise.
7975 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
7977 (pkgdata_MODULES): Add `acorn.mod'.
7978 (acorn_mod_SOURCES): New variable.
7979 (acorn_mod_CFLAGS): Likewise.
7981 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/acorn.c'.
7982 (pkgdata_MODULES): Add `acorn.mod'.
7983 (acorn_mod_SOURCES): New variable.
7984 (acorn_mod_CFLAGS): Likewise.
7985 (acorn_mod_LDFLAGS): Likewise.
7987 * include/types.h (grub_disk_addr_t): New typedef.
7989 2005-11-13 Marco Gerards <mgerards@xs4all.nl>
7991 * geninit.sh: New file.
7993 * geninitheader.sh: Likewise.
7995 * commands/boot.c (grub_boot_init, grub_boot_fini): Removed.
7996 * commands/cat.c (grub_cat_init, grub_cat_fini): Likewise.
7997 * commands/cmp.c (grub_cmp_init, grub_cmp_fini): Likewise.
7998 * commands/configfile.c (grub_configfile_init)
7999 (grub_configfile_fini): Likewise.
8000 * commands/default.c (grub_default_init, grub_default_fini):
8002 * commands/help.c (grub_help_init, grub_help_fini): Likewise.
8003 * commands/ls.c (grub_ls_init, grub_ls_fini): Likewise.
8004 * commands/search.c (grub_search_init, grub_search_fini): Likewise.
8005 * commands/terminal.c (grub_terminal_init, grub_terminal_fini):
8007 * commands/test.c (grub_test_init, grub_test_fini): Likewise.
8008 * commands/timeout.c (grub_timeout_init, grub_timeout_fini):
8010 * commands/i386/pc/halt.c (grub_halt_init, grub_halt_fini): Likewise.
8011 * commands/ieee1275/halt.c (grub_halt_init, grub_halt_fini):
8013 * commands/i386/pc/reboot.c (grub_reboot_init, grub_reboot_fini):
8015 * commands/ieee1275/reboot.c (grub_reboot_init, grub_reboot_fini):
8017 * disk/loopback.c (grub_loop_init, grub_loop_fini): Likewise.
8018 * fs/affs.c (grub_affs_init, grub_affs_fini): Likewise.
8019 * fs/ext2.c (grub_ext2_init, grub_ext2_fini): Likewise.
8020 * fs/fat.c (grub_fat_init, grub_fat_fini): Likewise.
8021 * fs/hfs.c (grub_hfs_init, grub_hfs_fini): Likewise.
8022 * fs/iso9660.c (grub_iso9660_init, grub_iso9660_fini): Likewise.
8023 * fs/jfs.c (grub_jfs_init, grub_jfs_fini): Likewise.
8024 * fs/minix.c (grub_minix_init, grub_minix_fini): Likewise.
8025 * fs/sfs.c (grub_sfs_init, grub_sfs_fini): Likewise.
8026 * fs/ufs.c (grub_ufs_init, grub_ufs_fini): Likewise.
8027 * fs/xfs.c (grub_xfs_init, grub_xfs_fini): Likewise.
8028 * normal/main.c (grub_normal_init, grub_normal_fini): Likewise.
8029 * partmap/amiga.c (grub_amiga_partition_map_init)
8030 (grub_amiga_partition_map_fini): Likewise.
8031 * partmap/apple.c (grub_apple_partition_map_init)
8032 (grub_apple_partition_map_fini): Likewise.
8033 * partmap/pc.c (grub_pc_partition_map_init)
8034 (grub_pc_partition_map_fini): Likewise.
8035 * partmap/sun.c (grub_sun_partition_map_init,
8036 grub_sun_partition_map_fini): Likewise.
8037 * term/terminfo.c (grub_terminal_init, grub_terminal_fini):
8040 * util/grub-emu.c: Include <grub_modules_init.h>.
8041 (main): Don't initialize and de-initialize any modules directly,
8042 use `grub_init_all' and `grub_fini_all' instead.
8044 * term/i386/pc/vesafb.c (grub_vesafb_init): Renamed to
8045 `grub_vesafb_mod_init'.
8046 (grub_vesafb_fini): Renamed to `grub_vesafb_mod_fini'. Updated
8048 * term/i386/pc/vga.c (grub_vga_init): Renamed to
8049 `grub_vga_mod_init'. Updated all users.
8050 (grub_vga_fini): Renamed to `grub_vga_mod_fini'.
8052 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `grub_emu_init.c'.
8053 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c): New
8056 * include/grub/dl.h (GRUB_MOD_INIT): Add argument `name'.
8057 Generate a function to initialize the module in utilities.
8058 Updated all callers.
8059 (GRUB_MOD_FINI): Add argument `name'. Generate a function to
8060 initialize the module in utilities. Updated all callers.
8062 2005-11-09 Hollis Blanchard <hollis@penguinppc.org>
8064 * term/ieee1275/ofconsole.c (grub_ofconsole_cls): Use both the ANSI
8065 escape sequence and a literal ^L to clear the screen.
8067 * commands/ieee1275/suspend.c (grub_cmd_suspend): Clear the screen
8068 when returning from Open Firmware.
8070 2005-11-09 Hollis Blanchard <hollis@penguinppc.org>
8072 * term/ieee1275/ofconsole.c (grub_ofconsole_width): New variable.
8073 (grub_ofconsole_height): Likewise.
8074 (grub_ofconsole_putchar): If `grub_curr_x' exceeds console width,
8075 manually insert a '\n'.
8076 (grub_ofconsole_getwh): Set and return `grub_ofconsole_width' and
8077 `grub_ofconsole_height'. Return early if these are already set.
8079 2005-11-07 Vincent Pelletier <subdino2004@yahoo.fr>
8081 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
8082 `commands/test.c', `fs/affs.c', `fs/sfs.c', `fs/xfs.c',
8083 `normal/execute.c', `normal/lexer.c', `io/gzio.c',
8084 `kern/parser.c', `grub_script.tab.c', `normal/function.c'
8085 and `normal/script.c'.
8086 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
8087 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
8088 (test_mod_SOURCES): New variable.
8089 (test_mod_CFLAGS): Likewise.
8090 (test_mod_LDFLAGS): Likewise.
8091 (pkgdata_MODULES): Add `test.mod'.
8092 (grub_script.tab.c): New rule.
8093 (grub_script.tab.h): Likewise.
8095 2005-11-07 Marco Gerards <mgerards@xs4all.nl>
8097 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
8098 `commands/test.c', `normal/execute.c', `normal/lexer.c',
8099 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
8100 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
8101 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
8102 (test_mod_SOURCES): New variable.
8103 (test_mod_CFLAGS): Likewise.
8104 (pkgdata_MODULES): Add `test.mod'.
8105 (grub_script.tab.c): New rule.
8106 (grub_script.tab.h): Likewise.
8108 2005-11-06 Marco Gerards <mgerards@xs4all.nl>
8110 Add initial scripting support.
8112 * commands/test.c: New file.
8113 * include/grub/script.h: Likewise.
8114 * normal/execute.c: Likewise.
8115 * normal/function.c: Likewise.
8116 * normal/lexer.c: Likewise.
8117 * normal/parser.y: Likewise.
8118 * normal/script.c: Likewise.
8120 * configure.ac: Add `AC_PROG_YACC' test.
8122 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/test.c',
8123 `normal/execute.c', `normal/lexer.c', `grub_script.tab.c',
8124 `normal/function.c' and `normal/script.c'.
8125 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
8126 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
8127 (test_mod_SOURCES, test_mod_CFLAGS, test_mod_LDFLAGS): New
8129 (pkgdata_MODULES): Add `test.mod'.
8130 (grub_script.tab.c): New rule.
8131 (grub_script.tab.h): Likewise.
8133 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TEST_FAILURE'.
8135 * include/grub/normal.h (grub_test_init): New prototype.
8136 (grub_test_fini): Likewise.
8138 * normal/command.c: Include <grub/script.h>.
8139 (grub_command_execute): Rewritten.
8141 * util/grub-emu.c (main): Call `grub_test_init' and
8144 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
8146 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Initialize `msecs'
8148 * term/ieee1275/ofconsole.c (grub_ofconsole_checkkey): Return -1 if
8149 there are no pending characters.
8151 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
8153 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_get_devname): Use
8154 `grub_strndup' to drop device arguments. Replace unnecessary
8155 `grub_strndup' with `grub_strdup'.
8157 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
8159 * kern/term.c (grub_cls): Do not call grub_cur_term->cls() if the
8160 `debug' environment variable has been set.
8162 2005-11-02 Hollis Blanchard <hollis@penguinppc.org>
8164 * Makefile.in (install-local): Use $(DATA).
8165 (uninstall): Likewise.
8166 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Move grub-mkimage...
8167 (sbin_UTILITIES): ... to here.
8168 (sbin_SCRIPTS): New variable.
8169 (grub_install_SOURCES): New variable.
8170 * util/powerpc/ieee1275/grub-install.in: New file.
8171 * util/powerpc/ieee1275/grub-mkimage.c (kernel_path): Remove
8173 (add_segments): Call `grub_util_get_path'.
8175 2005-10-28 Yoshinori K. Okuji <okuji@enbug.org>
8177 From Timothy Baldwin:
8178 * commands/ls.c (grub_ls_list_files): Close FILE with
8180 * kern/misc.c (grub_vsprintf): Terminate the string S with NUL.
8182 2005-10-24 Marco Gerards <mgerards@xs4all.nl>
8184 * include/grub/parser.h: New file.
8186 * kern/parser.c: Likewise.
8188 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/parser.c'.
8189 (grub_setup_SOURCES): Likewise.
8190 (grub_probefs_SOURCES): Likewise.
8191 (grub_emu_SOURCES): Likewise.
8192 (kernel_img_HEADERS): Add `parser.h'.
8194 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
8195 (grub_emu_SOURCES): Add `kern/parser.c'.
8196 (grubof_SOURCES): Likewise.
8198 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
8199 (grubof_SOURCES): Add `kern/parser.c'.
8201 * include/grub/misc.h (grub_split_cmdline): Removed prototype.
8203 * kern/misc.c (grub_split_cmdline): Removed function.
8205 * kern/rescue.c: Include <grub/parser.h>.
8206 (grub_enter_rescue_mode): Use `grub_parser_split_cmdline' instead
8207 of `grub_split_cmdline'.
8209 * normal/command.c: Include <grub/parser.h>.
8210 (grub_command_execute): Use `grub_parser_split_cmdline' instead
8211 of `grub_split_cmdline'.
8213 * normal/completion.c: Include <grub/parser.h>.
8214 (cmdline_state): New variable.
8215 (iterate_dir): End the filename with a quote depending on the
8217 (get_state): new function.
8218 (grub_normal_do_completion): Use `grub_parser_split_cmdline' to
8219 split the arguments and determine the current argument. When the
8220 argument string is not quoted, escape all spaces.
8222 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
8224 * normal/sparc64/setjmp.S: New file.
8226 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
8228 * include/grub/sparc64/libgcc.h: New file.
8229 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Remove -Av9.
8230 (normal_mod_SOURCES): Use normal/sparc64/setjmp.S instead of
8231 normal/sparc64/setjmp.c.
8233 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
8235 * kern/sparc64/dl.c: Rewritten for SPARCV9 ELF.
8236 * kern/sparc64/cache.S: New file.
8237 * kern/sparc64/cache.c: Removed.
8238 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Add -Av9.
8239 (COMMON_CFLAGS): Add -mno-app-regs. Remove -mcpu=v9 and
8241 (COMMON_LDFLAGS): Add -melf64_sparc.
8242 (grubof_HEADERS): Add sparc64/libgcc.h and machine/kernel.h.
8243 (grubof_SOURCES): Use cache.S instead of cache.c.
8244 (grubof_LDFLAGS): Add -mno-app-regs. Replace "-Xlinker
8245 --oformat -Xlinker elf64-sparc" by "-Bstatic,-melf64_sparc".
8246 (pkgdata_MODULES): Uncomment. Leave linux.mod and _linux.mod
8248 (normal_mod_SOURCES): Add normal/completion.c and normal/misc.c.
8249 (_linux_mod_SOURCES, _linux_mod_CFLAGS, linux_mod_SOURCES)
8250 (linux_mod_CFLAGS): Commented out.
8251 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS): New macro, commented
8252 out because module isn't built.
8253 (fshelp_mod_LDFLAGS, fat_mod_LDFLAGS, ext2_mod_LDFLAGS)
8254 (ufs_mod_LDFLAGS, minix_mod_LDFLAGS, hfs_mod_LDFLAGS)
8255 (jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS, normal_mod_LDFLAGS)
8256 (hello_mod_LDFLAGS, boot_mod_LDFLAGS, terminal_mod_LDFLAGS)
8257 (ls_mod_LDFLAGS, cmp_mod_LDFLAGS, cat_mod_LDFLAGS)
8258 (font_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
8259 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
8260 (suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS)
8261 (help_mod_LDFLAGS, default_mod_LDFLAGS, timeout_mod_LDFLAGS)
8262 (configfile_mod_LDFLAGS, search_mod_LDFLAGS, xfs_mod_SOURCES)
8263 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
8264 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
8265 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, gzio_mod_SOURCES)
8266 (gzio_mod_CFLAGS, gzio_mod_LDFLAGS): New macro.
8268 2005-10-20 Yoshinori K. Okuji <okuji@enbug.org>
8270 * util/i386/pc/grub-probefs.c (main): Call grub_xfs_init and
8271 grub_xfs_fini. Do not call grub_hfs_init or grub_hfs_fini any
8272 longer, because HFS should not be used on PC.
8274 2005-10-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
8276 * io/gzio.c (grub_gzio_read): Use OFFSET instead of FILE->OFFSET
8277 consistently within the loop.
8279 2005-10-15 Marco Gerards <mgerards@xs4all.nl>
8281 * fs/xfs.c (grub_xfs_iterate_dir): Detect an error if part of a
8282 directory can not be read.
8284 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
8286 * configure.ac (AC_INIT): Increase the version number to 1.91.
8288 * DISTLIST: Added include/grub/terminfo.h, include/grub/tparm.h,
8289 include/grub/i386/pc/serial.h, term/terminfo.c, term/tparm.c and
8290 term/i386/pc/serial.c.
8292 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
8294 * kern/file.c (grub_file_seek): Seeking to an offset equal to a
8295 file size must be permitted.
8297 * kern/i386/pc/startup.S (multiboot_trampoline): Fix a mistake
8298 between %ah and %al.
8300 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
8302 * fs/xfs.c (grub_xfs_iterate_dir): Change the type of BLK to
8304 Call the hook with a NUL-terminated filename.
8305 (grub_xfs_mount): Use grub_be_to_cpu32 instead of
8308 * kern/term.c (cursor_state): New variable.
8309 (grub_term_set_current): Reset the cursor state on a new
8311 (grub_setcursor): Rewritten to use CURSOR_STATE.
8312 (grub_getcursor): New function.
8314 * include/grub/term.h (grub_getcursor): New prototype.
8316 * io/gzio.c (test_header): Align BUF for accessing it as 32-bit
8317 integers on ARM. Reported by Timothy Baldwin
8318 <T.E.Baldwin99@members.leeds.ac.uk>.
8320 2005-10-11 Marco Gerards <mgerards@xs4all.nl>
8322 * fs/sfs.c (grub_sfs_open): Don't free `data->label' if it is not
8324 (grub_sfs_dir): Likewise.
8326 2005-10-09 Marco Gerards <mgerards@xs4all.nl>
8328 Add support for the SFS filesystem.
8330 * fs/sfs.c: New file.
8332 * DISTLIST: Added `fs/sfs.c'.
8334 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/sfs.c'.
8335 (grub_probefs_SOURCES): Likewise.
8336 (grub_emu_SOURCES): Likewise.
8337 (pkgdata_MODULES): Add `sfs.mod'.
8338 (sfs_mod_SOURCES): New variable.
8339 (sfs_mod_CFLAGS): Likewise.
8340 (sfs_mod_LDFLAGS): Likewise.
8342 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/sfs.c'.
8343 (pkgdata_MODULES): Add `sfs.mod'.
8344 (sfs_mod_SOURCES): New variable.
8345 (sfs_mod_CFLAGS): Likewise.
8347 * util/grub-emu.c (main): Call `grub_sfs_init' and
8350 * include/grub/fs.h (grub_sfs_init): New prototype.
8351 (grub_sfs_fini): Likewise.
8353 2005-10-07 Marco Gerards <mgerards@xs4all.nl>
8355 Add support for the AFFS filesystem.
8357 * fs/affs.c: New file.
8359 * DISTLIST: Added `fs/affs.c'.
8361 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/affs.c'.
8362 (grub_probefs_SOURCES): Likewise.
8363 (grub_emu_SOURCES): Likewise.
8364 (pkgdata_MODULES): Add `affs.mod'.
8365 (affs_mod_SOURCES): New variable.
8366 (affs_mod_CFLAGS): Likewise.
8367 (affs_mod_LDFLAGS): Likewise.
8369 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/affs.c'.
8370 (pkgdata_MODULES): Add `affs.mod'.
8371 (affs_mod_SOURCES): New variable.
8372 (affs_mod_CFLAGS): Likewise.
8374 * util/grub-emu.c (main): Call `grub_affs_init' and
8377 * include/grub/fs.h (grub_affs_init): New prototype.
8378 (grub_affs_fini): Likewise.
8380 2005-10-01 Marco Gerards <mgerards@xs4all.nl>
8382 * fs/xfs.c (grub_xfs_iterate_dir): Add parentheses.
8384 2005-10-01 Marco Gerards <mgerards@xs4all.nl>
8386 * configure.ac: Accept `x86_64' as host_cpu. In that case add
8389 * genmk.rb (class PModule): Always use `$(#{prefix}_LDFLAGS)' when
8392 * conf/i386-pc.rmk (COMMON_CFLAGS): Add `-m32'.
8393 (COMMON_LDFLAGS): New variable.
8394 (kernel_img_LDFLAGS): Include `COMMON_FLAGS'.
8395 (_chain_mod_LDFLAGS, fshelp_mod_LDFLAGS, fat_mod_LDFLAGS)
8396 (ext2_mod_LDFLAGS, ufs_mod_LDFLAGS, minix_mod_LDFLAGS)
8397 (hfs_mod_LDFLAGS, jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS)
8398 (xfs_mod_LDFLAGS, _linux_mod_LDFLAGS, linux_mod_LDFLAGS)
8399 (normal_mod_LDFLAGS, hello_mod_LDFLAGS, boot_mod_LDFLAGS)
8400 (terminal_mod_LDFLAGS, ls_mod_LDFLAGS, cmp_mod_LDFLAGS)
8401 (cat_mod_LDFLAGS, help_mod_LDFLAGS, reboot_mod_LDFLAGS)
8402 (halt_mod_LDFLAGS, vga_mod_LDFLAGS, font_mod_LDFLAGS)
8403 (terminfo_mod_LDFLAGS, serial_mod_LDFLAGS, _multiboot_mod_LDFLAGS)
8404 (multiboot_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
8405 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
8406 (default_mod_LDFLAGS, timeout_mod_LDFLAGS, configfile_mod_LDFLAGS)
8407 (vbe_mod_LDFLAGS, vesafb_mod_LDFLAGS, vbeinfo_mod_LDFLAGS)
8408 (vbetest_mod_LDFLAGS, search_mod_LDFLAGS, gzio_mod_LDFLAGS): New
8410 (normal_mod_ASFLAGS): Add `-m32'.
8412 * include/grub/types.h (grub_host_addr_t, grub_host_off_t)
8413 (grub_host_size_t, grub_host_ssize_t): New types.
8414 (grub_addr_t, grub_off_t, grub_size_t, grub_ssize_t): Make type
8415 dependent of `GRUB_CPU_SIZEOF_VOID_P' instead on
8416 `GRUB_HOST_SIZEOF_VOID_P'.
8418 * include/grub/kernel.h (struct grub_module_header): Type of
8419 member offset changed to `grub_host_off_t'. Type of member size
8420 changed to `grub_host_size_t'.
8421 (struct grub_module_info): Type of member offset changed to
8422 `grub_host_off_t'. Type of member size changed to
8425 2005-09-29 Yoshinori K. Okuji <okuji@enbug.org>
8427 Make GRUB's kernel compliant to Multiboot Specification.
8429 * kern/i386/pc/startup.S (multiboot_header): New label.
8430 (multiboot_entry): Likewise.
8431 (multiboot_trampoline): Likewise.
8433 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
8436 * fs/xfs.c (grub_xfs_iterate_dir): Fix a syntax error. You may not
8437 put parentheses after a question mark.
8438 [!GRUB_UTIL] (my_mod): New variable.
8440 * util/grub-emu.c (main): Call grub_xfs_init and grub_xfs_fini.
8442 2005-09-28 Marco Gerards <mgerards@xs4all.nl>
8444 Adds support for the XFS filesystem. Btrees are not supported
8447 * fs/xfs.c: New file.
8449 * DISTLIST: Added `fs/xfs.c'.
8451 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/xfs.c'.
8452 (grub_probefs_SOURCES): Likewise.
8453 (grub_emu_SOURCES): Likewise.
8454 (pkgdata_MODULES): Add `xfs.mod'.
8455 (xfs_mod_SOURCES): New variable.
8456 (xfs_mod_CFLAGS): Likewise.
8458 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/xfs.c'.
8459 (pkgdata_MODULES): Add `xfs.mod'.
8460 (xfs_mod_SOURCES): New variable.
8461 (xfs_mod_CFLAGS): Likewise.
8463 * util/grub-emu.c (main): Call `grub_xfs_init' and
8466 * include/grub/fs.h (grub_xfs_init): New prototype.
8467 (grub_xfs_fini): Likewise.
8470 2005-09-18 Vesa Jaaskelainen <chaac@nic.fi>
8472 * video/i386/pc/vbe.c (grub_vbe_set_video_mode): In indexed
8473 color modes, allow greater than 16 colors to be configured as
8476 2005-09-03 Yoshinori K. Okuji <okuji@enbug.org>
8478 * normal/completion.c (complete_arguments): Add the qualifier
8481 From Omniflux <omniflux+lists@omniflux.com>:
8482 * include/grub/terminfo.h: New file.
8483 * include/grub/tparm.h: Likewise.
8484 * include/grub/i386/pc/serial.h: Likewise.
8485 * term/terminfo.c: Likewise.
8486 * term/tparm.c: Likewise.
8487 * term/i386/pc/serial.c: Likewise.
8488 * conf/i386-pc.rmk (pkgdata_MODULES): Added terminfo.mod and
8490 (terminfo_mod_SOURCES): New variable.
8491 (terminfo_mod_CFLAGS): Likewise.
8492 (serial_mod_SOURCES): Likewise.
8493 (serial_mod_CFLAGS): Likewise.
8495 2005-08-31 Yoshinori K. Okuji <okuji@enbug.org>
8497 * DISTLIST: Replaced boot/powerpc/ieee1275/crt0.S and
8498 boot/powerpc/ieee1275/cmain.c with kern/powerpc/ieee1275/crt0.S
8499 and kern/powerpc/ieee1275/cmain.c, respectively.
8501 * boot/powerpc/ieee1275/crt0.S: Moved to ...
8502 * kern/powerpc/ieee1275/crt0.S: ... here.
8504 * boot/powerpc/ieee1275/cmain.c: Moved to ...
8505 * kern/powerpc/ieee1275/cmain.c: ... here.
8507 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Use
8508 kern/powerpc/ieee1275/crt0.S and kern/powerpc/ieee1275/cmain.c
8509 instead of boot/powerpc/ieee1275/crt0.S and
8510 boot/powerpc/ieee1275/cmain.c, respectively.
8512 * boot/i386/pc/boot.S (lba_mode): Do not store the total number of
8513 sectors. It was not used anyway.
8515 2005-08-30 Hollis Blanchard <hollis@penguinppc.org>
8517 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): Fix
8518 `unused parameter' warning.
8520 2005-08-30 Hollis Blanchard <hollis@penguinppc.org>
8522 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): New
8524 (grub_ofconsole_term): Specify grub_ofconsole_getcharwidth as
8527 2005-08-28 Marco Gerards <metgerards@student.han.nl>
8529 * include/grub/normal.h (enum grub_completion_type): Added
8530 `GRUB_COMPLETION_TYPE_ARGUMENT'.
8532 * normal/cmdline.c (print_completion): Handle
8533 the `GRUB_COMPLETION_TYPE_ARGUMENT' type.
8534 * normal/menu_entry.c (store_completion): Likewise.
8536 * normal/completion.c (complete_arguments): New function.
8537 (grub_normal_do_completion): Call `complete_arguments' when the
8538 current words start with a dash.
8540 2005-08-27 Marco Gerards <metgerards@student.han.nl>
8542 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Fix typo (use
8543 `gzio.mod' instead of `io.mod').
8545 2005-08-22 Yoshinori K. Okuji <okuji@enbug.org>
8547 * gendistlist.sh (EXTRA_DISTFILES): Added genfslist.sh.
8548 (DISTDIRS): Added io and video.
8549 Rewrite the search routine to make an output consistently.
8551 * DISTLIST: Added conf/sparc64-ieee1275.mk,
8552 conf/sparc64-ieee1275.rmk, include/grub/gzio.h,
8553 include/grub/ieee1275/ieee1275.h, include/grub/ieee1275/ofdisk.h,
8554 io/gzio.c, kern/sparc64/cache.c, kern/sparc64/dl.c,
8555 kern/sparc64/ieee1275/init.c, kern/sparc64/ieee1275/openfw.c and
8556 util/powerpc/ieee1275/misc.c.
8558 * include/grub/gzio.h: New file.
8559 * io/gzio.c: Likewise.
8561 * kern/file.c (grub_file_close): Call grub_device_close only if
8562 FILE->DEVICE is not NULL.
8564 * include/grub/mm.h [!NULL] (NULL): New macro.
8566 * include/grub/err.h (GRUB_ERR_BAD_GZIP_DATA): New constant.
8568 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added io/gzip.c.
8569 (pkgdata_MODULES): Added gzio.mod.
8570 (gzio_mod_SOURCES): New variable.
8571 (gzio_mod_CFLAGS): Likewise.
8573 * conf/i386-pc.rmk (grub_emu_SOURCES): Added io/gzip.c.
8574 (pkgdata_MODULES): Added gzio.mod.
8575 (gzio_mod_SOURCES): New variable.
8576 (gzio_mod_CFLAGS): Likewise.
8578 * commands/cat.c: Include grub/gzio.h.
8579 (grub_cmd_cat): Use grub_gzfile_open instead of
8582 * commands/cmp.c: Include grub/gzio.h.
8583 (grub_cmd_cmp): Use grub_gzfile_open instead of
8586 * loader/i386/pc/multiboot.c: Include grub/gzio.h.
8587 (grub_rescue_cmd_multiboot): Use grub_gzfile_open instead of
8589 (grub_rescue_cmd_module): Likewise.
8591 2005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
8593 * conf/sparc64-ieee1275.rmk (grubof_SOURCES): The first file must be
8594 kern/sparc64/ieee1275/init.c because it contains _start.
8595 * conf/sparc64-ieee1275.mk: Generated from conf/sparc64-ieee1275.rmk.
8597 2005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
8599 * configure.ac: Add support for sparc64 host with ieee1275
8601 * configure: Generated from configure.ac.
8602 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Use grub_ssize_t
8604 (grub_ofdisk_read): Likewise.
8605 (grub_ofdisk_open): Use %p to print pointer values, and cast the
8606 pointers as (void *) to remove a warning.
8607 (grub_ofdisk_close): Likewise.
8608 (grub_ofdisk_read): Likewise.
8609 * kern/ieee1275/ieee1275.c (grub_ieee1275_exit): This never
8610 returns, so make it return void to remove a warning.
8611 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_exit):
8612 Corresponding prototype change.
8613 * kern/mm.c (grub_mm_init_region): Use %p to print pointer
8614 values, and cast the pointers as (void *) to remove a warning.
8615 (grub_mm_dump): Likewise.
8616 * conf/sparc64-ieee1275.mk: New file.
8617 * conf/sparc64-ieee1275.rmk: Likewise.
8618 * include/grub/sparc64/setjmp.h: Likewise.
8619 * include/grub/sparc64/types.h: Likewise.
8620 * include/grub/sparc64/ieee1275/console.h: Likewise.
8621 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
8622 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
8623 * include/grub/sparc64/ieee1275/time.h: Likewise.
8624 * kern/sparc64/cache.c: Likewise.
8625 * kern/sparc64/dl.c: Likewise.
8626 * kern/sparc64/ieee1275/init.c: Likewise.
8627 * kern/sparc64/ieee1275/openfw.c: Likewise.
8629 2005-08-21 Yoshinori K. Okuji <okuji@enbug.org>
8631 * util/console.c (grub_ncurses_putchar): If C is greater than
8632 0x7f, set C to a question mark.
8633 (grub_ncurses_getcharwidth): New function.
8634 (grub_ncurses_term): Specify grub_ncurses_getcharwidth as
8637 * normal/menu.c (print_entry): Made aware of Unicode. First,
8638 convert TITLE to UCS-4, and predict the cursor position by
8641 * include/grub/misc.h (grub_utf8_to_ucs4): Specify the qualifier
8643 * kern/misc.c (grub_utf16_to_utf8): Likewise.
8645 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
8647 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Specify
8648 the boot file by the option BOOT_IMAGE. Use grub_stpcpy instead of
8651 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Specify the boot
8652 file by the option BOOT_IMAGE. Use grub_stpcpy instead of
8653 grub_strcpy and grub_strlen. Take it into account that a space
8654 character is inserted as a delimiter.
8656 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
8658 * partmap/pc.c (pc_partition_map_iterate): Include the value of an
8659 invalid magic in the error.
8661 * commands/search.c: New file.
8663 * util/grub-emu.c (main): Call grub_search_init and
8666 * kern/rescue.c (grub_rescue_print_disks): Removed.
8667 (grub_rescue_print_devices): New function.
8668 (grub_rescue_cmd_ls): Use grub_device_iterate with
8669 grub_rescue_print_devices instead of grub_disk_dev_iterate with
8670 grub_rescue_print_disks.
8672 * kern/partition.c (grub_partition_iterate): Return the result of
8673 PARTMAP->ITERATE instead of GRUB_ERRNO.
8675 * kern/device.c: Include grub/partition.h.
8676 (grub_device_iterate): New function.
8678 * include/grub/partition.h (grub_partition_iterate): Return int
8679 instead of grub_err_t.
8681 * include/grub/normal.h [GRUB_UTIL] (grub_search_init): New
8683 [GRUB_UTIL] (grub_search_fini): Likewise.
8685 * include/grub/device.h (grub_device_iterate): New prototype.
8687 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
8689 (pkgdata_MODULES): Added search.mod.
8690 (search_mod_SOURCES): New variable.
8691 (search_mod_CFLAGS): Likewise.
8693 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/search.c.
8694 (pkgdata_MODULES): Added search.mod.
8695 (search_mod_SOURCES): New variable.
8696 (search_mod_CFLAGS): Likewise.
8698 * commands/ls.c (grub_ls_list_disks): Renamed to ...
8699 (grub_ls_list_devices): ... this, and use grub_device_iterate.
8700 All callers changed.
8702 * DISTLIST: Added commands/search.c.
8704 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
8706 * kern/term.c (grub_putchar): Use grub_utf8_to_ucs4 for the
8708 (grub_getcharwidth): New function.
8710 * kern/misc.c (grub_utf8_to_ucs4): New function.
8712 * include/grub/term.h (struct grub_term): Added a new member
8714 (grub_getcharwidth): New prototype.
8716 * include/grub/misc.h (grub_utf8_to_ucs4): New prototype.
8718 * term/i386/pc/console.c (map_char): New function. Segregated from
8719 grub_console_putchar.
8720 (grub_console_putchar): Use map_char.
8721 (grub_console_getcharwidth): New function.
8722 (grub_console_term): Specified grub_console_getcharwidth as
8725 * term/i386/pc/vga.c (grub_vga_getcharwidth): New function.
8726 (grub_vga_term): Specified grub_vga_getcharwidth as getcharwidth.
8728 * term/i386/pc/vesafb.c (grub_virtual_screen_setup): Return
8730 (grub_vesafb_init): Do not use RC. Instead, use GRUB_ERRNO. Rely
8731 on grub_strtoul completely.
8732 (write_char): Declare local variables in the beginning of the
8734 (grub_vesafb_getcharwidth): New function.
8735 (grub_vesafb_term): Specified grub_vesafb_getcharwidth as
8738 2005-08-19 Yoshinori K. Okuji <okuji@enbug.org>
8740 * DISTLIST: Replace commands/i386/pc/vbe_list_modes.c and
8741 commands/i386/pc/vbe_test.c with commands/i386/pc/vbeinfo.c and
8742 commands/i386/pc/vbetest.c.
8744 * video/i386/pc/vbe.c (grub_vbe_probe): If INFOBLOCK is not NULL,
8745 call grub_vbe_get_controller_info again, because the returned
8746 information is volatile.
8747 (grub_vbe_set_video_mode): Mostly rewritten.
8748 (grub_vbe_get_video_mode): Use grub_vbe_probe and use
8749 grub_vbe_status_t correctly.
8750 (grub_vbe_get_video_mode_info): Likewise.
8751 (grub_vbe_set_pixel_rgb): Use a switch statement rather than
8752 several if statements.
8754 * commands/i386/pc/vbe_list_modes.c: Renamed to ...
8755 * commands/i386/pc/vbeinfo.c: ... this.
8757 * commands/i386/pc/vbe_test.c: Renamed to ...
8758 * commands/i386/pc/vbetest.c: ... this.
8760 * commands/i386/pc/vbeinfo.c (grub_cmd_vbe_list_modes): Renamed to
8762 (grub_cmd_vbeinfo): ... this. Save video modes before
8763 iterating. Skip a video mode, if it is not available, not enough
8764 information is given or it is monochrome. Show the memory
8765 model. Leave the interpretation of MODEVAR to grub_strtoul
8767 (GRUB_MOD_INIT): Rename vbe_list_modes to vbeinfo.
8768 (GRUB_MOD_FINI): Likewise.
8770 * commands/i386/pc/vbetest.c (grub_cmd_vbe_test): Renamed to ...
8771 (grub_cmd_vbetest): ... this. Don't print unnecessarily. Use
8772 grub_err_t instead of grub_uint32_t. Don't use SPTR. Remove a
8773 duplicated grub_env_get. Leave the interpretation of MODEVAR to
8774 grub_strtoul completely.
8776 (GRUB_MOD_INIT): Rename vbe_test to vbetest.
8777 (GRUB_MOD_FINI): Likewise.
8779 * normal/misc.c: Include grub/mm.h.
8781 * conf/i386-pc.rmk (pkgdata_MODULES): Replaced vbe_test.mod and
8782 vbe_list_modes with vbetest.mod and vbeinfo.mod.
8783 (vbe_list_modes_mod_SOURCES): Removed.
8784 (vbe_list_modes_mod_CFLAGS): Likewise.
8785 (vbe_test_mod_SOURCES): Likewise.
8786 (vbe_test_mod_CFLAGS): Likewise.
8787 (vbeinfo_mod_SOURCES): New variable.
8788 (vbeinfo_mod_CFLAGS): Likewise.
8789 (vbetest_mod_SOURCES): Likewise.
8790 (vbetest_mod_CFLAGS): Likewise.
8792 2005-08-18 Yoshinori K. Okuji <okuji@enbug.org>
8794 * normal/misc.c: New file.
8796 * DISTLIST: Added normal/misc.c.
8798 * partmap/amiga.c (amiga_partition_map_iterate): Add an argument
8799 DISK to HOOK. Call HOOK with DISK.
8800 * partmap/apple.c (apple_partition_map_iterate): Likewise.
8801 * partmap/pc.c (pc_partition_map_iterate): Likewise.
8802 * partmap/sun.c (sun_partition_map_iterate): Likewise.
8804 * normal/menu_entry.c (struct screen): Added a new member
8806 (completion_buffer): New global variable.
8807 (make_screen): Set SCREEN->COMPLETION_SHOWN to zero.
8808 (store_completion): New function.
8809 (complete): Likewise.
8810 (clear_completions): Likewise.
8811 (grub_menu_entry_run): If SCREEN->COMPLETION_SHOWN is non-zero,
8812 call clear_completions and reset SCREEN->COMPLETION_SHOWN. If C is
8813 a tab, call complete.
8815 * normal/completion.c (disk_dev): Removed.
8816 (print_simple_completion): Likewise.
8817 (print_partition_completion): Likewise.
8818 (print_func): New global variable.
8819 (add_completion): Do not take the arguments WHAT or PRINT any
8820 longer. Added a new argument TYPE. Instead of printing directly,
8821 call PRINT_FUNC if not NULL.
8822 All callers changed.
8823 (complete_device): Use a local variable DEV instead of
8824 DISK_DEV. Do not move CURRENT_WORD to the end of a device name.
8825 (grub_normal_do_completion): Take a new argument HOOK. Do not
8826 initialize DISK_DEV. Initialize PRINT_FUNC to HOOK. If RET is an
8827 empty string, return NULL instead.
8828 All callers changed.
8830 * normal/cmdline.c (print_completion): New function.
8832 * kern/partition.c (grub_partition_iterate): Add an argument DISK
8834 All callers changed.
8836 * kern/disk.c (grub_print_partinfo): Removed.
8838 * include/grub/partition.h (struct grub_partition_map): Add a new
8839 argument DISK into HOOK of ITERATE.
8840 (grub_partition_iterate): Add a new argument DISK to HOOK.
8842 * include/grub/normal.h (enum grub_completion_type): New enum.
8843 (grub_completion_type_t): New type.
8844 (GRUB_COMPLETION_TYPE_COMMAND): New constant.
8845 (GRUB_COMPLETION_TYPE_DEVICE): Likewise.
8846 (GRUB_COMPLETION_TYPE_PARTITION): Likewise.
8847 (GRUB_COMPLETION_TYPE_FILE): Likewise.
8848 (grub_normal_do_completion): Added a new argument HOOK.
8849 (grub_normal_print_device_info): New prototype.
8851 * include/grub/disk.h (grub_print_partinfo): Removed.
8853 * conf/i386-pc.rmk (grub_emu_SOURCES): Added normal/misc.c.
8854 (normal_mod_SOURCES): Likewise.
8855 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8856 (normal_mod_SOURCES): Likewise.
8858 * commands/ls.c (grub_ls_list_disks): Use
8859 grub_normal_print_device_info instead of grub_print_partinfo. Free
8861 (grub_ls_list_files): Use grub_normal_print_device_info instead of
8862 duplicating the code.
8864 2005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
8866 * commands/i386/pc/vbe_list_modes.c: Update source formatting to
8867 follow GCS more precisely.
8868 * commands/i386/pc/vbe_test.c: Likewise.
8869 * include/grub/i386/pc/vbe.h: Likewise.
8870 * term/i386/pc/vesafb.c: Likewise.
8871 * video/i386/pc/vbe.c: Likewise.
8873 2005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
8875 * DISTLIST: Added term/i386/pc/vesafb.c
8876 DISTLIST: Added video/i386/pc/vbe.c
8877 DISTLIST: Added commands/i386/pc/vbe_list_modes.c.
8878 DISTLIST: Added commands/i386/pc/vbe_test.c.
8879 * commands/i386/pc/vbe_list_modes.c: New file.
8880 * commands/i386/pc/vbe_test.c: Likewise.
8881 * term/i386/pc/vesafb.c: Likewise.
8882 * video/i386/pc/vbe.c: Likewise.
8883 * include/grub/i386/pc/vbe.h (GRUB_VBE_DEFAULT_VIDEO_MODE): Added define.
8884 (grub_vbe_probe) Added prototype.
8885 (grub_vbe_set_video_mode) Likewise.
8886 (grub_vbe_get_video_mode) Likewise.
8887 (grub_vbe_get_video_mode_info) Likewise.
8888 (grub_vbe_set_pixel_rgb) Likewise.
8889 (grub_vbe_set_pixel_index) Likewise.
8890 * conf/i386-pc.rmk (pkgdata_MODULES): Added vbe.mod.
8891 (pkgdata_MODULES): Added vesafb.mod.
8892 (pkgdata_MODULES): Added vbe_list_modes.mod.
8893 (pkgdata_MODULES): Added vbe_test.mod.
8894 (vbe_mod_SOURCES): Added.
8895 (vbe_mod_CFLAGS): Likewise.
8896 (vesafb_mod_SOURCES): Likewise.
8897 (vesafb_mod_CFLAGS): Likewise.
8898 (vbe_list_modes_mod_SOURCES): Likewise.
8899 (vbe_list_modes_mod_CFLAGS): Likewise.
8900 (vbe_test_mod_SOURCES): Likewise.
8901 (vbe_test_mod_CFLAGS): Likewise.
8903 2005-08-14 Yoshinori K. Okuji <okuji@enbug.org>
8905 * normal/command.c (grub_command_execute): If INTERACTIVE is
8906 false and GRUB_COMMAND_FLAG_NO_ECHO is not specified, print
8907 CMDLINE. Disable the pager if INTERACTIVE is true.
8908 All callers are changed.
8910 * normal/main.c (grub_normal_execute): Read command.lst and fs.lst
8911 before reading a config file.
8912 * normal/main.c (read_config_file): Even if a command is not
8913 found, register it if it is within an entry.
8915 * util/grub-emu.c: Include sys/types.h and unistd.h.
8916 (options): Added --hold.
8917 (struct arguments): Added a new member "hold".
8918 (parse_opt): If KEY is 'H', set ARGS->HOLD to ARG or -1 if ARG is
8920 (main): Initialize ARGS.HOLD to zero. Wait until ARGS.HOLD is
8921 cleared by a debugger, if it is not zero.
8923 * include/grub/normal.h (grub_command_execute): Add an argument
8926 2005-08-14 Vesa Jaaskelainen <chaac@nic.fi>
8928 * DISTLIST: Added include/grub/i386/pc/vbe.h.
8930 2005-08-13 Yoshinori K. Okuji <okuji@enbug.org>
8932 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Replace the test
8933 program with another one, because the old one didn't detect a bug
8934 in gcc-3.4. Always use regparm 2, because the new test is still
8935 not enough for gcc-4.0. Someone must investigate a simple test
8936 case which detects a bug in gcc-4.0.
8938 2005-08-12 Yoshinori K. Okuji <okuji@enbug.org>
8940 * DISTLIST: Added normal/completion.c.
8942 * normal/completion.c: New file.
8944 * term/i386/pc/console.c (grub_console_getwh): New function.
8945 (grub_console_term): Assign grub_console_getwh to getwh.
8947 * normal/cmdline.c (grub_tab_complete): Removed. Now the same
8948 function is defined in normal/completion.c as
8949 grub_normal_do_completion.
8950 (grub_cmdline_get): Use grub_normal_do_completion instead of
8953 * kern/partition.c (grub_partition_map_iterate): Return 1 if HOOK
8954 returns non-zero, otherwise return 0.
8955 (grub_partition_iterate): First, probe the partition map. Then,
8956 call ITERATE only for this partition map.
8958 * kern/misc.c (grub_strncmp): Rewritten.
8960 * kern/disk.c (grub_disk_dev_iterate): Return 1 if P->ITERATE
8961 returns non-zero. Otherwise return 0.
8963 * include/grub/partition.h (grub_partition_map_iterate): Return
8964 int instead of void.
8966 * include/grub/normal.h (grub_normal_do_completion): New prototype.
8968 * include/grub/misc.h (grub_strncmp): Change the type of N to
8971 * include/grub/disk.h (grub_disk_dev_iterate): Return int instead
8974 * normal/menu.c (draw_border): Cast GRUB_TERM_BORDER_WIDTH to
8975 unsigned explicitly before comparing it with I.
8977 * kern/main.c (grub_env_write_root): Add the attribute unused into
8980 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
8981 normal/completion.c.
8982 (normal_mod_SOURCES): Likewise.
8983 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
8984 (normal_mod_SOURCES): Likewise.
8986 * normal/command.c (grub_iterate_commands): If ITERATE returns
8987 non-zero, return one immediately.
8989 2005-08-09 Vesa Jaaskelainen <chaac@nic.fi>
8991 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vbe.h.
8992 * kern/i386/pc/startup.S: Updated Global Descriptor table's
8994 (grub_vbe_get_controller_info): New function.
8995 (grub_vbe_get_mode_info): Likewise.
8996 (grub_vbe_set_mode): Likewise.
8997 (grub_vbe_get_mode): Likewise.
8998 (grub_vbe_set_memory_window): Likewise.
8999 (grub_vbe_get_memory_window): Likewise.
9000 (grub_vbe_set_scanline_length): Likewise.
9001 (grub_vbe_get_scanline_length): Likewise.
9002 (grub_vbe_set_display_start): Likewise.
9003 (grub_vbe_get_display_start): Likewise.
9004 (grub_vbe_set_palette_data): Likewise.
9005 * include/grub/i386/pc/vbe.h: New file.
9007 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
9009 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
9010 kern/ieee1275/of.c with kern/ieee1275/ieee1275.c.
9011 * DISTLIST: Likewise.
9012 * kern/ieee1275/of.c: Moved to ...
9013 * kern/ieee1275/ieee1275.c: ... here.
9015 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
9017 * term/ieee1275/ofconsole.c: Include <grub/mm.h>.
9018 (grub_ofconsole_getwh): Cast -1 to type grub_ieee1275_ihandle_t.
9019 Pass 0 as `end' parameter to grub_strtoul().
9021 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
9023 * include/grub/powerpc/ieee1275/console.h: Do not include
9024 <grub/types.h>. Do not include <grub/symbol.h>. Remove ASM_FILE
9026 (grub_console_cur_color): Remove i386-specific prototype.
9027 (grub_console_real_putchar): Likewise.
9028 (grub_console_checkkey): Likewise.
9029 (grub_console_getkey): Likewise.
9030 (grub_console_getxy): Likewise.
9031 (grub_console_gotoxy): Likewise.
9032 (grub_console_cls): Likewise.
9033 (grub_console_setcursor): Likewise.
9034 * kern/powerpc/ieee1275/init.c: Don't include <grub/console.h>.
9035 Include <grub/machine/console.h>.
9036 * term/ieee1275/ofconsole.c: Likewise.
9038 2005-08-08 Yoshinori K. Okuji <okuji@enbug.org>
9040 * Makefile.in (LIBLZO): New variable.
9042 * configure.ac: Check for LZO version 2.
9044 * util/i386/pc/grub-mkimage.c [HAVE_LZO_LZO1X_H]: Include
9045 lzo/lzo1x.h instead of lzo1x.h.
9047 * conf/i386-pc.rmk (grub_mkimage_LDFLAGS): Use $(LIBLZO) instead
9050 * util/i386/pc/grub-setup.c (main): Do not free PREFIX
9051 twice. Reported by Vladimir Serbinenko <phcoder@gmail.com>.
9053 * partmap/pc.c (pc_partition_map_probe): Restore P->DATA after
9054 copying the data from PARTITION to P.
9056 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
9058 * kern/rescue.c (grub_rescue_cmd_rmmod): If the reference count is
9059 negative, unload the module.
9061 * util/i386/pc/grub-setup.c (setup): The name of the PC partition
9062 map is "pc_partition_map" but not "pc".
9063 (usage): Fix the description. The options are --boot-image and
9064 --core-image but not --boot-file or --core-file.
9065 (main): If not specified explicitly, make BOOT_FILE and CORE_FILE
9066 based on DEFAULT_BOOT_FILE and DEFAULT_CORE_FILE with DIR or
9069 * util/i386/pc/grub-install.in: Do not specify --boot-file or
9070 --core-file. Specify INSTALL_DEVICE as an argument.
9072 * util/console.c: Include config.h.
9073 [HAVE_NCURSeS_CURSES_H]: Include ncurses/curses.h.
9074 [HAVE_NCURSES_H]: Include ncurses.h.
9075 [HAVE_CURSES_H]: Include curses.h.
9076 [!A_NORMAL] (A_NORMAL): Defined as zero.
9077 [!A_STANDOUT] (A_STANDOUT): Likewise.
9079 * conf/i386-pc.rmk (grub_emu_LDFLAGS): Use $(LIBCURSES) instead of
9081 * conf/powerpc-ieee1275.rmk (grub_emu_LDFLAGS): Likewise.
9083 * configure.ac: Check for curses libraries and headers.
9085 * Makefile.in (LIBCURSES): New variable.
9087 * genmk.rb (Script::rule): Set the executable bits.
9089 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): The
9090 name of the PC partition map is "pc_partition_map" but not "pc".
9092 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
9094 * util/i386/pc/grub-install.in (grub_probefs): New variable.
9095 (modules): Likewise.
9096 (usage): Added descriptions for --modules and --grub-probefs.
9097 Handle --modules and --grub-probefs. Save the arguments in MODULES
9098 and GRUB_PROBEFS, respectively.
9099 Auto-detect a filesystem module against GRUBDIR. If the result is
9100 empty and modules are not specified explicitly, abort the
9101 installation. Add the result to MODULES.
9103 * DISTLIST: Removed boot/powerpc/ieee1275/ieee1275.c,
9104 disk/powerpc/ieee1275/ofdisk.c,
9105 include/grub/powerpc/ieee1275/init.h and
9106 term/powerpc/ieee1275/ofconsole.c.
9107 Added disk/ieee1275/ofdisk.c, kern/ieee1275/of.c and
9108 term/ieee1275/ofconsole.c.
9110 * include/grub/powerpc/ieee1275/console.h: Resurrected.
9112 * COPYING: Upgraded to the latest version. Only the address of the
9113 FSF office has changed.
9115 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
9117 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
9118 kern/ieee1275.c with kern/ieee1275/of.c.
9120 * kern/ieee1275.c: Moved to ...
9121 * kern/ieee1275/of.c: ... here.
9123 2005-08-06 Yoshinori K. Okuji <okuji@enbug.org>
9125 * conf/i386-pc.rmk (kernel_img_HEADERS): Reordered for
9128 * config.guess: Updated to the latest version from gnulib.
9129 * config.sub: Likewise.
9130 * install.sh: Likewise.
9131 * mkinstalldirs: Likewise.
9133 * include/grub/console.h: Removed. This file is arch-specific. Do
9134 not put this in include/grub.
9136 * include/grub/i386/pc/console.h: Resurrected.
9138 * util/console.c: Include grub/machine/console.h instead of
9140 * util/grub-emu.c: Likewise.
9142 2005-08-04 Marco Gerards <metgerards@student.han.nl>
9144 * kern/term.c (grub_putcode): Use `grub_getwh' instead of
9147 From Vincent Pelletier <subdino2004@yahoo.fr>
9148 * include/grub/term.h (GRUB_TERM_WIDTH, GRUB_TERM_HEIGHT):
9149 Redefined to use grub_getwh.
9150 (grub_term): New member named getwh.
9151 (grub_getwh): New prototype.
9152 * kern/term.c (grub_getwh): New function.
9153 * term/i386/pc/console.c (grub_console_getwh): New function.
9154 (grub_console_term): New member `getwh'.
9155 * term/i386/pc/vga.c (grub_vga_getwh): New function.
9156 (grub_vga_term): New member `getwh'.
9157 * term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Use
9159 (grub_ofconsole_getw): New function.
9160 (grub_ofconsole_init): Use grub_ssize_t and unsigned char.
9161 (grub_ofconsole_term): New field named getwh and new initial
9164 2005-08-03 Hollis Blanchard <hollis@penguinppc.org>
9166 * include/grub/powerpc/ieee1275/ieee1275.h: Move ...
9167 * include/grub/ieee1275/ieee1275.h: ... to here. All users updated.
9168 Move `abort', `grub_reboot', and `grub_halt' prototypes ...
9169 * include/grub/powerpc/ieee1275/kernel.h: ... to here.
9170 * commands/ieee1275/halt.c: Include <grub/machine/kernel.h> instead
9171 of <grub/machine/ieee1275.h>.
9172 * commands/ieee1275/reboot.c: Likewise.
9173 * boot/powerpc/ieee1275/ieee1275.c: Move ...
9174 * kern/ieee1275.c: ... to here. All users updated. Change all
9175 parameter structs to use new type `grub_ieee1275_cell_t'.
9176 * term/powerpc/ieee1275/ofconsole.c: Move ...
9177 * term/ieee1275/ofconsole.c: ... to here. All users updated.
9178 * disk/powerpc/ieee1275/ofdisk.c: Move ...
9179 * disk/ieee1275/ofdisk.c: ... to here. All users updated.
9180 * boot/powerpc/ieee1275/cmain.c: Change `grub_ieee1275_entry_fn' type
9182 * include/grub/i386/pc/console.h: Move to include/grub/console.h.
9183 Remove unused prototypes. All users updated.
9184 * include/grub/powerpc/ieee1275/console.h: Removed.
9185 * include/grub/powerpc/ieee1275/ieee1275.h: Define
9186 `grub_ieee1275_cell_t'.
9187 * kern/powerpc/ieee1275/openfw.c: Include <grub/machine/kernel.h>.
9188 Cast comparisons with -1 to the correct type.
9189 * loader/powerpc/ieee1275/linux.c (kernel_entry_t): Change parameter
9190 type to match `grub_ieee1275_entry_fn'.
9192 2005-08-01 Yoshinori K. Okuji <okuji@enbug.org>
9194 * DISTLIST: Added util/i386/pc/grub-probefs.c.
9196 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-probefs.
9197 (grub_setup_SOURCES): Removed partmap/amiga.c, partmap/apple.c and
9199 (grub_probefs_SOURCES): New variable.
9201 * util/i386/pc/grub-probefs.c: New file.
9203 * util/i386/pc/grub-setup.c (main): Call
9204 grub_pc_partition_map_init, grub_ufs_init, grub_minix_init,
9205 grub_hfs_init and grub_jfs_init to initialize the system. Call
9206 grub_ufs_fini, grub_minix_fini, grub_hfs_fini, grub_jfs_init and
9207 grub_pc_partition_map_fini to finish the system.
9209 2005-07-31 Yoshinori K. Okuji <okuji@enbug.org>
9211 * loader/i386/pc/multiboot.c (grub_multiboot_is_elf32): New
9213 (grub_multiboot_load_elf32): Likewise.
9214 (grub_multiboot_is_elf64): Likewise.
9215 (grub_multiboot_load_elf64): Likewise.
9216 (grub_multiboot_load_elf): Likewise.
9217 (grub_rescue_cmd_multiboot): Call grub_multiboot_load_elf to load
9218 an ELF32 or ELF64 file.
9219 This is based on a patch from Ruslan Nikolaev <nruslan@mail.com>.
9221 From Serbinenko Vladimir <serbinenko.vova@list.ru>:
9222 * kern/disk.c (grub_print_partinfo): Check if FS->LABEL is not
9223 NULL before calling FS->LABEL.
9224 * fs/fat.c (grub_fat_dir): Initialize DIRNAME to NULL.
9225 * commands/ls.c (grub_ls_list_files): Show labels, if possible.
9226 (grub_ls_list_disks): Check if FS and FS->LABEL are not NULL
9227 before calling FS->LABEL.
9229 2005-07-26 Yoshinori K. Okuji <okuji@enbug.org>
9231 * util/i386/pc/grub-install.in (datadir): New variable.
9233 (pkgdatadir): New variable.
9234 (pkglibdir): Removed.
9236 2005-07-24 Yoshinori K. Okuji <okuji@enbug.org>
9238 * DISTLIST: Added util/i386/pc/grub-install.in.
9240 * util/i386/pc/grub-install.in: New file.
9242 * conf/i386-pc.rmk (sbin_SCRIPTS): New variable.
9243 (grub_install_SOURCES): Likewise.
9245 * genmk.rb: Added support for scripts.
9246 (Script): New class.
9247 (scripts): New variable.
9249 * Makefile.in (install-local): Install sbin_SCRIPTS by
9251 (uninstall): Remove sbin_SCRIPTS.
9253 * util/i386/pc/grub-setup.c (main): If the argument is not a GRUB
9254 device, try to get a GRUB device by
9255 grub_util_biosdisk_get_grub_dev.
9258 * util/i386/pc/grub-mkdevicemap.c (usage): Remove a duplicated
9259 description for --device-map.
9261 2005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
9263 Change the semantics of variable hooks. They now return strings
9264 instead of error values.
9266 * util/i386/pc/grub-setup.c: Include grub/env.h.
9267 (setup): Use grub_device_set_root instead of grub_env_set.
9269 * kern/rescue.c (grub_rescue_cmd_root): Use grub_env_set and
9270 grub_env_get instead of grub_device_set_root and
9271 grub_device_get_root, respectively.
9273 * kern/main.c (grub_env_write_root): New function.
9274 (grub_set_root_dev): Register grub_env_write_hook for "root". Use
9275 grub_env_set instead of grub_device_set_root.
9277 * kern/env.c (HASHSZ): Reduced to 13, because GRUB does not need
9279 (grub_env_set): Set ENV->VALUE to the result of ENV->WRITE_HOOK
9280 rather than calling ENV->WRITE_HOOK afterwards.
9281 (grub_env_get): Return the result of ENV->READ_HOOK rather than
9282 passing a pointer of a pointer.
9283 (grub_register_variable_hook): Change the types of "read_hook" and
9284 "write_hook" to grub_env_read_hook_t and grub_env_write_hook_t,
9286 Allocate the default empty string on the heap, because this string
9289 * kern/device.c: Include grub/env.h.
9290 (grub_device_set_root): Removed.
9291 (grub_device_get_root): Likewise.
9292 (grub_device_open): Use grub_env_get instead of
9293 grub_device_get_root.
9295 * include/grub/env.h (grub_env_read_hook_t): New type.
9296 (grub_env_write_hook_t): Likewise.
9297 (grub_env_var): Change the types of "read_hook" and "write_hook"
9298 to grub_env_read_hook_t and grub_env_write_hook_t, respectively.
9299 (grub_register_variable_hook): Likewise.
9301 * include/grub/device.h (grub_device_set_root): Removed.
9302 (grub_device_set_root): Likewise.
9304 * fs/fat.c (grub_fat_dir): Make a copy of PATH in DIRNAME, and
9305 make sure that DIRNAME terminates with '/', so that
9306 grub_fat_find_dir will fail if PATH is not a directory.
9308 * commands/ls.c (grub_ls_list_files): Remove the qualifier const
9310 Use the qualifier auto for print_files and print_files_long.
9311 If FS->DIR sets GRUB_ERRNO to GRUB_ERR_BAD_FILE_TYPE, try DIRNAME
9313 Put a newline only if there is no error.
9314 (grub_cmd_ls): Remove grub_ls_print_files, because this is not
9317 2005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
9319 * kern/partition.c (grub_partition_probe): Initialize PART to
9320 NULL. Otherwise, when no partition map is registered, this returns
9323 2005-07-19 Yoshinori K. Okuji <okuji@enbug.org>
9325 * partmap/apple.c (apple_partition_map_iterate): Check if POS
9326 equals GRUB_DISK_SECTOR_SIZE to see if the partition table is
9329 2005-07-18 Yoshinori K. Okuji <okuji@enbug.org>
9331 * commands/ls.c (grub_ls_list_disks): Print the filesystem
9332 information on each device, if it does not have partitions. Print
9333 "Device" instead of "Disk", because this function is not specific
9336 * normal/main.c (grub_rescue_cmd_normal): Make the variable CONFIG
9337 static to ensure that it is put on the memory rather than a
9340 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
9342 * commands/cat.c (GRUB_MOD_INIT): Use better documentation.
9343 (grub_cat_init): Likewise.
9344 * loader/i386/pc/chainloader_normal.c (GRUB_MOD_INIT): Likewise.
9345 (options): Likewise.
9346 * commands/configfile.c (GRUB_MOD_INIT): Likewise.
9347 (grub_configfile_init): Likewise.
9348 * font/manager.c (GRUB_MOD_INIT): Likewise.
9349 * commands/help.c (GRUB_MOD_INIT): Likewise.
9350 (grub_help_init): Likewise.
9351 * normal/command.c (grub_command_init): Likewise.
9352 * loader/i386/pc/linux_normal.c (GRUB_MOD_INIT): Likewise.
9353 * disk/loopback.c (grub_loop_init): Likewise.
9354 (GRUB_MOD_INIT): Likewise.
9355 * commands/ls.c (grub_ls_init): Likewise.
9356 (GRUB_MOD_INIT): Likewise.
9357 (options): Likewise.
9358 * commands/boot.c (grub_boot_init): Likewise.
9359 (GRUB_MOD_INIT): Likewise.
9360 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Likewise.
9361 * commands/i386/pc/reboot.c (grub_reboot_init): Likewise.
9362 (GRUB_MOD_INIT): Likewise.
9363 * commands/cmp.c (grub_cmp_init): Likewise.
9364 (GRUB_MOD_INIT): Likewise.
9366 * normal/arg.c: Use <> instead of "" to include header files.
9367 (SHORT_ARG_HELP): New macro.
9368 (SHORT_ARG_USAGE): Likewise.
9369 (help_options): Specify SHORT_ARG_HELP and SHORT_ARG_USAGE instead
9370 of 'h' and 'u' for help and usage, respectively. Use more GNU-like
9372 (find_short): Check if C is 'h' or 'u' explicitly.
9373 (grub_arg_show_help): Use space characters instead of tabs. Treat
9374 SHORT_ARG_HELP and SHORT_ARG_USAGE exceptionally so that -h and -u
9375 are shown with --help and --usage only if they are not used for
9377 (parse_option): Use SHORT_ARG_HELP and SHORT_ARG_USAGE instead of
9380 * include/grub/arg.h (struct grub_arg_option): Add the qualifier
9381 const into "longarg". Change the type of "shortarg" to int.
9383 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
9385 * boot/i386/pc/boot.S (boot_drive_check): New label.
9387 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRIVE_CHECK): New
9390 * util/i386/pc/grub-setup.c (setup): Added a workaround for BIOSes
9391 which do not pass a boot drive correctly. Copied from GRUB Legacy.
9393 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
9395 * kern/i386/pc/startup.S (gate_a20_try_system_control_port_a):
9396 When turning off Gate A20, skip the check and return immediately,
9397 because this is not fatal usually.
9399 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
9401 * conf/i386-pc.rmk (pxeboot_img_LDFLAGS): The text address should
9402 be 0x7C00 instead of 0x8000.
9404 * boot/i386/pc/pxeboot.S: Rewritten.
9406 * kern/i386/pc/startup.S (gate_a20_try_bios): No need to specify
9408 (gate_a20_check_state): Read a byte from 0x108000. Invert the
9411 2005-07-16 Yoshinori K. Okuji <okuji@enbug.org>
9413 * kern/i386/pc/startup.S (grub_gate_a20): Rewritten for
9414 robustness. This routine now supports a BIOS call and System
9415 Control Port A to modify the gate A20.
9417 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
9420 2005-07-12 Hollis Blanchard <hollis@penguinppc.org>
9422 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): dprintf the
9423 device path and resulting ihandle.
9424 (grub_ofdisk_close): dprintf the ihandle being closed.
9425 (grub_ofdisk_read): dprintf function parameters.
9426 * kern/mm.c (grub_mm_init_region): Likewise.
9427 * loader/powerpc/ieee1275/linux.c: Remove extra whitespace.
9428 (grub_linux_boot): dprintf the Linux entry point, initrd address and
9429 size, and boot arguments.
9430 (grub_rescue_cmd_linux): dprintf each ELF segment's address and size
9431 before loading into memory.
9432 (grub_rescue_cmd_initrd): dprintf the initrd's address and size
9433 before loading into memory.
9435 2005-07-12 Yoshinori K. Okuji <okuji@enbug.org>
9437 * kern/mm.c: Added much documentation.
9438 (GRUB_MM_ALIGN_LOG2): When GRUB_CPU_SIZEOF_VOID_P is
9439 8, set to 5 instead of 8.
9441 2005-07-10 Yoshinori Okuji <okuji@enbug.org>
9443 * DISTLIST: Added util/i386/pc/grub-mkimage.c.
9445 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-mkdevicemap.
9446 (grub_mkdevicemap_SOURCES): New variable.
9448 * util/i386/pc/grub-mkdevicemap.c: New file. Mostly copied from
9449 lib/device.c of GRUB Legacy.
9451 2005-07-10 Yoshinori Okuji <okuji@enbug.org>
9453 * commands/ls.c (grub_ls_list_files): Check if *PATH is NUL
9454 instead of PATH is NULL.
9456 2005-07-09 Vincent Pelletier <subdino2004@yahoo.fr>
9458 * commands/cmp.c (BUFFER_SIZE): New macro.
9459 (grub_cmd_cmp): Close the right file at the right time. Compare
9460 only data just read. Don't report files of different size as
9461 identical. Dynamically allocate buffers. Move variable
9462 declarations at the beginning of function.
9464 2005-07-09 Yoshinori Okuji <okuji@enbug.org>
9466 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): The return value was
9469 2004-07-04 Vincent Pelletier <subdino2004@yahoo.fr>
9471 * normal/cmdline.c (grub_cmdline_get): Don't fallback on ctrl-d
9472 when backspace is pressed at beginning of line.
9474 2005-07-03 Yoshinori Okuji <okuji@enbug.org>
9476 * DISTLIST: Added genfslist.sh.
9478 * normal/main.c (fs_module_list): New variable.
9479 (autoload_fs_module): New function.
9480 (read_fs_list): Likewise.
9481 (grub_normal_execute): Call read_fs_list.
9483 * kern/fs.c (grub_fs_autoload_hook): New variable.
9484 (grub_fs_probe): Added support for auto-loading.
9486 * include/grub/normal.h (struct grub_fs_module_list): New struct.
9487 (grub_fs_module_list_t): New type.
9489 * include/grub/fs.h (grub_fs_autoload_hook_t): New type.
9490 (grub_fs_autoload_hook): New prototype.
9492 * genfslist.sh: New file.
9494 * genmk.rb: Added a rule to generate a filesystem list.
9496 2005-06-30 Marco Gerards <metgerards@student.han.nl>
9498 * configure.ac: Fix the test for cross-compiling.
9500 * genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'. Don't
9501 define GRUB_UTIL anymore.
9503 * util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes
9504 so this function works on other systems than just big endian.
9505 (load_modules): Likewise.
9506 (add_segments): Likewise.
9508 2005-06-23 Hollis Blanchard <hollis@penguinppc.org>
9510 * kern/misc.c (grub_vsprintf): Add `longfmt'. If format string
9511 contains `l' modifier, get a long from va_arg().
9513 2005-06-23 Yoshinori K. Okuji <okuji@enbug.org>
9515 * kern/mm.c (grub_free): If the next free block which is being
9516 merged is the first free block, set the first block to the block
9518 Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.
9520 2005-05-08 Hollis Blanchard <hollis@penguinppc.org>
9522 * boot/powerpc/ieee1275/cmain.c (cmain): Initialize
9523 `grub_ieee1275_chosen'.
9525 2005-05-08 Hollis Blanchard <hollis@penguinppc.org>
9527 * boot/powerpc/ieee1275/cmain.c (module_info): Remove definition.
9528 (grub_ieee1275_chosen): New variable.
9529 (cmain): Initialize and use `grub_ieee1275_chosen' instead of
9531 * boot/powerpc/ieee1275/crt0.S (init_stack): Remove stack space.
9532 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
9533 Rename first argument to `phandle' for consistency.
9534 (grub_ieee1275_get_property_length): Likewise.
9535 (grub_ieee1275_next_property): Likewise. Change type of first argument
9536 to grub_ieee1275_phandle_t.
9537 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn):
9538 Move export next to declaration.
9539 (grub_ieee1275_chosen): New variable.
9540 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MODULE_BASE):
9541 Correct cosmetic typo.
9542 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Use
9543 `grub_ieee1275_chosen'.
9544 * kern/powerpc/ieee1275/openfw.c (grub_map): Likewise.
9545 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Likewise.
9546 (grub_rescue_cmd_linux): Set `initrd_addr' to 0.
9547 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_refresh): Use
9548 `grub_ieee1275_chosen'.
9550 2005-05-10 Hollis Blanchard <hollis@penguinppc.org>
9552 * boot/powerpc/ieee1275/cmain.c (cmain): Remove code to parse
9554 * kern/powerpc/ieee1275/init.c (grub_machine_init): Parse
9555 /chosen/bootargs as "variable=value" pairs.
9557 2005-05-08 Vincent Pelletier <subdino2004@yahoo.fr>
9559 * include/grub/misc.h (grub_dprintf): New macro.
9560 (grub_real_dprintf): New prototype.
9561 (grub_strword): Likewise.
9562 (grub_iswordseparator): Likewise.
9563 * kern/misc.c (grub_real_dprintf): New function.
9564 (grub_strword): Likewise.
9565 (grub_iswordseparator): Likewise.
9567 2005-04-30 Hollis Blanchard <hollis@penguinppc.org>
9569 * boot/powerpc/ieee1275/cmain.c: Don't include grub/machine/init.h.
9570 (roundup): Remove macro.
9571 (grub_ieee1275_flags): Make static.
9572 (grub_ieee1275_realmode): Remove.
9573 (grub_ieee1275_test_flag): New function.
9574 (grub_ieee1275_set_flag): Likewise.
9575 (find_options): Rename to `grub_ieee1275_find_options'; update
9576 callers. Set GRUB_IEEE1275_FLAG_REAL_MODE and
9577 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS.
9578 (cmain): New prototype.
9579 (cmain): Use `grub_ieee1275_set_flag' instead of accessing
9580 `grub_ieee1275_flags' directly.
9581 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Remove
9583 * disk/powerpc/ieee1275/ofdisk.c: Include grub/machine/ofdisk.h.
9584 Don't include grub/machine/init.h.
9585 (grub_ofdisk_open): Call `grub_ieee1275_test_flag'.
9586 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
9588 (grub_ieee1275_realmode): Likewise.
9589 (grub_ieee1275_flag): New enum.
9590 (grub_ieee1275_test_flag): New prototype.
9591 (grub_ieee1275_set_flag): New prototype.
9592 * include/grub/powerpc/ieee1275/init.h: Remove file.
9593 * include/grub/powerpc/ieee1275/ofdisk.h: New file.
9594 * kern/powerpc/ieee1275/init.c: Don't include grub/machine/init.h.
9595 Include grub/machine/console.h. Include grub/machine/ofdisk.h.
9596 (grub_machine_fini): Don't call `grub_ieee1275_release'. Remove
9598 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Call
9599 `grub_ieee1275_test_flag'.
9600 (grub_ieee1275_encode_devname): Likewise.
9602 2005-04-21 Hollis Blanchard <hollis@penguinppc.org>
9604 * include/grub/powerpc/ieee1275/ieee1275.h
9605 (grub_ieee1275_encode_devname): New prototype.
9606 (grub_ieee1275_get_filename): Likewise.
9607 * kern/powerpc/ieee1275/init.c (grub_translate_ieee175_path): New
9609 (grub_set_prefix): Likewise.
9610 (grub_machine_init): Call grub_set_prefix.
9611 * kern/powerpc/ieee1275/openfw.c: Fix typos.
9612 (grub_parse_type): New enum.
9613 (grub_ieee1275_get_devargs): New function.
9614 (grub_ieee1275_get_devname): Likewise.
9615 (grub_ieee1275_parse_args): Likewise.
9616 (grub_ieee1275_get_filename): Likewise.
9617 (grub_ieee1275_encode_devname): Likewise.
9619 2005-03-30 Marco Gerards <metgerards@student.han.nl>
9621 * kern/powerpc/ieee1275/init.c (grub_machine_fini): Don't call
9622 `grub_loader_unset'.
9624 2005-03-26 Hollis Blanchard <hollis@penguinppc.org>
9626 * commands/ieee1275/halt.c (grub_cmd_halt): Call grub_halt
9627 instead of grub_ieee1275_interpret.
9628 (grub_halt_init): New function.
9629 (grub_halt_fini): Likewise.
9630 (GRUB_MOD_INIT): Correct message grammar.
9631 * commands/ieee1275/reboot.c (grub_cmd_reboot): Call grub_reboot
9632 instead of grub_ieee1275_interpret.
9633 (grub_reboot_init): New function.
9634 (grub_reboot_fini): Likewise.
9635 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace
9636 commands/i386/pc/halt.c, commands/i386/pc/reboot.c, and
9637 util/i386/pc/misc.c with commands/ieee1275/halt.c,
9638 commands/ieee1275/reboot.c, and util/powerpc/ieee1275/misc.c.
9639 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_fini): New
9641 * include/grub/powerpc/ieee1275/console.h (grub_console_fini):
9643 * include/grub/powerpc/ieee1275/ieee1275.h (grub_reboot): Add
9645 (grub_halt): Likewise.
9646 * include/grub/powerpc/ieee1275/init.h: Remove inaccurate comment.
9647 (cmain): Remove __attribute__((unused)).
9648 * kern/powerpc/ieee1275/init.c (grub_heap_start): New variable.
9649 (grub_heap_len): Likewise.
9650 (grub_machine_fini): New function.
9651 * kern/powerpc/ieee1275/openfw.c (grub_reboot): New function.
9652 (grub_halt): Likewise.
9653 * term/powerpc/ieee1275/ofconsole.c (grub_console_fini): New
9655 * util/powerpc/ieee1275/misc.c: New file.
9657 2005-03-19 Yoshinori K. Okuji <okuji@enbug.org>
9659 * DISTLIST: New file.
9660 * gendistlist.sh: Likewise.
9662 * Makefile.in (COMMON_DISTFILES): Removed.
9663 (BOOT_DISTFILES): Likewise.
9664 (CONF_DISTFILES): Likewise.
9665 (DISK_DISTFILES): Likewise.
9666 (FS_DISTFILES): Likewise.
9667 (INCLUDE_DISTFILES): Likewise.
9668 (KERN_DISTFILES): Likewise.
9669 (LOADER_DISTFILES): Likewise.
9670 (TERM_DISTFILES): Likewise.
9671 (UTIL_DISTFILES): Likewise.
9672 (DISTFILES): Likewise.
9673 (uninstall): Uninstall files in $(pkgdata_DATA).
9674 (DISTLIST): New target.
9675 (distdir): Use the contents of the file DISTLIST to get a list of
9678 2005-03-18 Yoshinori K. Okuji <okuji@enbug.org>
9680 * fs/fat.c (grub_fat_mount): Ignore the 3rd bit of a media
9681 descriptor. This is ported from GRUB Legacy.
9683 * gencmdlist.sh: Added an extra semicolon to make it work with
9684 old sed versions. Reported by Robert Bihlmeyer
9685 <robbe@orcus.priv.at>.
9687 2005-03-08 Yoshinori Okuji <okuji@enbug.org>
9689 Automatic loading of commands is supported.
9691 * normal/main.c (read_command_list): New function.
9692 (grub_normal_execute): Call read_command_list.
9694 * normal/command.c (grub_register_command): Return zero or CMD.
9695 Allocate CMD->NAME from the heap.
9696 Initialize CMD->MODULE_NAME to zero.
9697 Find the same name as well. If the same command is found and it is
9698 a dummy command, overwrite members. If it is not a dummy command,
9700 (grub_unregister_command): Free Q->NAME and Q->MODULE_NAME.
9701 (grub_command_find): If a dummy command is found, load a module
9702 and retry to find a command only once.
9704 * normal/cmdline.c (grub_tab_complete): Call grub_command_find to
9705 make sure that each command is loaded.
9707 * include/grub/normal.h (GRUB_COMMAND_FLAG_NOT_LOADED): New
9709 (struct grub_command): Remove const from the member `name'.
9710 Add a new member `module_name'.
9711 (grub_register_command): Return grub_command_t.
9713 * commands/help.c (grub_cmd_help): Call grub_command_find to make
9714 sure that each command is loaded.
9716 * genmk.rb (PModule::rule): Specify a module name without the
9717 suffix ".mod" to gencmdlist.sh.
9719 2005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
9721 * gencmdlist.sh: New file.
9723 * genmk.rb (PModule::rule): Generate a rule for a command list.
9725 Generate command.lst from $(COMMANDFILES).
9727 * Makefile.in (COMMON_DISTFILES): Added gencmdlist.sh.
9728 (DATA): Added $(pkgdata_DATA).
9729 (install-local): Install files in $(pkgdata_DATA).
9731 2005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
9733 * term/i386/pc/vga.c (debug_command): Removed.
9734 (GRUB_MOD_INIT): Do not register the command "debug".
9736 From Hollis Blanchard:
9737 * commands/configfile.c: New file.
9738 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
9739 commands/configfile.c.
9740 (pkgdata_MODULES): Added configfile.mod.
9741 (configfile_mod_SOURCES): New variable.
9742 (configfile_mod_CFLAGS): Likewise.
9743 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
9744 commands/configfile.c.
9745 (pkgdata_MODULES): Added configfile.mod.
9746 (configfile_mod_SOURCES): New variable.
9747 (configfile_mod_CFLAGS): Likewise.
9748 * util/grub-emu.c (main): Call grub_configfile_init and
9749 grub_configfile_fini.
9750 * include/grub/normal.h [GRUB_UTIL] (grub_configfile_init): New
9752 [GRUB_UTIL] (grub_configfile_fini): Likewise.
9754 2005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
9756 * normal/arg.c (grub_arg_show_help): Do not show the bug report
9759 * commands/help.c (grub_cmd_help): Do not print newlines after
9760 the last command in print_command_help.
9762 2005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
9764 * commands/default.h: New file.
9765 * commands/timeout.h: Likewise.
9766 * normal/context.c: Likewise.
9768 * util/misc.c: Do not include sys/times.h.
9769 Include sys/time.h and grub/machine/time.h.
9770 (grub_get_rtc): Rewritten with gettimeofday.
9772 * util/grub-emu.c (main): Call grub_default_init and
9773 grub_timeout_init before grub_normal_init, and call
9774 grub_timeout_fini and grub_default_fini after grub_main.
9776 * util/console.c (grub_ncurses_checkkey): Return the read
9779 * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it
9782 * normal/main.c (read_config_file): Push MENU. If this fails,
9783 print an error and wait for a user input.
9784 Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE.
9785 If a menu is empty or an error occurs, pop MENU.
9786 (grub_normal_execute): Pop and free MENU after grub_menu_run
9789 * kern/loader.c (grub_loader_boot): Call grub_machine_fini.
9791 * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not
9793 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
9795 * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include
9797 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
9800 * include/grub/normal.h (struct grub_menu_list): New struct.
9801 (grub_menu_list_t): New type.
9802 (struct grub_context): New struct.
9803 (grub_context_t): New type.
9804 (grub_register_command): Got rid of EXPORT_FUNC.
9805 (grub_unregister_command): Likewise.
9806 (grub_context_get): New prototype.
9807 (grub_context_get_current_menu): Likewise.
9808 (grub_context_push_menu): Likewise.
9809 (grub_context_pop_menu): Likewise.
9810 [GRUB_UTIL] (grub_default_init): Likewise.
9811 [GRUB_UTIL] (grub_default_fini): Likewise.
9812 [GRUB_UTIL] (grub_timeout_init): Likewise.
9813 [GRUB_UTIL] (grub_timeout_fini): Likewise.
9815 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c,
9816 commands/timeout.c and normal/context.c.
9817 (pkgdata_MODULES): Added default.mod and timeout.mod.
9818 (normal_mod_SOURCES): Added normal/context.c.
9819 (default_mod_SOURCES): New variable.
9820 (default_mod_CFLAGS): Likewise.
9821 (timeout_mod_SOURCES): Likewise.
9822 (timeout_mod_CFLAGS): Likewise.
9823 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from
9825 (pkgdata_MODULES): Added default.mod and timeout.mod.
9826 (normal_mod_SOURCES): Added normal/context.c.
9827 (default_mod_SOURCES): New variable.
9828 (default_mod_CFLAGS): Likewise.
9829 (timeout_mod_SOURCES): Likewise.
9830 (timeout_mod_CFLAGS): Likewise.
9832 * Makefile.in (all-local): Added $(MKFILES).
9834 2005-02-21 Vincent Pelletier <subdino2004@yahoo.fr>
9836 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `partmap/sun.c'.
9837 (grub_emu_SOURCES): Likewise.
9838 (pkgdata_MODULES): Add `sun.mod'.
9839 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
9840 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
9842 (pkgdata_MODULES): Add `sun.mod'.
9843 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
9844 * include/grub/partition.h (grub_sun_partition_map_init): New
9846 (grub_sun_partition_map_fini): Likewise.
9847 * partmap/sun.c: New file.
9848 * util/grub-emu.c (main): Initialize and de-initialize the sun
9849 partitionmap support.
9851 2005-02-19 Yoshinori K. Okuji <okuji@enbug.org>
9853 This implements an Emacs-like menu entry editor.
9855 * normal/menu_entry.c: New file.
9857 * util/console.c (grub_ncurses_putchar): Translate some Unicode
9858 characters to ASCII.
9859 (saved_char): New variable.
9860 (grub_ncurses_checkkey): Rewritten completely.
9861 (grub_ncurses_getkey): Likewise.
9862 (grub_ncurses_init): Call raw instead of cbreak.
9864 * normal/menu.c (print_entry): Do not put a space.
9865 (init_page): Renamed to ...
9866 (grub_menu_init_page): ... this. All callers changed.
9867 (edit_menu_entry): Removed.
9868 (run_menu): Call grub_menu_entry_run instead of edit_menu_entry.
9870 * normal/cmdline.c (grub_cmdline_run): Call grub_setcursor.
9872 * kern/misc.c (grub_vprintf): Call grub_refresh.
9874 * normal/menu.c (DISP_LEFT): Renamed to ...
9875 * include/grub/term.h (GRUB_TERM_DISP_LEFT): ... this.
9876 * normal/menu.c (DISP_UP): Renamed to ...
9877 * include/grub/term.h (GRUB_TERM_DISP_UP): ... this.
9878 * normal/menu.c (DISP_RIGHT): Renamed to ...
9879 * include/grub/term.h (GRUB_TERM_DISP_RIGHT): ... this.
9880 * normal/menu.c (DISP_DOWN): Renamed to ...
9881 * include/grub/term.h (GRUB_TERM_DISP_DOWN): ... this.
9882 * normal/menu.c (DISP_HLINE): Renamed to ...
9883 * include/grub/term.h (GRUB_TERM_DISP_HLINE): ... this.
9884 * normal/menu.c (DISP_VLINE): Renamed to ...
9885 * include/grub/term.h (GRUB_TERM_DISP_VLINE): ... this.
9886 * normal/menu.c (DISP_UL): Renamed to ...
9887 * include/grub/term.h (GRUB_TERM_DISP_UL): ... this.
9888 * normal/menu.c (DISP_UR): Renamed to ...
9889 * include/grub/term.h (GRUB_TERM_DISP_UR): ... this.
9890 * normal/menu.c (DISP_LL): Renamed to ...
9891 * include/grub/term.h (GRUB_TERM_DISP_LL): ... this.
9892 * normal/menu.c (DISP_LR): Renamed to ...
9893 * include/grub/term.h (GRUB_TERM_DISP_LR): ... this.
9894 * normal/menu.c (TERM_WIDTH): Renamed to ...
9895 * include/grub/term.h (GRUB_TERM_WIDTH): ... this.
9896 * normal/menu.c (TERM_HEIGHT): Renamed to ...
9897 * include/grub/term.h (GRUB_TERM_HEIGHT): ... this.
9898 * normal/menu.c (TERM_INFO_HEIGHT): Renamed to ...
9899 * include/grub/term.h (GRUB_TERM_INFO_HEIGHT): ... this.
9900 * normal/menu.c (TERM_MARGIN): Renamed to ...
9901 * include/grub/term.h (GRUB_TERM_MARGIN): ... this.
9902 * normal/menu.c (TERM_SCROLL_WIDTH): Renamed to ...
9903 * include/grub/term.h (GRUB_TERM_SCROLL_WIDTH): ... this.
9904 * normal/menu.c (TERM_TOP_BORDER_Y): Renamed to ...
9905 * include/grub/term.h (GRUB_TERM_TOP_BORDER_Y): ... this.
9906 * normal/menu.c (TERM_LEFT_BORDER_X): Renamed to ...
9907 * include/grub/term.h (GRUB_TERM_LEFT_BORDER_X): ... this.
9908 * normal/menu.c (TERM_BORDER_WIDTH): Renamed to ...
9909 * include/grub/term.h (GRUB_TERM_BORDER_WIDTH): ... this.
9910 * normal/menu.c (TERM_MESSAGE_HEIGHT): Renamed to ...
9911 * include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): ... this.
9912 * normal/menu.c (TERM_BORDER_HEIGHT): Renamed to ...
9913 * include/grub/term.h (GRUB_TERM_BORDER_HEIGHT): ... this.
9914 * normal/menu.c (TERM_NUM_ENTRIES): Renamed to ...
9915 * include/grub/term.h (GRUB_TERM_NUM_ENTRIES): ... this.
9916 * normal/menu.c (TERM_FIRST_ENTRY_Y): Renamed to ...
9917 * include/grub/term.h (GRUB_TERM_FIRST_ENTRY_Y): ... this.
9918 * normal/menu.c (TERM_ENTRY_WIDTH): Renamed to ...
9919 * include/grub/term.h (GRUB_TERM_ENTRY_WIDTH): ... this.
9920 * normal/menu.c (TERM_CURSOR_X): Renamed to ...
9921 * include/grub/term.h (GRUB_TERM_CURSOR_X): ... this.
9922 All callers changed.
9924 * include/grub/normal.h: New prototype.
9926 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
9927 normal/menu_entry.c.
9928 (normal_mod_SOURCES): Likewise.
9929 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9930 (normal_mod_SOURCES): Likewise.
9932 2005-02-15 Yoshinori K. Okuji <okuji@enbug.org>
9934 * include/grub/normal.h (grub_halt_init): New prototype.
9935 (grub_halt_fini): Likewise.
9936 (grub_reboot_init): Likewise.
9937 (grub_reboot_fini): Likewise.
9939 * util/grub-emu.c: Include signal.h.
9940 (main_env): New global variable.
9941 (grub_machine_init): Ignore SIGINT. Otherwise grub-emu cannot
9943 (grub_machine_fini): New function.
9944 (main): Call grub_halt_init and grub_reboot_init before
9945 grub_main, and grub_reboot_fini and grub_halt_fini after it.
9946 Call setjmp with MAIN_ENV to go back afterwards.
9947 Call grub_machine_fini right before return.
9949 * include/grub/util/misc.h: Include setjmp.h.
9950 (main_env): New prototype.
9952 * include/grub/kernel.h (grub_machine_fini): New prototype.
9953 * include/grub/i386/pc/biosdisk.h (grub_biosdisk_fini): Likewise.
9954 * include/grub/i386/pc/console.h (grub_console_fini): Likewise.
9956 * disk/i386/pc/biosdisk.c (grub_biosdisk_fini): New function.
9957 * kern/i386/pc/init.c (grub_machine_fini): Likewise.
9958 * term/i386/pc/console.c (grub_console_fini): Likewise.
9960 * util/i386/pc/misc.c: New file.
9962 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
9963 util/i386/pc/misc.c, commands/i386/pc/halt.c and
9964 commands/i386/pc/reboot.c.
9966 2005-02-14 Guillem Jover <guillem@hadrons.org>
9968 * include/grub/dl.h (grub_dl_check_header): New prototype.
9969 (grub_arch_dl_check_header): Change return type to grub_err_t,
9970 remove size parameter and export function. Update all callers.
9971 * kern/dl.c (grub_dl_check_header): New function.
9972 (grub_dl_load_core): Use `grub_dl_check_header' instead of
9973 `grub_arch_dl_check_header'. Check ELF type. Check if sections
9974 are inside the core.
9975 * kern/i386/dl.c (grub_arch_dl_check_header): Remove arch
9976 independent ELF header checks.
9977 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
9978 * loader/i386/pc/multiboot.c (grub_rescue_cmd_multiboot): Use
9979 `grub_dl_check_header' instead of explicit checks. Check for the
9981 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Use
9982 `grub_dl_check_header' instead of explicit checks. Remove arch
9983 specific ELF header checks.
9985 * util/grub-emu.c (grub_arch_dl_check_header): Remove the
9988 2005-02-13 Hollis Blanchard <hollis@penguinppc.org>
9990 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add ls.mod.
9991 * include/grub/powerpc/libgcc.h (__mulsf3): New prototype.
9993 2005-02-12 Hollis Blanchard <hollis@penguinppc.org>
9995 * kern/partition.c (grub_partition_probe): Clear `grub_errno' and
9996 return 0 if `grub_errno' is GRUB_ERR_BAD_PART_TABLE.
9997 (part_map_iterate): Clear `grub_errno' and return 0 if
9998 `partmap->iterate' returns GRUB_ERR_BAD_PART_TABLE.
9999 * partmap/amiga.c (amiga_partition_map_iterate): Return
10000 GRUB_ERR_BAD_PART_TABLE if no partition map magic is found.
10001 * partmap/apple.c (apple_partition_map_iterate): Likewise.
10003 2005-02-01 Guillem Jover <guillem@hadrons.org>
10005 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Fix module
10008 2005-01-31 Marco Gerards <metgerards@student.han.nl>
10010 * include/grub/powerpc/ieee1275/loader.h (grub_load_linux):
10012 (grub_rescue_cmd_linux): New prototype.
10013 (grub_rescue_cmd_initrd): Likewise.
10014 * powerpc/ieee1275/linux.c (grub_linux_boot): Remove struct
10016 (grub_linux_release_mem): Release the memory for the initrd.
10017 (grub_load_linux): Renamed from this...
10018 (grub_rescue_cmd_linux): ...To this. Changed all callers.
10019 Changed `entry' not to be static. Loop over memory regions to
10020 find another one when the default fails.
10021 (grub_rescue_cmd_initrd): New function.
10022 (grub_linux_init): Remove function.
10023 (grub_linux_fini): Likewise.
10024 (GRUB_MOD_INIT): Register `initrd'.
10025 (GRUB_MOD_FINI): Unregister `initrd'.
10026 * powerpc/ieee1275/linux_normal.c (grub_linux_normal_init):
10028 (grub_linux_normal_fini): Likewise.
10029 (GRUB_MOD_INIT): Register `initrd'.
10030 (GRUB_MOD_FINI): Unregister `initrd'.
10032 2005-01-31 Marco Gerards <metgerards@student.han.nl>
10034 * commands/help.c: New file.
10035 * normal/arg.c (show_help): Renamed to...
10036 (grub_arg_show_help): ... this.
10037 * commands/i386/pc/halt.c: New file.
10038 * commands/i386/pc/reboot.c: Likewise.
10039 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/help.c'.
10040 (pkgdata_MODULES): Add `reboot.mod', `halt.mod' and `help.mod'.
10041 (help_mod_SOURCES, help_mod_CFLAGS, reboot_mod_SOURCES)
10042 (reboot_mod_CFLAGS, halt_mod_SOURCES, halt_mod_CFLAGS): New
10044 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
10046 (pkgdata_MODULES): Add `help.mod'.
10047 (help_mod_SOURCES, help_mod_CFLAGS): New variables.
10048 * grub/i386/pc/init.h (grub_reboot): New prototype.
10049 (grub_halt): Likewise.
10050 * include/grub/normal.h (grub_arg_show_help): New prototype.
10051 (grub_help_init): Likewise.
10052 (grub_help_fini): Likewise.
10053 * util/grub-emu.c (main): Initialize and deinitialize the help
10056 * normal/cmdline.c (grub_cmdline_get): Doc fix.
10058 * normal/command.c (grub_command_init): Fixed the description of
10059 the `set' and `unset' commands.
10061 2005-01-31 Marco Gerards <metgerards@student.han.nl>
10063 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_interpret): New
10065 * commands/ieee1275/halt.c: New file.
10066 * commands/ieee1275/reboot.c: Likewise.
10067 * commands/ieee1275/suspend.c (grub_cmd_suspend): Use
10068 `__attribute__ ((unused))'. Some GCS related fixed.
10069 (grub_suspend_init) [GRUB_UTIL]: Function removed.
10070 (grub_suspend_fini): Likewise.
10071 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add `reboot.mod'
10073 (reboot_mod_SOURCES, reboot_mod_CFLAGS, halt_mod_SOURCES)
10074 (halt_mod_CFLAGS): New variables.
10075 * include/grub/powerpc/ieee1275/ieee1275.h
10076 (grub_ieee1275_interpret): New prototype.
10078 2005-01-29 Yoshinori K. Okuji <okuji@enbug.org>
10080 * include/grub/misc.h (memmove): New prototype.
10081 (memcpy): Likewise.
10083 2005-01-22 Hollis Blanchard <hollis@penguinppc.org>
10085 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
10086 `devpath' to 0. Use `name' instead of `devpath' with `grub_strndup'.
10088 2005-01-22 Marco Gerards <metgerards@student.han.nl>
10090 * kern/misc.c (grub_strndup): Function rewritten.
10092 2005-01-22 Vincent Pelletier <subdino2004@yahoo.fr>
10094 * normal/menu.c (TERM_WIDTH): Macro redefined.
10095 (TERM_TOP_BORDER_Y): Likewise.
10096 (draw_border): Replaced while-loop by a for-loop. Make the number
10097 of lines consistent with the number of lines displayed in
10098 print_entries. Added a margin below the rectangle.
10099 (print_entry): Make the entry fit in the rectangle.
10100 (print_entries): Display the scroll arrows next to the right
10103 2005-01-21 Marco Gerards <metgerards@student.han.nl>
10105 * fs/minix.c (grub_minix_find_file): Reserve more space for
10106 `fpath' so the \0 can be stored. Use `grub_strcpy' instead of
10107 `grub_strncpy' to copy `path' into it.
10109 2005-01-21 Marco Gerards <metgerards@student.han.nl>
10111 Add the loopback device, a device via which files can be accessed
10114 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/loopback.c'.
10115 (pkgdata_MODULES): Add loopback.mod.
10116 (loopback_mod_SOURCES): New variable.
10117 (loopback_mod_CFLAGS): Likewise.
10118 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
10120 (pkgdata_MODULES): Add loopback.mod.
10121 (loopback_mod_SOURCES): New variable.
10122 (loopback_mod_CFLAGS): Likewise.
10123 * disk/loopback.c: new file.
10124 * include/grub/normal.h (grub_loop_init): New prototype.
10125 (grub_loop_fini): New prototype.
10126 * util/grub-emu.c (main): Initialize and de-initialize loopback
10128 * include/grub/disk.h (grub_disk_dev_id): Add
10129 `GRUB_DISK_DEVICE_LOOPBACK_ID'.
10131 2005-01-20 Hollis Blanchard <hollis@penguinppc.org>
10133 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_enter): New
10135 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add suspend.mod.
10136 (suspend_mod_SOURCES): New variable.
10137 (suspend_mod_CFLAGS): Likewise.
10138 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_enter):
10140 * commands/ieee1275/suspend.c: New file.
10142 2005-01-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
10144 * include/grub/dl.h (GRUB_MOD_INIT): Changed `__attribute__
10145 ((unused))' to `__attribute__ ((used))'.
10146 (GRUB_MOD_FINI): Likewise.
10147 * kern/dl.c (grub_dl_load_file): Fix null pointer dereference.
10148 * genmk.rb (PModule): Assign space to common symbols when linking
10151 2005-01-20 Marco Gerards <metgerards@student.han.nl>
10153 * include/grub/mm.h (grub_mm_init_region): Change the type of the
10154 `unsigned' arguments to `grub_size_t'.
10155 (grub_malloc): Likewise.
10156 (grub_realloc): Likewise.
10157 (grub_memalign): Likewise.
10158 * kern/i386/dl.c (grub_arch_dl_check_header): Likewise.
10159 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
10160 * util/misc.c (grub_malloc): Likewise.
10161 (grub_realloc): Likewise.
10162 * kern/mm.c (get_header_from_pointer): Change the casts to
10163 `unsigned' into a cast to `grub_size_t'.
10165 * fs/fshelp.c (grub_fshelp_find_file): The `oldnode' should always
10166 point to `currnode' when `currnode' is changed.
10168 * util/grub-emu.c (main): Initialize `progname'. Reported by Nico
10169 Schottelius <nico-linux@schottelius.org>.
10171 2005-01-09 Hollis Blanchard <hollis@penguinppc.org>
10173 * util/powerpc/ieee1275/grub-mkimage.c: Include <string.h>.
10174 (note_path): Remove variable.
10175 (GRUB_IEEE1275_NOTE_NAME): New macro.
10176 (GRUB_IEEE1275_NOTE_TYPE): Likewise.
10177 (grub_ieee1275_note_hdr): New structure.
10178 (grub_ieee1275_note_desc): Likewise.
10179 (grub_ieee1275_note): Likewise.
10180 (load_note): Remove `dir' argument. All callers updated. Remove
10181 `note_img' and `path'. Do not load a file from `note_path'.
10182 Initialize a struct grub_ieee1275_note and write that to `out'.
10183 Use GRUB_IEEE1275_MODULE_BASE instead of MODULE_BASE.
10185 2005-01-05 Marco Gerards <metgerards@student.han.nl>
10187 * util/misc.c (grub_util_read_image): Revert last change. It
10188 called `grub_util_read_at', which seeks from the beginning of the
10191 2005-01-04 Hollis Blanchard <hollis@penguinppc.org>
10193 * TODO: Add note about endianness in grub-mkimage.
10194 * boot/powerpc/ieee1275/crt0.S (note): Remove unused .note
10196 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Add grub-mkimage.
10197 (grub_mkimage_SOURCES): New target.
10198 * include/grub/kernel.h (grub_start_addr): Remove variable.
10199 (grub_end_addr): Likewise.
10200 (grub_total_module_size): Likewise.
10201 (grub_kernel_image_size): Likewise.
10202 (GRUB_MODULE_MAGIC): New constant.
10203 (grub_module_info): New structure.
10204 (grub_arch_modules_addr): New prototype.
10205 (grub_get_end_addr): Remove prototype.
10206 * include/grub/i386/pc/kernel.h (grub_end_addr): New prototype.
10207 * include/grub/powerpc/ieee1275/kernel.h: New file.
10208 * include/grub/util/misc.h (grub_util_get_fp_size): New
10210 (grub_util_read_at): Likewise.
10211 (grub_util_write_image_at): Likewise.
10212 * kern/main.c (grub_get_end_addr): Remove function.
10213 (grub_load_modules): Call grub_arch_modules_addr instead of using
10214 grub_end_addr. Look for a grub_module_info struct in memory. Use
10215 the grub_module_info fields instead of calling grub_get_end_addr
10216 as loop conditions. Move grub_add_unused_region code here.
10217 (grub_add_unused_region): Remove function.
10218 * kern/i386/pc/init.c: Include grub/cache.h.
10219 (grub_machine_init): Remove call to grub_get_end_addr. Remove
10220 one call to add_mem_region.
10221 (grub_arch_modules_addr): New function.
10222 * kern/powerpc/ieee1275/init.c (grub_end_addr): Remove variable.
10223 (grub_total_module_size): Likewise.
10224 Include grub/machine/kernel.h.
10225 (grub_arch_modules_addr): New function.
10226 * util/grub-emu.c (grub_end_addr): Remove variable.
10227 (grub_total_module_size): Likewise.
10228 (grub_arch_modules_addr): New function.
10229 * util/misc.c: Include unistd.h.
10230 (grub_util_get_fp_size): New function.
10231 (grub_util_read_at): Likewise.
10232 (grub_util_write_image_at): Likewise.
10233 (grub_util_read_image): Call grub_util_read_at.
10234 (grub_util_write_image): Call grub_util_write_image_at.
10235 * util/i386/pc/grub-mkimage.c (generate_image): Allocate
10236 additional memory in kernel_img for a struct grub_module_info.
10237 Fill in that grub_module_info.
10238 * util/powerpc/ieee1275/grub-mkimage.c: New file.
10240 2005-01-03 Hollis Blanchard <hollis@penguinppc.org>
10242 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_milliseconds):
10244 * include/grub/powerpc/ieee1275/ieee1275.h
10245 (grub_ieee1275_milliseconds): New prototype.
10246 * include/grub/powerpc/ieee1275/time.h (GRUB_TICKS_PER_SECOND):
10248 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Call
10249 grub_ieee1275_milliseconds.
10251 2005-01-03 Hollis Blanchard <hollis@penguinppc.org>
10253 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_realmode): New
10255 (find_options): New function.
10256 (cmain): Call find_options.
10257 * include/grub/powerpc/ieee1275/ieee1275.h
10258 (grub_ieee1275_realmode): New extern variable.
10259 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Only call
10260 grub_map if grub_ieee1275_realmode is false.
10262 2004-12-29 Marco Gerards <metgerards@student.han.nl>
10264 * normal/cmdline.c (grub_cmdline_get): Redone logic so no empty
10265 lines are inserted and make it work like readline. Reported by
10266 Vincent Pelletier <subdino2004@yahoo.fr>.
10268 2004-12-28 Marco Gerards <metgerards@student.han.nl>
10270 * boot/powerpc/ieee1275/crt0.S (_start): Don't set up the stack.
10272 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCE): Remove
10273 `kern/powerpc/cache.S'.
10275 2004-12-27 Marco Gerards <metgerards@student.han.nl>
10277 * genmk.rb: Handle the `Program' class in the main loop. Written
10278 by Johan Rydberg <jrydberg@gnu.org>.
10279 (Program): New class.
10280 (programs): New variable.
10281 * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h>
10282 instead of "grub/machine/ieee1275.h". Include <grub/kernel.h>
10283 instead of "grub/kernel.h". Include <grub/machine/init.h>.
10284 (help_arch): Function removed.
10285 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add
10286 `powerpc/libgcc.h' and `loader.h'.
10287 (pkgdata_PROGRAMS): New variable.
10288 (sbin_UTILITIES): Variable removed.
10289 (grub_emu_SOURCES): Added kern/powerpc/cache.S.
10290 (grubof_SOURCES): Variable re-defined so it only includes the
10291 core functionality.
10292 (grubof_CFLAGS): Remove `-DGRUBOF'.
10293 (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS,
10294 (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES)
10295 (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS)
10296 (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES)
10297 (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS)
10298 (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES)
10299 (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS)
10300 (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS)
10301 (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES)
10302 (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS)
10303 (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
10304 (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES)
10305 (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS)
10306 (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES)
10307 (pc_mod_CFLAGS): New variables.
10308 * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>.
10309 (grub_ofdisk_iterate): Add a prototype for `dev_iterate'.
10310 * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype.
10311 * include/grub/loader.h (grub_os_area_addr, grub_os_area_size):
10313 * include/grub/i386/pc/init.h (grub_os_area_addr)
10314 (rub_os_area_size): ... to here.
10315 * include/grub/powerpc/ieee1275/ieee1275.h
10316 (grub_ieee1275_entry_fn): Export symbol.
10317 * include/grub/powerpc/ieee1275/init.h: New file.
10318 * include/grub/powerpc/libgcc.h: Likewise.
10319 * include/grub/cache.h: Likewise.
10320 * kern/powerpc/cache.S: Likewise. Written by Hollis Blanchard
10321 <hollis@penguinppc.org>.
10322 * kern/dl.c: Include <grub/cache.h>.
10323 (grub_dl_flush_cache): New function.
10324 (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache
10326 * kern/powerpc/ieee1275/init.c (grub_ofdisk_init)
10327 (grub_console_init): Removed prototypes.
10328 (grub_machine_init): Don't initialize the modules anymore.
10329 * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function
10331 * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN):
10332 Macro undef removed.
10333 (GRUB_HOST_WORDS_BIGENDIAN): New macro.
10334 * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add
10335 relocation `R_PPC_REL32'. Return an error when the relocation is
10337 * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'.
10338 * kern/i386/pc/init.c (grub_arch_sync_caches): New function.
10339 * util/misc.c (grub_arch_sync_caches): Likewise.
10341 2004-12-19 Marco Gerards <metgerards@student.han.nl>
10343 * conf/powerpc-ieee1275.rmk (MOSTLYCLEANFILES): Remove
10344 `symlist.c', add `grubof_symlist.c'.
10345 (symlist.c): Variable removed.
10346 (grubof_HEADERS): Variable added.
10347 (grubof_symlist.c): New target.
10348 (kernel_syms.lst): Use `grubof_HEADERS' instead of
10349 `kernel_img_HEADERS'.
10350 (grubof_SOURCES): Add `kern/powerpc/dl.c' and `grubof_symlist.c'.
10351 * kern/powerpc/dl.c: New file.
10352 * kern/powerpc/ieee1275/init.c (grub_arch_dl_check_header):
10354 (grub_arch_dl_relocate_symbols): Likewise.
10355 (grub_register_exported_symbols): Likewise.
10357 2004-12-13 Marco Gerards <metgerards@student.han.nl>
10359 * fs/ext2.c (grub_ext2_open): Don't use data after freeing it.
10360 (grub_ext2_dir): Likewise. Don't return in case of an error, jump
10361 to fail instead. Reported by Vincent Pelletier
10362 <subdino2004@yahoo.fr>.
10364 * fs/fshelp.c (grub_fshelp_find_file): Don't free `oldnode' when
10365 it is not allocated. Reported by Vincent Pelletier
10366 <subdino2004@yahoo.fr>.
10368 * normal/cmdline.c (grub_tab_complete): Add a blank line to the
10369 output so the output looks better.
10371 2004-12-04 Marco Gerards <metgerards@student.han.nl>
10373 Modulize the partition map support and add support for the amiga
10376 * commands/ls.c: Include <grub/partition.h> instead of
10377 <grub/machine/partition.h>.
10378 * kern/disk.c: Likewise.
10379 * kern/rescue.c: Likewise.
10380 * loader/i386/pc/chainloader.c: Likewise.
10381 * normal/cmdline.c: Likewise.
10382 * kern/powerpc/ieee1275/init.c: Likewise.
10383 (grub_machine_init): Call `grub_pc_partition_map_init',
10384 `grub_amiga_partition_map_init' and
10385 `grub_apple_partition_map_init'.
10386 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove
10387 `disk/i386/pc/partition.c'. Add `kern/partition.c'.
10388 (kernel_img_HEADERS): Remove `machine/partition.h'. Add
10389 `partition.h' and `pc_partition.h'.
10390 (grub_setup_SOURCES): Remove
10391 `disk/i386/pc/partition.c'. Add `kern/partition.c',
10392 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
10393 (grub_emu_SOURCES): Likewise.
10394 (pkgdata_MODULES): Add `amiga.mod', `apple.mod' and `pc.mod'.
10395 (amiga_mod_SOURCES, amiga_mod_CFLAGS, apple_mod_SOURCES)
10396 (apple_mod_CFLAGS, pc_mod_SOURCES, pc_mod_CFLAGS): New variables.
10397 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
10398 `disk/powerpc/ieee1275/partition.c'. Add `kern/partition.c',
10399 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
10400 (grubof_SOURCES): Likewise.
10401 * disk/i386/pc/partition.c: File removed.
10402 * disk/powerpc/ieee1275/partition.c: Likewise.
10403 * include/grub/powerpc/ieee1275/partition.h: Likewise.
10404 * include/grub/i386/pc/partition.h: Likewise.
10405 * kern/partition.c: New file.
10406 * partmap/amiga.c: Likewise.
10407 * partmap/apple.c: Likewise.
10408 * partmap/pc.c: Likewise.
10409 * include/grub/partition.h: Likewise..
10410 * include/grub/pc_partition.h: Likewise.
10411 * util/grub-emu.c: Include <grub/partition.h> instead of
10412 <grub/machine/partition.h>.
10413 (main): Call `grub_pc_partition_map_init',
10414 `grub_amiga_partition_map_init' and
10415 `grub_apple_partition_map_init' and deinitialize afterwards.
10416 * util/i386/pc/biosdisk.c: Include `#include
10417 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
10418 `<grub/machine/partition.h>'.
10419 * util/i386/pc/grub-setup.c: Likewise.
10420 * util/i386/pc/biosdisk.c: Likewise.
10421 (grub_util_biosdisk_get_grub_dev): Only access the PC specific
10422 partition information in case of a PC partition.
10423 * util/i386/pc/grub-setup.c: Include `#include
10424 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
10425 `<grub/machine/partition.h>'.
10426 (setup): Only access the PC specific partition information in case
10429 2004-11-17 Hollis Blanchard <hollis@penguinppc.org>
10431 * kern/powerpc/ieee1275/init.c (grub_setjmp): Remove function.
10432 (grub_longjmp): Likewise.
10433 * include/grub/powerpc/setjmp.h (grub_jmp_buf): Set array size to
10435 * normal/powerpc/setjmp.S: New file.
10436 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
10437 `normal/powerpc/setjmp.S'.
10438 (grubof_CFLAGS): Add `-DGRUBOF'.
10439 * include/grub/setjmp.h [GRUB_UTIL]: Changed condition to
10440 [GRUB_UTIL && !GRUBOF].
10442 2004-11-16 Marco Gerards <metgerards@student.han.nl>
10444 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Skip any
10445 property named `name'. Correctly handle the error returned by
10446 `grub_ieee1275_finddevice' if a device can not be opened.
10448 2004-11-02 Hollis Blanchard <hollis@penguinppc.org>
10450 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_readkey): Test
10451 `actual' for negativity.
10452 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
10455 2004-11-01 Marco Gerards <metgerards@student.han.nl>
10457 * term/i386/pc/vga.c (VGA_HEIGHT): Changed to 350.
10458 (PAGE_OFFSET): New macro.
10459 (CRTC_ADDR_PORT): Likewise.
10460 (CRTC_DATA_PORT): Likewise.
10461 (START_ADDR_HIGH_REGISTER): Likewise.
10462 (START_ADDR_LOW_REGISTER): Likewise.
10463 (GRAPHICS_ADDR_PORT): Likewise.
10464 (GRAPHICS_DATA_PORT): Likewise.
10465 (READ_MAP_REGISTER): Likewise.
10466 (INPUT_STATUS1_REGISTER): Likewise.
10467 (INPUT_STATUS1_VERTR_BIT): Likewise.
10468 (page): New variable.
10469 (wait_vretrace): New function.
10470 (set_read_map): Likewise.
10471 (set_start_address): Likewise.
10472 (grub_vga_init): Use mode 0x10 instead of mode 0x12. Switch to
10474 (check_vga_mem): Take the page into account.
10475 (write_char): Likewise.
10476 (write_cursor): Likewise.
10477 (scroll_up): Likewise. Copy the page to the page that is not
10478 shown and switch between both pages.
10479 (grub_vga_putchar): Fix off by one error.
10480 (grub_vga_cls): Wait for the vertical retrace. Take the page into
10483 2004-11-01 Marco Gerards <metgerards@student.han.nl>
10485 Add support for iso9660 (including rockridge).
10487 * conf/i386-pc.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
10488 (iso9660_mod_SOURCES): New variable.
10489 (iso9660_mod_CFLAGS): Likewise.
10490 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
10491 * include/grub/fs.h (grub_iso9660_init): New prototype.
10492 * util/grub-emu.c (main): Call `grub_iso9660_init'.
10493 * fs/iso9660.c: New file.
10495 * include/grub/misc.h (grub_strncat): New prototype.
10496 * kern/misc.c (grub_strncat): New function.
10498 * fs/hfs.c (grub_hfs_mount): Translate the error
10499 `GRUB_ERR_OUT_OF_RANGE' to `GRUB_ERR_BAD_FS'.
10500 * fs/jfs.c (grub_jfs_mount): Likewise.
10501 * fs/ufs.c (grub_ufs_mount): Likewise.
10503 2004-10-28 Hollis Blanchard <hollis@penguinppc.org>
10505 * boot/powerpc/ieee1275/cmain.c (cmain): Remove asm statements
10506 which initialized BAT registers.
10507 * boot/powerpc/ieee1275/ieee1275.c (IEEE1275_CALL_ENTRY_FN,
10508 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
10510 * include/grub/powerpc/ieee1275/ieee1275.h (IEEE1275_CALL_ENTRY_FN,
10511 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
10513 * kern/powerpc/ieee1275/openfw.c (grub_map): New function.
10514 (grub_mapclaim): Likewise.
10515 * loader/powerpc/ieee1275/linux.c (grub_load_linux): Use
10516 grub_mapclaim instead of grub_ieee1275_claim. Assign linux_addr by
10519 2004-10-19 Hollis Blanchard <hollis@penguinppc.org>
10521 * conf/powerpc-ieee1275.rmk (COMMON_ASFLAGS): Remove -fno-builtin.
10522 (COMMON_CFLAGS): Remove -fno-builtin and -D__ASSEMBLY__. Add
10523 -ffreestanding and -msoft-float.
10525 2004-10-15 Hollis Blanchard <hollis@penguinppc.org>
10527 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Do not
10528 append ":0" to devpath if the GRUB_IEEE1275_NO_PARTITION_0 flag is
10529 set in grub_ieee1275_flags.
10531 2004-10-14 Hollis Blanchard <hollis@penguinppc.org>
10533 * include/grub/powerpc/ieee1275/ieee1275.h (abort): Add function
10535 * kern/powerpc/ieee1275/init.c (grub_machine_init): Call
10536 grub_console_init first.
10537 Change the memory range used for grub_ieee1275_claim and
10538 grub_mm_init_region.
10539 Print an error message if the claim fails.
10540 Include <grub/misc.h>.
10542 2004-10-13 Hollis Blanchard <hollis@penguinppc.org>
10544 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_iterate):
10545 Call grub_children_iterate for device nodes of type `scsi',
10547 (grub_ofdisk_open): Remove manual device alias resolution.
10548 Fix memory leak when device cannot be opened.
10549 * include/grub/powerpc/ieee1275/ieee1275.h
10550 (grub_children_iterate): New prototype.
10551 * kern/powerpc/ieee1275/openfw.c (grub_children_iterate):
10553 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
10554 Return -1 if args.size was -1.
10556 2004-10-11 Hollis Blanchard <hollis@penguinppc.org>
10558 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_flags): New global.
10559 (cmain): Accept 3 parameters. Test for 0xdeadbeef, indicating Old
10560 World Macintosh. If Old Wold, set flag in grub_ieee1275_flags; claim
10561 Open Firmware's memory for it; claim memory from _start to _end.
10562 * boot/powerpc/ieee1275/crt0.S (__bss_start): New extern.
10563 (_end): New extern.
10564 (_start): Zero BSS from __bss_start to _end.
10565 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
10567 (GRUB_IEEE1275_NO_PARTITION_0): New #define.
10569 2004-10-11 Hollis Blanchard <hollis@penguinppc.org>
10571 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): Return
10572 -1 if args.base was -1.
10574 2004-10-08 Hollis Blanchard <hollis@penguinppc.org>
10576 * term/powerpc/ieee1275/ieee1275.c (grub_ofconsole_cls): Use an ANSI
10577 escape sequence instead of a literal ^L. Also call
10578 grub_ofconsole_gotoxy.
10580 2004-10-03 Hollis Blanchard <hollis@penguinppc.org>
10582 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): change
10583 void * arguments to grub_addr_t. All callers updated. Also make
10584 the `result' argument optional.
10585 (grub_ieee1275_release): change void * arguments to grub_addr_t.
10586 All callers updated.
10588 2004-09-22 Hollis Blanchard <hollis@penguinppc.org>
10590 * commands/ls.c (grub_ls_list_files): Use the string following the
10591 initial ')', if present, as the filesystem path.
10592 * kern/rescue.c (grub_rescue_cmd_ls): Likewise.
10594 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): List crt0.S first.
10596 2004-09-18 Yoshinori K. Okuji <okuji@enbug.org>
10598 Make the source code of the menu interface more readable.
10600 * normal/menu.c: Include grub/mm.h.
10601 (TERM_WIDTH): New macro.
10602 (TERM_HEIGHT): Likewise.
10603 (TERM_INFO_HEIGHT): Likewise.
10604 (TERM_MARGIN): Likewise.
10605 (TERM_SCROLL_WIDTH): Likewise.
10606 (TERM_TOP_BORDER_Y): Likewise.
10607 (TERM_LEFT_BORDER_X): Likewise.
10608 (TERM_BORDER_WIDTH): Likewise.
10609 (TERM_MESSAGE_HEIGHT): Likewise.
10610 (TERM_BORDER_HEIGHT): Likewise.
10611 (TERM_NUM_ENTRIES): Likewise.
10612 (TERM_FIRST_ENTRY_Y): Likewise.
10613 (TERM_ENTRY_WIDTH): Likewise.
10614 (TERM_CURSOR_X): Likewise.
10615 (draw_border): Use macros instead of magic numbers.
10616 (print_entry): Likewise.
10617 (print_entries): Likewise.
10618 (run_menu): Likewise. Also, handle the key 'e'.
10619 (run_menu_entry): Ignore empty command lines.
10620 (print_message): Added a new argument EDIT. If EDIT is true,
10621 print a different message.
10622 (init_page): Likewise.
10623 (edit_menu_entry): New function. Not implemented yet.
10625 2004-09-17 Marco Gerards <metgerards@student.han.nl>
10627 Add `linux.mod' and `multiboot.mod' so linux and multiboot kernels
10628 can be loaded from normal mode.
10630 * conf/i386-pc.rmk (pkgdata_MODULES): Add `linux.mod' and
10632 (linux_mod_SOURCES, linux_mod_CFLAGS, multiboot_mod_SOURCES)
10633 (multiboot_mod_CFLAGS): New variables.
10634 * loader/i386/pc/linux_normal.c: New file.
10635 * loader/i386/pc/multiboot_normal.c: Likewise.
10637 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Don't use the
10638 attribute `unused'.
10640 * fs/ext2.c (grub_ext2_iterate_dir): Fix typos in inode type. Use
10641 `fdiro' to read the mode information from instead of `diro'.
10643 * fs/fshelp.c (grub_fshelp_find_file): Set type to foundtype after
10644 looking up a symlink.
10646 * include/grub/normal.h (GRUB_COMMAND_FLAG_NO_ARG_PARSE): New
10648 * normal/command.c (grub_command_execute): Don't parse the
10649 arguments when `GRUB_COMMAND_FLAG_NO_ARG_PARSE' is set in the
10650 flags of the command.
10652 * normal/menu.c (grub_menu_run): Fix typo.
10654 2004-09-14 Hollis Blanchard <hollis@penguinppc.org>
10656 * kern/powerpc/ieee1275/init.c (abort): Trap into Open Firmware.
10658 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_gotoxy): Use
10659 `y + 1' instead of `y - 1'.
10661 * conf/powerpc-ieee1275.rmk (grubof_LDFLAGS): Add `-N' and `-S'.
10663 2004-09-14 Yoshinori K. Okuji <okuji@enbug.org>
10665 From Hollis Blanchard <hollis@penguinppc.org>:
10666 * kern/misc.c (memmove): New alias for grub_memmove.
10667 (memcmp): New alias for grub_memcmp.
10668 (memset): New alias for grub_memset.
10669 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
10670 Change "int handle" to "grub_ieee1275_phandle_t handle".
10671 * include/grub/powerpc/ieee1275/ieee1275.h
10672 (grub_ieee1275_get_property): Likewise.
10674 2004-09-12 Tomas Ebenlendr <ebik@ucw.cz>
10676 Added normal mode command `chainloader' as module chain.mod, which
10677 depends on normal.mod and _chain.mod.
10679 * conf/i386-pc.rmk (pkgdata_MODULES): Add `chain.mod'.
10680 (chain_mod_SOURCES, chain_mod_CFLAGS): Variables added.
10681 * include/grub/i386/pc/loader.h (grub_rescue_cmd_chainloader):
10683 * loader/i386/pc/chainloader.c (grub_rescue_cmd_chainloader): All
10684 but arguments parsing moved to ...
10685 (grub_chainloader_cmd): ... here. New function.
10686 * include/grub/i386/pc/chainloader.h: New file.
10687 * loader/i386/pc/chainloader_normal.c: Likewise.
10689 2004-09-11 Marco Gerards <metgerards@student.han.nl>
10691 * conf/i386-pc.rmk (kernel_img_SOURCES): Added kern/fshelp.c.
10692 (grub_mkimage_LDFLAGS): Likewise.
10693 (grub_emu_SOURCES): Likewise.
10694 (kernel_img_HEADERS): Added fshelp.h.
10695 * fs/ext2.c: Include <grub/fshelp.h>.
10696 (FILETYPE_REG): New macro.
10697 (FILETYPE_INO_REG): Likewise.
10698 (grub_ext_sblock): Renamed to `grub_ext2_sblock'.
10700 (ext2_block_group): Renamed to `grub_ext2_block_group'. Changed
10702 (grub_fshelp_node): New struct.
10703 (grub_ext2_data): Added member `diropen'. Changed member `inode'
10705 (grub_ext2_get_file_block): Removed function.
10706 (grub_ext2_read_block): New function.
10707 (grub_ext2_read_file): Replaced parameter `data' by `node'.
10708 This function was written.
10709 (grub_ext2_mount): Read the root inode. Create a diropen struct.
10710 (grub_ext2_find_file): Removed function.
10711 (grub_ext2_read_symlink): New function.
10712 (grub_ext2_iterate_dir): Likewise.
10713 (grub_ext2_open): Rewritten.
10714 (grub_ext2_dir): Rewritten.
10715 * include/grub/fshelp.h: New file.
10716 * fs/fshelp.c: Likewise.
10718 2004-09-10 Yoshinori K. Okuji <okuji@enbug.org>
10720 * normal/menu.c: Include grub/loader.h and grub/machine/time.h.
10721 (print_message): Add a missing newline.
10722 (run_menu): Added timeout support.
10723 (run_menu_entry): New local function.
10724 (grub_menu_run): Added support for booting.
10726 * kern/loader.c (grub_loader_is_loaded): New function.
10728 * include/grub/powerpc/ieee1275/time.h: Include grub/symbol.h.
10729 (grub_get_rtc): Exported.
10731 * include/grub/i386/pc/time.h: Include grub/symbol.h.
10732 (grub_get_rtc): Exported.
10734 * include/grub/normal.h (struct grub_command_list): Remove
10735 constant from the member `command'.
10737 * include/grub/loader.h (grub_loader_is_loaded): Declared.
10739 * include/grub/err.h (GRUB_ERR_INVALID_COMMAND): New constant.
10741 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/time.h.
10743 2004-08-28 Marco Gerards <metgerards@student.han.nl>
10745 Add support for the JFS filesystem.
10747 * fs/jfs.c: New file.
10748 * include/grub/fs.h (grub_jfs_init): New prototype.
10749 (grub_jfs_fini): New prototype.
10750 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/jfs.c.
10751 (grub_emu_SOURCES): Likewise.
10752 (pkgdata_MODULES): Add jfs.mod.
10753 (jfs_mod_SOURCES): New variable.
10754 (jfs_mod_CFLAGS): Likewise.
10755 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs.jfs.c.
10756 (grubof_SOURCES): Likewise.
10757 * util/grub-emu.c (main): Initialize and deinitialize JFS support.
10759 * fs/fat.c (grub_fat_find_dir): Convert the filename little
10760 endian to the host endian.
10761 (grub_fat_utf16_to_utf8): Move function from there...
10762 * kern/misc.c (grub_utf16_to_utf8): ...to here. Do not convert
10763 the endianness of the source string anymore.
10764 * include/grub/misc.h (grub_utf16_to_utf8): New prototype.
10766 2004-08-24 Marco Gerards <metgerards@student.han.nl>
10768 * commands/boot.c (grub_boot_init) [GRUB_UTIL]: Make conditional.
10769 (grub_boot_fini) [GRUB_UTIL]: Likewise.
10770 (GRUB_MOD_INIT) [!GRUB_UTIL]: Likewise.
10771 (GRUB_MOD_FINI) [!GRUB_UTIL]: Likewise.
10773 * fs/hfs.c (grub_hfs_find_node): Add a prototype for `node_found'.
10774 (grub_hfs_iterate_dir): Make the function static. Add prototypes
10775 for `node_found' and `it_dir'.
10776 (grub_hfs_dir): Add prototype for `dir_hook'.
10778 * fs/minix.c (grub_minix_get_file_block): Add prototype for
10779 `grub_get_indir'. Rename `indir' in two blocks to `indir16'
10780 and `indir32' to silence a gcc warning.
10782 * include/grub/fs.h (grub_hfs_init): New prototype.
10783 (grub_hfs_fini): Likewise.
10786 2004-08-21 Yoshinori K. Okuji <okuji@enbug.org>
10788 Each disk device has its own id now. This is useful to make use
10789 of multiple disk devices.
10791 * include/grub/disk.h (grub_disk_dev_id): New enum.
10792 (GRUB_DISK_DEVICE_BIOSDISK_ID): New constant.
10793 (GRUB_DISK_DEVICE_OFDISK_ID): Likewise.
10795 * disk/i386/pc/biosdisk.c (grub_biosdisk_dev): Specify
10796 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
10798 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_dev): Specify
10799 GRUB_DISK_DEVICE_OFDISK_ID as an id.
10801 * util/i386/pc/biosdisk.c (grub_util_biosdisk_dev): Specify
10802 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
10804 * include/grub/disk.h (struct grub_disk_dev): Added a new member
10805 "id" which is used by the cache manager.
10807 * normal/main.c (grub_normal_init_page): Use "GNU GRUB" instead
10810 2004-08-18 Marco Gerards <metgerards@student.han.nl>
10812 * fs/hfs.c: New file.
10813 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/hfs.c.
10814 (grub_emu_SOURCES): Likewise.
10815 (pkgdata_MODULES): Add hfs.mod.
10816 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/hfs.c.
10817 (grubof_SOURCES): Likewise.
10818 * util/grub-emu.c (main): Initialize and deinitialize HFS support.
10820 * include/grub/misc.h (grub_strncasecmp): Add prototype.
10821 * kern/misc.c (grub_strncasecmp): Add function.
10823 2004-08-14 Marco Gerards <metgerards@student.han.nl>
10825 * include/grub/arg.h (GRUB_ARG_OPTION_OPTIONAL): Surround macro
10828 * fs/ext2.c (FILETYPE_UNKNOWN): New macro.
10829 (grub_ext2_dir): In case the directory entry type is unknown, read
10832 2004-08-02 Peter Bruin <pjbruin@dds.nl>
10834 * loader/powerpc/ieee1275/linux.c (grub_linux_init): Pass
10835 grub_load_linux instead of grub_rescue_cmd_linux as second
10836 argument of grub_rescue_register_command.
10838 * Makefile.in (RMKFILES): Add conf/powerpc-ieee1275.rmk.
10840 2004-07-27 Marco Gerards <metgerards@student.han.nl>
10842 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_release): New
10844 * commands/boot.c: Remove the check for `GRUB_UTIL'.
10845 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
10846 `loader/powerpc/ieee1275/linux.c',
10847 `loader/powerpc/ieee1275/linux_normal.c' and `commands/boot.c'.
10848 * include/grub/powerpc/ieee1275/ieee1275.h
10849 (grub_ieee1275_release): New prototype.
10850 * include/grub/powerpc/ieee1275/loader.h: Rewritten.
10851 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize
10852 normal, boot, linux and linux_normal.
10853 * loader/powerpc/ieee1275/linux.c: New file.
10854 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
10856 2004-07-12 Marco Gerards <metgerards@student.han.nl>
10858 * normal/arg.c (grub_arg_parse): Correct error handling after
10859 reallocating the argumentlist (check if `argl' is not null instead
10860 of checking if `args' is not null).
10861 * kern/mm.c (grub_realloc): Return the same pointer when using the
10862 same region, instead of returning the header address.
10864 2004-07-11 Marco Gerards <metgerards@student.han.nl>
10866 * disk/powerpc/ieee1275/partition.c (grub_partition_iterate): Skip
10867 one block instead of two when looking for the initial partition.
10868 (grub_partition_probe): Initialize the local variable `p' with 0.
10869 Use base 10 for the grub_strtoul call.
10870 * kern/misc.c (grub_strncpy): Fix off by one bug. Eliminated the
10871 need for one local variable.
10872 (grub_strtoul): Don't add the new value to `num', instead of that
10875 2004-07-11 Marco Gerards <metgerards@student.han.nl>
10877 * conf/i386-pc.rmk (pkgdata_IMAGE): Add pxeboot.img.
10878 (pxeboot_img_SOURCES): New variable.
10879 (pxeboot_img_ASFLAGS): Likewise.
10880 (pxeboot_img_LDFLAGS): Likewise.
10881 * boot/i386/pc/pxeboot.S: New file. Based on pxeloader.S from
10882 GRUB Legacy and boot.S. Adopted for GRUB 2 by lode leroy
10883 <lode_leroy@hotmail.com>.
10885 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
10887 * kern/rescue.c (grub_enter_rescue_mode): Don't continue when
10888 there was no input.
10890 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
10892 * normal/cmdline.c (grub_set_history): Fix off by one bug. Fixed
10893 the history buffer logic.
10895 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
10897 * fs/ext2.c (FILETYPE_INO_MASK, FILETYPE_INO_DIRECTORY)
10898 (FILETYPE_INO_SYMLINK): New macros.
10899 (grub_ext2_find_file): Check if the node is a directory using the
10900 inode stat information instead of using the filetype in the
10901 dirent. Exclude the first character of an absolute symlink.
10902 (grub_ext2_dir): Mask out the filetype part of the mode member of
10905 2004-05-24 Marco Gerards <metgerards@student.han.nl>
10907 Add support for UFS version 1 and 2. Add support for the minix
10908 filesystem version 1 and 2, both the variants with 14 and 30 long
10911 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ufs.c and
10913 (grub_emu_SOURCES): Likewise.
10914 (pkgdata_MODULES): Add ufs.mod and minix.mod.
10915 (ufs_mod_SOURCES): New variable.
10916 (ufs_mod_CFLAGS): Likewise.
10917 (minix_mod_SOURCES): Likewise.
10918 (minix_mod_CFLAGS): Likewise.
10919 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/ufs.c and
10921 (grubof_SOURCES): Likewise.
10922 * fs/ufs.c: New file.
10923 * fs/minix.c: New file.
10924 * include/grub/fs.h (grub_ufs_init): New prototype.
10925 (grub_ufs_fini): Likewise.
10926 (grub_minix_init): Likewise.
10927 (grub_minix_fini): Likewise.
10928 * util/grub-emu.c (main): Initialize and deinitialize UFS and
10931 2004-04-30 Jeroen Dekkers <jeroen@dekkers.cx>
10933 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add normal/arg.c,
10934 commands/ls.c, commands/terminal.c, commands/boot.c,
10935 commands/cmp.c and commands/cat.c.
10936 (grubof_LDFLAGS): Add -nostdlib -static-libgcc -lgcc.
10938 * kern/powerpc/ieee1275/init.c: Include "grub/env.h" instead of
10941 2004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
10943 All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
10944 and grub_, respectively. Because the conversion is trivial and
10945 mechanical, I omit the details here. Please refer to the CVS
10946 if you need more information.
10948 2004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
10950 * include/pupa: Renamed to ...
10951 * include/grub: ... this.
10952 * util/i386/pc/pupa-mkimage.c: Renamed to ...
10953 * util/i386/pc/grub-mkimage.c: ... this.
10954 * util/i386/pc/pupa-setup.c: Renamed to ...
10955 * util/i386/pc/grub-setup.c: ... this.
10956 * util/pupa-emu.c: Renamed to ...
10957 * util/grub-emu.c: ... this.
10959 2004-03-29 Marco Gerards <metgerards@student.han.nl>
10961 Add support for the newworld apple macintosh (PPC). This has been
10962 tested on the powerbook 2000 only. It only adds support for
10963 generic ieee1275 functions, console and disk support. This should
10964 be easy to port to other architectures with support for Open
10967 * configure.ac: Accept the powerpc as host_cpu. In the case of
10968 the powerpc cpu set the host_vendor to ieee1275. Make sure the i386
10969 specific tests are only executed while building for the i386.
10970 Inverse test for crosscompile.
10971 * genmk.rb (Utility): Allow assembler files.
10972 * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno.
10973 * conf/powerpc-ieee1275.rmk: New file.
10974 * disk/powerpc/ieee1275/ofdisk.c: Likewise.
10975 * disk/powerpc/ieee1275/partition.c: Likewise.
10976 * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise.
10977 * include/pupa/powerpc/ieee1275/console.h: Likewise.
10978 * include/pupa/powerpc/ieee1275/partition.h: Likewise.
10979 * include/pupa/powerpc/ieee1275/time.h: Likewise.
10980 * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise.
10981 * include/pupa/powerpc/ieee1275/multiboot.h: Likewise.
10982 * include/pupa/powerpc/ieee1275/loader.h
10983 * include/pupa/powerpc/setjmp.h: Likewise.
10984 * include/pupa/powerpc/types.h: Likewise.
10985 * kern/powerpc/ieee1275/init.c: Likewise.
10986 * kern/powerpc/ieee1275/openfw.c: Likewise.
10987 * term/powerpc/ieee1275/ofconsole.c: Likewise.
10989 These files were written by Johan Rydberg
10990 (jrydberg@night.trouble.net) and I only modified them slightly.
10992 * boot/powerpc/ieee1275/cmain.c: New file.
10993 * boot/powerpc/ieee1275/crt0.S: Likewise.
10994 * boot/powerpc/ieee1275/ieee1275.c: Likewise.
10995 * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
10997 2004-03-14 Jeroen Dekkers <jeroen@dekkers.cx>
10999 * Makefile.in: Update copyright.
11000 * genmodsrc.sh: Likewise.
11001 * gensymlist.sh: Likewise.
11002 * term/i386/pc/vga.c: Indent correctly.
11004 * util/i386/pc/pupa-mkimage.c (usage): Use PACKAGE_BUGREPORT as
11005 bugreporting address.
11006 * util/i386/pc/pupa-setup.c (usage): Likewise,
11007 (main): Call pupa_ext2_init and pupa_ext2_fini.
11009 * fs/fat.c (log2): Renamed to ...
11010 (fat_log2): ... this.
11011 All callers changed.
11012 * kern/misc.c (memcpy): Alias to pupa_memmove.
11013 * loader/i386/pc/multiboot.c (pupa_rescue_cmd_multiboot): Fix
11015 * util/console.c (pupa_ncurses_fini): Return 0.
11017 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open)[__linux__]:
11018 Move fail label here.
11019 [__GNU__]: Don't warn when using stat.
11020 (open_device)[!__linux__]: Check if FD < 0 instead of !FD.
11021 (pupa_util_biosdisk_get_pupa_dev)[__GNU__]: Change type of N to
11022 long int. Use strtol instead of strtoul.
11024 2004-03-14 Marco Gerards <metgerards@student.han.nl>
11026 * commands/boot.c: New file.
11027 * commands/cat.c: Likewise.
11028 * commands/cmp.c: Likewise.
11029 * commands/ls.c: Likewise.
11030 * commands/terminal.c: Likewise.
11031 * normal/command.c: Include <pupa/env.h> and <pupa/dl.h>.
11032 (pupa_register_command): Changed interface to match the new
11034 (pupa_command_execute): Changed (almost rewritten) so it uses
11035 pupa_split_command. Added support for setting variables using the
11037 (rescue_command): Changed to work with the new argument parser.
11038 (terminal_command): Moved from here to commands/terminal.c.
11039 (set_command): New function.
11040 (unset_command): New function.
11041 (insmod_command): New function.
11042 (rmmod_command): New function.
11043 (lsmod_command): New function.
11044 (pupa_command_init): Don't initialize the command terminal
11045 anymore. Initialize the commands set, unset, insmod, rmmod and
11047 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/env.c.
11048 (kernel_img_HEADERS): Add arg.h and env.h.
11049 (pupa_mkimage_LDFLAGS): Add kern/env.c.
11050 (pupa_emu_SOURCES): Add kern/env.c, commands/ls.c,
11051 commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c,
11053 (pkgdata_MODULES): Add ls.mod, boot.mod, cmp.mod, cat.mod and
11055 (normal_mod_SOURCES): Add normal/arg.c and normal/arg.c.
11056 (boot_mod_SOURCES): New variable.
11057 (terminal_mod_SOURCES): Likewise.
11058 (ls_mod_SOURCES): Likewise.
11059 (cmp_mod_SOURCES): Likewise.
11060 (cat_mod_SOURCES): Likewise.
11062 * normal/arg.c: New file.
11063 * kern/env.c: Likewise.
11064 * include/pupa/arg.h: Likewise.
11065 * include/pupa/env.h: Likewise.
11066 * font/manager.c (font_command): Changed to match argument parsing
11068 (PUPA_MOD_INIT): Likewise.
11069 * hello/hello.c (pupa_cmd_hello): Likewise.
11070 (PUPA_MOD_INIT): Likewise.
11071 * include/pupa/disk.h: Include <pupa/device.h>.
11072 (pupa_print_partinfo): New prototype.
11073 * include/pupa/dl.h (pupa_dl_set_prefix): Prototype removed.
11074 (pupa_dl_get_prefix): Likewise.
11075 * include/pupa/misc.h: Include <pupa/err.h>.
11076 (pupa_isgraph): New prototype.
11077 (pupa_isdigit): Likewise.
11078 (pupa_split_cmdline): Likewise.
11079 * include/pupa/normal.h: Include <pupa/arg.h>.
11080 (pupa_command): Changed the prototype of the member `func' to
11081 match the argument parsing interface. Added member `options'.
11082 (pupa_register_command): Updated to match function.
11083 (pupa_arg_parse): New prototype.
11084 (pupa_hello_init) [PUPA_UTIL]: New prototype.
11085 (pupa_hello_fini) [PUPA_UTIL]: Likewise.
11086 (pupa_ls_init) [PUPA_UTIL]: Likewise.
11087 (pupa_ls_fini) [PUPA_UTIL]: Likewise.
11088 (pupa_cat_init) [PUPA_UTIL]: Likewise.
11089 (pupa_cat_fini) [PUPA_UTIL]: Likewise.
11090 (pupa_boot_init) [PUPA_UTIL]: Likewise.
11091 (pupa_boot_fini) [PUPA_UTIL]: Likewise.
11092 (pupa_cmp_init) [PUPA_UTIL]: Likewise.
11093 (pupa_cmp_fini) [PUPA_UTIL]: Likewise.
11094 (pupa_terminal_init) [PUPA_UTIL]: Likewise.
11095 (pupa_terminal_fini) [PUPA_UTIL]: Likewise.
11096 * kern/disk.c: Include <pupa/file.h>.
11097 (pupa_print_partinfo): New function.
11098 * kern/dl.c: Include <pupa/env.h>.
11099 (pupa_dl_dir): Variable removed.
11100 (pupa_dl_load): Use the environment variable `prefix' instead of
11101 the variable pupa_dl_dir.
11102 (pupa_dl_set_prefix): Function removed.
11103 (pupa_dl_get_prefix): Likewise.
11104 * kern/i386/pc/init.c: Include <pupa/env.h>.
11105 (pupa_machine_init): Use the environment variable `prefix' instead of
11106 using pupa_dl_set_prefix to set the prefix.
11107 * kern/main.c: Include <pupa/env.h>.
11108 (pupa_set_root_dev): Use the environment variable `prefix' instead of
11109 using pupa_dl_get_prefix to get the prefix.
11110 * kern/misc.c: Include <pupa/env.h>.
11111 (pupa_isdigit): New function.
11112 (pupa_isgraph): Likewise.
11113 (pupa_ftoa): Likewise.
11114 (pupa_vsprintf): Added support for printing values of the type
11115 `double'. Make it possible to format variable output when using
11116 formatting like `%1.2%f'.
11117 (pupa_split_cmdline): New function.
11118 * kern/rescue.c: Include <pupa/env.h>.
11119 (next_word): Removed function.
11120 (pupa_rescue_cmd_prefix): Likewise.
11121 (pupa_rescue_cmd_set): New function.
11122 (pupa_rescue_cmd_unset): New function.
11123 (pupa_enter_rescue_mode): Use the `pupa_split_cmdline' function to
11124 split the command line instead of splitting it here. Added
11125 support for setting variables using the syntax `foo=bar'. Don't
11126 initialize the prefix command anymore. Initialized the set and
11128 * normal/cmdline.c: Include <pupa/env.h>.
11129 (pupa_tab_complete): Added prototypes for print_simple_completion,
11130 print_partition_completion, add_completion, iterate_commands,
11131 iterate_dev, iterate_part and iterate_dir. Moved code to print
11132 partition information from here to kern/disk.c.
11133 (pupa_cmdline_run): Don't check if the function exists anymore.
11134 * normal/main.c: Include <pupa/env.h>.
11135 (pupa_rescue_cmd_normal): Use the environment variable `prefix'
11136 instead of using pupa_dl_get_prefix to get the prefix.
11137 * term/i386/pc/vga.c: Include <pupa/arg.h>.
11138 (check_vga_mem): Cast pointers to `void *' to silence a gcc
11140 (pupa_vga_putchar) [! DEBUG_VGA]: Removed for this case.
11141 (pupa_vga_setcolor): Declare unused variables with `__attribute__
11142 ((unused))' to silence a gcc warning.
11143 (pupa_vga_setcolor): Likewise.
11144 (debug_command): Changed to match argument parsing
11146 * util/pupa-emu.c: Include <pupa/env.h>.
11147 (options): Added 0's for unused fields to silence a gcc warning.
11149 (main): Use the environment variable `prefix' instead of using
11150 pupa_dl_set_prefix to set the prefix. Initialize the commands ls,
11151 boot, cmp, cat and terminal. Finish the commands boot, cmp, cat
11154 * util/i386/pc/getroot.c: Include <pupa/i386/pc/util/biosdisk.h>.
11155 * util/misc.c: Include <malloc.h>.
11156 (pupa_malloc): Rewritten so errors are correctly reported.
11157 (pupa_realloc): Likewise.
11158 (pupa_memalign): Likewise.
11159 (pupa_mm_init_region): Declare unused variables with
11160 `__attribute__ ((unused))' to silence a gcc warning.
11161 * normal/i386/setjmp.S: Remove tab at the end of the file to
11162 silence a gcc warning.
11163 * loader/i386/pc/linux.c (pupa_rescue_cmd_initrd): Declare unused
11164 variables with `__attribute__ ((unused))' to silence a gcc
11166 * loader/i386/pc/multiboot.c (pupa_multiboot_unload): Make the
11167 local variable i unsigned to silence a gcc warning.
11169 * kern/term.c: Include <pupa/misc.h>.
11170 (pupa_more_lines): New variable.
11171 (pupa_more): Likewise.
11172 (pupa_putcode): When the pager is active pause at the end of every
11174 (pupa_set_more): New function.
11175 * include/pupa/term.h (pupa_set_more): New prototype.
11178 2004-03-07 Yoshinori K. Okuji <okuji@enbug.org>
11180 Now this project is GRUB 2 rather than PUPA. The location of
11181 the CVS repository was moved to GRUB's.
11183 * configure.ac: Use bug-grub as the reporting address.
11184 Use GRUB instead of PUPA.
11185 Change the version number to 1.90.
11187 2004-02-24 Yoshinori K. Okuji <okuji@enbug.org>
11189 * genkernsyms.sh: Updated copyright information.
11190 * genmk.rb: Likewise.
11191 * genmodsrc.sh: Likewise.
11192 * gensymlist.sh: Likewise.
11193 * boot/i386/pc/boot.S: Likewise.
11194 * boot/i386/pc/diskboot.S: Likewise.
11195 * disk/i386/pc/biosdisk.c: Likewise.
11196 * disk/i386/pc/partition.c: Likewise.
11197 * font/manager.c: Likewise.
11198 * fs/ext2.c: Likewise.
11199 * fs/fat.c: Likewise.
11200 * include/pupa/boot.h: Likewise.
11201 * include/pupa/device.h: Likewise.
11202 * include/pupa/disk.h: Likewise.
11203 * include/pupa/dl.h: Likewise.
11204 * include/pupa/elf.h: Likewise.
11205 * include/pupa/err.h: Likewise.
11206 * include/pupa/file.h: Likewise.
11207 * include/pupa/font.h: Likewise.
11208 * include/pupa/fs.h: Likewise.
11209 * include/pupa/kernel.h: Likewise.
11210 * include/pupa/loader.h: Likewise.
11211 * include/pupa/misc.h: Likewise.
11212 * include/pupa/mm.h: Likewise.
11213 * include/pupa/net.h: Likewise.
11214 * include/pupa/normal.h: Likewise.
11215 * include/pupa/rescue.h: Likewise.
11216 * include/pupa/setjmp.h: Likewise.
11217 * include/pupa/symbol.h: Likewise.
11218 * include/pupa/term.h: Likewise.
11219 * include/pupa/types.h: Likewise.
11220 * include/pupa/i386/setjmp.h: Likewise.
11221 * include/pupa/i386/types.h: Likewise.
11222 * include/pupa/i386/pc/biosdisk.h: Likewise.
11223 * include/pupa/i386/pc/boot.h: Likewise.
11224 * include/pupa/i386/pc/console.h: Likewise.
11225 * include/pupa/i386/pc/init.h: Likewise.
11226 * include/pupa/i386/pc/kernel.h: Likewise.
11227 * include/pupa/i386/pc/linux.h: Likewise.
11228 * include/pupa/i386/pc/loader.h: Likewise.
11229 * include/pupa/i386/pc/memory.h: Likewise.
11230 * include/pupa/i386/pc/multiboot.h: Likewise.
11231 * include/pupa/i386/pc/partition.h: Likewise.
11232 * include/pupa/i386/pc/time.h: Likewise.
11233 * include/pupa/i386/pc/vga.h: Likewise.
11234 * include/pupa/i386/pc/util/biosdisk.h: Likewise.
11235 * include/pupa/util/getroot.h: Likewise.
11236 * include/pupa/util/misc.h: Likewise.
11237 * include/pupa/util/resolve.h: Likewise.
11238 * kern/device.c: Likewise.
11239 * kern/disk.c: Likewise.
11240 * kern/dl.c: Likewise.
11241 * kern/err.c: Likewise.
11242 * kern/file.c: Likewise.
11243 * kern/fs.c: Likewise.
11244 * kern/loader.c: Likewise.
11245 * kern/main.c: Likewise.
11246 * kern/misc.c: Likewise.
11247 * kern/mm.c: Likewise.
11248 * kern/rescue.c: Likewise.
11249 * kern/term.c: Likewise.
11250 * kern/i386/dl.c: Likewise.
11251 * kern/i386/pc/init.c: Likewise.
11252 * kern/i386/pc/lzo1x.S: Likewise.
11253 * kern/i386/pc/startup.S: Likewise.
11254 * loader/i386/pc/chainloader.c: Likewise.
11255 * loader/i386/pc/linux.c: Likewise.
11256 * loader/i386/pc/multiboot.c: Likewise.
11257 * normal/cmdline.c: Likewise.
11258 * normal/command.c: Likewise.
11259 * normal/main.c: Likewise.
11260 * normal/menu.c: Likewise.
11261 * normal/i386/setjmp.S: Likewise.
11262 * term/i386/pc/console.c: Likewise.
11263 * term/i386/pc/vga.c: Likewise.
11264 * util/console.c: Likewise.
11265 * util/genmoddep.c: Likewise.
11266 * util/misc.c: Likewise.
11267 * util/pupa-emu.c: Likewise.
11268 * util/resolve.c: Likewise.
11269 * util/unifont2pff.rb: Likewise.
11270 * util/i386/pc/biosdisk.c: Likewise.
11271 * util/i386/pc/getroot.c: Likewise.
11272 * util/i386/pc/pupa-mkimage.c: Likewise.
11273 * util/i386/pc/pupa-setup.c: Likewise.
11275 2004-02-15 Jeroen Dekkers <jeroen@dekkers.cx>
11277 * fs/ext2.c (pupa_ext2_read_file): Correct the value of BLOCKEND
11278 when it is EXT2_BLOCK_SIZE (data). New argument READ_HOOK, all
11279 callers changed. Set DATA->DISK->READ_HOOK to READ_HOOK before
11280 reading and reset it after reading.
11281 (pupa_ext2_close): Return PUPA_ERR_NONE.
11283 * include/pupa/i386/pc/linux.h (PUPA_LINUX_INITRD_MAX_ADDRESS):
11285 (struct linux_kernel_header): Add kernel_version and
11287 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Check whether
11288 pupa_file_read succeeds.
11289 (pupa_rescue_cmd_initrd): Implement.
11291 2003-12-03 Marco Gerards <metgerards@student.han.nl>
11293 * fs/ext2.c (pupa_ext2_label): New function.
11294 (pupa_ext2_fs): Added label.
11295 * fs/fat.c (pupa_fat_label): New function.
11296 (pupa_fat_fs): Added label.
11297 * include/pupa/fs.h (struct pupa_fs): Added prototype label.
11299 * kern/misc.c (pupa_strndup): New function.
11300 * include/pupa/misc.h (pupa_strndup): New prototype.
11302 * include/pupa/normal.h: Include <pupa/err.h>.
11303 (pupa_set_history): New prototype.
11304 (pupa_iterate_commands): New prototype.
11305 * normal/cmdline.c: Include <pupa/machine/partition.h>,
11306 <pupa/disk.h>, <pupa/file.h>.
11307 (hist_size): New variable.
11308 (hist_lines): Likewise.
11309 (hist_end): Likewise.
11310 (hist_used): Likewise.
11311 (pupa_set_history): New function.
11312 (pupa_history_get): Likewise.
11313 (pupa_history_add): Likewise.
11314 (pupa_history_replace): Likewise.
11315 (pupa_tab_complete): Likewise.
11316 (pupa_cmdline_run): Added tab completion and history buffer. Tab
11317 completion shows partitionnames while completing partitions, this
11318 feature was suggested by Jeff Bailey.
11319 * normal/command.c (pupa_iterate_commands): New function.
11320 * normal/main.c (PUPA_DEFAULT_HISTORY_SIZE): New macro.
11321 (pupa_normal_init): Initialize history buffer.
11322 (PUPA_MOD_INIT): Likewise.
11323 (pupa_normal_fini): Free the history buffer.
11324 (PUPA_MOD_FINI): Likewise.
11326 * util/console.c (pupa_ncurses_getkey): Accept 127 as backspace
11329 * aclocal.m4 (pupa_I386_CHECK_REGPARM_BUG): New DEFUN.
11330 * configure.ac [i386]: Check for regparam bug.
11331 (NESTED_FUNC_ATTR) [! i386]: Defined.
11333 2003-11-17 Marco Gerards <metgerards@student.han.nl>
11335 * conf/i386-pc.rmk (sbin_UTILITIES): Added pupa-emu.
11336 (pupa_setup_SOURCES): Added util/i386/pc/getroot.c.
11337 (pupa_emu_SOURCES): New variable.
11338 (pupa_emu_LDFLAGS): Likewise.
11339 * include/pupa/fs.h (pupa_ext2_init) [PUPA_UTIL]: New prototype.
11340 (pupa_ext2_fini) [PUPA_UTIL]: Likewise.
11341 * include/pupa/normal.h (pupa_normal_init) [PUPA_UTIL]: Likewise.
11342 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
11343 * include/pupa/setjmp.h [PUPA_UTIL]: Include <setjmp.h>.
11344 (pupa_jmp_buf): New typedef.
11345 (pupa_setjmp) [PUPA_UTIL]: New macro.
11346 (pupa_longjmp) [PUPA_UTIL]: Likewise.
11347 * include/pupa/term.h (struct pupa_term): New member `refresh'.
11348 (pupa_refresh): New prototype.
11349 * include/pupa/util/getroot.h: New file.
11350 * kern/misc.c (pupa_vsprintf): Refresh the screen after updating
11352 * kern/rescue.c (pupa_rescue_get_command_line): Likewise.
11353 (pupa_rescue_cmd_cat): Likewise.
11354 (pupa_rescue_cmd_ls): Likewise.
11355 (pupa_rescue_cmd_testload): Likewise.
11356 (pupa_rescue_cmd_lsmod): Likewise.
11357 * normal/cmdline.c (pupa_cmdline_get): Likewise.
11358 * normal/menu.c (run_menu): Likewise.
11359 * kern/term.c (pupa_cls): Likewise.
11360 (pupa_refresh): New function.
11361 * normal/normal.c (pupa_normal_init) [PUPA_UTIL]: New function.
11362 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
11363 * util/console.c: New file.
11365 * util/i386/pc/getroot.c: New file.
11366 * util/i386/pc/pupa-setup.c: Include <pupa/util/getroot.h>.
11367 (pupa_putchar): New function.
11368 (pupa_refresh): Likewise.
11369 (xgetcwd): Function moved to ...
11370 (strip_extra_slashes): Likewise.
11371 (get_prefix): Likewise.
11372 * util/i386/pc/getroot.c: ... here.
11373 (find_root_device): Function moved and renamed to...
11374 * util/i386/pc/getroot.c (pupa_find_root_device): ... here.
11375 Changed all callers.
11376 * util/i386/pc/pupa-setup.c (guess_root_device): Function moved
11378 * util/i386/pc/getroot.c (pupa_guess_root_device): ... here.
11379 Changed all callers.
11380 * util/misc.c (pupa_memalign): New function.
11381 (pupa_mm_init_region): Likewise.
11382 (pupa_register_exported_symbols): Likewise.
11383 (pupa_putchar): Function removed.
11384 * util/pupa-emu.c: New file.
11386 2003-11-16 Jeroen Dekkers <jeroen@dekkers.cx>
11388 * conf/i386-pc.rmk (pkgdata_MODULES): Add _multiboot.mod.
11389 (_multiboot_mod_SOURCES): New variable.
11390 (_multiboot_mod_CFLAGS): Likewise.
11391 * loader/i386/pc/multiboot.c: New file.
11392 * include/pupa/i386/pc/multiboot.h: Likewise.
11393 * kern/i386/pc/startup.S: Include pupa/machine/multiboot.h.
11394 (pupa_multiboot_real_boot): New function.
11395 * include/pupa/i386/pc/loader.h: Include pupa/machine/multiboot.h.
11396 (pupa_multiboot_real_boot): New prototype.
11397 (pupa_rescue_cmd_multiboot): Likewise
11398 (pupa_rescue_cmd_module): Likewise.
11400 * kern/loader.c (pupa_loader_set): Continue when
11401 pupa_loader_unload_func() fails.
11402 (pupa_loader_unset): New function.
11403 * include/pupa/loader.h (pupa_loader_unset): New prototype.
11405 * kern/misc.c (pupa_stpcpy): New function.
11406 * include/pupa/misc.h (pupa_stpcpy): New prototype.
11408 2003-11-12 Marco Gerards <metgerards@student.han.nl>
11410 * disk/i386/pc/biosdisk.c (pupa_biosdisk_open): Correctly check
11411 for available extensions.
11413 * include/pupa/i386/pc/time.h: New file.
11414 * kern/disk.c: Include <pupa/machine/time.h>.
11415 (PUPA_CACHE_TIMEOUT): New macro.
11416 (pupa_last_time): New variable.
11417 (pupa_disk_open): Flush the cache when there was a timeout.
11418 (pupa_disk_close): Reset the timer.
11419 * kern/i386/pc/startup.S (pupa_get_rtc): Renamed from
11421 * util/misc.c: Include <sys/times.h>
11422 (pupa_get_rtc): New function.
11424 2003-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
11426 * fs/ext2.c (struct pupa_ext2_inode): Declare struct datablocks
11428 (pupa_ext2_get_file_block): Use blocks member.
11430 * fs/ext2.c (pupa_ext2_read_file): Only set skipfirst for the
11431 first block. Return -1 instead of pupa_errno on error.
11433 2003-10-27 Marco Gerards <metgerards@student.han.nl>
11435 * README: In the pupa-mkimage example use _chain instead of chain
11436 and ext2 instead of fat.
11437 * TODO: Replace ext2fs with jfs as an example. Add an item for
11438 adding journal playback for ext2fs.
11439 * conf/i386-pc.rmk (pupa_setup_SOURCES): Added fs/ext2.c.
11440 (pkgdata_MODULES): Added ext2.mod.
11441 (ext2_mod_SOURCES): New variable.
11442 (ext2_mod_CFLAGS): Likewise.
11443 * include/pupa/err.h (pupa_err_t): Added PUPA_ERR_SYMLINK_LOOP.
11444 * include/pupa/misc.h (pupa_strncpy): New prototype.
11445 (pupa_strcat): Likewise.
11446 (pupa_strncmp): Likewise.
11447 * kern/misc.c (pupa_strcat): Enable function.
11448 (pupa_strncpy): New function.
11449 (pupa_strncmp): Likewise.
11450 * fs/ext2.c: New file.
11452 * kern/disk.c (pupa_disk_read): Set pupa_errno to PUPA_ERR_NONE
11453 when the read failed before retrying.
11454 * util/i386/pc/biosdisk.c (_LARGEFILE_SOURCE): Removed.
11455 (_FILE_OFFSET_BITS): Likewise.
11456 * configure.ac: Added AC_SYS_LARGEFILE.
11458 2003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
11460 * genmk.rb (PModule#rule): Make sure to get only symbol names
11461 from the output of nm.
11462 Reported by Robert Millan <zeratul2@wanadoo.es>.
11464 2003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
11466 I forgot to check in these changes for a long time. This adds
11467 incomplete support for VGA console, and this is still very
11468 buggy. Also, a lot of consideration is required for I18N,
11469 UNICODE, and VGA font issues. Therefore, assume that this is
11470 such that "better than nothing".
11472 * font/manager.c: New file.
11473 * include/pupa/font.h: Likewise.
11474 * include/pupa/i386/pc/vga.h: Likewise.
11475 * term/i386/pc/vga.c: Likewise.
11476 * util/unifont2pff.rb: Likewise.
11478 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vga.h.
11479 (pkgdata_MODULES): Added vga.mod and font.mod.
11480 (vga_mod_SOURCES): New variables.
11481 (vga_mod_CFLAGS): Likewise.
11482 (font_mod_SOURCES): Likewise.
11483 (font_mod_CFLAGS): Likewise.
11485 * include/pupa/err.h (PUPA_ERR_BAD_FONT): New constant.
11487 * include/pupa/term.h: Include pupa/err.h.
11488 (struct pupa_term): Added init and fini.
11489 Changed the argument of putchar to pupa_uint32_t.
11491 * include/pupa/i386/pc/console.h: Include pupa/symbol.h.
11492 (pupa_console_real_putchar): New prototype.
11493 (pupa_console_putchar): Removed.
11494 (pupa_console_checkkey): Exported.
11495 (pupa_console_getkey): Likewise.
11497 * kern/misc.c (pupa_vsprintf): Add support for UNICODE
11500 * kern/term.c (pupa_term_set_current): Rewritten.
11501 (pupa_putchar): Likewise.
11502 (pupa_putcode): New function.
11504 * kern/i386/pc/startup.S (pupa_console_putchar): Renamed to ...
11505 (pupa_console_real_putchar): ... this.
11506 (pupa_vga_set_mode): New function.
11507 (pupa_vga_get_font): Likewise.
11509 * normal/command.c: Include pupa/term.h.
11510 (terminal_command): New function.
11511 (pupa_command_init): Register the command "terminal".
11513 * normal/menu.c (DISP_LEFT): Changed to a UNICODE value.
11514 (DISP_UP): Likewise.
11515 (DISP_RIGHT): Likewise.
11516 (DISP_DOWN): Likewise.
11517 (DISP_HLINE): Likewise.
11518 (DISP_VLINE): Likewise.
11519 (DISP_UL): Likewise.
11520 (DISP_UR): Likewise.
11521 (DISP_LL): Likewise.
11522 (DISP_LR): Likewise.
11524 * term/i386/pc/console.c (pupa_console_putchar): New function.
11526 2003-02-08 NIIBE Yutaka <gniibe@m17n.org>
11528 * util/resolve.c (pupa_util_resolve_dependencies): BUG
11529 FIX. Reverse the path_list.
11531 * include/pupa/normal.h: Export pupa_register_command and
11532 pupa_unregister_command.
11534 * hello/hello.c (pupa_cmd_hello): New module.
11535 * conf/i386-pc.rmk: Added hello.mod.
11537 2003-01-31 Yoshinori K. Okuji <okuji@enbug.org>
11539 * kern/i386/pc/lzo1x.S: New file.
11541 * util/i386/pc/pupa-mkimage.c: Include lzo1x.h.
11542 (compress_kernel): New variable.
11543 (generate_image): Heavily modified to support compressing a
11544 large part of the core image.
11546 * util/misc.c (pupa_util_read_image): Fix a file descriptor
11548 (pupa_util_load_image): New function.
11550 * kern/i386/pc/startup.S: Include pupa/machine/kernel.h.
11551 (pupa_compressed_size): New variable.
11552 (codestart): Enable Gate A20 here.
11553 Decompress the compressed part of the core image.
11554 Rearrange the code to put functions and variables which are
11555 required for initialization in the non-compressed part.
11558 * kern/i386/pc/init.c (pupa_machine_init): Don't enable Gate A20
11561 * include/pupa/util/misc.h (pupa_util_write_image): Declared.
11563 * include/pupa/i386/pc/kernel.h
11564 (PUPA_KERNEL_MACHINE_COMPRESSED_SIZE): New macro.
11565 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): Increased by 4.
11566 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
11567 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
11568 (PUPA_KERNEL_MACHINE_RAW_SIZE): New macro.
11570 * conf/i386-pc.rmk (pupa_mkimage_LDFLAGS): New variable.
11572 * genmk.rb (Image#rule): Put LDFLAGS at the end of a line.
11573 (Utility#rule): Likewise.
11575 * configure.ac: Check if LZO is available.
11577 2003-01-20 Yoshinori K. Okuji <okuji@enbug.org>
11579 * include/pupa/normal.h: New file.
11580 * include/pupa/setjmp.h: Likewise.
11581 * include/pupa/i386/setjmp.h: Likewise.
11582 * normal/cmdline.c: Likewise.
11583 * normal/command.c: Likewise.
11584 * normal/main.c: Likewise.
11585 * normal/menu.c: Likewise.
11586 * normal/i386/setjmp.S: Likewise.
11588 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Made global.
11589 (pupa_rescue_cmd_initrd): Likewise.
11591 * loader/i386/pc/chainloader.c (pupa_rescue_cmd_chainloader):
11594 * kern/i386/pc/startup.S (translation_table): New variable.
11595 (translate_keycode): New function.
11596 (pupa_console_getkey): Call translate_keycode.
11598 * kern/rescue.c (attempt_normal_mode): New function.
11599 (pupa_enter_rescue_mode): Attempt to execute the normal mode. If
11600 it failed, print a message.
11602 * kern/mm.c (pupa_real_malloc): Print more information when a
11603 free magic is broken.
11604 (pupa_free): If the first free header is not free actually, set
11607 * kern/main.c (pupa_load_normal_mode): Just load the module
11609 (pupa_main): Don't print the message
11610 "Entering into rescue mode..." here.
11612 * include/pupa/i386/pc/loader.h (pupa_rescue_cmd_initrd):
11614 (pupa_rescue_cmd_initrd): Likewise.
11615 (pupa_rescue_cmd_initrd): Likewise.
11617 * include/pupa/symbol.h (FUNCTION): Specify the type.
11618 (VARIABLE): Likewise.
11620 * include/pupa/err.h (pupa_err_t): Added
11621 PUPA_ERR_UNKNOWN_COMMAND.
11623 * include/pupa/dl.h (pupa_dl_set_prefix): Exported.
11624 (pupa_dl_get_prefix): Likewise.
11626 * conf/i386-pc.rmk (pkgdata_MODULES): Added normal.mod.
11627 Added _chain.mod and _linux.mod instead of chain.mod and
11629 (chain_mod_SOURCES): Renamed to ...
11630 (_chain_mod_SOURCES): ... this.
11631 (chain_mod_CFLAGS): Renamed to ...
11632 (_chain_mod_CFLAGS): ... this.
11633 (linux_mod_SOURCES): Renamed to ...
11634 (_linux_mod_SOURCES): ... this.
11635 (linux_mod_CFLAGS): Renamed to ...
11636 (_linux_mod_CFLAGS): ... this.
11637 (normal_mod_SOURCES): New variable.
11638 (normal_mod_CFLAGS): Likewise.
11639 (normal_mod_ASFLAGS): Likewise.
11641 2003-01-18 Yoshinori K. Okuji <okuji@enbug.org>
11643 * kern/rescue.c (pupa_rescue_cmd_rmmod): Call pupa_dl_unload, if
11646 * kern/dl.c (pupa_dl_ref): Refer depending modules
11648 (pupa_dl_unref): Unrefer depending modules recursively.
11649 Don't call pupa_dl_unload implicitly, because PUPA can crash if
11650 a module is unloaded before one depending on that module is
11652 (pupa_dl_unload): Unload depending modules explicitly,
11655 2003-01-17 Yoshinori K. Okuji <okuji@enbug.org>
11657 * include/pupa/i386/pc/linux.h: New file.
11658 * loader/i386/pc/linux.c: Likewise.
11660 * loader/i386/pc/chainloader.c (pupa_chainloader_boot_sector):
11662 (pupa_chainloader_unload): Return PUPA_ERR_NONE.
11663 (pupa_rescue_cmd_chainloader): Read the image to 0x7C00 instead
11664 of PUPA_CHAINLOADER_BOOT_SECTOR.
11666 * kern/i386/pc/startup.S: Include pupa/machine/linux.h.
11667 (pupa_linux_prot_size): New variable.
11668 (pupa_linux_tmp_addr): Likewise.
11669 (pupa_linux_real_addr): Likewise.
11670 (pupa_linux_boot_zimage): New function.
11671 (pupa_linux_boot_bzimage): Likewise.
11673 * kern/i386/pc/init.c (struct mem_region): New structure.
11674 (MAX_REGIONS): New macro.
11675 (mem_regions): New variable.
11676 (num_regions): Likewise.
11677 (pupa_os_area_addr): Likewise.
11678 (pupa_os_area_size): Likewise.
11679 (pupa_lower_mem): Likewise.
11680 (pupa_upper_mem): Likewise.
11681 (add_mem_region): New function.
11682 (compact_mem_regions): Likewise.
11683 (pupa_machine_init): Set PUPA_LOWER_MEM and PUPA_UPPER_MEM to
11684 the size of the conventional memory and that of so-called upper
11685 memory (before the first memory hole).
11686 Instead of adding each found region to free memory, use
11687 add_mem_region and add them after removing overlaps.
11688 Also, add only 1/4 of the upper memory to free memory. The rest
11689 is used for loading OS images. Maybe this is ad hoc, but this
11690 makes it much easier to relocate OS images when booting.
11692 * kern/rescue.c (pupa_rescue_cmd_module): Removed.
11693 (pupa_enter_rescue_mode): Don't register initrd and module.
11695 * kern/mm.c: Include pupa/dl.h.
11697 * kern/main.c: Include pupa/file.h and pupa/device.h.
11699 * kern/loader.c (pupa_loader_load_module_func): Removed.
11700 (pupa_loader_load_module): Likewise.
11702 * kern/dl.c (pupa_dl_load): Use the suffix ``.mod'' instead of
11705 * include/pupa/i386/pc/loader.h (pupa_linux_prot_size): Declared.
11706 (pupa_linux_tmp_addr): Likewise.
11707 (pupa_linux_real_addr): Likewise.
11708 (pupa_linux_boot_zimage): Likewise.
11709 (pupa_linux_boot_bzimage): Likewise.
11711 * include/pupa/i386/pc/init.h (pupa_lower_mem): Declared.
11712 (pupa_upper_mem): Likewise.
11713 (pupa_gate_a20): Don't export, because turning off Gate A20 in a
11714 module is too dangerous.
11716 * include/pupa/loader.h (pupa_os_area_addr): Declared.
11717 (pupa_os_area_size): Likewise.
11718 (pupa_loader_set): Remove the first argument. Loader doesn't
11719 manage modules or initrd any longer.
11720 (pupa_loader_load_module): Removed.
11722 * conf/i386-pc.rmk (pkgdata_MODULES): Added linux.mod.
11723 (linux_mod_SOURCES): New variable.
11724 (linux_mod_CFLAGS): Likewise.
11726 2003-01-07 Yoshinori K. Okuji <okuji@enbug.org>
11728 * util/i386/pc/pupa-setup.c (setup): Convert the endianness of
11729 the length of a blocklist correctly.
11731 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open) [__linux__]:
11732 Use ioctl only if the OS file is a block device.
11733 (pupa_util_biosdisk_open): Don't use ST.ST_BLOCKS, because it is
11734 not very useful for normal files.
11736 * kern/main.c (pupa_set_root_dev): New function.
11737 (pupa_load_normal_mode): Likewise.
11738 (pupa_main): Call those above.
11740 * include/pupa/types.h (pupa_swap_bytes16): Cast the result to
11743 * include/pupa/kernel.h (pupa_enter_normal_mode): Removed.
11745 2003-01-06 Yoshinori K. Okuji <okuji@enbug.org>
11747 * util/i386/pc/pupa-setup.c: Include pupa/machine/kernel.h.
11748 (setup): Configure the installed partition information and the
11751 * loader/i386/pc/chainloader.c (my_mod): New variable.
11752 (pupa_chainloader_unload): New function.
11753 (pupa_rescue_cmd_chainloader): Refer itself.
11754 (PUPA_MOD_INIT): Save its own module in MY_MOD.
11756 * kern/i386/pc/startup.S (install_partition): Removed.
11757 (version_string): Likewise.
11758 (config_file): Likewise.
11759 (pupa_install_dos_part): New variable.
11760 (pupa_install_bsd_part): Likewise.
11761 (pupa_prefix): Likewise.
11762 (pupa_chainloader_real_boot): Call pupa_dl_unload_all.
11764 * kern/i386/pc/init.c: Include pupa/machine/kernel.h, pupa/dl.h
11766 (make_install_device): New function.
11767 (pupa_machine_init): Set the dl prefix.
11769 * kern/rescue.c: Include pupa/rescue.h and pupa/dl.h.
11770 (buf): Renamed to ...
11771 (linebuf): ... this.
11772 (pupa_rescue_cmd_prefix): New function.
11773 (pupa_rescue_cmd_insmod): Likewise.
11774 (pupa_rescue_cmd_rmmod): Likewise.
11775 (pupa_rescue_cmd_lsmod): Likewise.
11776 (pupa_enter_rescue_mode): Register new commands: prefix, insmod,
11779 * kern/mm.c (pupa_memalign): If failed even after invalidating
11780 disk caches, unload unneeded modules and retry.
11782 * kern/misc.c (pupa_memmove): New function.
11783 (pupa_memcpy): Removed.
11784 (pupa_strcpy): New function.
11785 (pupa_itoa): Made static.
11787 * kern/dl.c (pupa_dl_iterate): New function.
11788 (pupa_dl_ref): Likewise.
11789 (pupa_dl_unref): Likewise.
11790 (pupa_dl_unload): Return if succeeded or not.
11791 (pupa_dl_unload_unneeded): New function.
11792 (pupa_dl_unload_all): Likewise.
11793 (pupa_dl_init): Renamed to ...
11794 (pupa_dl_set_prefix): ... this.
11795 (pupa_dl_get_prefix): New function.
11797 * include/pupa/i386/pc/kernel.h: Include pupa/types.h.
11798 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): New macro.
11799 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
11800 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
11801 (pupa_install_dos_part): Declared.
11802 (pupa_install_bsd_part): Likewise.
11803 (pupa_prefix): Likewise.
11804 (pupa_boot_drive): Likewise.
11806 * include/pupa/types.h: Fix a typo.
11808 * include/pupa/misc.h (pupa_memcpy): New macro. Just an alias to
11810 (pupa_memmove): Declared.
11811 (pupa_strcpy): Likewise.
11813 * include/pupa/dl.h (PUPA_MOD_INIT): Change the prototype. Now
11814 pupa_mod_init takes one argument, its own module.
11815 (pupa_dl_unload_unneeded): Declared.
11816 (pupa_dl_unload_all): Likewise.
11817 (pupa_dl_ref): Likewise.
11818 (pupa_dl_unref): Likewise.
11819 (pupa_dl_iterate): Likewise.
11820 (pupa_dl_init): Renamed to ...
11821 (pupa_dl_set_prefix): ... this.
11822 (pupa_dl_get_prefix): Declared.
11824 * fs/fat.c [!PUPA_UTIL] (my_mod): New variable.
11825 (pupa_fat_dir) [!PUPA_UTIL]: Prevent the fat module from being
11827 (pupa_fat_open) [!PUPA_UTIL]: Refer itself if succeeded.
11828 (pupa_fat_close) [!PUPA_UTIL]: Unrefer itself.
11830 * configure.ac (tmp_CFLAGS): Added -Wshadow, -Wpointer-arith,
11831 -Wmissing-prototypes, -Wundef and -Wstrict-prototypes.
11833 2003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
11835 * util/i386/pc/pupa-setup.c (setup): Define the internal
11836 function find_first_partition_start at the top level, because GCC
11837 3.0.x cannot compile internal functions in deeper scopes
11839 (find_root_device): Use lstat instead of stat.
11840 Don't follow symbolic links.
11841 Fix the path-constructing code.
11843 * util/i386/pc/biosdisk.c [__linux__] (BLKFLSBUF): New macro.
11844 (pupa_util_biosdisk_open) [__linux__]: Get the size of a device
11845 by a BLKGETSIZE ioctl first, because block devices don't fill
11846 the member st_mode of the structure stat on Linux.
11847 [__linux__] (linux_find_partition): Use a temporary buffer
11848 REAL_DEV for the working space. Copy it to DEV before returning.
11849 (open_device) [__linux__]: Call ioctl with BLKFLSBUF to make the
11850 buffer cache consistent.
11851 (get_os_disk) [__linux__]: Use the length 5 instead of 4 for
11852 strncmp. The previous value was merely wrong.
11853 (pupa_util_biosdisk_get_pupa_dev): Use stat instead of lstat.
11855 * fs/fat.c (pupa_fat_read_data): Shift 4 instead of 12 when the
11856 FAT size is 12. The previous value was merely wrong.
11858 * kern/main.c (pupa_main): Don't split the starting message from
11861 * kern/term.c (pupa_putchar): Put CR after LF instead of before
11862 LF, because BIOS goes crazy about character attributes in this
11865 2003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
11867 * include/i386/pc/util/biosdisk.h: New file.
11868 * util/i386/pc/biosdisk.c: Likewise.
11869 * util/i386/pc/pupa-setup.c: Likewise.
11871 * Makefile.in (INCLUDE_DISTFILES): Added
11872 include/pupa/i386/pc/util/biosdisk.h.
11873 (UTIL_DISTFILES): Added biosdisk.c and pupa-setup.c under the
11874 directory util/i386/pc.
11875 (install-local): Added a rule for sbin_UTILITIES.
11876 (uninstall): Likewise.
11878 * util/i386/pc/pupa-mkimage.c (usage): Fix a typo in the doc.
11880 * util/misc.c (xrealloc): New function.
11881 (pupa_malloc): Likewise.
11882 (pupa_free): Likewise.
11883 (pupa_realloc): Likewise.
11884 (pupa_stop): Likewise.
11885 (pupa_putchar): Likewise.
11887 * kern/disk.c (pupa_disk_read): Prevent L from underflowing.
11889 * include/pupa/util/misc.h (xrealloc): Declared.
11891 * include/pupa/i386/pc/boot.h (PUPA_BOOT_MACHINE_BPB_START): New
11893 (PUPA_BOOT_MACHINE_BPBEND): Renamed to ...
11894 (PUPA_BOOT_MACHINE_BPB_END): ... this.
11896 * include/pupa/fs.h [PUPA_UTIL] (pupa_fat_init): Declared.
11897 [PUPA_UTIL] (pupa_fat_fini): Likewise.
11899 * fs/fat.c [PUPA_UTIL] (pupa_fat_init): Defined. Maybe a better
11900 way should be implemented.
11901 [PUPA_UTIL] (pupa_fat_fini): Likewise.
11903 * disk/i386/pc/biosdisk.c (pupa_biosdisk_call_hook): Increase
11904 the size of NAME for safety.
11905 (pupa_biosdisk_iterate): Search hard disks to 0x90 instead of
11908 * conf/i386-pc.rmk (sbin_UTILITIES): New variable.
11909 (pupa_setup_SOURCES): Likewise.
11911 * genmk.rb (Utility#rule): Add $(BUILD_CFLAGS) into the rules.
11913 2002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
11915 * kern/i386/pc/startup.S (push_get_mmap_entry): Revert to a
11916 bunch of pushl's from pusha, because this destroys the return
11919 2002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
11921 Use -mrtd and -mregparm=3 to reduce the generated code sizes.
11922 This means that any missing prototypes could be fatal. Also, you
11923 must take care when writing assembly code. See the comments at
11924 the beginning of startup.S, for more details.
11926 * kern/i386/pc/startup.S (pupa_halt): Modified for the new
11927 compilation mechanism.
11928 (pupa_chainloader_real_boot): Likewise.
11929 (pupa_biosdisk_rw_int13_extensions): Likewise.
11930 (pupa_biosdisk_rw_standard): Likewise.
11931 (pupa_biosdisk_check_int13_extensions): Likewise.
11932 (pupa_biosdisk_get_diskinfo_int13_extensions): Likewise.
11933 (pupa_biosdisk_get_diskinfo_standard): Likewise.
11934 (pupa_get_memsize): Likewise.
11935 (pupa_get_mmap_entry): Likewise.
11936 (pupa_console_putchar): Likewise.
11937 (pupa_console_setcursor): Likewise.
11938 (pupa_getrtsecs): Use pushl instead of push.
11940 * kern/i386/pc/init.c (pupa_machine_init): Use the scratch
11941 memory instead of the stack for a mmap entry, because some
11942 BIOSes may ignore the maximum size and overflow.
11944 * conf/i386-pc.rmk (COMMON_CFLAGS): Added -mrtd and -mregparm=3.
11946 * genmk.rb (PModule#rule): Compile automatically generated
11947 sources with module-specific CFLAGS as well as other sources.
11949 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
11951 * configure.ac: Check ld.
11952 Replace CFLAGS and CPPFLAGS with BUILD_CFLAGS and BUILD_CPPFLAGS
11953 respectively, before checking endianness and sizes.
11955 * Makefile.in (LD): New variable.
11957 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
11959 * Makefile.in (BUILD_CC): CC -> BUILD_CC.
11961 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
11963 * Changelog: New file.