1 2008-08-16 Robert Millan <rmh@aybabtu.com>
3 * disk/raid.c (grub_raid_init): Handle/report errors set by
5 * disk/lvm.c (grub_lvm_init): Likewise.
7 2008-08-15 Bean <bean123ch@gmail.com>
9 * conf/i386-pc.rmk (pkglib_MODULES): Add datetime.mod, date.mod
11 (datetime_mod_SOURCES): New macro.
12 (datetime_mod_CFLAGS): Likewise.
13 (datetime_mod_LDFLAGS): Likewise.
14 (date_mod_SOURCES): Likewise.
15 (date_mod_CFLAGS): Likewise.
16 (date_mod_LDFLAGS): Likewise.
17 (datehook_mod_SOURCES): Likewise.
18 (datehook_mod_CFLAGS): Likewise.
19 (datehook_mod_LDFLAGS): Likewise.
21 * conf/i386-coreboot.rmk (pkglib_MODULES): Add datetime.mod, date.mod
23 (datetime_mod_SOURCES): New macro.
24 (datetime_mod_CFLAGS): Likewise.
25 (datetime_mod_LDFLAGS): Likewise.
26 (date_mod_SOURCES): Likewise.
27 (date_mod_CFLAGS): Likewise.
28 (date_mod_LDFLAGS): Likewise.
29 (datehook_mod_SOURCES): Likewise.
30 (datehook_mod_CFLAGS): Likewise.
31 (datehook_mod_LDFLAGS): Likewise.
33 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add datetime.mod, date.mod
35 (datetime_mod_SOURCES): New macro.
36 (datetime_mod_CFLAGS): Likewise.
37 (datetime_mod_LDFLAGS): Likewise.
38 (date_mod_SOURCES): Likewise.
39 (date_mod_CFLAGS): Likewise.
40 (date_mod_LDFLAGS): Likewise.
41 (datehook_mod_SOURCES): Likewise.
42 (datehook_mod_CFLAGS): Likewise.
43 (datehook_mod_LDFLAGS): Likewise.
45 * conf/i386-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
47 (datetime_mod_SOURCES): New macro.
48 (datetime_mod_CFLAGS): Likewise.
49 (datetime_mod_LDFLAGS): Likewise.
50 (date_mod_SOURCES): Likewise.
51 (date_mod_CFLAGS): Likewise.
52 (date_mod_LDFLAGS): Likewise.
53 (datehook_mod_SOURCES): Likewise.
54 (datehook_mod_CFLAGS): Likewise.
55 (datehook_mod_LDFLAGS): Likewise.
57 * conf/x86_64-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
59 (datetime_mod_SOURCES): New macro.
60 (datetime_mod_CFLAGS): Likewise.
61 (datetime_mod_LDFLAGS): Likewise.
62 (date_mod_SOURCES): Likewise.
63 (date_mod_CFLAGS): Likewise.
64 (date_mod_LDFLAGS): Likewise.
65 (datehook_mod_SOURCES): Likewise.
66 (datehook_mod_CFLAGS): Likewise.
67 (datehook_mod_LDFLAGS): Likewise.
69 * kern/env.c (grub_env_insert): Fix a bug in prevp pointer.
71 * commands/date.c: New file.
73 * hook/datehook.c: Likewise.
75 * include/grub/lib/datetime.h: Likewise.
77 * include/grub/i386/cmos.h: Likewise.
79 * lib/datetime.c: Likewise.
81 * lib/i386/datetime.c: Likewise.
83 * lib/efi/datetime.c: Likewise.
85 2008-08-14 Robert Millan <rmh@aybabtu.com>
87 * conf/common.rmk (bin_UTILITIES): Add `grub-mkelfimage'.
88 (grub_mkelfimage_SOURCES): New variable.
89 (util/elf/grub-mkimage.c_DEPENDENCIES): Likewise.
91 * conf/i386-coreboot.rmk (bin_UTILITIES, grub_mkimage_SOURCES)
92 (grub_mkimage_LDFLAGS, util/elf/grub-mkimage.c_DEPENDENCIES): Remove.
93 * conf/powerpc-ieee1275.rmk: Likewise.
94 * conf/i386-ieee1275.rmk: Likewise.
96 * kern/ieee1275/init.c: Include `<grub/cpu/kernel.h>'.
97 * kern/i386/coreboot/init.c: Likewise.
99 * kern/i386/ieee1275/startup.S: Replace `<grub/machine/kernel.h>'
100 with `<grub/cpu/kernel.h>'.
101 (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Renamed
103 (GRUB_KERNEL_CPU_PREFIX, GRUB_KERNEL_CPU_DATA_END): ... this.
104 * kern/i386/coreboot/startup.S: Likewise.
106 * include/grub/powerpc/ieee1275/kernel.h (GRUB_MOD_ALIGN)
107 (GRUB_MOD_GAP): Remove.
108 * include/grub/powerpc/kernel.h: New file.
109 * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX)
110 (GRUB_KERNEL_MACHINE_DATA_END): Remove.
111 * include/grub/i386/kernel.h: New file.
112 * include/grub/i386/coreboot/kernel.h (GRUB_MOD_ALIGN)
113 (GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_PREFIX)
114 (GRUB_KERNEL_MACHINE_DATA_END): Remove.
116 * util/ieee1275/grub-install.in (grub_mkimage): Initialize to use
118 Use --directory when invoking grub_mkimage.
120 * util/elf/grub-mkimage.c: Include `<grub/cpu/kernel.h>'.
121 (add_segments): Replace GRUB_KERNEL_MACHINE_DATA_END and
122 GRUB_KERNEL_MACHINE_PREFIX with GRUB_KERNEL_CPU_DATA_END
123 and GRUB_KERNEL_CPU_PREFIX.
125 2008-08-14 Felix Zielcke <fzielcke@z-51.de>
127 * include/grub/err.h (grub_err_printf): New function prototype.
128 * util/misc.c (grub_err_printf): New function.
129 * kern/misc.c [! GRUB_UTIL] (grub_err_printf): New alias for
131 * kern/err.c (grub_print_error): Use grub_err_printf.
133 2008-08-13 Robert Millan <rmh@aybabtu.com>
135 * docs/grub.cfg: Remove `/dev/' prefix in GNU/Hurd boot entry.
137 2008-08-13 Robert Millan <rmh@aybabtu.com>
139 * docs/grub.cfg: Use the native device name for the example GNU/Hurd
142 2008-08-12 Robert Millan <rmh@aybabtu.com>
144 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Move part
145 of the relocation code from here ...
146 (grub_multiboot): ... to here.
147 (forward_relocator, backward_relocator): Move from here ...
148 * kern/i386/loader.S (grub_multiboot_forward_relocator)
149 (grub_multiboot_backward_relocator): ... to here.
150 (grub_multiboot_real_boot): Use %edx for entry offset. Put Multiboot
151 magic in %eax. Use %ebp for jumping (so %edx is not trashed).
152 * include/grub/i386/loader.h (grub_multiboot_forward_relocator)
153 (grub_multiboot_forward_relocator_end)
154 (grub_multiboot_backward_relocator)
155 (grub_multiboot_backward_relocator_end): New variables.
157 2008-08-12 Bean <bean123ch@gmail.com>
159 * disk/raid.c (grub_raid_read): Fix a bug in raid0 code.
161 2008-08-11 Robert Millan <rmh@aybabtu.com>
163 * kern/i386/linuxbios/startup.S: Move from here ...
164 * kern/i386/coreboot/startup.S: ... to here.
166 * kern/i386/linuxbios/init.c: Move from here ...
167 * kern/i386/coreboot/init.c: ... to here.
169 * kern/i386/linuxbios/table.c: Move from here ...
170 * kern/i386/coreboot/mmap.c: ... to here.
172 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Update moved files.
174 2008-08-11 Robert Millan <rmh@aybabtu.com>
176 * kern/device.c (grub_device_open): Do not handle grub_disk_open()
177 errors. Leave it to the upper layer to handle them.
179 2008-08-09 Christian Franke <franke@computer.org>
181 * Makefile.in: Add `target_os' and `enable_grub_pe2elf'.
182 * conf/common.rmk: Install `grub-pe2elf' only if requested.
183 Install `grub.d/10_windows' only on Cygwin.
184 * configure.ac: Add subst of `target_os'.
185 Check `target_os' also before setting TARGET_OBJ2ELF.
186 Add `--enable-grub-pe2elf'.
188 2008-08-08 Robert Millan <rmh@aybabtu.com>
190 * kern/disk.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
191 (grub_last_time): Change type to grub_uint64_t.
192 (grub_disk_open): Migrate code from to using grub_get_time_ms().
193 (grub_disk_close): Likewise.
195 * normal/menu.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
196 (run_menu): Migrate code from to using grub_get_time_ms().
198 * util/misc.c (grub_get_time_ms): New function.
200 2008-08-08 Marco Gerards <marco@gnu.org>
202 * disk/ata.c (grub_ata_regget): Change return type to
204 (grub_ata_regget2): Likewise.
205 (grub_ata_wait_status): New function.
206 (grub_ata_wait_busy): Removed function, updated all users to use
207 `grub_ata_wait_status'.
208 (grub_ata_wait_drq): Likewise.
209 (grub_ata_cmd): New function.
210 (grub_ata_pio_read): Change return type to `grub_uint8_t'. Add
212 (grub_ata_pio_write): Add error handling.
213 (grub_atapi_identify): Likewise.
214 (grub_atapi_packet): Use `grub_ata_cmd' and improve error
216 (grub_ata_identify): Use `grub_ata_cmd' and improve error
217 handling. Actually use the detected registers. Reorder the
218 detection logic such that it is easier to read.
219 (grub_ata_pciinit): Do not assign the same ID to each controller.
220 (grub_ata_setaddress): Use `grub_ata_cmd' and improve error
222 (grub_atapi_readsector): Check the result of `grub_ata_pio_read'.
224 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TIMEOUT'.
226 2008-08-08 Marco Gerards <marco@gnu.org>
230 2008-08-07 Bean <bean123ch@gmail.com>
232 * include/grub/x86_64/pci.h: New file.
234 2008-08-07 Christian Franke <franke@computer.org>
236 * kern/i386/pit.c (TIMER2_SPEAKER): New define.
237 (TIMER2_GATE): Likewise.
238 (grub_pit_wait): Add enable/disable of the timer2 gate
239 bit of port 0x61. This fixes a possible infinite loop.
241 2008-08-07 Bean <bean123ch@gmail.com>
243 * conf/x86_64-efi.rmk (kernel_mod_SOURCES): Add kern/time.c,
244 kern/i386/tsc.c and kern/i386/pit.c.
246 * include/grub/i386/tsc.h (grub_cpu_is_cpuid_supported): Handle
249 * kern/i386/efi/init.c: Replace <grub/cpu/tsc.h> with
252 * kern/i386/pit.c: Replace <grub/cpu/io.h> with <grub/i386/io.h>.
254 2008-08-07 Bean <bean123ch@gmail.com>
256 * conf/i386-efi.rmk (kernel_mod_SOURCES): Add kern/time.c.
258 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add kern/time.c,
260 * include/grub/i386/pit.h: Use macro KERNEL_CPU_PIT_HEADER to avoid
261 multiple inclusion. Add #include <grub/types.h>.
263 2008-08-06 Christian Franke <franke@computer.org>
265 * conf/common.rmk: Build and install `10_windows'.
266 * util/grub.d/10_windows.in: New script.
268 2008-08-06 Pavel Roskin <proski@gnu.org>
270 * kern/i386/pit.c: Include `<grub/i386/pit.h>'.
272 2008-08-06 Robert Millan <rmh@aybabtu.com>
274 * conf/i386-coreboot.rmk (kernel_elf_ASFLAGS): New variable.
275 * kern/i386/tsc.c: Include `<grub/i386/pit.h>'.
277 2008-08-06 Bean <bean123ch@gmail.com>
279 * fs/i386/pc/pxe.c (grub_pxe_data): New member block_size.
280 (grub_pxefs_fs_int): Remove dummy definition.
281 (grub_pxefs_open): Use data->block_size to store the current block
283 (grub_pxefs_read): Use block size stored in data->block_size. As the
284 value of grub_pxe_blksize can be changed after the file is opened.
286 2008-08-06 Bean <bean123ch@gmail.com>
288 * fs/i386/pc/pxe.c (curr_file): new variable.
289 (grub_pxefs_open): Simply the handling of pxe file system. Don't
290 require the dummy internal file system anymore.
291 (grub_pxefs_read): Removed.
292 (grub_pxefs_close): Likewise.
293 (grub_pxefs_fs_int): Likewise.
294 (grub_pxefs_read_int): Renamed to grub_pxefs_read. Reinitialize tftp
295 connection when we switch file.
296 (grub_pxefs_close_int): Renamed to grub_pxefs_close.
298 2008-08-06 Robert Millan <rmh@aybabtu.com>
300 * conf/i386-coreboot.rmk (pkglib_MODULES): Add `reboot.mod' and
302 (reboot_mod_SOURCES, reboot_mod_CFLAGS, reboot_mod_LDFLAGS)
303 (halt_mod_SOURCES, halt_mod_CFLAGS, halt_mod_LDFLAGS): New variables.
305 * kern/i386/halt.c: New file.
306 * kern/i386/reboot.c: Likewise.
307 * include/grub/i386/reboot.h: Likewise.
308 * include/grub/i386/halt.h: Likewise.
310 * commands/halt.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]:
311 Include `<grub/cpu/halt.h>'.
312 * commands/reboot.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]
313 [! GRUB_MACHINE_PCBIOS]: Include `<grub/cpu/reboot.h>'.
315 * term/i386/pc/at_keyboard.c: Include `<grub/cpu/at_keyboard.h>'.
316 (SHIFT_L, SHIFT_R, CTRL, ALT, CAPS_LOCK, KEYBOARD_REG_DATA)
317 (KEYBOARD_REG_STATUS, KEYBOARD_COMMAND_ISREADY, KEYBOARD_COMMAND_READ)
318 (KEYBOARD_COMMAND_WRITE, KEYBOARD_COMMAND_REBOOT)
319 (KEYBOARD_SCANCODE_SET1, KEYBOARD_ISMAKE, KEYBOARD_ISREADY)
320 (KEYBOARD_SCANCODE, OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): Move
322 * include/grub/i386/at_keyboard.h: ... to here.
324 2008-08-05 Robert Millan <rmh@aybabtu.com>
326 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pit.c'.
327 * conf/i386-efi.rmk (kernel_mod_SOURCES): Likewise.
328 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Likewise. Also add
329 `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
330 `kern/generic/millisleep.c'.
332 * kern/i386/tsc.c (calibrate_tsc): Rewrite using grub_pit_wait()
333 instead of grub_get_rtc().
334 (grub_tsc_init): Initialize `tsc_boot_time'.
336 * kern/i386/linuxbios/init.c (grub_millisleep): Remove stub.
337 (grub_machine_init): Use grub_tsc_init() rather than
338 installing an RTC-based handler via grub_install_get_time_ms().
340 * kern/i386/pit.c: New file.
341 * include/grub/i386/pit.h: Likewise.
343 2008-08-05 Bean <bean123ch@gmail.com>
345 * boot/i386/pc/pxeboot.S (_start): Use drive number 0x7F for pxe.
347 * conf/i386-pc.rmk (kernel_img_HEADERS): Add machine/pxe.h.
348 (pkglib_MODULES): Add pxe.mod and pxecmd.mod.
349 (pxe_mod_SOURCES): New macro.
350 (pxe_mod_CFLAGS): Likewise.
351 (pxe_mod_LDFLAGS): Likewise.
352 (pxecmd_mod_SOURCES): Likewise.
353 (pxecmd_mod_CFLAGS): Likewise.
354 (pxecmd_mod_LDFLAGS): Likewise.
356 * kern/i386/pc/startup.S (grub_pxe_scan): New function.
357 (grub_pxe_call): Likewise.
359 * include/grub/disk.h (grub_disk_dev_id): Add GRUB_DISK_DEVICE_PXE_ID.
361 * commands/i386/pc/pxecmd.c: New file.
363 * fs/i386/pc/pxe.c: Likewise.
365 * include/grub/i386/pc/pxe.h: Likewise.
367 2008-08-05 Bean <bean123ch@gmail.com>
369 * util/console.c (grub_console_cur_color): New variable.
370 (grub_console_standard_color): Likewise.
371 (grub_console_normal_color): Likewise.
372 (grub_console_highlight_color): Likewise.
373 (color_map): Likewise.
374 (use_color): Likewise.
375 (NUM_COLORS): New macro.
376 (grub_ncurses_setcolorstate): Handle color properly.
377 (grub_ncurses_setcolor): Don't change color here, just remember the
378 settings, color will be set in grub_ncurses_setcolorstate.
379 (grub_ncurses_getcolor): New function.
380 (grub_ncurses_init): Initialize color pairs.
381 (grub_ncurses_term): New member grub_ncurses_getcolor.
383 2008-08-05 Colin D Bennett <colin@gibibit.com>
385 High resolution timer support. Implemented for x86 CPUs using TSC.
386 Extracted generic grub_millisleep() so it's linked in only as needed.
387 This requires a Pentium compatible CPU; if the RDTSC instruction is
388 not supported, then it falls back on the generic grub_get_time_ms()
389 implementation that uses the machine's RTC.
391 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/time.c',
392 `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
393 `kern/generic/millisleep.c'.
395 * conf/i386-efi.rmk (kernel_mod_SOURCES): Add `kern/i386/tsc.c',
396 `kern/generic/rtc_get_time_ms.c' and `kern/generic/millisleep.c'.
398 * conf/x86_64-efi.rml (kernel_mod_SOURCES): Add
399 `kern/generic/millisleep.c' and `kern/generic/rtc_get_time_ms.c'.
401 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
403 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
404 `kern/generic/millisleep.c'.
406 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
408 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Add `kern/time.c'.
410 * kern/generic/rtc_get_time_ms.c: New file.
412 * kern/generic/millisleep.c: New file.
414 * kern/misc.c: Don't include
415 <kern/time.h> anymore.
416 (grub_millisleep_generic): Removed.
418 * commands/sleep.c (grub_interruptible_millisleep): Uses
419 grub_get_time_ms() instead of grub_get_rtc().
421 * include/grub/i386/tsc.h (grub_get_tsc): New file. New inline
423 (grub_cpu_is_cpuid_supported): New inline function.
424 (grub_cpu_is_tsc_supported): New inline function.
425 (grub_tsc_init): New function prototype.
426 (grub_tsc_get_time_ms): New function prototype.
428 * kern/i386/tsc.c (grub_get_time_ms): New file.
430 * include/grub/time.h: Include <grub/types.h.
431 (grub_millisleep_generic): Removed.
432 (grub_get_time_ms): New prototype.
433 (grub_install_get_time_ms): New prototype.
434 (grub_rtc_get_time_ms): New prototype.
436 * kern/time.c (grub_get_time_ms): New function.
437 (grub_install_get_time_ms): New function.
439 * kern/i386/efi/init.c: Include <grub/cpu/tsc.h>. Don't include
440 <grub/time.h> anymore.
441 (grub_millisleep): Removed.
442 (grub_machine_init): Call grub_tsc_init.
444 * kern/i386/linuxbios/init.c (grub_machine_init): Install the RTC
445 get_time_ms() implementation.
447 * kern/sparc64/ieee1275/init.c (grub_millisleep): Removed.
448 (ieee1275_get_time_ms): New function.
449 (grub_machine_init): Install get_time_ms() implementation.
451 * kern/i386/pc/init.c: Include <grub/cpu/tsc.h>.
452 (grub_machine_init): Call grub_tsc_init().
453 (grub_millisleep): Removed.
455 * kern/ieee1275/init.c (grub_millisleep): Removed.
456 (grub_machine_init): Install ieee1275_get_time_ms()
458 (ieee1275_get_time_ms): New function.
459 (grub_get_rtc): Now calls ieee1275_get_time_ms(), which does the
462 2008-08-05 Marco Gerards <marco@gnu.org>
464 * disk/ata.c: Include <grub/pci.h>.
465 (enum grub_ata_commands): Add `GRUB_ATA_CMD_EXEC_DEV_DIAGNOSTICS'.
466 (grub_ata_initialize): Rewritten.
467 (grub_ata_device_initialize): New function.
469 2008-08-04 Pavel Roskin <proski@gnu.org>
471 * kern/main.c: Include grub/mm.h.
473 2008-08-04 Robert Millan <rmh@aybabtu.com>
475 * conf/i386-coreboot.rmk (COMMON_ASFLAGS, COMMON_CFLAGS)
476 (COMMON_LDFLAGS): Harmonize with i386-pc version (fixes a code
479 2008-08-04 Robert Millan <rmh@aybabtu.com>
481 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Fix misc
482 warnings introduced in my last commit.
484 2008-08-03 Robert Millan <rmh@aybabtu.com>
486 Make PCI available on all i386 architectures.
488 * include/grub/i386/pc/pci.h: Move from here ...
489 * include/grub/i386/pci.h: ... to here.
491 * include/grub/i386/pc/pci.h: Remove.
492 * include/grub/i386/efi/pci.h: Remove.
493 * include/grub/x86_64/efi/pci.h: Remove.
495 * include/grub/pci.h: Replace `<grub/machine/pci.h>' with
498 * conf/i386-coreboot.rmk (pkglib_MODULES): Add `pci' and `lspci'.
499 (pci_mod_SOURCES, pci_mod_CFLAGS, pci_mod_LDFLAGS, lspci_mod_SOURCES)
500 (lspci_mod_CFLAGS, lspci_mod_LDFLAGS): New variables.
502 * conf/i386-ieee1275.rmk: Likewise.
504 2008-08-03 Robert Millan <rmh@aybabtu.com>
506 * term/i386/pc/vga_text.c (CRTC_CURSOR_DISABLE): New macro.
507 (grub_console_setcursor): Make it possible to set cursor off.
509 2008-08-03 Robert Millan <rmh@aybabtu.com>
511 * util/grub.d/00_header.in: Be platform-agnostic. Probe for existence
512 of modules instead of assuming which platform provides what.
513 * util/update-grub.in: Likewise.
515 2008-08-03 Robert Millan <rmh@aybabtu.com>
517 * kern/i386/pc/init.c (make_install_device): Check for `grub_prefix'
518 instead of `grub_install_dos_part' to determine whether a drive needs
519 to be prepended to prefix (`grub_install_dos_part' is not reliable,
520 because it can be overridden when loading GRUB via Multiboot).
522 2008-08-02 Robert Millan <rmh@aybabtu.com>
524 * util/i386/pc/grub-install.in: Remove trailing slash from prefix.
526 2008-08-02 Robert Millan <rmh@aybabtu.com>
528 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Add a pair
529 of informational grub_dprintf() calls.
531 2008-08-02 Robert Millan <rmh@aybabtu.com>
533 * disk/memdisk.c (memdisk_size): Don't initialize.
534 (GRUB_MOD_INIT(memdisk)): Find memdisk using grub_module_iterate().
536 * include/grub/i386/pc/kernel.h
537 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): Remove macro.
538 (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Shift.
539 (grub_memdisk_image_size, grub_arch_memdisk_addr)
540 (grub_arch_memdisk_size): Remove.
542 * include/grub/kernel.h (struct grub_module_header): Remove `offset'
543 field (was only used to transfer a constant). Add `type' field to
544 support multiple module types.
545 (grub_module_iterate): New function.
547 * kern/device.c (grub_device_open): Do not hide error messages
548 when grub_disk_open() fails. Use grub_print_error() instead.
550 * kern/i386/pc/init.c (grub_arch_modules_addr)
551 (grub_arch_memdisk_size): Remove functions.
552 (grub_arch_modules_addr): Return the module address in high memory
553 (now that it isn't copied anymore).
555 * kern/i386/pc/startup.S (grub_memdisk_image_size): Remove variable.
556 (codestart): Don't add grub_memdisk_image_size to %ecx in LZMA
557 decompression routine (grub_total_module_size already includes that
558 now). Don't copy modules back to low memory.
560 * kern/main.c: Include `<grub/mm.h>'.
561 (grub_load_modules): Split out (and use) ...
562 (grub_module_iterate): ... this function, which iterates through
563 module objects and runs a hook.
564 Comment out grub_mm_init_region() call, as it would cause non-ELF
565 modules to be overwritten.
567 * util/i386/pc/grub-mkimage.c (generate_image): Instead of appending
568 the memdisk image in its own region, make it part of the module list.
569 * util/elf/grub-mkimage.c (options): Add "memdisk"|'m' option.
570 (main): Parse --memdisk|-m option, and pass user-provided path as
571 parameter to generate_image().
572 (add_segments): Pass `memdisk_path' down to load_modules().
573 (load_modules): Embed memdisk image in module section when requested.
574 * util/i386/efi/grub-mkimage.c (make_mods_section): Initialize
575 `header.type' instead of `header.offset'.
577 * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add `memdisk.mod'.
578 (memdisk_mod_SOURCES, memdisk_mod_CFLAGS)
579 (memdisk_mod_LDFLAGS): New variables.
580 * conf/i386-coreboot.rmk: Likewise.
581 * conf/i386-ieee1275.rmk: Likewise.
583 2008-08-02 Robert Millan <rmh@aybabtu.com>
585 * loader/i386/pc/multiboot.c (playground, forward_relocator)
586 (backward_relocator): New variables. Used to allocate and relocate
587 the payload, respectively.
588 (grub_multiboot_load_elf32): Load into heap instead of requested
589 address, install the appropriate relocator code in each bound of
590 the payload, and set the entry point such that
591 grub_multiboot_real_boot() will jump to one of them.
593 * kern/i386/loader.S (grub_multiboot_payload_size)
594 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
595 (grub_multiboot_payload_entry_offset): New variables.
596 (grub_multiboot_real_boot): Set cpu context to what the relocator
597 expects, and jump to the relocator instead of the payload.
599 * include/grub/i386/loader.h (grub_multiboot_payload_size)
600 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
601 (grub_multiboot_payload_entry_offset): Export.
603 2008-08-01 Bean <bean123ch@gmail.com>
605 * normal/menu_entry.c (editor_getline): Don't return the original
606 string as result, as it will be released by lexer once it has done
609 2008-08-01 Robert Millan <rmh@aybabtu.com>
611 * util/grub.d/10_linux.in: Use prepare_grub_to_access_device() from
612 within menuentries, not before them.
613 util/grub.d/10_hurd.in: Likewise.
615 2008-08-01 Bean <bean123ch@gmail.com>
617 * conf/common.rmk (pkglib_MODULES): Add bufio.mod.
618 (bufio_mod_SOURCES): New macro.
619 (bufio_mod_CFLAGS): Likewise.
620 (bufio_mod_LDFLAGS): Likewise.
622 * include/grub/bufio.h: New file.
624 * io/bufio.c: Likewise.
626 * video/png.c: Replace <grub/file.h> with <grub/bufio.h>.
627 (grub_video_reader_png): Use grub_buffile_open to open file.
629 * video/jpeg.c: Replace <grub/file.h> with <grub/bufio.h>.
630 (grub_video_reader_jpeg): Use grub_buffile_open to open file.
632 * video/tga.c: Replace <grub/file.h> with <grub/bufio.h>.
633 (grub_video_reader_tga): Use grub_buffile_open to open file.
635 * font/manager.c: Include <grub/bufio.h>.
636 (add_font): Use grub_buffile_open to open file.
638 2008-07-31 Robert Millan <rmh@aybabtu.com>
640 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): When loading
641 ELF segments, use a macro for arbitrarily accessing any of them instead
642 of preparing a pointer that allows access to one at a time.
643 (grub_multiboot_load_elf64): Likewise.
645 2008-07-31 Bean <bean123ch@gmail.com>
647 * boot/i386/pc/lnxboot.S (real_code_2): Replace 0x50 with
648 GRUB_KERNEL_MACHINE_DATA_END.
650 2008-07-30 Robert Millan <rmh@aybabtu.com>
652 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_DATA_END):
653 Increase from 0x50 to 0x60.
654 * util/i386/pc/grub-install.in: Detect cross-disk installs, and
655 use UUIDs to identify the root drive for them. If that's not
657 * util/i386/pc/grub-setup.c (setup): Do not special-case, or even
658 check, for cross-disk installs.
660 2008-07-30 Robert Millan <rmh@aybabtu.com>
662 * kern/ieee1275/init.c (grub_machine_set_prefix): If `grub_prefix'
663 is non-empty, use it to set the `prefix' environment variable instead
664 of the usual approach.
665 * kern/i386/linuxbios/init.c (make_install_device): Remove function.
666 (grub_machine_set_prefix): Use `grub_prefix' to set the `prefix'
667 environment variable instead of dummy make_install_device().
669 * kern/i386/ieee1275/startup.S: Include `<grub/machine/kernel.h>'.
670 (start): Insert a data section, with `grub_prefix' variable.
671 * kern/i386/linuxbios/startup.S: Likewise.
673 * include/grub/powerpc/ieee1275/kernel.h [!ASM_FILE] (grub_prefix):
674 New variable reference.
675 * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX):
676 New macro. Defines offset of `grub_prefix' within startup.S (relative
678 (GRUB_KERNEL_MACHINE_DATA_END): New macro. Defines the end of data
679 section within startup.S (relative to `start').
680 * include/grub/i386/coreboot/kernel.h: Likewise.
682 * util/elf/grub-mkimage.c (add_segments): Receive `prefix' parameter.
683 Overwrite grub_prefix with its contents, at the beginning of the
685 (main): Understand -p|--prefix.
687 2008-07-30 Robert Millan <rmh@aybabtu.com>
689 * util/grub.d/10_hurd.in: Source ${libdir}/grub/update-grub_lib.
691 2008-07-30 Robert Millan <rmh@aybabtu.com>
693 * term/i386/pc/vga_text.c (grub_console_cls): Use
694 grub_console_gotoxy() to go back to beginning of the screen.
695 Found by Patrick Georgi <patrick.georgi@coresystems.de>
697 2008-07-29 Christian Franke <franke@computer.org>
699 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
700 Add conversion of emulated mount points on Cygwin.
702 2008-07-29 Christian Franke <franke@computer.org>
704 * util/update-grub.in: Add a check for admin
706 Remove old `grub.cfg.new' before creation.
707 Add `-f' to `mv' to handle the different filesystem
708 semantics of Windows.
710 2008-07-29 Bean <bean123ch@gmail.com>
712 * normal/main.c (get_line): Fix buffer overflow bug.
714 2008-07-28 Robert Millan <rmh@aybabtu.com>
716 * partmap/apple.c (GRUB_APPLE_HEADER_MAGIC): New macro.
717 (struct grub_apple_header): New struct. Describes the layout of
719 (apple_partition_map_iterate): Check the header magic as well as the
720 partition magic (which was already being checked).
722 2008-07-28 Pavel Roskin <proski@gnu.org>
724 * genmk.rb: Add a warning to the beginning of the output that
725 it's a generated file and should not be edited.
727 2008-07-28 Robert Millan <rmh@aybabtu.com>
729 * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
730 with the same number are found, just use issue a warning with
731 grub_dprintf(), as this error has been reported to be non-fatal.
733 2008-07-27 Robert Millan <rmh@aybabtu.com>
735 * disk/ata.c (grub_ata_dumpinfo): Use grub_dprintf() for debugging
738 2008-07-27 Bean <bean123ch@gmail.com>
740 * fs/fat.c (GRUB_FAT_MAXFILE): New constant.
741 (grub_fat_find_dir): Ignore case when comparing filename.
743 2008-07-27 Bean <bean123ch@gmail.com>
745 * fs/xfs.c (grub_xfs_dir_header): Change field i8count back to
746 smallino, as it's more descriptive, and i8count can be confused with
747 the other field count.
748 (grub_xfs_iterate_dir): Adjust grub_xfs_dir_entry pointer for small
751 2008-07-27 Bean <bean123ch@gmail.com>
753 * commands/crc.c: New file.
755 * lib/crc.c: Likewise.
757 * include/grub/lib/crc.h: Likewise.
759 * util/grub-fstest.c: grub/hexdump.h => grub/lib/hexdump.h.
761 * commands/hexdump.c: grub/hexdump.h => grub/lib/hexdump.h.
762 (hexdump): Move this function to ...
764 * lib/hexdump.c: ... here.
766 * include/grub/hexdump.h: Renamed to ...
768 * include/grub/lib/hexdump.h: ... this.
770 * commands/loadenv.c: grub/envblk.h => grub/lib/envblk.h
772 * util/grub-editenv.c: Likewise.
774 * include/envblk.h: Renamed to ...
776 * include/lib/envblk.h: ... this.
778 * util/envblk.c: Renamed to ...
780 * lib/envblk.c: ... this.
782 * conf/common.rmk (grub_fstest_SOURCES): commands/hexdump.c =>
784 (grub_editenv_SOURCES): util/envblk.c => lib/envblk.c
785 (pkglib_MODULES): Add crc.mod.
786 (hexdump_mod_SOURCES): Add lib/hexdump.c.
787 (loadenv_mod_SOURCES): util/envblk.c => lib/envblk.c.
788 (crc_mod_SOURCES): New macro.
789 (crc_mod_CFLAGS): Likewise.
790 (crc_mod_LDFLAGS): Likewise.
792 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add lib/hexdump.c.
794 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
796 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
798 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
800 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
802 2008-07-27 Felix Zielcke <fzielcke@z-51.de>
804 * commands/help.c: Include <grub/term.h>.
805 (TERM_WIDTH): Removed. Updated all users.
807 2008-07-27 Pavel Roskin <proski@gnu.org>
809 * util/getroot.c (find_root_device): Rephrase a comment to avoid
810 spurious warnings about a comment within a comment.
812 2008-07-25 Robert Millan <rmh@aybabtu.com>
814 * util/getroot.c (find_root_device): Skip devices that match
815 /dev/dm-[0-9]. This lets the real device be found for any type of
816 abstraction (LVM, EVMS, RAID..).
817 (grub_guess_root_device): Do not traverse /dev/mapper (for LVM)
818 and /dev/evms (for EVMS) before traversing /dev. If a /dev/dm-[0-9]
819 device is found first, find_root_device() will now skip it.
821 2008-07-24 Pavel Roskin <proski@gnu.org>
823 * include/grub/types.h: Use __builtin_bswap32() and
824 __builtin_bswap64() with gcc 4.3 and newer.
826 2008-07-24 Christian Franke <franke@computer.org>
828 * util/i386/pc/grub-install.in: If `--debug' is specified,
829 pass `--verbose' to grub-setup.
830 Abort script if make_system_path_relative_to_its_root() fails.
832 2008-07-24 Bean <bean123ch@gmail.com>
834 * configure.ac: Fixed a bug caused by the previous cygwin patch,
835 variable `target_platform' should be `platform'.
837 2008-07-24 Bean <bean123ch@gmail.com>
839 * video/reader/png.c (DEFLATE_HLIT_MAX): Change value.
840 (grub_png_init_fixed_block): New function.
841 (grub_png_decode_image_data): Handle fixed huffman code compression.
843 2008-07-24 Bean <bean123ch@gmail.com>
845 * common.rmk (bin_UTILITIES): Add grub-pe2elf.
846 (grub_pe2elf_SOURCES): New macro.
847 (CLEANFILES): Add grub-pe2elf.
849 * include/grub/efi/pe32.h (GRUB_PE32_SCN_ALIGN_1BYTES): New constant.
850 (GRUB_PE32_SCN_ALIGN_2BYTES): Likewise.
851 (GRUB_PE32_SCN_ALIGN_4BYTES): Likewise.
852 (GRUB_PE32_SCN_ALIGN_8BYTES): Likewise.
853 (GRUB_PE32_SCN_ALIGN_16BYTES): Likewise.
854 (GRUB_PE32_SCN_ALIGN_32BYTES): Likewise.
855 (GRUB_PE32_SCN_ALIGN_64BYTES): Likewise.
856 (GRUB_PE32_SCN_ALIGN_SHIFT): Likewise.
857 (GRUB_PE32_SCN_ALIGN_MASK): Likewise.
858 (GRUB_PE32_SYM_CLASS_EXTERNAL): Likewise.
859 (GRUB_PE32_SYM_CLASS_STATIC): Likewise.
860 (GRUB_PE32_SYM_CLASS_FILE): Likewise.
861 (GRUB_PE32_DT_FUNCTION): Likewise.
862 (GRUB_PE32_REL_I386_DIR32): Likewise.
863 (GRUB_PE32_REL_I386_REL32): Likewise.
864 (grub_pe32_symbol): New structure.
865 (grub_pe32_reloc): Likewise.
867 * util/grub-pe2elf.c: New file.
869 * configure.ac: Set TARGET_OBJ2ELF if host os is cygwin. Don't test for
870 start symbol in non pc platform.
872 * genmk.rb: Use TARGET_OBJ2ELF to convert native object format to elf.
874 The following patches are from Christian Franke.
876 * include/grub/dl.h: Remove .previous, gas supports this only
879 * include/grub/symbol.h [__CYGWIN__] (#define FUNCTION/VARIABLE):
880 Remove .type, gas supports this only for ELF format.
882 * kern/dl.c (grub_dl_resolve_dependencies): Add check for trailing
883 nullbytes in symbol table. This fixes an infinite loop if table is
886 * Makefile.in: Add autoconf replacements TARGET_IMG_LDSCRIPT,
887 TARGET_IMG_LDFLAGS and EXEEXT.
889 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Replace -Wl,-N by
890 TARGET_IMG_LDFLAGS_AC.
891 (grub_CHECK_STACK_ARG_PROBE): New function.
893 * conf/i386-pc.rmk: Replace -Wl,-N by TARGET_IMG_LDFLAGS.
895 * conf/i386-pc-cygwin-ld-img.sc: New linker script.
897 * configure.ac: Add check for linker script "conf/${target}-img-ld.c"
898 to set TARGET_IMG_LD* accordingly.
899 Add check for Cygwin to set TARGET_MOD_OBJCOPY accordingly.
900 Add call to grub_CHECK_STACK_ARG_PROBE.
901 Use TARGET_IMG_LDFLAGS to check start, bss_start, end symbols.
903 * genkernsyms.sh.in: Handle HAVE_ASM_USCORE case.
905 * genmk.rb: Add EXEEXT to CLEANFILES.
907 2008-07-23 Robert Millan <rmh@aybabtu.com>
909 * Makefile.in (UNICODE_ARROWS, UNICODE_LINES): New variables (they
910 define the codes for arrows and lines used for the menu).
911 (ascii.pff): Generate fonts for $(UNICODE_ARROWS) and $(UNICODE_LINES)
914 * util/update-grub_lib.in (font_path): Prefer ascii.pff over complete
915 fonts, because the latter are too slow.
917 2008-07-21 Bean <bean123ch@gmail.com>
919 * kern/i386/pc/startup.S (gate_a20_try_bios): Change test order for
920 a20. Run keyboard test last, as it will cause macbook to halt.
922 2008-07-18 Pavel Roskin <proski@gnu.org>
924 * kern/dl.c: Go back to using GRUB_CPU_SIZEOF_VOID_P. We cannot
925 load foreign architecture modules correctly anyway. Keep
926 support for loading host architecture modules, whether we
929 2008-07-17 Pavel Roskin <proski@gnu.org>
931 * configure.ac: Use -m32 or -m64 regardless of whether we had to
932 change target_cpu. The compiler default can mismatch target_cpu
935 * disk/efi/efidisk.c: Fix format warnings on x86_64.
936 * kern/efi/efi.c: Likewise.
938 * aclocal.m4 (grub_PROG_TARGET_CC): New macro. Check if the
939 target compiler is functional.
940 * configure.ac: Call grub_PROG_TARGET_CC once all target flags
943 * configure.ac: Default to efi platform for x86_64-apple. Allow
944 powerpc64 CPU, default to ieee1275 platform for it. Split CPU
945 adjustments from the rest, only do them if target is not
946 explicitly given. Merge other adjustments with the final sanity
947 check. Remove an extraneous check for supported CPU. Be
948 specific which CPU and which platform is not supported.
950 * configure.ac: Default to pc platform for x86_64.
952 2008-07-17 Robert Millan <rmh@aybabtu.com>
954 Partial LinuxBIOS -> Coreboot rename.
956 * conf/i386-linuxbios.rmk: Renamed to ...
957 * conf/i386-coreboot.rmk: ... this.
958 * Makefile.in (RMKFILES): s/i386-linuxbios.rmk/i386-coreboot.rmk/g.
959 * configure.ac: Accept "coreboot" as input platform (but maintain
960 compatibility with "linuxbios").
961 * include/grub/i386/linuxbios: Renamed to ...
962 * include/grub/i386/coreboot: ... this.
964 2008-07-17 Bean <bean123ch@gmail.com>
966 * conf/i386/efi.rmk (pkglib_MODULES): add pci.mod and lspci.mod.
967 (appleldr_mod_SOURCE): New variable.
968 (appleldr_mod_CFLAGS): Likewise.
969 (appleldr_mod_LDFLAGS): Likewise.
970 (pci_mod_SOURCES): Likewise.
971 (pci_mod_CFLAGS): Likewise.
972 (pci_mod_LDFLAGS): Likewise.
973 (lspci_mod_SOURCES): Likewise.
974 (lspci_mod_CFLAGS): Likewise.
975 (lspci_mod_LDFLAGS): Likewise.
977 * conf/x86_64-efi.rmk: New file.
979 * disk/efi/efidisk.c (grub_efidisk_read): Wrap efi calls with efi_call_N
981 (grub_efidisk_write): Likewise.
983 * include/efi/api.h (efi_call_0): New macro.
984 (efi_call_1): Likewise.
985 (efi_call_2): Likewise.
986 (efi_call_3): Likewise.
987 (efi_call_4): Likewise.
988 (efi_call_5): Likewise.
989 (efi_call_6): Likewise.
991 * include/grub/efi/chainloader.h (grub_chainloader_cmd): Rename to
992 grub_rescue_cmd_chainloader.
994 * include/grub/efi/pe32.h (GRUB_PE32_MACHINE_X86_64): New macro.
995 (grub_pe32_optional_header): Change some fields based on i386 or
997 (GRUB_PE32_PE32_MAGIC): Likewise.
999 * include/grub/efi/uga_draw.h: New file.
1001 * include/grub/elf.h (STN_ABS): New constant.
1002 (R_X86_64_NONE): Relocation constant for x86_64.
1003 (R_X86_64_64): Likewise.
1004 (R_X86_64_PC32): Likewise.
1005 (R_X86_64_GOT32): Likewise.
1006 (R_X86_64_PLT32): Likewise.
1007 (R_X86_64_COPY): Likewise.
1008 (R_X86_64_GLOB_DAT): Likewise.
1009 (R_X86_64_JUMP_SLOT): Likewise.
1010 (R_X86_64_RELATIVE): Likewise.
1011 (R_X86_64_GOTPCREL): Likewise.
1012 (R_X86_64_32): Likewise.
1013 (R_X86_64_32S): Likewise.
1014 (R_X86_64_16): Likewise.
1015 (R_X86_64_PC16): Likewise.
1016 (R_X86_64_8): Likewise.
1017 (R_X86_64_PC8): Likewise.
1019 * include/grub/i386/efi/pci.h: New file.
1021 * include/grub/i386/linux.h (GRUB_LINUX_EFI_SIGNATURE):
1022 Change it value based on platform.
1023 (GRUB_LINUX_EFI_SIGNATURE_0204): New constant.
1024 (GRUB_E820_RAM): Likewise.
1025 (GRUB_E820_RESERVED): Likewise.
1026 (GRUB_E820_ACPI): Likewise.
1027 (GRUB_E820_NVS): Likewise.
1028 (GRUB_E820_EXEC_CODE): Likewise.
1029 (GRUB_E820_MAX_ENTRY): Likewise.
1030 (grub_e820_mmap): New structure.
1031 (linux_kernel_header): Change the efi field according to different
1032 kernel version, also field from linux_kernel_header.
1034 * include/grub/kernel.h (grub_module_info): Add padding for x86_64.
1036 * include/grub/pci.h (GRUB_PCI_ADDR_SPACE_MASK): New constant.
1037 (GRUB_PCI_ADDR_SPACE_MEMORY): Likewise.
1038 (GRUB_PCI_ADDR_SPACE_IO): Likewise.
1039 (GRUB_PCI_ADDR_MEM_TYPE_MASK): Likewise.
1040 (GRUB_PCI_ADDR_MEM_TYPE_32): Likewise.
1041 (GRUB_PCI_ADDR_MEM_TYPE_1M): Likewise.
1042 (GRUB_PCI_ADDR_MEM_TYPE_64): Likewise.
1043 (GRUB_PCI_ADDR_MEM_PREFETCH): Likewise.
1044 (GRUB_PCI_ADDR_MEM_MASK): Likewise.
1045 (GRUB_PCI_ADDR_IO_MASK): Likewise.
1047 * include/grub/x86_64/efi/kernel.h: New file.
1049 * include/grub/x86_64/efi/loader.h: Likewise.
1051 * include/grub/x86_64/efi/machine.h: Likewise.
1053 * include/grub/x86_64/efi/pci.h: Likewise.
1055 * include/grub/x86_64/efi/time.h: Likewise.
1057 * include/grub/x86_64/linux.h: Likewise.
1059 * include/grub/x86_64/setjmp.h: Likewise.
1061 * include/grub/x86_64/time.h: Likewise.
1063 * include/grub/x86_64/types.h: Likewise.
1065 * kern/dl.c (GRUB_CPU_SIZEOF_VOID_P): Changed to
1066 GRUB_TARGET_SIZEOF_VOID_P.
1068 * kern/efi/efi.c (grub_efi_locate_protocol): Wrap efi calls.
1069 (grub_efi_locate_handle): Likewise.
1070 (grub_efi_open_protocol): Likewise.
1071 (grub_efi_set_text_mode): Likewise.
1072 (grub_efi_stall): Likewise.
1073 (grub_exit): Likewise.
1074 (grub_reboot): Likewise.
1075 (grub_halt): Likewise.
1076 (grub_efi_exit_boot_services): Likewise.
1077 (grub_get_rtc): Likewise.
1079 * kern/efi/mm.c (MEMORY_MAP_SIZE): Change to 0x3000 for new models.
1080 (GRUB_CPU_SIZEOF_VOID_P): Changed to GRUB_TARGET_SIZEOF_VOID_P.
1081 (grub_efi_allocate_pages): Wrap efi calls.
1082 (grub_efi_free_pages): Wrap efi calls.
1083 (grub_efi_get_memory_map): Wrap efi calls.
1085 * kern/x86_64/dl.c: New file.
1087 * kern/x86_64/efi/callwrap.S: Likewise.
1089 * kern/x86_64/efi/startup.S: Likewise.
1091 * loader/efi/appleloader.c: Likewise.
1093 * loader/efi/chainloader.c (cmdline): New variable.
1094 (grub_chainloader_unload): Wrap efi calls.
1095 (grub_chainloader_boot): Likewise.
1096 (grub_rescue_cmd_chainloader): Wrap efi calls, handle
1099 * loader/efi/chainloader_normal.c (chainloader_command):
1100 Change grub_chainloader_cmd to grub_rescue_cmd_chainloader, pass
1103 * loader/i386/efi/linux.c (allocate_pages): Change allocation
1105 (grub_e820_add_region): New function.
1106 (grub_linux_boot): Construct e820 map from efi map, handle x86_64
1108 (grub_find_video_card): New function.
1109 (grub_linux_setup_video): New function.
1110 (grub_rescue_cmd_linux): Probe for video information.
1112 * normal/x86_64/setjmp.S: New file.
1114 * term/efi/console.c (map_char): New function.
1115 (grub_console_putchar): Map unicode char.
1116 (grub_console_checkkey): Wrap efi calls.
1117 (grub_console_getkey): Likewise.
1118 (grub_console_getwh): Likewise.
1119 (grub_console_gotoxy): Likewise.
1120 (grub_console_cls): Likewise.
1121 (grub_console_setcolorstate): Likewise.
1122 (grub_console_setcursor): Likewise.
1124 * util/i386/efi/grub-mkimage.c: Add support for x86_64.
1126 2008-07-16 Pavel Roskin <proski@gnu.org>
1128 * loader/i386/efi/linux.c (allocate_pages): Fix warnings in
1131 * util/i386/efi/grub-mkimage.c (get_target_address): Return a
1132 pointer, not an integer. This fixes a warning and prevents
1133 precision loss on 64-bit systems.
1134 (relocate_addresses): Remove unneeded cast.
1136 2008-07-15 Pavel Roskin <proski@gnu.org>
1138 * kern/i386/ieee1275/init.c: Include grub/cache.h.
1140 * term/ieee1275/ofconsole.c: Disable code unused on i386.
1142 * kern/ieee1275/ieee1275.c (grub_ieee1275_get_integer_property):
1143 Fix comparison between signed and unsigned.
1145 * include/grub/i386/ieee1275/console.h: Declare
1146 grub_console_init() and grub_console_fini().
1148 * loader/i386/ieee1275/linux.c (grub_set_bootpath): Remove.
1149 It's empty and unused.
1151 * fs/ext2.c (grub_ext2_read_block): Initialize blknr in the
1152 beginning to avoid warnings with some compilers.
1154 * loader/ieee1275/multiboot2.c: Include grub/machine/loader.h.
1155 [__i386__] (grub_mb2_arch_boot): Avoid unnecessary cast.
1157 2008-07-14 Pavel Roskin <proski@gnu.org>
1159 * kern/env.c (grub_register_variable_hook): Don't copy empty
1160 string, it leaks memory. Pass "" to grub_env_set(), it should
1161 handle constant strings.
1163 * commands/blocklist.c (grub_cmd_blocklist): Fix format warning.
1164 * commands/cmp.c (grub_cmd_cmp): Likewise.
1165 * kern/dl.c (grub_dl_flush_cache): Likewise.
1166 (grub_dl_load_core): Likewise.
1167 * kern/elf.c (grub_elf32_load_phdrs): Likewise.
1168 (grub_elf64_load_phdrs): Likewise.
1170 2008-07-13 Pavel Roskin <proski@gnu.org>
1172 * lib/LzmaEnc.c (LzmaEnc_SetProps): Fix warning about comparison
1173 between signed and unsigned.
1174 (LzmaEnc_Finish): Fix warning about an unused parameter.
1176 2008-07-13 Bean <bean123ch@gmail.com>
1178 * Makefile.in (enable_lzo): New rule.
1180 * conf/i386-pc.rmk (grub_mkimage_SOURCES): New test with enable_lzo.
1182 * configure.ac (ENABLE_LZO): New option --enable-lzo.
1184 * boot/i386/pc/lnxboot.S: #include <config.h>.
1186 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE): Change
1187 its value according to the compression algorithm used, lzo or lzma.
1189 * util/i386/pc/grub-mkimage.c (compress_kernel): Use different
1190 compression algorithm according to configure macro.
1192 * kern/i386/pc/startup.S (codestart): Likewise.
1194 * kern/i386/pc/lzma_decode.S: New file.
1196 * include/grub/lib/LzFind.h: Likewise.
1198 * include/grub/lib/LzHash.h: Likewise.
1200 * include/grub/lib/LzmaDec.h: Likewise.
1202 * include/grub/lib/LzmaEnc.h: Likewise.
1204 * include/grub/lib/LzmaTypes.h: Likewise.
1206 * lib/LzFind.c: Likewise.
1208 * lib/LzmaDec.c: Likewise.
1210 * lib/LzmaEnc.c: Likewise.
1212 2008-07-13 Bean <bean123ch@gmail.com>
1214 * fs/ext2.c (EXT4_EXTENTS_FLAG): New macro.
1215 (grub_ext4_extent_header): New structure.
1216 (grub_ext4_extent): Likewise.
1217 (grub_ext4_extent_idx): Likewise.
1218 (grub_ext4_find_leaf): New function.
1219 (grub_ext2_read_block): Handle extents.
1221 2008-07-12 Robert Millan <rmh@aybabtu.com>
1223 * util/i386/pc/grub-mkrescue.in: s/grub-install/grub-mkrescue/g.
1225 2008-07-11 Robert Millan <rmh@aybabtu.com>
1227 * util/grub.d/40_custom.in: New file. Example on how to add custom
1228 entries to /etc/grub.d.
1229 * conf/common.rmk (%, update-grub_SCRIPTS, CLEANFILES): Install
1230 40_custom (implicitly, by merging all the grub.d rules).
1232 2008-07-11 Pavel Roskin <proski@gnu.org>
1234 * commands/read.c (grub_getline): Fix invalid memory access.
1235 Don't add newline to the variable value.
1237 * term/i386/pc/serial.c (GRUB_SERIAL_PORT_NUM): New constant.
1238 [!GRUB_MACHINE_PCBIOS] (serial_hw_io_addr): Add COM2 and COM3.
1239 (serial_hw_get_port): Check validity of the port number.
1240 (grub_cmd_serial): Check return value of serial_hw_get_port().
1242 2008-07-07 Pavel Roskin <proski@gnu.org>
1244 * boot/i386/pc/diskboot.S (notification_string): Replace
1245 "Loading kernel" with just "loading". This is shorter, less
1246 confusing and saves a few bytes for possible future changes.
1248 2008-07-05 Pavel Roskin <proski@gnu.org>
1250 * disk/ata.c (grub_ata_dumpinfo): Don't output addressing and
1251 size for ATAPI devices, they are undefined. Output sector
1252 number in decimal form.
1254 * disk/ata.c: Use named constants for status bits.
1256 2008-07-04 Pavel Roskin <proski@gnu.org>
1258 * kern/i386/linuxbios/init.c (grub_machine_init): Cast addr to
1259 grub_addr_t before casting it to the void pointer to fix a
1260 warning. Non-addressable regions are discarded earlier.
1261 (grub_arch_modules_addr): Cast _end to grub_addr_t.
1262 * kern/i386/linuxbios/table.c: Include grub/misc.h.
1263 (check_signature): Don't shadow table_header.
1264 (grub_linuxbios_table_iterate): Cast numeric constants to
1265 grub_linuxbios_table_header_t.
1266 * include/grub/i386/linuxbios/init.h: Add noreturn attribute to
1269 * kern/ieee1275/init.c: Cast _start and _end to grub_addr_t to
1272 * include/grub/misc.h (ALIGN_UP): Avoid unnecessary cast to a
1273 pointer, which can cause warnings. Support 64-bit addresses.
1275 * util/elf/grub-mkimage.c: Use GRUB_TARGET_SIZEOF_LONG instead
1276 of sizeof(long). This fixes PowerPC image generation on x86_64.
1278 2008-07-04 Robert Millan <rmh@aybabtu.com>
1280 This fixes a performance issue when pc & gpt partmap iterators
1281 didn't abort iteration even after our hook found what it was
1282 looking for (often causing expensive probes of non-existent drives).
1284 Some callers relied on previous buggy behaviour, since they would
1285 rise an error when their own hooks caused early abortion of its
1288 * kern/device.c (grub_device_open): Improve error message.
1289 * disk/lvm.c (grub_lvm_open): Likewise.
1290 * disk/raid.c (grub_raid_open): Likewise.
1292 * partmap/pc.c (pc_partition_map_iterate): Abort parent iteration
1293 when hook requests it, independently of grub_errno.
1294 (pc_partition_map_probe): Do not fail when find_func() caused
1295 early abortion of pc_partition_map_iterate().
1297 * partmap/gpt.c (gpt_partition_map_iterate): Abort parent iteration
1298 when hook requests it, independently of grub_errno.
1299 (gpt_partition_map_probe): Do not fail when find_func() caused
1300 early abortion of gpt_partition_map_iterate().
1302 * kern/partition.c (grub_partition_iterate): Abort parent iteration
1303 when hook requests it, independently of grub_errno. Do not fail when
1304 part_map_iterate_hook() caused early abortion of p->iterate().
1306 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Do not fail
1307 when grub_partition_iterate() returned with non-zero.
1309 2008-07-03 Pavel Roskin <proski@gnu.org>
1311 * disk/ata.c (grub_ata_pio_write): Check status before writing,
1312 like we do in grub_ata_pio_read().
1313 (grub_ata_readwrite): Always write individual sectors. Fix the
1314 sector count for the remainder.
1315 (grub_ata_write): Enable writing to ATA devices. Correctly
1316 report error for ATAPI devices.
1318 2008-07-02 Pavel Roskin <proski@gnu.org>
1320 * boot/i386/pc/cdboot.S: Add _start entry to fix a linker
1323 * disk/ata.c (grub_ata_readwrite): Don't increment sector number
1324 for every read sector, we already increment it for the whole
1325 batch. This fixes reading more than 256 sectors at once.
1327 * util/grub-editenv.c (cmd_info): Cast argument to long
1328 explicitly. ptrdiff_t reduces to int on i386.
1330 * util/grub-editenv.c (main): Be specific which parameter is
1333 * disk/memdisk.c (memdisk_addr): Make a pointer to fix warnings.
1334 (memdisk): Make memdisk_orig_addr a pointer.
1336 * fs/reiserfs.c (grub_reiserfs_read): Fix misuse of grub_size_t
1337 for file offsets, use grub_off_t instead. Fix printf format
1340 * fs/reiserfs.c: Remove #warning, TODO list items don't belong
1341 there. Real unexpected warnings should not drown in the noise
1342 about known problems.
1344 * commands/hexdump.c (grub_cmd_hexdump): Fix misuse of
1345 grub_disk_addr_t for memory addresses.
1347 * loader/aout.c (grub_aout_load): Cast load_addr to pointer
1348 explicitly to fix a warning.
1350 * util/grub-editenv.c (cmd_info): Fix warning in printf format.
1352 * Makefile.in (MODULE_LDFLAGS): New variable.
1353 * aclocal.m4 (grub_PROG_LD_BUILD_ID_NONE): New macro. Check if
1354 the linker accepts --build-id=none.
1355 * configure.ac: Call grub_PROG_LD_BUILD_ID_NONE. Substitute
1357 * genmk.rb: Use MODULE_LDFLAGS when linking modules.
1359 * fs/xfs.c (struct grub_xfs_dir_header): Use names similar to
1360 those in Linux XFS code. Provide a way to access 64-bit parent
1362 (grub_xfs_iterate_dir): Use the new names. Avoid reading past
1363 the end of struct grub_xfs_dir_header.
1365 2008-07-02 Bean <bean123ch@gmail.com>
1367 * include/grub/ieee1275.h (grub_ieee1275_flag): New constant
1368 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
1369 and GRUB_IEEE1275_FLAG_NO_ANSI.
1371 * kern/ieee1275/cmain.c (grub_ieee1275_find_options): Set flag
1372 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
1373 and GRUB_IEEE1275_FLAG_NO_ANSI for Open Hackware.
1375 * kern/ieee1275/ieee1275.c (grub_ieee1275_interpret): Return
1376 immediately if GRUB_IEEE1275_FLAG_CANNOT_INTERPRET is set.
1378 * kern/ieee1275/init.c (grub_claim_heap): Claim memory directly if
1379 GRUB_IEEE1275_FLAG_FORCE_CLAIM is set.
1381 * term/ieee1275/ofconsole.c (grub_ofconsole_writeesc): Don't output
1382 esc sequence on non ANSI terminal.
1383 (grub_ofconsole_gotoxy): Emulate backspace key on non ANSI terminal.
1385 * util/elf/grub-mkimage.c (add_segments): Move ELF header to the
1388 2008-07-02 Bean <bean123ch@gmail.com>
1390 * conf/common.rmk (bin_UTILITIES): Add grub-editenv.
1391 (grub_editenv_SOURCES): New variable.
1392 (pkglib_MODULES): Add loadenv.mod.
1393 (loadenv_mod_SOURCES): New variable.
1394 (loadenv_mod_CFLAGS): Likewise.
1395 (loadenv_mod_LDFLAGS): Likewise.
1397 * include/grub/envblk.h: New file.
1399 * util/envblk.c: New file.
1401 * util/grub-editenv.c: New file.
1403 * commands/loadenv.c: New file.
1405 2008-07-01 Pavel Roskin <proski@gnu.org>
1407 * include/multiboot2.h (struct multiboot_tag_module): Use char,
1408 not unsigned char. This fixes warnings and is consistent with
1411 * disk/fs_uuid.c (search_fs_uuid): Correctly increment count.
1413 * normal/parser.y: Define YYENABLE_NLS as 0 to fix warnings.
1415 * term/tparm.c (analyze): Always set *popcount.
1417 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Remove useless
1418 cast to fix a warning.
1420 * loader/i386/pc/multiboot2.c (grub_mb2_arch_module_alloc): Use
1421 cast to suppress a warning.
1423 * fs/afs.c (grub_afs_read_block): Return grub_disk_addr_t, as
1424 grub_fshelp_read_file() expects.
1426 * fs/fat.c: Fix UUID calculation on big-endian systems. We
1427 write uuid as a 32-bit value in CPU byte order, so declare and
1430 * disk/raid.c: Cast grub_dprintf() arguments to unsigned long
1431 long if the format specifier expects it.
1432 * partmap/gpt.c (gpt_partition_map_iterate): Likewise.
1433 * partmap/pc.c (pc_partition_map_iterate): Likewise.
1434 * fs/ntfs.c (grub_ntfs_uuid): Cast data->uuid to unsigned long
1435 long to fix a warning.
1436 * fs/reiserfs.c (grub_reiserfs_read): Change casts in
1437 grub_dprintf() arguments to fix warnings.
1439 2008-06-30 Pavel Roskin <proski@gnu.org>
1441 * util/i386/pc/grub-setup.c (setup): Write install_dos_part and
1442 install_bsd_part immediately before core.img is embedded or
1443 modified on disk. This fixes core.img verification if core.img
1446 * util/i386/pc/grub-setup.c (setup): Use core_path_dev, not
1447 core_path to calculate the blocklist.
1448 Patch from Javier MartÃn <lordhabbit@gmail.com>
1450 2008-06-29 Robert Millan <rmh@aybabtu.com>
1452 * fs/xfs.c (GRUB_XFS_FSB_TO_BLOCK): New macro. Maps filesystem
1453 block to disk block.
1454 (grub_xfs_read_block): Use GRUB_XFS_FSB_TO_BLOCK() on result.
1455 Patch from Niels Böhm <bitbucket@arcor.de>
1457 2008-06-29 Robert Millan <rmh@aybabtu.com>
1459 * util/update-grub_lib.in (font_path): Search for fonts in
1460 /boot/grub first, which is more likely to be readable (we aren't
1461 deciding where fonts live, just looking for them).
1463 2008-06-26 Pavel Roskin <proski@gnu.org>
1465 * util/biosdisk.c (read_device_map): Don't leave dead map
1466 entries for devices failing stat() check.
1468 * util/i386/pc/grub-setup.c (setup): Don't reuse core_path, use
1469 core_path_dev for the core.img path on the target device.
1471 2008-06-26 Robert Millan <rmh@aybabtu.com>
1473 * disk/fs_uuid.c: New file.
1474 * conf/common.rmk (pkglib_MODULES): Add `fs_uuid.mod'.
1475 (fs_uuid_mod_SOURCES, fs_uuid_mod_CFLAGS)
1476 (fs_uuid_mod_LDFLAGS): New variables.
1477 * include/grub/disk.h (grub_disk_dev_id): Add
1478 `GRUB_DISK_DEVICE_UUID_ID'.
1479 * kern/disk.c (grub_disk_dev_iterate): Allow disk devices not to
1480 implement iterate().
1482 2008-06-26 Robert Millan <rmh@aybabtu.com>
1484 * util/grub.d/10_linux.in: Avoid passing UUIDs to Linux when either
1485 "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" does not exist, or when a
1486 Linux image includes no initrd.
1488 2008-06-21 Javier MartÃn <lordhabbit@gmail.com>
1490 * util/i386/pc/grub-setup.c (setup): Remove literal "core.img" in a
1491 call to resolve the core image location that effectively appended the
1494 2008-06-21 Robert Millan <rmh@aybabtu.com>
1496 * util/grub.d/00_header.in: Move last prepare_grub_to_access_device()
1499 * util/grub.d/10_hurd.in: ... to here ...
1500 * util/grub.d/10_linux.in: ... and here.
1502 2008-06-19 Robert Millan <rmh@aybabtu.com>
1504 * kern/main.c (grub_main): Export `prefix' variable immediately
1505 after it has been set by grub_machine_set_prefix().
1507 2008-06-19 Robert Millan <rmh@aybabtu.com>
1509 * commands/search.c (search_label, search_fs_uuid, search_file): Print
1510 search result when not saving to variable, not the other way around.
1511 When saving to variable, abort iteration as soon as a match is found.
1513 2008-06-19 Robert Millan <rmh@aybabtu.com>
1515 * util/update-grub_lib.in (prepare_grub_to_access_device): Remove
1516 check for partition that provides /boot/grub. Its logic is flawed,
1517 as it prevents prepare_grub_to_access_device() from being called
1520 2008-06-19 Robert Millan <rmh@aybabtu.com>
1522 * util/update-grub_lib.in (prepare_grub_to_access_device): Issue
1523 "insmod" command directly when abstraction modules are needed,
1524 instead of relying on GRUB_PRELOAD_MODULES (which had no effect
1525 since it had already been processed).
1527 2008-06-19 Pavel Roskin <proski@gnu.org>
1529 * conf/i386-efi.rmk: Recompile grub-mkimage.c if Makefile has
1530 changed. This is needed in case GRUB_LIBDIR changes.
1531 * conf/i386-ieee1275.rmk: Likewise.
1532 * conf/i386-linuxbios.rmk: Likewise.
1533 * conf/i386-pc.rmk: Likewise.
1534 * conf/powerpc-ieee1275.rmk: Likewise.
1536 2008-06-18 Pavel Roskin <proski@gnu.org>
1538 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Rename
1539 kernel_elf_symlist.c to symlist.c for consistency with other
1540 architectures. Update all users.
1541 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
1543 2008-06-18 Robert Millan <rmh@aybabtu.com>
1545 * util/i386/pc/grub-install.in: If the drive is LVM or RAID, prepend
1548 * util/i386/pc/grub-setup.c (main): Don't handle prefix at all. Set
1549 `must_embed' to 1 when root_dev is a RAID device. When dest_dev is
1550 a RAID device, run setup() for all members independently on whether
1551 LVM abstraction is being used.
1552 (setup): Don't handle prefix at all; let grub-mkimage take care of it.
1553 If grub-mkimage has set `*install_dos_part == -2', don't override this
1555 Perform *install_dos_part adjustments independently on whether
1556 we're embedding or not.
1557 Clarify error message when image is too big for embedding.
1558 Remove duplicate *install_dos_part stanza.
1560 2008-06-17 Robert Millan <rmh@aybabtu.com>
1562 * term/ieee1275/ofconsole.c (fgcolor, bgcolor): Remove variables.
1563 (grub_ofconsole_normal_color, grub_ofconsole_highlight_color): New
1565 (grub_ofconsole_setcolor, grub_ofconsole_getcolor): Load/store
1566 values in grub_ofconsole_normal_color and
1567 grub_ofconsole_highlight_color (they're not directly related to
1568 background and foreground).
1569 (grub_ofconsole_setcolorstate): Extract background and foreground
1570 from grub_ofconsole_normal_color and grub_ofconsole_highlight_color.
1572 2008-06-17 Robert Millan <rmh@aybabtu.com>
1574 * util/update-grub_lib.in (prepare_grub_to_access_device): Use
1575 /boot/grub for the check in last commit, not /boot (they could be
1576 different partitions).
1578 2008-06-16 Robert Millan <rmh@aybabtu.com>
1580 * util/update-grub_lib.in (prepare_grub_to_access_device): If we were
1581 asked to setup access for the same partition that provides /boot,
1582 don't bother using UUIDs since our root already has the value we
1585 2008-06-16 Robert Millan <rmh@aybabtu.com>
1587 * util/biosdisk.c (convert_system_partition_to_system_disk): Detect
1589 Patch from Sven Mueller <sven@debian.org>.
1591 2008-06-16 Robert Millan <rmh@aybabtu.com>
1593 * util/update-grub.in: Check for $EUID instead of $UID.
1594 Reported by Vincent Zweije.
1596 2008-06-16 Bean <bean123ch@gmail.com>
1598 * fs/ext2.c (grub_ext2_blockgroup): Revert to pre-journal state.
1599 (grub_ext2_read_block): Likewise.
1600 (grub_ext2_read_inode): Likewise.
1601 (grub_ext2_mount): Likewise.
1602 (grub_ext2_close): Likewise.
1603 (grub_ext3_get_journal): Removed.
1605 * fs/reiserfs.c (grub_reiserfs_get_item): Revert to pre-journal state.
1606 (grub_reiserfs_read_symlink): Likewise.
1607 (grub_reiserfs_mount): Likewise.
1608 (grub_reiserfs_open): Likewise.
1609 (grub_reiserfs_read): Likewise.
1610 (grub_reiserfs_close): Likewise.
1611 (grub_reiserfs_get_journal): Removed.
1613 * fs/fshelp.c (grub_fshelp_read): Removed.
1614 (grub_fshelp_map_block): Likewise.
1616 * include/grub/fshelp.h (grub_fshelp_journal_type): Removed.
1617 (grub_fshelp_journal): Likewise.
1618 (grub_fshelp_read): Likewise.
1619 (grub_fshelp_map_block): Likewise.
1621 2008-06-16 Pavel Roskin <proski@gnu.org>
1623 * conf/powerpc-ieee1275.rmk: Remove -msoft-float, we don't use
1624 floating point anymore.
1625 * include/grub/powerpc/libgcc.h: Leave only necessary exports.
1627 2008-06-15 Pavel Roskin <proski@gnu.org>
1629 * commands/ls.c (grub_ls_list_files): Use integer calculations
1630 for human readable format, avoid floating point use.
1631 * kern/misc.c (grub_ftoa): Remove.
1632 (grub_vsprintf): Remove floating point support.
1634 2008-06-15 Robert Millan <rmh@aybabtu.com>
1636 * util/grub.d/10_linux.in: Use the underlying device for loop-AES
1638 Reported by Max Vozeler.
1640 2008-06-15 Robert Millan <rmh@aybabtu.com>
1642 * util/i386/pc/grub-mkimage.c (generate_image): If we included a drive
1643 in our prefix, set install_{dos,bsd}_part = -2 to indicate this can be
1645 (main): If a memdisk was requested, add "(memdisk)" drive explicitly to
1646 the beginning of the prefix.
1648 * kern/i386/pc/init.c (make_install_device): Remove memdisk check.
1649 It is assumed that if we have a memdisk, grub-mkimage has set
1650 grub_prefix to include the "(memdisk)" drive in it.
1652 2008-06-15 Robert Millan <rmh@aybabtu.com>
1654 * term/i386/pc/console.c [GRUB_MACHINE_LINUXBIOS] (grub_console_init):
1655 Initialize keyboard controller after registering the terminal, so that
1656 grub_printf() can be called from grub_keyboard_controller_init().
1658 2008-06-15 Robert Millan <rmh@aybabtu.com>
1660 * fs/sfs.c (grub_sfs_read_extent): Fix the count of nodes in
1661 extent-btree which is written as big endian on disk.
1662 Reported by Alain Greppin <al@chilibi.org>.
1664 2008-06-14 Robert Millan <rmh@aybabtu.com>
1666 * util/i386/efi/grub-install.in (modules): Remove `_chain'.
1667 * util/i386/pc/grub-install.in (modules): Likewise.
1669 2008-06-13 Pavel Roskin <proski@gnu.org>
1671 * commands/ls.c (grub_ls_list_files): Fix format warnings.
1673 2008-06-13 Bean <bean123ch@gmail.com>
1675 * commands/hexdump.c (grub_cmd_hexdump): Adjust offset for partition.
1677 * fs/ext2.c (grub_ext3_get_journal): Fix revoke block handling.
1679 * fs/fshelp.c (grub_fshelp_map_block): Don't map block 0 as it's used
1680 to indicate sparse block.
1682 2008-06-12 Pavel Roskin <proski@gnu.org>
1684 * fs/ext2.c (grub_ext2_read_inode): Don't normalize block
1685 number, grub_fshelp_read() does it for us.
1687 * fs/fshelp.c (grub_fshelp_read): New function. Implement
1688 linear disk read with journal translation.
1689 * fs/ext2.c: Use grub_fshelp_read() instead of grub_disk_read().
1690 * include/grub/fshelp.h: Declare grub_fshelp_read().
1692 2008-06-09 Pavel Roskin <proski@gnu.org>
1694 * fs/minix.c (grub_minix_mount): Handle error reading
1697 2008-06-08 Robert Millan <rmh@aybabtu.com>
1699 * util/i386/pc/grub-setup.c (main): If install drive is an LVM,
1700 don't append the RAID prefix afterwards.
1701 Reported by Clint Adams.
1703 2008-06-08 Robert Millan <rmh@aybabtu.com>
1705 Based on description from Pavel:
1706 * kern/disk.c (grub_disk_check_range): Rename to ...
1707 (grub_disk_adjust_range): ... this. Add a comment explaining the
1708 tasks performed by this function.
1710 2008-06-08 Robert Millan <rmh@aybabtu.com>
1712 * include/grub/ntfs.h (struct grub_ntfs_bpb): Rename `serial_number' to
1713 `num_serial' (for consistency with other variables).
1714 (struct grub_ntfs_data): Add `uuid' member.
1715 * fs/ntfs.c (grub_ntfs_mount): Initialize `data->uuid'.
1716 (grub_ntfs_uuid): New function.
1717 (grub_ntfs_fs): Reference grub_ntfs_uuid() in `uuid' struct member.
1719 2008-06-07 Pavel Roskin <proski@gnu.org>
1721 * util/biosdisk.c (open_device): Revert last change to the
1722 function, it broke installation. The sector needs to be
1723 different dependent on which device is opened.
1725 2008-06-06 Robert Millan <rmh@aybabtu.com>
1727 Ensure GRUB_KERNEL_MACHINE_DATA_END is always consistent with the
1728 rest of GRUB, and breakage doesn't happen if its value were modified.
1730 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
1731 Redefine as an offset from `GRUB_KERNEL_MACHINE_DATA_END' instead of
1732 a constant (same value).
1733 * kern/i386/pc/startup.S: Replace hardcoded `0x50' with
1734 `GRUB_KERNEL_MACHINE_DATA_END' (same value).
1736 2008-06-06 Robert Millan <rmh@aybabtu.com>
1738 * util/biosdisk.c (open_device): Do not modify sector offset when
1739 accessing a partition. kern/disk.c already handles this for us.
1741 2008-06-06 Robert Millan <rmh@aybabtu.com>
1743 * util/grub-emu.c (grub_machine_init): Move code in this function from
1745 (main): ... to here (before grub_util_biosdisk_init() call, to prevent
1746 segfault in case grub_printf() is called).
1748 * util/i386/pc/grub-install.in: Append `--device-map=${device_map}' to
1749 grub_probe. Update all users not to explicitly add it again.
1750 (grub_device): New variable; contains corresponding device for grubdir.
1751 (fs_module, partmap_module, devabstraction_module): Pass
1752 `--device ${grub_device}' to grub_probe to avoid traversing /dev
1755 2008-06-05 Robert Millan <rmh@aybabtu.com>
1757 * normal/misc.c (grub_normal_print_device_info): When a filesystem UUID
1758 is found, print it (same layout as with labels).
1760 2008-06-04 Robert Millan <rmh@aybabtu.com>
1762 * util/biosdisk.c (get_drive): Rename to ...
1763 (find_grub_drive): ... this. Update all users.
1765 (get_os_disk): Rename to ...
1766 (convert_system_partition_to_system_disk): ... this. Update all users.
1768 (find_drive): Rename to ...
1769 (find_system_device): ... this. Update all users.
1771 2008-06-04 Robert Millan <rmh@aybabtu.com>
1773 * util/biosdisk.c (get_os_disk): Handle IDA devices.
1774 * util/grub-mkdevicemap.c (get_mmc_disk_name)
1775 (make_device_map): Likewise.
1777 2008-06-01 Robert Millan <rmh@aybabtu.com>
1779 * util/biosdisk.c (get_drive): Verify that `map[i].drive' is non-NULL
1780 before dereferencing it.
1782 * fs/fat.c (struct grub_fat_bpb): Move fat32-specific fields into a
1783 union with fat12/fat16-specific ones. Add some new fields, including
1784 `num_serial' for both versions.
1785 (struct grub_fat_data): Add `uuid' member.
1786 (grub_fat_mount): Refer to fat32-specific fields in `bpb' by their new
1787 names. Initialize `data->uuid' using `num_serial'.
1788 (grub_fat_uuid): New function.
1789 (grub_fat_fs): Reference grub_fat_uuid() in `uuid' struct member.
1791 * fs/reiserfs.c (grub_reiserfs_superblock): Add `uuid' field.
1792 (grub_reiserfs_uuid): New function.
1793 (grub_reiserfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct
1796 * fs/xfs.c (grub_xfs_sblock): Add `uuid' field.
1797 (grub_xfs_uuid): New function.
1798 (grub_xfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct member.
1800 2008-06-01 Robert Millan <rmh@aybabtu.com>
1802 * util/update-grub_lib.in (prepare_grub_to_access_device): Generate
1803 code that is backward compatible with pre-uuid search command.
1805 2008-05-31 Robert Millan <rmh@aybabtu.com>
1807 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Iterate through
1808 floppies after everything else, to ensure floppy drive isn't accessed
1809 unnecessarily (patch from Bean).
1811 2008-05-31 Robert Millan <rmh@aybabtu.com>
1813 * commands/search.c (search_label, search_fs_uuid, search_file): Do
1814 not print device names when we were asked to set a variable.
1816 2008-05-31 Robert Millan <rmh@aybabtu.com>
1818 * term/ieee1275/ofconsole.c (grub_ofconsole_setcursor): Implement
1819 using "cursor-on" and "cursor-off" commands (understood at least by
1820 the Open Firmware flavour on OLPC).
1822 2008-05-31 Michael Gorven <michael@gorven.za.net>
1824 * term/terminfo.c (grub_terminfo_set_current): Correct vt100 cursor
1825 on and off sequences.
1827 2008-05-31 Robert Millan <rmh@aybabtu.com>
1829 * util/update-grub_lib.in: Replace `grub-probe' with `${grub_probe}'.
1830 * util/update-grub.in: Likewise.
1832 2008-05-30 Pavel Roskin <proski@gnu.org>
1834 * util/biosdisk.c (linux_find_partition): Simplify logic and
1835 make the code more universal. Keep special processing for
1836 devfs, but use a simple rule for all other devices. If the
1837 device ends with a number, append 'p' and the partition number.
1838 Otherwise, append only the partition number.
1840 2008-05-30 Robert Millan <rmh@aybabtu.com>
1842 * util/update-grub.in (GRUB_DISABLE_LINUX_UUID): Export variable.
1843 * util/grub.d/10_linux.in: If GRUB_DEVICE_UUID is set, and
1844 GRUB_DISABLE_LINUX_UUID isn't true, use the filesystem UUIDs as
1845 the `root' parameter to Linux.
1847 2008-05-30 Robert Millan <rmh@aybabtu.com>
1849 * commands/search.c (options): Rename --fs_uuid to --fs-uuid.
1850 * util/update-grub_lib.in (prepare_grub_to_access_device): Replace
1851 --fs_uuid with --fs-uuid.
1852 * util/update-grub.in: Allow filesystem UUID probes to fail (since not
1853 all filesystems support them).
1855 2008-05-30 Robert Millan <rmh@aybabtu.com>
1857 * fs/ext2.c (grub_ext2_uuid): Use `04x' instead of '02x' as
1858 grub_printf() flags, since we're printing in units of 2 bytes.
1860 2008-05-30 Robert Millan <rmh@aybabtu.com>
1862 * util/grub.d/00_header.in: Remove obsolete comment referencing
1863 convert_system_path_to_grub_path().
1864 * util/update-grub.in: Likewise.
1865 * util/update-grub_lib.in (is_path_readable_by_grub): New function.
1866 (convert_system_path_to_grub_path): Add a warning message explaining
1867 that this function is deprecated. Rely on is_path_readable_by_grub()
1868 for the readability checks.
1869 (font_path): Use is_path_readable_by_grub() for the readability
1870 check rather than convert_system_path_to_grub_path().
1872 2008-05-30 Robert Millan <rmh@aybabtu.com>
1874 * util/update-grub_lib.in (prepare_grub_to_access_device): New function.
1875 * util/update-grub.in: Set `GRUB_FONT_PATH' to the system path, without
1876 converting it first.
1877 * util/grub.d/00_header.in: Use prepare_grub_to_access_device() to setup
1878 grub.cfg for access to font file, and afterwards call it again to set
1881 2008-05-30 Robert Millan <rmh@aybabtu.com>
1883 * commands/search.c (options): Add --fs_uuid option.
1884 (search_fs_uuid): New function.
1885 (grub_cmd_search): Fix --set argument passing.
1886 Use search_fs_uuid() when requested via --fs_uuid.
1887 (grub_search_init): Update help message.
1888 * fs/ext2.c (struct grub_ext2_sblock): Rename `unique_id' to `uuid'
1889 and redeclare it as an array of 16-bit words.
1890 (grub_ext2_uuid): New function.
1891 (grub_ext2_fs): Reference grub_ext2_uuid() in `uuid' struct member.
1892 * include/grub/fs.h (struct grub_fs): Add `uuid' struct member.
1893 * util/update-grub.in (GRUB_DEVICE_UUID, GRUB_DEVICE_BOOT)
1894 (GRUB_DEVICE_BOOT_UUID): New variables.
1895 (GRUB_DRIVE. GRUB_DRIVE_BOOT. GRUB_DRIVE_BOOT_GRUB): Remove.
1896 * util/grub.d/00_header.in: Set root using `search --fs_uuid' command
1898 * util/grub.d/10_hurd.in: Avoid explicit use of root drive. Instead,
1899 just assume `root' variable has the right value.
1900 * util/grub.d/10_linux.in: Likewise.
1901 * util/grub-probe.c (probe): Probe for filesystem UUID when requested
1903 (main): Recognise `-t fs_uuid' argument.
1905 2008-05-30 Robert Millan <rmh@aybabtu.com>
1907 * util/biosdisk.c (map): Redefine structure to hold information
1908 about GRUB drive name.
1909 (get_drive): Reimplement without assuming (and verifying) BIOS-like
1911 (call_hook): Remove.
1912 (grub_util_biosdisk_iterate): Access drive names via `.drive' struct
1913 member. Assume drive has partitions.
1914 (grub_util_biosdisk_open): Access device names via `.device' struct
1916 (open_device): Likewise.
1917 (find_drive): Likewise.
1918 (read_device_map): Adjust map[] usage to match the new struct
1919 definition. Don't check for duplicates (still possible, but not cheap
1921 (grub_util_biosdisk_fini): Free malloced buffers referenced by map[].
1922 (make_device_name): Remove assumption of BIOS-like drive names.
1924 2008-05-30 Pavel Roskin <proski@gnu.org>
1926 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Remove, as
1927 compiling execute.c doesn't need grub_script.tab.h anymore.
1928 (normal/command.c_DEPENDENCIES): Likewise.
1929 (normal/function.c_DEPENDENCIES): Likewise.
1930 * conf/i386-ieee1275.rmk: Likewise.
1931 * conf/i386-linuxbios.rmk: Likewise.
1932 * conf/i386-pc.rmk: Likewise.
1933 * conf/powerpc-ieee1275.rmk: Likewise.
1934 * conf/sparc64-ieee1275.rmk: Likewise.
1936 2008-05-29 Pavel Roskin <proski@gnu.org>
1938 * disk/lvm.c (grub_lvm_scan_device): Check for the buffer end
1939 when scanning metadata for volume group name.
1941 * include/grub/script.h: Don't include grub_script.tab.h. It's
1942 a generated file, which may only be included from the files with
1943 DEPENDENCIES rules in the makefile. Don't use typedef YYSTYPE,
1944 use union YYSTYPE, as the later allows forward declaration.
1945 * normal/lexer.c: Don't use typedef YYSTYPE, use union YYSTYPE.
1947 2008-05-29 Robert Millan <rmh@aybabtu.com>
1949 * term/i386/pc/at_keyboard.c: Include `grub/machine/machine.h'.
1950 (OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): New macros.
1951 [GRUB_MACHINE_IEEE1275] (keyboard_map): Add OLPC scan codes
1952 (grub_console_checkkey): Add grub_dprintf() call to report unknown
1955 2008-05-29 Robert Millan <rmh@aybabtu.com>
1957 * term/i386/pc/at_keyboard.c (grub_console_checkkey): Add support for
1958 control key combinations.
1960 2008-05-29 Robert Millan <rmh@aybabtu.com>
1962 * util/powerpc/ieee1275/grub-install.in: Move from here ...
1963 * util/ieee1275/grub-install.in: ... to here.
1964 * powerpc-ieee1275.rmk (grub_install_SOURCES): Update location.
1965 * i386-ieee1275.rmk (sbin_SCRIPTS): New variable.
1966 (grub_install_SOURCES): Likewise.
1968 2008-05-29 Robert Millan <rmh@aybabtu.com>
1970 * fs/affs.c: Update copyright year.
1971 * fs/ext2.c: Likewise.
1972 * fs/fshelp.c: Likewise.
1973 * fs/hfsplus.c: Likewise.
1974 * fs/ntfs.c: Likewise.
1975 * fs/xfs.c: Likewise.
1976 * include/grub/fshelp.h: Likewise.
1977 * util/grub-mkdevicemap.c: Likewise.
1979 2008-05-28 Robert Millan <rmh@aybabtu.com>
1981 * util/update-grub.in: Allow chmod call to fail, since /boot/grub/
1982 might need to be fatfs to support some firmware implementations
1985 2008-05-28 Robert Millan <rmh@aybabtu.com>
1987 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle MMC
1989 * util/grub-mkdevicemap.c (get_mmc_disk_name)
1990 (make_device_map): Likewise.
1992 2008-05-20 Bean <bean123ch@gmail.com>
1994 * fs/fshelp.c (grub_fshelp_map_block): New function.
1995 (grub_fshelp_find_file): Use 64-bit type for pos and block address.
1996 Use `>>' and `&' operator to avoid 64-bit divide and modulo.
1998 * include/grub/fshelp.h (grub_fshelp_journal_type): New enum.
1999 (GRUB_FSHELP_JOURNAL_UNUSED_MAPPING): New macro.
2000 (grub_fshelp_journal): New structure.
2001 (grub_fshelp_map_block): New function prototype.
2002 (grub_fshelp_read_file): Use grub_disk_addr_t as block type.
2003 (grub_fshelp_map_block): Likewise.
2005 * fs/ext2.c (EXT3_FEATURE_COMPAT_HAS_JOURNAL): New macro.
2006 (EXT3_JOURNAL_MAGIC_NUMBER): Likewise.
2007 (EXT3_JOURNAL_DESCRIPTOR_BLOCK): Likewise.
2008 (EXT3_JOURNAL_COMMIT_BLOCK): Likewise.
2009 (EXT3_JOURNAL_SUPERBLOCK_V1): Likewise.
2010 (EXT3_JOURNAL_SUPERBLOCK_V2): Likewise.
2011 (EXT3_JOURNAL_REVOKE_BLOCK): Likewise.
2012 (EXT3_JOURNAL_FLAG_ESCAPE): Likewise.
2013 (EXT3_JOURNAL_FLAG_SAME_UUID): Likewise.
2014 (EXT3_JOURNAL_FLAG_DELETED): Likewise.
2015 (EXT3_JOURNAL_FLAG_LAST_TAG): Likewise.
2016 (grub_ext2_sblock): New members for journal support.
2017 (grub_ext3_journal_header): New structure.
2018 (grub_ext3_journal_revoke_header): Likewise.
2019 (grub_ext3_journal_block_tag): Likewise.
2020 (grub_ext3_journal_sblock): Likewise.
2021 (grub_fshelp_node): New members logfile and journal.
2022 (grub_ext2_read_block): Change block type to grub_disk_addr_t. Use
2023 grub_fshelp_map_block to get real block number.
2024 (grub_ext2_blockgroup): Use grub_fshelp_map_block to get real block
2026 (grub_ext2_read_inode): Likewise.
2027 (grub_ext3_get_journal): New function.
2028 (grub_read_inode): Initialize journal using grub_ext3_get_journal.
2029 (grub_ext2_close): Release memory used by journal.
2031 * fs/reiserfs.c (REISERFS_MAGIC_STRING): Changed to "ReIsEr".
2032 (REISERFS_MAGIC_DESC_BLOCK): New macro.
2033 (grub_reiserfs_transaction_header): Renamed to
2034 grub_reiserfs_description_block, replace field data with real_blocks.
2035 (grub_reiserfs_commit_block): New structure.
2036 (grub_reiserfs_data): New member journal.
2037 (grub_reiserfs_get_item): Use grub_fshelp_map_block to get real block
2039 (grub_reiserfs_read_symlink): Likewise.
2040 (grub_reiserfs_iterate_dir): Likewise.
2041 (grub_reiserfs_open): Likewise.
2042 (grub_reiserfs_read): Likewise.
2043 (grub_reiserfs_get_journal): New function.
2044 (grub_reiserfs_mount): Use "ReIsEr" as super block magic, as there are
2045 three varieties ReIsErFs, ReIsEr2Fs and ReIsEr3Fs. Initialize journal
2046 using grub_reiserfs_get_journal.
2047 (grub_reiserfs_close): Release memory used by journal.
2049 * fs/affs.c (grub_affs_read_block): Change block type to
2050 grub_disk_addr_t. Use grub_divmod64 to do 64-bit division.
2052 * fs/afs.c (grub_afs_read_block): Change block type to grub_disk_addr_t.
2054 * fs/hfsplus.c (grub_hfsplus_read_block): Likewise.
2056 * fs/ntfs.c (grub_ntfs_read_block): Likewise.
2058 * fs/udf.c (grub_udf_read_block): Change block type to
2059 grub_disk_addr_t. Use type cast to avoid warning.
2061 * fs/xfs.c (grub_xfs_read_block): Likewise.
2063 2008-05-16 Christian Franke <franke@computer.org>
2065 * commands/cat.c (grub_cmd_cat): Remove non-ESC keys from keyboard queue
2066 to ensure that break with ESC will always work.
2067 * commands/sleep.c (grub_interruptible_millisleep): Likewise.
2068 Remove ESC from keyboard queue.
2070 2008-05-16 Christian Franke <franke@computer.org>
2072 * util/biosdisk.c: [__CYGWIN__] Add includes.
2073 (grub_util_biosdisk_open): Use Linux code also for Cygwin.
2074 (get_os_disk): Move variable declarations to OS specific
2075 parts to avoid warning.
2076 [__GNU__] (get_os_disk): Fix /dev/sdXsN case.
2077 [__CYGWIN__] (get_os_disk): Add Cygwin /dev/sdXN device names.
2078 (grub_util_biosdisk_get_grub_dev): Use Linux code also for
2080 * util/getroot.c: [__CYGWIN__] Add includes.
2081 (strip_extra_slashes): Fix "/" case.
2082 [__CYGWIN__] (get_win32_path): New function.
2083 [__CYGWIN__] (grub_get_prefix): Add conversion to win32 path.
2084 [__CYGWIN__] (find_root_device): Disable.
2085 [__CYGWIN__] (get_bootsec_serial): New function.
2086 [__CYGWIN__] (find_cygwin_root_device): Likewise.
2087 [__linux__] (grub_guess_root_device): Add early returns to simplify
2089 [__CYGWIN__] (grub_guess_root_device): Call find_cygwin_root_device.
2090 [__linux__] (grub_util_get_dev_abstraction): Enable LVM and RAID
2091 check for Linux only.
2093 2008-05-15 Bean <bean123ch@gmail.com>
2095 * kern/i386/pc/startup.S (grub_console_getkey): Workaround for the
2096 keyboard hang problem in apple's intel mac.
2098 2008-05-09 Robert Millan <rmh@aybabtu.com>
2100 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle Virtio
2102 * util/grub-mkdevicemap.c (get_virtio_disk_name)
2103 (make_device_map): Likewise.
2104 Reported by Aurelien Jarno <aurel32@debian.org>
2106 2008-05-07 Ian Campbell <ijc@hellion.org.uk>
2108 * util/biosdisk.c (get_os_disk): Recognise xvd type disks.
2109 * util/grub-mkdevicemap.c (get_xvd_disk_name): New function.
2110 (make_device_map): Output entries for xvd type disks.
2112 2008-05-07 Robert Millan <rmh@aybabtu.com>
2114 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle CCISS
2116 * util/grub-mkdevicemap.c (get_cciss_disk_name)
2117 (make_device_map): Likewise.
2118 Reported by Roland Dreier <rdreier@cisco.com>
2120 2008-05-07 Robert Millan <rmh@aybabtu.com>
2122 * disk/lvm.c (grub_lvm_scan_device): Detect errors in an additional
2123 grub_strstr() call. Correct a few mistakes in failure path handling.
2125 2008-05-06 Robert Millan <rmh@aybabtu.com>
2127 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
2128 Do not print a trailing slash (therefore, the root directory is an
2130 (convert_system_path_to_grub_path): Do not remove trailing slash
2131 from make_system_path_relative_to_its_root() output.
2133 * util/i386/pc/grub-install.in: Add trailing slash to output from
2134 make_system_path_relative_to_its_root().
2136 2008-05-06 Robert Millan <rmh@aybabtu.com>
2138 * util/grub-fstest.c (grub_refresh): Call `fflush (stdout)'. This
2139 ensures that output lines aren't intermangled with those sent to
2140 stderr (via grub_util_info()).
2141 * util/grub-probe.c (grub_refresh): Likewise.
2142 * util/i386/pc/grub-setup.c (grub_refresh): Likewise.
2144 2008-05-05 Christian Franke <franke@computer.org>
2146 * util/grub-mkdevicemap.c (get_floppy_disk_name) [__CYGWIN__]:
2147 Add Cygwin device names.
2148 (get_ide_disk_name) [__CYGWIN__]: Likewise.
2149 (get_scsi_disk_name) [__CYGWIN__]: Likewise.
2150 (check_device): Return error instead of success on empty name.
2151 (make_device_map): Move label inside linux specific code to
2152 prevent compiler warning.
2154 2008-04-30 Robert Millan <rmh@aybabtu.com>
2156 Based on patch from Fabian Greffrath <greffrath@leat.rub.de>
2157 * util/grub.d/10_linux.in: Add ${GRUB_CMDLINE_LINUX_DEFAULT} to the
2159 * util/update-grub.in: Export GRUB_CMDLINE_LINUX_DEFAULT.
2161 2008-04-29 Robert Millan <rmh@aybabtu.com>
2163 * docs/grub.cfg: New file (example GRUB configuration).
2165 2008-04-26 Robert Millan <rmh@aybabtu.com>
2167 * DISTLIST: Sort (sort -u < DISTLIST | sponge DISTLIST). Add
2168 `loader/i386/ieee1275/linux.c', `loader/i386/ieee1275/linux_normal.c'
2169 and `disk/ieee1275/nand.c'.
2171 2008-04-25 Bean <bean123ch@gmail.com>
2173 * Makefile.in (RMKFILES): Add missing arch i386-ieee1275 and
2176 * commands/hexdump.c (grub_cmd_hexdump): Support dumping of device,
2177 change the buffer size to 4096 for cdrom device.
2179 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add _linux.mod, linux.mod
2181 (_linux_mod_SOURCES): New variable.
2182 (_linux_mod_CFLAGS): Likewise.
2183 (_linux_mod_LDFLAGS): Likewise.
2184 (linux_mod_SOURCES): Likewise.
2185 (linux_mod_CFLAGS): Likewise.
2186 (linux_mod_LDFLAGS): Likewise.
2187 (nand_mod_SOURCES): Likewise.
2188 (nand_mod_CFLAGS): Likewise.
2189 (nand_mod_LDFLAGS): Likewise.
2191 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Return
2192 GRUB_ERR_UNKNOWN_DEVICE instead of GRUB_ERR_BAD_DEVICE if no device
2193 type property. (nand device in olpc don't have this property)
2195 * include/grub/disk.h (grub_disk_dev_id): New macro
2196 GRUB_DISK_DEVICE_NAND_ID.
2198 * include/grub/i386/ieee1275/loader.h (grub_rescue_cmd_linux): New
2200 (grub_rescue_cmd_initrd): Likewise.
2202 * include/grub/i386/linux.h (GRUB_LINUX_OFW_SIGNATURE): New macro.
2203 (linux_kernel_params): Add new member ofw_signature, ofw_num_items,
2204 ofw_cif_handler and ofw_idt, adjust padding number.
2206 * include/grub/i386/pc/memory.h (grub_upper_mem): Export it if
2207 GRUB_MACHINE_IEEE1275 is defined.
2209 * include/grub/ieee1275/ieee1275.h (grub_available_iterate):
2210 Use NESTED_FUNC_ATTR attribute on the hook parameter.
2212 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Use NESTED_FUNC_ATTR
2213 on nested function heap_init.
2214 (grub_upper_mem): New variable for i386-ieee1275.
2215 (grub_get_extended_memory): New function for i386-ieee1275.
2216 (grub_machine_init): Call grub_get_extended_memory for i386-ieee1275.
2218 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Use
2219 NESTED_FUNC_ATTR on the hook parameter. Don't quit if no device type
2222 * loader/i386/ieee1275/linux.c: New file.
2224 * loader/i386/ieee1275/linux_normal.c: New file.
2226 * disk/ieee1275/nand.c: New file.
2228 2008-04-18 Thomas Schwinge <tschwinge@gnu.org>
2230 * util/i386/pc/grub-mkrescue.in (grub_mkimage): Don't overwrite correct
2232 * util/powerpc/ieee1275/grub-mkrescue.in (grub_mkimage): Likewise.
2234 2008-04-18 Robert Millan <rmh@aybabtu.com>
2236 Restructures early code path on ieee1275 to unify grub_main() as
2237 the first C function that is executed in every platform.
2239 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_init): New prototype.
2240 * kern/i386/ieee1275/startup.S (_start): Jump to grub_main() instead of
2242 * kern/powerpc/ieee1275/crt0.S (_start): Likewise.
2243 * kern/ieee1275/cmain.c (cmain): Rename to ...
2244 * kern/ieee1275/cmain.c (grub_ieee1275_init): ... this.
2245 * kern/ieee1275/init.c (grub_machine_init): Call grub_ieee1275_init()
2248 2008-04-18 Robert Millan <rmh@aybabtu.com>
2250 * util/update-grub.in: Fix syntax error when setting
2251 `GRUB_PRELOAD_MODULES'.
2252 Reported by Stephane Chazelas <stephane@artesyncp.com>
2254 2008-04-17 Lubomir Kundrak <lkundrak@redhat.com>
2256 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): take only .text
2257 section into account, newer toolchains generate unique build ids
2258 * configure.ac: remove the test for --build-id=none acceptance,
2259 we want build ids to be preserved
2260 * genmk.rb: add -R .note.gnu.build-id to objcopy, so build id
2261 far from other sections don't cause the raw binary images grow
2264 2008-04-15 Robert Millan <rmh@aybabtu.com>
2266 * disk/lvm.c: Update copyright year.
2267 * kern/misc.c: Likewise.
2269 2008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
2271 * disk/lvm.c (grub_lvm_scan_device): Add forgotten failure path when
2272 there is no memory left for physical volume name.
2274 2008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
2276 * disk/lvm.c (grub_lvm_scan_device): Fix logical volume's physical
2277 volume name mapping to support bigger than 9 character names properly.
2279 2008-04-13 Robert Millan <rmh@aybabtu.com>
2281 * disk/i386/pc/biosdisk.c (grub_biosdisk_rw): Fix CHS limit check,
2282 as per http://www.allensmith.net/Storage/HDDlimit/Int13h.htm
2284 2008-04-13 Christian Franke <franke@computer.org>
2286 * util/i386/pc/grub-mkrescue.in: Add --emulation=floppy
2287 to create a floppy emulation boot CD when non emulation mode
2289 Enable Joliet CD filesystem extension.
2291 2008-04-13 Robert Millan <rmh@aybabtu.com>
2293 * kern/misc.c (grub_strncat): Fix off-by-one error.
2294 Reported by Zhang Huan <zhanghuan@nrchpc.ac.cn>
2296 * kern/env.c (grub_env_context_close): Clear current context, not
2298 Patch from Zhang Huan <zhanghuan@nrchpc.ac.cn>
2300 * kern/misc.c (grub_strcat): Minor speed optimization (same code size).
2302 2008-04-13 Robert Millan <rmh@aybabtu.com>
2304 Improve robustness when handling LVM.
2306 * disk/lvm.c (grub_lvm_getvalue): Return 0 when `*p' is NULL
2307 (and leave `*p' unmodified).
2308 (grub_lvm_iterate): Don't assume `vg->lvs != NULL' when iterating
2310 (grub_lvm_memberlist): Don't assume `lv->vg->pvs != NULL' when
2311 iterating through it.
2312 (grub_lvm_open): Don't assume `vg->lvs != NULL' when iterating
2314 (grub_lvm_scan_device): Check the return value (and fail gracefully
2315 when due) on each grub_lvm_getvalue() or grub_strstr() call.
2316 Don't assume `vg->pvs != NULL' when iterating through it.
2318 2008-04-13 Robert Millan <rmh@aybabtu.com>
2320 * gendistlist.sh (EXTRA_DISTFILES): Add `genpartmaplist.sh'.
2321 * genmk.rb (partmap): New variable.
2322 (CLEANFILES, PARTMAPFILES): Add #{partmap}.
2323 (#{partmap}): New target rule.
2324 * genpartmaplist.sh: New file.
2325 * Makefile.in (pkglib_DATA): Add partmap.lst.
2326 (partmap.lst): New target rule.
2327 * util/i386/pc/grub-mkrescue.in: Generate grub.cfg that loads needed
2328 modules (including all partition maps), instead of preloading them.
2330 2007-04-13 Fabian Greffrath <fabian.greffrath@web.de>
2332 * util/grub.d/30_os-prober.in: New script. Use `os-prober' and
2333 `linux-boot-prober' (if installed) to detect other operating
2334 systems which are installed on the computer and add them to
2336 * conf/common.rmk: Build and install 30_os-prober.
2338 2008-04-12 Robert Millan <rmh@aybabtu.com>
2340 * kern/powerpc/ieee1275/init.c: Move from here ...
2341 * kern/ieee1275/init.c: ... to here. Update all users.
2343 * kern/powerpc/ieee1275/cmain.c: Move from here ...
2344 * kern/ieee1275/cmain.c: ... to here. Update all users.
2346 * kern/powerpc/ieee1275/openfw.c: Move from here ...
2347 * kern/ieee1275/openfw.c: ... to here. Update all users.
2349 * loader/powerpc/ieee1275/multiboot2.c: Move from here ...
2350 * loader/ieee1275/multiboot2.c: ... to here. Update all users.
2352 2008-04-10 Pavel Roskin <proski@gnu.org>
2354 * configure.ac: Always use "_cv_" in cache variables for
2355 compatibility with Autoconf 2.62.
2357 2008-04-07 Robert Millan <rmh@aybabtu.com>
2359 Revert grub/machine/init.h addition by Pavel (since it breaks on
2360 i386-ieee1275 and others):
2361 * util/i386/pc/misc.c: Remove grub/machine/init.h.
2362 * util/powerpc/ieee1275/misc.c: Likewise.
2364 2008-04-07 Robert Millan <rmh@aybabtu.com>
2366 * util/grub-probe.c (probe): Improve error message.
2368 2008-04-07 Robert Millan <rmh@aybabtu.com>
2370 * util/biosdisk.c (read_device_map): Skip devices that don't exist
2371 (this prevents the presence of a bogus entry from ruining the whole
2374 2008-04-06 Pavel Roskin <proski@gnu.org>
2376 * util/biosdisk.c: Include grub/util/biosdisk.h.
2377 * util/grub-fstest.c (execute_command): Make static.
2378 * util/grub-mkdevicemap.c (check_device): Likewise.
2379 * util/i386/pc/misc.c: Include grub/machine/init.h.
2380 * util/powerpc/ieee1275/misc.c: Likewise.
2381 * util/lvm.c: Include grub/util/lvm.h.
2382 * util/misc.c: Include grub/kernel.h, grub/misc.h and
2384 * util/raid.c: Include grub/util/raid.h.
2385 (grub_util_getdiskname): Make static.
2387 * util/grub-emu.c (main): Remove calls to grub_hostfs_init() and
2388 grub_hostfs_fini(), as they are called from grub_init_all() and
2389 grub_fini_all() respectively. This fixes an infinite loop in
2390 grub-fstest due to double registration of hostfs.
2391 Reported by Christian Franke <Christian.Franke@t-online.de>
2393 2008-04-05 Pavel Roskin <proski@gnu.org>
2395 * bus/pci.c (grub_pci_iterate): For multifunction devices, probe
2396 all 8 functions. Otherwise, probe function 0 only.
2398 2008-04-04 Pavel Roskin <proski@gnu.org>
2400 * commands/lspci.c (grub_lspci_iter): Print the bus number
2403 * commands/lspci.c (grub_pci_classes): Fix typos.
2404 (grub_lspci_iter): Don't print func twice. Print vendor ID
2405 before device ID, as it's normally done.
2407 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
2408 Fix signedness warnings.
2409 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate):
2411 * util/ieee1275/get_disk_name.c: Include config.h so that
2412 _GNU_SOURCE is defined and getline() is declared. Mark an
2413 unused argument as such. Fix a signedness warning.
2415 2008-04-02 Pavel Roskin <proski@gnu.org>
2417 * genkernsyms.sh.in: Use more robust assignments for CC and
2418 srcdir. Quote srcdir.
2419 * gensymlist.sh.in: Likewise. Assert at the compile time that
2420 the symbol table is not empty.
2422 * disk/raid.c (grub_raid_memberlist): Fix a signedness warning.
2423 * fs/cpio.c (grub_cpio_read): Likewise.
2425 2008-04-01 Pavel Roskin <proski@gnu.org>
2427 * disk/ata.c (grub_ata_open): Don't lose precision in disk->id.
2428 * disk/host.c (grub_host_open): Likewise.
2429 * disk/loopback.c (grub_loopback_open): Likewise.
2430 * disk/memdisk.c (grub_memdisk_open): Use a string pointer for
2431 disk->id as in disk/host.c, not a multi-character constant.
2433 * util/grub-fstest.c (cmd_cmp): Use fseeko(), not fseek(). The
2434 later is obsolete, potentially dangerous and sets a bad example.
2435 * util/i386/efi/grub-mkimage.c (make_header): Likewise.
2436 * util/misc.c (grub_util_get_image_size): Likewise.
2438 * disk/loopback.c (options): Improve help for "--partitions".
2440 * normal/arg.c (grub_arg_show_help): Fix spacing of the long
2441 options to align them with the short options, e.g. "echo -e".
2443 2008-03-31 Bean <bean123ch@gmail.com>
2445 * video/reader/png.c (grub_png_data): New member is_16bit and
2447 (grub_png_decode_image_header): Detect 16 bit png image.
2448 (grub_png_convert_image): New function to convert 16 bit image to 8 bit.
2449 (grub_png_decode_png): Call grub_png_convert_image for 16 bit image.
2450 (grub_video_reader_png): Release memory occupied by image_data.
2452 * fs/ntfs.c (find_attr): Handle non-resident attribute list larger than
2454 (grub_nfs_mount): Skip the test for sector per cluster.
2456 * include/grub/ntfs.h (MAX_SPC): Removed.
2458 2008-03-31 Bean <bean123ch@gmail.com>
2460 * conf/common.rmk (pkgdata_MODULES): Add afs.mod.
2461 (grub_probe_SOURCES): Add fs/afs.c.
2462 (grub_fstest_SOURCES): Likewise.
2463 (afs_mod_SOURCES): New variable.
2464 (afs_mod_CFLAGS): Likewise.
2465 (afs_mod_LDFLAGS): Likewise.
2467 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/afs.c.
2468 (grub_emu_SOURCES): Likewise.
2470 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
2472 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2474 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
2476 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2478 * fs/afs.c: New file.
2480 2008-03-30 Pavel Roskin <proski@gnu.org>
2482 * disk/host.c: Include grub/misc.h to fix a warning.
2483 * util/hostfs.c: Use GRUB_MOD_INIT and GRUB_MOD_FINI to fix
2484 warnings about implicit declarations.
2486 * fs/udf.c (grub_udf_mount): Fix warning about a shadowing a
2488 * include/grub/i386/loader.h: Change declaration of
2489 grub_linux_boot() to match what grub_loader_set() expects.
2490 * util/getroot.c (grub_guess_root_device): Return const char* to
2492 * util/grub-probe.c (probe): Fix a warning about uninitialized
2493 abstraction_name variable.
2494 * util/i386/get_disk_name.c (grub_util_get_disk_name): Mark
2495 second argument as unused to fix a warning.
2497 * loader/i386/pc/multiboot2.c (grub_mb2_arch_elf64_hook): Add
2498 missing grub_error() call.
2500 * util/update-grub_lib.in: Define datarootdir, since Autoconf
2501 2.60 and newer uses it to define datadir.
2503 * commands/sleep.c: Fix warning about implicit declaration.
2504 * disk/memdisk.c: Likewise.
2505 * loader/aout.c: Likewise.
2506 * loader/i386/bsd_normal.c: Likewise.
2507 * util/grub-probe.c: Likewise.
2509 * commands/i386/cpuid.c (has_longmode): Make static.
2510 * disk/i386/pc/biosdisk.c (cd_drive): Likewise.
2511 * include/grub/i386/bsd.h (bios_memmap_t): Remove, it's unused.
2513 * kern/i386/pc/startup.S (real_to_prot): Use %cs prefix to load
2514 GDT. This is more robust, as %ds can change.
2515 (grub_biosdisk_rw_int13_extensions): Don't clear %ds before
2516 calling real_to_prot().
2517 (grub_biosdisk_get_diskinfo_int13_extensions): Likewise.
2519 2008-03-28 Pavel Roskin <proski@gnu.org>
2521 * kern/i386/pc/startup.S: Assert that uncompressed functions
2522 don't spill beyond GRUB_KERNEL_MACHINE_RAW_SIZE.
2523 * kern/i386/pc/lzo1x.S: Remove all .align directives in the
2524 code, as they push parts of the code (error handlers) beyond
2525 GRUB_KERNEL_MACHINE_RAW_SIZE. Speed is not as important in this
2526 code as correctness and size.
2528 2008-03-28 Pavel Roskin <proski@gnu.org>
2530 * kern/i386/pc/startup.S
2531 (grub_biosdisk_get_diskinfo_int13_extensions): When converting
2532 data block address to the real mode, keep offset minimal. This
2533 works around a bug in AWARD BIOS on old Athlon systems, which
2534 makes CD detection hang.
2536 2008-03-26 Pavel Roskin <proski@gnu.org>
2538 * normal/color.c (grub_parse_color_name_pair): Make `name' a
2540 * include/grub/normal.h: Add grub_parse_color_name_pair()
2543 2008-03-24 Bean <bean123ch@gmail.com>
2545 * disk/i386/pc/biosdisk.c (cd_start): Removed.
2546 (cd_count): Removed.
2547 (cd_drive): New variable.
2548 (grub_biosdisk_get_drive): Don't check for (cdN) device.
2549 (grub_biosdisk_call_hook): Likewise.
2550 (grub_biosdisk_iterate): Change cdrom detection method.
2551 (grub_biosdisk_open): Replace cd_start with cd_drive.
2552 (GRUB_MOD_INIT): Use grub_biosdisk_get_cdinfo_int13_extension to
2553 detect cdrom device.
2555 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_MACHINE_CDROM_START):
2557 (GRUB_BIOSDISK_MACHINE_CDROM_END): Removed.
2558 (GRUB_BIOSDISK_CDTYPE_NO_EMUL): New macro.
2559 (GRUB_BIOSDISK_CDTYPE_1_2_M): Likewise.
2560 (GRUB_BIOSDISK_CDTYPE_1_44_M): Likewise.
2561 (GRUB_BIOSDISK_CDTYPE_2_88_M): Likewise.
2562 (GRUB_BIOSDISK_CDTYPE_HARDDISK): Likewise.
2563 (GRUB_BIOSDISK_CDTYPE_MASK): Likewise.
2564 (grub_biosdisk_cdrp): New structure.
2565 (grub_biosdisk_get_cdinfo_int13_extensions): New function.
2567 * include/grub/i386/pc/kernel.h (grub_boot_drive): Export this variable.
2569 * kern/i386/pc/init.c (make_install_device): Don't use (cdN) as root
2572 * kern/i386/pc/startup.S (grub_biosdisk_get_cdinfo_int13_extensions):
2575 2008-03-20 Robert Millan <rmh@aybabtu.com>
2577 Remove 2 TiB limit in ata.mod.
2578 * disk/ata.c (grub_ata_device): Promote `size' to grub_uint64_t.
2579 (grub_ata_dumpinfo): Print sector count with 0x%llx.
2580 (grub_ata_identify): Interpret `&info16[100]' as a pointer to
2581 grub_uint64_t instead of grub_uint32_t.
2583 2008-03-05 Bean <bean123ch@gmail.com>
2585 * loader/i386/pc/multiboot.c (grub_multiboot_get_bootdev): New function.
2586 (grub_multiboot): Set boot device.
2588 * boot/i386/pc/lnxboot.S (real_code_2): Set %dh to 0xFF.
2590 2008-03-02 Bean <bean123ch@gmail.com>
2592 * fs/reiserfs.c (grub_reiserfs_read_symlink): Add 0 at the end of
2595 2008-03-01 Yoshinori K. Okuji <okuji@enbug.org>
2597 * DISTLIST: Added docs/fdl.texi, docs/grub.texi, docs/mdate-sh and
2600 * docs/grub.texi: New file. Copied from GRUB Legacy, and slightly
2603 * docs/fdl.texi: New file.
2605 * docs/mdate-sh: New file. Copied from gnulib.
2606 * docs/texinfo.tex: Likewise.
2608 * config.guess: Updated from gnulib.
2609 * install-sh: Likewise.
2611 2008-02-28 Robert Millan <rmh@aybabtu.com>
2613 * conf/i386-linuxbios.rmk (pkglib_MODULES): Add aout.mod.
2614 (aout_mod_SOURCES): New variable.
2615 (aout_mod_CFLAGS): Likewise.
2616 (aout_mod_LDFLAGS): Likewise.
2618 * conf/i386-ieee1275.rmk: Likewise.
2620 2008-02-28 Robert Millan <rmh@aybabtu.com>
2622 * util/update-grub.in: Reorganise terminal validity check. Accept
2623 `ieee1275:console' (OLPC) and `*:gfxterm' as valid too.
2624 Based on suggestion by Franklin PIAT.
2626 2008-02-28 Fabian Greffrath <greffrath@leat.rub.de>
2628 * include/grub/util/getroot.h (grub_util_check_block_device): Export new
2630 * util/getroot.c (grub_util_check_block_device): New function that
2631 returns the given argument if it is a block device and returns NULL else.
2632 * util/grub-probe.c (argument_is_device): New variable.
2633 (probe): Promote device_name from a variable to an argument. Receive
2634 device_name from grub_util_check_block_device() if path is NULL and from
2635 grub_guess_root_device() else. Do not free() device_name anymore.
2636 (options): Introduce new parameter '-d, --device'.
2637 (main): Add description of the new parameter to the help screen.
2638 Rename path variable to argument. Set argument_is_device if the '-d'
2639 option is given. Pass argument to probe() depending on
2642 2008-02-24 Bean <bean123ch@gmail.com>
2644 * fs/iso9660.c (GRUB_ISO9660_VOLDESC_BOOT): New macro.
2645 (GRUB_ISO9660_VOLDESC_PRIMARY): Likewise.
2646 (GRUB_ISO9660_VOLDESC_SUPP): Likewise.
2647 (GRUB_ISO9660_VOLDESC_PART): Likewise.
2648 (GRUB_ISO9660_VOLDESC_END): Likewise.
2649 (grub_iso9660_primary_voldesc): New member escape.
2650 (grub_iso9660_data): New member joliet.
2651 (grub_iso9660_convert_string): New function.
2652 (grub_iso9660_mount): Detect joliet extension.
2653 (grub_iso9660_iterate_dir): Convert filename when joliet is detected.
2654 (grub_iso9660_iso9660_label): Likewise.
2656 * conf/common.rmk (pkgdata_MODULES): Add udf.mod.
2657 (grub_setup_SOURCES): Add fs/udf.c.
2658 (grub_fstest_SOURCES): Likewise.
2659 (udf_mod_SOURCES): New variable.
2660 (udf_mod_CFLAGS): Likewise.
2661 (udf_mod_LDFLAGS): Likewise.
2663 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/udf.c.
2664 (grub_emu_SOURCES): Likewise.
2666 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
2668 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2670 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
2672 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2674 * fs/udf.c: New file.
2676 2008-02-24 Robert Millan <rmh@aybabtu.com>
2678 * conf/i386-efi.rmk (normal/function.c_DEPENDENCIES)
2679 (normal/lexer.c_DEPENDENCIES): New variables.
2680 * conf/i386-ieee1275.rmk (normal/function.c_DEPENDENCIES)
2681 (normal/lexer.c_DEPENDENCIES): Likewise.
2682 * conf/i386-linuxbios.rmk (normal/function.c_DEPENDENCIES)
2683 (normal/lexer.c_DEPENDENCIES): Likewise.
2684 * conf/i386-pc.rmk (normal/function.c_DEPENDENCIES)
2685 (normal/lexer.c_DEPENDENCIES): Likewise.
2686 * conf/powerpc-ieee1275.rmk (normal/function.c_DEPENDENCIES)
2687 (normal/lexer.c_DEPENDENCIES): Likewise.
2688 * conf/sparc64-ieee1275.rmk (normal/function.c_DEPENDENCIES)
2689 (normal/lexer.c_DEPENDENCIES): Likewise.
2691 2008-02-23 Robert Millan <rmh@aybabtu.com>
2693 * partmap/gpt.c (grub_gpt_magic): Add `0x' qualifier to each member,
2694 since they were intended to be in hex. This didn't break previously
2695 because of a bug in gpt_partition_map_iterate() (see below).
2697 (gpt_partition_map_iterate): Replace `grub_memcmp' with `! grub_memcmp'
2698 when checking the validity of GPT header.
2699 Remove `partno', since it always provides the same information as `i'.
2701 2008-02-21 Yoshinori K. Okuji <okuji@enbug.org>
2703 * include/grub/efi/time.h: Fix a wrong comment.
2705 2008-02-19 Pavel Roskin <proski@gnu.org>
2707 * kern/rescue.c (grub_enter_rescue_mode): Improve initial
2710 2008-02-19 Bean <bean123ch@gmail.com>
2712 * conf/i386-pc.rmk (pkglib_MODULES): Add aout.mod _bsd.mod and bsd.mod.
2713 (aout_mod_SOURCES): New variable.
2714 (aout_mod_CFLAGS): Likewise.
2715 (aout_mod_LDFLAGS): Likewise.
2716 (_bsd_mod_SOURCES): New variable.
2717 (_bsd_mod_CFLAGS): Likewise.
2718 (_bsd_mod_LDFLAGS): Likewise.
2719 (bsd_mod_SOURCES): New variable.
2720 (bsd_mod_CFLAGS): Likewise.
2721 (bsd_mod_LDFLAGS): Likewise.
2723 * include/grub/aout.h: New file.
2725 * include/grub/i386/loader.h (grub_unix_real_boot): New function.
2727 * include/grub/i386/bsd.h: New file.
2729 * include/grub/i386/pc/init.h (grub_get_mmap_entry): Use EXPORT_FUNC
2732 * kern/elf.c (grub_elf32_load): Get the physical address after the hook
2733 function is called, so that it's possible to change it inside the hook.
2734 (grub_elf64_load): Likewise.
2735 (grub_elf_file): Don't close the file if elf header is not found.
2736 (grub_elf_close): Close the file if grub_elf_file fails (The new
2737 grub_elf_file won't close it).
2738 (grub_elf32_size): Use NESTED_FUNC_ATTR for nested function calcsize.
2739 (grub_elf64_size): Likewise.
2741 * kern/i386/loader.S (grub_unix_real_boot): New function.
2743 * loader/aout.c: New file.
2745 * loader/i386/bsd.c: New file.
2747 * loader/i386/bsd_normal.c: New file.
2749 * loader/i386/pc/multiboot.c (grub_multiboot): Handle a.out format.
2751 * loader/multiboot2.c (grub_multiboot2): Reset grub_errno so that it
2752 can test other formats.
2754 2008-02-19 Robert Millan <rmh@aybabtu.com>
2756 * partmap/gpt.c: Include `<grub/gpt_partition.h>'.
2757 (grub_gpt_partition_type_empty): Redefine with macro from
2758 `<grub/gpt_partition.h>'.
2759 (gpt_partition_map_iterate): Adjust partition type comparison.
2761 Export `entry' as partmap-specific `part.data' struct.
2762 (grub_gpt_header, grub_gpt_partentry): Move from here ...
2764 * include/grub/gpt_partition.h (grub_gpt_header)
2765 (grub_gpt_partentry): ... to here (new file).
2767 * util/i386/pc/grub-setup.c: Include `<grub/gpt_partition.h>'.
2769 (grub_gpt_partition_type_bios_boot): New const variable, defined
2770 with macro from `<grub/gpt_partition.h>'.
2772 (setup): Replace `first_start' with `embed_region', which keeps
2773 track of the embed region (and is partmap-agnostic).
2775 Replace find_first_partition_start() with find_usable_region(),
2776 which finds a usable region for embedding using partmap-specific
2777 knowledge (supports PC/MSDOS and GPT).
2779 Fix all assumptions that the embed region start at sector 1, using
2780 `embed_region.start' from now on. Similarly, use `embed_region.end'
2781 rather than `first_start' to calculate available size.
2783 In grub_util_info() message, replace "into after the MBR" with an
2784 indication of the specific sector our embed region starts at.
2786 2008-02-19 Robert Millan <rmh@aybabtu.com>
2788 * DISTLIST: Replace `commands/ieee1275/halt.c' and
2789 `commands/ieee1275/reboot.c' with `commands/halt.c' and
2790 `commands/reboot.c'.
2791 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
2792 (halt_mod_SOURCES): Likewise.
2793 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
2794 (halt_mod_SOURCES): Likewise.
2796 2008-02-17 Christian Franke <franke@computer.org>
2798 * commands/cat.c (grub_cmd_cat): Add break on GRUB_TERM_ESC key.
2800 2008-02-17 Robert Millan <rmh@aybabtu.com>
2802 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
2803 set `first_start' to 0 for non-PC/MSDOS partition maps.
2805 2008-02-16 Robert Millan <rmh@aybabtu.com>
2807 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
2808 do not assume partition map is PC/MSDOS before performing checks that
2809 are specific to that layout.
2811 2008-02-13 Robert Millan <rmh@aybabtu.com>
2813 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Remove
2814 `commands/i386/pc/halt.c' and `commands/i386/pc/reboot.c'.
2815 * kern/i386/linuxbios/init.c (grub_halt, grub_reboot): Remove stubs.
2817 2008-02-13 Yoshinori K. Okuji <okuji@enbug.org>
2819 * configure.ac: Only a cosmetic change on the handling of
2820 -fno-stack-protector.
2822 2008-02-12 Alexandre Boeglin <alex@boeglin.org>
2824 * conf/i386-efi.rmk (grub_emu_SOURCES): Replace
2825 commands/i386/pc/halt.c and reboot.c by commands/halt.c and
2827 (grub_install_SOURCES): Add halt.mod and reboot.mod.
2828 (halt_mod_SOURCES): New variable.
2829 (halt_mod_CFLAGS): Likewise.
2830 (halt_mod_LDFLAGS): Likewise.
2831 (reboot_mod_SOURCES): Likewise.
2832 (reboot_mod_CFLAGS): Likewise.
2833 (reboot_mod_LDFLAGS): Likewise.
2835 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace
2836 commands/ieee1275/halt.c and reboot.c by commands/halt.c and
2838 (halt_mod_SOURCES): Likewise.
2839 (reboot_mod_SOURCES): Likewise.
2841 * conf/i386-pc.rmk (grub_emu_SOURCES): Replace
2842 commands/i386/pc/reboot.c by commands/reboot.c.
2843 (reboot_mod_SOURCES): Likewise.
2845 * commands/i386/pc/reboot.c: merge this file ...
2847 * commands/ieee1275/reboot.c: ... and this file ...
2849 * commands/reboot.c: ... to this file.
2850 Add some precompiler directive to include the correct header for
2853 * commands/ieee1275/halt.c: move this file ...
2855 * commands/halt.c: ... to here.
2856 Add some precompiler directive to include the correct header for
2859 * include/grub/efi/efi.h (grub_reboot): New function declaration.
2860 (grub_halt): Likewise.
2862 * kern/efi/efi.c (grub_reboot): New function.
2863 (grub_halt): Likewise.
2865 2008-02-12 Robert Millan <rmh@aybabtu.com>
2867 * util/getroot.c (grub_guess_root_device): Inspect /dev/evms before
2868 /dev (like it is done for /dev/mapper). This doesn't provide support
2869 for EVMS, but at least it is now easy to identify the problem when it
2872 2008-02-11 Robert Millan <rmh@aybabtu.com>
2874 * util/biosdisk.c (grub_util_biosdisk_open, linux_find_partition)
2875 (grub_util_biosdisk_get_grub_dev): Check open() exit status by
2876 comparing it with -1, not 0.
2878 2008-02-10 Robert Millan <rmh@aybabtu.com>
2880 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `disk/raid.c' and
2882 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2883 * conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
2885 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Move `disk/raid.c' and
2886 `disk/lvm.c' to the end of the list.
2887 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
2888 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
2890 2008-02-10 Robert Millan <rmh@aybabtu.com>
2892 * kern/main.c (grub_load_normal_mode): Do not reset `grub_errno'. Call
2893 grub_print_error() instead. This will let user know why we're entering
2895 Based on suggestions from Sam Morris.
2897 2008-02-10 Alexandre Boeglin <alex@boeglin.org>
2899 * normal/arg.c (grub_arg_parse): If one of the args is "--", call add_arg()
2900 on remaining N args, instead of "--" arg N times.
2902 2008-02-09 Vesa Jaaskelainen <chaac@nic.fi>
2904 * font/manager.c (unknown_glyph): Added variable for unknown glyph.
2905 (fill_with_default_glyph): Changed to use unknown_glyph for fill
2906 pattern for unknown glyphs.
2908 2008-02-09 Robert Millan <rmh@aybabtu.com>
2910 * configure.ac: Probe for `help2man'.
2911 * Makefile.in (builddir): New variable.
2912 (HELP2MAN): Likewise. Set to `true' when @HELP2MAN@ doesn't provide it,
2913 or otherwise add a few flags/options to it.
2914 (install-local): For every executable utility or script that is
2915 installed, invoke $(HELP2MAN) to install a manpage based on --help
2918 * util/i386/pc/grub-install.in: Move down `update-grub_lib' sourcing, so
2919 that it doesn't prevent --help from working in build tree.
2921 * util/i386/pc/grub-mkrescue.in (usage): Replace `grub-devel@gnu.org'
2922 with `bug-grub@gnu.org'.
2923 * util/powerpc/ieee1275/grub-mkrescue.in (usage): Likewise.
2924 * util/update-grub.in (usage): New function.
2925 Implement proper argument check, with support for --help and --version
2926 (as well as existing -y).
2928 2008-02-09 Christian Franke <franke@computer.org>
2930 * commands/cat.c (grub_cmd_cat): Print '\r' as hex to
2931 avoid overwriting previous output.
2932 * kern/rescue.c (grub_rescue_cmd_cat): Likewise.
2934 2008-02-09 Robert Millan <rmh@aybabtu.com>
2936 * normal/menu.c (run_menu): If timeout is set to zero, don't bother
2939 2008-02-09 Robert Millan <rmh@aybabtu.com>
2941 * commands/sleep.c: New file.
2942 * conf/common.rmk (pkglib_MODULES): Add `commands/sleep.c'.
2943 (sleep_mod_SOURCES): New variable.
2944 (sleep_mod_CFLAGS): Likewise.
2945 (sleep_mod_LDFLAGS): Likewise.
2947 2008-02-09 Robert Millan <rmh@aybabtu.com>
2949 * disk/raid.c (grub_raid_scan_device): Add a pair of sanity checks for
2950 situations in which we can deduce the RAID size and the superblock
2953 2008-02-09 Robert Millan <rmh@aybabtu.com>
2955 * disk/lvm.c [GRUB_UTIL] (grub_lvm_memberlist): New function. Construct
2956 and return a grub_diskmemberlist_t composed of LVM physical volumes.
2957 [GRUB_UTIL] (grub_lvm_dev): Add `memberlist' member.
2959 * disk/raid.c [GRUB_UTIL] (grub_raid_memberlist): New function. Construct
2960 and return a grub_diskmemberlist_t composed of physical array members.
2961 [GRUB_UTIL] (grub_raid_dev): Add `memberlist' member.
2963 * include/grub/disk.h [GRUB_UTIL] (grub_disk_memberlist): New struct
2965 [GRUB_UTIL] (struct grub_disk_dev): Add `memberlist' function pointer.
2966 [GRUB_UTIL] (struct grub_disk_memberlist): New struct declaration.
2967 [GRUB_UTIL] (grub_disk_memberlist_t): New typedef.
2969 * util/grub-probe.c (probe): Move partmap probing code from here ...
2970 (probe_partmap): ... to here.
2971 (probe): Use probe_partmap() once for the disk we're probing, and
2972 additionally, when such disk contains a memberlist() struct member,
2973 once for each disk that is contained in the structure returned by
2976 2008-02-09 Robert Millan <rmh@aybabtu.com>
2978 * util/grub-probe.c (main): When `verbosity > 1', set `debug'
2979 environment variable to 'all' in order to obtain debug output from
2981 * util/i386/pc/grub-setup.c (main): Likewise.
2983 2008-02-08 Robert Millan <rmh@aybabtu.com>
2985 * disk/raid.c (grub_raid_scan_device): Check for
2986 `array->device[sb.this_disk.number]' rather than for
2987 `array->device[sb.this_disk.number]->name', since the latter is not
2988 guaranteed to be accessible.
2990 2008-02-08 Robert Millan <rmh@aybabtu.com>
2992 * disk/raid.c: Update copyright.
2993 * fs/cpio.c: Likewise.
2994 * include/grub/raid.h: Likewise.
2995 * loader/i386/pc/multiboot.c: Likewise.
2996 * util/hostfs.c: Likewise.
2998 2008-02-08 Robert Millan <rmh@aybabtu.com>
3000 * include/grub/raid.h (struct grub_raid_array): Change type of `device'
3001 to a grub_disk_t array.
3002 * disk/raid.c (grub_raid_read): Replace `device[x].disk' accesses with
3004 (grub_raid_scan_device): Replace `device[x].name' accesses with
3005 `device[x]->name'. Simplify initialization of `array->device[x]'.
3007 2008-02-08 Robert Millan <rmh@aybabtu.com>
3009 * disk/raid.c (grub_raid_open, grub_raid_scan_device): Add a few
3010 grub_dprintf() calls.
3011 * kern/disk.c (grub_disk_read): Include grub_errmsg in out of range
3014 2008-02-07 Christian Franke <franke@computer.org>
3016 * util/hostfs.c (grub_hostfs_open): Use fseeko and ftello
3017 instead of fseek and ftell to support large files.
3018 (grub_hostfs_read): Likewise.
3020 2008-02-07 Robert Millan <rmh@aybabtu.com>
3022 Patch from Jeroen Dekkers.
3023 * disk/raid.c (grub_raid_scan_device): Reset `grub_errno' on disk
3024 failure, since successfully reading all array members might not be
3027 2008-02-06 Robert Millan <rmh@aybabtu.com>
3029 * util/grub-probe.c (probe): Simplify partmap probing (with the
3030 assumption that the first word up to the underscore equals to
3033 2008-02-06 Christian Franke <franke@computer.org>
3035 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_NONE
3036 (and set *ofs = 0) instead of GRUB_ERR_FILE_NOT_FOUND on
3037 last block of a cpio or tar stream.
3038 Check for "TRAILER!!!" instead of any empty data
3039 block to detect last block of a cpio stream.
3040 (grub_cpio_dir): Fix constness of variable np.
3041 (grub_cpio_open): Return GRUB_ERR_FILE_NOT_FOUND if
3042 cpio or tar trailer is detected. This fixes a crash
3043 on open of a non existing file.
3045 2008-02-05 Bean <bean123ch@gmail.com>
3047 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Get physical
3049 (grub_multiboot_load_elf64): Likewise.
3050 (grub_multiboot): Initialize mbi structure.
3052 * util/grub-fstest.c: Don't include unused header file script.h.
3054 * conf/common.rmk (grub-fstest.c_DEPENDENCIES): Move to the beginning
3056 (grub_fstest_SOURCES): Likewise.
3058 2008-02-05 Robert Millan <rmh@aybabtu.com>
3060 * include/grub/term.h (GRUB_TERM_LEFT, GRUB_TERM_RIGHT)
3061 (GRUB_TERM_UP, GRUB_TERM_DOWN, GRUB_TERM_HOME, GRUB_TERM_END)
3062 (GRUB_TERM_DC, GRUB_TERM_PPAGE, GRUB_TERM_NPAGE, GRUB_TERM_ESC)
3063 (GRUB_TERM_TAB, GRUB_TERM_BACKSPACE): New macros.
3065 * kern/i386/pc/startup.S: Include `<grub/term.h>'.
3066 (translation_table): Replace hardcoded values with macros
3067 provided by `<grub/term.h>'.
3069 * term/i386/pc/at_keyboard.c: Include `<grub/term.h>'.
3070 (keyboard_map): Correct/add a few values, with macros provided
3072 (keyboard_map_shift): Zero values that don't differ from their
3073 `keyboard_map' equivalents.
3074 (grub_console_checkkey): Optimize KEYBOARD_STATUS_CAPS_LOCK toggling.
3075 Discard the second scan code that is always sent by Caps lock.
3076 Only use `keyboard_map_shift' when it provides a non-zero value,
3077 otherwise fallback to `keyboard_map'.
3079 2008-02-04 Bean <bean123ch@gmail.com>
3081 * Makefile.in (enable_grub_fstest): New variable.
3083 * conf/common.rmk (grub_fstest_init.lst): New rule.
3084 (grub_fstest_init.h): Likewise.
3085 (grub_fstest_init.c): Likewise.
3086 (util/grub-fstest.c_DEPENDENCIES): New variable.
3087 (grub_fstest_SOURCES): Likewise.
3089 * configure.ac (enable_grub_fstest): Check for --enable-grub-fstest.
3091 * util/grub-fstest.c: New file.
3093 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
3095 Make grub-setup handle a separate root device.
3097 * util/i386/pc/grub-setup.c (setup): Always open the root device,
3098 so that the root device can be compared with the destination
3100 When embedding the core image, if the root and destination devices
3101 are different, set ROOT_DRIVE to ROOT_DEV->DISK->ID. Otherwise, to
3103 When not embedding, set ROOT_DRIVE to 0xFF.
3105 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
3107 Add support for having a grub directory in a different drive. This
3108 is still only the data handling part.
3110 * kern/i386/pc/startup.S (multiboot_trampoline): Set %dh to 0xFF.
3111 (codestart): Save %dh in GRUB_ROOT_DRIVE.
3112 (grub_root_drive): New variable.
3114 * kern/i386/pc/init.c (make_install_device): Use GRUB_ROOT_DRIVE
3115 instead of GRUB_BOOT_DRIVE to construct a device name. Set
3116 GRUB_ROOT_DRIVE to GRUB_BOOT_DRIVE if it is 0xFF, otherwise use it
3119 * include/grub/i386/pc/kernel.h (grub_root_drive): New prototype.
3121 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_ROOT_DRIVE): New
3123 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Set to 0x4f.
3125 * boot/i386/pc/pxeboot.S (_start): Set %dh to 0xFF. For now, this
3126 is bogus, because PXE booting does not specify any drive
3129 * boot/i386/pc/lnxboot.S (reg_edx): Set the second byte to 0xFF. I
3130 am not sure if this is really correct.
3132 * boot/i386/pc/cdboot.S: Set %dh to 0xFF, because the root drive
3133 is always identical to the boot drive when booting from a CD.
3135 * boot/i386/pc/boot.S (MOV_MEM_TO_AL): Removed. Not needed any
3137 (root_drive): New variable.
3138 (real_start): Unconditionally set %dh to ROOT_DRIVE.
3139 (setup_sectors): Push %dx right after popping it, because %dh will
3141 (copy_buffer): Restore %dx.
3143 2008-02-03 Robert Millan <rmh@aybabtu.com>
3145 * util/i386/pc/grub-mkrescue.in: Rewrite most of image generation to
3146 use `cdboot.img' for cdrom images.
3148 2008-02-03 Robert Millan <rmh@aybabtu.com>
3150 * util/grub.d/00_header.in: Issue scripting commands for GRUB to
3151 only setup gfxterm when `font' command has succeeded.
3153 2008-02-03 Robert Millan <rmh@aybabtu.com>
3155 * loader/multiboot_loader.c [GRUB_MACHINE_LINUXBIOS]
3156 (grub_rescue_cmd_multiboot_loader)
3157 (grub_rescue_cmd_module_loader): Enable multiboot1 calls.
3159 2008-02-03 Pavel Roskin <proski@gnu.org>
3161 * kern/i386/pc/startup.S (grub_chainloader_real_boot): Pop
3162 %edx and %esi from stack only after grub_gate_a20() is called.
3163 grub_gate_a20() clobbers %edx.
3165 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
3167 * configure.ac (AC_INIT): Bumped to 1.96.
3169 * DISTLIST: Added boot/i386/pc/cdboot.S, bus/pci.c,
3170 commands/lspci.c,disk/memdisk.c, include/grub/pci.h,
3171 include/grub/i386/pc/pci.h, video/readers/jpeg.c, and
3172 video/readers/png.c.
3174 2008-02-03 Bean <bean123ch@gmail.com>
3176 * conf/i386-pc.rmk (pkglib_IMAGES): Add cdboot.img.
3177 (cdboot_img_SOURCES): New variable.
3178 (cdboot_img_ASFLAGS): New variable.
3179 (cdboot_img_LDFLAGS): New variable.
3181 * boot/i386/pc/cdboot.S: New file.
3183 * disk/i386/pc/biosdisk.c (cd_start): New variable.
3184 (cd_count): Likewise.
3185 (grub_biosdisk_get_drive): Add support for cd device.
3186 (grub_biosdisk_call_hook): Likewise.
3187 (grub_biosdisk_iterate): Likewise.
3188 (grub_biosdisk_open): Likewise.
3189 (GRUB_BIOSDISK_CDROM_RETRY_COUNT): New macro.
3190 (grub_biosdisk_rw): Support reading from cd device.
3191 (GRUB_MOD_INIT): Iterate cd devices.
3193 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_FLAG_CDROM): New macro.
3194 (GRUB_BIOSDISK_MACHINE_CDROM_START): Likewise.
3195 (GRUB_BIOSDISK_MACHINE_CDROM_END): Likewise.
3197 * kern/i386/pc/init.c (make_install_device): Check for cd device.
3199 2008-02-02 Robert Millan <rmh@aybabtu.com>
3201 * commands/read.c: New file.
3202 * conf/common.rmk (pkglib_MODULES): Add `commands/read.c'.
3203 (read_mod_SOURCES): New variable.
3204 (read_mod_CFLAGS): Likewise.
3205 (read_mod_LDFLAGS): Likewise.
3207 2008-02-02 Robert Millan <rmh@aybabtu.com>
3209 * normal/main.c (grub_normal_execute): Check for `menu->size' when
3210 determining whether menu has to be displayed.
3212 2008-02-02 Marco Gerards <marco@gnu.org>
3214 * bus/pci.c: New file.
3216 * include/grub/pci.h: Likewise.
3218 * include/grub/i386/pc/pci.h: Likewise.
3220 * commands/lspci.c: Likewise.
3222 * conf/i386-pc.rmk (pkglib_MODULES): Add `pci.mod' and
3224 (pci_mod_SOURCES): New variable.
3225 (pci_mod_CFLAGS): Likewise.
3226 (pci_mod_LDFLAGS): Likewise.
3227 (lspci_mod_SOURCES): Likewise.
3228 (lspci_mod_CFLAGS): Likewise.
3229 (lspci_mod_LDFLAGS): Likewise.
3231 2008-02-02 Bean <bean123ch@gmail.com>
3233 * fs/ufs.c (INODE_BLKSZ): Fix incorrect value.
3234 (grub_ufs_get_file_block): Fix indirect block calculation problem.
3236 * fs/xfs.c (grub_xfs_sblock): New member log2_dirblk.
3237 (grub_xfs_btree_node): New structure.
3238 (grub_xfs_btree_root): New structure.
3239 (grub_xfs_inode): New members nblocks, extsize, nextents and btree.
3240 (GRUB_XFS_EXTENT_OFFSET): Use exts instead of inode->data.extents.
3241 (GRUB_XFS_EXTENT_BLOCK): Likewise.
3242 (GRUB_XFS_EXTENT_SIZE): Likewise.
3243 (grub_xfs_read_block): Support btree format type.
3244 (grub_xfs_iterate_dir): Use NESTED_FUNC_ATTR in call_hook.
3245 Use directory block as basic unit.
3247 * fs/fshelp.c (grub_fshelp_read_file): Bug fix for sparse block.
3249 * aclocal.m4 (grub_i386_CHECK_REGPARM_BUG): Define NESTED_FUNC_ATTR as
3250 __attribute__ ((__regparm__ (1))).
3252 2008-02-01 Robert Millan <rmh@aybabtu.com>
3254 Correct a mistake in previous commit.
3256 * conf/i386-pc.rmk (normal/execute.c_DEPENDENCIES): Move to the
3258 (normal/command.c_DEPENDENCIES): New variable.
3260 2008-02-01 Robert Millan <rmh@aybabtu.com>
3262 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Move to the
3264 (normal/command.c_DEPENDENCIES): New variable.
3265 (grub-emu_DEPENDENCIES, normal_mod_DEPENDENCIES): Remove variables.
3266 * conf/i386-ieee1275.rmk: Likewise.
3267 * conf/i386-linuxbios.rmk: Likewise.
3268 * conf/i386-pc.rmk: Likewise.
3269 * conf/sparc64-ieee1275.rmk: Likewise.
3270 * conf/powerpc-ieee1275.rmk: Likewise.
3271 (grub_emu_SOURCES): Add `fs/fshelp.c'.
3273 * genmk.rb: Add `$(#{src}_DEPENDENCIES)' in targets that require it.
3275 2008-02-01 Robert Millan <rmh@aybabtu.com>
3277 * kern/disk.c (grub_disk_read, grub_disk_write): Add grub_dprintf()
3278 call at beginning of function.
3280 2008-01-31 Pavel Roskin <proski@gnu.org>
3282 * util/powerpc/ieee1275/grub-mkrescue.in: New file.
3283 * conf/powerpc-ieee1275.rmk (bin_SCRIPTS): New variable.
3284 (grub_mkrescue_SOURCES): Likewise.
3285 * DISTLIST: Add util/powerpc/ieee1275/grub-mkrescue.in.
3287 2008-01-30 Robert Millan <rmh@aybabtu.com>
3289 * conf/i386-pc.rmk (sbin_UTILITIES): Remove `grub-probe'.
3290 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Moved from here ...
3291 * conf/common.rmk (util/grub-probe.c_DEPENDENCIES)
3292 (grub_probe_SOURCES): ... to here.
3294 * conf/i386-efi.rmk (sbin_UTILITIES): Remove `grub-probe'.
3295 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Remove.
3296 * conf/i386-ieee1275.rmk: Likewise.
3297 * conf/i386-linuxbios.rmk: Likewise.
3298 * conf/powerpc-ieee1275.rmk: Likewise.
3300 2008-01-30 Tristan Gingold <gingold@free.fr>
3302 * kern/rescue.c: Silently accept empty lines.
3304 2008-01-29 Bean <bean123ch@gmail.com>
3306 * boot/i386/pc/lnxboot.S (data_start): Code cleanup.
3307 (real_code_2): Code cleanup and change comment style.
3308 (move_memory): Avoid using 32-bit address mode.
3310 2008-01-29 Bean <bean123ch@gmail.com>
3312 * conf/i386-pc.rmk (pkglib_MODULES): Add `png.mod'.
3313 (png_mod_SOURCES): New variable.
3314 (png_mod_CFLAGS): Likewise.
3315 (png_mod_LDFLAGS): Likewise.
3317 * video/readers/png.c: New file.
3319 2008-01-28 Robert Millan <rmh@aybabtu.com>
3321 * include/grub/i386/linuxbios/kernel.h (GRUB_MOD_GAP): New macro.
3322 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Remove
3323 `ifndef GRUB_MOD_GAP' hack.
3324 * util/elf/grub-mkimage.c (add_segments): Likewise.
3326 2008-01-27 Robert Millan <rmh@aybabtu.com>
3328 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Skip
3329 `GRUB_MOD_GAP' for platforms in which it's not defined.
3330 * util/elf/grub-mkimage.c (add_segments): Likewise.
3332 2008-01-27 Robert Millan <rmh@aybabtu.com>
3334 Get grub-emu to build again (including parallel builds).
3336 * conf/i386-pc.rmk (util/grub-emu.c_DEPENDENCIES): Remove variable.
3338 (util/grub-emu.c_DEPENDENCIES): ... this, ...
3339 (normal/execute.c_DEPENDENCIES): ... this, ...
3340 (grub-emu_DEPENDENCIES): ... and this.
3342 * conf/i386-efi.rmk: Likewise.
3343 * conf/i386-linuxbios.rmk: Likewise.
3344 * conf/i386-ieee1275.rmk: Likewise.
3345 * conf/powerpc-ieee1275.rmk: Likewise.
3346 (grub_emu_SOURCES): Remove duplicated `kern/file.c'.
3348 2008-01-27 Robert Millan <rmh@aybabtu.com>
3350 * NEWS: Add a few items.
3352 2008-01-27 Robert Millan <rmh@aybabtu.com>
3354 Fix parallel builds with grub-emu. Based on earlier commit for
3355 grub-probe and grub-setup.
3357 * conf/i386-pc.rmk (grub-emu_DEPENDENCIES): Renamed to ...
3358 (util/grub-emu.c_DEPENDENCIES): ... this.
3359 * conf/i386-efi.rmk (grub-emu_DEPENDENCIES): Renamed to ...
3360 (util/grub-emu.c_DEPENDENCIES): ... this.
3361 * conf/i386-linuxbios.rmk (grub-emu_DEPENDENCIES): Renamed to ...
3362 (util/grub-emu.c_DEPENDENCIES): ... this.
3363 * conf/i386-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
3364 (util/grub-emu.c_DEPENDENCIES): ... this.
3365 * conf/powerpc-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
3366 (util/grub-emu.c_DEPENDENCIES): ... this.
3368 2008-01-27 Pavel Roskin <proski@gnu.org>
3370 * include/grub/powerpc/ieee1275/kernel.h: Introduce GRUB_MOD_GAP
3371 to create a gap between _end and the modules added to the image
3372 with grub-mkrescue. That fixes "CLAIM failed" on PowerMAC.
3373 * kern/powerpc/ieee1275/init.c: Use GRUB_MOD_GAP.
3374 * util/elf/grub-mkimage.c (add_segments): Likewise.
3376 2008-01-26 Pavel Roskin <proski@gnu.org>
3378 * kern/dl.c (grub_dl_load): Don't abort if prefix is not set,
3379 just return an error.
3381 2008-01-26 Bean <bean123ch@gmail.com>
3383 * fs/reiserfs.c (grub_fshelp_node): New member next_offset.
3384 (grub_reiserfs_get_item): Save offset of the next item.
3385 (grub_reiserfs_iterate_dir): Use next_offset to find next item.
3387 2008-01-25 Robert Millan <rmh@aybabtu.com>
3389 * conf/i386-pc.rmk (grub_setup_SOURCES, grub_emu_SOURCES): Regroup to
3390 make all filesystem sources appear together (possibly fixing omissions
3392 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
3393 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3394 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
3395 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3397 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise. Additionally,
3399 * conf/i386-efi.rmk (grub_probe_SOURCES): Likewise.
3400 * conf/i386-ieee1275.rmk (grub_probe_SOURCES): Likewise.
3401 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Likewise.
3402 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Likewise.
3404 * util/grub-probe.c: Include `<grub/file.h>' and `<sys/stat.h>'.
3405 (probe): Add a sanity check to make sure of our ability to read
3406 requested files when probing for filesystem type.
3408 * genmk.rb: Update copyright year (2007).
3410 * include/grub/fs.h (grub_fat_init, grub_fat_fini, grub_ext2_init)
3411 (grub_ext2_fini, grub_ufs_init, grub_ufs_fini, grub_minix_init)
3412 (grub_minix_fini, grub_hfs_init, grub_hfs_fini, grub_jfs_init)
3413 (grub_jfs_fini, grub_xfs_init, grub_xfs_fini, grub_affs_init)
3414 (grub_affs_fini, grub_sfs_init, grub_sfs_fini, grub_iso9660_init)
3415 : Remove function prototypes.
3417 2008-01-25 Robert Millan <rmh@aybabtu.com>
3419 Revert my previous commits (based on wrong assumption of how grub_errno
3422 * kern/disk.c (grub_disk_open): Stop resetting grub_errno.
3423 * kern/file.c (grub_file_open): Likewise.
3425 2008-01-24 Pavel Roskin <proski@gnu.org>
3427 * include/grub/ieee1275/ieee1275.h: Introduce flag for firmwares
3428 that hang if GRUB tries to setup colors.
3429 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Don't set
3430 colors for firmwares that don't support it.
3431 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag):
3432 Recognize Open Hack'Ware, set flags to work around its
3435 2008-01-24 Robert Millan <rmh@aybabtu.com>
3437 * kern/file.c (grub_file_open): Do not account previous failures of
3438 unrelated functions when grub_errno is checked for.
3439 Reported by Oleg Strikov.
3441 2008-01-24 Bean <bean123ch@gmail.com>
3443 * fs/ufs.c (GRUB_UFS_VOLNAME_LEN): New macro.
3444 (grub_ufs_sblock): New member volume name.
3445 (grub_ufs_find_file): Fix string copy bug.
3446 (grub_ufs_label): Implement this function properly.
3448 * fs/hfs.c (grub_hfs_cnid_type): New enum.
3449 (grub_hfs_iterate_records): Use the correct file number for extents
3450 and catalog file. Fix problem in next index calculation.
3451 (grub_hfs_find_node): Replace recursive function call with loop.
3452 (grub_hfs_iterate_dir): Replace recursive function call with loop.
3454 2008-01-23 Robert Millan <rmh@aybabtu.com>
3456 * include/grub/i386/ieee1275/loader.h: Include `<grub/types.h>',
3457 `<grub/symbol.h>' and `<grub/multiboot.h>'.
3458 (grub_multiboot2_real_boot): New function prototype.
3460 * include/grub/i386/pc/memory.h: Include `<grub/machine/machine.h>'.
3461 [!GRUB_MACHINE_IEEE1275] (grub_lower_mem, grub_upper_mem): Disable.
3463 * kern/i386/ieee1275/init.c (grub_os_area_addr)
3464 (grub_os_area_size, grub_lower_mem, grub_upper_mem): Remove variables.
3466 2008-01-23 Robert Millan <rmh@aybabtu.com>
3468 * kern/mm.c (grub_mm_init_region): Replace grub_dprintf() call with
3469 #ifdef'ed out grub_printf().
3471 2008-01-23 Robert Millan <rmh@aybabtu.com>
3473 * term/i386/pc/at_keyboard.c (grub_keyboard_isr): #ifdef out
3474 grub_dprintf calls, since they make "debug=all" mode unusable.
3475 (grub_console_checkkey): Likewise.
3477 2008-01-23 Robert Millan <rmh@aybabtu.com>
3479 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
3480 `term/i386/pc/at_keyboard.c'.
3481 (pkglib_MODULES): Add `serial.mod'.
3482 (serial_mod_SOURCES): New variable.
3483 (serial_mod_CFLAGS): Likewise.
3484 (serial_mod_LDFLAGS): Likewise.
3486 * include/grub/i386/ieee1275/console.h: Add `<grub/symbol.h>'. Remove
3487 `<grub/powerpc/ieee1275/console.h>'.
3488 (grub_keyboard_controller_init): New function prototype.
3489 (grub_console_checkkey): Likewise.
3490 (grub_console_getkey): Likewise.
3492 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize AT
3495 * term/ieee1275/ofconsole.c (grub_ofconsole_term): On i386, use
3496 grub_ofconsole_checkkey() and grub_ofconsole_getkey() for input.
3498 2008-01-23 Robert Millan <rmh@aybabtu.com>
3500 * kern/i386/pc/init.c (make_install_device): When memdisk image is
3501 present, "(memdisk)/boot/grub" becomes the default prefix.
3503 * util/i386/pc/grub-mkrescue.in: Switch to a minimal core.img plus
3504 a memdisk tarball with all the modules. Add --overlay=DIR option that
3505 allows users to overlay additional files into the image.
3507 2008-01-23 Robert Millan <rmh@aybabtu.com>
3509 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add `machine/loader.h'
3510 and `machine/memory.h'.
3511 (pkglib_MODULES): Add `multiboot.mod' and `_multiboot.mod'.
3512 (_multiboot_mod_SOURCES): New variable.
3513 (_multiboot_mod_CFLAGS): Likewise.
3514 (_multiboot_mod_LDFLAGS): Likewise.
3515 (multiboot_mod_SOURCES): Likewise.
3516 (multiboot_mod_CFLAGS): Likewise.
3517 (multiboot_mod_LDFLAGS): Likewise.
3519 * include/grub/i386/ieee1275/loader.h: New file.
3521 * include/grub/i386/ieee1275/machine.h: Likewise.
3523 * include/grub/i386/ieee1275/memory.h: Likewise.
3525 * include/grub/i386/pc/init.h (grub_os_area_addr): Remove (redundant)
3526 variable declaration.
3527 (grub_os_area_size): Likewise.
3529 * kern/i386/ieee1275/init.c (grub_os_area_addr, grub_os_area_size)
3530 (grub_lower_mem, grub_upper_mem): New variables.
3531 (grub_stop_floppy): New function (just to make
3532 grub_multiboot2_real_boot() happy).
3534 * kern/i386/ieee1275/startup.S: Include `<grub/machine/memory.h>',
3535 `<grub/cpu/linux.h>', `<multiboot.h>' and `<multiboot2.h>'.
3536 (grub_stop): New function.
3537 Include `"../realmode.S"' and `"../loader.S"'.
3539 * loader/multiboot_loader.c: Include `<grub/machine/machine.h>'.
3540 Replace `__i386__' #ifdefs with `GRUB_MACHINE_PCBIOS'.
3542 * loader/powerpc/ieee1275/multiboot2.c (grub_mb2_arch_boot): On i386,
3543 rely on grub_multiboot2_real_boot() for final boot.
3545 2008-01-22 Robert Millan <rmh@aybabtu.com>
3547 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): When
3548 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag is set, skip any
3549 device that doesn't look like an SD card.
3550 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
3551 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag.
3552 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag): Detect
3553 OLPC laptop, and set `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' when
3556 2008-01-22 Robert Millan <rmh@aybabtu.com>
3558 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Add sanity check to
3559 avoid claiming over our own code.
3561 2008-01-22 Bean <bean123ch@gmail.com>
3563 * conf/i386-pc.rmk (pkglib_MODULES): Add `jpeg.mod'.
3564 (jpeg_mod_SOURCES): New variable.
3565 (jpeg_mod_CFLAGS): Likewise.
3566 (jpeg_mod_LDFLAGS): Likewise.
3568 * video/readers/jpeg.c : New file.
3570 2008-01-22 Bean <bean123ch@gmail.com>
3572 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_FILE_NOT_FOUND when
3573 there are no more items.
3575 2008-01-21 Robert Millan <rmh@aybabtu.com>
3577 * kern/mm.c (grub_mm_init_region): Improve debug message.
3579 2008-01-21 Robert Millan <rmh@aybabtu.com>
3581 * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): New variable.
3582 (kernel_img_LDFLAGS): Use `GRUB_MEMORY_MACHINE_LINK_ADDR' as link
3584 (grub_mkimage_CFLAGS): Propagate `GRUB_MEMORY_MACHINE_LINK_ADDR' as
3586 * include/grub/i386/pc/memory.h (GRUB_MEMORY_MACHINE_UPPER): New macro.
3587 Indicates start of upper memory.
3588 * util/i386/pc/grub-mkimage.c: Include `<grub/machine/memory.h>'.
3589 (generate_image): Abort when image size is big enough to corrupt
3592 * include/grub/i386/pc/vga.h: Include `<grub/machine/memory.h>'.
3593 (GRUB_MEMORY_MACHINE_VGA_ADDR): Alias for `GRUB_MEMORY_MACHINE_UPPER'.
3594 * term/i386/pc/vga.c (VGA_MEM): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
3595 instead of hardcoding 0xA0000.
3596 * video/i386/pc/vbe.c: Include `<grub/machine/vga.h>'.
3597 (grub_vbe_set_video_mode): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
3598 instead of hardcoding 0xA0000.
3600 2008-01-21 Robert Millan <rmh@aybabtu.com>
3602 * disk/memdisk.c (memdisk_size): New variable.
3603 (grub_memdisk_open): Replace grub_arch_memdisk_size() call with
3605 (grub_memdisk_init): Initialize `memdisk_size'. Reallocate memdisk
3606 image to dynamic memory.
3607 (grub_memdisk_fini): Replace grub_arch_memdisk_size() call with
3608 `memdisk_size'. Free memdisk block.
3610 2008-01-21 Robert Millan <rmh@aybabtu.com>
3612 Fix detection of very small filesystems (like tar).
3614 * fs/reiserfs.c (grub_reiserfs_mount): When disk is too small to
3615 contain a ReiserFS, abort with GRUB_ERR_BAD_FS rather than
3616 GRUB_ERR_OUT_OF_RANGE (which made the upper layer think there's
3617 a problem with this disk).
3619 2008-01-21 Robert Millan <rmh@aybabtu.com>
3621 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Add debug message
3622 on grub_biosdisk_rw_standard() error.
3624 2008-01-21 Robert Millan <rmh@aybabtu.com>
3626 * include/grub/ieee1275/ieee1275.h: Add 2008 to Copyright line for
3628 * kern/elf.c: Likewise.
3629 * kern/ieee1275/ieee1275.c: Likewise.
3630 * kern/powerpc/ieee1275/openfw.c: Likewise.
3631 * term/ieee1275/ofconsole.c: Likewise.
3633 2008-01-21 Robert Millan <rmh@aybabtu.com>
3635 * include/grub/i386/pc/kernel.h: Include `<grub/symbol.h>'.
3637 * include/grub/kernel.h (grub_arch_memdisk_addr)
3638 (grub_arch_memdisk_size): Moved from here ...
3640 * include/grub/i386/pc/kernel.h (grub_arch_memdisk_addr)
3641 (grub_arch_memdisk_size): ... to here.
3643 2008-01-21 Robert Millan <rmh@aybabtu.com>
3645 Mostly based on bugfix from Bean.
3647 * kern/elf.c (grub_elf32_phdr_iterate): Use `NESTED_FUNC_ATTR'
3648 attribute with hook() parameter.
3649 (grub_elf32_load): Use `NESTED_FUNC_ATTR' with grub_elf32_load_segment()
3651 (grub_elf64_phdr_iterate): Use `NESTED_FUNC_ATTR'
3652 attribute with hook() parameter.
3653 (grub_elf64_load): Use `NESTED_FUNC_ATTR' with grub_elf64_load_segment()
3656 2008-01-21 Robert Millan <rmh@aybabtu.com>
3658 * conf/i386-pc.rmk (kernel_img_HEADERS): Add `machine/kernel.h'.
3659 (pkglib_MODULES): Add `memdisk.mod'.
3660 (memdisk_mod_SOURCES): New variable.
3661 (memdisk_mod_CFLAGS): Likewise.
3662 (memdisk_mod_LDFLAGS): Likewise.
3664 * disk/memdisk.c: New file.
3666 * include/grub/disk.h (grub_disk_dev_id): Add
3667 `GRUB_DISK_DEVICE_MEMDISK_ID'.
3669 * include/grub/i386/pc/kernel.h
3670 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): New macro.
3671 (GRUB_KERNEL_MACHINE_PREFIX): Increment by 4.
3672 (grub_kernel_image_size): New variable declaration.
3673 (grub_total_module_size): Likewise.
3674 (grub_memdisk_image_size): Likewise.
3676 * include/grub/i386/pc/memory.h
3677 (GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR): New macro.
3679 * include/grub/kernel.h: Include `<grub/symbol.h>'.
3680 (grub_arch_memdisk_addr): New variable declaration.
3681 (grub_arch_memdisk_size): Likewise.
3683 * kern/i386/pc/init.c (grub_arch_memdisk_addr): New function.
3684 (grub_arch_memdisk_size): Likewise.
3686 * kern/i386/pc/startup.S (grub_memdisk_image_size): New variable.
3687 (codestart): Replace hardcoded `0x100000' with
3688 `GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR' macro.
3690 * util/i386/pc/grub-mkimage.c: Include `<grub/misc.h>'.
3691 (generate_image): Add `memdisk_path' parameter. When `memdisk_path' is
3692 not NULL, append the contents of the file it refers to, at the end of
3693 the compressed kernel image. Initialize `grub_memdisk_image_size'
3694 variable (at `GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE' offset).
3695 (options): Add "memdisk"|'m' option.
3696 (main): Parse --memdisk|-m option, and pass user-provided path as
3697 parameter to generate_image().
3699 2008-01-20 Robert Millan <rmh@aybabtu.com>
3701 * kern/sparc64/ieee1275/openfw.c (grub_devalias_iterate): Copy debug
3702 grub_dprintf() calls from here ...
3703 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): ... to here.
3705 2008-01-20 Robert Millan <rmh@aybabtu.com>
3707 Fix detection of "real mode" when /options/real-mode? doesn't exist.
3709 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_mmu): New variable
3711 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_mmu): New variable.
3712 (grub_ieee1275_find_options): If `grub_ieee1275_mmu' is 0, set
3713 `GRUB_IEEE1275_FLAG_REAL_MODE'.
3714 (cmain): Initialize `grub_ieee1275_mmu' (using /chosen/mmu integer
3716 * kern/powerpc/ieee1275/openfw.c (grub_map): Rely on pre-initialized
3717 `grub_ieee1275_mmu' rather than obtaining a handler on every call.
3719 2008-01-19 Robert Millan <rmh@aybabtu.com>
3721 Get rid of confusing function (superseded by
3722 `grub_ieee1275_get_integer_property')
3723 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_decode_int_4): Remove
3725 * kern/ieee1275/ieee1275.c (grub_ieee1275_decode_int_4): Remove
3727 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid use of
3728 grub_ieee1275_decode_int_4(), by obtaining integer properties directly
3729 in native endianness from grub_ieee1275_get_integer_property().
3731 2008-01-19 Robert Millan <rmh@aybabtu.com>
3733 * kern/powerpc/ieee1275/openfw.c (grub_halt): Issue "power-off"
3734 command after "shut-down", since implementations differ on which
3735 the command for halt is.
3737 2008-01-19 Robert Millan <rmh@aybabtu.com>
3739 * include/grub/i386/linuxbios/console.h: Add header protection.
3740 (grub_keyboard_controller_init): New function prototype.
3741 * term/i386/pc/at_keyboard.c (KEYBOARD_COMMAND_ISREADY): New macro.
3742 (KEYBOARD_COMMAND_READ): Likewise.
3743 (KEYBOARD_COMMAND_WRITE): Likewise.
3744 (KEYBOARD_SCANCODE_SET1): Likewise.
3745 (grub_keyboard_controller_write): New function.
3746 (grub_keyboard_controller_read): Likewise.
3747 (grub_keyboard_controller_init): Likewise.
3749 * term/i386/pc/console.c: Include `<grub/machine/machine.h>'.
3750 (grub_console_init): On coreboot/LinuxBIOS, call
3751 grub_keyboard_controller_init().
3753 2008-01-19 Robert Millan <rmh@aybabtu.com>
3755 PowerPC changes provided by Pavel Roskin.
3757 * kern/powerpc/ieee1275/cmain.c (cmain): Don't take any arguments.
3758 * kern/powerpc/ieee1275/crt0.S: Store r5 in grub_ieee1275_entry_fn,
3759 don't rely on cmain() doing it.
3760 * kern/i386/ieee1275/startup.S (_start): Store %eax in
3761 grub_ieee1275_entry_fn, don't rely on cmain() doing it.
3763 2008-01-16 Robert Millan <rmh@aybabtu.com>
3765 * include/grub/i386/linuxbios/memory.h
3766 (GRUB_MEMORY_MACHINE_LINUXBIOS_TABLE_ADDR): Remove macro.
3767 * kern/i386/linuxbios/table.c (grub_linuxbios_table_iterate): Do not
3768 receive `table_header' as argument. Instead, probe for it in the
3769 known memory ranges where it can be present.
3770 (grub_available_iterate): Do not pass a fixed `table_header' address
3771 to grub_linuxbios_table_iterate().
3773 2008-01-15 Robert Millan <rmh@aybabtu.com>
3775 * configure.ac: Add `i386-ieee1275' to the list of supported targets.
3776 * conf/i386-ieee1275.rmk: New file.
3777 * include/grub/i386/ieee1275/console.h: Likewise.
3778 * include/grub/i386/ieee1275/ieee1275.h: Likewise.
3779 * include/grub/i386/ieee1275/kernel.h: Likewise.
3780 * include/grub/i386/ieee1275/time.h: Likewise.
3781 * kern/i386/ieee1275/init.c: Likewise.
3782 * kern/i386/ieee1275/startup.S: Likewise.
3784 2008-01-15 Robert Millan <rmh@aybabtu.com>
3786 * kern/misc.c (grub_vsprintf): Do not reset `longlongfmt' to zero
3787 when pointers are 32-bit (but still do set it to one when they are
3790 2008-01-15 Robert Millan <rmh@aybabtu.com>
3792 * include/grub/ieee1275/ieee1275.h
3793 (grub_ieee1275_get_integer_property): New function prototype.
3795 * kern/ieee1275/ieee1275.c: Include `<grub/types.h>'.
3796 (grub_ieee1275_get_integer_property): New function. Wraps around
3797 grub_ieee1275_get_property() to handle endianness.
3799 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Replace
3800 grub_ieee1275_get_property() with grub_ieee1275_get_integer_property()
3802 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Likewise.
3803 (grub_map): Likewise.
3804 * kern/sparc64/ieee1275/openfw.c (grub_map): Likewise.
3806 2008-01-15 Bean <bean123ch@gmail.com>
3808 * normal/execute.c (grub_script_exec_argument_to_string): Check for undefined variable.
3809 (grub_script_execute_cmdline): Reset grub_errno.
3811 * normal/main.c (read_config_file): Reset grub_errno.
3813 * normal/parse.y (script_init): New.
3814 (script): Move function and menuentry here.
3816 (command): Add delimiter at the end of command.
3817 (commands): Adjust to match the new command.
3818 (commandblock): Remove grub_script_lexer_record_start.
3819 (menuentry): Add grub_script_lexer_record_start, use the new commands.
3820 (if): Use the new commands.
3822 * conf/common.rmk (pkgdata_MODULES): Add echo.mod.
3824 2008-01-15 Robert Millan <rmh@aybabtu.com>
3826 * normal/menu.c (run_menu): Move timeout message from here ...
3827 (print_timeout): ... to here.
3828 (run_menu): Use print_timeout() once during initial draw to print
3829 the whole message, and again in every clock tick to update only
3830 the number of seconds.
3832 2008-01-15 Robert Millan <rmh@aybabtu.com>
3834 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Obtain
3835 actual size of `available' from grub_ieee1275_get_property(), and
3836 restrict parsing to that bound.
3838 2008-01-15 Christian Franke <franke@computer.org>
3840 * util/grub-emu.c: Replace <argp.h> by <getopt.h>.
3841 (argp_program_version): Remove variable.
3842 (argp_program_bug_address): Likewise.
3843 (options): Convert from struct argp_option to struct option.
3844 (struct arguments): Remove.
3845 (parse_opt): Remove.
3846 (usage): New function.
3847 (main): Replace struct args members by simple variables.
3848 Replace argp_parse() by getopt_long().
3849 Add switch to evaluate options.
3850 Add missing "(...)" around root_dev in prefix string.
3852 2008-01-14 Robert Millan <rmh@aybabtu.com>
3854 * kern/powerpc/ieee1275/init.c (grub_exit): Reimplement as a wrapper
3855 for grub_ieee1275_exit(), in order to improve portability.
3857 2008-01-14 Robert Millan <rmh@aybabtu.com>
3859 * util/grub.d/10_linux.in (prefix): Define.
3860 (exec_prefix): Likewise. Both definitions are later used by `libdir'.
3862 2008-01-13 Pavel Roskin <proski@gnu.org>
3864 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Don't use
3865 grub_errno if no errors have been detected.
3867 2008-01-12 Robert Millan <rmh@aybabtu.com>
3869 * include/grub/util/getroot.h (grub_dev_abstraction_types): New enum.
3870 (grub_util_get_dev_abstraction): New function prototype.
3872 * util/getroot.c: Include `<grub/util/getroot.h>'
3873 (grub_util_get_grub_dev): Move detection of abstraction type to ...
3874 (grub_util_get_dev_abstraction): ... here (new function).
3876 * util/grub-probe.c: Convert PRINT_* to an enum. Add
3877 `PRINT_ABSTRACTION'.
3878 (probe): Probe for abstraction type when requested.
3879 (main): Understand `--target=abstraction'.
3881 * util/i386/efi/grub-install.in: Add abstraction module to core
3882 image when it is found to be necessary.
3883 * util/i386/pc/grub-install.in: Likewise.
3884 * util/powerpc/ieee1275/grub-install.in: Likewise.
3886 * util/update-grub_lib.in (font_path): Return system path without
3887 converting to GRUB path.
3888 * util/update-grub.in: Convert system path returned by font_path()
3889 to a GRUB path. Use `grub-probe -t abstraction' to determine what
3890 abstraction module is needed for loading fonts (if any). Export
3891 that as `GRUB_PRELOAD_MODULES'.
3892 * util/grub.d/00_header.in: Process `GRUB_PRELOAD_MODULES' (print
3895 2008-01-12 Yoshinori K. Okuji <okuji@enbug.org>
3897 Remove some unused code from reiserfs.
3899 * fs/reiserfs.c (struct grub_reiserfs_key)
3900 [GRUB_REISERFS_KEYV2_BITFIELD]: Removed offset and type.
3901 (struct grub_reiserfs_node_body): Removed.
3902 (grub_reiserfs_get_key_v2_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
3904 (grub_reiserfs_get_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
3906 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
3908 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
3910 (grub_reiserfs_set_key_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
3912 (grub_reiserfs_iterate_dir) [GRUB_REISERFS_KEYV2_BITFIELD]:
3914 (grub_reiserfs_open) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
3915 (grub_reiserfs_read) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
3916 (grub_reiserfs_dir) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
3918 2008-01-10 Robert Millan <rmh@aybabtu.com>
3920 * util/update-grub_lib.in (grub_file_is_not_garbage): New function.
3921 Determines if a file is garbage left by packaging systems, etc.
3922 * util/update-grub.in: Use grub_file_is_not_garbage() as a condition
3923 for processing /etc/grub.d scripts.
3924 * util/grub.d/10_hurd.in: Fix `GRUB_DISTRIBUTOR' comparison.
3925 * util/grub.d/10_linux.in: Likewise. Use grub_file_is_not_garbage()
3926 as a condition for processing Linux images.
3928 2008-01-10 Pavel Roskin <proski@gnu.org>
3930 * include/grub/powerpc/libgcc.h (__ucmpdi2): New export. Needed
3931 to compile reiserfs.c on PowerPC.
3933 2008-01-10 Robert Millan <rmh@aybabtu.com>
3935 * kern/device.c (grub_device_iterate): Do not abort device iteration
3936 when one of the devices cannot be opened.
3937 * kern/disk.c (grub_disk_open): Do not account previous failures of
3938 unrelated functions when grub_errno is checked for.
3940 2008-01-08 Robert Millan <rmh@aybabtu.com>
3942 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): For
3943 `! grub_linux_is_bzimage', change order of address comparison to make
3944 it more intuitive, and improve "too big zImage" error message.
3946 2008-01-08 Robert Millan <rmh@aybabtu.com>
3948 * Makefile.in (uninstall): Handle `$(update-grub_SCRIPTS)' and
3949 `$(update-grub_DATA)'.
3950 (distcheck): Fix race condition when invoking `$(MAKE)' on multiple
3953 2008-01-07 Robert Millan <rmh@aybabtu.com>
3955 * boot/i386/pc/boot.S (boot_drive_check): Add a comment indicating
3956 which instruction is modified by grub-setup during installation
3957 (since it wasn't obvious by only looking at this file).
3959 2008-01-07 Robert Millan <rmh@aybabtu.com>
3961 * TODO: Rewrite. Just refer to the wiki and the BTS instead of
3962 listing actual TODO items.
3964 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
3966 * fs/reiserfs.c (grub_reiserfs_get_key_v2_type): Handle endianness
3968 (grub_reiserfs_get_key_offset): Likewise.
3969 (grub_reiserfs_set_key_offset): Likewise.
3970 (grub_reiserfs_set_key_type): Likewise.
3971 (grub_reiserfs_iterate_dir): Return 1 if found, otherwise 0.
3973 (GRUB_REISERFS_KEYV2_BITFIELD): Undefined. Probably it would be
3974 better to remove the bitfield version completely.
3976 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
3978 * fs/reiserfs.c (grub_reiserfs_iterate_dir): ENTRY_ITEM must be
3979 allocated from the heap, due to the fshelp implementation.
3980 (grub_reiserfs_dir): Free NODE, due to the same reason.
3982 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
3984 Mostly from Vincent Pelletier:
3986 * fs/reiserfs.c: New file.
3988 * conf/common.rmk (pkglib_MODULES): Added reiserfs.mod.
3989 (reiserfs_mod_SOURCES): New variable.
3990 (reiserfs_mod_CFLAGS): Likewise.
3991 (reiserfs_mod_LDFLAGS): Likewise.
3993 * DISTLIST: Added boot/i386/pc/lnxboot.S, commands/hexdump.c,
3994 disk/ata.c, fs/cpio.c, fs/ntfscomp.c, fs/reiserfs.c,
3995 include/grub/ntfs.h, include/grub/i386/pc/machine.h, and
3998 2008-01-06 Robert Millan <rmh@aybabtu.com>
4000 * normal/color.c: Remove `<grub/env.h>'.
4002 2008-01-05 Jeroen Dekkers <jeroen@dekkers.cx>
4004 * include/grub/normal.h: Include <grub/env.h>.
4006 2008-01-05 Robert Millan <rmh@aybabtu.com>
4008 * util/i386/pc/grub-setup.c (usage): Replace obsolete `(hd0,0)' in
4009 usage example with `(hd0,1)'.
4010 Reported by Samuel Thibault.
4012 2008-01-05 Robert Millan <rmh@aybabtu.com>
4014 * kern/i386/loader.S (grub_linux_is_bzimage): New variable.
4015 (grub_linux_boot_zimage): Rename to ...
4016 (grub_linux_boot): ... this.
4017 (grub_linux_boot_bzimage): Merge with `grub_linux_boot_zimage'.
4018 (grub_linux_boot_zimage): Conditionalize zImage copy.
4020 * include/grub/i386/loader.h (grub_linux_is_bzimage): Add prototype.
4021 (grub_linux_boot_bzimage): Remove prototype.
4022 (grub_linux_boot_zimage): Rename to ...
4023 (grub_linux_boot): ... this.
4025 * loader/i386/pc/linux.c (big_linux): Replace with `grub_linux_is_bzimage'.
4026 (grub_linux_boot): Remove function.
4028 2008-01-05 Robert Millan <rmh@aybabtu.com>
4030 * include/grub/normal.h (grub_env_write_color_normal): New prototype.
4031 (grub_env_write_color_highlight): Likewise.
4032 (grub_wait_after_message): Likewise.
4034 * normal/color.c: New file.
4036 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/color.c'.
4037 (normal_mod_DEPENDENCIES): Likewise.
4039 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `normal/color.c'.
4040 (normal_mod_DEPENDENCIES): Likewise.
4042 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add `normal/color.c'.
4043 (normal_mod_DEPENDENCIES): Likewise.
4045 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `normal/color.c'.
4046 (normal_mod_DEPENDENCIES): Likewise.
4048 * normal/menu_entry.c (run): Rely on grub_wait_after_message()
4049 for waiting after a message is printed.
4050 * normal/main.c (read_config_file): Likewise.
4051 (grub_normal_init): Register grub_env_write_color_normal() and
4052 grub_env_write_color_highlight() hooks. Mark `color_normal' and
4053 `color_highlight' variables as global.
4055 * normal/menu.c (grub_wait_after_message): New function.
4056 (grub_color_menu_normal): New variable. Replaces ...
4057 (GRUB_COLOR_MENU_NORMAL): ... this macro.
4058 (grub_color_menu_highlight): New variable. Replaces ...
4059 (GRUB_COLOR_MENU_HIGHLIGHT): ... this macro.
4060 (draw_border): Set color state to `GRUB_TERM_COLOR_NORMAL' instead of
4061 `GRUB_TERM_COLOR_STANDARD'.
4062 (print_message): Use `grub_setcolorstate' to reload colors. Rename
4063 `normal_code' and `highlight_code' to `old_color_normal' and
4064 `old_color_highlight', respectively.
4065 (grub_menu_init_page): Update colors when drawing the menu, based on
4066 `menu_color_normal' and `menu_color_highlight' variables.
4067 (grub_menu_run): Rely on grub_wait_after_message() for waiting after
4068 a message is printed.
4070 2008-01-05 Robert Millan <rmh@aybabtu.com>
4072 * kern/env.c (grub_env_context_open): Propagate hooks for global
4073 variables to new context.
4075 * kern/main.c (grub_set_root_dev): Export `root' variable.
4077 2008-01-05 Robert Millan <rmh@aybabtu.com>
4079 * util/biosdisk.c (get_os_disk): Check for devfs-style IDE and SCSI
4080 discs unconditionally, since udev and others have options to provide
4083 2008-01-05 Robert Millan <rmh@aybabtu.com>
4085 * normal/completion.c (iterate_dir): Skip `.' and `..' directories.
4087 2008-01-04 Christian Franke <franke@computer.org>
4089 * kern/i386/pc/init.c (grub_machine_init): Fix evaluation
4092 2008-01-03 Pavel Roskin <proski@gnu.org>
4094 * kern/i386/linuxbios/init.c: Put "void" to all function
4095 declarations with no arguments.
4096 * kern/powerpc/ieee1275/init.c: Likewise.
4097 * term/i386/pc/at_keyboard.c: Likewise.
4098 * term/i386/pc/vga_text.c: Likewise.
4099 * util/grub-mkdevicemap.c: Likewise.
4101 2008-01-02 Robert Millan <rmh@aybabtu.com>
4103 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Improve error
4104 message when loaded image is out of bounds.
4105 (grub_multiboot_load_elf64): Likewise.
4107 2008-01-02 Pavel Roskin <proski@gnu.org>
4109 * util/grub.d/10_linux.in: Try version without ".old" when
4110 looking for initrd. It's better to use initrd from the newer
4111 kernel of the same version than no initrd at all.
4113 2008-01-01 Robert Millan <rmh@aybabtu.com>
4115 * util/biosdisk.c (get_os_disk): Fix check for IDE or SCSI discs.
4117 2008-01-01 Vesa Jaaskelainen <chaac@nic.fi>
4119 * include/grub/video.h: Added grub_video_unmap_color and
4120 grub_video_get_active_render_target.
4121 (grub_video_adapter): Added unmap_color and get_active_render_target.
4123 * video/video.c: Added grub_video_unmap_color and
4124 grub_video_get_active_render_target.
4125 (grub_video_get_info): Changed method to accept NULL pointer as an
4126 argument to allow detection of active video adapter.
4128 * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as
4129 grub_video_vbe_unmap_color_int.
4130 Added grub_video_vbe_unmap_color and
4131 grub_video_vbe_get_active_render_target.
4132 (grub_video_vbe_adapter): Added unmap_color and
4133 get_active_render_target.
4135 * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage
4136 with grub_video_vbe_unmap_color_int.
4138 * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added.
4139 (DEFAULT_NORMAL_COLOR): Likewise.
4140 (DEFAULT_HIGHLIGHT_COLOR) Likewise.
4141 (DEFAULT_FG_COLOR): Removed.
4142 (DEFAULT_BG_COLOR): Likewise.
4143 (DEFAULT_CURSOR_COLOR): Changed value.
4144 (grub_virtual_screen): Added standard_color_setting,
4145 normal_color_setting, highlight_color_setting and term_color.
4146 (grub_virtual_screen): Removed fg_color_setting and bg_color_setting.
4147 (bitmap_width): Added.
4148 (bitmap_height): Likewise.
4150 (set_term_color): Likewise.
4151 (grub_virtual_screen_setup): Changed to use new terminal coloring
4153 (grub_gfxterm_init): Added init for bitmap.
4154 (grub_gfxterm_fini): Added destroy for bitmap.
4155 (redraw_screen_rect): Updated to use background bitmap and new
4157 (scroll_up): Added optimization for case when there is no bitmap.
4158 (grub_gfxterm_cls): Fixed to use correct background color.
4159 (grub_virtual_screen_setcolorstate): Changed to use new terminal
4161 (grub_virtual_screen_setcolor): Likewise.
4162 (grub_virtual_screen_getcolor): Added.
4163 (grub_gfxterm_background_image_cmd): Likewise.
4164 (grub_video_term): Added setcolor and getcolor.
4165 (MOD_INIT): Added registration of background_image command.
4166 (MOD_TERM): Added unregistration for background_image command.
4168 2007-12-30 Pavel Roskin <proski@gnu.org>
4170 * loader/multiboot_loader.c: Fix multiboot command
4171 unregistration. Fix all typos in the word "multiboot".
4173 2007-12-29 Pavel Roskin <proski@gnu.org>
4175 * util/grub.d/10_linux.in: Refactor search for initrd. Add
4176 support for initrd names used in Fedora.
4178 2007-12-26 Bean <bean123ch@gmail.com>
4180 * conf/common.rmk (pkgdata_MODULES): Add cpio.mod.
4181 (cpio_mod_SOURCES): New variable.
4182 (cpio_mod_CFLAGS): Likewise.
4183 (cpio_mod_LDFLAGS): Likewise.
4185 * fs/cpio.c: New file.
4187 * conf/i386-pc.rmk (grub_emu_SOURCES): Add cpio.c.
4189 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
4191 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
4193 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4195 2007-12-25 Robert Millan <rmh@aybabtu.com>
4197 * include/grub/term.h (struct grub_term): Add `getcolor' function.
4198 (grub_getcolor): New function.
4200 * kern/term.c (grub_getcolor): New function.
4201 * normal/menu.c (GRUB_COLOR_MENU_NORMAL): New macro.
4202 (GRUB_COLOR_MENU_HIGHLIGHT): New macro.
4203 (print_entry): Set normal and highlight colors to
4204 `GRUB_COLOR_MENU_NORMAL' and `GRUB_COLOR_MENU_HIGHLIGHT',
4205 respectively, before printing and restore them to old
4207 (grub_menu_init_page): Likewise. Fill an additional colored space
4208 that would otherwise be left blank.
4210 * term/efi/console.c (grub_console_getcolor): New function.
4211 (struct grub_console_term.getcolor): New variable.
4212 * term/i386/pc/console.c (grub_console_getcolor): New function.
4213 (struct grub_console_term.getcolor): New variable.
4214 * term/ieee1275/ofconsole.c (grub_ofconsole_getcolor): New function.
4215 (struct grub_console_term.getcolor): New variable.
4217 * term/i386/pc/serial.c (grub_serial_setcolor): Remove function.
4218 (struct grub_console_term.setcolor): Remove variable.
4219 * term/i386/pc/vesafb.c (grub_virtual_screen_setcolor): Remove function.
4220 (struct grub_console_term.setcolor): Remove variable.
4221 * term/i386/pc/vga.c (grub_vga_setcolor): Remove function.
4222 (struct grub_console_term.setcolor): Remove variable.
4223 * term/gfxterm.c (grub_virtual_screen_setcolor): Remove function.
4224 (struct grub_console_term.setcolor): Remove variable.
4226 2007-12-25 Robert Millan <rmh@aybabtu.com>
4228 * configure.ac: Search for possible unifont.hex locations, and
4229 define UNIFONT_HEX if found.
4231 * Makefile.in (UNIFONT_HEX): Define variable.
4232 (DATA): Rename to ...
4233 (PKGLIB): ... this. Update all users.
4234 (PKGDATA): New variable.
4235 (pkgdata_IMAGES): Rename to ...
4236 (pkglib_IMAGES): ... this. Update all users.
4237 (pkgdata_MODULES): Rename to ...
4238 (pkglib_MODULES): ... this. Update all users.
4239 (pkgdata_PROGRAMS): Rename to ...
4240 (pkglib_PROGRAMS): ... this. Update all users.
4241 (pkgdata_DATA): Rename to ...
4242 (pkglib_DATA): ... this. Update all users.
4243 (CLEANFILES): Redefine to `$(pkglib_DATA) $(pkgdata_DATA)'.
4244 (unicode.pff, ascii.pff): New rules.
4245 (all-local): Add `$(PKGDATA)' dependency.
4246 (install-local): Process `$(PKGDATA)'.
4248 * util/update-grub_lib.in (font_path): Search for *.pff files in
4249 a few more locations, including `${pkgdata}'.
4251 2007-12-23 Robert Millan <rmh@aybabtu.com>
4253 Patch from Bean <bean123ch@gmail.com>:
4254 * disk/loopback.c (grub_loopback_read): Add missing bit shift to
4257 2007-12-21 Bean <bean123ch@gmail.com>
4259 * conf/common.rmk (pkgdata_MODULES): Add ntfscomp.mod.
4260 (ntfscomp_mod_SOURCES): New variable.
4261 (ntfscomp_mod_CFLAGS): Likewise.
4262 (ntfscomp_mod_LDFLAGS): Likewise.
4264 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfscomp.c.
4265 (grub_probe_SOURCES): Likewise.
4266 (grub_emu_SOURCES): Likewise.
4268 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
4269 (grub_emu_SOURCES): Likewise.
4271 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
4272 (grub_emu_SOURCES): Likewise.
4274 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
4275 (grub_emu_SOURCES): Likewise.
4277 * fs/ntfs.c (grub_ntfscomp_func): New variable.
4278 (read_run_list): Renamed to grub_ntfs_read_run_list.
4279 (decomp_nextvcn): Moved to ntfscomp.c.
4280 (decomp_getch): Likewise.
4281 (decomp_get16): Likewise.
4282 (decomp_block): Likewise.
4283 (read_block): Likewise.
4284 (read_data): Partially moved to ntfscomp.c.
4285 (fixup): Change unsigned to grub_uint16_t.
4286 (read_mft): Change unsigned long to grub_uint32_t.
4287 (read_attr): Likewise.
4288 (read_data): Likewise.
4289 (read_run_data): Likewise.
4290 (read_run_list): Likewise.
4291 (read_mft): Likewise.
4293 * fs/ntfscomp.c: New file.
4295 * include/grub/ntfs.h: New file.
4297 2007-12-16 Robert Millan <rmh@aybabtu.com>
4299 * util/grub-mkdevicemap.c (make_device_map): Iterate up to 20 for
4300 IDE disk check, since Linux is known to support 20 IDE disks.
4301 Reported by Colin Watson.
4303 2007-12-15 Bean <bean123ch@gmail.com>
4305 * conf/i386-pc.rmk (pkgdata_IMAGES): Add lnxboot.img.
4306 (lnxboot_img_SOURCES): New variable.
4307 (lnxboot_img_ASFLAGS): Likewise.
4308 (lnxboot_img_LDFLAGS): Likewise.
4310 * boot/i386/pc/lnxboot.S: New file.
4312 2007-11-24 Pavel Roskin <proski@gnu.org>
4314 * configure.ac: Test if '--build-id=none' is supported by the
4315 linker. If yes, add it to TARGET_LDFLAGS. Build ID causes
4316 objcopy to generate incorrect binary files (binutils
4317 2.17.50.0.18-1 as shipped by Fedora 8).
4318 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Use LDFLAGS when
4319 linking, so that build ID doesn't break the test.
4321 2007-11-24 Pavel Roskin <proski@gnu.org>
4323 * include/grub/i386/time.h: use "void" in the argument list
4325 * include/grub/powerpc/time.h: Likewise.
4326 * include/grub/sparc64/time.h: Likewise.
4328 2007-11-18 Christian Franke <franke@computer.org>
4330 * util/console.c (grub_ncurses_getkey): Change curses KEY_* mapping,
4331 now return control chars instead of GRUB_CONSOLE_KEY_* constants.
4332 This fixes the problem that function keys did not work in grub-emu.
4334 2007-11-18 Christian Franke <franke@computer.org>
4336 * disk/host.c (grub_host_open): Remove attribute unused from
4337 name parameter. Add check for "host". This fixes the problem
4338 that grub-emu does not find partitions.
4340 2007-11-18 Christian Franke <franke@computer.org>
4342 * util/hostfs.c (is_dir): New function.
4343 (grub_hostfs_dir): Handle missing dirent.d_type case.
4344 (grub_hostfs_read): Add missing fseek().
4345 (grub_hostfs_label): Clear label pointer. This fixes a crash
4346 of grub-emu on "ls (host)".
4348 2007-11-18 Christian Franke <franke@computer.org>
4350 * include/grub/i386/pc/init.h (struct grub_machine_mmap_entry):
4351 Add attribute packed, gcc 3.4.4 on Cygwin aligns this
4352 to 64 bit boundary by default.
4354 2007-11-18 Bean <bean123ch@gmail.com>
4356 * conf/common.rmk (pkgdata_MODULES): Add hexdump.mod.
4357 (hexdump_mod_SOURCES): New variable.
4358 (hexdump_mod_CFLAGS): Likewise.
4359 (hexdump_mod_LDFLAGS): Likewise.
4361 * conf/i386-pc.rmk (grub_emu_SOURCES): Add command/hexdump.c.
4363 * conf/i386-efi.rmk (grub_emu_SOURCES): Add command/hexdump.c.
4365 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add command/hexdump.c.
4367 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add command/hexdump.c.
4369 * include/grub/hexdump.h: New file.
4371 * commands/hexdump.c: New file.
4373 2007-11-10 Robert Millan <rmh@aybabtu.com>
4375 * commands/i386/pc/play.c (beep_off): Switch order of arguments
4376 in grub_outb() calls.
4377 (beep_on): Likewise.
4379 2007-11-10 Christian Franke <franke@computer.org>
4381 * normal/menu.c (run_menu): Check for empty menu to avoid crash.
4382 (grub_menu_run): Likewise.
4384 2007-11-10 Robert Millan <rmh@aybabtu.com>
4386 * include/grub/i386/efi/machine.h: New file.
4387 * include/grub/i386/linuxbios/machine.h: Likewise.
4388 * include/grub/i386/pc/machine.h: Likewise.
4389 * include/grub/powerpc/ieee1275/machine.h: Likewise.
4390 * include/grub/sparc64/ieee1275/machine.h: Likewise.
4392 * term/i386/pc/serial.c: Include <grub/machine/machine.h>.
4393 (serial_hw_io_addr): New variable.
4394 (serial_hw_get_port): Obtain port address from `serial_hw_io_addr'
4395 instead of `(unsigned short *) 0x400'.
4397 2007-11-10 Bean <bean123ch@gmail.com>
4399 * fs/ntfs.c (read_block): Fix a bug caused by adjacent blocks.
4401 2007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
4403 * conf/i386-pc.rmk (pkgdata_MODULES): Added vga.mod.
4404 (vga_mod_SOURCES): Added.
4405 (vga_mod_CFLAGS): Likewise.
4406 (vga_mod_LDFLAGS): Likewise.
4408 * term/i386/pc/vga.c (get_map_mask): Switch order of arguments in
4410 (set_map_mask): Likewise.
4411 (set_read_map): Likewise.
4412 (set_read_address): Likewise.
4413 (vga_font): Removed variable.
4414 (get_vga_glyph): Removed function.
4415 (invalidate_char): Likewise.
4416 (write_char): Changed to use grub_font_get_glyph() for font
4418 (grub_vga_putchar): Likewise.
4419 (grub_vga_getcharwidth): Likewise.
4421 2007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
4423 * conf/i386-pc.rmk (boot_img_LDFLAGS): Use COMMON_LDFLAGS for target
4425 (pxeboot_img_LDFLAGS): Likewise.
4426 (diskboot_img_LDFLAGS): Likewise.
4427 (kernel_img_LDFLAGS): Likewise.
4429 2007-11-06 Robert Millan <rmh@aybabtu.com>
4431 * term/i386/pc/serial.c (serial_hw_put): Switch order of arguments
4432 in grub_outb() calls.
4433 (serial_hw_init): Likewise.
4435 2007-11-05 Robert Millan <rmh@aybabtu.com>
4437 * util/update-grub.in: Allow files in ${update_grub_dir} to contain
4438 spaces. Skip non-regular files.
4440 2007-11-05 Robert Millan <rmh@aybabtu.com>
4442 * kern/disk.c (grub_disk_firmware_fini)
4443 (grub_disk_firmware_is_tainted): New variables.
4445 * include/grub/disk.h (grub_disk_firmware_fini)
4446 (grub_disk_firmware_is_tainted): Likewise.
4448 * disk/i386/pc/biosdisk.c (GRUB_MOD_FINI(biosdisk)): Moved from here ...
4449 (grub_disk_biosdisk_fini): ... to here.
4450 (GRUB_MOD_FINI(biosdisk)): Implement using grub_disk_biosdisk_fini().
4451 (GRUB_MOD_INIT(biosdisk)): Abort when `grub_disk_firmware_is_tainted'
4452 is set. Register grub_disk_biosdisk_fini() in
4453 `grub_disk_firmware_fini'.
4455 * disk/ata.c: Remove `<grub/machine/biosdisk.h>'.
4456 (GRUB_MOD_INIT(ata)): Remove grub_biosdisk_fini() call.
4457 Use `grub_disk_firmware_is_tainted' and `grub_disk_firmware_fini'
4458 to finish existing firmware disk interface.
4460 * conf/i386-linuxbios.rmk (pkgdata_MODULES): Add `ata.mod'.
4461 (ata_mod_SOURCES): New variable.
4462 (ata_mod_CFLAGS): Likewise.
4463 (ata_mod_LDFLAGS): Likewise.
4465 2007-11-05 Robert Millan <rmh@aybabtu.com>
4467 * disk/ata.c: Remove `<grub/machine/time.h>'. Include `<grub/time.h>'.
4468 (grub_ata_wait): Reimplement using grub_millisleep().
4470 * include/grub/misc.h (grub_div_roundup): Fix parenthesization.
4471 * include/grub/i386/time.h (grub_cpu_idle): Disable `hlt' instruction.
4473 2007-11-03 Marco Gerards <marco@gnu.org>
4475 * term/i386/pc/vga_text.c: Include <grub/cpu/io.h>.
4476 (CRTC_ADDR_PORT): New macro.
4477 (CRTC_DATA_PORT): Likewise.
4478 (CRTC_CURSOR): Likewise.
4479 (CRTC_CURSOR_ADDR_HIGH): Likewise.
4480 (CRTC_CURSOR_ADDR_LOW): Likewise.
4481 (update_cursor): New function.
4482 (grub_console_real_putchar): Call `update_cursor'.
4483 (grub_console_gotoxy): Likewise.
4484 (grub_console_cls): Set the default color when clearing the
4486 (grub_console_setcursor): Implemented.
4488 2007-11-03 Marco Gerards <marco@gnu.org>
4490 * disk/ata.c (grub_ata_pio_read): Don't wait for the command to
4492 (grub_ata_pio_write): Likewise.
4494 (grub_atapi_identify): Wait after issuing an ATA command.
4495 (grub_atapi_packet): Likewise.
4496 (grub_ata_identify): Likewise.
4497 (grub_ata_readwrite): Likewise.
4499 2007-11-03 Marco Gerards <marco@gnu.org>
4501 * disk/ata.c (grub_ata_pio_read): Detect and return the error code.
4502 (grub_ata_pio_write): Likewise.
4503 (grub_ata_readwrite): Use `grub_error', instead of
4504 returning `grub_errno'.
4506 2007-11-03 Marco Gerards <marco@gnu.org>
4508 * disk/ata.c (grub_ata_readwrite): Call grub_ata_pio_read and
4509 grub_ata_pio_write once for every single sector, instead of for
4512 2007-10-31 Robert Millan <rmh@aybabtu.com>
4514 * configure.ac: Add `i386-linuxbios' to the list of supported targets.
4516 * conf/i386-linuxbios.rmk: New file.
4518 * kern/i386/pc/hardware.c: Likewise.
4519 * term/i386/pc/at_keyboard.c: Likewise.
4520 * term/i386/pc/vga_text.c: Likewise.
4522 * include/grub/i386/linuxbios/boot.h: Likewise.
4523 * include/grub/i386/linuxbios/console.h: Likewise.
4524 * include/grub/i386/linuxbios/init.h: Likewise.
4525 * include/grub/i386/linuxbios/kernel.h: Likewise.
4526 * include/grub/i386/linuxbios/loader.h: Likewise.
4527 * include/grub/i386/linuxbios/memory.h: Likewise.
4528 * include/grub/i386/linuxbios/serial.h: Likewise.
4529 * include/grub/i386/linuxbios/time.h: Likewise.
4531 * kern/i386/linuxbios/init.c: Likewise.
4532 * kern/i386/linuxbios/startup.S: Likewise.
4533 * kern/i386/linuxbios/table.c: Likewise.
4535 2007-10-31 Marco Gerards <marco@gnu.org>
4537 * conf/i386-pc.rmk (pkgdata_MODULES): Add `ata.mod'.
4538 (ata_mod_SOURCES): New variable.
4539 (ata_mod_CFLAGS): Likewise.
4540 (ata_mod_LDFLAGS): Likewise.
4542 * disk/ata.c: New file.
4544 * include/grub/disk.h (grub_disk_dev_id): Add
4545 `GRUB_DISK_DEV_ATA_ID'.
4547 2007-10-31 Robert Millan <rmh@aybabtu.com>
4549 * include/grub/i386/pc/init.h (grub_lower_mem): Moved from here ...
4550 * include/grub/i386/pc/memory.h (grub_lower_mem): ... to here.
4552 * include/grub/i386/pc/init.h (grub_upper_mem): Moved from here ...
4553 * include/grub/i386/pc/memory.h (grub_upper_mem): ... to here.
4555 * include/grub/i386/pc/memory.h: Include `<grub/symbol.h>' and
4558 * loader/i386/pc/multiboot.c: Include `<grub/machine/memory.h>'.
4560 2007-10-27 Robert Millan <rmh@aybabtu.com>
4562 * include/grub/types.h (ULONG_MAX): Define macro.
4564 2007-10-22 Robert Millan <rmh@aybabtu.com>
4566 * kern/i386/pc/startup.S: Remove `"kern/i386/realmode.S"'. Include
4568 Remove `"kern/i386/loader.S"'. Include `"../loader.S"'.
4570 2007-10-22 Robert Millan <rmh@aybabtu.com>
4572 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove `disk/i386/pc/biosdisk.c'.
4573 (pkgdata_MODULES): Add `biosdisk.mod'.
4574 (biosdisk_mod_SOURCES, biosdisk_mod_CFLAGS, biosdisk_mod_LDFLAGS): New
4577 * disk/i386/pc/biosdisk.c: Include `<grub/dl.h>'.
4578 (grub_biosdisk_init): Replace with ...
4579 (GRUB_MOD_INIT(biosdisk)): ... this.
4580 (grub_biosdisk_fini): Replace with ...
4581 (GRUB_MOD_FINI(biosdisk)): ... this.
4583 * kern/i386/pc/init.c: Remove `<grub/machine/biosdisk.h>'.
4584 (grub_machine_init): Remove call to grub_biosdisk_init().
4585 (grub_machine_fini): Remove call to grub_machine_fini().
4587 * util/i386/pc/grub-install.in (modules): Add `biosdisk'.
4589 2007-10-22 Robert Millan <rmh@aybabtu.com>
4591 * include/grub/time.h: New file.
4592 * include/grub/i386/time.h: Likewise.
4593 * include/grub/powerpc/time.h: Likewise.
4594 * include/grub/sparc64/time.h: Likewise.
4596 * include/grub/i386/pc/time.h (KERNEL_TIME_HEADER): Rename all
4598 (KERNEL_MACHINE_TIME_HEADER): ... this.
4599 * include/grub/powerpc/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
4601 (KERNEL_MACHINE_TIME_HEADER): ... this.
4602 * include/grub/sparc64/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
4604 (KERNEL_MACHINE_TIME_HEADER): ... this.
4606 * kern/i386/efi/init.c: Include `<grub/time.h>'.
4607 (grub_millisleep): New function.
4608 * kern/i386/pc/init.c: Include `<grub/time.h>'.
4609 (grub_millisleep): New function.
4610 * kern/powerpc/ieee1275/init.c: Include `<grub/time.h>'.
4611 Remove `grub/machine/time.h' include.
4612 (grub_millisleep): New function.
4613 * kern/sparc64/ieee1275/init.c: Include `<grub/time.h>'.
4614 Remove `grub/machine/time.h' include.
4615 (grub_millisleep): New function.
4617 * include/grub/misc.h (grub_div_roundup): New function.
4619 * kern/misc.c: Include `<grub/time.h>'.
4620 (grub_millisleep_generic): New function.
4622 * conf/i386-efi.rmk (kernel_mod_HEADERS): Remove `i386/efi/time.h'.
4624 * conf/i386-pc.rmk (kernel_img_HEADERS): Remove `machine/time.h'.
4626 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Remove
4627 `machine/time.h'. Add `time.h'.
4628 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
4630 2007-10-21 Robert Millan <rmh@aybabtu.com>
4632 * include/grub/misc.h (grub_max): New function.
4634 2007-10-21 Robert Millan <rmh@aybabtu.com>
4636 * util/misc.c (grub_util_info): Call fflush() before returning.
4638 2007-10-20 Robert Millan <rmh@aybabtu.com>
4640 * genmk.rb (Image): Copy `extra_flags' from here ...
4641 (PModule): ... to here. Use it in `#{obj}: #{src}' rule.
4643 * commands/i386/cpuid.c (grub_cmd_cpuid): Add __attribute__ ((unused))
4644 to `argc' and `args' arguments.
4646 2007-10-17 Robert Millan <rmh@aybabtu.com>
4648 * kern/i386/loader.S: New file.
4650 * kern/i386/pc/startup.S (grub_linux_prot_size): Moved from here ...
4651 * kern/i386/loader.S (grub_linux_prot_size)... to here.
4652 * kern/i386/pc/startup.S (grub_linux_tmp_addr): Moved from here ...
4653 * kern/i386/loader.S (grub_linux_tmp_addr)... to here.
4654 * kern/i386/pc/startup.S (grub_linux_real_addr): Moved from here ...
4655 * kern/i386/loader.S (grub_linux_real_addr)... to here.
4656 * kern/i386/pc/startup.S (grub_linux_boot_zimage): Moved from here ...
4657 * kern/i386/loader.S (grub_linux_boot_zimage)... to here.
4658 * kern/i386/pc/startup.S (grub_linux_boot_bzimage): Moved from here ...
4659 * kern/i386/loader.S (grub_linux_boot_bzimage)... to here.
4660 * kern/i386/pc/startup.S (grub_multiboot_real_boot): Moved from here ...
4661 * kern/i386/loader.S (grub_multiboot_real_boot)... to here.
4662 * kern/i386/pc/startup.S (grub_multiboot2_real_boot): Moved from here ...
4663 * kern/i386/loader.S (grub_multiboot2_real_boot)... to here.
4665 * kern/i386/realmode.S: New file.
4667 * kern/i386/pc/startup.S (protstack): Moved from here ...
4668 * kern/i386/realmode.S (protstack)... to here.
4669 * kern/i386/pc/startup.S (gdt): Moved from here ...
4670 * kern/i386/realmode.S (gdt)... to here.
4671 * kern/i386/pc/startup.S (prot_to_real): Moved from here ...
4672 * kern/i386/realmode.S (prot_to_real)... to here.
4674 * kern/i386/pc/startup.S: Include `kern/i386/loader.S' and
4675 `kern/i386/realmode.S'.
4677 2007-10-17 Robert Millan <rmh@aybabtu.com>
4679 * include/grub/i386/loader.h: New file.
4681 * include/grub/i386/pc/loader.h (grub_linux_prot_size)
4682 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
4683 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
4684 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
4685 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): Moved from here ...
4686 * include/grub/i386/loader.h (grub_linux_prot_size)
4687 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
4688 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
4689 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
4690 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): ... to here.
4692 * include/grub/i386/pc/loader.h: Include `grub/cpu/loader.h'.
4694 2007-10-15 Robert Millan <rmh@aybabtu.com>
4696 * normal/misc.c (grub_normal_print_device_info): Do not probe for
4697 filesystem when dev->disk is unset.
4698 Do probe for filesystem even when dev->disk->has_partitions is set.
4699 In case a filesystem is found, always report it.
4700 In case it isn't, if dev->disk->has_partitions is set, report that
4701 a partition table was found instead of reporting that no filesystem
4702 could be identified.
4704 2007-10-12 Robert Millan <rmh@aybabtu.com>
4706 * conf/powerpc-ieee1275.rmk (grub_mkimage_SOURCES): Replace reference
4707 to util/powerpc/ieee1275/grub-mkimage.c with util/elf/grub-mkimage.c.
4709 * include/grub/types.h (grub_host_to_target16): New macro.
4710 (grub_host_to_target32): Likewise.
4711 (grub_host_to_target64): Likewise.
4712 (grub_target_to_host16): Likewise.
4713 (grub_target_to_host32): Likewise.
4714 (grub_target_to_host64): Likewise.
4716 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
4718 (GRUB_MOD_ALIGN): ...this. Update all users.
4720 * util/elf/grub-mkimage.c (load_note): Replace grub_cpu_to_be32 with
4721 grub_host_to_target32.
4722 Replace grub_be_to_cpu32 with grub_target_to_host32.
4723 (load_modules): Likewise.
4724 (add_segments): Replace grub_be_to_cpu16 with grub_target_to_host16.
4725 Replace grub_be_to_cpu32 with grub_target_to_host32.
4726 Replace grub_cpu_to_be16 with grub_host_to_target16.
4727 Replace grub_cpu_to_be32 grub_host_to_target32.
4729 2007-10-12 Robert Millan <rmh@aybabtu.com>
4731 * util/powerpc/ieee1275/grub-mkimage.c: Moved to ...
4732 * util/elf/grub-mkimage.c: ... here.
4734 * DISTLIST: Add `util/elf/grub-mkimage.c'. Remove
4735 `util/powerpc/ieee1275/grub-mkimage.c'.
4737 2007-10-07 Robert Millan <rmh@aybabtu.com>
4739 * kern/powerpc/ieee1275/init.c: Rename HEAP_LIMIT to HEAP_MAX_ADDR,
4740 and make it easier to figure out.
4741 Add HEAP_MIN_SIZE and HEAP_MAX_ADDR definitions.
4742 (grub_claim_heap): Use HEAP_MAX_ADDR rather than taking a parameter.
4743 Do not avoid claiming a region above HEAP_MAX_ADDR if that would
4744 leave us with less than HEAP_MIN_SIZE total heap.
4745 Avoid our total amount of heap to surpass HEAP_MAX_SIZE.
4747 2007-10-03 Robert Millan <rmh@aybabtu.com>
4749 * include/grub/i386/io.h: New file.
4750 * commands/i386/pc/play.c (inb): Removed.
4752 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
4754 * term/i386/pc/serial.c (inb): Removed.
4756 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
4758 * term/i386/pc/vga.c (inb): Removed.
4760 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
4763 2007-10-02 Robert Millan <rmh@aybabtu.com>
4765 * conf/i386-efi.rmk (grub_emu_SOURCES): Add util/hostfs.c.
4766 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4767 Reported by Marcin Kurek.
4769 2007-09-07 Robert Millan <rmh@aybabtu.com>
4771 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_test_flag): Detect
4772 SmartFirmware version updates (as released by Sven Luther), and avoid
4773 setting GRUB_IEEE1275_FLAG_NO_PARTITION_0 or
4774 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS unless the running version is
4777 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
4780 * kern/i386/pc/init.c (compact_mem_regions): Decrease NUM_REGIONS
4781 when merging two regions.
4783 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
4785 * kern/rescue.c (grub_enter_rescue_mode): Free ARGS.
4786 * normal/completion.c (grub_normal_do_completion): Likewise.
4787 Reported by Hitoshi Ozeki.
4789 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
4791 Do not use devices at boot in chainloading.
4793 * loader/i386/pc/chainloader.c (boot_drive): New variable.
4794 (boot_part_addr): Likewise.
4795 (grub_chainloader_boot): Simply call grub_chainloader_real_boot
4796 with BOOT_DRIVE and BOOT_PART_ADDR.
4797 (grub_chainloader_cmd): Set BOOT_DRIVE and BOOT_PART_ADDR.
4798 Reported by Hitoshi Ozeki <h-ozeki@ck2.so-net.ne.jp>.
4800 2007-08-29 Robert Millan <rmh@aybabtu.com>
4802 Patch from Simon Peter <dn.tlp@gmx.net>:
4803 * genmk.rb (Utility): Append $(#{src}_DEPENDENCIES) to #{obj} targets.
4804 * conf/i386-pc.rmk: Replace grub-probe_DEPENDENCIES with
4805 util/grub-probe.c_DEPENDENCIES. Replace grub-setup_DEPENDENCIES with
4806 util/i386/pc/grub-setup.c_DEPENDENCIES.
4807 * conf/i386-efi.rmk: Replace grub-probe_DEPENDENCIES with
4808 util/grub-probe.c_DEPENDENCIES.
4809 * conf/powerpc-ieee1275.rmk: Likewise.
4811 2007-08-28 Robert Millan <rmh@aybabtu.com>
4813 * util/i386/get_disk_name.c: New. Implement grub_util_get_disk_name()
4814 to tell grub-mkdevicemap how to name devices.
4815 * util/ieee1275/get_disk_name.c: Likewise (using "ofpathname -a"
4818 * conf/i386-efi.rmk (grub_mkdevicemap_SOURCES): Add
4819 util/i386/get_disk_name.c.
4820 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Likewise.
4821 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Add
4822 util/ieee1275/get_disk_name.c.
4824 * include/grub/util/misc.h: grub_util_get_disk_name() declaration.
4826 * DISTLIST: Add util/i386/get_disk_name.c and
4827 util/ieee1275/get_disk_name.c.
4829 * util/grub-mkdevicemap.c: Replace device naming logic with
4830 grub_util_get_disk_name() calls.
4832 2007-08-20 Robert Millan <rmh@aybabtu.com>
4834 * normal/menu.c (run_menu): Refer to seconds as "s" not "seconds"
4835 (so that it works for both plural and singular quantities).
4837 2007-08-05 Robert Millan <rmh@aybabtu.com>
4839 * util/grub.d/10_linux.in (test_gt): Strip out vmlinu[xz]- prefix
4840 so that [xz] isn't taken into account when determining order.
4842 2007-08-02 Marco Gerards <marco@gnu.org>
4844 * DISTLIST: Add `disk/host.c', `fs/ntfs.c', `include/multiboot.h',
4845 `include/multiboot2.h', `include/grub/elfload.h',
4846 `include/multiboot.h', `include/grub/multiboot.h',
4847 `include/grub/multiboot_loader.h', `include/grub/multiboot2.h',
4848 `include/grub/i386/pc/biosdisk.h', `include/grub/util/biosdisk.h',
4849 `kern/elf.c', `loader/multiboot_loader.c',
4850 `loader/multiboot_loader_normal.c', `loader/multiboot2.c',
4851 `loader/i386/pc/multiboot2.c',
4852 `loader/powerpc/ieee1275/multiboot2.c', `util/hostfs.c' and
4853 `util/i386/pc/grub-mkrescue.in'. Remove
4854 `include/grub/biosdisk.h', `include/grub/i386/pc/multiboot.h',
4855 `include/grub/i386/pc/util/biosdisk.h' and
4856 `include/grub/powerpc/ieee1275/multiboot.h'.
4858 2007-08-02 Bean <bean123ch@gmail.com>
4860 * conf/common.rmk (pkgdata_MODULES): Add ntfs.mod.
4861 (ntfs_mod_SOURCES): New variable.
4862 (ntfs_mod_CFLAGS): Likewise.
4863 (ntfs_mod_LDFLAGS): Likewise.
4865 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfs.c.
4866 (grub_probe_SOURCES): Likewise.
4867 (grub_emu_SOURCES): Likewise.
4869 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
4870 (grub_emu_SOURCES): Likewise.
4872 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
4873 (grub_emu_SOURCES): Likewise.
4875 * conf/misc.c (grub_utf16_to_utf8): Fix unicode conversion bug.
4877 * fs/ntfs.c: New file.
4879 2007-08-02 Bean <bean123ch@gmail.com>
4881 * disk.h (grub_disk): Use NESTED_FUNC_ATTR.
4883 * file.h (grub_file): Likewise.
4885 * fshelp.h (grub_fshelp_read_file): Likewise.
4887 * util/i386/pc/grub-setup.c (setup): Likewise.
4888 (save_first_sector): Likewise.
4889 (save_blocklists): Likewise.
4891 * fs/affs.c (grub_affs_read_file): Likewise.
4893 * fs/ext2.c (grub_ext2_read_file): Likewise.
4895 * fs/fat.c (grub_fat_read_data): Likewise.
4897 * fs/fshelp.c (grub_fshelp_read_file): Likewise.
4899 * fs/hfs.c (grub_hfs_read_file): Likewise.
4901 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
4903 * fs/jfs.c (grub_jfs_read_file): Likewise.
4905 * fs/minix.c (grub_minix_read_file): Likewise.
4907 * fs/sfs.c (grub_sfs_read_file): Likewise.
4909 * fs/ufs.c (grub_ufs_read_file): Likewise.
4911 * fs/xfs.c (grub_xfs_read_file): Likewise.
4913 * command/blocklist.c (read_blocklist): Likewise.
4914 (print_blocklist): Likewise.
4916 2007-08-02 Marco Gerards <marco@gnu.org>
4918 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/host.c' and
4921 * disk/host.c: New file.
4923 * util/hostfs.c: Likewise.
4925 * fs/hfsplus.c (grub_hfsplus_mount): When reading out of disk,
4926 return `GRUB_ERR_BAD_FS'.
4927 * fs/sfs.c (grub_sfs_mount): Likewise.
4928 * fs/xfs.c (grub_xfs_mount): Likewise.
4930 * include/grub/disk.h (enum grub_disk_dev_id): Add
4931 `GRUB_DISK_DEVICE_HOST_ID'.
4933 * util/grub-emu.c (main): Initialize and de-initialize hostfs.
4935 2007-07-24 Jerone Young <jerone@gmail.com>
4937 * conf/i386-pc.rmk: Add Multiboot loader and multiboot 2 to multiboot
4938 modules for compilation.
4939 * conf/powerpc-ieee1275.rmk: Likewise.
4941 * include/multiboot.h: Move multiboot definitions to one file. Rename
4942 many definitions to not get grub specific.
4943 * include/multiboot2.h: Create header with multiboot 2 definitions.
4944 * include/grub/multiboot.h: Header for grub specific function
4945 prototypes and definitions.
4946 * include/grub/multiboot2.h: Likewise.
4947 * include/grub/multiboot_loader.h: Likewise.
4948 * include/grub/i386/pc/multiboot.h: Removed.
4949 * include/grub/powerpc/ieee1275/multiboot.h: Removed.
4951 * loader/multiboot_loader.c: Created to act as a proxy for multiboot 1
4952 and 2 to allow for one multiboot and module commands.
4953 * loader/multiboot2.c: Add multiboot2 functionality.
4954 * loader/i386/pc/multiboot.c: Modify for new multiboot header location
4955 and definition names.
4956 * loader/i386/pc/multiboot2.c: Created to add i386 specific multiboot
4958 * loader/powerpc/ieee1275/multiboot2.c: Created to add powerpc
4959 ieee1275 specific multiboot2 code.
4961 * kern/i386/pc/startup.S: Change headers and definition names for
4962 multiboot. Add function grub_multiboot2_real_boot for multiboot 2.
4964 2007-07-22 Robert Millan <rmh@aybabtu.com>
4966 * geninitheader.sh: Process file specified in first parameter rather
4967 than hardcoding grub_modules_init.lst.
4968 * geninit.sh: Likewise. Also, construct header name dynamically rather
4969 than hardcoding grub_modules_init.h.
4971 * conf/common.rmk: Rename grub_modules_init.[ch] files associated with
4972 grub-emu to grub_emu_init.[ch]. Add rules to build analogous
4973 grub_probe_init.[ch] and grub_setup_init.[ch].
4975 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Replace
4976 grub_modules_init.h with grub_emu_init.h.
4977 (grub_probe_DEPENDENCIES, grub_probe_SOURCES): Add new
4978 grub_probe_init.[ch] files.
4979 * conf/i386-efi.rmk: Likewise.
4980 * conf/i386-pc.rmk: Likewise.
4981 (grub_setup_DEPENDENCIES, grub_setup_SOURCES): Add new
4982 grub_setup_init.[ch] files.
4984 * util/grub-emu.c: Replace grub_modules_init.h with grub_emu_init.h.
4985 * util/grub-probe.c: Include grub_probe_init.h. Use grub_init_all()
4986 to initialize modules rather than a list of hardcoded functions.
4987 * util/i386/pc/grub-setup.c: Include grub_setup_init.h. Use
4988 grub_init_all() to initialize modules rather than a list of hardcoded
4991 2007-07-22 Robert Millan <rmh@aybabtu.com>
4993 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set
4994 GRUB_IEEE1275_FLAG_NO_PARTITION_0 flag when running on SmartFirmware.
4996 2007-07-22 Robert Millan <rmh@aybabtu.com>
4998 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
4999 GRUB_IEEE1275_FLAG_BROKEN_OUTPUT flag.
5000 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set this
5001 flag when running on SmartFirmware.
5002 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid running
5003 "output-device output" command when GRUB_IEEE1275_FLAG_BROKEN_OUTPUT
5006 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
5007 Increase partno when GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS flag is set,
5008 rather than decreasing it.
5010 * util/i386/pc/grub-setup.c (setup): When embedding is required, but
5011 there's not enough space to do it, fail in the same way as when it
5012 can't be done because there are no partitions.
5014 * util/powerpc/ieee1275/grub-install.in: Improve error message shown
5015 when nvsetenv failed.
5017 2007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
5019 * conf/i386-pc.rmk (CLEANFILES): Removed for grub-mkrescue,
5020 because this rule is automatically generated.
5021 (grub-mkrescue): Removed for the same reason as above.
5023 2007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
5025 Migrate to GNU General Public License Version 3.
5027 * COPYING: Replaced with the plain text version of GPLv3.
5029 * config.guess: Updated from gnulib.
5030 * config.sub: Likewise.
5032 * geninit.sh: Output a GPLv3 copyright notice.
5033 * geninitheader.sh: Likewise.
5034 * genmodsrc.sh: Likewise.
5035 * gensymlist.sh.in: Likewise.
5037 * boot/i386/pc/boot.S: Upgraded to GPLv3.
5038 * boot/i386/pc/diskboot.S: Likewise.
5039 * boot/i386/pc/pxeboot.S: Likewise.
5040 * commands/blocklist.c: Likewise.
5041 * commands/boot.c: Likewise.
5042 * commands/cat.c: Likewise.
5043 * commands/cmp.c: Likewise.
5044 * commands/configfile.c: Likewise.
5045 * commands/echo.c: Likewise.
5046 * commands/help.c: Likewise.
5047 * commands/ls.c: Likewise.
5048 * commands/search.c: Likewise.
5049 * commands/terminal.c: Likewise.
5050 * commands/test.c: Likewise.
5051 * commands/videotest.c: Likewise.
5052 * commands/i386/cpuid.c: Likewise.
5053 * commands/i386/pc/halt.c: Likewise.
5054 * commands/i386/pc/play.c: Likewise.
5055 * commands/i386/pc/reboot.c: Likewise.
5056 * commands/i386/pc/vbeinfo.c: Likewise.
5057 * commands/i386/pc/vbetest.c: Likewise.
5058 * commands/ieee1275/halt.c: Likewise.
5059 * commands/ieee1275/reboot.c: Likewise.
5060 * commands/ieee1275/suspend.c: Likewise.
5061 * disk/loopback.c: Likewise.
5062 * disk/lvm.c: Likewise.
5063 * disk/raid.c: Likewise.
5064 * disk/efi/efidisk.c: Likewise.
5065 * disk/i386/pc/biosdisk.c: Likewise.
5066 * disk/ieee1275/ofdisk.c: Likewise.
5067 * font/manager.c: Likewise.
5068 * fs/affs.c: Likewise.
5069 * fs/ext2.c: Likewise.
5070 * fs/fat.c: Likewise.
5071 * fs/fshelp.c: Likewise.
5072 * fs/hfs.c: Likewise.
5073 * fs/hfsplus.c: Likewise.
5074 * fs/iso9660.c: Likewise.
5075 * fs/jfs.c: Likewise.
5076 * fs/minix.c: Likewise.
5077 * fs/sfs.c: Likewise.
5078 * fs/ufs.c: Likewise.
5079 * fs/xfs.c: Likewise.
5080 * hello/hello.c: Likewise.
5081 * include/grub/acorn_filecore.h: Likewise.
5082 * include/grub/arg.h: Likewise.
5083 * include/grub/bitmap.h: Likewise.
5084 * include/grub/boot.h: Likewise.
5085 * include/grub/cache.h: Likewise.
5086 * include/grub/device.h: Likewise.
5087 * include/grub/disk.h: Likewise.
5088 * include/grub/dl.h: Likewise.
5089 * include/grub/elfload.h: Likewise.
5090 * include/grub/env.h: Likewise.
5091 * include/grub/err.h: Likewise.
5092 * include/grub/file.h: Likewise.
5093 * include/grub/font.h: Likewise.
5094 * include/grub/fs.h: Likewise.
5095 * include/grub/fshelp.h: Likewise.
5096 * include/grub/gzio.h: Likewise.
5097 * include/grub/hfs.h: Likewise.
5098 * include/grub/kernel.h: Likewise.
5099 * include/grub/loader.h: Likewise.
5100 * include/grub/lvm.h: Likewise.
5101 * include/grub/misc.h: Likewise.
5102 * include/grub/mm.h: Likewise.
5103 * include/grub/net.h: Likewise.
5104 * include/grub/normal.h: Likewise.
5105 * include/grub/parser.h: Likewise.
5106 * include/grub/partition.h: Likewise.
5107 * include/grub/pc_partition.h: Likewise.
5108 * include/grub/raid.h: Likewise.
5109 * include/grub/rescue.h: Likewise.
5110 * include/grub/script.h: Likewise.
5111 * include/grub/setjmp.h: Likewise.
5112 * include/grub/symbol.h: Likewise.
5113 * include/grub/term.h: Likewise.
5114 * include/grub/terminfo.h: Likewise.
5115 * include/grub/tparm.h: Likewise.
5116 * include/grub/types.h: Likewise.
5117 * include/grub/video.h: Likewise.
5118 * include/grub/efi/api.h: Likewise.
5119 * include/grub/efi/chainloader.h: Likewise.
5120 * include/grub/efi/console.h: Likewise.
5121 * include/grub/efi/console_control.h: Likewise.
5122 * include/grub/efi/disk.h: Likewise.
5123 * include/grub/efi/efi.h: Likewise.
5124 * include/grub/efi/pe32.h: Likewise.
5125 * include/grub/efi/time.h: Likewise.
5126 * include/grub/i386/linux.h: Likewise.
5127 * include/grub/i386/setjmp.h: Likewise.
5128 * include/grub/i386/types.h: Likewise.
5129 * include/grub/i386/efi/kernel.h: Likewise.
5130 * include/grub/i386/efi/loader.h: Likewise.
5131 * include/grub/i386/efi/time.h: Likewise.
5132 * include/grub/i386/pc/biosdisk.h: Likewise.
5133 * include/grub/i386/pc/boot.h: Likewise.
5134 * include/grub/i386/pc/chainloader.h: Likewise.
5135 * include/grub/i386/pc/console.h: Likewise.
5136 * include/grub/i386/pc/init.h: Likewise.
5137 * include/grub/i386/pc/kernel.h: Likewise.
5138 * include/grub/i386/pc/loader.h: Likewise.
5139 * include/grub/i386/pc/memory.h: Likewise.
5140 * include/grub/i386/pc/multiboot.h: Likewise.
5141 * include/grub/i386/pc/serial.h: Likewise.
5142 * include/grub/i386/pc/time.h: Likewise.
5143 * include/grub/i386/pc/vbe.h: Likewise.
5144 * include/grub/i386/pc/vbeblit.h: Likewise.
5145 * include/grub/i386/pc/vbefill.h: Likewise.
5146 * include/grub/i386/pc/vbeutil.h: Likewise.
5147 * include/grub/i386/pc/vga.h: Likewise.
5148 * include/grub/ieee1275/ieee1275.h: Likewise.
5149 * include/grub/ieee1275/ofdisk.h: Likewise.
5150 * include/grub/powerpc/libgcc.h: Likewise.
5151 * include/grub/powerpc/setjmp.h: Likewise.
5152 * include/grub/powerpc/types.h: Likewise.
5153 * include/grub/powerpc/ieee1275/biosdisk.h: Likewise.
5154 * include/grub/powerpc/ieee1275/console.h: Likewise.
5155 * include/grub/powerpc/ieee1275/ieee1275.h: Likewise.
5156 * include/grub/powerpc/ieee1275/kernel.h: Likewise.
5157 * include/grub/powerpc/ieee1275/loader.h: Likewise.
5158 * include/grub/powerpc/ieee1275/multiboot.h: Likewise.
5159 * include/grub/powerpc/ieee1275/time.h: Likewise.
5160 * include/grub/powerpc/ieee1275/util/biosdisk.h: Likewise.
5161 * include/grub/sparc64/libgcc.h: Likewise.
5162 * include/grub/sparc64/setjmp.h: Likewise.
5163 * include/grub/sparc64/types.h: Likewise.
5164 * include/grub/sparc64/ieee1275/console.h: Likewise.
5165 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
5166 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
5167 * include/grub/sparc64/ieee1275/time.h: Likewise.
5168 * include/grub/util/biosdisk.h: Likewise.
5169 * include/grub/util/getroot.h: Likewise.
5170 * include/grub/util/lvm.h: Likewise.
5171 * include/grub/util/misc.h: Likewise.
5172 * include/grub/util/raid.h: Likewise.
5173 * include/grub/util/resolve.h: Likewise.
5174 * io/gzio.c: Likewise.
5175 * kern/device.c: Likewise.
5176 * kern/disk.c: Likewise.
5177 * kern/dl.c: Likewise.
5178 * kern/elf.c: Likewise.
5179 * kern/env.c: Likewise.
5180 * kern/err.c: Likewise.
5181 * kern/file.c: Likewise.
5182 * kern/fs.c: Likewise.
5183 * kern/loader.c: Likewise.
5184 * kern/main.c: Likewise.
5185 * kern/misc.c: Likewise.
5186 * kern/mm.c: Likewise.
5187 * kern/parser.c: Likewise.
5188 * kern/partition.c: Likewise.
5189 * kern/rescue.c: Likewise.
5190 * kern/term.c: Likewise.
5191 * kern/efi/efi.c: Likewise.
5192 * kern/efi/init.c: Likewise.
5193 * kern/efi/mm.c: Likewise.
5194 * kern/i386/dl.c: Likewise.
5195 * kern/i386/efi/init.c: Likewise.
5196 * kern/i386/efi/startup.S: Likewise.
5197 * kern/i386/pc/init.c: Likewise.
5198 * kern/i386/pc/lzo1x.S: Likewise.
5199 * kern/i386/pc/startup.S: Likewise.
5200 * kern/ieee1275/ieee1275.c: Likewise.
5201 * kern/powerpc/cache.S: Likewise.
5202 * kern/powerpc/dl.c: Likewise.
5203 * kern/powerpc/ieee1275/cmain.c: Likewise.
5204 * kern/powerpc/ieee1275/crt0.S: Likewise.
5205 * kern/powerpc/ieee1275/init.c: Likewise.
5206 * kern/powerpc/ieee1275/openfw.c: Likewise.
5207 * kern/sparc64/cache.S: Likewise.
5208 * kern/sparc64/dl.c: Likewise.
5209 * kern/sparc64/ieee1275/init.c: Likewise.
5210 * kern/sparc64/ieee1275/openfw.c: Likewise.
5211 * loader/efi/chainloader.c: Likewise.
5212 * loader/efi/chainloader_normal.c: Likewise.
5213 * loader/i386/efi/linux.c: Likewise.
5214 * loader/i386/efi/linux_normal.c: Likewise.
5215 * loader/i386/pc/chainloader.c: Likewise.
5216 * loader/i386/pc/chainloader_normal.c: Likewise.
5217 * loader/i386/pc/linux.c: Likewise.
5218 * loader/i386/pc/linux_normal.c: Likewise.
5219 * loader/i386/pc/multiboot.c: Likewise.
5220 * loader/i386/pc/multiboot_normal.c: Likewise.
5221 * loader/powerpc/ieee1275/linux.c: Likewise.
5222 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
5223 * normal/arg.c: Likewise.
5224 * normal/cmdline.c: Likewise.
5225 * normal/command.c: Likewise.
5226 * normal/completion.c: Likewise.
5227 * normal/execute.c: Likewise.
5228 * normal/function.c: Likewise.
5229 * normal/lexer.c: Likewise.
5230 * normal/main.c: Likewise.
5231 * normal/menu.c: Likewise.
5232 * normal/menu_entry.c: Likewise.
5233 * normal/misc.c: Likewise.
5234 * normal/parser.y: Likewise.
5235 * normal/script.c: Likewise.
5236 * normal/i386/setjmp.S: Likewise.
5237 * normal/powerpc/setjmp.S: Likewise.
5238 * normal/sparc64/setjmp.S: Likewise.
5239 * partmap/acorn.c: Likewise.
5240 * partmap/amiga.c: Likewise.
5241 * partmap/apple.c: Likewise.
5242 * partmap/gpt.c: Likewise.
5243 * partmap/pc.c: Likewise.
5244 * partmap/sun.c: Likewise.
5245 * term/gfxterm.c: Likewise.
5246 * term/terminfo.c: Likewise.
5247 * term/efi/console.c: Likewise.
5248 * term/i386/pc/console.c: Likewise.
5249 * term/i386/pc/serial.c: Likewise.
5250 * term/i386/pc/vesafb.c: Likewise.
5251 * term/i386/pc/vga.c: Likewise.
5252 * term/ieee1275/ofconsole.c: Likewise.
5253 * util/biosdisk.c: Likewise.
5254 * util/console.c: Likewise.
5255 * util/genmoddep.c: Likewise.
5256 * util/getroot.c: Likewise.
5257 * util/grub-emu.c: Likewise.
5258 * util/grub-mkdevicemap.c: Likewise.
5259 * util/grub-probe.c: Likewise.
5260 * util/lvm.c: Likewise.
5261 * util/misc.c: Likewise.
5262 * util/raid.c: Likewise.
5263 * util/resolve.c: Likewise.
5264 * util/update-grub.in: Likewise.
5265 * util/update-grub_lib.in: Likewise.
5266 * util/grub.d/00_header.in: Likewise.
5267 * util/grub.d/10_hurd.in: Likewise.
5268 * util/grub.d/10_linux.in: Likewise.
5269 * util/i386/efi/grub-install.in: Likewise.
5270 * util/i386/efi/grub-mkimage.c: Likewise.
5271 * util/i386/pc/grub-install.in: Likewise.
5272 * util/i386/pc/grub-mkimage.c: Likewise.
5273 * util/i386/pc/grub-mkrescue.in: Likewise.
5274 * util/i386/pc/grub-setup.c: Likewise.
5275 * util/i386/pc/misc.c: Likewise.
5276 * util/powerpc/ieee1275/grub-install.in: Likewise.
5277 * util/powerpc/ieee1275/grub-mkimage.c: Likewise.
5278 * util/powerpc/ieee1275/misc.c: Likewise.
5279 * video/bitmap.c: Likewise.
5280 * video/video.c: Likewise.
5281 * video/i386/pc/vbe.c: Likewise.
5282 * video/i386/pc/vbeblit.c: Likewise.
5283 * video/i386/pc/vbefill.c: Likewise.
5284 * video/i386/pc/vbeutil.c: Likewise.
5285 * video/readers/tga.c: Likewise.
5287 2007-07-02 Robert Millan <rmh@aybabtu.com>
5289 * conf/i386-efi.rmk: Replace obsolete reference to
5290 util/i386/pc/biosdisk.c with util/biosdisk.c, and util/i386/pc/getroot.c
5291 with util/getroot.c.
5292 * conf/powerpc-ieee1275.rmk: Likewise.
5293 * conf/sparc64-ieee1275.rmk: Likewise.
5295 * util/grub-emu.c (main): Fix unchecked pointer handling.
5297 2007-07-02 Robert Millan <rmh@aybabtu.com>
5299 * util/i386/efi/grub-install.in: Allow `grub_probe --target=partmap'
5300 invocation to fail, in order to support partition-less media.
5302 * util/i386/pc/grub-install.in: Likewise.
5304 * util/powerpc/ieee1275/grub-install.in: Use grub-probe to determine
5305 which fs or partmap modules are needed (akin to its sister scripts).
5307 Also use grub-probe to get rid of unportable /proc/mounts check.
5309 Print the same informational message that the other scripts do, before
5312 2007-06-23 Robert Millan <rmh@aybabtu.com>
5314 * util/update-grub_lib.in (font_path): New function. Determine whether
5315 a font file can be found and, if so, echo the GRUB path to it.
5317 * util/update-grub.in: Handle multiple terminals depending on user
5318 input, platform availability and font file presence. Propagate
5319 variables of our findings to /etc/grub.d/ children.
5321 * util/grub.d/00_header.in: Handle multiple terminals, based on
5322 environment setup by update-grub.
5324 2007-06-23 Robert Millan <rmh@aybabtu.com>
5326 * conf/i386-pc.rmk (pkgdata_MODULES): Add serial.mod.
5328 2007-06-21 Robert Millan <rmh@aybabtu.com>
5330 * include/grub/i386/pc/kernel.h: Define GRUB_KERNEL_MACHINE_DATA_END to
5331 indicate end of data section in kernel image.
5332 * include/grub/i386/efi/kernel.h: Define GRUB_KERNEL_MACHINE_PREFIX and
5333 GRUB_KERNEL_MACHINE_DATA_END.
5335 * kern/i386/pc/startup.S: Do not initialize grub_prefix, only reserve
5337 * kern/i386/efi/startup.S: Likewise.
5339 * util/i386/pc/grub-mkimage.c: Initialize grub_prefix to /boot/grub
5340 during image generation. Implement --prefix option to override this
5342 * util/i386/efi/grub-mkimage.c: Likewise.
5344 * util/update-grub_lib.in (convert_system_path_to_grub_path): Split
5345 code to make path relative to its root into a separate function.
5347 * util/i386/pc/grub-install.in: Use newly provided
5348 make_system_path_relative_to_its_root() to convert ${grubdir}, then
5349 pass the result to grub-install --prefix.
5351 2007-06-13 Robert Millan <rmh@aybabtu.com>
5353 * include/grub/util/misc.h: Define DEFAULT_DIRECTORY and
5355 * util/grub-emu.c: Use above definitions from misc.h instead of
5357 * util/grub-mkdevicemap.c: Likewise.
5358 * util/i386/pc/grub-setup.c: Likewise.
5359 * util/grub-probe.c: Likewise.
5360 (probe): Abort with grub_util_error() when either
5361 grub_guess_root_device or grub_util_get_grub_dev fails.
5363 2007-06-12 Robert Millan <rmh@aybabtu.com>
5365 * normal/command.c (grub_command_execute): Use NULL rather than 0 for
5367 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Likewise for
5369 * util/grub-probe.c (probe): Likewise for "drive_name".
5371 2007-06-11 Robert Millan <rmh@aybabtu.com>
5373 * util/i386/pc/grub-mkrescue.in: Pad both floppy images with zeroes,
5374 not just the cdrom one.
5376 2007-06-11 Robert Millan <rmh@aybabtu.com>
5378 * util/i386/pc/grub-mkrescue.in: Add "set -e".
5379 Add --pkglibdir=DIR option to override pkglibdir.
5380 Mention --image-type=TYPE in help output.
5381 Fix --grub-mkimage (it was a no-op).
5382 Abort gracefully when no parameter is given.
5384 2007-06-11 Robert Millan <rmh@aybabtu.com>
5386 * util/i386/pc/grub-mkrescue.in: New file.
5387 * conf/i386-pc.rmk: Add its build declarations. Put it in bin_SCRIPTS.
5388 * Makefile.in: Handle bin_SCRIPTS.
5390 2007-06-10 Vesa Jaaskelainen <chaac@nic.fi>
5392 * term/gfxterm.c (grub_gfxterm_init): Added support for specifying
5393 list of video modes.
5395 2007-06-06 Robert Millan <rmh@aybabtu.com>
5397 * util/update-grub_lib.in (convert_system_path_to_grub_path): Abort if
5398 file doesn't exist, or if it is in a filesystem grub can't read.
5400 * util/update-grub.in: Set fallback for GRUB_FS check to "unknown". Do
5401 not abort if GRUB_DRIVE could not be defined. Rearrange generated
5402 header comment to fit in 80 columns when the variables are resolved.
5404 * util/grub.d/00_header.in: Only set root variable when GRUB_DRIVE
5405 could be identified by update-grub. Remove redundant check for
5406 unifont.pff existence (since convert_system_path_to_grub_path now
5409 2007-06-04 Robert Millan <rmh@aybabtu.com>
5411 * conf/i386-efi.rmk (grub_probe_SOURCES): Add partmap/apple.c.
5413 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.
5415 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add partmap/pc.c.
5417 2007-06-04 Robert Millan <rmh@aybabtu.com>
5419 * conf/powerpc-ieee1275.rmk: Enable grub-mkdevicemap and grub-probe.
5421 * include/grub/partition.h: Declare grub_apple_partition_map_init and
5422 grub_apple_partition_map_fini.
5425 (grub_util_biosdisk_open): Replace BLKGETSIZE with BLKGETSIZE64 (needed
5426 to access >2 TiB disks).
5428 Print disk->total_sectors with %llu instead of %lu, since this
5429 variable is always 64-bit (prevents wrong disk size from being displayed
5430 on either >2 TiB disk or big-endian CPU).
5432 (grub_util_biosdisk_get_grub_dev): Convert gpt_partition_map handling
5433 into a generic case that supports all (sane) partition maps.
5435 Stop using grub_cpu_to_le32() on dos_part / bsd_part since it actually
5438 * util/grub-probe.c: Call grub_apple_partition_map_init() before probe()
5439 and grub_apple_partition_map_fini() after that.
5441 2007-06-01 Robert Millan <rmh@aybabtu.com>
5443 * util/update-grub.in: Export GRUB_CMDLINE_LINUX.
5445 * util/grub.d/00_header.in: Only enable gfxterm when
5446 convert_system_path_to_grub_path() succeeds.
5448 2007-05-20 Robert Millan <rmh@aybabtu.com>
5450 * util/update-grub_lib.in: New file.
5451 * DISTLIST: Add update-grub_lib.in.
5452 * conf/common.rmk: Generate update-grub_lib and install it in
5454 * Makefile.in: Add install routine for $(lib_DATA).
5456 * util/grub.d/00_header.in: Use convert_system_path_to_grub_path()
5457 function provided by update-grub_lib to support arbitrary paths of
5459 * util/update-grub.in: Use convert_system_path_to_grub_path() to
5460 initialize GRUB_DRIVE_BOOT and GRUB_DRIVE_BOOT_GRUB variables.
5462 2007-05-19 Robert Millan <rmh@aybabtu.com>
5464 * commands/i386/cpuid.c: New module.
5466 * conf/i386-efi.rmk: Enable cpuid.mod.
5467 * conf/i386-pc.rmk: Likewise.
5469 2007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
5471 * kern/disk.c (grub_disk_read): Check return value of
5474 2007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
5476 * util/getroot.c (grub_util_get_grub_dev): Support partitionable
5478 * disk/raid.c (grub_raid_open): Likewise.
5480 2007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
5482 * util/biosdisk.c (linux_find_partition): Allocate real_dev on the
5483 stack instead of on the heap.
5485 * kern/disk.c (grub_disk_read): Make sure tmp_buf is big enough
5486 before doing a read on it.
5488 * configure.ac: Only use -fno-stack-protector for the target
5491 2007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
5493 * video/i386/pc/vbe.c (grub_video_vbe_create_render_target): Add
5494 __attribute_ ((unused)) to mode_type argument.
5496 * util/getroot.c (grub_guess_root_device): Fix #endif.
5498 * kern/misc.c (memcmp): Fix prototype.
5500 * include/grub/partition.h [GRUB_UTIL]
5501 (grub_gpt_partition_map_init): Add prototype.
5502 (grub_gpt_partition_map_fini): Likewise.
5504 * fs/jfs.c (struct grub_jfs_inode): Put __attribute__ ((packed)
5507 * fs/fat.c (grub_fat_mount): Replace ~0UL with ~0U.
5508 (grub_fat_read_data): Likewise.
5509 (grub_fat_find_dir): Likewise.
5511 * font/manager.c (find_glyph): Make table a const.
5512 (grub_font_get_glyph): Remove bitmap from if statement.
5514 2007-05-16 Jeroen Dekkers <jeroen@dekkers.cx>
5516 * util/getroot.c (grub_guess_root_device): Remove RAID and LVM
5517 code, first search for device in /dev/mapper, then in /dev.
5518 (grub_util_get_grub_dev): New function.
5519 * include/grub/util/getroot.h (grub_util_get_grub_dev): Add
5521 * util/grub-probe.c (probe): Remove check for RAID, call
5522 grub_util_get_grub_dev() instead of
5523 grub_util_biosdisk_get_grub_dev().
5524 * util/grub-emu.c (main): Call grub_util_get_grub_dev() instead of
5525 grub_util_biosdisk_get_grub_dev().
5526 * util/i386/pc/grub-setup.c (main): Likewise.
5528 2007-05-16 Robert Millan <rmh@aybabtu.com>
5530 * DISTLIST: Update for the latest changes.
5531 * conf/i386-pc.rmk: Use the new paths for util/getroot.c,
5532 util/grub-mkdevicemap.c, util/grub-probe.c and util/biosdisk.c.
5533 * util/grub-emu.c: Replace grub/i386/pc/util/biosdisk.h with
5534 grub/util/biosdisk.h.
5535 * util/i386/pc/grub-setup.c: Replace grub/machine/util/biosdisk.h with
5536 grub/util/biosdisk.h.
5538 2007-05-16 Robert Millan <rmh@aybabtu.com>
5540 * util/grub.d/00_header.in: Set default gfxmode to `640x480'.
5542 2007-05-16 Robert Millan <rmh@aybabtu.com>
5544 * util/i386/efi/grub-install.in: New.
5545 * conf/i386-efi.rmk: Enable grub-mkdevicemap, grub-probe and the
5546 newly added grub-install.
5547 * util/biosdisk.c: Remove unnecessary grub/machine/biosdisk.h
5549 * util/getroot.c: Replace grub/i386/pc/util/biosdisk.h with
5550 grub/util/biosdisk.h.
5551 * util/grub-probe.c: Replace grub/machine/util/biosdisk.h with
5552 grub/util/biosdisk.h.
5554 2007-05-16 Robert Millan <rmh@aybabtu.com>
5556 * include/grub/i386/pc/util/biosdisk.h: Moved to ...
5557 * include/grub/util/biosdisk.h: ... here.
5558 * util/i386/pc/biosdisk.c: Moved to ...
5559 * util/biosdisk.c: ... here.
5560 * util/i386/pc/getroot.c: Moved to ...
5561 * util/getroot.c: ... here.
5562 * util/i386/pc/grub-mkdevicemap.c: Moved to ...
5563 * util/grub-mkdevicemap.c: ... here.
5564 * util/i386/pc/grub-probe.c: Moved to ...
5565 * util/grub-probe.c: ... here.
5567 2007-05-15 Robert Millan <rmh@aybabtu.com>
5569 * util/update-grub.in: Remove duplicated line in grub.cfg header
5572 2007-05-13 Robert Millan <rmh@aybabtu.com>
5574 * util/update-grub.in: Fix a few assumptions about the devices holding
5575 /, /boot and /boot/grub being the same.
5576 * util/grub.d/00_header.in: Likewise.
5577 * util/grub.d/10_hurd.in: Likewise.
5578 * util/grub.d/10_linux.in: Likewise.
5580 * util/grub.d/10_linux.in: Implement Linux image sorting with arbitrary
5581 patterns. Use that to define the `.old' suffix as older than `'.
5583 * util/grub.d/00_header.in: Set default gfxmode to `800x600x16'.
5585 * util/update-grub.in: Add a reference to ${sysconfdir}/default/grub in
5586 the grub.cfg header message.
5588 2007-05-11 Robert Millan <rmh@aybabtu.com>
5590 * util/update-grub.in: Create device.map if it doesn't already exist,
5591 before attempting to run grub-probe.
5592 Check for grub-probe and grub-mkdevicemap with the same code
5593 grub-install is using.
5596 2007-05-09 Jeroen Dekkers <jeroen@dekkers.cx>
5598 * Makefile.in: Add the datarootdir autoconf variable.
5600 2007-05-09 Robert Millan <rmh@aybabtu.com>
5602 * util/i386/pc/grub-probe.c (probe): When detecting partition map,
5603 fail gracefully if dev->disk->partition == NULL.
5605 2007-05-07 Robert Millan <rmh@aybabtu.com>
5607 * util/i386/pc/grub-probe.c: Add `grub-probe -t partmap' parameter to
5608 determine partition map module.
5609 * util/i386/pc/grub-install.in: Use this feature to decide which
5610 partition module to load, instead of hardcoding pc and gpt.
5612 2007-05-07 Robert Millan <rmh@aybabtu.com>
5614 * Makefile.in: Fix assumption that $(srcdir) has a trailing slash when
5615 source directory differs from build directory.
5617 2007-05-05 Robert Millan <rmh@aybabtu.com>
5619 * util/powerpc/ieee1275/grub-install.in: Fix syntax error in pkglibdir
5622 2007-05-05 Robert Millan <rmh@aybabtu.com>
5624 * util/update-grub.in: Create ${grub_prefix} if it doesn't exist.
5626 2007-05-05 Robert Millan <rmh@aybabtu.com>
5628 * util/grub.d/10_linux.in: Allow the administrator to insert Linux
5629 command-line arguments via ${GRUB_CMDLINE_LINUX}.
5631 2007-05-05 Robert Millan <rmh@aybabtu.com>
5633 * conf/i386-pc.rmk (grub_setup_SOURCES): Add partmap/gpt.c.
5634 (grub_probe_SOURCES): Likewise.
5635 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): Detect
5636 GPT and initialize dos_part and bsd_part accordingly.
5637 * util/i386/pc/grub-setup.c (setup): Ditto for install_dos_part and
5639 (main): Activate gpt module for use during partition identification,
5640 and deactivate it afterwards.
5641 * util/i386/pc/grub-install.in: Add gpt module to core.img.
5642 * util/i386/pc/grub-probe.c (main): Activate gpt module for use during
5643 partition identification, and deactivate it afterwards.
5645 2007-05-05 Robert Millan <rmh@aybabtu.com>
5647 * term/i386/pc/console.c (grub_console_fini): Call
5648 grub_term_set_current() before grub_term_unregister().
5650 2007-05-04 Robert Millan <rmh@aybabtu.com>
5652 * DISTLIST: Add util/update-grub.in, util/grub.d/00_header.in,
5653 util/grub.d/10_hurd.in, util/grub.d/10_linux.in and util/grub.d/README.
5654 * Makefile.in: Build update-grub_SCRIPTS. Install update-grub_SCRIPTS
5655 and update-grub_DATA.
5656 * conf/common.rmk: Build and install update-grub components.
5657 * conf/common.mk: Regenerate.
5658 * util/update-grub.in: New. Core of update-grub.
5659 * util/grub.d/00_header.in: New. Generates grub.cfg header.
5660 * util/grub.d/10_hurd.in: New. Generates boot entries for the Hurd.
5661 * util/grub.d/10_linux.in: New. Generates boot entries for Linux.
5662 * util/grub.d/README: New. Document grub.d directory layout.
5664 2007-05-01 Robert Millan <rmh@aybabtu.com>
5666 * util/grub-emu.c: Move initialization functions
5667 grub_util_biosdisk_init() and grub_init_all() before
5668 grub_util_biosdisk_get_grub_dev(), which relies on them.
5670 2007-04-19 Robert Millan <rmh@aybabtu.com>
5672 * util/powerpc/ieee1275/grub-install.in: Initialize ${bindir}, since
5675 2007-04-18 Jerone Young <jerone@gmail.com>
5677 * kernel/elf.c: Add missing parenthesis for conditional statement
5680 2007-04-10 Jerone Young <jerone@gmail.com>
5682 * util/i386/pc/getroot.c: Update so that if root device is /dev/root ,
5683 continue on and look for device node with real device name.
5685 2007-04-10 Jerone Young <jerone@gmail.com>
5687 * configure.ac: Add argument for autoconf to use transformation
5689 * Makefile.in: Add autoconf package transformation code.
5690 * util/i386/pc/grub-install.in: Likewise.
5691 * util/powerpc/ieee1275/grub-install.in: Likewise.
5693 2007-03-19 Yoshinori K. Okuji <okuji@enbug.org>
5695 * fs/ext2.c (EXT2_GOOD_OLD_REVISION): New macro.
5696 (EXT2_GOOD_OLD_INODE_SIZE): Likewise.
5697 (EXT2_REVISION): Likewise.
5698 (EXT2_INODE_SIZE): Likewise.
5699 (struct grub_ext2_block_group): Added a missing member
5701 (grub_ext2_read_inode): Divide by the inode size in a superblock
5702 instead of 128 to obtain INODES_PER_BLOCK.
5703 Use the macro EXT2_INODE_SIZE instead of directly using
5706 2007-03-18 Yoshinori K. Okuji <okuji@enbug.org>
5708 * fs/ext2.c (grub_ext2_read_inode): Use the inode size in a
5709 superblock instead of the structure size to compute an
5710 offset. This fixes the problem that GRUB could not read a
5711 filesystem when inode size is different from 128-byte.
5713 2007-03-05 Marco Gerards <marco@gnu.org>
5715 * normal/main.c (read_config_file): When "menu" is not set, create
5718 2007-02-21 Hollis Blanchard <hollis@penguinppc.org>
5720 * kern/powerpc/ieee1275/init.c (HEAP_SIZE): Removed.
5721 (HEAP_LIMIT): New macro.
5722 (grub_claim_heap): Claim memory up to `heaplimit'.
5724 2007-02-21 Hollis Blanchard <hollis@penguinppc.org>
5726 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Link at 64KB.
5727 * kern/powerpc/ieee1275/init.c (_end): Add declaration.
5729 (grub_arch_modules_addr): Return address after `_end'.
5730 * util/powerpc/ieee1275/grub-mkimage.c: Include grub/misc.h.
5731 (load_modules): Use new parameter as `p_paddr' and `p_vaddr'.
5732 (add_segments): Calculate `_end' from phdr size and location.
5733 (ALIGN_UP): Moved to ...
5734 * include/grub/misc.h: here.
5735 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
5737 (GRUB_IEEE1275_MODULE_BASE): Removed.
5739 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
5741 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Correct
5744 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
5746 * include/grub/elfload.h (grub_elf32_load_hook_t): Return grub_err_t.
5748 (grub_elf64_load_hook_t): Likewise.
5749 * kern/elf.c: Call `grub_error_push' before `grub_error'. Improve
5752 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
5754 * kern/mm.c: Update copyright.
5755 (grub_mm_debug): Correct syntax error.
5756 (grub_mm_dump_free): New function.
5757 (grub_debug_free): Call `grub_free'.
5758 * include/grub/mm.h: Update copyright.
5759 (grub_mm_dump_free): Add declaration.
5761 2007-02-12 Hollis Blanchard <hollis@penguinppc.org>
5763 * include/grub/ieee1275/ieee1275.h: Update copyright.
5764 * kern/powerpc/ieee1275/init.c: Likewise.
5765 * kern/powerpc/ieee1275/openfw.c: Likewise.
5767 * loader/powerpc/ieee1275/linux.c: Likewise.
5768 * include/grub/elfload.h: Likewise.
5769 * kern/elf.c: Likewise.
5770 (grub_elf32_load): Pass `base' and `size' parameters. Update all
5772 (grub_elf64_load): Likewise.
5773 (grub_elf32_load_segment): Move to a nested function.
5774 (grub_elf64_load_segment): Likewise.
5776 2007-02-12 Hollis Blanchard <hollis@penguinppc.org>
5778 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): New
5780 * kern/powerpc/ieee1275/init.c (grub_heap_start): Removed.
5781 (grub_heap_len): Likewise.
5782 (HEAP_SIZE): New macro.
5783 (grub_claim_heap): New function.
5784 (grub_machine_init): Don't claim heap directly. Call
5786 * kern/powerpc/ieee1275/openfw.c: Include alloca.h.
5787 (grub_available_iterate): New function.
5789 2007-02-03 Thomas Schwinge <tschwinge@gnu.org>
5791 * aclocal.m4 (grub_CHECK_STACK_PROTECTOR): New definition.
5792 * configure.ac: Use it for testing the HOST and TARGET compilers.
5794 2006-12-13 Thomas Schwinge <tschwinge@gnu.org>
5796 * Makefile.in (enable_grub_emu): New variable.
5797 * configure.ac (--enable-grub-emu): New option.
5798 Do the checks for (n)curses only if `--enable-grub-emu' is requested.
5799 * conf/i386-efi.rmk (sbin_UTILITIES): Add `grub-emu' only if requested.
5800 * conf/i386-pc.rmk: Likewise.
5801 * conf/powerpc-ieee1275.rmk: Likewise.
5802 * conf/sparc64-ieee1275.rmk (bin_UTILITIES): Likewise.
5804 2006-12-12 Marco Gerards <marco@gnu.org>
5806 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_MENU'.
5808 * kern/env.c (grub_env_unset): Don't free the member `value' when
5809 the type is GRUB_ENV_VAR_DATA, in this case it's a user defined
5812 * normal/main.c (current_menu): Removed.
5813 (free_menu): Unset the `menu' environment variable.
5814 (grub_normal_menu_addentry): Make use of the environment variable
5815 `menu', instead of using the global `current_menu'. Allocate
5816 memory for the sourcecode of this entry.
5817 (read_config_file): New argument `nested', changed all callers.
5818 Only in the case of a new context, initialize a new menu. Set the
5819 `menu' environment variable.
5820 (grub_normal_execute): Don't set and unset the environment
5821 variable `menu' here anymore. Only free the menu when leaving the
5824 * util/i386/pc/biosdisk.c (linux_find_partition): Fixed a memory
5827 2006-12-11 Marco Gerards <marco@gnu.org>
5829 * normal/menu_entry.c (run): Fix off by one bug so the last line
5830 is executed. Move the loader check to outside the loop.
5832 2006-12-08 Hollis Blanchard <hollis@penguinppc.org>
5834 * kern/powerpc/ieee1275/cmain.c (cmain): Mark r3 and r4 as `UNUSED'.
5836 2006-11-25 Yoshinori K. Okuji <okuji@enbug.org>
5838 * util/i386/pc/grub-mkimage.c (generate_image): Fix the offset of
5839 the number of sectors. Reported by Andrey Shuvikov
5840 <mr_hyro@yahoo.com>.
5842 2006-11-11 Jeroen Dekkers <jeroen@dekkers.cx>
5844 * kern/disk.c (grub_disk_read): When there is a read error, always
5845 try to read only the necessary data.
5847 * conf/i386-pc.rmk (grub_probe_SOURCES): Add disk/lvm.c and
5849 * include/grub/disk.h [GRUB_UTIL] (grub_raid_init): New
5851 [GRUB_UTIL] (grub_raid_fini): Likewise.
5852 [GRUB_UTIL] (grub_lvm_init): Likewise.
5853 [GRUB_UTIL] (grub_lvm_fini): Likewise.
5854 * util/i386/pc/grub-probe.c (probe): Check whether DEVICE_NAME is
5855 RAID device and copy DEVICE_NAME to DRIVE_NAME in that case.
5856 (main): Call grub_raid_init(), grub_lvm_init(), grub_lvm_fini()
5857 and grub_raid_fini().
5859 2006-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
5861 * include/grub/types.h (__unused): Rename to UNUSED.
5862 * kern/elf.c (grub_elf32_size): Use UNUSED instead of __unused.
5863 (grub_elf64_size): Likewise.
5865 2006-11-03 Hollis Blanchard <hollis@penguinppc.org>
5867 * kern/elf.c (grub_elf_file): Call grub_file_seek. Call
5868 grub_error_push and grub_error_pop in the error-handling path.
5869 (grub_elf32_load_segment): Only call grub_file_read with non-zero
5872 2006-11-03 Hollis Blanchard <hollis@penguinppc.org>
5874 * conf/i386-efi.rmk (grub_emu_SOURCES): Add kern/elf.c.
5875 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
5876 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5877 (kernel_elf_SOURCES): Likewise.
5878 * conf/i386-efi.rmk (kernel_mod_HEADERS): Add elfload.h and cache.h.
5879 * conf/i386-pc.rmk (kernel_mod_HEADERS): Likewise.
5880 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
5881 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
5882 * conf/common.rmk (pkgdata_MODULES): Add elf.mod.
5883 (elf_mod_SOURCES): New variable.
5884 (elf_mod_CFLAGS): Likewise.
5885 (elf_mod_LDFLAGS): Likewise.
5886 * include/grub/types.h (__unused): New macro.
5887 * include/grub/elfload.h: New file.
5888 * kern/elf.c: Likewise.
5889 * loader/powerpc/ieee1275/linux.c: Include elfload.h.
5890 (ELF32_LOADMASK): New macro.
5891 (ELF64_LOADMASK): Likewise.
5893 (grub_linux_load32): New function.
5894 (grub_linux_load64): Likewise.
5895 (grub_rescue_cmd_linux): Call grub_linux_load32 or grub_linux_load64.
5896 Use grub_elf_t instead of grub_file_t.
5898 2006-11-02 Hollis Blanchard <hollis@penguinppc.org>
5900 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): Add
5901 `catch_result' to struct set_color_args.
5903 2006-10-28 Yoshinori K. Okuji <okuji@enbug.org>
5905 * normal/menu.c: Include grub/script.h.
5906 * normal/menu_entry.c: Likewise.
5907 * include/grub/normal.h: Do not include grub/script.h.
5909 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
5911 * kern/disk.c (grub_disk_read): Correct debug printf formatting.
5913 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
5915 * kern/disk.c (grub_disk_open): Print debug messages when opening a
5917 (grub_disk_close): Print debug messages when closing a disk.
5918 (grub_disk_read): Print debug messages when disk read fails.
5919 * kern/fs.c (grub_fs_probe): Print debug messages when detecting
5921 * kern/partition.c: Include misc.h.
5922 (grub_partition_iterate): Print debug messages when detecting
5925 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
5927 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Return error if `status'
5929 * kern/ieee1275/ieee1275.c (IEEE1275_IHANDLE_INVALID): Change to 0.
5931 2006-10-26 Hollis Blanchard <hollis@penguinppc.org>
5933 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
5934 Reverse GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS test.
5936 2006-10-25 Jeroen Dekkers <jeroen@dekkers.cx>
5938 * disk/lvm.c (grub_lvm_scan_device): Malloc sizeof(*lv) bytes
5939 instead of sizeof(lv). Patch by Michael Guntsche.
5941 2006-10-18 Jeroen Dekkers <jeroen@dekkers.cx>
5943 * disk/lvm.c: Rename VGS to VG_LIST.
5944 (grub_lvm_iterate): Change VGS->LV to VG-LV.
5945 (grub_lvm_open): Likewise.
5946 Thanks to Michael Guntsche for finding this bug.
5948 2006-10-15 Yoshinori K. Okuji <okuji@enbug.org>
5950 * configure.ac (AC_INIT): Bumped to 1.95.
5952 2006-10-14 Robert Millan <rmh@aybabtu.com>
5954 * util/i386/pc/getroot.c (grub_guess_root_device): Don't compare os_dev
5955 with "/dev/.static/dev/md".
5957 2006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
5959 * util/i386/pc/grub-probe.c (probe): Print DEVICE_NAME instead of
5960 DRIVE_NAME when grub_util_biosdisk_get_grub_dev fails. Open
5961 DRIVE_NAME instead of DEVICE_NAME. Make sure that DEVICE_NAME and
5962 DRIVE_NAME are always freed.
5964 * util/i386/pc/biosdisk.c (make_device_name): Add one into
5965 DOS_PART, as a DOS partition is counted from one instead of zero
5966 now. Reported by Robert Millan.
5968 2006-10-14 Robert Millan <rmh@aybabtu.com>
5970 * util/i386/pc/getroot.c (grub_guess_root_device): Stop using
5971 grub_util_biosdisk_get_grub_dev to convert system device to GRUB device.
5972 * util/grub-emu.c (main): Use grub_util_biosdisk_get_grub_dev with the
5973 string returned by grub_guess_root_device.
5974 * util/i386/pc/grub-setup.c: Likewise.
5975 * util/i386/pc/grub-probefs.c: Likewise.
5977 * util/i386/pc/grub-probefs.c: Rename to ...
5978 * util/i386/pc/grub-probe.c: ... this.
5979 * DISTLIST: Remove grub-probefs, add grub-probe.
5980 * conf/i386-efi.rmk: Likewise.
5981 * conf/i386-pc.rmk: Likewise.
5982 * util/i386/pc/grub-install.in: Likewise.
5984 * util/i386/pc/grub-probe.c: Add --target=(fs|device|drive) option to
5985 choose which information we want to print.
5987 2006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
5989 * DISTLIST: Added commands/echo.c, disk/lvm.c, disk/raid.c,
5990 include/grub/bitmap.h, include/grub/lvm.h, include/grub/raid.h,
5991 include/grub/i386/pc/vbeutil.h, include/grub/util/lvm.h,
5992 include/grub/util/raid.h, util/lvm.c, util/raid.c, video/bitmap.c,
5993 video/readers/tga.c and video/i386/pc/vbeutil.c.
5995 2006-10-14 Jeroen Dekkers <jeroen@dekkers.cx>
5997 Added support for RAID and LVM.
5999 * disk/lvm.c: New file.
6000 * disk/raid.c: Likewise.
6001 * include/grub/lvm.h: Likewise.
6002 * include/grub/raid.h: Likewise.
6003 * include/grub/util/lvm.h: Likewise.
6004 * include/grub/util/raid.h: Likewise.
6005 * util/lvm.c: Likewise.
6006 * util/raid.c: Likewise.
6008 * include/grub/disk.h (grub_disk_dev_id): Add
6009 GRUB_DISK_DEVICE_RAID_ID and GRUB_DISK_DEVICE_LVM_ID.
6010 (grub_disk_get_size): New prototype.
6011 * kern/disk.c (grub_disk_open): Check whether grub_partition_probe()
6012 returns a partition.
6013 (grub_disk_get_size): New function.
6015 * kern/i386/pc/init.c (make_install_device): Copy the prefix
6016 verbatim if grub_install_dos_part is -2.
6018 * util/i386/pc/getroot.c (grub_guess_root_device): Support RAID
6021 * util/i386/pc/grub-setup.c (setup): New argument
6022 MUST_EMBED. Force embedding of GRUB when the argument is
6023 true. Close FILE before returning.
6024 (main): Add support for RAID and LVM.
6026 * conf/common.rmk: Add RAID and LVM modules.
6027 * conf/i386-pc.rmk (grub_setup_SOURCES): Add util/raid.c and
6029 (grub_emu_SOURCES): Add disk/raid.c and disk/lvm.c.
6031 * kern/misc.c (grub_strstr): New function.
6032 * include/grub/misc.h (grub_strstr): New prototype.
6034 2006-10-10 Tristan Gingold <tristan.gingold@bull.net>
6036 * include/grub/efi/api.h (GRUB_EFI_ERROR_CODE): Long constant.
6038 2006-10-05 Tristan Gingold <tristan.gingold@bull.net>
6040 * kern/misc.c (grub_strtoull): Guess the base only if not
6043 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
6045 * kern/powerpc/ieee1275/cmain.c (cmain): Remove incomplete Old World
6048 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
6050 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Cast `size' to long.
6052 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_next_property):
6053 Remove `flags' argument. All callers changed.
6054 * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_ROOT): Removed.
6055 (IEEE1275_IHANDLE_INVALID): New variable.
6056 (IEEE1275_CELL_INVALID): New variable.
6057 (grub_ieee1275_finddevice, grub_ieee1275_get_property,
6058 grub_ieee1275_get_property_length, grub_ieee1275_instance_to_package,
6059 grub_ieee1275_package_to_path, grub_ieee1275_instance_to_path,
6060 grub_ieee1275_peer, grub_ieee1275_child, grub_ieee1275_open,
6061 grub_ieee1275_claim, grub_ieee1275_set_property): Error-check return
6062 codes from Open Firmware. All callers updated.
6063 (grub_ieee1275_next_property): Directly return Open Firmware return
6065 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
6066 Standardize error checking from `grub_ieee1275_get_property'.
6067 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Rename
6068 `devalias' to `aliases'. Correct comments. Consolidate error paths.
6070 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
6072 * kern/ieee1275/ieee1275.c (grub_ieee1275_instance_to_path): Rename
6073 `instance_to_package_args' to `instance_to_path_args'.
6075 * kern/powerpc/ieee1275/init.c (grub_machine_init): Use
6076 `grub_ieee1275_chosen'.
6078 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Call
6079 `grub_ieee1275_interpret'.
6081 2006-09-25 Hollis Blanchard <hollis@penguinppc.org>
6083 * util/powerpc/ieee1275/grub-mkimage.c: Include config.h.
6085 2006-09-25 Hollis Blanchard <hollis@penguinppc.org>
6087 * include/grub/powerpc/libgcc.h (__floatdisf): New prototype.
6088 (__cmpdi): Likewise.
6090 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Pass 0 as
6091 `flags' to `grub_ieee1275_next_property'. Change `pathlen' to type
6094 * kern/powerpc/ieee1275/cmain.c: Include grub/misc.h.
6096 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Change `actual'
6097 to type `grub_ssize_t'.
6098 (grub_rescue_cmd_linux): Cast -1 to `grub_off_t'.
6100 2006-09-22 Marco Gerards <marco@gnu.org>
6102 * normal/script.c (grub_script_create_cmdmenu): Skip leading
6105 2006-09-22 Marco Gerards <marco@gnu.org>
6107 * commands/echo.c: New file.
6109 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/echo.c'.
6111 * conf/common.rmk (echo_mod_SOURCES): New variable.
6112 (echo_mod_CFLAGS): Likewise.
6113 (echo_mod_LDFLAGS): Likewise.
6115 2006-09-22 Marco Gerards <marco@gnu.org>
6117 * normal/main.c (get_line): Malloc memory instead of using
6118 preallocated memory. Removed the arguments `cmdline' and
6119 `max_len'. Updated all callers.
6121 2006-09-22 Marco Gerards <marco@gnu.org>
6123 * conf/i386-efi.rmk (grub_emu_DEPENDENCIES): New variable.
6124 (normal_mod_DEPENDENCIES): Likewise.
6126 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Likewise.
6127 (normal_mod_DEPENDENCIES): Likewise.
6129 * conf/sparc64-ieee1275.rmk (normal_mod_DEPENDENCIES): Likewise.
6131 2006-09-22 Johan Rydberg <jrydberg@gnu.org>
6133 * genmk.rb: Add DEPENDENCIES variables to modules, utilities, and
6135 * conf/i386-pc.rmk (grub_emu_DEPENDENCIES): Declare.
6136 (normal_mod_DEPENDENCIES): Likewise.
6137 * conf/i386-pc.mk: Regenerate.
6138 * conf/i386-efi.mk: Likewise
6139 * conf/common.mk: Likewise.
6140 * conf/powerpc-ieee1275.mk: Likewise.
6141 * conf/sparc64-ieee1275.mk: Likewise.
6143 2006-09-22 Robert Millan <rmh@aybabtu.com>
6145 Sync with i386 version.
6146 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Remove grub-emu, add grub-mkimage.
6147 * conf/powerpc-ieee1275.rmk (sbin_UTILITIES): Remove grub-mkimage, add grub-emu.
6149 2006-09-21 Robert Millan <rmh@aybabtu.com>
6151 Import from GRUB Legacy (lib/device.c):
6152 * util/i386/pc/grub-mkdevicemap.c (get_i2o_disk_name): New function.
6153 (init_device_map) [__linux__]: Add support for I2O devices.
6155 2006-09-14 Marco Gerards <marco@gnu.org>
6157 * conf/i386-pc.rmk (COMMON_LDFLAGS): Use `-m32' instead of
6160 2006-09-14 Robert Millan <rmh@aybabtu.com>
6162 * util/i386/pc/grub-install.in: Skip menu.lst when removing
6165 * util/i386/pc/getroot.c: Don't recurse into dotdirs (e.g. ".static").
6167 * util/i386/pc/grub-mkdevicemap.c: Make sure the floppy device exists
6168 before adding it to device.map.
6170 2006-08-15 Johan Rydberg <jrydberg@gnu.org>
6172 * genmk.rb: Let GCC generate dependencies the first time it
6173 compiles a file; using the -MD option.
6174 * conf/common.mk: Regenerate.
6175 * conf/i386-pc.mk: Likewise.
6176 * conf/i386-efi.mk: Likewise.
6177 * conf/powerpc-ieee1275.mk: Likewise.
6178 * conf/sparc64-ieee1275.mk: Likewise.
6180 2006-08-04 Yoshinori K. Okuji <okuji@enbug.org>
6182 Move the prototypes of grub_setjmp and grub_longjmp to
6183 cpu/setjmp.h, so that each architecture may specify different
6186 * include/grub/i386/setjmp.h (grub_setjmp): New prototype.
6187 (grub_longjmp): Likewise.
6188 * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise..
6189 (grub_longjmp): Likewise.
6190 * include/grub/sparc64/setjmp.h (grub_setjmp): Likewise..
6191 (grub_longjmp): Likewise.
6193 * include/grub/setjmp.h [!GRUB_UTIL] (grub_setjmp): Removed.
6194 [!GRUB_UTIL] (grub_longjmp): Removed.
6196 2006-08-01 Pelletier Vincent <subdino2004@yahoo.fr>
6198 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): IEEE1275
6199 "color!" method does not return any value.
6201 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
6203 * include/grub/bitmap.h: New file.
6205 * include/grub/i386/pc/vbeutil.h: Likewise.
6207 * video/bitmap.c: Likewise.
6209 * video/readers/tga.c: Likewise.
6211 * video/i386/pc/vbeutil.c: Likewise.
6213 * commands/videotest.c: Code cleanup and updated to reflect to new
6216 * term/gfxterm.c: Likewise.
6218 * video/video.c: Likewise.
6220 * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod.
6221 (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c.
6222 (bitmap_mod_SOURCES): New entry.
6223 (bitmap_mod_CFLAGS): Likewise.
6224 (bitmap_mod_LDFLAGS): Likewise.
6225 (tga_mod_SOURCES): Likewise.
6226 (tga_mod_CFLAGS): Likewise.
6227 (tga_mod_LDFLAGS): Likewise.
6229 * include/grub/video.h (grub_video_blit_operators): New enum type.
6230 (grub_video_render_target): Changed as forward declaration and moved
6231 actual definition to be video driver specific.
6232 (grub_video_adapter.blit_bitmap): Added blitting operator.
6233 (grub_video_adapter.blit_render_target): Likewise.
6234 (grub_video_blit_bitmap): Likewise.
6235 (grub_video_blit_render_target): Likewise.
6237 * include/grub/i386/pc/vbe.h (grub_video_render_target): Added
6238 driver specific render target definition.
6239 (grub_video_vbe_map_rgba): Added driver internal helper.
6240 (grub_video_vbe_unmap_color): Updated to use
6241 grub_video_i386_vbeblit_info.
6242 (grub_video_vbe_get_video_ptr): Likewise.
6244 * include/grub/i386/pc/vbeblit.h
6245 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use
6246 grub_video_i386_vbeblit_info.
6247 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
6248 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
6249 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
6250 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
6251 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
6252 (grub_video_i386_vbeblit_index_index): Likewise.
6253 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function.
6254 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
6255 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
6256 (grub_video_i386_vbeblit_blend): Added generic blitter for blend
6258 (grub_video_i386_vbeblit_replace): Added generic blitter for replace
6261 * video/i386/pc/vbeblit.c: Updated to reflect changes on
6262 include/grub/i386/pc/vbeblit.h.
6264 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8):
6265 Updated to use grub_video_i386_vbeblit_info.
6266 (grub_video_i386_vbefill_R8G8B8): Likewise.
6267 (grub_video_i386_vbefill_index): Likewise.
6268 (grub_video_i386_vbefill): Added generic filler.
6270 * video/i386/pc/vbefill.c: Updated to reflect changes on
6271 include/grub/i386/pc/vbefill.h.
6273 * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use
6274 grub_video_i386_vbeblit_info.
6275 (grub_video_vbe_unmap_color): Likewise.
6276 (grub_video_vbe_blit_glyph): Likewise.
6277 (grub_video_vbe_scroll): Likewise.
6278 (grub_video_vbe_draw_pixel): Removed function.
6279 (grub_video_vbe_get_pixel): Likewise.
6280 (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and
6281 updated code to use it.
6282 (common_blitter): Added common blitter for render target and bitmap.
6283 (grub_video_vbe_blit_bitmap): Updated to use common_blitter.
6284 (grub_video_vbe_blit_render_target): Likewise.
6286 2006-07-30 Johan Rydberg <jrydberg@gnu.org>
6288 * kern/efi/efi.c (grub_efi_set_text_mode): Assume console already
6289 is in text mode if there is no console control protocol instance
6292 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
6294 * include/grub/video.h: Code cleanup.
6296 * include/grub/i386/pc/vbe.h: Likewise.
6298 * video/i386/pc/vbe.c: Likewise.
6300 * video/i386/pc/vbeblit.c: Likewise.
6302 * video/i386/pc/vbefill.c: Likewise.
6304 * video/video.c: Likewise. Also added more comments.
6306 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
6308 * disk/i386/pc/biosdisk.c (struct grub_biosdisk_drp): Moved to ...
6309 (struct grub_biosdisk_dap): Likewise.
6311 * include/grub/i386/pc/biosdisk.h: ... to here. Also corrected
6312 linkage settings for all functions.
6314 2006-07-12 Marco Gerards <marco@gnu.org>
6316 * configure.ac (--enable-mm-debug): Fix typo.
6318 * genkernsyms.sh.in: Use proper quoting for `CC'.
6320 2006-07-02 Jeroen Dekkers <jeroen@dekkers.cx>
6322 * conf/i386-pc.rmk (COMMON_ASFLAGS): Add "-m32".
6323 (normal_mod_ASFLAGS): Remove "-m32".
6325 2006-06-14 Yoshinori K. Okuji <okuji@enbug.org>
6327 * util/misc.c: Include config.h.
6328 [!HAVE_MEMALIGN]: Do not include malloc.h.
6329 (grub_memalign): Use posix_memalign, if present. Then, use
6330 memalign, if present. Otherwise, emit an error.
6332 * util/grub-emu.c: Do not include malloc.h.
6334 * include/grub/util/misc.h: Include unistd.h. This is required for
6335 FreeBSD, because off_t is defined in unistd.h. Reported by Harley
6336 D. Eades III <hde@foobar-qux.org>.
6338 * configure.ac (AC_GNU_SOURCE): Added.
6339 (AC_CHECK_FUNCS): Check posix_memalign and memalign for the host
6342 2006-06-09 Yoshinori K. Okuji <okuji@enbug.org>
6344 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Make sure that
6345 ADDR_MAX does not exceed GRUB_LINUX_INITRD_MAX_ADDRESS.
6347 2006-06-07 Jeroen Dekkers <jeroen@dekkers.cx>
6349 * include/grub/types.h (grub_host_addr_t): Rename to
6351 (grub_host_off_t): Rename to grub_target_off_t.
6352 (grub_host_size_t): Rename to grub_target_size_t.
6353 (grub_host_ssize_t): Rename to grub_target_ssize_t.
6354 Refer to GRUB_TARGET_SIZEOF_VOID_P to define those variables.
6356 * include/grub/kernel.h (struct grub_module_header): Change type
6357 of OFFSET to grub_target_off_t and type of SIZE to grub_target_size_t.
6358 (grub_module_info): Likewise.
6360 2006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
6362 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): The conditional
6363 of checking LINUX_MEM_SIZE was reverse. Reported by Jesus
6364 Velazquez <jesus.velazquez@gmail.com>.
6366 2006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
6368 Count partitions from 1 instead of 0 in the string representation
6369 of partitions. Still use 0-based internally.
6371 * partmap/sun.c (grub_sun_is_valid): A cosmetic change.
6372 (sun_partition_map_iterate): Use grub_partition_t instead of
6373 struct grub_partition *. Cast DESC->START_CYLINDER to
6374 grub_uint64_t after converting the endian.
6375 (sun_partition_map_probe): Subtract 1 for PARTNUM.
6376 (sun_partition_map_get_name): Add 1 to P->INDEX.
6378 * partmap/pc.c (grub_partition_parse): Subtract 1 for
6380 (pc_partition_map_get_name): Add 1 into PCDATA->DOS_PART.
6382 * partmap/gpt.c (gpt_partition_map_iterate): Initialize PARTNO to
6383 zero instead of one.
6384 (gpt_partition_map_probe): Subtract 1 for PARTNUM.
6385 (gpt_partition_map_get_name): Add 1 into P->INDEX.
6387 * partmap/apple.c (apple_partition_map_iterate): Change the type
6389 (apple_partition_map_probe): Subtract 1 for PARTNUM.
6390 (apple_partition_map_get_name): Add 1 into P->INDEX.
6392 * partmap/amiga.c (amiga_partition_map_iterate): Change the type
6394 (amiga_partition_map_iterate): Cast NEXT to grub_off_t to
6395 calculate the offset of a partition.
6396 (amiga_partition_map_probe): Subtract 1 for PARTNUM.
6397 (amiga_partition_map_get_name): Add 1 into P->INDEX.
6399 * partmap/acorn.c (acorn_partition_map_find): Change the type of
6400 SECTOR to grub_disk_addr_t.
6401 (acorn_partition_map_iterate): Likewise.
6402 (acorn_partition_map_probe): Subtract 1 for PARTNUM.
6403 Change the type of SECTOR to grub_disk_addr_t. Declare P on the
6405 (acorn_partition_map_get_name): Add 1 into P->INDEX.
6407 * kern/i386/pc/init.c (make_install_device): Add 1 into
6408 GRUB_INSTALL_DOS_PART.
6410 * fs/iso9660.c (grub_iso9660_mount): Fixed a reversed
6413 2006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
6415 Clean up the code to support 64-bit addressing in disks and
6416 files. This change is not enough for filesystems yet.
6418 * util/i386/pc/grub-setup.c (struct boot_blocklist): Change the
6419 type of "start" to grub_uint64_t.
6420 (setup): Change the types of KERNEL_SECTOR and FIRST_SECTOR to
6421 grub_disk_addr_t * and grub_disk_addr_t. Fix the format string in
6422 save_first_sector and save_blocklists. Use grub_le_to_cpu64 to
6425 * util/i386/pc/biosdisk.c (open_device): Change the type of SECTOR
6426 to grub_disk_addr_t.
6428 * partmap/gpt.c (gpt_partition_map_iterate): Fix the format
6431 * partmap/pc.c (pc_partition_map_iterate): Likewise.
6433 * partmap/amiga.c (amiga_partition_map_iterate): Cast RDSK.MAGIC
6436 * normal/script.c (grub_script_parse): Remove unused MEMFREE.
6438 * normal/parser.y (YYLTYPE_IS_TRIVIAL): New macro.
6440 * normal/lexer.c (grub_script_yyerror): Specify unused to LEX.
6442 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf64): Cast -1
6443 to grub_off_t, to detect an error from grub_file_seek.
6444 (grub_multiboot_load_elf32): Likewise.
6446 * kern/misc.c (grub_strtoul): Use grub_strtoull. Return the
6447 maximum unsigned long value when an overflow is detected.
6448 (grub_strtoull): New function.
6449 (grub_divmod64): Likewise.
6450 (grub_lltoa): use grub_divmod64.
6452 * kern/fs.c (struct grub_fs_block): Change the type of "offset" to
6454 (grub_fs_blocklist_open): Increase P if P is not NULL to advance
6455 the pointer to next character. Use grub_strtoull instead of
6457 (grub_fs_blocklist_read): Change the types of SECTOR, OFFSET and
6458 SIZE to grub_disk_addr_t, grub_off_t and grub_size_t,
6461 * kern/file.c (grub_file_read): Prevent an overflow of LEN, as the
6462 return value is signed.
6463 (grub_file_seek): Change the type of OLD to grub_off_t. Do not
6464 test if OFFSET is less than zero, as OFFSET is unsigned now.
6466 * kern/disk.c (struct grub_disk_cache): Change the type of
6467 "sector" to grub_disk_addr_t.
6468 (grub_disk_cache_get_index): Change the type of SECTOR to
6469 grub_disk_addr_t. Calculate the hash with SECTOR casted to
6470 unsigned after shifting.
6471 (grub_disk_cache_invalidate): Change the type of SECTOR to
6473 (grub_disk_cache_unlock): Likewise.
6474 (grub_disk_cache_store): Likewise.
6475 (grub_disk_check_range): Change the types of SECTOR, OFFSET, SIZE,
6476 START and LEN to grub_disk_addr_t *, grub_off_t *, grub_size_t,
6477 grub_disk_addr_t and grub_uint64_t, respectively.
6478 (grub_disk_read): Use an unsigned variable REAL_OFFSET for the
6479 body, as the value of OFFSET is tweaked by
6480 grub_disk_check_range. Change the types of START_SECTOR, LEN and
6481 POS to grub_disk_addr_t, grub_size_t and grub_size_t,
6483 (grub_disk_write): Use an unsigned variable REAL_OFFSET for the
6484 body, as the value of OFFSET is tweaked by
6485 grub_disk_check_range. Change the types of LEN and N to
6488 * io/gzio.c (struct grub_gzio): Change the types of "data_offset"
6489 and "saved_offset" to grub_off_t.
6490 (test_header): Cast BUF to char *.
6491 (get_byte): Cast GZIO->DATA_OFFSET to grub_off_t. Cast GZIO->INBUF
6493 (grub_gzio_read): Change the types of OFFSET and SIZE to
6494 grub_off_t and grub_size_t, respectively.
6496 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_FORCE_LBA):
6498 (GRUB_BOOT_MACHINE_BOOT_DRIVE): Changed to 0x4c.
6499 (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Changed to 0x40.
6500 (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Changed to 0x42.
6501 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Changed to 0x4e.
6502 (GRUB_BOOT_MACHINE_LIST_SIZE): Increased to 12.
6504 * include/grub/types.h (grub_off_t): Unconditionally set to
6506 (grub_disk_addr_t): Changed to grub_uint64_t.
6508 * include/grub/partition.h (struct grub_partition): Change the
6509 types of "start", "len" and "offset" to grub_disk_addr_t,
6510 grub_uint64_t and grub_disk_addr_t, respectively.
6511 (grub_partition_get_start): Return grub_disk_addr_t.
6512 (grub_partition_get_len): Return grub_uint64_t.
6514 * include/grub/misc.h (grub_strtoull): New prototype.
6515 (grub_divmod64): Likewise.
6517 * include/grub/fshelp.h (grub_fshelp_read_file): Change the types
6518 of SECTOR, LEN and FILESIZE to grub_disk_addr_t, grub_size_t and
6519 grub_off_t, respectively.
6520 All callers and references changed.
6522 * include/grub/fs.h (struct grub_fs): Change the type of LEN to
6523 grub_size_t in "read".
6524 All callers and references changed.
6526 * include/grub/file.h (struct grub_file): Change the types of
6527 "offset" and "size" to grub_off_t and grub_off_t,
6528 respectively. Change the type of SECTOR to grub_disk_addr_t in
6530 (grub_file_read): Change the type of LEN to grub_size_t.
6531 (grub_file_seek): Return grub_off_t. Change the type of OFFSET to
6533 (grub_file_size): Return grub_off_t.
6534 (grub_file_tell): Likewise.
6535 All callers and references changed.
6537 * include/grub/disk.h (struct grub_disk_dev): Change the types of
6538 SECTOR and SIZE to grub_disk_addr_t and grub_size_t in "read" and
6540 (struct grub_disk): Change the type of "total_sectors" to
6541 grub_uint64_t. Change the type of SECTOR to grub_disk_addr_t in
6543 (grub_disk_read): Change the types of SECTOR, OFFSET and SIZE to
6544 grub_disk_addr_t, grub_off_t and grub_size_t, respectively.
6545 (grub_disk_write): Likewise.
6546 All callers and references changed.
6548 * fs/iso9660.c (grub_iso9660_susp_iterate): Cast parameters to
6549 char * for grub_strncmp to silence gcc.
6550 (grub_iso9660_mount): Likewise.
6551 (grub_iso9660_mount): Likewise.
6552 (grub_iso9660_read_symlink): Likewise. Also, remove the nonsense
6554 (grub_iso9660_iterate_dir): Likewise.
6555 (grub_iso9660_label): Cast DATA->VOLDESC.VOLNAME to char *.
6557 * fs/hfs.c (grub_hfs_read_file): Change the types of SECTOR and
6558 LEN to grub_disk_addr_t and grub_size_t, respectively.
6560 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
6562 * fs/jfs.c (grub_jfs_read_file): Likewise.
6564 * fs/minix.c (grub_jfs_read_file): Likewise.
6566 * fs/sfs.c (grub_jfs_read_file): Likewise.
6568 * fs/ufs.c (grub_jfs_read_file): Likewise.
6570 * fs/xfs.c (grub_jfs_read_file): Likewise.
6572 * fs/fat.c (grub_fat_read_data): Change the types of SECTOR, LEN
6573 and SIZE to grub_disk_addr_t, grub_size_t and grub_size_t,
6576 * fs/ext2.c (grub_ext2_read_block): When an error happens, set
6577 BLKNR to -1 instead of returning GRUB_ERRNO.
6578 (grub_ext2_read_file): Change the types of SECTOR and
6579 LEN to grub_disk_addr_t and grub_size_t, respectively.
6581 * fs/affs.c (grub_affs_read_file): Change the types of SECTOR and
6582 LEN to grub_disk_addr_t and grub_size_t, respectively.
6584 * font/manager.c (grub_font_get_glyph): Cast BITMAP to char * for
6587 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Fix the format
6588 string. Do not cast SECTOR explicitly.
6590 * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Change the type of
6591 TOTAL_SECTORS to grub_uint64_t. Do not mask DRP->TOTAL_SECTORS.
6592 (grub_biosdisk_rw): Change the types of SECTOR and SIZE to
6593 grub_disk_addr_t and grub_size_t, respectively. If the sector is
6594 over 2TB and LBA mode is not supported, raise an error.
6595 (get_safe_sectors): New function.
6596 (grub_biosdisk_read): Use get_safe_sectors.
6597 (grub_biosdisk_write): Likewise.
6599 * disk/efi/efidisk.c (grub_efidisk_read): Fix the format string.
6600 (grub_efidisk_write): Likewise.
6602 * disk/loopback.c (delete_loopback): Cosmetic changes.
6603 (grub_cmd_loopback): Likewise. Also, test NEWDEV->FILENAME
6605 (grub_loopback_open): Likewise.
6606 (grub_loopback_read): Likewise. Also, change the type of POS to
6607 grub_off_t, and fix the usage of grub_memset.
6609 * commands/i386/pc/play.c: Include grub/machine/time.h.
6611 * commands/ls.c (grub_ls_list_files): Use "llu" instead of "d" to
6614 * commands/configfile.c: Include grub/env.h.
6616 * commands/cmp.c (grub_cmd_cmp): Do not use ERR, but use
6617 GRUB_ERRNO directly instead. Change the type of POS to
6618 grub_off_t. Follow the coding standard.
6620 * commands/blocklist.c: Include grub/partition.h.
6621 (grub_cmd_blocklist): Return an error if the underlying device is
6622 not a disk. Take the starting sector of a partition into account,
6623 if a partition is used.
6625 * boot/i386/pc/diskboot.S (bootloop): Adapted to the new offset of
6627 (lba_mode): Support 64-bit addresses.
6628 (chs_mode): Likewise.
6629 (copy_buffer): Adapted to the new offsets of a length field and a
6631 (blocklist_default_start): Allocate 64-bit space.
6633 * boot/i386/pc/boot.S (force_lba): Removed.
6634 (boot_drive): Moved to under KERNEL_SECTOR.
6635 (kernel_sector): Moved to under KERNEL_SEGMENT. Allocate 64-bit
6637 (real_start): Set %si earlier. Remove code for FORCE_LBA, since it
6639 (lba_mode): Refactored to support a 64-bit address. More size
6641 (setup_sectors): Likewise.
6643 2006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
6645 * DISTLIST: Added include/grub/i386/linux.h. Removed
6646 include/grub/i386/pc/linux.h
6648 * configure.ac (AC_INIT): Bumped to 1.94.
6650 * config.guess: Updated from gnulib.
6651 * config.sub: Likewise.
6652 * install-sh: Likewise.
6653 * mkinstalldirs: Likewise.
6655 2006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
6657 * conf/common.rmk (grub_modules_init.lst): Depended on
6658 grub_emu_SOURCES, excluding grub_emu_init.c, instead of
6661 * genmk.rb (PModule::rule): Reverted the previous change.
6663 2006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
6665 * conf/common.rmk (grub_modules_init.lst): Depends on
6666 $(MODSRCFILES). Grep only the files in $(MODSRCFILES). Make sure
6667 that the target does not exist before producing.
6668 (grub_modules_init.h): Remove the target before generating.
6669 (grub_emu_init.c): Likewise.
6671 * genmk.rb (PModule::rule): Add source files into MODSRCFILES.
6673 2006-05-31 Jeroen Dekkers <jeroen@dekkers.cx>
6675 * configure.ac: Don't set host_m32 for x86_64. Also reset LIBS
6676 for the target-specific tests. Make sure that we also have the
6677 up-to-date target variables for those tests.
6679 2006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
6681 * genmk.rb (Image::rule): Prefix CFLAGS or ASFLAGS with TARGET_.
6682 (PModule::rule): Likewise.
6684 2006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
6686 * genmk.rb (Image::rule): Set FLAG to CFLAGS or ASFLAGS instead of
6687 TARGET_CFLAGS or TARGET_ASFLAGS. There is no reason why
6688 target-specific flags should be prefixed.
6689 (PModule::rule): Likewise.
6691 2006-05-30 Yoshinori K. Okuji <okuji@enbug.org>
6693 * configure.ac (CMP): Check if cmp is available explicitly.
6695 2006-05-29 Yoshinori K. Okuji <okuji@enbug.org>
6697 * util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
6698 (target_cpu): New variable.
6699 (pkglibdir): Use target_cpu instead of host_cpu.
6701 * util/i386/pc/grub-install.in (host_cpu): Removed.
6702 (target_cpu): New variable.
6703 (pkglibdir): Use target_cpu instead of host_cpu.
6705 * util/genmoddep.c: Removed.
6707 * kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
6708 instead of GRUB_HOST_SIZEOF_VOID_P.
6709 * kern/dl.c: Likewise.
6711 * include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
6713 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
6714 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
6715 (GRUB_TARGET_SIZEOF_LONG): ... this.
6716 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
6717 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
6718 * include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
6720 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
6721 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
6722 (GRUB_TARGET_SIZEOF_LONG): ... this.
6723 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
6724 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
6725 * include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
6727 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
6728 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
6729 (GRUB_TARGET_SIZEOF_LONG): ... this.
6730 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
6731 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
6733 * include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
6734 GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
6735 [!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
6736 instead of GRUB_HOST_SIZEOF_LONG.
6737 [!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
6738 GRUB_HOST_WORDS_BIGENDIAN to define or undefine
6739 GRUB_CPU_WORDS_BIGENDIAN.
6740 Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
6741 define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
6744 * conf/i386-efi.rmk (noinst_UTILITIES): Removed.
6745 (genmoddep_SOURCES): Likewise.
6746 * conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
6747 (genmoddep_SOURCES): Likewise.
6748 * conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
6749 (genmoddep_SOURCES): Likewise.
6750 * conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
6752 (genmoddep_SOURCES): Likewise.
6754 * genmoddep.awk: New file.
6756 * genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
6757 TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
6758 CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
6759 (PModule::rule): Likewise.
6760 (Program::rule): Likewise.
6761 (Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
6762 BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
6765 * configure.ac: Rewritten intensively to use host and target
6766 instead of build and host, respectively.
6768 * Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
6769 (host_cpu): Removed.
6770 (target_cpu): New variable.
6771 (CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
6772 (BUILD_CC): Removed.
6773 (BUILD_CFLAGS): Likewise.
6774 (BUILD_CPPFLAGS): Likewise.
6775 (TARGET_CC): New variable.
6776 (TARGET_CFLAGS): Likewise.
6777 (TARGET_CPPFLAGS): Likewise.
6778 (TARGET_LDFLAGS): Likewise.
6780 (include): Use target_cpu instead of host_cpu.
6781 (moddep.lst:): Use genmoddep.awk instead of genmoddep.
6783 * DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
6785 2006-05-29 Vesa Jaaskelainen <chaac@nic.fi>
6787 * include/grub/script.h (grub_script_cmdif): Renamed field 'bool' to
6788 'exec_to_evaluate'. Renamed field 'true' to 'exec_on_true'. Renamed
6789 field 'false' to 'exec_on_false'.
6790 (grub_script_create_cmdif): Renamed argument names to reflect above
6793 * normal/execute.c (grub_script_execute_cmdif): Likewise.
6795 * normal/script.c (grub_script_create_cmdif): Likewise.
6797 2006-05-28 Yoshinori K. Okuji <okuji@enbug.org>
6799 * fs/hfsplus.c (grub_hfsplus_btree_recoffset): Moved to near the
6801 (grub_hfsplus_btree_recptr): Likewise.
6802 (grub_hfsplus_find_block): Do not take RETRY any longer. Use
6803 FILEBLOCK both to pass a block number and store next block
6805 (grub_hfsplus_read_block): Rewritten heavily to support an extent
6806 overflow file correctly. Specify errors appropriately, because
6807 fshelp expects that GRUB_ERRNO is set when fails. Reuse
6808 grub_hfsplus_btree_recptr to get the pointer to a found key.
6809 (grub_hfsplus_btree_search): Return 1 instead of 0 when no match
6812 * conf/i386-efi.rmk (pkgdata_MODULES): Added _linux.mod and
6814 (_linux_mod_SOURCES): New variable.
6815 (_linux_mod_CFLAGS): Likewise.
6816 (_linux_mod_LDFLAGS): Likewise.
6817 (linux_mod_SOURCES): Likewise.
6818 (linux_mod_CFLAGS): Likewise.
6819 (linux_mod_LDFLAGS): Likewise.
6821 * DISTLIST: Added loader/i386/efi/linux.c,
6822 loader/i386/efi/linux_normal.c and
6823 include/grub/i386/efi/loader.h.
6825 * loader/i386/efi/linux.c: New file.
6826 * loader/i386/efi/linux_normal.c: Likewise.
6827 * include/grub/i386/efi/loader.h: Likewise.
6829 2006-05-27 Yoshinori K. Okuji <okuji@enbug.org>
6831 * commands/blocklist.c: New file.
6833 * DISTLIST: Added commands/blocklist.c.
6835 * term/efi/console.c (grub_console_highlight_color): Use a lighter
6836 color for the background, and a darker color for the foreground.
6837 (grub_console_checkkey): Return READ_KEY.
6838 (grub_console_cls): Set the background to
6839 GRUB_EFI_BACKGROUND_BLACK temporarily to clean out the screen.
6841 * kern/efi/efi.c (grub_efi_exit_boot_services): New function.
6843 * include/grub/i386/linux.h (struct linux_kernel_params): Fixed
6844 the size of "padding5", "hd0_drive_info" and "hd1_drive_info".
6846 * include/grub/efi/efi.h (grub_efi_exit_boot_services): New
6849 * include/grub/efi/api.h (GRUB_EFI_TEXT_ATTR): Do not shift
6850 BG. The spec is wrong again.
6852 * include/grub/normal.h [GRUB_UTIL] (grub_blocklist_init): New
6854 [GRUB_UTIL] (grub_blocklist_fini): Likewise.
6856 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
6857 commands/blocklist.c.
6858 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6860 * conf/common.rmk (pkgdata_MODULES): Added blocklist.mod.
6861 (blocklist_mod_SOURCES): New variable.
6862 (blocklist_mod_CFLAGS): Likewise.
6863 (blocklist_mod_LDFLAGS): Likewise.
6865 2006-05-20 Yoshinori K. Okuji <okuji@enbug.org>
6867 * boot/i386/pc/boot.S (real_start): Set %si earlier to eliminate
6869 (lba_mode): Use %eax more intensively to reduce the code size.
6871 2006-05-20 Marco Gerards <marco@gnu.org>
6873 * normal/lexer.c (grub_script_yylex): Don't filter out newlines.
6875 * normal/parser.y (commandblock): Defined as <cmd>. A subroutine
6877 (script): Accept leading newlines.
6878 (newlines): New rule to describe 0 or more newlines.
6879 (commands): Accept `command' with trailing newline. Fixed the
6880 order in which arguments were passed to `grub_script_add_cmd'.
6881 Accept commands separated by newlines.
6882 (function): Changed to accept newlines.
6883 (menuentry) Rewritten.
6885 * normal/script.c (grub_script_create_cmdmenu): Add new entries in
6886 front of the list, instead of to the end.
6888 2006-05-19 Yoshinori K. Okuji <okuji@enbug.org>
6890 * util/i386/pc/grub-install.in (bindir): New variable.
6891 (grub_mkimage): Use BINDIR instead of SBINDIR. Reported by Lee
6892 Shaver <lbgwjl@gmail.com>.
6894 2006-05-14 Yoshinori K. Okuji <okuji@enbug.org>
6896 * kern/i386/pc/startup.S: Include grub/cpu/linux.h instead of
6897 grub/machine/linux.h
6898 * loader/i386/pc/linux.c: Likewise.
6900 * include/grub/i386/pc/linux.h: Moved to ...
6901 * include/grub/i386/linux.h: ... here.
6903 * include/grub/i386/linux.h (struct linux_kernel_params): New
6906 2006-05-09 Vesa Jaaskelainen <chaac@nic.fi>
6908 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Corrected bounds
6910 (grub_video_vbe_blit_glyph): Likewise.
6911 (grub_video_vbe_blit_bitmap): Likewise.
6912 (grub_video_vbe_blit_render_target): Likewise.
6914 2006-05-09 Yoshinori K. Okuji <okuji@enbug.org>
6916 * configure.ac (--with-platform): Properly quote the square
6919 2006-05-08 Marco Gerards <marco@gnu.org>
6921 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Renamed from
6923 (kernel_elf_HEADERS): ...to this. Updated all users.
6924 (grubof_symlist.c): Renamed from this...
6925 (kernel_elf_symlist.c): ...to this. Updated all users.
6926 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
6927 (grubof_SOURCES): Renamed from this...
6928 (kernel_elf_SOURCES): ...to this.
6929 (grubof_HEADERS): Renamed from this...
6930 (kernel_elf_HEADERS): ...to this.
6931 (grubof_CFLAGS): Renamed from this...
6932 (kernel_elf_CFLAGS): ...to this.
6933 (grubof_ASFLAGS): Renamed from this...
6934 (kernel_elf_ASFLAGS): ...to this.
6935 (grubof_LDFLAGS): Renamed from this...
6936 (kernel_elf_LDFLAGS): ...to this.
6938 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Renamed from
6940 (kernel_elf_HEADERS): ...to this. Updated all users.
6941 (grubof_symlist.c): Renamed from this...
6942 (kernel_elf_symlist.c): ...to this. Updated all users.
6943 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
6944 (grubof_SOURCES): Renamed from this...
6945 (kernel_elf_SOURCES): ...to this.
6946 (grubof_HEADERS): Renamed from this...
6947 (kernel_elf_HEADERS): ...to this.
6948 (grubof_CFLAGS): Renamed from this...
6949 (kernel_elf_CFLAGS): ...to this.
6950 (grubof_ASFLAGS): Renamed from this...
6951 (kernel_elf_ASFLAGS): ...to this.
6952 (grubof_LDFLAGS): Renamed from this...
6953 (kernel_elf_LDFLAGS): ...to this.
6955 * util/powerpc/ieee1275/grub-mkimage.c (add_segments): Use
6956 `kernel.elf' instead of `grubof'.
6958 2006-05-08 Yoshinori K. Okuji <okuji@enbug.org>
6960 Add --with-platform to configure. Use pkglibdir instead of
6961 pkgdatadir. This is reported by Roger Leigh.
6963 * util/powerpc/ieee1275/grub-install.in (datadir): Removed.
6964 (host_vendor): Likewise.
6965 (host_os): Likewise.
6966 (pkgdatadir): Likewise.
6967 (platform): New variable.
6968 (pkglibdir): Likewise.
6969 Use PKGLIBDIR instead of PKGDATADIR.
6971 * util/i386/pc/grub-install.in (datadir): Removed.
6972 (host_vendor): Likewise.
6973 (host_os): Likewise.
6974 (pkgdatadir): Likewise.
6975 (platform): New variable.
6976 (pkglibdir): Likewise.
6977 Use PKGLIBDIR instead of PKGDATADIR.
6979 * util/powerpc/ieee1275/grub-mkimage.c (usage): Use GRUB_LIBDIR
6980 instead of GRUB_DATADIR.
6982 * util/i386/pc/grub-mkimage.c (usage): Likewise.
6984 * util/i386/efi/grub-mkimage.c (usage): Likewise.
6987 * configure.ac (--with-platform): New option.
6988 Use PLATFORM instead of HOST_VENDOR to specify a platform.
6990 * Makefile.in: Include a makefile based on PLATFORM instead of
6992 (pkgdatadir): Not appended by the machine type.
6993 (pkglibdir): Appended by the machine type.
6994 (host_vendor): Removed.
6995 (platform): New variable.
6996 (BUILD_CPPFLAGS): Specify GRUB_LIBDIR instead of GRUB_DATADIR.
6997 (install-local): Use PKGLIBDIR instead of PKGDATADIR.
6998 (uninstall): Likewise.
7000 2006-05-07 Yoshinori K. Okuji <okuji@enbug.org>
7002 Use the environment context in the menu. Remove the commands
7003 "default" and "timeout", and use variables instead.
7005 * normal/menu.c: Include grub/env.h.
7006 (print_entry): Cast TITLE to silence gcc.
7007 (get_timeout): New function.
7008 (set_timeout): Likewise.
7009 (get_entry_number): Likewise.
7010 (run_menu): Use a default entry, a fallback entry and a timeout
7011 in the environment variables "default", "fallback" and
7012 "timeout". Also, tweak the default entry if it is not within the
7013 current menu entries.
7014 (grub_menu_run): Use a fallback entry in the environment variable
7017 * normal/main.c (read_config_file): Do not initialize
7018 NEWMENU->DEFAULT_ENTRY, NEWMENU->FALLBACK_ENTRY or
7020 (grub_normal_execute): Use a data slot to store the menu.
7022 * include/grub/normal.h (struct grub_menu): Removed default_entry,
7023 fallback_entry and timeout.
7024 (struct grub_menu_list): Removed.
7025 (grub_menu_list_t): Likewise.
7026 (struct grub_context): Likewise.
7027 (grub_context_t): Likewise.
7028 (grub_context_get): Likewise.
7029 (grub_context_get_current_menu): Likewise.
7030 (grub_context_push_menu): Likewise.
7031 (grub_context_pop_menu): Likewise.
7032 (grub_default_init): Likewise.
7033 (grub_default_fini): Likewise.
7034 (grub_timeout_init): Likewise.
7035 (grub_timeout_fini): Likewise.
7037 * conf/sparc64-ieee1275.rmk (pkgdata_MODULES): Removed default.mod
7039 (normal_mod_SOURCES): Removed normal/context.c.
7041 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Removed
7042 commands/default.c, commands/timeout.c and normal/context.c.
7043 (normal_mod_SOURCES): Removed normal/context.c.
7045 * conf/i386-pc.rmk (grub_emu_SOURCES): Removed commands/default.c,
7046 commands/timeout.c and normal/context.c.
7047 (normal_mod_SOURCES): Removed normal/context.c.
7049 * conf/i386-efi.rmk (grub_emu_SOURCES): Removed
7050 commands/default.c, commands/timeout.c and normal/context.c.
7051 (normal_mod_SOURCES): Removed normal/context.c.
7053 * conf/common.rmk (pkgdata_MODULES): Removed default.mod and
7055 (default_mod_SOURCES): Removed.
7056 (default_mod_CFLAGS): Likewise.
7057 (default_mod_LDFLAGS): Likewise.
7058 (timeout_mod_SOURCES): Removed.
7059 (timeout_mod_CFLAGS): Likewise.
7060 (timeout_mod_LDFLAGS): Likewise.
7062 * DISTLIST: Removed commands/default.c, commands/timeout.c and
7065 * commands/default.c: Removed.
7066 * commands/timeout.c: Likewise.
7067 * normal/context.c: Likewise.
7069 2006-05-07 Vesa Jaaskelainen <chaac@nic.fi>
7071 * kern/i386/pc/startup.S (grub_exit): Added missing .code32 tag.
7073 2006-05-02 Yoshinori K. Okuji <okuji@enbug.org>
7075 * kern/env.c (struct grub_env_context): Removed "sorted". Renamed
7076 "next" to "prev" for readability.
7077 (struct grub_env_sorted_var): New struct.
7078 (grub_env_context): Renamed to ...
7079 (initial_context): ... this.
7080 (grub_env_var_context): Renamed to ...
7081 (current_context): ... this.
7082 (grub_env_find): Look only at CURRENT_CONTEXT.
7083 (grub_env_context_open): Rewritten to copy exported variables from
7085 (grub_env_context_close): Rewritten according to the new
7086 scheme. Also, add an assertion to prevent the initial context from
7088 (grub_env_insert): Removed the code for the sorted list.
7089 (grub_env_remove): Likewise.
7090 (grub_env_export): Simply mark the variable with
7091 GRUB_ENV_VAR_GLOBAL.
7092 (grub_env_set): A cosmetic change for naming consistency.
7093 (grub_env_get): Likewise.
7094 (grub_env_unset): Likewise.
7095 (grub_env_iterate): Rewritten to sort variables within this
7097 (grub_register_variable_hook): Fixed for naming consistency. Call
7098 grub_env_find again, only if NAME is not found at the first time.
7099 (mangle_data_slot_name): New function.
7100 (grub_env_set_data_slot): Likewise.
7101 (grub_env_get_data_slot): Likewise.
7102 (grub_env_unset_data_slot): Likewise.
7104 * include/grub/env.h (grub_env_var_type): New enum.
7105 (GRUB_ENV_VAR_LOCAL): New constant.
7106 (GRUB_ENV_VAR_GLOBAL): Likewise.
7107 (GRUB_ENV_VAR_DATA): Likewise.
7108 (struct grub_env_var): Removed "sort_next" and "sort_prevp". Added
7110 (grub_env_set): Replace VAR with NAME for consistency.
7111 (grub_register_variable_hook): Likewise.
7112 (grub_env_export): Specify the name of the argument.
7113 (grub_env_set_data_slot): New prototype.
7114 (grub_env_get_data_slot): Likewise.
7115 (grub_env_unset_data_slot): Likewise.
7117 2006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
7119 Extend the loader so that GRUB can accept a loader which comes
7120 back to GRUB when a loaded image exits. Also, this change adds
7121 support for a chainloader on EFI.
7123 * term/efi/console.c: Include grub/misc.h.
7124 (grub_console_checkkey): Display a scan code on the top for
7125 debugging. This will be removed once the EFI port gets stable.
7126 Correct the scan code mapping.
7128 * kern/efi/mm.c (sort_memory_map): Sort in a descending order to
7129 allocate memory from larger regions, in order to reduce the number
7130 of allocated regions. Otherwise, the MacOSX loader panics.
7131 (filter_memory_map): Avoid less than 1MB for compatibility with
7133 (add_memory_regions): Allocate from the tail of a region, if
7134 possible, to avoid allocating a region near to 1MB, for the MacOSX
7137 * kern/efi/init.c (grub_efi_set_prefix): Specify
7138 GRUB_EFI_IMAGE_HANDLE to grub_efi_get_loaded_image.
7140 * kern/efi/efi.c (grub_efi_get_loaded_image): Accept a new
7141 argument IMAGE_HANDLE and specify it to get a loaded image.
7142 (grub_arch_modules_addr): Specify GRUB_EFI_IMAGE_HANDLE to
7143 grub_efi_get_loaded_image.
7144 (grub_efi_get_filename): Divide the length by the size of
7146 (grub_efi_get_device_path): New function.
7147 (grub_efi_print_device_path): Print End Device Path nodes. Divide
7148 the length by the size of grub_efi_char16_t for a file path device
7151 * kern/loader.c (grub_loader_noreturn): New variable.
7152 (grub_loader_set): Accept a new argument NORETURN. Set
7153 GRUB_LOADER_NORETURN to NORETURN.
7154 All callers changed.
7155 (grub_loader_boot): If GRUB_LOADER_NORETURN is false, do not call
7158 * include/grub/efi/efi.h (grub_efi_get_device_path): New
7160 (grub_efi_get_loaded_image): Take an argument to specify an image
7163 * include/grub/loader.h (grub_loader_set): Added one more argument
7166 * disk/efi/efidisk.c (make_devices): Use grub_efi_get_device_path
7167 instead of grub_efi_open_protocol.
7168 (grub_efidisk_get_device_name): Likewise.
7169 (grub_efidisk_close): Print a newline.
7170 (grub_efidisk_get_device_handle): Fixed to use
7171 GRUB_EFI_DEVICE_PATH_SUBTYPE instead of
7172 GRUB_EFI_DEVICE_PATH_TYPE.
7174 * disk/efi/efidisk.c (device_path_guid): Moved to ...
7175 * kern/efi/efi.c (device_path_guid): ... here.
7177 * conf/i386-efi.rmk (pkgdata_MODULES): Added _chain.mod and
7179 (kernel_mod_HEADERS): Added efi/disk.h.
7180 (_chain_mod_SOURCES): New variable.
7181 (_chain_mod_CFLAGS): Likewise.
7182 (_chain_mod_LDFLAGS): Likewise.
7183 (chain_mod_SOURCES): Likewise.
7184 (chain_mod_CFLAGS): Likewise.
7185 (chain_mod_LDFLAGS): Likewise.
7187 * DISTLIST: Added include/grub/efi/chainloader.h,
7188 loader/efi/chainloader.c and loader/efi/chainloader_normal.c.
7190 * include/grub/efi/chainloader.h: New file.
7191 * loader/efi/chainloader.c: Likewise.
7192 * loader/efi/chainloader_normal.c: Likewise.
7194 2006-04-30 Marco Gerards <marco@gnu.org>
7196 * commands/configfile.c (grub_cmd_source): New function.
7197 (GRUB_MOD_INIT): Register the commands `source' and `.'.
7198 (GRUB_MOD_FINI): De-register the commands `source' and `.'.
7200 2006-04-30 Marco Gerards <marco@gnu.org>
7202 * normal/execute.c (grub_script_execute_cmd): Change the return
7203 type to `grub_err_t'. Correctly return the error.
7204 (grub_script_execute_cmdline): In case a command line is not a
7205 command or a function, try to interpret it as an assignment.
7207 2006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
7209 * fs/hfsplus.c (grub_hfsplus_read_block): Fixed a memory leak.
7210 (grub_hfsplus_iterate_dir): Reordered to skip unknown nodes. Also,
7211 skip a node whose name is obviously invalid as UTF-16,
7212 i.e. contains a NUL character. Stop the iteration when the last
7213 directory entry is found. Instead of using the return value of
7214 grub_hfsplus_btree_iterate_node, store the value in RET and use
7215 it, because the iterator can be stopped by the last directory
7218 2006-04-30 Marco Gerards <marco@gnu.org>
7220 * include/grub/env.h (grub_env_export): New prototype. Reported
7221 by Jan C. Kleinsorge <jan.kleinsorge@udo.edu>.
7223 2006-04-30 Marco Gerards <marco@gnu.org>
7225 * fs/hfsplus.c (grub_hfsplus_iterate_dir): Correctly calculate the
7226 size of the extents in a catalog file record.
7228 2006-04-29 Marco Gerards <marco@gnu.org>
7230 * commands/configfile.c (grub_cmd_configfile): Execute the
7231 configfile within its own context.
7233 * include/grub/env.h (grub_env_context_open): New prototype.
7234 (grub_env_context_close): Likewise.
7236 * kern/env.c (grub_env): Removed.
7237 (grub_env_sorted): Likewise.
7238 (grub_env_context): New variable.
7239 (grub_env_var_context): Likewise.
7240 (grub_env_find): Search both the active context and the global
7242 (grub_env_context_open): New function.
7243 (grub_env_context_close): Likewise.
7244 (grub_env_insert): Likewise.
7245 (grub_env_remove): Likewise.
7246 (grub_env_export): Likewise.
7247 (grub_env_set): Changed to use helper functions to avoid code
7249 (grub_env_iterate): Rewritten so both the current context and the
7250 global context are being used.
7252 * normal/command.c (export_command): New function.
7253 (grub_command_init): Register the `export' function.
7255 2006-04-26 Yoshinori K. Okuji <okuji@enbug.org>
7257 * util/i386/pc/grub-mkimage.c (compress_kernel): Cast arguments
7258 explicitly to suppress gcc's warnings.
7259 * fs/fat.c (grub_fat_find_dir): Likewise.
7260 (grub_fat_label): Likewise.
7261 * fs/xfs.c (grub_xfs_read_inode): Likewise.
7262 (grub_xfs_mount): Likewise.
7263 (grub_xfs_label): Likewise.
7264 * fs/affs.c (grub_affs_mount): Likewise.
7265 (grub_affs_label): Likewise.
7266 (grub_affs_iterate_dir): Likewise.
7267 * fs/sfs.c (grub_sfs_mount): Likewise.
7268 (grub_sfs_iterate_dir): Likewise.
7269 * fs/ufs.c (grub_ufs_lookup_symlink): Likewise.
7270 * fs/hfs.c (grub_hfs_mount): Likewise.
7271 (grub_hfs_cmp_catkeys): Likewise.
7272 (grub_hfs_find_dir): Likewise.
7273 (grub_hfs_dir): Likewise.
7274 (grub_hfs_label): Likewise.
7275 * fs/jfs.c (grub_jfs_mount): Likewise.
7276 (grub_jfs_opendir): Likewise.
7277 (grub_jfs_getent): Likewise.
7278 (grub_jfs_lookup_symlink): Likewise.
7279 (grub_jfs_label): Likewise.
7280 * fs/hfsplus.c (grub_hfsplus_cmp_catkey): Likewise.
7281 (grub_hfsplus_iterate_dir): Likewise.
7282 (grub_hfsplus_btree_iterate_node): Made static.
7284 * util/grub-emu.c (prefix): New variable.
7285 (grub_machine_set_prefix): New function.
7286 (main): Do not set the environment variable "prefix" here. Only
7287 set PREFIX, which is used later by grub_machine_set_prefix.
7289 * include/grub/video.h: Do not include grub/symbol.h.
7290 (grub_video_register): Not exported. This symbol is not defined in
7292 (grub_video_unregister): Likewise.
7293 (grub_video_iterate): Likewise.
7294 (grub_video_setup): Likewise.
7295 (grub_video_restore): Likewise.
7296 (grub_video_get_info): Likewise.
7297 (grub_video_get_blit_format): Likewise.
7298 (grub_video_set_palette): Likewise.
7299 (grub_video_get_palette): Likewise.
7300 (grub_video_set_viewport): Likewise.
7301 (grub_video_get_viewport): Likewise.
7302 (grub_video_map_color): Likewise.
7303 (grub_video_map_rgb): Likewise.
7304 (grub_video_map_rgba): Likewise.
7305 (grub_video_fill_rect): Likewise.
7306 (grub_video_blit_glyph): Likewise.
7307 (grub_video_blit_bitmap): Likewise.
7308 (grub_video_blit_render_target): Likewise.
7309 (grub_video_scroll): Likewise.
7310 (grub_video_swap_buffers): Likewise.
7311 (grub_video_create_render_target): Likewise.
7312 (grub_video_delete_render_target): Likewise.
7313 (grub_video_set_active_render_target): Likewise.
7315 * include/grub/symbol.h [GRUB_SYMBOL_GENERATOR] (EXPORT_FUNC):
7317 [GRUB_SYMBOL_GENERATOR] (EXPORT_VAR): Likewise.
7319 * conf/sparc64-ieee1275.rmk (grubof_symlist.c): Depended on
7320 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
7321 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
7322 instead of $(srcdir)/genkernsyms.sh.
7324 * conf/powerpc-ieee1275.rmk (grubof_symlist.c): Depended on
7325 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
7326 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
7327 instead of $(srcdir)/genkernsyms.sh.
7329 * conf/i386-pc.rmk (symlist.c): Depended on config.h. Use
7330 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
7331 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
7332 instead of $(srcdir)/genkernsyms.sh.
7334 * conf/i386-efi.rmk (symlist.c): Depended on config.h. Use
7335 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
7336 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
7337 instead of $(srcdir)/genkernsyms.sh.
7339 * configure.ac (AC_CONFIG_FILES): Added gensymlist.sh and
7342 * Makefile.in (DISTCLEANFILES): Added gensymlist.sh and
7344 (gensymlist.sh): New target.
7345 (genkernsyms.sh): Likewise.
7347 * DISTLIST: Removed genkernsyms.sh and gensymlist.sh. Added
7348 genkernsyms.sh.in and gensymlist.sh.in.
7350 * genkernsyms.sh: Removed.
7351 * gensymlist.sh: Likewise.
7353 * genkernsyms.sh.in: New file.
7354 * gensymlist.sh.in: Likewise.
7356 2006-04-25 Hollis Blanchard <hollis@penguinppc.org>
7358 * kern/powerpc/ieee1275/init.c (grub_machine_set_prefix): Do not
7359 clobber "prefix", since we may have already set it manually.
7361 2006-04-25 Hollis Blanchard <hollis@penguinppc.org>
7363 * kern/misc.c (abort): New alias for grub_abort.
7365 2006-04-25 Yoshinori K. Okuji <okuji@enbug.org>
7367 A new machine-specific function "grub_machine_set_prefix" is
7368 defined. This is called after loading modules, so that a prefix
7369 initialization can use modules. Also, this change adds an
7370 intensive debugging feature for the memory manager via the
7371 configure option "--enable-mm-debug".
7373 * partmap/gpt.c (gpt_partition_map_iterate): Add one more into
7376 * kern/sparc64/ieee1275/init.c (abort): Removed.
7377 (grub_stop): Likewise.
7378 (grub_exit): New function.
7379 (grub_set_prefix): Renamed to ...
7380 (grub_machine_set_prefix): ... this.
7381 (grub_machine_init): Do not call grub_set_prefix.
7383 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Renamed to ...
7384 (grub_machine_set_prefix): ... this.
7385 (grub_machine_init): Do not call grub_set_prefix.
7387 * kern/i386/pc/init.c (grub_machine_set_prefix): New function.
7388 (grub_machine_init): Do not set the prefix here.
7390 * kern/i386/efi/init.c (grub_machine_set_prefix): New function.
7392 * kern/efi/init.c: Include grub/mm.h.
7393 (grub_efi_set_prefix): New function.
7395 * kern/efi/efi.c (grub_exit): Call grub_efi_fini.
7396 (grub_efi_get_filename): New function.
7397 (grub_print_device_path): Renamed to ...
7398 (grub_efi_print_device_path): ... this.
7400 * kern/mm.c [MM_DEBUG] (grub_malloc): Undefined.
7401 [MM_DEBUG] (grub_realloc): Likewise.
7402 [MM_DEBUG] (grub_free): Likewise.
7403 [MM_DEBUG] (grub_memalign): Likewise.
7404 [MM_DEBUG] (grub_mm_debug): New variable.
7405 [MM_DEBUG] (grub_debug_malloc): New function.
7406 [MM_DEBUG] (grub_debug_free): New function.
7407 [MM_DEBUG] (grub_debug_realloc): New function.
7408 [MM_DEBUG] (grub_debug_memalign): New function.
7410 * kern/misc.c (grub_abort): Print a newline to distinguish
7413 * kern/main.c (grub_main): Call grub_machine_set_prefix and
7414 grub_set_root_dev after loading modules. This is necessary when
7415 setting a prefix depends on modules.
7417 * include/grub/efi/efi.h (grub_print_device_path): Renamed to ...
7418 (grub_efi_print_device_path): ... this.
7419 (grub_efi_get_filename): New prototype.
7420 (grub_efi_set_prefix): Likewise.
7422 * include/grub/efi/disk.h: Include grub/efi/api.h, grub/symbol.h
7424 (grub_efidisk_get_device_handle): New prototype.
7425 (grub_efidisk_get_device_name): Likewise.
7427 * include/grub/mm.h: Include config.h.
7428 (MM_DEBUG): Removed.
7429 [MM_DEBUG && !GRUB_UTIL] (grub_mm_debug): New prototype.
7430 [MM_DEBUG && !GRUB_UTIL] (grub_malloc): New macro.
7431 [MM_DEBUG && !GRUB_UTIL] (grub_realloc): Likewise.
7432 [MM_DEBUG && !GRUB_UTIL] (grub_memalign): Likewise.
7433 [MM_DEBUG && !GRUB_UTIL] (grub_free): Likewise.
7434 [MM_DEBUG && !GRUB_UTIL] (grub_debug_malloc): New prototype.
7435 [MM_DEBUG && !GRUB_UTIL] (grub_debug_realloc): New prototype.
7436 [MM_DEBUG && !GRUB_UTIL] (grub_debug_memalign): New prototype.
7437 [MM_DEBUG && !GRUB_UTIL] (grub_debug_free): New prototype.
7439 * include/grub/kernel.h (grub_machine_set_prefix): New prototype.
7441 * disk/efi/efidisk.c: Include grub/partition.h.
7442 (iterate_child_devices): New function.
7443 (add_device): First, compare only last device path nodes, so that
7444 devices are sorted by the types.
7445 (grub_efidisk_get_device_handle): New function.
7446 (grub_efidisk_get_device_name): Likewise.
7448 * configure.ac (--enable-mm-debug): New option to enable the
7449 memory manager debugging feature. This makes the binary much
7450 bigger, so is disabled by default.
7452 2006-04-23 Yoshinori K. Okuji <okuji@enbug.org>
7454 Use grub_abort instead of grub_stop, and grub_exit must be
7455 define in each architecture now. Also, this change adds support
7458 * util/i386/pc/grub-probefs.c: Include grub/term.h.
7459 (grub_getkey): New function.
7460 (grub_term_get_current): Likewise.
7462 * util/i386/pc/grub-setup.c: Include grub/term.h.
7463 (grub_getkey): New function.
7464 (grub_term_get_current): Likewise.
7466 * util/misc.c (grub_stop): Renamed to ...
7467 (grub_exit): ... this.
7469 * kern/powerpc/ieee1275/init.c (abort): Renamed to ...
7470 (grub_exit): ... this.
7471 (grub_machine_init): Use grub_abort instead of abort.
7472 (grub_stop): Removed.
7474 * kern/powerpc/ieee1275/cmain.c (cmain): Use grub_abort instead of
7477 * kern/i386/pc/startup.S (grub_exit): New function.
7478 (cold_reboot): New label.
7480 * kern/efi/init.c: Include grub/efi/disk.h and grub/env.h.
7481 (grub_efi_init): Call grub_efidisk_init.
7482 (grub_efi_fini): Call grub_efidisk_fini.
7484 * kern/efi/efi.c: Include grub/mm.h.
7485 (grub_efi_console_control_guid): Renamed to ...
7486 (console_control_guid): ... this.
7487 (grub_efi_loaded_image_guid): Renamed to ...
7488 (loaded_image_guid): ... this.
7489 (grub_efi_locate_handle): New function.
7490 (grub_efi_open_protocol): Likewise.
7491 (grub_efi_set_text_mode): Use CONSOLE_CONTROL_GUID instead of
7492 GRUB_EFI_CONSOLE_CONTROL_GUID.
7493 (grub_efi_exit): Removed.
7494 (grub_stop): Likewise.
7495 (grub_efi_get_loaded_image): Use grub_efi_open_protocol.
7496 (grub_exit): New function.
7497 (grub_print_device_path): Likewise.
7499 * kern/rescue.c (grub_rescue_cmd_exit): New function.
7500 (grub_enter_rescue_mode): Register "exit".
7502 * kern/misc.c (grub_real_dprintf): A cosmetic change.
7503 (grub_abort): New function.
7505 * kern/err.c (grub_fatal): Use grub_abort instead of grub_stop.
7507 * include/grub/sparc64/ieee1275/kernel.h (abort): Removed.
7509 * include/grub/powerpc/ieee1275/kernel.h (abort): Removed.
7511 * include/grub/efi/efi.h (grub_efi_exit): Removed.
7512 (grub_print_device_path): New prototype.
7513 (grub_efi_locate_handle): Likewise.
7514 (grub_efi_open_protocol): Likewise.
7516 * include/grub/efi/disk.h (grub_efidisk_fini): New file.
7517 * disk/efi/efidisk.c: Likewise.
7519 * DISTLIST: Added disk/efi/efidisk.c and include/grub/efi/disk.h.
7521 * include/grub/efi/console_control.h
7522 (GRUB_EFI_CONSOLE_CONTROL_GUID): Use an array for the last 8 bytes.
7524 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): Specify the
7525 last 8 bytes as an array.
7526 (GRUB_EFI_DISK_IO_GUID): New macro.
7527 (GRUB_EFI_BLOCK_IO_GUID): Likewise.
7528 (GRUB_EFI_DEVICE_PATH_GUID): Likewise.
7529 (grub_efi_ipv6_address_t): Change the type to grub_uint16_t from
7531 (struct grub_efi_guid): Use an array to specify the last 8 bytes.
7532 (struct grub_efi_device_path): Rename the member "sub_type" to
7534 (GRUB_EFI_DEVICE_PATH_TYPE): New macro.
7535 (GRUB_EFI_DEVICE_PATH_SUBTYPE): Likewise.
7536 (GRUB_EFI_DEVICE_PATH_LENGTH): Likewise.
7537 (GRUB_EFI_END_DEVICE_PATH_TYPE): Likewise.
7538 (GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE): Likewise.
7539 (GRUB_EFI_END_THIS_DEVICE_PATH_SUBTYPE): Likewise.
7540 (GRUB_EFI_END_ENTIRE_DEVICE_PATH): Likewise.
7541 (GRUB_EFI_NEXT_DEVICE_PATH): Likewise.
7542 (GRUB_EFI_HARDWARE_DEVICE_PATH_TYPE): Likewise.
7543 (GRUB_EFI_PCI_DEVICE_PATH_SUBTYPE): Likewise.
7544 (struct grub_efi_pci_device_path): New structure.
7545 (grub_efi_pci_device_path_t): New type.
7546 (GRUB_EFI_PCCARD_DEVICE_PATH_SUBTYPE): New macro.
7547 (struct grub_efi_pccard_device_path): New structure.
7548 (grub_efi_pccard_device_path_t): New type.
7549 (GRUB_EFI_MEMORY_MAPPED_DEVICE_PATH_SUBTYPE): New macro.
7550 (struct grub_efi_memory_mapped_device_path): New structure.
7551 (grub_efi_memory_mapped_device_path_t): New type.
7552 (GRUB_EFI_VENDOR_DEVICE_PATH_SUBTYPE): New macro.
7553 (struct grub_efi_vendor_device_path): New structure.
7554 (grub_efi_vendor_device_path_t): New type.
7555 (GRUB_EFI_CONTROLLER_DEVICE_PATH_SUBTYPE): New macro.
7556 (struct grub_efi_controller_device_path): New structure.
7557 (grub_efi_controller_device_path_t): New type.
7558 (GRUB_EFI_ACPI_DEVICE_PATH_TYPE): New macro.
7559 (GRUB_EFI_ACPI_DEVICE_PATH_SUBTYPE): Likewise.
7560 (struct grub_efi_acpi_device_path): New structure.
7561 (grub_efi_acpi_device_path_t): New type.
7562 (GRUB_EFI_EXPANDED_ACPI_DEVICE_PATH_SUBTYPE): New macro.
7563 (struct grub_efi_expanded_acpi_device_path): New structure.
7564 (grub_efi_expanded_acpi_device_path_t): New type.
7565 (GRUB_EFI_EXPANDED_ACPI_HIDSTR): New macro.
7566 (GRUB_EFI_EXPANDED_ACPI_UIDSTR): Likewise.
7567 (GRUB_EFI_EXPANDED_ACPI_CIDSTR): Likewise.
7568 (GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE): Likewise.
7569 (GRUB_EFI_ATAPI_DEVICE_PATH_SUBTYPE): Likewise.
7570 (struct grub_efi_atapi_device_path): New structure.
7571 (grub_efi_atapi_device_path_t): New type.
7572 (GRUB_EFI_FIBRE_CHANNEL_DEVICE_PATH_SUBTYPE): New macro.
7573 (struct grub_efi_fibre_channel_device_path): New structure.
7574 (grub_efi_fibre_channel_device_path_t): New type.
7575 (GRUB_EFI_1394_DEVICE_PATH_SUBTYPE): New macro.
7576 (struct grub_efi_1394_device_path): New structure.
7577 (grub_efi_1394_device_path_t): New type.
7578 (GRUB_EFI_USB_DEVICE_PATH_SUBTYPE): New macro.
7579 (struct grub_efi_usb_device_path): New structure.
7580 (grub_efi_usb_device_path_t): New type.
7581 (GRUB_EFI_USB_CLASS_DEVICE_PATH_SUBTYPE): New macro.
7582 (struct grub_efi_usb_class_device_path): New structure.
7583 (grub_efi_usb_class_device_path_t): New type.
7584 (GRUB_EFI_I2O_DEVICE_PATH_SUBTYPE): New macro.
7585 (struct grub_efi_i2o_device_path): New structure.
7586 (grub_efi_i2o_device_path_t): New type.
7587 (GRUB_EFI_MAC_ADDRESS_DEVICE_PATH_SUBTYPE): New macro.
7588 (struct grub_efi_mac_address_device_path): New structure.
7589 (grub_efi_mac_address_device_path_t): New type.
7590 (GRUB_EFI_IPV4_DEVICE_PATH_SUBTYPE): New macro.
7591 (struct grub_efi_ipv4_device_path): New structure.
7592 (grub_efi_ipv4_device_path_t): New type.
7593 (GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE): New macro.
7594 (struct grub_efi_ipv6_device_path): New structure.
7595 (grub_efi_ipv6_device_path_t): New type.
7596 (GRUB_EFI_INFINIBAND_DEVICE_PATH_SUBTYPE): New macro.
7597 (struct grub_efi_infiniband_device_path): New structure.
7598 (grub_efi_infiniband_device_path_t): New type.
7599 (GRUB_EFI_UART_DEVICE_PATH_SUBTYPE): New macro.
7600 (struct grub_efi_uart_device_path): New structure.
7601 (grub_efi_uart_device_path_t): New type.
7602 (GRUB_EFI_VENDOR_MESSAGING_DEVICE_PATH_SUBTYPE): New macro.
7603 (struct grub_efi_vendor_messaging_device_path): New structure.
7604 (grub_efi_vendor_messaging_device_path_t): New type.
7605 (GRUB_EFI_MEDIA_DEVICE_PATH_TYPE): New macro.
7606 (GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE): Likewise.
7607 (struct grub_efi_hard_drive_device_path): New structure.
7608 (grub_efi_hard_drive_device_path_t): New type.
7609 (GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE): New macro.
7610 (struct grub_efi_cdrom_device_path): New structure.
7611 (grub_efi_cdrom_device_path_t): New type.
7612 (GRUB_EFI_VENDOR_MEDIA_DEVICE_PATH_SUBTYPE): New macro.
7613 (struct grub_efi_vendor_media_device_path): New structure.
7614 (grub_efi_vendor_media_device_path_t): New type.
7615 (GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE): New macro.
7616 (struct grub_efi_file_path_device_path): New structure.
7617 (grub_efi_file_path_device_path_t): New type.
7618 (GRUB_EFI_PROTOCOL_DEVICE_PATH_SUBTYPE): New macro.
7619 (struct grub_efi_protocol_device_path): New structure.
7620 (grub_efi_protocol_device_path_t): New type.
7621 (GRUB_EFI_BIOS_DEVICE_PATH_TYPE): New macro.
7622 (GRUB_EFI_BIOS_DEVICE_PATH_SUBTYPE): Likewise.
7623 (struct grub_efi_bios_device_path): New structure.
7624 (grub_efi_bios_device_path_t): New type.
7625 (struct grub_efi_disk_io): New structure.
7626 (grub_efi_disk_io_t): New type.
7627 (struct grub_efi_block_io_media): New structure.
7628 (grub_efi_block_io_media_t): New type.
7629 (struct grub_efi_block_io): New structure.
7630 (grub_efi_block_io_t): New type.
7632 * include/grub/misc.h (grub_stop): Removed.
7633 (grub_exit): New prototype.
7634 (grub_abort): Likewise.
7636 * include/grub/disk.h (enum grub_disk_dev_id): Added
7637 GRUB_DISK_DEVICE_EFIDISK_ID.
7639 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added
7641 (kernel_syms.lst): Remove the target if an error occurs.
7643 2006-04-22 Yoshinori K. Okuji <okuji@enbug.org>
7645 * kern/misc.c (grub_lltoa): Rewritten the decimal conversion part,
7646 as it was simply too buggy.
7648 2006-04-21 Yoshinori K. Okuji <okuji@enbug.org>
7650 * kern/misc.c (grub_lltoa): New function.
7651 (grub_vsprintf): Added support for the long long suffix,
7654 2006-04-20 Hollis Blanchard <hollis@penguinppc.org>
7656 * Makefile.in (LDFLAGS): Add variable.
7657 (LD): Remove variable.
7658 * configure.ac: Add -m32 to LDFLAGS.
7659 * genmk.rb (PModule#rule): Use $(CC) instead of $(LD).
7660 * conf/powerpc-ieee1275.rmk (COMMON_LDFLAGS): Add variable.
7661 (grubof_LDFLAGS): Use $(COMMON_LDFLAGS).
7662 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS, normal_mod_LDFLAGS,
7663 suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS): New
7665 * conf/sparc64-ieee1275.rmk (COMMON_LDFLAGS): Add -nostdlib.
7666 * conf/i386-pc.rmk (COMMON_LDFLAGS): Add -nostdlib.
7667 * conf/i386-efi.rmk (COMMON_LDFLAGS): Add -nostdlib.
7669 2006-04-20 Vesa Jaaskelainen <chaac@nic.fi>
7671 * term/gfxterm.c (grub_gfxterm_getcharwidth): Fixed character
7672 length for unknown glyph.
7674 2006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
7676 Add support for pre-loaded modules into the EFI port.
7678 * util/i386/efi/grub-mkimage.c (make_mods_section): Rewritten
7679 completely. Accept one more argument DIR. The caller has changed.
7681 * kern/i386/efi/init.c (grub_arch_modules_addr): Removed.
7683 * kern/efi/efi.c: Include grub/efi/pe32.h and grub/kernel.h.
7684 (grub_efi_loaded_image_guid): New variable.
7685 (grub_efi_get_loaded_image): New function.
7686 (grub_arch_modules_addr): Likewise.
7688 * include/grub/efi/efi.h (grub_efi_get_loaded_image): New
7691 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): New macro.
7692 (struct grub_efi_loaded_image): New structure.
7693 (grub_efi_loaded_image_t): New type.
7695 2006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
7697 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Compare the file
7698 size with GRUB_OS_AREA_SIZE as grub_size_t instead of
7699 grub_ssize_t. Reported by Jeff Chua <jeff84@silk.corp.fedex.com>.
7701 2006-04-19 Roger Leigh <rleigh@whinlatter.ukfsn.org>
7703 * DISTLIST: Added `util/powerpc/ieee1275/grub-install.in'.
7705 2006-04-19 Yoshinori K. Okuji <okuji@enbug.org>
7707 * DISTLIST: Added include/grub/efi/console.h,
7708 include/grub/efi/time.h, include/grub/i386/efi/kernel.h,
7709 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
7711 * include/grub/efi/console.h: New file.
7712 * include/grub/efi/time.h: Likewise.
7713 * include/grub/i386/efi/kernel.h: Likewise.
7714 * kern/efi/init.c: Likewise.
7715 * kern/efi/mm.c: Likewise.
7716 * term/efi/console.c: Likewise.
7718 * kern/i386/efi/init.c: Do not include grub/machine/time.h.
7719 (grub_stop): Removed.
7720 (grub_get_rtc): Likewise.
7721 (grub_machine_init): Simply call grub_efi_init.
7722 (grub_machine_fini): Call grub_efi_fini.
7724 * kern/efi/efi.c: Include grub/machine/time.h and grub/term.h.
7725 (grub_efi_output_string): Removed.
7726 (grub_efi_stall): New function.
7727 (grub_stop): Likewise.
7728 (grub_get_rtc): Likewise.
7730 * include/grub/efi/efi.h (grub_efi_output_string): Removed.
7731 (grub_efi_stall): New prototype.
7732 (grub_efi_allocate_pages): Likewise.
7733 (grub_efi_free_pages): Likewise.
7734 (grub_efi_get_memory_map): Likewise.
7735 (grub_efi_mm_init): Likewise.
7736 (grub_efi_mm_fini): Likewise.
7737 (grub_efi_init): Likewise.
7738 (grub_efi_fini): Likewise.
7740 * include/grub/i386/efi/time.h: Do not include
7741 grub/symbol.h. Include grub/efi/time.h.
7742 (GRUB_TICKS_PER_SECOND): Removed.
7743 (grub_get_rtc): Likewise.
7745 * include/grub/efi/api.h (struct grub_efi_memory_descriptor):
7746 Added padding. The EFI spec is buggy.
7747 (GRUB_EFI_BLACK): New macro.
7748 (GRUB_EFI_BLUE): Likewise.
7749 (GRUB_EFI_GREEN): Likewise.
7750 (GRUB_EFI_CYAN): Likewise.
7751 (GRUB_EFI_RED): Likewise.
7752 (GRUB_EFI_MAGENTA): Likewise.
7753 (GRUB_EFI_BROWN): Likewise.
7754 (GRUB_EFI_LIGHTGRAY): Likewise.
7755 (GRUB_EFI_BRIGHT): Likewise.
7756 (GRUB_EFI_DARKGRAY): Likewise.
7757 (GRUB_EFI_LIGHTBLUE): Likewise.
7758 (GRUB_EFI_LIGHTGREEN): Likewise.
7759 (GRUB_EFI_LIGHTCYAN): Likewise.
7760 (GRUB_EFI_LIGHTRED): Likewise.
7761 (GRUB_EFI_LIGHTMAGENTA): Likewise.
7762 (GRUB_EFI_YELLOW): Likewise.
7763 (GRUB_EFI_WHITE): Likewise.
7764 (GRUB_EFI_BACKGROUND_BLACK): Likewise.
7765 (GRUB_EFI_BACKGROUND_BLUE): Likewise.
7766 (GRUB_EFI_BACKGROUND_GREEN): Likewise.
7767 (GRUB_EFI_BACKGROUND_CYAN): Likewise.
7768 (GRUB_EFI_BACKGROUND_RED): Likewise.
7769 (GRUB_EFI_BACKGROUND_MAGENTA): Likewise.
7770 (GRUB_EFI_BACKGROUND_BROWN): Likewise.
7771 (GRUB_EFI_BACKGROUND_LIGHTGRAY): Likewise.
7772 (GRUB_EFI_TEXT_ATTR): Likewise.
7774 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added kern/efi/efi.c,
7775 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
7776 (kernel_mod_HEADERS): Added efi/time.h.
7778 2006-04-18 Yoshinori K. Okuji <okuji@enbug.org>
7780 * DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
7781 include/grub/efi/api.h, include/grub/efi/console_control.h,
7782 include/grub/efi/efi.h, include/grub/efi/pe32.h,
7783 include/grub/i386/efi/time.h, kern/efi/efi.c,
7784 kern/i386/efi/init.c, kern/i386/efi/startup.S,
7785 and util/i386/efi/grub-mkimage.c.
7787 * Makefile.in (RMKFILES): Added i386-efi.rmk.
7789 * genmk.rb (PModule#rule): Do not export symbols if
7790 #{prefix}_EXPORTS is set to "no".
7792 * conf/i386-efi.mk: New file.
7793 * conf/i386-efi.rmk: Likewise.
7794 * include/grub/efi/api.h: Likewise.
7795 * include/grub/efi/console_control.h: Likewise.
7796 * include/grub/efi/efi.h: Likewise.
7797 * include/grub/efi/pe32.h: Likewise.
7798 * include/grub/i386/efi/time.h: Likewise.
7799 * kern/efi/efi.c: Likewise.
7800 * kern/i386/efi/init.c: Likewise.
7801 * kern/i386/efi/startup.S: Likewise.
7802 * util/i386/efi/grub-mkimage.c: Likewise.
7804 2006-04-17 Marco Gerards <marco@gnu.org>
7806 * include/grub/script.h: Include <grub/parser.h> and
7807 "grub_script.tab.h".
7808 (struct grub_lexer_param): New struct.
7809 (struct grub_parser_param): Likewise.
7810 (grub_script_create_arglist): Pass the state in an argument.
7811 (grub_script_add_arglist): Likewise.
7812 (grub_script_create_cmdline): Likewise.
7813 (grub_script_create_cmdblock): Likewise.
7814 (grub_script_create_cmdif): Likewise.
7815 (grub_script_create_cmdmenu): Likewise.
7816 (grub_script_add_cmd): Likewise.
7817 (grub_script_arg_add): Likewise.
7818 (grub_script_lexer_ref): Likewise.
7819 (grub_script_lexer_deref): Likewise.
7820 (grub_script_lexer_record_start): Likewise.
7821 (grub_script_lexer_record_stop): Likewise.
7822 (grub_script_mem_record): Likewise.
7823 (grub_script_mem_record_stop): Likewise.
7824 (grub_script_malloc): Likewise.
7825 (grub_script_yylex): Likewise.
7826 (grub_script_yyparse): Likewise.
7827 (grub_script_yyerror): Likewise.
7828 (grub_script_yylex): Likewise.
7829 (grub_script_lexer_init): Return the state.
7831 * normal/lexer.c (grub_script_lexer_state): Removed variable.
7832 (grub_script_lexer_done): Likewise.
7833 (grub_script_lexer_getline): Likewise.
7834 (grub_script_lexer_refs): Likewise.
7836 (newscript): Likewise.
7838 (recording): Likewise.
7839 (recordpos): Likewise.
7840 (recordlen): Likewise.
7841 (grub_script_lexer_init): Return the state instead of setting
7843 (grub_script_lexer_ref): Use the newly added argument for state
7845 (grub_script_lexer_deref): Likewise.
7846 (grub_script_lexer_record_start): Likewise.
7847 (grub_script_lexer_record_stop): Likewise.
7848 (recordchar): Likewise.
7849 (nextchar): Likewise.
7850 (grub_script_yylex2): Likewise.
7851 (grub_script_yylex): Likewise.
7852 (grub_script_yyerror): Likewise.
7854 * normal/parser.y (func_mem): Removed variable.
7855 (menu_entry): Likewise.
7857 (%lex-param): New parser option.
7858 (%parse-param): Likewise.
7859 (script): Always return the AST.
7860 (argument): Pass the state around.
7861 (arguments): Likewise.
7862 (grubcmd): Likewise.
7863 (commands): Likewise.
7864 (function): Likewise.
7865 (menuentry): Likewise.
7866 (if_statement): Likewise.
7869 * normal/script.c (grub_script_memused): Removed variable.
7870 (grub_script_parsed): Likewise.
7871 (grub_script_malloc): Added a state argument. Use that instead of
7873 (grub_script_mem_record): Likewise.
7874 (grub_script_mem_record_stop): Likewise.
7875 (grub_script_arg_add): Likewise.
7876 (grub_script_add_arglist): Likewise.
7877 (grub_script_create_cmdline): Likewise.
7878 (grub_script_create_cmdif): Likewise.
7879 (grub_script_create_cmdmenu): Likewise.
7880 (grub_script_add_cmd): Likewise.
7881 (grub_script_parse): Setup the state before calling the parser.
7883 2006-04-16 Marco Gerards <marco@gnu.org>
7885 * normal/command.c (grub_command_init): Remove the title command.
7887 * normal/lexer.c (grub_script_yylex): Renamed from this...
7888 (grub_script_yylex2): ... to this.
7889 (grub_script_yylex): New function. Temporary
7890 introduced to filter some tokens.
7891 (grub_script_yyerror): Print a newline.
7893 * normal/main.c (read_config_file): Output information about the
7894 lines that contain errors. Wait for a key after all lines have
7895 been processed. Don't return an empty menu.
7897 * normal/parser.y (func_mem): Don't initialize.
7898 (menu_entry): Likewise.
7899 (err): New variable.
7900 (script): Don't return anything when an error was encountered.
7901 (ws, returns): Removed rules.
7902 (argument): Disabled concatenated variable support.
7903 (arguments): Remove explicit separators.
7904 (grubcmd): Likewise.
7905 (function): Likewise.
7906 (menuentry): Likewise.
7908 (commands): Likewise. Add error handling.
7910 * normal/script.c (grub_script_create_cmdline): If
7911 `grub_script_parsed' is 0, assume the parser encountered an error.
7913 2006-04-02 Yoshinori K. Okuji <okuji@enbug.org>
7915 * configure.ac: Add support for EFI. Fix the typo
7916 BUILD_LDDFLAGS. Restore the LDFLAGS after testing.
7918 2006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
7920 * util/unifont2pff.rb: Removed unnecessary byte ordering. Now
7921 foreign multibyte characters should be shown correctly.
7923 2006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
7925 * normal/main.c (grub_normal_menu_addentry): Fixed menu size
7927 (read_config_file): Made it to close file before returning.
7929 2006-03-31 Vesa Jaaskelainen <chaac@nic.fi>
7931 * DISTLIST: Added include/grub/i386/pc/vbeblit.h,
7932 include/grub/i386/pc/vbefill.h, video/i386/pc/vbeblit.c,
7933 video/i386/pc/vbefill.c.
7935 * conf/i386-pc.rmk (vbe_mod_SOURCES): Added video/i386/pc/vbeblit.c,
7936 video/i386/pc/vbefill.c.
7938 * include/grub/video.h (grub_video_blit_format): New enum.
7939 (grub_video_mode_info): Added new member blit_format.
7940 (grub_video_get_blit_format): New function prototype.
7942 * include/grub/i386/pc/vbe.h (grub_video_vbe_get_video_ptr): New
7944 (grub_video_vbe_map_rgb): Likewise.
7945 (grub_video_vbe_unmap_color): Likewise.
7947 * include/grub/i386/pc/vbeblit.h: New file.
7949 * include/grub/i386/pc/vbefill.h: New file.
7951 * video/video.c (grub_video_get_blit_format): New function.
7952 (grub_video_vbe_get_video_ptr): Re-declared as non-static.
7953 (grub_video_vbe_map_rgb): Likewise.
7954 (grub_video_vbe_unmap_color): Likewise.
7956 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Changed to use more
7958 (grub_video_vbe_blit_render_target): Changed to use more optimized
7960 (grub_video_vbe_setup): Added detection for optimized settings.
7961 (grub_video_vbe_create_render_target): Likewise.
7963 * video/i386/pc/vbeblit.c: New file.
7965 * video/i386/pc/vbefill.c: New file.
7967 2006-03-30 Vesa Jaaskelainen <chaac@nic.fi>
7969 * font/manager.c (grub_font_get_glyph): Removed font fixup from
7972 * util/unifont2pff.rb: ... and moved it to here. Improved argument
7973 parsing to support both hex and dec ranges. If filename was missing
7974 show usage information.
7976 2006-03-14 Vesa Jaaskelainen <chaac@nic.fi>
7978 * DISTLIST: Added include/grub/video.h, term/gfxterm.c,
7979 video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c.
7981 * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod,
7982 gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod.
7983 (video_mod_SOURCES): Added.
7984 (video_mod_CFLAGS): Likewise.
7985 (video_mod_LDFLAGS): Likewise.
7986 (gfxterm_mod_SOURCES): Likewise.
7987 (gfxterm_mod_CFLAGS): Likewise.
7988 (gfxterm_mod_LDFLAGS): Likewise.
7989 (videotest_mod_SOURCES): Likewise.
7990 (videotest_mod_CFLAGS): Likewise.
7991 (videotest_mod_LDFLAGS): Likewise.
7992 (vesafb_mod_SOURCES): Removed.
7993 (vesafb_mod_CFLAGS): Likewise.
7994 (vesafb_mod_LDFLAGS): Likewise.
7995 (vga_mod_SOURCES): Likewise.
7996 (vga_mod_CFLAGS): Likewise.
7997 (vga_mod_LDFLAGS): Likewise.
7999 * commands/videotest.c: New file.
8001 * font/manager.c (fill_with_default_glyph): Modified to use
8003 (grub_font_get_glyph): Likewise.
8004 (fontmanager): Renamed from this...
8005 (font_manager): ... to this.
8007 * include/grub/font.h (grub_font_glyph): Added new structure.
8008 (grub_font_get_glyph): Modified to use grub_font_glyph.
8010 * include/grub/misc.h (grub_abs): Added as inline function.
8012 * include/grub/video.h: New file.
8014 * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro.
8015 (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise.
8016 (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise.
8017 (grub_vbe_get_controller_info): Renamed from this...
8018 (grub_vbe_bios_get_controller_info): ... to this.
8019 (grub_vbe_get_mode_info): Renamed from this...
8020 (grub_vbe_bios_get_mode_info): ... to this.
8021 (grub_vbe_set_mode): Renamed from this...
8022 (grub_vbe_bios_set_mode): ... to this.
8023 (grub_vbe_get_mode): Renamed from this...
8024 (grub_vbe_bios_get_mode): ... to this.
8025 (grub_vbe_set_memory_window): Renamed from this...
8026 (grub_vbe_bios_set_memory_window): ... to this.
8027 (grub_vbe_get_memory_window): Renamed from this...
8028 (grub_vbe_bios_get_memory_window): ... to this.
8029 (grub_vbe_set_scanline_length): Renamed from this...
8030 (grub_vbe_set_scanline_length): ... to this.
8031 (grub_vbe_get_scanline_length): Renamed from this...
8032 (grub_vbe_bios_get_scanline_length): ... to this.
8033 (grub_vbe_set_display_start): Renamed from this...
8034 (grub_vbe_bios_set_display_start): ... to this.
8035 (grub_vbe_get_display_start): Renamed from this...
8036 (grub_vbe_bios_get_display_start): ... to this.
8037 (grub_vbe_set_palette_data): Renamed from this...
8038 (grub_vbe_bios_set_palette_data): ... to this.
8039 (grub_vbe_set_pixel_rgb): Removed.
8040 (grub_vbe_set_pixel_index): Likewise.
8042 * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed
8044 (grub_vbe_bios_get_controller_info): ... to this.
8045 (grub_vbe_get_mode_info): Renamed from this...
8046 (grub_vbe_bios_get_mode_info): ... to this.
8047 (grub_vbe_set_mode): Renamed from this...
8048 (grub_vbe_bios_set_mode): ... to this.
8049 (grub_vbe_get_mode): Renamed from this...
8050 (grub_vbe_bios_get_mode): ... to this.
8051 (grub_vbe_set_memory_window): Renamed from this...
8052 (grub_vbe_bios_set_memory_window): ... to this.
8053 (grub_vbe_get_memory_window): Renamed from this...
8054 (grub_vbe_bios_get_memory_window): ... to this.
8055 (grub_vbe_set_scanline_length): Renamed from this...
8056 (grub_vbe_set_scanline_length): ... to this.
8057 (grub_vbe_get_scanline_length): Renamed from this...
8058 (grub_vbe_bios_get_scanline_length): ... to this.
8059 (grub_vbe_set_display_start): Renamed from this...
8060 (grub_vbe_bios_set_display_start): ... to this.
8061 (grub_vbe_get_display_start): Renamed from this...
8062 (grub_vbe_bios_get_display_start): ... to this.
8063 (grub_vbe_set_palette_data): Renamed from this...
8064 (grub_vbe_bios_set_palette_data): ... to this.
8065 (grub_vbe_bios_get_controller_info): Fixed problem with registers
8066 getting corrupted after calling it. Added more pushes and pops.
8067 (grub_vbe_bios_set_mode): Likewise.
8068 (grub_vbe_bios_get_mode): Likewise.
8069 (grub_vbe_bios_get_memory_window): Likewise.
8070 (grub_vbe_bios_set_scanline_length): Likewise.
8071 (grub_vbe_bios_get_scanline_length): Likewise.
8072 (grub_vbe_bios_get_display_start): Likewise.
8073 (grub_vbe_bios_set_palette_data): Likewise.
8075 * normal/cmdline.c (cl_set_pos): Refresh the screen.
8076 (cl_insert): Likewise.
8077 (cl_delete): Likewise.
8079 * term/gfxterm.c: New file.
8081 * term/i386/pc/vesafb.c: Removed file.
8083 * video/video.c: New file.
8085 * video/i386/pc/vbe.c (real2pm): Added new function.
8086 (grub_video_vbe_draw_pixel): Likewise.
8087 (grub_video_vbe_get_video_ptr): Likewise.
8088 (grub_video_vbe_get_pixel): Likewise
8089 (grub_video_vbe_init): Likewise.
8090 (grub_video_vbe_fini): Likewise.
8091 (grub_video_vbe_setup): Likewise.
8092 (grub_video_vbe_get_info): Likewise.
8093 (grub_video_vbe_set_palette): Likewise.
8094 (grub_video_vbe_get_palette): Likewise.
8095 (grub_video_vbe_set_viewport): Likewise.
8096 (grub_video_vbe_get_viewport): Likewise.
8097 (grub_video_vbe_map_color): Likewise.
8098 (grub_video_vbe_map_rgb): Likewise.
8099 (grub_video_vbe_map_rgba): Likewise.
8100 (grub_video_vbe_unmap_color): Likewise.
8101 (grub_video_vbe_fill_rect): Likewise.
8102 (grub_video_vbe_blit_glyph): Likewise.
8103 (grub_video_vbe_blit_bitmap): Likewise.
8104 (grub_video_vbe_blit_render_target): Likewise.
8105 (grub_video_vbe_scroll): Likewise.
8106 (grub_video_vbe_swap_buffers): Likewise.
8107 (grub_video_vbe_create_render_target): Likewise.
8108 (grub_video_vbe_delete_render_target): Likewise.
8109 (grub_video_vbe_set_active_render_target): Likewise.
8110 (grub_vbe_set_pixel_rgb): Remove function.
8111 (grub_vbe_set_pixel_index): Likewise.
8112 (index_color_mode): Remove static variable.
8113 (active_mode): Likewise.
8114 (framebuffer): Likewise.
8115 (bytes_per_scan_line): Likewise.
8116 (grub_video_vbe_adapter): Added new static variable.
8117 (framebuffer): Likewise.
8118 (render_target): Likewise.
8119 (initial_mode): Likewise.
8120 (mode_in_use): Likewise.
8121 (mode_list): Likewise.
8123 2006-03-10 Marco Gerards <marco@gnu.org>
8125 * configure.ac (AC_INIT): Bumped to 1.93.
8127 * DISTLIST: Added `include/grub/hfs.h'.
8129 2006-02-01 Yoshinori K. Okuji <okuji@enbug.org>
8131 * boot/i386/pc/boot.S (general_error): Before looping, try INT
8132 18H, which might help the BIOS falling back to next boot media.
8134 2006-01-25 Yoshinori K. Okuji <okuji@enbug.org>
8136 * util/i386/pc/grub-install.in: Escape a backslash. Reported by
8137 Poe Chen <poe.poechen@gmail.com>.
8139 2006-01-17 Marco Gerards <marco@gnu.org>
8141 * include/grub/normal.h: Include <grub/script.h>.
8142 (grub_command_list): Removed struct.
8143 (grub_command_list_t): Removed type.
8144 (grub_menu_entry): Remove members `num' and `command_list'. Add
8145 members `commands' and `sourcecode'.
8146 * include/grub/script.h: Add inclusion guards.
8147 (grub_script_cmd_menuentry): New struct.
8148 (grub_script_execute_menuentry): New prototype.
8149 (grub_script_lexer_record_start): Likewise.
8150 (grub_script_lexer_record_stop): Likewise.
8151 * normal/execute.c (grub_script_execute_menuentry): New function.
8152 * normal/lexer.c (record, recording, recordpos, recordlen): New
8154 (grub_script_lexer_record_start): New function.
8155 (grub_script_lexer_record_stop): Likewise.
8156 (recordchar): Likewise.
8157 (nextchar): Likewise.
8158 (grub_script_yylex): Use `nextchar' to fetch new characters. Use
8159 2048 as the buffer size. Add the tokens `menuentry' and `@'.
8160 * normal/main.c: Include <grub/parser.h> and <grub/script.h>
8161 (current_menu): New variable.
8162 (free_menu): Mainly rewritten.
8163 (grub_normal_menu_addentry): New function.
8164 (read_config_file): Rewritten.
8165 * normal/menu.c (run_menu_entry): Mainly rewritten.
8166 * normal/menu_entry.c (make_screen): Rewritten the code to insert
8168 (run): Mainly rewritten.
8169 * normal/parser.y (menu_entry): New variable.
8170 (GRUB_PARSER_TOKEN_MENUENTRY): New token.
8171 (menuentry): New rule.
8172 (command): Add `menuentry'.
8173 (if_statement): Allow additional returns before `fi'.
8174 * normal/script.c (grub_script_create_cmdmenu): New function.
8176 2006-01-03 Marco Gerards <marco@gnu.org>
8178 * INSTALL: GNU Bison is required.
8179 * configure.ac: Rewritten the test to detect Bison.
8180 * Makefile.in (YACC): New variable. Reported by Xun Sun
8181 <xun.sun.cn@gmail.com>.
8183 2006-01-03 Marco Gerards <marco@gnu.org>
8185 * fs/hfsplus.c (grub_hfsplus_read_block): Convert the offset of
8186 the HFS+ filesystem to filesystem blocks.
8187 (grub_hfsplus_iterate_dir): Cast the `fileinfo' assignment so a
8188 GCC warning is silenced.
8190 2006-01-03 Marco Gerards <marco@gnu.org>
8192 * partmap/apple.c (apple_partition_map_iterate): Convert the data
8193 read from disk from big endian to host byte order.
8195 2006-01-03 Hollis Blanchard <hollis@penguinppc.org>
8197 * fs/hfs.c: Include <grub/hfs.h>. Added reference to the official
8199 (GRUB_HFS_EMBED_HFSPLUS_SIG): New macro.
8200 (grub_hfs_mount): Grammar fix in error. Make sure this is not an
8201 embedded HFS+ filesystem.
8202 (GRUB_HFS_MAGIC, grub_hfs_extent, grub_hfs_datarecord_t)
8203 (grub_hfs_sblock): Move from here...
8204 * include/grub/hfs.h: To here... New file.
8205 * fs/hfsplus.c: Include <grub/hfs.h>. Added reference to the official
8207 (GRUB_HFSPLUS_MAGIC, GRUB_HFSPLUSX_MAGIC, GRUB_HFSPLUS_SBLOCK):
8209 (grub_hfsplus_volheader): Change type of member `magic' to
8211 (grub_hfsplus_data): Add new member `embedded_offset'.
8212 (grub_hfsplus_read_block): Add the HFS+ wrapper offset to the
8214 (grub_hfsplus_mount): Read the HFS+ wrapper if it exists.
8215 Calculate the offset.
8217 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
8219 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRP_ADDR):
8221 (GRUB_BOOT_MACHINE_DRP_SIZE): Likewise.
8223 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
8225 * kern/env.c (grub_env_set): Check if ENV->VALUE instead of
8226 ENV->NAME is NULL after allocating ENV->VALUE.
8228 2005-12-25 Marco Gerards <marco@gnu.org>
8230 * kern/env.c (grub_env_set): Rewritten the error handling code.
8232 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
8234 * geninit.sh: Made more robust, and more portable.
8236 2005-12-25 Marco Gerards <marco@gnu.org>
8238 Add support for Apple HFS+ filesystems.
8240 * fs/hfsplus.c: New file.
8242 * DISTLIST: Added `fs/hfsplus.c'.
8244 * conf/common.rmk (pkgdata_MODULES): Add `hfsplus.mod'.
8245 (hfsplus_mod_SOURCES): New variable.
8246 (hfsplus_mod_CFLAGS): Likewise.
8247 (hfsplus_mod_LDFLAGS): Likewise.
8248 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/hfsplus.c'.
8249 (grub_setup_SOURCES): Likewise.
8250 (grub_mkdevicemap_SOURCES): Likewise.
8251 (grub_emu_SOURCES): Likewise.
8252 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8254 * fs/fshelp.c (grub_fshelp_log2blksize): New function.
8256 * include/grub/fshelp.h (grub_fshelp_log2blksize): new prototype.
8258 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
8260 * DISTLIST: Added geninitheader.sh, geninit.sh, commands/test.c,
8261 commands/i386/pc/play.c, conf/common.mk, conf/common.rmk,
8262 include/grub/parser.h, include/grub/script.h, kern/parser.c,
8263 kern/sparc64/cache.S, normal/execute.c, normal/function.c,
8264 normal/lexer.c, normal/parser.y, normal/script.c, and
8266 Removed kern/sparc64/cache.c.
8268 * conf/common.rmk (DISTCLEANFILES): Added grub_script.tab.c,
8269 grub_script.tab.h, grub_modules_init.lst, grub_modules_init.h,
8272 * configure.ac (AC_INIT): Bumped to 1.92.
8274 2005-12-24 Vesa Jaaskelainen <chaac@nic.fi>
8276 * kern/err.c (grub_error_push): Added new function to support error
8278 (grub_error_pop): Likewise.
8279 (grub_error_stack_items): New local variable to support error stacks.
8280 (grub_error_stack_pos): Likewise.
8281 (grub_error_stack_assert): Likewise.
8282 (GRUB_ERROR_STACK_SIZE): Added new define to configure maximum error
8284 (grub_print_error): Added support to print errors from error stack.
8286 * include/grub/err.h (grub_error_push): Added function prototype.
8287 (grub_error_pop): Likewise.
8289 2005-12-09 Hollis Blanchard <hollis@penguinppc.org>
8291 * configure.ac: Accept `powerpc64' as host_cpu.
8292 (amd64): Rename to `biarch32'.
8294 * kern/powerpc/cache.S (grub_arch_sync_caches): Handle
8295 non-cacheline-aligned addresses.
8297 * kern/dl.c (grub_dl_load_core): Add grub_dprintf messages.
8298 (grub_dl_flush_cache): Likewise. Only call `grub_arch_sync_caches'
8299 if `size' is non-zero.
8301 2005-12-03 Marco Gerards <mgerards@xs4all.nl>
8303 * conf/common.rmk (grub_modules_init.lst): Use `-printf "%P\n"'
8304 and `cd' to make sure the filename is not prefixed with a
8306 (pkgdata_MODULES): Add `gpt.mod'.
8307 (gpt_mod_SOURCES): New variable.
8308 (gpt_mod_CFLAGS): Likewise.
8309 (gpt_mod_LDFLAGS): Likewise.
8311 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/gpt.c'.
8313 * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_GPT_DISK):
8316 * partmap/gpt.c: New file.
8318 * partmap/pc.c (pc_partition_map_iterate): Don't continue when a
8319 GPT partition map is detected.
8321 2005-12-03 Vincent Pelletier <subdino2004@yahoo.fr>
8323 * commands/i386/pc/play.c: New file.
8324 * conf/i386-pc.rmk (pkgdata_MODULES): Added play.mod.
8325 (play_mod_SOURCES, play_mod_CFLAGS, play_mod_LDFLAGS): New
8328 2005-11-27 Marco Gerards <mgerards@xs4all.nl>
8330 * include/grub/dl.h (GRUB_MOD_INIT): Use `__attribute__
8331 ((unused))' to silence gcc warning.
8333 2005-11-26 Hollis Blanchard <hollis@penguinppc.org>
8335 * configure.ac: Correct `AC_PROG_YACC' test.
8337 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
8339 * util/powerpc/ieee1275/grub-install.in: Run the mount point
8340 check before installing files.
8342 2005-11-22 Mike Small <smallm@panix.com>
8344 * util/powerpc/ieee1275/grub-install.in (grubdir): Fixed partition
8345 number regex so multidigit numbers are recognized correctly.
8347 2005-11-22 Mike Small <smallm@panix.com>
8349 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Add a
8350 debugging message before attempting to claim memory.
8351 (grub_rescue_cmd_initrd): Add a claim debugging message and try
8352 multiple addresses in case of failure.
8354 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
8356 * term/tparm.c (get_space): Remove empty `if' statement.
8358 * fs/ufs.c (grub_ufs_find_file): Remove `grub_le_to_cpu32'.
8360 * kern/parser.c (check_varstate): Rename `state' to 's'.
8362 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
8364 * partmap/acorn.c: Change `unsigned' to `unsigned int'. Move all
8365 variable definitions to the beginning of each function. Sort stack
8367 (find): Rename to `acorn_partition_map_find'. Cast `grub_disk_read'
8368 `buf' argument to `char *'.
8370 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
8372 * conf/powerpc-ieee1275.rmk: Include conf/common.mk.
8373 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
8374 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
8375 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
8376 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
8377 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
8378 configfile.mod, search.mod, gzio.mod and test.mod.
8379 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
8380 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
8381 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
8382 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
8383 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
8384 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
8385 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
8386 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
8387 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
8388 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
8389 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
8390 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
8391 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
8392 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
8393 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
8394 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
8395 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
8396 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
8397 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
8398 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
8399 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
8400 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
8401 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Removed.
8403 * conf/common.mk (grub_modules_init.lst): Use `find' instead of
8405 (pkgdata_MODULES): Add test.mod.
8407 2005-11-18 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
8409 * genmk.rb: Fixed list rules moved to Makefile.in. Recognise
8410 appending to variables with "+=".
8411 (PModule): Use full pathname to generate *.lst filenames.
8413 * Makefile.in: Fixed list rules moved from genmk.rb.
8414 (.DELETE_ON_ERROR): New special target.
8415 (RMKFILES): Add common.rmk and sparc64-ieee1275.rmk.
8417 * conf/i386-pc.rmk: Include conf/common.mk.
8418 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
8419 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
8420 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
8421 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
8422 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
8423 configfile.mod, search.mod, gzio.mod and test.mod.
8424 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
8425 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
8426 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
8427 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
8428 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
8429 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
8430 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
8431 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
8432 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
8433 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
8434 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
8435 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
8436 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
8437 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
8438 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
8439 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
8440 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
8441 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
8442 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
8443 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
8444 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
8445 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
8446 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Move from
8448 * conf/common.rmk: ... to here. New file.
8450 * conf/common.mk: New file.
8452 2005-11-18 Yoshinori K. Okuji <okuji@enbug.org>
8454 * conf/powerpc-ieee1275.rmk (grub_script.tab.h): Unified to ...
8455 (grub_script.tab.c): ... here.
8457 * conf/sparc64-ieee1275.rmk (grub_script.tab.h): Unified to ...
8458 (grub_script.tab.c): ... here.
8460 * conf/i386-pc.rmk (grub_script.tab.h): Unified to ...
8461 (grub_script.tab.c): ... here.
8463 * normal/command.c (grub_command_find): Fixed a memory leak of
8464 MODULE_NAME. Reported by Mike Small <smallm@panix.com>.
8466 2005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
8468 * include/grub/symbol.h: (FUNCTION): Use double quotes instead of
8469 "@" which marks the start of a comment on ARM.
8470 (VARIABLE): Likewise.
8472 2005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
8474 Add support for Linux/ADFS partition tables.
8476 * partmap/acorn.c: New file.
8478 * include/grub/acorn_filecore.h: Likewise.
8480 * DISTLIST: Added `partmap/acorn.c' and
8481 `include/grub/acorn_filecore.h'.
8483 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
8485 (pkgdata_MODULES): Add `acorn.mod'.
8486 (acorn_mod_SOURCES): New variable.
8487 (acorn_mod_CFLAGS): Likewise.
8489 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
8491 (pkgdata_MODULES): Add `acorn.mod'.
8492 (acorn_mod_SOURCES): New variable.
8493 (acorn_mod_CFLAGS): Likewise.
8495 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/acorn.c'.
8496 (pkgdata_MODULES): Add `acorn.mod'.
8497 (acorn_mod_SOURCES): New variable.
8498 (acorn_mod_CFLAGS): Likewise.
8499 (acorn_mod_LDFLAGS): Likewise.
8501 * include/types.h (grub_disk_addr_t): New typedef.
8503 2005-11-13 Marco Gerards <mgerards@xs4all.nl>
8505 * geninit.sh: New file.
8507 * geninitheader.sh: Likewise.
8509 * commands/boot.c (grub_boot_init, grub_boot_fini): Removed.
8510 * commands/cat.c (grub_cat_init, grub_cat_fini): Likewise.
8511 * commands/cmp.c (grub_cmp_init, grub_cmp_fini): Likewise.
8512 * commands/configfile.c (grub_configfile_init)
8513 (grub_configfile_fini): Likewise.
8514 * commands/default.c (grub_default_init, grub_default_fini):
8516 * commands/help.c (grub_help_init, grub_help_fini): Likewise.
8517 * commands/ls.c (grub_ls_init, grub_ls_fini): Likewise.
8518 * commands/search.c (grub_search_init, grub_search_fini): Likewise.
8519 * commands/terminal.c (grub_terminal_init, grub_terminal_fini):
8521 * commands/test.c (grub_test_init, grub_test_fini): Likewise.
8522 * commands/timeout.c (grub_timeout_init, grub_timeout_fini):
8524 * commands/i386/pc/halt.c (grub_halt_init, grub_halt_fini): Likewise.
8525 * commands/ieee1275/halt.c (grub_halt_init, grub_halt_fini):
8527 * commands/i386/pc/reboot.c (grub_reboot_init, grub_reboot_fini):
8529 * commands/ieee1275/reboot.c (grub_reboot_init, grub_reboot_fini):
8531 * disk/loopback.c (grub_loop_init, grub_loop_fini): Likewise.
8532 * fs/affs.c (grub_affs_init, grub_affs_fini): Likewise.
8533 * fs/ext2.c (grub_ext2_init, grub_ext2_fini): Likewise.
8534 * fs/fat.c (grub_fat_init, grub_fat_fini): Likewise.
8535 * fs/hfs.c (grub_hfs_init, grub_hfs_fini): Likewise.
8536 * fs/iso9660.c (grub_iso9660_init, grub_iso9660_fini): Likewise.
8537 * fs/jfs.c (grub_jfs_init, grub_jfs_fini): Likewise.
8538 * fs/minix.c (grub_minix_init, grub_minix_fini): Likewise.
8539 * fs/sfs.c (grub_sfs_init, grub_sfs_fini): Likewise.
8540 * fs/ufs.c (grub_ufs_init, grub_ufs_fini): Likewise.
8541 * fs/xfs.c (grub_xfs_init, grub_xfs_fini): Likewise.
8542 * normal/main.c (grub_normal_init, grub_normal_fini): Likewise.
8543 * partmap/amiga.c (grub_amiga_partition_map_init)
8544 (grub_amiga_partition_map_fini): Likewise.
8545 * partmap/apple.c (grub_apple_partition_map_init)
8546 (grub_apple_partition_map_fini): Likewise.
8547 * partmap/pc.c (grub_pc_partition_map_init)
8548 (grub_pc_partition_map_fini): Likewise.
8549 * partmap/sun.c (grub_sun_partition_map_init,
8550 grub_sun_partition_map_fini): Likewise.
8551 * term/terminfo.c (grub_terminal_init, grub_terminal_fini):
8554 * util/grub-emu.c: Include <grub_modules_init.h>.
8555 (main): Don't initialize and de-initialize any modules directly,
8556 use `grub_init_all' and `grub_fini_all' instead.
8558 * term/i386/pc/vesafb.c (grub_vesafb_init): Renamed to
8559 `grub_vesafb_mod_init'.
8560 (grub_vesafb_fini): Renamed to `grub_vesafb_mod_fini'. Updated
8562 * term/i386/pc/vga.c (grub_vga_init): Renamed to
8563 `grub_vga_mod_init'. Updated all users.
8564 (grub_vga_fini): Renamed to `grub_vga_mod_fini'.
8566 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `grub_emu_init.c'.
8567 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c): New
8570 * include/grub/dl.h (GRUB_MOD_INIT): Add argument `name'.
8571 Generate a function to initialize the module in utilities.
8572 Updated all callers.
8573 (GRUB_MOD_FINI): Add argument `name'. Generate a function to
8574 initialize the module in utilities. Updated all callers.
8576 2005-11-09 Hollis Blanchard <hollis@penguinppc.org>
8578 * term/ieee1275/ofconsole.c (grub_ofconsole_cls): Use both the ANSI
8579 escape sequence and a literal ^L to clear the screen.
8581 * commands/ieee1275/suspend.c (grub_cmd_suspend): Clear the screen
8582 when returning from Open Firmware.
8584 2005-11-09 Hollis Blanchard <hollis@penguinppc.org>
8586 * term/ieee1275/ofconsole.c (grub_ofconsole_width): New variable.
8587 (grub_ofconsole_height): Likewise.
8588 (grub_ofconsole_putchar): If `grub_curr_x' exceeds console width,
8589 manually insert a '\n'.
8590 (grub_ofconsole_getwh): Set and return `grub_ofconsole_width' and
8591 `grub_ofconsole_height'. Return early if these are already set.
8593 2005-11-07 Vincent Pelletier <subdino2004@yahoo.fr>
8595 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
8596 `commands/test.c', `fs/affs.c', `fs/sfs.c', `fs/xfs.c',
8597 `normal/execute.c', `normal/lexer.c', `io/gzio.c',
8598 `kern/parser.c', `grub_script.tab.c', `normal/function.c'
8599 and `normal/script.c'.
8600 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
8601 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
8602 (test_mod_SOURCES): New variable.
8603 (test_mod_CFLAGS): Likewise.
8604 (test_mod_LDFLAGS): Likewise.
8605 (pkgdata_MODULES): Add `test.mod'.
8606 (grub_script.tab.c): New rule.
8607 (grub_script.tab.h): Likewise.
8609 2005-11-07 Marco Gerards <mgerards@xs4all.nl>
8611 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
8612 `commands/test.c', `normal/execute.c', `normal/lexer.c',
8613 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
8614 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
8615 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
8616 (test_mod_SOURCES): New variable.
8617 (test_mod_CFLAGS): Likewise.
8618 (pkgdata_MODULES): Add `test.mod'.
8619 (grub_script.tab.c): New rule.
8620 (grub_script.tab.h): Likewise.
8622 2005-11-06 Marco Gerards <mgerards@xs4all.nl>
8624 Add initial scripting support.
8626 * commands/test.c: New file.
8627 * include/grub/script.h: Likewise.
8628 * normal/execute.c: Likewise.
8629 * normal/function.c: Likewise.
8630 * normal/lexer.c: Likewise.
8631 * normal/parser.y: Likewise.
8632 * normal/script.c: Likewise.
8634 * configure.ac: Add `AC_PROG_YACC' test.
8636 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/test.c',
8637 `normal/execute.c', `normal/lexer.c', `grub_script.tab.c',
8638 `normal/function.c' and `normal/script.c'.
8639 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
8640 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
8641 (test_mod_SOURCES, test_mod_CFLAGS, test_mod_LDFLAGS): New
8643 (pkgdata_MODULES): Add `test.mod'.
8644 (grub_script.tab.c): New rule.
8645 (grub_script.tab.h): Likewise.
8647 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TEST_FAILURE'.
8649 * include/grub/normal.h (grub_test_init): New prototype.
8650 (grub_test_fini): Likewise.
8652 * normal/command.c: Include <grub/script.h>.
8653 (grub_command_execute): Rewritten.
8655 * util/grub-emu.c (main): Call `grub_test_init' and
8658 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
8660 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Initialize `msecs'
8662 * term/ieee1275/ofconsole.c (grub_ofconsole_checkkey): Return -1 if
8663 there are no pending characters.
8665 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
8667 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_get_devname): Use
8668 `grub_strndup' to drop device arguments. Replace unnecessary
8669 `grub_strndup' with `grub_strdup'.
8671 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
8673 * kern/term.c (grub_cls): Do not call grub_cur_term->cls() if the
8674 `debug' environment variable has been set.
8676 2005-11-02 Hollis Blanchard <hollis@penguinppc.org>
8678 * Makefile.in (install-local): Use $(DATA).
8679 (uninstall): Likewise.
8680 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Move grub-mkimage...
8681 (sbin_UTILITIES): ... to here.
8682 (sbin_SCRIPTS): New variable.
8683 (grub_install_SOURCES): New variable.
8684 * util/powerpc/ieee1275/grub-install.in: New file.
8685 * util/powerpc/ieee1275/grub-mkimage.c (kernel_path): Remove
8687 (add_segments): Call `grub_util_get_path'.
8689 2005-10-28 Yoshinori K. Okuji <okuji@enbug.org>
8691 From Timothy Baldwin:
8692 * commands/ls.c (grub_ls_list_files): Close FILE with
8694 * kern/misc.c (grub_vsprintf): Terminate the string S with NUL.
8696 2005-10-24 Marco Gerards <mgerards@xs4all.nl>
8698 * include/grub/parser.h: New file.
8700 * kern/parser.c: Likewise.
8702 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/parser.c'.
8703 (grub_setup_SOURCES): Likewise.
8704 (grub_probefs_SOURCES): Likewise.
8705 (grub_emu_SOURCES): Likewise.
8706 (kernel_img_HEADERS): Add `parser.h'.
8708 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
8709 (grub_emu_SOURCES): Add `kern/parser.c'.
8710 (grubof_SOURCES): Likewise.
8712 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
8713 (grubof_SOURCES): Add `kern/parser.c'.
8715 * include/grub/misc.h (grub_split_cmdline): Removed prototype.
8717 * kern/misc.c (grub_split_cmdline): Removed function.
8719 * kern/rescue.c: Include <grub/parser.h>.
8720 (grub_enter_rescue_mode): Use `grub_parser_split_cmdline' instead
8721 of `grub_split_cmdline'.
8723 * normal/command.c: Include <grub/parser.h>.
8724 (grub_command_execute): Use `grub_parser_split_cmdline' instead
8725 of `grub_split_cmdline'.
8727 * normal/completion.c: Include <grub/parser.h>.
8728 (cmdline_state): New variable.
8729 (iterate_dir): End the filename with a quote depending on the
8731 (get_state): new function.
8732 (grub_normal_do_completion): Use `grub_parser_split_cmdline' to
8733 split the arguments and determine the current argument. When the
8734 argument string is not quoted, escape all spaces.
8736 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
8738 * normal/sparc64/setjmp.S: New file.
8740 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
8742 * include/grub/sparc64/libgcc.h: New file.
8743 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Remove -Av9.
8744 (normal_mod_SOURCES): Use normal/sparc64/setjmp.S instead of
8745 normal/sparc64/setjmp.c.
8747 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
8749 * kern/sparc64/dl.c: Rewritten for SPARCV9 ELF.
8750 * kern/sparc64/cache.S: New file.
8751 * kern/sparc64/cache.c: Removed.
8752 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Add -Av9.
8753 (COMMON_CFLAGS): Add -mno-app-regs. Remove -mcpu=v9 and
8755 (COMMON_LDFLAGS): Add -melf64_sparc.
8756 (grubof_HEADERS): Add sparc64/libgcc.h and machine/kernel.h.
8757 (grubof_SOURCES): Use cache.S instead of cache.c.
8758 (grubof_LDFLAGS): Add -mno-app-regs. Replace "-Xlinker
8759 --oformat -Xlinker elf64-sparc" by "-Bstatic,-melf64_sparc".
8760 (pkgdata_MODULES): Uncomment. Leave linux.mod and _linux.mod
8762 (normal_mod_SOURCES): Add normal/completion.c and normal/misc.c.
8763 (_linux_mod_SOURCES, _linux_mod_CFLAGS, linux_mod_SOURCES)
8764 (linux_mod_CFLAGS): Commented out.
8765 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS): New macro, commented
8766 out because module isn't built.
8767 (fshelp_mod_LDFLAGS, fat_mod_LDFLAGS, ext2_mod_LDFLAGS)
8768 (ufs_mod_LDFLAGS, minix_mod_LDFLAGS, hfs_mod_LDFLAGS)
8769 (jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS, normal_mod_LDFLAGS)
8770 (hello_mod_LDFLAGS, boot_mod_LDFLAGS, terminal_mod_LDFLAGS)
8771 (ls_mod_LDFLAGS, cmp_mod_LDFLAGS, cat_mod_LDFLAGS)
8772 (font_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
8773 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
8774 (suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS)
8775 (help_mod_LDFLAGS, default_mod_LDFLAGS, timeout_mod_LDFLAGS)
8776 (configfile_mod_LDFLAGS, search_mod_LDFLAGS, xfs_mod_SOURCES)
8777 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
8778 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
8779 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, gzio_mod_SOURCES)
8780 (gzio_mod_CFLAGS, gzio_mod_LDFLAGS): New macro.
8782 2005-10-20 Yoshinori K. Okuji <okuji@enbug.org>
8784 * util/i386/pc/grub-probefs.c (main): Call grub_xfs_init and
8785 grub_xfs_fini. Do not call grub_hfs_init or grub_hfs_fini any
8786 longer, because HFS should not be used on PC.
8788 2005-10-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
8790 * io/gzio.c (grub_gzio_read): Use OFFSET instead of FILE->OFFSET
8791 consistently within the loop.
8793 2005-10-15 Marco Gerards <mgerards@xs4all.nl>
8795 * fs/xfs.c (grub_xfs_iterate_dir): Detect an error if part of a
8796 directory can not be read.
8798 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
8800 * configure.ac (AC_INIT): Increase the version number to 1.91.
8802 * DISTLIST: Added include/grub/terminfo.h, include/grub/tparm.h,
8803 include/grub/i386/pc/serial.h, term/terminfo.c, term/tparm.c and
8804 term/i386/pc/serial.c.
8806 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
8808 * kern/file.c (grub_file_seek): Seeking to an offset equal to a
8809 file size must be permitted.
8811 * kern/i386/pc/startup.S (multiboot_trampoline): Fix a mistake
8812 between %ah and %al.
8814 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
8816 * fs/xfs.c (grub_xfs_iterate_dir): Change the type of BLK to
8818 Call the hook with a NUL-terminated filename.
8819 (grub_xfs_mount): Use grub_be_to_cpu32 instead of
8822 * kern/term.c (cursor_state): New variable.
8823 (grub_term_set_current): Reset the cursor state on a new
8825 (grub_setcursor): Rewritten to use CURSOR_STATE.
8826 (grub_getcursor): New function.
8828 * include/grub/term.h (grub_getcursor): New prototype.
8830 * io/gzio.c (test_header): Align BUF for accessing it as 32-bit
8831 integers on ARM. Reported by Timothy Baldwin
8832 <T.E.Baldwin99@members.leeds.ac.uk>.
8834 2005-10-11 Marco Gerards <mgerards@xs4all.nl>
8836 * fs/sfs.c (grub_sfs_open): Don't free `data->label' if it is not
8838 (grub_sfs_dir): Likewise.
8840 2005-10-09 Marco Gerards <mgerards@xs4all.nl>
8842 Add support for the SFS filesystem.
8844 * fs/sfs.c: New file.
8846 * DISTLIST: Added `fs/sfs.c'.
8848 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/sfs.c'.
8849 (grub_probefs_SOURCES): Likewise.
8850 (grub_emu_SOURCES): Likewise.
8851 (pkgdata_MODULES): Add `sfs.mod'.
8852 (sfs_mod_SOURCES): New variable.
8853 (sfs_mod_CFLAGS): Likewise.
8854 (sfs_mod_LDFLAGS): Likewise.
8856 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/sfs.c'.
8857 (pkgdata_MODULES): Add `sfs.mod'.
8858 (sfs_mod_SOURCES): New variable.
8859 (sfs_mod_CFLAGS): Likewise.
8861 * util/grub-emu.c (main): Call `grub_sfs_init' and
8864 * include/grub/fs.h (grub_sfs_init): New prototype.
8865 (grub_sfs_fini): Likewise.
8867 2005-10-07 Marco Gerards <mgerards@xs4all.nl>
8869 Add support for the AFFS filesystem.
8871 * fs/affs.c: New file.
8873 * DISTLIST: Added `fs/affs.c'.
8875 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/affs.c'.
8876 (grub_probefs_SOURCES): Likewise.
8877 (grub_emu_SOURCES): Likewise.
8878 (pkgdata_MODULES): Add `affs.mod'.
8879 (affs_mod_SOURCES): New variable.
8880 (affs_mod_CFLAGS): Likewise.
8881 (affs_mod_LDFLAGS): Likewise.
8883 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/affs.c'.
8884 (pkgdata_MODULES): Add `affs.mod'.
8885 (affs_mod_SOURCES): New variable.
8886 (affs_mod_CFLAGS): Likewise.
8888 * util/grub-emu.c (main): Call `grub_affs_init' and
8891 * include/grub/fs.h (grub_affs_init): New prototype.
8892 (grub_affs_fini): Likewise.
8894 2005-10-01 Marco Gerards <mgerards@xs4all.nl>
8896 * fs/xfs.c (grub_xfs_iterate_dir): Add parentheses.
8898 2005-10-01 Marco Gerards <mgerards@xs4all.nl>
8900 * configure.ac: Accept `x86_64' as host_cpu. In that case add
8903 * genmk.rb (class PModule): Always use `$(#{prefix}_LDFLAGS)' when
8906 * conf/i386-pc.rmk (COMMON_CFLAGS): Add `-m32'.
8907 (COMMON_LDFLAGS): New variable.
8908 (kernel_img_LDFLAGS): Include `COMMON_FLAGS'.
8909 (_chain_mod_LDFLAGS, fshelp_mod_LDFLAGS, fat_mod_LDFLAGS)
8910 (ext2_mod_LDFLAGS, ufs_mod_LDFLAGS, minix_mod_LDFLAGS)
8911 (hfs_mod_LDFLAGS, jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS)
8912 (xfs_mod_LDFLAGS, _linux_mod_LDFLAGS, linux_mod_LDFLAGS)
8913 (normal_mod_LDFLAGS, hello_mod_LDFLAGS, boot_mod_LDFLAGS)
8914 (terminal_mod_LDFLAGS, ls_mod_LDFLAGS, cmp_mod_LDFLAGS)
8915 (cat_mod_LDFLAGS, help_mod_LDFLAGS, reboot_mod_LDFLAGS)
8916 (halt_mod_LDFLAGS, vga_mod_LDFLAGS, font_mod_LDFLAGS)
8917 (terminfo_mod_LDFLAGS, serial_mod_LDFLAGS, _multiboot_mod_LDFLAGS)
8918 (multiboot_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
8919 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
8920 (default_mod_LDFLAGS, timeout_mod_LDFLAGS, configfile_mod_LDFLAGS)
8921 (vbe_mod_LDFLAGS, vesafb_mod_LDFLAGS, vbeinfo_mod_LDFLAGS)
8922 (vbetest_mod_LDFLAGS, search_mod_LDFLAGS, gzio_mod_LDFLAGS): New
8924 (normal_mod_ASFLAGS): Add `-m32'.
8926 * include/grub/types.h (grub_host_addr_t, grub_host_off_t)
8927 (grub_host_size_t, grub_host_ssize_t): New types.
8928 (grub_addr_t, grub_off_t, grub_size_t, grub_ssize_t): Make type
8929 dependent of `GRUB_CPU_SIZEOF_VOID_P' instead on
8930 `GRUB_HOST_SIZEOF_VOID_P'.
8932 * include/grub/kernel.h (struct grub_module_header): Type of
8933 member offset changed to `grub_host_off_t'. Type of member size
8934 changed to `grub_host_size_t'.
8935 (struct grub_module_info): Type of member offset changed to
8936 `grub_host_off_t'. Type of member size changed to
8939 2005-09-29 Yoshinori K. Okuji <okuji@enbug.org>
8941 Make GRUB's kernel compliant to Multiboot Specification.
8943 * kern/i386/pc/startup.S (multiboot_header): New label.
8944 (multiboot_entry): Likewise.
8945 (multiboot_trampoline): Likewise.
8947 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
8950 * fs/xfs.c (grub_xfs_iterate_dir): Fix a syntax error. You may not
8951 put parentheses after a question mark.
8952 [!GRUB_UTIL] (my_mod): New variable.
8954 * util/grub-emu.c (main): Call grub_xfs_init and grub_xfs_fini.
8956 2005-09-28 Marco Gerards <mgerards@xs4all.nl>
8958 Adds support for the XFS filesystem. Btrees are not supported
8961 * fs/xfs.c: New file.
8963 * DISTLIST: Added `fs/xfs.c'.
8965 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/xfs.c'.
8966 (grub_probefs_SOURCES): Likewise.
8967 (grub_emu_SOURCES): Likewise.
8968 (pkgdata_MODULES): Add `xfs.mod'.
8969 (xfs_mod_SOURCES): New variable.
8970 (xfs_mod_CFLAGS): Likewise.
8972 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/xfs.c'.
8973 (pkgdata_MODULES): Add `xfs.mod'.
8974 (xfs_mod_SOURCES): New variable.
8975 (xfs_mod_CFLAGS): Likewise.
8977 * util/grub-emu.c (main): Call `grub_xfs_init' and
8980 * include/grub/fs.h (grub_xfs_init): New prototype.
8981 (grub_xfs_fini): Likewise.
8984 2005-09-18 Vesa Jaaskelainen <chaac@nic.fi>
8986 * video/i386/pc/vbe.c (grub_vbe_set_video_mode): In indexed
8987 color modes, allow greater than 16 colors to be configured as
8990 2005-09-03 Yoshinori K. Okuji <okuji@enbug.org>
8992 * normal/completion.c (complete_arguments): Add the qualifier
8995 From Omniflux <omniflux+lists@omniflux.com>:
8996 * include/grub/terminfo.h: New file.
8997 * include/grub/tparm.h: Likewise.
8998 * include/grub/i386/pc/serial.h: Likewise.
8999 * term/terminfo.c: Likewise.
9000 * term/tparm.c: Likewise.
9001 * term/i386/pc/serial.c: Likewise.
9002 * conf/i386-pc.rmk (pkgdata_MODULES): Added terminfo.mod and
9004 (terminfo_mod_SOURCES): New variable.
9005 (terminfo_mod_CFLAGS): Likewise.
9006 (serial_mod_SOURCES): Likewise.
9007 (serial_mod_CFLAGS): Likewise.
9009 2005-08-31 Yoshinori K. Okuji <okuji@enbug.org>
9011 * DISTLIST: Replaced boot/powerpc/ieee1275/crt0.S and
9012 boot/powerpc/ieee1275/cmain.c with kern/powerpc/ieee1275/crt0.S
9013 and kern/powerpc/ieee1275/cmain.c, respectively.
9015 * boot/powerpc/ieee1275/crt0.S: Moved to ...
9016 * kern/powerpc/ieee1275/crt0.S: ... here.
9018 * boot/powerpc/ieee1275/cmain.c: Moved to ...
9019 * kern/powerpc/ieee1275/cmain.c: ... here.
9021 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Use
9022 kern/powerpc/ieee1275/crt0.S and kern/powerpc/ieee1275/cmain.c
9023 instead of boot/powerpc/ieee1275/crt0.S and
9024 boot/powerpc/ieee1275/cmain.c, respectively.
9026 * boot/i386/pc/boot.S (lba_mode): Do not store the total number of
9027 sectors. It was not used anyway.
9029 2005-08-30 Hollis Blanchard <hollis@penguinppc.org>
9031 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): Fix
9032 `unused parameter' warning.
9034 2005-08-30 Hollis Blanchard <hollis@penguinppc.org>
9036 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): New
9038 (grub_ofconsole_term): Specify grub_ofconsole_getcharwidth as
9041 2005-08-28 Marco Gerards <metgerards@student.han.nl>
9043 * include/grub/normal.h (enum grub_completion_type): Added
9044 `GRUB_COMPLETION_TYPE_ARGUMENT'.
9046 * normal/cmdline.c (print_completion): Handle
9047 the `GRUB_COMPLETION_TYPE_ARGUMENT' type.
9048 * normal/menu_entry.c (store_completion): Likewise.
9050 * normal/completion.c (complete_arguments): New function.
9051 (grub_normal_do_completion): Call `complete_arguments' when the
9052 current words start with a dash.
9054 2005-08-27 Marco Gerards <metgerards@student.han.nl>
9056 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Fix typo (use
9057 `gzio.mod' instead of `io.mod').
9059 2005-08-22 Yoshinori K. Okuji <okuji@enbug.org>
9061 * gendistlist.sh (EXTRA_DISTFILES): Added genfslist.sh.
9062 (DISTDIRS): Added io and video.
9063 Rewrite the search routine to make an output consistently.
9065 * DISTLIST: Added conf/sparc64-ieee1275.mk,
9066 conf/sparc64-ieee1275.rmk, include/grub/gzio.h,
9067 include/grub/ieee1275/ieee1275.h, include/grub/ieee1275/ofdisk.h,
9068 io/gzio.c, kern/sparc64/cache.c, kern/sparc64/dl.c,
9069 kern/sparc64/ieee1275/init.c, kern/sparc64/ieee1275/openfw.c and
9070 util/powerpc/ieee1275/misc.c.
9072 * include/grub/gzio.h: New file.
9073 * io/gzio.c: Likewise.
9075 * kern/file.c (grub_file_close): Call grub_device_close only if
9076 FILE->DEVICE is not NULL.
9078 * include/grub/mm.h [!NULL] (NULL): New macro.
9080 * include/grub/err.h (GRUB_ERR_BAD_GZIP_DATA): New constant.
9082 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added io/gzip.c.
9083 (pkgdata_MODULES): Added gzio.mod.
9084 (gzio_mod_SOURCES): New variable.
9085 (gzio_mod_CFLAGS): Likewise.
9087 * conf/i386-pc.rmk (grub_emu_SOURCES): Added io/gzip.c.
9088 (pkgdata_MODULES): Added gzio.mod.
9089 (gzio_mod_SOURCES): New variable.
9090 (gzio_mod_CFLAGS): Likewise.
9092 * commands/cat.c: Include grub/gzio.h.
9093 (grub_cmd_cat): Use grub_gzfile_open instead of
9096 * commands/cmp.c: Include grub/gzio.h.
9097 (grub_cmd_cmp): Use grub_gzfile_open instead of
9100 * loader/i386/pc/multiboot.c: Include grub/gzio.h.
9101 (grub_rescue_cmd_multiboot): Use grub_gzfile_open instead of
9103 (grub_rescue_cmd_module): Likewise.
9105 2005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
9107 * conf/sparc64-ieee1275.rmk (grubof_SOURCES): The first file must be
9108 kern/sparc64/ieee1275/init.c because it contains _start.
9109 * conf/sparc64-ieee1275.mk: Generated from conf/sparc64-ieee1275.rmk.
9111 2005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
9113 * configure.ac: Add support for sparc64 host with ieee1275
9115 * configure: Generated from configure.ac.
9116 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Use grub_ssize_t
9118 (grub_ofdisk_read): Likewise.
9119 (grub_ofdisk_open): Use %p to print pointer values, and cast the
9120 pointers as (void *) to remove a warning.
9121 (grub_ofdisk_close): Likewise.
9122 (grub_ofdisk_read): Likewise.
9123 * kern/ieee1275/ieee1275.c (grub_ieee1275_exit): This never
9124 returns, so make it return void to remove a warning.
9125 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_exit):
9126 Corresponding prototype change.
9127 * kern/mm.c (grub_mm_init_region): Use %p to print pointer
9128 values, and cast the pointers as (void *) to remove a warning.
9129 (grub_mm_dump): Likewise.
9130 * conf/sparc64-ieee1275.mk: New file.
9131 * conf/sparc64-ieee1275.rmk: Likewise.
9132 * include/grub/sparc64/setjmp.h: Likewise.
9133 * include/grub/sparc64/types.h: Likewise.
9134 * include/grub/sparc64/ieee1275/console.h: Likewise.
9135 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
9136 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
9137 * include/grub/sparc64/ieee1275/time.h: Likewise.
9138 * kern/sparc64/cache.c: Likewise.
9139 * kern/sparc64/dl.c: Likewise.
9140 * kern/sparc64/ieee1275/init.c: Likewise.
9141 * kern/sparc64/ieee1275/openfw.c: Likewise.
9143 2005-08-21 Yoshinori K. Okuji <okuji@enbug.org>
9145 * util/console.c (grub_ncurses_putchar): If C is greater than
9146 0x7f, set C to a question mark.
9147 (grub_ncurses_getcharwidth): New function.
9148 (grub_ncurses_term): Specify grub_ncurses_getcharwidth as
9151 * normal/menu.c (print_entry): Made aware of Unicode. First,
9152 convert TITLE to UCS-4, and predict the cursor position by
9155 * include/grub/misc.h (grub_utf8_to_ucs4): Specify the qualifier
9157 * kern/misc.c (grub_utf16_to_utf8): Likewise.
9159 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
9161 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Specify
9162 the boot file by the option BOOT_IMAGE. Use grub_stpcpy instead of
9165 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Specify the boot
9166 file by the option BOOT_IMAGE. Use grub_stpcpy instead of
9167 grub_strcpy and grub_strlen. Take it into account that a space
9168 character is inserted as a delimiter.
9170 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
9172 * partmap/pc.c (pc_partition_map_iterate): Include the value of an
9173 invalid magic in the error.
9175 * commands/search.c: New file.
9177 * util/grub-emu.c (main): Call grub_search_init and
9180 * kern/rescue.c (grub_rescue_print_disks): Removed.
9181 (grub_rescue_print_devices): New function.
9182 (grub_rescue_cmd_ls): Use grub_device_iterate with
9183 grub_rescue_print_devices instead of grub_disk_dev_iterate with
9184 grub_rescue_print_disks.
9186 * kern/partition.c (grub_partition_iterate): Return the result of
9187 PARTMAP->ITERATE instead of GRUB_ERRNO.
9189 * kern/device.c: Include grub/partition.h.
9190 (grub_device_iterate): New function.
9192 * include/grub/partition.h (grub_partition_iterate): Return int
9193 instead of grub_err_t.
9195 * include/grub/normal.h [GRUB_UTIL] (grub_search_init): New
9197 [GRUB_UTIL] (grub_search_fini): Likewise.
9199 * include/grub/device.h (grub_device_iterate): New prototype.
9201 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
9203 (pkgdata_MODULES): Added search.mod.
9204 (search_mod_SOURCES): New variable.
9205 (search_mod_CFLAGS): Likewise.
9207 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/search.c.
9208 (pkgdata_MODULES): Added search.mod.
9209 (search_mod_SOURCES): New variable.
9210 (search_mod_CFLAGS): Likewise.
9212 * commands/ls.c (grub_ls_list_disks): Renamed to ...
9213 (grub_ls_list_devices): ... this, and use grub_device_iterate.
9214 All callers changed.
9216 * DISTLIST: Added commands/search.c.
9218 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
9220 * kern/term.c (grub_putchar): Use grub_utf8_to_ucs4 for the
9222 (grub_getcharwidth): New function.
9224 * kern/misc.c (grub_utf8_to_ucs4): New function.
9226 * include/grub/term.h (struct grub_term): Added a new member
9228 (grub_getcharwidth): New prototype.
9230 * include/grub/misc.h (grub_utf8_to_ucs4): New prototype.
9232 * term/i386/pc/console.c (map_char): New function. Segregated from
9233 grub_console_putchar.
9234 (grub_console_putchar): Use map_char.
9235 (grub_console_getcharwidth): New function.
9236 (grub_console_term): Specified grub_console_getcharwidth as
9239 * term/i386/pc/vga.c (grub_vga_getcharwidth): New function.
9240 (grub_vga_term): Specified grub_vga_getcharwidth as getcharwidth.
9242 * term/i386/pc/vesafb.c (grub_virtual_screen_setup): Return
9244 (grub_vesafb_init): Do not use RC. Instead, use GRUB_ERRNO. Rely
9245 on grub_strtoul completely.
9246 (write_char): Declare local variables in the beginning of the
9248 (grub_vesafb_getcharwidth): New function.
9249 (grub_vesafb_term): Specified grub_vesafb_getcharwidth as
9252 2005-08-19 Yoshinori K. Okuji <okuji@enbug.org>
9254 * DISTLIST: Replace commands/i386/pc/vbe_list_modes.c and
9255 commands/i386/pc/vbe_test.c with commands/i386/pc/vbeinfo.c and
9256 commands/i386/pc/vbetest.c.
9258 * video/i386/pc/vbe.c (grub_vbe_probe): If INFOBLOCK is not NULL,
9259 call grub_vbe_get_controller_info again, because the returned
9260 information is volatile.
9261 (grub_vbe_set_video_mode): Mostly rewritten.
9262 (grub_vbe_get_video_mode): Use grub_vbe_probe and use
9263 grub_vbe_status_t correctly.
9264 (grub_vbe_get_video_mode_info): Likewise.
9265 (grub_vbe_set_pixel_rgb): Use a switch statement rather than
9266 several if statements.
9268 * commands/i386/pc/vbe_list_modes.c: Renamed to ...
9269 * commands/i386/pc/vbeinfo.c: ... this.
9271 * commands/i386/pc/vbe_test.c: Renamed to ...
9272 * commands/i386/pc/vbetest.c: ... this.
9274 * commands/i386/pc/vbeinfo.c (grub_cmd_vbe_list_modes): Renamed to
9276 (grub_cmd_vbeinfo): ... this. Save video modes before
9277 iterating. Skip a video mode, if it is not available, not enough
9278 information is given or it is monochrome. Show the memory
9279 model. Leave the interpretation of MODEVAR to grub_strtoul
9281 (GRUB_MOD_INIT): Rename vbe_list_modes to vbeinfo.
9282 (GRUB_MOD_FINI): Likewise.
9284 * commands/i386/pc/vbetest.c (grub_cmd_vbe_test): Renamed to ...
9285 (grub_cmd_vbetest): ... this. Don't print unnecessarily. Use
9286 grub_err_t instead of grub_uint32_t. Don't use SPTR. Remove a
9287 duplicated grub_env_get. Leave the interpretation of MODEVAR to
9288 grub_strtoul completely.
9290 (GRUB_MOD_INIT): Rename vbe_test to vbetest.
9291 (GRUB_MOD_FINI): Likewise.
9293 * normal/misc.c: Include grub/mm.h.
9295 * conf/i386-pc.rmk (pkgdata_MODULES): Replaced vbe_test.mod and
9296 vbe_list_modes with vbetest.mod and vbeinfo.mod.
9297 (vbe_list_modes_mod_SOURCES): Removed.
9298 (vbe_list_modes_mod_CFLAGS): Likewise.
9299 (vbe_test_mod_SOURCES): Likewise.
9300 (vbe_test_mod_CFLAGS): Likewise.
9301 (vbeinfo_mod_SOURCES): New variable.
9302 (vbeinfo_mod_CFLAGS): Likewise.
9303 (vbetest_mod_SOURCES): Likewise.
9304 (vbetest_mod_CFLAGS): Likewise.
9306 2005-08-18 Yoshinori K. Okuji <okuji@enbug.org>
9308 * normal/misc.c: New file.
9310 * DISTLIST: Added normal/misc.c.
9312 * partmap/amiga.c (amiga_partition_map_iterate): Add an argument
9313 DISK to HOOK. Call HOOK with DISK.
9314 * partmap/apple.c (apple_partition_map_iterate): Likewise.
9315 * partmap/pc.c (pc_partition_map_iterate): Likewise.
9316 * partmap/sun.c (sun_partition_map_iterate): Likewise.
9318 * normal/menu_entry.c (struct screen): Added a new member
9320 (completion_buffer): New global variable.
9321 (make_screen): Set SCREEN->COMPLETION_SHOWN to zero.
9322 (store_completion): New function.
9323 (complete): Likewise.
9324 (clear_completions): Likewise.
9325 (grub_menu_entry_run): If SCREEN->COMPLETION_SHOWN is non-zero,
9326 call clear_completions and reset SCREEN->COMPLETION_SHOWN. If C is
9327 a tab, call complete.
9329 * normal/completion.c (disk_dev): Removed.
9330 (print_simple_completion): Likewise.
9331 (print_partition_completion): Likewise.
9332 (print_func): New global variable.
9333 (add_completion): Do not take the arguments WHAT or PRINT any
9334 longer. Added a new argument TYPE. Instead of printing directly,
9335 call PRINT_FUNC if not NULL.
9336 All callers changed.
9337 (complete_device): Use a local variable DEV instead of
9338 DISK_DEV. Do not move CURRENT_WORD to the end of a device name.
9339 (grub_normal_do_completion): Take a new argument HOOK. Do not
9340 initialize DISK_DEV. Initialize PRINT_FUNC to HOOK. If RET is an
9341 empty string, return NULL instead.
9342 All callers changed.
9344 * normal/cmdline.c (print_completion): New function.
9346 * kern/partition.c (grub_partition_iterate): Add an argument DISK
9348 All callers changed.
9350 * kern/disk.c (grub_print_partinfo): Removed.
9352 * include/grub/partition.h (struct grub_partition_map): Add a new
9353 argument DISK into HOOK of ITERATE.
9354 (grub_partition_iterate): Add a new argument DISK to HOOK.
9356 * include/grub/normal.h (enum grub_completion_type): New enum.
9357 (grub_completion_type_t): New type.
9358 (GRUB_COMPLETION_TYPE_COMMAND): New constant.
9359 (GRUB_COMPLETION_TYPE_DEVICE): Likewise.
9360 (GRUB_COMPLETION_TYPE_PARTITION): Likewise.
9361 (GRUB_COMPLETION_TYPE_FILE): Likewise.
9362 (grub_normal_do_completion): Added a new argument HOOK.
9363 (grub_normal_print_device_info): New prototype.
9365 * include/grub/disk.h (grub_print_partinfo): Removed.
9367 * conf/i386-pc.rmk (grub_emu_SOURCES): Added normal/misc.c.
9368 (normal_mod_SOURCES): Likewise.
9369 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9370 (normal_mod_SOURCES): Likewise.
9372 * commands/ls.c (grub_ls_list_disks): Use
9373 grub_normal_print_device_info instead of grub_print_partinfo. Free
9375 (grub_ls_list_files): Use grub_normal_print_device_info instead of
9376 duplicating the code.
9378 2005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
9380 * commands/i386/pc/vbe_list_modes.c: Update source formatting to
9381 follow GCS more precisely.
9382 * commands/i386/pc/vbe_test.c: Likewise.
9383 * include/grub/i386/pc/vbe.h: Likewise.
9384 * term/i386/pc/vesafb.c: Likewise.
9385 * video/i386/pc/vbe.c: Likewise.
9387 2005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
9389 * DISTLIST: Added term/i386/pc/vesafb.c
9390 DISTLIST: Added video/i386/pc/vbe.c
9391 DISTLIST: Added commands/i386/pc/vbe_list_modes.c.
9392 DISTLIST: Added commands/i386/pc/vbe_test.c.
9393 * commands/i386/pc/vbe_list_modes.c: New file.
9394 * commands/i386/pc/vbe_test.c: Likewise.
9395 * term/i386/pc/vesafb.c: Likewise.
9396 * video/i386/pc/vbe.c: Likewise.
9397 * include/grub/i386/pc/vbe.h (GRUB_VBE_DEFAULT_VIDEO_MODE): Added define.
9398 (grub_vbe_probe) Added prototype.
9399 (grub_vbe_set_video_mode) Likewise.
9400 (grub_vbe_get_video_mode) Likewise.
9401 (grub_vbe_get_video_mode_info) Likewise.
9402 (grub_vbe_set_pixel_rgb) Likewise.
9403 (grub_vbe_set_pixel_index) Likewise.
9404 * conf/i386-pc.rmk (pkgdata_MODULES): Added vbe.mod.
9405 (pkgdata_MODULES): Added vesafb.mod.
9406 (pkgdata_MODULES): Added vbe_list_modes.mod.
9407 (pkgdata_MODULES): Added vbe_test.mod.
9408 (vbe_mod_SOURCES): Added.
9409 (vbe_mod_CFLAGS): Likewise.
9410 (vesafb_mod_SOURCES): Likewise.
9411 (vesafb_mod_CFLAGS): Likewise.
9412 (vbe_list_modes_mod_SOURCES): Likewise.
9413 (vbe_list_modes_mod_CFLAGS): Likewise.
9414 (vbe_test_mod_SOURCES): Likewise.
9415 (vbe_test_mod_CFLAGS): Likewise.
9417 2005-08-14 Yoshinori K. Okuji <okuji@enbug.org>
9419 * normal/command.c (grub_command_execute): If INTERACTIVE is
9420 false and GRUB_COMMAND_FLAG_NO_ECHO is not specified, print
9421 CMDLINE. Disable the pager if INTERACTIVE is true.
9422 All callers are changed.
9424 * normal/main.c (grub_normal_execute): Read command.lst and fs.lst
9425 before reading a config file.
9426 * normal/main.c (read_config_file): Even if a command is not
9427 found, register it if it is within an entry.
9429 * util/grub-emu.c: Include sys/types.h and unistd.h.
9430 (options): Added --hold.
9431 (struct arguments): Added a new member "hold".
9432 (parse_opt): If KEY is 'H', set ARGS->HOLD to ARG or -1 if ARG is
9434 (main): Initialize ARGS.HOLD to zero. Wait until ARGS.HOLD is
9435 cleared by a debugger, if it is not zero.
9437 * include/grub/normal.h (grub_command_execute): Add an argument
9440 2005-08-14 Vesa Jaaskelainen <chaac@nic.fi>
9442 * DISTLIST: Added include/grub/i386/pc/vbe.h.
9444 2005-08-13 Yoshinori K. Okuji <okuji@enbug.org>
9446 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Replace the test
9447 program with another one, because the old one didn't detect a bug
9448 in gcc-3.4. Always use regparm 2, because the new test is still
9449 not enough for gcc-4.0. Someone must investigate a simple test
9450 case which detects a bug in gcc-4.0.
9452 2005-08-12 Yoshinori K. Okuji <okuji@enbug.org>
9454 * DISTLIST: Added normal/completion.c.
9456 * normal/completion.c: New file.
9458 * term/i386/pc/console.c (grub_console_getwh): New function.
9459 (grub_console_term): Assign grub_console_getwh to getwh.
9461 * normal/cmdline.c (grub_tab_complete): Removed. Now the same
9462 function is defined in normal/completion.c as
9463 grub_normal_do_completion.
9464 (grub_cmdline_get): Use grub_normal_do_completion instead of
9467 * kern/partition.c (grub_partition_map_iterate): Return 1 if HOOK
9468 returns non-zero, otherwise return 0.
9469 (grub_partition_iterate): First, probe the partition map. Then,
9470 call ITERATE only for this partition map.
9472 * kern/misc.c (grub_strncmp): Rewritten.
9474 * kern/disk.c (grub_disk_dev_iterate): Return 1 if P->ITERATE
9475 returns non-zero. Otherwise return 0.
9477 * include/grub/partition.h (grub_partition_map_iterate): Return
9478 int instead of void.
9480 * include/grub/normal.h (grub_normal_do_completion): New prototype.
9482 * include/grub/misc.h (grub_strncmp): Change the type of N to
9485 * include/grub/disk.h (grub_disk_dev_iterate): Return int instead
9488 * normal/menu.c (draw_border): Cast GRUB_TERM_BORDER_WIDTH to
9489 unsigned explicitly before comparing it with I.
9491 * kern/main.c (grub_env_write_root): Add the attribute unused into
9494 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
9495 normal/completion.c.
9496 (normal_mod_SOURCES): Likewise.
9497 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
9498 (normal_mod_SOURCES): Likewise.
9500 * normal/command.c (grub_iterate_commands): If ITERATE returns
9501 non-zero, return one immediately.
9503 2005-08-09 Vesa Jaaskelainen <chaac@nic.fi>
9505 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vbe.h.
9506 * kern/i386/pc/startup.S: Updated Global Descriptor table's
9508 (grub_vbe_get_controller_info): New function.
9509 (grub_vbe_get_mode_info): Likewise.
9510 (grub_vbe_set_mode): Likewise.
9511 (grub_vbe_get_mode): Likewise.
9512 (grub_vbe_set_memory_window): Likewise.
9513 (grub_vbe_get_memory_window): Likewise.
9514 (grub_vbe_set_scanline_length): Likewise.
9515 (grub_vbe_get_scanline_length): Likewise.
9516 (grub_vbe_set_display_start): Likewise.
9517 (grub_vbe_get_display_start): Likewise.
9518 (grub_vbe_set_palette_data): Likewise.
9519 * include/grub/i386/pc/vbe.h: New file.
9521 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
9523 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
9524 kern/ieee1275/of.c with kern/ieee1275/ieee1275.c.
9525 * DISTLIST: Likewise.
9526 * kern/ieee1275/of.c: Moved to ...
9527 * kern/ieee1275/ieee1275.c: ... here.
9529 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
9531 * term/ieee1275/ofconsole.c: Include <grub/mm.h>.
9532 (grub_ofconsole_getwh): Cast -1 to type grub_ieee1275_ihandle_t.
9533 Pass 0 as `end' parameter to grub_strtoul().
9535 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
9537 * include/grub/powerpc/ieee1275/console.h: Do not include
9538 <grub/types.h>. Do not include <grub/symbol.h>. Remove ASM_FILE
9540 (grub_console_cur_color): Remove i386-specific prototype.
9541 (grub_console_real_putchar): Likewise.
9542 (grub_console_checkkey): Likewise.
9543 (grub_console_getkey): Likewise.
9544 (grub_console_getxy): Likewise.
9545 (grub_console_gotoxy): Likewise.
9546 (grub_console_cls): Likewise.
9547 (grub_console_setcursor): Likewise.
9548 * kern/powerpc/ieee1275/init.c: Don't include <grub/console.h>.
9549 Include <grub/machine/console.h>.
9550 * term/ieee1275/ofconsole.c: Likewise.
9552 2005-08-08 Yoshinori K. Okuji <okuji@enbug.org>
9554 * Makefile.in (LIBLZO): New variable.
9556 * configure.ac: Check for LZO version 2.
9558 * util/i386/pc/grub-mkimage.c [HAVE_LZO_LZO1X_H]: Include
9559 lzo/lzo1x.h instead of lzo1x.h.
9561 * conf/i386-pc.rmk (grub_mkimage_LDFLAGS): Use $(LIBLZO) instead
9564 * util/i386/pc/grub-setup.c (main): Do not free PREFIX
9565 twice. Reported by Vladimir Serbinenko <phcoder@gmail.com>.
9567 * partmap/pc.c (pc_partition_map_probe): Restore P->DATA after
9568 copying the data from PARTITION to P.
9570 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
9572 * kern/rescue.c (grub_rescue_cmd_rmmod): If the reference count is
9573 negative, unload the module.
9575 * util/i386/pc/grub-setup.c (setup): The name of the PC partition
9576 map is "pc_partition_map" but not "pc".
9577 (usage): Fix the description. The options are --boot-image and
9578 --core-image but not --boot-file or --core-file.
9579 (main): If not specified explicitly, make BOOT_FILE and CORE_FILE
9580 based on DEFAULT_BOOT_FILE and DEFAULT_CORE_FILE with DIR or
9583 * util/i386/pc/grub-install.in: Do not specify --boot-file or
9584 --core-file. Specify INSTALL_DEVICE as an argument.
9586 * util/console.c: Include config.h.
9587 [HAVE_NCURSeS_CURSES_H]: Include ncurses/curses.h.
9588 [HAVE_NCURSES_H]: Include ncurses.h.
9589 [HAVE_CURSES_H]: Include curses.h.
9590 [!A_NORMAL] (A_NORMAL): Defined as zero.
9591 [!A_STANDOUT] (A_STANDOUT): Likewise.
9593 * conf/i386-pc.rmk (grub_emu_LDFLAGS): Use $(LIBCURSES) instead of
9595 * conf/powerpc-ieee1275.rmk (grub_emu_LDFLAGS): Likewise.
9597 * configure.ac: Check for curses libraries and headers.
9599 * Makefile.in (LIBCURSES): New variable.
9601 * genmk.rb (Script::rule): Set the executable bits.
9603 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): The
9604 name of the PC partition map is "pc_partition_map" but not "pc".
9606 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
9608 * util/i386/pc/grub-install.in (grub_probefs): New variable.
9609 (modules): Likewise.
9610 (usage): Added descriptions for --modules and --grub-probefs.
9611 Handle --modules and --grub-probefs. Save the arguments in MODULES
9612 and GRUB_PROBEFS, respectively.
9613 Auto-detect a filesystem module against GRUBDIR. If the result is
9614 empty and modules are not specified explicitly, abort the
9615 installation. Add the result to MODULES.
9617 * DISTLIST: Removed boot/powerpc/ieee1275/ieee1275.c,
9618 disk/powerpc/ieee1275/ofdisk.c,
9619 include/grub/powerpc/ieee1275/init.h and
9620 term/powerpc/ieee1275/ofconsole.c.
9621 Added disk/ieee1275/ofdisk.c, kern/ieee1275/of.c and
9622 term/ieee1275/ofconsole.c.
9624 * include/grub/powerpc/ieee1275/console.h: Resurrected.
9626 * COPYING: Upgraded to the latest version. Only the address of the
9627 FSF office has changed.
9629 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
9631 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
9632 kern/ieee1275.c with kern/ieee1275/of.c.
9634 * kern/ieee1275.c: Moved to ...
9635 * kern/ieee1275/of.c: ... here.
9637 2005-08-06 Yoshinori K. Okuji <okuji@enbug.org>
9639 * conf/i386-pc.rmk (kernel_img_HEADERS): Reordered for
9642 * config.guess: Updated to the latest version from gnulib.
9643 * config.sub: Likewise.
9644 * install.sh: Likewise.
9645 * mkinstalldirs: Likewise.
9647 * include/grub/console.h: Removed. This file is arch-specific. Do
9648 not put this in include/grub.
9650 * include/grub/i386/pc/console.h: Resurrected.
9652 * util/console.c: Include grub/machine/console.h instead of
9654 * util/grub-emu.c: Likewise.
9656 2005-08-04 Marco Gerards <metgerards@student.han.nl>
9658 * kern/term.c (grub_putcode): Use `grub_getwh' instead of
9661 From Vincent Pelletier <subdino2004@yahoo.fr>
9662 * include/grub/term.h (GRUB_TERM_WIDTH, GRUB_TERM_HEIGHT):
9663 Redefined to use grub_getwh.
9664 (grub_term): New member named getwh.
9665 (grub_getwh): New prototype.
9666 * kern/term.c (grub_getwh): New function.
9667 * term/i386/pc/console.c (grub_console_getwh): New function.
9668 (grub_console_term): New member `getwh'.
9669 * term/i386/pc/vga.c (grub_vga_getwh): New function.
9670 (grub_vga_term): New member `getwh'.
9671 * term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Use
9673 (grub_ofconsole_getw): New function.
9674 (grub_ofconsole_init): Use grub_ssize_t and unsigned char.
9675 (grub_ofconsole_term): New field named getwh and new initial
9678 2005-08-03 Hollis Blanchard <hollis@penguinppc.org>
9680 * include/grub/powerpc/ieee1275/ieee1275.h: Move ...
9681 * include/grub/ieee1275/ieee1275.h: ... to here. All users updated.
9682 Move `abort', `grub_reboot', and `grub_halt' prototypes ...
9683 * include/grub/powerpc/ieee1275/kernel.h: ... to here.
9684 * commands/ieee1275/halt.c: Include <grub/machine/kernel.h> instead
9685 of <grub/machine/ieee1275.h>.
9686 * commands/ieee1275/reboot.c: Likewise.
9687 * boot/powerpc/ieee1275/ieee1275.c: Move ...
9688 * kern/ieee1275.c: ... to here. All users updated. Change all
9689 parameter structs to use new type `grub_ieee1275_cell_t'.
9690 * term/powerpc/ieee1275/ofconsole.c: Move ...
9691 * term/ieee1275/ofconsole.c: ... to here. All users updated.
9692 * disk/powerpc/ieee1275/ofdisk.c: Move ...
9693 * disk/ieee1275/ofdisk.c: ... to here. All users updated.
9694 * boot/powerpc/ieee1275/cmain.c: Change `grub_ieee1275_entry_fn' type
9696 * include/grub/i386/pc/console.h: Move to include/grub/console.h.
9697 Remove unused prototypes. All users updated.
9698 * include/grub/powerpc/ieee1275/console.h: Removed.
9699 * include/grub/powerpc/ieee1275/ieee1275.h: Define
9700 `grub_ieee1275_cell_t'.
9701 * kern/powerpc/ieee1275/openfw.c: Include <grub/machine/kernel.h>.
9702 Cast comparisons with -1 to the correct type.
9703 * loader/powerpc/ieee1275/linux.c (kernel_entry_t): Change parameter
9704 type to match `grub_ieee1275_entry_fn'.
9706 2005-08-01 Yoshinori K. Okuji <okuji@enbug.org>
9708 * DISTLIST: Added util/i386/pc/grub-probefs.c.
9710 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-probefs.
9711 (grub_setup_SOURCES): Removed partmap/amiga.c, partmap/apple.c and
9713 (grub_probefs_SOURCES): New variable.
9715 * util/i386/pc/grub-probefs.c: New file.
9717 * util/i386/pc/grub-setup.c (main): Call
9718 grub_pc_partition_map_init, grub_ufs_init, grub_minix_init,
9719 grub_hfs_init and grub_jfs_init to initialize the system. Call
9720 grub_ufs_fini, grub_minix_fini, grub_hfs_fini, grub_jfs_init and
9721 grub_pc_partition_map_fini to finish the system.
9723 2005-07-31 Yoshinori K. Okuji <okuji@enbug.org>
9725 * loader/i386/pc/multiboot.c (grub_multiboot_is_elf32): New
9727 (grub_multiboot_load_elf32): Likewise.
9728 (grub_multiboot_is_elf64): Likewise.
9729 (grub_multiboot_load_elf64): Likewise.
9730 (grub_multiboot_load_elf): Likewise.
9731 (grub_rescue_cmd_multiboot): Call grub_multiboot_load_elf to load
9732 an ELF32 or ELF64 file.
9733 This is based on a patch from Ruslan Nikolaev <nruslan@mail.com>.
9735 From Serbinenko Vladimir <serbinenko.vova@list.ru>:
9736 * kern/disk.c (grub_print_partinfo): Check if FS->LABEL is not
9737 NULL before calling FS->LABEL.
9738 * fs/fat.c (grub_fat_dir): Initialize DIRNAME to NULL.
9739 * commands/ls.c (grub_ls_list_files): Show labels, if possible.
9740 (grub_ls_list_disks): Check if FS and FS->LABEL are not NULL
9741 before calling FS->LABEL.
9743 2005-07-26 Yoshinori K. Okuji <okuji@enbug.org>
9745 * util/i386/pc/grub-install.in (datadir): New variable.
9747 (pkgdatadir): New variable.
9748 (pkglibdir): Removed.
9750 2005-07-24 Yoshinori K. Okuji <okuji@enbug.org>
9752 * DISTLIST: Added util/i386/pc/grub-install.in.
9754 * util/i386/pc/grub-install.in: New file.
9756 * conf/i386-pc.rmk (sbin_SCRIPTS): New variable.
9757 (grub_install_SOURCES): Likewise.
9759 * genmk.rb: Added support for scripts.
9760 (Script): New class.
9761 (scripts): New variable.
9763 * Makefile.in (install-local): Install sbin_SCRIPTS by
9765 (uninstall): Remove sbin_SCRIPTS.
9767 * util/i386/pc/grub-setup.c (main): If the argument is not a GRUB
9768 device, try to get a GRUB device by
9769 grub_util_biosdisk_get_grub_dev.
9772 * util/i386/pc/grub-mkdevicemap.c (usage): Remove a duplicated
9773 description for --device-map.
9775 2005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
9777 Change the semantics of variable hooks. They now return strings
9778 instead of error values.
9780 * util/i386/pc/grub-setup.c: Include grub/env.h.
9781 (setup): Use grub_device_set_root instead of grub_env_set.
9783 * kern/rescue.c (grub_rescue_cmd_root): Use grub_env_set and
9784 grub_env_get instead of grub_device_set_root and
9785 grub_device_get_root, respectively.
9787 * kern/main.c (grub_env_write_root): New function.
9788 (grub_set_root_dev): Register grub_env_write_hook for "root". Use
9789 grub_env_set instead of grub_device_set_root.
9791 * kern/env.c (HASHSZ): Reduced to 13, because GRUB does not need
9793 (grub_env_set): Set ENV->VALUE to the result of ENV->WRITE_HOOK
9794 rather than calling ENV->WRITE_HOOK afterwards.
9795 (grub_env_get): Return the result of ENV->READ_HOOK rather than
9796 passing a pointer of a pointer.
9797 (grub_register_variable_hook): Change the types of "read_hook" and
9798 "write_hook" to grub_env_read_hook_t and grub_env_write_hook_t,
9800 Allocate the default empty string on the heap, because this string
9803 * kern/device.c: Include grub/env.h.
9804 (grub_device_set_root): Removed.
9805 (grub_device_get_root): Likewise.
9806 (grub_device_open): Use grub_env_get instead of
9807 grub_device_get_root.
9809 * include/grub/env.h (grub_env_read_hook_t): New type.
9810 (grub_env_write_hook_t): Likewise.
9811 (grub_env_var): Change the types of "read_hook" and "write_hook"
9812 to grub_env_read_hook_t and grub_env_write_hook_t, respectively.
9813 (grub_register_variable_hook): Likewise.
9815 * include/grub/device.h (grub_device_set_root): Removed.
9816 (grub_device_set_root): Likewise.
9818 * fs/fat.c (grub_fat_dir): Make a copy of PATH in DIRNAME, and
9819 make sure that DIRNAME terminates with '/', so that
9820 grub_fat_find_dir will fail if PATH is not a directory.
9822 * commands/ls.c (grub_ls_list_files): Remove the qualifier const
9824 Use the qualifier auto for print_files and print_files_long.
9825 If FS->DIR sets GRUB_ERRNO to GRUB_ERR_BAD_FILE_TYPE, try DIRNAME
9827 Put a newline only if there is no error.
9828 (grub_cmd_ls): Remove grub_ls_print_files, because this is not
9831 2005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
9833 * kern/partition.c (grub_partition_probe): Initialize PART to
9834 NULL. Otherwise, when no partition map is registered, this returns
9837 2005-07-19 Yoshinori K. Okuji <okuji@enbug.org>
9839 * partmap/apple.c (apple_partition_map_iterate): Check if POS
9840 equals GRUB_DISK_SECTOR_SIZE to see if the partition table is
9843 2005-07-18 Yoshinori K. Okuji <okuji@enbug.org>
9845 * commands/ls.c (grub_ls_list_disks): Print the filesystem
9846 information on each device, if it does not have partitions. Print
9847 "Device" instead of "Disk", because this function is not specific
9850 * normal/main.c (grub_rescue_cmd_normal): Make the variable CONFIG
9851 static to ensure that it is put on the memory rather than a
9854 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
9856 * commands/cat.c (GRUB_MOD_INIT): Use better documentation.
9857 (grub_cat_init): Likewise.
9858 * loader/i386/pc/chainloader_normal.c (GRUB_MOD_INIT): Likewise.
9859 (options): Likewise.
9860 * commands/configfile.c (GRUB_MOD_INIT): Likewise.
9861 (grub_configfile_init): Likewise.
9862 * font/manager.c (GRUB_MOD_INIT): Likewise.
9863 * commands/help.c (GRUB_MOD_INIT): Likewise.
9864 (grub_help_init): Likewise.
9865 * normal/command.c (grub_command_init): Likewise.
9866 * loader/i386/pc/linux_normal.c (GRUB_MOD_INIT): Likewise.
9867 * disk/loopback.c (grub_loop_init): Likewise.
9868 (GRUB_MOD_INIT): Likewise.
9869 * commands/ls.c (grub_ls_init): Likewise.
9870 (GRUB_MOD_INIT): Likewise.
9871 (options): Likewise.
9872 * commands/boot.c (grub_boot_init): Likewise.
9873 (GRUB_MOD_INIT): Likewise.
9874 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Likewise.
9875 * commands/i386/pc/reboot.c (grub_reboot_init): Likewise.
9876 (GRUB_MOD_INIT): Likewise.
9877 * commands/cmp.c (grub_cmp_init): Likewise.
9878 (GRUB_MOD_INIT): Likewise.
9880 * normal/arg.c: Use <> instead of "" to include header files.
9881 (SHORT_ARG_HELP): New macro.
9882 (SHORT_ARG_USAGE): Likewise.
9883 (help_options): Specify SHORT_ARG_HELP and SHORT_ARG_USAGE instead
9884 of 'h' and 'u' for help and usage, respectively. Use more GNU-like
9886 (find_short): Check if C is 'h' or 'u' explicitly.
9887 (grub_arg_show_help): Use space characters instead of tabs. Treat
9888 SHORT_ARG_HELP and SHORT_ARG_USAGE exceptionally so that -h and -u
9889 are shown with --help and --usage only if they are not used for
9891 (parse_option): Use SHORT_ARG_HELP and SHORT_ARG_USAGE instead of
9894 * include/grub/arg.h (struct grub_arg_option): Add the qualifier
9895 const into "longarg". Change the type of "shortarg" to int.
9897 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
9899 * boot/i386/pc/boot.S (boot_drive_check): New label.
9901 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRIVE_CHECK): New
9904 * util/i386/pc/grub-setup.c (setup): Added a workaround for BIOSes
9905 which do not pass a boot drive correctly. Copied from GRUB Legacy.
9907 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
9909 * kern/i386/pc/startup.S (gate_a20_try_system_control_port_a):
9910 When turning off Gate A20, skip the check and return immediately,
9911 because this is not fatal usually.
9913 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
9915 * conf/i386-pc.rmk (pxeboot_img_LDFLAGS): The text address should
9916 be 0x7C00 instead of 0x8000.
9918 * boot/i386/pc/pxeboot.S: Rewritten.
9920 * kern/i386/pc/startup.S (gate_a20_try_bios): No need to specify
9922 (gate_a20_check_state): Read a byte from 0x108000. Invert the
9925 2005-07-16 Yoshinori K. Okuji <okuji@enbug.org>
9927 * kern/i386/pc/startup.S (grub_gate_a20): Rewritten for
9928 robustness. This routine now supports a BIOS call and System
9929 Control Port A to modify the gate A20.
9931 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
9934 2005-07-12 Hollis Blanchard <hollis@penguinppc.org>
9936 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): dprintf the
9937 device path and resulting ihandle.
9938 (grub_ofdisk_close): dprintf the ihandle being closed.
9939 (grub_ofdisk_read): dprintf function parameters.
9940 * kern/mm.c (grub_mm_init_region): Likewise.
9941 * loader/powerpc/ieee1275/linux.c: Remove extra whitespace.
9942 (grub_linux_boot): dprintf the Linux entry point, initrd address and
9943 size, and boot arguments.
9944 (grub_rescue_cmd_linux): dprintf each ELF segment's address and size
9945 before loading into memory.
9946 (grub_rescue_cmd_initrd): dprintf the initrd's address and size
9947 before loading into memory.
9949 2005-07-12 Yoshinori K. Okuji <okuji@enbug.org>
9951 * kern/mm.c: Added much documentation.
9952 (GRUB_MM_ALIGN_LOG2): When GRUB_CPU_SIZEOF_VOID_P is
9953 8, set to 5 instead of 8.
9955 2005-07-10 Yoshinori Okuji <okuji@enbug.org>
9957 * DISTLIST: Added util/i386/pc/grub-mkimage.c.
9959 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-mkdevicemap.
9960 (grub_mkdevicemap_SOURCES): New variable.
9962 * util/i386/pc/grub-mkdevicemap.c: New file. Mostly copied from
9963 lib/device.c of GRUB Legacy.
9965 2005-07-10 Yoshinori Okuji <okuji@enbug.org>
9967 * commands/ls.c (grub_ls_list_files): Check if *PATH is NUL
9968 instead of PATH is NULL.
9970 2005-07-09 Vincent Pelletier <subdino2004@yahoo.fr>
9972 * commands/cmp.c (BUFFER_SIZE): New macro.
9973 (grub_cmd_cmp): Close the right file at the right time. Compare
9974 only data just read. Don't report files of different size as
9975 identical. Dynamically allocate buffers. Move variable
9976 declarations at the beginning of function.
9978 2005-07-09 Yoshinori Okuji <okuji@enbug.org>
9980 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): The return value was
9983 2004-07-04 Vincent Pelletier <subdino2004@yahoo.fr>
9985 * normal/cmdline.c (grub_cmdline_get): Don't fallback on ctrl-d
9986 when backspace is pressed at beginning of line.
9988 2005-07-03 Yoshinori Okuji <okuji@enbug.org>
9990 * DISTLIST: Added genfslist.sh.
9992 * normal/main.c (fs_module_list): New variable.
9993 (autoload_fs_module): New function.
9994 (read_fs_list): Likewise.
9995 (grub_normal_execute): Call read_fs_list.
9997 * kern/fs.c (grub_fs_autoload_hook): New variable.
9998 (grub_fs_probe): Added support for auto-loading.
10000 * include/grub/normal.h (struct grub_fs_module_list): New struct.
10001 (grub_fs_module_list_t): New type.
10003 * include/grub/fs.h (grub_fs_autoload_hook_t): New type.
10004 (grub_fs_autoload_hook): New prototype.
10006 * genfslist.sh: New file.
10008 * genmk.rb: Added a rule to generate a filesystem list.
10010 2005-06-30 Marco Gerards <metgerards@student.han.nl>
10012 * configure.ac: Fix the test for cross-compiling.
10014 * genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'. Don't
10015 define GRUB_UTIL anymore.
10017 * util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes
10018 so this function works on other systems than just big endian.
10019 (load_modules): Likewise.
10020 (add_segments): Likewise.
10022 2005-06-23 Hollis Blanchard <hollis@penguinppc.org>
10024 * kern/misc.c (grub_vsprintf): Add `longfmt'. If format string
10025 contains `l' modifier, get a long from va_arg().
10027 2005-06-23 Yoshinori K. Okuji <okuji@enbug.org>
10029 * kern/mm.c (grub_free): If the next free block which is being
10030 merged is the first free block, set the first block to the block
10032 Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.
10034 2005-05-08 Hollis Blanchard <hollis@penguinppc.org>
10036 * boot/powerpc/ieee1275/cmain.c (cmain): Initialize
10037 `grub_ieee1275_chosen'.
10039 2005-05-08 Hollis Blanchard <hollis@penguinppc.org>
10041 * boot/powerpc/ieee1275/cmain.c (module_info): Remove definition.
10042 (grub_ieee1275_chosen): New variable.
10043 (cmain): Initialize and use `grub_ieee1275_chosen' instead of
10045 * boot/powerpc/ieee1275/crt0.S (init_stack): Remove stack space.
10046 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
10047 Rename first argument to `phandle' for consistency.
10048 (grub_ieee1275_get_property_length): Likewise.
10049 (grub_ieee1275_next_property): Likewise. Change type of first argument
10050 to grub_ieee1275_phandle_t.
10051 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn):
10052 Move export next to declaration.
10053 (grub_ieee1275_chosen): New variable.
10054 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MODULE_BASE):
10055 Correct cosmetic typo.
10056 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Use
10057 `grub_ieee1275_chosen'.
10058 * kern/powerpc/ieee1275/openfw.c (grub_map): Likewise.
10059 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Likewise.
10060 (grub_rescue_cmd_linux): Set `initrd_addr' to 0.
10061 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_refresh): Use
10062 `grub_ieee1275_chosen'.
10064 2005-05-10 Hollis Blanchard <hollis@penguinppc.org>
10066 * boot/powerpc/ieee1275/cmain.c (cmain): Remove code to parse
10068 * kern/powerpc/ieee1275/init.c (grub_machine_init): Parse
10069 /chosen/bootargs as "variable=value" pairs.
10071 2005-05-08 Vincent Pelletier <subdino2004@yahoo.fr>
10073 * include/grub/misc.h (grub_dprintf): New macro.
10074 (grub_real_dprintf): New prototype.
10075 (grub_strword): Likewise.
10076 (grub_iswordseparator): Likewise.
10077 * kern/misc.c (grub_real_dprintf): New function.
10078 (grub_strword): Likewise.
10079 (grub_iswordseparator): Likewise.
10081 2005-04-30 Hollis Blanchard <hollis@penguinppc.org>
10083 * boot/powerpc/ieee1275/cmain.c: Don't include grub/machine/init.h.
10084 (roundup): Remove macro.
10085 (grub_ieee1275_flags): Make static.
10086 (grub_ieee1275_realmode): Remove.
10087 (grub_ieee1275_test_flag): New function.
10088 (grub_ieee1275_set_flag): Likewise.
10089 (find_options): Rename to `grub_ieee1275_find_options'; update
10090 callers. Set GRUB_IEEE1275_FLAG_REAL_MODE and
10091 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS.
10092 (cmain): New prototype.
10093 (cmain): Use `grub_ieee1275_set_flag' instead of accessing
10094 `grub_ieee1275_flags' directly.
10095 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Remove
10096 machine/biosdisk.h.
10097 * disk/powerpc/ieee1275/ofdisk.c: Include grub/machine/ofdisk.h.
10098 Don't include grub/machine/init.h.
10099 (grub_ofdisk_open): Call `grub_ieee1275_test_flag'.
10100 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
10102 (grub_ieee1275_realmode): Likewise.
10103 (grub_ieee1275_flag): New enum.
10104 (grub_ieee1275_test_flag): New prototype.
10105 (grub_ieee1275_set_flag): New prototype.
10106 * include/grub/powerpc/ieee1275/init.h: Remove file.
10107 * include/grub/powerpc/ieee1275/ofdisk.h: New file.
10108 * kern/powerpc/ieee1275/init.c: Don't include grub/machine/init.h.
10109 Include grub/machine/console.h. Include grub/machine/ofdisk.h.
10110 (grub_machine_fini): Don't call `grub_ieee1275_release'. Remove
10112 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Call
10113 `grub_ieee1275_test_flag'.
10114 (grub_ieee1275_encode_devname): Likewise.
10116 2005-04-21 Hollis Blanchard <hollis@penguinppc.org>
10118 * include/grub/powerpc/ieee1275/ieee1275.h
10119 (grub_ieee1275_encode_devname): New prototype.
10120 (grub_ieee1275_get_filename): Likewise.
10121 * kern/powerpc/ieee1275/init.c (grub_translate_ieee175_path): New
10123 (grub_set_prefix): Likewise.
10124 (grub_machine_init): Call grub_set_prefix.
10125 * kern/powerpc/ieee1275/openfw.c: Fix typos.
10126 (grub_parse_type): New enum.
10127 (grub_ieee1275_get_devargs): New function.
10128 (grub_ieee1275_get_devname): Likewise.
10129 (grub_ieee1275_parse_args): Likewise.
10130 (grub_ieee1275_get_filename): Likewise.
10131 (grub_ieee1275_encode_devname): Likewise.
10133 2005-03-30 Marco Gerards <metgerards@student.han.nl>
10135 * kern/powerpc/ieee1275/init.c (grub_machine_fini): Don't call
10136 `grub_loader_unset'.
10138 2005-03-26 Hollis Blanchard <hollis@penguinppc.org>
10140 * commands/ieee1275/halt.c (grub_cmd_halt): Call grub_halt
10141 instead of grub_ieee1275_interpret.
10142 (grub_halt_init): New function.
10143 (grub_halt_fini): Likewise.
10144 (GRUB_MOD_INIT): Correct message grammar.
10145 * commands/ieee1275/reboot.c (grub_cmd_reboot): Call grub_reboot
10146 instead of grub_ieee1275_interpret.
10147 (grub_reboot_init): New function.
10148 (grub_reboot_fini): Likewise.
10149 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace
10150 commands/i386/pc/halt.c, commands/i386/pc/reboot.c, and
10151 util/i386/pc/misc.c with commands/ieee1275/halt.c,
10152 commands/ieee1275/reboot.c, and util/powerpc/ieee1275/misc.c.
10153 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_fini): New
10155 * include/grub/powerpc/ieee1275/console.h (grub_console_fini):
10157 * include/grub/powerpc/ieee1275/ieee1275.h (grub_reboot): Add
10159 (grub_halt): Likewise.
10160 * include/grub/powerpc/ieee1275/init.h: Remove inaccurate comment.
10161 (cmain): Remove __attribute__((unused)).
10162 * kern/powerpc/ieee1275/init.c (grub_heap_start): New variable.
10163 (grub_heap_len): Likewise.
10164 (grub_machine_fini): New function.
10165 * kern/powerpc/ieee1275/openfw.c (grub_reboot): New function.
10166 (grub_halt): Likewise.
10167 * term/powerpc/ieee1275/ofconsole.c (grub_console_fini): New
10169 * util/powerpc/ieee1275/misc.c: New file.
10171 2005-03-19 Yoshinori K. Okuji <okuji@enbug.org>
10173 * DISTLIST: New file.
10174 * gendistlist.sh: Likewise.
10176 * Makefile.in (COMMON_DISTFILES): Removed.
10177 (BOOT_DISTFILES): Likewise.
10178 (CONF_DISTFILES): Likewise.
10179 (DISK_DISTFILES): Likewise.
10180 (FS_DISTFILES): Likewise.
10181 (INCLUDE_DISTFILES): Likewise.
10182 (KERN_DISTFILES): Likewise.
10183 (LOADER_DISTFILES): Likewise.
10184 (TERM_DISTFILES): Likewise.
10185 (UTIL_DISTFILES): Likewise.
10186 (DISTFILES): Likewise.
10187 (uninstall): Uninstall files in $(pkgdata_DATA).
10188 (DISTLIST): New target.
10189 (distdir): Use the contents of the file DISTLIST to get a list of
10192 2005-03-18 Yoshinori K. Okuji <okuji@enbug.org>
10194 * fs/fat.c (grub_fat_mount): Ignore the 3rd bit of a media
10195 descriptor. This is ported from GRUB Legacy.
10197 * gencmdlist.sh: Added an extra semicolon to make it work with
10198 old sed versions. Reported by Robert Bihlmeyer
10199 <robbe@orcus.priv.at>.
10201 2005-03-08 Yoshinori Okuji <okuji@enbug.org>
10203 Automatic loading of commands is supported.
10205 * normal/main.c (read_command_list): New function.
10206 (grub_normal_execute): Call read_command_list.
10208 * normal/command.c (grub_register_command): Return zero or CMD.
10209 Allocate CMD->NAME from the heap.
10210 Initialize CMD->MODULE_NAME to zero.
10211 Find the same name as well. If the same command is found and it is
10212 a dummy command, overwrite members. If it is not a dummy command,
10214 (grub_unregister_command): Free Q->NAME and Q->MODULE_NAME.
10215 (grub_command_find): If a dummy command is found, load a module
10216 and retry to find a command only once.
10218 * normal/cmdline.c (grub_tab_complete): Call grub_command_find to
10219 make sure that each command is loaded.
10221 * include/grub/normal.h (GRUB_COMMAND_FLAG_NOT_LOADED): New
10223 (struct grub_command): Remove const from the member `name'.
10224 Add a new member `module_name'.
10225 (grub_register_command): Return grub_command_t.
10227 * commands/help.c (grub_cmd_help): Call grub_command_find to make
10228 sure that each command is loaded.
10230 * genmk.rb (PModule::rule): Specify a module name without the
10231 suffix ".mod" to gencmdlist.sh.
10233 2005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
10235 * gencmdlist.sh: New file.
10237 * genmk.rb (PModule::rule): Generate a rule for a command list.
10239 Generate command.lst from $(COMMANDFILES).
10241 * Makefile.in (COMMON_DISTFILES): Added gencmdlist.sh.
10242 (DATA): Added $(pkgdata_DATA).
10243 (install-local): Install files in $(pkgdata_DATA).
10245 2005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
10247 * term/i386/pc/vga.c (debug_command): Removed.
10248 (GRUB_MOD_INIT): Do not register the command "debug".
10250 From Hollis Blanchard:
10251 * commands/configfile.c: New file.
10252 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
10253 commands/configfile.c.
10254 (pkgdata_MODULES): Added configfile.mod.
10255 (configfile_mod_SOURCES): New variable.
10256 (configfile_mod_CFLAGS): Likewise.
10257 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
10258 commands/configfile.c.
10259 (pkgdata_MODULES): Added configfile.mod.
10260 (configfile_mod_SOURCES): New variable.
10261 (configfile_mod_CFLAGS): Likewise.
10262 * util/grub-emu.c (main): Call grub_configfile_init and
10263 grub_configfile_fini.
10264 * include/grub/normal.h [GRUB_UTIL] (grub_configfile_init): New
10266 [GRUB_UTIL] (grub_configfile_fini): Likewise.
10268 2005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
10270 * normal/arg.c (grub_arg_show_help): Do not show the bug report
10273 * commands/help.c (grub_cmd_help): Do not print newlines after
10274 the last command in print_command_help.
10276 2005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
10278 * commands/default.h: New file.
10279 * commands/timeout.h: Likewise.
10280 * normal/context.c: Likewise.
10282 * util/misc.c: Do not include sys/times.h.
10283 Include sys/time.h and grub/machine/time.h.
10284 (grub_get_rtc): Rewritten with gettimeofday.
10286 * util/grub-emu.c (main): Call grub_default_init and
10287 grub_timeout_init before grub_normal_init, and call
10288 grub_timeout_fini and grub_default_fini after grub_main.
10290 * util/console.c (grub_ncurses_checkkey): Return the read
10293 * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it
10296 * normal/main.c (read_config_file): Push MENU. If this fails,
10297 print an error and wait for a user input.
10298 Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE.
10299 If a menu is empty or an error occurs, pop MENU.
10300 (grub_normal_execute): Pop and free MENU after grub_menu_run
10303 * kern/loader.c (grub_loader_boot): Call grub_machine_fini.
10305 * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not
10307 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
10309 * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include
10311 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
10314 * include/grub/normal.h (struct grub_menu_list): New struct.
10315 (grub_menu_list_t): New type.
10316 (struct grub_context): New struct.
10317 (grub_context_t): New type.
10318 (grub_register_command): Got rid of EXPORT_FUNC.
10319 (grub_unregister_command): Likewise.
10320 (grub_context_get): New prototype.
10321 (grub_context_get_current_menu): Likewise.
10322 (grub_context_push_menu): Likewise.
10323 (grub_context_pop_menu): Likewise.
10324 [GRUB_UTIL] (grub_default_init): Likewise.
10325 [GRUB_UTIL] (grub_default_fini): Likewise.
10326 [GRUB_UTIL] (grub_timeout_init): Likewise.
10327 [GRUB_UTIL] (grub_timeout_fini): Likewise.
10329 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c,
10330 commands/timeout.c and normal/context.c.
10331 (pkgdata_MODULES): Added default.mod and timeout.mod.
10332 (normal_mod_SOURCES): Added normal/context.c.
10333 (default_mod_SOURCES): New variable.
10334 (default_mod_CFLAGS): Likewise.
10335 (timeout_mod_SOURCES): Likewise.
10336 (timeout_mod_CFLAGS): Likewise.
10337 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from
10339 (pkgdata_MODULES): Added default.mod and timeout.mod.
10340 (normal_mod_SOURCES): Added normal/context.c.
10341 (default_mod_SOURCES): New variable.
10342 (default_mod_CFLAGS): Likewise.
10343 (timeout_mod_SOURCES): Likewise.
10344 (timeout_mod_CFLAGS): Likewise.
10346 * Makefile.in (all-local): Added $(MKFILES).
10348 2005-02-21 Vincent Pelletier <subdino2004@yahoo.fr>
10350 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `partmap/sun.c'.
10351 (grub_emu_SOURCES): Likewise.
10352 (pkgdata_MODULES): Add `sun.mod'.
10353 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
10354 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
10356 (pkgdata_MODULES): Add `sun.mod'.
10357 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
10358 * include/grub/partition.h (grub_sun_partition_map_init): New
10360 (grub_sun_partition_map_fini): Likewise.
10361 * partmap/sun.c: New file.
10362 * util/grub-emu.c (main): Initialize and de-initialize the sun
10363 partitionmap support.
10365 2005-02-19 Yoshinori K. Okuji <okuji@enbug.org>
10367 This implements an Emacs-like menu entry editor.
10369 * normal/menu_entry.c: New file.
10371 * util/console.c (grub_ncurses_putchar): Translate some Unicode
10372 characters to ASCII.
10373 (saved_char): New variable.
10374 (grub_ncurses_checkkey): Rewritten completely.
10375 (grub_ncurses_getkey): Likewise.
10376 (grub_ncurses_init): Call raw instead of cbreak.
10378 * normal/menu.c (print_entry): Do not put a space.
10379 (init_page): Renamed to ...
10380 (grub_menu_init_page): ... this. All callers changed.
10381 (edit_menu_entry): Removed.
10382 (run_menu): Call grub_menu_entry_run instead of edit_menu_entry.
10384 * normal/cmdline.c (grub_cmdline_run): Call grub_setcursor.
10386 * kern/misc.c (grub_vprintf): Call grub_refresh.
10388 * normal/menu.c (DISP_LEFT): Renamed to ...
10389 * include/grub/term.h (GRUB_TERM_DISP_LEFT): ... this.
10390 * normal/menu.c (DISP_UP): Renamed to ...
10391 * include/grub/term.h (GRUB_TERM_DISP_UP): ... this.
10392 * normal/menu.c (DISP_RIGHT): Renamed to ...
10393 * include/grub/term.h (GRUB_TERM_DISP_RIGHT): ... this.
10394 * normal/menu.c (DISP_DOWN): Renamed to ...
10395 * include/grub/term.h (GRUB_TERM_DISP_DOWN): ... this.
10396 * normal/menu.c (DISP_HLINE): Renamed to ...
10397 * include/grub/term.h (GRUB_TERM_DISP_HLINE): ... this.
10398 * normal/menu.c (DISP_VLINE): Renamed to ...
10399 * include/grub/term.h (GRUB_TERM_DISP_VLINE): ... this.
10400 * normal/menu.c (DISP_UL): Renamed to ...
10401 * include/grub/term.h (GRUB_TERM_DISP_UL): ... this.
10402 * normal/menu.c (DISP_UR): Renamed to ...
10403 * include/grub/term.h (GRUB_TERM_DISP_UR): ... this.
10404 * normal/menu.c (DISP_LL): Renamed to ...
10405 * include/grub/term.h (GRUB_TERM_DISP_LL): ... this.
10406 * normal/menu.c (DISP_LR): Renamed to ...
10407 * include/grub/term.h (GRUB_TERM_DISP_LR): ... this.
10408 * normal/menu.c (TERM_WIDTH): Renamed to ...
10409 * include/grub/term.h (GRUB_TERM_WIDTH): ... this.
10410 * normal/menu.c (TERM_HEIGHT): Renamed to ...
10411 * include/grub/term.h (GRUB_TERM_HEIGHT): ... this.
10412 * normal/menu.c (TERM_INFO_HEIGHT): Renamed to ...
10413 * include/grub/term.h (GRUB_TERM_INFO_HEIGHT): ... this.
10414 * normal/menu.c (TERM_MARGIN): Renamed to ...
10415 * include/grub/term.h (GRUB_TERM_MARGIN): ... this.
10416 * normal/menu.c (TERM_SCROLL_WIDTH): Renamed to ...
10417 * include/grub/term.h (GRUB_TERM_SCROLL_WIDTH): ... this.
10418 * normal/menu.c (TERM_TOP_BORDER_Y): Renamed to ...
10419 * include/grub/term.h (GRUB_TERM_TOP_BORDER_Y): ... this.
10420 * normal/menu.c (TERM_LEFT_BORDER_X): Renamed to ...
10421 * include/grub/term.h (GRUB_TERM_LEFT_BORDER_X): ... this.
10422 * normal/menu.c (TERM_BORDER_WIDTH): Renamed to ...
10423 * include/grub/term.h (GRUB_TERM_BORDER_WIDTH): ... this.
10424 * normal/menu.c (TERM_MESSAGE_HEIGHT): Renamed to ...
10425 * include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): ... this.
10426 * normal/menu.c (TERM_BORDER_HEIGHT): Renamed to ...
10427 * include/grub/term.h (GRUB_TERM_BORDER_HEIGHT): ... this.
10428 * normal/menu.c (TERM_NUM_ENTRIES): Renamed to ...
10429 * include/grub/term.h (GRUB_TERM_NUM_ENTRIES): ... this.
10430 * normal/menu.c (TERM_FIRST_ENTRY_Y): Renamed to ...
10431 * include/grub/term.h (GRUB_TERM_FIRST_ENTRY_Y): ... this.
10432 * normal/menu.c (TERM_ENTRY_WIDTH): Renamed to ...
10433 * include/grub/term.h (GRUB_TERM_ENTRY_WIDTH): ... this.
10434 * normal/menu.c (TERM_CURSOR_X): Renamed to ...
10435 * include/grub/term.h (GRUB_TERM_CURSOR_X): ... this.
10436 All callers changed.
10438 * include/grub/normal.h: New prototype.
10440 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
10441 normal/menu_entry.c.
10442 (normal_mod_SOURCES): Likewise.
10443 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10444 (normal_mod_SOURCES): Likewise.
10446 2005-02-15 Yoshinori K. Okuji <okuji@enbug.org>
10448 * include/grub/normal.h (grub_halt_init): New prototype.
10449 (grub_halt_fini): Likewise.
10450 (grub_reboot_init): Likewise.
10451 (grub_reboot_fini): Likewise.
10453 * util/grub-emu.c: Include signal.h.
10454 (main_env): New global variable.
10455 (grub_machine_init): Ignore SIGINT. Otherwise grub-emu cannot
10457 (grub_machine_fini): New function.
10458 (main): Call grub_halt_init and grub_reboot_init before
10459 grub_main, and grub_reboot_fini and grub_halt_fini after it.
10460 Call setjmp with MAIN_ENV to go back afterwards.
10461 Call grub_machine_fini right before return.
10463 * include/grub/util/misc.h: Include setjmp.h.
10464 (main_env): New prototype.
10466 * include/grub/kernel.h (grub_machine_fini): New prototype.
10467 * include/grub/i386/pc/biosdisk.h (grub_biosdisk_fini): Likewise.
10468 * include/grub/i386/pc/console.h (grub_console_fini): Likewise.
10470 * disk/i386/pc/biosdisk.c (grub_biosdisk_fini): New function.
10471 * kern/i386/pc/init.c (grub_machine_fini): Likewise.
10472 * term/i386/pc/console.c (grub_console_fini): Likewise.
10474 * util/i386/pc/misc.c: New file.
10476 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
10477 util/i386/pc/misc.c, commands/i386/pc/halt.c and
10478 commands/i386/pc/reboot.c.
10480 2005-02-14 Guillem Jover <guillem@hadrons.org>
10482 * include/grub/dl.h (grub_dl_check_header): New prototype.
10483 (grub_arch_dl_check_header): Change return type to grub_err_t,
10484 remove size parameter and export function. Update all callers.
10485 * kern/dl.c (grub_dl_check_header): New function.
10486 (grub_dl_load_core): Use `grub_dl_check_header' instead of
10487 `grub_arch_dl_check_header'. Check ELF type. Check if sections
10488 are inside the core.
10489 * kern/i386/dl.c (grub_arch_dl_check_header): Remove arch
10490 independent ELF header checks.
10491 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
10492 * loader/i386/pc/multiboot.c (grub_rescue_cmd_multiboot): Use
10493 `grub_dl_check_header' instead of explicit checks. Check for the
10495 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Use
10496 `grub_dl_check_header' instead of explicit checks. Remove arch
10497 specific ELF header checks.
10499 * util/grub-emu.c (grub_arch_dl_check_header): Remove the
10502 2005-02-13 Hollis Blanchard <hollis@penguinppc.org>
10504 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add ls.mod.
10505 * include/grub/powerpc/libgcc.h (__mulsf3): New prototype.
10507 2005-02-12 Hollis Blanchard <hollis@penguinppc.org>
10509 * kern/partition.c (grub_partition_probe): Clear `grub_errno' and
10510 return 0 if `grub_errno' is GRUB_ERR_BAD_PART_TABLE.
10511 (part_map_iterate): Clear `grub_errno' and return 0 if
10512 `partmap->iterate' returns GRUB_ERR_BAD_PART_TABLE.
10513 * partmap/amiga.c (amiga_partition_map_iterate): Return
10514 GRUB_ERR_BAD_PART_TABLE if no partition map magic is found.
10515 * partmap/apple.c (apple_partition_map_iterate): Likewise.
10517 2005-02-01 Guillem Jover <guillem@hadrons.org>
10519 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Fix module
10522 2005-01-31 Marco Gerards <metgerards@student.han.nl>
10524 * include/grub/powerpc/ieee1275/loader.h (grub_load_linux):
10526 (grub_rescue_cmd_linux): New prototype.
10527 (grub_rescue_cmd_initrd): Likewise.
10528 * powerpc/ieee1275/linux.c (grub_linux_boot): Remove struct
10530 (grub_linux_release_mem): Release the memory for the initrd.
10531 (grub_load_linux): Renamed from this...
10532 (grub_rescue_cmd_linux): ...To this. Changed all callers.
10533 Changed `entry' not to be static. Loop over memory regions to
10534 find another one when the default fails.
10535 (grub_rescue_cmd_initrd): New function.
10536 (grub_linux_init): Remove function.
10537 (grub_linux_fini): Likewise.
10538 (GRUB_MOD_INIT): Register `initrd'.
10539 (GRUB_MOD_FINI): Unregister `initrd'.
10540 * powerpc/ieee1275/linux_normal.c (grub_linux_normal_init):
10542 (grub_linux_normal_fini): Likewise.
10543 (GRUB_MOD_INIT): Register `initrd'.
10544 (GRUB_MOD_FINI): Unregister `initrd'.
10546 2005-01-31 Marco Gerards <metgerards@student.han.nl>
10548 * commands/help.c: New file.
10549 * normal/arg.c (show_help): Renamed to...
10550 (grub_arg_show_help): ... this.
10551 * commands/i386/pc/halt.c: New file.
10552 * commands/i386/pc/reboot.c: Likewise.
10553 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/help.c'.
10554 (pkgdata_MODULES): Add `reboot.mod', `halt.mod' and `help.mod'.
10555 (help_mod_SOURCES, help_mod_CFLAGS, reboot_mod_SOURCES)
10556 (reboot_mod_CFLAGS, halt_mod_SOURCES, halt_mod_CFLAGS): New
10558 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
10560 (pkgdata_MODULES): Add `help.mod'.
10561 (help_mod_SOURCES, help_mod_CFLAGS): New variables.
10562 * grub/i386/pc/init.h (grub_reboot): New prototype.
10563 (grub_halt): Likewise.
10564 * include/grub/normal.h (grub_arg_show_help): New prototype.
10565 (grub_help_init): Likewise.
10566 (grub_help_fini): Likewise.
10567 * util/grub-emu.c (main): Initialize and deinitialize the help
10570 * normal/cmdline.c (grub_cmdline_get): Doc fix.
10572 * normal/command.c (grub_command_init): Fixed the description of
10573 the `set' and `unset' commands.
10575 2005-01-31 Marco Gerards <metgerards@student.han.nl>
10577 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_interpret): New
10579 * commands/ieee1275/halt.c: New file.
10580 * commands/ieee1275/reboot.c: Likewise.
10581 * commands/ieee1275/suspend.c (grub_cmd_suspend): Use
10582 `__attribute__ ((unused))'. Some GCS related fixed.
10583 (grub_suspend_init) [GRUB_UTIL]: Function removed.
10584 (grub_suspend_fini): Likewise.
10585 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add `reboot.mod'
10587 (reboot_mod_SOURCES, reboot_mod_CFLAGS, halt_mod_SOURCES)
10588 (halt_mod_CFLAGS): New variables.
10589 * include/grub/powerpc/ieee1275/ieee1275.h
10590 (grub_ieee1275_interpret): New prototype.
10592 2005-01-29 Yoshinori K. Okuji <okuji@enbug.org>
10594 * include/grub/misc.h (memmove): New prototype.
10595 (memcpy): Likewise.
10597 2005-01-22 Hollis Blanchard <hollis@penguinppc.org>
10599 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
10600 `devpath' to 0. Use `name' instead of `devpath' with `grub_strndup'.
10602 2005-01-22 Marco Gerards <metgerards@student.han.nl>
10604 * kern/misc.c (grub_strndup): Function rewritten.
10606 2005-01-22 Vincent Pelletier <subdino2004@yahoo.fr>
10608 * normal/menu.c (TERM_WIDTH): Macro redefined.
10609 (TERM_TOP_BORDER_Y): Likewise.
10610 (draw_border): Replaced while-loop by a for-loop. Make the number
10611 of lines consistent with the number of lines displayed in
10612 print_entries. Added a margin below the rectangle.
10613 (print_entry): Make the entry fit in the rectangle.
10614 (print_entries): Display the scroll arrows next to the right
10617 2005-01-21 Marco Gerards <metgerards@student.han.nl>
10619 * fs/minix.c (grub_minix_find_file): Reserve more space for
10620 `fpath' so the \0 can be stored. Use `grub_strcpy' instead of
10621 `grub_strncpy' to copy `path' into it.
10623 2005-01-21 Marco Gerards <metgerards@student.han.nl>
10625 Add the loopback device, a device via which files can be accessed
10628 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/loopback.c'.
10629 (pkgdata_MODULES): Add loopback.mod.
10630 (loopback_mod_SOURCES): New variable.
10631 (loopback_mod_CFLAGS): Likewise.
10632 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
10634 (pkgdata_MODULES): Add loopback.mod.
10635 (loopback_mod_SOURCES): New variable.
10636 (loopback_mod_CFLAGS): Likewise.
10637 * disk/loopback.c: new file.
10638 * include/grub/normal.h (grub_loop_init): New prototype.
10639 (grub_loop_fini): New prototype.
10640 * util/grub-emu.c (main): Initialize and de-initialize loopback
10642 * include/grub/disk.h (grub_disk_dev_id): Add
10643 `GRUB_DISK_DEVICE_LOOPBACK_ID'.
10645 2005-01-20 Hollis Blanchard <hollis@penguinppc.org>
10647 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_enter): New
10649 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add suspend.mod.
10650 (suspend_mod_SOURCES): New variable.
10651 (suspend_mod_CFLAGS): Likewise.
10652 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_enter):
10654 * commands/ieee1275/suspend.c: New file.
10656 2005-01-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
10658 * include/grub/dl.h (GRUB_MOD_INIT): Changed `__attribute__
10659 ((unused))' to `__attribute__ ((used))'.
10660 (GRUB_MOD_FINI): Likewise.
10661 * kern/dl.c (grub_dl_load_file): Fix null pointer dereference.
10662 * genmk.rb (PModule): Assign space to common symbols when linking
10665 2005-01-20 Marco Gerards <metgerards@student.han.nl>
10667 * include/grub/mm.h (grub_mm_init_region): Change the type of the
10668 `unsigned' arguments to `grub_size_t'.
10669 (grub_malloc): Likewise.
10670 (grub_realloc): Likewise.
10671 (grub_memalign): Likewise.
10672 * kern/i386/dl.c (grub_arch_dl_check_header): Likewise.
10673 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
10674 * util/misc.c (grub_malloc): Likewise.
10675 (grub_realloc): Likewise.
10676 * kern/mm.c (get_header_from_pointer): Change the casts to
10677 `unsigned' into a cast to `grub_size_t'.
10679 * fs/fshelp.c (grub_fshelp_find_file): The `oldnode' should always
10680 point to `currnode' when `currnode' is changed.
10682 * util/grub-emu.c (main): Initialize `progname'. Reported by Nico
10683 Schottelius <nico-linux@schottelius.org>.
10685 2005-01-09 Hollis Blanchard <hollis@penguinppc.org>
10687 * util/powerpc/ieee1275/grub-mkimage.c: Include <string.h>.
10688 (note_path): Remove variable.
10689 (GRUB_IEEE1275_NOTE_NAME): New macro.
10690 (GRUB_IEEE1275_NOTE_TYPE): Likewise.
10691 (grub_ieee1275_note_hdr): New structure.
10692 (grub_ieee1275_note_desc): Likewise.
10693 (grub_ieee1275_note): Likewise.
10694 (load_note): Remove `dir' argument. All callers updated. Remove
10695 `note_img' and `path'. Do not load a file from `note_path'.
10696 Initialize a struct grub_ieee1275_note and write that to `out'.
10697 Use GRUB_IEEE1275_MODULE_BASE instead of MODULE_BASE.
10699 2005-01-05 Marco Gerards <metgerards@student.han.nl>
10701 * util/misc.c (grub_util_read_image): Revert last change. It
10702 called `grub_util_read_at', which seeks from the beginning of the
10705 2005-01-04 Hollis Blanchard <hollis@penguinppc.org>
10707 * TODO: Add note about endianness in grub-mkimage.
10708 * boot/powerpc/ieee1275/crt0.S (note): Remove unused .note
10710 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Add grub-mkimage.
10711 (grub_mkimage_SOURCES): New target.
10712 * include/grub/kernel.h (grub_start_addr): Remove variable.
10713 (grub_end_addr): Likewise.
10714 (grub_total_module_size): Likewise.
10715 (grub_kernel_image_size): Likewise.
10716 (GRUB_MODULE_MAGIC): New constant.
10717 (grub_module_info): New structure.
10718 (grub_arch_modules_addr): New prototype.
10719 (grub_get_end_addr): Remove prototype.
10720 * include/grub/i386/pc/kernel.h (grub_end_addr): New prototype.
10721 * include/grub/powerpc/ieee1275/kernel.h: New file.
10722 * include/grub/util/misc.h (grub_util_get_fp_size): New
10724 (grub_util_read_at): Likewise.
10725 (grub_util_write_image_at): Likewise.
10726 * kern/main.c (grub_get_end_addr): Remove function.
10727 (grub_load_modules): Call grub_arch_modules_addr instead of using
10728 grub_end_addr. Look for a grub_module_info struct in memory. Use
10729 the grub_module_info fields instead of calling grub_get_end_addr
10730 as loop conditions. Move grub_add_unused_region code here.
10731 (grub_add_unused_region): Remove function.
10732 * kern/i386/pc/init.c: Include grub/cache.h.
10733 (grub_machine_init): Remove call to grub_get_end_addr. Remove
10734 one call to add_mem_region.
10735 (grub_arch_modules_addr): New function.
10736 * kern/powerpc/ieee1275/init.c (grub_end_addr): Remove variable.
10737 (grub_total_module_size): Likewise.
10738 Include grub/machine/kernel.h.
10739 (grub_arch_modules_addr): New function.
10740 * util/grub-emu.c (grub_end_addr): Remove variable.
10741 (grub_total_module_size): Likewise.
10742 (grub_arch_modules_addr): New function.
10743 * util/misc.c: Include unistd.h.
10744 (grub_util_get_fp_size): New function.
10745 (grub_util_read_at): Likewise.
10746 (grub_util_write_image_at): Likewise.
10747 (grub_util_read_image): Call grub_util_read_at.
10748 (grub_util_write_image): Call grub_util_write_image_at.
10749 * util/i386/pc/grub-mkimage.c (generate_image): Allocate
10750 additional memory in kernel_img for a struct grub_module_info.
10751 Fill in that grub_module_info.
10752 * util/powerpc/ieee1275/grub-mkimage.c: New file.
10754 2005-01-03 Hollis Blanchard <hollis@penguinppc.org>
10756 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_milliseconds):
10758 * include/grub/powerpc/ieee1275/ieee1275.h
10759 (grub_ieee1275_milliseconds): New prototype.
10760 * include/grub/powerpc/ieee1275/time.h (GRUB_TICKS_PER_SECOND):
10762 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Call
10763 grub_ieee1275_milliseconds.
10765 2005-01-03 Hollis Blanchard <hollis@penguinppc.org>
10767 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_realmode): New
10769 (find_options): New function.
10770 (cmain): Call find_options.
10771 * include/grub/powerpc/ieee1275/ieee1275.h
10772 (grub_ieee1275_realmode): New extern variable.
10773 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Only call
10774 grub_map if grub_ieee1275_realmode is false.
10776 2004-12-29 Marco Gerards <metgerards@student.han.nl>
10778 * normal/cmdline.c (grub_cmdline_get): Redone logic so no empty
10779 lines are inserted and make it work like readline. Reported by
10780 Vincent Pelletier <subdino2004@yahoo.fr>.
10782 2004-12-28 Marco Gerards <metgerards@student.han.nl>
10784 * boot/powerpc/ieee1275/crt0.S (_start): Don't set up the stack.
10786 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCE): Remove
10787 `kern/powerpc/cache.S'.
10789 2004-12-27 Marco Gerards <metgerards@student.han.nl>
10791 * genmk.rb: Handle the `Program' class in the main loop. Written
10792 by Johan Rydberg <jrydberg@gnu.org>.
10793 (Program): New class.
10794 (programs): New variable.
10795 * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h>
10796 instead of "grub/machine/ieee1275.h". Include <grub/kernel.h>
10797 instead of "grub/kernel.h". Include <grub/machine/init.h>.
10798 (help_arch): Function removed.
10799 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add
10800 `powerpc/libgcc.h' and `loader.h'.
10801 (pkgdata_PROGRAMS): New variable.
10802 (sbin_UTILITIES): Variable removed.
10803 (grub_emu_SOURCES): Added kern/powerpc/cache.S.
10804 (grubof_SOURCES): Variable re-defined so it only includes the
10805 core functionality.
10806 (grubof_CFLAGS): Remove `-DGRUBOF'.
10807 (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS,
10808 (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES)
10809 (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS)
10810 (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES)
10811 (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS)
10812 (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES)
10813 (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS)
10814 (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS)
10815 (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES)
10816 (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS)
10817 (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
10818 (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES)
10819 (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS)
10820 (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES)
10821 (pc_mod_CFLAGS): New variables.
10822 * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>.
10823 (grub_ofdisk_iterate): Add a prototype for `dev_iterate'.
10824 * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype.
10825 * include/grub/loader.h (grub_os_area_addr, grub_os_area_size):
10827 * include/grub/i386/pc/init.h (grub_os_area_addr)
10828 (rub_os_area_size): ... to here.
10829 * include/grub/powerpc/ieee1275/ieee1275.h
10830 (grub_ieee1275_entry_fn): Export symbol.
10831 * include/grub/powerpc/ieee1275/init.h: New file.
10832 * include/grub/powerpc/libgcc.h: Likewise.
10833 * include/grub/cache.h: Likewise.
10834 * kern/powerpc/cache.S: Likewise. Written by Hollis Blanchard
10835 <hollis@penguinppc.org>.
10836 * kern/dl.c: Include <grub/cache.h>.
10837 (grub_dl_flush_cache): New function.
10838 (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache
10840 * kern/powerpc/ieee1275/init.c (grub_ofdisk_init)
10841 (grub_console_init): Removed prototypes.
10842 (grub_machine_init): Don't initialize the modules anymore.
10843 * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function
10845 * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN):
10846 Macro undef removed.
10847 (GRUB_HOST_WORDS_BIGENDIAN): New macro.
10848 * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add
10849 relocation `R_PPC_REL32'. Return an error when the relocation is
10851 * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'.
10852 * kern/i386/pc/init.c (grub_arch_sync_caches): New function.
10853 * util/misc.c (grub_arch_sync_caches): Likewise.
10855 2004-12-19 Marco Gerards <metgerards@student.han.nl>
10857 * conf/powerpc-ieee1275.rmk (MOSTLYCLEANFILES): Remove
10858 `symlist.c', add `grubof_symlist.c'.
10859 (symlist.c): Variable removed.
10860 (grubof_HEADERS): Variable added.
10861 (grubof_symlist.c): New target.
10862 (kernel_syms.lst): Use `grubof_HEADERS' instead of
10863 `kernel_img_HEADERS'.
10864 (grubof_SOURCES): Add `kern/powerpc/dl.c' and `grubof_symlist.c'.
10865 * kern/powerpc/dl.c: New file.
10866 * kern/powerpc/ieee1275/init.c (grub_arch_dl_check_header):
10868 (grub_arch_dl_relocate_symbols): Likewise.
10869 (grub_register_exported_symbols): Likewise.
10871 2004-12-13 Marco Gerards <metgerards@student.han.nl>
10873 * fs/ext2.c (grub_ext2_open): Don't use data after freeing it.
10874 (grub_ext2_dir): Likewise. Don't return in case of an error, jump
10875 to fail instead. Reported by Vincent Pelletier
10876 <subdino2004@yahoo.fr>.
10878 * fs/fshelp.c (grub_fshelp_find_file): Don't free `oldnode' when
10879 it is not allocated. Reported by Vincent Pelletier
10880 <subdino2004@yahoo.fr>.
10882 * normal/cmdline.c (grub_tab_complete): Add a blank line to the
10883 output so the output looks better.
10885 2004-12-04 Marco Gerards <metgerards@student.han.nl>
10887 Modulize the partition map support and add support for the amiga
10890 * commands/ls.c: Include <grub/partition.h> instead of
10891 <grub/machine/partition.h>.
10892 * kern/disk.c: Likewise.
10893 * kern/rescue.c: Likewise.
10894 * loader/i386/pc/chainloader.c: Likewise.
10895 * normal/cmdline.c: Likewise.
10896 * kern/powerpc/ieee1275/init.c: Likewise.
10897 (grub_machine_init): Call `grub_pc_partition_map_init',
10898 `grub_amiga_partition_map_init' and
10899 `grub_apple_partition_map_init'.
10900 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove
10901 `disk/i386/pc/partition.c'. Add `kern/partition.c'.
10902 (kernel_img_HEADERS): Remove `machine/partition.h'. Add
10903 `partition.h' and `pc_partition.h'.
10904 (grub_setup_SOURCES): Remove
10905 `disk/i386/pc/partition.c'. Add `kern/partition.c',
10906 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
10907 (grub_emu_SOURCES): Likewise.
10908 (pkgdata_MODULES): Add `amiga.mod', `apple.mod' and `pc.mod'.
10909 (amiga_mod_SOURCES, amiga_mod_CFLAGS, apple_mod_SOURCES)
10910 (apple_mod_CFLAGS, pc_mod_SOURCES, pc_mod_CFLAGS): New variables.
10911 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
10912 `disk/powerpc/ieee1275/partition.c'. Add `kern/partition.c',
10913 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
10914 (grubof_SOURCES): Likewise.
10915 * disk/i386/pc/partition.c: File removed.
10916 * disk/powerpc/ieee1275/partition.c: Likewise.
10917 * include/grub/powerpc/ieee1275/partition.h: Likewise.
10918 * include/grub/i386/pc/partition.h: Likewise.
10919 * kern/partition.c: New file.
10920 * partmap/amiga.c: Likewise.
10921 * partmap/apple.c: Likewise.
10922 * partmap/pc.c: Likewise.
10923 * include/grub/partition.h: Likewise..
10924 * include/grub/pc_partition.h: Likewise.
10925 * util/grub-emu.c: Include <grub/partition.h> instead of
10926 <grub/machine/partition.h>.
10927 (main): Call `grub_pc_partition_map_init',
10928 `grub_amiga_partition_map_init' and
10929 `grub_apple_partition_map_init' and deinitialize afterwards.
10930 * util/i386/pc/biosdisk.c: Include `#include
10931 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
10932 `<grub/machine/partition.h>'.
10933 * util/i386/pc/grub-setup.c: Likewise.
10934 * util/i386/pc/biosdisk.c: Likewise.
10935 (grub_util_biosdisk_get_grub_dev): Only access the PC specific
10936 partition information in case of a PC partition.
10937 * util/i386/pc/grub-setup.c: Include `#include
10938 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
10939 `<grub/machine/partition.h>'.
10940 (setup): Only access the PC specific partition information in case
10943 2004-11-17 Hollis Blanchard <hollis@penguinppc.org>
10945 * kern/powerpc/ieee1275/init.c (grub_setjmp): Remove function.
10946 (grub_longjmp): Likewise.
10947 * include/grub/powerpc/setjmp.h (grub_jmp_buf): Set array size to
10949 * normal/powerpc/setjmp.S: New file.
10950 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
10951 `normal/powerpc/setjmp.S'.
10952 (grubof_CFLAGS): Add `-DGRUBOF'.
10953 * include/grub/setjmp.h [GRUB_UTIL]: Changed condition to
10954 [GRUB_UTIL && !GRUBOF].
10956 2004-11-16 Marco Gerards <metgerards@student.han.nl>
10958 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Skip any
10959 property named `name'. Correctly handle the error returned by
10960 `grub_ieee1275_finddevice' if a device can not be opened.
10962 2004-11-02 Hollis Blanchard <hollis@penguinppc.org>
10964 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_readkey): Test
10965 `actual' for negativity.
10966 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
10969 2004-11-01 Marco Gerards <metgerards@student.han.nl>
10971 * term/i386/pc/vga.c (VGA_HEIGHT): Changed to 350.
10972 (PAGE_OFFSET): New macro.
10973 (CRTC_ADDR_PORT): Likewise.
10974 (CRTC_DATA_PORT): Likewise.
10975 (START_ADDR_HIGH_REGISTER): Likewise.
10976 (START_ADDR_LOW_REGISTER): Likewise.
10977 (GRAPHICS_ADDR_PORT): Likewise.
10978 (GRAPHICS_DATA_PORT): Likewise.
10979 (READ_MAP_REGISTER): Likewise.
10980 (INPUT_STATUS1_REGISTER): Likewise.
10981 (INPUT_STATUS1_VERTR_BIT): Likewise.
10982 (page): New variable.
10983 (wait_vretrace): New function.
10984 (set_read_map): Likewise.
10985 (set_start_address): Likewise.
10986 (grub_vga_init): Use mode 0x10 instead of mode 0x12. Switch to
10988 (check_vga_mem): Take the page into account.
10989 (write_char): Likewise.
10990 (write_cursor): Likewise.
10991 (scroll_up): Likewise. Copy the page to the page that is not
10992 shown and switch between both pages.
10993 (grub_vga_putchar): Fix off by one error.
10994 (grub_vga_cls): Wait for the vertical retrace. Take the page into
10997 2004-11-01 Marco Gerards <metgerards@student.han.nl>
10999 Add support for iso9660 (including rockridge).
11001 * conf/i386-pc.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
11002 (iso9660_mod_SOURCES): New variable.
11003 (iso9660_mod_CFLAGS): Likewise.
11004 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
11005 * include/grub/fs.h (grub_iso9660_init): New prototype.
11006 * util/grub-emu.c (main): Call `grub_iso9660_init'.
11007 * fs/iso9660.c: New file.
11009 * include/grub/misc.h (grub_strncat): New prototype.
11010 * kern/misc.c (grub_strncat): New function.
11012 * fs/hfs.c (grub_hfs_mount): Translate the error
11013 `GRUB_ERR_OUT_OF_RANGE' to `GRUB_ERR_BAD_FS'.
11014 * fs/jfs.c (grub_jfs_mount): Likewise.
11015 * fs/ufs.c (grub_ufs_mount): Likewise.
11017 2004-10-28 Hollis Blanchard <hollis@penguinppc.org>
11019 * boot/powerpc/ieee1275/cmain.c (cmain): Remove asm statements
11020 which initialized BAT registers.
11021 * boot/powerpc/ieee1275/ieee1275.c (IEEE1275_CALL_ENTRY_FN,
11022 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
11024 * include/grub/powerpc/ieee1275/ieee1275.h (IEEE1275_CALL_ENTRY_FN,
11025 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
11027 * kern/powerpc/ieee1275/openfw.c (grub_map): New function.
11028 (grub_mapclaim): Likewise.
11029 * loader/powerpc/ieee1275/linux.c (grub_load_linux): Use
11030 grub_mapclaim instead of grub_ieee1275_claim. Assign linux_addr by
11033 2004-10-19 Hollis Blanchard <hollis@penguinppc.org>
11035 * conf/powerpc-ieee1275.rmk (COMMON_ASFLAGS): Remove -fno-builtin.
11036 (COMMON_CFLAGS): Remove -fno-builtin and -D__ASSEMBLY__. Add
11037 -ffreestanding and -msoft-float.
11039 2004-10-15 Hollis Blanchard <hollis@penguinppc.org>
11041 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Do not
11042 append ":0" to devpath if the GRUB_IEEE1275_NO_PARTITION_0 flag is
11043 set in grub_ieee1275_flags.
11045 2004-10-14 Hollis Blanchard <hollis@penguinppc.org>
11047 * include/grub/powerpc/ieee1275/ieee1275.h (abort): Add function
11049 * kern/powerpc/ieee1275/init.c (grub_machine_init): Call
11050 grub_console_init first.
11051 Change the memory range used for grub_ieee1275_claim and
11052 grub_mm_init_region.
11053 Print an error message if the claim fails.
11054 Include <grub/misc.h>.
11056 2004-10-13 Hollis Blanchard <hollis@penguinppc.org>
11058 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_iterate):
11059 Call grub_children_iterate for device nodes of type `scsi',
11061 (grub_ofdisk_open): Remove manual device alias resolution.
11062 Fix memory leak when device cannot be opened.
11063 * include/grub/powerpc/ieee1275/ieee1275.h
11064 (grub_children_iterate): New prototype.
11065 * kern/powerpc/ieee1275/openfw.c (grub_children_iterate):
11067 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
11068 Return -1 if args.size was -1.
11070 2004-10-11 Hollis Blanchard <hollis@penguinppc.org>
11072 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_flags): New global.
11073 (cmain): Accept 3 parameters. Test for 0xdeadbeef, indicating Old
11074 World Macintosh. If Old Wold, set flag in grub_ieee1275_flags; claim
11075 Open Firmware's memory for it; claim memory from _start to _end.
11076 * boot/powerpc/ieee1275/crt0.S (__bss_start): New extern.
11077 (_end): New extern.
11078 (_start): Zero BSS from __bss_start to _end.
11079 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
11081 (GRUB_IEEE1275_NO_PARTITION_0): New #define.
11083 2004-10-11 Hollis Blanchard <hollis@penguinppc.org>
11085 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): Return
11086 -1 if args.base was -1.
11088 2004-10-08 Hollis Blanchard <hollis@penguinppc.org>
11090 * term/powerpc/ieee1275/ieee1275.c (grub_ofconsole_cls): Use an ANSI
11091 escape sequence instead of a literal ^L. Also call
11092 grub_ofconsole_gotoxy.
11094 2004-10-03 Hollis Blanchard <hollis@penguinppc.org>
11096 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): change
11097 void * arguments to grub_addr_t. All callers updated. Also make
11098 the `result' argument optional.
11099 (grub_ieee1275_release): change void * arguments to grub_addr_t.
11100 All callers updated.
11102 2004-09-22 Hollis Blanchard <hollis@penguinppc.org>
11104 * commands/ls.c (grub_ls_list_files): Use the string following the
11105 initial ')', if present, as the filesystem path.
11106 * kern/rescue.c (grub_rescue_cmd_ls): Likewise.
11108 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): List crt0.S first.
11110 2004-09-18 Yoshinori K. Okuji <okuji@enbug.org>
11112 Make the source code of the menu interface more readable.
11114 * normal/menu.c: Include grub/mm.h.
11115 (TERM_WIDTH): New macro.
11116 (TERM_HEIGHT): Likewise.
11117 (TERM_INFO_HEIGHT): Likewise.
11118 (TERM_MARGIN): Likewise.
11119 (TERM_SCROLL_WIDTH): Likewise.
11120 (TERM_TOP_BORDER_Y): Likewise.
11121 (TERM_LEFT_BORDER_X): Likewise.
11122 (TERM_BORDER_WIDTH): Likewise.
11123 (TERM_MESSAGE_HEIGHT): Likewise.
11124 (TERM_BORDER_HEIGHT): Likewise.
11125 (TERM_NUM_ENTRIES): Likewise.
11126 (TERM_FIRST_ENTRY_Y): Likewise.
11127 (TERM_ENTRY_WIDTH): Likewise.
11128 (TERM_CURSOR_X): Likewise.
11129 (draw_border): Use macros instead of magic numbers.
11130 (print_entry): Likewise.
11131 (print_entries): Likewise.
11132 (run_menu): Likewise. Also, handle the key 'e'.
11133 (run_menu_entry): Ignore empty command lines.
11134 (print_message): Added a new argument EDIT. If EDIT is true,
11135 print a different message.
11136 (init_page): Likewise.
11137 (edit_menu_entry): New function. Not implemented yet.
11139 2004-09-17 Marco Gerards <metgerards@student.han.nl>
11141 Add `linux.mod' and `multiboot.mod' so linux and multiboot kernels
11142 can be loaded from normal mode.
11144 * conf/i386-pc.rmk (pkgdata_MODULES): Add `linux.mod' and
11146 (linux_mod_SOURCES, linux_mod_CFLAGS, multiboot_mod_SOURCES)
11147 (multiboot_mod_CFLAGS): New variables.
11148 * loader/i386/pc/linux_normal.c: New file.
11149 * loader/i386/pc/multiboot_normal.c: Likewise.
11151 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Don't use the
11152 attribute `unused'.
11154 * fs/ext2.c (grub_ext2_iterate_dir): Fix typos in inode type. Use
11155 `fdiro' to read the mode information from instead of `diro'.
11157 * fs/fshelp.c (grub_fshelp_find_file): Set type to foundtype after
11158 looking up a symlink.
11160 * include/grub/normal.h (GRUB_COMMAND_FLAG_NO_ARG_PARSE): New
11162 * normal/command.c (grub_command_execute): Don't parse the
11163 arguments when `GRUB_COMMAND_FLAG_NO_ARG_PARSE' is set in the
11164 flags of the command.
11166 * normal/menu.c (grub_menu_run): Fix typo.
11168 2004-09-14 Hollis Blanchard <hollis@penguinppc.org>
11170 * kern/powerpc/ieee1275/init.c (abort): Trap into Open Firmware.
11172 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_gotoxy): Use
11173 `y + 1' instead of `y - 1'.
11175 * conf/powerpc-ieee1275.rmk (grubof_LDFLAGS): Add `-N' and `-S'.
11177 2004-09-14 Yoshinori K. Okuji <okuji@enbug.org>
11179 From Hollis Blanchard <hollis@penguinppc.org>:
11180 * kern/misc.c (memmove): New alias for grub_memmove.
11181 (memcmp): New alias for grub_memcmp.
11182 (memset): New alias for grub_memset.
11183 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
11184 Change "int handle" to "grub_ieee1275_phandle_t handle".
11185 * include/grub/powerpc/ieee1275/ieee1275.h
11186 (grub_ieee1275_get_property): Likewise.
11188 2004-09-12 Tomas Ebenlendr <ebik@ucw.cz>
11190 Added normal mode command `chainloader' as module chain.mod, which
11191 depends on normal.mod and _chain.mod.
11193 * conf/i386-pc.rmk (pkgdata_MODULES): Add `chain.mod'.
11194 (chain_mod_SOURCES, chain_mod_CFLAGS): Variables added.
11195 * include/grub/i386/pc/loader.h (grub_rescue_cmd_chainloader):
11197 * loader/i386/pc/chainloader.c (grub_rescue_cmd_chainloader): All
11198 but arguments parsing moved to ...
11199 (grub_chainloader_cmd): ... here. New function.
11200 * include/grub/i386/pc/chainloader.h: New file.
11201 * loader/i386/pc/chainloader_normal.c: Likewise.
11203 2004-09-11 Marco Gerards <metgerards@student.han.nl>
11205 * conf/i386-pc.rmk (kernel_img_SOURCES): Added kern/fshelp.c.
11206 (grub_mkimage_LDFLAGS): Likewise.
11207 (grub_emu_SOURCES): Likewise.
11208 (kernel_img_HEADERS): Added fshelp.h.
11209 * fs/ext2.c: Include <grub/fshelp.h>.
11210 (FILETYPE_REG): New macro.
11211 (FILETYPE_INO_REG): Likewise.
11212 (grub_ext_sblock): Renamed to `grub_ext2_sblock'.
11214 (ext2_block_group): Renamed to `grub_ext2_block_group'. Changed
11216 (grub_fshelp_node): New struct.
11217 (grub_ext2_data): Added member `diropen'. Changed member `inode'
11219 (grub_ext2_get_file_block): Removed function.
11220 (grub_ext2_read_block): New function.
11221 (grub_ext2_read_file): Replaced parameter `data' by `node'.
11222 This function was written.
11223 (grub_ext2_mount): Read the root inode. Create a diropen struct.
11224 (grub_ext2_find_file): Removed function.
11225 (grub_ext2_read_symlink): New function.
11226 (grub_ext2_iterate_dir): Likewise.
11227 (grub_ext2_open): Rewritten.
11228 (grub_ext2_dir): Rewritten.
11229 * include/grub/fshelp.h: New file.
11230 * fs/fshelp.c: Likewise.
11232 2004-09-10 Yoshinori K. Okuji <okuji@enbug.org>
11234 * normal/menu.c: Include grub/loader.h and grub/machine/time.h.
11235 (print_message): Add a missing newline.
11236 (run_menu): Added timeout support.
11237 (run_menu_entry): New local function.
11238 (grub_menu_run): Added support for booting.
11240 * kern/loader.c (grub_loader_is_loaded): New function.
11242 * include/grub/powerpc/ieee1275/time.h: Include grub/symbol.h.
11243 (grub_get_rtc): Exported.
11245 * include/grub/i386/pc/time.h: Include grub/symbol.h.
11246 (grub_get_rtc): Exported.
11248 * include/grub/normal.h (struct grub_command_list): Remove
11249 constant from the member `command'.
11251 * include/grub/loader.h (grub_loader_is_loaded): Declared.
11253 * include/grub/err.h (GRUB_ERR_INVALID_COMMAND): New constant.
11255 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/time.h.
11257 2004-08-28 Marco Gerards <metgerards@student.han.nl>
11259 Add support for the JFS filesystem.
11261 * fs/jfs.c: New file.
11262 * include/grub/fs.h (grub_jfs_init): New prototype.
11263 (grub_jfs_fini): New prototype.
11264 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/jfs.c.
11265 (grub_emu_SOURCES): Likewise.
11266 (pkgdata_MODULES): Add jfs.mod.
11267 (jfs_mod_SOURCES): New variable.
11268 (jfs_mod_CFLAGS): Likewise.
11269 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs.jfs.c.
11270 (grubof_SOURCES): Likewise.
11271 * util/grub-emu.c (main): Initialize and deinitialize JFS support.
11273 * fs/fat.c (grub_fat_find_dir): Convert the filename little
11274 endian to the host endian.
11275 (grub_fat_utf16_to_utf8): Move function from there...
11276 * kern/misc.c (grub_utf16_to_utf8): ...to here. Do not convert
11277 the endianness of the source string anymore.
11278 * include/grub/misc.h (grub_utf16_to_utf8): New prototype.
11280 2004-08-24 Marco Gerards <metgerards@student.han.nl>
11282 * commands/boot.c (grub_boot_init) [GRUB_UTIL]: Make conditional.
11283 (grub_boot_fini) [GRUB_UTIL]: Likewise.
11284 (GRUB_MOD_INIT) [!GRUB_UTIL]: Likewise.
11285 (GRUB_MOD_FINI) [!GRUB_UTIL]: Likewise.
11287 * fs/hfs.c (grub_hfs_find_node): Add a prototype for `node_found'.
11288 (grub_hfs_iterate_dir): Make the function static. Add prototypes
11289 for `node_found' and `it_dir'.
11290 (grub_hfs_dir): Add prototype for `dir_hook'.
11292 * fs/minix.c (grub_minix_get_file_block): Add prototype for
11293 `grub_get_indir'. Rename `indir' in two blocks to `indir16'
11294 and `indir32' to silence a gcc warning.
11296 * include/grub/fs.h (grub_hfs_init): New prototype.
11297 (grub_hfs_fini): Likewise.
11300 2004-08-21 Yoshinori K. Okuji <okuji@enbug.org>
11302 Each disk device has its own id now. This is useful to make use
11303 of multiple disk devices.
11305 * include/grub/disk.h (grub_disk_dev_id): New enum.
11306 (GRUB_DISK_DEVICE_BIOSDISK_ID): New constant.
11307 (GRUB_DISK_DEVICE_OFDISK_ID): Likewise.
11309 * disk/i386/pc/biosdisk.c (grub_biosdisk_dev): Specify
11310 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
11312 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_dev): Specify
11313 GRUB_DISK_DEVICE_OFDISK_ID as an id.
11315 * util/i386/pc/biosdisk.c (grub_util_biosdisk_dev): Specify
11316 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
11318 * include/grub/disk.h (struct grub_disk_dev): Added a new member
11319 "id" which is used by the cache manager.
11321 * normal/main.c (grub_normal_init_page): Use "GNU GRUB" instead
11324 2004-08-18 Marco Gerards <metgerards@student.han.nl>
11326 * fs/hfs.c: New file.
11327 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/hfs.c.
11328 (grub_emu_SOURCES): Likewise.
11329 (pkgdata_MODULES): Add hfs.mod.
11330 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/hfs.c.
11331 (grubof_SOURCES): Likewise.
11332 * util/grub-emu.c (main): Initialize and deinitialize HFS support.
11334 * include/grub/misc.h (grub_strncasecmp): Add prototype.
11335 * kern/misc.c (grub_strncasecmp): Add function.
11337 2004-08-14 Marco Gerards <metgerards@student.han.nl>
11339 * include/grub/arg.h (GRUB_ARG_OPTION_OPTIONAL): Surround macro
11342 * fs/ext2.c (FILETYPE_UNKNOWN): New macro.
11343 (grub_ext2_dir): In case the directory entry type is unknown, read
11346 2004-08-02 Peter Bruin <pjbruin@dds.nl>
11348 * loader/powerpc/ieee1275/linux.c (grub_linux_init): Pass
11349 grub_load_linux instead of grub_rescue_cmd_linux as second
11350 argument of grub_rescue_register_command.
11352 * Makefile.in (RMKFILES): Add conf/powerpc-ieee1275.rmk.
11354 2004-07-27 Marco Gerards <metgerards@student.han.nl>
11356 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_release): New
11358 * commands/boot.c: Remove the check for `GRUB_UTIL'.
11359 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
11360 `loader/powerpc/ieee1275/linux.c',
11361 `loader/powerpc/ieee1275/linux_normal.c' and `commands/boot.c'.
11362 * include/grub/powerpc/ieee1275/ieee1275.h
11363 (grub_ieee1275_release): New prototype.
11364 * include/grub/powerpc/ieee1275/loader.h: Rewritten.
11365 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize
11366 normal, boot, linux and linux_normal.
11367 * loader/powerpc/ieee1275/linux.c: New file.
11368 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
11370 2004-07-12 Marco Gerards <metgerards@student.han.nl>
11372 * normal/arg.c (grub_arg_parse): Correct error handling after
11373 reallocating the argumentlist (check if `argl' is not null instead
11374 of checking if `args' is not null).
11375 * kern/mm.c (grub_realloc): Return the same pointer when using the
11376 same region, instead of returning the header address.
11378 2004-07-11 Marco Gerards <metgerards@student.han.nl>
11380 * disk/powerpc/ieee1275/partition.c (grub_partition_iterate): Skip
11381 one block instead of two when looking for the initial partition.
11382 (grub_partition_probe): Initialize the local variable `p' with 0.
11383 Use base 10 for the grub_strtoul call.
11384 * kern/misc.c (grub_strncpy): Fix off by one bug. Eliminated the
11385 need for one local variable.
11386 (grub_strtoul): Don't add the new value to `num', instead of that
11389 2004-07-11 Marco Gerards <metgerards@student.han.nl>
11391 * conf/i386-pc.rmk (pkgdata_IMAGE): Add pxeboot.img.
11392 (pxeboot_img_SOURCES): New variable.
11393 (pxeboot_img_ASFLAGS): Likewise.
11394 (pxeboot_img_LDFLAGS): Likewise.
11395 * boot/i386/pc/pxeboot.S: New file. Based on pxeloader.S from
11396 GRUB Legacy and boot.S. Adopted for GRUB 2 by lode leroy
11397 <lode_leroy@hotmail.com>.
11399 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
11401 * kern/rescue.c (grub_enter_rescue_mode): Don't continue when
11402 there was no input.
11404 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
11406 * normal/cmdline.c (grub_set_history): Fix off by one bug. Fixed
11407 the history buffer logic.
11409 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
11411 * fs/ext2.c (FILETYPE_INO_MASK, FILETYPE_INO_DIRECTORY)
11412 (FILETYPE_INO_SYMLINK): New macros.
11413 (grub_ext2_find_file): Check if the node is a directory using the
11414 inode stat information instead of using the filetype in the
11415 dirent. Exclude the first character of an absolute symlink.
11416 (grub_ext2_dir): Mask out the filetype part of the mode member of
11419 2004-05-24 Marco Gerards <metgerards@student.han.nl>
11421 Add support for UFS version 1 and 2. Add support for the minix
11422 filesystem version 1 and 2, both the variants with 14 and 30 long
11425 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ufs.c and
11427 (grub_emu_SOURCES): Likewise.
11428 (pkgdata_MODULES): Add ufs.mod and minix.mod.
11429 (ufs_mod_SOURCES): New variable.
11430 (ufs_mod_CFLAGS): Likewise.
11431 (minix_mod_SOURCES): Likewise.
11432 (minix_mod_CFLAGS): Likewise.
11433 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/ufs.c and
11435 (grubof_SOURCES): Likewise.
11436 * fs/ufs.c: New file.
11437 * fs/minix.c: New file.
11438 * include/grub/fs.h (grub_ufs_init): New prototype.
11439 (grub_ufs_fini): Likewise.
11440 (grub_minix_init): Likewise.
11441 (grub_minix_fini): Likewise.
11442 * util/grub-emu.c (main): Initialize and deinitialize UFS and
11445 2004-04-30 Jeroen Dekkers <jeroen@dekkers.cx>
11447 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add normal/arg.c,
11448 commands/ls.c, commands/terminal.c, commands/boot.c,
11449 commands/cmp.c and commands/cat.c.
11450 (grubof_LDFLAGS): Add -nostdlib -static-libgcc -lgcc.
11452 * kern/powerpc/ieee1275/init.c: Include "grub/env.h" instead of
11455 2004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
11457 All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
11458 and grub_, respectively. Because the conversion is trivial and
11459 mechanical, I omit the details here. Please refer to the CVS
11460 if you need more information.
11462 2004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
11464 * include/pupa: Renamed to ...
11465 * include/grub: ... this.
11466 * util/i386/pc/pupa-mkimage.c: Renamed to ...
11467 * util/i386/pc/grub-mkimage.c: ... this.
11468 * util/i386/pc/pupa-setup.c: Renamed to ...
11469 * util/i386/pc/grub-setup.c: ... this.
11470 * util/pupa-emu.c: Renamed to ...
11471 * util/grub-emu.c: ... this.
11473 2004-03-29 Marco Gerards <metgerards@student.han.nl>
11475 Add support for the newworld apple macintosh (PPC). This has been
11476 tested on the powerbook 2000 only. It only adds support for
11477 generic ieee1275 functions, console and disk support. This should
11478 be easy to port to other architectures with support for Open
11481 * configure.ac: Accept the powerpc as host_cpu. In the case of
11482 the powerpc cpu set the host_vendor to ieee1275. Make sure the i386
11483 specific tests are only executed while building for the i386.
11484 Inverse test for crosscompile.
11485 * genmk.rb (Utility): Allow assembler files.
11486 * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno.
11487 * conf/powerpc-ieee1275.rmk: New file.
11488 * disk/powerpc/ieee1275/ofdisk.c: Likewise.
11489 * disk/powerpc/ieee1275/partition.c: Likewise.
11490 * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise.
11491 * include/pupa/powerpc/ieee1275/console.h: Likewise.
11492 * include/pupa/powerpc/ieee1275/partition.h: Likewise.
11493 * include/pupa/powerpc/ieee1275/time.h: Likewise.
11494 * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise.
11495 * include/pupa/powerpc/ieee1275/multiboot.h: Likewise.
11496 * include/pupa/powerpc/ieee1275/loader.h
11497 * include/pupa/powerpc/setjmp.h: Likewise.
11498 * include/pupa/powerpc/types.h: Likewise.
11499 * kern/powerpc/ieee1275/init.c: Likewise.
11500 * kern/powerpc/ieee1275/openfw.c: Likewise.
11501 * term/powerpc/ieee1275/ofconsole.c: Likewise.
11503 These files were written by Johan Rydberg
11504 (jrydberg@night.trouble.net) and I only modified them slightly.
11506 * boot/powerpc/ieee1275/cmain.c: New file.
11507 * boot/powerpc/ieee1275/crt0.S: Likewise.
11508 * boot/powerpc/ieee1275/ieee1275.c: Likewise.
11509 * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
11511 2004-03-14 Jeroen Dekkers <jeroen@dekkers.cx>
11513 * Makefile.in: Update copyright.
11514 * genmodsrc.sh: Likewise.
11515 * gensymlist.sh: Likewise.
11516 * term/i386/pc/vga.c: Indent correctly.
11518 * util/i386/pc/pupa-mkimage.c (usage): Use PACKAGE_BUGREPORT as
11519 bugreporting address.
11520 * util/i386/pc/pupa-setup.c (usage): Likewise,
11521 (main): Call pupa_ext2_init and pupa_ext2_fini.
11523 * fs/fat.c (log2): Renamed to ...
11524 (fat_log2): ... this.
11525 All callers changed.
11526 * kern/misc.c (memcpy): Alias to pupa_memmove.
11527 * loader/i386/pc/multiboot.c (pupa_rescue_cmd_multiboot): Fix
11529 * util/console.c (pupa_ncurses_fini): Return 0.
11531 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open)[__linux__]:
11532 Move fail label here.
11533 [__GNU__]: Don't warn when using stat.
11534 (open_device)[!__linux__]: Check if FD < 0 instead of !FD.
11535 (pupa_util_biosdisk_get_pupa_dev)[__GNU__]: Change type of N to
11536 long int. Use strtol instead of strtoul.
11538 2004-03-14 Marco Gerards <metgerards@student.han.nl>
11540 * commands/boot.c: New file.
11541 * commands/cat.c: Likewise.
11542 * commands/cmp.c: Likewise.
11543 * commands/ls.c: Likewise.
11544 * commands/terminal.c: Likewise.
11545 * normal/command.c: Include <pupa/env.h> and <pupa/dl.h>.
11546 (pupa_register_command): Changed interface to match the new
11548 (pupa_command_execute): Changed (almost rewritten) so it uses
11549 pupa_split_command. Added support for setting variables using the
11551 (rescue_command): Changed to work with the new argument parser.
11552 (terminal_command): Moved from here to commands/terminal.c.
11553 (set_command): New function.
11554 (unset_command): New function.
11555 (insmod_command): New function.
11556 (rmmod_command): New function.
11557 (lsmod_command): New function.
11558 (pupa_command_init): Don't initialize the command terminal
11559 anymore. Initialize the commands set, unset, insmod, rmmod and
11561 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/env.c.
11562 (kernel_img_HEADERS): Add arg.h and env.h.
11563 (pupa_mkimage_LDFLAGS): Add kern/env.c.
11564 (pupa_emu_SOURCES): Add kern/env.c, commands/ls.c,
11565 commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c,
11567 (pkgdata_MODULES): Add ls.mod, boot.mod, cmp.mod, cat.mod and
11569 (normal_mod_SOURCES): Add normal/arg.c and normal/arg.c.
11570 (boot_mod_SOURCES): New variable.
11571 (terminal_mod_SOURCES): Likewise.
11572 (ls_mod_SOURCES): Likewise.
11573 (cmp_mod_SOURCES): Likewise.
11574 (cat_mod_SOURCES): Likewise.
11576 * normal/arg.c: New file.
11577 * kern/env.c: Likewise.
11578 * include/pupa/arg.h: Likewise.
11579 * include/pupa/env.h: Likewise.
11580 * font/manager.c (font_command): Changed to match argument parsing
11582 (PUPA_MOD_INIT): Likewise.
11583 * hello/hello.c (pupa_cmd_hello): Likewise.
11584 (PUPA_MOD_INIT): Likewise.
11585 * include/pupa/disk.h: Include <pupa/device.h>.
11586 (pupa_print_partinfo): New prototype.
11587 * include/pupa/dl.h (pupa_dl_set_prefix): Prototype removed.
11588 (pupa_dl_get_prefix): Likewise.
11589 * include/pupa/misc.h: Include <pupa/err.h>.
11590 (pupa_isgraph): New prototype.
11591 (pupa_isdigit): Likewise.
11592 (pupa_split_cmdline): Likewise.
11593 * include/pupa/normal.h: Include <pupa/arg.h>.
11594 (pupa_command): Changed the prototype of the member `func' to
11595 match the argument parsing interface. Added member `options'.
11596 (pupa_register_command): Updated to match function.
11597 (pupa_arg_parse): New prototype.
11598 (pupa_hello_init) [PUPA_UTIL]: New prototype.
11599 (pupa_hello_fini) [PUPA_UTIL]: Likewise.
11600 (pupa_ls_init) [PUPA_UTIL]: Likewise.
11601 (pupa_ls_fini) [PUPA_UTIL]: Likewise.
11602 (pupa_cat_init) [PUPA_UTIL]: Likewise.
11603 (pupa_cat_fini) [PUPA_UTIL]: Likewise.
11604 (pupa_boot_init) [PUPA_UTIL]: Likewise.
11605 (pupa_boot_fini) [PUPA_UTIL]: Likewise.
11606 (pupa_cmp_init) [PUPA_UTIL]: Likewise.
11607 (pupa_cmp_fini) [PUPA_UTIL]: Likewise.
11608 (pupa_terminal_init) [PUPA_UTIL]: Likewise.
11609 (pupa_terminal_fini) [PUPA_UTIL]: Likewise.
11610 * kern/disk.c: Include <pupa/file.h>.
11611 (pupa_print_partinfo): New function.
11612 * kern/dl.c: Include <pupa/env.h>.
11613 (pupa_dl_dir): Variable removed.
11614 (pupa_dl_load): Use the environment variable `prefix' instead of
11615 the variable pupa_dl_dir.
11616 (pupa_dl_set_prefix): Function removed.
11617 (pupa_dl_get_prefix): Likewise.
11618 * kern/i386/pc/init.c: Include <pupa/env.h>.
11619 (pupa_machine_init): Use the environment variable `prefix' instead of
11620 using pupa_dl_set_prefix to set the prefix.
11621 * kern/main.c: Include <pupa/env.h>.
11622 (pupa_set_root_dev): Use the environment variable `prefix' instead of
11623 using pupa_dl_get_prefix to get the prefix.
11624 * kern/misc.c: Include <pupa/env.h>.
11625 (pupa_isdigit): New function.
11626 (pupa_isgraph): Likewise.
11627 (pupa_ftoa): Likewise.
11628 (pupa_vsprintf): Added support for printing values of the type
11629 `double'. Make it possible to format variable output when using
11630 formatting like `%1.2%f'.
11631 (pupa_split_cmdline): New function.
11632 * kern/rescue.c: Include <pupa/env.h>.
11633 (next_word): Removed function.
11634 (pupa_rescue_cmd_prefix): Likewise.
11635 (pupa_rescue_cmd_set): New function.
11636 (pupa_rescue_cmd_unset): New function.
11637 (pupa_enter_rescue_mode): Use the `pupa_split_cmdline' function to
11638 split the command line instead of splitting it here. Added
11639 support for setting variables using the syntax `foo=bar'. Don't
11640 initialize the prefix command anymore. Initialized the set and
11642 * normal/cmdline.c: Include <pupa/env.h>.
11643 (pupa_tab_complete): Added prototypes for print_simple_completion,
11644 print_partition_completion, add_completion, iterate_commands,
11645 iterate_dev, iterate_part and iterate_dir. Moved code to print
11646 partition information from here to kern/disk.c.
11647 (pupa_cmdline_run): Don't check if the function exists anymore.
11648 * normal/main.c: Include <pupa/env.h>.
11649 (pupa_rescue_cmd_normal): Use the environment variable `prefix'
11650 instead of using pupa_dl_get_prefix to get the prefix.
11651 * term/i386/pc/vga.c: Include <pupa/arg.h>.
11652 (check_vga_mem): Cast pointers to `void *' to silence a gcc
11654 (pupa_vga_putchar) [! DEBUG_VGA]: Removed for this case.
11655 (pupa_vga_setcolor): Declare unused variables with `__attribute__
11656 ((unused))' to silence a gcc warning.
11657 (pupa_vga_setcolor): Likewise.
11658 (debug_command): Changed to match argument parsing
11660 * util/pupa-emu.c: Include <pupa/env.h>.
11661 (options): Added 0's for unused fields to silence a gcc warning.
11663 (main): Use the environment variable `prefix' instead of using
11664 pupa_dl_set_prefix to set the prefix. Initialize the commands ls,
11665 boot, cmp, cat and terminal. Finish the commands boot, cmp, cat
11668 * util/i386/pc/getroot.c: Include <pupa/i386/pc/util/biosdisk.h>.
11669 * util/misc.c: Include <malloc.h>.
11670 (pupa_malloc): Rewritten so errors are correctly reported.
11671 (pupa_realloc): Likewise.
11672 (pupa_memalign): Likewise.
11673 (pupa_mm_init_region): Declare unused variables with
11674 `__attribute__ ((unused))' to silence a gcc warning.
11675 * normal/i386/setjmp.S: Remove tab at the end of the file to
11676 silence a gcc warning.
11677 * loader/i386/pc/linux.c (pupa_rescue_cmd_initrd): Declare unused
11678 variables with `__attribute__ ((unused))' to silence a gcc
11680 * loader/i386/pc/multiboot.c (pupa_multiboot_unload): Make the
11681 local variable i unsigned to silence a gcc warning.
11683 * kern/term.c: Include <pupa/misc.h>.
11684 (pupa_more_lines): New variable.
11685 (pupa_more): Likewise.
11686 (pupa_putcode): When the pager is active pause at the end of every
11688 (pupa_set_more): New function.
11689 * include/pupa/term.h (pupa_set_more): New prototype.
11692 2004-03-07 Yoshinori K. Okuji <okuji@enbug.org>
11694 Now this project is GRUB 2 rather than PUPA. The location of
11695 the CVS repository was moved to GRUB's.
11697 * configure.ac: Use bug-grub as the reporting address.
11698 Use GRUB instead of PUPA.
11699 Change the version number to 1.90.
11701 2004-02-24 Yoshinori K. Okuji <okuji@enbug.org>
11703 * genkernsyms.sh: Updated copyright information.
11704 * genmk.rb: Likewise.
11705 * genmodsrc.sh: Likewise.
11706 * gensymlist.sh: Likewise.
11707 * boot/i386/pc/boot.S: Likewise.
11708 * boot/i386/pc/diskboot.S: Likewise.
11709 * disk/i386/pc/biosdisk.c: Likewise.
11710 * disk/i386/pc/partition.c: Likewise.
11711 * font/manager.c: Likewise.
11712 * fs/ext2.c: Likewise.
11713 * fs/fat.c: Likewise.
11714 * include/pupa/boot.h: Likewise.
11715 * include/pupa/device.h: Likewise.
11716 * include/pupa/disk.h: Likewise.
11717 * include/pupa/dl.h: Likewise.
11718 * include/pupa/elf.h: Likewise.
11719 * include/pupa/err.h: Likewise.
11720 * include/pupa/file.h: Likewise.
11721 * include/pupa/font.h: Likewise.
11722 * include/pupa/fs.h: Likewise.
11723 * include/pupa/kernel.h: Likewise.
11724 * include/pupa/loader.h: Likewise.
11725 * include/pupa/misc.h: Likewise.
11726 * include/pupa/mm.h: Likewise.
11727 * include/pupa/net.h: Likewise.
11728 * include/pupa/normal.h: Likewise.
11729 * include/pupa/rescue.h: Likewise.
11730 * include/pupa/setjmp.h: Likewise.
11731 * include/pupa/symbol.h: Likewise.
11732 * include/pupa/term.h: Likewise.
11733 * include/pupa/types.h: Likewise.
11734 * include/pupa/i386/setjmp.h: Likewise.
11735 * include/pupa/i386/types.h: Likewise.
11736 * include/pupa/i386/pc/biosdisk.h: Likewise.
11737 * include/pupa/i386/pc/boot.h: Likewise.
11738 * include/pupa/i386/pc/console.h: Likewise.
11739 * include/pupa/i386/pc/init.h: Likewise.
11740 * include/pupa/i386/pc/kernel.h: Likewise.
11741 * include/pupa/i386/pc/linux.h: Likewise.
11742 * include/pupa/i386/pc/loader.h: Likewise.
11743 * include/pupa/i386/pc/memory.h: Likewise.
11744 * include/pupa/i386/pc/multiboot.h: Likewise.
11745 * include/pupa/i386/pc/partition.h: Likewise.
11746 * include/pupa/i386/pc/time.h: Likewise.
11747 * include/pupa/i386/pc/vga.h: Likewise.
11748 * include/pupa/i386/pc/util/biosdisk.h: Likewise.
11749 * include/pupa/util/getroot.h: Likewise.
11750 * include/pupa/util/misc.h: Likewise.
11751 * include/pupa/util/resolve.h: Likewise.
11752 * kern/device.c: Likewise.
11753 * kern/disk.c: Likewise.
11754 * kern/dl.c: Likewise.
11755 * kern/err.c: Likewise.
11756 * kern/file.c: Likewise.
11757 * kern/fs.c: Likewise.
11758 * kern/loader.c: Likewise.
11759 * kern/main.c: Likewise.
11760 * kern/misc.c: Likewise.
11761 * kern/mm.c: Likewise.
11762 * kern/rescue.c: Likewise.
11763 * kern/term.c: Likewise.
11764 * kern/i386/dl.c: Likewise.
11765 * kern/i386/pc/init.c: Likewise.
11766 * kern/i386/pc/lzo1x.S: Likewise.
11767 * kern/i386/pc/startup.S: Likewise.
11768 * loader/i386/pc/chainloader.c: Likewise.
11769 * loader/i386/pc/linux.c: Likewise.
11770 * loader/i386/pc/multiboot.c: Likewise.
11771 * normal/cmdline.c: Likewise.
11772 * normal/command.c: Likewise.
11773 * normal/main.c: Likewise.
11774 * normal/menu.c: Likewise.
11775 * normal/i386/setjmp.S: Likewise.
11776 * term/i386/pc/console.c: Likewise.
11777 * term/i386/pc/vga.c: Likewise.
11778 * util/console.c: Likewise.
11779 * util/genmoddep.c: Likewise.
11780 * util/misc.c: Likewise.
11781 * util/pupa-emu.c: Likewise.
11782 * util/resolve.c: Likewise.
11783 * util/unifont2pff.rb: Likewise.
11784 * util/i386/pc/biosdisk.c: Likewise.
11785 * util/i386/pc/getroot.c: Likewise.
11786 * util/i386/pc/pupa-mkimage.c: Likewise.
11787 * util/i386/pc/pupa-setup.c: Likewise.
11789 2004-02-15 Jeroen Dekkers <jeroen@dekkers.cx>
11791 * fs/ext2.c (pupa_ext2_read_file): Correct the value of BLOCKEND
11792 when it is EXT2_BLOCK_SIZE (data). New argument READ_HOOK, all
11793 callers changed. Set DATA->DISK->READ_HOOK to READ_HOOK before
11794 reading and reset it after reading.
11795 (pupa_ext2_close): Return PUPA_ERR_NONE.
11797 * include/pupa/i386/pc/linux.h (PUPA_LINUX_INITRD_MAX_ADDRESS):
11799 (struct linux_kernel_header): Add kernel_version and
11801 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Check whether
11802 pupa_file_read succeeds.
11803 (pupa_rescue_cmd_initrd): Implement.
11805 2003-12-03 Marco Gerards <metgerards@student.han.nl>
11807 * fs/ext2.c (pupa_ext2_label): New function.
11808 (pupa_ext2_fs): Added label.
11809 * fs/fat.c (pupa_fat_label): New function.
11810 (pupa_fat_fs): Added label.
11811 * include/pupa/fs.h (struct pupa_fs): Added prototype label.
11813 * kern/misc.c (pupa_strndup): New function.
11814 * include/pupa/misc.h (pupa_strndup): New prototype.
11816 * include/pupa/normal.h: Include <pupa/err.h>.
11817 (pupa_set_history): New prototype.
11818 (pupa_iterate_commands): New prototype.
11819 * normal/cmdline.c: Include <pupa/machine/partition.h>,
11820 <pupa/disk.h>, <pupa/file.h>.
11821 (hist_size): New variable.
11822 (hist_lines): Likewise.
11823 (hist_end): Likewise.
11824 (hist_used): Likewise.
11825 (pupa_set_history): New function.
11826 (pupa_history_get): Likewise.
11827 (pupa_history_add): Likewise.
11828 (pupa_history_replace): Likewise.
11829 (pupa_tab_complete): Likewise.
11830 (pupa_cmdline_run): Added tab completion and history buffer. Tab
11831 completion shows partitionnames while completing partitions, this
11832 feature was suggested by Jeff Bailey.
11833 * normal/command.c (pupa_iterate_commands): New function.
11834 * normal/main.c (PUPA_DEFAULT_HISTORY_SIZE): New macro.
11835 (pupa_normal_init): Initialize history buffer.
11836 (PUPA_MOD_INIT): Likewise.
11837 (pupa_normal_fini): Free the history buffer.
11838 (PUPA_MOD_FINI): Likewise.
11840 * util/console.c (pupa_ncurses_getkey): Accept 127 as backspace
11843 * aclocal.m4 (pupa_I386_CHECK_REGPARM_BUG): New DEFUN.
11844 * configure.ac [i386]: Check for regparam bug.
11845 (NESTED_FUNC_ATTR) [! i386]: Defined.
11847 2003-11-17 Marco Gerards <metgerards@student.han.nl>
11849 * conf/i386-pc.rmk (sbin_UTILITIES): Added pupa-emu.
11850 (pupa_setup_SOURCES): Added util/i386/pc/getroot.c.
11851 (pupa_emu_SOURCES): New variable.
11852 (pupa_emu_LDFLAGS): Likewise.
11853 * include/pupa/fs.h (pupa_ext2_init) [PUPA_UTIL]: New prototype.
11854 (pupa_ext2_fini) [PUPA_UTIL]: Likewise.
11855 * include/pupa/normal.h (pupa_normal_init) [PUPA_UTIL]: Likewise.
11856 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
11857 * include/pupa/setjmp.h [PUPA_UTIL]: Include <setjmp.h>.
11858 (pupa_jmp_buf): New typedef.
11859 (pupa_setjmp) [PUPA_UTIL]: New macro.
11860 (pupa_longjmp) [PUPA_UTIL]: Likewise.
11861 * include/pupa/term.h (struct pupa_term): New member `refresh'.
11862 (pupa_refresh): New prototype.
11863 * include/pupa/util/getroot.h: New file.
11864 * kern/misc.c (pupa_vsprintf): Refresh the screen after updating
11866 * kern/rescue.c (pupa_rescue_get_command_line): Likewise.
11867 (pupa_rescue_cmd_cat): Likewise.
11868 (pupa_rescue_cmd_ls): Likewise.
11869 (pupa_rescue_cmd_testload): Likewise.
11870 (pupa_rescue_cmd_lsmod): Likewise.
11871 * normal/cmdline.c (pupa_cmdline_get): Likewise.
11872 * normal/menu.c (run_menu): Likewise.
11873 * kern/term.c (pupa_cls): Likewise.
11874 (pupa_refresh): New function.
11875 * normal/normal.c (pupa_normal_init) [PUPA_UTIL]: New function.
11876 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
11877 * util/console.c: New file.
11879 * util/i386/pc/getroot.c: New file.
11880 * util/i386/pc/pupa-setup.c: Include <pupa/util/getroot.h>.
11881 (pupa_putchar): New function.
11882 (pupa_refresh): Likewise.
11883 (xgetcwd): Function moved to ...
11884 (strip_extra_slashes): Likewise.
11885 (get_prefix): Likewise.
11886 * util/i386/pc/getroot.c: ... here.
11887 (find_root_device): Function moved and renamed to...
11888 * util/i386/pc/getroot.c (pupa_find_root_device): ... here.
11889 Changed all callers.
11890 * util/i386/pc/pupa-setup.c (guess_root_device): Function moved
11892 * util/i386/pc/getroot.c (pupa_guess_root_device): ... here.
11893 Changed all callers.
11894 * util/misc.c (pupa_memalign): New function.
11895 (pupa_mm_init_region): Likewise.
11896 (pupa_register_exported_symbols): Likewise.
11897 (pupa_putchar): Function removed.
11898 * util/pupa-emu.c: New file.
11900 2003-11-16 Jeroen Dekkers <jeroen@dekkers.cx>
11902 * conf/i386-pc.rmk (pkgdata_MODULES): Add _multiboot.mod.
11903 (_multiboot_mod_SOURCES): New variable.
11904 (_multiboot_mod_CFLAGS): Likewise.
11905 * loader/i386/pc/multiboot.c: New file.
11906 * include/pupa/i386/pc/multiboot.h: Likewise.
11907 * kern/i386/pc/startup.S: Include pupa/machine/multiboot.h.
11908 (pupa_multiboot_real_boot): New function.
11909 * include/pupa/i386/pc/loader.h: Include pupa/machine/multiboot.h.
11910 (pupa_multiboot_real_boot): New prototype.
11911 (pupa_rescue_cmd_multiboot): Likewise
11912 (pupa_rescue_cmd_module): Likewise.
11914 * kern/loader.c (pupa_loader_set): Continue when
11915 pupa_loader_unload_func() fails.
11916 (pupa_loader_unset): New function.
11917 * include/pupa/loader.h (pupa_loader_unset): New prototype.
11919 * kern/misc.c (pupa_stpcpy): New function.
11920 * include/pupa/misc.h (pupa_stpcpy): New prototype.
11922 2003-11-12 Marco Gerards <metgerards@student.han.nl>
11924 * disk/i386/pc/biosdisk.c (pupa_biosdisk_open): Correctly check
11925 for available extensions.
11927 * include/pupa/i386/pc/time.h: New file.
11928 * kern/disk.c: Include <pupa/machine/time.h>.
11929 (PUPA_CACHE_TIMEOUT): New macro.
11930 (pupa_last_time): New variable.
11931 (pupa_disk_open): Flush the cache when there was a timeout.
11932 (pupa_disk_close): Reset the timer.
11933 * kern/i386/pc/startup.S (pupa_get_rtc): Renamed from
11935 * util/misc.c: Include <sys/times.h>
11936 (pupa_get_rtc): New function.
11938 2003-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
11940 * fs/ext2.c (struct pupa_ext2_inode): Declare struct datablocks
11942 (pupa_ext2_get_file_block): Use blocks member.
11944 * fs/ext2.c (pupa_ext2_read_file): Only set skipfirst for the
11945 first block. Return -1 instead of pupa_errno on error.
11947 2003-10-27 Marco Gerards <metgerards@student.han.nl>
11949 * README: In the pupa-mkimage example use _chain instead of chain
11950 and ext2 instead of fat.
11951 * TODO: Replace ext2fs with jfs as an example. Add an item for
11952 adding journal playback for ext2fs.
11953 * conf/i386-pc.rmk (pupa_setup_SOURCES): Added fs/ext2.c.
11954 (pkgdata_MODULES): Added ext2.mod.
11955 (ext2_mod_SOURCES): New variable.
11956 (ext2_mod_CFLAGS): Likewise.
11957 * include/pupa/err.h (pupa_err_t): Added PUPA_ERR_SYMLINK_LOOP.
11958 * include/pupa/misc.h (pupa_strncpy): New prototype.
11959 (pupa_strcat): Likewise.
11960 (pupa_strncmp): Likewise.
11961 * kern/misc.c (pupa_strcat): Enable function.
11962 (pupa_strncpy): New function.
11963 (pupa_strncmp): Likewise.
11964 * fs/ext2.c: New file.
11966 * kern/disk.c (pupa_disk_read): Set pupa_errno to PUPA_ERR_NONE
11967 when the read failed before retrying.
11968 * util/i386/pc/biosdisk.c (_LARGEFILE_SOURCE): Removed.
11969 (_FILE_OFFSET_BITS): Likewise.
11970 * configure.ac: Added AC_SYS_LARGEFILE.
11972 2003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
11974 * genmk.rb (PModule#rule): Make sure to get only symbol names
11975 from the output of nm.
11976 Reported by Robert Millan <zeratul2@wanadoo.es>.
11978 2003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
11980 I forgot to check in these changes for a long time. This adds
11981 incomplete support for VGA console, and this is still very
11982 buggy. Also, a lot of consideration is required for I18N,
11983 UNICODE, and VGA font issues. Therefore, assume that this is
11984 such that "better than nothing".
11986 * font/manager.c: New file.
11987 * include/pupa/font.h: Likewise.
11988 * include/pupa/i386/pc/vga.h: Likewise.
11989 * term/i386/pc/vga.c: Likewise.
11990 * util/unifont2pff.rb: Likewise.
11992 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vga.h.
11993 (pkgdata_MODULES): Added vga.mod and font.mod.
11994 (vga_mod_SOURCES): New variables.
11995 (vga_mod_CFLAGS): Likewise.
11996 (font_mod_SOURCES): Likewise.
11997 (font_mod_CFLAGS): Likewise.
11999 * include/pupa/err.h (PUPA_ERR_BAD_FONT): New constant.
12001 * include/pupa/term.h: Include pupa/err.h.
12002 (struct pupa_term): Added init and fini.
12003 Changed the argument of putchar to pupa_uint32_t.
12005 * include/pupa/i386/pc/console.h: Include pupa/symbol.h.
12006 (pupa_console_real_putchar): New prototype.
12007 (pupa_console_putchar): Removed.
12008 (pupa_console_checkkey): Exported.
12009 (pupa_console_getkey): Likewise.
12011 * kern/misc.c (pupa_vsprintf): Add support for UNICODE
12014 * kern/term.c (pupa_term_set_current): Rewritten.
12015 (pupa_putchar): Likewise.
12016 (pupa_putcode): New function.
12018 * kern/i386/pc/startup.S (pupa_console_putchar): Renamed to ...
12019 (pupa_console_real_putchar): ... this.
12020 (pupa_vga_set_mode): New function.
12021 (pupa_vga_get_font): Likewise.
12023 * normal/command.c: Include pupa/term.h.
12024 (terminal_command): New function.
12025 (pupa_command_init): Register the command "terminal".
12027 * normal/menu.c (DISP_LEFT): Changed to a UNICODE value.
12028 (DISP_UP): Likewise.
12029 (DISP_RIGHT): Likewise.
12030 (DISP_DOWN): Likewise.
12031 (DISP_HLINE): Likewise.
12032 (DISP_VLINE): Likewise.
12033 (DISP_UL): Likewise.
12034 (DISP_UR): Likewise.
12035 (DISP_LL): Likewise.
12036 (DISP_LR): Likewise.
12038 * term/i386/pc/console.c (pupa_console_putchar): New function.
12040 2003-02-08 NIIBE Yutaka <gniibe@m17n.org>
12042 * util/resolve.c (pupa_util_resolve_dependencies): BUG
12043 FIX. Reverse the path_list.
12045 * include/pupa/normal.h: Export pupa_register_command and
12046 pupa_unregister_command.
12048 * hello/hello.c (pupa_cmd_hello): New module.
12049 * conf/i386-pc.rmk: Added hello.mod.
12051 2003-01-31 Yoshinori K. Okuji <okuji@enbug.org>
12053 * kern/i386/pc/lzo1x.S: New file.
12055 * util/i386/pc/pupa-mkimage.c: Include lzo1x.h.
12056 (compress_kernel): New variable.
12057 (generate_image): Heavily modified to support compressing a
12058 large part of the core image.
12060 * util/misc.c (pupa_util_read_image): Fix a file descriptor
12062 (pupa_util_load_image): New function.
12064 * kern/i386/pc/startup.S: Include pupa/machine/kernel.h.
12065 (pupa_compressed_size): New variable.
12066 (codestart): Enable Gate A20 here.
12067 Decompress the compressed part of the core image.
12068 Rearrange the code to put functions and variables which are
12069 required for initialization in the non-compressed part.
12072 * kern/i386/pc/init.c (pupa_machine_init): Don't enable Gate A20
12075 * include/pupa/util/misc.h (pupa_util_write_image): Declared.
12077 * include/pupa/i386/pc/kernel.h
12078 (PUPA_KERNEL_MACHINE_COMPRESSED_SIZE): New macro.
12079 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): Increased by 4.
12080 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
12081 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
12082 (PUPA_KERNEL_MACHINE_RAW_SIZE): New macro.
12084 * conf/i386-pc.rmk (pupa_mkimage_LDFLAGS): New variable.
12086 * genmk.rb (Image#rule): Put LDFLAGS at the end of a line.
12087 (Utility#rule): Likewise.
12089 * configure.ac: Check if LZO is available.
12091 2003-01-20 Yoshinori K. Okuji <okuji@enbug.org>
12093 * include/pupa/normal.h: New file.
12094 * include/pupa/setjmp.h: Likewise.
12095 * include/pupa/i386/setjmp.h: Likewise.
12096 * normal/cmdline.c: Likewise.
12097 * normal/command.c: Likewise.
12098 * normal/main.c: Likewise.
12099 * normal/menu.c: Likewise.
12100 * normal/i386/setjmp.S: Likewise.
12102 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Made global.
12103 (pupa_rescue_cmd_initrd): Likewise.
12105 * loader/i386/pc/chainloader.c (pupa_rescue_cmd_chainloader):
12108 * kern/i386/pc/startup.S (translation_table): New variable.
12109 (translate_keycode): New function.
12110 (pupa_console_getkey): Call translate_keycode.
12112 * kern/rescue.c (attempt_normal_mode): New function.
12113 (pupa_enter_rescue_mode): Attempt to execute the normal mode. If
12114 it failed, print a message.
12116 * kern/mm.c (pupa_real_malloc): Print more information when a
12117 free magic is broken.
12118 (pupa_free): If the first free header is not free actually, set
12121 * kern/main.c (pupa_load_normal_mode): Just load the module
12123 (pupa_main): Don't print the message
12124 "Entering into rescue mode..." here.
12126 * include/pupa/i386/pc/loader.h (pupa_rescue_cmd_initrd):
12128 (pupa_rescue_cmd_initrd): Likewise.
12129 (pupa_rescue_cmd_initrd): Likewise.
12131 * include/pupa/symbol.h (FUNCTION): Specify the type.
12132 (VARIABLE): Likewise.
12134 * include/pupa/err.h (pupa_err_t): Added
12135 PUPA_ERR_UNKNOWN_COMMAND.
12137 * include/pupa/dl.h (pupa_dl_set_prefix): Exported.
12138 (pupa_dl_get_prefix): Likewise.
12140 * conf/i386-pc.rmk (pkgdata_MODULES): Added normal.mod.
12141 Added _chain.mod and _linux.mod instead of chain.mod and
12143 (chain_mod_SOURCES): Renamed to ...
12144 (_chain_mod_SOURCES): ... this.
12145 (chain_mod_CFLAGS): Renamed to ...
12146 (_chain_mod_CFLAGS): ... this.
12147 (linux_mod_SOURCES): Renamed to ...
12148 (_linux_mod_SOURCES): ... this.
12149 (linux_mod_CFLAGS): Renamed to ...
12150 (_linux_mod_CFLAGS): ... this.
12151 (normal_mod_SOURCES): New variable.
12152 (normal_mod_CFLAGS): Likewise.
12153 (normal_mod_ASFLAGS): Likewise.
12155 2003-01-18 Yoshinori K. Okuji <okuji@enbug.org>
12157 * kern/rescue.c (pupa_rescue_cmd_rmmod): Call pupa_dl_unload, if
12160 * kern/dl.c (pupa_dl_ref): Refer depending modules
12162 (pupa_dl_unref): Unrefer depending modules recursively.
12163 Don't call pupa_dl_unload implicitly, because PUPA can crash if
12164 a module is unloaded before one depending on that module is
12166 (pupa_dl_unload): Unload depending modules explicitly,
12169 2003-01-17 Yoshinori K. Okuji <okuji@enbug.org>
12171 * include/pupa/i386/pc/linux.h: New file.
12172 * loader/i386/pc/linux.c: Likewise.
12174 * loader/i386/pc/chainloader.c (pupa_chainloader_boot_sector):
12176 (pupa_chainloader_unload): Return PUPA_ERR_NONE.
12177 (pupa_rescue_cmd_chainloader): Read the image to 0x7C00 instead
12178 of PUPA_CHAINLOADER_BOOT_SECTOR.
12180 * kern/i386/pc/startup.S: Include pupa/machine/linux.h.
12181 (pupa_linux_prot_size): New variable.
12182 (pupa_linux_tmp_addr): Likewise.
12183 (pupa_linux_real_addr): Likewise.
12184 (pupa_linux_boot_zimage): New function.
12185 (pupa_linux_boot_bzimage): Likewise.
12187 * kern/i386/pc/init.c (struct mem_region): New structure.
12188 (MAX_REGIONS): New macro.
12189 (mem_regions): New variable.
12190 (num_regions): Likewise.
12191 (pupa_os_area_addr): Likewise.
12192 (pupa_os_area_size): Likewise.
12193 (pupa_lower_mem): Likewise.
12194 (pupa_upper_mem): Likewise.
12195 (add_mem_region): New function.
12196 (compact_mem_regions): Likewise.
12197 (pupa_machine_init): Set PUPA_LOWER_MEM and PUPA_UPPER_MEM to
12198 the size of the conventional memory and that of so-called upper
12199 memory (before the first memory hole).
12200 Instead of adding each found region to free memory, use
12201 add_mem_region and add them after removing overlaps.
12202 Also, add only 1/4 of the upper memory to free memory. The rest
12203 is used for loading OS images. Maybe this is ad hoc, but this
12204 makes it much easier to relocate OS images when booting.
12206 * kern/rescue.c (pupa_rescue_cmd_module): Removed.
12207 (pupa_enter_rescue_mode): Don't register initrd and module.
12209 * kern/mm.c: Include pupa/dl.h.
12211 * kern/main.c: Include pupa/file.h and pupa/device.h.
12213 * kern/loader.c (pupa_loader_load_module_func): Removed.
12214 (pupa_loader_load_module): Likewise.
12216 * kern/dl.c (pupa_dl_load): Use the suffix ``.mod'' instead of
12219 * include/pupa/i386/pc/loader.h (pupa_linux_prot_size): Declared.
12220 (pupa_linux_tmp_addr): Likewise.
12221 (pupa_linux_real_addr): Likewise.
12222 (pupa_linux_boot_zimage): Likewise.
12223 (pupa_linux_boot_bzimage): Likewise.
12225 * include/pupa/i386/pc/init.h (pupa_lower_mem): Declared.
12226 (pupa_upper_mem): Likewise.
12227 (pupa_gate_a20): Don't export, because turning off Gate A20 in a
12228 module is too dangerous.
12230 * include/pupa/loader.h (pupa_os_area_addr): Declared.
12231 (pupa_os_area_size): Likewise.
12232 (pupa_loader_set): Remove the first argument. Loader doesn't
12233 manage modules or initrd any longer.
12234 (pupa_loader_load_module): Removed.
12236 * conf/i386-pc.rmk (pkgdata_MODULES): Added linux.mod.
12237 (linux_mod_SOURCES): New variable.
12238 (linux_mod_CFLAGS): Likewise.
12240 2003-01-07 Yoshinori K. Okuji <okuji@enbug.org>
12242 * util/i386/pc/pupa-setup.c (setup): Convert the endianness of
12243 the length of a blocklist correctly.
12245 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open) [__linux__]:
12246 Use ioctl only if the OS file is a block device.
12247 (pupa_util_biosdisk_open): Don't use ST.ST_BLOCKS, because it is
12248 not very useful for normal files.
12250 * kern/main.c (pupa_set_root_dev): New function.
12251 (pupa_load_normal_mode): Likewise.
12252 (pupa_main): Call those above.
12254 * include/pupa/types.h (pupa_swap_bytes16): Cast the result to
12257 * include/pupa/kernel.h (pupa_enter_normal_mode): Removed.
12259 2003-01-06 Yoshinori K. Okuji <okuji@enbug.org>
12261 * util/i386/pc/pupa-setup.c: Include pupa/machine/kernel.h.
12262 (setup): Configure the installed partition information and the
12265 * loader/i386/pc/chainloader.c (my_mod): New variable.
12266 (pupa_chainloader_unload): New function.
12267 (pupa_rescue_cmd_chainloader): Refer itself.
12268 (PUPA_MOD_INIT): Save its own module in MY_MOD.
12270 * kern/i386/pc/startup.S (install_partition): Removed.
12271 (version_string): Likewise.
12272 (config_file): Likewise.
12273 (pupa_install_dos_part): New variable.
12274 (pupa_install_bsd_part): Likewise.
12275 (pupa_prefix): Likewise.
12276 (pupa_chainloader_real_boot): Call pupa_dl_unload_all.
12278 * kern/i386/pc/init.c: Include pupa/machine/kernel.h, pupa/dl.h
12280 (make_install_device): New function.
12281 (pupa_machine_init): Set the dl prefix.
12283 * kern/rescue.c: Include pupa/rescue.h and pupa/dl.h.
12284 (buf): Renamed to ...
12285 (linebuf): ... this.
12286 (pupa_rescue_cmd_prefix): New function.
12287 (pupa_rescue_cmd_insmod): Likewise.
12288 (pupa_rescue_cmd_rmmod): Likewise.
12289 (pupa_rescue_cmd_lsmod): Likewise.
12290 (pupa_enter_rescue_mode): Register new commands: prefix, insmod,
12293 * kern/mm.c (pupa_memalign): If failed even after invalidating
12294 disk caches, unload unneeded modules and retry.
12296 * kern/misc.c (pupa_memmove): New function.
12297 (pupa_memcpy): Removed.
12298 (pupa_strcpy): New function.
12299 (pupa_itoa): Made static.
12301 * kern/dl.c (pupa_dl_iterate): New function.
12302 (pupa_dl_ref): Likewise.
12303 (pupa_dl_unref): Likewise.
12304 (pupa_dl_unload): Return if succeeded or not.
12305 (pupa_dl_unload_unneeded): New function.
12306 (pupa_dl_unload_all): Likewise.
12307 (pupa_dl_init): Renamed to ...
12308 (pupa_dl_set_prefix): ... this.
12309 (pupa_dl_get_prefix): New function.
12311 * include/pupa/i386/pc/kernel.h: Include pupa/types.h.
12312 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): New macro.
12313 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
12314 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
12315 (pupa_install_dos_part): Declared.
12316 (pupa_install_bsd_part): Likewise.
12317 (pupa_prefix): Likewise.
12318 (pupa_boot_drive): Likewise.
12320 * include/pupa/types.h: Fix a typo.
12322 * include/pupa/misc.h (pupa_memcpy): New macro. Just an alias to
12324 (pupa_memmove): Declared.
12325 (pupa_strcpy): Likewise.
12327 * include/pupa/dl.h (PUPA_MOD_INIT): Change the prototype. Now
12328 pupa_mod_init takes one argument, its own module.
12329 (pupa_dl_unload_unneeded): Declared.
12330 (pupa_dl_unload_all): Likewise.
12331 (pupa_dl_ref): Likewise.
12332 (pupa_dl_unref): Likewise.
12333 (pupa_dl_iterate): Likewise.
12334 (pupa_dl_init): Renamed to ...
12335 (pupa_dl_set_prefix): ... this.
12336 (pupa_dl_get_prefix): Declared.
12338 * fs/fat.c [!PUPA_UTIL] (my_mod): New variable.
12339 (pupa_fat_dir) [!PUPA_UTIL]: Prevent the fat module from being
12341 (pupa_fat_open) [!PUPA_UTIL]: Refer itself if succeeded.
12342 (pupa_fat_close) [!PUPA_UTIL]: Unrefer itself.
12344 * configure.ac (tmp_CFLAGS): Added -Wshadow, -Wpointer-arith,
12345 -Wmissing-prototypes, -Wundef and -Wstrict-prototypes.
12347 2003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
12349 * util/i386/pc/pupa-setup.c (setup): Define the internal
12350 function find_first_partition_start at the top level, because GCC
12351 3.0.x cannot compile internal functions in deeper scopes
12353 (find_root_device): Use lstat instead of stat.
12354 Don't follow symbolic links.
12355 Fix the path-constructing code.
12357 * util/i386/pc/biosdisk.c [__linux__] (BLKFLSBUF): New macro.
12358 (pupa_util_biosdisk_open) [__linux__]: Get the size of a device
12359 by a BLKGETSIZE ioctl first, because block devices don't fill
12360 the member st_mode of the structure stat on Linux.
12361 [__linux__] (linux_find_partition): Use a temporary buffer
12362 REAL_DEV for the working space. Copy it to DEV before returning.
12363 (open_device) [__linux__]: Call ioctl with BLKFLSBUF to make the
12364 buffer cache consistent.
12365 (get_os_disk) [__linux__]: Use the length 5 instead of 4 for
12366 strncmp. The previous value was merely wrong.
12367 (pupa_util_biosdisk_get_pupa_dev): Use stat instead of lstat.
12369 * fs/fat.c (pupa_fat_read_data): Shift 4 instead of 12 when the
12370 FAT size is 12. The previous value was merely wrong.
12372 * kern/main.c (pupa_main): Don't split the starting message from
12375 * kern/term.c (pupa_putchar): Put CR after LF instead of before
12376 LF, because BIOS goes crazy about character attributes in this
12379 2003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
12381 * include/i386/pc/util/biosdisk.h: New file.
12382 * util/i386/pc/biosdisk.c: Likewise.
12383 * util/i386/pc/pupa-setup.c: Likewise.
12385 * Makefile.in (INCLUDE_DISTFILES): Added
12386 include/pupa/i386/pc/util/biosdisk.h.
12387 (UTIL_DISTFILES): Added biosdisk.c and pupa-setup.c under the
12388 directory util/i386/pc.
12389 (install-local): Added a rule for sbin_UTILITIES.
12390 (uninstall): Likewise.
12392 * util/i386/pc/pupa-mkimage.c (usage): Fix a typo in the doc.
12394 * util/misc.c (xrealloc): New function.
12395 (pupa_malloc): Likewise.
12396 (pupa_free): Likewise.
12397 (pupa_realloc): Likewise.
12398 (pupa_stop): Likewise.
12399 (pupa_putchar): Likewise.
12401 * kern/disk.c (pupa_disk_read): Prevent L from underflowing.
12403 * include/pupa/util/misc.h (xrealloc): Declared.
12405 * include/pupa/i386/pc/boot.h (PUPA_BOOT_MACHINE_BPB_START): New
12407 (PUPA_BOOT_MACHINE_BPBEND): Renamed to ...
12408 (PUPA_BOOT_MACHINE_BPB_END): ... this.
12410 * include/pupa/fs.h [PUPA_UTIL] (pupa_fat_init): Declared.
12411 [PUPA_UTIL] (pupa_fat_fini): Likewise.
12413 * fs/fat.c [PUPA_UTIL] (pupa_fat_init): Defined. Maybe a better
12414 way should be implemented.
12415 [PUPA_UTIL] (pupa_fat_fini): Likewise.
12417 * disk/i386/pc/biosdisk.c (pupa_biosdisk_call_hook): Increase
12418 the size of NAME for safety.
12419 (pupa_biosdisk_iterate): Search hard disks to 0x90 instead of
12422 * conf/i386-pc.rmk (sbin_UTILITIES): New variable.
12423 (pupa_setup_SOURCES): Likewise.
12425 * genmk.rb (Utility#rule): Add $(BUILD_CFLAGS) into the rules.
12427 2002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
12429 * kern/i386/pc/startup.S (push_get_mmap_entry): Revert to a
12430 bunch of pushl's from pusha, because this destroys the return
12433 2002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
12435 Use -mrtd and -mregparm=3 to reduce the generated code sizes.
12436 This means that any missing prototypes could be fatal. Also, you
12437 must take care when writing assembly code. See the comments at
12438 the beginning of startup.S, for more details.
12440 * kern/i386/pc/startup.S (pupa_halt): Modified for the new
12441 compilation mechanism.
12442 (pupa_chainloader_real_boot): Likewise.
12443 (pupa_biosdisk_rw_int13_extensions): Likewise.
12444 (pupa_biosdisk_rw_standard): Likewise.
12445 (pupa_biosdisk_check_int13_extensions): Likewise.
12446 (pupa_biosdisk_get_diskinfo_int13_extensions): Likewise.
12447 (pupa_biosdisk_get_diskinfo_standard): Likewise.
12448 (pupa_get_memsize): Likewise.
12449 (pupa_get_mmap_entry): Likewise.
12450 (pupa_console_putchar): Likewise.
12451 (pupa_console_setcursor): Likewise.
12452 (pupa_getrtsecs): Use pushl instead of push.
12454 * kern/i386/pc/init.c (pupa_machine_init): Use the scratch
12455 memory instead of the stack for a mmap entry, because some
12456 BIOSes may ignore the maximum size and overflow.
12458 * conf/i386-pc.rmk (COMMON_CFLAGS): Added -mrtd and -mregparm=3.
12460 * genmk.rb (PModule#rule): Compile automatically generated
12461 sources with module-specific CFLAGS as well as other sources.
12463 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
12465 * configure.ac: Check ld.
12466 Replace CFLAGS and CPPFLAGS with BUILD_CFLAGS and BUILD_CPPFLAGS
12467 respectively, before checking endianness and sizes.
12469 * Makefile.in (LD): New variable.
12471 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
12473 * Makefile.in (BUILD_CC): CC -> BUILD_CC.
12475 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
12477 * Changelog: New file.