1 2008-07-29 Christian Franke <franke@computer.org>
3 * util/update-grub.in: Add a check for admin
5 Remove old `grub.cfg.new' before creation.
6 Add `-f' to `mv' to handle the different filesystem
9 2008-07-29 Bean <bean123ch@gmail.com>
11 * normal/main.c (get_line): Fix buffer overflow bug.
13 2008-07-28 Robert Millan <rmh@aybabtu.com>
15 * partmap/apple.c (GRUB_APPLE_HEADER_MAGIC): New macro.
16 (struct grub_apple_header): New struct. Describes the layout of
18 (apple_partition_map_iterate): Check the header magic as well as the
19 partition magic (which was already being checked).
21 2008-07-28 Pavel Roskin <proski@gnu.org>
23 * genmk.rb: Add a warning to the beginning of the output that
24 it's a generated file and should not be edited.
26 2008-07-28 Robert Millan <rmh@aybabtu.com>
28 * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
29 with the same number are found, just use issue a warning with
30 grub_dprintf(), as this error has been reported to be non-fatal.
32 2008-07-27 Robert Millan <rmh@aybabtu.com>
34 * disk/ata.c (grub_ata_dumpinfo): Use grub_dprintf() for debugging
37 2008-07-27 Bean <bean123ch@gmail.com>
39 * fs/fat.c (GRUB_FAT_MAXFILE): New constant.
40 (grub_fat_find_dir): Ignore case when comparing filename.
42 2008-07-27 Bean <bean123ch@gmail.com>
44 * fs/xfs.c (grub_xfs_dir_header): Change field i8count back to
45 smallino, as it's more descriptive, and i8count can be confused with
46 the other field count.
47 (grub_xfs_iterate_dir): Adjust grub_xfs_dir_entry pointer for small
50 2008-07-27 Bean <bean123ch@gmail.com>
52 * commands/crc.c: New file.
54 * lib/crc.c: Likewise.
56 * include/grub/lib/crc.h: Likewise.
58 * util/grub-fstest.c: grub/hexdump.h => grub/lib/hexdump.h.
60 * commands/hexdump.c: grub/hexdump.h => grub/lib/hexdump.h.
61 (hexdump): Move this function to ...
63 * lib/hexdump.c: ... here.
65 * include/grub/hexdump.h: Renamed to ...
67 * include/grub/lib/hexdump.h: ... this.
69 * commands/loadenv.c: grub/envblk.h => grub/lib/envblk.h
71 * util/grub-editenv.c: Likewise.
73 * include/envblk.h: Renamed to ...
75 * include/lib/envblk.h: ... this.
77 * util/envblk.c: Renamed to ...
79 * lib/envblk.c: ... this.
81 * conf/common.rmk (grub_fstest_SOURCES): commands/hexdump.c =>
83 (grub_editenv_SOURCES): util/envblk.c => lib/envblk.c
84 (pkglib_MODULES): Add crc.mod.
85 (hexdump_mod_SOURCES): Add lib/hexdump.c.
86 (loadenv_mod_SOURCES): util/envblk.c => lib/envblk.c.
87 (crc_mod_SOURCES): New macro.
88 (crc_mod_CFLAGS): Likewise.
89 (crc_mod_LDFLAGS): Likewise.
91 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add lib/hexdump.c.
93 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
95 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
97 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
99 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
101 2008-07-27 Felix Zielcke <fzielcke@z-51.de>
103 * commands/help.c: Include <grub/term.h>.
104 (TERM_WIDTH): Removed. Updated all users.
106 2008-07-27 Pavel Roskin <proski@gnu.org>
108 * util/getroot.c (find_root_device): Rephrase a comment to avoid
109 spurious warnings about a comment within a comment.
111 2008-07-25 Robert Millan <rmh@aybabtu.com>
113 * util/getroot.c (find_root_device): Skip devices that match
114 /dev/dm-[0-9]. This lets the real device be found for any type of
115 abstraction (LVM, EVMS, RAID..).
116 (grub_guess_root_device): Do not traverse /dev/mapper (for LVM)
117 and /dev/evms (for EVMS) before traversing /dev. If a /dev/dm-[0-9]
118 device is found first, find_root_device() will now skip it.
120 2008-07-24 Pavel Roskin <proski@gnu.org>
122 * include/grub/types.h: Use __builtin_bswap32() and
123 __builtin_bswap64() with gcc 4.3 and newer.
125 2008-07-24 Christian Franke <franke@computer.org>
127 * util/i386/pc/grub-install.in: If `--debug' is specified,
128 pass `--verbose' to grub-setup.
129 Abort script if make_system_path_relative_to_its_root() fails.
131 2008-07-24 Bean <bean123ch@gmail.com>
133 * configure.ac: Fixed a bug caused by the previous cygwin patch,
134 variable `target_platform' should be `platform'.
136 2008-07-24 Bean <bean123ch@gmail.com>
138 * video/reader/png.c (DEFLATE_HLIT_MAX): Change value.
139 (grub_png_init_fixed_block): New function.
140 (grub_png_decode_image_data): Handle fixed huffman code compression.
142 2008-07-24 Bean <bean123ch@gmail.com>
144 * common.rmk (bin_UTILITIES): Add grub-pe2elf.
145 (grub_pe2elf_SOURCES): New macro.
146 (CLEANFILES): Add grub-pe2elf.
148 * include/grub/efi/pe32.h (GRUB_PE32_SCN_ALIGN_1BYTES): New constant.
149 (GRUB_PE32_SCN_ALIGN_2BYTES): Likewise.
150 (GRUB_PE32_SCN_ALIGN_4BYTES): Likewise.
151 (GRUB_PE32_SCN_ALIGN_8BYTES): Likewise.
152 (GRUB_PE32_SCN_ALIGN_16BYTES): Likewise.
153 (GRUB_PE32_SCN_ALIGN_32BYTES): Likewise.
154 (GRUB_PE32_SCN_ALIGN_64BYTES): Likewise.
155 (GRUB_PE32_SCN_ALIGN_SHIFT): Likewise.
156 (GRUB_PE32_SCN_ALIGN_MASK): Likewise.
157 (GRUB_PE32_SYM_CLASS_EXTERNAL): Likewise.
158 (GRUB_PE32_SYM_CLASS_STATIC): Likewise.
159 (GRUB_PE32_SYM_CLASS_FILE): Likewise.
160 (GRUB_PE32_DT_FUNCTION): Likewise.
161 (GRUB_PE32_REL_I386_DIR32): Likewise.
162 (GRUB_PE32_REL_I386_REL32): Likewise.
163 (grub_pe32_symbol): New structure.
164 (grub_pe32_reloc): Likewise.
166 * util/grub-pe2elf.c: New file.
168 * configure.ac: Set TARGET_OBJ2ELF if host os is cygwin. Don't test for
169 start symbol in non pc platform.
171 * genmk.rb: Use TARGET_OBJ2ELF to convert native object format to elf.
173 The following patches are from Christian Franke.
175 * include/grub/dl.h: Remove .previous, gas supports this only
178 * include/grub/symbol.h [__CYGWIN__] (#define FUNCTION/VARIABLE):
179 Remove .type, gas supports this only for ELF format.
181 * kern/dl.c (grub_dl_resolve_dependencies): Add check for trailing
182 nullbytes in symbol table. This fixes an infinite loop if table is
185 * Makefile.in: Add autoconf replacements TARGET_IMG_LDSCRIPT,
186 TARGET_IMG_LDFLAGS and EXEEXT.
188 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Replace -Wl,-N by
189 TARGET_IMG_LDFLAGS_AC.
190 (grub_CHECK_STACK_ARG_PROBE): New function.
192 * conf/i386-pc.rmk: Replace -Wl,-N by TARGET_IMG_LDFLAGS.
194 * conf/i386-pc-cygwin-ld-img.sc: New linker script.
196 * configure.ac: Add check for linker script "conf/${target}-img-ld.c"
197 to set TARGET_IMG_LD* accordingly.
198 Add check for Cygwin to set TARGET_MOD_OBJCOPY accordingly.
199 Add call to grub_CHECK_STACK_ARG_PROBE.
200 Use TARGET_IMG_LDFLAGS to check start, bss_start, end symbols.
202 * genkernsyms.sh.in: Handle HAVE_ASM_USCORE case.
204 * genmk.rb: Add EXEEXT to CLEANFILES.
206 2008-07-23 Robert Millan <rmh@aybabtu.com>
208 * Makefile.in (UNICODE_ARROWS, UNICODE_LINES): New variables (they
209 define the codes for arrows and lines used for the menu).
210 (ascii.pff): Generate fonts for $(UNICODE_ARROWS) and $(UNICODE_LINES)
213 * util/update-grub_lib.in (font_path): Prefer ascii.pff over complete
214 fonts, because the latter are too slow.
216 2008-07-21 Bean <bean123ch@gmail.com>
218 * kern/i386/pc/startup.S (gate_a20_try_bios): Change test order for
219 a20. Run keyboard test last, as it will cause macbook to halt.
221 2008-07-18 Pavel Roskin <proski@gnu.org>
223 * kern/dl.c: Go back to using GRUB_CPU_SIZEOF_VOID_P. We cannot
224 load foreign architecture modules correctly anyway. Keep
225 support for loading host architecture modules, whether we
228 2008-07-17 Pavel Roskin <proski@gnu.org>
230 * configure.ac: Use -m32 or -m64 regardless of whether we had to
231 change target_cpu. The compiler default can mismatch target_cpu
234 * disk/efi/efidisk.c: Fix format warnings on x86_64.
235 * kern/efi/efi.c: Likewise.
237 * aclocal.m4 (grub_PROG_TARGET_CC): New macro. Check if the
238 target compiler is functional.
239 * configure.ac: Call grub_PROG_TARGET_CC once all target flags
242 * configure.ac: Default to efi platform for x86_64-apple. Allow
243 powerpc64 CPU, default to ieee1275 platform for it. Split CPU
244 adjustments from the rest, only do them if target is not
245 explicitly given. Merge other adjustments with the final sanity
246 check. Remove an extraneous check for supported CPU. Be
247 specific which CPU and which platform is not supported.
249 * configure.ac: Default to pc platform for x86_64.
251 2008-07-17 Robert Millan <rmh@aybabtu.com>
253 Partial LinuxBIOS -> Coreboot rename.
255 * conf/i386-linuxbios.rmk: Renamed to ...
256 * conf/i386-coreboot.rmk: ... this.
257 * Makefile.in (RMKFILES): s/i386-linuxbios.rmk/i386-coreboot.rmk/g.
258 * configure.ac: Accept "coreboot" as input platform (but maintain
259 compatibility with "linuxbios").
260 * include/grub/i386/linuxbios: Renamed to ...
261 * include/grub/i386/coreboot: ... this.
263 2008-07-17 Bean <bean123ch@gmail.com>
265 * conf/i386/efi.rmk (pkglib_MODULES): add pci.mod and lspci.mod.
266 (appleldr_mod_SOURCE): New variable.
267 (appleldr_mod_CFLAGS): Likewise.
268 (appleldr_mod_LDFLAGS): Likewise.
269 (pci_mod_SOURCES): Likewise.
270 (pci_mod_CFLAGS): Likewise.
271 (pci_mod_LDFLAGS): Likewise.
272 (lspci_mod_SOURCES): Likewise.
273 (lspci_mod_CFLAGS): Likewise.
274 (lspci_mod_LDFLAGS): Likewise.
276 * conf/x86_64-efi.rmk: New file.
278 * disk/efi/efidisk.c (grub_efidisk_read): Wrap efi calls with efi_call_N
280 (grub_efidisk_write): Likewise.
282 * include/efi/api.h (efi_call_0): New macro.
283 (efi_call_1): Likewise.
284 (efi_call_2): Likewise.
285 (efi_call_3): Likewise.
286 (efi_call_4): Likewise.
287 (efi_call_5): Likewise.
288 (efi_call_6): Likewise.
290 * include/grub/efi/chainloader.h (grub_chainloader_cmd): Rename to
291 grub_rescue_cmd_chainloader.
293 * include/grub/efi/pe32.h (GRUB_PE32_MACHINE_X86_64): New macro.
294 (grub_pe32_optional_header): Change some fields based on i386 or
296 (GRUB_PE32_PE32_MAGIC): Likewise.
298 * include/grub/efi/uga_draw.h: New file.
300 * include/grub/elf.h (STN_ABS): New constant.
301 (R_X86_64_NONE): Relocation constant for x86_64.
302 (R_X86_64_64): Likewise.
303 (R_X86_64_PC32): Likewise.
304 (R_X86_64_GOT32): Likewise.
305 (R_X86_64_PLT32): Likewise.
306 (R_X86_64_COPY): Likewise.
307 (R_X86_64_GLOB_DAT): Likewise.
308 (R_X86_64_JUMP_SLOT): Likewise.
309 (R_X86_64_RELATIVE): Likewise.
310 (R_X86_64_GOTPCREL): Likewise.
311 (R_X86_64_32): Likewise.
312 (R_X86_64_32S): Likewise.
313 (R_X86_64_16): Likewise.
314 (R_X86_64_PC16): Likewise.
315 (R_X86_64_8): Likewise.
316 (R_X86_64_PC8): Likewise.
318 * include/grub/i386/efi/pci.h: New file.
320 * include/grub/i386/linux.h (GRUB_LINUX_EFI_SIGNATURE):
321 Change it value based on platform.
322 (GRUB_LINUX_EFI_SIGNATURE_0204): New constant.
323 (GRUB_E820_RAM): Likewise.
324 (GRUB_E820_RESERVED): Likewise.
325 (GRUB_E820_ACPI): Likewise.
326 (GRUB_E820_NVS): Likewise.
327 (GRUB_E820_EXEC_CODE): Likewise.
328 (GRUB_E820_MAX_ENTRY): Likewise.
329 (grub_e820_mmap): New structure.
330 (linux_kernel_header): Change the efi field according to different
331 kernel version, also field from linux_kernel_header.
333 * include/grub/kernel.h (grub_module_info): Add padding for x86_64.
335 * include/grub/pci.h (GRUB_PCI_ADDR_SPACE_MASK): New constant.
336 (GRUB_PCI_ADDR_SPACE_MEMORY): Likewise.
337 (GRUB_PCI_ADDR_SPACE_IO): Likewise.
338 (GRUB_PCI_ADDR_MEM_TYPE_MASK): Likewise.
339 (GRUB_PCI_ADDR_MEM_TYPE_32): Likewise.
340 (GRUB_PCI_ADDR_MEM_TYPE_1M): Likewise.
341 (GRUB_PCI_ADDR_MEM_TYPE_64): Likewise.
342 (GRUB_PCI_ADDR_MEM_PREFETCH): Likewise.
343 (GRUB_PCI_ADDR_MEM_MASK): Likewise.
344 (GRUB_PCI_ADDR_IO_MASK): Likewise.
346 * include/grub/x86_64/efi/kernel.h: New file.
348 * include/grub/x86_64/efi/loader.h: Likewise.
350 * include/grub/x86_64/efi/machine.h: Likewise.
352 * include/grub/x86_64/efi/pci.h: Likewise.
354 * include/grub/x86_64/efi/time.h: Likewise.
356 * include/grub/x86_64/linux.h: Likewise.
358 * include/grub/x86_64/setjmp.h: Likewise.
360 * include/grub/x86_64/time.h: Likewise.
362 * include/grub/x86_64/types.h: Likewise.
364 * kern/dl.c (GRUB_CPU_SIZEOF_VOID_P): Changed to
365 GRUB_TARGET_SIZEOF_VOID_P.
367 * kern/efi/efi.c (grub_efi_locate_protocol): Wrap efi calls.
368 (grub_efi_locate_handle): Likewise.
369 (grub_efi_open_protocol): Likewise.
370 (grub_efi_set_text_mode): Likewise.
371 (grub_efi_stall): Likewise.
372 (grub_exit): Likewise.
373 (grub_reboot): Likewise.
374 (grub_halt): Likewise.
375 (grub_efi_exit_boot_services): Likewise.
376 (grub_get_rtc): Likewise.
378 * kern/efi/mm.c (MEMORY_MAP_SIZE): Change to 0x3000 for new models.
379 (GRUB_CPU_SIZEOF_VOID_P): Changed to GRUB_TARGET_SIZEOF_VOID_P.
380 (grub_efi_allocate_pages): Wrap efi calls.
381 (grub_efi_free_pages): Wrap efi calls.
382 (grub_efi_get_memory_map): Wrap efi calls.
384 * kern/x86_64/dl.c: New file.
386 * kern/x86_64/efi/callwrap.S: Likewise.
388 * kern/x86_64/efi/startup.S: Likewise.
390 * loader/efi/appleloader.c: Likewise.
392 * loader/efi/chainloader.c (cmdline): New variable.
393 (grub_chainloader_unload): Wrap efi calls.
394 (grub_chainloader_boot): Likewise.
395 (grub_rescue_cmd_chainloader): Wrap efi calls, handle
398 * loader/efi/chainloader_normal.c (chainloader_command):
399 Change grub_chainloader_cmd to grub_rescue_cmd_chainloader, pass
402 * loader/i386/efi/linux.c (allocate_pages): Change allocation
404 (grub_e820_add_region): New function.
405 (grub_linux_boot): Construct e820 map from efi map, handle x86_64
407 (grub_find_video_card): New function.
408 (grub_linux_setup_video): New function.
409 (grub_rescue_cmd_linux): Probe for video information.
411 * normal/x86_64/setjmp.S: New file.
413 * term/efi/console.c (map_char): New function.
414 (grub_console_putchar): Map unicode char.
415 (grub_console_checkkey): Wrap efi calls.
416 (grub_console_getkey): Likewise.
417 (grub_console_getwh): Likewise.
418 (grub_console_gotoxy): Likewise.
419 (grub_console_cls): Likewise.
420 (grub_console_setcolorstate): Likewise.
421 (grub_console_setcursor): Likewise.
423 * util/i386/efi/grub-mkimage.c: Add support for x86_64.
425 2008-07-16 Pavel Roskin <proski@gnu.org>
427 * loader/i386/efi/linux.c (allocate_pages): Fix warnings in
430 * util/i386/efi/grub-mkimage.c (get_target_address): Return a
431 pointer, not an integer. This fixes a warning and prevents
432 precision loss on 64-bit systems.
433 (relocate_addresses): Remove unneeded cast.
435 2008-07-15 Pavel Roskin <proski@gnu.org>
437 * kern/i386/ieee1275/init.c: Include grub/cache.h.
439 * term/ieee1275/ofconsole.c: Disable code unused on i386.
441 * kern/ieee1275/ieee1275.c (grub_ieee1275_get_integer_property):
442 Fix comparison between signed and unsigned.
444 * include/grub/i386/ieee1275/console.h: Declare
445 grub_console_init() and grub_console_fini().
447 * loader/i386/ieee1275/linux.c (grub_set_bootpath): Remove.
448 It's empty and unused.
450 * fs/ext2.c (grub_ext2_read_block): Initialize blknr in the
451 beginning to avoid warnings with some compilers.
453 * loader/ieee1275/multiboot2.c: Include grub/machine/loader.h.
454 [__i386__] (grub_mb2_arch_boot): Avoid unnecessary cast.
456 2008-07-14 Pavel Roskin <proski@gnu.org>
458 * kern/env.c (grub_register_variable_hook): Don't copy empty
459 string, it leaks memory. Pass "" to grub_env_set(), it should
460 handle constant strings.
462 * commands/blocklist.c (grub_cmd_blocklist): Fix format warning.
463 * commands/cmp.c (grub_cmd_cmp): Likewise.
464 * kern/dl.c (grub_dl_flush_cache): Likewise.
465 (grub_dl_load_core): Likewise.
466 * kern/elf.c (grub_elf32_load_phdrs): Likewise.
467 (grub_elf64_load_phdrs): Likewise.
469 2008-07-13 Pavel Roskin <proski@gnu.org>
471 * lib/LzmaEnc.c (LzmaEnc_SetProps): Fix warning about comparison
472 between signed and unsigned.
473 (LzmaEnc_Finish): Fix warning about an unused parameter.
475 2008-07-13 Bean <bean123ch@gmail.com>
477 * Makefile.in (enable_lzo): New rule.
479 * conf/i386-pc.rmk (grub_mkimage_SOURCES): New test with enable_lzo.
481 * configure.ac (ENABLE_LZO): New option --enable-lzo.
483 * boot/i386/pc/lnxboot.S: #include <config.h>.
485 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE): Change
486 its value according to the compression algorithm used, lzo or lzma.
488 * util/i386/pc/grub-mkimage.c (compress_kernel): Use different
489 compression algorithm according to configure macro.
491 * kern/i386/pc/startup.S (codestart): Likewise.
493 * kern/i386/pc/lzma_decode.S: New file.
495 * include/grub/lib/LzFind.h: Likewise.
497 * include/grub/lib/LzHash.h: Likewise.
499 * include/grub/lib/LzmaDec.h: Likewise.
501 * include/grub/lib/LzmaEnc.h: Likewise.
503 * include/grub/lib/LzmaTypes.h: Likewise.
505 * lib/LzFind.c: Likewise.
507 * lib/LzmaDec.c: Likewise.
509 * lib/LzmaEnc.c: Likewise.
511 2008-07-13 Bean <bean123ch@gmail.com>
513 * fs/ext2.c (EXT4_EXTENTS_FLAG): New macro.
514 (grub_ext4_extent_header): New structure.
515 (grub_ext4_extent): Likewise.
516 (grub_ext4_extent_idx): Likewise.
517 (grub_ext4_find_leaf): New function.
518 (grub_ext2_read_block): Handle extents.
520 2008-07-12 Robert Millan <rmh@aybabtu.com>
522 * util/i386/pc/grub-mkrescue.in: s/grub-install/grub-mkrescue/g.
524 2008-07-11 Robert Millan <rmh@aybabtu.com>
526 * util/grub.d/40_custom.in: New file. Example on how to add custom
527 entries to /etc/grub.d.
528 * conf/common.rmk (%, update-grub_SCRIPTS, CLEANFILES): Install
529 40_custom (implicitly, by merging all the grub.d rules).
531 2008-07-11 Pavel Roskin <proski@gnu.org>
533 * commands/read.c (grub_getline): Fix invalid memory access.
534 Don't add newline to the variable value.
536 * term/i386/pc/serial.c (GRUB_SERIAL_PORT_NUM): New constant.
537 [!GRUB_MACHINE_PCBIOS] (serial_hw_io_addr): Add COM2 and COM3.
538 (serial_hw_get_port): Check validity of the port number.
539 (grub_cmd_serial): Check return value of serial_hw_get_port().
541 2008-07-07 Pavel Roskin <proski@gnu.org>
543 * boot/i386/pc/diskboot.S (notification_string): Replace
544 "Loading kernel" with just "loading". This is shorter, less
545 confusing and saves a few bytes for possible future changes.
547 2008-07-05 Pavel Roskin <proski@gnu.org>
549 * disk/ata.c (grub_ata_dumpinfo): Don't output addressing and
550 size for ATAPI devices, they are undefined. Output sector
551 number in decimal form.
553 * disk/ata.c: Use named constants for status bits.
555 2008-07-04 Pavel Roskin <proski@gnu.org>
557 * kern/i386/linuxbios/init.c (grub_machine_init): Cast addr to
558 grub_addr_t before casting it to the void pointer to fix a
559 warning. Non-addressable regions are discarded earlier.
560 (grub_arch_modules_addr): Cast _end to grub_addr_t.
561 * kern/i386/linuxbios/table.c: Include grub/misc.h.
562 (check_signature): Don't shadow table_header.
563 (grub_linuxbios_table_iterate): Cast numeric constants to
564 grub_linuxbios_table_header_t.
565 * include/grub/i386/linuxbios/init.h: Add noreturn attribute to
568 * kern/ieee1275/init.c: Cast _start and _end to grub_addr_t to
571 * include/grub/misc.h (ALIGN_UP): Avoid unnecessary cast to a
572 pointer, which can cause warnings. Support 64-bit addresses.
574 * util/elf/grub-mkimage.c: Use GRUB_TARGET_SIZEOF_LONG instead
575 of sizeof(long). This fixes PowerPC image generation on x86_64.
577 2008-07-04 Robert Millan <rmh@aybabtu.com>
579 This fixes a performance issue when pc & gpt partmap iterators
580 didn't abort iteration even after our hook found what it was
581 looking for (often causing expensive probes of non-existent drives).
583 Some callers relied on previous buggy behaviour, since they would
584 rise an error when their own hooks caused early abortion of its
587 * kern/device.c (grub_device_open): Improve error message.
588 * disk/lvm.c (grub_lvm_open): Likewise.
589 * disk/raid.c (grub_raid_open): Likewise.
591 * partmap/pc.c (pc_partition_map_iterate): Abort parent iteration
592 when hook requests it, independently of grub_errno.
593 (pc_partition_map_probe): Do not fail when find_func() caused
594 early abortion of pc_partition_map_iterate().
596 * partmap/gpt.c (gpt_partition_map_iterate): Abort parent iteration
597 when hook requests it, independently of grub_errno.
598 (gpt_partition_map_probe): Do not fail when find_func() caused
599 early abortion of gpt_partition_map_iterate().
601 * kern/partition.c (grub_partition_iterate): Abort parent iteration
602 when hook requests it, independently of grub_errno. Do not fail when
603 part_map_iterate_hook() caused early abortion of p->iterate().
605 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Do not fail
606 when grub_partition_iterate() returned with non-zero.
608 2008-07-03 Pavel Roskin <proski@gnu.org>
610 * disk/ata.c (grub_ata_pio_write): Check status before writing,
611 like we do in grub_ata_pio_read().
612 (grub_ata_readwrite): Always write individual sectors. Fix the
613 sector count for the remainder.
614 (grub_ata_write): Enable writing to ATA devices. Correctly
615 report error for ATAPI devices.
617 2008-07-02 Pavel Roskin <proski@gnu.org>
619 * boot/i386/pc/cdboot.S: Add _start entry to fix a linker
622 * disk/ata.c (grub_ata_readwrite): Don't increment sector number
623 for every read sector, we already increment it for the whole
624 batch. This fixes reading more than 256 sectors at once.
626 * util/grub-editenv.c (cmd_info): Cast argument to long
627 explicitly. ptrdiff_t reduces to int on i386.
629 * util/grub-editenv.c (main): Be specific which parameter is
632 * disk/memdisk.c (memdisk_addr): Make a pointer to fix warnings.
633 (memdisk): Make memdisk_orig_addr a pointer.
635 * fs/reiserfs.c (grub_reiserfs_read): Fix misuse of grub_size_t
636 for file offsets, use grub_off_t instead. Fix printf format
639 * fs/reiserfs.c: Remove #warning, TODO list items don't belong
640 there. Real unexpected warnings should not drown in the noise
641 about known problems.
643 * commands/hexdump.c (grub_cmd_hexdump): Fix misuse of
644 grub_disk_addr_t for memory addresses.
646 * loader/aout.c (grub_aout_load): Cast load_addr to pointer
647 explicitly to fix a warning.
649 * util/grub-editenv.c (cmd_info): Fix warning in printf format.
651 * Makefile.in (MODULE_LDFLAGS): New variable.
652 * aclocal.m4 (grub_PROG_LD_BUILD_ID_NONE): New macro. Check if
653 the linker accepts --build-id=none.
654 * configure.ac: Call grub_PROG_LD_BUILD_ID_NONE. Substitute
656 * genmk.rb: Use MODULE_LDFLAGS when linking modules.
658 * fs/xfs.c (struct grub_xfs_dir_header): Use names similar to
659 those in Linux XFS code. Provide a way to access 64-bit parent
661 (grub_xfs_iterate_dir): Use the new names. Avoid reading past
662 the end of struct grub_xfs_dir_header.
664 2008-07-02 Bean <bean123ch@gmail.com>
666 * include/grub/ieee1275.h (grub_ieee1275_flag): New constant
667 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
668 and GRUB_IEEE1275_FLAG_NO_ANSI.
670 * kern/ieee1275/cmain.c (grub_ieee1275_find_options): Set flag
671 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
672 and GRUB_IEEE1275_FLAG_NO_ANSI for Open Hackware.
674 * kern/ieee1275/ieee1275.c (grub_ieee1275_interpret): Return
675 immediately if GRUB_IEEE1275_FLAG_CANNOT_INTERPRET is set.
677 * kern/ieee1275/init.c (grub_claim_heap): Claim memory directly if
678 GRUB_IEEE1275_FLAG_FORCE_CLAIM is set.
680 * term/ieee1275/ofconsole.c (grub_ofconsole_writeesc): Don't output
681 esc sequence on non ANSI terminal.
682 (grub_ofconsole_gotoxy): Emulate backspace key on non ANSI terminal.
684 * util/elf/grub-mkimage.c (add_segments): Move ELF header to the
687 2008-07-02 Bean <bean123ch@gmail.com>
689 * conf/common.rmk (bin_UTILITIES): Add grub-editenv.
690 (grub_editenv_SOURCES): New variable.
691 (pkglib_MODULES): Add loadenv.mod.
692 (loadenv_mod_SOURCES): New variable.
693 (loadenv_mod_CFLAGS): Likewise.
694 (loadenv_mod_LDFLAGS): Likewise.
696 * include/grub/envblk.h: New file.
698 * util/envblk.c: New file.
700 * util/grub-editenv.c: New file.
702 * commands/loadenv.c: New file.
704 2008-07-01 Pavel Roskin <proski@gnu.org>
706 * include/multiboot2.h (struct multiboot_tag_module): Use char,
707 not unsigned char. This fixes warnings and is consistent with
710 * disk/fs_uuid.c (search_fs_uuid): Correctly increment count.
712 * normal/parser.y: Define YYENABLE_NLS as 0 to fix warnings.
714 * term/tparm.c (analyze): Always set *popcount.
716 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Remove useless
717 cast to fix a warning.
719 * loader/i386/pc/multiboot2.c (grub_mb2_arch_module_alloc): Use
720 cast to suppress a warning.
722 * fs/afs.c (grub_afs_read_block): Return grub_disk_addr_t, as
723 grub_fshelp_read_file() expects.
725 * fs/fat.c: Fix UUID calculation on big-endian systems. We
726 write uuid as a 32-bit value in CPU byte order, so declare and
729 * disk/raid.c: Cast grub_dprintf() arguments to unsigned long
730 long if the format specifier expects it.
731 * partmap/gpt.c (gpt_partition_map_iterate): Likewise.
732 * partmap/pc.c (pc_partition_map_iterate): Likewise.
733 * fs/ntfs.c (grub_ntfs_uuid): Cast data->uuid to unsigned long
734 long to fix a warning.
735 * fs/reiserfs.c (grub_reiserfs_read): Change casts in
736 grub_dprintf() arguments to fix warnings.
738 2008-06-30 Pavel Roskin <proski@gnu.org>
740 * util/i386/pc/grub-setup.c (setup): Write install_dos_part and
741 install_bsd_part immediately before core.img is embedded or
742 modified on disk. This fixes core.img verification if core.img
745 * util/i386/pc/grub-setup.c (setup): Use core_path_dev, not
746 core_path to calculate the blocklist.
747 Patch from Javier MartÃn <lordhabbit@gmail.com>
749 2008-06-29 Robert Millan <rmh@aybabtu.com>
751 * fs/xfs.c (GRUB_XFS_FSB_TO_BLOCK): New macro. Maps filesystem
753 (grub_xfs_read_block): Use GRUB_XFS_FSB_TO_BLOCK() on result.
754 Patch from Niels Böhm <bitbucket@arcor.de>
756 2008-06-29 Robert Millan <rmh@aybabtu.com>
758 * util/update-grub_lib.in (font_path): Search for fonts in
759 /boot/grub first, which is more likely to be readable (we aren't
760 deciding where fonts live, just looking for them).
762 2008-06-26 Pavel Roskin <proski@gnu.org>
764 * util/biosdisk.c (read_device_map): Don't leave dead map
765 entries for devices failing stat() check.
767 * util/i386/pc/grub-setup.c (setup): Don't reuse core_path, use
768 core_path_dev for the core.img path on the target device.
770 2008-06-26 Robert Millan <rmh@aybabtu.com>
772 * disk/fs_uuid.c: New file.
773 * conf/common.rmk (pkglib_MODULES): Add `fs_uuid.mod'.
774 (fs_uuid_mod_SOURCES, fs_uuid_mod_CFLAGS)
775 (fs_uuid_mod_LDFLAGS): New variables.
776 * include/grub/disk.h (grub_disk_dev_id): Add
777 `GRUB_DISK_DEVICE_UUID_ID'.
778 * kern/disk.c (grub_disk_dev_iterate): Allow disk devices not to
781 2008-06-26 Robert Millan <rmh@aybabtu.com>
783 * util/grub.d/10_linux.in: Avoid passing UUIDs to Linux when either
784 "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" does not exist, or when a
785 Linux image includes no initrd.
787 2008-06-21 Javier MartÃn <lordhabbit@gmail.com>
789 * util/i386/pc/grub-setup.c (setup): Remove literal "core.img" in a
790 call to resolve the core image location that effectively appended the
793 2008-06-21 Robert Millan <rmh@aybabtu.com>
795 * util/grub.d/00_header.in: Move last prepare_grub_to_access_device()
798 * util/grub.d/10_hurd.in: ... to here ...
799 * util/grub.d/10_linux.in: ... and here.
801 2008-06-19 Robert Millan <rmh@aybabtu.com>
803 * kern/main.c (grub_main): Export `prefix' variable immediately
804 after it has been set by grub_machine_set_prefix().
806 2008-06-19 Robert Millan <rmh@aybabtu.com>
808 * commands/search.c (search_label, search_fs_uuid, search_file): Print
809 search result when not saving to variable, not the other way around.
810 When saving to variable, abort iteration as soon as a match is found.
812 2008-06-19 Robert Millan <rmh@aybabtu.com>
814 * util/update-grub_lib.in (prepare_grub_to_access_device): Remove
815 check for partition that provides /boot/grub. Its logic is flawed,
816 as it prevents prepare_grub_to_access_device() from being called
819 2008-06-19 Robert Millan <rmh@aybabtu.com>
821 * util/update-grub_lib.in (prepare_grub_to_access_device): Issue
822 "insmod" command directly when abstraction modules are needed,
823 instead of relying on GRUB_PRELOAD_MODULES (which had no effect
824 since it had already been processed).
826 2008-06-19 Pavel Roskin <proski@gnu.org>
828 * conf/i386-efi.rmk: Recompile grub-mkimage.c if Makefile has
829 changed. This is needed in case GRUB_LIBDIR changes.
830 * conf/i386-ieee1275.rmk: Likewise.
831 * conf/i386-linuxbios.rmk: Likewise.
832 * conf/i386-pc.rmk: Likewise.
833 * conf/powerpc-ieee1275.rmk: Likewise.
835 2008-06-18 Pavel Roskin <proski@gnu.org>
837 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Rename
838 kernel_elf_symlist.c to symlist.c for consistency with other
839 architectures. Update all users.
840 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
842 2008-06-18 Robert Millan <rmh@aybabtu.com>
844 * util/i386/pc/grub-install.in: If the drive is LVM or RAID, prepend
847 * util/i386/pc/grub-setup.c (main): Don't handle prefix at all. Set
848 `must_embed' to 1 when root_dev is a RAID device. When dest_dev is
849 a RAID device, run setup() for all members independently on whether
850 LVM abstraction is being used.
851 (setup): Don't handle prefix at all; let grub-mkimage take care of it.
852 If grub-mkimage has set `*install_dos_part == -2', don't override this
854 Perform *install_dos_part adjustments independently on whether
855 we're embedding or not.
856 Clarify error message when image is too big for embedding.
857 Remove duplicate *install_dos_part stanza.
859 2008-06-17 Robert Millan <rmh@aybabtu.com>
861 * term/ieee1275/ofconsole.c (fgcolor, bgcolor): Remove variables.
862 (grub_ofconsole_normal_color, grub_ofconsole_highlight_color): New
864 (grub_ofconsole_setcolor, grub_ofconsole_getcolor): Load/store
865 values in grub_ofconsole_normal_color and
866 grub_ofconsole_highlight_color (they're not directly related to
867 background and foreground).
868 (grub_ofconsole_setcolorstate): Extract background and foreground
869 from grub_ofconsole_normal_color and grub_ofconsole_highlight_color.
871 2008-06-17 Robert Millan <rmh@aybabtu.com>
873 * util/update-grub_lib.in (prepare_grub_to_access_device): Use
874 /boot/grub for the check in last commit, not /boot (they could be
875 different partitions).
877 2008-06-16 Robert Millan <rmh@aybabtu.com>
879 * util/update-grub_lib.in (prepare_grub_to_access_device): If we were
880 asked to setup access for the same partition that provides /boot,
881 don't bother using UUIDs since our root already has the value we
884 2008-06-16 Robert Millan <rmh@aybabtu.com>
886 * util/biosdisk.c (convert_system_partition_to_system_disk): Detect
888 Patch from Sven Mueller <sven@debian.org>.
890 2008-06-16 Robert Millan <rmh@aybabtu.com>
892 * util/update-grub.in: Check for $EUID instead of $UID.
893 Reported by Vincent Zweije.
895 2008-06-16 Bean <bean123ch@gmail.com>
897 * fs/ext2.c (grub_ext2_blockgroup): Revert to pre-journal state.
898 (grub_ext2_read_block): Likewise.
899 (grub_ext2_read_inode): Likewise.
900 (grub_ext2_mount): Likewise.
901 (grub_ext2_close): Likewise.
902 (grub_ext3_get_journal): Removed.
904 * fs/reiserfs.c (grub_reiserfs_get_item): Revert to pre-journal state.
905 (grub_reiserfs_read_symlink): Likewise.
906 (grub_reiserfs_mount): Likewise.
907 (grub_reiserfs_open): Likewise.
908 (grub_reiserfs_read): Likewise.
909 (grub_reiserfs_close): Likewise.
910 (grub_reiserfs_get_journal): Removed.
912 * fs/fshelp.c (grub_fshelp_read): Removed.
913 (grub_fshelp_map_block): Likewise.
915 * include/grub/fshelp.h (grub_fshelp_journal_type): Removed.
916 (grub_fshelp_journal): Likewise.
917 (grub_fshelp_read): Likewise.
918 (grub_fshelp_map_block): Likewise.
920 2008-06-16 Pavel Roskin <proski@gnu.org>
922 * conf/powerpc-ieee1275.rmk: Remove -msoft-float, we don't use
923 floating point anymore.
924 * include/grub/powerpc/libgcc.h: Leave only necessary exports.
926 2008-06-15 Pavel Roskin <proski@gnu.org>
928 * commands/ls.c (grub_ls_list_files): Use integer calculations
929 for human readable format, avoid floating point use.
930 * kern/misc.c (grub_ftoa): Remove.
931 (grub_vsprintf): Remove floating point support.
933 2008-06-15 Robert Millan <rmh@aybabtu.com>
935 * util/grub.d/10_linux.in: Use the underlying device for loop-AES
937 Reported by Max Vozeler.
939 2008-06-15 Robert Millan <rmh@aybabtu.com>
941 * util/i386/pc/grub-mkimage.c (generate_image): If we included a drive
942 in our prefix, set install_{dos,bsd}_part = -2 to indicate this can be
944 (main): If a memdisk was requested, add "(memdisk)" drive explicitly to
945 the beginning of the prefix.
947 * kern/i386/pc/init.c (make_install_device): Remove memdisk check.
948 It is assumed that if we have a memdisk, grub-mkimage has set
949 grub_prefix to include the "(memdisk)" drive in it.
951 2008-06-15 Robert Millan <rmh@aybabtu.com>
953 * term/i386/pc/console.c [GRUB_MACHINE_LINUXBIOS] (grub_console_init):
954 Initialize keyboard controller after registering the terminal, so that
955 grub_printf() can be called from grub_keyboard_controller_init().
957 2008-06-15 Robert Millan <rmh@aybabtu.com>
959 * fs/sfs.c (grub_sfs_read_extent): Fix the count of nodes in
960 extent-btree which is written as big endian on disk.
961 Reported by Alain Greppin <al@chilibi.org>.
963 2008-06-14 Robert Millan <rmh@aybabtu.com>
965 * util/i386/efi/grub-install.in (modules): Remove `_chain'.
966 * util/i386/pc/grub-install.in (modules): Likewise.
968 2008-06-13 Pavel Roskin <proski@gnu.org>
970 * commands/ls.c (grub_ls_list_files): Fix format warnings.
972 2008-06-13 Bean <bean123ch@gmail.com>
974 * commands/hexdump.c (grub_cmd_hexdump): Adjust offset for partition.
976 * fs/ext2.c (grub_ext3_get_journal): Fix revoke block handling.
978 * fs/fshelp.c (grub_fshelp_map_block): Don't map block 0 as it's used
979 to indicate sparse block.
981 2008-06-12 Pavel Roskin <proski@gnu.org>
983 * fs/ext2.c (grub_ext2_read_inode): Don't normalize block
984 number, grub_fshelp_read() does it for us.
986 * fs/fshelp.c (grub_fshelp_read): New function. Implement
987 linear disk read with journal translation.
988 * fs/ext2.c: Use grub_fshelp_read() instead of grub_disk_read().
989 * include/grub/fshelp.h: Declare grub_fshelp_read().
991 2008-06-09 Pavel Roskin <proski@gnu.org>
993 * fs/minix.c (grub_minix_mount): Handle error reading
996 2008-06-08 Robert Millan <rmh@aybabtu.com>
998 * util/i386/pc/grub-setup.c (main): If install drive is an LVM,
999 don't append the RAID prefix afterwards.
1000 Reported by Clint Adams.
1002 2008-06-08 Robert Millan <rmh@aybabtu.com>
1004 Based on description from Pavel:
1005 * kern/disk.c (grub_disk_check_range): Rename to ...
1006 (grub_disk_adjust_range): ... this. Add a comment explaining the
1007 tasks performed by this function.
1009 2008-06-08 Robert Millan <rmh@aybabtu.com>
1011 * include/grub/ntfs.h (struct grub_ntfs_bpb): Rename `serial_number' to
1012 `num_serial' (for consistency with other variables).
1013 (struct grub_ntfs_data): Add `uuid' member.
1014 * fs/ntfs.c (grub_ntfs_mount): Initialize `data->uuid'.
1015 (grub_ntfs_uuid): New function.
1016 (grub_ntfs_fs): Reference grub_ntfs_uuid() in `uuid' struct member.
1018 2008-06-07 Pavel Roskin <proski@gnu.org>
1020 * util/biosdisk.c (open_device): Revert last change to the
1021 function, it broke installation. The sector needs to be
1022 different dependent on which device is opened.
1024 2008-06-06 Robert Millan <rmh@aybabtu.com>
1026 Ensure GRUB_KERNEL_MACHINE_DATA_END is always consistent with the
1027 rest of GRUB, and breakage doesn't happen if its value were modified.
1029 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
1030 Redefine as an offset from `GRUB_KERNEL_MACHINE_DATA_END' instead of
1031 a constant (same value).
1032 * kern/i386/pc/startup.S: Replace hardcoded `0x50' with
1033 `GRUB_KERNEL_MACHINE_DATA_END' (same value).
1035 2008-06-06 Robert Millan <rmh@aybabtu.com>
1037 * util/biosdisk.c (open_device): Do not modify sector offset when
1038 accessing a partition. kern/disk.c already handles this for us.
1040 2008-06-06 Robert Millan <rmh@aybabtu.com>
1042 * util/grub-emu.c (grub_machine_init): Move code in this function from
1044 (main): ... to here (before grub_util_biosdisk_init() call, to prevent
1045 segfault in case grub_printf() is called).
1047 * util/i386/pc/grub-install.in: Append `--device-map=${device_map}' to
1048 grub_probe. Update all users not to explicitly add it again.
1049 (grub_device): New variable; contains corresponding device for grubdir.
1050 (fs_module, partmap_module, devabstraction_module): Pass
1051 `--device ${grub_device}' to grub_probe to avoid traversing /dev
1054 2008-06-05 Robert Millan <rmh@aybabtu.com>
1056 * normal/misc.c (grub_normal_print_device_info): When a filesystem UUID
1057 is found, print it (same layout as with labels).
1059 2008-06-04 Robert Millan <rmh@aybabtu.com>
1061 * util/biosdisk.c (get_drive): Rename to ...
1062 (find_grub_drive): ... this. Update all users.
1064 (get_os_disk): Rename to ...
1065 (convert_system_partition_to_system_disk): ... this. Update all users.
1067 (find_drive): Rename to ...
1068 (find_system_device): ... this. Update all users.
1070 2008-06-04 Robert Millan <rmh@aybabtu.com>
1072 * util/biosdisk.c (get_os_disk): Handle IDA devices.
1073 * util/grub-mkdevicemap.c (get_mmc_disk_name)
1074 (make_device_map): Likewise.
1076 2008-06-01 Robert Millan <rmh@aybabtu.com>
1078 * util/biosdisk.c (get_drive): Verify that `map[i].drive' is non-NULL
1079 before dereferencing it.
1081 * fs/fat.c (struct grub_fat_bpb): Move fat32-specific fields into a
1082 union with fat12/fat16-specific ones. Add some new fields, including
1083 `num_serial' for both versions.
1084 (struct grub_fat_data): Add `uuid' member.
1085 (grub_fat_mount): Refer to fat32-specific fields in `bpb' by their new
1086 names. Initialize `data->uuid' using `num_serial'.
1087 (grub_fat_uuid): New function.
1088 (grub_fat_fs): Reference grub_fat_uuid() in `uuid' struct member.
1090 * fs/reiserfs.c (grub_reiserfs_superblock): Add `uuid' field.
1091 (grub_reiserfs_uuid): New function.
1092 (grub_reiserfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct
1095 * fs/xfs.c (grub_xfs_sblock): Add `uuid' field.
1096 (grub_xfs_uuid): New function.
1097 (grub_xfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct member.
1099 2008-06-01 Robert Millan <rmh@aybabtu.com>
1101 * util/update-grub_lib.in (prepare_grub_to_access_device): Generate
1102 code that is backward compatible with pre-uuid search command.
1104 2008-05-31 Robert Millan <rmh@aybabtu.com>
1106 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Iterate through
1107 floppies after everything else, to ensure floppy drive isn't accessed
1108 unnecessarily (patch from Bean).
1110 2008-05-31 Robert Millan <rmh@aybabtu.com>
1112 * commands/search.c (search_label, search_fs_uuid, search_file): Do
1113 not print device names when we were asked to set a variable.
1115 2008-05-31 Robert Millan <rmh@aybabtu.com>
1117 * term/ieee1275/ofconsole.c (grub_ofconsole_setcursor): Implement
1118 using "cursor-on" and "cursor-off" commands (understood at least by
1119 the Open Firmware flavour on OLPC).
1121 2008-05-31 Michael Gorven <michael@gorven.za.net>
1123 * term/terminfo.c (grub_terminfo_set_current): Correct vt100 cursor
1124 on and off sequences.
1126 2008-05-31 Robert Millan <rmh@aybabtu.com>
1128 * util/update-grub_lib.in: Replace `grub-probe' with `${grub_probe}'.
1129 * util/update-grub.in: Likewise.
1131 2008-05-30 Pavel Roskin <proski@gnu.org>
1133 * util/biosdisk.c (linux_find_partition): Simplify logic and
1134 make the code more universal. Keep special processing for
1135 devfs, but use a simple rule for all other devices. If the
1136 device ends with a number, append 'p' and the partition number.
1137 Otherwise, append only the partition number.
1139 2008-05-30 Robert Millan <rmh@aybabtu.com>
1141 * util/update-grub.in (GRUB_DISABLE_LINUX_UUID): Export variable.
1142 * util/grub.d/10_linux.in: If GRUB_DEVICE_UUID is set, and
1143 GRUB_DISABLE_LINUX_UUID isn't true, use the filesystem UUIDs as
1144 the `root' parameter to Linux.
1146 2008-05-30 Robert Millan <rmh@aybabtu.com>
1148 * commands/search.c (options): Rename --fs_uuid to --fs-uuid.
1149 * util/update-grub_lib.in (prepare_grub_to_access_device): Replace
1150 --fs_uuid with --fs-uuid.
1151 * util/update-grub.in: Allow filesystem UUID probes to fail (since not
1152 all filesystems support them).
1154 2008-05-30 Robert Millan <rmh@aybabtu.com>
1156 * fs/ext2.c (grub_ext2_uuid): Use `04x' instead of '02x' as
1157 grub_printf() flags, since we're printing in units of 2 bytes.
1159 2008-05-30 Robert Millan <rmh@aybabtu.com>
1161 * util/grub.d/00_header.in: Remove obsolete comment referencing
1162 convert_system_path_to_grub_path().
1163 * util/update-grub.in: Likewise.
1164 * util/update-grub_lib.in (is_path_readable_by_grub): New function.
1165 (convert_system_path_to_grub_path): Add a warning message explaining
1166 that this function is deprecated. Rely on is_path_readable_by_grub()
1167 for the readability checks.
1168 (font_path): Use is_path_readable_by_grub() for the readability
1169 check rather than convert_system_path_to_grub_path().
1171 2008-05-30 Robert Millan <rmh@aybabtu.com>
1173 * util/update-grub_lib.in (prepare_grub_to_access_device): New function.
1174 * util/update-grub.in: Set `GRUB_FONT_PATH' to the system path, without
1175 converting it first.
1176 * util/grub.d/00_header.in: Use prepare_grub_to_access_device() to setup
1177 grub.cfg for access to font file, and afterwards call it again to set
1180 2008-05-30 Robert Millan <rmh@aybabtu.com>
1182 * commands/search.c (options): Add --fs_uuid option.
1183 (search_fs_uuid): New function.
1184 (grub_cmd_search): Fix --set argument passing.
1185 Use search_fs_uuid() when requested via --fs_uuid.
1186 (grub_search_init): Update help message.
1187 * fs/ext2.c (struct grub_ext2_sblock): Rename `unique_id' to `uuid'
1188 and redeclare it as an array of 16-bit words.
1189 (grub_ext2_uuid): New function.
1190 (grub_ext2_fs): Reference grub_ext2_uuid() in `uuid' struct member.
1191 * include/grub/fs.h (struct grub_fs): Add `uuid' struct member.
1192 * util/update-grub.in (GRUB_DEVICE_UUID, GRUB_DEVICE_BOOT)
1193 (GRUB_DEVICE_BOOT_UUID): New variables.
1194 (GRUB_DRIVE. GRUB_DRIVE_BOOT. GRUB_DRIVE_BOOT_GRUB): Remove.
1195 * util/grub.d/00_header.in: Set root using `search --fs_uuid' command
1197 * util/grub.d/10_hurd.in: Avoid explicit use of root drive. Instead,
1198 just assume `root' variable has the right value.
1199 * util/grub.d/10_linux.in: Likewise.
1200 * util/grub-probe.c (probe): Probe for filesystem UUID when requested
1202 (main): Recognise `-t fs_uuid' argument.
1204 2008-05-30 Robert Millan <rmh@aybabtu.com>
1206 * util/biosdisk.c (map): Redefine structure to hold information
1207 about GRUB drive name.
1208 (get_drive): Reimplement without assuming (and verifying) BIOS-like
1210 (call_hook): Remove.
1211 (grub_util_biosdisk_iterate): Access drive names via `.drive' struct
1212 member. Assume drive has partitions.
1213 (grub_util_biosdisk_open): Access device names via `.device' struct
1215 (open_device): Likewise.
1216 (find_drive): Likewise.
1217 (read_device_map): Adjust map[] usage to match the new struct
1218 definition. Don't check for duplicates (still possible, but not cheap
1220 (grub_util_biosdisk_fini): Free malloced buffers referenced by map[].
1221 (make_device_name): Remove assumption of BIOS-like drive names.
1223 2008-05-30 Pavel Roskin <proski@gnu.org>
1225 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Remove, as
1226 compiling execute.c doesn't need grub_script.tab.h anymore.
1227 (normal/command.c_DEPENDENCIES): Likewise.
1228 (normal/function.c_DEPENDENCIES): Likewise.
1229 * conf/i386-ieee1275.rmk: Likewise.
1230 * conf/i386-linuxbios.rmk: Likewise.
1231 * conf/i386-pc.rmk: Likewise.
1232 * conf/powerpc-ieee1275.rmk: Likewise.
1233 * conf/sparc64-ieee1275.rmk: Likewise.
1235 2008-05-29 Pavel Roskin <proski@gnu.org>
1237 * disk/lvm.c (grub_lvm_scan_device): Check for the buffer end
1238 when scanning metadata for volume group name.
1240 * include/grub/script.h: Don't include grub_script.tab.h. It's
1241 a generated file, which may only be included from the files with
1242 DEPENDENCIES rules in the makefile. Don't use typedef YYSTYPE,
1243 use union YYSTYPE, as the later allows forward declaration.
1244 * normal/lexer.c: Don't use typedef YYSTYPE, use union YYSTYPE.
1246 2008-05-29 Robert Millan <rmh@aybabtu.com>
1248 * term/i386/pc/at_keyboard.c: Include `grub/machine/machine.h'.
1249 (OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): New macros.
1250 [GRUB_MACHINE_IEEE1275] (keyboard_map): Add OLPC scan codes
1251 (grub_console_checkkey): Add grub_dprintf() call to report unknown
1254 2008-05-29 Robert Millan <rmh@aybabtu.com>
1256 * term/i386/pc/at_keyboard.c (grub_console_checkkey): Add support for
1257 control key combinations.
1259 2008-05-29 Robert Millan <rmh@aybabtu.com>
1261 * util/powerpc/ieee1275/grub-install.in: Move from here ...
1262 * util/ieee1275/grub-install.in: ... to here.
1263 * powerpc-ieee1275.rmk (grub_install_SOURCES): Update location.
1264 * i386-ieee1275.rmk (sbin_SCRIPTS): New variable.
1265 (grub_install_SOURCES): Likewise.
1267 2008-05-29 Robert Millan <rmh@aybabtu.com>
1269 * fs/affs.c: Update copyright year.
1270 * fs/ext2.c: Likewise.
1271 * fs/fshelp.c: Likewise.
1272 * fs/hfsplus.c: Likewise.
1273 * fs/ntfs.c: Likewise.
1274 * fs/xfs.c: Likewise.
1275 * include/grub/fshelp.h: Likewise.
1276 * util/grub-mkdevicemap.c: Likewise.
1278 2008-05-28 Robert Millan <rmh@aybabtu.com>
1280 * util/update-grub.in: Allow chmod call to fail, since /boot/grub/
1281 might need to be fatfs to support some firmware implementations
1284 2008-05-28 Robert Millan <rmh@aybabtu.com>
1286 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle MMC
1288 * util/grub-mkdevicemap.c (get_mmc_disk_name)
1289 (make_device_map): Likewise.
1291 2008-05-20 Bean <bean123ch@gmail.com>
1293 * fs/fshelp.c (grub_fshelp_map_block): New function.
1294 (grub_fshelp_find_file): Use 64-bit type for pos and block address.
1295 Use `>>' and `&' operator to avoid 64-bit divide and modulo.
1297 * include/grub/fshelp.h (grub_fshelp_journal_type): New enum.
1298 (GRUB_FSHELP_JOURNAL_UNUSED_MAPPING): New macro.
1299 (grub_fshelp_journal): New structure.
1300 (grub_fshelp_map_block): New function prototype.
1301 (grub_fshelp_read_file): Use grub_disk_addr_t as block type.
1302 (grub_fshelp_map_block): Likewise.
1304 * fs/ext2.c (EXT3_FEATURE_COMPAT_HAS_JOURNAL): New macro.
1305 (EXT3_JOURNAL_MAGIC_NUMBER): Likewise.
1306 (EXT3_JOURNAL_DESCRIPTOR_BLOCK): Likewise.
1307 (EXT3_JOURNAL_COMMIT_BLOCK): Likewise.
1308 (EXT3_JOURNAL_SUPERBLOCK_V1): Likewise.
1309 (EXT3_JOURNAL_SUPERBLOCK_V2): Likewise.
1310 (EXT3_JOURNAL_REVOKE_BLOCK): Likewise.
1311 (EXT3_JOURNAL_FLAG_ESCAPE): Likewise.
1312 (EXT3_JOURNAL_FLAG_SAME_UUID): Likewise.
1313 (EXT3_JOURNAL_FLAG_DELETED): Likewise.
1314 (EXT3_JOURNAL_FLAG_LAST_TAG): Likewise.
1315 (grub_ext2_sblock): New members for journal support.
1316 (grub_ext3_journal_header): New structure.
1317 (grub_ext3_journal_revoke_header): Likewise.
1318 (grub_ext3_journal_block_tag): Likewise.
1319 (grub_ext3_journal_sblock): Likewise.
1320 (grub_fshelp_node): New members logfile and journal.
1321 (grub_ext2_read_block): Change block type to grub_disk_addr_t. Use
1322 grub_fshelp_map_block to get real block number.
1323 (grub_ext2_blockgroup): Use grub_fshelp_map_block to get real block
1325 (grub_ext2_read_inode): Likewise.
1326 (grub_ext3_get_journal): New function.
1327 (grub_read_inode): Initialize journal using grub_ext3_get_journal.
1328 (grub_ext2_close): Release memory used by journal.
1330 * fs/reiserfs.c (REISERFS_MAGIC_STRING): Changed to "ReIsEr".
1331 (REISERFS_MAGIC_DESC_BLOCK): New macro.
1332 (grub_reiserfs_transaction_header): Renamed to
1333 grub_reiserfs_description_block, replace field data with real_blocks.
1334 (grub_reiserfs_commit_block): New structure.
1335 (grub_reiserfs_data): New member journal.
1336 (grub_reiserfs_get_item): Use grub_fshelp_map_block to get real block
1338 (grub_reiserfs_read_symlink): Likewise.
1339 (grub_reiserfs_iterate_dir): Likewise.
1340 (grub_reiserfs_open): Likewise.
1341 (grub_reiserfs_read): Likewise.
1342 (grub_reiserfs_get_journal): New function.
1343 (grub_reiserfs_mount): Use "ReIsEr" as super block magic, as there are
1344 three varieties ReIsErFs, ReIsEr2Fs and ReIsEr3Fs. Initialize journal
1345 using grub_reiserfs_get_journal.
1346 (grub_reiserfs_close): Release memory used by journal.
1348 * fs/affs.c (grub_affs_read_block): Change block type to
1349 grub_disk_addr_t. Use grub_divmod64 to do 64-bit division.
1351 * fs/afs.c (grub_afs_read_block): Change block type to grub_disk_addr_t.
1353 * fs/hfsplus.c (grub_hfsplus_read_block): Likewise.
1355 * fs/ntfs.c (grub_ntfs_read_block): Likewise.
1357 * fs/udf.c (grub_udf_read_block): Change block type to
1358 grub_disk_addr_t. Use type cast to avoid warning.
1360 * fs/xfs.c (grub_xfs_read_block): Likewise.
1362 2008-05-16 Christian Franke <franke@computer.org>
1364 * commands/cat.c (grub_cmd_cat): Remove non-ESC keys from keyboard queue
1365 to ensure that break with ESC will always work.
1366 * commands/sleep.c (grub_interruptible_millisleep): Likewise.
1367 Remove ESC from keyboard queue.
1369 2008-05-16 Christian Franke <franke@computer.org>
1371 * util/biosdisk.c: [__CYGWIN__] Add includes.
1372 (grub_util_biosdisk_open): Use Linux code also for Cygwin.
1373 (get_os_disk): Move variable declarations to OS specific
1374 parts to avoid warning.
1375 [__GNU__] (get_os_disk): Fix /dev/sdXsN case.
1376 [__CYGWIN__] (get_os_disk): Add Cygwin /dev/sdXN device names.
1377 (grub_util_biosdisk_get_grub_dev): Use Linux code also for
1379 * util/getroot.c: [__CYGWIN__] Add includes.
1380 (strip_extra_slashes): Fix "/" case.
1381 [__CYGWIN__] (get_win32_path): New function.
1382 [__CYGWIN__] (grub_get_prefix): Add conversion to win32 path.
1383 [__CYGWIN__] (find_root_device): Disable.
1384 [__CYGWIN__] (get_bootsec_serial): New function.
1385 [__CYGWIN__] (find_cygwin_root_device): Likewise.
1386 [__linux__] (grub_guess_root_device): Add early returns to simplify
1388 [__CYGWIN__] (grub_guess_root_device): Call find_cygwin_root_device.
1389 [__linux__] (grub_util_get_dev_abstraction): Enable LVM and RAID
1390 check for Linux only.
1392 2008-05-15 Bean <bean123ch@gmail.com>
1394 * kern/i386/pc/startup.S (grub_console_getkey): Workaround for the
1395 keyboard hang problem in apple's intel mac.
1397 2008-05-09 Robert Millan <rmh@aybabtu.com>
1399 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle Virtio
1401 * util/grub-mkdevicemap.c (get_virtio_disk_name)
1402 (make_device_map): Likewise.
1403 Reported by Aurelien Jarno <aurel32@debian.org>
1405 2008-05-07 Ian Campbell <ijc@hellion.org.uk>
1407 * util/biosdisk.c (get_os_disk): Recognise xvd type disks.
1408 * util/grub-mkdevicemap.c (get_xvd_disk_name): New function.
1409 (make_device_map): Output entries for xvd type disks.
1411 2008-05-07 Robert Millan <rmh@aybabtu.com>
1413 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle CCISS
1415 * util/grub-mkdevicemap.c (get_cciss_disk_name)
1416 (make_device_map): Likewise.
1417 Reported by Roland Dreier <rdreier@cisco.com>
1419 2008-05-07 Robert Millan <rmh@aybabtu.com>
1421 * disk/lvm.c (grub_lvm_scan_device): Detect errors in an additional
1422 grub_strstr() call. Correct a few mistakes in failure path handling.
1424 2008-05-06 Robert Millan <rmh@aybabtu.com>
1426 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
1427 Do not print a trailing slash (therefore, the root directory is an
1429 (convert_system_path_to_grub_path): Do not remove trailing slash
1430 from make_system_path_relative_to_its_root() output.
1432 * util/i386/pc/grub-install.in: Add trailing slash to output from
1433 make_system_path_relative_to_its_root().
1435 2008-05-06 Robert Millan <rmh@aybabtu.com>
1437 * util/grub-fstest.c (grub_refresh): Call `fflush (stdout)'. This
1438 ensures that output lines aren't intermangled with those sent to
1439 stderr (via grub_util_info()).
1440 * util/grub-probe.c (grub_refresh): Likewise.
1441 * util/i386/pc/grub-setup.c (grub_refresh): Likewise.
1443 2008-05-05 Christian Franke <franke@computer.org>
1445 * util/grub-mkdevicemap.c (get_floppy_disk_name) [__CYGWIN__]:
1446 Add Cygwin device names.
1447 (get_ide_disk_name) [__CYGWIN__]: Likewise.
1448 (get_scsi_disk_name) [__CYGWIN__]: Likewise.
1449 (check_device): Return error instead of success on empty name.
1450 (make_device_map): Move label inside linux specific code to
1451 prevent compiler warning.
1453 2008-04-30 Robert Millan <rmh@aybabtu.com>
1455 Based on patch from Fabian Greffrath <greffrath@leat.rub.de>
1456 * util/grub.d/10_linux.in: Add ${GRUB_CMDLINE_LINUX_DEFAULT} to the
1458 * util/update-grub.in: Export GRUB_CMDLINE_LINUX_DEFAULT.
1460 2008-04-29 Robert Millan <rmh@aybabtu.com>
1462 * docs/grub.cfg: New file (example GRUB configuration).
1464 2008-04-26 Robert Millan <rmh@aybabtu.com>
1466 * DISTLIST: Sort (sort -u < DISTLIST | sponge DISTLIST). Add
1467 `loader/i386/ieee1275/linux.c', `loader/i386/ieee1275/linux_normal.c'
1468 and `disk/ieee1275/nand.c'.
1470 2008-04-25 Bean <bean123ch@gmail.com>
1472 * Makefile.in (RMKFILES): Add missing arch i386-ieee1275 and
1475 * commands/hexdump.c (grub_cmd_hexdump): Support dumping of device,
1476 change the buffer size to 4096 for cdrom device.
1478 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add _linux.mod, linux.mod
1480 (_linux_mod_SOURCES): New variable.
1481 (_linux_mod_CFLAGS): Likewise.
1482 (_linux_mod_LDFLAGS): Likewise.
1483 (linux_mod_SOURCES): Likewise.
1484 (linux_mod_CFLAGS): Likewise.
1485 (linux_mod_LDFLAGS): Likewise.
1486 (nand_mod_SOURCES): Likewise.
1487 (nand_mod_CFLAGS): Likewise.
1488 (nand_mod_LDFLAGS): Likewise.
1490 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Return
1491 GRUB_ERR_UNKNOWN_DEVICE instead of GRUB_ERR_BAD_DEVICE if no device
1492 type property. (nand device in olpc don't have this property)
1494 * include/grub/disk.h (grub_disk_dev_id): New macro
1495 GRUB_DISK_DEVICE_NAND_ID.
1497 * include/grub/i386/ieee1275/loader.h (grub_rescue_cmd_linux): New
1499 (grub_rescue_cmd_initrd): Likewise.
1501 * include/grub/i386/linux.h (GRUB_LINUX_OFW_SIGNATURE): New macro.
1502 (linux_kernel_params): Add new member ofw_signature, ofw_num_items,
1503 ofw_cif_handler and ofw_idt, adjust padding number.
1505 * include/grub/i386/pc/memory.h (grub_upper_mem): Export it if
1506 GRUB_MACHINE_IEEE1275 is defined.
1508 * include/grub/ieee1275/ieee1275.h (grub_available_iterate):
1509 Use NESTED_FUNC_ATTR attribute on the hook parameter.
1511 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Use NESTED_FUNC_ATTR
1512 on nested function heap_init.
1513 (grub_upper_mem): New variable for i386-ieee1275.
1514 (grub_get_extended_memory): New function for i386-ieee1275.
1515 (grub_machine_init): Call grub_get_extended_memory for i386-ieee1275.
1517 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Use
1518 NESTED_FUNC_ATTR on the hook parameter. Don't quit if no device type
1521 * loader/i386/ieee1275/linux.c: New file.
1523 * loader/i386/ieee1275/linux_normal.c: New file.
1525 * disk/ieee1275/nand.c: New file.
1527 2008-04-18 Thomas Schwinge <tschwinge@gnu.org>
1529 * util/i386/pc/grub-mkrescue.in (grub_mkimage): Don't overwrite correct
1531 * util/powerpc/ieee1275/grub-mkrescue.in (grub_mkimage): Likewise.
1533 2008-04-18 Robert Millan <rmh@aybabtu.com>
1535 Restructures early code path on ieee1275 to unify grub_main() as
1536 the first C function that is executed in every platform.
1538 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_init): New prototype.
1539 * kern/i386/ieee1275/startup.S (_start): Jump to grub_main() instead of
1541 * kern/powerpc/ieee1275/crt0.S (_start): Likewise.
1542 * kern/ieee1275/cmain.c (cmain): Rename to ...
1543 * kern/ieee1275/cmain.c (grub_ieee1275_init): ... this.
1544 * kern/ieee1275/init.c (grub_machine_init): Call grub_ieee1275_init()
1547 2008-04-18 Robert Millan <rmh@aybabtu.com>
1549 * util/update-grub.in: Fix syntax error when setting
1550 `GRUB_PRELOAD_MODULES'.
1551 Reported by Stephane Chazelas <stephane@artesyncp.com>
1553 2008-04-17 Lubomir Kundrak <lkundrak@redhat.com>
1555 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): take only .text
1556 section into account, newer toolchains generate unique build ids
1557 * configure.ac: remove the test for --build-id=none acceptance,
1558 we want build ids to be preserved
1559 * genmk.rb: add -R .note.gnu.build-id to objcopy, so build id
1560 far from other sections don't cause the raw binary images grow
1563 2008-04-15 Robert Millan <rmh@aybabtu.com>
1565 * disk/lvm.c: Update copyright year.
1566 * kern/misc.c: Likewise.
1568 2008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
1570 * disk/lvm.c (grub_lvm_scan_device): Add forgotten failure path when
1571 there is no memory left for physical volume name.
1573 2008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
1575 * disk/lvm.c (grub_lvm_scan_device): Fix logical volume's physical
1576 volume name mapping to support bigger than 9 character names properly.
1578 2008-04-13 Robert Millan <rmh@aybabtu.com>
1580 * disk/i386/pc/biosdisk.c (grub_biosdisk_rw): Fix CHS limit check,
1581 as per http://www.allensmith.net/Storage/HDDlimit/Int13h.htm
1583 2008-04-13 Christian Franke <franke@computer.org>
1585 * util/i386/pc/grub-mkrescue.in: Add --emulation=floppy
1586 to create a floppy emulation boot CD when non emulation mode
1588 Enable Joliet CD filesystem extension.
1590 2008-04-13 Robert Millan <rmh@aybabtu.com>
1592 * kern/misc.c (grub_strncat): Fix off-by-one error.
1593 Reported by Zhang Huan <zhanghuan@nrchpc.ac.cn>
1595 * kern/env.c (grub_env_context_close): Clear current context, not
1597 Patch from Zhang Huan <zhanghuan@nrchpc.ac.cn>
1599 * kern/misc.c (grub_strcat): Minor speed optimization (same code size).
1601 2008-04-13 Robert Millan <rmh@aybabtu.com>
1603 Improve robustness when handling LVM.
1605 * disk/lvm.c (grub_lvm_getvalue): Return 0 when `*p' is NULL
1606 (and leave `*p' unmodified).
1607 (grub_lvm_iterate): Don't assume `vg->lvs != NULL' when iterating
1609 (grub_lvm_memberlist): Don't assume `lv->vg->pvs != NULL' when
1610 iterating through it.
1611 (grub_lvm_open): Don't assume `vg->lvs != NULL' when iterating
1613 (grub_lvm_scan_device): Check the return value (and fail gracefully
1614 when due) on each grub_lvm_getvalue() or grub_strstr() call.
1615 Don't assume `vg->pvs != NULL' when iterating through it.
1617 2008-04-13 Robert Millan <rmh@aybabtu.com>
1619 * gendistlist.sh (EXTRA_DISTFILES): Add `genpartmaplist.sh'.
1620 * genmk.rb (partmap): New variable.
1621 (CLEANFILES, PARTMAPFILES): Add #{partmap}.
1622 (#{partmap}): New target rule.
1623 * genpartmaplist.sh: New file.
1624 * Makefile.in (pkglib_DATA): Add partmap.lst.
1625 (partmap.lst): New target rule.
1626 * util/i386/pc/grub-mkrescue.in: Generate grub.cfg that loads needed
1627 modules (including all partition maps), instead of preloading them.
1629 2007-04-13 Fabian Greffrath <fabian.greffrath@web.de>
1631 * util/grub.d/30_os-prober.in: New script. Use `os-prober' and
1632 `linux-boot-prober' (if installed) to detect other operating
1633 systems which are installed on the computer and add them to
1635 * conf/common.rmk: Build and install 30_os-prober.
1637 2008-04-12 Robert Millan <rmh@aybabtu.com>
1639 * kern/powerpc/ieee1275/init.c: Move from here ...
1640 * kern/ieee1275/init.c: ... to here. Update all users.
1642 * kern/powerpc/ieee1275/cmain.c: Move from here ...
1643 * kern/ieee1275/cmain.c: ... to here. Update all users.
1645 * kern/powerpc/ieee1275/openfw.c: Move from here ...
1646 * kern/ieee1275/openfw.c: ... to here. Update all users.
1648 * loader/powerpc/ieee1275/multiboot2.c: Move from here ...
1649 * loader/ieee1275/multiboot2.c: ... to here. Update all users.
1651 2008-04-10 Pavel Roskin <proski@gnu.org>
1653 * configure.ac: Always use "_cv_" in cache variables for
1654 compatibility with Autoconf 2.62.
1656 2008-04-07 Robert Millan <rmh@aybabtu.com>
1658 Revert grub/machine/init.h addition by Pavel (since it breaks on
1659 i386-ieee1275 and others):
1660 * util/i386/pc/misc.c: Remove grub/machine/init.h.
1661 * util/powerpc/ieee1275/misc.c: Likewise.
1663 2008-04-07 Robert Millan <rmh@aybabtu.com>
1665 * util/grub-probe.c (probe): Improve error message.
1667 2008-04-07 Robert Millan <rmh@aybabtu.com>
1669 * util/biosdisk.c (read_device_map): Skip devices that don't exist
1670 (this prevents the presence of a bogus entry from ruining the whole
1673 2008-04-06 Pavel Roskin <proski@gnu.org>
1675 * util/biosdisk.c: Include grub/util/biosdisk.h.
1676 * util/grub-fstest.c (execute_command): Make static.
1677 * util/grub-mkdevicemap.c (check_device): Likewise.
1678 * util/i386/pc/misc.c: Include grub/machine/init.h.
1679 * util/powerpc/ieee1275/misc.c: Likewise.
1680 * util/lvm.c: Include grub/util/lvm.h.
1681 * util/misc.c: Include grub/kernel.h, grub/misc.h and
1683 * util/raid.c: Include grub/util/raid.h.
1684 (grub_util_getdiskname): Make static.
1686 * util/grub-emu.c (main): Remove calls to grub_hostfs_init() and
1687 grub_hostfs_fini(), as they are called from grub_init_all() and
1688 grub_fini_all() respectively. This fixes an infinite loop in
1689 grub-fstest due to double registration of hostfs.
1690 Reported by Christian Franke <Christian.Franke@t-online.de>
1692 2008-04-05 Pavel Roskin <proski@gnu.org>
1694 * bus/pci.c (grub_pci_iterate): For multifunction devices, probe
1695 all 8 functions. Otherwise, probe function 0 only.
1697 2008-04-04 Pavel Roskin <proski@gnu.org>
1699 * commands/lspci.c (grub_lspci_iter): Print the bus number
1702 * commands/lspci.c (grub_pci_classes): Fix typos.
1703 (grub_lspci_iter): Don't print func twice. Print vendor ID
1704 before device ID, as it's normally done.
1706 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
1707 Fix signedness warnings.
1708 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate):
1710 * util/ieee1275/get_disk_name.c: Include config.h so that
1711 _GNU_SOURCE is defined and getline() is declared. Mark an
1712 unused argument as such. Fix a signedness warning.
1714 2008-04-02 Pavel Roskin <proski@gnu.org>
1716 * genkernsyms.sh.in: Use more robust assignments for CC and
1717 srcdir. Quote srcdir.
1718 * gensymlist.sh.in: Likewise. Assert at the compile time that
1719 the symbol table is not empty.
1721 * disk/raid.c (grub_raid_memberlist): Fix a signedness warning.
1722 * fs/cpio.c (grub_cpio_read): Likewise.
1724 2008-04-01 Pavel Roskin <proski@gnu.org>
1726 * disk/ata.c (grub_ata_open): Don't lose precision in disk->id.
1727 * disk/host.c (grub_host_open): Likewise.
1728 * disk/loopback.c (grub_loopback_open): Likewise.
1729 * disk/memdisk.c (grub_memdisk_open): Use a string pointer for
1730 disk->id as in disk/host.c, not a multi-character constant.
1732 * util/grub-fstest.c (cmd_cmp): Use fseeko(), not fseek(). The
1733 later is obsolete, potentially dangerous and sets a bad example.
1734 * util/i386/efi/grub-mkimage.c (make_header): Likewise.
1735 * util/misc.c (grub_util_get_image_size): Likewise.
1737 * disk/loopback.c (options): Improve help for "--partitions".
1739 * normal/arg.c (grub_arg_show_help): Fix spacing of the long
1740 options to align them with the short options, e.g. "echo -e".
1742 2008-03-31 Bean <bean123ch@gmail.com>
1744 * video/reader/png.c (grub_png_data): New member is_16bit and
1746 (grub_png_decode_image_header): Detect 16 bit png image.
1747 (grub_png_convert_image): New function to convert 16 bit image to 8 bit.
1748 (grub_png_decode_png): Call grub_png_convert_image for 16 bit image.
1749 (grub_video_reader_png): Release memory occupied by image_data.
1751 * fs/ntfs.c (find_attr): Handle non-resident attribute list larger than
1753 (grub_nfs_mount): Skip the test for sector per cluster.
1755 * include/grub/ntfs.h (MAX_SPC): Removed.
1757 2008-03-31 Bean <bean123ch@gmail.com>
1759 * conf/common.rmk (pkgdata_MODULES): Add afs.mod.
1760 (grub_probe_SOURCES): Add fs/afs.c.
1761 (grub_fstest_SOURCES): Likewise.
1762 (afs_mod_SOURCES): New variable.
1763 (afs_mod_CFLAGS): Likewise.
1764 (afs_mod_LDFLAGS): Likewise.
1766 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/afs.c.
1767 (grub_emu_SOURCES): Likewise.
1769 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
1771 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1773 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
1775 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1777 * fs/afs.c: New file.
1779 2008-03-30 Pavel Roskin <proski@gnu.org>
1781 * disk/host.c: Include grub/misc.h to fix a warning.
1782 * util/hostfs.c: Use GRUB_MOD_INIT and GRUB_MOD_FINI to fix
1783 warnings about implicit declarations.
1785 * fs/udf.c (grub_udf_mount): Fix warning about a shadowing a
1787 * include/grub/i386/loader.h: Change declaration of
1788 grub_linux_boot() to match what grub_loader_set() expects.
1789 * util/getroot.c (grub_guess_root_device): Return const char* to
1791 * util/grub-probe.c (probe): Fix a warning about uninitialized
1792 abstraction_name variable.
1793 * util/i386/get_disk_name.c (grub_util_get_disk_name): Mark
1794 second argument as unused to fix a warning.
1796 * loader/i386/pc/multiboot2.c (grub_mb2_arch_elf64_hook): Add
1797 missing grub_error() call.
1799 * util/update-grub_lib.in: Define datarootdir, since Autoconf
1800 2.60 and newer uses it to define datadir.
1802 * commands/sleep.c: Fix warning about implicit declaration.
1803 * disk/memdisk.c: Likewise.
1804 * loader/aout.c: Likewise.
1805 * loader/i386/bsd_normal.c: Likewise.
1806 * util/grub-probe.c: Likewise.
1808 * commands/i386/cpuid.c (has_longmode): Make static.
1809 * disk/i386/pc/biosdisk.c (cd_drive): Likewise.
1810 * include/grub/i386/bsd.h (bios_memmap_t): Remove, it's unused.
1812 * kern/i386/pc/startup.S (real_to_prot): Use %cs prefix to load
1813 GDT. This is more robust, as %ds can change.
1814 (grub_biosdisk_rw_int13_extensions): Don't clear %ds before
1815 calling real_to_prot().
1816 (grub_biosdisk_get_diskinfo_int13_extensions): Likewise.
1818 2008-03-28 Pavel Roskin <proski@gnu.org>
1820 * kern/i386/pc/startup.S: Assert that uncompressed functions
1821 don't spill beyond GRUB_KERNEL_MACHINE_RAW_SIZE.
1822 * kern/i386/pc/lzo1x.S: Remove all .align directives in the
1823 code, as they push parts of the code (error handlers) beyond
1824 GRUB_KERNEL_MACHINE_RAW_SIZE. Speed is not as important in this
1825 code as correctness and size.
1827 2008-03-28 Pavel Roskin <proski@gnu.org>
1829 * kern/i386/pc/startup.S
1830 (grub_biosdisk_get_diskinfo_int13_extensions): When converting
1831 data block address to the real mode, keep offset minimal. This
1832 works around a bug in AWARD BIOS on old Athlon systems, which
1833 makes CD detection hang.
1835 2008-03-26 Pavel Roskin <proski@gnu.org>
1837 * normal/color.c (grub_parse_color_name_pair): Make `name' a
1839 * include/grub/normal.h: Add grub_parse_color_name_pair()
1842 2008-03-24 Bean <bean123ch@gmail.com>
1844 * disk/i386/pc/biosdisk.c (cd_start): Removed.
1845 (cd_count): Removed.
1846 (cd_drive): New variable.
1847 (grub_biosdisk_get_drive): Don't check for (cdN) device.
1848 (grub_biosdisk_call_hook): Likewise.
1849 (grub_biosdisk_iterate): Change cdrom detection method.
1850 (grub_biosdisk_open): Replace cd_start with cd_drive.
1851 (GRUB_MOD_INIT): Use grub_biosdisk_get_cdinfo_int13_extension to
1852 detect cdrom device.
1854 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_MACHINE_CDROM_START):
1856 (GRUB_BIOSDISK_MACHINE_CDROM_END): Removed.
1857 (GRUB_BIOSDISK_CDTYPE_NO_EMUL): New macro.
1858 (GRUB_BIOSDISK_CDTYPE_1_2_M): Likewise.
1859 (GRUB_BIOSDISK_CDTYPE_1_44_M): Likewise.
1860 (GRUB_BIOSDISK_CDTYPE_2_88_M): Likewise.
1861 (GRUB_BIOSDISK_CDTYPE_HARDDISK): Likewise.
1862 (GRUB_BIOSDISK_CDTYPE_MASK): Likewise.
1863 (grub_biosdisk_cdrp): New structure.
1864 (grub_biosdisk_get_cdinfo_int13_extensions): New function.
1866 * include/grub/i386/pc/kernel.h (grub_boot_drive): Export this variable.
1868 * kern/i386/pc/init.c (make_install_device): Don't use (cdN) as root
1871 * kern/i386/pc/startup.S (grub_biosdisk_get_cdinfo_int13_extensions):
1874 2008-03-20 Robert Millan <rmh@aybabtu.com>
1876 Remove 2 TiB limit in ata.mod.
1877 * disk/ata.c (grub_ata_device): Promote `size' to grub_uint64_t.
1878 (grub_ata_dumpinfo): Print sector count with 0x%llx.
1879 (grub_ata_identify): Interpret `&info16[100]' as a pointer to
1880 grub_uint64_t instead of grub_uint32_t.
1882 2008-03-05 Bean <bean123ch@gmail.com>
1884 * loader/i386/pc/multiboot.c (grub_multiboot_get_bootdev): New function.
1885 (grub_multiboot): Set boot device.
1887 * boot/i386/pc/lnxboot.S (real_code_2): Set %dh to 0xFF.
1889 2008-03-02 Bean <bean123ch@gmail.com>
1891 * fs/reiserfs.c (grub_reiserfs_read_symlink): Add 0 at the end of
1894 2008-03-01 Yoshinori K. Okuji <okuji@enbug.org>
1896 * DISTLIST: Added docs/fdl.texi, docs/grub.texi, docs/mdate-sh and
1899 * docs/grub.texi: New file. Copied from GRUB Legacy, and slightly
1902 * docs/fdl.texi: New file.
1904 * docs/mdate-sh: New file. Copied from gnulib.
1905 * docs/texinfo.tex: Likewise.
1907 * config.guess: Updated from gnulib.
1908 * install-sh: Likewise.
1910 2008-02-28 Robert Millan <rmh@aybabtu.com>
1912 * conf/i386-linuxbios.rmk (pkglib_MODULES): Add aout.mod.
1913 (aout_mod_SOURCES): New variable.
1914 (aout_mod_CFLAGS): Likewise.
1915 (aout_mod_LDFLAGS): Likewise.
1917 * conf/i386-ieee1275.rmk: Likewise.
1919 2008-02-28 Robert Millan <rmh@aybabtu.com>
1921 * util/update-grub.in: Reorganise terminal validity check. Accept
1922 `ieee1275:console' (OLPC) and `*:gfxterm' as valid too.
1923 Based on suggestion by Franklin PIAT.
1925 2008-02-28 Fabian Greffrath <greffrath@leat.rub.de>
1927 * include/grub/util/getroot.h (grub_util_check_block_device): Export new
1929 * util/getroot.c (grub_util_check_block_device): New function that
1930 returns the given argument if it is a block device and returns NULL else.
1931 * util/grub-probe.c (argument_is_device): New variable.
1932 (probe): Promote device_name from a variable to an argument. Receive
1933 device_name from grub_util_check_block_device() if path is NULL and from
1934 grub_guess_root_device() else. Do not free() device_name anymore.
1935 (options): Introduce new parameter '-d, --device'.
1936 (main): Add description of the new parameter to the help screen.
1937 Rename path variable to argument. Set argument_is_device if the '-d'
1938 option is given. Pass argument to probe() depending on
1941 2008-02-24 Bean <bean123ch@gmail.com>
1943 * fs/iso9660.c (GRUB_ISO9660_VOLDESC_BOOT): New macro.
1944 (GRUB_ISO9660_VOLDESC_PRIMARY): Likewise.
1945 (GRUB_ISO9660_VOLDESC_SUPP): Likewise.
1946 (GRUB_ISO9660_VOLDESC_PART): Likewise.
1947 (GRUB_ISO9660_VOLDESC_END): Likewise.
1948 (grub_iso9660_primary_voldesc): New member escape.
1949 (grub_iso9660_data): New member joliet.
1950 (grub_iso9660_convert_string): New function.
1951 (grub_iso9660_mount): Detect joliet extension.
1952 (grub_iso9660_iterate_dir): Convert filename when joliet is detected.
1953 (grub_iso9660_iso9660_label): Likewise.
1955 * conf/common.rmk (pkgdata_MODULES): Add udf.mod.
1956 (grub_setup_SOURCES): Add fs/udf.c.
1957 (grub_fstest_SOURCES): Likewise.
1958 (udf_mod_SOURCES): New variable.
1959 (udf_mod_CFLAGS): Likewise.
1960 (udf_mod_LDFLAGS): Likewise.
1962 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/udf.c.
1963 (grub_emu_SOURCES): Likewise.
1965 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
1967 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1969 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
1971 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1973 * fs/udf.c: New file.
1975 2008-02-24 Robert Millan <rmh@aybabtu.com>
1977 * conf/i386-efi.rmk (normal/function.c_DEPENDENCIES)
1978 (normal/lexer.c_DEPENDENCIES): New variables.
1979 * conf/i386-ieee1275.rmk (normal/function.c_DEPENDENCIES)
1980 (normal/lexer.c_DEPENDENCIES): Likewise.
1981 * conf/i386-linuxbios.rmk (normal/function.c_DEPENDENCIES)
1982 (normal/lexer.c_DEPENDENCIES): Likewise.
1983 * conf/i386-pc.rmk (normal/function.c_DEPENDENCIES)
1984 (normal/lexer.c_DEPENDENCIES): Likewise.
1985 * conf/powerpc-ieee1275.rmk (normal/function.c_DEPENDENCIES)
1986 (normal/lexer.c_DEPENDENCIES): Likewise.
1987 * conf/sparc64-ieee1275.rmk (normal/function.c_DEPENDENCIES)
1988 (normal/lexer.c_DEPENDENCIES): Likewise.
1990 2008-02-23 Robert Millan <rmh@aybabtu.com>
1992 * partmap/gpt.c (grub_gpt_magic): Add `0x' qualifier to each member,
1993 since they were intended to be in hex. This didn't break previously
1994 because of a bug in gpt_partition_map_iterate() (see below).
1996 (gpt_partition_map_iterate): Replace `grub_memcmp' with `! grub_memcmp'
1997 when checking the validity of GPT header.
1998 Remove `partno', since it always provides the same information as `i'.
2000 2008-02-21 Yoshinori K. Okuji <okuji@enbug.org>
2002 * include/grub/efi/time.h: Fix a wrong comment.
2004 2008-02-19 Pavel Roskin <proski@gnu.org>
2006 * kern/rescue.c (grub_enter_rescue_mode): Improve initial
2009 2008-02-19 Bean <bean123ch@gmail.com>
2011 * conf/i386-pc.rmk (pkglib_MODULES): Add aout.mod _bsd.mod and bsd.mod.
2012 (aout_mod_SOURCES): New variable.
2013 (aout_mod_CFLAGS): Likewise.
2014 (aout_mod_LDFLAGS): Likewise.
2015 (_bsd_mod_SOURCES): New variable.
2016 (_bsd_mod_CFLAGS): Likewise.
2017 (_bsd_mod_LDFLAGS): Likewise.
2018 (bsd_mod_SOURCES): New variable.
2019 (bsd_mod_CFLAGS): Likewise.
2020 (bsd_mod_LDFLAGS): Likewise.
2022 * include/grub/aout.h: New file.
2024 * include/grub/i386/loader.h (grub_unix_real_boot): New function.
2026 * include/grub/i386/bsd.h: New file.
2028 * include/grub/i386/pc/init.h (grub_get_mmap_entry): Use EXPORT_FUNC
2031 * kern/elf.c (grub_elf32_load): Get the physical address after the hook
2032 function is called, so that it's possible to change it inside the hook.
2033 (grub_elf64_load): Likewise.
2034 (grub_elf_file): Don't close the file if elf header is not found.
2035 (grub_elf_close): Close the file if grub_elf_file fails (The new
2036 grub_elf_file won't close it).
2037 (grub_elf32_size): Use NESTED_FUNC_ATTR for nested function calcsize.
2038 (grub_elf64_size): Likewise.
2040 * kern/i386/loader.S (grub_unix_real_boot): New function.
2042 * loader/aout.c: New file.
2044 * loader/i386/bsd.c: New file.
2046 * loader/i386/bsd_normal.c: New file.
2048 * loader/i386/pc/multiboot.c (grub_multiboot): Handle a.out format.
2050 * loader/multiboot2.c (grub_multiboot2): Reset grub_errno so that it
2051 can test other formats.
2053 2008-02-19 Robert Millan <rmh@aybabtu.com>
2055 * partmap/gpt.c: Include `<grub/gpt_partition.h>'.
2056 (grub_gpt_partition_type_empty): Redefine with macro from
2057 `<grub/gpt_partition.h>'.
2058 (gpt_partition_map_iterate): Adjust partition type comparison.
2060 Export `entry' as partmap-specific `part.data' struct.
2061 (grub_gpt_header, grub_gpt_partentry): Move from here ...
2063 * include/grub/gpt_partition.h (grub_gpt_header)
2064 (grub_gpt_partentry): ... to here (new file).
2066 * util/i386/pc/grub-setup.c: Include `<grub/gpt_partition.h>'.
2068 (grub_gpt_partition_type_bios_boot): New const variable, defined
2069 with macro from `<grub/gpt_partition.h>'.
2071 (setup): Replace `first_start' with `embed_region', which keeps
2072 track of the embed region (and is partmap-agnostic).
2074 Replace find_first_partition_start() with find_usable_region(),
2075 which finds a usable region for embedding using partmap-specific
2076 knowledge (supports PC/MSDOS and GPT).
2078 Fix all assumptions that the embed region start at sector 1, using
2079 `embed_region.start' from now on. Similarly, use `embed_region.end'
2080 rather than `first_start' to calculate available size.
2082 In grub_util_info() message, replace "into after the MBR" with an
2083 indication of the specific sector our embed region starts at.
2085 2008-02-19 Robert Millan <rmh@aybabtu.com>
2087 * DISTLIST: Replace `commands/ieee1275/halt.c' and
2088 `commands/ieee1275/reboot.c' with `commands/halt.c' and
2089 `commands/reboot.c'.
2090 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
2091 (halt_mod_SOURCES): Likewise.
2092 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
2093 (halt_mod_SOURCES): Likewise.
2095 2008-02-17 Christian Franke <franke@computer.org>
2097 * commands/cat.c (grub_cmd_cat): Add break on GRUB_TERM_ESC key.
2099 2008-02-17 Robert Millan <rmh@aybabtu.com>
2101 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
2102 set `first_start' to 0 for non-PC/MSDOS partition maps.
2104 2008-02-16 Robert Millan <rmh@aybabtu.com>
2106 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
2107 do not assume partition map is PC/MSDOS before performing checks that
2108 are specific to that layout.
2110 2008-02-13 Robert Millan <rmh@aybabtu.com>
2112 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Remove
2113 `commands/i386/pc/halt.c' and `commands/i386/pc/reboot.c'.
2114 * kern/i386/linuxbios/init.c (grub_halt, grub_reboot): Remove stubs.
2116 2008-02-13 Yoshinori K. Okuji <okuji@enbug.org>
2118 * configure.ac: Only a cosmetic change on the handling of
2119 -fno-stack-protector.
2121 2008-02-12 Alexandre Boeglin <alex@boeglin.org>
2123 * conf/i386-efi.rmk (grub_emu_SOURCES): Replace
2124 commands/i386/pc/halt.c and reboot.c by commands/halt.c and
2126 (grub_install_SOURCES): Add halt.mod and reboot.mod.
2127 (halt_mod_SOURCES): New variable.
2128 (halt_mod_CFLAGS): Likewise.
2129 (halt_mod_LDFLAGS): Likewise.
2130 (reboot_mod_SOURCES): Likewise.
2131 (reboot_mod_CFLAGS): Likewise.
2132 (reboot_mod_LDFLAGS): Likewise.
2134 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace
2135 commands/ieee1275/halt.c and reboot.c by commands/halt.c and
2137 (halt_mod_SOURCES): Likewise.
2138 (reboot_mod_SOURCES): Likewise.
2140 * conf/i386-pc.rmk (grub_emu_SOURCES): Replace
2141 commands/i386/pc/reboot.c by commands/reboot.c.
2142 (reboot_mod_SOURCES): Likewise.
2144 * commands/i386/pc/reboot.c: merge this file ...
2146 * commands/ieee1275/reboot.c: ... and this file ...
2148 * commands/reboot.c: ... to this file.
2149 Add some precompiler directive to include the correct header for
2152 * commands/ieee1275/halt.c: move this file ...
2154 * commands/halt.c: ... to here.
2155 Add some precompiler directive to include the correct header for
2158 * include/grub/efi/efi.h (grub_reboot): New function declaration.
2159 (grub_halt): Likewise.
2161 * kern/efi/efi.c (grub_reboot): New function.
2162 (grub_halt): Likewise.
2164 2008-02-12 Robert Millan <rmh@aybabtu.com>
2166 * util/getroot.c (grub_guess_root_device): Inspect /dev/evms before
2167 /dev (like it is done for /dev/mapper). This doesn't provide support
2168 for EVMS, but at least it is now easy to identify the problem when it
2171 2008-02-11 Robert Millan <rmh@aybabtu.com>
2173 * util/biosdisk.c (grub_util_biosdisk_open, linux_find_partition)
2174 (grub_util_biosdisk_get_grub_dev): Check open() exit status by
2175 comparing it with -1, not 0.
2177 2008-02-10 Robert Millan <rmh@aybabtu.com>
2179 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `disk/raid.c' and
2181 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2182 * conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
2184 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Move `disk/raid.c' and
2185 `disk/lvm.c' to the end of the list.
2186 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
2187 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
2189 2008-02-10 Robert Millan <rmh@aybabtu.com>
2191 * kern/main.c (grub_load_normal_mode): Do not reset `grub_errno'. Call
2192 grub_print_error() instead. This will let user know why we're entering
2194 Based on suggestions from Sam Morris.
2196 2008-02-10 Alexandre Boeglin <alex@boeglin.org>
2198 * normal/arg.c (grub_arg_parse): If one of the args is "--", call add_arg()
2199 on remaining N args, instead of "--" arg N times.
2201 2008-02-09 Vesa Jaaskelainen <chaac@nic.fi>
2203 * font/manager.c (unknown_glyph): Added variable for unknown glyph.
2204 (fill_with_default_glyph): Changed to use unknown_glyph for fill
2205 pattern for unknown glyphs.
2207 2008-02-09 Robert Millan <rmh@aybabtu.com>
2209 * configure.ac: Probe for `help2man'.
2210 * Makefile.in (builddir): New variable.
2211 (HELP2MAN): Likewise. Set to `true' when @HELP2MAN@ doesn't provide it,
2212 or otherwise add a few flags/options to it.
2213 (install-local): For every executable utility or script that is
2214 installed, invoke $(HELP2MAN) to install a manpage based on --help
2217 * util/i386/pc/grub-install.in: Move down `update-grub_lib' sourcing, so
2218 that it doesn't prevent --help from working in build tree.
2220 * util/i386/pc/grub-mkrescue.in (usage): Replace `grub-devel@gnu.org'
2221 with `bug-grub@gnu.org'.
2222 * util/powerpc/ieee1275/grub-mkrescue.in (usage): Likewise.
2223 * util/update-grub.in (usage): New function.
2224 Implement proper argument check, with support for --help and --version
2225 (as well as existing -y).
2227 2008-02-09 Christian Franke <franke@computer.org>
2229 * commands/cat.c (grub_cmd_cat): Print '\r' as hex to
2230 avoid overwriting previous output.
2231 * kern/rescue.c (grub_rescue_cmd_cat): Likewise.
2233 2008-02-09 Robert Millan <rmh@aybabtu.com>
2235 * normal/menu.c (run_menu): If timeout is set to zero, don't bother
2238 2008-02-09 Robert Millan <rmh@aybabtu.com>
2240 * commands/sleep.c: New file.
2241 * conf/common.rmk (pkglib_MODULES): Add `commands/sleep.c'.
2242 (sleep_mod_SOURCES): New variable.
2243 (sleep_mod_CFLAGS): Likewise.
2244 (sleep_mod_LDFLAGS): Likewise.
2246 2008-02-09 Robert Millan <rmh@aybabtu.com>
2248 * disk/raid.c (grub_raid_scan_device): Add a pair of sanity checks for
2249 situations in which we can deduce the RAID size and the superblock
2252 2008-02-09 Robert Millan <rmh@aybabtu.com>
2254 * disk/lvm.c [GRUB_UTIL] (grub_lvm_memberlist): New function. Construct
2255 and return a grub_diskmemberlist_t composed of LVM physical volumes.
2256 [GRUB_UTIL] (grub_lvm_dev): Add `memberlist' member.
2258 * disk/raid.c [GRUB_UTIL] (grub_raid_memberlist): New function. Construct
2259 and return a grub_diskmemberlist_t composed of physical array members.
2260 [GRUB_UTIL] (grub_raid_dev): Add `memberlist' member.
2262 * include/grub/disk.h [GRUB_UTIL] (grub_disk_memberlist): New struct
2264 [GRUB_UTIL] (struct grub_disk_dev): Add `memberlist' function pointer.
2265 [GRUB_UTIL] (struct grub_disk_memberlist): New struct declaration.
2266 [GRUB_UTIL] (grub_disk_memberlist_t): New typedef.
2268 * util/grub-probe.c (probe): Move partmap probing code from here ...
2269 (probe_partmap): ... to here.
2270 (probe): Use probe_partmap() once for the disk we're probing, and
2271 additionally, when such disk contains a memberlist() struct member,
2272 once for each disk that is contained in the structure returned by
2275 2008-02-09 Robert Millan <rmh@aybabtu.com>
2277 * util/grub-probe.c (main): When `verbosity > 1', set `debug'
2278 environment variable to 'all' in order to obtain debug output from
2280 * util/i386/pc/grub-setup.c (main): Likewise.
2282 2008-02-08 Robert Millan <rmh@aybabtu.com>
2284 * disk/raid.c (grub_raid_scan_device): Check for
2285 `array->device[sb.this_disk.number]' rather than for
2286 `array->device[sb.this_disk.number]->name', since the latter is not
2287 guaranteed to be accessible.
2289 2008-02-08 Robert Millan <rmh@aybabtu.com>
2291 * disk/raid.c: Update copyright.
2292 * fs/cpio.c: Likewise.
2293 * include/grub/raid.h: Likewise.
2294 * loader/i386/pc/multiboot.c: Likewise.
2295 * util/hostfs.c: Likewise.
2297 2008-02-08 Robert Millan <rmh@aybabtu.com>
2299 * include/grub/raid.h (struct grub_raid_array): Change type of `device'
2300 to a grub_disk_t array.
2301 * disk/raid.c (grub_raid_read): Replace `device[x].disk' accesses with
2303 (grub_raid_scan_device): Replace `device[x].name' accesses with
2304 `device[x]->name'. Simplify initialization of `array->device[x]'.
2306 2008-02-08 Robert Millan <rmh@aybabtu.com>
2308 * disk/raid.c (grub_raid_open, grub_raid_scan_device): Add a few
2309 grub_dprintf() calls.
2310 * kern/disk.c (grub_disk_read): Include grub_errmsg in out of range
2313 2008-02-07 Christian Franke <franke@computer.org>
2315 * util/hostfs.c (grub_hostfs_open): Use fseeko and ftello
2316 instead of fseek and ftell to support large files.
2317 (grub_hostfs_read): Likewise.
2319 2008-02-07 Robert Millan <rmh@aybabtu.com>
2321 Patch from Jeroen Dekkers.
2322 * disk/raid.c (grub_raid_scan_device): Reset `grub_errno' on disk
2323 failure, since successfully reading all array members might not be
2326 2008-02-06 Robert Millan <rmh@aybabtu.com>
2328 * util/grub-probe.c (probe): Simplify partmap probing (with the
2329 assumption that the first word up to the underscore equals to
2332 2008-02-06 Christian Franke <franke@computer.org>
2334 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_NONE
2335 (and set *ofs = 0) instead of GRUB_ERR_FILE_NOT_FOUND on
2336 last block of a cpio or tar stream.
2337 Check for "TRAILER!!!" instead of any empty data
2338 block to detect last block of a cpio stream.
2339 (grub_cpio_dir): Fix constness of variable np.
2340 (grub_cpio_open): Return GRUB_ERR_FILE_NOT_FOUND if
2341 cpio or tar trailer is detected. This fixes a crash
2342 on open of a non existing file.
2344 2008-02-05 Bean <bean123ch@gmail.com>
2346 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Get physical
2348 (grub_multiboot_load_elf64): Likewise.
2349 (grub_multiboot): Initialize mbi structure.
2351 * util/grub-fstest.c: Don't include unused header file script.h.
2353 * conf/common.rmk (grub-fstest.c_DEPENDENCIES): Move to the beginning
2355 (grub_fstest_SOURCES): Likewise.
2357 2008-02-05 Robert Millan <rmh@aybabtu.com>
2359 * include/grub/term.h (GRUB_TERM_LEFT, GRUB_TERM_RIGHT)
2360 (GRUB_TERM_UP, GRUB_TERM_DOWN, GRUB_TERM_HOME, GRUB_TERM_END)
2361 (GRUB_TERM_DC, GRUB_TERM_PPAGE, GRUB_TERM_NPAGE, GRUB_TERM_ESC)
2362 (GRUB_TERM_TAB, GRUB_TERM_BACKSPACE): New macros.
2364 * kern/i386/pc/startup.S: Include `<grub/term.h>'.
2365 (translation_table): Replace hardcoded values with macros
2366 provided by `<grub/term.h>'.
2368 * term/i386/pc/at_keyboard.c: Include `<grub/term.h>'.
2369 (keyboard_map): Correct/add a few values, with macros provided
2371 (keyboard_map_shift): Zero values that don't differ from their
2372 `keyboard_map' equivalents.
2373 (grub_console_checkkey): Optimize KEYBOARD_STATUS_CAPS_LOCK toggling.
2374 Discard the second scan code that is always sent by Caps lock.
2375 Only use `keyboard_map_shift' when it provides a non-zero value,
2376 otherwise fallback to `keyboard_map'.
2378 2008-02-04 Bean <bean123ch@gmail.com>
2380 * Makefile.in (enable_grub_fstest): New variable.
2382 * conf/common.rmk (grub_fstest_init.lst): New rule.
2383 (grub_fstest_init.h): Likewise.
2384 (grub_fstest_init.c): Likewise.
2385 (util/grub-fstest.c_DEPENDENCIES): New variable.
2386 (grub_fstest_SOURCES): Likewise.
2388 * configure.ac (enable_grub_fstest): Check for --enable-grub-fstest.
2390 * util/grub-fstest.c: New file.
2392 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
2394 Make grub-setup handle a separate root device.
2396 * util/i386/pc/grub-setup.c (setup): Always open the root device,
2397 so that the root device can be compared with the destination
2399 When embedding the core image, if the root and destination devices
2400 are different, set ROOT_DRIVE to ROOT_DEV->DISK->ID. Otherwise, to
2402 When not embedding, set ROOT_DRIVE to 0xFF.
2404 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
2406 Add support for having a grub directory in a different drive. This
2407 is still only the data handling part.
2409 * kern/i386/pc/startup.S (multiboot_trampoline): Set %dh to 0xFF.
2410 (codestart): Save %dh in GRUB_ROOT_DRIVE.
2411 (grub_root_drive): New variable.
2413 * kern/i386/pc/init.c (make_install_device): Use GRUB_ROOT_DRIVE
2414 instead of GRUB_BOOT_DRIVE to construct a device name. Set
2415 GRUB_ROOT_DRIVE to GRUB_BOOT_DRIVE if it is 0xFF, otherwise use it
2418 * include/grub/i386/pc/kernel.h (grub_root_drive): New prototype.
2420 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_ROOT_DRIVE): New
2422 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Set to 0x4f.
2424 * boot/i386/pc/pxeboot.S (_start): Set %dh to 0xFF. For now, this
2425 is bogus, because PXE booting does not specify any drive
2428 * boot/i386/pc/lnxboot.S (reg_edx): Set the second byte to 0xFF. I
2429 am not sure if this is really correct.
2431 * boot/i386/pc/cdboot.S: Set %dh to 0xFF, because the root drive
2432 is always identical to the boot drive when booting from a CD.
2434 * boot/i386/pc/boot.S (MOV_MEM_TO_AL): Removed. Not needed any
2436 (root_drive): New variable.
2437 (real_start): Unconditionally set %dh to ROOT_DRIVE.
2438 (setup_sectors): Push %dx right after popping it, because %dh will
2440 (copy_buffer): Restore %dx.
2442 2008-02-03 Robert Millan <rmh@aybabtu.com>
2444 * util/i386/pc/grub-mkrescue.in: Rewrite most of image generation to
2445 use `cdboot.img' for cdrom images.
2447 2008-02-03 Robert Millan <rmh@aybabtu.com>
2449 * util/grub.d/00_header.in: Issue scripting commands for GRUB to
2450 only setup gfxterm when `font' command has succeeded.
2452 2008-02-03 Robert Millan <rmh@aybabtu.com>
2454 * loader/multiboot_loader.c [GRUB_MACHINE_LINUXBIOS]
2455 (grub_rescue_cmd_multiboot_loader)
2456 (grub_rescue_cmd_module_loader): Enable multiboot1 calls.
2458 2008-02-03 Pavel Roskin <proski@gnu.org>
2460 * kern/i386/pc/startup.S (grub_chainloader_real_boot): Pop
2461 %edx and %esi from stack only after grub_gate_a20() is called.
2462 grub_gate_a20() clobbers %edx.
2464 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
2466 * configure.ac (AC_INIT): Bumped to 1.96.
2468 * DISTLIST: Added boot/i386/pc/cdboot.S, bus/pci.c,
2469 commands/lspci.c,disk/memdisk.c, include/grub/pci.h,
2470 include/grub/i386/pc/pci.h, video/readers/jpeg.c, and
2471 video/readers/png.c.
2473 2008-02-03 Bean <bean123ch@gmail.com>
2475 * conf/i386-pc.rmk (pkglib_IMAGES): Add cdboot.img.
2476 (cdboot_img_SOURCES): New variable.
2477 (cdboot_img_ASFLAGS): New variable.
2478 (cdboot_img_LDFLAGS): New variable.
2480 * boot/i386/pc/cdboot.S: New file.
2482 * disk/i386/pc/biosdisk.c (cd_start): New variable.
2483 (cd_count): Likewise.
2484 (grub_biosdisk_get_drive): Add support for cd device.
2485 (grub_biosdisk_call_hook): Likewise.
2486 (grub_biosdisk_iterate): Likewise.
2487 (grub_biosdisk_open): Likewise.
2488 (GRUB_BIOSDISK_CDROM_RETRY_COUNT): New macro.
2489 (grub_biosdisk_rw): Support reading from cd device.
2490 (GRUB_MOD_INIT): Iterate cd devices.
2492 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_FLAG_CDROM): New macro.
2493 (GRUB_BIOSDISK_MACHINE_CDROM_START): Likewise.
2494 (GRUB_BIOSDISK_MACHINE_CDROM_END): Likewise.
2496 * kern/i386/pc/init.c (make_install_device): Check for cd device.
2498 2008-02-02 Robert Millan <rmh@aybabtu.com>
2500 * commands/read.c: New file.
2501 * conf/common.rmk (pkglib_MODULES): Add `commands/read.c'.
2502 (read_mod_SOURCES): New variable.
2503 (read_mod_CFLAGS): Likewise.
2504 (read_mod_LDFLAGS): Likewise.
2506 2008-02-02 Robert Millan <rmh@aybabtu.com>
2508 * normal/main.c (grub_normal_execute): Check for `menu->size' when
2509 determining whether menu has to be displayed.
2511 2008-02-02 Marco Gerards <marco@gnu.org>
2513 * bus/pci.c: New file.
2515 * include/grub/pci.h: Likewise.
2517 * include/grub/i386/pc/pci.h: Likewise.
2519 * commands/lspci.c: Likewise.
2521 * conf/i386-pc.rmk (pkglib_MODULES): Add `pci.mod' and
2523 (pci_mod_SOURCES): New variable.
2524 (pci_mod_CFLAGS): Likewise.
2525 (pci_mod_LDFLAGS): Likewise.
2526 (lspci_mod_SOURCES): Likewise.
2527 (lspci_mod_CFLAGS): Likewise.
2528 (lspci_mod_LDFLAGS): Likewise.
2530 2008-02-02 Bean <bean123ch@gmail.com>
2532 * fs/ufs.c (INODE_BLKSZ): Fix incorrect value.
2533 (grub_ufs_get_file_block): Fix indirect block calculation problem.
2535 * fs/xfs.c (grub_xfs_sblock): New member log2_dirblk.
2536 (grub_xfs_btree_node): New structure.
2537 (grub_xfs_btree_root): New structure.
2538 (grub_xfs_inode): New members nblocks, extsize, nextents and btree.
2539 (GRUB_XFS_EXTENT_OFFSET): Use exts instead of inode->data.extents.
2540 (GRUB_XFS_EXTENT_BLOCK): Likewise.
2541 (GRUB_XFS_EXTENT_SIZE): Likewise.
2542 (grub_xfs_read_block): Support btree format type.
2543 (grub_xfs_iterate_dir): Use NESTED_FUNC_ATTR in call_hook.
2544 Use directory block as basic unit.
2546 * fs/fshelp.c (grub_fshelp_read_file): Bug fix for sparse block.
2548 * aclocal.m4 (grub_i386_CHECK_REGPARM_BUG): Define NESTED_FUNC_ATTR as
2549 __attribute__ ((__regparm__ (1))).
2551 2008-02-01 Robert Millan <rmh@aybabtu.com>
2553 Correct a mistake in previous commit.
2555 * conf/i386-pc.rmk (normal/execute.c_DEPENDENCIES): Move to the
2557 (normal/command.c_DEPENDENCIES): New variable.
2559 2008-02-01 Robert Millan <rmh@aybabtu.com>
2561 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Move to the
2563 (normal/command.c_DEPENDENCIES): New variable.
2564 (grub-emu_DEPENDENCIES, normal_mod_DEPENDENCIES): Remove variables.
2565 * conf/i386-ieee1275.rmk: Likewise.
2566 * conf/i386-linuxbios.rmk: Likewise.
2567 * conf/i386-pc.rmk: Likewise.
2568 * conf/sparc64-ieee1275.rmk: Likewise.
2569 * conf/powerpc-ieee1275.rmk: Likewise.
2570 (grub_emu_SOURCES): Add `fs/fshelp.c'.
2572 * genmk.rb: Add `$(#{src}_DEPENDENCIES)' in targets that require it.
2574 2008-02-01 Robert Millan <rmh@aybabtu.com>
2576 * kern/disk.c (grub_disk_read, grub_disk_write): Add grub_dprintf()
2577 call at beginning of function.
2579 2008-01-31 Pavel Roskin <proski@gnu.org>
2581 * util/powerpc/ieee1275/grub-mkrescue.in: New file.
2582 * conf/powerpc-ieee1275.rmk (bin_SCRIPTS): New variable.
2583 (grub_mkrescue_SOURCES): Likewise.
2584 * DISTLIST: Add util/powerpc/ieee1275/grub-mkrescue.in.
2586 2008-01-30 Robert Millan <rmh@aybabtu.com>
2588 * conf/i386-pc.rmk (sbin_UTILITIES): Remove `grub-probe'.
2589 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Moved from here ...
2590 * conf/common.rmk (util/grub-probe.c_DEPENDENCIES)
2591 (grub_probe_SOURCES): ... to here.
2593 * conf/i386-efi.rmk (sbin_UTILITIES): Remove `grub-probe'.
2594 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Remove.
2595 * conf/i386-ieee1275.rmk: Likewise.
2596 * conf/i386-linuxbios.rmk: Likewise.
2597 * conf/powerpc-ieee1275.rmk: Likewise.
2599 2008-01-30 Tristan Gingold <gingold@free.fr>
2601 * kern/rescue.c: Silently accept empty lines.
2603 2008-01-29 Bean <bean123ch@gmail.com>
2605 * boot/i386/pc/lnxboot.S (data_start): Code cleanup.
2606 (real_code_2): Code cleanup and change comment style.
2607 (move_memory): Avoid using 32-bit address mode.
2609 2008-01-29 Bean <bean123ch@gmail.com>
2611 * conf/i386-pc.rmk (pkglib_MODULES): Add `png.mod'.
2612 (png_mod_SOURCES): New variable.
2613 (png_mod_CFLAGS): Likewise.
2614 (png_mod_LDFLAGS): Likewise.
2616 * video/readers/png.c: New file.
2618 2008-01-28 Robert Millan <rmh@aybabtu.com>
2620 * include/grub/i386/linuxbios/kernel.h (GRUB_MOD_GAP): New macro.
2621 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Remove
2622 `ifndef GRUB_MOD_GAP' hack.
2623 * util/elf/grub-mkimage.c (add_segments): Likewise.
2625 2008-01-27 Robert Millan <rmh@aybabtu.com>
2627 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Skip
2628 `GRUB_MOD_GAP' for platforms in which it's not defined.
2629 * util/elf/grub-mkimage.c (add_segments): Likewise.
2631 2008-01-27 Robert Millan <rmh@aybabtu.com>
2633 Get grub-emu to build again (including parallel builds).
2635 * conf/i386-pc.rmk (util/grub-emu.c_DEPENDENCIES): Remove variable.
2637 (util/grub-emu.c_DEPENDENCIES): ... this, ...
2638 (normal/execute.c_DEPENDENCIES): ... this, ...
2639 (grub-emu_DEPENDENCIES): ... and this.
2641 * conf/i386-efi.rmk: Likewise.
2642 * conf/i386-linuxbios.rmk: Likewise.
2643 * conf/i386-ieee1275.rmk: Likewise.
2644 * conf/powerpc-ieee1275.rmk: Likewise.
2645 (grub_emu_SOURCES): Remove duplicated `kern/file.c'.
2647 2008-01-27 Robert Millan <rmh@aybabtu.com>
2649 * NEWS: Add a few items.
2651 2008-01-27 Robert Millan <rmh@aybabtu.com>
2653 Fix parallel builds with grub-emu. Based on earlier commit for
2654 grub-probe and grub-setup.
2656 * conf/i386-pc.rmk (grub-emu_DEPENDENCIES): Renamed to ...
2657 (util/grub-emu.c_DEPENDENCIES): ... this.
2658 * conf/i386-efi.rmk (grub-emu_DEPENDENCIES): Renamed to ...
2659 (util/grub-emu.c_DEPENDENCIES): ... this.
2660 * conf/i386-linuxbios.rmk (grub-emu_DEPENDENCIES): Renamed to ...
2661 (util/grub-emu.c_DEPENDENCIES): ... this.
2662 * conf/i386-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
2663 (util/grub-emu.c_DEPENDENCIES): ... this.
2664 * conf/powerpc-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
2665 (util/grub-emu.c_DEPENDENCIES): ... this.
2667 2008-01-27 Pavel Roskin <proski@gnu.org>
2669 * include/grub/powerpc/ieee1275/kernel.h: Introduce GRUB_MOD_GAP
2670 to create a gap between _end and the modules added to the image
2671 with grub-mkrescue. That fixes "CLAIM failed" on PowerMAC.
2672 * kern/powerpc/ieee1275/init.c: Use GRUB_MOD_GAP.
2673 * util/elf/grub-mkimage.c (add_segments): Likewise.
2675 2008-01-26 Pavel Roskin <proski@gnu.org>
2677 * kern/dl.c (grub_dl_load): Don't abort if prefix is not set,
2678 just return an error.
2680 2008-01-26 Bean <bean123ch@gmail.com>
2682 * fs/reiserfs.c (grub_fshelp_node): New member next_offset.
2683 (grub_reiserfs_get_item): Save offset of the next item.
2684 (grub_reiserfs_iterate_dir): Use next_offset to find next item.
2686 2008-01-25 Robert Millan <rmh@aybabtu.com>
2688 * conf/i386-pc.rmk (grub_setup_SOURCES, grub_emu_SOURCES): Regroup to
2689 make all filesystem sources appear together (possibly fixing omissions
2691 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
2692 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2693 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
2694 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2696 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise. Additionally,
2698 * conf/i386-efi.rmk (grub_probe_SOURCES): Likewise.
2699 * conf/i386-ieee1275.rmk (grub_probe_SOURCES): Likewise.
2700 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Likewise.
2701 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Likewise.
2703 * util/grub-probe.c: Include `<grub/file.h>' and `<sys/stat.h>'.
2704 (probe): Add a sanity check to make sure of our ability to read
2705 requested files when probing for filesystem type.
2707 * genmk.rb: Update copyright year (2007).
2709 * include/grub/fs.h (grub_fat_init, grub_fat_fini, grub_ext2_init)
2710 (grub_ext2_fini, grub_ufs_init, grub_ufs_fini, grub_minix_init)
2711 (grub_minix_fini, grub_hfs_init, grub_hfs_fini, grub_jfs_init)
2712 (grub_jfs_fini, grub_xfs_init, grub_xfs_fini, grub_affs_init)
2713 (grub_affs_fini, grub_sfs_init, grub_sfs_fini, grub_iso9660_init)
2714 : Remove function prototypes.
2716 2008-01-25 Robert Millan <rmh@aybabtu.com>
2718 Revert my previous commits (based on wrong assumption of how grub_errno
2721 * kern/disk.c (grub_disk_open): Stop resetting grub_errno.
2722 * kern/file.c (grub_file_open): Likewise.
2724 2008-01-24 Pavel Roskin <proski@gnu.org>
2726 * include/grub/ieee1275/ieee1275.h: Introduce flag for firmwares
2727 that hang if GRUB tries to setup colors.
2728 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Don't set
2729 colors for firmwares that don't support it.
2730 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag):
2731 Recognize Open Hack'Ware, set flags to work around its
2734 2008-01-24 Robert Millan <rmh@aybabtu.com>
2736 * kern/file.c (grub_file_open): Do not account previous failures of
2737 unrelated functions when grub_errno is checked for.
2738 Reported by Oleg Strikov.
2740 2008-01-24 Bean <bean123ch@gmail.com>
2742 * fs/ufs.c (GRUB_UFS_VOLNAME_LEN): New macro.
2743 (grub_ufs_sblock): New member volume name.
2744 (grub_ufs_find_file): Fix string copy bug.
2745 (grub_ufs_label): Implement this function properly.
2747 * fs/hfs.c (grub_hfs_cnid_type): New enum.
2748 (grub_hfs_iterate_records): Use the correct file number for extents
2749 and catalog file. Fix problem in next index calculation.
2750 (grub_hfs_find_node): Replace recursive function call with loop.
2751 (grub_hfs_iterate_dir): Replace recursive function call with loop.
2753 2008-01-23 Robert Millan <rmh@aybabtu.com>
2755 * include/grub/i386/ieee1275/loader.h: Include `<grub/types.h>',
2756 `<grub/symbol.h>' and `<grub/multiboot.h>'.
2757 (grub_multiboot2_real_boot): New function prototype.
2759 * include/grub/i386/pc/memory.h: Include `<grub/machine/machine.h>'.
2760 [!GRUB_MACHINE_IEEE1275] (grub_lower_mem, grub_upper_mem): Disable.
2762 * kern/i386/ieee1275/init.c (grub_os_area_addr)
2763 (grub_os_area_size, grub_lower_mem, grub_upper_mem): Remove variables.
2765 2008-01-23 Robert Millan <rmh@aybabtu.com>
2767 * kern/mm.c (grub_mm_init_region): Replace grub_dprintf() call with
2768 #ifdef'ed out grub_printf().
2770 2008-01-23 Robert Millan <rmh@aybabtu.com>
2772 * term/i386/pc/at_keyboard.c (grub_keyboard_isr): #ifdef out
2773 grub_dprintf calls, since they make "debug=all" mode unusable.
2774 (grub_console_checkkey): Likewise.
2776 2008-01-23 Robert Millan <rmh@aybabtu.com>
2778 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
2779 `term/i386/pc/at_keyboard.c'.
2780 (pkglib_MODULES): Add `serial.mod'.
2781 (serial_mod_SOURCES): New variable.
2782 (serial_mod_CFLAGS): Likewise.
2783 (serial_mod_LDFLAGS): Likewise.
2785 * include/grub/i386/ieee1275/console.h: Add `<grub/symbol.h>'. Remove
2786 `<grub/powerpc/ieee1275/console.h>'.
2787 (grub_keyboard_controller_init): New function prototype.
2788 (grub_console_checkkey): Likewise.
2789 (grub_console_getkey): Likewise.
2791 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize AT
2794 * term/ieee1275/ofconsole.c (grub_ofconsole_term): On i386, use
2795 grub_ofconsole_checkkey() and grub_ofconsole_getkey() for input.
2797 2008-01-23 Robert Millan <rmh@aybabtu.com>
2799 * kern/i386/pc/init.c (make_install_device): When memdisk image is
2800 present, "(memdisk)/boot/grub" becomes the default prefix.
2802 * util/i386/pc/grub-mkrescue.in: Switch to a minimal core.img plus
2803 a memdisk tarball with all the modules. Add --overlay=DIR option that
2804 allows users to overlay additional files into the image.
2806 2008-01-23 Robert Millan <rmh@aybabtu.com>
2808 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add `machine/loader.h'
2809 and `machine/memory.h'.
2810 (pkglib_MODULES): Add `multiboot.mod' and `_multiboot.mod'.
2811 (_multiboot_mod_SOURCES): New variable.
2812 (_multiboot_mod_CFLAGS): Likewise.
2813 (_multiboot_mod_LDFLAGS): Likewise.
2814 (multiboot_mod_SOURCES): Likewise.
2815 (multiboot_mod_CFLAGS): Likewise.
2816 (multiboot_mod_LDFLAGS): Likewise.
2818 * include/grub/i386/ieee1275/loader.h: New file.
2820 * include/grub/i386/ieee1275/machine.h: Likewise.
2822 * include/grub/i386/ieee1275/memory.h: Likewise.
2824 * include/grub/i386/pc/init.h (grub_os_area_addr): Remove (redundant)
2825 variable declaration.
2826 (grub_os_area_size): Likewise.
2828 * kern/i386/ieee1275/init.c (grub_os_area_addr, grub_os_area_size)
2829 (grub_lower_mem, grub_upper_mem): New variables.
2830 (grub_stop_floppy): New function (just to make
2831 grub_multiboot2_real_boot() happy).
2833 * kern/i386/ieee1275/startup.S: Include `<grub/machine/memory.h>',
2834 `<grub/cpu/linux.h>', `<multiboot.h>' and `<multiboot2.h>'.
2835 (grub_stop): New function.
2836 Include `"../realmode.S"' and `"../loader.S"'.
2838 * loader/multiboot_loader.c: Include `<grub/machine/machine.h>'.
2839 Replace `__i386__' #ifdefs with `GRUB_MACHINE_PCBIOS'.
2841 * loader/powerpc/ieee1275/multiboot2.c (grub_mb2_arch_boot): On i386,
2842 rely on grub_multiboot2_real_boot() for final boot.
2844 2008-01-22 Robert Millan <rmh@aybabtu.com>
2846 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): When
2847 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag is set, skip any
2848 device that doesn't look like an SD card.
2849 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
2850 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag.
2851 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag): Detect
2852 OLPC laptop, and set `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' when
2855 2008-01-22 Robert Millan <rmh@aybabtu.com>
2857 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Add sanity check to
2858 avoid claiming over our own code.
2860 2008-01-22 Bean <bean123ch@gmail.com>
2862 * conf/i386-pc.rmk (pkglib_MODULES): Add `jpeg.mod'.
2863 (jpeg_mod_SOURCES): New variable.
2864 (jpeg_mod_CFLAGS): Likewise.
2865 (jpeg_mod_LDFLAGS): Likewise.
2867 * video/readers/jpeg.c : New file.
2869 2008-01-22 Bean <bean123ch@gmail.com>
2871 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_FILE_NOT_FOUND when
2872 there are no more items.
2874 2008-01-21 Robert Millan <rmh@aybabtu.com>
2876 * kern/mm.c (grub_mm_init_region): Improve debug message.
2878 2008-01-21 Robert Millan <rmh@aybabtu.com>
2880 * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): New variable.
2881 (kernel_img_LDFLAGS): Use `GRUB_MEMORY_MACHINE_LINK_ADDR' as link
2883 (grub_mkimage_CFLAGS): Propagate `GRUB_MEMORY_MACHINE_LINK_ADDR' as
2885 * include/grub/i386/pc/memory.h (GRUB_MEMORY_MACHINE_UPPER): New macro.
2886 Indicates start of upper memory.
2887 * util/i386/pc/grub-mkimage.c: Include `<grub/machine/memory.h>'.
2888 (generate_image): Abort when image size is big enough to corrupt
2891 * include/grub/i386/pc/vga.h: Include `<grub/machine/memory.h>'.
2892 (GRUB_MEMORY_MACHINE_VGA_ADDR): Alias for `GRUB_MEMORY_MACHINE_UPPER'.
2893 * term/i386/pc/vga.c (VGA_MEM): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
2894 instead of hardcoding 0xA0000.
2895 * video/i386/pc/vbe.c: Include `<grub/machine/vga.h>'.
2896 (grub_vbe_set_video_mode): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
2897 instead of hardcoding 0xA0000.
2899 2008-01-21 Robert Millan <rmh@aybabtu.com>
2901 * disk/memdisk.c (memdisk_size): New variable.
2902 (grub_memdisk_open): Replace grub_arch_memdisk_size() call with
2904 (grub_memdisk_init): Initialize `memdisk_size'. Reallocate memdisk
2905 image to dynamic memory.
2906 (grub_memdisk_fini): Replace grub_arch_memdisk_size() call with
2907 `memdisk_size'. Free memdisk block.
2909 2008-01-21 Robert Millan <rmh@aybabtu.com>
2911 Fix detection of very small filesystems (like tar).
2913 * fs/reiserfs.c (grub_reiserfs_mount): When disk is too small to
2914 contain a ReiserFS, abort with GRUB_ERR_BAD_FS rather than
2915 GRUB_ERR_OUT_OF_RANGE (which made the upper layer think there's
2916 a problem with this disk).
2918 2008-01-21 Robert Millan <rmh@aybabtu.com>
2920 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Add debug message
2921 on grub_biosdisk_rw_standard() error.
2923 2008-01-21 Robert Millan <rmh@aybabtu.com>
2925 * include/grub/ieee1275/ieee1275.h: Add 2008 to Copyright line for
2927 * kern/elf.c: Likewise.
2928 * kern/ieee1275/ieee1275.c: Likewise.
2929 * kern/powerpc/ieee1275/openfw.c: Likewise.
2930 * term/ieee1275/ofconsole.c: Likewise.
2932 2008-01-21 Robert Millan <rmh@aybabtu.com>
2934 * include/grub/i386/pc/kernel.h: Include `<grub/symbol.h>'.
2936 * include/grub/kernel.h (grub_arch_memdisk_addr)
2937 (grub_arch_memdisk_size): Moved from here ...
2939 * include/grub/i386/pc/kernel.h (grub_arch_memdisk_addr)
2940 (grub_arch_memdisk_size): ... to here.
2942 2008-01-21 Robert Millan <rmh@aybabtu.com>
2944 Mostly based on bugfix from Bean.
2946 * kern/elf.c (grub_elf32_phdr_iterate): Use `NESTED_FUNC_ATTR'
2947 attribute with hook() parameter.
2948 (grub_elf32_load): Use `NESTED_FUNC_ATTR' with grub_elf32_load_segment()
2950 (grub_elf64_phdr_iterate): Use `NESTED_FUNC_ATTR'
2951 attribute with hook() parameter.
2952 (grub_elf64_load): Use `NESTED_FUNC_ATTR' with grub_elf64_load_segment()
2955 2008-01-21 Robert Millan <rmh@aybabtu.com>
2957 * conf/i386-pc.rmk (kernel_img_HEADERS): Add `machine/kernel.h'.
2958 (pkglib_MODULES): Add `memdisk.mod'.
2959 (memdisk_mod_SOURCES): New variable.
2960 (memdisk_mod_CFLAGS): Likewise.
2961 (memdisk_mod_LDFLAGS): Likewise.
2963 * disk/memdisk.c: New file.
2965 * include/grub/disk.h (grub_disk_dev_id): Add
2966 `GRUB_DISK_DEVICE_MEMDISK_ID'.
2968 * include/grub/i386/pc/kernel.h
2969 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): New macro.
2970 (GRUB_KERNEL_MACHINE_PREFIX): Increment by 4.
2971 (grub_kernel_image_size): New variable declaration.
2972 (grub_total_module_size): Likewise.
2973 (grub_memdisk_image_size): Likewise.
2975 * include/grub/i386/pc/memory.h
2976 (GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR): New macro.
2978 * include/grub/kernel.h: Include `<grub/symbol.h>'.
2979 (grub_arch_memdisk_addr): New variable declaration.
2980 (grub_arch_memdisk_size): Likewise.
2982 * kern/i386/pc/init.c (grub_arch_memdisk_addr): New function.
2983 (grub_arch_memdisk_size): Likewise.
2985 * kern/i386/pc/startup.S (grub_memdisk_image_size): New variable.
2986 (codestart): Replace hardcoded `0x100000' with
2987 `GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR' macro.
2989 * util/i386/pc/grub-mkimage.c: Include `<grub/misc.h>'.
2990 (generate_image): Add `memdisk_path' parameter. When `memdisk_path' is
2991 not NULL, append the contents of the file it refers to, at the end of
2992 the compressed kernel image. Initialize `grub_memdisk_image_size'
2993 variable (at `GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE' offset).
2994 (options): Add "memdisk"|'m' option.
2995 (main): Parse --memdisk|-m option, and pass user-provided path as
2996 parameter to generate_image().
2998 2008-01-20 Robert Millan <rmh@aybabtu.com>
3000 * kern/sparc64/ieee1275/openfw.c (grub_devalias_iterate): Copy debug
3001 grub_dprintf() calls from here ...
3002 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): ... to here.
3004 2008-01-20 Robert Millan <rmh@aybabtu.com>
3006 Fix detection of "real mode" when /options/real-mode? doesn't exist.
3008 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_mmu): New variable
3010 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_mmu): New variable.
3011 (grub_ieee1275_find_options): If `grub_ieee1275_mmu' is 0, set
3012 `GRUB_IEEE1275_FLAG_REAL_MODE'.
3013 (cmain): Initialize `grub_ieee1275_mmu' (using /chosen/mmu integer
3015 * kern/powerpc/ieee1275/openfw.c (grub_map): Rely on pre-initialized
3016 `grub_ieee1275_mmu' rather than obtaining a handler on every call.
3018 2008-01-19 Robert Millan <rmh@aybabtu.com>
3020 Get rid of confusing function (superseded by
3021 `grub_ieee1275_get_integer_property')
3022 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_decode_int_4): Remove
3024 * kern/ieee1275/ieee1275.c (grub_ieee1275_decode_int_4): Remove
3026 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid use of
3027 grub_ieee1275_decode_int_4(), by obtaining integer properties directly
3028 in native endianness from grub_ieee1275_get_integer_property().
3030 2008-01-19 Robert Millan <rmh@aybabtu.com>
3032 * kern/powerpc/ieee1275/openfw.c (grub_halt): Issue "power-off"
3033 command after "shut-down", since implementations differ on which
3034 the command for halt is.
3036 2008-01-19 Robert Millan <rmh@aybabtu.com>
3038 * include/grub/i386/linuxbios/console.h: Add header protection.
3039 (grub_keyboard_controller_init): New function prototype.
3040 * term/i386/pc/at_keyboard.c (KEYBOARD_COMMAND_ISREADY): New macro.
3041 (KEYBOARD_COMMAND_READ): Likewise.
3042 (KEYBOARD_COMMAND_WRITE): Likewise.
3043 (KEYBOARD_SCANCODE_SET1): Likewise.
3044 (grub_keyboard_controller_write): New function.
3045 (grub_keyboard_controller_read): Likewise.
3046 (grub_keyboard_controller_init): Likewise.
3048 * term/i386/pc/console.c: Include `<grub/machine/machine.h>'.
3049 (grub_console_init): On coreboot/LinuxBIOS, call
3050 grub_keyboard_controller_init().
3052 2008-01-19 Robert Millan <rmh@aybabtu.com>
3054 PowerPC changes provided by Pavel Roskin.
3056 * kern/powerpc/ieee1275/cmain.c (cmain): Don't take any arguments.
3057 * kern/powerpc/ieee1275/crt0.S: Store r5 in grub_ieee1275_entry_fn,
3058 don't rely on cmain() doing it.
3059 * kern/i386/ieee1275/startup.S (_start): Store %eax in
3060 grub_ieee1275_entry_fn, don't rely on cmain() doing it.
3062 2008-01-16 Robert Millan <rmh@aybabtu.com>
3064 * include/grub/i386/linuxbios/memory.h
3065 (GRUB_MEMORY_MACHINE_LINUXBIOS_TABLE_ADDR): Remove macro.
3066 * kern/i386/linuxbios/table.c (grub_linuxbios_table_iterate): Do not
3067 receive `table_header' as argument. Instead, probe for it in the
3068 known memory ranges where it can be present.
3069 (grub_available_iterate): Do not pass a fixed `table_header' address
3070 to grub_linuxbios_table_iterate().
3072 2008-01-15 Robert Millan <rmh@aybabtu.com>
3074 * configure.ac: Add `i386-ieee1275' to the list of supported targets.
3075 * conf/i386-ieee1275.rmk: New file.
3076 * include/grub/i386/ieee1275/console.h: Likewise.
3077 * include/grub/i386/ieee1275/ieee1275.h: Likewise.
3078 * include/grub/i386/ieee1275/kernel.h: Likewise.
3079 * include/grub/i386/ieee1275/time.h: Likewise.
3080 * kern/i386/ieee1275/init.c: Likewise.
3081 * kern/i386/ieee1275/startup.S: Likewise.
3083 2008-01-15 Robert Millan <rmh@aybabtu.com>
3085 * kern/misc.c (grub_vsprintf): Do not reset `longlongfmt' to zero
3086 when pointers are 32-bit (but still do set it to one when they are
3089 2008-01-15 Robert Millan <rmh@aybabtu.com>
3091 * include/grub/ieee1275/ieee1275.h
3092 (grub_ieee1275_get_integer_property): New function prototype.
3094 * kern/ieee1275/ieee1275.c: Include `<grub/types.h>'.
3095 (grub_ieee1275_get_integer_property): New function. Wraps around
3096 grub_ieee1275_get_property() to handle endianness.
3098 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Replace
3099 grub_ieee1275_get_property() with grub_ieee1275_get_integer_property()
3101 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Likewise.
3102 (grub_map): Likewise.
3103 * kern/sparc64/ieee1275/openfw.c (grub_map): Likewise.
3105 2008-01-15 Bean <bean123ch@gmail.com>
3107 * normal/execute.c (grub_script_exec_argument_to_string): Check for undefined variable.
3108 (grub_script_execute_cmdline): Reset grub_errno.
3110 * normal/main.c (read_config_file): Reset grub_errno.
3112 * normal/parse.y (script_init): New.
3113 (script): Move function and menuentry here.
3115 (command): Add delimiter at the end of command.
3116 (commands): Adjust to match the new command.
3117 (commandblock): Remove grub_script_lexer_record_start.
3118 (menuentry): Add grub_script_lexer_record_start, use the new commands.
3119 (if): Use the new commands.
3121 * conf/common.rmk (pkgdata_MODULES): Add echo.mod.
3123 2008-01-15 Robert Millan <rmh@aybabtu.com>
3125 * normal/menu.c (run_menu): Move timeout message from here ...
3126 (print_timeout): ... to here.
3127 (run_menu): Use print_timeout() once during initial draw to print
3128 the whole message, and again in every clock tick to update only
3129 the number of seconds.
3131 2008-01-15 Robert Millan <rmh@aybabtu.com>
3133 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Obtain
3134 actual size of `available' from grub_ieee1275_get_property(), and
3135 restrict parsing to that bound.
3137 2008-01-15 Christian Franke <franke@computer.org>
3139 * util/grub-emu.c: Replace <argp.h> by <getopt.h>.
3140 (argp_program_version): Remove variable.
3141 (argp_program_bug_address): Likewise.
3142 (options): Convert from struct argp_option to struct option.
3143 (struct arguments): Remove.
3144 (parse_opt): Remove.
3145 (usage): New function.
3146 (main): Replace struct args members by simple variables.
3147 Replace argp_parse() by getopt_long().
3148 Add switch to evaluate options.
3149 Add missing "(...)" around root_dev in prefix string.
3151 2008-01-14 Robert Millan <rmh@aybabtu.com>
3153 * kern/powerpc/ieee1275/init.c (grub_exit): Reimplement as a wrapper
3154 for grub_ieee1275_exit(), in order to improve portability.
3156 2008-01-14 Robert Millan <rmh@aybabtu.com>
3158 * util/grub.d/10_linux.in (prefix): Define.
3159 (exec_prefix): Likewise. Both definitions are later used by `libdir'.
3161 2008-01-13 Pavel Roskin <proski@gnu.org>
3163 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Don't use
3164 grub_errno if no errors have been detected.
3166 2008-01-12 Robert Millan <rmh@aybabtu.com>
3168 * include/grub/util/getroot.h (grub_dev_abstraction_types): New enum.
3169 (grub_util_get_dev_abstraction): New function prototype.
3171 * util/getroot.c: Include `<grub/util/getroot.h>'
3172 (grub_util_get_grub_dev): Move detection of abstraction type to ...
3173 (grub_util_get_dev_abstraction): ... here (new function).
3175 * util/grub-probe.c: Convert PRINT_* to an enum. Add
3176 `PRINT_ABSTRACTION'.
3177 (probe): Probe for abstraction type when requested.
3178 (main): Understand `--target=abstraction'.
3180 * util/i386/efi/grub-install.in: Add abstraction module to core
3181 image when it is found to be necessary.
3182 * util/i386/pc/grub-install.in: Likewise.
3183 * util/powerpc/ieee1275/grub-install.in: Likewise.
3185 * util/update-grub_lib.in (font_path): Return system path without
3186 converting to GRUB path.
3187 * util/update-grub.in: Convert system path returned by font_path()
3188 to a GRUB path. Use `grub-probe -t abstraction' to determine what
3189 abstraction module is needed for loading fonts (if any). Export
3190 that as `GRUB_PRELOAD_MODULES'.
3191 * util/grub.d/00_header.in: Process `GRUB_PRELOAD_MODULES' (print
3194 2008-01-12 Yoshinori K. Okuji <okuji@enbug.org>
3196 Remove some unused code from reiserfs.
3198 * fs/reiserfs.c (struct grub_reiserfs_key)
3199 [GRUB_REISERFS_KEYV2_BITFIELD]: Removed offset and type.
3200 (struct grub_reiserfs_node_body): Removed.
3201 (grub_reiserfs_get_key_v2_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
3203 (grub_reiserfs_get_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
3205 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
3207 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
3209 (grub_reiserfs_set_key_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
3211 (grub_reiserfs_iterate_dir) [GRUB_REISERFS_KEYV2_BITFIELD]:
3213 (grub_reiserfs_open) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
3214 (grub_reiserfs_read) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
3215 (grub_reiserfs_dir) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
3217 2008-01-10 Robert Millan <rmh@aybabtu.com>
3219 * util/update-grub_lib.in (grub_file_is_not_garbage): New function.
3220 Determines if a file is garbage left by packaging systems, etc.
3221 * util/update-grub.in: Use grub_file_is_not_garbage() as a condition
3222 for processing /etc/grub.d scripts.
3223 * util/grub.d/10_hurd.in: Fix `GRUB_DISTRIBUTOR' comparison.
3224 * util/grub.d/10_linux.in: Likewise. Use grub_file_is_not_garbage()
3225 as a condition for processing Linux images.
3227 2008-01-10 Pavel Roskin <proski@gnu.org>
3229 * include/grub/powerpc/libgcc.h (__ucmpdi2): New export. Needed
3230 to compile reiserfs.c on PowerPC.
3232 2008-01-10 Robert Millan <rmh@aybabtu.com>
3234 * kern/device.c (grub_device_iterate): Do not abort device iteration
3235 when one of the devices cannot be opened.
3236 * kern/disk.c (grub_disk_open): Do not account previous failures of
3237 unrelated functions when grub_errno is checked for.
3239 2008-01-08 Robert Millan <rmh@aybabtu.com>
3241 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): For
3242 `! grub_linux_is_bzimage', change order of address comparison to make
3243 it more intuitive, and improve "too big zImage" error message.
3245 2008-01-08 Robert Millan <rmh@aybabtu.com>
3247 * Makefile.in (uninstall): Handle `$(update-grub_SCRIPTS)' and
3248 `$(update-grub_DATA)'.
3249 (distcheck): Fix race condition when invoking `$(MAKE)' on multiple
3252 2008-01-07 Robert Millan <rmh@aybabtu.com>
3254 * boot/i386/pc/boot.S (boot_drive_check): Add a comment indicating
3255 which instruction is modified by grub-setup during installation
3256 (since it wasn't obvious by only looking at this file).
3258 2008-01-07 Robert Millan <rmh@aybabtu.com>
3260 * TODO: Rewrite. Just refer to the wiki and the BTS instead of
3261 listing actual TODO items.
3263 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
3265 * fs/reiserfs.c (grub_reiserfs_get_key_v2_type): Handle endianness
3267 (grub_reiserfs_get_key_offset): Likewise.
3268 (grub_reiserfs_set_key_offset): Likewise.
3269 (grub_reiserfs_set_key_type): Likewise.
3270 (grub_reiserfs_iterate_dir): Return 1 if found, otherwise 0.
3272 (GRUB_REISERFS_KEYV2_BITFIELD): Undefined. Probably it would be
3273 better to remove the bitfield version completely.
3275 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
3277 * fs/reiserfs.c (grub_reiserfs_iterate_dir): ENTRY_ITEM must be
3278 allocated from the heap, due to the fshelp implementation.
3279 (grub_reiserfs_dir): Free NODE, due to the same reason.
3281 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
3283 Mostly from Vincent Pelletier:
3285 * fs/reiserfs.c: New file.
3287 * conf/common.rmk (pkglib_MODULES): Added reiserfs.mod.
3288 (reiserfs_mod_SOURCES): New variable.
3289 (reiserfs_mod_CFLAGS): Likewise.
3290 (reiserfs_mod_LDFLAGS): Likewise.
3292 * DISTLIST: Added boot/i386/pc/lnxboot.S, commands/hexdump.c,
3293 disk/ata.c, fs/cpio.c, fs/ntfscomp.c, fs/reiserfs.c,
3294 include/grub/ntfs.h, include/grub/i386/pc/machine.h, and
3297 2008-01-06 Robert Millan <rmh@aybabtu.com>
3299 * normal/color.c: Remove `<grub/env.h>'.
3301 2008-01-05 Jeroen Dekkers <jeroen@dekkers.cx>
3303 * include/grub/normal.h: Include <grub/env.h>.
3305 2008-01-05 Robert Millan <rmh@aybabtu.com>
3307 * util/i386/pc/grub-setup.c (usage): Replace obsolete `(hd0,0)' in
3308 usage example with `(hd0,1)'.
3309 Reported by Samuel Thibault.
3311 2008-01-05 Robert Millan <rmh@aybabtu.com>
3313 * kern/i386/loader.S (grub_linux_is_bzimage): New variable.
3314 (grub_linux_boot_zimage): Rename to ...
3315 (grub_linux_boot): ... this.
3316 (grub_linux_boot_bzimage): Merge with `grub_linux_boot_zimage'.
3317 (grub_linux_boot_zimage): Conditionalize zImage copy.
3319 * include/grub/i386/loader.h (grub_linux_is_bzimage): Add prototype.
3320 (grub_linux_boot_bzimage): Remove prototype.
3321 (grub_linux_boot_zimage): Rename to ...
3322 (grub_linux_boot): ... this.
3324 * loader/i386/pc/linux.c (big_linux): Replace with `grub_linux_is_bzimage'.
3325 (grub_linux_boot): Remove function.
3327 2008-01-05 Robert Millan <rmh@aybabtu.com>
3329 * include/grub/normal.h (grub_env_write_color_normal): New prototype.
3330 (grub_env_write_color_highlight): Likewise.
3331 (grub_wait_after_message): Likewise.
3333 * normal/color.c: New file.
3335 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/color.c'.
3336 (normal_mod_DEPENDENCIES): Likewise.
3338 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `normal/color.c'.
3339 (normal_mod_DEPENDENCIES): Likewise.
3341 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add `normal/color.c'.
3342 (normal_mod_DEPENDENCIES): Likewise.
3344 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `normal/color.c'.
3345 (normal_mod_DEPENDENCIES): Likewise.
3347 * normal/menu_entry.c (run): Rely on grub_wait_after_message()
3348 for waiting after a message is printed.
3349 * normal/main.c (read_config_file): Likewise.
3350 (grub_normal_init): Register grub_env_write_color_normal() and
3351 grub_env_write_color_highlight() hooks. Mark `color_normal' and
3352 `color_highlight' variables as global.
3354 * normal/menu.c (grub_wait_after_message): New function.
3355 (grub_color_menu_normal): New variable. Replaces ...
3356 (GRUB_COLOR_MENU_NORMAL): ... this macro.
3357 (grub_color_menu_highlight): New variable. Replaces ...
3358 (GRUB_COLOR_MENU_HIGHLIGHT): ... this macro.
3359 (draw_border): Set color state to `GRUB_TERM_COLOR_NORMAL' instead of
3360 `GRUB_TERM_COLOR_STANDARD'.
3361 (print_message): Use `grub_setcolorstate' to reload colors. Rename
3362 `normal_code' and `highlight_code' to `old_color_normal' and
3363 `old_color_highlight', respectively.
3364 (grub_menu_init_page): Update colors when drawing the menu, based on
3365 `menu_color_normal' and `menu_color_highlight' variables.
3366 (grub_menu_run): Rely on grub_wait_after_message() for waiting after
3367 a message is printed.
3369 2008-01-05 Robert Millan <rmh@aybabtu.com>
3371 * kern/env.c (grub_env_context_open): Propagate hooks for global
3372 variables to new context.
3374 * kern/main.c (grub_set_root_dev): Export `root' variable.
3376 2008-01-05 Robert Millan <rmh@aybabtu.com>
3378 * util/biosdisk.c (get_os_disk): Check for devfs-style IDE and SCSI
3379 discs unconditionally, since udev and others have options to provide
3382 2008-01-05 Robert Millan <rmh@aybabtu.com>
3384 * normal/completion.c (iterate_dir): Skip `.' and `..' directories.
3386 2008-01-04 Christian Franke <franke@computer.org>
3388 * kern/i386/pc/init.c (grub_machine_init): Fix evaluation
3391 2008-01-03 Pavel Roskin <proski@gnu.org>
3393 * kern/i386/linuxbios/init.c: Put "void" to all function
3394 declarations with no arguments.
3395 * kern/powerpc/ieee1275/init.c: Likewise.
3396 * term/i386/pc/at_keyboard.c: Likewise.
3397 * term/i386/pc/vga_text.c: Likewise.
3398 * util/grub-mkdevicemap.c: Likewise.
3400 2008-01-02 Robert Millan <rmh@aybabtu.com>
3402 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Improve error
3403 message when loaded image is out of bounds.
3404 (grub_multiboot_load_elf64): Likewise.
3406 2008-01-02 Pavel Roskin <proski@gnu.org>
3408 * util/grub.d/10_linux.in: Try version without ".old" when
3409 looking for initrd. It's better to use initrd from the newer
3410 kernel of the same version than no initrd at all.
3412 2008-01-01 Robert Millan <rmh@aybabtu.com>
3414 * util/biosdisk.c (get_os_disk): Fix check for IDE or SCSI discs.
3416 2008-01-01 Vesa Jaaskelainen <chaac@nic.fi>
3418 * include/grub/video.h: Added grub_video_unmap_color and
3419 grub_video_get_active_render_target.
3420 (grub_video_adapter): Added unmap_color and get_active_render_target.
3422 * video/video.c: Added grub_video_unmap_color and
3423 grub_video_get_active_render_target.
3424 (grub_video_get_info): Changed method to accept NULL pointer as an
3425 argument to allow detection of active video adapter.
3427 * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as
3428 grub_video_vbe_unmap_color_int.
3429 Added grub_video_vbe_unmap_color and
3430 grub_video_vbe_get_active_render_target.
3431 (grub_video_vbe_adapter): Added unmap_color and
3432 get_active_render_target.
3434 * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage
3435 with grub_video_vbe_unmap_color_int.
3437 * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added.
3438 (DEFAULT_NORMAL_COLOR): Likewise.
3439 (DEFAULT_HIGHLIGHT_COLOR) Likewise.
3440 (DEFAULT_FG_COLOR): Removed.
3441 (DEFAULT_BG_COLOR): Likewise.
3442 (DEFAULT_CURSOR_COLOR): Changed value.
3443 (grub_virtual_screen): Added standard_color_setting,
3444 normal_color_setting, highlight_color_setting and term_color.
3445 (grub_virtual_screen): Removed fg_color_setting and bg_color_setting.
3446 (bitmap_width): Added.
3447 (bitmap_height): Likewise.
3449 (set_term_color): Likewise.
3450 (grub_virtual_screen_setup): Changed to use new terminal coloring
3452 (grub_gfxterm_init): Added init for bitmap.
3453 (grub_gfxterm_fini): Added destroy for bitmap.
3454 (redraw_screen_rect): Updated to use background bitmap and new
3456 (scroll_up): Added optimization for case when there is no bitmap.
3457 (grub_gfxterm_cls): Fixed to use correct background color.
3458 (grub_virtual_screen_setcolorstate): Changed to use new terminal
3460 (grub_virtual_screen_setcolor): Likewise.
3461 (grub_virtual_screen_getcolor): Added.
3462 (grub_gfxterm_background_image_cmd): Likewise.
3463 (grub_video_term): Added setcolor and getcolor.
3464 (MOD_INIT): Added registration of background_image command.
3465 (MOD_TERM): Added unregistration for background_image command.
3467 2007-12-30 Pavel Roskin <proski@gnu.org>
3469 * loader/multiboot_loader.c: Fix multiboot command
3470 unregistration. Fix all typos in the word "multiboot".
3472 2007-12-29 Pavel Roskin <proski@gnu.org>
3474 * util/grub.d/10_linux.in: Refactor search for initrd. Add
3475 support for initrd names used in Fedora.
3477 2007-12-26 Bean <bean123ch@gmail.com>
3479 * conf/common.rmk (pkgdata_MODULES): Add cpio.mod.
3480 (cpio_mod_SOURCES): New variable.
3481 (cpio_mod_CFLAGS): Likewise.
3482 (cpio_mod_LDFLAGS): Likewise.
3484 * fs/cpio.c: New file.
3486 * conf/i386-pc.rmk (grub_emu_SOURCES): Add cpio.c.
3488 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
3490 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
3492 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3494 2007-12-25 Robert Millan <rmh@aybabtu.com>
3496 * include/grub/term.h (struct grub_term): Add `getcolor' function.
3497 (grub_getcolor): New function.
3499 * kern/term.c (grub_getcolor): New function.
3500 * normal/menu.c (GRUB_COLOR_MENU_NORMAL): New macro.
3501 (GRUB_COLOR_MENU_HIGHLIGHT): New macro.
3502 (print_entry): Set normal and highlight colors to
3503 `GRUB_COLOR_MENU_NORMAL' and `GRUB_COLOR_MENU_HIGHLIGHT',
3504 respectively, before printing and restore them to old
3506 (grub_menu_init_page): Likewise. Fill an additional colored space
3507 that would otherwise be left blank.
3509 * term/efi/console.c (grub_console_getcolor): New function.
3510 (struct grub_console_term.getcolor): New variable.
3511 * term/i386/pc/console.c (grub_console_getcolor): New function.
3512 (struct grub_console_term.getcolor): New variable.
3513 * term/ieee1275/ofconsole.c (grub_ofconsole_getcolor): New function.
3514 (struct grub_console_term.getcolor): New variable.
3516 * term/i386/pc/serial.c (grub_serial_setcolor): Remove function.
3517 (struct grub_console_term.setcolor): Remove variable.
3518 * term/i386/pc/vesafb.c (grub_virtual_screen_setcolor): Remove function.
3519 (struct grub_console_term.setcolor): Remove variable.
3520 * term/i386/pc/vga.c (grub_vga_setcolor): Remove function.
3521 (struct grub_console_term.setcolor): Remove variable.
3522 * term/gfxterm.c (grub_virtual_screen_setcolor): Remove function.
3523 (struct grub_console_term.setcolor): Remove variable.
3525 2007-12-25 Robert Millan <rmh@aybabtu.com>
3527 * configure.ac: Search for possible unifont.hex locations, and
3528 define UNIFONT_HEX if found.
3530 * Makefile.in (UNIFONT_HEX): Define variable.
3531 (DATA): Rename to ...
3532 (PKGLIB): ... this. Update all users.
3533 (PKGDATA): New variable.
3534 (pkgdata_IMAGES): Rename to ...
3535 (pkglib_IMAGES): ... this. Update all users.
3536 (pkgdata_MODULES): Rename to ...
3537 (pkglib_MODULES): ... this. Update all users.
3538 (pkgdata_PROGRAMS): Rename to ...
3539 (pkglib_PROGRAMS): ... this. Update all users.
3540 (pkgdata_DATA): Rename to ...
3541 (pkglib_DATA): ... this. Update all users.
3542 (CLEANFILES): Redefine to `$(pkglib_DATA) $(pkgdata_DATA)'.
3543 (unicode.pff, ascii.pff): New rules.
3544 (all-local): Add `$(PKGDATA)' dependency.
3545 (install-local): Process `$(PKGDATA)'.
3547 * util/update-grub_lib.in (font_path): Search for *.pff files in
3548 a few more locations, including `${pkgdata}'.
3550 2007-12-23 Robert Millan <rmh@aybabtu.com>
3552 Patch from Bean <bean123ch@gmail.com>:
3553 * disk/loopback.c (grub_loopback_read): Add missing bit shift to
3556 2007-12-21 Bean <bean123ch@gmail.com>
3558 * conf/common.rmk (pkgdata_MODULES): Add ntfscomp.mod.
3559 (ntfscomp_mod_SOURCES): New variable.
3560 (ntfscomp_mod_CFLAGS): Likewise.
3561 (ntfscomp_mod_LDFLAGS): Likewise.
3563 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfscomp.c.
3564 (grub_probe_SOURCES): Likewise.
3565 (grub_emu_SOURCES): Likewise.
3567 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
3568 (grub_emu_SOURCES): Likewise.
3570 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
3571 (grub_emu_SOURCES): Likewise.
3573 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
3574 (grub_emu_SOURCES): Likewise.
3576 * fs/ntfs.c (grub_ntfscomp_func): New variable.
3577 (read_run_list): Renamed to grub_ntfs_read_run_list.
3578 (decomp_nextvcn): Moved to ntfscomp.c.
3579 (decomp_getch): Likewise.
3580 (decomp_get16): Likewise.
3581 (decomp_block): Likewise.
3582 (read_block): Likewise.
3583 (read_data): Partially moved to ntfscomp.c.
3584 (fixup): Change unsigned to grub_uint16_t.
3585 (read_mft): Change unsigned long to grub_uint32_t.
3586 (read_attr): Likewise.
3587 (read_data): Likewise.
3588 (read_run_data): Likewise.
3589 (read_run_list): Likewise.
3590 (read_mft): Likewise.
3592 * fs/ntfscomp.c: New file.
3594 * include/grub/ntfs.h: New file.
3596 2007-12-16 Robert Millan <rmh@aybabtu.com>
3598 * util/grub-mkdevicemap.c (make_device_map): Iterate up to 20 for
3599 IDE disk check, since Linux is known to support 20 IDE disks.
3600 Reported by Colin Watson.
3602 2007-12-15 Bean <bean123ch@gmail.com>
3604 * conf/i386-pc.rmk (pkgdata_IMAGES): Add lnxboot.img.
3605 (lnxboot_img_SOURCES): New variable.
3606 (lnxboot_img_ASFLAGS): Likewise.
3607 (lnxboot_img_LDFLAGS): Likewise.
3609 * boot/i386/pc/lnxboot.S: New file.
3611 2007-11-24 Pavel Roskin <proski@gnu.org>
3613 * configure.ac: Test if '--build-id=none' is supported by the
3614 linker. If yes, add it to TARGET_LDFLAGS. Build ID causes
3615 objcopy to generate incorrect binary files (binutils
3616 2.17.50.0.18-1 as shipped by Fedora 8).
3617 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Use LDFLAGS when
3618 linking, so that build ID doesn't break the test.
3620 2007-11-24 Pavel Roskin <proski@gnu.org>
3622 * include/grub/i386/time.h: use "void" in the argument list
3624 * include/grub/powerpc/time.h: Likewise.
3625 * include/grub/sparc64/time.h: Likewise.
3627 2007-11-18 Christian Franke <franke@computer.org>
3629 * util/console.c (grub_ncurses_getkey): Change curses KEY_* mapping,
3630 now return control chars instead of GRUB_CONSOLE_KEY_* constants.
3631 This fixes the problem that function keys did not work in grub-emu.
3633 2007-11-18 Christian Franke <franke@computer.org>
3635 * disk/host.c (grub_host_open): Remove attribute unused from
3636 name parameter. Add check for "host". This fixes the problem
3637 that grub-emu does not find partitions.
3639 2007-11-18 Christian Franke <franke@computer.org>
3641 * util/hostfs.c (is_dir): New function.
3642 (grub_hostfs_dir): Handle missing dirent.d_type case.
3643 (grub_hostfs_read): Add missing fseek().
3644 (grub_hostfs_label): Clear label pointer. This fixes a crash
3645 of grub-emu on "ls (host)".
3647 2007-11-18 Christian Franke <franke@computer.org>
3649 * include/grub/i386/pc/init.h (struct grub_machine_mmap_entry):
3650 Add attribute packed, gcc 3.4.4 on Cygwin aligns this
3651 to 64 bit boundary by default.
3653 2007-11-18 Bean <bean123ch@gmail.com>
3655 * conf/common.rmk (pkgdata_MODULES): Add hexdump.mod.
3656 (hexdump_mod_SOURCES): New variable.
3657 (hexdump_mod_CFLAGS): Likewise.
3658 (hexdump_mod_LDFLAGS): Likewise.
3660 * conf/i386-pc.rmk (grub_emu_SOURCES): Add command/hexdump.c.
3662 * conf/i386-efi.rmk (grub_emu_SOURCES): Add command/hexdump.c.
3664 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add command/hexdump.c.
3666 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add command/hexdump.c.
3668 * include/grub/hexdump.h: New file.
3670 * commands/hexdump.c: New file.
3672 2007-11-10 Robert Millan <rmh@aybabtu.com>
3674 * commands/i386/pc/play.c (beep_off): Switch order of arguments
3675 in grub_outb() calls.
3676 (beep_on): Likewise.
3678 2007-11-10 Christian Franke <franke@computer.org>
3680 * normal/menu.c (run_menu): Check for empty menu to avoid crash.
3681 (grub_menu_run): Likewise.
3683 2007-11-10 Robert Millan <rmh@aybabtu.com>
3685 * include/grub/i386/efi/machine.h: New file.
3686 * include/grub/i386/linuxbios/machine.h: Likewise.
3687 * include/grub/i386/pc/machine.h: Likewise.
3688 * include/grub/powerpc/ieee1275/machine.h: Likewise.
3689 * include/grub/sparc64/ieee1275/machine.h: Likewise.
3691 * term/i386/pc/serial.c: Include <grub/machine/machine.h>.
3692 (serial_hw_io_addr): New variable.
3693 (serial_hw_get_port): Obtain port address from `serial_hw_io_addr'
3694 instead of `(unsigned short *) 0x400'.
3696 2007-11-10 Bean <bean123ch@gmail.com>
3698 * fs/ntfs.c (read_block): Fix a bug caused by adjacent blocks.
3700 2007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
3702 * conf/i386-pc.rmk (pkgdata_MODULES): Added vga.mod.
3703 (vga_mod_SOURCES): Added.
3704 (vga_mod_CFLAGS): Likewise.
3705 (vga_mod_LDFLAGS): Likewise.
3707 * term/i386/pc/vga.c (get_map_mask): Switch order of arguments in
3709 (set_map_mask): Likewise.
3710 (set_read_map): Likewise.
3711 (set_read_address): Likewise.
3712 (vga_font): Removed variable.
3713 (get_vga_glyph): Removed function.
3714 (invalidate_char): Likewise.
3715 (write_char): Changed to use grub_font_get_glyph() for font
3717 (grub_vga_putchar): Likewise.
3718 (grub_vga_getcharwidth): Likewise.
3720 2007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
3722 * conf/i386-pc.rmk (boot_img_LDFLAGS): Use COMMON_LDFLAGS for target
3724 (pxeboot_img_LDFLAGS): Likewise.
3725 (diskboot_img_LDFLAGS): Likewise.
3726 (kernel_img_LDFLAGS): Likewise.
3728 2007-11-06 Robert Millan <rmh@aybabtu.com>
3730 * term/i386/pc/serial.c (serial_hw_put): Switch order of arguments
3731 in grub_outb() calls.
3732 (serial_hw_init): Likewise.
3734 2007-11-05 Robert Millan <rmh@aybabtu.com>
3736 * util/update-grub.in: Allow files in ${update_grub_dir} to contain
3737 spaces. Skip non-regular files.
3739 2007-11-05 Robert Millan <rmh@aybabtu.com>
3741 * kern/disk.c (grub_disk_firmware_fini)
3742 (grub_disk_firmware_is_tainted): New variables.
3744 * include/grub/disk.h (grub_disk_firmware_fini)
3745 (grub_disk_firmware_is_tainted): Likewise.
3747 * disk/i386/pc/biosdisk.c (GRUB_MOD_FINI(biosdisk)): Moved from here ...
3748 (grub_disk_biosdisk_fini): ... to here.
3749 (GRUB_MOD_FINI(biosdisk)): Implement using grub_disk_biosdisk_fini().
3750 (GRUB_MOD_INIT(biosdisk)): Abort when `grub_disk_firmware_is_tainted'
3751 is set. Register grub_disk_biosdisk_fini() in
3752 `grub_disk_firmware_fini'.
3754 * disk/ata.c: Remove `<grub/machine/biosdisk.h>'.
3755 (GRUB_MOD_INIT(ata)): Remove grub_biosdisk_fini() call.
3756 Use `grub_disk_firmware_is_tainted' and `grub_disk_firmware_fini'
3757 to finish existing firmware disk interface.
3759 * conf/i386-linuxbios.rmk (pkgdata_MODULES): Add `ata.mod'.
3760 (ata_mod_SOURCES): New variable.
3761 (ata_mod_CFLAGS): Likewise.
3762 (ata_mod_LDFLAGS): Likewise.
3764 2007-11-05 Robert Millan <rmh@aybabtu.com>
3766 * disk/ata.c: Remove `<grub/machine/time.h>'. Include `<grub/time.h>'.
3767 (grub_ata_wait): Reimplement using grub_millisleep().
3769 * include/grub/misc.h (grub_div_roundup): Fix parenthesization.
3770 * include/grub/i386/time.h (grub_cpu_idle): Disable `hlt' instruction.
3772 2007-11-03 Marco Gerards <marco@gnu.org>
3774 * term/i386/pc/vga_text.c: Include <grub/cpu/io.h>.
3775 (CRTC_ADDR_PORT): New macro.
3776 (CRTC_DATA_PORT): Likewise.
3777 (CRTC_CURSOR): Likewise.
3778 (CRTC_CURSOR_ADDR_HIGH): Likewise.
3779 (CRTC_CURSOR_ADDR_LOW): Likewise.
3780 (update_cursor): New function.
3781 (grub_console_real_putchar): Call `update_cursor'.
3782 (grub_console_gotoxy): Likewise.
3783 (grub_console_cls): Set the default color when clearing the
3785 (grub_console_setcursor): Implemented.
3787 2007-11-03 Marco Gerards <marco@gnu.org>
3789 * disk/ata.c (grub_ata_pio_read): Don't wait for the command to
3791 (grub_ata_pio_write): Likewise.
3793 (grub_atapi_identify): Wait after issuing an ATA command.
3794 (grub_atapi_packet): Likewise.
3795 (grub_ata_identify): Likewise.
3796 (grub_ata_readwrite): Likewise.
3798 2007-11-03 Marco Gerards <marco@gnu.org>
3800 * disk/ata.c (grub_ata_pio_read): Detect and return the error code.
3801 (grub_ata_pio_write): Likewise.
3802 (grub_ata_readwrite): Use `grub_error', instead of
3803 returning `grub_errno'.
3805 2007-11-03 Marco Gerards <marco@gnu.org>
3807 * disk/ata.c (grub_ata_readwrite): Call grub_ata_pio_read and
3808 grub_ata_pio_write once for every single sector, instead of for
3811 2007-10-31 Robert Millan <rmh@aybabtu.com>
3813 * configure.ac: Add `i386-linuxbios' to the list of supported targets.
3815 * conf/i386-linuxbios.rmk: New file.
3817 * kern/i386/pc/hardware.c: Likewise.
3818 * term/i386/pc/at_keyboard.c: Likewise.
3819 * term/i386/pc/vga_text.c: Likewise.
3821 * include/grub/i386/linuxbios/boot.h: Likewise.
3822 * include/grub/i386/linuxbios/console.h: Likewise.
3823 * include/grub/i386/linuxbios/init.h: Likewise.
3824 * include/grub/i386/linuxbios/kernel.h: Likewise.
3825 * include/grub/i386/linuxbios/loader.h: Likewise.
3826 * include/grub/i386/linuxbios/memory.h: Likewise.
3827 * include/grub/i386/linuxbios/serial.h: Likewise.
3828 * include/grub/i386/linuxbios/time.h: Likewise.
3830 * kern/i386/linuxbios/init.c: Likewise.
3831 * kern/i386/linuxbios/startup.S: Likewise.
3832 * kern/i386/linuxbios/table.c: Likewise.
3834 2007-10-31 Marco Gerards <marco@gnu.org>
3836 * conf/i386-pc.rmk (pkgdata_MODULES): Add `ata.mod'.
3837 (ata_mod_SOURCES): New variable.
3838 (ata_mod_CFLAGS): Likewise.
3839 (ata_mod_LDFLAGS): Likewise.
3841 * disk/ata.c: New file.
3843 * include/grub/disk.h (grub_disk_dev_id): Add
3844 `GRUB_DISK_DEV_ATA_ID'.
3846 2007-10-31 Robert Millan <rmh@aybabtu.com>
3848 * include/grub/i386/pc/init.h (grub_lower_mem): Moved from here ...
3849 * include/grub/i386/pc/memory.h (grub_lower_mem): ... to here.
3851 * include/grub/i386/pc/init.h (grub_upper_mem): Moved from here ...
3852 * include/grub/i386/pc/memory.h (grub_upper_mem): ... to here.
3854 * include/grub/i386/pc/memory.h: Include `<grub/symbol.h>' and
3857 * loader/i386/pc/multiboot.c: Include `<grub/machine/memory.h>'.
3859 2007-10-27 Robert Millan <rmh@aybabtu.com>
3861 * include/grub/types.h (ULONG_MAX): Define macro.
3863 2007-10-22 Robert Millan <rmh@aybabtu.com>
3865 * kern/i386/pc/startup.S: Remove `"kern/i386/realmode.S"'. Include
3867 Remove `"kern/i386/loader.S"'. Include `"../loader.S"'.
3869 2007-10-22 Robert Millan <rmh@aybabtu.com>
3871 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove `disk/i386/pc/biosdisk.c'.
3872 (pkgdata_MODULES): Add `biosdisk.mod'.
3873 (biosdisk_mod_SOURCES, biosdisk_mod_CFLAGS, biosdisk_mod_LDFLAGS): New
3876 * disk/i386/pc/biosdisk.c: Include `<grub/dl.h>'.
3877 (grub_biosdisk_init): Replace with ...
3878 (GRUB_MOD_INIT(biosdisk)): ... this.
3879 (grub_biosdisk_fini): Replace with ...
3880 (GRUB_MOD_FINI(biosdisk)): ... this.
3882 * kern/i386/pc/init.c: Remove `<grub/machine/biosdisk.h>'.
3883 (grub_machine_init): Remove call to grub_biosdisk_init().
3884 (grub_machine_fini): Remove call to grub_machine_fini().
3886 * util/i386/pc/grub-install.in (modules): Add `biosdisk'.
3888 2007-10-22 Robert Millan <rmh@aybabtu.com>
3890 * include/grub/time.h: New file.
3891 * include/grub/i386/time.h: Likewise.
3892 * include/grub/powerpc/time.h: Likewise.
3893 * include/grub/sparc64/time.h: Likewise.
3895 * include/grub/i386/pc/time.h (KERNEL_TIME_HEADER): Rename all
3897 (KERNEL_MACHINE_TIME_HEADER): ... this.
3898 * include/grub/powerpc/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
3900 (KERNEL_MACHINE_TIME_HEADER): ... this.
3901 * include/grub/sparc64/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
3903 (KERNEL_MACHINE_TIME_HEADER): ... this.
3905 * kern/i386/efi/init.c: Include `<grub/time.h>'.
3906 (grub_millisleep): New function.
3907 * kern/i386/pc/init.c: Include `<grub/time.h>'.
3908 (grub_millisleep): New function.
3909 * kern/powerpc/ieee1275/init.c: Include `<grub/time.h>'.
3910 Remove `grub/machine/time.h' include.
3911 (grub_millisleep): New function.
3912 * kern/sparc64/ieee1275/init.c: Include `<grub/time.h>'.
3913 Remove `grub/machine/time.h' include.
3914 (grub_millisleep): New function.
3916 * include/grub/misc.h (grub_div_roundup): New function.
3918 * kern/misc.c: Include `<grub/time.h>'.
3919 (grub_millisleep_generic): New function.
3921 * conf/i386-efi.rmk (kernel_mod_HEADERS): Remove `i386/efi/time.h'.
3923 * conf/i386-pc.rmk (kernel_img_HEADERS): Remove `machine/time.h'.
3925 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Remove
3926 `machine/time.h'. Add `time.h'.
3927 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
3929 2007-10-21 Robert Millan <rmh@aybabtu.com>
3931 * include/grub/misc.h (grub_max): New function.
3933 2007-10-21 Robert Millan <rmh@aybabtu.com>
3935 * util/misc.c (grub_util_info): Call fflush() before returning.
3937 2007-10-20 Robert Millan <rmh@aybabtu.com>
3939 * genmk.rb (Image): Copy `extra_flags' from here ...
3940 (PModule): ... to here. Use it in `#{obj}: #{src}' rule.
3942 * commands/i386/cpuid.c (grub_cmd_cpuid): Add __attribute__ ((unused))
3943 to `argc' and `args' arguments.
3945 2007-10-17 Robert Millan <rmh@aybabtu.com>
3947 * kern/i386/loader.S: New file.
3949 * kern/i386/pc/startup.S (grub_linux_prot_size): Moved from here ...
3950 * kern/i386/loader.S (grub_linux_prot_size)... to here.
3951 * kern/i386/pc/startup.S (grub_linux_tmp_addr): Moved from here ...
3952 * kern/i386/loader.S (grub_linux_tmp_addr)... to here.
3953 * kern/i386/pc/startup.S (grub_linux_real_addr): Moved from here ...
3954 * kern/i386/loader.S (grub_linux_real_addr)... to here.
3955 * kern/i386/pc/startup.S (grub_linux_boot_zimage): Moved from here ...
3956 * kern/i386/loader.S (grub_linux_boot_zimage)... to here.
3957 * kern/i386/pc/startup.S (grub_linux_boot_bzimage): Moved from here ...
3958 * kern/i386/loader.S (grub_linux_boot_bzimage)... to here.
3959 * kern/i386/pc/startup.S (grub_multiboot_real_boot): Moved from here ...
3960 * kern/i386/loader.S (grub_multiboot_real_boot)... to here.
3961 * kern/i386/pc/startup.S (grub_multiboot2_real_boot): Moved from here ...
3962 * kern/i386/loader.S (grub_multiboot2_real_boot)... to here.
3964 * kern/i386/realmode.S: New file.
3966 * kern/i386/pc/startup.S (protstack): Moved from here ...
3967 * kern/i386/realmode.S (protstack)... to here.
3968 * kern/i386/pc/startup.S (gdt): Moved from here ...
3969 * kern/i386/realmode.S (gdt)... to here.
3970 * kern/i386/pc/startup.S (prot_to_real): Moved from here ...
3971 * kern/i386/realmode.S (prot_to_real)... to here.
3973 * kern/i386/pc/startup.S: Include `kern/i386/loader.S' and
3974 `kern/i386/realmode.S'.
3976 2007-10-17 Robert Millan <rmh@aybabtu.com>
3978 * include/grub/i386/loader.h: New file.
3980 * include/grub/i386/pc/loader.h (grub_linux_prot_size)
3981 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
3982 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
3983 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
3984 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): Moved from here ...
3985 * include/grub/i386/loader.h (grub_linux_prot_size)
3986 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
3987 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
3988 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
3989 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): ... to here.
3991 * include/grub/i386/pc/loader.h: Include `grub/cpu/loader.h'.
3993 2007-10-15 Robert Millan <rmh@aybabtu.com>
3995 * normal/misc.c (grub_normal_print_device_info): Do not probe for
3996 filesystem when dev->disk is unset.
3997 Do probe for filesystem even when dev->disk->has_partitions is set.
3998 In case a filesystem is found, always report it.
3999 In case it isn't, if dev->disk->has_partitions is set, report that
4000 a partition table was found instead of reporting that no filesystem
4001 could be identified.
4003 2007-10-12 Robert Millan <rmh@aybabtu.com>
4005 * conf/powerpc-ieee1275.rmk (grub_mkimage_SOURCES): Replace reference
4006 to util/powerpc/ieee1275/grub-mkimage.c with util/elf/grub-mkimage.c.
4008 * include/grub/types.h (grub_host_to_target16): New macro.
4009 (grub_host_to_target32): Likewise.
4010 (grub_host_to_target64): Likewise.
4011 (grub_target_to_host16): Likewise.
4012 (grub_target_to_host32): Likewise.
4013 (grub_target_to_host64): Likewise.
4015 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
4017 (GRUB_MOD_ALIGN): ...this. Update all users.
4019 * util/elf/grub-mkimage.c (load_note): Replace grub_cpu_to_be32 with
4020 grub_host_to_target32.
4021 Replace grub_be_to_cpu32 with grub_target_to_host32.
4022 (load_modules): Likewise.
4023 (add_segments): Replace grub_be_to_cpu16 with grub_target_to_host16.
4024 Replace grub_be_to_cpu32 with grub_target_to_host32.
4025 Replace grub_cpu_to_be16 with grub_host_to_target16.
4026 Replace grub_cpu_to_be32 grub_host_to_target32.
4028 2007-10-12 Robert Millan <rmh@aybabtu.com>
4030 * util/powerpc/ieee1275/grub-mkimage.c: Moved to ...
4031 * util/elf/grub-mkimage.c: ... here.
4033 * DISTLIST: Add `util/elf/grub-mkimage.c'. Remove
4034 `util/powerpc/ieee1275/grub-mkimage.c'.
4036 2007-10-07 Robert Millan <rmh@aybabtu.com>
4038 * kern/powerpc/ieee1275/init.c: Rename HEAP_LIMIT to HEAP_MAX_ADDR,
4039 and make it easier to figure out.
4040 Add HEAP_MIN_SIZE and HEAP_MAX_ADDR definitions.
4041 (grub_claim_heap): Use HEAP_MAX_ADDR rather than taking a parameter.
4042 Do not avoid claiming a region above HEAP_MAX_ADDR if that would
4043 leave us with less than HEAP_MIN_SIZE total heap.
4044 Avoid our total amount of heap to surpass HEAP_MAX_SIZE.
4046 2007-10-03 Robert Millan <rmh@aybabtu.com>
4048 * include/grub/i386/io.h: New file.
4049 * commands/i386/pc/play.c (inb): Removed.
4051 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
4053 * term/i386/pc/serial.c (inb): Removed.
4055 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
4057 * term/i386/pc/vga.c (inb): Removed.
4059 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
4062 2007-10-02 Robert Millan <rmh@aybabtu.com>
4064 * conf/i386-efi.rmk (grub_emu_SOURCES): Add util/hostfs.c.
4065 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4066 Reported by Marcin Kurek.
4068 2007-09-07 Robert Millan <rmh@aybabtu.com>
4070 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_test_flag): Detect
4071 SmartFirmware version updates (as released by Sven Luther), and avoid
4072 setting GRUB_IEEE1275_FLAG_NO_PARTITION_0 or
4073 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS unless the running version is
4076 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
4079 * kern/i386/pc/init.c (compact_mem_regions): Decrease NUM_REGIONS
4080 when merging two regions.
4082 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
4084 * kern/rescue.c (grub_enter_rescue_mode): Free ARGS.
4085 * normal/completion.c (grub_normal_do_completion): Likewise.
4086 Reported by Hitoshi Ozeki.
4088 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
4090 Do not use devices at boot in chainloading.
4092 * loader/i386/pc/chainloader.c (boot_drive): New variable.
4093 (boot_part_addr): Likewise.
4094 (grub_chainloader_boot): Simply call grub_chainloader_real_boot
4095 with BOOT_DRIVE and BOOT_PART_ADDR.
4096 (grub_chainloader_cmd): Set BOOT_DRIVE and BOOT_PART_ADDR.
4097 Reported by Hitoshi Ozeki <h-ozeki@ck2.so-net.ne.jp>.
4099 2007-08-29 Robert Millan <rmh@aybabtu.com>
4101 Patch from Simon Peter <dn.tlp@gmx.net>:
4102 * genmk.rb (Utility): Append $(#{src}_DEPENDENCIES) to #{obj} targets.
4103 * conf/i386-pc.rmk: Replace grub-probe_DEPENDENCIES with
4104 util/grub-probe.c_DEPENDENCIES. Replace grub-setup_DEPENDENCIES with
4105 util/i386/pc/grub-setup.c_DEPENDENCIES.
4106 * conf/i386-efi.rmk: Replace grub-probe_DEPENDENCIES with
4107 util/grub-probe.c_DEPENDENCIES.
4108 * conf/powerpc-ieee1275.rmk: Likewise.
4110 2007-08-28 Robert Millan <rmh@aybabtu.com>
4112 * util/i386/get_disk_name.c: New. Implement grub_util_get_disk_name()
4113 to tell grub-mkdevicemap how to name devices.
4114 * util/ieee1275/get_disk_name.c: Likewise (using "ofpathname -a"
4117 * conf/i386-efi.rmk (grub_mkdevicemap_SOURCES): Add
4118 util/i386/get_disk_name.c.
4119 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Likewise.
4120 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Add
4121 util/ieee1275/get_disk_name.c.
4123 * include/grub/util/misc.h: grub_util_get_disk_name() declaration.
4125 * DISTLIST: Add util/i386/get_disk_name.c and
4126 util/ieee1275/get_disk_name.c.
4128 * util/grub-mkdevicemap.c: Replace device naming logic with
4129 grub_util_get_disk_name() calls.
4131 2007-08-20 Robert Millan <rmh@aybabtu.com>
4133 * normal/menu.c (run_menu): Refer to seconds as "s" not "seconds"
4134 (so that it works for both plural and singular quantities).
4136 2007-08-05 Robert Millan <rmh@aybabtu.com>
4138 * util/grub.d/10_linux.in (test_gt): Strip out vmlinu[xz]- prefix
4139 so that [xz] isn't taken into account when determining order.
4141 2007-08-02 Marco Gerards <marco@gnu.org>
4143 * DISTLIST: Add `disk/host.c', `fs/ntfs.c', `include/multiboot.h',
4144 `include/multiboot2.h', `include/grub/elfload.h',
4145 `include/multiboot.h', `include/grub/multiboot.h',
4146 `include/grub/multiboot_loader.h', `include/grub/multiboot2.h',
4147 `include/grub/i386/pc/biosdisk.h', `include/grub/util/biosdisk.h',
4148 `kern/elf.c', `loader/multiboot_loader.c',
4149 `loader/multiboot_loader_normal.c', `loader/multiboot2.c',
4150 `loader/i386/pc/multiboot2.c',
4151 `loader/powerpc/ieee1275/multiboot2.c', `util/hostfs.c' and
4152 `util/i386/pc/grub-mkrescue.in'. Remove
4153 `include/grub/biosdisk.h', `include/grub/i386/pc/multiboot.h',
4154 `include/grub/i386/pc/util/biosdisk.h' and
4155 `include/grub/powerpc/ieee1275/multiboot.h'.
4157 2007-08-02 Bean <bean123ch@gmail.com>
4159 * conf/common.rmk (pkgdata_MODULES): Add ntfs.mod.
4160 (ntfs_mod_SOURCES): New variable.
4161 (ntfs_mod_CFLAGS): Likewise.
4162 (ntfs_mod_LDFLAGS): Likewise.
4164 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfs.c.
4165 (grub_probe_SOURCES): Likewise.
4166 (grub_emu_SOURCES): Likewise.
4168 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
4169 (grub_emu_SOURCES): Likewise.
4171 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
4172 (grub_emu_SOURCES): Likewise.
4174 * conf/misc.c (grub_utf16_to_utf8): Fix unicode conversion bug.
4176 * fs/ntfs.c: New file.
4178 2007-08-02 Bean <bean123ch@gmail.com>
4180 * disk.h (grub_disk): Use NESTED_FUNC_ATTR.
4182 * file.h (grub_file): Likewise.
4184 * fshelp.h (grub_fshelp_read_file): Likewise.
4186 * util/i386/pc/grub-setup.c (setup): Likewise.
4187 (save_first_sector): Likewise.
4188 (save_blocklists): Likewise.
4190 * fs/affs.c (grub_affs_read_file): Likewise.
4192 * fs/ext2.c (grub_ext2_read_file): Likewise.
4194 * fs/fat.c (grub_fat_read_data): Likewise.
4196 * fs/fshelp.c (grub_fshelp_read_file): Likewise.
4198 * fs/hfs.c (grub_hfs_read_file): Likewise.
4200 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
4202 * fs/jfs.c (grub_jfs_read_file): Likewise.
4204 * fs/minix.c (grub_minix_read_file): Likewise.
4206 * fs/sfs.c (grub_sfs_read_file): Likewise.
4208 * fs/ufs.c (grub_ufs_read_file): Likewise.
4210 * fs/xfs.c (grub_xfs_read_file): Likewise.
4212 * command/blocklist.c (read_blocklist): Likewise.
4213 (print_blocklist): Likewise.
4215 2007-08-02 Marco Gerards <marco@gnu.org>
4217 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/host.c' and
4220 * disk/host.c: New file.
4222 * util/hostfs.c: Likewise.
4224 * fs/hfsplus.c (grub_hfsplus_mount): When reading out of disk,
4225 return `GRUB_ERR_BAD_FS'.
4226 * fs/sfs.c (grub_sfs_mount): Likewise.
4227 * fs/xfs.c (grub_xfs_mount): Likewise.
4229 * include/grub/disk.h (enum grub_disk_dev_id): Add
4230 `GRUB_DISK_DEVICE_HOST_ID'.
4232 * util/grub-emu.c (main): Initialize and de-initialize hostfs.
4234 2007-07-24 Jerone Young <jerone@gmail.com>
4236 * conf/i386-pc.rmk: Add Multiboot loader and multiboot 2 to multiboot
4237 modules for compilation.
4238 * conf/powerpc-ieee1275.rmk: Likewise.
4240 * include/multiboot.h: Move multiboot definitions to one file. Rename
4241 many definitions to not get grub specific.
4242 * include/multiboot2.h: Create header with multiboot 2 definitions.
4243 * include/grub/multiboot.h: Header for grub specific function
4244 prototypes and definitions.
4245 * include/grub/multiboot2.h: Likewise.
4246 * include/grub/multiboot_loader.h: Likewise.
4247 * include/grub/i386/pc/multiboot.h: Removed.
4248 * include/grub/powerpc/ieee1275/multiboot.h: Removed.
4250 * loader/multiboot_loader.c: Created to act as a proxy for multiboot 1
4251 and 2 to allow for one multiboot and module commands.
4252 * loader/multiboot2.c: Add multiboot2 functionality.
4253 * loader/i386/pc/multiboot.c: Modify for new multiboot header location
4254 and definition names.
4255 * loader/i386/pc/multiboot2.c: Created to add i386 specific multiboot
4257 * loader/powerpc/ieee1275/multiboot2.c: Created to add powerpc
4258 ieee1275 specific multiboot2 code.
4260 * kern/i386/pc/startup.S: Change headers and definition names for
4261 multiboot. Add function grub_multiboot2_real_boot for multiboot 2.
4263 2007-07-22 Robert Millan <rmh@aybabtu.com>
4265 * geninitheader.sh: Process file specified in first parameter rather
4266 than hardcoding grub_modules_init.lst.
4267 * geninit.sh: Likewise. Also, construct header name dynamically rather
4268 than hardcoding grub_modules_init.h.
4270 * conf/common.rmk: Rename grub_modules_init.[ch] files associated with
4271 grub-emu to grub_emu_init.[ch]. Add rules to build analogous
4272 grub_probe_init.[ch] and grub_setup_init.[ch].
4274 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Replace
4275 grub_modules_init.h with grub_emu_init.h.
4276 (grub_probe_DEPENDENCIES, grub_probe_SOURCES): Add new
4277 grub_probe_init.[ch] files.
4278 * conf/i386-efi.rmk: Likewise.
4279 * conf/i386-pc.rmk: Likewise.
4280 (grub_setup_DEPENDENCIES, grub_setup_SOURCES): Add new
4281 grub_setup_init.[ch] files.
4283 * util/grub-emu.c: Replace grub_modules_init.h with grub_emu_init.h.
4284 * util/grub-probe.c: Include grub_probe_init.h. Use grub_init_all()
4285 to initialize modules rather than a list of hardcoded functions.
4286 * util/i386/pc/grub-setup.c: Include grub_setup_init.h. Use
4287 grub_init_all() to initialize modules rather than a list of hardcoded
4290 2007-07-22 Robert Millan <rmh@aybabtu.com>
4292 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set
4293 GRUB_IEEE1275_FLAG_NO_PARTITION_0 flag when running on SmartFirmware.
4295 2007-07-22 Robert Millan <rmh@aybabtu.com>
4297 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
4298 GRUB_IEEE1275_FLAG_BROKEN_OUTPUT flag.
4299 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set this
4300 flag when running on SmartFirmware.
4301 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid running
4302 "output-device output" command when GRUB_IEEE1275_FLAG_BROKEN_OUTPUT
4305 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
4306 Increase partno when GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS flag is set,
4307 rather than decreasing it.
4309 * util/i386/pc/grub-setup.c (setup): When embedding is required, but
4310 there's not enough space to do it, fail in the same way as when it
4311 can't be done because there are no partitions.
4313 * util/powerpc/ieee1275/grub-install.in: Improve error message shown
4314 when nvsetenv failed.
4316 2007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
4318 * conf/i386-pc.rmk (CLEANFILES): Removed for grub-mkrescue,
4319 because this rule is automatically generated.
4320 (grub-mkrescue): Removed for the same reason as above.
4322 2007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
4324 Migrate to GNU General Public License Version 3.
4326 * COPYING: Replaced with the plain text version of GPLv3.
4328 * config.guess: Updated from gnulib.
4329 * config.sub: Likewise.
4331 * geninit.sh: Output a GPLv3 copyright notice.
4332 * geninitheader.sh: Likewise.
4333 * genmodsrc.sh: Likewise.
4334 * gensymlist.sh.in: Likewise.
4336 * boot/i386/pc/boot.S: Upgraded to GPLv3.
4337 * boot/i386/pc/diskboot.S: Likewise.
4338 * boot/i386/pc/pxeboot.S: Likewise.
4339 * commands/blocklist.c: Likewise.
4340 * commands/boot.c: Likewise.
4341 * commands/cat.c: Likewise.
4342 * commands/cmp.c: Likewise.
4343 * commands/configfile.c: Likewise.
4344 * commands/echo.c: Likewise.
4345 * commands/help.c: Likewise.
4346 * commands/ls.c: Likewise.
4347 * commands/search.c: Likewise.
4348 * commands/terminal.c: Likewise.
4349 * commands/test.c: Likewise.
4350 * commands/videotest.c: Likewise.
4351 * commands/i386/cpuid.c: Likewise.
4352 * commands/i386/pc/halt.c: Likewise.
4353 * commands/i386/pc/play.c: Likewise.
4354 * commands/i386/pc/reboot.c: Likewise.
4355 * commands/i386/pc/vbeinfo.c: Likewise.
4356 * commands/i386/pc/vbetest.c: Likewise.
4357 * commands/ieee1275/halt.c: Likewise.
4358 * commands/ieee1275/reboot.c: Likewise.
4359 * commands/ieee1275/suspend.c: Likewise.
4360 * disk/loopback.c: Likewise.
4361 * disk/lvm.c: Likewise.
4362 * disk/raid.c: Likewise.
4363 * disk/efi/efidisk.c: Likewise.
4364 * disk/i386/pc/biosdisk.c: Likewise.
4365 * disk/ieee1275/ofdisk.c: Likewise.
4366 * font/manager.c: Likewise.
4367 * fs/affs.c: Likewise.
4368 * fs/ext2.c: Likewise.
4369 * fs/fat.c: Likewise.
4370 * fs/fshelp.c: Likewise.
4371 * fs/hfs.c: Likewise.
4372 * fs/hfsplus.c: Likewise.
4373 * fs/iso9660.c: Likewise.
4374 * fs/jfs.c: Likewise.
4375 * fs/minix.c: Likewise.
4376 * fs/sfs.c: Likewise.
4377 * fs/ufs.c: Likewise.
4378 * fs/xfs.c: Likewise.
4379 * hello/hello.c: Likewise.
4380 * include/grub/acorn_filecore.h: Likewise.
4381 * include/grub/arg.h: Likewise.
4382 * include/grub/bitmap.h: Likewise.
4383 * include/grub/boot.h: Likewise.
4384 * include/grub/cache.h: Likewise.
4385 * include/grub/device.h: Likewise.
4386 * include/grub/disk.h: Likewise.
4387 * include/grub/dl.h: Likewise.
4388 * include/grub/elfload.h: Likewise.
4389 * include/grub/env.h: Likewise.
4390 * include/grub/err.h: Likewise.
4391 * include/grub/file.h: Likewise.
4392 * include/grub/font.h: Likewise.
4393 * include/grub/fs.h: Likewise.
4394 * include/grub/fshelp.h: Likewise.
4395 * include/grub/gzio.h: Likewise.
4396 * include/grub/hfs.h: Likewise.
4397 * include/grub/kernel.h: Likewise.
4398 * include/grub/loader.h: Likewise.
4399 * include/grub/lvm.h: Likewise.
4400 * include/grub/misc.h: Likewise.
4401 * include/grub/mm.h: Likewise.
4402 * include/grub/net.h: Likewise.
4403 * include/grub/normal.h: Likewise.
4404 * include/grub/parser.h: Likewise.
4405 * include/grub/partition.h: Likewise.
4406 * include/grub/pc_partition.h: Likewise.
4407 * include/grub/raid.h: Likewise.
4408 * include/grub/rescue.h: Likewise.
4409 * include/grub/script.h: Likewise.
4410 * include/grub/setjmp.h: Likewise.
4411 * include/grub/symbol.h: Likewise.
4412 * include/grub/term.h: Likewise.
4413 * include/grub/terminfo.h: Likewise.
4414 * include/grub/tparm.h: Likewise.
4415 * include/grub/types.h: Likewise.
4416 * include/grub/video.h: Likewise.
4417 * include/grub/efi/api.h: Likewise.
4418 * include/grub/efi/chainloader.h: Likewise.
4419 * include/grub/efi/console.h: Likewise.
4420 * include/grub/efi/console_control.h: Likewise.
4421 * include/grub/efi/disk.h: Likewise.
4422 * include/grub/efi/efi.h: Likewise.
4423 * include/grub/efi/pe32.h: Likewise.
4424 * include/grub/efi/time.h: Likewise.
4425 * include/grub/i386/linux.h: Likewise.
4426 * include/grub/i386/setjmp.h: Likewise.
4427 * include/grub/i386/types.h: Likewise.
4428 * include/grub/i386/efi/kernel.h: Likewise.
4429 * include/grub/i386/efi/loader.h: Likewise.
4430 * include/grub/i386/efi/time.h: Likewise.
4431 * include/grub/i386/pc/biosdisk.h: Likewise.
4432 * include/grub/i386/pc/boot.h: Likewise.
4433 * include/grub/i386/pc/chainloader.h: Likewise.
4434 * include/grub/i386/pc/console.h: Likewise.
4435 * include/grub/i386/pc/init.h: Likewise.
4436 * include/grub/i386/pc/kernel.h: Likewise.
4437 * include/grub/i386/pc/loader.h: Likewise.
4438 * include/grub/i386/pc/memory.h: Likewise.
4439 * include/grub/i386/pc/multiboot.h: Likewise.
4440 * include/grub/i386/pc/serial.h: Likewise.
4441 * include/grub/i386/pc/time.h: Likewise.
4442 * include/grub/i386/pc/vbe.h: Likewise.
4443 * include/grub/i386/pc/vbeblit.h: Likewise.
4444 * include/grub/i386/pc/vbefill.h: Likewise.
4445 * include/grub/i386/pc/vbeutil.h: Likewise.
4446 * include/grub/i386/pc/vga.h: Likewise.
4447 * include/grub/ieee1275/ieee1275.h: Likewise.
4448 * include/grub/ieee1275/ofdisk.h: Likewise.
4449 * include/grub/powerpc/libgcc.h: Likewise.
4450 * include/grub/powerpc/setjmp.h: Likewise.
4451 * include/grub/powerpc/types.h: Likewise.
4452 * include/grub/powerpc/ieee1275/biosdisk.h: Likewise.
4453 * include/grub/powerpc/ieee1275/console.h: Likewise.
4454 * include/grub/powerpc/ieee1275/ieee1275.h: Likewise.
4455 * include/grub/powerpc/ieee1275/kernel.h: Likewise.
4456 * include/grub/powerpc/ieee1275/loader.h: Likewise.
4457 * include/grub/powerpc/ieee1275/multiboot.h: Likewise.
4458 * include/grub/powerpc/ieee1275/time.h: Likewise.
4459 * include/grub/powerpc/ieee1275/util/biosdisk.h: Likewise.
4460 * include/grub/sparc64/libgcc.h: Likewise.
4461 * include/grub/sparc64/setjmp.h: Likewise.
4462 * include/grub/sparc64/types.h: Likewise.
4463 * include/grub/sparc64/ieee1275/console.h: Likewise.
4464 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
4465 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
4466 * include/grub/sparc64/ieee1275/time.h: Likewise.
4467 * include/grub/util/biosdisk.h: Likewise.
4468 * include/grub/util/getroot.h: Likewise.
4469 * include/grub/util/lvm.h: Likewise.
4470 * include/grub/util/misc.h: Likewise.
4471 * include/grub/util/raid.h: Likewise.
4472 * include/grub/util/resolve.h: Likewise.
4473 * io/gzio.c: Likewise.
4474 * kern/device.c: Likewise.
4475 * kern/disk.c: Likewise.
4476 * kern/dl.c: Likewise.
4477 * kern/elf.c: Likewise.
4478 * kern/env.c: Likewise.
4479 * kern/err.c: Likewise.
4480 * kern/file.c: Likewise.
4481 * kern/fs.c: Likewise.
4482 * kern/loader.c: Likewise.
4483 * kern/main.c: Likewise.
4484 * kern/misc.c: Likewise.
4485 * kern/mm.c: Likewise.
4486 * kern/parser.c: Likewise.
4487 * kern/partition.c: Likewise.
4488 * kern/rescue.c: Likewise.
4489 * kern/term.c: Likewise.
4490 * kern/efi/efi.c: Likewise.
4491 * kern/efi/init.c: Likewise.
4492 * kern/efi/mm.c: Likewise.
4493 * kern/i386/dl.c: Likewise.
4494 * kern/i386/efi/init.c: Likewise.
4495 * kern/i386/efi/startup.S: Likewise.
4496 * kern/i386/pc/init.c: Likewise.
4497 * kern/i386/pc/lzo1x.S: Likewise.
4498 * kern/i386/pc/startup.S: Likewise.
4499 * kern/ieee1275/ieee1275.c: Likewise.
4500 * kern/powerpc/cache.S: Likewise.
4501 * kern/powerpc/dl.c: Likewise.
4502 * kern/powerpc/ieee1275/cmain.c: Likewise.
4503 * kern/powerpc/ieee1275/crt0.S: Likewise.
4504 * kern/powerpc/ieee1275/init.c: Likewise.
4505 * kern/powerpc/ieee1275/openfw.c: Likewise.
4506 * kern/sparc64/cache.S: Likewise.
4507 * kern/sparc64/dl.c: Likewise.
4508 * kern/sparc64/ieee1275/init.c: Likewise.
4509 * kern/sparc64/ieee1275/openfw.c: Likewise.
4510 * loader/efi/chainloader.c: Likewise.
4511 * loader/efi/chainloader_normal.c: Likewise.
4512 * loader/i386/efi/linux.c: Likewise.
4513 * loader/i386/efi/linux_normal.c: Likewise.
4514 * loader/i386/pc/chainloader.c: Likewise.
4515 * loader/i386/pc/chainloader_normal.c: Likewise.
4516 * loader/i386/pc/linux.c: Likewise.
4517 * loader/i386/pc/linux_normal.c: Likewise.
4518 * loader/i386/pc/multiboot.c: Likewise.
4519 * loader/i386/pc/multiboot_normal.c: Likewise.
4520 * loader/powerpc/ieee1275/linux.c: Likewise.
4521 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
4522 * normal/arg.c: Likewise.
4523 * normal/cmdline.c: Likewise.
4524 * normal/command.c: Likewise.
4525 * normal/completion.c: Likewise.
4526 * normal/execute.c: Likewise.
4527 * normal/function.c: Likewise.
4528 * normal/lexer.c: Likewise.
4529 * normal/main.c: Likewise.
4530 * normal/menu.c: Likewise.
4531 * normal/menu_entry.c: Likewise.
4532 * normal/misc.c: Likewise.
4533 * normal/parser.y: Likewise.
4534 * normal/script.c: Likewise.
4535 * normal/i386/setjmp.S: Likewise.
4536 * normal/powerpc/setjmp.S: Likewise.
4537 * normal/sparc64/setjmp.S: Likewise.
4538 * partmap/acorn.c: Likewise.
4539 * partmap/amiga.c: Likewise.
4540 * partmap/apple.c: Likewise.
4541 * partmap/gpt.c: Likewise.
4542 * partmap/pc.c: Likewise.
4543 * partmap/sun.c: Likewise.
4544 * term/gfxterm.c: Likewise.
4545 * term/terminfo.c: Likewise.
4546 * term/efi/console.c: Likewise.
4547 * term/i386/pc/console.c: Likewise.
4548 * term/i386/pc/serial.c: Likewise.
4549 * term/i386/pc/vesafb.c: Likewise.
4550 * term/i386/pc/vga.c: Likewise.
4551 * term/ieee1275/ofconsole.c: Likewise.
4552 * util/biosdisk.c: Likewise.
4553 * util/console.c: Likewise.
4554 * util/genmoddep.c: Likewise.
4555 * util/getroot.c: Likewise.
4556 * util/grub-emu.c: Likewise.
4557 * util/grub-mkdevicemap.c: Likewise.
4558 * util/grub-probe.c: Likewise.
4559 * util/lvm.c: Likewise.
4560 * util/misc.c: Likewise.
4561 * util/raid.c: Likewise.
4562 * util/resolve.c: Likewise.
4563 * util/update-grub.in: Likewise.
4564 * util/update-grub_lib.in: Likewise.
4565 * util/grub.d/00_header.in: Likewise.
4566 * util/grub.d/10_hurd.in: Likewise.
4567 * util/grub.d/10_linux.in: Likewise.
4568 * util/i386/efi/grub-install.in: Likewise.
4569 * util/i386/efi/grub-mkimage.c: Likewise.
4570 * util/i386/pc/grub-install.in: Likewise.
4571 * util/i386/pc/grub-mkimage.c: Likewise.
4572 * util/i386/pc/grub-mkrescue.in: Likewise.
4573 * util/i386/pc/grub-setup.c: Likewise.
4574 * util/i386/pc/misc.c: Likewise.
4575 * util/powerpc/ieee1275/grub-install.in: Likewise.
4576 * util/powerpc/ieee1275/grub-mkimage.c: Likewise.
4577 * util/powerpc/ieee1275/misc.c: Likewise.
4578 * video/bitmap.c: Likewise.
4579 * video/video.c: Likewise.
4580 * video/i386/pc/vbe.c: Likewise.
4581 * video/i386/pc/vbeblit.c: Likewise.
4582 * video/i386/pc/vbefill.c: Likewise.
4583 * video/i386/pc/vbeutil.c: Likewise.
4584 * video/readers/tga.c: Likewise.
4586 2007-07-02 Robert Millan <rmh@aybabtu.com>
4588 * conf/i386-efi.rmk: Replace obsolete reference to
4589 util/i386/pc/biosdisk.c with util/biosdisk.c, and util/i386/pc/getroot.c
4590 with util/getroot.c.
4591 * conf/powerpc-ieee1275.rmk: Likewise.
4592 * conf/sparc64-ieee1275.rmk: Likewise.
4594 * util/grub-emu.c (main): Fix unchecked pointer handling.
4596 2007-07-02 Robert Millan <rmh@aybabtu.com>
4598 * util/i386/efi/grub-install.in: Allow `grub_probe --target=partmap'
4599 invocation to fail, in order to support partition-less media.
4601 * util/i386/pc/grub-install.in: Likewise.
4603 * util/powerpc/ieee1275/grub-install.in: Use grub-probe to determine
4604 which fs or partmap modules are needed (akin to its sister scripts).
4606 Also use grub-probe to get rid of unportable /proc/mounts check.
4608 Print the same informational message that the other scripts do, before
4611 2007-06-23 Robert Millan <rmh@aybabtu.com>
4613 * util/update-grub_lib.in (font_path): New function. Determine whether
4614 a font file can be found and, if so, echo the GRUB path to it.
4616 * util/update-grub.in: Handle multiple terminals depending on user
4617 input, platform availability and font file presence. Propagate
4618 variables of our findings to /etc/grub.d/ children.
4620 * util/grub.d/00_header.in: Handle multiple terminals, based on
4621 environment setup by update-grub.
4623 2007-06-23 Robert Millan <rmh@aybabtu.com>
4625 * conf/i386-pc.rmk (pkgdata_MODULES): Add serial.mod.
4627 2007-06-21 Robert Millan <rmh@aybabtu.com>
4629 * include/grub/i386/pc/kernel.h: Define GRUB_KERNEL_MACHINE_DATA_END to
4630 indicate end of data section in kernel image.
4631 * include/grub/i386/efi/kernel.h: Define GRUB_KERNEL_MACHINE_PREFIX and
4632 GRUB_KERNEL_MACHINE_DATA_END.
4634 * kern/i386/pc/startup.S: Do not initialize grub_prefix, only reserve
4636 * kern/i386/efi/startup.S: Likewise.
4638 * util/i386/pc/grub-mkimage.c: Initialize grub_prefix to /boot/grub
4639 during image generation. Implement --prefix option to override this
4641 * util/i386/efi/grub-mkimage.c: Likewise.
4643 * util/update-grub_lib.in (convert_system_path_to_grub_path): Split
4644 code to make path relative to its root into a separate function.
4646 * util/i386/pc/grub-install.in: Use newly provided
4647 make_system_path_relative_to_its_root() to convert ${grubdir}, then
4648 pass the result to grub-install --prefix.
4650 2007-06-13 Robert Millan <rmh@aybabtu.com>
4652 * include/grub/util/misc.h: Define DEFAULT_DIRECTORY and
4654 * util/grub-emu.c: Use above definitions from misc.h instead of
4656 * util/grub-mkdevicemap.c: Likewise.
4657 * util/i386/pc/grub-setup.c: Likewise.
4658 * util/grub-probe.c: Likewise.
4659 (probe): Abort with grub_util_error() when either
4660 grub_guess_root_device or grub_util_get_grub_dev fails.
4662 2007-06-12 Robert Millan <rmh@aybabtu.com>
4664 * normal/command.c (grub_command_execute): Use NULL rather than 0 for
4666 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Likewise for
4668 * util/grub-probe.c (probe): Likewise for "drive_name".
4670 2007-06-11 Robert Millan <rmh@aybabtu.com>
4672 * util/i386/pc/grub-mkrescue.in: Pad both floppy images with zeroes,
4673 not just the cdrom one.
4675 2007-06-11 Robert Millan <rmh@aybabtu.com>
4677 * util/i386/pc/grub-mkrescue.in: Add "set -e".
4678 Add --pkglibdir=DIR option to override pkglibdir.
4679 Mention --image-type=TYPE in help output.
4680 Fix --grub-mkimage (it was a no-op).
4681 Abort gracefully when no parameter is given.
4683 2007-06-11 Robert Millan <rmh@aybabtu.com>
4685 * util/i386/pc/grub-mkrescue.in: New file.
4686 * conf/i386-pc.rmk: Add its build declarations. Put it in bin_SCRIPTS.
4687 * Makefile.in: Handle bin_SCRIPTS.
4689 2007-06-10 Vesa Jaaskelainen <chaac@nic.fi>
4691 * term/gfxterm.c (grub_gfxterm_init): Added support for specifying
4692 list of video modes.
4694 2007-06-06 Robert Millan <rmh@aybabtu.com>
4696 * util/update-grub_lib.in (convert_system_path_to_grub_path): Abort if
4697 file doesn't exist, or if it is in a filesystem grub can't read.
4699 * util/update-grub.in: Set fallback for GRUB_FS check to "unknown". Do
4700 not abort if GRUB_DRIVE could not be defined. Rearrange generated
4701 header comment to fit in 80 columns when the variables are resolved.
4703 * util/grub.d/00_header.in: Only set root variable when GRUB_DRIVE
4704 could be identified by update-grub. Remove redundant check for
4705 unifont.pff existence (since convert_system_path_to_grub_path now
4708 2007-06-04 Robert Millan <rmh@aybabtu.com>
4710 * conf/i386-efi.rmk (grub_probe_SOURCES): Add partmap/apple.c.
4712 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.
4714 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add partmap/pc.c.
4716 2007-06-04 Robert Millan <rmh@aybabtu.com>
4718 * conf/powerpc-ieee1275.rmk: Enable grub-mkdevicemap and grub-probe.
4720 * include/grub/partition.h: Declare grub_apple_partition_map_init and
4721 grub_apple_partition_map_fini.
4724 (grub_util_biosdisk_open): Replace BLKGETSIZE with BLKGETSIZE64 (needed
4725 to access >2 TiB disks).
4727 Print disk->total_sectors with %llu instead of %lu, since this
4728 variable is always 64-bit (prevents wrong disk size from being displayed
4729 on either >2 TiB disk or big-endian CPU).
4731 (grub_util_biosdisk_get_grub_dev): Convert gpt_partition_map handling
4732 into a generic case that supports all (sane) partition maps.
4734 Stop using grub_cpu_to_le32() on dos_part / bsd_part since it actually
4737 * util/grub-probe.c: Call grub_apple_partition_map_init() before probe()
4738 and grub_apple_partition_map_fini() after that.
4740 2007-06-01 Robert Millan <rmh@aybabtu.com>
4742 * util/update-grub.in: Export GRUB_CMDLINE_LINUX.
4744 * util/grub.d/00_header.in: Only enable gfxterm when
4745 convert_system_path_to_grub_path() succeeds.
4747 2007-05-20 Robert Millan <rmh@aybabtu.com>
4749 * util/update-grub_lib.in: New file.
4750 * DISTLIST: Add update-grub_lib.in.
4751 * conf/common.rmk: Generate update-grub_lib and install it in
4753 * Makefile.in: Add install routine for $(lib_DATA).
4755 * util/grub.d/00_header.in: Use convert_system_path_to_grub_path()
4756 function provided by update-grub_lib to support arbitrary paths of
4758 * util/update-grub.in: Use convert_system_path_to_grub_path() to
4759 initialize GRUB_DRIVE_BOOT and GRUB_DRIVE_BOOT_GRUB variables.
4761 2007-05-19 Robert Millan <rmh@aybabtu.com>
4763 * commands/i386/cpuid.c: New module.
4765 * conf/i386-efi.rmk: Enable cpuid.mod.
4766 * conf/i386-pc.rmk: Likewise.
4768 2007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
4770 * kern/disk.c (grub_disk_read): Check return value of
4773 2007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
4775 * util/getroot.c (grub_util_get_grub_dev): Support partitionable
4777 * disk/raid.c (grub_raid_open): Likewise.
4779 2007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
4781 * util/biosdisk.c (linux_find_partition): Allocate real_dev on the
4782 stack instead of on the heap.
4784 * kern/disk.c (grub_disk_read): Make sure tmp_buf is big enough
4785 before doing a read on it.
4787 * configure.ac: Only use -fno-stack-protector for the target
4790 2007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
4792 * video/i386/pc/vbe.c (grub_video_vbe_create_render_target): Add
4793 __attribute_ ((unused)) to mode_type argument.
4795 * util/getroot.c (grub_guess_root_device): Fix #endif.
4797 * kern/misc.c (memcmp): Fix prototype.
4799 * include/grub/partition.h [GRUB_UTIL]
4800 (grub_gpt_partition_map_init): Add prototype.
4801 (grub_gpt_partition_map_fini): Likewise.
4803 * fs/jfs.c (struct grub_jfs_inode): Put __attribute__ ((packed)
4806 * fs/fat.c (grub_fat_mount): Replace ~0UL with ~0U.
4807 (grub_fat_read_data): Likewise.
4808 (grub_fat_find_dir): Likewise.
4810 * font/manager.c (find_glyph): Make table a const.
4811 (grub_font_get_glyph): Remove bitmap from if statement.
4813 2007-05-16 Jeroen Dekkers <jeroen@dekkers.cx>
4815 * util/getroot.c (grub_guess_root_device): Remove RAID and LVM
4816 code, first search for device in /dev/mapper, then in /dev.
4817 (grub_util_get_grub_dev): New function.
4818 * include/grub/util/getroot.h (grub_util_get_grub_dev): Add
4820 * util/grub-probe.c (probe): Remove check for RAID, call
4821 grub_util_get_grub_dev() instead of
4822 grub_util_biosdisk_get_grub_dev().
4823 * util/grub-emu.c (main): Call grub_util_get_grub_dev() instead of
4824 grub_util_biosdisk_get_grub_dev().
4825 * util/i386/pc/grub-setup.c (main): Likewise.
4827 2007-05-16 Robert Millan <rmh@aybabtu.com>
4829 * DISTLIST: Update for the latest changes.
4830 * conf/i386-pc.rmk: Use the new paths for util/getroot.c,
4831 util/grub-mkdevicemap.c, util/grub-probe.c and util/biosdisk.c.
4832 * util/grub-emu.c: Replace grub/i386/pc/util/biosdisk.h with
4833 grub/util/biosdisk.h.
4834 * util/i386/pc/grub-setup.c: Replace grub/machine/util/biosdisk.h with
4835 grub/util/biosdisk.h.
4837 2007-05-16 Robert Millan <rmh@aybabtu.com>
4839 * util/grub.d/00_header.in: Set default gfxmode to `640x480'.
4841 2007-05-16 Robert Millan <rmh@aybabtu.com>
4843 * util/i386/efi/grub-install.in: New.
4844 * conf/i386-efi.rmk: Enable grub-mkdevicemap, grub-probe and the
4845 newly added grub-install.
4846 * util/biosdisk.c: Remove unnecessary grub/machine/biosdisk.h
4848 * util/getroot.c: Replace grub/i386/pc/util/biosdisk.h with
4849 grub/util/biosdisk.h.
4850 * util/grub-probe.c: Replace grub/machine/util/biosdisk.h with
4851 grub/util/biosdisk.h.
4853 2007-05-16 Robert Millan <rmh@aybabtu.com>
4855 * include/grub/i386/pc/util/biosdisk.h: Moved to ...
4856 * include/grub/util/biosdisk.h: ... here.
4857 * util/i386/pc/biosdisk.c: Moved to ...
4858 * util/biosdisk.c: ... here.
4859 * util/i386/pc/getroot.c: Moved to ...
4860 * util/getroot.c: ... here.
4861 * util/i386/pc/grub-mkdevicemap.c: Moved to ...
4862 * util/grub-mkdevicemap.c: ... here.
4863 * util/i386/pc/grub-probe.c: Moved to ...
4864 * util/grub-probe.c: ... here.
4866 2007-05-15 Robert Millan <rmh@aybabtu.com>
4868 * util/update-grub.in: Remove duplicated line in grub.cfg header
4871 2007-05-13 Robert Millan <rmh@aybabtu.com>
4873 * util/update-grub.in: Fix a few assumptions about the devices holding
4874 /, /boot and /boot/grub being the same.
4875 * util/grub.d/00_header.in: Likewise.
4876 * util/grub.d/10_hurd.in: Likewise.
4877 * util/grub.d/10_linux.in: Likewise.
4879 * util/grub.d/10_linux.in: Implement Linux image sorting with arbitrary
4880 patterns. Use that to define the `.old' suffix as older than `'.
4882 * util/grub.d/00_header.in: Set default gfxmode to `800x600x16'.
4884 * util/update-grub.in: Add a reference to ${sysconfdir}/default/grub in
4885 the grub.cfg header message.
4887 2007-05-11 Robert Millan <rmh@aybabtu.com>
4889 * util/update-grub.in: Create device.map if it doesn't already exist,
4890 before attempting to run grub-probe.
4891 Check for grub-probe and grub-mkdevicemap with the same code
4892 grub-install is using.
4895 2007-05-09 Jeroen Dekkers <jeroen@dekkers.cx>
4897 * Makefile.in: Add the datarootdir autoconf variable.
4899 2007-05-09 Robert Millan <rmh@aybabtu.com>
4901 * util/i386/pc/grub-probe.c (probe): When detecting partition map,
4902 fail gracefully if dev->disk->partition == NULL.
4904 2007-05-07 Robert Millan <rmh@aybabtu.com>
4906 * util/i386/pc/grub-probe.c: Add `grub-probe -t partmap' parameter to
4907 determine partition map module.
4908 * util/i386/pc/grub-install.in: Use this feature to decide which
4909 partition module to load, instead of hardcoding pc and gpt.
4911 2007-05-07 Robert Millan <rmh@aybabtu.com>
4913 * Makefile.in: Fix assumption that $(srcdir) has a trailing slash when
4914 source directory differs from build directory.
4916 2007-05-05 Robert Millan <rmh@aybabtu.com>
4918 * util/powerpc/ieee1275/grub-install.in: Fix syntax error in pkglibdir
4921 2007-05-05 Robert Millan <rmh@aybabtu.com>
4923 * util/update-grub.in: Create ${grub_prefix} if it doesn't exist.
4925 2007-05-05 Robert Millan <rmh@aybabtu.com>
4927 * util/grub.d/10_linux.in: Allow the administrator to insert Linux
4928 command-line arguments via ${GRUB_CMDLINE_LINUX}.
4930 2007-05-05 Robert Millan <rmh@aybabtu.com>
4932 * conf/i386-pc.rmk (grub_setup_SOURCES): Add partmap/gpt.c.
4933 (grub_probe_SOURCES): Likewise.
4934 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): Detect
4935 GPT and initialize dos_part and bsd_part accordingly.
4936 * util/i386/pc/grub-setup.c (setup): Ditto for install_dos_part and
4938 (main): Activate gpt module for use during partition identification,
4939 and deactivate it afterwards.
4940 * util/i386/pc/grub-install.in: Add gpt module to core.img.
4941 * util/i386/pc/grub-probe.c (main): Activate gpt module for use during
4942 partition identification, and deactivate it afterwards.
4944 2007-05-05 Robert Millan <rmh@aybabtu.com>
4946 * term/i386/pc/console.c (grub_console_fini): Call
4947 grub_term_set_current() before grub_term_unregister().
4949 2007-05-04 Robert Millan <rmh@aybabtu.com>
4951 * DISTLIST: Add util/update-grub.in, util/grub.d/00_header.in,
4952 util/grub.d/10_hurd.in, util/grub.d/10_linux.in and util/grub.d/README.
4953 * Makefile.in: Build update-grub_SCRIPTS. Install update-grub_SCRIPTS
4954 and update-grub_DATA.
4955 * conf/common.rmk: Build and install update-grub components.
4956 * conf/common.mk: Regenerate.
4957 * util/update-grub.in: New. Core of update-grub.
4958 * util/grub.d/00_header.in: New. Generates grub.cfg header.
4959 * util/grub.d/10_hurd.in: New. Generates boot entries for the Hurd.
4960 * util/grub.d/10_linux.in: New. Generates boot entries for Linux.
4961 * util/grub.d/README: New. Document grub.d directory layout.
4963 2007-05-01 Robert Millan <rmh@aybabtu.com>
4965 * util/grub-emu.c: Move initialization functions
4966 grub_util_biosdisk_init() and grub_init_all() before
4967 grub_util_biosdisk_get_grub_dev(), which relies on them.
4969 2007-04-19 Robert Millan <rmh@aybabtu.com>
4971 * util/powerpc/ieee1275/grub-install.in: Initialize ${bindir}, since
4974 2007-04-18 Jerone Young <jerone@gmail.com>
4976 * kernel/elf.c: Add missing parenthesis for conditional statement
4979 2007-04-10 Jerone Young <jerone@gmail.com>
4981 * util/i386/pc/getroot.c: Update so that if root device is /dev/root ,
4982 continue on and look for device node with real device name.
4984 2007-04-10 Jerone Young <jerone@gmail.com>
4986 * configure.ac: Add argument for autoconf to use transformation
4988 * Makefile.in: Add autoconf package transformation code.
4989 * util/i386/pc/grub-install.in: Likewise.
4990 * util/powerpc/ieee1275/grub-install.in: Likewise.
4992 2007-03-19 Yoshinori K. Okuji <okuji@enbug.org>
4994 * fs/ext2.c (EXT2_GOOD_OLD_REVISION): New macro.
4995 (EXT2_GOOD_OLD_INODE_SIZE): Likewise.
4996 (EXT2_REVISION): Likewise.
4997 (EXT2_INODE_SIZE): Likewise.
4998 (struct grub_ext2_block_group): Added a missing member
5000 (grub_ext2_read_inode): Divide by the inode size in a superblock
5001 instead of 128 to obtain INODES_PER_BLOCK.
5002 Use the macro EXT2_INODE_SIZE instead of directly using
5005 2007-03-18 Yoshinori K. Okuji <okuji@enbug.org>
5007 * fs/ext2.c (grub_ext2_read_inode): Use the inode size in a
5008 superblock instead of the structure size to compute an
5009 offset. This fixes the problem that GRUB could not read a
5010 filesystem when inode size is different from 128-byte.
5012 2007-03-05 Marco Gerards <marco@gnu.org>
5014 * normal/main.c (read_config_file): When "menu" is not set, create
5017 2007-02-21 Hollis Blanchard <hollis@penguinppc.org>
5019 * kern/powerpc/ieee1275/init.c (HEAP_SIZE): Removed.
5020 (HEAP_LIMIT): New macro.
5021 (grub_claim_heap): Claim memory up to `heaplimit'.
5023 2007-02-21 Hollis Blanchard <hollis@penguinppc.org>
5025 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Link at 64KB.
5026 * kern/powerpc/ieee1275/init.c (_end): Add declaration.
5028 (grub_arch_modules_addr): Return address after `_end'.
5029 * util/powerpc/ieee1275/grub-mkimage.c: Include grub/misc.h.
5030 (load_modules): Use new parameter as `p_paddr' and `p_vaddr'.
5031 (add_segments): Calculate `_end' from phdr size and location.
5032 (ALIGN_UP): Moved to ...
5033 * include/grub/misc.h: here.
5034 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
5036 (GRUB_IEEE1275_MODULE_BASE): Removed.
5038 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
5040 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Correct
5043 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
5045 * include/grub/elfload.h (grub_elf32_load_hook_t): Return grub_err_t.
5047 (grub_elf64_load_hook_t): Likewise.
5048 * kern/elf.c: Call `grub_error_push' before `grub_error'. Improve
5051 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
5053 * kern/mm.c: Update copyright.
5054 (grub_mm_debug): Correct syntax error.
5055 (grub_mm_dump_free): New function.
5056 (grub_debug_free): Call `grub_free'.
5057 * include/grub/mm.h: Update copyright.
5058 (grub_mm_dump_free): Add declaration.
5060 2007-02-12 Hollis Blanchard <hollis@penguinppc.org>
5062 * include/grub/ieee1275/ieee1275.h: Update copyright.
5063 * kern/powerpc/ieee1275/init.c: Likewise.
5064 * kern/powerpc/ieee1275/openfw.c: Likewise.
5066 * loader/powerpc/ieee1275/linux.c: Likewise.
5067 * include/grub/elfload.h: Likewise.
5068 * kern/elf.c: Likewise.
5069 (grub_elf32_load): Pass `base' and `size' parameters. Update all
5071 (grub_elf64_load): Likewise.
5072 (grub_elf32_load_segment): Move to a nested function.
5073 (grub_elf64_load_segment): Likewise.
5075 2007-02-12 Hollis Blanchard <hollis@penguinppc.org>
5077 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): New
5079 * kern/powerpc/ieee1275/init.c (grub_heap_start): Removed.
5080 (grub_heap_len): Likewise.
5081 (HEAP_SIZE): New macro.
5082 (grub_claim_heap): New function.
5083 (grub_machine_init): Don't claim heap directly. Call
5085 * kern/powerpc/ieee1275/openfw.c: Include alloca.h.
5086 (grub_available_iterate): New function.
5088 2007-02-03 Thomas Schwinge <tschwinge@gnu.org>
5090 * aclocal.m4 (grub_CHECK_STACK_PROTECTOR): New definition.
5091 * configure.ac: Use it for testing the HOST and TARGET compilers.
5093 2006-12-13 Thomas Schwinge <tschwinge@gnu.org>
5095 * Makefile.in (enable_grub_emu): New variable.
5096 * configure.ac (--enable-grub-emu): New option.
5097 Do the checks for (n)curses only if `--enable-grub-emu' is requested.
5098 * conf/i386-efi.rmk (sbin_UTILITIES): Add `grub-emu' only if requested.
5099 * conf/i386-pc.rmk: Likewise.
5100 * conf/powerpc-ieee1275.rmk: Likewise.
5101 * conf/sparc64-ieee1275.rmk (bin_UTILITIES): Likewise.
5103 2006-12-12 Marco Gerards <marco@gnu.org>
5105 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_MENU'.
5107 * kern/env.c (grub_env_unset): Don't free the member `value' when
5108 the type is GRUB_ENV_VAR_DATA, in this case it's a user defined
5111 * normal/main.c (current_menu): Removed.
5112 (free_menu): Unset the `menu' environment variable.
5113 (grub_normal_menu_addentry): Make use of the environment variable
5114 `menu', instead of using the global `current_menu'. Allocate
5115 memory for the sourcecode of this entry.
5116 (read_config_file): New argument `nested', changed all callers.
5117 Only in the case of a new context, initialize a new menu. Set the
5118 `menu' environment variable.
5119 (grub_normal_execute): Don't set and unset the environment
5120 variable `menu' here anymore. Only free the menu when leaving the
5123 * util/i386/pc/biosdisk.c (linux_find_partition): Fixed a memory
5126 2006-12-11 Marco Gerards <marco@gnu.org>
5128 * normal/menu_entry.c (run): Fix off by one bug so the last line
5129 is executed. Move the loader check to outside the loop.
5131 2006-12-08 Hollis Blanchard <hollis@penguinppc.org>
5133 * kern/powerpc/ieee1275/cmain.c (cmain): Mark r3 and r4 as `UNUSED'.
5135 2006-11-25 Yoshinori K. Okuji <okuji@enbug.org>
5137 * util/i386/pc/grub-mkimage.c (generate_image): Fix the offset of
5138 the number of sectors. Reported by Andrey Shuvikov
5139 <mr_hyro@yahoo.com>.
5141 2006-11-11 Jeroen Dekkers <jeroen@dekkers.cx>
5143 * kern/disk.c (grub_disk_read): When there is a read error, always
5144 try to read only the necessary data.
5146 * conf/i386-pc.rmk (grub_probe_SOURCES): Add disk/lvm.c and
5148 * include/grub/disk.h [GRUB_UTIL] (grub_raid_init): New
5150 [GRUB_UTIL] (grub_raid_fini): Likewise.
5151 [GRUB_UTIL] (grub_lvm_init): Likewise.
5152 [GRUB_UTIL] (grub_lvm_fini): Likewise.
5153 * util/i386/pc/grub-probe.c (probe): Check whether DEVICE_NAME is
5154 RAID device and copy DEVICE_NAME to DRIVE_NAME in that case.
5155 (main): Call grub_raid_init(), grub_lvm_init(), grub_lvm_fini()
5156 and grub_raid_fini().
5158 2006-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
5160 * include/grub/types.h (__unused): Rename to UNUSED.
5161 * kern/elf.c (grub_elf32_size): Use UNUSED instead of __unused.
5162 (grub_elf64_size): Likewise.
5164 2006-11-03 Hollis Blanchard <hollis@penguinppc.org>
5166 * kern/elf.c (grub_elf_file): Call grub_file_seek. Call
5167 grub_error_push and grub_error_pop in the error-handling path.
5168 (grub_elf32_load_segment): Only call grub_file_read with non-zero
5171 2006-11-03 Hollis Blanchard <hollis@penguinppc.org>
5173 * conf/i386-efi.rmk (grub_emu_SOURCES): Add kern/elf.c.
5174 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
5175 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5176 (kernel_elf_SOURCES): Likewise.
5177 * conf/i386-efi.rmk (kernel_mod_HEADERS): Add elfload.h and cache.h.
5178 * conf/i386-pc.rmk (kernel_mod_HEADERS): Likewise.
5179 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
5180 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
5181 * conf/common.rmk (pkgdata_MODULES): Add elf.mod.
5182 (elf_mod_SOURCES): New variable.
5183 (elf_mod_CFLAGS): Likewise.
5184 (elf_mod_LDFLAGS): Likewise.
5185 * include/grub/types.h (__unused): New macro.
5186 * include/grub/elfload.h: New file.
5187 * kern/elf.c: Likewise.
5188 * loader/powerpc/ieee1275/linux.c: Include elfload.h.
5189 (ELF32_LOADMASK): New macro.
5190 (ELF64_LOADMASK): Likewise.
5192 (grub_linux_load32): New function.
5193 (grub_linux_load64): Likewise.
5194 (grub_rescue_cmd_linux): Call grub_linux_load32 or grub_linux_load64.
5195 Use grub_elf_t instead of grub_file_t.
5197 2006-11-02 Hollis Blanchard <hollis@penguinppc.org>
5199 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): Add
5200 `catch_result' to struct set_color_args.
5202 2006-10-28 Yoshinori K. Okuji <okuji@enbug.org>
5204 * normal/menu.c: Include grub/script.h.
5205 * normal/menu_entry.c: Likewise.
5206 * include/grub/normal.h: Do not include grub/script.h.
5208 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
5210 * kern/disk.c (grub_disk_read): Correct debug printf formatting.
5212 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
5214 * kern/disk.c (grub_disk_open): Print debug messages when opening a
5216 (grub_disk_close): Print debug messages when closing a disk.
5217 (grub_disk_read): Print debug messages when disk read fails.
5218 * kern/fs.c (grub_fs_probe): Print debug messages when detecting
5220 * kern/partition.c: Include misc.h.
5221 (grub_partition_iterate): Print debug messages when detecting
5224 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
5226 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Return error if `status'
5228 * kern/ieee1275/ieee1275.c (IEEE1275_IHANDLE_INVALID): Change to 0.
5230 2006-10-26 Hollis Blanchard <hollis@penguinppc.org>
5232 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
5233 Reverse GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS test.
5235 2006-10-25 Jeroen Dekkers <jeroen@dekkers.cx>
5237 * disk/lvm.c (grub_lvm_scan_device): Malloc sizeof(*lv) bytes
5238 instead of sizeof(lv). Patch by Michael Guntsche.
5240 2006-10-18 Jeroen Dekkers <jeroen@dekkers.cx>
5242 * disk/lvm.c: Rename VGS to VG_LIST.
5243 (grub_lvm_iterate): Change VGS->LV to VG-LV.
5244 (grub_lvm_open): Likewise.
5245 Thanks to Michael Guntsche for finding this bug.
5247 2006-10-15 Yoshinori K. Okuji <okuji@enbug.org>
5249 * configure.ac (AC_INIT): Bumped to 1.95.
5251 2006-10-14 Robert Millan <rmh@aybabtu.com>
5253 * util/i386/pc/getroot.c (grub_guess_root_device): Don't compare os_dev
5254 with "/dev/.static/dev/md".
5256 2006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
5258 * util/i386/pc/grub-probe.c (probe): Print DEVICE_NAME instead of
5259 DRIVE_NAME when grub_util_biosdisk_get_grub_dev fails. Open
5260 DRIVE_NAME instead of DEVICE_NAME. Make sure that DEVICE_NAME and
5261 DRIVE_NAME are always freed.
5263 * util/i386/pc/biosdisk.c (make_device_name): Add one into
5264 DOS_PART, as a DOS partition is counted from one instead of zero
5265 now. Reported by Robert Millan.
5267 2006-10-14 Robert Millan <rmh@aybabtu.com>
5269 * util/i386/pc/getroot.c (grub_guess_root_device): Stop using
5270 grub_util_biosdisk_get_grub_dev to convert system device to GRUB device.
5271 * util/grub-emu.c (main): Use grub_util_biosdisk_get_grub_dev with the
5272 string returned by grub_guess_root_device.
5273 * util/i386/pc/grub-setup.c: Likewise.
5274 * util/i386/pc/grub-probefs.c: Likewise.
5276 * util/i386/pc/grub-probefs.c: Rename to ...
5277 * util/i386/pc/grub-probe.c: ... this.
5278 * DISTLIST: Remove grub-probefs, add grub-probe.
5279 * conf/i386-efi.rmk: Likewise.
5280 * conf/i386-pc.rmk: Likewise.
5281 * util/i386/pc/grub-install.in: Likewise.
5283 * util/i386/pc/grub-probe.c: Add --target=(fs|device|drive) option to
5284 choose which information we want to print.
5286 2006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
5288 * DISTLIST: Added commands/echo.c, disk/lvm.c, disk/raid.c,
5289 include/grub/bitmap.h, include/grub/lvm.h, include/grub/raid.h,
5290 include/grub/i386/pc/vbeutil.h, include/grub/util/lvm.h,
5291 include/grub/util/raid.h, util/lvm.c, util/raid.c, video/bitmap.c,
5292 video/readers/tga.c and video/i386/pc/vbeutil.c.
5294 2006-10-14 Jeroen Dekkers <jeroen@dekkers.cx>
5296 Added support for RAID and LVM.
5298 * disk/lvm.c: New file.
5299 * disk/raid.c: Likewise.
5300 * include/grub/lvm.h: Likewise.
5301 * include/grub/raid.h: Likewise.
5302 * include/grub/util/lvm.h: Likewise.
5303 * include/grub/util/raid.h: Likewise.
5304 * util/lvm.c: Likewise.
5305 * util/raid.c: Likewise.
5307 * include/grub/disk.h (grub_disk_dev_id): Add
5308 GRUB_DISK_DEVICE_RAID_ID and GRUB_DISK_DEVICE_LVM_ID.
5309 (grub_disk_get_size): New prototype.
5310 * kern/disk.c (grub_disk_open): Check whether grub_partition_probe()
5311 returns a partition.
5312 (grub_disk_get_size): New function.
5314 * kern/i386/pc/init.c (make_install_device): Copy the prefix
5315 verbatim if grub_install_dos_part is -2.
5317 * util/i386/pc/getroot.c (grub_guess_root_device): Support RAID
5320 * util/i386/pc/grub-setup.c (setup): New argument
5321 MUST_EMBED. Force embedding of GRUB when the argument is
5322 true. Close FILE before returning.
5323 (main): Add support for RAID and LVM.
5325 * conf/common.rmk: Add RAID and LVM modules.
5326 * conf/i386-pc.rmk (grub_setup_SOURCES): Add util/raid.c and
5328 (grub_emu_SOURCES): Add disk/raid.c and disk/lvm.c.
5330 * kern/misc.c (grub_strstr): New function.
5331 * include/grub/misc.h (grub_strstr): New prototype.
5333 2006-10-10 Tristan Gingold <tristan.gingold@bull.net>
5335 * include/grub/efi/api.h (GRUB_EFI_ERROR_CODE): Long constant.
5337 2006-10-05 Tristan Gingold <tristan.gingold@bull.net>
5339 * kern/misc.c (grub_strtoull): Guess the base only if not
5342 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
5344 * kern/powerpc/ieee1275/cmain.c (cmain): Remove incomplete Old World
5347 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
5349 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Cast `size' to long.
5351 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_next_property):
5352 Remove `flags' argument. All callers changed.
5353 * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_ROOT): Removed.
5354 (IEEE1275_IHANDLE_INVALID): New variable.
5355 (IEEE1275_CELL_INVALID): New variable.
5356 (grub_ieee1275_finddevice, grub_ieee1275_get_property,
5357 grub_ieee1275_get_property_length, grub_ieee1275_instance_to_package,
5358 grub_ieee1275_package_to_path, grub_ieee1275_instance_to_path,
5359 grub_ieee1275_peer, grub_ieee1275_child, grub_ieee1275_open,
5360 grub_ieee1275_claim, grub_ieee1275_set_property): Error-check return
5361 codes from Open Firmware. All callers updated.
5362 (grub_ieee1275_next_property): Directly return Open Firmware return
5364 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
5365 Standardize error checking from `grub_ieee1275_get_property'.
5366 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Rename
5367 `devalias' to `aliases'. Correct comments. Consolidate error paths.
5369 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
5371 * kern/ieee1275/ieee1275.c (grub_ieee1275_instance_to_path): Rename
5372 `instance_to_package_args' to `instance_to_path_args'.
5374 * kern/powerpc/ieee1275/init.c (grub_machine_init): Use
5375 `grub_ieee1275_chosen'.
5377 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Call
5378 `grub_ieee1275_interpret'.
5380 2006-09-25 Hollis Blanchard <hollis@penguinppc.org>
5382 * util/powerpc/ieee1275/grub-mkimage.c: Include config.h.
5384 2006-09-25 Hollis Blanchard <hollis@penguinppc.org>
5386 * include/grub/powerpc/libgcc.h (__floatdisf): New prototype.
5387 (__cmpdi): Likewise.
5389 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Pass 0 as
5390 `flags' to `grub_ieee1275_next_property'. Change `pathlen' to type
5393 * kern/powerpc/ieee1275/cmain.c: Include grub/misc.h.
5395 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Change `actual'
5396 to type `grub_ssize_t'.
5397 (grub_rescue_cmd_linux): Cast -1 to `grub_off_t'.
5399 2006-09-22 Marco Gerards <marco@gnu.org>
5401 * normal/script.c (grub_script_create_cmdmenu): Skip leading
5404 2006-09-22 Marco Gerards <marco@gnu.org>
5406 * commands/echo.c: New file.
5408 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/echo.c'.
5410 * conf/common.rmk (echo_mod_SOURCES): New variable.
5411 (echo_mod_CFLAGS): Likewise.
5412 (echo_mod_LDFLAGS): Likewise.
5414 2006-09-22 Marco Gerards <marco@gnu.org>
5416 * normal/main.c (get_line): Malloc memory instead of using
5417 preallocated memory. Removed the arguments `cmdline' and
5418 `max_len'. Updated all callers.
5420 2006-09-22 Marco Gerards <marco@gnu.org>
5422 * conf/i386-efi.rmk (grub_emu_DEPENDENCIES): New variable.
5423 (normal_mod_DEPENDENCIES): Likewise.
5425 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Likewise.
5426 (normal_mod_DEPENDENCIES): Likewise.
5428 * conf/sparc64-ieee1275.rmk (normal_mod_DEPENDENCIES): Likewise.
5430 2006-09-22 Johan Rydberg <jrydberg@gnu.org>
5432 * genmk.rb: Add DEPENDENCIES variables to modules, utilities, and
5434 * conf/i386-pc.rmk (grub_emu_DEPENDENCIES): Declare.
5435 (normal_mod_DEPENDENCIES): Likewise.
5436 * conf/i386-pc.mk: Regenerate.
5437 * conf/i386-efi.mk: Likewise
5438 * conf/common.mk: Likewise.
5439 * conf/powerpc-ieee1275.mk: Likewise.
5440 * conf/sparc64-ieee1275.mk: Likewise.
5442 2006-09-22 Robert Millan <rmh@aybabtu.com>
5444 Sync with i386 version.
5445 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Remove grub-emu, add grub-mkimage.
5446 * conf/powerpc-ieee1275.rmk (sbin_UTILITIES): Remove grub-mkimage, add grub-emu.
5448 2006-09-21 Robert Millan <rmh@aybabtu.com>
5450 Import from GRUB Legacy (lib/device.c):
5451 * util/i386/pc/grub-mkdevicemap.c (get_i2o_disk_name): New function.
5452 (init_device_map) [__linux__]: Add support for I2O devices.
5454 2006-09-14 Marco Gerards <marco@gnu.org>
5456 * conf/i386-pc.rmk (COMMON_LDFLAGS): Use `-m32' instead of
5459 2006-09-14 Robert Millan <rmh@aybabtu.com>
5461 * util/i386/pc/grub-install.in: Skip menu.lst when removing
5464 * util/i386/pc/getroot.c: Don't recurse into dotdirs (e.g. ".static").
5466 * util/i386/pc/grub-mkdevicemap.c: Make sure the floppy device exists
5467 before adding it to device.map.
5469 2006-08-15 Johan Rydberg <jrydberg@gnu.org>
5471 * genmk.rb: Let GCC generate dependencies the first time it
5472 compiles a file; using the -MD option.
5473 * conf/common.mk: Regenerate.
5474 * conf/i386-pc.mk: Likewise.
5475 * conf/i386-efi.mk: Likewise.
5476 * conf/powerpc-ieee1275.mk: Likewise.
5477 * conf/sparc64-ieee1275.mk: Likewise.
5479 2006-08-04 Yoshinori K. Okuji <okuji@enbug.org>
5481 Move the prototypes of grub_setjmp and grub_longjmp to
5482 cpu/setjmp.h, so that each architecture may specify different
5485 * include/grub/i386/setjmp.h (grub_setjmp): New prototype.
5486 (grub_longjmp): Likewise.
5487 * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise..
5488 (grub_longjmp): Likewise.
5489 * include/grub/sparc64/setjmp.h (grub_setjmp): Likewise..
5490 (grub_longjmp): Likewise.
5492 * include/grub/setjmp.h [!GRUB_UTIL] (grub_setjmp): Removed.
5493 [!GRUB_UTIL] (grub_longjmp): Removed.
5495 2006-08-01 Pelletier Vincent <subdino2004@yahoo.fr>
5497 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): IEEE1275
5498 "color!" method does not return any value.
5500 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
5502 * include/grub/bitmap.h: New file.
5504 * include/grub/i386/pc/vbeutil.h: Likewise.
5506 * video/bitmap.c: Likewise.
5508 * video/readers/tga.c: Likewise.
5510 * video/i386/pc/vbeutil.c: Likewise.
5512 * commands/videotest.c: Code cleanup and updated to reflect to new
5515 * term/gfxterm.c: Likewise.
5517 * video/video.c: Likewise.
5519 * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod.
5520 (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c.
5521 (bitmap_mod_SOURCES): New entry.
5522 (bitmap_mod_CFLAGS): Likewise.
5523 (bitmap_mod_LDFLAGS): Likewise.
5524 (tga_mod_SOURCES): Likewise.
5525 (tga_mod_CFLAGS): Likewise.
5526 (tga_mod_LDFLAGS): Likewise.
5528 * include/grub/video.h (grub_video_blit_operators): New enum type.
5529 (grub_video_render_target): Changed as forward declaration and moved
5530 actual definition to be video driver specific.
5531 (grub_video_adapter.blit_bitmap): Added blitting operator.
5532 (grub_video_adapter.blit_render_target): Likewise.
5533 (grub_video_blit_bitmap): Likewise.
5534 (grub_video_blit_render_target): Likewise.
5536 * include/grub/i386/pc/vbe.h (grub_video_render_target): Added
5537 driver specific render target definition.
5538 (grub_video_vbe_map_rgba): Added driver internal helper.
5539 (grub_video_vbe_unmap_color): Updated to use
5540 grub_video_i386_vbeblit_info.
5541 (grub_video_vbe_get_video_ptr): Likewise.
5543 * include/grub/i386/pc/vbeblit.h
5544 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use
5545 grub_video_i386_vbeblit_info.
5546 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
5547 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
5548 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
5549 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
5550 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
5551 (grub_video_i386_vbeblit_index_index): Likewise.
5552 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function.
5553 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
5554 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
5555 (grub_video_i386_vbeblit_blend): Added generic blitter for blend
5557 (grub_video_i386_vbeblit_replace): Added generic blitter for replace
5560 * video/i386/pc/vbeblit.c: Updated to reflect changes on
5561 include/grub/i386/pc/vbeblit.h.
5563 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8):
5564 Updated to use grub_video_i386_vbeblit_info.
5565 (grub_video_i386_vbefill_R8G8B8): Likewise.
5566 (grub_video_i386_vbefill_index): Likewise.
5567 (grub_video_i386_vbefill): Added generic filler.
5569 * video/i386/pc/vbefill.c: Updated to reflect changes on
5570 include/grub/i386/pc/vbefill.h.
5572 * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use
5573 grub_video_i386_vbeblit_info.
5574 (grub_video_vbe_unmap_color): Likewise.
5575 (grub_video_vbe_blit_glyph): Likewise.
5576 (grub_video_vbe_scroll): Likewise.
5577 (grub_video_vbe_draw_pixel): Removed function.
5578 (grub_video_vbe_get_pixel): Likewise.
5579 (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and
5580 updated code to use it.
5581 (common_blitter): Added common blitter for render target and bitmap.
5582 (grub_video_vbe_blit_bitmap): Updated to use common_blitter.
5583 (grub_video_vbe_blit_render_target): Likewise.
5585 2006-07-30 Johan Rydberg <jrydberg@gnu.org>
5587 * kern/efi/efi.c (grub_efi_set_text_mode): Assume console already
5588 is in text mode if there is no console control protocol instance
5591 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
5593 * include/grub/video.h: Code cleanup.
5595 * include/grub/i386/pc/vbe.h: Likewise.
5597 * video/i386/pc/vbe.c: Likewise.
5599 * video/i386/pc/vbeblit.c: Likewise.
5601 * video/i386/pc/vbefill.c: Likewise.
5603 * video/video.c: Likewise. Also added more comments.
5605 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
5607 * disk/i386/pc/biosdisk.c (struct grub_biosdisk_drp): Moved to ...
5608 (struct grub_biosdisk_dap): Likewise.
5610 * include/grub/i386/pc/biosdisk.h: ... to here. Also corrected
5611 linkage settings for all functions.
5613 2006-07-12 Marco Gerards <marco@gnu.org>
5615 * configure.ac (--enable-mm-debug): Fix typo.
5617 * genkernsyms.sh.in: Use proper quoting for `CC'.
5619 2006-07-02 Jeroen Dekkers <jeroen@dekkers.cx>
5621 * conf/i386-pc.rmk (COMMON_ASFLAGS): Add "-m32".
5622 (normal_mod_ASFLAGS): Remove "-m32".
5624 2006-06-14 Yoshinori K. Okuji <okuji@enbug.org>
5626 * util/misc.c: Include config.h.
5627 [!HAVE_MEMALIGN]: Do not include malloc.h.
5628 (grub_memalign): Use posix_memalign, if present. Then, use
5629 memalign, if present. Otherwise, emit an error.
5631 * util/grub-emu.c: Do not include malloc.h.
5633 * include/grub/util/misc.h: Include unistd.h. This is required for
5634 FreeBSD, because off_t is defined in unistd.h. Reported by Harley
5635 D. Eades III <hde@foobar-qux.org>.
5637 * configure.ac (AC_GNU_SOURCE): Added.
5638 (AC_CHECK_FUNCS): Check posix_memalign and memalign for the host
5641 2006-06-09 Yoshinori K. Okuji <okuji@enbug.org>
5643 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Make sure that
5644 ADDR_MAX does not exceed GRUB_LINUX_INITRD_MAX_ADDRESS.
5646 2006-06-07 Jeroen Dekkers <jeroen@dekkers.cx>
5648 * include/grub/types.h (grub_host_addr_t): Rename to
5650 (grub_host_off_t): Rename to grub_target_off_t.
5651 (grub_host_size_t): Rename to grub_target_size_t.
5652 (grub_host_ssize_t): Rename to grub_target_ssize_t.
5653 Refer to GRUB_TARGET_SIZEOF_VOID_P to define those variables.
5655 * include/grub/kernel.h (struct grub_module_header): Change type
5656 of OFFSET to grub_target_off_t and type of SIZE to grub_target_size_t.
5657 (grub_module_info): Likewise.
5659 2006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
5661 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): The conditional
5662 of checking LINUX_MEM_SIZE was reverse. Reported by Jesus
5663 Velazquez <jesus.velazquez@gmail.com>.
5665 2006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
5667 Count partitions from 1 instead of 0 in the string representation
5668 of partitions. Still use 0-based internally.
5670 * partmap/sun.c (grub_sun_is_valid): A cosmetic change.
5671 (sun_partition_map_iterate): Use grub_partition_t instead of
5672 struct grub_partition *. Cast DESC->START_CYLINDER to
5673 grub_uint64_t after converting the endian.
5674 (sun_partition_map_probe): Subtract 1 for PARTNUM.
5675 (sun_partition_map_get_name): Add 1 to P->INDEX.
5677 * partmap/pc.c (grub_partition_parse): Subtract 1 for
5679 (pc_partition_map_get_name): Add 1 into PCDATA->DOS_PART.
5681 * partmap/gpt.c (gpt_partition_map_iterate): Initialize PARTNO to
5682 zero instead of one.
5683 (gpt_partition_map_probe): Subtract 1 for PARTNUM.
5684 (gpt_partition_map_get_name): Add 1 into P->INDEX.
5686 * partmap/apple.c (apple_partition_map_iterate): Change the type
5688 (apple_partition_map_probe): Subtract 1 for PARTNUM.
5689 (apple_partition_map_get_name): Add 1 into P->INDEX.
5691 * partmap/amiga.c (amiga_partition_map_iterate): Change the type
5693 (amiga_partition_map_iterate): Cast NEXT to grub_off_t to
5694 calculate the offset of a partition.
5695 (amiga_partition_map_probe): Subtract 1 for PARTNUM.
5696 (amiga_partition_map_get_name): Add 1 into P->INDEX.
5698 * partmap/acorn.c (acorn_partition_map_find): Change the type of
5699 SECTOR to grub_disk_addr_t.
5700 (acorn_partition_map_iterate): Likewise.
5701 (acorn_partition_map_probe): Subtract 1 for PARTNUM.
5702 Change the type of SECTOR to grub_disk_addr_t. Declare P on the
5704 (acorn_partition_map_get_name): Add 1 into P->INDEX.
5706 * kern/i386/pc/init.c (make_install_device): Add 1 into
5707 GRUB_INSTALL_DOS_PART.
5709 * fs/iso9660.c (grub_iso9660_mount): Fixed a reversed
5712 2006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
5714 Clean up the code to support 64-bit addressing in disks and
5715 files. This change is not enough for filesystems yet.
5717 * util/i386/pc/grub-setup.c (struct boot_blocklist): Change the
5718 type of "start" to grub_uint64_t.
5719 (setup): Change the types of KERNEL_SECTOR and FIRST_SECTOR to
5720 grub_disk_addr_t * and grub_disk_addr_t. Fix the format string in
5721 save_first_sector and save_blocklists. Use grub_le_to_cpu64 to
5724 * util/i386/pc/biosdisk.c (open_device): Change the type of SECTOR
5725 to grub_disk_addr_t.
5727 * partmap/gpt.c (gpt_partition_map_iterate): Fix the format
5730 * partmap/pc.c (pc_partition_map_iterate): Likewise.
5732 * partmap/amiga.c (amiga_partition_map_iterate): Cast RDSK.MAGIC
5735 * normal/script.c (grub_script_parse): Remove unused MEMFREE.
5737 * normal/parser.y (YYLTYPE_IS_TRIVIAL): New macro.
5739 * normal/lexer.c (grub_script_yyerror): Specify unused to LEX.
5741 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf64): Cast -1
5742 to grub_off_t, to detect an error from grub_file_seek.
5743 (grub_multiboot_load_elf32): Likewise.
5745 * kern/misc.c (grub_strtoul): Use grub_strtoull. Return the
5746 maximum unsigned long value when an overflow is detected.
5747 (grub_strtoull): New function.
5748 (grub_divmod64): Likewise.
5749 (grub_lltoa): use grub_divmod64.
5751 * kern/fs.c (struct grub_fs_block): Change the type of "offset" to
5753 (grub_fs_blocklist_open): Increase P if P is not NULL to advance
5754 the pointer to next character. Use grub_strtoull instead of
5756 (grub_fs_blocklist_read): Change the types of SECTOR, OFFSET and
5757 SIZE to grub_disk_addr_t, grub_off_t and grub_size_t,
5760 * kern/file.c (grub_file_read): Prevent an overflow of LEN, as the
5761 return value is signed.
5762 (grub_file_seek): Change the type of OLD to grub_off_t. Do not
5763 test if OFFSET is less than zero, as OFFSET is unsigned now.
5765 * kern/disk.c (struct grub_disk_cache): Change the type of
5766 "sector" to grub_disk_addr_t.
5767 (grub_disk_cache_get_index): Change the type of SECTOR to
5768 grub_disk_addr_t. Calculate the hash with SECTOR casted to
5769 unsigned after shifting.
5770 (grub_disk_cache_invalidate): Change the type of SECTOR to
5772 (grub_disk_cache_unlock): Likewise.
5773 (grub_disk_cache_store): Likewise.
5774 (grub_disk_check_range): Change the types of SECTOR, OFFSET, SIZE,
5775 START and LEN to grub_disk_addr_t *, grub_off_t *, grub_size_t,
5776 grub_disk_addr_t and grub_uint64_t, respectively.
5777 (grub_disk_read): Use an unsigned variable REAL_OFFSET for the
5778 body, as the value of OFFSET is tweaked by
5779 grub_disk_check_range. Change the types of START_SECTOR, LEN and
5780 POS to grub_disk_addr_t, grub_size_t and grub_size_t,
5782 (grub_disk_write): Use an unsigned variable REAL_OFFSET for the
5783 body, as the value of OFFSET is tweaked by
5784 grub_disk_check_range. Change the types of LEN and N to
5787 * io/gzio.c (struct grub_gzio): Change the types of "data_offset"
5788 and "saved_offset" to grub_off_t.
5789 (test_header): Cast BUF to char *.
5790 (get_byte): Cast GZIO->DATA_OFFSET to grub_off_t. Cast GZIO->INBUF
5792 (grub_gzio_read): Change the types of OFFSET and SIZE to
5793 grub_off_t and grub_size_t, respectively.
5795 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_FORCE_LBA):
5797 (GRUB_BOOT_MACHINE_BOOT_DRIVE): Changed to 0x4c.
5798 (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Changed to 0x40.
5799 (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Changed to 0x42.
5800 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Changed to 0x4e.
5801 (GRUB_BOOT_MACHINE_LIST_SIZE): Increased to 12.
5803 * include/grub/types.h (grub_off_t): Unconditionally set to
5805 (grub_disk_addr_t): Changed to grub_uint64_t.
5807 * include/grub/partition.h (struct grub_partition): Change the
5808 types of "start", "len" and "offset" to grub_disk_addr_t,
5809 grub_uint64_t and grub_disk_addr_t, respectively.
5810 (grub_partition_get_start): Return grub_disk_addr_t.
5811 (grub_partition_get_len): Return grub_uint64_t.
5813 * include/grub/misc.h (grub_strtoull): New prototype.
5814 (grub_divmod64): Likewise.
5816 * include/grub/fshelp.h (grub_fshelp_read_file): Change the types
5817 of SECTOR, LEN and FILESIZE to grub_disk_addr_t, grub_size_t and
5818 grub_off_t, respectively.
5819 All callers and references changed.
5821 * include/grub/fs.h (struct grub_fs): Change the type of LEN to
5822 grub_size_t in "read".
5823 All callers and references changed.
5825 * include/grub/file.h (struct grub_file): Change the types of
5826 "offset" and "size" to grub_off_t and grub_off_t,
5827 respectively. Change the type of SECTOR to grub_disk_addr_t in
5829 (grub_file_read): Change the type of LEN to grub_size_t.
5830 (grub_file_seek): Return grub_off_t. Change the type of OFFSET to
5832 (grub_file_size): Return grub_off_t.
5833 (grub_file_tell): Likewise.
5834 All callers and references changed.
5836 * include/grub/disk.h (struct grub_disk_dev): Change the types of
5837 SECTOR and SIZE to grub_disk_addr_t and grub_size_t in "read" and
5839 (struct grub_disk): Change the type of "total_sectors" to
5840 grub_uint64_t. Change the type of SECTOR to grub_disk_addr_t in
5842 (grub_disk_read): Change the types of SECTOR, OFFSET and SIZE to
5843 grub_disk_addr_t, grub_off_t and grub_size_t, respectively.
5844 (grub_disk_write): Likewise.
5845 All callers and references changed.
5847 * fs/iso9660.c (grub_iso9660_susp_iterate): Cast parameters to
5848 char * for grub_strncmp to silence gcc.
5849 (grub_iso9660_mount): Likewise.
5850 (grub_iso9660_mount): Likewise.
5851 (grub_iso9660_read_symlink): Likewise. Also, remove the nonsense
5853 (grub_iso9660_iterate_dir): Likewise.
5854 (grub_iso9660_label): Cast DATA->VOLDESC.VOLNAME to char *.
5856 * fs/hfs.c (grub_hfs_read_file): Change the types of SECTOR and
5857 LEN to grub_disk_addr_t and grub_size_t, respectively.
5859 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
5861 * fs/jfs.c (grub_jfs_read_file): Likewise.
5863 * fs/minix.c (grub_jfs_read_file): Likewise.
5865 * fs/sfs.c (grub_jfs_read_file): Likewise.
5867 * fs/ufs.c (grub_jfs_read_file): Likewise.
5869 * fs/xfs.c (grub_jfs_read_file): Likewise.
5871 * fs/fat.c (grub_fat_read_data): Change the types of SECTOR, LEN
5872 and SIZE to grub_disk_addr_t, grub_size_t and grub_size_t,
5875 * fs/ext2.c (grub_ext2_read_block): When an error happens, set
5876 BLKNR to -1 instead of returning GRUB_ERRNO.
5877 (grub_ext2_read_file): Change the types of SECTOR and
5878 LEN to grub_disk_addr_t and grub_size_t, respectively.
5880 * fs/affs.c (grub_affs_read_file): Change the types of SECTOR and
5881 LEN to grub_disk_addr_t and grub_size_t, respectively.
5883 * font/manager.c (grub_font_get_glyph): Cast BITMAP to char * for
5886 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Fix the format
5887 string. Do not cast SECTOR explicitly.
5889 * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Change the type of
5890 TOTAL_SECTORS to grub_uint64_t. Do not mask DRP->TOTAL_SECTORS.
5891 (grub_biosdisk_rw): Change the types of SECTOR and SIZE to
5892 grub_disk_addr_t and grub_size_t, respectively. If the sector is
5893 over 2TB and LBA mode is not supported, raise an error.
5894 (get_safe_sectors): New function.
5895 (grub_biosdisk_read): Use get_safe_sectors.
5896 (grub_biosdisk_write): Likewise.
5898 * disk/efi/efidisk.c (grub_efidisk_read): Fix the format string.
5899 (grub_efidisk_write): Likewise.
5901 * disk/loopback.c (delete_loopback): Cosmetic changes.
5902 (grub_cmd_loopback): Likewise. Also, test NEWDEV->FILENAME
5904 (grub_loopback_open): Likewise.
5905 (grub_loopback_read): Likewise. Also, change the type of POS to
5906 grub_off_t, and fix the usage of grub_memset.
5908 * commands/i386/pc/play.c: Include grub/machine/time.h.
5910 * commands/ls.c (grub_ls_list_files): Use "llu" instead of "d" to
5913 * commands/configfile.c: Include grub/env.h.
5915 * commands/cmp.c (grub_cmd_cmp): Do not use ERR, but use
5916 GRUB_ERRNO directly instead. Change the type of POS to
5917 grub_off_t. Follow the coding standard.
5919 * commands/blocklist.c: Include grub/partition.h.
5920 (grub_cmd_blocklist): Return an error if the underlying device is
5921 not a disk. Take the starting sector of a partition into account,
5922 if a partition is used.
5924 * boot/i386/pc/diskboot.S (bootloop): Adapted to the new offset of
5926 (lba_mode): Support 64-bit addresses.
5927 (chs_mode): Likewise.
5928 (copy_buffer): Adapted to the new offsets of a length field and a
5930 (blocklist_default_start): Allocate 64-bit space.
5932 * boot/i386/pc/boot.S (force_lba): Removed.
5933 (boot_drive): Moved to under KERNEL_SECTOR.
5934 (kernel_sector): Moved to under KERNEL_SEGMENT. Allocate 64-bit
5936 (real_start): Set %si earlier. Remove code for FORCE_LBA, since it
5938 (lba_mode): Refactored to support a 64-bit address. More size
5940 (setup_sectors): Likewise.
5942 2006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
5944 * DISTLIST: Added include/grub/i386/linux.h. Removed
5945 include/grub/i386/pc/linux.h
5947 * configure.ac (AC_INIT): Bumped to 1.94.
5949 * config.guess: Updated from gnulib.
5950 * config.sub: Likewise.
5951 * install-sh: Likewise.
5952 * mkinstalldirs: Likewise.
5954 2006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
5956 * conf/common.rmk (grub_modules_init.lst): Depended on
5957 grub_emu_SOURCES, excluding grub_emu_init.c, instead of
5960 * genmk.rb (PModule::rule): Reverted the previous change.
5962 2006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
5964 * conf/common.rmk (grub_modules_init.lst): Depends on
5965 $(MODSRCFILES). Grep only the files in $(MODSRCFILES). Make sure
5966 that the target does not exist before producing.
5967 (grub_modules_init.h): Remove the target before generating.
5968 (grub_emu_init.c): Likewise.
5970 * genmk.rb (PModule::rule): Add source files into MODSRCFILES.
5972 2006-05-31 Jeroen Dekkers <jeroen@dekkers.cx>
5974 * configure.ac: Don't set host_m32 for x86_64. Also reset LIBS
5975 for the target-specific tests. Make sure that we also have the
5976 up-to-date target variables for those tests.
5978 2006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
5980 * genmk.rb (Image::rule): Prefix CFLAGS or ASFLAGS with TARGET_.
5981 (PModule::rule): Likewise.
5983 2006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
5985 * genmk.rb (Image::rule): Set FLAG to CFLAGS or ASFLAGS instead of
5986 TARGET_CFLAGS or TARGET_ASFLAGS. There is no reason why
5987 target-specific flags should be prefixed.
5988 (PModule::rule): Likewise.
5990 2006-05-30 Yoshinori K. Okuji <okuji@enbug.org>
5992 * configure.ac (CMP): Check if cmp is available explicitly.
5994 2006-05-29 Yoshinori K. Okuji <okuji@enbug.org>
5996 * util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
5997 (target_cpu): New variable.
5998 (pkglibdir): Use target_cpu instead of host_cpu.
6000 * util/i386/pc/grub-install.in (host_cpu): Removed.
6001 (target_cpu): New variable.
6002 (pkglibdir): Use target_cpu instead of host_cpu.
6004 * util/genmoddep.c: Removed.
6006 * kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
6007 instead of GRUB_HOST_SIZEOF_VOID_P.
6008 * kern/dl.c: Likewise.
6010 * include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
6012 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
6013 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
6014 (GRUB_TARGET_SIZEOF_LONG): ... this.
6015 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
6016 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
6017 * include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
6019 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
6020 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
6021 (GRUB_TARGET_SIZEOF_LONG): ... this.
6022 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
6023 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
6024 * include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
6026 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
6027 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
6028 (GRUB_TARGET_SIZEOF_LONG): ... this.
6029 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
6030 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
6032 * include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
6033 GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
6034 [!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
6035 instead of GRUB_HOST_SIZEOF_LONG.
6036 [!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
6037 GRUB_HOST_WORDS_BIGENDIAN to define or undefine
6038 GRUB_CPU_WORDS_BIGENDIAN.
6039 Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
6040 define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
6043 * conf/i386-efi.rmk (noinst_UTILITIES): Removed.
6044 (genmoddep_SOURCES): Likewise.
6045 * conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
6046 (genmoddep_SOURCES): Likewise.
6047 * conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
6048 (genmoddep_SOURCES): Likewise.
6049 * conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
6051 (genmoddep_SOURCES): Likewise.
6053 * genmoddep.awk: New file.
6055 * genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
6056 TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
6057 CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
6058 (PModule::rule): Likewise.
6059 (Program::rule): Likewise.
6060 (Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
6061 BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
6064 * configure.ac: Rewritten intensively to use host and target
6065 instead of build and host, respectively.
6067 * Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
6068 (host_cpu): Removed.
6069 (target_cpu): New variable.
6070 (CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
6071 (BUILD_CC): Removed.
6072 (BUILD_CFLAGS): Likewise.
6073 (BUILD_CPPFLAGS): Likewise.
6074 (TARGET_CC): New variable.
6075 (TARGET_CFLAGS): Likewise.
6076 (TARGET_CPPFLAGS): Likewise.
6077 (TARGET_LDFLAGS): Likewise.
6079 (include): Use target_cpu instead of host_cpu.
6080 (moddep.lst:): Use genmoddep.awk instead of genmoddep.
6082 * DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
6084 2006-05-29 Vesa Jaaskelainen <chaac@nic.fi>
6086 * include/grub/script.h (grub_script_cmdif): Renamed field 'bool' to
6087 'exec_to_evaluate'. Renamed field 'true' to 'exec_on_true'. Renamed
6088 field 'false' to 'exec_on_false'.
6089 (grub_script_create_cmdif): Renamed argument names to reflect above
6092 * normal/execute.c (grub_script_execute_cmdif): Likewise.
6094 * normal/script.c (grub_script_create_cmdif): Likewise.
6096 2006-05-28 Yoshinori K. Okuji <okuji@enbug.org>
6098 * fs/hfsplus.c (grub_hfsplus_btree_recoffset): Moved to near the
6100 (grub_hfsplus_btree_recptr): Likewise.
6101 (grub_hfsplus_find_block): Do not take RETRY any longer. Use
6102 FILEBLOCK both to pass a block number and store next block
6104 (grub_hfsplus_read_block): Rewritten heavily to support an extent
6105 overflow file correctly. Specify errors appropriately, because
6106 fshelp expects that GRUB_ERRNO is set when fails. Reuse
6107 grub_hfsplus_btree_recptr to get the pointer to a found key.
6108 (grub_hfsplus_btree_search): Return 1 instead of 0 when no match
6111 * conf/i386-efi.rmk (pkgdata_MODULES): Added _linux.mod and
6113 (_linux_mod_SOURCES): New variable.
6114 (_linux_mod_CFLAGS): Likewise.
6115 (_linux_mod_LDFLAGS): Likewise.
6116 (linux_mod_SOURCES): Likewise.
6117 (linux_mod_CFLAGS): Likewise.
6118 (linux_mod_LDFLAGS): Likewise.
6120 * DISTLIST: Added loader/i386/efi/linux.c,
6121 loader/i386/efi/linux_normal.c and
6122 include/grub/i386/efi/loader.h.
6124 * loader/i386/efi/linux.c: New file.
6125 * loader/i386/efi/linux_normal.c: Likewise.
6126 * include/grub/i386/efi/loader.h: Likewise.
6128 2006-05-27 Yoshinori K. Okuji <okuji@enbug.org>
6130 * commands/blocklist.c: New file.
6132 * DISTLIST: Added commands/blocklist.c.
6134 * term/efi/console.c (grub_console_highlight_color): Use a lighter
6135 color for the background, and a darker color for the foreground.
6136 (grub_console_checkkey): Return READ_KEY.
6137 (grub_console_cls): Set the background to
6138 GRUB_EFI_BACKGROUND_BLACK temporarily to clean out the screen.
6140 * kern/efi/efi.c (grub_efi_exit_boot_services): New function.
6142 * include/grub/i386/linux.h (struct linux_kernel_params): Fixed
6143 the size of "padding5", "hd0_drive_info" and "hd1_drive_info".
6145 * include/grub/efi/efi.h (grub_efi_exit_boot_services): New
6148 * include/grub/efi/api.h (GRUB_EFI_TEXT_ATTR): Do not shift
6149 BG. The spec is wrong again.
6151 * include/grub/normal.h [GRUB_UTIL] (grub_blocklist_init): New
6153 [GRUB_UTIL] (grub_blocklist_fini): Likewise.
6155 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
6156 commands/blocklist.c.
6157 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6159 * conf/common.rmk (pkgdata_MODULES): Added blocklist.mod.
6160 (blocklist_mod_SOURCES): New variable.
6161 (blocklist_mod_CFLAGS): Likewise.
6162 (blocklist_mod_LDFLAGS): Likewise.
6164 2006-05-20 Yoshinori K. Okuji <okuji@enbug.org>
6166 * boot/i386/pc/boot.S (real_start): Set %si earlier to eliminate
6168 (lba_mode): Use %eax more intensively to reduce the code size.
6170 2006-05-20 Marco Gerards <marco@gnu.org>
6172 * normal/lexer.c (grub_script_yylex): Don't filter out newlines.
6174 * normal/parser.y (commandblock): Defined as <cmd>. A subroutine
6176 (script): Accept leading newlines.
6177 (newlines): New rule to describe 0 or more newlines.
6178 (commands): Accept `command' with trailing newline. Fixed the
6179 order in which arguments were passed to `grub_script_add_cmd'.
6180 Accept commands separated by newlines.
6181 (function): Changed to accept newlines.
6182 (menuentry) Rewritten.
6184 * normal/script.c (grub_script_create_cmdmenu): Add new entries in
6185 front of the list, instead of to the end.
6187 2006-05-19 Yoshinori K. Okuji <okuji@enbug.org>
6189 * util/i386/pc/grub-install.in (bindir): New variable.
6190 (grub_mkimage): Use BINDIR instead of SBINDIR. Reported by Lee
6191 Shaver <lbgwjl@gmail.com>.
6193 2006-05-14 Yoshinori K. Okuji <okuji@enbug.org>
6195 * kern/i386/pc/startup.S: Include grub/cpu/linux.h instead of
6196 grub/machine/linux.h
6197 * loader/i386/pc/linux.c: Likewise.
6199 * include/grub/i386/pc/linux.h: Moved to ...
6200 * include/grub/i386/linux.h: ... here.
6202 * include/grub/i386/linux.h (struct linux_kernel_params): New
6205 2006-05-09 Vesa Jaaskelainen <chaac@nic.fi>
6207 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Corrected bounds
6209 (grub_video_vbe_blit_glyph): Likewise.
6210 (grub_video_vbe_blit_bitmap): Likewise.
6211 (grub_video_vbe_blit_render_target): Likewise.
6213 2006-05-09 Yoshinori K. Okuji <okuji@enbug.org>
6215 * configure.ac (--with-platform): Properly quote the square
6218 2006-05-08 Marco Gerards <marco@gnu.org>
6220 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Renamed from
6222 (kernel_elf_HEADERS): ...to this. Updated all users.
6223 (grubof_symlist.c): Renamed from this...
6224 (kernel_elf_symlist.c): ...to this. Updated all users.
6225 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
6226 (grubof_SOURCES): Renamed from this...
6227 (kernel_elf_SOURCES): ...to this.
6228 (grubof_HEADERS): Renamed from this...
6229 (kernel_elf_HEADERS): ...to this.
6230 (grubof_CFLAGS): Renamed from this...
6231 (kernel_elf_CFLAGS): ...to this.
6232 (grubof_ASFLAGS): Renamed from this...
6233 (kernel_elf_ASFLAGS): ...to this.
6234 (grubof_LDFLAGS): Renamed from this...
6235 (kernel_elf_LDFLAGS): ...to this.
6237 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Renamed from
6239 (kernel_elf_HEADERS): ...to this. Updated all users.
6240 (grubof_symlist.c): Renamed from this...
6241 (kernel_elf_symlist.c): ...to this. Updated all users.
6242 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
6243 (grubof_SOURCES): Renamed from this...
6244 (kernel_elf_SOURCES): ...to this.
6245 (grubof_HEADERS): Renamed from this...
6246 (kernel_elf_HEADERS): ...to this.
6247 (grubof_CFLAGS): Renamed from this...
6248 (kernel_elf_CFLAGS): ...to this.
6249 (grubof_ASFLAGS): Renamed from this...
6250 (kernel_elf_ASFLAGS): ...to this.
6251 (grubof_LDFLAGS): Renamed from this...
6252 (kernel_elf_LDFLAGS): ...to this.
6254 * util/powerpc/ieee1275/grub-mkimage.c (add_segments): Use
6255 `kernel.elf' instead of `grubof'.
6257 2006-05-08 Yoshinori K. Okuji <okuji@enbug.org>
6259 Add --with-platform to configure. Use pkglibdir instead of
6260 pkgdatadir. This is reported by Roger Leigh.
6262 * util/powerpc/ieee1275/grub-install.in (datadir): Removed.
6263 (host_vendor): Likewise.
6264 (host_os): Likewise.
6265 (pkgdatadir): Likewise.
6266 (platform): New variable.
6267 (pkglibdir): Likewise.
6268 Use PKGLIBDIR instead of PKGDATADIR.
6270 * util/i386/pc/grub-install.in (datadir): Removed.
6271 (host_vendor): Likewise.
6272 (host_os): Likewise.
6273 (pkgdatadir): Likewise.
6274 (platform): New variable.
6275 (pkglibdir): Likewise.
6276 Use PKGLIBDIR instead of PKGDATADIR.
6278 * util/powerpc/ieee1275/grub-mkimage.c (usage): Use GRUB_LIBDIR
6279 instead of GRUB_DATADIR.
6281 * util/i386/pc/grub-mkimage.c (usage): Likewise.
6283 * util/i386/efi/grub-mkimage.c (usage): Likewise.
6286 * configure.ac (--with-platform): New option.
6287 Use PLATFORM instead of HOST_VENDOR to specify a platform.
6289 * Makefile.in: Include a makefile based on PLATFORM instead of
6291 (pkgdatadir): Not appended by the machine type.
6292 (pkglibdir): Appended by the machine type.
6293 (host_vendor): Removed.
6294 (platform): New variable.
6295 (BUILD_CPPFLAGS): Specify GRUB_LIBDIR instead of GRUB_DATADIR.
6296 (install-local): Use PKGLIBDIR instead of PKGDATADIR.
6297 (uninstall): Likewise.
6299 2006-05-07 Yoshinori K. Okuji <okuji@enbug.org>
6301 Use the environment context in the menu. Remove the commands
6302 "default" and "timeout", and use variables instead.
6304 * normal/menu.c: Include grub/env.h.
6305 (print_entry): Cast TITLE to silence gcc.
6306 (get_timeout): New function.
6307 (set_timeout): Likewise.
6308 (get_entry_number): Likewise.
6309 (run_menu): Use a default entry, a fallback entry and a timeout
6310 in the environment variables "default", "fallback" and
6311 "timeout". Also, tweak the default entry if it is not within the
6312 current menu entries.
6313 (grub_menu_run): Use a fallback entry in the environment variable
6316 * normal/main.c (read_config_file): Do not initialize
6317 NEWMENU->DEFAULT_ENTRY, NEWMENU->FALLBACK_ENTRY or
6319 (grub_normal_execute): Use a data slot to store the menu.
6321 * include/grub/normal.h (struct grub_menu): Removed default_entry,
6322 fallback_entry and timeout.
6323 (struct grub_menu_list): Removed.
6324 (grub_menu_list_t): Likewise.
6325 (struct grub_context): Likewise.
6326 (grub_context_t): Likewise.
6327 (grub_context_get): Likewise.
6328 (grub_context_get_current_menu): Likewise.
6329 (grub_context_push_menu): Likewise.
6330 (grub_context_pop_menu): Likewise.
6331 (grub_default_init): Likewise.
6332 (grub_default_fini): Likewise.
6333 (grub_timeout_init): Likewise.
6334 (grub_timeout_fini): Likewise.
6336 * conf/sparc64-ieee1275.rmk (pkgdata_MODULES): Removed default.mod
6338 (normal_mod_SOURCES): Removed normal/context.c.
6340 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Removed
6341 commands/default.c, commands/timeout.c and normal/context.c.
6342 (normal_mod_SOURCES): Removed normal/context.c.
6344 * conf/i386-pc.rmk (grub_emu_SOURCES): Removed commands/default.c,
6345 commands/timeout.c and normal/context.c.
6346 (normal_mod_SOURCES): Removed normal/context.c.
6348 * conf/i386-efi.rmk (grub_emu_SOURCES): Removed
6349 commands/default.c, commands/timeout.c and normal/context.c.
6350 (normal_mod_SOURCES): Removed normal/context.c.
6352 * conf/common.rmk (pkgdata_MODULES): Removed default.mod and
6354 (default_mod_SOURCES): Removed.
6355 (default_mod_CFLAGS): Likewise.
6356 (default_mod_LDFLAGS): Likewise.
6357 (timeout_mod_SOURCES): Removed.
6358 (timeout_mod_CFLAGS): Likewise.
6359 (timeout_mod_LDFLAGS): Likewise.
6361 * DISTLIST: Removed commands/default.c, commands/timeout.c and
6364 * commands/default.c: Removed.
6365 * commands/timeout.c: Likewise.
6366 * normal/context.c: Likewise.
6368 2006-05-07 Vesa Jaaskelainen <chaac@nic.fi>
6370 * kern/i386/pc/startup.S (grub_exit): Added missing .code32 tag.
6372 2006-05-02 Yoshinori K. Okuji <okuji@enbug.org>
6374 * kern/env.c (struct grub_env_context): Removed "sorted". Renamed
6375 "next" to "prev" for readability.
6376 (struct grub_env_sorted_var): New struct.
6377 (grub_env_context): Renamed to ...
6378 (initial_context): ... this.
6379 (grub_env_var_context): Renamed to ...
6380 (current_context): ... this.
6381 (grub_env_find): Look only at CURRENT_CONTEXT.
6382 (grub_env_context_open): Rewritten to copy exported variables from
6384 (grub_env_context_close): Rewritten according to the new
6385 scheme. Also, add an assertion to prevent the initial context from
6387 (grub_env_insert): Removed the code for the sorted list.
6388 (grub_env_remove): Likewise.
6389 (grub_env_export): Simply mark the variable with
6390 GRUB_ENV_VAR_GLOBAL.
6391 (grub_env_set): A cosmetic change for naming consistency.
6392 (grub_env_get): Likewise.
6393 (grub_env_unset): Likewise.
6394 (grub_env_iterate): Rewritten to sort variables within this
6396 (grub_register_variable_hook): Fixed for naming consistency. Call
6397 grub_env_find again, only if NAME is not found at the first time.
6398 (mangle_data_slot_name): New function.
6399 (grub_env_set_data_slot): Likewise.
6400 (grub_env_get_data_slot): Likewise.
6401 (grub_env_unset_data_slot): Likewise.
6403 * include/grub/env.h (grub_env_var_type): New enum.
6404 (GRUB_ENV_VAR_LOCAL): New constant.
6405 (GRUB_ENV_VAR_GLOBAL): Likewise.
6406 (GRUB_ENV_VAR_DATA): Likewise.
6407 (struct grub_env_var): Removed "sort_next" and "sort_prevp". Added
6409 (grub_env_set): Replace VAR with NAME for consistency.
6410 (grub_register_variable_hook): Likewise.
6411 (grub_env_export): Specify the name of the argument.
6412 (grub_env_set_data_slot): New prototype.
6413 (grub_env_get_data_slot): Likewise.
6414 (grub_env_unset_data_slot): Likewise.
6416 2006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
6418 Extend the loader so that GRUB can accept a loader which comes
6419 back to GRUB when a loaded image exits. Also, this change adds
6420 support for a chainloader on EFI.
6422 * term/efi/console.c: Include grub/misc.h.
6423 (grub_console_checkkey): Display a scan code on the top for
6424 debugging. This will be removed once the EFI port gets stable.
6425 Correct the scan code mapping.
6427 * kern/efi/mm.c (sort_memory_map): Sort in a descending order to
6428 allocate memory from larger regions, in order to reduce the number
6429 of allocated regions. Otherwise, the MacOSX loader panics.
6430 (filter_memory_map): Avoid less than 1MB for compatibility with
6432 (add_memory_regions): Allocate from the tail of a region, if
6433 possible, to avoid allocating a region near to 1MB, for the MacOSX
6436 * kern/efi/init.c (grub_efi_set_prefix): Specify
6437 GRUB_EFI_IMAGE_HANDLE to grub_efi_get_loaded_image.
6439 * kern/efi/efi.c (grub_efi_get_loaded_image): Accept a new
6440 argument IMAGE_HANDLE and specify it to get a loaded image.
6441 (grub_arch_modules_addr): Specify GRUB_EFI_IMAGE_HANDLE to
6442 grub_efi_get_loaded_image.
6443 (grub_efi_get_filename): Divide the length by the size of
6445 (grub_efi_get_device_path): New function.
6446 (grub_efi_print_device_path): Print End Device Path nodes. Divide
6447 the length by the size of grub_efi_char16_t for a file path device
6450 * kern/loader.c (grub_loader_noreturn): New variable.
6451 (grub_loader_set): Accept a new argument NORETURN. Set
6452 GRUB_LOADER_NORETURN to NORETURN.
6453 All callers changed.
6454 (grub_loader_boot): If GRUB_LOADER_NORETURN is false, do not call
6457 * include/grub/efi/efi.h (grub_efi_get_device_path): New
6459 (grub_efi_get_loaded_image): Take an argument to specify an image
6462 * include/grub/loader.h (grub_loader_set): Added one more argument
6465 * disk/efi/efidisk.c (make_devices): Use grub_efi_get_device_path
6466 instead of grub_efi_open_protocol.
6467 (grub_efidisk_get_device_name): Likewise.
6468 (grub_efidisk_close): Print a newline.
6469 (grub_efidisk_get_device_handle): Fixed to use
6470 GRUB_EFI_DEVICE_PATH_SUBTYPE instead of
6471 GRUB_EFI_DEVICE_PATH_TYPE.
6473 * disk/efi/efidisk.c (device_path_guid): Moved to ...
6474 * kern/efi/efi.c (device_path_guid): ... here.
6476 * conf/i386-efi.rmk (pkgdata_MODULES): Added _chain.mod and
6478 (kernel_mod_HEADERS): Added efi/disk.h.
6479 (_chain_mod_SOURCES): New variable.
6480 (_chain_mod_CFLAGS): Likewise.
6481 (_chain_mod_LDFLAGS): Likewise.
6482 (chain_mod_SOURCES): Likewise.
6483 (chain_mod_CFLAGS): Likewise.
6484 (chain_mod_LDFLAGS): Likewise.
6486 * DISTLIST: Added include/grub/efi/chainloader.h,
6487 loader/efi/chainloader.c and loader/efi/chainloader_normal.c.
6489 * include/grub/efi/chainloader.h: New file.
6490 * loader/efi/chainloader.c: Likewise.
6491 * loader/efi/chainloader_normal.c: Likewise.
6493 2006-04-30 Marco Gerards <marco@gnu.org>
6495 * commands/configfile.c (grub_cmd_source): New function.
6496 (GRUB_MOD_INIT): Register the commands `source' and `.'.
6497 (GRUB_MOD_FINI): De-register the commands `source' and `.'.
6499 2006-04-30 Marco Gerards <marco@gnu.org>
6501 * normal/execute.c (grub_script_execute_cmd): Change the return
6502 type to `grub_err_t'. Correctly return the error.
6503 (grub_script_execute_cmdline): In case a command line is not a
6504 command or a function, try to interpret it as an assignment.
6506 2006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
6508 * fs/hfsplus.c (grub_hfsplus_read_block): Fixed a memory leak.
6509 (grub_hfsplus_iterate_dir): Reordered to skip unknown nodes. Also,
6510 skip a node whose name is obviously invalid as UTF-16,
6511 i.e. contains a NUL character. Stop the iteration when the last
6512 directory entry is found. Instead of using the return value of
6513 grub_hfsplus_btree_iterate_node, store the value in RET and use
6514 it, because the iterator can be stopped by the last directory
6517 2006-04-30 Marco Gerards <marco@gnu.org>
6519 * include/grub/env.h (grub_env_export): New prototype. Reported
6520 by Jan C. Kleinsorge <jan.kleinsorge@udo.edu>.
6522 2006-04-30 Marco Gerards <marco@gnu.org>
6524 * fs/hfsplus.c (grub_hfsplus_iterate_dir): Correctly calculate the
6525 size of the extents in a catalog file record.
6527 2006-04-29 Marco Gerards <marco@gnu.org>
6529 * commands/configfile.c (grub_cmd_configfile): Execute the
6530 configfile within its own context.
6532 * include/grub/env.h (grub_env_context_open): New prototype.
6533 (grub_env_context_close): Likewise.
6535 * kern/env.c (grub_env): Removed.
6536 (grub_env_sorted): Likewise.
6537 (grub_env_context): New variable.
6538 (grub_env_var_context): Likewise.
6539 (grub_env_find): Search both the active context and the global
6541 (grub_env_context_open): New function.
6542 (grub_env_context_close): Likewise.
6543 (grub_env_insert): Likewise.
6544 (grub_env_remove): Likewise.
6545 (grub_env_export): Likewise.
6546 (grub_env_set): Changed to use helper functions to avoid code
6548 (grub_env_iterate): Rewritten so both the current context and the
6549 global context are being used.
6551 * normal/command.c (export_command): New function.
6552 (grub_command_init): Register the `export' function.
6554 2006-04-26 Yoshinori K. Okuji <okuji@enbug.org>
6556 * util/i386/pc/grub-mkimage.c (compress_kernel): Cast arguments
6557 explicitly to suppress gcc's warnings.
6558 * fs/fat.c (grub_fat_find_dir): Likewise.
6559 (grub_fat_label): Likewise.
6560 * fs/xfs.c (grub_xfs_read_inode): Likewise.
6561 (grub_xfs_mount): Likewise.
6562 (grub_xfs_label): Likewise.
6563 * fs/affs.c (grub_affs_mount): Likewise.
6564 (grub_affs_label): Likewise.
6565 (grub_affs_iterate_dir): Likewise.
6566 * fs/sfs.c (grub_sfs_mount): Likewise.
6567 (grub_sfs_iterate_dir): Likewise.
6568 * fs/ufs.c (grub_ufs_lookup_symlink): Likewise.
6569 * fs/hfs.c (grub_hfs_mount): Likewise.
6570 (grub_hfs_cmp_catkeys): Likewise.
6571 (grub_hfs_find_dir): Likewise.
6572 (grub_hfs_dir): Likewise.
6573 (grub_hfs_label): Likewise.
6574 * fs/jfs.c (grub_jfs_mount): Likewise.
6575 (grub_jfs_opendir): Likewise.
6576 (grub_jfs_getent): Likewise.
6577 (grub_jfs_lookup_symlink): Likewise.
6578 (grub_jfs_label): Likewise.
6579 * fs/hfsplus.c (grub_hfsplus_cmp_catkey): Likewise.
6580 (grub_hfsplus_iterate_dir): Likewise.
6581 (grub_hfsplus_btree_iterate_node): Made static.
6583 * util/grub-emu.c (prefix): New variable.
6584 (grub_machine_set_prefix): New function.
6585 (main): Do not set the environment variable "prefix" here. Only
6586 set PREFIX, which is used later by grub_machine_set_prefix.
6588 * include/grub/video.h: Do not include grub/symbol.h.
6589 (grub_video_register): Not exported. This symbol is not defined in
6591 (grub_video_unregister): Likewise.
6592 (grub_video_iterate): Likewise.
6593 (grub_video_setup): Likewise.
6594 (grub_video_restore): Likewise.
6595 (grub_video_get_info): Likewise.
6596 (grub_video_get_blit_format): Likewise.
6597 (grub_video_set_palette): Likewise.
6598 (grub_video_get_palette): Likewise.
6599 (grub_video_set_viewport): Likewise.
6600 (grub_video_get_viewport): Likewise.
6601 (grub_video_map_color): Likewise.
6602 (grub_video_map_rgb): Likewise.
6603 (grub_video_map_rgba): Likewise.
6604 (grub_video_fill_rect): Likewise.
6605 (grub_video_blit_glyph): Likewise.
6606 (grub_video_blit_bitmap): Likewise.
6607 (grub_video_blit_render_target): Likewise.
6608 (grub_video_scroll): Likewise.
6609 (grub_video_swap_buffers): Likewise.
6610 (grub_video_create_render_target): Likewise.
6611 (grub_video_delete_render_target): Likewise.
6612 (grub_video_set_active_render_target): Likewise.
6614 * include/grub/symbol.h [GRUB_SYMBOL_GENERATOR] (EXPORT_FUNC):
6616 [GRUB_SYMBOL_GENERATOR] (EXPORT_VAR): Likewise.
6618 * conf/sparc64-ieee1275.rmk (grubof_symlist.c): Depended on
6619 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
6620 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
6621 instead of $(srcdir)/genkernsyms.sh.
6623 * conf/powerpc-ieee1275.rmk (grubof_symlist.c): Depended on
6624 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
6625 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
6626 instead of $(srcdir)/genkernsyms.sh.
6628 * conf/i386-pc.rmk (symlist.c): Depended on config.h. Use
6629 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
6630 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
6631 instead of $(srcdir)/genkernsyms.sh.
6633 * conf/i386-efi.rmk (symlist.c): Depended on config.h. Use
6634 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
6635 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
6636 instead of $(srcdir)/genkernsyms.sh.
6638 * configure.ac (AC_CONFIG_FILES): Added gensymlist.sh and
6641 * Makefile.in (DISTCLEANFILES): Added gensymlist.sh and
6643 (gensymlist.sh): New target.
6644 (genkernsyms.sh): Likewise.
6646 * DISTLIST: Removed genkernsyms.sh and gensymlist.sh. Added
6647 genkernsyms.sh.in and gensymlist.sh.in.
6649 * genkernsyms.sh: Removed.
6650 * gensymlist.sh: Likewise.
6652 * genkernsyms.sh.in: New file.
6653 * gensymlist.sh.in: Likewise.
6655 2006-04-25 Hollis Blanchard <hollis@penguinppc.org>
6657 * kern/powerpc/ieee1275/init.c (grub_machine_set_prefix): Do not
6658 clobber "prefix", since we may have already set it manually.
6660 2006-04-25 Hollis Blanchard <hollis@penguinppc.org>
6662 * kern/misc.c (abort): New alias for grub_abort.
6664 2006-04-25 Yoshinori K. Okuji <okuji@enbug.org>
6666 A new machine-specific function "grub_machine_set_prefix" is
6667 defined. This is called after loading modules, so that a prefix
6668 initialization can use modules. Also, this change adds an
6669 intensive debugging feature for the memory manager via the
6670 configure option "--enable-mm-debug".
6672 * partmap/gpt.c (gpt_partition_map_iterate): Add one more into
6675 * kern/sparc64/ieee1275/init.c (abort): Removed.
6676 (grub_stop): Likewise.
6677 (grub_exit): New function.
6678 (grub_set_prefix): Renamed to ...
6679 (grub_machine_set_prefix): ... this.
6680 (grub_machine_init): Do not call grub_set_prefix.
6682 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Renamed to ...
6683 (grub_machine_set_prefix): ... this.
6684 (grub_machine_init): Do not call grub_set_prefix.
6686 * kern/i386/pc/init.c (grub_machine_set_prefix): New function.
6687 (grub_machine_init): Do not set the prefix here.
6689 * kern/i386/efi/init.c (grub_machine_set_prefix): New function.
6691 * kern/efi/init.c: Include grub/mm.h.
6692 (grub_efi_set_prefix): New function.
6694 * kern/efi/efi.c (grub_exit): Call grub_efi_fini.
6695 (grub_efi_get_filename): New function.
6696 (grub_print_device_path): Renamed to ...
6697 (grub_efi_print_device_path): ... this.
6699 * kern/mm.c [MM_DEBUG] (grub_malloc): Undefined.
6700 [MM_DEBUG] (grub_realloc): Likewise.
6701 [MM_DEBUG] (grub_free): Likewise.
6702 [MM_DEBUG] (grub_memalign): Likewise.
6703 [MM_DEBUG] (grub_mm_debug): New variable.
6704 [MM_DEBUG] (grub_debug_malloc): New function.
6705 [MM_DEBUG] (grub_debug_free): New function.
6706 [MM_DEBUG] (grub_debug_realloc): New function.
6707 [MM_DEBUG] (grub_debug_memalign): New function.
6709 * kern/misc.c (grub_abort): Print a newline to distinguish
6712 * kern/main.c (grub_main): Call grub_machine_set_prefix and
6713 grub_set_root_dev after loading modules. This is necessary when
6714 setting a prefix depends on modules.
6716 * include/grub/efi/efi.h (grub_print_device_path): Renamed to ...
6717 (grub_efi_print_device_path): ... this.
6718 (grub_efi_get_filename): New prototype.
6719 (grub_efi_set_prefix): Likewise.
6721 * include/grub/efi/disk.h: Include grub/efi/api.h, grub/symbol.h
6723 (grub_efidisk_get_device_handle): New prototype.
6724 (grub_efidisk_get_device_name): Likewise.
6726 * include/grub/mm.h: Include config.h.
6727 (MM_DEBUG): Removed.
6728 [MM_DEBUG && !GRUB_UTIL] (grub_mm_debug): New prototype.
6729 [MM_DEBUG && !GRUB_UTIL] (grub_malloc): New macro.
6730 [MM_DEBUG && !GRUB_UTIL] (grub_realloc): Likewise.
6731 [MM_DEBUG && !GRUB_UTIL] (grub_memalign): Likewise.
6732 [MM_DEBUG && !GRUB_UTIL] (grub_free): Likewise.
6733 [MM_DEBUG && !GRUB_UTIL] (grub_debug_malloc): New prototype.
6734 [MM_DEBUG && !GRUB_UTIL] (grub_debug_realloc): New prototype.
6735 [MM_DEBUG && !GRUB_UTIL] (grub_debug_memalign): New prototype.
6736 [MM_DEBUG && !GRUB_UTIL] (grub_debug_free): New prototype.
6738 * include/grub/kernel.h (grub_machine_set_prefix): New prototype.
6740 * disk/efi/efidisk.c: Include grub/partition.h.
6741 (iterate_child_devices): New function.
6742 (add_device): First, compare only last device path nodes, so that
6743 devices are sorted by the types.
6744 (grub_efidisk_get_device_handle): New function.
6745 (grub_efidisk_get_device_name): Likewise.
6747 * configure.ac (--enable-mm-debug): New option to enable the
6748 memory manager debugging feature. This makes the binary much
6749 bigger, so is disabled by default.
6751 2006-04-23 Yoshinori K. Okuji <okuji@enbug.org>
6753 Use grub_abort instead of grub_stop, and grub_exit must be
6754 define in each architecture now. Also, this change adds support
6757 * util/i386/pc/grub-probefs.c: Include grub/term.h.
6758 (grub_getkey): New function.
6759 (grub_term_get_current): Likewise.
6761 * util/i386/pc/grub-setup.c: Include grub/term.h.
6762 (grub_getkey): New function.
6763 (grub_term_get_current): Likewise.
6765 * util/misc.c (grub_stop): Renamed to ...
6766 (grub_exit): ... this.
6768 * kern/powerpc/ieee1275/init.c (abort): Renamed to ...
6769 (grub_exit): ... this.
6770 (grub_machine_init): Use grub_abort instead of abort.
6771 (grub_stop): Removed.
6773 * kern/powerpc/ieee1275/cmain.c (cmain): Use grub_abort instead of
6776 * kern/i386/pc/startup.S (grub_exit): New function.
6777 (cold_reboot): New label.
6779 * kern/efi/init.c: Include grub/efi/disk.h and grub/env.h.
6780 (grub_efi_init): Call grub_efidisk_init.
6781 (grub_efi_fini): Call grub_efidisk_fini.
6783 * kern/efi/efi.c: Include grub/mm.h.
6784 (grub_efi_console_control_guid): Renamed to ...
6785 (console_control_guid): ... this.
6786 (grub_efi_loaded_image_guid): Renamed to ...
6787 (loaded_image_guid): ... this.
6788 (grub_efi_locate_handle): New function.
6789 (grub_efi_open_protocol): Likewise.
6790 (grub_efi_set_text_mode): Use CONSOLE_CONTROL_GUID instead of
6791 GRUB_EFI_CONSOLE_CONTROL_GUID.
6792 (grub_efi_exit): Removed.
6793 (grub_stop): Likewise.
6794 (grub_efi_get_loaded_image): Use grub_efi_open_protocol.
6795 (grub_exit): New function.
6796 (grub_print_device_path): Likewise.
6798 * kern/rescue.c (grub_rescue_cmd_exit): New function.
6799 (grub_enter_rescue_mode): Register "exit".
6801 * kern/misc.c (grub_real_dprintf): A cosmetic change.
6802 (grub_abort): New function.
6804 * kern/err.c (grub_fatal): Use grub_abort instead of grub_stop.
6806 * include/grub/sparc64/ieee1275/kernel.h (abort): Removed.
6808 * include/grub/powerpc/ieee1275/kernel.h (abort): Removed.
6810 * include/grub/efi/efi.h (grub_efi_exit): Removed.
6811 (grub_print_device_path): New prototype.
6812 (grub_efi_locate_handle): Likewise.
6813 (grub_efi_open_protocol): Likewise.
6815 * include/grub/efi/disk.h (grub_efidisk_fini): New file.
6816 * disk/efi/efidisk.c: Likewise.
6818 * DISTLIST: Added disk/efi/efidisk.c and include/grub/efi/disk.h.
6820 * include/grub/efi/console_control.h
6821 (GRUB_EFI_CONSOLE_CONTROL_GUID): Use an array for the last 8 bytes.
6823 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): Specify the
6824 last 8 bytes as an array.
6825 (GRUB_EFI_DISK_IO_GUID): New macro.
6826 (GRUB_EFI_BLOCK_IO_GUID): Likewise.
6827 (GRUB_EFI_DEVICE_PATH_GUID): Likewise.
6828 (grub_efi_ipv6_address_t): Change the type to grub_uint16_t from
6830 (struct grub_efi_guid): Use an array to specify the last 8 bytes.
6831 (struct grub_efi_device_path): Rename the member "sub_type" to
6833 (GRUB_EFI_DEVICE_PATH_TYPE): New macro.
6834 (GRUB_EFI_DEVICE_PATH_SUBTYPE): Likewise.
6835 (GRUB_EFI_DEVICE_PATH_LENGTH): Likewise.
6836 (GRUB_EFI_END_DEVICE_PATH_TYPE): Likewise.
6837 (GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE): Likewise.
6838 (GRUB_EFI_END_THIS_DEVICE_PATH_SUBTYPE): Likewise.
6839 (GRUB_EFI_END_ENTIRE_DEVICE_PATH): Likewise.
6840 (GRUB_EFI_NEXT_DEVICE_PATH): Likewise.
6841 (GRUB_EFI_HARDWARE_DEVICE_PATH_TYPE): Likewise.
6842 (GRUB_EFI_PCI_DEVICE_PATH_SUBTYPE): Likewise.
6843 (struct grub_efi_pci_device_path): New structure.
6844 (grub_efi_pci_device_path_t): New type.
6845 (GRUB_EFI_PCCARD_DEVICE_PATH_SUBTYPE): New macro.
6846 (struct grub_efi_pccard_device_path): New structure.
6847 (grub_efi_pccard_device_path_t): New type.
6848 (GRUB_EFI_MEMORY_MAPPED_DEVICE_PATH_SUBTYPE): New macro.
6849 (struct grub_efi_memory_mapped_device_path): New structure.
6850 (grub_efi_memory_mapped_device_path_t): New type.
6851 (GRUB_EFI_VENDOR_DEVICE_PATH_SUBTYPE): New macro.
6852 (struct grub_efi_vendor_device_path): New structure.
6853 (grub_efi_vendor_device_path_t): New type.
6854 (GRUB_EFI_CONTROLLER_DEVICE_PATH_SUBTYPE): New macro.
6855 (struct grub_efi_controller_device_path): New structure.
6856 (grub_efi_controller_device_path_t): New type.
6857 (GRUB_EFI_ACPI_DEVICE_PATH_TYPE): New macro.
6858 (GRUB_EFI_ACPI_DEVICE_PATH_SUBTYPE): Likewise.
6859 (struct grub_efi_acpi_device_path): New structure.
6860 (grub_efi_acpi_device_path_t): New type.
6861 (GRUB_EFI_EXPANDED_ACPI_DEVICE_PATH_SUBTYPE): New macro.
6862 (struct grub_efi_expanded_acpi_device_path): New structure.
6863 (grub_efi_expanded_acpi_device_path_t): New type.
6864 (GRUB_EFI_EXPANDED_ACPI_HIDSTR): New macro.
6865 (GRUB_EFI_EXPANDED_ACPI_UIDSTR): Likewise.
6866 (GRUB_EFI_EXPANDED_ACPI_CIDSTR): Likewise.
6867 (GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE): Likewise.
6868 (GRUB_EFI_ATAPI_DEVICE_PATH_SUBTYPE): Likewise.
6869 (struct grub_efi_atapi_device_path): New structure.
6870 (grub_efi_atapi_device_path_t): New type.
6871 (GRUB_EFI_FIBRE_CHANNEL_DEVICE_PATH_SUBTYPE): New macro.
6872 (struct grub_efi_fibre_channel_device_path): New structure.
6873 (grub_efi_fibre_channel_device_path_t): New type.
6874 (GRUB_EFI_1394_DEVICE_PATH_SUBTYPE): New macro.
6875 (struct grub_efi_1394_device_path): New structure.
6876 (grub_efi_1394_device_path_t): New type.
6877 (GRUB_EFI_USB_DEVICE_PATH_SUBTYPE): New macro.
6878 (struct grub_efi_usb_device_path): New structure.
6879 (grub_efi_usb_device_path_t): New type.
6880 (GRUB_EFI_USB_CLASS_DEVICE_PATH_SUBTYPE): New macro.
6881 (struct grub_efi_usb_class_device_path): New structure.
6882 (grub_efi_usb_class_device_path_t): New type.
6883 (GRUB_EFI_I2O_DEVICE_PATH_SUBTYPE): New macro.
6884 (struct grub_efi_i2o_device_path): New structure.
6885 (grub_efi_i2o_device_path_t): New type.
6886 (GRUB_EFI_MAC_ADDRESS_DEVICE_PATH_SUBTYPE): New macro.
6887 (struct grub_efi_mac_address_device_path): New structure.
6888 (grub_efi_mac_address_device_path_t): New type.
6889 (GRUB_EFI_IPV4_DEVICE_PATH_SUBTYPE): New macro.
6890 (struct grub_efi_ipv4_device_path): New structure.
6891 (grub_efi_ipv4_device_path_t): New type.
6892 (GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE): New macro.
6893 (struct grub_efi_ipv6_device_path): New structure.
6894 (grub_efi_ipv6_device_path_t): New type.
6895 (GRUB_EFI_INFINIBAND_DEVICE_PATH_SUBTYPE): New macro.
6896 (struct grub_efi_infiniband_device_path): New structure.
6897 (grub_efi_infiniband_device_path_t): New type.
6898 (GRUB_EFI_UART_DEVICE_PATH_SUBTYPE): New macro.
6899 (struct grub_efi_uart_device_path): New structure.
6900 (grub_efi_uart_device_path_t): New type.
6901 (GRUB_EFI_VENDOR_MESSAGING_DEVICE_PATH_SUBTYPE): New macro.
6902 (struct grub_efi_vendor_messaging_device_path): New structure.
6903 (grub_efi_vendor_messaging_device_path_t): New type.
6904 (GRUB_EFI_MEDIA_DEVICE_PATH_TYPE): New macro.
6905 (GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE): Likewise.
6906 (struct grub_efi_hard_drive_device_path): New structure.
6907 (grub_efi_hard_drive_device_path_t): New type.
6908 (GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE): New macro.
6909 (struct grub_efi_cdrom_device_path): New structure.
6910 (grub_efi_cdrom_device_path_t): New type.
6911 (GRUB_EFI_VENDOR_MEDIA_DEVICE_PATH_SUBTYPE): New macro.
6912 (struct grub_efi_vendor_media_device_path): New structure.
6913 (grub_efi_vendor_media_device_path_t): New type.
6914 (GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE): New macro.
6915 (struct grub_efi_file_path_device_path): New structure.
6916 (grub_efi_file_path_device_path_t): New type.
6917 (GRUB_EFI_PROTOCOL_DEVICE_PATH_SUBTYPE): New macro.
6918 (struct grub_efi_protocol_device_path): New structure.
6919 (grub_efi_protocol_device_path_t): New type.
6920 (GRUB_EFI_BIOS_DEVICE_PATH_TYPE): New macro.
6921 (GRUB_EFI_BIOS_DEVICE_PATH_SUBTYPE): Likewise.
6922 (struct grub_efi_bios_device_path): New structure.
6923 (grub_efi_bios_device_path_t): New type.
6924 (struct grub_efi_disk_io): New structure.
6925 (grub_efi_disk_io_t): New type.
6926 (struct grub_efi_block_io_media): New structure.
6927 (grub_efi_block_io_media_t): New type.
6928 (struct grub_efi_block_io): New structure.
6929 (grub_efi_block_io_t): New type.
6931 * include/grub/misc.h (grub_stop): Removed.
6932 (grub_exit): New prototype.
6933 (grub_abort): Likewise.
6935 * include/grub/disk.h (enum grub_disk_dev_id): Added
6936 GRUB_DISK_DEVICE_EFIDISK_ID.
6938 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added
6940 (kernel_syms.lst): Remove the target if an error occurs.
6942 2006-04-22 Yoshinori K. Okuji <okuji@enbug.org>
6944 * kern/misc.c (grub_lltoa): Rewritten the decimal conversion part,
6945 as it was simply too buggy.
6947 2006-04-21 Yoshinori K. Okuji <okuji@enbug.org>
6949 * kern/misc.c (grub_lltoa): New function.
6950 (grub_vsprintf): Added support for the long long suffix,
6953 2006-04-20 Hollis Blanchard <hollis@penguinppc.org>
6955 * Makefile.in (LDFLAGS): Add variable.
6956 (LD): Remove variable.
6957 * configure.ac: Add -m32 to LDFLAGS.
6958 * genmk.rb (PModule#rule): Use $(CC) instead of $(LD).
6959 * conf/powerpc-ieee1275.rmk (COMMON_LDFLAGS): Add variable.
6960 (grubof_LDFLAGS): Use $(COMMON_LDFLAGS).
6961 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS, normal_mod_LDFLAGS,
6962 suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS): New
6964 * conf/sparc64-ieee1275.rmk (COMMON_LDFLAGS): Add -nostdlib.
6965 * conf/i386-pc.rmk (COMMON_LDFLAGS): Add -nostdlib.
6966 * conf/i386-efi.rmk (COMMON_LDFLAGS): Add -nostdlib.
6968 2006-04-20 Vesa Jaaskelainen <chaac@nic.fi>
6970 * term/gfxterm.c (grub_gfxterm_getcharwidth): Fixed character
6971 length for unknown glyph.
6973 2006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
6975 Add support for pre-loaded modules into the EFI port.
6977 * util/i386/efi/grub-mkimage.c (make_mods_section): Rewritten
6978 completely. Accept one more argument DIR. The caller has changed.
6980 * kern/i386/efi/init.c (grub_arch_modules_addr): Removed.
6982 * kern/efi/efi.c: Include grub/efi/pe32.h and grub/kernel.h.
6983 (grub_efi_loaded_image_guid): New variable.
6984 (grub_efi_get_loaded_image): New function.
6985 (grub_arch_modules_addr): Likewise.
6987 * include/grub/efi/efi.h (grub_efi_get_loaded_image): New
6990 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): New macro.
6991 (struct grub_efi_loaded_image): New structure.
6992 (grub_efi_loaded_image_t): New type.
6994 2006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
6996 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Compare the file
6997 size with GRUB_OS_AREA_SIZE as grub_size_t instead of
6998 grub_ssize_t. Reported by Jeff Chua <jeff84@silk.corp.fedex.com>.
7000 2006-04-19 Roger Leigh <rleigh@whinlatter.ukfsn.org>
7002 * DISTLIST: Added `util/powerpc/ieee1275/grub-install.in'.
7004 2006-04-19 Yoshinori K. Okuji <okuji@enbug.org>
7006 * DISTLIST: Added include/grub/efi/console.h,
7007 include/grub/efi/time.h, include/grub/i386/efi/kernel.h,
7008 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
7010 * include/grub/efi/console.h: New file.
7011 * include/grub/efi/time.h: Likewise.
7012 * include/grub/i386/efi/kernel.h: Likewise.
7013 * kern/efi/init.c: Likewise.
7014 * kern/efi/mm.c: Likewise.
7015 * term/efi/console.c: Likewise.
7017 * kern/i386/efi/init.c: Do not include grub/machine/time.h.
7018 (grub_stop): Removed.
7019 (grub_get_rtc): Likewise.
7020 (grub_machine_init): Simply call grub_efi_init.
7021 (grub_machine_fini): Call grub_efi_fini.
7023 * kern/efi/efi.c: Include grub/machine/time.h and grub/term.h.
7024 (grub_efi_output_string): Removed.
7025 (grub_efi_stall): New function.
7026 (grub_stop): Likewise.
7027 (grub_get_rtc): Likewise.
7029 * include/grub/efi/efi.h (grub_efi_output_string): Removed.
7030 (grub_efi_stall): New prototype.
7031 (grub_efi_allocate_pages): Likewise.
7032 (grub_efi_free_pages): Likewise.
7033 (grub_efi_get_memory_map): Likewise.
7034 (grub_efi_mm_init): Likewise.
7035 (grub_efi_mm_fini): Likewise.
7036 (grub_efi_init): Likewise.
7037 (grub_efi_fini): Likewise.
7039 * include/grub/i386/efi/time.h: Do not include
7040 grub/symbol.h. Include grub/efi/time.h.
7041 (GRUB_TICKS_PER_SECOND): Removed.
7042 (grub_get_rtc): Likewise.
7044 * include/grub/efi/api.h (struct grub_efi_memory_descriptor):
7045 Added padding. The EFI spec is buggy.
7046 (GRUB_EFI_BLACK): New macro.
7047 (GRUB_EFI_BLUE): Likewise.
7048 (GRUB_EFI_GREEN): Likewise.
7049 (GRUB_EFI_CYAN): Likewise.
7050 (GRUB_EFI_RED): Likewise.
7051 (GRUB_EFI_MAGENTA): Likewise.
7052 (GRUB_EFI_BROWN): Likewise.
7053 (GRUB_EFI_LIGHTGRAY): Likewise.
7054 (GRUB_EFI_BRIGHT): Likewise.
7055 (GRUB_EFI_DARKGRAY): Likewise.
7056 (GRUB_EFI_LIGHTBLUE): Likewise.
7057 (GRUB_EFI_LIGHTGREEN): Likewise.
7058 (GRUB_EFI_LIGHTCYAN): Likewise.
7059 (GRUB_EFI_LIGHTRED): Likewise.
7060 (GRUB_EFI_LIGHTMAGENTA): Likewise.
7061 (GRUB_EFI_YELLOW): Likewise.
7062 (GRUB_EFI_WHITE): Likewise.
7063 (GRUB_EFI_BACKGROUND_BLACK): Likewise.
7064 (GRUB_EFI_BACKGROUND_BLUE): Likewise.
7065 (GRUB_EFI_BACKGROUND_GREEN): Likewise.
7066 (GRUB_EFI_BACKGROUND_CYAN): Likewise.
7067 (GRUB_EFI_BACKGROUND_RED): Likewise.
7068 (GRUB_EFI_BACKGROUND_MAGENTA): Likewise.
7069 (GRUB_EFI_BACKGROUND_BROWN): Likewise.
7070 (GRUB_EFI_BACKGROUND_LIGHTGRAY): Likewise.
7071 (GRUB_EFI_TEXT_ATTR): Likewise.
7073 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added kern/efi/efi.c,
7074 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
7075 (kernel_mod_HEADERS): Added efi/time.h.
7077 2006-04-18 Yoshinori K. Okuji <okuji@enbug.org>
7079 * DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
7080 include/grub/efi/api.h, include/grub/efi/console_control.h,
7081 include/grub/efi/efi.h, include/grub/efi/pe32.h,
7082 include/grub/i386/efi/time.h, kern/efi/efi.c,
7083 kern/i386/efi/init.c, kern/i386/efi/startup.S,
7084 and util/i386/efi/grub-mkimage.c.
7086 * Makefile.in (RMKFILES): Added i386-efi.rmk.
7088 * genmk.rb (PModule#rule): Do not export symbols if
7089 #{prefix}_EXPORTS is set to "no".
7091 * conf/i386-efi.mk: New file.
7092 * conf/i386-efi.rmk: Likewise.
7093 * include/grub/efi/api.h: Likewise.
7094 * include/grub/efi/console_control.h: Likewise.
7095 * include/grub/efi/efi.h: Likewise.
7096 * include/grub/efi/pe32.h: Likewise.
7097 * include/grub/i386/efi/time.h: Likewise.
7098 * kern/efi/efi.c: Likewise.
7099 * kern/i386/efi/init.c: Likewise.
7100 * kern/i386/efi/startup.S: Likewise.
7101 * util/i386/efi/grub-mkimage.c: Likewise.
7103 2006-04-17 Marco Gerards <marco@gnu.org>
7105 * include/grub/script.h: Include <grub/parser.h> and
7106 "grub_script.tab.h".
7107 (struct grub_lexer_param): New struct.
7108 (struct grub_parser_param): Likewise.
7109 (grub_script_create_arglist): Pass the state in an argument.
7110 (grub_script_add_arglist): Likewise.
7111 (grub_script_create_cmdline): Likewise.
7112 (grub_script_create_cmdblock): Likewise.
7113 (grub_script_create_cmdif): Likewise.
7114 (grub_script_create_cmdmenu): Likewise.
7115 (grub_script_add_cmd): Likewise.
7116 (grub_script_arg_add): Likewise.
7117 (grub_script_lexer_ref): Likewise.
7118 (grub_script_lexer_deref): Likewise.
7119 (grub_script_lexer_record_start): Likewise.
7120 (grub_script_lexer_record_stop): Likewise.
7121 (grub_script_mem_record): Likewise.
7122 (grub_script_mem_record_stop): Likewise.
7123 (grub_script_malloc): Likewise.
7124 (grub_script_yylex): Likewise.
7125 (grub_script_yyparse): Likewise.
7126 (grub_script_yyerror): Likewise.
7127 (grub_script_yylex): Likewise.
7128 (grub_script_lexer_init): Return the state.
7130 * normal/lexer.c (grub_script_lexer_state): Removed variable.
7131 (grub_script_lexer_done): Likewise.
7132 (grub_script_lexer_getline): Likewise.
7133 (grub_script_lexer_refs): Likewise.
7135 (newscript): Likewise.
7137 (recording): Likewise.
7138 (recordpos): Likewise.
7139 (recordlen): Likewise.
7140 (grub_script_lexer_init): Return the state instead of setting
7142 (grub_script_lexer_ref): Use the newly added argument for state
7144 (grub_script_lexer_deref): Likewise.
7145 (grub_script_lexer_record_start): Likewise.
7146 (grub_script_lexer_record_stop): Likewise.
7147 (recordchar): Likewise.
7148 (nextchar): Likewise.
7149 (grub_script_yylex2): Likewise.
7150 (grub_script_yylex): Likewise.
7151 (grub_script_yyerror): Likewise.
7153 * normal/parser.y (func_mem): Removed variable.
7154 (menu_entry): Likewise.
7156 (%lex-param): New parser option.
7157 (%parse-param): Likewise.
7158 (script): Always return the AST.
7159 (argument): Pass the state around.
7160 (arguments): Likewise.
7161 (grubcmd): Likewise.
7162 (commands): Likewise.
7163 (function): Likewise.
7164 (menuentry): Likewise.
7165 (if_statement): Likewise.
7168 * normal/script.c (grub_script_memused): Removed variable.
7169 (grub_script_parsed): Likewise.
7170 (grub_script_malloc): Added a state argument. Use that instead of
7172 (grub_script_mem_record): Likewise.
7173 (grub_script_mem_record_stop): Likewise.
7174 (grub_script_arg_add): Likewise.
7175 (grub_script_add_arglist): Likewise.
7176 (grub_script_create_cmdline): Likewise.
7177 (grub_script_create_cmdif): Likewise.
7178 (grub_script_create_cmdmenu): Likewise.
7179 (grub_script_add_cmd): Likewise.
7180 (grub_script_parse): Setup the state before calling the parser.
7182 2006-04-16 Marco Gerards <marco@gnu.org>
7184 * normal/command.c (grub_command_init): Remove the title command.
7186 * normal/lexer.c (grub_script_yylex): Renamed from this...
7187 (grub_script_yylex2): ... to this.
7188 (grub_script_yylex): New function. Temporary
7189 introduced to filter some tokens.
7190 (grub_script_yyerror): Print a newline.
7192 * normal/main.c (read_config_file): Output information about the
7193 lines that contain errors. Wait for a key after all lines have
7194 been processed. Don't return an empty menu.
7196 * normal/parser.y (func_mem): Don't initialize.
7197 (menu_entry): Likewise.
7198 (err): New variable.
7199 (script): Don't return anything when an error was encountered.
7200 (ws, returns): Removed rules.
7201 (argument): Disabled concatenated variable support.
7202 (arguments): Remove explicit separators.
7203 (grubcmd): Likewise.
7204 (function): Likewise.
7205 (menuentry): Likewise.
7207 (commands): Likewise. Add error handling.
7209 * normal/script.c (grub_script_create_cmdline): If
7210 `grub_script_parsed' is 0, assume the parser encountered an error.
7212 2006-04-02 Yoshinori K. Okuji <okuji@enbug.org>
7214 * configure.ac: Add support for EFI. Fix the typo
7215 BUILD_LDDFLAGS. Restore the LDFLAGS after testing.
7217 2006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
7219 * util/unifont2pff.rb: Removed unnecessary byte ordering. Now
7220 foreign multibyte characters should be shown correctly.
7222 2006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
7224 * normal/main.c (grub_normal_menu_addentry): Fixed menu size
7226 (read_config_file): Made it to close file before returning.
7228 2006-03-31 Vesa Jaaskelainen <chaac@nic.fi>
7230 * DISTLIST: Added include/grub/i386/pc/vbeblit.h,
7231 include/grub/i386/pc/vbefill.h, video/i386/pc/vbeblit.c,
7232 video/i386/pc/vbefill.c.
7234 * conf/i386-pc.rmk (vbe_mod_SOURCES): Added video/i386/pc/vbeblit.c,
7235 video/i386/pc/vbefill.c.
7237 * include/grub/video.h (grub_video_blit_format): New enum.
7238 (grub_video_mode_info): Added new member blit_format.
7239 (grub_video_get_blit_format): New function prototype.
7241 * include/grub/i386/pc/vbe.h (grub_video_vbe_get_video_ptr): New
7243 (grub_video_vbe_map_rgb): Likewise.
7244 (grub_video_vbe_unmap_color): Likewise.
7246 * include/grub/i386/pc/vbeblit.h: New file.
7248 * include/grub/i386/pc/vbefill.h: New file.
7250 * video/video.c (grub_video_get_blit_format): New function.
7251 (grub_video_vbe_get_video_ptr): Re-declared as non-static.
7252 (grub_video_vbe_map_rgb): Likewise.
7253 (grub_video_vbe_unmap_color): Likewise.
7255 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Changed to use more
7257 (grub_video_vbe_blit_render_target): Changed to use more optimized
7259 (grub_video_vbe_setup): Added detection for optimized settings.
7260 (grub_video_vbe_create_render_target): Likewise.
7262 * video/i386/pc/vbeblit.c: New file.
7264 * video/i386/pc/vbefill.c: New file.
7266 2006-03-30 Vesa Jaaskelainen <chaac@nic.fi>
7268 * font/manager.c (grub_font_get_glyph): Removed font fixup from
7271 * util/unifont2pff.rb: ... and moved it to here. Improved argument
7272 parsing to support both hex and dec ranges. If filename was missing
7273 show usage information.
7275 2006-03-14 Vesa Jaaskelainen <chaac@nic.fi>
7277 * DISTLIST: Added include/grub/video.h, term/gfxterm.c,
7278 video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c.
7280 * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod,
7281 gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod.
7282 (video_mod_SOURCES): Added.
7283 (video_mod_CFLAGS): Likewise.
7284 (video_mod_LDFLAGS): Likewise.
7285 (gfxterm_mod_SOURCES): Likewise.
7286 (gfxterm_mod_CFLAGS): Likewise.
7287 (gfxterm_mod_LDFLAGS): Likewise.
7288 (videotest_mod_SOURCES): Likewise.
7289 (videotest_mod_CFLAGS): Likewise.
7290 (videotest_mod_LDFLAGS): Likewise.
7291 (vesafb_mod_SOURCES): Removed.
7292 (vesafb_mod_CFLAGS): Likewise.
7293 (vesafb_mod_LDFLAGS): Likewise.
7294 (vga_mod_SOURCES): Likewise.
7295 (vga_mod_CFLAGS): Likewise.
7296 (vga_mod_LDFLAGS): Likewise.
7298 * commands/videotest.c: New file.
7300 * font/manager.c (fill_with_default_glyph): Modified to use
7302 (grub_font_get_glyph): Likewise.
7303 (fontmanager): Renamed from this...
7304 (font_manager): ... to this.
7306 * include/grub/font.h (grub_font_glyph): Added new structure.
7307 (grub_font_get_glyph): Modified to use grub_font_glyph.
7309 * include/grub/misc.h (grub_abs): Added as inline function.
7311 * include/grub/video.h: New file.
7313 * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro.
7314 (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise.
7315 (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise.
7316 (grub_vbe_get_controller_info): Renamed from this...
7317 (grub_vbe_bios_get_controller_info): ... to this.
7318 (grub_vbe_get_mode_info): Renamed from this...
7319 (grub_vbe_bios_get_mode_info): ... to this.
7320 (grub_vbe_set_mode): Renamed from this...
7321 (grub_vbe_bios_set_mode): ... to this.
7322 (grub_vbe_get_mode): Renamed from this...
7323 (grub_vbe_bios_get_mode): ... to this.
7324 (grub_vbe_set_memory_window): Renamed from this...
7325 (grub_vbe_bios_set_memory_window): ... to this.
7326 (grub_vbe_get_memory_window): Renamed from this...
7327 (grub_vbe_bios_get_memory_window): ... to this.
7328 (grub_vbe_set_scanline_length): Renamed from this...
7329 (grub_vbe_set_scanline_length): ... to this.
7330 (grub_vbe_get_scanline_length): Renamed from this...
7331 (grub_vbe_bios_get_scanline_length): ... to this.
7332 (grub_vbe_set_display_start): Renamed from this...
7333 (grub_vbe_bios_set_display_start): ... to this.
7334 (grub_vbe_get_display_start): Renamed from this...
7335 (grub_vbe_bios_get_display_start): ... to this.
7336 (grub_vbe_set_palette_data): Renamed from this...
7337 (grub_vbe_bios_set_palette_data): ... to this.
7338 (grub_vbe_set_pixel_rgb): Removed.
7339 (grub_vbe_set_pixel_index): Likewise.
7341 * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed
7343 (grub_vbe_bios_get_controller_info): ... to this.
7344 (grub_vbe_get_mode_info): Renamed from this...
7345 (grub_vbe_bios_get_mode_info): ... to this.
7346 (grub_vbe_set_mode): Renamed from this...
7347 (grub_vbe_bios_set_mode): ... to this.
7348 (grub_vbe_get_mode): Renamed from this...
7349 (grub_vbe_bios_get_mode): ... to this.
7350 (grub_vbe_set_memory_window): Renamed from this...
7351 (grub_vbe_bios_set_memory_window): ... to this.
7352 (grub_vbe_get_memory_window): Renamed from this...
7353 (grub_vbe_bios_get_memory_window): ... to this.
7354 (grub_vbe_set_scanline_length): Renamed from this...
7355 (grub_vbe_set_scanline_length): ... to this.
7356 (grub_vbe_get_scanline_length): Renamed from this...
7357 (grub_vbe_bios_get_scanline_length): ... to this.
7358 (grub_vbe_set_display_start): Renamed from this...
7359 (grub_vbe_bios_set_display_start): ... to this.
7360 (grub_vbe_get_display_start): Renamed from this...
7361 (grub_vbe_bios_get_display_start): ... to this.
7362 (grub_vbe_set_palette_data): Renamed from this...
7363 (grub_vbe_bios_set_palette_data): ... to this.
7364 (grub_vbe_bios_get_controller_info): Fixed problem with registers
7365 getting corrupted after calling it. Added more pushes and pops.
7366 (grub_vbe_bios_set_mode): Likewise.
7367 (grub_vbe_bios_get_mode): Likewise.
7368 (grub_vbe_bios_get_memory_window): Likewise.
7369 (grub_vbe_bios_set_scanline_length): Likewise.
7370 (grub_vbe_bios_get_scanline_length): Likewise.
7371 (grub_vbe_bios_get_display_start): Likewise.
7372 (grub_vbe_bios_set_palette_data): Likewise.
7374 * normal/cmdline.c (cl_set_pos): Refresh the screen.
7375 (cl_insert): Likewise.
7376 (cl_delete): Likewise.
7378 * term/gfxterm.c: New file.
7380 * term/i386/pc/vesafb.c: Removed file.
7382 * video/video.c: New file.
7384 * video/i386/pc/vbe.c (real2pm): Added new function.
7385 (grub_video_vbe_draw_pixel): Likewise.
7386 (grub_video_vbe_get_video_ptr): Likewise.
7387 (grub_video_vbe_get_pixel): Likewise
7388 (grub_video_vbe_init): Likewise.
7389 (grub_video_vbe_fini): Likewise.
7390 (grub_video_vbe_setup): Likewise.
7391 (grub_video_vbe_get_info): Likewise.
7392 (grub_video_vbe_set_palette): Likewise.
7393 (grub_video_vbe_get_palette): Likewise.
7394 (grub_video_vbe_set_viewport): Likewise.
7395 (grub_video_vbe_get_viewport): Likewise.
7396 (grub_video_vbe_map_color): Likewise.
7397 (grub_video_vbe_map_rgb): Likewise.
7398 (grub_video_vbe_map_rgba): Likewise.
7399 (grub_video_vbe_unmap_color): Likewise.
7400 (grub_video_vbe_fill_rect): Likewise.
7401 (grub_video_vbe_blit_glyph): Likewise.
7402 (grub_video_vbe_blit_bitmap): Likewise.
7403 (grub_video_vbe_blit_render_target): Likewise.
7404 (grub_video_vbe_scroll): Likewise.
7405 (grub_video_vbe_swap_buffers): Likewise.
7406 (grub_video_vbe_create_render_target): Likewise.
7407 (grub_video_vbe_delete_render_target): Likewise.
7408 (grub_video_vbe_set_active_render_target): Likewise.
7409 (grub_vbe_set_pixel_rgb): Remove function.
7410 (grub_vbe_set_pixel_index): Likewise.
7411 (index_color_mode): Remove static variable.
7412 (active_mode): Likewise.
7413 (framebuffer): Likewise.
7414 (bytes_per_scan_line): Likewise.
7415 (grub_video_vbe_adapter): Added new static variable.
7416 (framebuffer): Likewise.
7417 (render_target): Likewise.
7418 (initial_mode): Likewise.
7419 (mode_in_use): Likewise.
7420 (mode_list): Likewise.
7422 2006-03-10 Marco Gerards <marco@gnu.org>
7424 * configure.ac (AC_INIT): Bumped to 1.93.
7426 * DISTLIST: Added `include/grub/hfs.h'.
7428 2006-02-01 Yoshinori K. Okuji <okuji@enbug.org>
7430 * boot/i386/pc/boot.S (general_error): Before looping, try INT
7431 18H, which might help the BIOS falling back to next boot media.
7433 2006-01-25 Yoshinori K. Okuji <okuji@enbug.org>
7435 * util/i386/pc/grub-install.in: Escape a backslash. Reported by
7436 Poe Chen <poe.poechen@gmail.com>.
7438 2006-01-17 Marco Gerards <marco@gnu.org>
7440 * include/grub/normal.h: Include <grub/script.h>.
7441 (grub_command_list): Removed struct.
7442 (grub_command_list_t): Removed type.
7443 (grub_menu_entry): Remove members `num' and `command_list'. Add
7444 members `commands' and `sourcecode'.
7445 * include/grub/script.h: Add inclusion guards.
7446 (grub_script_cmd_menuentry): New struct.
7447 (grub_script_execute_menuentry): New prototype.
7448 (grub_script_lexer_record_start): Likewise.
7449 (grub_script_lexer_record_stop): Likewise.
7450 * normal/execute.c (grub_script_execute_menuentry): New function.
7451 * normal/lexer.c (record, recording, recordpos, recordlen): New
7453 (grub_script_lexer_record_start): New function.
7454 (grub_script_lexer_record_stop): Likewise.
7455 (recordchar): Likewise.
7456 (nextchar): Likewise.
7457 (grub_script_yylex): Use `nextchar' to fetch new characters. Use
7458 2048 as the buffer size. Add the tokens `menuentry' and `@'.
7459 * normal/main.c: Include <grub/parser.h> and <grub/script.h>
7460 (current_menu): New variable.
7461 (free_menu): Mainly rewritten.
7462 (grub_normal_menu_addentry): New function.
7463 (read_config_file): Rewritten.
7464 * normal/menu.c (run_menu_entry): Mainly rewritten.
7465 * normal/menu_entry.c (make_screen): Rewritten the code to insert
7467 (run): Mainly rewritten.
7468 * normal/parser.y (menu_entry): New variable.
7469 (GRUB_PARSER_TOKEN_MENUENTRY): New token.
7470 (menuentry): New rule.
7471 (command): Add `menuentry'.
7472 (if_statement): Allow additional returns before `fi'.
7473 * normal/script.c (grub_script_create_cmdmenu): New function.
7475 2006-01-03 Marco Gerards <marco@gnu.org>
7477 * INSTALL: GNU Bison is required.
7478 * configure.ac: Rewritten the test to detect Bison.
7479 * Makefile.in (YACC): New variable. Reported by Xun Sun
7480 <xun.sun.cn@gmail.com>.
7482 2006-01-03 Marco Gerards <marco@gnu.org>
7484 * fs/hfsplus.c (grub_hfsplus_read_block): Convert the offset of
7485 the HFS+ filesystem to filesystem blocks.
7486 (grub_hfsplus_iterate_dir): Cast the `fileinfo' assignment so a
7487 GCC warning is silenced.
7489 2006-01-03 Marco Gerards <marco@gnu.org>
7491 * partmap/apple.c (apple_partition_map_iterate): Convert the data
7492 read from disk from big endian to host byte order.
7494 2006-01-03 Hollis Blanchard <hollis@penguinppc.org>
7496 * fs/hfs.c: Include <grub/hfs.h>. Added reference to the official
7498 (GRUB_HFS_EMBED_HFSPLUS_SIG): New macro.
7499 (grub_hfs_mount): Grammar fix in error. Make sure this is not an
7500 embedded HFS+ filesystem.
7501 (GRUB_HFS_MAGIC, grub_hfs_extent, grub_hfs_datarecord_t)
7502 (grub_hfs_sblock): Move from here...
7503 * include/grub/hfs.h: To here... New file.
7504 * fs/hfsplus.c: Include <grub/hfs.h>. Added reference to the official
7506 (GRUB_HFSPLUS_MAGIC, GRUB_HFSPLUSX_MAGIC, GRUB_HFSPLUS_SBLOCK):
7508 (grub_hfsplus_volheader): Change type of member `magic' to
7510 (grub_hfsplus_data): Add new member `embedded_offset'.
7511 (grub_hfsplus_read_block): Add the HFS+ wrapper offset to the
7513 (grub_hfsplus_mount): Read the HFS+ wrapper if it exists.
7514 Calculate the offset.
7516 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
7518 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRP_ADDR):
7520 (GRUB_BOOT_MACHINE_DRP_SIZE): Likewise.
7522 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
7524 * kern/env.c (grub_env_set): Check if ENV->VALUE instead of
7525 ENV->NAME is NULL after allocating ENV->VALUE.
7527 2005-12-25 Marco Gerards <marco@gnu.org>
7529 * kern/env.c (grub_env_set): Rewritten the error handling code.
7531 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
7533 * geninit.sh: Made more robust, and more portable.
7535 2005-12-25 Marco Gerards <marco@gnu.org>
7537 Add support for Apple HFS+ filesystems.
7539 * fs/hfsplus.c: New file.
7541 * DISTLIST: Added `fs/hfsplus.c'.
7543 * conf/common.rmk (pkgdata_MODULES): Add `hfsplus.mod'.
7544 (hfsplus_mod_SOURCES): New variable.
7545 (hfsplus_mod_CFLAGS): Likewise.
7546 (hfsplus_mod_LDFLAGS): Likewise.
7547 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/hfsplus.c'.
7548 (grub_setup_SOURCES): Likewise.
7549 (grub_mkdevicemap_SOURCES): Likewise.
7550 (grub_emu_SOURCES): Likewise.
7551 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7553 * fs/fshelp.c (grub_fshelp_log2blksize): New function.
7555 * include/grub/fshelp.h (grub_fshelp_log2blksize): new prototype.
7557 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
7559 * DISTLIST: Added geninitheader.sh, geninit.sh, commands/test.c,
7560 commands/i386/pc/play.c, conf/common.mk, conf/common.rmk,
7561 include/grub/parser.h, include/grub/script.h, kern/parser.c,
7562 kern/sparc64/cache.S, normal/execute.c, normal/function.c,
7563 normal/lexer.c, normal/parser.y, normal/script.c, and
7565 Removed kern/sparc64/cache.c.
7567 * conf/common.rmk (DISTCLEANFILES): Added grub_script.tab.c,
7568 grub_script.tab.h, grub_modules_init.lst, grub_modules_init.h,
7571 * configure.ac (AC_INIT): Bumped to 1.92.
7573 2005-12-24 Vesa Jaaskelainen <chaac@nic.fi>
7575 * kern/err.c (grub_error_push): Added new function to support error
7577 (grub_error_pop): Likewise.
7578 (grub_error_stack_items): New local variable to support error stacks.
7579 (grub_error_stack_pos): Likewise.
7580 (grub_error_stack_assert): Likewise.
7581 (GRUB_ERROR_STACK_SIZE): Added new define to configure maximum error
7583 (grub_print_error): Added support to print errors from error stack.
7585 * include/grub/err.h (grub_error_push): Added function prototype.
7586 (grub_error_pop): Likewise.
7588 2005-12-09 Hollis Blanchard <hollis@penguinppc.org>
7590 * configure.ac: Accept `powerpc64' as host_cpu.
7591 (amd64): Rename to `biarch32'.
7593 * kern/powerpc/cache.S (grub_arch_sync_caches): Handle
7594 non-cacheline-aligned addresses.
7596 * kern/dl.c (grub_dl_load_core): Add grub_dprintf messages.
7597 (grub_dl_flush_cache): Likewise. Only call `grub_arch_sync_caches'
7598 if `size' is non-zero.
7600 2005-12-03 Marco Gerards <mgerards@xs4all.nl>
7602 * conf/common.rmk (grub_modules_init.lst): Use `-printf "%P\n"'
7603 and `cd' to make sure the filename is not prefixed with a
7605 (pkgdata_MODULES): Add `gpt.mod'.
7606 (gpt_mod_SOURCES): New variable.
7607 (gpt_mod_CFLAGS): Likewise.
7608 (gpt_mod_LDFLAGS): Likewise.
7610 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/gpt.c'.
7612 * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_GPT_DISK):
7615 * partmap/gpt.c: New file.
7617 * partmap/pc.c (pc_partition_map_iterate): Don't continue when a
7618 GPT partition map is detected.
7620 2005-12-03 Vincent Pelletier <subdino2004@yahoo.fr>
7622 * commands/i386/pc/play.c: New file.
7623 * conf/i386-pc.rmk (pkgdata_MODULES): Added play.mod.
7624 (play_mod_SOURCES, play_mod_CFLAGS, play_mod_LDFLAGS): New
7627 2005-11-27 Marco Gerards <mgerards@xs4all.nl>
7629 * include/grub/dl.h (GRUB_MOD_INIT): Use `__attribute__
7630 ((unused))' to silence gcc warning.
7632 2005-11-26 Hollis Blanchard <hollis@penguinppc.org>
7634 * configure.ac: Correct `AC_PROG_YACC' test.
7636 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
7638 * util/powerpc/ieee1275/grub-install.in: Run the mount point
7639 check before installing files.
7641 2005-11-22 Mike Small <smallm@panix.com>
7643 * util/powerpc/ieee1275/grub-install.in (grubdir): Fixed partition
7644 number regex so multidigit numbers are recognized correctly.
7646 2005-11-22 Mike Small <smallm@panix.com>
7648 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Add a
7649 debugging message before attempting to claim memory.
7650 (grub_rescue_cmd_initrd): Add a claim debugging message and try
7651 multiple addresses in case of failure.
7653 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
7655 * term/tparm.c (get_space): Remove empty `if' statement.
7657 * fs/ufs.c (grub_ufs_find_file): Remove `grub_le_to_cpu32'.
7659 * kern/parser.c (check_varstate): Rename `state' to 's'.
7661 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
7663 * partmap/acorn.c: Change `unsigned' to `unsigned int'. Move all
7664 variable definitions to the beginning of each function. Sort stack
7666 (find): Rename to `acorn_partition_map_find'. Cast `grub_disk_read'
7667 `buf' argument to `char *'.
7669 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
7671 * conf/powerpc-ieee1275.rmk: Include conf/common.mk.
7672 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
7673 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
7674 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
7675 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
7676 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
7677 configfile.mod, search.mod, gzio.mod and test.mod.
7678 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
7679 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
7680 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
7681 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
7682 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
7683 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
7684 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
7685 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
7686 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
7687 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
7688 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
7689 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
7690 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
7691 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
7692 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
7693 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
7694 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
7695 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
7696 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
7697 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
7698 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
7699 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
7700 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Removed.
7702 * conf/common.mk (grub_modules_init.lst): Use `find' instead of
7704 (pkgdata_MODULES): Add test.mod.
7706 2005-11-18 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
7708 * genmk.rb: Fixed list rules moved to Makefile.in. Recognise
7709 appending to variables with "+=".
7710 (PModule): Use full pathname to generate *.lst filenames.
7712 * Makefile.in: Fixed list rules moved from genmk.rb.
7713 (.DELETE_ON_ERROR): New special target.
7714 (RMKFILES): Add common.rmk and sparc64-ieee1275.rmk.
7716 * conf/i386-pc.rmk: Include conf/common.mk.
7717 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
7718 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
7719 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
7720 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
7721 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
7722 configfile.mod, search.mod, gzio.mod and test.mod.
7723 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
7724 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
7725 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
7726 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
7727 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
7728 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
7729 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
7730 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
7731 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
7732 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
7733 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
7734 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
7735 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
7736 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
7737 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
7738 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
7739 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
7740 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
7741 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
7742 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
7743 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
7744 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
7745 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Move from
7747 * conf/common.rmk: ... to here. New file.
7749 * conf/common.mk: New file.
7751 2005-11-18 Yoshinori K. Okuji <okuji@enbug.org>
7753 * conf/powerpc-ieee1275.rmk (grub_script.tab.h): Unified to ...
7754 (grub_script.tab.c): ... here.
7756 * conf/sparc64-ieee1275.rmk (grub_script.tab.h): Unified to ...
7757 (grub_script.tab.c): ... here.
7759 * conf/i386-pc.rmk (grub_script.tab.h): Unified to ...
7760 (grub_script.tab.c): ... here.
7762 * normal/command.c (grub_command_find): Fixed a memory leak of
7763 MODULE_NAME. Reported by Mike Small <smallm@panix.com>.
7765 2005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
7767 * include/grub/symbol.h: (FUNCTION): Use double quotes instead of
7768 "@" which marks the start of a comment on ARM.
7769 (VARIABLE): Likewise.
7771 2005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
7773 Add support for Linux/ADFS partition tables.
7775 * partmap/acorn.c: New file.
7777 * include/grub/acorn_filecore.h: Likewise.
7779 * DISTLIST: Added `partmap/acorn.c' and
7780 `include/grub/acorn_filecore.h'.
7782 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
7784 (pkgdata_MODULES): Add `acorn.mod'.
7785 (acorn_mod_SOURCES): New variable.
7786 (acorn_mod_CFLAGS): Likewise.
7788 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
7790 (pkgdata_MODULES): Add `acorn.mod'.
7791 (acorn_mod_SOURCES): New variable.
7792 (acorn_mod_CFLAGS): Likewise.
7794 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/acorn.c'.
7795 (pkgdata_MODULES): Add `acorn.mod'.
7796 (acorn_mod_SOURCES): New variable.
7797 (acorn_mod_CFLAGS): Likewise.
7798 (acorn_mod_LDFLAGS): Likewise.
7800 * include/types.h (grub_disk_addr_t): New typedef.
7802 2005-11-13 Marco Gerards <mgerards@xs4all.nl>
7804 * geninit.sh: New file.
7806 * geninitheader.sh: Likewise.
7808 * commands/boot.c (grub_boot_init, grub_boot_fini): Removed.
7809 * commands/cat.c (grub_cat_init, grub_cat_fini): Likewise.
7810 * commands/cmp.c (grub_cmp_init, grub_cmp_fini): Likewise.
7811 * commands/configfile.c (grub_configfile_init)
7812 (grub_configfile_fini): Likewise.
7813 * commands/default.c (grub_default_init, grub_default_fini):
7815 * commands/help.c (grub_help_init, grub_help_fini): Likewise.
7816 * commands/ls.c (grub_ls_init, grub_ls_fini): Likewise.
7817 * commands/search.c (grub_search_init, grub_search_fini): Likewise.
7818 * commands/terminal.c (grub_terminal_init, grub_terminal_fini):
7820 * commands/test.c (grub_test_init, grub_test_fini): Likewise.
7821 * commands/timeout.c (grub_timeout_init, grub_timeout_fini):
7823 * commands/i386/pc/halt.c (grub_halt_init, grub_halt_fini): Likewise.
7824 * commands/ieee1275/halt.c (grub_halt_init, grub_halt_fini):
7826 * commands/i386/pc/reboot.c (grub_reboot_init, grub_reboot_fini):
7828 * commands/ieee1275/reboot.c (grub_reboot_init, grub_reboot_fini):
7830 * disk/loopback.c (grub_loop_init, grub_loop_fini): Likewise.
7831 * fs/affs.c (grub_affs_init, grub_affs_fini): Likewise.
7832 * fs/ext2.c (grub_ext2_init, grub_ext2_fini): Likewise.
7833 * fs/fat.c (grub_fat_init, grub_fat_fini): Likewise.
7834 * fs/hfs.c (grub_hfs_init, grub_hfs_fini): Likewise.
7835 * fs/iso9660.c (grub_iso9660_init, grub_iso9660_fini): Likewise.
7836 * fs/jfs.c (grub_jfs_init, grub_jfs_fini): Likewise.
7837 * fs/minix.c (grub_minix_init, grub_minix_fini): Likewise.
7838 * fs/sfs.c (grub_sfs_init, grub_sfs_fini): Likewise.
7839 * fs/ufs.c (grub_ufs_init, grub_ufs_fini): Likewise.
7840 * fs/xfs.c (grub_xfs_init, grub_xfs_fini): Likewise.
7841 * normal/main.c (grub_normal_init, grub_normal_fini): Likewise.
7842 * partmap/amiga.c (grub_amiga_partition_map_init)
7843 (grub_amiga_partition_map_fini): Likewise.
7844 * partmap/apple.c (grub_apple_partition_map_init)
7845 (grub_apple_partition_map_fini): Likewise.
7846 * partmap/pc.c (grub_pc_partition_map_init)
7847 (grub_pc_partition_map_fini): Likewise.
7848 * partmap/sun.c (grub_sun_partition_map_init,
7849 grub_sun_partition_map_fini): Likewise.
7850 * term/terminfo.c (grub_terminal_init, grub_terminal_fini):
7853 * util/grub-emu.c: Include <grub_modules_init.h>.
7854 (main): Don't initialize and de-initialize any modules directly,
7855 use `grub_init_all' and `grub_fini_all' instead.
7857 * term/i386/pc/vesafb.c (grub_vesafb_init): Renamed to
7858 `grub_vesafb_mod_init'.
7859 (grub_vesafb_fini): Renamed to `grub_vesafb_mod_fini'. Updated
7861 * term/i386/pc/vga.c (grub_vga_init): Renamed to
7862 `grub_vga_mod_init'. Updated all users.
7863 (grub_vga_fini): Renamed to `grub_vga_mod_fini'.
7865 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `grub_emu_init.c'.
7866 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c): New
7869 * include/grub/dl.h (GRUB_MOD_INIT): Add argument `name'.
7870 Generate a function to initialize the module in utilities.
7871 Updated all callers.
7872 (GRUB_MOD_FINI): Add argument `name'. Generate a function to
7873 initialize the module in utilities. Updated all callers.
7875 2005-11-09 Hollis Blanchard <hollis@penguinppc.org>
7877 * term/ieee1275/ofconsole.c (grub_ofconsole_cls): Use both the ANSI
7878 escape sequence and a literal ^L to clear the screen.
7880 * commands/ieee1275/suspend.c (grub_cmd_suspend): Clear the screen
7881 when returning from Open Firmware.
7883 2005-11-09 Hollis Blanchard <hollis@penguinppc.org>
7885 * term/ieee1275/ofconsole.c (grub_ofconsole_width): New variable.
7886 (grub_ofconsole_height): Likewise.
7887 (grub_ofconsole_putchar): If `grub_curr_x' exceeds console width,
7888 manually insert a '\n'.
7889 (grub_ofconsole_getwh): Set and return `grub_ofconsole_width' and
7890 `grub_ofconsole_height'. Return early if these are already set.
7892 2005-11-07 Vincent Pelletier <subdino2004@yahoo.fr>
7894 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
7895 `commands/test.c', `fs/affs.c', `fs/sfs.c', `fs/xfs.c',
7896 `normal/execute.c', `normal/lexer.c', `io/gzio.c',
7897 `kern/parser.c', `grub_script.tab.c', `normal/function.c'
7898 and `normal/script.c'.
7899 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
7900 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
7901 (test_mod_SOURCES): New variable.
7902 (test_mod_CFLAGS): Likewise.
7903 (test_mod_LDFLAGS): Likewise.
7904 (pkgdata_MODULES): Add `test.mod'.
7905 (grub_script.tab.c): New rule.
7906 (grub_script.tab.h): Likewise.
7908 2005-11-07 Marco Gerards <mgerards@xs4all.nl>
7910 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
7911 `commands/test.c', `normal/execute.c', `normal/lexer.c',
7912 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
7913 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
7914 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
7915 (test_mod_SOURCES): New variable.
7916 (test_mod_CFLAGS): Likewise.
7917 (pkgdata_MODULES): Add `test.mod'.
7918 (grub_script.tab.c): New rule.
7919 (grub_script.tab.h): Likewise.
7921 2005-11-06 Marco Gerards <mgerards@xs4all.nl>
7923 Add initial scripting support.
7925 * commands/test.c: New file.
7926 * include/grub/script.h: Likewise.
7927 * normal/execute.c: Likewise.
7928 * normal/function.c: Likewise.
7929 * normal/lexer.c: Likewise.
7930 * normal/parser.y: Likewise.
7931 * normal/script.c: Likewise.
7933 * configure.ac: Add `AC_PROG_YACC' test.
7935 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/test.c',
7936 `normal/execute.c', `normal/lexer.c', `grub_script.tab.c',
7937 `normal/function.c' and `normal/script.c'.
7938 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
7939 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
7940 (test_mod_SOURCES, test_mod_CFLAGS, test_mod_LDFLAGS): New
7942 (pkgdata_MODULES): Add `test.mod'.
7943 (grub_script.tab.c): New rule.
7944 (grub_script.tab.h): Likewise.
7946 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TEST_FAILURE'.
7948 * include/grub/normal.h (grub_test_init): New prototype.
7949 (grub_test_fini): Likewise.
7951 * normal/command.c: Include <grub/script.h>.
7952 (grub_command_execute): Rewritten.
7954 * util/grub-emu.c (main): Call `grub_test_init' and
7957 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
7959 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Initialize `msecs'
7961 * term/ieee1275/ofconsole.c (grub_ofconsole_checkkey): Return -1 if
7962 there are no pending characters.
7964 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
7966 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_get_devname): Use
7967 `grub_strndup' to drop device arguments. Replace unnecessary
7968 `grub_strndup' with `grub_strdup'.
7970 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
7972 * kern/term.c (grub_cls): Do not call grub_cur_term->cls() if the
7973 `debug' environment variable has been set.
7975 2005-11-02 Hollis Blanchard <hollis@penguinppc.org>
7977 * Makefile.in (install-local): Use $(DATA).
7978 (uninstall): Likewise.
7979 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Move grub-mkimage...
7980 (sbin_UTILITIES): ... to here.
7981 (sbin_SCRIPTS): New variable.
7982 (grub_install_SOURCES): New variable.
7983 * util/powerpc/ieee1275/grub-install.in: New file.
7984 * util/powerpc/ieee1275/grub-mkimage.c (kernel_path): Remove
7986 (add_segments): Call `grub_util_get_path'.
7988 2005-10-28 Yoshinori K. Okuji <okuji@enbug.org>
7990 From Timothy Baldwin:
7991 * commands/ls.c (grub_ls_list_files): Close FILE with
7993 * kern/misc.c (grub_vsprintf): Terminate the string S with NUL.
7995 2005-10-24 Marco Gerards <mgerards@xs4all.nl>
7997 * include/grub/parser.h: New file.
7999 * kern/parser.c: Likewise.
8001 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/parser.c'.
8002 (grub_setup_SOURCES): Likewise.
8003 (grub_probefs_SOURCES): Likewise.
8004 (grub_emu_SOURCES): Likewise.
8005 (kernel_img_HEADERS): Add `parser.h'.
8007 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
8008 (grub_emu_SOURCES): Add `kern/parser.c'.
8009 (grubof_SOURCES): Likewise.
8011 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
8012 (grubof_SOURCES): Add `kern/parser.c'.
8014 * include/grub/misc.h (grub_split_cmdline): Removed prototype.
8016 * kern/misc.c (grub_split_cmdline): Removed function.
8018 * kern/rescue.c: Include <grub/parser.h>.
8019 (grub_enter_rescue_mode): Use `grub_parser_split_cmdline' instead
8020 of `grub_split_cmdline'.
8022 * normal/command.c: Include <grub/parser.h>.
8023 (grub_command_execute): Use `grub_parser_split_cmdline' instead
8024 of `grub_split_cmdline'.
8026 * normal/completion.c: Include <grub/parser.h>.
8027 (cmdline_state): New variable.
8028 (iterate_dir): End the filename with a quote depending on the
8030 (get_state): new function.
8031 (grub_normal_do_completion): Use `grub_parser_split_cmdline' to
8032 split the arguments and determine the current argument. When the
8033 argument string is not quoted, escape all spaces.
8035 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
8037 * normal/sparc64/setjmp.S: New file.
8039 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
8041 * include/grub/sparc64/libgcc.h: New file.
8042 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Remove -Av9.
8043 (normal_mod_SOURCES): Use normal/sparc64/setjmp.S instead of
8044 normal/sparc64/setjmp.c.
8046 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
8048 * kern/sparc64/dl.c: Rewritten for SPARCV9 ELF.
8049 * kern/sparc64/cache.S: New file.
8050 * kern/sparc64/cache.c: Removed.
8051 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Add -Av9.
8052 (COMMON_CFLAGS): Add -mno-app-regs. Remove -mcpu=v9 and
8054 (COMMON_LDFLAGS): Add -melf64_sparc.
8055 (grubof_HEADERS): Add sparc64/libgcc.h and machine/kernel.h.
8056 (grubof_SOURCES): Use cache.S instead of cache.c.
8057 (grubof_LDFLAGS): Add -mno-app-regs. Replace "-Xlinker
8058 --oformat -Xlinker elf64-sparc" by "-Bstatic,-melf64_sparc".
8059 (pkgdata_MODULES): Uncomment. Leave linux.mod and _linux.mod
8061 (normal_mod_SOURCES): Add normal/completion.c and normal/misc.c.
8062 (_linux_mod_SOURCES, _linux_mod_CFLAGS, linux_mod_SOURCES)
8063 (linux_mod_CFLAGS): Commented out.
8064 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS): New macro, commented
8065 out because module isn't built.
8066 (fshelp_mod_LDFLAGS, fat_mod_LDFLAGS, ext2_mod_LDFLAGS)
8067 (ufs_mod_LDFLAGS, minix_mod_LDFLAGS, hfs_mod_LDFLAGS)
8068 (jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS, normal_mod_LDFLAGS)
8069 (hello_mod_LDFLAGS, boot_mod_LDFLAGS, terminal_mod_LDFLAGS)
8070 (ls_mod_LDFLAGS, cmp_mod_LDFLAGS, cat_mod_LDFLAGS)
8071 (font_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
8072 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
8073 (suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS)
8074 (help_mod_LDFLAGS, default_mod_LDFLAGS, timeout_mod_LDFLAGS)
8075 (configfile_mod_LDFLAGS, search_mod_LDFLAGS, xfs_mod_SOURCES)
8076 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
8077 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
8078 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, gzio_mod_SOURCES)
8079 (gzio_mod_CFLAGS, gzio_mod_LDFLAGS): New macro.
8081 2005-10-20 Yoshinori K. Okuji <okuji@enbug.org>
8083 * util/i386/pc/grub-probefs.c (main): Call grub_xfs_init and
8084 grub_xfs_fini. Do not call grub_hfs_init or grub_hfs_fini any
8085 longer, because HFS should not be used on PC.
8087 2005-10-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
8089 * io/gzio.c (grub_gzio_read): Use OFFSET instead of FILE->OFFSET
8090 consistently within the loop.
8092 2005-10-15 Marco Gerards <mgerards@xs4all.nl>
8094 * fs/xfs.c (grub_xfs_iterate_dir): Detect an error if part of a
8095 directory can not be read.
8097 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
8099 * configure.ac (AC_INIT): Increase the version number to 1.91.
8101 * DISTLIST: Added include/grub/terminfo.h, include/grub/tparm.h,
8102 include/grub/i386/pc/serial.h, term/terminfo.c, term/tparm.c and
8103 term/i386/pc/serial.c.
8105 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
8107 * kern/file.c (grub_file_seek): Seeking to an offset equal to a
8108 file size must be permitted.
8110 * kern/i386/pc/startup.S (multiboot_trampoline): Fix a mistake
8111 between %ah and %al.
8113 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
8115 * fs/xfs.c (grub_xfs_iterate_dir): Change the type of BLK to
8117 Call the hook with a NUL-terminated filename.
8118 (grub_xfs_mount): Use grub_be_to_cpu32 instead of
8121 * kern/term.c (cursor_state): New variable.
8122 (grub_term_set_current): Reset the cursor state on a new
8124 (grub_setcursor): Rewritten to use CURSOR_STATE.
8125 (grub_getcursor): New function.
8127 * include/grub/term.h (grub_getcursor): New prototype.
8129 * io/gzio.c (test_header): Align BUF for accessing it as 32-bit
8130 integers on ARM. Reported by Timothy Baldwin
8131 <T.E.Baldwin99@members.leeds.ac.uk>.
8133 2005-10-11 Marco Gerards <mgerards@xs4all.nl>
8135 * fs/sfs.c (grub_sfs_open): Don't free `data->label' if it is not
8137 (grub_sfs_dir): Likewise.
8139 2005-10-09 Marco Gerards <mgerards@xs4all.nl>
8141 Add support for the SFS filesystem.
8143 * fs/sfs.c: New file.
8145 * DISTLIST: Added `fs/sfs.c'.
8147 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/sfs.c'.
8148 (grub_probefs_SOURCES): Likewise.
8149 (grub_emu_SOURCES): Likewise.
8150 (pkgdata_MODULES): Add `sfs.mod'.
8151 (sfs_mod_SOURCES): New variable.
8152 (sfs_mod_CFLAGS): Likewise.
8153 (sfs_mod_LDFLAGS): Likewise.
8155 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/sfs.c'.
8156 (pkgdata_MODULES): Add `sfs.mod'.
8157 (sfs_mod_SOURCES): New variable.
8158 (sfs_mod_CFLAGS): Likewise.
8160 * util/grub-emu.c (main): Call `grub_sfs_init' and
8163 * include/grub/fs.h (grub_sfs_init): New prototype.
8164 (grub_sfs_fini): Likewise.
8166 2005-10-07 Marco Gerards <mgerards@xs4all.nl>
8168 Add support for the AFFS filesystem.
8170 * fs/affs.c: New file.
8172 * DISTLIST: Added `fs/affs.c'.
8174 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/affs.c'.
8175 (grub_probefs_SOURCES): Likewise.
8176 (grub_emu_SOURCES): Likewise.
8177 (pkgdata_MODULES): Add `affs.mod'.
8178 (affs_mod_SOURCES): New variable.
8179 (affs_mod_CFLAGS): Likewise.
8180 (affs_mod_LDFLAGS): Likewise.
8182 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/affs.c'.
8183 (pkgdata_MODULES): Add `affs.mod'.
8184 (affs_mod_SOURCES): New variable.
8185 (affs_mod_CFLAGS): Likewise.
8187 * util/grub-emu.c (main): Call `grub_affs_init' and
8190 * include/grub/fs.h (grub_affs_init): New prototype.
8191 (grub_affs_fini): Likewise.
8193 2005-10-01 Marco Gerards <mgerards@xs4all.nl>
8195 * fs/xfs.c (grub_xfs_iterate_dir): Add parentheses.
8197 2005-10-01 Marco Gerards <mgerards@xs4all.nl>
8199 * configure.ac: Accept `x86_64' as host_cpu. In that case add
8202 * genmk.rb (class PModule): Always use `$(#{prefix}_LDFLAGS)' when
8205 * conf/i386-pc.rmk (COMMON_CFLAGS): Add `-m32'.
8206 (COMMON_LDFLAGS): New variable.
8207 (kernel_img_LDFLAGS): Include `COMMON_FLAGS'.
8208 (_chain_mod_LDFLAGS, fshelp_mod_LDFLAGS, fat_mod_LDFLAGS)
8209 (ext2_mod_LDFLAGS, ufs_mod_LDFLAGS, minix_mod_LDFLAGS)
8210 (hfs_mod_LDFLAGS, jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS)
8211 (xfs_mod_LDFLAGS, _linux_mod_LDFLAGS, linux_mod_LDFLAGS)
8212 (normal_mod_LDFLAGS, hello_mod_LDFLAGS, boot_mod_LDFLAGS)
8213 (terminal_mod_LDFLAGS, ls_mod_LDFLAGS, cmp_mod_LDFLAGS)
8214 (cat_mod_LDFLAGS, help_mod_LDFLAGS, reboot_mod_LDFLAGS)
8215 (halt_mod_LDFLAGS, vga_mod_LDFLAGS, font_mod_LDFLAGS)
8216 (terminfo_mod_LDFLAGS, serial_mod_LDFLAGS, _multiboot_mod_LDFLAGS)
8217 (multiboot_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
8218 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
8219 (default_mod_LDFLAGS, timeout_mod_LDFLAGS, configfile_mod_LDFLAGS)
8220 (vbe_mod_LDFLAGS, vesafb_mod_LDFLAGS, vbeinfo_mod_LDFLAGS)
8221 (vbetest_mod_LDFLAGS, search_mod_LDFLAGS, gzio_mod_LDFLAGS): New
8223 (normal_mod_ASFLAGS): Add `-m32'.
8225 * include/grub/types.h (grub_host_addr_t, grub_host_off_t)
8226 (grub_host_size_t, grub_host_ssize_t): New types.
8227 (grub_addr_t, grub_off_t, grub_size_t, grub_ssize_t): Make type
8228 dependent of `GRUB_CPU_SIZEOF_VOID_P' instead on
8229 `GRUB_HOST_SIZEOF_VOID_P'.
8231 * include/grub/kernel.h (struct grub_module_header): Type of
8232 member offset changed to `grub_host_off_t'. Type of member size
8233 changed to `grub_host_size_t'.
8234 (struct grub_module_info): Type of member offset changed to
8235 `grub_host_off_t'. Type of member size changed to
8238 2005-09-29 Yoshinori K. Okuji <okuji@enbug.org>
8240 Make GRUB's kernel compliant to Multiboot Specification.
8242 * kern/i386/pc/startup.S (multiboot_header): New label.
8243 (multiboot_entry): Likewise.
8244 (multiboot_trampoline): Likewise.
8246 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
8249 * fs/xfs.c (grub_xfs_iterate_dir): Fix a syntax error. You may not
8250 put parentheses after a question mark.
8251 [!GRUB_UTIL] (my_mod): New variable.
8253 * util/grub-emu.c (main): Call grub_xfs_init and grub_xfs_fini.
8255 2005-09-28 Marco Gerards <mgerards@xs4all.nl>
8257 Adds support for the XFS filesystem. Btrees are not supported
8260 * fs/xfs.c: New file.
8262 * DISTLIST: Added `fs/xfs.c'.
8264 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/xfs.c'.
8265 (grub_probefs_SOURCES): Likewise.
8266 (grub_emu_SOURCES): Likewise.
8267 (pkgdata_MODULES): Add `xfs.mod'.
8268 (xfs_mod_SOURCES): New variable.
8269 (xfs_mod_CFLAGS): Likewise.
8271 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/xfs.c'.
8272 (pkgdata_MODULES): Add `xfs.mod'.
8273 (xfs_mod_SOURCES): New variable.
8274 (xfs_mod_CFLAGS): Likewise.
8276 * util/grub-emu.c (main): Call `grub_xfs_init' and
8279 * include/grub/fs.h (grub_xfs_init): New prototype.
8280 (grub_xfs_fini): Likewise.
8283 2005-09-18 Vesa Jaaskelainen <chaac@nic.fi>
8285 * video/i386/pc/vbe.c (grub_vbe_set_video_mode): In indexed
8286 color modes, allow greater than 16 colors to be configured as
8289 2005-09-03 Yoshinori K. Okuji <okuji@enbug.org>
8291 * normal/completion.c (complete_arguments): Add the qualifier
8294 From Omniflux <omniflux+lists@omniflux.com>:
8295 * include/grub/terminfo.h: New file.
8296 * include/grub/tparm.h: Likewise.
8297 * include/grub/i386/pc/serial.h: Likewise.
8298 * term/terminfo.c: Likewise.
8299 * term/tparm.c: Likewise.
8300 * term/i386/pc/serial.c: Likewise.
8301 * conf/i386-pc.rmk (pkgdata_MODULES): Added terminfo.mod and
8303 (terminfo_mod_SOURCES): New variable.
8304 (terminfo_mod_CFLAGS): Likewise.
8305 (serial_mod_SOURCES): Likewise.
8306 (serial_mod_CFLAGS): Likewise.
8308 2005-08-31 Yoshinori K. Okuji <okuji@enbug.org>
8310 * DISTLIST: Replaced boot/powerpc/ieee1275/crt0.S and
8311 boot/powerpc/ieee1275/cmain.c with kern/powerpc/ieee1275/crt0.S
8312 and kern/powerpc/ieee1275/cmain.c, respectively.
8314 * boot/powerpc/ieee1275/crt0.S: Moved to ...
8315 * kern/powerpc/ieee1275/crt0.S: ... here.
8317 * boot/powerpc/ieee1275/cmain.c: Moved to ...
8318 * kern/powerpc/ieee1275/cmain.c: ... here.
8320 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Use
8321 kern/powerpc/ieee1275/crt0.S and kern/powerpc/ieee1275/cmain.c
8322 instead of boot/powerpc/ieee1275/crt0.S and
8323 boot/powerpc/ieee1275/cmain.c, respectively.
8325 * boot/i386/pc/boot.S (lba_mode): Do not store the total number of
8326 sectors. It was not used anyway.
8328 2005-08-30 Hollis Blanchard <hollis@penguinppc.org>
8330 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): Fix
8331 `unused parameter' warning.
8333 2005-08-30 Hollis Blanchard <hollis@penguinppc.org>
8335 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): New
8337 (grub_ofconsole_term): Specify grub_ofconsole_getcharwidth as
8340 2005-08-28 Marco Gerards <metgerards@student.han.nl>
8342 * include/grub/normal.h (enum grub_completion_type): Added
8343 `GRUB_COMPLETION_TYPE_ARGUMENT'.
8345 * normal/cmdline.c (print_completion): Handle
8346 the `GRUB_COMPLETION_TYPE_ARGUMENT' type.
8347 * normal/menu_entry.c (store_completion): Likewise.
8349 * normal/completion.c (complete_arguments): New function.
8350 (grub_normal_do_completion): Call `complete_arguments' when the
8351 current words start with a dash.
8353 2005-08-27 Marco Gerards <metgerards@student.han.nl>
8355 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Fix typo (use
8356 `gzio.mod' instead of `io.mod').
8358 2005-08-22 Yoshinori K. Okuji <okuji@enbug.org>
8360 * gendistlist.sh (EXTRA_DISTFILES): Added genfslist.sh.
8361 (DISTDIRS): Added io and video.
8362 Rewrite the search routine to make an output consistently.
8364 * DISTLIST: Added conf/sparc64-ieee1275.mk,
8365 conf/sparc64-ieee1275.rmk, include/grub/gzio.h,
8366 include/grub/ieee1275/ieee1275.h, include/grub/ieee1275/ofdisk.h,
8367 io/gzio.c, kern/sparc64/cache.c, kern/sparc64/dl.c,
8368 kern/sparc64/ieee1275/init.c, kern/sparc64/ieee1275/openfw.c and
8369 util/powerpc/ieee1275/misc.c.
8371 * include/grub/gzio.h: New file.
8372 * io/gzio.c: Likewise.
8374 * kern/file.c (grub_file_close): Call grub_device_close only if
8375 FILE->DEVICE is not NULL.
8377 * include/grub/mm.h [!NULL] (NULL): New macro.
8379 * include/grub/err.h (GRUB_ERR_BAD_GZIP_DATA): New constant.
8381 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added io/gzip.c.
8382 (pkgdata_MODULES): Added gzio.mod.
8383 (gzio_mod_SOURCES): New variable.
8384 (gzio_mod_CFLAGS): Likewise.
8386 * conf/i386-pc.rmk (grub_emu_SOURCES): Added io/gzip.c.
8387 (pkgdata_MODULES): Added gzio.mod.
8388 (gzio_mod_SOURCES): New variable.
8389 (gzio_mod_CFLAGS): Likewise.
8391 * commands/cat.c: Include grub/gzio.h.
8392 (grub_cmd_cat): Use grub_gzfile_open instead of
8395 * commands/cmp.c: Include grub/gzio.h.
8396 (grub_cmd_cmp): Use grub_gzfile_open instead of
8399 * loader/i386/pc/multiboot.c: Include grub/gzio.h.
8400 (grub_rescue_cmd_multiboot): Use grub_gzfile_open instead of
8402 (grub_rescue_cmd_module): Likewise.
8404 2005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
8406 * conf/sparc64-ieee1275.rmk (grubof_SOURCES): The first file must be
8407 kern/sparc64/ieee1275/init.c because it contains _start.
8408 * conf/sparc64-ieee1275.mk: Generated from conf/sparc64-ieee1275.rmk.
8410 2005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
8412 * configure.ac: Add support for sparc64 host with ieee1275
8414 * configure: Generated from configure.ac.
8415 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Use grub_ssize_t
8417 (grub_ofdisk_read): Likewise.
8418 (grub_ofdisk_open): Use %p to print pointer values, and cast the
8419 pointers as (void *) to remove a warning.
8420 (grub_ofdisk_close): Likewise.
8421 (grub_ofdisk_read): Likewise.
8422 * kern/ieee1275/ieee1275.c (grub_ieee1275_exit): This never
8423 returns, so make it return void to remove a warning.
8424 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_exit):
8425 Corresponding prototype change.
8426 * kern/mm.c (grub_mm_init_region): Use %p to print pointer
8427 values, and cast the pointers as (void *) to remove a warning.
8428 (grub_mm_dump): Likewise.
8429 * conf/sparc64-ieee1275.mk: New file.
8430 * conf/sparc64-ieee1275.rmk: Likewise.
8431 * include/grub/sparc64/setjmp.h: Likewise.
8432 * include/grub/sparc64/types.h: Likewise.
8433 * include/grub/sparc64/ieee1275/console.h: Likewise.
8434 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
8435 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
8436 * include/grub/sparc64/ieee1275/time.h: Likewise.
8437 * kern/sparc64/cache.c: Likewise.
8438 * kern/sparc64/dl.c: Likewise.
8439 * kern/sparc64/ieee1275/init.c: Likewise.
8440 * kern/sparc64/ieee1275/openfw.c: Likewise.
8442 2005-08-21 Yoshinori K. Okuji <okuji@enbug.org>
8444 * util/console.c (grub_ncurses_putchar): If C is greater than
8445 0x7f, set C to a question mark.
8446 (grub_ncurses_getcharwidth): New function.
8447 (grub_ncurses_term): Specify grub_ncurses_getcharwidth as
8450 * normal/menu.c (print_entry): Made aware of Unicode. First,
8451 convert TITLE to UCS-4, and predict the cursor position by
8454 * include/grub/misc.h (grub_utf8_to_ucs4): Specify the qualifier
8456 * kern/misc.c (grub_utf16_to_utf8): Likewise.
8458 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
8460 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Specify
8461 the boot file by the option BOOT_IMAGE. Use grub_stpcpy instead of
8464 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Specify the boot
8465 file by the option BOOT_IMAGE. Use grub_stpcpy instead of
8466 grub_strcpy and grub_strlen. Take it into account that a space
8467 character is inserted as a delimiter.
8469 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
8471 * partmap/pc.c (pc_partition_map_iterate): Include the value of an
8472 invalid magic in the error.
8474 * commands/search.c: New file.
8476 * util/grub-emu.c (main): Call grub_search_init and
8479 * kern/rescue.c (grub_rescue_print_disks): Removed.
8480 (grub_rescue_print_devices): New function.
8481 (grub_rescue_cmd_ls): Use grub_device_iterate with
8482 grub_rescue_print_devices instead of grub_disk_dev_iterate with
8483 grub_rescue_print_disks.
8485 * kern/partition.c (grub_partition_iterate): Return the result of
8486 PARTMAP->ITERATE instead of GRUB_ERRNO.
8488 * kern/device.c: Include grub/partition.h.
8489 (grub_device_iterate): New function.
8491 * include/grub/partition.h (grub_partition_iterate): Return int
8492 instead of grub_err_t.
8494 * include/grub/normal.h [GRUB_UTIL] (grub_search_init): New
8496 [GRUB_UTIL] (grub_search_fini): Likewise.
8498 * include/grub/device.h (grub_device_iterate): New prototype.
8500 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
8502 (pkgdata_MODULES): Added search.mod.
8503 (search_mod_SOURCES): New variable.
8504 (search_mod_CFLAGS): Likewise.
8506 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/search.c.
8507 (pkgdata_MODULES): Added search.mod.
8508 (search_mod_SOURCES): New variable.
8509 (search_mod_CFLAGS): Likewise.
8511 * commands/ls.c (grub_ls_list_disks): Renamed to ...
8512 (grub_ls_list_devices): ... this, and use grub_device_iterate.
8513 All callers changed.
8515 * DISTLIST: Added commands/search.c.
8517 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
8519 * kern/term.c (grub_putchar): Use grub_utf8_to_ucs4 for the
8521 (grub_getcharwidth): New function.
8523 * kern/misc.c (grub_utf8_to_ucs4): New function.
8525 * include/grub/term.h (struct grub_term): Added a new member
8527 (grub_getcharwidth): New prototype.
8529 * include/grub/misc.h (grub_utf8_to_ucs4): New prototype.
8531 * term/i386/pc/console.c (map_char): New function. Segregated from
8532 grub_console_putchar.
8533 (grub_console_putchar): Use map_char.
8534 (grub_console_getcharwidth): New function.
8535 (grub_console_term): Specified grub_console_getcharwidth as
8538 * term/i386/pc/vga.c (grub_vga_getcharwidth): New function.
8539 (grub_vga_term): Specified grub_vga_getcharwidth as getcharwidth.
8541 * term/i386/pc/vesafb.c (grub_virtual_screen_setup): Return
8543 (grub_vesafb_init): Do not use RC. Instead, use GRUB_ERRNO. Rely
8544 on grub_strtoul completely.
8545 (write_char): Declare local variables in the beginning of the
8547 (grub_vesafb_getcharwidth): New function.
8548 (grub_vesafb_term): Specified grub_vesafb_getcharwidth as
8551 2005-08-19 Yoshinori K. Okuji <okuji@enbug.org>
8553 * DISTLIST: Replace commands/i386/pc/vbe_list_modes.c and
8554 commands/i386/pc/vbe_test.c with commands/i386/pc/vbeinfo.c and
8555 commands/i386/pc/vbetest.c.
8557 * video/i386/pc/vbe.c (grub_vbe_probe): If INFOBLOCK is not NULL,
8558 call grub_vbe_get_controller_info again, because the returned
8559 information is volatile.
8560 (grub_vbe_set_video_mode): Mostly rewritten.
8561 (grub_vbe_get_video_mode): Use grub_vbe_probe and use
8562 grub_vbe_status_t correctly.
8563 (grub_vbe_get_video_mode_info): Likewise.
8564 (grub_vbe_set_pixel_rgb): Use a switch statement rather than
8565 several if statements.
8567 * commands/i386/pc/vbe_list_modes.c: Renamed to ...
8568 * commands/i386/pc/vbeinfo.c: ... this.
8570 * commands/i386/pc/vbe_test.c: Renamed to ...
8571 * commands/i386/pc/vbetest.c: ... this.
8573 * commands/i386/pc/vbeinfo.c (grub_cmd_vbe_list_modes): Renamed to
8575 (grub_cmd_vbeinfo): ... this. Save video modes before
8576 iterating. Skip a video mode, if it is not available, not enough
8577 information is given or it is monochrome. Show the memory
8578 model. Leave the interpretation of MODEVAR to grub_strtoul
8580 (GRUB_MOD_INIT): Rename vbe_list_modes to vbeinfo.
8581 (GRUB_MOD_FINI): Likewise.
8583 * commands/i386/pc/vbetest.c (grub_cmd_vbe_test): Renamed to ...
8584 (grub_cmd_vbetest): ... this. Don't print unnecessarily. Use
8585 grub_err_t instead of grub_uint32_t. Don't use SPTR. Remove a
8586 duplicated grub_env_get. Leave the interpretation of MODEVAR to
8587 grub_strtoul completely.
8589 (GRUB_MOD_INIT): Rename vbe_test to vbetest.
8590 (GRUB_MOD_FINI): Likewise.
8592 * normal/misc.c: Include grub/mm.h.
8594 * conf/i386-pc.rmk (pkgdata_MODULES): Replaced vbe_test.mod and
8595 vbe_list_modes with vbetest.mod and vbeinfo.mod.
8596 (vbe_list_modes_mod_SOURCES): Removed.
8597 (vbe_list_modes_mod_CFLAGS): Likewise.
8598 (vbe_test_mod_SOURCES): Likewise.
8599 (vbe_test_mod_CFLAGS): Likewise.
8600 (vbeinfo_mod_SOURCES): New variable.
8601 (vbeinfo_mod_CFLAGS): Likewise.
8602 (vbetest_mod_SOURCES): Likewise.
8603 (vbetest_mod_CFLAGS): Likewise.
8605 2005-08-18 Yoshinori K. Okuji <okuji@enbug.org>
8607 * normal/misc.c: New file.
8609 * DISTLIST: Added normal/misc.c.
8611 * partmap/amiga.c (amiga_partition_map_iterate): Add an argument
8612 DISK to HOOK. Call HOOK with DISK.
8613 * partmap/apple.c (apple_partition_map_iterate): Likewise.
8614 * partmap/pc.c (pc_partition_map_iterate): Likewise.
8615 * partmap/sun.c (sun_partition_map_iterate): Likewise.
8617 * normal/menu_entry.c (struct screen): Added a new member
8619 (completion_buffer): New global variable.
8620 (make_screen): Set SCREEN->COMPLETION_SHOWN to zero.
8621 (store_completion): New function.
8622 (complete): Likewise.
8623 (clear_completions): Likewise.
8624 (grub_menu_entry_run): If SCREEN->COMPLETION_SHOWN is non-zero,
8625 call clear_completions and reset SCREEN->COMPLETION_SHOWN. If C is
8626 a tab, call complete.
8628 * normal/completion.c (disk_dev): Removed.
8629 (print_simple_completion): Likewise.
8630 (print_partition_completion): Likewise.
8631 (print_func): New global variable.
8632 (add_completion): Do not take the arguments WHAT or PRINT any
8633 longer. Added a new argument TYPE. Instead of printing directly,
8634 call PRINT_FUNC if not NULL.
8635 All callers changed.
8636 (complete_device): Use a local variable DEV instead of
8637 DISK_DEV. Do not move CURRENT_WORD to the end of a device name.
8638 (grub_normal_do_completion): Take a new argument HOOK. Do not
8639 initialize DISK_DEV. Initialize PRINT_FUNC to HOOK. If RET is an
8640 empty string, return NULL instead.
8641 All callers changed.
8643 * normal/cmdline.c (print_completion): New function.
8645 * kern/partition.c (grub_partition_iterate): Add an argument DISK
8647 All callers changed.
8649 * kern/disk.c (grub_print_partinfo): Removed.
8651 * include/grub/partition.h (struct grub_partition_map): Add a new
8652 argument DISK into HOOK of ITERATE.
8653 (grub_partition_iterate): Add a new argument DISK to HOOK.
8655 * include/grub/normal.h (enum grub_completion_type): New enum.
8656 (grub_completion_type_t): New type.
8657 (GRUB_COMPLETION_TYPE_COMMAND): New constant.
8658 (GRUB_COMPLETION_TYPE_DEVICE): Likewise.
8659 (GRUB_COMPLETION_TYPE_PARTITION): Likewise.
8660 (GRUB_COMPLETION_TYPE_FILE): Likewise.
8661 (grub_normal_do_completion): Added a new argument HOOK.
8662 (grub_normal_print_device_info): New prototype.
8664 * include/grub/disk.h (grub_print_partinfo): Removed.
8666 * conf/i386-pc.rmk (grub_emu_SOURCES): Added normal/misc.c.
8667 (normal_mod_SOURCES): Likewise.
8668 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8669 (normal_mod_SOURCES): Likewise.
8671 * commands/ls.c (grub_ls_list_disks): Use
8672 grub_normal_print_device_info instead of grub_print_partinfo. Free
8674 (grub_ls_list_files): Use grub_normal_print_device_info instead of
8675 duplicating the code.
8677 2005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
8679 * commands/i386/pc/vbe_list_modes.c: Update source formatting to
8680 follow GCS more precisely.
8681 * commands/i386/pc/vbe_test.c: Likewise.
8682 * include/grub/i386/pc/vbe.h: Likewise.
8683 * term/i386/pc/vesafb.c: Likewise.
8684 * video/i386/pc/vbe.c: Likewise.
8686 2005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
8688 * DISTLIST: Added term/i386/pc/vesafb.c
8689 DISTLIST: Added video/i386/pc/vbe.c
8690 DISTLIST: Added commands/i386/pc/vbe_list_modes.c.
8691 DISTLIST: Added commands/i386/pc/vbe_test.c.
8692 * commands/i386/pc/vbe_list_modes.c: New file.
8693 * commands/i386/pc/vbe_test.c: Likewise.
8694 * term/i386/pc/vesafb.c: Likewise.
8695 * video/i386/pc/vbe.c: Likewise.
8696 * include/grub/i386/pc/vbe.h (GRUB_VBE_DEFAULT_VIDEO_MODE): Added define.
8697 (grub_vbe_probe) Added prototype.
8698 (grub_vbe_set_video_mode) Likewise.
8699 (grub_vbe_get_video_mode) Likewise.
8700 (grub_vbe_get_video_mode_info) Likewise.
8701 (grub_vbe_set_pixel_rgb) Likewise.
8702 (grub_vbe_set_pixel_index) Likewise.
8703 * conf/i386-pc.rmk (pkgdata_MODULES): Added vbe.mod.
8704 (pkgdata_MODULES): Added vesafb.mod.
8705 (pkgdata_MODULES): Added vbe_list_modes.mod.
8706 (pkgdata_MODULES): Added vbe_test.mod.
8707 (vbe_mod_SOURCES): Added.
8708 (vbe_mod_CFLAGS): Likewise.
8709 (vesafb_mod_SOURCES): Likewise.
8710 (vesafb_mod_CFLAGS): Likewise.
8711 (vbe_list_modes_mod_SOURCES): Likewise.
8712 (vbe_list_modes_mod_CFLAGS): Likewise.
8713 (vbe_test_mod_SOURCES): Likewise.
8714 (vbe_test_mod_CFLAGS): Likewise.
8716 2005-08-14 Yoshinori K. Okuji <okuji@enbug.org>
8718 * normal/command.c (grub_command_execute): If INTERACTIVE is
8719 false and GRUB_COMMAND_FLAG_NO_ECHO is not specified, print
8720 CMDLINE. Disable the pager if INTERACTIVE is true.
8721 All callers are changed.
8723 * normal/main.c (grub_normal_execute): Read command.lst and fs.lst
8724 before reading a config file.
8725 * normal/main.c (read_config_file): Even if a command is not
8726 found, register it if it is within an entry.
8728 * util/grub-emu.c: Include sys/types.h and unistd.h.
8729 (options): Added --hold.
8730 (struct arguments): Added a new member "hold".
8731 (parse_opt): If KEY is 'H', set ARGS->HOLD to ARG or -1 if ARG is
8733 (main): Initialize ARGS.HOLD to zero. Wait until ARGS.HOLD is
8734 cleared by a debugger, if it is not zero.
8736 * include/grub/normal.h (grub_command_execute): Add an argument
8739 2005-08-14 Vesa Jaaskelainen <chaac@nic.fi>
8741 * DISTLIST: Added include/grub/i386/pc/vbe.h.
8743 2005-08-13 Yoshinori K. Okuji <okuji@enbug.org>
8745 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Replace the test
8746 program with another one, because the old one didn't detect a bug
8747 in gcc-3.4. Always use regparm 2, because the new test is still
8748 not enough for gcc-4.0. Someone must investigate a simple test
8749 case which detects a bug in gcc-4.0.
8751 2005-08-12 Yoshinori K. Okuji <okuji@enbug.org>
8753 * DISTLIST: Added normal/completion.c.
8755 * normal/completion.c: New file.
8757 * term/i386/pc/console.c (grub_console_getwh): New function.
8758 (grub_console_term): Assign grub_console_getwh to getwh.
8760 * normal/cmdline.c (grub_tab_complete): Removed. Now the same
8761 function is defined in normal/completion.c as
8762 grub_normal_do_completion.
8763 (grub_cmdline_get): Use grub_normal_do_completion instead of
8766 * kern/partition.c (grub_partition_map_iterate): Return 1 if HOOK
8767 returns non-zero, otherwise return 0.
8768 (grub_partition_iterate): First, probe the partition map. Then,
8769 call ITERATE only for this partition map.
8771 * kern/misc.c (grub_strncmp): Rewritten.
8773 * kern/disk.c (grub_disk_dev_iterate): Return 1 if P->ITERATE
8774 returns non-zero. Otherwise return 0.
8776 * include/grub/partition.h (grub_partition_map_iterate): Return
8777 int instead of void.
8779 * include/grub/normal.h (grub_normal_do_completion): New prototype.
8781 * include/grub/misc.h (grub_strncmp): Change the type of N to
8784 * include/grub/disk.h (grub_disk_dev_iterate): Return int instead
8787 * normal/menu.c (draw_border): Cast GRUB_TERM_BORDER_WIDTH to
8788 unsigned explicitly before comparing it with I.
8790 * kern/main.c (grub_env_write_root): Add the attribute unused into
8793 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
8794 normal/completion.c.
8795 (normal_mod_SOURCES): Likewise.
8796 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
8797 (normal_mod_SOURCES): Likewise.
8799 * normal/command.c (grub_iterate_commands): If ITERATE returns
8800 non-zero, return one immediately.
8802 2005-08-09 Vesa Jaaskelainen <chaac@nic.fi>
8804 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vbe.h.
8805 * kern/i386/pc/startup.S: Updated Global Descriptor table's
8807 (grub_vbe_get_controller_info): New function.
8808 (grub_vbe_get_mode_info): Likewise.
8809 (grub_vbe_set_mode): Likewise.
8810 (grub_vbe_get_mode): Likewise.
8811 (grub_vbe_set_memory_window): Likewise.
8812 (grub_vbe_get_memory_window): Likewise.
8813 (grub_vbe_set_scanline_length): Likewise.
8814 (grub_vbe_get_scanline_length): Likewise.
8815 (grub_vbe_set_display_start): Likewise.
8816 (grub_vbe_get_display_start): Likewise.
8817 (grub_vbe_set_palette_data): Likewise.
8818 * include/grub/i386/pc/vbe.h: New file.
8820 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
8822 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
8823 kern/ieee1275/of.c with kern/ieee1275/ieee1275.c.
8824 * DISTLIST: Likewise.
8825 * kern/ieee1275/of.c: Moved to ...
8826 * kern/ieee1275/ieee1275.c: ... here.
8828 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
8830 * term/ieee1275/ofconsole.c: Include <grub/mm.h>.
8831 (grub_ofconsole_getwh): Cast -1 to type grub_ieee1275_ihandle_t.
8832 Pass 0 as `end' parameter to grub_strtoul().
8834 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
8836 * include/grub/powerpc/ieee1275/console.h: Do not include
8837 <grub/types.h>. Do not include <grub/symbol.h>. Remove ASM_FILE
8839 (grub_console_cur_color): Remove i386-specific prototype.
8840 (grub_console_real_putchar): Likewise.
8841 (grub_console_checkkey): Likewise.
8842 (grub_console_getkey): Likewise.
8843 (grub_console_getxy): Likewise.
8844 (grub_console_gotoxy): Likewise.
8845 (grub_console_cls): Likewise.
8846 (grub_console_setcursor): Likewise.
8847 * kern/powerpc/ieee1275/init.c: Don't include <grub/console.h>.
8848 Include <grub/machine/console.h>.
8849 * term/ieee1275/ofconsole.c: Likewise.
8851 2005-08-08 Yoshinori K. Okuji <okuji@enbug.org>
8853 * Makefile.in (LIBLZO): New variable.
8855 * configure.ac: Check for LZO version 2.
8857 * util/i386/pc/grub-mkimage.c [HAVE_LZO_LZO1X_H]: Include
8858 lzo/lzo1x.h instead of lzo1x.h.
8860 * conf/i386-pc.rmk (grub_mkimage_LDFLAGS): Use $(LIBLZO) instead
8863 * util/i386/pc/grub-setup.c (main): Do not free PREFIX
8864 twice. Reported by Vladimir Serbinenko <phcoder@gmail.com>.
8866 * partmap/pc.c (pc_partition_map_probe): Restore P->DATA after
8867 copying the data from PARTITION to P.
8869 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
8871 * kern/rescue.c (grub_rescue_cmd_rmmod): If the reference count is
8872 negative, unload the module.
8874 * util/i386/pc/grub-setup.c (setup): The name of the PC partition
8875 map is "pc_partition_map" but not "pc".
8876 (usage): Fix the description. The options are --boot-image and
8877 --core-image but not --boot-file or --core-file.
8878 (main): If not specified explicitly, make BOOT_FILE and CORE_FILE
8879 based on DEFAULT_BOOT_FILE and DEFAULT_CORE_FILE with DIR or
8882 * util/i386/pc/grub-install.in: Do not specify --boot-file or
8883 --core-file. Specify INSTALL_DEVICE as an argument.
8885 * util/console.c: Include config.h.
8886 [HAVE_NCURSeS_CURSES_H]: Include ncurses/curses.h.
8887 [HAVE_NCURSES_H]: Include ncurses.h.
8888 [HAVE_CURSES_H]: Include curses.h.
8889 [!A_NORMAL] (A_NORMAL): Defined as zero.
8890 [!A_STANDOUT] (A_STANDOUT): Likewise.
8892 * conf/i386-pc.rmk (grub_emu_LDFLAGS): Use $(LIBCURSES) instead of
8894 * conf/powerpc-ieee1275.rmk (grub_emu_LDFLAGS): Likewise.
8896 * configure.ac: Check for curses libraries and headers.
8898 * Makefile.in (LIBCURSES): New variable.
8900 * genmk.rb (Script::rule): Set the executable bits.
8902 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): The
8903 name of the PC partition map is "pc_partition_map" but not "pc".
8905 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
8907 * util/i386/pc/grub-install.in (grub_probefs): New variable.
8908 (modules): Likewise.
8909 (usage): Added descriptions for --modules and --grub-probefs.
8910 Handle --modules and --grub-probefs. Save the arguments in MODULES
8911 and GRUB_PROBEFS, respectively.
8912 Auto-detect a filesystem module against GRUBDIR. If the result is
8913 empty and modules are not specified explicitly, abort the
8914 installation. Add the result to MODULES.
8916 * DISTLIST: Removed boot/powerpc/ieee1275/ieee1275.c,
8917 disk/powerpc/ieee1275/ofdisk.c,
8918 include/grub/powerpc/ieee1275/init.h and
8919 term/powerpc/ieee1275/ofconsole.c.
8920 Added disk/ieee1275/ofdisk.c, kern/ieee1275/of.c and
8921 term/ieee1275/ofconsole.c.
8923 * include/grub/powerpc/ieee1275/console.h: Resurrected.
8925 * COPYING: Upgraded to the latest version. Only the address of the
8926 FSF office has changed.
8928 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
8930 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
8931 kern/ieee1275.c with kern/ieee1275/of.c.
8933 * kern/ieee1275.c: Moved to ...
8934 * kern/ieee1275/of.c: ... here.
8936 2005-08-06 Yoshinori K. Okuji <okuji@enbug.org>
8938 * conf/i386-pc.rmk (kernel_img_HEADERS): Reordered for
8941 * config.guess: Updated to the latest version from gnulib.
8942 * config.sub: Likewise.
8943 * install.sh: Likewise.
8944 * mkinstalldirs: Likewise.
8946 * include/grub/console.h: Removed. This file is arch-specific. Do
8947 not put this in include/grub.
8949 * include/grub/i386/pc/console.h: Resurrected.
8951 * util/console.c: Include grub/machine/console.h instead of
8953 * util/grub-emu.c: Likewise.
8955 2005-08-04 Marco Gerards <metgerards@student.han.nl>
8957 * kern/term.c (grub_putcode): Use `grub_getwh' instead of
8960 From Vincent Pelletier <subdino2004@yahoo.fr>
8961 * include/grub/term.h (GRUB_TERM_WIDTH, GRUB_TERM_HEIGHT):
8962 Redefined to use grub_getwh.
8963 (grub_term): New member named getwh.
8964 (grub_getwh): New prototype.
8965 * kern/term.c (grub_getwh): New function.
8966 * term/i386/pc/console.c (grub_console_getwh): New function.
8967 (grub_console_term): New member `getwh'.
8968 * term/i386/pc/vga.c (grub_vga_getwh): New function.
8969 (grub_vga_term): New member `getwh'.
8970 * term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Use
8972 (grub_ofconsole_getw): New function.
8973 (grub_ofconsole_init): Use grub_ssize_t and unsigned char.
8974 (grub_ofconsole_term): New field named getwh and new initial
8977 2005-08-03 Hollis Blanchard <hollis@penguinppc.org>
8979 * include/grub/powerpc/ieee1275/ieee1275.h: Move ...
8980 * include/grub/ieee1275/ieee1275.h: ... to here. All users updated.
8981 Move `abort', `grub_reboot', and `grub_halt' prototypes ...
8982 * include/grub/powerpc/ieee1275/kernel.h: ... to here.
8983 * commands/ieee1275/halt.c: Include <grub/machine/kernel.h> instead
8984 of <grub/machine/ieee1275.h>.
8985 * commands/ieee1275/reboot.c: Likewise.
8986 * boot/powerpc/ieee1275/ieee1275.c: Move ...
8987 * kern/ieee1275.c: ... to here. All users updated. Change all
8988 parameter structs to use new type `grub_ieee1275_cell_t'.
8989 * term/powerpc/ieee1275/ofconsole.c: Move ...
8990 * term/ieee1275/ofconsole.c: ... to here. All users updated.
8991 * disk/powerpc/ieee1275/ofdisk.c: Move ...
8992 * disk/ieee1275/ofdisk.c: ... to here. All users updated.
8993 * boot/powerpc/ieee1275/cmain.c: Change `grub_ieee1275_entry_fn' type
8995 * include/grub/i386/pc/console.h: Move to include/grub/console.h.
8996 Remove unused prototypes. All users updated.
8997 * include/grub/powerpc/ieee1275/console.h: Removed.
8998 * include/grub/powerpc/ieee1275/ieee1275.h: Define
8999 `grub_ieee1275_cell_t'.
9000 * kern/powerpc/ieee1275/openfw.c: Include <grub/machine/kernel.h>.
9001 Cast comparisons with -1 to the correct type.
9002 * loader/powerpc/ieee1275/linux.c (kernel_entry_t): Change parameter
9003 type to match `grub_ieee1275_entry_fn'.
9005 2005-08-01 Yoshinori K. Okuji <okuji@enbug.org>
9007 * DISTLIST: Added util/i386/pc/grub-probefs.c.
9009 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-probefs.
9010 (grub_setup_SOURCES): Removed partmap/amiga.c, partmap/apple.c and
9012 (grub_probefs_SOURCES): New variable.
9014 * util/i386/pc/grub-probefs.c: New file.
9016 * util/i386/pc/grub-setup.c (main): Call
9017 grub_pc_partition_map_init, grub_ufs_init, grub_minix_init,
9018 grub_hfs_init and grub_jfs_init to initialize the system. Call
9019 grub_ufs_fini, grub_minix_fini, grub_hfs_fini, grub_jfs_init and
9020 grub_pc_partition_map_fini to finish the system.
9022 2005-07-31 Yoshinori K. Okuji <okuji@enbug.org>
9024 * loader/i386/pc/multiboot.c (grub_multiboot_is_elf32): New
9026 (grub_multiboot_load_elf32): Likewise.
9027 (grub_multiboot_is_elf64): Likewise.
9028 (grub_multiboot_load_elf64): Likewise.
9029 (grub_multiboot_load_elf): Likewise.
9030 (grub_rescue_cmd_multiboot): Call grub_multiboot_load_elf to load
9031 an ELF32 or ELF64 file.
9032 This is based on a patch from Ruslan Nikolaev <nruslan@mail.com>.
9034 From Serbinenko Vladimir <serbinenko.vova@list.ru>:
9035 * kern/disk.c (grub_print_partinfo): Check if FS->LABEL is not
9036 NULL before calling FS->LABEL.
9037 * fs/fat.c (grub_fat_dir): Initialize DIRNAME to NULL.
9038 * commands/ls.c (grub_ls_list_files): Show labels, if possible.
9039 (grub_ls_list_disks): Check if FS and FS->LABEL are not NULL
9040 before calling FS->LABEL.
9042 2005-07-26 Yoshinori K. Okuji <okuji@enbug.org>
9044 * util/i386/pc/grub-install.in (datadir): New variable.
9046 (pkgdatadir): New variable.
9047 (pkglibdir): Removed.
9049 2005-07-24 Yoshinori K. Okuji <okuji@enbug.org>
9051 * DISTLIST: Added util/i386/pc/grub-install.in.
9053 * util/i386/pc/grub-install.in: New file.
9055 * conf/i386-pc.rmk (sbin_SCRIPTS): New variable.
9056 (grub_install_SOURCES): Likewise.
9058 * genmk.rb: Added support for scripts.
9059 (Script): New class.
9060 (scripts): New variable.
9062 * Makefile.in (install-local): Install sbin_SCRIPTS by
9064 (uninstall): Remove sbin_SCRIPTS.
9066 * util/i386/pc/grub-setup.c (main): If the argument is not a GRUB
9067 device, try to get a GRUB device by
9068 grub_util_biosdisk_get_grub_dev.
9071 * util/i386/pc/grub-mkdevicemap.c (usage): Remove a duplicated
9072 description for --device-map.
9074 2005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
9076 Change the semantics of variable hooks. They now return strings
9077 instead of error values.
9079 * util/i386/pc/grub-setup.c: Include grub/env.h.
9080 (setup): Use grub_device_set_root instead of grub_env_set.
9082 * kern/rescue.c (grub_rescue_cmd_root): Use grub_env_set and
9083 grub_env_get instead of grub_device_set_root and
9084 grub_device_get_root, respectively.
9086 * kern/main.c (grub_env_write_root): New function.
9087 (grub_set_root_dev): Register grub_env_write_hook for "root". Use
9088 grub_env_set instead of grub_device_set_root.
9090 * kern/env.c (HASHSZ): Reduced to 13, because GRUB does not need
9092 (grub_env_set): Set ENV->VALUE to the result of ENV->WRITE_HOOK
9093 rather than calling ENV->WRITE_HOOK afterwards.
9094 (grub_env_get): Return the result of ENV->READ_HOOK rather than
9095 passing a pointer of a pointer.
9096 (grub_register_variable_hook): Change the types of "read_hook" and
9097 "write_hook" to grub_env_read_hook_t and grub_env_write_hook_t,
9099 Allocate the default empty string on the heap, because this string
9102 * kern/device.c: Include grub/env.h.
9103 (grub_device_set_root): Removed.
9104 (grub_device_get_root): Likewise.
9105 (grub_device_open): Use grub_env_get instead of
9106 grub_device_get_root.
9108 * include/grub/env.h (grub_env_read_hook_t): New type.
9109 (grub_env_write_hook_t): Likewise.
9110 (grub_env_var): Change the types of "read_hook" and "write_hook"
9111 to grub_env_read_hook_t and grub_env_write_hook_t, respectively.
9112 (grub_register_variable_hook): Likewise.
9114 * include/grub/device.h (grub_device_set_root): Removed.
9115 (grub_device_set_root): Likewise.
9117 * fs/fat.c (grub_fat_dir): Make a copy of PATH in DIRNAME, and
9118 make sure that DIRNAME terminates with '/', so that
9119 grub_fat_find_dir will fail if PATH is not a directory.
9121 * commands/ls.c (grub_ls_list_files): Remove the qualifier const
9123 Use the qualifier auto for print_files and print_files_long.
9124 If FS->DIR sets GRUB_ERRNO to GRUB_ERR_BAD_FILE_TYPE, try DIRNAME
9126 Put a newline only if there is no error.
9127 (grub_cmd_ls): Remove grub_ls_print_files, because this is not
9130 2005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
9132 * kern/partition.c (grub_partition_probe): Initialize PART to
9133 NULL. Otherwise, when no partition map is registered, this returns
9136 2005-07-19 Yoshinori K. Okuji <okuji@enbug.org>
9138 * partmap/apple.c (apple_partition_map_iterate): Check if POS
9139 equals GRUB_DISK_SECTOR_SIZE to see if the partition table is
9142 2005-07-18 Yoshinori K. Okuji <okuji@enbug.org>
9144 * commands/ls.c (grub_ls_list_disks): Print the filesystem
9145 information on each device, if it does not have partitions. Print
9146 "Device" instead of "Disk", because this function is not specific
9149 * normal/main.c (grub_rescue_cmd_normal): Make the variable CONFIG
9150 static to ensure that it is put on the memory rather than a
9153 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
9155 * commands/cat.c (GRUB_MOD_INIT): Use better documentation.
9156 (grub_cat_init): Likewise.
9157 * loader/i386/pc/chainloader_normal.c (GRUB_MOD_INIT): Likewise.
9158 (options): Likewise.
9159 * commands/configfile.c (GRUB_MOD_INIT): Likewise.
9160 (grub_configfile_init): Likewise.
9161 * font/manager.c (GRUB_MOD_INIT): Likewise.
9162 * commands/help.c (GRUB_MOD_INIT): Likewise.
9163 (grub_help_init): Likewise.
9164 * normal/command.c (grub_command_init): Likewise.
9165 * loader/i386/pc/linux_normal.c (GRUB_MOD_INIT): Likewise.
9166 * disk/loopback.c (grub_loop_init): Likewise.
9167 (GRUB_MOD_INIT): Likewise.
9168 * commands/ls.c (grub_ls_init): Likewise.
9169 (GRUB_MOD_INIT): Likewise.
9170 (options): Likewise.
9171 * commands/boot.c (grub_boot_init): Likewise.
9172 (GRUB_MOD_INIT): Likewise.
9173 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Likewise.
9174 * commands/i386/pc/reboot.c (grub_reboot_init): Likewise.
9175 (GRUB_MOD_INIT): Likewise.
9176 * commands/cmp.c (grub_cmp_init): Likewise.
9177 (GRUB_MOD_INIT): Likewise.
9179 * normal/arg.c: Use <> instead of "" to include header files.
9180 (SHORT_ARG_HELP): New macro.
9181 (SHORT_ARG_USAGE): Likewise.
9182 (help_options): Specify SHORT_ARG_HELP and SHORT_ARG_USAGE instead
9183 of 'h' and 'u' for help and usage, respectively. Use more GNU-like
9185 (find_short): Check if C is 'h' or 'u' explicitly.
9186 (grub_arg_show_help): Use space characters instead of tabs. Treat
9187 SHORT_ARG_HELP and SHORT_ARG_USAGE exceptionally so that -h and -u
9188 are shown with --help and --usage only if they are not used for
9190 (parse_option): Use SHORT_ARG_HELP and SHORT_ARG_USAGE instead of
9193 * include/grub/arg.h (struct grub_arg_option): Add the qualifier
9194 const into "longarg". Change the type of "shortarg" to int.
9196 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
9198 * boot/i386/pc/boot.S (boot_drive_check): New label.
9200 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRIVE_CHECK): New
9203 * util/i386/pc/grub-setup.c (setup): Added a workaround for BIOSes
9204 which do not pass a boot drive correctly. Copied from GRUB Legacy.
9206 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
9208 * kern/i386/pc/startup.S (gate_a20_try_system_control_port_a):
9209 When turning off Gate A20, skip the check and return immediately,
9210 because this is not fatal usually.
9212 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
9214 * conf/i386-pc.rmk (pxeboot_img_LDFLAGS): The text address should
9215 be 0x7C00 instead of 0x8000.
9217 * boot/i386/pc/pxeboot.S: Rewritten.
9219 * kern/i386/pc/startup.S (gate_a20_try_bios): No need to specify
9221 (gate_a20_check_state): Read a byte from 0x108000. Invert the
9224 2005-07-16 Yoshinori K. Okuji <okuji@enbug.org>
9226 * kern/i386/pc/startup.S (grub_gate_a20): Rewritten for
9227 robustness. This routine now supports a BIOS call and System
9228 Control Port A to modify the gate A20.
9230 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
9233 2005-07-12 Hollis Blanchard <hollis@penguinppc.org>
9235 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): dprintf the
9236 device path and resulting ihandle.
9237 (grub_ofdisk_close): dprintf the ihandle being closed.
9238 (grub_ofdisk_read): dprintf function parameters.
9239 * kern/mm.c (grub_mm_init_region): Likewise.
9240 * loader/powerpc/ieee1275/linux.c: Remove extra whitespace.
9241 (grub_linux_boot): dprintf the Linux entry point, initrd address and
9242 size, and boot arguments.
9243 (grub_rescue_cmd_linux): dprintf each ELF segment's address and size
9244 before loading into memory.
9245 (grub_rescue_cmd_initrd): dprintf the initrd's address and size
9246 before loading into memory.
9248 2005-07-12 Yoshinori K. Okuji <okuji@enbug.org>
9250 * kern/mm.c: Added much documentation.
9251 (GRUB_MM_ALIGN_LOG2): When GRUB_CPU_SIZEOF_VOID_P is
9252 8, set to 5 instead of 8.
9254 2005-07-10 Yoshinori Okuji <okuji@enbug.org>
9256 * DISTLIST: Added util/i386/pc/grub-mkimage.c.
9258 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-mkdevicemap.
9259 (grub_mkdevicemap_SOURCES): New variable.
9261 * util/i386/pc/grub-mkdevicemap.c: New file. Mostly copied from
9262 lib/device.c of GRUB Legacy.
9264 2005-07-10 Yoshinori Okuji <okuji@enbug.org>
9266 * commands/ls.c (grub_ls_list_files): Check if *PATH is NUL
9267 instead of PATH is NULL.
9269 2005-07-09 Vincent Pelletier <subdino2004@yahoo.fr>
9271 * commands/cmp.c (BUFFER_SIZE): New macro.
9272 (grub_cmd_cmp): Close the right file at the right time. Compare
9273 only data just read. Don't report files of different size as
9274 identical. Dynamically allocate buffers. Move variable
9275 declarations at the beginning of function.
9277 2005-07-09 Yoshinori Okuji <okuji@enbug.org>
9279 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): The return value was
9282 2004-07-04 Vincent Pelletier <subdino2004@yahoo.fr>
9284 * normal/cmdline.c (grub_cmdline_get): Don't fallback on ctrl-d
9285 when backspace is pressed at beginning of line.
9287 2005-07-03 Yoshinori Okuji <okuji@enbug.org>
9289 * DISTLIST: Added genfslist.sh.
9291 * normal/main.c (fs_module_list): New variable.
9292 (autoload_fs_module): New function.
9293 (read_fs_list): Likewise.
9294 (grub_normal_execute): Call read_fs_list.
9296 * kern/fs.c (grub_fs_autoload_hook): New variable.
9297 (grub_fs_probe): Added support for auto-loading.
9299 * include/grub/normal.h (struct grub_fs_module_list): New struct.
9300 (grub_fs_module_list_t): New type.
9302 * include/grub/fs.h (grub_fs_autoload_hook_t): New type.
9303 (grub_fs_autoload_hook): New prototype.
9305 * genfslist.sh: New file.
9307 * genmk.rb: Added a rule to generate a filesystem list.
9309 2005-06-30 Marco Gerards <metgerards@student.han.nl>
9311 * configure.ac: Fix the test for cross-compiling.
9313 * genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'. Don't
9314 define GRUB_UTIL anymore.
9316 * util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes
9317 so this function works on other systems than just big endian.
9318 (load_modules): Likewise.
9319 (add_segments): Likewise.
9321 2005-06-23 Hollis Blanchard <hollis@penguinppc.org>
9323 * kern/misc.c (grub_vsprintf): Add `longfmt'. If format string
9324 contains `l' modifier, get a long from va_arg().
9326 2005-06-23 Yoshinori K. Okuji <okuji@enbug.org>
9328 * kern/mm.c (grub_free): If the next free block which is being
9329 merged is the first free block, set the first block to the block
9331 Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.
9333 2005-05-08 Hollis Blanchard <hollis@penguinppc.org>
9335 * boot/powerpc/ieee1275/cmain.c (cmain): Initialize
9336 `grub_ieee1275_chosen'.
9338 2005-05-08 Hollis Blanchard <hollis@penguinppc.org>
9340 * boot/powerpc/ieee1275/cmain.c (module_info): Remove definition.
9341 (grub_ieee1275_chosen): New variable.
9342 (cmain): Initialize and use `grub_ieee1275_chosen' instead of
9344 * boot/powerpc/ieee1275/crt0.S (init_stack): Remove stack space.
9345 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
9346 Rename first argument to `phandle' for consistency.
9347 (grub_ieee1275_get_property_length): Likewise.
9348 (grub_ieee1275_next_property): Likewise. Change type of first argument
9349 to grub_ieee1275_phandle_t.
9350 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn):
9351 Move export next to declaration.
9352 (grub_ieee1275_chosen): New variable.
9353 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MODULE_BASE):
9354 Correct cosmetic typo.
9355 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Use
9356 `grub_ieee1275_chosen'.
9357 * kern/powerpc/ieee1275/openfw.c (grub_map): Likewise.
9358 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Likewise.
9359 (grub_rescue_cmd_linux): Set `initrd_addr' to 0.
9360 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_refresh): Use
9361 `grub_ieee1275_chosen'.
9363 2005-05-10 Hollis Blanchard <hollis@penguinppc.org>
9365 * boot/powerpc/ieee1275/cmain.c (cmain): Remove code to parse
9367 * kern/powerpc/ieee1275/init.c (grub_machine_init): Parse
9368 /chosen/bootargs as "variable=value" pairs.
9370 2005-05-08 Vincent Pelletier <subdino2004@yahoo.fr>
9372 * include/grub/misc.h (grub_dprintf): New macro.
9373 (grub_real_dprintf): New prototype.
9374 (grub_strword): Likewise.
9375 (grub_iswordseparator): Likewise.
9376 * kern/misc.c (grub_real_dprintf): New function.
9377 (grub_strword): Likewise.
9378 (grub_iswordseparator): Likewise.
9380 2005-04-30 Hollis Blanchard <hollis@penguinppc.org>
9382 * boot/powerpc/ieee1275/cmain.c: Don't include grub/machine/init.h.
9383 (roundup): Remove macro.
9384 (grub_ieee1275_flags): Make static.
9385 (grub_ieee1275_realmode): Remove.
9386 (grub_ieee1275_test_flag): New function.
9387 (grub_ieee1275_set_flag): Likewise.
9388 (find_options): Rename to `grub_ieee1275_find_options'; update
9389 callers. Set GRUB_IEEE1275_FLAG_REAL_MODE and
9390 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS.
9391 (cmain): New prototype.
9392 (cmain): Use `grub_ieee1275_set_flag' instead of accessing
9393 `grub_ieee1275_flags' directly.
9394 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Remove
9396 * disk/powerpc/ieee1275/ofdisk.c: Include grub/machine/ofdisk.h.
9397 Don't include grub/machine/init.h.
9398 (grub_ofdisk_open): Call `grub_ieee1275_test_flag'.
9399 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
9401 (grub_ieee1275_realmode): Likewise.
9402 (grub_ieee1275_flag): New enum.
9403 (grub_ieee1275_test_flag): New prototype.
9404 (grub_ieee1275_set_flag): New prototype.
9405 * include/grub/powerpc/ieee1275/init.h: Remove file.
9406 * include/grub/powerpc/ieee1275/ofdisk.h: New file.
9407 * kern/powerpc/ieee1275/init.c: Don't include grub/machine/init.h.
9408 Include grub/machine/console.h. Include grub/machine/ofdisk.h.
9409 (grub_machine_fini): Don't call `grub_ieee1275_release'. Remove
9411 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Call
9412 `grub_ieee1275_test_flag'.
9413 (grub_ieee1275_encode_devname): Likewise.
9415 2005-04-21 Hollis Blanchard <hollis@penguinppc.org>
9417 * include/grub/powerpc/ieee1275/ieee1275.h
9418 (grub_ieee1275_encode_devname): New prototype.
9419 (grub_ieee1275_get_filename): Likewise.
9420 * kern/powerpc/ieee1275/init.c (grub_translate_ieee175_path): New
9422 (grub_set_prefix): Likewise.
9423 (grub_machine_init): Call grub_set_prefix.
9424 * kern/powerpc/ieee1275/openfw.c: Fix typos.
9425 (grub_parse_type): New enum.
9426 (grub_ieee1275_get_devargs): New function.
9427 (grub_ieee1275_get_devname): Likewise.
9428 (grub_ieee1275_parse_args): Likewise.
9429 (grub_ieee1275_get_filename): Likewise.
9430 (grub_ieee1275_encode_devname): Likewise.
9432 2005-03-30 Marco Gerards <metgerards@student.han.nl>
9434 * kern/powerpc/ieee1275/init.c (grub_machine_fini): Don't call
9435 `grub_loader_unset'.
9437 2005-03-26 Hollis Blanchard <hollis@penguinppc.org>
9439 * commands/ieee1275/halt.c (grub_cmd_halt): Call grub_halt
9440 instead of grub_ieee1275_interpret.
9441 (grub_halt_init): New function.
9442 (grub_halt_fini): Likewise.
9443 (GRUB_MOD_INIT): Correct message grammar.
9444 * commands/ieee1275/reboot.c (grub_cmd_reboot): Call grub_reboot
9445 instead of grub_ieee1275_interpret.
9446 (grub_reboot_init): New function.
9447 (grub_reboot_fini): Likewise.
9448 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace
9449 commands/i386/pc/halt.c, commands/i386/pc/reboot.c, and
9450 util/i386/pc/misc.c with commands/ieee1275/halt.c,
9451 commands/ieee1275/reboot.c, and util/powerpc/ieee1275/misc.c.
9452 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_fini): New
9454 * include/grub/powerpc/ieee1275/console.h (grub_console_fini):
9456 * include/grub/powerpc/ieee1275/ieee1275.h (grub_reboot): Add
9458 (grub_halt): Likewise.
9459 * include/grub/powerpc/ieee1275/init.h: Remove inaccurate comment.
9460 (cmain): Remove __attribute__((unused)).
9461 * kern/powerpc/ieee1275/init.c (grub_heap_start): New variable.
9462 (grub_heap_len): Likewise.
9463 (grub_machine_fini): New function.
9464 * kern/powerpc/ieee1275/openfw.c (grub_reboot): New function.
9465 (grub_halt): Likewise.
9466 * term/powerpc/ieee1275/ofconsole.c (grub_console_fini): New
9468 * util/powerpc/ieee1275/misc.c: New file.
9470 2005-03-19 Yoshinori K. Okuji <okuji@enbug.org>
9472 * DISTLIST: New file.
9473 * gendistlist.sh: Likewise.
9475 * Makefile.in (COMMON_DISTFILES): Removed.
9476 (BOOT_DISTFILES): Likewise.
9477 (CONF_DISTFILES): Likewise.
9478 (DISK_DISTFILES): Likewise.
9479 (FS_DISTFILES): Likewise.
9480 (INCLUDE_DISTFILES): Likewise.
9481 (KERN_DISTFILES): Likewise.
9482 (LOADER_DISTFILES): Likewise.
9483 (TERM_DISTFILES): Likewise.
9484 (UTIL_DISTFILES): Likewise.
9485 (DISTFILES): Likewise.
9486 (uninstall): Uninstall files in $(pkgdata_DATA).
9487 (DISTLIST): New target.
9488 (distdir): Use the contents of the file DISTLIST to get a list of
9491 2005-03-18 Yoshinori K. Okuji <okuji@enbug.org>
9493 * fs/fat.c (grub_fat_mount): Ignore the 3rd bit of a media
9494 descriptor. This is ported from GRUB Legacy.
9496 * gencmdlist.sh: Added an extra semicolon to make it work with
9497 old sed versions. Reported by Robert Bihlmeyer
9498 <robbe@orcus.priv.at>.
9500 2005-03-08 Yoshinori Okuji <okuji@enbug.org>
9502 Automatic loading of commands is supported.
9504 * normal/main.c (read_command_list): New function.
9505 (grub_normal_execute): Call read_command_list.
9507 * normal/command.c (grub_register_command): Return zero or CMD.
9508 Allocate CMD->NAME from the heap.
9509 Initialize CMD->MODULE_NAME to zero.
9510 Find the same name as well. If the same command is found and it is
9511 a dummy command, overwrite members. If it is not a dummy command,
9513 (grub_unregister_command): Free Q->NAME and Q->MODULE_NAME.
9514 (grub_command_find): If a dummy command is found, load a module
9515 and retry to find a command only once.
9517 * normal/cmdline.c (grub_tab_complete): Call grub_command_find to
9518 make sure that each command is loaded.
9520 * include/grub/normal.h (GRUB_COMMAND_FLAG_NOT_LOADED): New
9522 (struct grub_command): Remove const from the member `name'.
9523 Add a new member `module_name'.
9524 (grub_register_command): Return grub_command_t.
9526 * commands/help.c (grub_cmd_help): Call grub_command_find to make
9527 sure that each command is loaded.
9529 * genmk.rb (PModule::rule): Specify a module name without the
9530 suffix ".mod" to gencmdlist.sh.
9532 2005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
9534 * gencmdlist.sh: New file.
9536 * genmk.rb (PModule::rule): Generate a rule for a command list.
9538 Generate command.lst from $(COMMANDFILES).
9540 * Makefile.in (COMMON_DISTFILES): Added gencmdlist.sh.
9541 (DATA): Added $(pkgdata_DATA).
9542 (install-local): Install files in $(pkgdata_DATA).
9544 2005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
9546 * term/i386/pc/vga.c (debug_command): Removed.
9547 (GRUB_MOD_INIT): Do not register the command "debug".
9549 From Hollis Blanchard:
9550 * commands/configfile.c: New file.
9551 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
9552 commands/configfile.c.
9553 (pkgdata_MODULES): Added configfile.mod.
9554 (configfile_mod_SOURCES): New variable.
9555 (configfile_mod_CFLAGS): Likewise.
9556 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
9557 commands/configfile.c.
9558 (pkgdata_MODULES): Added configfile.mod.
9559 (configfile_mod_SOURCES): New variable.
9560 (configfile_mod_CFLAGS): Likewise.
9561 * util/grub-emu.c (main): Call grub_configfile_init and
9562 grub_configfile_fini.
9563 * include/grub/normal.h [GRUB_UTIL] (grub_configfile_init): New
9565 [GRUB_UTIL] (grub_configfile_fini): Likewise.
9567 2005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
9569 * normal/arg.c (grub_arg_show_help): Do not show the bug report
9572 * commands/help.c (grub_cmd_help): Do not print newlines after
9573 the last command in print_command_help.
9575 2005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
9577 * commands/default.h: New file.
9578 * commands/timeout.h: Likewise.
9579 * normal/context.c: Likewise.
9581 * util/misc.c: Do not include sys/times.h.
9582 Include sys/time.h and grub/machine/time.h.
9583 (grub_get_rtc): Rewritten with gettimeofday.
9585 * util/grub-emu.c (main): Call grub_default_init and
9586 grub_timeout_init before grub_normal_init, and call
9587 grub_timeout_fini and grub_default_fini after grub_main.
9589 * util/console.c (grub_ncurses_checkkey): Return the read
9592 * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it
9595 * normal/main.c (read_config_file): Push MENU. If this fails,
9596 print an error and wait for a user input.
9597 Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE.
9598 If a menu is empty or an error occurs, pop MENU.
9599 (grub_normal_execute): Pop and free MENU after grub_menu_run
9602 * kern/loader.c (grub_loader_boot): Call grub_machine_fini.
9604 * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not
9606 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
9608 * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include
9610 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
9613 * include/grub/normal.h (struct grub_menu_list): New struct.
9614 (grub_menu_list_t): New type.
9615 (struct grub_context): New struct.
9616 (grub_context_t): New type.
9617 (grub_register_command): Got rid of EXPORT_FUNC.
9618 (grub_unregister_command): Likewise.
9619 (grub_context_get): New prototype.
9620 (grub_context_get_current_menu): Likewise.
9621 (grub_context_push_menu): Likewise.
9622 (grub_context_pop_menu): Likewise.
9623 [GRUB_UTIL] (grub_default_init): Likewise.
9624 [GRUB_UTIL] (grub_default_fini): Likewise.
9625 [GRUB_UTIL] (grub_timeout_init): Likewise.
9626 [GRUB_UTIL] (grub_timeout_fini): Likewise.
9628 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c,
9629 commands/timeout.c and normal/context.c.
9630 (pkgdata_MODULES): Added default.mod and timeout.mod.
9631 (normal_mod_SOURCES): Added normal/context.c.
9632 (default_mod_SOURCES): New variable.
9633 (default_mod_CFLAGS): Likewise.
9634 (timeout_mod_SOURCES): Likewise.
9635 (timeout_mod_CFLAGS): Likewise.
9636 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from
9638 (pkgdata_MODULES): Added default.mod and timeout.mod.
9639 (normal_mod_SOURCES): Added normal/context.c.
9640 (default_mod_SOURCES): New variable.
9641 (default_mod_CFLAGS): Likewise.
9642 (timeout_mod_SOURCES): Likewise.
9643 (timeout_mod_CFLAGS): Likewise.
9645 * Makefile.in (all-local): Added $(MKFILES).
9647 2005-02-21 Vincent Pelletier <subdino2004@yahoo.fr>
9649 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `partmap/sun.c'.
9650 (grub_emu_SOURCES): Likewise.
9651 (pkgdata_MODULES): Add `sun.mod'.
9652 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
9653 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
9655 (pkgdata_MODULES): Add `sun.mod'.
9656 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
9657 * include/grub/partition.h (grub_sun_partition_map_init): New
9659 (grub_sun_partition_map_fini): Likewise.
9660 * partmap/sun.c: New file.
9661 * util/grub-emu.c (main): Initialize and de-initialize the sun
9662 partitionmap support.
9664 2005-02-19 Yoshinori K. Okuji <okuji@enbug.org>
9666 This implements an Emacs-like menu entry editor.
9668 * normal/menu_entry.c: New file.
9670 * util/console.c (grub_ncurses_putchar): Translate some Unicode
9671 characters to ASCII.
9672 (saved_char): New variable.
9673 (grub_ncurses_checkkey): Rewritten completely.
9674 (grub_ncurses_getkey): Likewise.
9675 (grub_ncurses_init): Call raw instead of cbreak.
9677 * normal/menu.c (print_entry): Do not put a space.
9678 (init_page): Renamed to ...
9679 (grub_menu_init_page): ... this. All callers changed.
9680 (edit_menu_entry): Removed.
9681 (run_menu): Call grub_menu_entry_run instead of edit_menu_entry.
9683 * normal/cmdline.c (grub_cmdline_run): Call grub_setcursor.
9685 * kern/misc.c (grub_vprintf): Call grub_refresh.
9687 * normal/menu.c (DISP_LEFT): Renamed to ...
9688 * include/grub/term.h (GRUB_TERM_DISP_LEFT): ... this.
9689 * normal/menu.c (DISP_UP): Renamed to ...
9690 * include/grub/term.h (GRUB_TERM_DISP_UP): ... this.
9691 * normal/menu.c (DISP_RIGHT): Renamed to ...
9692 * include/grub/term.h (GRUB_TERM_DISP_RIGHT): ... this.
9693 * normal/menu.c (DISP_DOWN): Renamed to ...
9694 * include/grub/term.h (GRUB_TERM_DISP_DOWN): ... this.
9695 * normal/menu.c (DISP_HLINE): Renamed to ...
9696 * include/grub/term.h (GRUB_TERM_DISP_HLINE): ... this.
9697 * normal/menu.c (DISP_VLINE): Renamed to ...
9698 * include/grub/term.h (GRUB_TERM_DISP_VLINE): ... this.
9699 * normal/menu.c (DISP_UL): Renamed to ...
9700 * include/grub/term.h (GRUB_TERM_DISP_UL): ... this.
9701 * normal/menu.c (DISP_UR): Renamed to ...
9702 * include/grub/term.h (GRUB_TERM_DISP_UR): ... this.
9703 * normal/menu.c (DISP_LL): Renamed to ...
9704 * include/grub/term.h (GRUB_TERM_DISP_LL): ... this.
9705 * normal/menu.c (DISP_LR): Renamed to ...
9706 * include/grub/term.h (GRUB_TERM_DISP_LR): ... this.
9707 * normal/menu.c (TERM_WIDTH): Renamed to ...
9708 * include/grub/term.h (GRUB_TERM_WIDTH): ... this.
9709 * normal/menu.c (TERM_HEIGHT): Renamed to ...
9710 * include/grub/term.h (GRUB_TERM_HEIGHT): ... this.
9711 * normal/menu.c (TERM_INFO_HEIGHT): Renamed to ...
9712 * include/grub/term.h (GRUB_TERM_INFO_HEIGHT): ... this.
9713 * normal/menu.c (TERM_MARGIN): Renamed to ...
9714 * include/grub/term.h (GRUB_TERM_MARGIN): ... this.
9715 * normal/menu.c (TERM_SCROLL_WIDTH): Renamed to ...
9716 * include/grub/term.h (GRUB_TERM_SCROLL_WIDTH): ... this.
9717 * normal/menu.c (TERM_TOP_BORDER_Y): Renamed to ...
9718 * include/grub/term.h (GRUB_TERM_TOP_BORDER_Y): ... this.
9719 * normal/menu.c (TERM_LEFT_BORDER_X): Renamed to ...
9720 * include/grub/term.h (GRUB_TERM_LEFT_BORDER_X): ... this.
9721 * normal/menu.c (TERM_BORDER_WIDTH): Renamed to ...
9722 * include/grub/term.h (GRUB_TERM_BORDER_WIDTH): ... this.
9723 * normal/menu.c (TERM_MESSAGE_HEIGHT): Renamed to ...
9724 * include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): ... this.
9725 * normal/menu.c (TERM_BORDER_HEIGHT): Renamed to ...
9726 * include/grub/term.h (GRUB_TERM_BORDER_HEIGHT): ... this.
9727 * normal/menu.c (TERM_NUM_ENTRIES): Renamed to ...
9728 * include/grub/term.h (GRUB_TERM_NUM_ENTRIES): ... this.
9729 * normal/menu.c (TERM_FIRST_ENTRY_Y): Renamed to ...
9730 * include/grub/term.h (GRUB_TERM_FIRST_ENTRY_Y): ... this.
9731 * normal/menu.c (TERM_ENTRY_WIDTH): Renamed to ...
9732 * include/grub/term.h (GRUB_TERM_ENTRY_WIDTH): ... this.
9733 * normal/menu.c (TERM_CURSOR_X): Renamed to ...
9734 * include/grub/term.h (GRUB_TERM_CURSOR_X): ... this.
9735 All callers changed.
9737 * include/grub/normal.h: New prototype.
9739 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
9740 normal/menu_entry.c.
9741 (normal_mod_SOURCES): Likewise.
9742 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9743 (normal_mod_SOURCES): Likewise.
9745 2005-02-15 Yoshinori K. Okuji <okuji@enbug.org>
9747 * include/grub/normal.h (grub_halt_init): New prototype.
9748 (grub_halt_fini): Likewise.
9749 (grub_reboot_init): Likewise.
9750 (grub_reboot_fini): Likewise.
9752 * util/grub-emu.c: Include signal.h.
9753 (main_env): New global variable.
9754 (grub_machine_init): Ignore SIGINT. Otherwise grub-emu cannot
9756 (grub_machine_fini): New function.
9757 (main): Call grub_halt_init and grub_reboot_init before
9758 grub_main, and grub_reboot_fini and grub_halt_fini after it.
9759 Call setjmp with MAIN_ENV to go back afterwards.
9760 Call grub_machine_fini right before return.
9762 * include/grub/util/misc.h: Include setjmp.h.
9763 (main_env): New prototype.
9765 * include/grub/kernel.h (grub_machine_fini): New prototype.
9766 * include/grub/i386/pc/biosdisk.h (grub_biosdisk_fini): Likewise.
9767 * include/grub/i386/pc/console.h (grub_console_fini): Likewise.
9769 * disk/i386/pc/biosdisk.c (grub_biosdisk_fini): New function.
9770 * kern/i386/pc/init.c (grub_machine_fini): Likewise.
9771 * term/i386/pc/console.c (grub_console_fini): Likewise.
9773 * util/i386/pc/misc.c: New file.
9775 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
9776 util/i386/pc/misc.c, commands/i386/pc/halt.c and
9777 commands/i386/pc/reboot.c.
9779 2005-02-14 Guillem Jover <guillem@hadrons.org>
9781 * include/grub/dl.h (grub_dl_check_header): New prototype.
9782 (grub_arch_dl_check_header): Change return type to grub_err_t,
9783 remove size parameter and export function. Update all callers.
9784 * kern/dl.c (grub_dl_check_header): New function.
9785 (grub_dl_load_core): Use `grub_dl_check_header' instead of
9786 `grub_arch_dl_check_header'. Check ELF type. Check if sections
9787 are inside the core.
9788 * kern/i386/dl.c (grub_arch_dl_check_header): Remove arch
9789 independent ELF header checks.
9790 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
9791 * loader/i386/pc/multiboot.c (grub_rescue_cmd_multiboot): Use
9792 `grub_dl_check_header' instead of explicit checks. Check for the
9794 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Use
9795 `grub_dl_check_header' instead of explicit checks. Remove arch
9796 specific ELF header checks.
9798 * util/grub-emu.c (grub_arch_dl_check_header): Remove the
9801 2005-02-13 Hollis Blanchard <hollis@penguinppc.org>
9803 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add ls.mod.
9804 * include/grub/powerpc/libgcc.h (__mulsf3): New prototype.
9806 2005-02-12 Hollis Blanchard <hollis@penguinppc.org>
9808 * kern/partition.c (grub_partition_probe): Clear `grub_errno' and
9809 return 0 if `grub_errno' is GRUB_ERR_BAD_PART_TABLE.
9810 (part_map_iterate): Clear `grub_errno' and return 0 if
9811 `partmap->iterate' returns GRUB_ERR_BAD_PART_TABLE.
9812 * partmap/amiga.c (amiga_partition_map_iterate): Return
9813 GRUB_ERR_BAD_PART_TABLE if no partition map magic is found.
9814 * partmap/apple.c (apple_partition_map_iterate): Likewise.
9816 2005-02-01 Guillem Jover <guillem@hadrons.org>
9818 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Fix module
9821 2005-01-31 Marco Gerards <metgerards@student.han.nl>
9823 * include/grub/powerpc/ieee1275/loader.h (grub_load_linux):
9825 (grub_rescue_cmd_linux): New prototype.
9826 (grub_rescue_cmd_initrd): Likewise.
9827 * powerpc/ieee1275/linux.c (grub_linux_boot): Remove struct
9829 (grub_linux_release_mem): Release the memory for the initrd.
9830 (grub_load_linux): Renamed from this...
9831 (grub_rescue_cmd_linux): ...To this. Changed all callers.
9832 Changed `entry' not to be static. Loop over memory regions to
9833 find another one when the default fails.
9834 (grub_rescue_cmd_initrd): New function.
9835 (grub_linux_init): Remove function.
9836 (grub_linux_fini): Likewise.
9837 (GRUB_MOD_INIT): Register `initrd'.
9838 (GRUB_MOD_FINI): Unregister `initrd'.
9839 * powerpc/ieee1275/linux_normal.c (grub_linux_normal_init):
9841 (grub_linux_normal_fini): Likewise.
9842 (GRUB_MOD_INIT): Register `initrd'.
9843 (GRUB_MOD_FINI): Unregister `initrd'.
9845 2005-01-31 Marco Gerards <metgerards@student.han.nl>
9847 * commands/help.c: New file.
9848 * normal/arg.c (show_help): Renamed to...
9849 (grub_arg_show_help): ... this.
9850 * commands/i386/pc/halt.c: New file.
9851 * commands/i386/pc/reboot.c: Likewise.
9852 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/help.c'.
9853 (pkgdata_MODULES): Add `reboot.mod', `halt.mod' and `help.mod'.
9854 (help_mod_SOURCES, help_mod_CFLAGS, reboot_mod_SOURCES)
9855 (reboot_mod_CFLAGS, halt_mod_SOURCES, halt_mod_CFLAGS): New
9857 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
9859 (pkgdata_MODULES): Add `help.mod'.
9860 (help_mod_SOURCES, help_mod_CFLAGS): New variables.
9861 * grub/i386/pc/init.h (grub_reboot): New prototype.
9862 (grub_halt): Likewise.
9863 * include/grub/normal.h (grub_arg_show_help): New prototype.
9864 (grub_help_init): Likewise.
9865 (grub_help_fini): Likewise.
9866 * util/grub-emu.c (main): Initialize and deinitialize the help
9869 * normal/cmdline.c (grub_cmdline_get): Doc fix.
9871 * normal/command.c (grub_command_init): Fixed the description of
9872 the `set' and `unset' commands.
9874 2005-01-31 Marco Gerards <metgerards@student.han.nl>
9876 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_interpret): New
9878 * commands/ieee1275/halt.c: New file.
9879 * commands/ieee1275/reboot.c: Likewise.
9880 * commands/ieee1275/suspend.c (grub_cmd_suspend): Use
9881 `__attribute__ ((unused))'. Some GCS related fixed.
9882 (grub_suspend_init) [GRUB_UTIL]: Function removed.
9883 (grub_suspend_fini): Likewise.
9884 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add `reboot.mod'
9886 (reboot_mod_SOURCES, reboot_mod_CFLAGS, halt_mod_SOURCES)
9887 (halt_mod_CFLAGS): New variables.
9888 * include/grub/powerpc/ieee1275/ieee1275.h
9889 (grub_ieee1275_interpret): New prototype.
9891 2005-01-29 Yoshinori K. Okuji <okuji@enbug.org>
9893 * include/grub/misc.h (memmove): New prototype.
9896 2005-01-22 Hollis Blanchard <hollis@penguinppc.org>
9898 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
9899 `devpath' to 0. Use `name' instead of `devpath' with `grub_strndup'.
9901 2005-01-22 Marco Gerards <metgerards@student.han.nl>
9903 * kern/misc.c (grub_strndup): Function rewritten.
9905 2005-01-22 Vincent Pelletier <subdino2004@yahoo.fr>
9907 * normal/menu.c (TERM_WIDTH): Macro redefined.
9908 (TERM_TOP_BORDER_Y): Likewise.
9909 (draw_border): Replaced while-loop by a for-loop. Make the number
9910 of lines consistent with the number of lines displayed in
9911 print_entries. Added a margin below the rectangle.
9912 (print_entry): Make the entry fit in the rectangle.
9913 (print_entries): Display the scroll arrows next to the right
9916 2005-01-21 Marco Gerards <metgerards@student.han.nl>
9918 * fs/minix.c (grub_minix_find_file): Reserve more space for
9919 `fpath' so the \0 can be stored. Use `grub_strcpy' instead of
9920 `grub_strncpy' to copy `path' into it.
9922 2005-01-21 Marco Gerards <metgerards@student.han.nl>
9924 Add the loopback device, a device via which files can be accessed
9927 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/loopback.c'.
9928 (pkgdata_MODULES): Add loopback.mod.
9929 (loopback_mod_SOURCES): New variable.
9930 (loopback_mod_CFLAGS): Likewise.
9931 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
9933 (pkgdata_MODULES): Add loopback.mod.
9934 (loopback_mod_SOURCES): New variable.
9935 (loopback_mod_CFLAGS): Likewise.
9936 * disk/loopback.c: new file.
9937 * include/grub/normal.h (grub_loop_init): New prototype.
9938 (grub_loop_fini): New prototype.
9939 * util/grub-emu.c (main): Initialize and de-initialize loopback
9941 * include/grub/disk.h (grub_disk_dev_id): Add
9942 `GRUB_DISK_DEVICE_LOOPBACK_ID'.
9944 2005-01-20 Hollis Blanchard <hollis@penguinppc.org>
9946 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_enter): New
9948 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add suspend.mod.
9949 (suspend_mod_SOURCES): New variable.
9950 (suspend_mod_CFLAGS): Likewise.
9951 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_enter):
9953 * commands/ieee1275/suspend.c: New file.
9955 2005-01-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
9957 * include/grub/dl.h (GRUB_MOD_INIT): Changed `__attribute__
9958 ((unused))' to `__attribute__ ((used))'.
9959 (GRUB_MOD_FINI): Likewise.
9960 * kern/dl.c (grub_dl_load_file): Fix null pointer dereference.
9961 * genmk.rb (PModule): Assign space to common symbols when linking
9964 2005-01-20 Marco Gerards <metgerards@student.han.nl>
9966 * include/grub/mm.h (grub_mm_init_region): Change the type of the
9967 `unsigned' arguments to `grub_size_t'.
9968 (grub_malloc): Likewise.
9969 (grub_realloc): Likewise.
9970 (grub_memalign): Likewise.
9971 * kern/i386/dl.c (grub_arch_dl_check_header): Likewise.
9972 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
9973 * util/misc.c (grub_malloc): Likewise.
9974 (grub_realloc): Likewise.
9975 * kern/mm.c (get_header_from_pointer): Change the casts to
9976 `unsigned' into a cast to `grub_size_t'.
9978 * fs/fshelp.c (grub_fshelp_find_file): The `oldnode' should always
9979 point to `currnode' when `currnode' is changed.
9981 * util/grub-emu.c (main): Initialize `progname'. Reported by Nico
9982 Schottelius <nico-linux@schottelius.org>.
9984 2005-01-09 Hollis Blanchard <hollis@penguinppc.org>
9986 * util/powerpc/ieee1275/grub-mkimage.c: Include <string.h>.
9987 (note_path): Remove variable.
9988 (GRUB_IEEE1275_NOTE_NAME): New macro.
9989 (GRUB_IEEE1275_NOTE_TYPE): Likewise.
9990 (grub_ieee1275_note_hdr): New structure.
9991 (grub_ieee1275_note_desc): Likewise.
9992 (grub_ieee1275_note): Likewise.
9993 (load_note): Remove `dir' argument. All callers updated. Remove
9994 `note_img' and `path'. Do not load a file from `note_path'.
9995 Initialize a struct grub_ieee1275_note and write that to `out'.
9996 Use GRUB_IEEE1275_MODULE_BASE instead of MODULE_BASE.
9998 2005-01-05 Marco Gerards <metgerards@student.han.nl>
10000 * util/misc.c (grub_util_read_image): Revert last change. It
10001 called `grub_util_read_at', which seeks from the beginning of the
10004 2005-01-04 Hollis Blanchard <hollis@penguinppc.org>
10006 * TODO: Add note about endianness in grub-mkimage.
10007 * boot/powerpc/ieee1275/crt0.S (note): Remove unused .note
10009 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Add grub-mkimage.
10010 (grub_mkimage_SOURCES): New target.
10011 * include/grub/kernel.h (grub_start_addr): Remove variable.
10012 (grub_end_addr): Likewise.
10013 (grub_total_module_size): Likewise.
10014 (grub_kernel_image_size): Likewise.
10015 (GRUB_MODULE_MAGIC): New constant.
10016 (grub_module_info): New structure.
10017 (grub_arch_modules_addr): New prototype.
10018 (grub_get_end_addr): Remove prototype.
10019 * include/grub/i386/pc/kernel.h (grub_end_addr): New prototype.
10020 * include/grub/powerpc/ieee1275/kernel.h: New file.
10021 * include/grub/util/misc.h (grub_util_get_fp_size): New
10023 (grub_util_read_at): Likewise.
10024 (grub_util_write_image_at): Likewise.
10025 * kern/main.c (grub_get_end_addr): Remove function.
10026 (grub_load_modules): Call grub_arch_modules_addr instead of using
10027 grub_end_addr. Look for a grub_module_info struct in memory. Use
10028 the grub_module_info fields instead of calling grub_get_end_addr
10029 as loop conditions. Move grub_add_unused_region code here.
10030 (grub_add_unused_region): Remove function.
10031 * kern/i386/pc/init.c: Include grub/cache.h.
10032 (grub_machine_init): Remove call to grub_get_end_addr. Remove
10033 one call to add_mem_region.
10034 (grub_arch_modules_addr): New function.
10035 * kern/powerpc/ieee1275/init.c (grub_end_addr): Remove variable.
10036 (grub_total_module_size): Likewise.
10037 Include grub/machine/kernel.h.
10038 (grub_arch_modules_addr): New function.
10039 * util/grub-emu.c (grub_end_addr): Remove variable.
10040 (grub_total_module_size): Likewise.
10041 (grub_arch_modules_addr): New function.
10042 * util/misc.c: Include unistd.h.
10043 (grub_util_get_fp_size): New function.
10044 (grub_util_read_at): Likewise.
10045 (grub_util_write_image_at): Likewise.
10046 (grub_util_read_image): Call grub_util_read_at.
10047 (grub_util_write_image): Call grub_util_write_image_at.
10048 * util/i386/pc/grub-mkimage.c (generate_image): Allocate
10049 additional memory in kernel_img for a struct grub_module_info.
10050 Fill in that grub_module_info.
10051 * util/powerpc/ieee1275/grub-mkimage.c: New file.
10053 2005-01-03 Hollis Blanchard <hollis@penguinppc.org>
10055 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_milliseconds):
10057 * include/grub/powerpc/ieee1275/ieee1275.h
10058 (grub_ieee1275_milliseconds): New prototype.
10059 * include/grub/powerpc/ieee1275/time.h (GRUB_TICKS_PER_SECOND):
10061 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Call
10062 grub_ieee1275_milliseconds.
10064 2005-01-03 Hollis Blanchard <hollis@penguinppc.org>
10066 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_realmode): New
10068 (find_options): New function.
10069 (cmain): Call find_options.
10070 * include/grub/powerpc/ieee1275/ieee1275.h
10071 (grub_ieee1275_realmode): New extern variable.
10072 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Only call
10073 grub_map if grub_ieee1275_realmode is false.
10075 2004-12-29 Marco Gerards <metgerards@student.han.nl>
10077 * normal/cmdline.c (grub_cmdline_get): Redone logic so no empty
10078 lines are inserted and make it work like readline. Reported by
10079 Vincent Pelletier <subdino2004@yahoo.fr>.
10081 2004-12-28 Marco Gerards <metgerards@student.han.nl>
10083 * boot/powerpc/ieee1275/crt0.S (_start): Don't set up the stack.
10085 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCE): Remove
10086 `kern/powerpc/cache.S'.
10088 2004-12-27 Marco Gerards <metgerards@student.han.nl>
10090 * genmk.rb: Handle the `Program' class in the main loop. Written
10091 by Johan Rydberg <jrydberg@gnu.org>.
10092 (Program): New class.
10093 (programs): New variable.
10094 * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h>
10095 instead of "grub/machine/ieee1275.h". Include <grub/kernel.h>
10096 instead of "grub/kernel.h". Include <grub/machine/init.h>.
10097 (help_arch): Function removed.
10098 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add
10099 `powerpc/libgcc.h' and `loader.h'.
10100 (pkgdata_PROGRAMS): New variable.
10101 (sbin_UTILITIES): Variable removed.
10102 (grub_emu_SOURCES): Added kern/powerpc/cache.S.
10103 (grubof_SOURCES): Variable re-defined so it only includes the
10104 core functionality.
10105 (grubof_CFLAGS): Remove `-DGRUBOF'.
10106 (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS,
10107 (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES)
10108 (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS)
10109 (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES)
10110 (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS)
10111 (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES)
10112 (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS)
10113 (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS)
10114 (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES)
10115 (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS)
10116 (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
10117 (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES)
10118 (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS)
10119 (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES)
10120 (pc_mod_CFLAGS): New variables.
10121 * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>.
10122 (grub_ofdisk_iterate): Add a prototype for `dev_iterate'.
10123 * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype.
10124 * include/grub/loader.h (grub_os_area_addr, grub_os_area_size):
10126 * include/grub/i386/pc/init.h (grub_os_area_addr)
10127 (rub_os_area_size): ... to here.
10128 * include/grub/powerpc/ieee1275/ieee1275.h
10129 (grub_ieee1275_entry_fn): Export symbol.
10130 * include/grub/powerpc/ieee1275/init.h: New file.
10131 * include/grub/powerpc/libgcc.h: Likewise.
10132 * include/grub/cache.h: Likewise.
10133 * kern/powerpc/cache.S: Likewise. Written by Hollis Blanchard
10134 <hollis@penguinppc.org>.
10135 * kern/dl.c: Include <grub/cache.h>.
10136 (grub_dl_flush_cache): New function.
10137 (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache
10139 * kern/powerpc/ieee1275/init.c (grub_ofdisk_init)
10140 (grub_console_init): Removed prototypes.
10141 (grub_machine_init): Don't initialize the modules anymore.
10142 * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function
10144 * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN):
10145 Macro undef removed.
10146 (GRUB_HOST_WORDS_BIGENDIAN): New macro.
10147 * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add
10148 relocation `R_PPC_REL32'. Return an error when the relocation is
10150 * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'.
10151 * kern/i386/pc/init.c (grub_arch_sync_caches): New function.
10152 * util/misc.c (grub_arch_sync_caches): Likewise.
10154 2004-12-19 Marco Gerards <metgerards@student.han.nl>
10156 * conf/powerpc-ieee1275.rmk (MOSTLYCLEANFILES): Remove
10157 `symlist.c', add `grubof_symlist.c'.
10158 (symlist.c): Variable removed.
10159 (grubof_HEADERS): Variable added.
10160 (grubof_symlist.c): New target.
10161 (kernel_syms.lst): Use `grubof_HEADERS' instead of
10162 `kernel_img_HEADERS'.
10163 (grubof_SOURCES): Add `kern/powerpc/dl.c' and `grubof_symlist.c'.
10164 * kern/powerpc/dl.c: New file.
10165 * kern/powerpc/ieee1275/init.c (grub_arch_dl_check_header):
10167 (grub_arch_dl_relocate_symbols): Likewise.
10168 (grub_register_exported_symbols): Likewise.
10170 2004-12-13 Marco Gerards <metgerards@student.han.nl>
10172 * fs/ext2.c (grub_ext2_open): Don't use data after freeing it.
10173 (grub_ext2_dir): Likewise. Don't return in case of an error, jump
10174 to fail instead. Reported by Vincent Pelletier
10175 <subdino2004@yahoo.fr>.
10177 * fs/fshelp.c (grub_fshelp_find_file): Don't free `oldnode' when
10178 it is not allocated. Reported by Vincent Pelletier
10179 <subdino2004@yahoo.fr>.
10181 * normal/cmdline.c (grub_tab_complete): Add a blank line to the
10182 output so the output looks better.
10184 2004-12-04 Marco Gerards <metgerards@student.han.nl>
10186 Modulize the partition map support and add support for the amiga
10189 * commands/ls.c: Include <grub/partition.h> instead of
10190 <grub/machine/partition.h>.
10191 * kern/disk.c: Likewise.
10192 * kern/rescue.c: Likewise.
10193 * loader/i386/pc/chainloader.c: Likewise.
10194 * normal/cmdline.c: Likewise.
10195 * kern/powerpc/ieee1275/init.c: Likewise.
10196 (grub_machine_init): Call `grub_pc_partition_map_init',
10197 `grub_amiga_partition_map_init' and
10198 `grub_apple_partition_map_init'.
10199 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove
10200 `disk/i386/pc/partition.c'. Add `kern/partition.c'.
10201 (kernel_img_HEADERS): Remove `machine/partition.h'. Add
10202 `partition.h' and `pc_partition.h'.
10203 (grub_setup_SOURCES): Remove
10204 `disk/i386/pc/partition.c'. Add `kern/partition.c',
10205 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
10206 (grub_emu_SOURCES): Likewise.
10207 (pkgdata_MODULES): Add `amiga.mod', `apple.mod' and `pc.mod'.
10208 (amiga_mod_SOURCES, amiga_mod_CFLAGS, apple_mod_SOURCES)
10209 (apple_mod_CFLAGS, pc_mod_SOURCES, pc_mod_CFLAGS): New variables.
10210 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
10211 `disk/powerpc/ieee1275/partition.c'. Add `kern/partition.c',
10212 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
10213 (grubof_SOURCES): Likewise.
10214 * disk/i386/pc/partition.c: File removed.
10215 * disk/powerpc/ieee1275/partition.c: Likewise.
10216 * include/grub/powerpc/ieee1275/partition.h: Likewise.
10217 * include/grub/i386/pc/partition.h: Likewise.
10218 * kern/partition.c: New file.
10219 * partmap/amiga.c: Likewise.
10220 * partmap/apple.c: Likewise.
10221 * partmap/pc.c: Likewise.
10222 * include/grub/partition.h: Likewise..
10223 * include/grub/pc_partition.h: Likewise.
10224 * util/grub-emu.c: Include <grub/partition.h> instead of
10225 <grub/machine/partition.h>.
10226 (main): Call `grub_pc_partition_map_init',
10227 `grub_amiga_partition_map_init' and
10228 `grub_apple_partition_map_init' and deinitialize afterwards.
10229 * util/i386/pc/biosdisk.c: Include `#include
10230 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
10231 `<grub/machine/partition.h>'.
10232 * util/i386/pc/grub-setup.c: Likewise.
10233 * util/i386/pc/biosdisk.c: Likewise.
10234 (grub_util_biosdisk_get_grub_dev): Only access the PC specific
10235 partition information in case of a PC partition.
10236 * util/i386/pc/grub-setup.c: Include `#include
10237 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
10238 `<grub/machine/partition.h>'.
10239 (setup): Only access the PC specific partition information in case
10242 2004-11-17 Hollis Blanchard <hollis@penguinppc.org>
10244 * kern/powerpc/ieee1275/init.c (grub_setjmp): Remove function.
10245 (grub_longjmp): Likewise.
10246 * include/grub/powerpc/setjmp.h (grub_jmp_buf): Set array size to
10248 * normal/powerpc/setjmp.S: New file.
10249 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
10250 `normal/powerpc/setjmp.S'.
10251 (grubof_CFLAGS): Add `-DGRUBOF'.
10252 * include/grub/setjmp.h [GRUB_UTIL]: Changed condition to
10253 [GRUB_UTIL && !GRUBOF].
10255 2004-11-16 Marco Gerards <metgerards@student.han.nl>
10257 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Skip any
10258 property named `name'. Correctly handle the error returned by
10259 `grub_ieee1275_finddevice' if a device can not be opened.
10261 2004-11-02 Hollis Blanchard <hollis@penguinppc.org>
10263 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_readkey): Test
10264 `actual' for negativity.
10265 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
10268 2004-11-01 Marco Gerards <metgerards@student.han.nl>
10270 * term/i386/pc/vga.c (VGA_HEIGHT): Changed to 350.
10271 (PAGE_OFFSET): New macro.
10272 (CRTC_ADDR_PORT): Likewise.
10273 (CRTC_DATA_PORT): Likewise.
10274 (START_ADDR_HIGH_REGISTER): Likewise.
10275 (START_ADDR_LOW_REGISTER): Likewise.
10276 (GRAPHICS_ADDR_PORT): Likewise.
10277 (GRAPHICS_DATA_PORT): Likewise.
10278 (READ_MAP_REGISTER): Likewise.
10279 (INPUT_STATUS1_REGISTER): Likewise.
10280 (INPUT_STATUS1_VERTR_BIT): Likewise.
10281 (page): New variable.
10282 (wait_vretrace): New function.
10283 (set_read_map): Likewise.
10284 (set_start_address): Likewise.
10285 (grub_vga_init): Use mode 0x10 instead of mode 0x12. Switch to
10287 (check_vga_mem): Take the page into account.
10288 (write_char): Likewise.
10289 (write_cursor): Likewise.
10290 (scroll_up): Likewise. Copy the page to the page that is not
10291 shown and switch between both pages.
10292 (grub_vga_putchar): Fix off by one error.
10293 (grub_vga_cls): Wait for the vertical retrace. Take the page into
10296 2004-11-01 Marco Gerards <metgerards@student.han.nl>
10298 Add support for iso9660 (including rockridge).
10300 * conf/i386-pc.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
10301 (iso9660_mod_SOURCES): New variable.
10302 (iso9660_mod_CFLAGS): Likewise.
10303 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
10304 * include/grub/fs.h (grub_iso9660_init): New prototype.
10305 * util/grub-emu.c (main): Call `grub_iso9660_init'.
10306 * fs/iso9660.c: New file.
10308 * include/grub/misc.h (grub_strncat): New prototype.
10309 * kern/misc.c (grub_strncat): New function.
10311 * fs/hfs.c (grub_hfs_mount): Translate the error
10312 `GRUB_ERR_OUT_OF_RANGE' to `GRUB_ERR_BAD_FS'.
10313 * fs/jfs.c (grub_jfs_mount): Likewise.
10314 * fs/ufs.c (grub_ufs_mount): Likewise.
10316 2004-10-28 Hollis Blanchard <hollis@penguinppc.org>
10318 * boot/powerpc/ieee1275/cmain.c (cmain): Remove asm statements
10319 which initialized BAT registers.
10320 * boot/powerpc/ieee1275/ieee1275.c (IEEE1275_CALL_ENTRY_FN,
10321 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
10323 * include/grub/powerpc/ieee1275/ieee1275.h (IEEE1275_CALL_ENTRY_FN,
10324 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
10326 * kern/powerpc/ieee1275/openfw.c (grub_map): New function.
10327 (grub_mapclaim): Likewise.
10328 * loader/powerpc/ieee1275/linux.c (grub_load_linux): Use
10329 grub_mapclaim instead of grub_ieee1275_claim. Assign linux_addr by
10332 2004-10-19 Hollis Blanchard <hollis@penguinppc.org>
10334 * conf/powerpc-ieee1275.rmk (COMMON_ASFLAGS): Remove -fno-builtin.
10335 (COMMON_CFLAGS): Remove -fno-builtin and -D__ASSEMBLY__. Add
10336 -ffreestanding and -msoft-float.
10338 2004-10-15 Hollis Blanchard <hollis@penguinppc.org>
10340 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Do not
10341 append ":0" to devpath if the GRUB_IEEE1275_NO_PARTITION_0 flag is
10342 set in grub_ieee1275_flags.
10344 2004-10-14 Hollis Blanchard <hollis@penguinppc.org>
10346 * include/grub/powerpc/ieee1275/ieee1275.h (abort): Add function
10348 * kern/powerpc/ieee1275/init.c (grub_machine_init): Call
10349 grub_console_init first.
10350 Change the memory range used for grub_ieee1275_claim and
10351 grub_mm_init_region.
10352 Print an error message if the claim fails.
10353 Include <grub/misc.h>.
10355 2004-10-13 Hollis Blanchard <hollis@penguinppc.org>
10357 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_iterate):
10358 Call grub_children_iterate for device nodes of type `scsi',
10360 (grub_ofdisk_open): Remove manual device alias resolution.
10361 Fix memory leak when device cannot be opened.
10362 * include/grub/powerpc/ieee1275/ieee1275.h
10363 (grub_children_iterate): New prototype.
10364 * kern/powerpc/ieee1275/openfw.c (grub_children_iterate):
10366 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
10367 Return -1 if args.size was -1.
10369 2004-10-11 Hollis Blanchard <hollis@penguinppc.org>
10371 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_flags): New global.
10372 (cmain): Accept 3 parameters. Test for 0xdeadbeef, indicating Old
10373 World Macintosh. If Old Wold, set flag in grub_ieee1275_flags; claim
10374 Open Firmware's memory for it; claim memory from _start to _end.
10375 * boot/powerpc/ieee1275/crt0.S (__bss_start): New extern.
10376 (_end): New extern.
10377 (_start): Zero BSS from __bss_start to _end.
10378 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
10380 (GRUB_IEEE1275_NO_PARTITION_0): New #define.
10382 2004-10-11 Hollis Blanchard <hollis@penguinppc.org>
10384 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): Return
10385 -1 if args.base was -1.
10387 2004-10-08 Hollis Blanchard <hollis@penguinppc.org>
10389 * term/powerpc/ieee1275/ieee1275.c (grub_ofconsole_cls): Use an ANSI
10390 escape sequence instead of a literal ^L. Also call
10391 grub_ofconsole_gotoxy.
10393 2004-10-03 Hollis Blanchard <hollis@penguinppc.org>
10395 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): change
10396 void * arguments to grub_addr_t. All callers updated. Also make
10397 the `result' argument optional.
10398 (grub_ieee1275_release): change void * arguments to grub_addr_t.
10399 All callers updated.
10401 2004-09-22 Hollis Blanchard <hollis@penguinppc.org>
10403 * commands/ls.c (grub_ls_list_files): Use the string following the
10404 initial ')', if present, as the filesystem path.
10405 * kern/rescue.c (grub_rescue_cmd_ls): Likewise.
10407 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): List crt0.S first.
10409 2004-09-18 Yoshinori K. Okuji <okuji@enbug.org>
10411 Make the source code of the menu interface more readable.
10413 * normal/menu.c: Include grub/mm.h.
10414 (TERM_WIDTH): New macro.
10415 (TERM_HEIGHT): Likewise.
10416 (TERM_INFO_HEIGHT): Likewise.
10417 (TERM_MARGIN): Likewise.
10418 (TERM_SCROLL_WIDTH): Likewise.
10419 (TERM_TOP_BORDER_Y): Likewise.
10420 (TERM_LEFT_BORDER_X): Likewise.
10421 (TERM_BORDER_WIDTH): Likewise.
10422 (TERM_MESSAGE_HEIGHT): Likewise.
10423 (TERM_BORDER_HEIGHT): Likewise.
10424 (TERM_NUM_ENTRIES): Likewise.
10425 (TERM_FIRST_ENTRY_Y): Likewise.
10426 (TERM_ENTRY_WIDTH): Likewise.
10427 (TERM_CURSOR_X): Likewise.
10428 (draw_border): Use macros instead of magic numbers.
10429 (print_entry): Likewise.
10430 (print_entries): Likewise.
10431 (run_menu): Likewise. Also, handle the key 'e'.
10432 (run_menu_entry): Ignore empty command lines.
10433 (print_message): Added a new argument EDIT. If EDIT is true,
10434 print a different message.
10435 (init_page): Likewise.
10436 (edit_menu_entry): New function. Not implemented yet.
10438 2004-09-17 Marco Gerards <metgerards@student.han.nl>
10440 Add `linux.mod' and `multiboot.mod' so linux and multiboot kernels
10441 can be loaded from normal mode.
10443 * conf/i386-pc.rmk (pkgdata_MODULES): Add `linux.mod' and
10445 (linux_mod_SOURCES, linux_mod_CFLAGS, multiboot_mod_SOURCES)
10446 (multiboot_mod_CFLAGS): New variables.
10447 * loader/i386/pc/linux_normal.c: New file.
10448 * loader/i386/pc/multiboot_normal.c: Likewise.
10450 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Don't use the
10451 attribute `unused'.
10453 * fs/ext2.c (grub_ext2_iterate_dir): Fix typos in inode type. Use
10454 `fdiro' to read the mode information from instead of `diro'.
10456 * fs/fshelp.c (grub_fshelp_find_file): Set type to foundtype after
10457 looking up a symlink.
10459 * include/grub/normal.h (GRUB_COMMAND_FLAG_NO_ARG_PARSE): New
10461 * normal/command.c (grub_command_execute): Don't parse the
10462 arguments when `GRUB_COMMAND_FLAG_NO_ARG_PARSE' is set in the
10463 flags of the command.
10465 * normal/menu.c (grub_menu_run): Fix typo.
10467 2004-09-14 Hollis Blanchard <hollis@penguinppc.org>
10469 * kern/powerpc/ieee1275/init.c (abort): Trap into Open Firmware.
10471 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_gotoxy): Use
10472 `y + 1' instead of `y - 1'.
10474 * conf/powerpc-ieee1275.rmk (grubof_LDFLAGS): Add `-N' and `-S'.
10476 2004-09-14 Yoshinori K. Okuji <okuji@enbug.org>
10478 From Hollis Blanchard <hollis@penguinppc.org>:
10479 * kern/misc.c (memmove): New alias for grub_memmove.
10480 (memcmp): New alias for grub_memcmp.
10481 (memset): New alias for grub_memset.
10482 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
10483 Change "int handle" to "grub_ieee1275_phandle_t handle".
10484 * include/grub/powerpc/ieee1275/ieee1275.h
10485 (grub_ieee1275_get_property): Likewise.
10487 2004-09-12 Tomas Ebenlendr <ebik@ucw.cz>
10489 Added normal mode command `chainloader' as module chain.mod, which
10490 depends on normal.mod and _chain.mod.
10492 * conf/i386-pc.rmk (pkgdata_MODULES): Add `chain.mod'.
10493 (chain_mod_SOURCES, chain_mod_CFLAGS): Variables added.
10494 * include/grub/i386/pc/loader.h (grub_rescue_cmd_chainloader):
10496 * loader/i386/pc/chainloader.c (grub_rescue_cmd_chainloader): All
10497 but arguments parsing moved to ...
10498 (grub_chainloader_cmd): ... here. New function.
10499 * include/grub/i386/pc/chainloader.h: New file.
10500 * loader/i386/pc/chainloader_normal.c: Likewise.
10502 2004-09-11 Marco Gerards <metgerards@student.han.nl>
10504 * conf/i386-pc.rmk (kernel_img_SOURCES): Added kern/fshelp.c.
10505 (grub_mkimage_LDFLAGS): Likewise.
10506 (grub_emu_SOURCES): Likewise.
10507 (kernel_img_HEADERS): Added fshelp.h.
10508 * fs/ext2.c: Include <grub/fshelp.h>.
10509 (FILETYPE_REG): New macro.
10510 (FILETYPE_INO_REG): Likewise.
10511 (grub_ext_sblock): Renamed to `grub_ext2_sblock'.
10513 (ext2_block_group): Renamed to `grub_ext2_block_group'. Changed
10515 (grub_fshelp_node): New struct.
10516 (grub_ext2_data): Added member `diropen'. Changed member `inode'
10518 (grub_ext2_get_file_block): Removed function.
10519 (grub_ext2_read_block): New function.
10520 (grub_ext2_read_file): Replaced parameter `data' by `node'.
10521 This function was written.
10522 (grub_ext2_mount): Read the root inode. Create a diropen struct.
10523 (grub_ext2_find_file): Removed function.
10524 (grub_ext2_read_symlink): New function.
10525 (grub_ext2_iterate_dir): Likewise.
10526 (grub_ext2_open): Rewritten.
10527 (grub_ext2_dir): Rewritten.
10528 * include/grub/fshelp.h: New file.
10529 * fs/fshelp.c: Likewise.
10531 2004-09-10 Yoshinori K. Okuji <okuji@enbug.org>
10533 * normal/menu.c: Include grub/loader.h and grub/machine/time.h.
10534 (print_message): Add a missing newline.
10535 (run_menu): Added timeout support.
10536 (run_menu_entry): New local function.
10537 (grub_menu_run): Added support for booting.
10539 * kern/loader.c (grub_loader_is_loaded): New function.
10541 * include/grub/powerpc/ieee1275/time.h: Include grub/symbol.h.
10542 (grub_get_rtc): Exported.
10544 * include/grub/i386/pc/time.h: Include grub/symbol.h.
10545 (grub_get_rtc): Exported.
10547 * include/grub/normal.h (struct grub_command_list): Remove
10548 constant from the member `command'.
10550 * include/grub/loader.h (grub_loader_is_loaded): Declared.
10552 * include/grub/err.h (GRUB_ERR_INVALID_COMMAND): New constant.
10554 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/time.h.
10556 2004-08-28 Marco Gerards <metgerards@student.han.nl>
10558 Add support for the JFS filesystem.
10560 * fs/jfs.c: New file.
10561 * include/grub/fs.h (grub_jfs_init): New prototype.
10562 (grub_jfs_fini): New prototype.
10563 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/jfs.c.
10564 (grub_emu_SOURCES): Likewise.
10565 (pkgdata_MODULES): Add jfs.mod.
10566 (jfs_mod_SOURCES): New variable.
10567 (jfs_mod_CFLAGS): Likewise.
10568 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs.jfs.c.
10569 (grubof_SOURCES): Likewise.
10570 * util/grub-emu.c (main): Initialize and deinitialize JFS support.
10572 * fs/fat.c (grub_fat_find_dir): Convert the filename little
10573 endian to the host endian.
10574 (grub_fat_utf16_to_utf8): Move function from there...
10575 * kern/misc.c (grub_utf16_to_utf8): ...to here. Do not convert
10576 the endianness of the source string anymore.
10577 * include/grub/misc.h (grub_utf16_to_utf8): New prototype.
10579 2004-08-24 Marco Gerards <metgerards@student.han.nl>
10581 * commands/boot.c (grub_boot_init) [GRUB_UTIL]: Make conditional.
10582 (grub_boot_fini) [GRUB_UTIL]: Likewise.
10583 (GRUB_MOD_INIT) [!GRUB_UTIL]: Likewise.
10584 (GRUB_MOD_FINI) [!GRUB_UTIL]: Likewise.
10586 * fs/hfs.c (grub_hfs_find_node): Add a prototype for `node_found'.
10587 (grub_hfs_iterate_dir): Make the function static. Add prototypes
10588 for `node_found' and `it_dir'.
10589 (grub_hfs_dir): Add prototype for `dir_hook'.
10591 * fs/minix.c (grub_minix_get_file_block): Add prototype for
10592 `grub_get_indir'. Rename `indir' in two blocks to `indir16'
10593 and `indir32' to silence a gcc warning.
10595 * include/grub/fs.h (grub_hfs_init): New prototype.
10596 (grub_hfs_fini): Likewise.
10599 2004-08-21 Yoshinori K. Okuji <okuji@enbug.org>
10601 Each disk device has its own id now. This is useful to make use
10602 of multiple disk devices.
10604 * include/grub/disk.h (grub_disk_dev_id): New enum.
10605 (GRUB_DISK_DEVICE_BIOSDISK_ID): New constant.
10606 (GRUB_DISK_DEVICE_OFDISK_ID): Likewise.
10608 * disk/i386/pc/biosdisk.c (grub_biosdisk_dev): Specify
10609 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
10611 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_dev): Specify
10612 GRUB_DISK_DEVICE_OFDISK_ID as an id.
10614 * util/i386/pc/biosdisk.c (grub_util_biosdisk_dev): Specify
10615 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
10617 * include/grub/disk.h (struct grub_disk_dev): Added a new member
10618 "id" which is used by the cache manager.
10620 * normal/main.c (grub_normal_init_page): Use "GNU GRUB" instead
10623 2004-08-18 Marco Gerards <metgerards@student.han.nl>
10625 * fs/hfs.c: New file.
10626 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/hfs.c.
10627 (grub_emu_SOURCES): Likewise.
10628 (pkgdata_MODULES): Add hfs.mod.
10629 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/hfs.c.
10630 (grubof_SOURCES): Likewise.
10631 * util/grub-emu.c (main): Initialize and deinitialize HFS support.
10633 * include/grub/misc.h (grub_strncasecmp): Add prototype.
10634 * kern/misc.c (grub_strncasecmp): Add function.
10636 2004-08-14 Marco Gerards <metgerards@student.han.nl>
10638 * include/grub/arg.h (GRUB_ARG_OPTION_OPTIONAL): Surround macro
10641 * fs/ext2.c (FILETYPE_UNKNOWN): New macro.
10642 (grub_ext2_dir): In case the directory entry type is unknown, read
10645 2004-08-02 Peter Bruin <pjbruin@dds.nl>
10647 * loader/powerpc/ieee1275/linux.c (grub_linux_init): Pass
10648 grub_load_linux instead of grub_rescue_cmd_linux as second
10649 argument of grub_rescue_register_command.
10651 * Makefile.in (RMKFILES): Add conf/powerpc-ieee1275.rmk.
10653 2004-07-27 Marco Gerards <metgerards@student.han.nl>
10655 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_release): New
10657 * commands/boot.c: Remove the check for `GRUB_UTIL'.
10658 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
10659 `loader/powerpc/ieee1275/linux.c',
10660 `loader/powerpc/ieee1275/linux_normal.c' and `commands/boot.c'.
10661 * include/grub/powerpc/ieee1275/ieee1275.h
10662 (grub_ieee1275_release): New prototype.
10663 * include/grub/powerpc/ieee1275/loader.h: Rewritten.
10664 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize
10665 normal, boot, linux and linux_normal.
10666 * loader/powerpc/ieee1275/linux.c: New file.
10667 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
10669 2004-07-12 Marco Gerards <metgerards@student.han.nl>
10671 * normal/arg.c (grub_arg_parse): Correct error handling after
10672 reallocating the argumentlist (check if `argl' is not null instead
10673 of checking if `args' is not null).
10674 * kern/mm.c (grub_realloc): Return the same pointer when using the
10675 same region, instead of returning the header address.
10677 2004-07-11 Marco Gerards <metgerards@student.han.nl>
10679 * disk/powerpc/ieee1275/partition.c (grub_partition_iterate): Skip
10680 one block instead of two when looking for the initial partition.
10681 (grub_partition_probe): Initialize the local variable `p' with 0.
10682 Use base 10 for the grub_strtoul call.
10683 * kern/misc.c (grub_strncpy): Fix off by one bug. Eliminated the
10684 need for one local variable.
10685 (grub_strtoul): Don't add the new value to `num', instead of that
10688 2004-07-11 Marco Gerards <metgerards@student.han.nl>
10690 * conf/i386-pc.rmk (pkgdata_IMAGE): Add pxeboot.img.
10691 (pxeboot_img_SOURCES): New variable.
10692 (pxeboot_img_ASFLAGS): Likewise.
10693 (pxeboot_img_LDFLAGS): Likewise.
10694 * boot/i386/pc/pxeboot.S: New file. Based on pxeloader.S from
10695 GRUB Legacy and boot.S. Adopted for GRUB 2 by lode leroy
10696 <lode_leroy@hotmail.com>.
10698 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
10700 * kern/rescue.c (grub_enter_rescue_mode): Don't continue when
10701 there was no input.
10703 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
10705 * normal/cmdline.c (grub_set_history): Fix off by one bug. Fixed
10706 the history buffer logic.
10708 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
10710 * fs/ext2.c (FILETYPE_INO_MASK, FILETYPE_INO_DIRECTORY)
10711 (FILETYPE_INO_SYMLINK): New macros.
10712 (grub_ext2_find_file): Check if the node is a directory using the
10713 inode stat information instead of using the filetype in the
10714 dirent. Exclude the first character of an absolute symlink.
10715 (grub_ext2_dir): Mask out the filetype part of the mode member of
10718 2004-05-24 Marco Gerards <metgerards@student.han.nl>
10720 Add support for UFS version 1 and 2. Add support for the minix
10721 filesystem version 1 and 2, both the variants with 14 and 30 long
10724 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ufs.c and
10726 (grub_emu_SOURCES): Likewise.
10727 (pkgdata_MODULES): Add ufs.mod and minix.mod.
10728 (ufs_mod_SOURCES): New variable.
10729 (ufs_mod_CFLAGS): Likewise.
10730 (minix_mod_SOURCES): Likewise.
10731 (minix_mod_CFLAGS): Likewise.
10732 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/ufs.c and
10734 (grubof_SOURCES): Likewise.
10735 * fs/ufs.c: New file.
10736 * fs/minix.c: New file.
10737 * include/grub/fs.h (grub_ufs_init): New prototype.
10738 (grub_ufs_fini): Likewise.
10739 (grub_minix_init): Likewise.
10740 (grub_minix_fini): Likewise.
10741 * util/grub-emu.c (main): Initialize and deinitialize UFS and
10744 2004-04-30 Jeroen Dekkers <jeroen@dekkers.cx>
10746 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add normal/arg.c,
10747 commands/ls.c, commands/terminal.c, commands/boot.c,
10748 commands/cmp.c and commands/cat.c.
10749 (grubof_LDFLAGS): Add -nostdlib -static-libgcc -lgcc.
10751 * kern/powerpc/ieee1275/init.c: Include "grub/env.h" instead of
10754 2004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
10756 All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
10757 and grub_, respectively. Because the conversion is trivial and
10758 mechanical, I omit the details here. Please refer to the CVS
10759 if you need more information.
10761 2004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
10763 * include/pupa: Renamed to ...
10764 * include/grub: ... this.
10765 * util/i386/pc/pupa-mkimage.c: Renamed to ...
10766 * util/i386/pc/grub-mkimage.c: ... this.
10767 * util/i386/pc/pupa-setup.c: Renamed to ...
10768 * util/i386/pc/grub-setup.c: ... this.
10769 * util/pupa-emu.c: Renamed to ...
10770 * util/grub-emu.c: ... this.
10772 2004-03-29 Marco Gerards <metgerards@student.han.nl>
10774 Add support for the newworld apple macintosh (PPC). This has been
10775 tested on the powerbook 2000 only. It only adds support for
10776 generic ieee1275 functions, console and disk support. This should
10777 be easy to port to other architectures with support for Open
10780 * configure.ac: Accept the powerpc as host_cpu. In the case of
10781 the powerpc cpu set the host_vendor to ieee1275. Make sure the i386
10782 specific tests are only executed while building for the i386.
10783 Inverse test for crosscompile.
10784 * genmk.rb (Utility): Allow assembler files.
10785 * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno.
10786 * conf/powerpc-ieee1275.rmk: New file.
10787 * disk/powerpc/ieee1275/ofdisk.c: Likewise.
10788 * disk/powerpc/ieee1275/partition.c: Likewise.
10789 * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise.
10790 * include/pupa/powerpc/ieee1275/console.h: Likewise.
10791 * include/pupa/powerpc/ieee1275/partition.h: Likewise.
10792 * include/pupa/powerpc/ieee1275/time.h: Likewise.
10793 * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise.
10794 * include/pupa/powerpc/ieee1275/multiboot.h: Likewise.
10795 * include/pupa/powerpc/ieee1275/loader.h
10796 * include/pupa/powerpc/setjmp.h: Likewise.
10797 * include/pupa/powerpc/types.h: Likewise.
10798 * kern/powerpc/ieee1275/init.c: Likewise.
10799 * kern/powerpc/ieee1275/openfw.c: Likewise.
10800 * term/powerpc/ieee1275/ofconsole.c: Likewise.
10802 These files were written by Johan Rydberg
10803 (jrydberg@night.trouble.net) and I only modified them slightly.
10805 * boot/powerpc/ieee1275/cmain.c: New file.
10806 * boot/powerpc/ieee1275/crt0.S: Likewise.
10807 * boot/powerpc/ieee1275/ieee1275.c: Likewise.
10808 * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
10810 2004-03-14 Jeroen Dekkers <jeroen@dekkers.cx>
10812 * Makefile.in: Update copyright.
10813 * genmodsrc.sh: Likewise.
10814 * gensymlist.sh: Likewise.
10815 * term/i386/pc/vga.c: Indent correctly.
10817 * util/i386/pc/pupa-mkimage.c (usage): Use PACKAGE_BUGREPORT as
10818 bugreporting address.
10819 * util/i386/pc/pupa-setup.c (usage): Likewise,
10820 (main): Call pupa_ext2_init and pupa_ext2_fini.
10822 * fs/fat.c (log2): Renamed to ...
10823 (fat_log2): ... this.
10824 All callers changed.
10825 * kern/misc.c (memcpy): Alias to pupa_memmove.
10826 * loader/i386/pc/multiboot.c (pupa_rescue_cmd_multiboot): Fix
10828 * util/console.c (pupa_ncurses_fini): Return 0.
10830 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open)[__linux__]:
10831 Move fail label here.
10832 [__GNU__]: Don't warn when using stat.
10833 (open_device)[!__linux__]: Check if FD < 0 instead of !FD.
10834 (pupa_util_biosdisk_get_pupa_dev)[__GNU__]: Change type of N to
10835 long int. Use strtol instead of strtoul.
10837 2004-03-14 Marco Gerards <metgerards@student.han.nl>
10839 * commands/boot.c: New file.
10840 * commands/cat.c: Likewise.
10841 * commands/cmp.c: Likewise.
10842 * commands/ls.c: Likewise.
10843 * commands/terminal.c: Likewise.
10844 * normal/command.c: Include <pupa/env.h> and <pupa/dl.h>.
10845 (pupa_register_command): Changed interface to match the new
10847 (pupa_command_execute): Changed (almost rewritten) so it uses
10848 pupa_split_command. Added support for setting variables using the
10850 (rescue_command): Changed to work with the new argument parser.
10851 (terminal_command): Moved from here to commands/terminal.c.
10852 (set_command): New function.
10853 (unset_command): New function.
10854 (insmod_command): New function.
10855 (rmmod_command): New function.
10856 (lsmod_command): New function.
10857 (pupa_command_init): Don't initialize the command terminal
10858 anymore. Initialize the commands set, unset, insmod, rmmod and
10860 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/env.c.
10861 (kernel_img_HEADERS): Add arg.h and env.h.
10862 (pupa_mkimage_LDFLAGS): Add kern/env.c.
10863 (pupa_emu_SOURCES): Add kern/env.c, commands/ls.c,
10864 commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c,
10866 (pkgdata_MODULES): Add ls.mod, boot.mod, cmp.mod, cat.mod and
10868 (normal_mod_SOURCES): Add normal/arg.c and normal/arg.c.
10869 (boot_mod_SOURCES): New variable.
10870 (terminal_mod_SOURCES): Likewise.
10871 (ls_mod_SOURCES): Likewise.
10872 (cmp_mod_SOURCES): Likewise.
10873 (cat_mod_SOURCES): Likewise.
10875 * normal/arg.c: New file.
10876 * kern/env.c: Likewise.
10877 * include/pupa/arg.h: Likewise.
10878 * include/pupa/env.h: Likewise.
10879 * font/manager.c (font_command): Changed to match argument parsing
10881 (PUPA_MOD_INIT): Likewise.
10882 * hello/hello.c (pupa_cmd_hello): Likewise.
10883 (PUPA_MOD_INIT): Likewise.
10884 * include/pupa/disk.h: Include <pupa/device.h>.
10885 (pupa_print_partinfo): New prototype.
10886 * include/pupa/dl.h (pupa_dl_set_prefix): Prototype removed.
10887 (pupa_dl_get_prefix): Likewise.
10888 * include/pupa/misc.h: Include <pupa/err.h>.
10889 (pupa_isgraph): New prototype.
10890 (pupa_isdigit): Likewise.
10891 (pupa_split_cmdline): Likewise.
10892 * include/pupa/normal.h: Include <pupa/arg.h>.
10893 (pupa_command): Changed the prototype of the member `func' to
10894 match the argument parsing interface. Added member `options'.
10895 (pupa_register_command): Updated to match function.
10896 (pupa_arg_parse): New prototype.
10897 (pupa_hello_init) [PUPA_UTIL]: New prototype.
10898 (pupa_hello_fini) [PUPA_UTIL]: Likewise.
10899 (pupa_ls_init) [PUPA_UTIL]: Likewise.
10900 (pupa_ls_fini) [PUPA_UTIL]: Likewise.
10901 (pupa_cat_init) [PUPA_UTIL]: Likewise.
10902 (pupa_cat_fini) [PUPA_UTIL]: Likewise.
10903 (pupa_boot_init) [PUPA_UTIL]: Likewise.
10904 (pupa_boot_fini) [PUPA_UTIL]: Likewise.
10905 (pupa_cmp_init) [PUPA_UTIL]: Likewise.
10906 (pupa_cmp_fini) [PUPA_UTIL]: Likewise.
10907 (pupa_terminal_init) [PUPA_UTIL]: Likewise.
10908 (pupa_terminal_fini) [PUPA_UTIL]: Likewise.
10909 * kern/disk.c: Include <pupa/file.h>.
10910 (pupa_print_partinfo): New function.
10911 * kern/dl.c: Include <pupa/env.h>.
10912 (pupa_dl_dir): Variable removed.
10913 (pupa_dl_load): Use the environment variable `prefix' instead of
10914 the variable pupa_dl_dir.
10915 (pupa_dl_set_prefix): Function removed.
10916 (pupa_dl_get_prefix): Likewise.
10917 * kern/i386/pc/init.c: Include <pupa/env.h>.
10918 (pupa_machine_init): Use the environment variable `prefix' instead of
10919 using pupa_dl_set_prefix to set the prefix.
10920 * kern/main.c: Include <pupa/env.h>.
10921 (pupa_set_root_dev): Use the environment variable `prefix' instead of
10922 using pupa_dl_get_prefix to get the prefix.
10923 * kern/misc.c: Include <pupa/env.h>.
10924 (pupa_isdigit): New function.
10925 (pupa_isgraph): Likewise.
10926 (pupa_ftoa): Likewise.
10927 (pupa_vsprintf): Added support for printing values of the type
10928 `double'. Make it possible to format variable output when using
10929 formatting like `%1.2%f'.
10930 (pupa_split_cmdline): New function.
10931 * kern/rescue.c: Include <pupa/env.h>.
10932 (next_word): Removed function.
10933 (pupa_rescue_cmd_prefix): Likewise.
10934 (pupa_rescue_cmd_set): New function.
10935 (pupa_rescue_cmd_unset): New function.
10936 (pupa_enter_rescue_mode): Use the `pupa_split_cmdline' function to
10937 split the command line instead of splitting it here. Added
10938 support for setting variables using the syntax `foo=bar'. Don't
10939 initialize the prefix command anymore. Initialized the set and
10941 * normal/cmdline.c: Include <pupa/env.h>.
10942 (pupa_tab_complete): Added prototypes for print_simple_completion,
10943 print_partition_completion, add_completion, iterate_commands,
10944 iterate_dev, iterate_part and iterate_dir. Moved code to print
10945 partition information from here to kern/disk.c.
10946 (pupa_cmdline_run): Don't check if the function exists anymore.
10947 * normal/main.c: Include <pupa/env.h>.
10948 (pupa_rescue_cmd_normal): Use the environment variable `prefix'
10949 instead of using pupa_dl_get_prefix to get the prefix.
10950 * term/i386/pc/vga.c: Include <pupa/arg.h>.
10951 (check_vga_mem): Cast pointers to `void *' to silence a gcc
10953 (pupa_vga_putchar) [! DEBUG_VGA]: Removed for this case.
10954 (pupa_vga_setcolor): Declare unused variables with `__attribute__
10955 ((unused))' to silence a gcc warning.
10956 (pupa_vga_setcolor): Likewise.
10957 (debug_command): Changed to match argument parsing
10959 * util/pupa-emu.c: Include <pupa/env.h>.
10960 (options): Added 0's for unused fields to silence a gcc warning.
10962 (main): Use the environment variable `prefix' instead of using
10963 pupa_dl_set_prefix to set the prefix. Initialize the commands ls,
10964 boot, cmp, cat and terminal. Finish the commands boot, cmp, cat
10967 * util/i386/pc/getroot.c: Include <pupa/i386/pc/util/biosdisk.h>.
10968 * util/misc.c: Include <malloc.h>.
10969 (pupa_malloc): Rewritten so errors are correctly reported.
10970 (pupa_realloc): Likewise.
10971 (pupa_memalign): Likewise.
10972 (pupa_mm_init_region): Declare unused variables with
10973 `__attribute__ ((unused))' to silence a gcc warning.
10974 * normal/i386/setjmp.S: Remove tab at the end of the file to
10975 silence a gcc warning.
10976 * loader/i386/pc/linux.c (pupa_rescue_cmd_initrd): Declare unused
10977 variables with `__attribute__ ((unused))' to silence a gcc
10979 * loader/i386/pc/multiboot.c (pupa_multiboot_unload): Make the
10980 local variable i unsigned to silence a gcc warning.
10982 * kern/term.c: Include <pupa/misc.h>.
10983 (pupa_more_lines): New variable.
10984 (pupa_more): Likewise.
10985 (pupa_putcode): When the pager is active pause at the end of every
10987 (pupa_set_more): New function.
10988 * include/pupa/term.h (pupa_set_more): New prototype.
10991 2004-03-07 Yoshinori K. Okuji <okuji@enbug.org>
10993 Now this project is GRUB 2 rather than PUPA. The location of
10994 the CVS repository was moved to GRUB's.
10996 * configure.ac: Use bug-grub as the reporting address.
10997 Use GRUB instead of PUPA.
10998 Change the version number to 1.90.
11000 2004-02-24 Yoshinori K. Okuji <okuji@enbug.org>
11002 * genkernsyms.sh: Updated copyright information.
11003 * genmk.rb: Likewise.
11004 * genmodsrc.sh: Likewise.
11005 * gensymlist.sh: Likewise.
11006 * boot/i386/pc/boot.S: Likewise.
11007 * boot/i386/pc/diskboot.S: Likewise.
11008 * disk/i386/pc/biosdisk.c: Likewise.
11009 * disk/i386/pc/partition.c: Likewise.
11010 * font/manager.c: Likewise.
11011 * fs/ext2.c: Likewise.
11012 * fs/fat.c: Likewise.
11013 * include/pupa/boot.h: Likewise.
11014 * include/pupa/device.h: Likewise.
11015 * include/pupa/disk.h: Likewise.
11016 * include/pupa/dl.h: Likewise.
11017 * include/pupa/elf.h: Likewise.
11018 * include/pupa/err.h: Likewise.
11019 * include/pupa/file.h: Likewise.
11020 * include/pupa/font.h: Likewise.
11021 * include/pupa/fs.h: Likewise.
11022 * include/pupa/kernel.h: Likewise.
11023 * include/pupa/loader.h: Likewise.
11024 * include/pupa/misc.h: Likewise.
11025 * include/pupa/mm.h: Likewise.
11026 * include/pupa/net.h: Likewise.
11027 * include/pupa/normal.h: Likewise.
11028 * include/pupa/rescue.h: Likewise.
11029 * include/pupa/setjmp.h: Likewise.
11030 * include/pupa/symbol.h: Likewise.
11031 * include/pupa/term.h: Likewise.
11032 * include/pupa/types.h: Likewise.
11033 * include/pupa/i386/setjmp.h: Likewise.
11034 * include/pupa/i386/types.h: Likewise.
11035 * include/pupa/i386/pc/biosdisk.h: Likewise.
11036 * include/pupa/i386/pc/boot.h: Likewise.
11037 * include/pupa/i386/pc/console.h: Likewise.
11038 * include/pupa/i386/pc/init.h: Likewise.
11039 * include/pupa/i386/pc/kernel.h: Likewise.
11040 * include/pupa/i386/pc/linux.h: Likewise.
11041 * include/pupa/i386/pc/loader.h: Likewise.
11042 * include/pupa/i386/pc/memory.h: Likewise.
11043 * include/pupa/i386/pc/multiboot.h: Likewise.
11044 * include/pupa/i386/pc/partition.h: Likewise.
11045 * include/pupa/i386/pc/time.h: Likewise.
11046 * include/pupa/i386/pc/vga.h: Likewise.
11047 * include/pupa/i386/pc/util/biosdisk.h: Likewise.
11048 * include/pupa/util/getroot.h: Likewise.
11049 * include/pupa/util/misc.h: Likewise.
11050 * include/pupa/util/resolve.h: Likewise.
11051 * kern/device.c: Likewise.
11052 * kern/disk.c: Likewise.
11053 * kern/dl.c: Likewise.
11054 * kern/err.c: Likewise.
11055 * kern/file.c: Likewise.
11056 * kern/fs.c: Likewise.
11057 * kern/loader.c: Likewise.
11058 * kern/main.c: Likewise.
11059 * kern/misc.c: Likewise.
11060 * kern/mm.c: Likewise.
11061 * kern/rescue.c: Likewise.
11062 * kern/term.c: Likewise.
11063 * kern/i386/dl.c: Likewise.
11064 * kern/i386/pc/init.c: Likewise.
11065 * kern/i386/pc/lzo1x.S: Likewise.
11066 * kern/i386/pc/startup.S: Likewise.
11067 * loader/i386/pc/chainloader.c: Likewise.
11068 * loader/i386/pc/linux.c: Likewise.
11069 * loader/i386/pc/multiboot.c: Likewise.
11070 * normal/cmdline.c: Likewise.
11071 * normal/command.c: Likewise.
11072 * normal/main.c: Likewise.
11073 * normal/menu.c: Likewise.
11074 * normal/i386/setjmp.S: Likewise.
11075 * term/i386/pc/console.c: Likewise.
11076 * term/i386/pc/vga.c: Likewise.
11077 * util/console.c: Likewise.
11078 * util/genmoddep.c: Likewise.
11079 * util/misc.c: Likewise.
11080 * util/pupa-emu.c: Likewise.
11081 * util/resolve.c: Likewise.
11082 * util/unifont2pff.rb: Likewise.
11083 * util/i386/pc/biosdisk.c: Likewise.
11084 * util/i386/pc/getroot.c: Likewise.
11085 * util/i386/pc/pupa-mkimage.c: Likewise.
11086 * util/i386/pc/pupa-setup.c: Likewise.
11088 2004-02-15 Jeroen Dekkers <jeroen@dekkers.cx>
11090 * fs/ext2.c (pupa_ext2_read_file): Correct the value of BLOCKEND
11091 when it is EXT2_BLOCK_SIZE (data). New argument READ_HOOK, all
11092 callers changed. Set DATA->DISK->READ_HOOK to READ_HOOK before
11093 reading and reset it after reading.
11094 (pupa_ext2_close): Return PUPA_ERR_NONE.
11096 * include/pupa/i386/pc/linux.h (PUPA_LINUX_INITRD_MAX_ADDRESS):
11098 (struct linux_kernel_header): Add kernel_version and
11100 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Check whether
11101 pupa_file_read succeeds.
11102 (pupa_rescue_cmd_initrd): Implement.
11104 2003-12-03 Marco Gerards <metgerards@student.han.nl>
11106 * fs/ext2.c (pupa_ext2_label): New function.
11107 (pupa_ext2_fs): Added label.
11108 * fs/fat.c (pupa_fat_label): New function.
11109 (pupa_fat_fs): Added label.
11110 * include/pupa/fs.h (struct pupa_fs): Added prototype label.
11112 * kern/misc.c (pupa_strndup): New function.
11113 * include/pupa/misc.h (pupa_strndup): New prototype.
11115 * include/pupa/normal.h: Include <pupa/err.h>.
11116 (pupa_set_history): New prototype.
11117 (pupa_iterate_commands): New prototype.
11118 * normal/cmdline.c: Include <pupa/machine/partition.h>,
11119 <pupa/disk.h>, <pupa/file.h>.
11120 (hist_size): New variable.
11121 (hist_lines): Likewise.
11122 (hist_end): Likewise.
11123 (hist_used): Likewise.
11124 (pupa_set_history): New function.
11125 (pupa_history_get): Likewise.
11126 (pupa_history_add): Likewise.
11127 (pupa_history_replace): Likewise.
11128 (pupa_tab_complete): Likewise.
11129 (pupa_cmdline_run): Added tab completion and history buffer. Tab
11130 completion shows partitionnames while completing partitions, this
11131 feature was suggested by Jeff Bailey.
11132 * normal/command.c (pupa_iterate_commands): New function.
11133 * normal/main.c (PUPA_DEFAULT_HISTORY_SIZE): New macro.
11134 (pupa_normal_init): Initialize history buffer.
11135 (PUPA_MOD_INIT): Likewise.
11136 (pupa_normal_fini): Free the history buffer.
11137 (PUPA_MOD_FINI): Likewise.
11139 * util/console.c (pupa_ncurses_getkey): Accept 127 as backspace
11142 * aclocal.m4 (pupa_I386_CHECK_REGPARM_BUG): New DEFUN.
11143 * configure.ac [i386]: Check for regparam bug.
11144 (NESTED_FUNC_ATTR) [! i386]: Defined.
11146 2003-11-17 Marco Gerards <metgerards@student.han.nl>
11148 * conf/i386-pc.rmk (sbin_UTILITIES): Added pupa-emu.
11149 (pupa_setup_SOURCES): Added util/i386/pc/getroot.c.
11150 (pupa_emu_SOURCES): New variable.
11151 (pupa_emu_LDFLAGS): Likewise.
11152 * include/pupa/fs.h (pupa_ext2_init) [PUPA_UTIL]: New prototype.
11153 (pupa_ext2_fini) [PUPA_UTIL]: Likewise.
11154 * include/pupa/normal.h (pupa_normal_init) [PUPA_UTIL]: Likewise.
11155 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
11156 * include/pupa/setjmp.h [PUPA_UTIL]: Include <setjmp.h>.
11157 (pupa_jmp_buf): New typedef.
11158 (pupa_setjmp) [PUPA_UTIL]: New macro.
11159 (pupa_longjmp) [PUPA_UTIL]: Likewise.
11160 * include/pupa/term.h (struct pupa_term): New member `refresh'.
11161 (pupa_refresh): New prototype.
11162 * include/pupa/util/getroot.h: New file.
11163 * kern/misc.c (pupa_vsprintf): Refresh the screen after updating
11165 * kern/rescue.c (pupa_rescue_get_command_line): Likewise.
11166 (pupa_rescue_cmd_cat): Likewise.
11167 (pupa_rescue_cmd_ls): Likewise.
11168 (pupa_rescue_cmd_testload): Likewise.
11169 (pupa_rescue_cmd_lsmod): Likewise.
11170 * normal/cmdline.c (pupa_cmdline_get): Likewise.
11171 * normal/menu.c (run_menu): Likewise.
11172 * kern/term.c (pupa_cls): Likewise.
11173 (pupa_refresh): New function.
11174 * normal/normal.c (pupa_normal_init) [PUPA_UTIL]: New function.
11175 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
11176 * util/console.c: New file.
11178 * util/i386/pc/getroot.c: New file.
11179 * util/i386/pc/pupa-setup.c: Include <pupa/util/getroot.h>.
11180 (pupa_putchar): New function.
11181 (pupa_refresh): Likewise.
11182 (xgetcwd): Function moved to ...
11183 (strip_extra_slashes): Likewise.
11184 (get_prefix): Likewise.
11185 * util/i386/pc/getroot.c: ... here.
11186 (find_root_device): Function moved and renamed to...
11187 * util/i386/pc/getroot.c (pupa_find_root_device): ... here.
11188 Changed all callers.
11189 * util/i386/pc/pupa-setup.c (guess_root_device): Function moved
11191 * util/i386/pc/getroot.c (pupa_guess_root_device): ... here.
11192 Changed all callers.
11193 * util/misc.c (pupa_memalign): New function.
11194 (pupa_mm_init_region): Likewise.
11195 (pupa_register_exported_symbols): Likewise.
11196 (pupa_putchar): Function removed.
11197 * util/pupa-emu.c: New file.
11199 2003-11-16 Jeroen Dekkers <jeroen@dekkers.cx>
11201 * conf/i386-pc.rmk (pkgdata_MODULES): Add _multiboot.mod.
11202 (_multiboot_mod_SOURCES): New variable.
11203 (_multiboot_mod_CFLAGS): Likewise.
11204 * loader/i386/pc/multiboot.c: New file.
11205 * include/pupa/i386/pc/multiboot.h: Likewise.
11206 * kern/i386/pc/startup.S: Include pupa/machine/multiboot.h.
11207 (pupa_multiboot_real_boot): New function.
11208 * include/pupa/i386/pc/loader.h: Include pupa/machine/multiboot.h.
11209 (pupa_multiboot_real_boot): New prototype.
11210 (pupa_rescue_cmd_multiboot): Likewise
11211 (pupa_rescue_cmd_module): Likewise.
11213 * kern/loader.c (pupa_loader_set): Continue when
11214 pupa_loader_unload_func() fails.
11215 (pupa_loader_unset): New function.
11216 * include/pupa/loader.h (pupa_loader_unset): New prototype.
11218 * kern/misc.c (pupa_stpcpy): New function.
11219 * include/pupa/misc.h (pupa_stpcpy): New prototype.
11221 2003-11-12 Marco Gerards <metgerards@student.han.nl>
11223 * disk/i386/pc/biosdisk.c (pupa_biosdisk_open): Correctly check
11224 for available extensions.
11226 * include/pupa/i386/pc/time.h: New file.
11227 * kern/disk.c: Include <pupa/machine/time.h>.
11228 (PUPA_CACHE_TIMEOUT): New macro.
11229 (pupa_last_time): New variable.
11230 (pupa_disk_open): Flush the cache when there was a timeout.
11231 (pupa_disk_close): Reset the timer.
11232 * kern/i386/pc/startup.S (pupa_get_rtc): Renamed from
11234 * util/misc.c: Include <sys/times.h>
11235 (pupa_get_rtc): New function.
11237 2003-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
11239 * fs/ext2.c (struct pupa_ext2_inode): Declare struct datablocks
11241 (pupa_ext2_get_file_block): Use blocks member.
11243 * fs/ext2.c (pupa_ext2_read_file): Only set skipfirst for the
11244 first block. Return -1 instead of pupa_errno on error.
11246 2003-10-27 Marco Gerards <metgerards@student.han.nl>
11248 * README: In the pupa-mkimage example use _chain instead of chain
11249 and ext2 instead of fat.
11250 * TODO: Replace ext2fs with jfs as an example. Add an item for
11251 adding journal playback for ext2fs.
11252 * conf/i386-pc.rmk (pupa_setup_SOURCES): Added fs/ext2.c.
11253 (pkgdata_MODULES): Added ext2.mod.
11254 (ext2_mod_SOURCES): New variable.
11255 (ext2_mod_CFLAGS): Likewise.
11256 * include/pupa/err.h (pupa_err_t): Added PUPA_ERR_SYMLINK_LOOP.
11257 * include/pupa/misc.h (pupa_strncpy): New prototype.
11258 (pupa_strcat): Likewise.
11259 (pupa_strncmp): Likewise.
11260 * kern/misc.c (pupa_strcat): Enable function.
11261 (pupa_strncpy): New function.
11262 (pupa_strncmp): Likewise.
11263 * fs/ext2.c: New file.
11265 * kern/disk.c (pupa_disk_read): Set pupa_errno to PUPA_ERR_NONE
11266 when the read failed before retrying.
11267 * util/i386/pc/biosdisk.c (_LARGEFILE_SOURCE): Removed.
11268 (_FILE_OFFSET_BITS): Likewise.
11269 * configure.ac: Added AC_SYS_LARGEFILE.
11271 2003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
11273 * genmk.rb (PModule#rule): Make sure to get only symbol names
11274 from the output of nm.
11275 Reported by Robert Millan <zeratul2@wanadoo.es>.
11277 2003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
11279 I forgot to check in these changes for a long time. This adds
11280 incomplete support for VGA console, and this is still very
11281 buggy. Also, a lot of consideration is required for I18N,
11282 UNICODE, and VGA font issues. Therefore, assume that this is
11283 such that "better than nothing".
11285 * font/manager.c: New file.
11286 * include/pupa/font.h: Likewise.
11287 * include/pupa/i386/pc/vga.h: Likewise.
11288 * term/i386/pc/vga.c: Likewise.
11289 * util/unifont2pff.rb: Likewise.
11291 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vga.h.
11292 (pkgdata_MODULES): Added vga.mod and font.mod.
11293 (vga_mod_SOURCES): New variables.
11294 (vga_mod_CFLAGS): Likewise.
11295 (font_mod_SOURCES): Likewise.
11296 (font_mod_CFLAGS): Likewise.
11298 * include/pupa/err.h (PUPA_ERR_BAD_FONT): New constant.
11300 * include/pupa/term.h: Include pupa/err.h.
11301 (struct pupa_term): Added init and fini.
11302 Changed the argument of putchar to pupa_uint32_t.
11304 * include/pupa/i386/pc/console.h: Include pupa/symbol.h.
11305 (pupa_console_real_putchar): New prototype.
11306 (pupa_console_putchar): Removed.
11307 (pupa_console_checkkey): Exported.
11308 (pupa_console_getkey): Likewise.
11310 * kern/misc.c (pupa_vsprintf): Add support for UNICODE
11313 * kern/term.c (pupa_term_set_current): Rewritten.
11314 (pupa_putchar): Likewise.
11315 (pupa_putcode): New function.
11317 * kern/i386/pc/startup.S (pupa_console_putchar): Renamed to ...
11318 (pupa_console_real_putchar): ... this.
11319 (pupa_vga_set_mode): New function.
11320 (pupa_vga_get_font): Likewise.
11322 * normal/command.c: Include pupa/term.h.
11323 (terminal_command): New function.
11324 (pupa_command_init): Register the command "terminal".
11326 * normal/menu.c (DISP_LEFT): Changed to a UNICODE value.
11327 (DISP_UP): Likewise.
11328 (DISP_RIGHT): Likewise.
11329 (DISP_DOWN): Likewise.
11330 (DISP_HLINE): Likewise.
11331 (DISP_VLINE): Likewise.
11332 (DISP_UL): Likewise.
11333 (DISP_UR): Likewise.
11334 (DISP_LL): Likewise.
11335 (DISP_LR): Likewise.
11337 * term/i386/pc/console.c (pupa_console_putchar): New function.
11339 2003-02-08 NIIBE Yutaka <gniibe@m17n.org>
11341 * util/resolve.c (pupa_util_resolve_dependencies): BUG
11342 FIX. Reverse the path_list.
11344 * include/pupa/normal.h: Export pupa_register_command and
11345 pupa_unregister_command.
11347 * hello/hello.c (pupa_cmd_hello): New module.
11348 * conf/i386-pc.rmk: Added hello.mod.
11350 2003-01-31 Yoshinori K. Okuji <okuji@enbug.org>
11352 * kern/i386/pc/lzo1x.S: New file.
11354 * util/i386/pc/pupa-mkimage.c: Include lzo1x.h.
11355 (compress_kernel): New variable.
11356 (generate_image): Heavily modified to support compressing a
11357 large part of the core image.
11359 * util/misc.c (pupa_util_read_image): Fix a file descriptor
11361 (pupa_util_load_image): New function.
11363 * kern/i386/pc/startup.S: Include pupa/machine/kernel.h.
11364 (pupa_compressed_size): New variable.
11365 (codestart): Enable Gate A20 here.
11366 Decompress the compressed part of the core image.
11367 Rearrange the code to put functions and variables which are
11368 required for initialization in the non-compressed part.
11371 * kern/i386/pc/init.c (pupa_machine_init): Don't enable Gate A20
11374 * include/pupa/util/misc.h (pupa_util_write_image): Declared.
11376 * include/pupa/i386/pc/kernel.h
11377 (PUPA_KERNEL_MACHINE_COMPRESSED_SIZE): New macro.
11378 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): Increased by 4.
11379 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
11380 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
11381 (PUPA_KERNEL_MACHINE_RAW_SIZE): New macro.
11383 * conf/i386-pc.rmk (pupa_mkimage_LDFLAGS): New variable.
11385 * genmk.rb (Image#rule): Put LDFLAGS at the end of a line.
11386 (Utility#rule): Likewise.
11388 * configure.ac: Check if LZO is available.
11390 2003-01-20 Yoshinori K. Okuji <okuji@enbug.org>
11392 * include/pupa/normal.h: New file.
11393 * include/pupa/setjmp.h: Likewise.
11394 * include/pupa/i386/setjmp.h: Likewise.
11395 * normal/cmdline.c: Likewise.
11396 * normal/command.c: Likewise.
11397 * normal/main.c: Likewise.
11398 * normal/menu.c: Likewise.
11399 * normal/i386/setjmp.S: Likewise.
11401 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Made global.
11402 (pupa_rescue_cmd_initrd): Likewise.
11404 * loader/i386/pc/chainloader.c (pupa_rescue_cmd_chainloader):
11407 * kern/i386/pc/startup.S (translation_table): New variable.
11408 (translate_keycode): New function.
11409 (pupa_console_getkey): Call translate_keycode.
11411 * kern/rescue.c (attempt_normal_mode): New function.
11412 (pupa_enter_rescue_mode): Attempt to execute the normal mode. If
11413 it failed, print a message.
11415 * kern/mm.c (pupa_real_malloc): Print more information when a
11416 free magic is broken.
11417 (pupa_free): If the first free header is not free actually, set
11420 * kern/main.c (pupa_load_normal_mode): Just load the module
11422 (pupa_main): Don't print the message
11423 "Entering into rescue mode..." here.
11425 * include/pupa/i386/pc/loader.h (pupa_rescue_cmd_initrd):
11427 (pupa_rescue_cmd_initrd): Likewise.
11428 (pupa_rescue_cmd_initrd): Likewise.
11430 * include/pupa/symbol.h (FUNCTION): Specify the type.
11431 (VARIABLE): Likewise.
11433 * include/pupa/err.h (pupa_err_t): Added
11434 PUPA_ERR_UNKNOWN_COMMAND.
11436 * include/pupa/dl.h (pupa_dl_set_prefix): Exported.
11437 (pupa_dl_get_prefix): Likewise.
11439 * conf/i386-pc.rmk (pkgdata_MODULES): Added normal.mod.
11440 Added _chain.mod and _linux.mod instead of chain.mod and
11442 (chain_mod_SOURCES): Renamed to ...
11443 (_chain_mod_SOURCES): ... this.
11444 (chain_mod_CFLAGS): Renamed to ...
11445 (_chain_mod_CFLAGS): ... this.
11446 (linux_mod_SOURCES): Renamed to ...
11447 (_linux_mod_SOURCES): ... this.
11448 (linux_mod_CFLAGS): Renamed to ...
11449 (_linux_mod_CFLAGS): ... this.
11450 (normal_mod_SOURCES): New variable.
11451 (normal_mod_CFLAGS): Likewise.
11452 (normal_mod_ASFLAGS): Likewise.
11454 2003-01-18 Yoshinori K. Okuji <okuji@enbug.org>
11456 * kern/rescue.c (pupa_rescue_cmd_rmmod): Call pupa_dl_unload, if
11459 * kern/dl.c (pupa_dl_ref): Refer depending modules
11461 (pupa_dl_unref): Unrefer depending modules recursively.
11462 Don't call pupa_dl_unload implicitly, because PUPA can crash if
11463 a module is unloaded before one depending on that module is
11465 (pupa_dl_unload): Unload depending modules explicitly,
11468 2003-01-17 Yoshinori K. Okuji <okuji@enbug.org>
11470 * include/pupa/i386/pc/linux.h: New file.
11471 * loader/i386/pc/linux.c: Likewise.
11473 * loader/i386/pc/chainloader.c (pupa_chainloader_boot_sector):
11475 (pupa_chainloader_unload): Return PUPA_ERR_NONE.
11476 (pupa_rescue_cmd_chainloader): Read the image to 0x7C00 instead
11477 of PUPA_CHAINLOADER_BOOT_SECTOR.
11479 * kern/i386/pc/startup.S: Include pupa/machine/linux.h.
11480 (pupa_linux_prot_size): New variable.
11481 (pupa_linux_tmp_addr): Likewise.
11482 (pupa_linux_real_addr): Likewise.
11483 (pupa_linux_boot_zimage): New function.
11484 (pupa_linux_boot_bzimage): Likewise.
11486 * kern/i386/pc/init.c (struct mem_region): New structure.
11487 (MAX_REGIONS): New macro.
11488 (mem_regions): New variable.
11489 (num_regions): Likewise.
11490 (pupa_os_area_addr): Likewise.
11491 (pupa_os_area_size): Likewise.
11492 (pupa_lower_mem): Likewise.
11493 (pupa_upper_mem): Likewise.
11494 (add_mem_region): New function.
11495 (compact_mem_regions): Likewise.
11496 (pupa_machine_init): Set PUPA_LOWER_MEM and PUPA_UPPER_MEM to
11497 the size of the conventional memory and that of so-called upper
11498 memory (before the first memory hole).
11499 Instead of adding each found region to free memory, use
11500 add_mem_region and add them after removing overlaps.
11501 Also, add only 1/4 of the upper memory to free memory. The rest
11502 is used for loading OS images. Maybe this is ad hoc, but this
11503 makes it much easier to relocate OS images when booting.
11505 * kern/rescue.c (pupa_rescue_cmd_module): Removed.
11506 (pupa_enter_rescue_mode): Don't register initrd and module.
11508 * kern/mm.c: Include pupa/dl.h.
11510 * kern/main.c: Include pupa/file.h and pupa/device.h.
11512 * kern/loader.c (pupa_loader_load_module_func): Removed.
11513 (pupa_loader_load_module): Likewise.
11515 * kern/dl.c (pupa_dl_load): Use the suffix ``.mod'' instead of
11518 * include/pupa/i386/pc/loader.h (pupa_linux_prot_size): Declared.
11519 (pupa_linux_tmp_addr): Likewise.
11520 (pupa_linux_real_addr): Likewise.
11521 (pupa_linux_boot_zimage): Likewise.
11522 (pupa_linux_boot_bzimage): Likewise.
11524 * include/pupa/i386/pc/init.h (pupa_lower_mem): Declared.
11525 (pupa_upper_mem): Likewise.
11526 (pupa_gate_a20): Don't export, because turning off Gate A20 in a
11527 module is too dangerous.
11529 * include/pupa/loader.h (pupa_os_area_addr): Declared.
11530 (pupa_os_area_size): Likewise.
11531 (pupa_loader_set): Remove the first argument. Loader doesn't
11532 manage modules or initrd any longer.
11533 (pupa_loader_load_module): Removed.
11535 * conf/i386-pc.rmk (pkgdata_MODULES): Added linux.mod.
11536 (linux_mod_SOURCES): New variable.
11537 (linux_mod_CFLAGS): Likewise.
11539 2003-01-07 Yoshinori K. Okuji <okuji@enbug.org>
11541 * util/i386/pc/pupa-setup.c (setup): Convert the endianness of
11542 the length of a blocklist correctly.
11544 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open) [__linux__]:
11545 Use ioctl only if the OS file is a block device.
11546 (pupa_util_biosdisk_open): Don't use ST.ST_BLOCKS, because it is
11547 not very useful for normal files.
11549 * kern/main.c (pupa_set_root_dev): New function.
11550 (pupa_load_normal_mode): Likewise.
11551 (pupa_main): Call those above.
11553 * include/pupa/types.h (pupa_swap_bytes16): Cast the result to
11556 * include/pupa/kernel.h (pupa_enter_normal_mode): Removed.
11558 2003-01-06 Yoshinori K. Okuji <okuji@enbug.org>
11560 * util/i386/pc/pupa-setup.c: Include pupa/machine/kernel.h.
11561 (setup): Configure the installed partition information and the
11564 * loader/i386/pc/chainloader.c (my_mod): New variable.
11565 (pupa_chainloader_unload): New function.
11566 (pupa_rescue_cmd_chainloader): Refer itself.
11567 (PUPA_MOD_INIT): Save its own module in MY_MOD.
11569 * kern/i386/pc/startup.S (install_partition): Removed.
11570 (version_string): Likewise.
11571 (config_file): Likewise.
11572 (pupa_install_dos_part): New variable.
11573 (pupa_install_bsd_part): Likewise.
11574 (pupa_prefix): Likewise.
11575 (pupa_chainloader_real_boot): Call pupa_dl_unload_all.
11577 * kern/i386/pc/init.c: Include pupa/machine/kernel.h, pupa/dl.h
11579 (make_install_device): New function.
11580 (pupa_machine_init): Set the dl prefix.
11582 * kern/rescue.c: Include pupa/rescue.h and pupa/dl.h.
11583 (buf): Renamed to ...
11584 (linebuf): ... this.
11585 (pupa_rescue_cmd_prefix): New function.
11586 (pupa_rescue_cmd_insmod): Likewise.
11587 (pupa_rescue_cmd_rmmod): Likewise.
11588 (pupa_rescue_cmd_lsmod): Likewise.
11589 (pupa_enter_rescue_mode): Register new commands: prefix, insmod,
11592 * kern/mm.c (pupa_memalign): If failed even after invalidating
11593 disk caches, unload unneeded modules and retry.
11595 * kern/misc.c (pupa_memmove): New function.
11596 (pupa_memcpy): Removed.
11597 (pupa_strcpy): New function.
11598 (pupa_itoa): Made static.
11600 * kern/dl.c (pupa_dl_iterate): New function.
11601 (pupa_dl_ref): Likewise.
11602 (pupa_dl_unref): Likewise.
11603 (pupa_dl_unload): Return if succeeded or not.
11604 (pupa_dl_unload_unneeded): New function.
11605 (pupa_dl_unload_all): Likewise.
11606 (pupa_dl_init): Renamed to ...
11607 (pupa_dl_set_prefix): ... this.
11608 (pupa_dl_get_prefix): New function.
11610 * include/pupa/i386/pc/kernel.h: Include pupa/types.h.
11611 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): New macro.
11612 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
11613 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
11614 (pupa_install_dos_part): Declared.
11615 (pupa_install_bsd_part): Likewise.
11616 (pupa_prefix): Likewise.
11617 (pupa_boot_drive): Likewise.
11619 * include/pupa/types.h: Fix a typo.
11621 * include/pupa/misc.h (pupa_memcpy): New macro. Just an alias to
11623 (pupa_memmove): Declared.
11624 (pupa_strcpy): Likewise.
11626 * include/pupa/dl.h (PUPA_MOD_INIT): Change the prototype. Now
11627 pupa_mod_init takes one argument, its own module.
11628 (pupa_dl_unload_unneeded): Declared.
11629 (pupa_dl_unload_all): Likewise.
11630 (pupa_dl_ref): Likewise.
11631 (pupa_dl_unref): Likewise.
11632 (pupa_dl_iterate): Likewise.
11633 (pupa_dl_init): Renamed to ...
11634 (pupa_dl_set_prefix): ... this.
11635 (pupa_dl_get_prefix): Declared.
11637 * fs/fat.c [!PUPA_UTIL] (my_mod): New variable.
11638 (pupa_fat_dir) [!PUPA_UTIL]: Prevent the fat module from being
11640 (pupa_fat_open) [!PUPA_UTIL]: Refer itself if succeeded.
11641 (pupa_fat_close) [!PUPA_UTIL]: Unrefer itself.
11643 * configure.ac (tmp_CFLAGS): Added -Wshadow, -Wpointer-arith,
11644 -Wmissing-prototypes, -Wundef and -Wstrict-prototypes.
11646 2003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
11648 * util/i386/pc/pupa-setup.c (setup): Define the internal
11649 function find_first_partition_start at the top level, because GCC
11650 3.0.x cannot compile internal functions in deeper scopes
11652 (find_root_device): Use lstat instead of stat.
11653 Don't follow symbolic links.
11654 Fix the path-constructing code.
11656 * util/i386/pc/biosdisk.c [__linux__] (BLKFLSBUF): New macro.
11657 (pupa_util_biosdisk_open) [__linux__]: Get the size of a device
11658 by a BLKGETSIZE ioctl first, because block devices don't fill
11659 the member st_mode of the structure stat on Linux.
11660 [__linux__] (linux_find_partition): Use a temporary buffer
11661 REAL_DEV for the working space. Copy it to DEV before returning.
11662 (open_device) [__linux__]: Call ioctl with BLKFLSBUF to make the
11663 buffer cache consistent.
11664 (get_os_disk) [__linux__]: Use the length 5 instead of 4 for
11665 strncmp. The previous value was merely wrong.
11666 (pupa_util_biosdisk_get_pupa_dev): Use stat instead of lstat.
11668 * fs/fat.c (pupa_fat_read_data): Shift 4 instead of 12 when the
11669 FAT size is 12. The previous value was merely wrong.
11671 * kern/main.c (pupa_main): Don't split the starting message from
11674 * kern/term.c (pupa_putchar): Put CR after LF instead of before
11675 LF, because BIOS goes crazy about character attributes in this
11678 2003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
11680 * include/i386/pc/util/biosdisk.h: New file.
11681 * util/i386/pc/biosdisk.c: Likewise.
11682 * util/i386/pc/pupa-setup.c: Likewise.
11684 * Makefile.in (INCLUDE_DISTFILES): Added
11685 include/pupa/i386/pc/util/biosdisk.h.
11686 (UTIL_DISTFILES): Added biosdisk.c and pupa-setup.c under the
11687 directory util/i386/pc.
11688 (install-local): Added a rule for sbin_UTILITIES.
11689 (uninstall): Likewise.
11691 * util/i386/pc/pupa-mkimage.c (usage): Fix a typo in the doc.
11693 * util/misc.c (xrealloc): New function.
11694 (pupa_malloc): Likewise.
11695 (pupa_free): Likewise.
11696 (pupa_realloc): Likewise.
11697 (pupa_stop): Likewise.
11698 (pupa_putchar): Likewise.
11700 * kern/disk.c (pupa_disk_read): Prevent L from underflowing.
11702 * include/pupa/util/misc.h (xrealloc): Declared.
11704 * include/pupa/i386/pc/boot.h (PUPA_BOOT_MACHINE_BPB_START): New
11706 (PUPA_BOOT_MACHINE_BPBEND): Renamed to ...
11707 (PUPA_BOOT_MACHINE_BPB_END): ... this.
11709 * include/pupa/fs.h [PUPA_UTIL] (pupa_fat_init): Declared.
11710 [PUPA_UTIL] (pupa_fat_fini): Likewise.
11712 * fs/fat.c [PUPA_UTIL] (pupa_fat_init): Defined. Maybe a better
11713 way should be implemented.
11714 [PUPA_UTIL] (pupa_fat_fini): Likewise.
11716 * disk/i386/pc/biosdisk.c (pupa_biosdisk_call_hook): Increase
11717 the size of NAME for safety.
11718 (pupa_biosdisk_iterate): Search hard disks to 0x90 instead of
11721 * conf/i386-pc.rmk (sbin_UTILITIES): New variable.
11722 (pupa_setup_SOURCES): Likewise.
11724 * genmk.rb (Utility#rule): Add $(BUILD_CFLAGS) into the rules.
11726 2002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
11728 * kern/i386/pc/startup.S (push_get_mmap_entry): Revert to a
11729 bunch of pushl's from pusha, because this destroys the return
11732 2002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
11734 Use -mrtd and -mregparm=3 to reduce the generated code sizes.
11735 This means that any missing prototypes could be fatal. Also, you
11736 must take care when writing assembly code. See the comments at
11737 the beginning of startup.S, for more details.
11739 * kern/i386/pc/startup.S (pupa_halt): Modified for the new
11740 compilation mechanism.
11741 (pupa_chainloader_real_boot): Likewise.
11742 (pupa_biosdisk_rw_int13_extensions): Likewise.
11743 (pupa_biosdisk_rw_standard): Likewise.
11744 (pupa_biosdisk_check_int13_extensions): Likewise.
11745 (pupa_biosdisk_get_diskinfo_int13_extensions): Likewise.
11746 (pupa_biosdisk_get_diskinfo_standard): Likewise.
11747 (pupa_get_memsize): Likewise.
11748 (pupa_get_mmap_entry): Likewise.
11749 (pupa_console_putchar): Likewise.
11750 (pupa_console_setcursor): Likewise.
11751 (pupa_getrtsecs): Use pushl instead of push.
11753 * kern/i386/pc/init.c (pupa_machine_init): Use the scratch
11754 memory instead of the stack for a mmap entry, because some
11755 BIOSes may ignore the maximum size and overflow.
11757 * conf/i386-pc.rmk (COMMON_CFLAGS): Added -mrtd and -mregparm=3.
11759 * genmk.rb (PModule#rule): Compile automatically generated
11760 sources with module-specific CFLAGS as well as other sources.
11762 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
11764 * configure.ac: Check ld.
11765 Replace CFLAGS and CPPFLAGS with BUILD_CFLAGS and BUILD_CPPFLAGS
11766 respectively, before checking endianness and sizes.
11768 * Makefile.in (LD): New variable.
11770 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
11772 * Makefile.in (BUILD_CC): CC -> BUILD_CC.
11774 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
11776 * Changelog: New file.