Migrate .cvsignore to svn:ignore property
[grub2/phcoder/solaris.git] / ChangeLog
blob4a4ccf01fc261b24b81f550071a292fee9fa060f
1 2008-08-07  Bean  <bean123ch@gmail.com>
3         * conf/i386-efi.rmk (kernel_mod_SOURCES): Add kern/time.c.
5         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add kern/time.c,
7         * include/grub/i386/pit.h: Use macro KERNEL_CPU_PIT_HEADER to avoid
8         multiple inclusion. Add #include <grub/types.h>.
10 2008-08-06  Christian Franke  <franke@computer.org>
12         * conf/common.rmk: Build and install `10_windows'.
13         * util/grub.d/10_windows.in: New script.
15 2008-08-06  Pavel Roskin  <proski@gnu.org>
17         * kern/i386/pit.c: Include `<grub/i386/pit.h>'.
19 2008-08-06  Robert Millan  <rmh@aybabtu.com>
21         * conf/i386-coreboot.rmk (kernel_elf_ASFLAGS): New variable.
22         * kern/i386/tsc.c: Include `<grub/i386/pit.h>'.
24 2008-08-06  Bean  <bean123ch@gmail.com>
26         * fs/i386/pc/pxe.c (grub_pxe_data): New member block_size.
27         (grub_pxefs_fs_int): Remove dummy definition.
28         (grub_pxefs_open): Use data->block_size to store the current block
29         size setting.
30         (grub_pxefs_read): Use block size stored in data->block_size. As the
31         value of grub_pxe_blksize can be changed after the file is opened.
33 2008-08-06  Bean  <bean123ch@gmail.com>
35         * fs/i386/pc/pxe.c (curr_file): new variable.
36         (grub_pxefs_open): Simply the handling of pxe file system. Don't
37         require the dummy internal file system anymore.
38         (grub_pxefs_read): Removed.
39         (grub_pxefs_close): Likewise.
40         (grub_pxefs_fs_int): Likewise.
41         (grub_pxefs_read_int): Renamed to grub_pxefs_read. Reinitialize tftp
42         connection when we switch file.
43         (grub_pxefs_close_int): Renamed to grub_pxefs_close.
45 2008-08-06  Robert Millan  <rmh@aybabtu.com>
47         * conf/i386-coreboot.rmk (pkglib_MODULES): Add `reboot.mod' and
48         `halt.mod'.
49         (reboot_mod_SOURCES, reboot_mod_CFLAGS, reboot_mod_LDFLAGS)
50         (halt_mod_SOURCES, halt_mod_CFLAGS, halt_mod_LDFLAGS): New variables.
52         * kern/i386/halt.c: New file.
53         * kern/i386/reboot.c: Likewise.
54         * include/grub/i386/reboot.h: Likewise.
55         * include/grub/i386/halt.h: Likewise.
57         * commands/halt.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]:
58         Include `<grub/cpu/halt.h>'.
59         * commands/reboot.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]
60         [! GRUB_MACHINE_PCBIOS]: Include `<grub/cpu/reboot.h>'.
62         * term/i386/pc/at_keyboard.c: Include `<grub/cpu/at_keyboard.h>'.
63         (SHIFT_L, SHIFT_R, CTRL, ALT, CAPS_LOCK, KEYBOARD_REG_DATA)
64         (KEYBOARD_REG_STATUS, KEYBOARD_COMMAND_ISREADY, KEYBOARD_COMMAND_READ)
65         (KEYBOARD_COMMAND_WRITE, KEYBOARD_COMMAND_REBOOT)
66         (KEYBOARD_SCANCODE_SET1, KEYBOARD_ISMAKE, KEYBOARD_ISREADY)
67         (KEYBOARD_SCANCODE, OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): Move
68         from here ...
69         * include/grub/i386/at_keyboard.h: ... to here.
71 2008-08-05  Robert Millan  <rmh@aybabtu.com>
73         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pit.c'.
74         * conf/i386-efi.rmk (kernel_mod_SOURCES): Likewise.
75         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Likewise. Also add
76         `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
77         `kern/generic/millisleep.c'.
79         * kern/i386/tsc.c (calibrate_tsc): Rewrite using grub_pit_wait()
80         instead of grub_get_rtc().
81         (grub_tsc_init): Initialize `tsc_boot_time'.
83         * kern/i386/linuxbios/init.c (grub_millisleep): Remove stub.
84         (grub_machine_init): Use grub_tsc_init() rather than
85         installing an RTC-based handler via grub_install_get_time_ms().
87         * kern/i386/pit.c: New file.
88         * include/grub/i386/pit.h: Likewise.
90 2008-08-05  Bean  <bean123ch@gmail.com>
92         * boot/i386/pc/pxeboot.S (_start): Use drive number 0x7F for pxe.
94         * conf/i386-pc.rmk (kernel_img_HEADERS): Add machine/pxe.h.
95         (pkglib_MODULES): Add pxe.mod and pxecmd.mod.
96         (pxe_mod_SOURCES): New macro.
97         (pxe_mod_CFLAGS): Likewise.
98         (pxe_mod_LDFLAGS): Likewise.
99         (pxecmd_mod_SOURCES): Likewise.
100         (pxecmd_mod_CFLAGS): Likewise.
101         (pxecmd_mod_LDFLAGS): Likewise.
103         * kern/i386/pc/startup.S (grub_pxe_scan): New function.
104         (grub_pxe_call): Likewise.
106         * include/grub/disk.h (grub_disk_dev_id): Add GRUB_DISK_DEVICE_PXE_ID.
108         * commands/i386/pc/pxecmd.c: New file.
110         * fs/i386/pc/pxe.c: Likewise.
112         * include/grub/i386/pc/pxe.h: Likewise.
114 2008-08-05  Bean  <bean123ch@gmail.com>
116         * util/console.c (grub_console_cur_color): New variable.
117         (grub_console_standard_color): Likewise.
118         (grub_console_normal_color): Likewise.
119         (grub_console_highlight_color): Likewise.
120         (color_map): Likewise.
121         (use_color): Likewise.
122         (NUM_COLORS): New macro.
123         (grub_ncurses_setcolorstate): Handle color properly.
124         (grub_ncurses_setcolor): Don't change color here, just remember the
125         settings, color will be set in grub_ncurses_setcolorstate.
126         (grub_ncurses_getcolor): New function.
127         (grub_ncurses_init): Initialize color pairs.
128         (grub_ncurses_term): New member grub_ncurses_getcolor.
130 2008-08-05  Colin D Bennett  <colin@gibibit.com>
132         High resolution timer support.  Implemented for x86 CPUs using TSC.
133         Extracted generic grub_millisleep() so it's linked in only as needed.
134         This requires a Pentium compatible CPU; if the RDTSC instruction is
135         not supported, then it falls back on the generic grub_get_time_ms()
136         implementation that uses the machine's RTC.
138         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/time.c',
139         `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
140         `kern/generic/millisleep.c'.
142         * conf/i386-efi.rmk (kernel_mod_SOURCES): Add `kern/i386/tsc.c',
143         `kern/generic/rtc_get_time_ms.c' and `kern/generic/millisleep.c'.
145         * conf/x86_64-efi.rml (kernel_mod_SOURCES): Add
146         `kern/generic/millisleep.c' and `kern/generic/rtc_get_time_ms.c'.
148         * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
150         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
151         `kern/generic/millisleep.c'.
153         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
155         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Add `kern/time.c'.
157         * kern/generic/rtc_get_time_ms.c: New file.
159         * kern/generic/millisleep.c: New file.
161         * kern/misc.c: Don't include
162         <kern/time.h> anymore.
163         (grub_millisleep_generic): Removed.
165         * commands/sleep.c (grub_interruptible_millisleep): Uses
166         grub_get_time_ms() instead of grub_get_rtc().
168         * include/grub/i386/tsc.h (grub_get_tsc): New file.  New inline
169         function.
170         (grub_cpu_is_cpuid_supported): New inline function.
171         (grub_cpu_is_tsc_supported): New inline function.
172         (grub_tsc_init): New function prototype.
173         (grub_tsc_get_time_ms): New function prototype.
175         * kern/i386/tsc.c (grub_get_time_ms): New file.
177         * include/grub/time.h: Include <grub/types.h.
178         (grub_millisleep_generic): Removed.
179         (grub_get_time_ms): New prototype.
180         (grub_install_get_time_ms): New prototype.
181         (grub_rtc_get_time_ms): New prototype.
183         * kern/time.c (grub_get_time_ms): New function.
184         (grub_install_get_time_ms): New function.
186         * kern/i386/efi/init.c: Include <grub/cpu/tsc.h>.  Don't include
187         <grub/time.h> anymore.
188         (grub_millisleep): Removed.
189         (grub_machine_init): Call grub_tsc_init.
191         * kern/i386/linuxbios/init.c (grub_machine_init): Install the RTC
192         get_time_ms() implementation.
194         * kern/sparc64/ieee1275/init.c (grub_millisleep): Removed.
195         (ieee1275_get_time_ms): New function.
196         (grub_machine_init): Install get_time_ms() implementation.
198         * kern/i386/pc/init.c: Include <grub/cpu/tsc.h>.
199         (grub_machine_init): Call grub_tsc_init().
200         (grub_millisleep): Removed.
202         * kern/ieee1275/init.c (grub_millisleep): Removed.
203         (grub_machine_init): Install ieee1275_get_time_ms()
204         implementation.
205         (ieee1275_get_time_ms): New function.
206         (grub_get_rtc): Now calls ieee1275_get_time_ms(), which does the
207         real work.
209 2008-08-05  Marco Gerards  <marco@gnu.org>
211         * disk/ata.c: Include <grub/pci.h>.
212         (enum grub_ata_commands): Add `GRUB_ATA_CMD_EXEC_DEV_DIAGNOSTICS'.
213         (grub_ata_initialize): Rewritten.
214         (grub_ata_device_initialize): New function.
216 2008-08-04  Pavel Roskin  <proski@gnu.org>
218         * kern/main.c: Include grub/mm.h.
220 2008-08-04  Robert Millan  <rmh@aybabtu.com>
222         * conf/i386-coreboot.rmk (COMMON_ASFLAGS, COMMON_CFLAGS)
223         (COMMON_LDFLAGS): Harmonize with i386-pc version (fixes a code
224         corruption problem).
226 2008-08-04  Robert Millan  <rmh@aybabtu.com>
228         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Fix misc
229         warnings introduced in my last commit.
231 2008-08-03  Robert Millan  <rmh@aybabtu.com>
233         Make PCI available on all i386 architectures.
235         * include/grub/i386/pc/pci.h: Move from here ...
236         * include/grub/i386/pci.h: ... to here.
238         * include/grub/i386/pc/pci.h: Remove.
239         * include/grub/i386/efi/pci.h: Remove.
240         * include/grub/x86_64/efi/pci.h: Remove.
242         * include/grub/pci.h: Replace `<grub/machine/pci.h>' with
243         `<grub/cpu/pci.h>'.
245         * conf/i386-coreboot.rmk (pkglib_MODULES): Add `pci' and `lspci'.
246         (pci_mod_SOURCES, pci_mod_CFLAGS, pci_mod_LDFLAGS, lspci_mod_SOURCES)
247         (lspci_mod_CFLAGS, lspci_mod_LDFLAGS): New variables.
249         * conf/i386-ieee1275.rmk: Likewise.
251 2008-08-03  Robert Millan  <rmh@aybabtu.com>
253         * term/i386/pc/vga_text.c (CRTC_CURSOR_DISABLE): New macro.
254         (grub_console_setcursor): Make it possible to set cursor off.
256 2008-08-03  Robert Millan  <rmh@aybabtu.com>
258         * util/grub.d/00_header.in: Be platform-agnostic.  Probe for existence
259         of modules instead of assuming which platform provides what.
260         * util/update-grub.in: Likewise.
262 2008-08-03  Robert Millan  <rmh@aybabtu.com>
264         * kern/i386/pc/init.c (make_install_device): Check for `grub_prefix'
265         instead of `grub_install_dos_part' to determine whether a drive needs
266         to be prepended to prefix (`grub_install_dos_part' is not reliable,
267         because it can be overridden when loading GRUB via Multiboot).
269 2008-08-02  Robert Millan  <rmh@aybabtu.com>
271         * util/i386/pc/grub-install.in: Remove trailing slash from prefix.
273 2008-08-02  Robert Millan  <rmh@aybabtu.com>
275         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Add a pair
276         of informational grub_dprintf() calls.
278 2008-08-02  Robert Millan  <rmh@aybabtu.com>
280         * disk/memdisk.c (memdisk_size): Don't initialize.
281         (GRUB_MOD_INIT(memdisk)): Find memdisk using grub_module_iterate().
283         * include/grub/i386/pc/kernel.h
284         (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): Remove macro.
285         (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Shift.
286         (grub_memdisk_image_size, grub_arch_memdisk_addr)
287         (grub_arch_memdisk_size): Remove.
289         * include/grub/kernel.h (struct grub_module_header): Remove `offset'
290         field (was only used to transfer a constant).  Add `type' field to
291         support multiple module types.
292         (grub_module_iterate): New function.
294         * kern/device.c (grub_device_open): Do not hide error messages
295         when grub_disk_open() fails.  Use grub_print_error() instead.
297         * kern/i386/pc/init.c (grub_arch_modules_addr)
298         (grub_arch_memdisk_size): Remove functions.
299         (grub_arch_modules_addr): Return the module address in high memory
300         (now that it isn't copied anymore).
302         * kern/i386/pc/startup.S (grub_memdisk_image_size): Remove variable.
303         (codestart): Don't add grub_memdisk_image_size to %ecx in LZMA
304         decompression routine (grub_total_module_size already includes that
305         now).  Don't copy modules back to low memory.
307         * kern/main.c: Include `<grub/mm.h>'.
308         (grub_load_modules): Split out (and use) ...
309         (grub_module_iterate): ... this function, which iterates through
310         module objects and runs a hook.
311         Comment out grub_mm_init_region() call, as it would cause non-ELF
312         modules to be overwritten.
314         * util/i386/pc/grub-mkimage.c (generate_image): Instead of appending
315         the memdisk image in its own region, make it part of the module list.
316         * util/elf/grub-mkimage.c (options): Add "memdisk"|'m' option.
317         (main): Parse --memdisk|-m option, and pass user-provided path as
318         parameter to generate_image().
319         (add_segments): Pass `memdisk_path' down to load_modules().
320         (load_modules): Embed memdisk image in module section when requested.
321         * util/i386/efi/grub-mkimage.c (make_mods_section): Initialize
322         `header.type' instead of `header.offset'.
324         * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add `memdisk.mod'.
325         (memdisk_mod_SOURCES, memdisk_mod_CFLAGS)
326         (memdisk_mod_LDFLAGS): New variables.
327         * conf/i386-coreboot.rmk: Likewise.
328         * conf/i386-ieee1275.rmk: Likewise.
330 2008-08-02  Robert Millan  <rmh@aybabtu.com>
332         * loader/i386/pc/multiboot.c (playground, forward_relocator)
333         (backward_relocator): New variables.  Used to allocate and relocate
334         the payload, respectively.
335         (grub_multiboot_load_elf32): Load into heap instead of requested
336         address, install the appropriate relocator code in each bound of
337         the payload, and set the entry point such that
338         grub_multiboot_real_boot() will jump to one of them.
340         * kern/i386/loader.S (grub_multiboot_payload_size)
341         (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
342         (grub_multiboot_payload_entry_offset): New variables.
343         (grub_multiboot_real_boot): Set cpu context to what the relocator
344         expects, and jump to the relocator instead of the payload.
346         * include/grub/i386/loader.h (grub_multiboot_payload_size)
347         (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
348         (grub_multiboot_payload_entry_offset): Export.
350 2008-08-01  Bean  <bean123ch@gmail.com>
352         * normal/menu_entry.c (editor_getline): Don't return the original
353         string as result, as it will be released by lexer once it has done
354         using it.
356 2008-08-01  Robert Millan  <rmh@aybabtu.com>
358         * util/grub.d/10_linux.in: Use prepare_grub_to_access_device() from
359         within menuentries, not before them.
360         util/grub.d/10_hurd.in: Likewise.
362 2008-08-01  Bean  <bean123ch@gmail.com>
364         * conf/common.rmk (pkglib_MODULES): Add bufio.mod.
365         (bufio_mod_SOURCES): New macro.
366         (bufio_mod_CFLAGS): Likewise.
367         (bufio_mod_LDFLAGS): Likewise.
369         * include/grub/bufio.h: New file.
371         * io/bufio.c: Likewise.
373         * video/png.c: Replace <grub/file.h> with <grub/bufio.h>.
374         (grub_video_reader_png): Use grub_buffile_open to open file.
376         * video/jpeg.c: Replace <grub/file.h> with <grub/bufio.h>.
377         (grub_video_reader_jpeg): Use grub_buffile_open to open file.
379         * video/tga.c: Replace <grub/file.h> with <grub/bufio.h>.
380         (grub_video_reader_tga): Use grub_buffile_open to open file.
382         * font/manager.c: Include <grub/bufio.h>.
383         (add_font): Use grub_buffile_open to open file.
385 2008-07-31  Robert Millan  <rmh@aybabtu.com>
387         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): When loading
388         ELF segments, use a macro for arbitrarily accessing any of them instead
389         of preparing a pointer that allows access to one at a time.
390         (grub_multiboot_load_elf64): Likewise.
392 2008-07-31  Bean  <bean123ch@gmail.com>
394         * boot/i386/pc/lnxboot.S (real_code_2): Replace 0x50 with
395         GRUB_KERNEL_MACHINE_DATA_END.
397 2008-07-30  Robert Millan  <rmh@aybabtu.com>
399         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_DATA_END):
400         Increase from 0x50 to 0x60.
401         * util/i386/pc/grub-install.in: Detect cross-disk installs, and
402         use UUIDs to identify the root drive for them.  If that's not
403         possible, abort.
404         * util/i386/pc/grub-setup.c (setup): Do not special-case, or even
405         check, for cross-disk installs.
407 2008-07-30  Robert Millan  <rmh@aybabtu.com>
409         * kern/ieee1275/init.c (grub_machine_set_prefix): If `grub_prefix'
410         is non-empty, use it to set the `prefix' environment variable instead
411         of the usual approach.
412         * kern/i386/linuxbios/init.c (make_install_device): Remove function.
413         (grub_machine_set_prefix): Use `grub_prefix' to set the `prefix'
414         environment variable instead of dummy make_install_device().
416         * kern/i386/ieee1275/startup.S: Include `<grub/machine/kernel.h>'.
417         (start): Insert a data section, with `grub_prefix' variable.
418         * kern/i386/linuxbios/startup.S: Likewise.
420         * include/grub/powerpc/ieee1275/kernel.h [!ASM_FILE] (grub_prefix):
421         New variable reference.
422         * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX):
423         New macro.  Defines offset of `grub_prefix' within startup.S (relative
424         to `start').
425         (GRUB_KERNEL_MACHINE_DATA_END): New macro.  Defines the end of data
426         section within startup.S (relative to `start').
427         * include/grub/i386/coreboot/kernel.h: Likewise.
429         * util/elf/grub-mkimage.c (add_segments): Receive `prefix' parameter.
430         Overwrite grub_prefix with its contents, at the beginning of the
431         first segment.
432         (main): Understand -p|--prefix.
434 2008-07-30  Robert Millan  <rmh@aybabtu.com>
436         * util/grub.d/10_hurd.in: Source ${libdir}/grub/update-grub_lib.
438 2008-07-30  Robert Millan  <rmh@aybabtu.com>
440         * term/i386/pc/vga_text.c (grub_console_cls): Use
441         grub_console_gotoxy() to go back to beginning of the screen.
442         Found by Patrick Georgi <patrick.georgi@coresystems.de>
444 2008-07-29  Christian Franke  <franke@computer.org>
446         * util/update-grub_lib.in (make_system_path_relative_to_its_root):
447         Add conversion of emulated mount points on Cygwin.
449 2008-07-29  Christian Franke  <franke@computer.org>
451         * util/update-grub.in: Add a check for admin
452         group on Cygwin.
453         Remove old `grub.cfg.new' before creation.
454         Add `-f' to `mv' to handle the different filesystem
455         semantics of Windows.
457 2008-07-29  Bean  <bean123ch@gmail.com>
459         * normal/main.c (get_line): Fix buffer overflow bug.
461 2008-07-28  Robert Millan  <rmh@aybabtu.com>
463         * partmap/apple.c (GRUB_APPLE_HEADER_MAGIC): New macro.
464         (struct grub_apple_header): New struct.  Describes the layout of
465         the partmap header.
466         (apple_partition_map_iterate): Check the header magic as well as the
467         partition magic (which was already being checked).
469 2008-07-28  Pavel Roskin  <proski@gnu.org>
471         * genmk.rb: Add a warning to the beginning of the output that
472         it's a generated file and should not be edited.
474 2008-07-28  Robert Millan  <rmh@aybabtu.com>
476         * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
477         with the same number are found, just use issue a warning with
478         grub_dprintf(), as this error has been reported to be non-fatal.
480 2008-07-27  Robert Millan  <rmh@aybabtu.com>
482         * disk/ata.c (grub_ata_dumpinfo): Use grub_dprintf() for debugging
483         information.
485 2008-07-27  Bean  <bean123ch@gmail.com>
487         * fs/fat.c (GRUB_FAT_MAXFILE): New constant.
488         (grub_fat_find_dir): Ignore case when comparing filename.
490 2008-07-27  Bean  <bean123ch@gmail.com>
492         * fs/xfs.c (grub_xfs_dir_header): Change field i8count back to
493         smallino, as it's more descriptive, and i8count can be confused with
494         the other field count.
495         (grub_xfs_iterate_dir): Adjust grub_xfs_dir_entry pointer for small
496         inode type.
498 2008-07-27  Bean  <bean123ch@gmail.com>
500         * commands/crc.c: New file.
502         * lib/crc.c: Likewise.
504         * include/grub/lib/crc.h: Likewise.
506         * util/grub-fstest.c: grub/hexdump.h => grub/lib/hexdump.h.
508         * commands/hexdump.c: grub/hexdump.h => grub/lib/hexdump.h.
509         (hexdump): Move this function to ...
511         * lib/hexdump.c: ... here.
513         * include/grub/hexdump.h: Renamed to ...
515         * include/grub/lib/hexdump.h: ... this.
517         * commands/loadenv.c: grub/envblk.h => grub/lib/envblk.h
519         * util/grub-editenv.c: Likewise.
521         * include/envblk.h: Renamed to ...
523         * include/lib/envblk.h: ... this.
525         * util/envblk.c: Renamed to ...
527         * lib/envblk.c: ... this.
529         * conf/common.rmk (grub_fstest_SOURCES): commands/hexdump.c =>
530         lib/hexdump.c.
531         (grub_editenv_SOURCES): util/envblk.c => lib/envblk.c
532         (pkglib_MODULES): Add crc.mod.
533         (hexdump_mod_SOURCES): Add lib/hexdump.c.
534         (loadenv_mod_SOURCES): util/envblk.c => lib/envblk.c.
535         (crc_mod_SOURCES): New macro.
536         (crc_mod_CFLAGS): Likewise.
537         (crc_mod_LDFLAGS): Likewise.
539         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add lib/hexdump.c.
541         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
543         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
545         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
547         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
549 2008-07-27  Felix Zielcke  <fzielcke@z-51.de>
551         * commands/help.c: Include <grub/term.h>.
552         (TERM_WIDTH): Removed.  Updated all users.
554 2008-07-27  Pavel Roskin  <proski@gnu.org>
556         * util/getroot.c (find_root_device): Rephrase a comment to avoid
557         spurious warnings about a comment within a comment.
559 2008-07-25  Robert Millan  <rmh@aybabtu.com>
561         * util/getroot.c (find_root_device): Skip devices that match
562         /dev/dm-[0-9].  This lets the real device be found for any type of
563         abstraction (LVM, EVMS, RAID..).
564         (grub_guess_root_device): Do not traverse /dev/mapper (for LVM)
565         and /dev/evms (for EVMS) before traversing /dev.  If a /dev/dm-[0-9]
566         device is found first, find_root_device() will now skip it.
568 2008-07-24  Pavel Roskin  <proski@gnu.org>
570         * include/grub/types.h: Use __builtin_bswap32() and
571         __builtin_bswap64() with gcc 4.3 and newer.
573 2008-07-24  Christian Franke  <franke@computer.org>
575         * util/i386/pc/grub-install.in: If `--debug' is specified,
576         pass `--verbose' to grub-setup.
577         Abort script if make_system_path_relative_to_its_root() fails.
579 2008-07-24  Bean  <bean123ch@gmail.com>
581         * configure.ac: Fixed a bug caused by the previous cygwin patch,
582         variable `target_platform' should be `platform'.
584 2008-07-24  Bean  <bean123ch@gmail.com>
586         * video/reader/png.c (DEFLATE_HLIT_MAX): Change value.
587         (grub_png_init_fixed_block): New function.
588         (grub_png_decode_image_data): Handle fixed huffman code compression.
590 2008-07-24  Bean  <bean123ch@gmail.com>
592         * common.rmk (bin_UTILITIES): Add grub-pe2elf.
593         (grub_pe2elf_SOURCES): New macro.
594         (CLEANFILES): Add grub-pe2elf.
596         * include/grub/efi/pe32.h (GRUB_PE32_SCN_ALIGN_1BYTES): New constant.
597         (GRUB_PE32_SCN_ALIGN_2BYTES): Likewise.
598         (GRUB_PE32_SCN_ALIGN_4BYTES): Likewise.
599         (GRUB_PE32_SCN_ALIGN_8BYTES): Likewise.
600         (GRUB_PE32_SCN_ALIGN_16BYTES): Likewise.
601         (GRUB_PE32_SCN_ALIGN_32BYTES): Likewise.
602         (GRUB_PE32_SCN_ALIGN_64BYTES): Likewise.
603         (GRUB_PE32_SCN_ALIGN_SHIFT): Likewise.
604         (GRUB_PE32_SCN_ALIGN_MASK): Likewise.
605         (GRUB_PE32_SYM_CLASS_EXTERNAL): Likewise.
606         (GRUB_PE32_SYM_CLASS_STATIC): Likewise.
607         (GRUB_PE32_SYM_CLASS_FILE): Likewise.
608         (GRUB_PE32_DT_FUNCTION): Likewise.
609         (GRUB_PE32_REL_I386_DIR32): Likewise.
610         (GRUB_PE32_REL_I386_REL32): Likewise.
611         (grub_pe32_symbol): New structure.
612         (grub_pe32_reloc): Likewise.
614         * util/grub-pe2elf.c: New file.
616         * configure.ac: Set TARGET_OBJ2ELF if host os is cygwin. Don't test for
617         start symbol in non pc platform.
619         * genmk.rb: Use TARGET_OBJ2ELF to convert native object format to elf.
621         The following patches are from Christian Franke.
623         * include/grub/dl.h: Remove .previous, gas supports this only
624         for ELF format.
626         * include/grub/symbol.h [__CYGWIN__] (#define FUNCTION/VARIABLE):
627         Remove .type, gas supports this only for ELF format.
629         * kern/dl.c (grub_dl_resolve_dependencies): Add check for trailing
630         nullbytes in symbol table. This fixes an infinite loop if table is
631         zero filled.
633         * Makefile.in: Add autoconf replacements TARGET_IMG_LDSCRIPT,
634         TARGET_IMG_LDFLAGS and EXEEXT.
636         * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Replace -Wl,-N by
637         TARGET_IMG_LDFLAGS_AC.
638         (grub_CHECK_STACK_ARG_PROBE): New function.
640         * conf/i386-pc.rmk: Replace -Wl,-N by TARGET_IMG_LDFLAGS.
642         * conf/i386-pc-cygwin-ld-img.sc: New linker script.
644         * configure.ac: Add check for linker script "conf/${target}-img-ld.c"
645         to set TARGET_IMG_LD* accordingly.
646         Add check for Cygwin to set TARGET_MOD_OBJCOPY accordingly.
647         Add call to grub_CHECK_STACK_ARG_PROBE.
648         Use TARGET_IMG_LDFLAGS to check start, bss_start, end symbols.
650         * genkernsyms.sh.in: Handle HAVE_ASM_USCORE case.
652         * genmk.rb: Add EXEEXT to CLEANFILES.
654 2008-07-23  Robert Millan  <rmh@aybabtu.com>
656         * Makefile.in (UNICODE_ARROWS, UNICODE_LINES): New variables (they
657         define the codes for arrows and lines used for the menu).
658         (ascii.pff): Generate fonts for $(UNICODE_ARROWS) and $(UNICODE_LINES)
659         as well.
661         * util/update-grub_lib.in (font_path): Prefer ascii.pff over complete
662         fonts, because the latter are too slow.
664 2008-07-21  Bean  <bean123ch@gmail.com>
666         * kern/i386/pc/startup.S (gate_a20_try_bios): Change test order for
667         a20. Run keyboard test last, as it will cause macbook to halt.
669 2008-07-18  Pavel Roskin  <proski@gnu.org>
671         * kern/dl.c: Go back to using GRUB_CPU_SIZEOF_VOID_P.  We cannot
672         load foreign architecture modules correctly anyway.  Keep
673         support for loading host architecture modules, whether we
674         compile them or not.
676 2008-07-17  Pavel Roskin  <proski@gnu.org>
678         * configure.ac: Use -m32 or -m64 regardless of whether we had to
679         change target_cpu.  The compiler default can mismatch target_cpu
680         in any case.
682         * disk/efi/efidisk.c: Fix format warnings on x86_64.
683         * kern/efi/efi.c: Likewise.
685         * aclocal.m4 (grub_PROG_TARGET_CC): New macro.  Check if the
686         target compiler is functional.
687         * configure.ac: Call grub_PROG_TARGET_CC once all target flags
688         are set up.
690         * configure.ac: Default to efi platform for x86_64-apple.  Allow
691         powerpc64 CPU, default to ieee1275 platform for it.  Split CPU
692         adjustments from the rest, only do them if target is not
693         explicitly given.  Merge other adjustments with the final sanity
694         check.  Remove an extraneous check for supported CPU.  Be
695         specific which CPU and which platform is not supported.
697         * configure.ac: Default to pc platform for x86_64.
699 2008-07-17  Robert Millan  <rmh@aybabtu.com>
701         Partial LinuxBIOS -> Coreboot rename.
703         * conf/i386-linuxbios.rmk: Renamed to ...
704         * conf/i386-coreboot.rmk: ... this.
705         * Makefile.in (RMKFILES): s/i386-linuxbios.rmk/i386-coreboot.rmk/g.
706         * configure.ac: Accept "coreboot" as input platform (but maintain
707         compatibility with "linuxbios").
708         * include/grub/i386/linuxbios: Renamed to ...
709         * include/grub/i386/coreboot: ... this.
711 2008-07-17  Bean  <bean123ch@gmail.com>
713         * conf/i386/efi.rmk (pkglib_MODULES): add pci.mod and lspci.mod.
714         (appleldr_mod_SOURCE): New variable.
715         (appleldr_mod_CFLAGS): Likewise.
716         (appleldr_mod_LDFLAGS): Likewise.
717         (pci_mod_SOURCES): Likewise.
718         (pci_mod_CFLAGS): Likewise.
719         (pci_mod_LDFLAGS): Likewise.
720         (lspci_mod_SOURCES): Likewise.
721         (lspci_mod_CFLAGS): Likewise.
722         (lspci_mod_LDFLAGS): Likewise.
724         * conf/x86_64-efi.rmk: New file.
726         * disk/efi/efidisk.c (grub_efidisk_read): Wrap efi calls with efi_call_N
727         macro.
728         (grub_efidisk_write): Likewise.
730         * include/efi/api.h (efi_call_0): New macro.
731         (efi_call_1): Likewise.
732         (efi_call_2): Likewise.
733         (efi_call_3): Likewise.
734         (efi_call_4): Likewise.
735         (efi_call_5): Likewise.
736         (efi_call_6): Likewise.
738         * include/grub/efi/chainloader.h (grub_chainloader_cmd): Rename to
739         grub_rescue_cmd_chainloader.
741         * include/grub/efi/pe32.h (GRUB_PE32_MACHINE_X86_64): New macro.
742         (grub_pe32_optional_header): Change some fields based on i386 or
743         x86_64 platform.
744         (GRUB_PE32_PE32_MAGIC): Likewise.
746         * include/grub/efi/uga_draw.h: New file.
748         * include/grub/elf.h (STN_ABS): New constant.
749         (R_X86_64_NONE): Relocation constant for x86_64.
750         (R_X86_64_64): Likewise.
751         (R_X86_64_PC32): Likewise.
752         (R_X86_64_GOT32): Likewise.
753         (R_X86_64_PLT32): Likewise.
754         (R_X86_64_COPY): Likewise.
755         (R_X86_64_GLOB_DAT): Likewise.
756         (R_X86_64_JUMP_SLOT): Likewise.
757         (R_X86_64_RELATIVE): Likewise.
758         (R_X86_64_GOTPCREL): Likewise.
759         (R_X86_64_32): Likewise.
760         (R_X86_64_32S): Likewise.
761         (R_X86_64_16): Likewise.
762         (R_X86_64_PC16): Likewise.
763         (R_X86_64_8): Likewise.
764         (R_X86_64_PC8): Likewise.
766         * include/grub/i386/efi/pci.h: New file.
768         * include/grub/i386/linux.h (GRUB_LINUX_EFI_SIGNATURE):
769         Change it value based on platform.
770         (GRUB_LINUX_EFI_SIGNATURE_0204): New constant.
771         (GRUB_E820_RAM): Likewise.
772         (GRUB_E820_RESERVED): Likewise.
773         (GRUB_E820_ACPI): Likewise.
774         (GRUB_E820_NVS): Likewise.
775         (GRUB_E820_EXEC_CODE): Likewise.
776         (GRUB_E820_MAX_ENTRY): Likewise.
777         (grub_e820_mmap): New structure.
778         (linux_kernel_header): Change the efi field according to different
779         kernel version, also field from linux_kernel_header.
781         * include/grub/kernel.h (grub_module_info): Add padding for x86_64.
783         * include/grub/pci.h (GRUB_PCI_ADDR_SPACE_MASK): New constant.
784         (GRUB_PCI_ADDR_SPACE_MEMORY): Likewise.
785         (GRUB_PCI_ADDR_SPACE_IO): Likewise.
786         (GRUB_PCI_ADDR_MEM_TYPE_MASK): Likewise.
787         (GRUB_PCI_ADDR_MEM_TYPE_32): Likewise.
788         (GRUB_PCI_ADDR_MEM_TYPE_1M): Likewise.
789         (GRUB_PCI_ADDR_MEM_TYPE_64): Likewise.
790         (GRUB_PCI_ADDR_MEM_PREFETCH): Likewise.
791         (GRUB_PCI_ADDR_MEM_MASK): Likewise.
792         (GRUB_PCI_ADDR_IO_MASK): Likewise.
794         * include/grub/x86_64/efi/kernel.h: New file.
796         * include/grub/x86_64/efi/loader.h: Likewise.
798         * include/grub/x86_64/efi/machine.h: Likewise.
800         * include/grub/x86_64/efi/pci.h: Likewise.
802         * include/grub/x86_64/efi/time.h: Likewise.
804         * include/grub/x86_64/linux.h: Likewise.
806         * include/grub/x86_64/setjmp.h: Likewise.
808         * include/grub/x86_64/time.h: Likewise.
810         * include/grub/x86_64/types.h: Likewise.
812         * kern/dl.c (GRUB_CPU_SIZEOF_VOID_P): Changed to
813          GRUB_TARGET_SIZEOF_VOID_P.
815         * kern/efi/efi.c (grub_efi_locate_protocol): Wrap efi calls.
816         (grub_efi_locate_handle): Likewise.
817         (grub_efi_open_protocol): Likewise.
818         (grub_efi_set_text_mode): Likewise.
819         (grub_efi_stall): Likewise.
820         (grub_exit): Likewise.
821         (grub_reboot): Likewise.
822         (grub_halt): Likewise.
823         (grub_efi_exit_boot_services): Likewise.
824         (grub_get_rtc): Likewise.
826         * kern/efi/mm.c (MEMORY_MAP_SIZE): Change to 0x3000 for new models.
827         (GRUB_CPU_SIZEOF_VOID_P): Changed to GRUB_TARGET_SIZEOF_VOID_P.
828         (grub_efi_allocate_pages): Wrap efi calls.
829         (grub_efi_free_pages): Wrap efi calls.
830         (grub_efi_get_memory_map): Wrap efi calls.
832         * kern/x86_64/dl.c: New file.
834         * kern/x86_64/efi/callwrap.S: Likewise.
836         * kern/x86_64/efi/startup.S: Likewise.
838         * loader/efi/appleloader.c: Likewise.
840         * loader/efi/chainloader.c (cmdline): New variable.
841         (grub_chainloader_unload): Wrap efi calls.
842         (grub_chainloader_boot): Likewise.
843         (grub_rescue_cmd_chainloader): Wrap efi calls, handle
844         command line.
846         * loader/efi/chainloader_normal.c (chainloader_command):
847         Change grub_chainloader_cmd to grub_rescue_cmd_chainloader, pass
848         command line.
850         * loader/i386/efi/linux.c (allocate_pages): Change allocation
851         method.
852         (grub_e820_add_region): New function.
853         (grub_linux_boot): Construct e820 map from efi map, handle x86_64
854         booting.
855         (grub_find_video_card): New function.
856         (grub_linux_setup_video): New function.
857         (grub_rescue_cmd_linux): Probe for video information.
859         * normal/x86_64/setjmp.S: New file.
861         * term/efi/console.c (map_char): New function.
862         (grub_console_putchar): Map unicode char.
863         (grub_console_checkkey): Wrap efi calls.
864         (grub_console_getkey): Likewise.
865         (grub_console_getwh): Likewise.
866         (grub_console_gotoxy): Likewise.
867         (grub_console_cls): Likewise.
868         (grub_console_setcolorstate): Likewise.
869         (grub_console_setcursor): Likewise.
871         * util/i386/efi/grub-mkimage.c: Add support for x86_64.
873 2008-07-16  Pavel Roskin  <proski@gnu.org>
875         * loader/i386/efi/linux.c (allocate_pages): Fix warnings in
876         format strings.
878         * util/i386/efi/grub-mkimage.c (get_target_address): Return a
879         pointer, not an integer.  This fixes a warning and prevents
880         precision loss on 64-bit systems.
881         (relocate_addresses): Remove unneeded cast.
883 2008-07-15  Pavel Roskin  <proski@gnu.org>
885         * kern/i386/ieee1275/init.c: Include grub/cache.h.
887         * term/ieee1275/ofconsole.c: Disable code unused on i386.
889         * kern/ieee1275/ieee1275.c (grub_ieee1275_get_integer_property):
890         Fix comparison between signed and unsigned.
892         * include/grub/i386/ieee1275/console.h: Declare
893         grub_console_init() and grub_console_fini().
895         * loader/i386/ieee1275/linux.c (grub_set_bootpath): Remove.
896         It's empty and unused.
898         * fs/ext2.c (grub_ext2_read_block): Initialize blknr in the
899         beginning to avoid warnings with some compilers.
901         * loader/ieee1275/multiboot2.c: Include grub/machine/loader.h.
902         [__i386__] (grub_mb2_arch_boot): Avoid unnecessary cast.
904 2008-07-14  Pavel Roskin  <proski@gnu.org>
906         * kern/env.c (grub_register_variable_hook): Don't copy empty
907         string, it leaks memory.  Pass "" to grub_env_set(), it should
908         handle constant strings.
910         * commands/blocklist.c (grub_cmd_blocklist): Fix format warning.
911         * commands/cmp.c (grub_cmd_cmp): Likewise.
912         * kern/dl.c (grub_dl_flush_cache): Likewise.
913         (grub_dl_load_core): Likewise.
914         * kern/elf.c (grub_elf32_load_phdrs): Likewise.
915         (grub_elf64_load_phdrs): Likewise.
917 2008-07-13  Pavel Roskin  <proski@gnu.org>
919         * lib/LzmaEnc.c (LzmaEnc_SetProps): Fix warning about comparison
920         between signed and unsigned.
921         (LzmaEnc_Finish): Fix warning about an unused parameter.
923 2008-07-13  Bean  <bean123ch@gmail.com>
925         * Makefile.in (enable_lzo): New rule.
927         * conf/i386-pc.rmk (grub_mkimage_SOURCES): New test with enable_lzo.
929         * configure.ac (ENABLE_LZO): New option --enable-lzo.
931         * boot/i386/pc/lnxboot.S: #include <config.h>.
933         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE): Change
934         its value according to the compression algorithm used, lzo or lzma.
936         * util/i386/pc/grub-mkimage.c (compress_kernel): Use different
937         compression algorithm according to configure macro.
939         * kern/i386/pc/startup.S (codestart): Likewise.
941         * kern/i386/pc/lzma_decode.S: New file.
943         * include/grub/lib/LzFind.h: Likewise.
945         * include/grub/lib/LzHash.h: Likewise.
947         * include/grub/lib/LzmaDec.h: Likewise.
949         * include/grub/lib/LzmaEnc.h: Likewise.
951         * include/grub/lib/LzmaTypes.h: Likewise.
953         * lib/LzFind.c: Likewise.
955         * lib/LzmaDec.c: Likewise.
957         * lib/LzmaEnc.c: Likewise.
959 2008-07-13  Bean  <bean123ch@gmail.com>
961         * fs/ext2.c (EXT4_EXTENTS_FLAG): New macro.
962         (grub_ext4_extent_header): New structure.
963         (grub_ext4_extent): Likewise.
964         (grub_ext4_extent_idx): Likewise.
965         (grub_ext4_find_leaf): New function.
966         (grub_ext2_read_block): Handle extents.
968 2008-07-12  Robert Millan  <rmh@aybabtu.com>
970         * util/i386/pc/grub-mkrescue.in: s/grub-install/grub-mkrescue/g.
972 2008-07-11  Robert Millan  <rmh@aybabtu.com>
974         * util/grub.d/40_custom.in: New file. Example on how to add custom
975         entries to /etc/grub.d.
976         * conf/common.rmk (%, update-grub_SCRIPTS, CLEANFILES): Install
977         40_custom (implicitly, by merging all the grub.d rules).
979 2008-07-11  Pavel Roskin  <proski@gnu.org>
981         * commands/read.c (grub_getline): Fix invalid memory access.
982         Don't add newline to the variable value.
984         * term/i386/pc/serial.c (GRUB_SERIAL_PORT_NUM): New constant.
985         [!GRUB_MACHINE_PCBIOS] (serial_hw_io_addr): Add COM2 and COM3.
986         (serial_hw_get_port): Check validity of the port number.
987         (grub_cmd_serial): Check return value of serial_hw_get_port().
989 2008-07-07  Pavel Roskin  <proski@gnu.org>
991         * boot/i386/pc/diskboot.S (notification_string): Replace
992         "Loading kernel" with just "loading".  This is shorter, less
993         confusing and saves a few bytes for possible future changes.
995 2008-07-05  Pavel Roskin  <proski@gnu.org>
997         * disk/ata.c (grub_ata_dumpinfo): Don't output addressing and
998         size for ATAPI devices, they are undefined.  Output sector
999         number in decimal form.
1001         * disk/ata.c: Use named constants for status bits.
1003 2008-07-04  Pavel Roskin  <proski@gnu.org>
1005         * kern/i386/linuxbios/init.c (grub_machine_init): Cast addr to
1006         grub_addr_t before casting it to the void pointer to fix a
1007         warning.  Non-addressable regions are discarded earlier.
1008         (grub_arch_modules_addr): Cast _end to grub_addr_t.
1009         * kern/i386/linuxbios/table.c: Include grub/misc.h.
1010         (check_signature): Don't shadow table_header.
1011         (grub_linuxbios_table_iterate): Cast numeric constants to
1012         grub_linuxbios_table_header_t.
1013         * include/grub/i386/linuxbios/init.h: Add noreturn attribute to
1014         grub_stop().
1016         * kern/ieee1275/init.c: Cast _start and _end to grub_addr_t to
1017         prevent warnings.
1019         * include/grub/misc.h (ALIGN_UP): Avoid unnecessary cast to a
1020         pointer, which can cause warnings.  Support 64-bit addresses.
1022         * util/elf/grub-mkimage.c: Use GRUB_TARGET_SIZEOF_LONG instead
1023         of sizeof(long).  This fixes PowerPC image generation on x86_64.
1025 2008-07-04  Robert Millan  <rmh@aybabtu.com>
1027         This fixes a performance issue when pc & gpt partmap iterators
1028         didn't abort iteration even after our hook found what it was
1029         looking for (often causing expensive probes of non-existent drives).
1031         Some callers relied on previous buggy behaviour, since they would
1032         rise an error when their own hooks caused early abortion of its
1033         iteration.
1035         * kern/device.c (grub_device_open): Improve error message.
1036         * disk/lvm.c (grub_lvm_open): Likewise.
1037         * disk/raid.c (grub_raid_open): Likewise.
1039         * partmap/pc.c (pc_partition_map_iterate): Abort parent iteration
1040         when hook requests it, independently of grub_errno.
1041         (pc_partition_map_probe): Do not fail when find_func() caused
1042         early abortion of pc_partition_map_iterate().
1044         * partmap/gpt.c (gpt_partition_map_iterate): Abort parent iteration
1045         when hook requests it, independently of grub_errno.
1046         (gpt_partition_map_probe): Do not fail when find_func() caused
1047         early abortion of gpt_partition_map_iterate().
1049         * kern/partition.c (grub_partition_iterate): Abort parent iteration
1050         when hook requests it, independently of grub_errno.  Do not fail when
1051         part_map_iterate_hook() caused early abortion of p->iterate().
1053         * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Do not fail
1054         when grub_partition_iterate() returned with non-zero.
1056 2008-07-03  Pavel Roskin  <proski@gnu.org>
1058         * disk/ata.c (grub_ata_pio_write): Check status before writing,
1059         like we do in grub_ata_pio_read().
1060         (grub_ata_readwrite): Always write individual sectors.  Fix the
1061         sector count for the remainder.
1062         (grub_ata_write): Enable writing to ATA devices.  Correctly
1063         report error for ATAPI devices.
1065 2008-07-02  Pavel Roskin  <proski@gnu.org>
1067         * boot/i386/pc/cdboot.S: Add _start entry to fix a linker
1068         warning.
1070         * disk/ata.c (grub_ata_readwrite): Don't increment sector number
1071         for every read sector, we already increment it for the whole
1072         batch.  This fixes reading more than 256 sectors at once.
1074         * util/grub-editenv.c (cmd_info): Cast argument to long
1075         explicitly.  ptrdiff_t reduces to int on i386.
1077         * util/grub-editenv.c (main): Be specific which parameter is
1078         missing.
1080         * disk/memdisk.c (memdisk_addr): Make a pointer to fix warnings.
1081         (memdisk): Make memdisk_orig_addr a pointer.
1083         * fs/reiserfs.c (grub_reiserfs_read): Fix misuse of grub_size_t
1084         for file offsets, use grub_off_t instead.  Fix printf format
1085         warnings.
1087         * fs/reiserfs.c: Remove #warning, TODO list items don't belong
1088         there.  Real unexpected warnings should not drown in the noise
1089         about known problems.
1091         * commands/hexdump.c (grub_cmd_hexdump): Fix misuse of
1092         grub_disk_addr_t for memory addresses.
1094         * loader/aout.c (grub_aout_load): Cast load_addr to pointer
1095         explicitly to fix a warning.
1097         * util/grub-editenv.c (cmd_info): Fix warning in printf format.
1099         * Makefile.in (MODULE_LDFLAGS): New variable.
1100         * aclocal.m4 (grub_PROG_LD_BUILD_ID_NONE): New macro.  Check if
1101         the linker accepts --build-id=none.
1102         * configure.ac: Call grub_PROG_LD_BUILD_ID_NONE.  Substitute
1103         MODULE_LDFLAGS.
1104         * genmk.rb: Use MODULE_LDFLAGS when linking modules.
1106         * fs/xfs.c (struct grub_xfs_dir_header): Use names similar to
1107         those in Linux XFS code.  Provide a way to access 64-bit parent
1108         inode.
1109         (grub_xfs_iterate_dir): Use the new names.  Avoid reading past
1110         the end of struct grub_xfs_dir_header.
1112 2008-07-02  Bean  <bean123ch@gmail.com>
1114         * include/grub/ieee1275.h (grub_ieee1275_flag): New constant
1115         GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
1116         and GRUB_IEEE1275_FLAG_NO_ANSI.
1118         * kern/ieee1275/cmain.c (grub_ieee1275_find_options): Set flag
1119         GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
1120         and GRUB_IEEE1275_FLAG_NO_ANSI for Open Hackware.
1122         * kern/ieee1275/ieee1275.c (grub_ieee1275_interpret): Return
1123         immediately if GRUB_IEEE1275_FLAG_CANNOT_INTERPRET is set.
1125         * kern/ieee1275/init.c (grub_claim_heap): Claim memory directly if
1126         GRUB_IEEE1275_FLAG_FORCE_CLAIM is set.
1128         * term/ieee1275/ofconsole.c (grub_ofconsole_writeesc): Don't output
1129         esc sequence on non ANSI terminal.
1130         (grub_ofconsole_gotoxy): Emulate backspace key on non ANSI terminal.
1132         * util/elf/grub-mkimage.c (add_segments): Move ELF header to the
1133         beginning of file.
1135 2008-07-02  Bean  <bean123ch@gmail.com>
1137         * conf/common.rmk (bin_UTILITIES): Add grub-editenv.
1138         (grub_editenv_SOURCES): New variable.
1139         (pkglib_MODULES): Add loadenv.mod.
1140         (loadenv_mod_SOURCES): New variable.
1141         (loadenv_mod_CFLAGS): Likewise.
1142         (loadenv_mod_LDFLAGS): Likewise.
1144         * include/grub/envblk.h: New file.
1146         * util/envblk.c: New file.
1148         * util/grub-editenv.c: New file.
1150         * commands/loadenv.c: New file.
1152 2008-07-01  Pavel Roskin  <proski@gnu.org>
1154         * include/multiboot2.h (struct multiboot_tag_module): Use char,
1155         not unsigned char.  This fixes warnings and is consistent with
1156         other tags.
1158         * disk/fs_uuid.c (search_fs_uuid): Correctly increment count.
1160         * normal/parser.y: Define YYENABLE_NLS as 0 to fix warnings.
1162         * term/tparm.c (analyze): Always set *popcount.
1164         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Remove useless
1165         cast to fix a warning.
1167         * loader/i386/pc/multiboot2.c (grub_mb2_arch_module_alloc): Use
1168         cast to suppress a warning.
1170         * fs/afs.c (grub_afs_read_block): Return grub_disk_addr_t, as
1171         grub_fshelp_read_file() expects.
1173         * fs/fat.c: Fix UUID calculation on big-endian systems.  We
1174         write uuid as a 32-bit value in CPU byte order, so declare and
1175         use it as such.
1177         * disk/raid.c: Cast grub_dprintf() arguments to unsigned long
1178         long if the format specifier expects it.
1179         * partmap/gpt.c (gpt_partition_map_iterate): Likewise.
1180         * partmap/pc.c (pc_partition_map_iterate): Likewise.
1181         * fs/ntfs.c (grub_ntfs_uuid): Cast data->uuid to unsigned long
1182         long to fix a warning.
1183         * fs/reiserfs.c (grub_reiserfs_read): Change casts in
1184         grub_dprintf() arguments to fix warnings.
1186 2008-06-30  Pavel Roskin  <proski@gnu.org>
1188         * util/i386/pc/grub-setup.c (setup): Write install_dos_part and
1189         install_bsd_part immediately before core.img is embedded or
1190         modified on disk.  This fixes core.img verification if core.img
1191         cannot be embedded.
1193         * util/i386/pc/grub-setup.c (setup): Use core_path_dev, not
1194         core_path to calculate the blocklist.
1195         Patch from Javier Martín <lordhabbit@gmail.com>
1197 2008-06-29  Robert Millan  <rmh@aybabtu.com>
1199         * fs/xfs.c (GRUB_XFS_FSB_TO_BLOCK): New macro.  Maps filesystem
1200         block to disk block.
1201         (grub_xfs_read_block): Use GRUB_XFS_FSB_TO_BLOCK() on result.
1202         Patch from Niels Böhm <bitbucket@arcor.de>
1204 2008-06-29  Robert Millan  <rmh@aybabtu.com>
1206         * util/update-grub_lib.in (font_path): Search for fonts in
1207         /boot/grub first, which is more likely to be readable (we aren't
1208         deciding where fonts live, just looking for them).
1210 2008-06-26  Pavel Roskin  <proski@gnu.org>
1212         * util/biosdisk.c (read_device_map): Don't leave dead map
1213         entries for devices failing stat() check.
1215         * util/i386/pc/grub-setup.c (setup): Don't reuse core_path, use
1216         core_path_dev for the core.img path on the target device.
1218 2008-06-26  Robert Millan  <rmh@aybabtu.com>
1220         * disk/fs_uuid.c: New file.
1221         * conf/common.rmk (pkglib_MODULES): Add `fs_uuid.mod'.
1222         (fs_uuid_mod_SOURCES, fs_uuid_mod_CFLAGS)
1223         (fs_uuid_mod_LDFLAGS): New variables.
1224         * include/grub/disk.h (grub_disk_dev_id): Add
1225         `GRUB_DISK_DEVICE_UUID_ID'.
1226         * kern/disk.c (grub_disk_dev_iterate): Allow disk devices not to
1227         implement iterate().
1229 2008-06-26  Robert Millan  <rmh@aybabtu.com>
1231         * util/grub.d/10_linux.in: Avoid passing UUIDs to Linux when either
1232         "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" does not exist, or when a
1233         Linux image includes no initrd.
1235 2008-06-21  Javier Martín  <lordhabbit@gmail.com>
1237         * util/i386/pc/grub-setup.c (setup): Remove literal "core.img" in a
1238         call to resolve the core image location that effectively appended the
1239         name twice.
1241 2008-06-21  Robert Millan  <rmh@aybabtu.com>
1243         * util/grub.d/00_header.in: Move last prepare_grub_to_access_device()
1244         call from here ...
1246         * util/grub.d/10_hurd.in: ... to here ...
1247         * util/grub.d/10_linux.in: ... and here.
1249 2008-06-19  Robert Millan  <rmh@aybabtu.com>
1251         * kern/main.c (grub_main): Export `prefix' variable immediately
1252         after it has been set by grub_machine_set_prefix().
1254 2008-06-19  Robert Millan  <rmh@aybabtu.com>
1256         * commands/search.c (search_label, search_fs_uuid, search_file): Print
1257         search result when not saving to variable, not the other way around.
1258         When saving to variable, abort iteration as soon as a match is found.
1260 2008-06-19  Robert Millan  <rmh@aybabtu.com>
1262         * util/update-grub_lib.in (prepare_grub_to_access_device): Remove
1263         check for partition that provides /boot/grub.  Its logic is flawed,
1264         as it prevents prepare_grub_to_access_device() from being called
1265         multiple times.
1267 2008-06-19  Robert Millan  <rmh@aybabtu.com>
1269         * util/update-grub_lib.in (prepare_grub_to_access_device): Issue
1270         "insmod" command directly when abstraction modules are needed,
1271         instead of relying on GRUB_PRELOAD_MODULES (which had no effect
1272         since it had already been processed).
1274 2008-06-19  Pavel Roskin  <proski@gnu.org>
1276         * conf/i386-efi.rmk: Recompile grub-mkimage.c if Makefile has
1277         changed.  This is needed in case GRUB_LIBDIR changes.
1278         * conf/i386-ieee1275.rmk: Likewise.
1279         * conf/i386-linuxbios.rmk: Likewise.
1280         * conf/i386-pc.rmk: Likewise.
1281         * conf/powerpc-ieee1275.rmk: Likewise.
1283 2008-06-18  Pavel Roskin  <proski@gnu.org>
1285         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Rename
1286         kernel_elf_symlist.c to symlist.c for consistency with other
1287         architectures.  Update all users.
1288         * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
1290 2008-06-18  Robert Millan  <rmh@aybabtu.com>
1292         * util/i386/pc/grub-install.in: If the drive is LVM or RAID, prepend
1293         it in prefix.
1295         * util/i386/pc/grub-setup.c (main): Don't handle prefix at all.  Set
1296         `must_embed' to 1 when root_dev is a RAID device.  When dest_dev is
1297         a RAID device, run setup() for all members independently on whether
1298         LVM abstraction is being used.
1299         (setup): Don't handle prefix at all; let grub-mkimage take care of it.
1300         If grub-mkimage has set `*install_dos_part == -2', don't override this
1301         value.
1302         Perform *install_dos_part adjustments independently on whether
1303         we're embedding or not.
1304         Clarify error message when image is too big for embedding.
1305         Remove duplicate *install_dos_part stanza.
1307 2008-06-17  Robert Millan  <rmh@aybabtu.com>
1309         * term/ieee1275/ofconsole.c (fgcolor, bgcolor): Remove variables.
1310         (grub_ofconsole_normal_color, grub_ofconsole_highlight_color): New
1311         variables.
1312         (grub_ofconsole_setcolor, grub_ofconsole_getcolor): Load/store
1313         values in grub_ofconsole_normal_color and
1314         grub_ofconsole_highlight_color (they're not directly related to
1315         background and foreground).
1316         (grub_ofconsole_setcolorstate): Extract background and foreground
1317         from grub_ofconsole_normal_color and grub_ofconsole_highlight_color.
1319 2008-06-17  Robert Millan  <rmh@aybabtu.com>
1321         * util/update-grub_lib.in (prepare_grub_to_access_device): Use
1322         /boot/grub for the check in last commit, not /boot (they could be
1323         different partitions).
1325 2008-06-16  Robert Millan  <rmh@aybabtu.com>
1327         * util/update-grub_lib.in (prepare_grub_to_access_device): If we were
1328         asked to setup access for the same partition that provides /boot,
1329         don't bother using UUIDs since our root already has the value we
1330         want.
1332 2008-06-16  Robert Millan  <rmh@aybabtu.com>
1334         * util/biosdisk.c (convert_system_partition_to_system_disk): Detect
1335         I2O devices.
1336         Patch from Sven Mueller <sven@debian.org>.
1338 2008-06-16  Robert Millan  <rmh@aybabtu.com>
1340         * util/update-grub.in: Check for $EUID instead of $UID.
1341         Reported by Vincent Zweije.
1343 2008-06-16  Bean  <bean123ch@gmail.com>
1345         * fs/ext2.c (grub_ext2_blockgroup): Revert to pre-journal state.
1346         (grub_ext2_read_block): Likewise.
1347         (grub_ext2_read_inode): Likewise.
1348         (grub_ext2_mount): Likewise.
1349         (grub_ext2_close): Likewise.
1350         (grub_ext3_get_journal): Removed.
1352         * fs/reiserfs.c (grub_reiserfs_get_item): Revert to pre-journal state.
1353         (grub_reiserfs_read_symlink): Likewise.
1354         (grub_reiserfs_mount): Likewise.
1355         (grub_reiserfs_open): Likewise.
1356         (grub_reiserfs_read): Likewise.
1357         (grub_reiserfs_close): Likewise.
1358         (grub_reiserfs_get_journal): Removed.
1360         * fs/fshelp.c (grub_fshelp_read): Removed.
1361         (grub_fshelp_map_block): Likewise.
1363         * include/grub/fshelp.h (grub_fshelp_journal_type): Removed.
1364         (grub_fshelp_journal): Likewise.
1365         (grub_fshelp_read): Likewise.
1366         (grub_fshelp_map_block): Likewise.
1368 2008-06-16  Pavel Roskin  <proski@gnu.org>
1370         * conf/powerpc-ieee1275.rmk: Remove -msoft-float, we don't use
1371         floating point anymore.
1372         * include/grub/powerpc/libgcc.h: Leave only necessary exports.
1374 2008-06-15  Pavel Roskin  <proski@gnu.org>
1376         * commands/ls.c (grub_ls_list_files): Use integer calculations
1377         for human readable format, avoid floating point use.
1378         * kern/misc.c (grub_ftoa): Remove.
1379         (grub_vsprintf): Remove floating point support.
1381 2008-06-15  Robert Millan  <rmh@aybabtu.com>
1383         * util/grub.d/10_linux.in: Use the underlying device for loop-AES
1384         devices.
1385         Reported by Max Vozeler.
1387 2008-06-15  Robert Millan  <rmh@aybabtu.com>
1389         * util/i386/pc/grub-mkimage.c (generate_image): If we included a drive
1390         in our prefix, set install_{dos,bsd}_part = -2 to indicate this can be
1391         skipped later.
1392         (main): If a memdisk was requested, add "(memdisk)" drive explicitly to
1393         the beginning of the prefix.
1395         * kern/i386/pc/init.c (make_install_device): Remove memdisk check.
1396         It is assumed that if we have a memdisk, grub-mkimage has set
1397         grub_prefix to include the "(memdisk)" drive in it.
1399 2008-06-15  Robert Millan  <rmh@aybabtu.com>
1401         * term/i386/pc/console.c [GRUB_MACHINE_LINUXBIOS] (grub_console_init):
1402         Initialize keyboard controller after registering the terminal, so that
1403         grub_printf() can be called from grub_keyboard_controller_init().
1405 2008-06-15  Robert Millan  <rmh@aybabtu.com>
1407         * fs/sfs.c (grub_sfs_read_extent): Fix the count of nodes in
1408         extent-btree which is written as big endian on disk.
1409         Reported by Alain Greppin  <al@chilibi.org>.
1411 2008-06-14  Robert Millan  <rmh@aybabtu.com>
1413         * util/i386/efi/grub-install.in (modules): Remove `_chain'.
1414         * util/i386/pc/grub-install.in (modules): Likewise.
1416 2008-06-13  Pavel Roskin  <proski@gnu.org>
1418         * commands/ls.c (grub_ls_list_files): Fix format warnings.
1420 2008-06-13  Bean  <bean123ch@gmail.com>
1422         * commands/hexdump.c (grub_cmd_hexdump): Adjust offset for partition.
1424         * fs/ext2.c (grub_ext3_get_journal): Fix revoke block handling.
1426         * fs/fshelp.c (grub_fshelp_map_block): Don't map block 0 as it's used
1427         to indicate sparse block.
1429 2008-06-12  Pavel Roskin  <proski@gnu.org>
1431         * fs/ext2.c (grub_ext2_read_inode): Don't normalize block
1432         number, grub_fshelp_read() does it for us.
1434         * fs/fshelp.c (grub_fshelp_read): New function.  Implement
1435         linear disk read with journal translation.
1436         * fs/ext2.c: Use grub_fshelp_read() instead of grub_disk_read().
1437         * include/grub/fshelp.h: Declare grub_fshelp_read().
1439 2008-06-09  Pavel Roskin  <proski@gnu.org>
1441         * fs/minix.c (grub_minix_mount): Handle error reading
1442         superblock.
1444 2008-06-08  Robert Millan  <rmh@aybabtu.com>
1446         * util/i386/pc/grub-setup.c (main): If install drive is an LVM,
1447         don't append the RAID prefix afterwards.
1448         Reported by Clint Adams.
1450 2008-06-08  Robert Millan  <rmh@aybabtu.com>
1452         Based on description from Pavel:
1453         * kern/disk.c (grub_disk_check_range): Rename to ...
1454         (grub_disk_adjust_range): ... this.  Add a comment explaining the
1455         tasks performed by this function.
1457 2008-06-08  Robert Millan  <rmh@aybabtu.com>
1459         * include/grub/ntfs.h (struct grub_ntfs_bpb): Rename `serial_number' to
1460         `num_serial' (for consistency with other variables).
1461         (struct grub_ntfs_data): Add `uuid' member.
1462         * fs/ntfs.c (grub_ntfs_mount): Initialize `data->uuid'.
1463         (grub_ntfs_uuid): New function.
1464         (grub_ntfs_fs): Reference grub_ntfs_uuid() in `uuid' struct member.
1466 2008-06-07  Pavel Roskin  <proski@gnu.org>
1468         * util/biosdisk.c (open_device): Revert last change to the
1469         function, it broke installation.  The sector needs to be
1470         different dependent on which device is opened.
1472 2008-06-06  Robert Millan  <rmh@aybabtu.com>
1474         Ensure GRUB_KERNEL_MACHINE_DATA_END is always consistent with the
1475         rest of GRUB, and breakage doesn't happen if its value were modified.
1477         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
1478         Redefine as an offset from `GRUB_KERNEL_MACHINE_DATA_END' instead of
1479         a constant (same value).
1480         * kern/i386/pc/startup.S: Replace hardcoded `0x50' with
1481         `GRUB_KERNEL_MACHINE_DATA_END' (same value).
1483 2008-06-06  Robert Millan  <rmh@aybabtu.com>
1485         * util/biosdisk.c (open_device): Do not modify sector offset when
1486         accessing a partition.  kern/disk.c already handles this for us.
1488 2008-06-06  Robert Millan  <rmh@aybabtu.com>
1490         * util/grub-emu.c (grub_machine_init): Move code in this function from
1491         here ...
1492         (main): ... to here (before grub_util_biosdisk_init() call, to prevent
1493         segfault in case grub_printf() is called).
1495         * util/i386/pc/grub-install.in: Append `--device-map=${device_map}' to
1496         grub_probe.  Update all users not to explicitly add it again.
1497         (grub_device): New variable; contains corresponding device for grubdir.
1498         (fs_module, partmap_module, devabstraction_module): Pass
1499         `--device ${grub_device}' to grub_probe to avoid traversing /dev
1500         every time.
1502 2008-06-05  Robert Millan  <rmh@aybabtu.com>
1504         * normal/misc.c (grub_normal_print_device_info): When a filesystem UUID
1505         is found, print it (same layout as with labels).
1507 2008-06-04  Robert Millan  <rmh@aybabtu.com>
1509         * util/biosdisk.c (get_drive): Rename to ...
1510         (find_grub_drive): ... this.  Update all users.
1512         (get_os_disk): Rename to ...
1513         (convert_system_partition_to_system_disk): ... this.  Update all users.
1515         (find_drive): Rename to ...
1516         (find_system_device): ... this.  Update all users.
1518 2008-06-04  Robert Millan  <rmh@aybabtu.com>
1520         * util/biosdisk.c (get_os_disk): Handle IDA devices.
1521         * util/grub-mkdevicemap.c (get_mmc_disk_name)
1522         (make_device_map): Likewise.
1524 2008-06-01  Robert Millan  <rmh@aybabtu.com>
1526         *  util/biosdisk.c (get_drive): Verify that `map[i].drive' is non-NULL
1527         before dereferencing it.
1529         * fs/fat.c (struct grub_fat_bpb): Move fat32-specific fields into a
1530         union with fat12/fat16-specific ones.  Add some new fields, including
1531         `num_serial' for both versions.
1532         (struct grub_fat_data): Add `uuid' member.
1533         (grub_fat_mount): Refer to fat32-specific fields in `bpb' by their new
1534         names.  Initialize `data->uuid' using `num_serial'.
1535         (grub_fat_uuid): New function.
1536         (grub_fat_fs): Reference grub_fat_uuid() in `uuid' struct member.
1538         * fs/reiserfs.c (grub_reiserfs_superblock): Add `uuid' field.
1539         (grub_reiserfs_uuid): New function.
1540         (grub_reiserfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct
1541         member.
1543         * fs/xfs.c (grub_xfs_sblock): Add `uuid' field.
1544         (grub_xfs_uuid): New function.
1545         (grub_xfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct member.
1547 2008-06-01  Robert Millan  <rmh@aybabtu.com>
1549         * util/update-grub_lib.in (prepare_grub_to_access_device): Generate
1550         code that is backward compatible with pre-uuid search command.
1552 2008-05-31  Robert Millan  <rmh@aybabtu.com>
1554         * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Iterate through
1555         floppies after everything else, to ensure floppy drive isn't accessed
1556         unnecessarily (patch from Bean).
1558 2008-05-31  Robert Millan  <rmh@aybabtu.com>
1560         * commands/search.c (search_label, search_fs_uuid, search_file): Do
1561         not print device names when we were asked to set a variable.
1563 2008-05-31  Robert Millan  <rmh@aybabtu.com>
1565         * term/ieee1275/ofconsole.c (grub_ofconsole_setcursor): Implement
1566         using "cursor-on" and "cursor-off" commands (understood at least by
1567         the Open Firmware flavour on OLPC).
1569 2008-05-31  Michael Gorven  <michael@gorven.za.net>
1571         * term/terminfo.c (grub_terminfo_set_current): Correct vt100 cursor
1572         on and off sequences.
1574 2008-05-31  Robert Millan  <rmh@aybabtu.com>
1576         * util/update-grub_lib.in: Replace `grub-probe' with `${grub_probe}'.
1577         * util/update-grub.in: Likewise.
1579 2008-05-30  Pavel Roskin  <proski@gnu.org>
1581         * util/biosdisk.c (linux_find_partition): Simplify logic and
1582         make the code more universal.  Keep special processing for
1583         devfs, but use a simple rule for all other devices.  If the
1584         device ends with a number, append 'p' and the partition number.
1585         Otherwise, append only the partition number.
1587 2008-05-30  Robert Millan  <rmh@aybabtu.com>
1589         * util/update-grub.in (GRUB_DISABLE_LINUX_UUID): Export variable.
1590         * util/grub.d/10_linux.in: If GRUB_DEVICE_UUID is set, and
1591         GRUB_DISABLE_LINUX_UUID isn't true, use the filesystem UUIDs as
1592         the `root' parameter to Linux.
1594 2008-05-30  Robert Millan  <rmh@aybabtu.com>
1596         * commands/search.c (options): Rename --fs_uuid to --fs-uuid.
1597         * util/update-grub_lib.in (prepare_grub_to_access_device): Replace
1598         --fs_uuid with --fs-uuid.
1599         * util/update-grub.in: Allow filesystem UUID probes to fail (since not
1600         all filesystems support them).
1602 2008-05-30  Robert Millan  <rmh@aybabtu.com>
1604         * fs/ext2.c (grub_ext2_uuid): Use `04x' instead of '02x' as
1605         grub_printf() flags, since we're printing in units of 2 bytes.
1607 2008-05-30  Robert Millan  <rmh@aybabtu.com>
1609         * util/grub.d/00_header.in: Remove obsolete comment referencing
1610         convert_system_path_to_grub_path().
1611         * util/update-grub.in: Likewise.
1612         * util/update-grub_lib.in (is_path_readable_by_grub): New function.
1613         (convert_system_path_to_grub_path): Add a warning message explaining
1614         that this function is deprecated.  Rely on is_path_readable_by_grub()
1615         for the readability checks.
1616         (font_path): Use is_path_readable_by_grub() for the readability
1617         check rather than convert_system_path_to_grub_path().
1619 2008-05-30  Robert Millan  <rmh@aybabtu.com>
1621         * util/update-grub_lib.in (prepare_grub_to_access_device): New function.
1622         * util/update-grub.in: Set `GRUB_FONT_PATH' to the system path, without
1623         converting it first.
1624         * util/grub.d/00_header.in: Use prepare_grub_to_access_device() to setup
1625         grub.cfg for access to font file, and afterwards call it again to set
1626         the root device.
1628 2008-05-30  Robert Millan  <rmh@aybabtu.com>
1630         * commands/search.c (options): Add --fs_uuid option.
1631         (search_fs_uuid): New function.
1632         (grub_cmd_search): Fix --set argument passing.
1633         Use search_fs_uuid() when requested via --fs_uuid.
1634         (grub_search_init): Update help message.
1635         * fs/ext2.c (struct grub_ext2_sblock): Rename `unique_id' to `uuid'
1636         and redeclare it as an array of 16-bit words.
1637         (grub_ext2_uuid): New function.
1638         (grub_ext2_fs): Reference grub_ext2_uuid() in `uuid' struct member.
1639         * include/grub/fs.h (struct grub_fs): Add `uuid' struct member.
1640         * util/update-grub.in (GRUB_DEVICE_UUID, GRUB_DEVICE_BOOT)
1641         (GRUB_DEVICE_BOOT_UUID): New variables.
1642         (GRUB_DRIVE. GRUB_DRIVE_BOOT. GRUB_DRIVE_BOOT_GRUB): Remove.
1643         * util/grub.d/00_header.in: Set root using `search --fs_uuid' command
1644         whenever possible.
1645         * util/grub.d/10_hurd.in: Avoid explicit use of root drive.  Instead,
1646         just assume `root' variable has the right value.
1647         * util/grub.d/10_linux.in: Likewise.
1648         * util/grub-probe.c (probe): Probe for filesystem UUID when requested
1649         via PRINT_FS_UUID.
1650         (main): Recognise `-t fs_uuid' argument.
1652 2008-05-30  Robert Millan  <rmh@aybabtu.com>
1654         * util/biosdisk.c (map): Redefine structure to hold information
1655         about GRUB drive name.
1656         (get_drive): Reimplement without assuming (and verifying) BIOS-like
1657         drive names.
1658         (call_hook): Remove.
1659         (grub_util_biosdisk_iterate): Access drive names via `.drive' struct
1660         member.  Assume drive has partitions.
1661         (grub_util_biosdisk_open): Access device names via `.device' struct
1662         member.
1663         (open_device): Likewise.
1664         (find_drive): Likewise.
1665         (read_device_map): Adjust map[] usage to match the new struct
1666         definition.  Don't check for duplicates (still possible, but not cheap
1667         anymore).
1668         (grub_util_biosdisk_fini): Free malloced buffers referenced by map[].
1669         (make_device_name): Remove assumption of BIOS-like drive names.
1671 2008-05-30  Pavel Roskin  <proski@gnu.org>
1673         * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Remove, as
1674         compiling execute.c doesn't need grub_script.tab.h anymore.
1675         (normal/command.c_DEPENDENCIES): Likewise.
1676         (normal/function.c_DEPENDENCIES): Likewise.
1677         * conf/i386-ieee1275.rmk: Likewise.
1678         * conf/i386-linuxbios.rmk: Likewise.
1679         * conf/i386-pc.rmk: Likewise.
1680         * conf/powerpc-ieee1275.rmk: Likewise.
1681         * conf/sparc64-ieee1275.rmk: Likewise.
1683 2008-05-29  Pavel Roskin  <proski@gnu.org>
1685         * disk/lvm.c (grub_lvm_scan_device): Check for the buffer end
1686         when scanning metadata for volume group name.
1688         * include/grub/script.h: Don't include grub_script.tab.h.  It's
1689         a generated file, which may only be included from the files with
1690         DEPENDENCIES rules in the makefile.  Don't use typedef YYSTYPE,
1691         use union YYSTYPE, as the later allows forward declaration.
1692         * normal/lexer.c: Don't use typedef YYSTYPE, use union YYSTYPE.
1694 2008-05-29  Robert Millan  <rmh@aybabtu.com>
1696         * term/i386/pc/at_keyboard.c: Include `grub/machine/machine.h'.
1697         (OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): New macros.
1698         [GRUB_MACHINE_IEEE1275] (keyboard_map): Add OLPC scan codes
1699         (grub_console_checkkey): Add grub_dprintf() call to report unknown
1700         scan codes.
1702 2008-05-29  Robert Millan  <rmh@aybabtu.com>
1704         * term/i386/pc/at_keyboard.c (grub_console_checkkey): Add support for
1705         control key combinations.
1707 2008-05-29  Robert Millan  <rmh@aybabtu.com>
1709         * util/powerpc/ieee1275/grub-install.in: Move from here ...
1710         * util/ieee1275/grub-install.in: ... to here.
1711         * powerpc-ieee1275.rmk (grub_install_SOURCES): Update location.
1712         * i386-ieee1275.rmk (sbin_SCRIPTS): New variable.
1713         (grub_install_SOURCES): Likewise.
1715 2008-05-29  Robert Millan  <rmh@aybabtu.com>
1717         * fs/affs.c: Update copyright year.
1718         * fs/ext2.c: Likewise.
1719         * fs/fshelp.c: Likewise.
1720         * fs/hfsplus.c: Likewise.
1721         * fs/ntfs.c: Likewise.
1722         * fs/xfs.c: Likewise.
1723         * include/grub/fshelp.h: Likewise.
1724         * util/grub-mkdevicemap.c: Likewise.
1726 2008-05-28  Robert Millan  <rmh@aybabtu.com>
1728         * util/update-grub.in: Allow chmod call to fail, since /boot/grub/
1729         might need to be fatfs to support some firmware implementations
1730         (e.g. OFW or EFI).
1732 2008-05-28  Robert Millan  <rmh@aybabtu.com>
1734         * util/biosdisk.c (linux_find_partition, get_os_disk): Handle MMC
1735         devices.
1736         * util/grub-mkdevicemap.c (get_mmc_disk_name)
1737         (make_device_map): Likewise.
1739 2008-05-20  Bean  <bean123ch@gmail.com>
1741         * fs/fshelp.c (grub_fshelp_map_block): New function.
1742         (grub_fshelp_find_file): Use 64-bit type for pos and block address.
1743         Use `>>' and `&' operator to avoid 64-bit divide and modulo.
1745         * include/grub/fshelp.h (grub_fshelp_journal_type): New enum.
1746         (GRUB_FSHELP_JOURNAL_UNUSED_MAPPING): New macro.
1747         (grub_fshelp_journal): New structure.
1748         (grub_fshelp_map_block): New function prototype.
1749         (grub_fshelp_read_file): Use grub_disk_addr_t as block type.
1750         (grub_fshelp_map_block): Likewise.
1752         * fs/ext2.c (EXT3_FEATURE_COMPAT_HAS_JOURNAL): New macro.
1753         (EXT3_JOURNAL_MAGIC_NUMBER): Likewise.
1754         (EXT3_JOURNAL_DESCRIPTOR_BLOCK): Likewise.
1755         (EXT3_JOURNAL_COMMIT_BLOCK): Likewise.
1756         (EXT3_JOURNAL_SUPERBLOCK_V1): Likewise.
1757         (EXT3_JOURNAL_SUPERBLOCK_V2): Likewise.
1758         (EXT3_JOURNAL_REVOKE_BLOCK): Likewise.
1759         (EXT3_JOURNAL_FLAG_ESCAPE): Likewise.
1760         (EXT3_JOURNAL_FLAG_SAME_UUID): Likewise.
1761         (EXT3_JOURNAL_FLAG_DELETED): Likewise.
1762         (EXT3_JOURNAL_FLAG_LAST_TAG): Likewise.
1763         (grub_ext2_sblock): New members for journal support.
1764         (grub_ext3_journal_header): New structure.
1765         (grub_ext3_journal_revoke_header): Likewise.
1766         (grub_ext3_journal_block_tag): Likewise.
1767         (grub_ext3_journal_sblock): Likewise.
1768         (grub_fshelp_node): New members logfile and journal.
1769         (grub_ext2_read_block): Change block type to grub_disk_addr_t. Use
1770         grub_fshelp_map_block to get real block number.
1771         (grub_ext2_blockgroup): Use grub_fshelp_map_block to get real block
1772         number.
1773         (grub_ext2_read_inode): Likewise.
1774         (grub_ext3_get_journal): New function.
1775         (grub_read_inode): Initialize journal using grub_ext3_get_journal.
1776         (grub_ext2_close): Release memory used by journal.
1778         * fs/reiserfs.c (REISERFS_MAGIC_STRING): Changed to "ReIsEr".
1779         (REISERFS_MAGIC_DESC_BLOCK): New macro.
1780         (grub_reiserfs_transaction_header): Renamed to
1781         grub_reiserfs_description_block, replace field data with real_blocks.
1782         (grub_reiserfs_commit_block): New structure.
1783         (grub_reiserfs_data): New member journal.
1784         (grub_reiserfs_get_item): Use grub_fshelp_map_block to get real block
1785         number.
1786         (grub_reiserfs_read_symlink): Likewise.
1787         (grub_reiserfs_iterate_dir): Likewise.
1788         (grub_reiserfs_open): Likewise.
1789         (grub_reiserfs_read): Likewise.
1790         (grub_reiserfs_get_journal): New function.
1791         (grub_reiserfs_mount): Use "ReIsEr" as super block magic, as there are
1792         three varieties ReIsErFs, ReIsEr2Fs and ReIsEr3Fs. Initialize journal
1793         using grub_reiserfs_get_journal.
1794         (grub_reiserfs_close): Release memory used by journal.
1796         * fs/affs.c (grub_affs_read_block): Change block type to
1797         grub_disk_addr_t. Use grub_divmod64 to do 64-bit division.
1799         * fs/afs.c (grub_afs_read_block): Change block type to grub_disk_addr_t.
1801         * fs/hfsplus.c (grub_hfsplus_read_block): Likewise.
1803         * fs/ntfs.c (grub_ntfs_read_block): Likewise.
1805         * fs/udf.c (grub_udf_read_block): Change block type to
1806         grub_disk_addr_t. Use type cast to avoid warning.
1808         * fs/xfs.c (grub_xfs_read_block): Likewise.
1810 2008-05-16  Christian Franke  <franke@computer.org>
1812         * commands/cat.c (grub_cmd_cat): Remove non-ESC keys from keyboard queue
1813         to ensure that break with ESC will always work.
1814         * commands/sleep.c (grub_interruptible_millisleep): Likewise.
1815         Remove ESC from keyboard queue.
1817 2008-05-16  Christian Franke  <franke@computer.org>
1819         * util/biosdisk.c: [__CYGWIN__] Add includes.
1820         (grub_util_biosdisk_open): Use Linux code also for Cygwin.
1821         (get_os_disk): Move variable declarations to OS specific
1822         parts to avoid warning.
1823         [__GNU__] (get_os_disk): Fix /dev/sdXsN case.
1824         [__CYGWIN__] (get_os_disk): Add Cygwin /dev/sdXN device names.
1825         (grub_util_biosdisk_get_grub_dev): Use Linux code also for
1826         Cygwin.
1827         * util/getroot.c: [__CYGWIN__] Add includes.
1828         (strip_extra_slashes): Fix "/" case.
1829         [__CYGWIN__] (get_win32_path): New function.
1830         [__CYGWIN__] (grub_get_prefix): Add conversion to win32 path.
1831         [__CYGWIN__] (find_root_device): Disable.
1832         [__CYGWIN__] (get_bootsec_serial): New function.
1833         [__CYGWIN__] (find_cygwin_root_device): Likewise.
1834         [__linux__] (grub_guess_root_device): Add early returns to simplify
1835         structure.
1836         [__CYGWIN__] (grub_guess_root_device): Call find_cygwin_root_device.
1837         [__linux__] (grub_util_get_dev_abstraction): Enable LVM and RAID
1838         check for Linux only.
1840 2008-05-15  Bean  <bean123ch@gmail.com>
1842         * kern/i386/pc/startup.S (grub_console_getkey): Workaround for the
1843         keyboard hang problem in apple's intel mac.
1845 2008-05-09  Robert Millan  <rmh@aybabtu.com>
1847         * util/biosdisk.c (linux_find_partition, get_os_disk): Handle Virtio
1848         devices.
1849         * util/grub-mkdevicemap.c (get_virtio_disk_name)
1850         (make_device_map): Likewise.
1851         Reported by Aurelien Jarno <aurel32@debian.org>
1853 2008-05-07  Ian Campbell  <ijc@hellion.org.uk>
1855         * util/biosdisk.c (get_os_disk): Recognise xvd type disks.
1856         * util/grub-mkdevicemap.c (get_xvd_disk_name): New function.
1857         (make_device_map): Output entries for xvd type disks.
1859 2008-05-07  Robert Millan  <rmh@aybabtu.com>
1861         * util/biosdisk.c (linux_find_partition, get_os_disk): Handle CCISS
1862         devices.
1863         * util/grub-mkdevicemap.c (get_cciss_disk_name)
1864         (make_device_map): Likewise.
1865         Reported by Roland Dreier <rdreier@cisco.com>
1867 2008-05-07  Robert Millan  <rmh@aybabtu.com>
1869         * disk/lvm.c (grub_lvm_scan_device): Detect errors in an additional
1870         grub_strstr() call.  Correct a few mistakes in failure path handling.
1872 2008-05-06  Robert Millan  <rmh@aybabtu.com>
1874         * util/update-grub_lib.in (make_system_path_relative_to_its_root):
1875         Do not print a trailing slash (therefore, the root directory is an
1876         empty string).
1877         (convert_system_path_to_grub_path): Do not remove trailing slash
1878         from make_system_path_relative_to_its_root() output.
1880         * util/i386/pc/grub-install.in: Add trailing slash to output from
1881         make_system_path_relative_to_its_root().
1883 2008-05-06  Robert Millan  <rmh@aybabtu.com>
1885         * util/grub-fstest.c (grub_refresh): Call `fflush (stdout)'.  This
1886         ensures that output lines aren't intermangled with those sent to
1887         stderr (via grub_util_info()).
1888         * util/grub-probe.c (grub_refresh): Likewise.
1889         * util/i386/pc/grub-setup.c (grub_refresh): Likewise.
1891 2008-05-05  Christian Franke  <franke@computer.org>
1893         * util/grub-mkdevicemap.c (get_floppy_disk_name) [__CYGWIN__]:
1894         Add Cygwin device names.
1895         (get_ide_disk_name) [__CYGWIN__]: Likewise.
1896         (get_scsi_disk_name) [__CYGWIN__]: Likewise.
1897         (check_device): Return error instead of success on empty name.
1898         (make_device_map): Move label inside linux specific code to
1899         prevent compiler warning.
1901 2008-04-30  Robert Millan  <rmh@aybabtu.com>
1903         Based on patch from Fabian Greffrath <greffrath@leat.rub.de>
1904         * util/grub.d/10_linux.in: Add ${GRUB_CMDLINE_LINUX_DEFAULT} to the
1905         first boot option.
1906         * util/update-grub.in: Export GRUB_CMDLINE_LINUX_DEFAULT.
1908 2008-04-29  Robert Millan  <rmh@aybabtu.com>
1910         * docs/grub.cfg: New file (example GRUB configuration).
1912 2008-04-26  Robert Millan  <rmh@aybabtu.com>
1914         * DISTLIST: Sort (sort -u < DISTLIST | sponge DISTLIST).  Add
1915         `loader/i386/ieee1275/linux.c', `loader/i386/ieee1275/linux_normal.c'
1916         and `disk/ieee1275/nand.c'.
1918 2008-04-25  Bean  <bean123ch@gmail.com>
1920         * Makefile.in (RMKFILES): Add missing arch i386-ieee1275 and
1921         i386-linuxbios.
1923         * commands/hexdump.c (grub_cmd_hexdump): Support dumping of device,
1924         change the buffer size to 4096 for cdrom device.
1926         * conf/i386-ieee1275.rmk (pkglib_MODULES): Add _linux.mod, linux.mod
1927         and nand.mod.
1928         (_linux_mod_SOURCES): New variable.
1929         (_linux_mod_CFLAGS): Likewise.
1930         (_linux_mod_LDFLAGS): Likewise.
1931         (linux_mod_SOURCES): Likewise.
1932         (linux_mod_CFLAGS): Likewise.
1933         (linux_mod_LDFLAGS): Likewise.
1934         (nand_mod_SOURCES): Likewise.
1935         (nand_mod_CFLAGS): Likewise.
1936         (nand_mod_LDFLAGS): Likewise.
1938         * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Return
1939         GRUB_ERR_UNKNOWN_DEVICE instead of GRUB_ERR_BAD_DEVICE if no device
1940         type property. (nand device in olpc don't have this property)
1942         * include/grub/disk.h (grub_disk_dev_id): New macro
1943         GRUB_DISK_DEVICE_NAND_ID.
1945         * include/grub/i386/ieee1275/loader.h (grub_rescue_cmd_linux): New
1946         function prototype.
1947         (grub_rescue_cmd_initrd): Likewise.
1949         * include/grub/i386/linux.h (GRUB_LINUX_OFW_SIGNATURE): New macro.
1950         (linux_kernel_params): Add new member ofw_signature, ofw_num_items,
1951         ofw_cif_handler and ofw_idt, adjust padding number.
1953         * include/grub/i386/pc/memory.h (grub_upper_mem): Export it if
1954         GRUB_MACHINE_IEEE1275 is defined.
1956         * include/grub/ieee1275/ieee1275.h (grub_available_iterate):
1957         Use NESTED_FUNC_ATTR attribute on the hook parameter.
1959         * kern/powerpc/ieee1275/init.c (grub_claim_heap): Use NESTED_FUNC_ATTR
1960         on nested function heap_init.
1961         (grub_upper_mem): New variable for i386-ieee1275.
1962         (grub_get_extended_memory): New function for i386-ieee1275.
1963         (grub_machine_init): Call grub_get_extended_memory for i386-ieee1275.
1965         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Use
1966         NESTED_FUNC_ATTR on the hook parameter. Don't quit if no device type
1967         property.
1969         * loader/i386/ieee1275/linux.c: New file.
1971         * loader/i386/ieee1275/linux_normal.c: New file.
1973         * disk/ieee1275/nand.c: New file.
1975 2008-04-18  Thomas Schwinge  <tschwinge@gnu.org>
1977         * util/i386/pc/grub-mkrescue.in (grub_mkimage): Don't overwrite correct
1978         value.
1979         * util/powerpc/ieee1275/grub-mkrescue.in (grub_mkimage): Likewise.
1981 2008-04-18  Robert Millan  <rmh@aybabtu.com>
1983         Restructures early code path on ieee1275 to unify grub_main() as
1984         the first C function that is executed in every platform.
1986         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_init): New prototype.
1987         * kern/i386/ieee1275/startup.S (_start): Jump to grub_main() instead of
1988         cmain().
1989         * kern/powerpc/ieee1275/crt0.S (_start): Likewise.
1990         * kern/ieee1275/cmain.c (cmain): Rename to ...
1991         * kern/ieee1275/cmain.c (grub_ieee1275_init): ... this.
1992         * kern/ieee1275/init.c (grub_machine_init): Call grub_ieee1275_init()
1993         at the beginning.
1995 2008-04-18  Robert Millan  <rmh@aybabtu.com>
1997         * util/update-grub.in: Fix syntax error when setting
1998         `GRUB_PRELOAD_MODULES'.
1999         Reported by Stephane Chazelas <stephane@artesyncp.com>
2001 2008-04-17  Lubomir Kundrak  <lkundrak@redhat.com>
2003         * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): take only .text
2004         section into account, newer toolchains generate unique build ids
2005         * configure.ac: remove the test for --build-id=none acceptance,
2006         we want build ids to be preserved
2007         * genmk.rb: add -R .note.gnu.build-id to objcopy, so build id
2008         far from other sections don't cause the raw binary images grow
2009         size
2011 2008-04-15  Robert Millan  <rmh@aybabtu.com>
2013         * disk/lvm.c: Update copyright year.
2014         * kern/misc.c: Likewise.
2016 2008-04-14  Vesa Jaaskelainen  <chaac@nic.fi>
2018         * disk/lvm.c (grub_lvm_scan_device): Add forgotten failure path when
2019         there is no memory left for physical volume name.
2021 2008-04-14  Vesa Jaaskelainen  <chaac@nic.fi>
2023         * disk/lvm.c (grub_lvm_scan_device): Fix logical volume's physical
2024         volume name mapping to support bigger than 9 character names properly.
2026 2008-04-13  Robert Millan  <rmh@aybabtu.com>
2028         * disk/i386/pc/biosdisk.c (grub_biosdisk_rw): Fix CHS limit check,
2029         as per http://www.allensmith.net/Storage/HDDlimit/Int13h.htm
2031 2008-04-13  Christian Franke  <franke@computer.org>
2033         * util/i386/pc/grub-mkrescue.in: Add --emulation=floppy
2034         to create a floppy emulation boot CD when non emulation mode
2035         does not work.
2036         Enable Joliet CD filesystem extension.
2038 2008-04-13  Robert Millan  <rmh@aybabtu.com>
2040         * kern/misc.c (grub_strncat): Fix off-by-one error.
2041         Reported by Zhang Huan <zhanghuan@nrchpc.ac.cn>
2043         * kern/env.c (grub_env_context_close): Clear current context, not
2044         previous one.
2045         Patch from Zhang Huan <zhanghuan@nrchpc.ac.cn>
2047         * kern/misc.c (grub_strcat): Minor speed optimization (same code size).
2049 2008-04-13  Robert Millan  <rmh@aybabtu.com>
2051         Improve robustness when handling LVM.
2053         * disk/lvm.c (grub_lvm_getvalue): Return 0 when `*p' is NULL
2054         (and leave `*p' unmodified).
2055         (grub_lvm_iterate): Don't assume `vg->lvs != NULL' when iterating
2056         through it.
2057         (grub_lvm_memberlist): Don't assume `lv->vg->pvs != NULL' when
2058         iterating through it.
2059         (grub_lvm_open): Don't assume `vg->lvs != NULL' when iterating
2060         through it.
2061         (grub_lvm_scan_device): Check the return value (and fail gracefully
2062         when due) on each grub_lvm_getvalue() or grub_strstr() call.
2063         Don't assume `vg->pvs != NULL' when iterating through it.
2065 2008-04-13  Robert Millan  <rmh@aybabtu.com>
2067         * gendistlist.sh (EXTRA_DISTFILES): Add `genpartmaplist.sh'.
2068         * genmk.rb (partmap): New variable.
2069         (CLEANFILES, PARTMAPFILES): Add #{partmap}.
2070         (#{partmap}): New target rule.
2071         * genpartmaplist.sh: New file.
2072         * Makefile.in (pkglib_DATA): Add partmap.lst.
2073         (partmap.lst): New target rule.
2074         * util/i386/pc/grub-mkrescue.in: Generate grub.cfg that loads needed
2075         modules (including all partition maps), instead of preloading them.
2077 2007-04-13  Fabian Greffrath  <fabian.greffrath@web.de>
2079         * util/grub.d/30_os-prober.in: New script. Use `os-prober' and
2080         `linux-boot-prober' (if installed) to detect other operating
2081         systems which are installed on the computer and add them to
2082         the boot menu.
2083         * conf/common.rmk: Build and install 30_os-prober.
2085 2008-04-12  Robert Millan  <rmh@aybabtu.com>
2087         * kern/powerpc/ieee1275/init.c: Move from here ...
2088         * kern/ieee1275/init.c: ... to here.  Update all users.
2090         * kern/powerpc/ieee1275/cmain.c: Move from here ...
2091         * kern/ieee1275/cmain.c: ... to here.  Update all users.
2093         * kern/powerpc/ieee1275/openfw.c: Move from here ...
2094         * kern/ieee1275/openfw.c: ... to here.  Update all users.
2096         * loader/powerpc/ieee1275/multiboot2.c: Move from here ...
2097         * loader/ieee1275/multiboot2.c: ... to here.  Update all users.
2099 2008-04-10  Pavel Roskin  <proski@gnu.org>
2101         * configure.ac: Always use "_cv_" in cache variables for
2102         compatibility with Autoconf 2.62.
2104 2008-04-07  Robert Millan  <rmh@aybabtu.com>
2106         Revert grub/machine/init.h addition by Pavel (since it breaks on
2107         i386-ieee1275 and others):
2108         * util/i386/pc/misc.c: Remove grub/machine/init.h.
2109         * util/powerpc/ieee1275/misc.c: Likewise.
2111 2008-04-07  Robert Millan  <rmh@aybabtu.com>
2113         * util/grub-probe.c (probe): Improve error message.
2115 2008-04-07  Robert Millan  <rmh@aybabtu.com>
2117         * util/biosdisk.c (read_device_map): Skip devices that don't exist
2118         (this prevents the presence of a bogus entry from ruining the whole
2119         thing).
2121 2008-04-06  Pavel Roskin  <proski@gnu.org>
2123         * util/biosdisk.c: Include grub/util/biosdisk.h.
2124         * util/grub-fstest.c (execute_command): Make static.
2125         * util/grub-mkdevicemap.c (check_device): Likewise.
2126         * util/i386/pc/misc.c: Include grub/machine/init.h.
2127         * util/powerpc/ieee1275/misc.c: Likewise.
2128         * util/lvm.c: Include grub/util/lvm.h.
2129         * util/misc.c: Include grub/kernel.h, grub/misc.h and
2130         grub/cache.h.
2131         * util/raid.c: Include grub/util/raid.h.
2132         (grub_util_getdiskname): Make static.
2134         * util/grub-emu.c (main): Remove calls to grub_hostfs_init() and
2135         grub_hostfs_fini(), as they are called from grub_init_all() and
2136         grub_fini_all() respectively.  This fixes an infinite loop in
2137         grub-fstest due to double registration of hostfs.
2138         Reported by Christian Franke <Christian.Franke@t-online.de>
2140 2008-04-05  Pavel Roskin  <proski@gnu.org>
2142         * bus/pci.c (grub_pci_iterate): For multifunction devices, probe
2143         all 8 functions.  Otherwise, probe function 0 only.
2145 2008-04-04  Pavel Roskin  <proski@gnu.org>
2147         * commands/lspci.c (grub_lspci_iter): Print the bus number
2148         correctly.
2150         * commands/lspci.c (grub_pci_classes): Fix typos.
2151         (grub_lspci_iter): Don't print func twice.  Print vendor ID
2152         before device ID, as it's normally done.
2154         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
2155         Fix signedness warnings.
2156         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate):
2157         Likewise.
2158         * util/ieee1275/get_disk_name.c: Include config.h so that
2159         _GNU_SOURCE is defined and getline() is declared.  Mark an
2160         unused argument as such.  Fix a signedness warning.
2162 2008-04-02  Pavel Roskin  <proski@gnu.org>
2164         * genkernsyms.sh.in: Use more robust assignments for CC and
2165         srcdir.  Quote srcdir.
2166         * gensymlist.sh.in: Likewise.  Assert at the compile time that
2167         the symbol table is not empty.
2169         * disk/raid.c (grub_raid_memberlist): Fix a signedness warning.
2170         * fs/cpio.c (grub_cpio_read): Likewise.
2172 2008-04-01  Pavel Roskin  <proski@gnu.org>
2174         * disk/ata.c (grub_ata_open): Don't lose precision in disk->id.
2175         * disk/host.c (grub_host_open): Likewise.
2176         * disk/loopback.c (grub_loopback_open): Likewise.
2177         * disk/memdisk.c (grub_memdisk_open): Use a string pointer for
2178         disk->id as in disk/host.c, not a multi-character constant.
2180         * util/grub-fstest.c (cmd_cmp): Use fseeko(), not fseek().  The
2181         later is obsolete, potentially dangerous and sets a bad example.
2182         * util/i386/efi/grub-mkimage.c (make_header): Likewise.
2183         * util/misc.c (grub_util_get_image_size): Likewise.
2185         * disk/loopback.c (options): Improve help for "--partitions".
2187         * normal/arg.c (grub_arg_show_help): Fix spacing of the long
2188         options to align them with the short options, e.g. "echo -e".
2190 2008-03-31  Bean  <bean123ch@gmail.com>
2192         * video/reader/png.c (grub_png_data): New member is_16bit and
2193         image_data.
2194         (grub_png_decode_image_header): Detect 16 bit png image.
2195         (grub_png_convert_image): New function to convert 16 bit image to 8 bit.
2196         (grub_png_decode_png): Call grub_png_convert_image for 16 bit image.
2197         (grub_video_reader_png): Release memory occupied by image_data.
2199         * fs/ntfs.c (find_attr): Handle non-resident attribute list larger than
2200         4096 bytes.
2201         (grub_nfs_mount): Skip the test for sector per cluster.
2203         * include/grub/ntfs.h (MAX_SPC): Removed.
2205 2008-03-31  Bean  <bean123ch@gmail.com>
2207         * conf/common.rmk (pkgdata_MODULES): Add afs.mod.
2208         (grub_probe_SOURCES): Add fs/afs.c.
2209         (grub_fstest_SOURCES): Likewise.
2210         (afs_mod_SOURCES): New variable.
2211         (afs_mod_CFLAGS): Likewise.
2212         (afs_mod_LDFLAGS): Likewise.
2214         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/afs.c.
2215         (grub_emu_SOURCES): Likewise.
2217         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
2219         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2221         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
2223         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2225         * fs/afs.c: New file.
2227 2008-03-30  Pavel Roskin  <proski@gnu.org>
2229         * disk/host.c: Include grub/misc.h to fix a warning.
2230         * util/hostfs.c: Use GRUB_MOD_INIT and GRUB_MOD_FINI to fix
2231         warnings about implicit declarations.
2233         * fs/udf.c (grub_udf_mount): Fix warning about a shadowing a
2234         variable.
2235         * include/grub/i386/loader.h: Change declaration of
2236         grub_linux_boot() to match what grub_loader_set() expects.
2237         * util/getroot.c (grub_guess_root_device): Return const char* to
2238         fix a warning.
2239         * util/grub-probe.c (probe): Fix a warning about uninitialized
2240         abstraction_name variable.
2241         * util/i386/get_disk_name.c (grub_util_get_disk_name): Mark
2242         second argument as unused to fix a warning.
2244         * loader/i386/pc/multiboot2.c (grub_mb2_arch_elf64_hook): Add
2245         missing grub_error() call.
2247         * util/update-grub_lib.in: Define datarootdir, since Autoconf
2248         2.60 and newer uses it to define datadir.
2250         * commands/sleep.c: Fix warning about implicit declaration.
2251         * disk/memdisk.c: Likewise.
2252         * loader/aout.c: Likewise.
2253         * loader/i386/bsd_normal.c: Likewise.
2254         * util/grub-probe.c: Likewise.
2256         * commands/i386/cpuid.c (has_longmode): Make static.
2257         * disk/i386/pc/biosdisk.c (cd_drive): Likewise.
2258         * include/grub/i386/bsd.h (bios_memmap_t): Remove, it's unused.
2260         * kern/i386/pc/startup.S (real_to_prot): Use %cs prefix to load
2261         GDT.  This is more robust, as %ds can change.
2262         (grub_biosdisk_rw_int13_extensions): Don't clear %ds before
2263         calling real_to_prot().
2264         (grub_biosdisk_get_diskinfo_int13_extensions): Likewise.
2266 2008-03-28  Pavel Roskin  <proski@gnu.org>
2268         * kern/i386/pc/startup.S: Assert that uncompressed functions
2269         don't spill beyond GRUB_KERNEL_MACHINE_RAW_SIZE.
2270         * kern/i386/pc/lzo1x.S: Remove all .align directives in the
2271         code, as they push parts of the code (error handlers) beyond
2272         GRUB_KERNEL_MACHINE_RAW_SIZE.  Speed is not as important in this
2273         code as correctness and size.
2275 2008-03-28  Pavel Roskin  <proski@gnu.org>
2277         * kern/i386/pc/startup.S
2278         (grub_biosdisk_get_diskinfo_int13_extensions): When converting
2279         data block address to the real mode, keep offset minimal.  This
2280         works around a bug in AWARD BIOS on old Athlon systems, which
2281         makes CD detection hang.
2283 2008-03-26  Pavel Roskin  <proski@gnu.org>
2285         * normal/color.c (grub_parse_color_name_pair): Make `name' a
2286         const.
2287         * include/grub/normal.h: Add grub_parse_color_name_pair()
2288         declaration.
2290 2008-03-24  Bean  <bean123ch@gmail.com>
2292         * disk/i386/pc/biosdisk.c (cd_start): Removed.
2293         (cd_count): Removed.
2294         (cd_drive): New variable.
2295         (grub_biosdisk_get_drive): Don't check for (cdN) device.
2296         (grub_biosdisk_call_hook): Likewise.
2297         (grub_biosdisk_iterate): Change cdrom detection method.
2298         (grub_biosdisk_open): Replace cd_start with cd_drive.
2299         (GRUB_MOD_INIT): Use grub_biosdisk_get_cdinfo_int13_extension to
2300         detect cdrom device.
2302         * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_MACHINE_CDROM_START):
2303         Removed.
2304         (GRUB_BIOSDISK_MACHINE_CDROM_END): Removed.
2305         (GRUB_BIOSDISK_CDTYPE_NO_EMUL): New macro.
2306         (GRUB_BIOSDISK_CDTYPE_1_2_M): Likewise.
2307         (GRUB_BIOSDISK_CDTYPE_1_44_M): Likewise.
2308         (GRUB_BIOSDISK_CDTYPE_2_88_M): Likewise.
2309         (GRUB_BIOSDISK_CDTYPE_HARDDISK): Likewise.
2310         (GRUB_BIOSDISK_CDTYPE_MASK): Likewise.
2311         (grub_biosdisk_cdrp): New structure.
2312         (grub_biosdisk_get_cdinfo_int13_extensions): New function.
2314         * include/grub/i386/pc/kernel.h (grub_boot_drive): Export this variable.
2316         * kern/i386/pc/init.c (make_install_device): Don't use (cdN) as root
2317         device.
2319         * kern/i386/pc/startup.S (grub_biosdisk_get_cdinfo_int13_extensions):
2320         New function.
2322 2008-03-20  Robert Millan  <rmh@aybabtu.com>
2324         Remove 2 TiB limit in ata.mod.
2325         * disk/ata.c (grub_ata_device): Promote `size' to grub_uint64_t.
2326         (grub_ata_dumpinfo): Print sector count with 0x%llx.
2327         (grub_ata_identify): Interpret `&info16[100]' as a pointer to
2328         grub_uint64_t instead of grub_uint32_t.
2330 2008-03-05  Bean  <bean123ch@gmail.com>
2332         * loader/i386/pc/multiboot.c (grub_multiboot_get_bootdev): New function.
2333         (grub_multiboot): Set boot device.
2335         * boot/i386/pc/lnxboot.S (real_code_2): Set %dh to 0xFF.
2337 2008-03-02  Bean  <bean123ch@gmail.com>
2339         * fs/reiserfs.c (grub_reiserfs_read_symlink): Add 0 at the end of
2340         symlink_buffer.
2342 2008-03-01  Yoshinori K. Okuji  <okuji@enbug.org>
2344         * DISTLIST: Added docs/fdl.texi, docs/grub.texi, docs/mdate-sh and
2345         texinfo.tex.
2347         * docs/grub.texi: New file. Copied from GRUB Legacy, and slightly
2348         modified.
2350         * docs/fdl.texi: New file.
2352         * docs/mdate-sh: New file. Copied from gnulib.
2353         * docs/texinfo.tex: Likewise.
2355         * config.guess: Updated from gnulib.
2356         * install-sh: Likewise.
2358 2008-02-28  Robert Millan  <rmh@aybabtu.com>
2360         * conf/i386-linuxbios.rmk (pkglib_MODULES): Add aout.mod.
2361         (aout_mod_SOURCES): New variable.
2362         (aout_mod_CFLAGS): Likewise.
2363         (aout_mod_LDFLAGS): Likewise.
2365         * conf/i386-ieee1275.rmk: Likewise.
2367 2008-02-28  Robert Millan  <rmh@aybabtu.com>
2369         * util/update-grub.in: Reorganise terminal validity check.  Accept
2370         `ieee1275:console' (OLPC) and `*:gfxterm' as valid too.
2371         Based on suggestion by Franklin PIAT.
2373 2008-02-28  Fabian Greffrath  <greffrath@leat.rub.de>
2375         * include/grub/util/getroot.h (grub_util_check_block_device): Export new
2376         function.
2377         * util/getroot.c (grub_util_check_block_device): New function that
2378         returns the given argument if it is a block device and returns NULL else.
2379         * util/grub-probe.c (argument_is_device): New variable.
2380         (probe): Promote device_name from a variable to an argument. Receive
2381         device_name from grub_util_check_block_device() if path is NULL and from
2382         grub_guess_root_device() else. Do not free() device_name anymore.
2383         (options): Introduce new parameter '-d, --device'.
2384         (main): Add description of the new parameter to the help screen.
2385         Rename path variable to argument. Set argument_is_device if the '-d'
2386         option is given. Pass argument to probe() depending on
2387         argument_is_device.
2389 2008-02-24  Bean  <bean123ch@gmail.com>
2391         * fs/iso9660.c (GRUB_ISO9660_VOLDESC_BOOT): New macro.
2392         (GRUB_ISO9660_VOLDESC_PRIMARY): Likewise.
2393         (GRUB_ISO9660_VOLDESC_SUPP): Likewise.
2394         (GRUB_ISO9660_VOLDESC_PART): Likewise.
2395         (GRUB_ISO9660_VOLDESC_END): Likewise.
2396         (grub_iso9660_primary_voldesc): New member escape.
2397         (grub_iso9660_data): New member joliet.
2398         (grub_iso9660_convert_string): New function.
2399         (grub_iso9660_mount): Detect joliet extension.
2400         (grub_iso9660_iterate_dir): Convert filename when joliet is detected.
2401         (grub_iso9660_iso9660_label): Likewise.
2403         * conf/common.rmk (pkgdata_MODULES): Add udf.mod.
2404         (grub_setup_SOURCES): Add fs/udf.c.
2405         (grub_fstest_SOURCES): Likewise.
2406         (udf_mod_SOURCES): New variable.
2407         (udf_mod_CFLAGS): Likewise.
2408         (udf_mod_LDFLAGS): Likewise.
2410         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/udf.c.
2411         (grub_emu_SOURCES): Likewise.
2413         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
2415         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2417         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
2419         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2421         * fs/udf.c: New file.
2423 2008-02-24  Robert Millan  <rmh@aybabtu.com>
2425         * conf/i386-efi.rmk (normal/function.c_DEPENDENCIES)
2426         (normal/lexer.c_DEPENDENCIES): New variables.
2427         * conf/i386-ieee1275.rmk (normal/function.c_DEPENDENCIES)
2428         (normal/lexer.c_DEPENDENCIES): Likewise.
2429         * conf/i386-linuxbios.rmk (normal/function.c_DEPENDENCIES)
2430         (normal/lexer.c_DEPENDENCIES): Likewise.
2431         * conf/i386-pc.rmk (normal/function.c_DEPENDENCIES)
2432         (normal/lexer.c_DEPENDENCIES): Likewise.
2433         * conf/powerpc-ieee1275.rmk (normal/function.c_DEPENDENCIES)
2434         (normal/lexer.c_DEPENDENCIES): Likewise.
2435         * conf/sparc64-ieee1275.rmk (normal/function.c_DEPENDENCIES)
2436         (normal/lexer.c_DEPENDENCIES): Likewise.
2438 2008-02-23  Robert Millan  <rmh@aybabtu.com>
2440         * partmap/gpt.c (grub_gpt_magic): Add `0x' qualifier to each member,
2441         since they were intended to be in hex.  This didn't break previously
2442         because of a bug in gpt_partition_map_iterate() (see below).
2444         (gpt_partition_map_iterate): Replace `grub_memcmp' with `! grub_memcmp'
2445         when checking the validity of GPT header.
2446         Remove `partno', since it always provides the same information as `i'.
2448 2008-02-21  Yoshinori K. Okuji  <okuji@enbug.org>
2450         * include/grub/efi/time.h: Fix a wrong comment.
2452 2008-02-19  Pavel Roskin  <proski@gnu.org>
2454         * kern/rescue.c (grub_enter_rescue_mode): Improve initial
2455         message.
2457 2008-02-19  Bean  <bean123ch@gmail.com>
2459         * conf/i386-pc.rmk (pkglib_MODULES): Add aout.mod _bsd.mod and bsd.mod.
2460         (aout_mod_SOURCES): New variable.
2461         (aout_mod_CFLAGS): Likewise.
2462         (aout_mod_LDFLAGS): Likewise.
2463         (_bsd_mod_SOURCES): New variable.
2464         (_bsd_mod_CFLAGS): Likewise.
2465         (_bsd_mod_LDFLAGS): Likewise.
2466         (bsd_mod_SOURCES): New variable.
2467         (bsd_mod_CFLAGS): Likewise.
2468         (bsd_mod_LDFLAGS): Likewise.
2470         * include/grub/aout.h: New file.
2472         * include/grub/i386/loader.h (grub_unix_real_boot): New function.
2474         * include/grub/i386/bsd.h: New file.
2476         * include/grub/i386/pc/init.h (grub_get_mmap_entry): Use EXPORT_FUNC
2477         to make it public.
2479         * kern/elf.c (grub_elf32_load): Get the physical address after the hook
2480         function is called, so that it's possible to change it inside the hook.
2481         (grub_elf64_load): Likewise.
2482         (grub_elf_file): Don't close the file if elf header is not found.
2483         (grub_elf_close): Close the file if grub_elf_file fails (The new
2484         grub_elf_file won't close it).
2485         (grub_elf32_size): Use NESTED_FUNC_ATTR for nested function calcsize.
2486         (grub_elf64_size): Likewise.
2488         * kern/i386/loader.S (grub_unix_real_boot): New function.
2490         * loader/aout.c: New file.
2492         * loader/i386/bsd.c: New file.
2494         * loader/i386/bsd_normal.c: New file.
2496         * loader/i386/pc/multiboot.c (grub_multiboot): Handle a.out format.
2498         * loader/multiboot2.c (grub_multiboot2): Reset grub_errno so that it
2499         can test other formats.
2501 2008-02-19  Robert Millan  <rmh@aybabtu.com>
2503         * partmap/gpt.c: Include `<grub/gpt_partition.h>'.
2504         (grub_gpt_partition_type_empty): Redefine with macro from
2505         `<grub/gpt_partition.h>'.
2506         (gpt_partition_map_iterate): Adjust partition type comparison.
2508         Export `entry' as partmap-specific `part.data' struct.
2509         (grub_gpt_header, grub_gpt_partentry): Move from here ...
2511         * include/grub/gpt_partition.h (grub_gpt_header)
2512         (grub_gpt_partentry): ... to here (new file).
2514         * util/i386/pc/grub-setup.c: Include `<grub/gpt_partition.h>'.
2516         (grub_gpt_partition_type_bios_boot): New const variable, defined
2517         with macro from `<grub/gpt_partition.h>'.
2519         (setup): Replace `first_start' with `embed_region', which keeps
2520         track of the embed region (and is partmap-agnostic).
2522         Replace find_first_partition_start() with find_usable_region(),
2523         which finds a usable region for embedding using partmap-specific
2524         knowledge (supports PC/MSDOS and GPT).
2526         Fix all assumptions that the embed region start at sector 1, using
2527         `embed_region.start' from now on.  Similarly, use `embed_region.end'
2528         rather than `first_start' to calculate available size.
2530         In grub_util_info() message, replace "into after the MBR" with an
2531         indication of the specific sector our embed region starts at.
2533 2008-02-19  Robert Millan  <rmh@aybabtu.com>
2535         * DISTLIST: Replace `commands/ieee1275/halt.c' and
2536         `commands/ieee1275/reboot.c' with `commands/halt.c' and
2537         `commands/reboot.c'.
2538         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
2539         (halt_mod_SOURCES): Likewise.
2540         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
2541         (halt_mod_SOURCES): Likewise.
2543 2008-02-17  Christian Franke  <franke@computer.org>
2545         * commands/cat.c (grub_cmd_cat): Add break on GRUB_TERM_ESC key.
2547 2008-02-17  Robert Millan  <rmh@aybabtu.com>
2549         * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
2550         set `first_start' to 0 for non-PC/MSDOS partition maps.
2552 2008-02-16  Robert Millan  <rmh@aybabtu.com>
2554         * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
2555         do not assume partition map is PC/MSDOS before performing checks that
2556         are specific to that layout.
2558 2008-02-13  Robert Millan  <rmh@aybabtu.com>
2560         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Remove
2561         `commands/i386/pc/halt.c' and `commands/i386/pc/reboot.c'.
2562         * kern/i386/linuxbios/init.c (grub_halt, grub_reboot): Remove stubs.
2564 2008-02-13  Yoshinori K. Okuji  <okuji@enbug.org>
2566         * configure.ac: Only a cosmetic change on the handling of
2567         -fno-stack-protector.
2569 2008-02-12  Alexandre Boeglin  <alex@boeglin.org>
2571         * conf/i386-efi.rmk (grub_emu_SOURCES): Replace
2572         commands/i386/pc/halt.c and reboot.c by commands/halt.c and
2573         reboot.c.
2574         (grub_install_SOURCES): Add halt.mod and reboot.mod.
2575         (halt_mod_SOURCES): New variable.
2576         (halt_mod_CFLAGS): Likewise.
2577         (halt_mod_LDFLAGS): Likewise.
2578         (reboot_mod_SOURCES): Likewise.
2579         (reboot_mod_CFLAGS): Likewise.
2580         (reboot_mod_LDFLAGS): Likewise.
2582         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace
2583         commands/ieee1275/halt.c and reboot.c by commands/halt.c and
2584         reboot.c.
2585         (halt_mod_SOURCES): Likewise.
2586         (reboot_mod_SOURCES): Likewise.
2588         * conf/i386-pc.rmk (grub_emu_SOURCES): Replace
2589         commands/i386/pc/reboot.c by commands/reboot.c.
2590         (reboot_mod_SOURCES): Likewise.
2592         * commands/i386/pc/reboot.c: merge this file ...
2594         * commands/ieee1275/reboot.c: ... and this file ...
2596         * commands/reboot.c: ... to this file.
2597         Add some precompiler directive to include the correct header for
2598         each machine.
2600         * commands/ieee1275/halt.c: move this file ...
2602         * commands/halt.c: ... to here.
2603         Add some precompiler directive to include the correct header for
2604         each machine.
2606         * include/grub/efi/efi.h (grub_reboot): New function declaration.
2607         (grub_halt): Likewise.
2609         * kern/efi/efi.c (grub_reboot): New function.
2610         (grub_halt): Likewise.
2612 2008-02-12  Robert Millan  <rmh@aybabtu.com>
2614         * util/getroot.c (grub_guess_root_device): Inspect /dev/evms before
2615         /dev (like it is done for /dev/mapper).  This doesn't provide support
2616         for EVMS, but at least it is now easy to identify the problem when it
2617         arises.
2619 2008-02-11  Robert Millan  <rmh@aybabtu.com>
2621         * util/biosdisk.c (grub_util_biosdisk_open, linux_find_partition)
2622         (grub_util_biosdisk_get_grub_dev): Check open() exit status by
2623         comparing it with -1, not 0.
2625 2008-02-10  Robert Millan  <rmh@aybabtu.com>
2627         * conf/i386-efi.rmk (grub_emu_SOURCES): Add `disk/raid.c' and
2628         `disk/lvm.c'.
2629         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2630         * conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
2632         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Move `disk/raid.c' and
2633         `disk/lvm.c' to the end of the list.
2634         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
2635         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
2637 2008-02-10  Robert Millan  <rmh@aybabtu.com>
2639         * kern/main.c (grub_load_normal_mode): Do not reset `grub_errno'.  Call
2640         grub_print_error() instead.  This will let user know why we're entering
2641         rescue mode.
2642         Based on suggestions from Sam Morris.
2644 2008-02-10  Alexandre Boeglin  <alex@boeglin.org>
2646         * normal/arg.c (grub_arg_parse): If one of the args is "--", call add_arg()
2647         on remaining N args, instead of "--" arg N times.
2649 2008-02-09  Vesa Jaaskelainen  <chaac@nic.fi>
2651         * font/manager.c (unknown_glyph): Added variable for unknown glyph.
2652         (fill_with_default_glyph): Changed to use unknown_glyph for fill
2653         pattern for unknown glyphs.
2655 2008-02-09  Robert Millan  <rmh@aybabtu.com>
2657         * configure.ac: Probe for `help2man'.
2658         * Makefile.in (builddir): New variable.
2659         (HELP2MAN): Likewise.  Set to `true' when @HELP2MAN@ doesn't provide it,
2660         or otherwise add a few flags/options to it.
2661         (install-local): For every executable utility or script that is
2662         installed, invoke $(HELP2MAN) to install a manpage based on --help
2663         output.
2665         * util/i386/pc/grub-install.in: Move down `update-grub_lib' sourcing, so
2666         that it doesn't prevent --help from working in build tree.
2668         * util/i386/pc/grub-mkrescue.in (usage): Replace `grub-devel@gnu.org'
2669         with `bug-grub@gnu.org'.
2670         * util/powerpc/ieee1275/grub-mkrescue.in (usage): Likewise.
2671         * util/update-grub.in (usage): New function.
2672         Implement proper argument check, with support for --help and --version
2673         (as well as existing -y).
2675 2008-02-09  Christian Franke  <franke@computer.org>
2677         * commands/cat.c (grub_cmd_cat): Print '\r' as hex to
2678         avoid overwriting previous output.
2679         * kern/rescue.c (grub_rescue_cmd_cat): Likewise.
2681 2008-02-09  Robert Millan  <rmh@aybabtu.com>
2683         * normal/menu.c (run_menu): If timeout is set to zero, don't bother
2684         drawing the menu.
2686 2008-02-09  Robert Millan  <rmh@aybabtu.com>
2688         * commands/sleep.c: New file.
2689         * conf/common.rmk (pkglib_MODULES): Add `commands/sleep.c'.
2690         (sleep_mod_SOURCES): New variable.
2691         (sleep_mod_CFLAGS): Likewise.
2692         (sleep_mod_LDFLAGS): Likewise.
2694 2008-02-09  Robert Millan  <rmh@aybabtu.com>
2696         * disk/raid.c (grub_raid_scan_device): Add a pair of sanity checks for
2697         situations in which we can deduce the RAID size and the superblock
2698         doesn't match it.
2700 2008-02-09  Robert Millan  <rmh@aybabtu.com>
2702         * disk/lvm.c [GRUB_UTIL] (grub_lvm_memberlist): New function.  Construct
2703         and return a grub_diskmemberlist_t composed of LVM physical volumes.
2704         [GRUB_UTIL] (grub_lvm_dev): Add `memberlist' member.
2706         * disk/raid.c [GRUB_UTIL] (grub_raid_memberlist): New function.  Construct
2707         and return a grub_diskmemberlist_t composed of physical array members.
2708         [GRUB_UTIL] (grub_raid_dev): Add `memberlist' member.
2710         * include/grub/disk.h [GRUB_UTIL] (grub_disk_memberlist): New struct
2711         prototype.
2712         [GRUB_UTIL] (struct grub_disk_dev): Add `memberlist' function pointer.
2713         [GRUB_UTIL] (struct grub_disk_memberlist): New struct declaration.
2714         [GRUB_UTIL] (grub_disk_memberlist_t): New typedef.
2716         * util/grub-probe.c (probe): Move partmap probing code from here ...
2717         (probe_partmap): ... to here.
2718         (probe): Use probe_partmap() once for the disk we're probing, and
2719         additionally, when such disk contains a memberlist() struct member,
2720         once for each disk that is contained in the structure returned by
2721         memberlist().
2723 2008-02-09  Robert Millan  <rmh@aybabtu.com>
2725         * util/grub-probe.c (main): When `verbosity > 1', set `debug'
2726         environment variable to 'all' in order to obtain debug output from
2727         non-util/ code.
2728         * util/i386/pc/grub-setup.c (main): Likewise.
2730 2008-02-08  Robert Millan  <rmh@aybabtu.com>
2732         * disk/raid.c (grub_raid_scan_device): Check for
2733         `array->device[sb.this_disk.number]' rather than for
2734         `array->device[sb.this_disk.number]->name', since the latter is not
2735         guaranteed to be accessible.
2737 2008-02-08  Robert Millan  <rmh@aybabtu.com>
2739         * disk/raid.c: Update copyright.
2740         * fs/cpio.c: Likewise.
2741         * include/grub/raid.h: Likewise.
2742         * loader/i386/pc/multiboot.c: Likewise.
2743         * util/hostfs.c: Likewise.
2745 2008-02-08  Robert Millan  <rmh@aybabtu.com>
2747         * include/grub/raid.h (struct grub_raid_array): Change type of `device'
2748         to a grub_disk_t array.
2749         * disk/raid.c (grub_raid_read): Replace `device[x].disk' accesses with
2750         `device[x]'.
2751         (grub_raid_scan_device): Replace `device[x].name' accesses with
2752         `device[x]->name'.  Simplify initialization of `array->device[x]'.
2754 2008-02-08  Robert Millan  <rmh@aybabtu.com>
2756         * disk/raid.c (grub_raid_open, grub_raid_scan_device): Add a few
2757         grub_dprintf() calls.
2758         * kern/disk.c (grub_disk_read): Include grub_errmsg in out of range
2759         error message.
2761 2008-02-07  Christian Franke  <franke@computer.org>
2763         * util/hostfs.c (grub_hostfs_open): Use fseeko and ftello
2764         instead of fseek and ftell to support large files.
2765         (grub_hostfs_read): Likewise.
2767 2008-02-07  Robert Millan  <rmh@aybabtu.com>
2769         Patch from Jeroen Dekkers.
2770         * disk/raid.c (grub_raid_scan_device): Reset `grub_errno' on disk
2771         failure, since successfully reading all array members might not be
2772         required.
2774 2008-02-06  Robert Millan  <rmh@aybabtu.com>
2776         * util/grub-probe.c (probe): Simplify partmap probing (with the
2777         assumption that the first word up to the underscore equals to
2778         the module name).
2780 2008-02-06  Christian Franke  <franke@computer.org>
2782         * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_NONE
2783         (and set *ofs = 0) instead of GRUB_ERR_FILE_NOT_FOUND on
2784         last block of a cpio or tar stream.
2785         Check for "TRAILER!!!" instead of any empty data
2786         block to detect last block of a cpio stream.
2787         (grub_cpio_dir): Fix constness of variable np.
2788         (grub_cpio_open): Return GRUB_ERR_FILE_NOT_FOUND if
2789         cpio or tar trailer is detected.  This fixes a crash
2790         on open of a non existing file.
2792 2008-02-05  Bean  <bean123ch@gmail.com>
2794         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Get physical
2795         address of entry.
2796         (grub_multiboot_load_elf64): Likewise.
2797         (grub_multiboot): Initialize mbi structure.
2799         * util/grub-fstest.c: Don't include unused header file script.h.
2801         * conf/common.rmk (grub-fstest.c_DEPENDENCIES): Move to the beginning
2802         of file.
2803         (grub_fstest_SOURCES): Likewise.
2805 2008-02-05  Robert Millan  <rmh@aybabtu.com>
2807         * include/grub/term.h (GRUB_TERM_LEFT, GRUB_TERM_RIGHT)
2808         (GRUB_TERM_UP, GRUB_TERM_DOWN, GRUB_TERM_HOME, GRUB_TERM_END)
2809         (GRUB_TERM_DC, GRUB_TERM_PPAGE, GRUB_TERM_NPAGE, GRUB_TERM_ESC)
2810         (GRUB_TERM_TAB, GRUB_TERM_BACKSPACE): New macros.
2812         * kern/i386/pc/startup.S: Include `<grub/term.h>'.
2813         (translation_table): Replace hardcoded values with macros
2814         provided by `<grub/term.h>'.
2816         * term/i386/pc/at_keyboard.c: Include `<grub/term.h>'.
2817         (keyboard_map): Correct/add a few values, with macros provided
2818         by `<grub/term.h>'.
2819         (keyboard_map_shift): Zero values that don't differ from their
2820         `keyboard_map' equivalents.
2821         (grub_console_checkkey): Optimize KEYBOARD_STATUS_CAPS_LOCK toggling.
2822         Discard the second scan code that is always sent by Caps lock.
2823         Only use `keyboard_map_shift' when it provides a non-zero value,
2824         otherwise fallback to `keyboard_map'.
2826 2008-02-04  Bean  <bean123ch@gmail.com>
2828         * Makefile.in (enable_grub_fstest): New variable.
2830         * conf/common.rmk (grub_fstest_init.lst): New rule.
2831         (grub_fstest_init.h): Likewise.
2832         (grub_fstest_init.c): Likewise.
2833         (util/grub-fstest.c_DEPENDENCIES): New variable.
2834         (grub_fstest_SOURCES): Likewise.
2836         * configure.ac (enable_grub_fstest): Check for --enable-grub-fstest.
2838         * util/grub-fstest.c: New file.
2840 2008-02-03  Yoshinori K. Okuji  <okuji@enbug.org>
2842         Make grub-setup handle a separate root device.
2844         * util/i386/pc/grub-setup.c (setup): Always open the root device,
2845         so that the root device can be compared with the destination
2846         device.
2847         When embedding the core image, if the root and destination devices
2848         are different, set ROOT_DRIVE to ROOT_DEV->DISK->ID. Otherwise, to
2849         0xFF.
2850         When not embedding, set ROOT_DRIVE to 0xFF.
2852 2008-02-03  Yoshinori K. Okuji  <okuji@enbug.org>
2854         Add support for having a grub directory in a different drive. This
2855         is still only the data handling part.
2857         * kern/i386/pc/startup.S (multiboot_trampoline): Set %dh to 0xFF.
2858         (codestart): Save %dh in GRUB_ROOT_DRIVE.
2859         (grub_root_drive): New variable.
2861         * kern/i386/pc/init.c (make_install_device): Use GRUB_ROOT_DRIVE
2862         instead of GRUB_BOOT_DRIVE to construct a device name. Set
2863         GRUB_ROOT_DRIVE to GRUB_BOOT_DRIVE if it is 0xFF, otherwise use it
2864         as it was.
2866         * include/grub/i386/pc/kernel.h (grub_root_drive): New prototype.
2868         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_ROOT_DRIVE): New
2869         macro.
2870         (GRUB_BOOT_MACHINE_DRIVE_CHECK): Set to 0x4f.
2872         * boot/i386/pc/pxeboot.S (_start): Set %dh to 0xFF. For now, this
2873         is bogus, because PXE booting does not specify any drive
2874         correctly.
2876         * boot/i386/pc/lnxboot.S (reg_edx): Set the second byte to 0xFF. I
2877         am not sure if this is really correct.
2879         * boot/i386/pc/cdboot.S: Set %dh to 0xFF, because the root drive
2880         is always identical to the boot drive when booting from a CD.
2882         * boot/i386/pc/boot.S (MOV_MEM_TO_AL): Removed. Not needed any
2883         longer.
2884         (root_drive): New variable.
2885         (real_start): Unconditionally set %dh to ROOT_DRIVE.
2886         (setup_sectors): Push %dx right after popping it, because %dh will
2887         be modified later.
2888         (copy_buffer): Restore %dx.
2890 2008-02-03  Robert Millan  <rmh@aybabtu.com>
2892         * util/i386/pc/grub-mkrescue.in: Rewrite most of image generation to
2893         use `cdboot.img' for cdrom images.
2895 2008-02-03  Robert Millan  <rmh@aybabtu.com>
2897         * util/grub.d/00_header.in: Issue scripting commands for GRUB to
2898         only setup gfxterm when `font' command has succeeded.
2900 2008-02-03  Robert Millan  <rmh@aybabtu.com>
2902         * loader/multiboot_loader.c [GRUB_MACHINE_LINUXBIOS]
2903         (grub_rescue_cmd_multiboot_loader)
2904         (grub_rescue_cmd_module_loader): Enable multiboot1 calls.
2906 2008-02-03  Pavel Roskin  <proski@gnu.org>
2908         * kern/i386/pc/startup.S (grub_chainloader_real_boot): Pop
2909         %edx and %esi from stack only after grub_gate_a20() is called.
2910         grub_gate_a20() clobbers %edx.
2912 2008-02-03  Yoshinori K. Okuji  <okuji@enbug.org>
2914         * configure.ac (AC_INIT): Bumped to 1.96.
2916         * DISTLIST: Added boot/i386/pc/cdboot.S, bus/pci.c,
2917         commands/lspci.c,disk/memdisk.c, include/grub/pci.h,
2918         include/grub/i386/pc/pci.h, video/readers/jpeg.c, and
2919         video/readers/png.c.
2921 2008-02-03  Bean  <bean123ch@gmail.com>
2923         * conf/i386-pc.rmk (pkglib_IMAGES): Add cdboot.img.
2924         (cdboot_img_SOURCES): New variable.
2925         (cdboot_img_ASFLAGS): New variable.
2926         (cdboot_img_LDFLAGS): New variable.
2928         * boot/i386/pc/cdboot.S: New file.
2930         * disk/i386/pc/biosdisk.c (cd_start): New variable.
2931         (cd_count): Likewise.
2932         (grub_biosdisk_get_drive): Add support for cd device.
2933         (grub_biosdisk_call_hook): Likewise.
2934         (grub_biosdisk_iterate): Likewise.
2935         (grub_biosdisk_open): Likewise.
2936         (GRUB_BIOSDISK_CDROM_RETRY_COUNT): New macro.
2937         (grub_biosdisk_rw): Support reading from cd device.
2938         (GRUB_MOD_INIT): Iterate cd devices.
2940         * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_FLAG_CDROM): New macro.
2941         (GRUB_BIOSDISK_MACHINE_CDROM_START): Likewise.
2942         (GRUB_BIOSDISK_MACHINE_CDROM_END): Likewise.
2944         * kern/i386/pc/init.c (make_install_device): Check for cd device.
2946 2008-02-02  Robert Millan  <rmh@aybabtu.com>
2948         * commands/read.c: New file.
2949         * conf/common.rmk (pkglib_MODULES): Add `commands/read.c'.
2950         (read_mod_SOURCES): New variable.
2951         (read_mod_CFLAGS): Likewise.
2952         (read_mod_LDFLAGS): Likewise.
2954 2008-02-02  Robert Millan  <rmh@aybabtu.com>
2956         * normal/main.c (grub_normal_execute): Check for `menu->size' when
2957         determining whether menu has to be displayed.
2959 2008-02-02  Marco Gerards  <marco@gnu.org>
2961         * bus/pci.c: New file.
2963         * include/grub/pci.h: Likewise.
2965         * include/grub/i386/pc/pci.h: Likewise.
2967         * commands/lspci.c: Likewise.
2969         * conf/i386-pc.rmk (pkglib_MODULES): Add `pci.mod' and
2970         `lspci.mod'.
2971         (pci_mod_SOURCES): New variable.
2972         (pci_mod_CFLAGS): Likewise.
2973         (pci_mod_LDFLAGS): Likewise.
2974         (lspci_mod_SOURCES): Likewise.
2975         (lspci_mod_CFLAGS): Likewise.
2976         (lspci_mod_LDFLAGS): Likewise.
2978 2008-02-02  Bean  <bean123ch@gmail.com>
2980         * fs/ufs.c (INODE_BLKSZ): Fix incorrect value.
2981         (grub_ufs_get_file_block): Fix indirect block calculation problem.
2983         * fs/xfs.c (grub_xfs_sblock): New member log2_dirblk.
2984         (grub_xfs_btree_node): New structure.
2985         (grub_xfs_btree_root): New structure.
2986         (grub_xfs_inode): New members nblocks, extsize, nextents and btree.
2987         (GRUB_XFS_EXTENT_OFFSET): Use exts instead of inode->data.extents.
2988         (GRUB_XFS_EXTENT_BLOCK): Likewise.
2989         (GRUB_XFS_EXTENT_SIZE): Likewise.
2990         (grub_xfs_read_block): Support btree format type.
2991         (grub_xfs_iterate_dir): Use NESTED_FUNC_ATTR in call_hook.
2992         Use directory block as basic unit.
2994         * fs/fshelp.c (grub_fshelp_read_file): Bug fix for sparse block.
2996         * aclocal.m4 (grub_i386_CHECK_REGPARM_BUG): Define NESTED_FUNC_ATTR as
2997         __attribute__ ((__regparm__ (1))).
2999 2008-02-01  Robert Millan  <rmh@aybabtu.com>
3001         Correct a mistake in previous commit.
3003         * conf/i386-pc.rmk (normal/execute.c_DEPENDENCIES): Move to the
3004         top.
3005         (normal/command.c_DEPENDENCIES): New variable.
3007 2008-02-01  Robert Millan  <rmh@aybabtu.com>
3009         * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Move to the
3010         top.
3011         (normal/command.c_DEPENDENCIES): New variable.
3012         (grub-emu_DEPENDENCIES, normal_mod_DEPENDENCIES): Remove variables.
3013         * conf/i386-ieee1275.rmk: Likewise.
3014         * conf/i386-linuxbios.rmk: Likewise.
3015         * conf/i386-pc.rmk: Likewise.
3016         * conf/sparc64-ieee1275.rmk: Likewise.
3017         * conf/powerpc-ieee1275.rmk: Likewise.
3018         (grub_emu_SOURCES): Add `fs/fshelp.c'.
3020         * genmk.rb: Add `$(#{src}_DEPENDENCIES)' in targets that require it.
3022 2008-02-01  Robert Millan  <rmh@aybabtu.com>
3024         * kern/disk.c (grub_disk_read, grub_disk_write): Add grub_dprintf()
3025         call at beginning of function.
3027 2008-01-31  Pavel Roskin  <proski@gnu.org>
3029         * util/powerpc/ieee1275/grub-mkrescue.in: New file.
3030         * conf/powerpc-ieee1275.rmk (bin_SCRIPTS): New variable.
3031         (grub_mkrescue_SOURCES): Likewise.
3032         * DISTLIST: Add util/powerpc/ieee1275/grub-mkrescue.in.
3034 2008-01-30  Robert Millan  <rmh@aybabtu.com>
3036         * conf/i386-pc.rmk (sbin_UTILITIES): Remove `grub-probe'.
3037         (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Moved from here ...
3038         * conf/common.rmk (util/grub-probe.c_DEPENDENCIES)
3039         (grub_probe_SOURCES): ... to here.
3041         * conf/i386-efi.rmk (sbin_UTILITIES): Remove `grub-probe'.
3042         (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Remove.
3043         * conf/i386-ieee1275.rmk: Likewise.
3044         * conf/i386-linuxbios.rmk: Likewise.
3045         * conf/powerpc-ieee1275.rmk: Likewise.
3047 2008-01-30  Tristan Gingold  <gingold@free.fr>
3049         * kern/rescue.c: Silently accept empty lines.
3051 2008-01-29  Bean  <bean123ch@gmail.com>
3053         * boot/i386/pc/lnxboot.S (data_start): Code cleanup.
3054         (real_code_2): Code cleanup and change comment style.
3055         (move_memory): Avoid using 32-bit address mode.
3057 2008-01-29  Bean  <bean123ch@gmail.com>
3059         * conf/i386-pc.rmk (pkglib_MODULES): Add `png.mod'.
3060         (png_mod_SOURCES): New variable.
3061         (png_mod_CFLAGS): Likewise.
3062         (png_mod_LDFLAGS): Likewise.
3064         * video/readers/png.c: New file.
3066 2008-01-28  Robert Millan  <rmh@aybabtu.com>
3068         * include/grub/i386/linuxbios/kernel.h (GRUB_MOD_GAP): New macro.
3069         * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Remove
3070         `ifndef GRUB_MOD_GAP' hack.
3071         * util/elf/grub-mkimage.c (add_segments): Likewise.
3073 2008-01-27  Robert Millan  <rmh@aybabtu.com>
3075         * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Skip
3076         `GRUB_MOD_GAP' for platforms in which it's not defined.
3077         * util/elf/grub-mkimage.c (add_segments): Likewise.
3079 2008-01-27  Robert Millan  <rmh@aybabtu.com>
3081         Get grub-emu to build again (including parallel builds).
3083         * conf/i386-pc.rmk (util/grub-emu.c_DEPENDENCIES): Remove variable.
3084         Split into ...
3085         (util/grub-emu.c_DEPENDENCIES): ... this, ...
3086         (normal/execute.c_DEPENDENCIES): ... this, ...
3087         (grub-emu_DEPENDENCIES): ... and this.
3089         * conf/i386-efi.rmk: Likewise.
3090         * conf/i386-linuxbios.rmk: Likewise.
3091         * conf/i386-ieee1275.rmk: Likewise.
3092         * conf/powerpc-ieee1275.rmk: Likewise.
3093         (grub_emu_SOURCES): Remove duplicated `kern/file.c'.
3095 2008-01-27  Robert Millan  <rmh@aybabtu.com>
3097         * NEWS: Add a few items.
3099 2008-01-27  Robert Millan  <rmh@aybabtu.com>
3101         Fix parallel builds with grub-emu.  Based on earlier commit for
3102         grub-probe and grub-setup.
3104         * conf/i386-pc.rmk (grub-emu_DEPENDENCIES): Renamed to ...
3105         (util/grub-emu.c_DEPENDENCIES): ... this.
3106         * conf/i386-efi.rmk (grub-emu_DEPENDENCIES): Renamed to ...
3107         (util/grub-emu.c_DEPENDENCIES): ... this.
3108         * conf/i386-linuxbios.rmk (grub-emu_DEPENDENCIES): Renamed to ...
3109         (util/grub-emu.c_DEPENDENCIES): ... this.
3110         * conf/i386-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
3111         (util/grub-emu.c_DEPENDENCIES): ... this.
3112         * conf/powerpc-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
3113         (util/grub-emu.c_DEPENDENCIES): ... this.
3115 2008-01-27  Pavel Roskin  <proski@gnu.org>
3117         * include/grub/powerpc/ieee1275/kernel.h: Introduce GRUB_MOD_GAP
3118         to create a gap between _end and the modules added to the image
3119         with grub-mkrescue.  That fixes "CLAIM failed" on PowerMAC.
3120         * kern/powerpc/ieee1275/init.c: Use GRUB_MOD_GAP.
3121         * util/elf/grub-mkimage.c (add_segments): Likewise.
3123 2008-01-26  Pavel Roskin  <proski@gnu.org>
3125         * kern/dl.c (grub_dl_load): Don't abort if prefix is not set,
3126         just return an error.
3128 2008-01-26  Bean  <bean123ch@gmail.com>
3130         * fs/reiserfs.c (grub_fshelp_node): New member next_offset.
3131         (grub_reiserfs_get_item): Save offset of the next item.
3132         (grub_reiserfs_iterate_dir): Use next_offset to find next item.
3134 2008-01-25  Robert Millan  <rmh@aybabtu.com>
3136         * conf/i386-pc.rmk (grub_setup_SOURCES, grub_emu_SOURCES): Regroup to
3137         make all filesystem sources appear together (possibly fixing omissions
3138         while at it).
3139         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
3140         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3141         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
3142         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3144         * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.  Additionally,
3145         add `kern/file.c'.
3146         * conf/i386-efi.rmk (grub_probe_SOURCES): Likewise.
3147         * conf/i386-ieee1275.rmk (grub_probe_SOURCES): Likewise.
3148         * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Likewise.
3149         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Likewise.
3151         * util/grub-probe.c: Include `<grub/file.h>' and `<sys/stat.h>'.
3152         (probe): Add a sanity check to make sure of our ability to read
3153         requested files when probing for filesystem type.
3155         * genmk.rb: Update copyright year (2007).
3157         * include/grub/fs.h (grub_fat_init, grub_fat_fini, grub_ext2_init)
3158         (grub_ext2_fini, grub_ufs_init, grub_ufs_fini, grub_minix_init)
3159         (grub_minix_fini, grub_hfs_init, grub_hfs_fini, grub_jfs_init)
3160         (grub_jfs_fini, grub_xfs_init, grub_xfs_fini, grub_affs_init)
3161         (grub_affs_fini, grub_sfs_init, grub_sfs_fini, grub_iso9660_init)
3162         : Remove function prototypes.
3164 2008-01-25  Robert Millan  <rmh@aybabtu.com>
3166         Revert my previous commits (based on wrong assumption of how grub_errno
3167         works).
3169         * kern/disk.c (grub_disk_open): Stop resetting grub_errno.
3170         * kern/file.c (grub_file_open): Likewise.
3172 2008-01-24  Pavel Roskin  <proski@gnu.org>
3174         * include/grub/ieee1275/ieee1275.h: Introduce flag for firmwares
3175         that hang if GRUB tries to setup colors.
3176         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Don't set
3177         colors for firmwares that don't support it.
3178         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag):
3179         Recognize Open Hack'Ware, set flags to work around its
3180         limitations.
3182 2008-01-24  Robert Millan  <rmh@aybabtu.com>
3184         * kern/file.c (grub_file_open): Do not account previous failures of
3185         unrelated functions when grub_errno is checked for.
3186         Reported by Oleg Strikov.
3188 2008-01-24  Bean  <bean123ch@gmail.com>
3190         * fs/ufs.c (GRUB_UFS_VOLNAME_LEN): New macro.
3191         (grub_ufs_sblock): New member volume name.
3192         (grub_ufs_find_file): Fix string copy bug.
3193         (grub_ufs_label): Implement this function properly.
3195         * fs/hfs.c (grub_hfs_cnid_type): New enum.
3196         (grub_hfs_iterate_records): Use the correct file number for extents
3197         and catalog file. Fix problem in next index calculation.
3198         (grub_hfs_find_node): Replace recursive function call with loop.
3199         (grub_hfs_iterate_dir): Replace recursive function call with loop.
3201 2008-01-23  Robert Millan  <rmh@aybabtu.com>
3203         * include/grub/i386/ieee1275/loader.h: Include `<grub/types.h>',
3204         `<grub/symbol.h>' and `<grub/multiboot.h>'.
3205         (grub_multiboot2_real_boot): New function prototype.
3207         * include/grub/i386/pc/memory.h: Include `<grub/machine/machine.h>'.
3208         [!GRUB_MACHINE_IEEE1275] (grub_lower_mem, grub_upper_mem): Disable.
3210         * kern/i386/ieee1275/init.c (grub_os_area_addr)
3211         (grub_os_area_size, grub_lower_mem, grub_upper_mem): Remove variables.
3213 2008-01-23  Robert Millan  <rmh@aybabtu.com>
3215         * kern/mm.c (grub_mm_init_region): Replace grub_dprintf() call with
3216         #ifdef'ed out grub_printf().
3218 2008-01-23  Robert Millan  <rmh@aybabtu.com>
3220         * term/i386/pc/at_keyboard.c (grub_keyboard_isr): #ifdef out
3221         grub_dprintf calls, since they make "debug=all" mode unusable.
3222         (grub_console_checkkey): Likewise.
3224 2008-01-23  Robert Millan  <rmh@aybabtu.com>
3226         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
3227         `term/i386/pc/at_keyboard.c'.
3228         (pkglib_MODULES): Add `serial.mod'.
3229         (serial_mod_SOURCES): New variable.
3230         (serial_mod_CFLAGS): Likewise.
3231         (serial_mod_LDFLAGS): Likewise.
3233         * include/grub/i386/ieee1275/console.h: Add `<grub/symbol.h>'.  Remove
3234         `<grub/powerpc/ieee1275/console.h>'.
3235         (grub_keyboard_controller_init): New function prototype.
3236         (grub_console_checkkey): Likewise.
3237         (grub_console_getkey): Likewise.
3239         * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize AT
3240         keyboard on i386.
3242         * term/ieee1275/ofconsole.c (grub_ofconsole_term): On i386, use
3243         grub_ofconsole_checkkey() and grub_ofconsole_getkey() for input.
3245 2008-01-23  Robert Millan  <rmh@aybabtu.com>
3247         * kern/i386/pc/init.c (make_install_device): When memdisk image is
3248         present, "(memdisk)/boot/grub" becomes the default prefix.
3250         * util/i386/pc/grub-mkrescue.in: Switch to a minimal core.img plus
3251         a memdisk tarball with all the modules.  Add --overlay=DIR option that
3252         allows users to overlay additional files into the image.
3254 2008-01-23  Robert Millan  <rmh@aybabtu.com>
3256         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add `machine/loader.h'
3257         and `machine/memory.h'.
3258         (pkglib_MODULES): Add `multiboot.mod' and `_multiboot.mod'.
3259         (_multiboot_mod_SOURCES): New variable.
3260         (_multiboot_mod_CFLAGS): Likewise.
3261         (_multiboot_mod_LDFLAGS): Likewise.
3262         (multiboot_mod_SOURCES): Likewise.
3263         (multiboot_mod_CFLAGS): Likewise.
3264         (multiboot_mod_LDFLAGS): Likewise.
3266         * include/grub/i386/ieee1275/loader.h: New file.
3268         * include/grub/i386/ieee1275/machine.h: Likewise.
3270         * include/grub/i386/ieee1275/memory.h: Likewise.
3272         * include/grub/i386/pc/init.h (grub_os_area_addr): Remove (redundant)
3273         variable declaration.
3274         (grub_os_area_size): Likewise.
3276         * kern/i386/ieee1275/init.c (grub_os_area_addr, grub_os_area_size)
3277         (grub_lower_mem, grub_upper_mem): New variables.
3278         (grub_stop_floppy): New function (just to make
3279         grub_multiboot2_real_boot() happy).
3281         * kern/i386/ieee1275/startup.S: Include `<grub/machine/memory.h>',
3282         `<grub/cpu/linux.h>', `<multiboot.h>' and `<multiboot2.h>'.
3283         (grub_stop): New function.
3284         Include `"../realmode.S"' and `"../loader.S"'.
3286         * loader/multiboot_loader.c: Include `<grub/machine/machine.h>'.
3287         Replace `__i386__' #ifdefs with `GRUB_MACHINE_PCBIOS'.
3289         * loader/powerpc/ieee1275/multiboot2.c (grub_mb2_arch_boot): On i386,
3290         rely on grub_multiboot2_real_boot() for final boot.
3292 2008-01-22  Robert Millan  <rmh@aybabtu.com>
3294         * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): When
3295         `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag is set, skip any
3296         device that doesn't look like an SD card.
3297         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
3298         `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag.
3299         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag): Detect
3300         OLPC laptop, and set `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' when
3301         found.
3303 2008-01-22  Robert Millan  <rmh@aybabtu.com>
3305         * kern/powerpc/ieee1275/init.c (grub_claim_heap): Add sanity check to
3306         avoid claiming over our own code.
3308 2008-01-22  Bean  <bean123ch@gmail.com>
3310         * conf/i386-pc.rmk (pkglib_MODULES): Add `jpeg.mod'.
3311         (jpeg_mod_SOURCES): New variable.
3312         (jpeg_mod_CFLAGS): Likewise.
3313         (jpeg_mod_LDFLAGS): Likewise.
3315         * video/readers/jpeg.c : New file.
3317 2008-01-22  Bean  <bean123ch@gmail.com>
3319         * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_FILE_NOT_FOUND when
3320         there are no more items.
3322 2008-01-21  Robert Millan  <rmh@aybabtu.com>
3324         * kern/mm.c (grub_mm_init_region): Improve debug message.
3326 2008-01-21  Robert Millan  <rmh@aybabtu.com>
3328         * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): New variable.
3329         (kernel_img_LDFLAGS): Use `GRUB_MEMORY_MACHINE_LINK_ADDR' as link
3330         address.
3331         (grub_mkimage_CFLAGS): Propagate `GRUB_MEMORY_MACHINE_LINK_ADDR' as
3332         a C macro.
3333         * include/grub/i386/pc/memory.h (GRUB_MEMORY_MACHINE_UPPER): New macro.
3334         Indicates start of upper memory.
3335         * util/i386/pc/grub-mkimage.c: Include `<grub/machine/memory.h>'.
3336         (generate_image): Abort when image size is big enough to corrupt
3337         upper memory.
3339         * include/grub/i386/pc/vga.h: Include `<grub/machine/memory.h>'.
3340         (GRUB_MEMORY_MACHINE_VGA_ADDR): Alias for `GRUB_MEMORY_MACHINE_UPPER'.
3341         * term/i386/pc/vga.c (VGA_MEM): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
3342         instead of hardcoding 0xA0000.
3343         * video/i386/pc/vbe.c: Include `<grub/machine/vga.h>'.
3344         (grub_vbe_set_video_mode): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
3345         instead of hardcoding 0xA0000.
3347 2008-01-21  Robert Millan  <rmh@aybabtu.com>
3349         * disk/memdisk.c (memdisk_size): New variable.
3350         (grub_memdisk_open): Replace grub_arch_memdisk_size() call with
3351         `memdisk_size'.
3352         (grub_memdisk_init): Initialize `memdisk_size'.  Reallocate memdisk
3353         image to dynamic memory.
3354         (grub_memdisk_fini): Replace grub_arch_memdisk_size() call with
3355         `memdisk_size'.  Free memdisk block.
3357 2008-01-21  Robert Millan  <rmh@aybabtu.com>
3359         Fix detection of very small filesystems (like tar).
3361         * fs/reiserfs.c (grub_reiserfs_mount): When disk is too small to
3362         contain a ReiserFS, abort with GRUB_ERR_BAD_FS rather than
3363         GRUB_ERR_OUT_OF_RANGE (which made the upper layer think there's
3364         a problem with this disk).
3366 2008-01-21  Robert Millan  <rmh@aybabtu.com>
3368         * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Add debug message
3369         on grub_biosdisk_rw_standard() error.
3371 2008-01-21  Robert Millan  <rmh@aybabtu.com>
3373         * include/grub/ieee1275/ieee1275.h: Add 2008 to Copyright line for
3374         recent changes.
3375         * kern/elf.c: Likewise.
3376         * kern/ieee1275/ieee1275.c: Likewise.
3377         * kern/powerpc/ieee1275/openfw.c: Likewise.
3378         * term/ieee1275/ofconsole.c: Likewise.
3380 2008-01-21  Robert Millan  <rmh@aybabtu.com>
3382         * include/grub/i386/pc/kernel.h: Include `<grub/symbol.h>'.
3384         * include/grub/kernel.h (grub_arch_memdisk_addr)
3385         (grub_arch_memdisk_size): Moved from here ...
3387         * include/grub/i386/pc/kernel.h (grub_arch_memdisk_addr)
3388         (grub_arch_memdisk_size): ... to here.
3390 2008-01-21  Robert Millan  <rmh@aybabtu.com>
3392         Mostly based on bugfix from Bean.
3394         * kern/elf.c (grub_elf32_phdr_iterate): Use `NESTED_FUNC_ATTR'
3395         attribute with hook() parameter.
3396         (grub_elf32_load): Use `NESTED_FUNC_ATTR' with grub_elf32_load_segment()
3397         declaration.
3398         (grub_elf64_phdr_iterate): Use `NESTED_FUNC_ATTR'
3399         attribute with hook() parameter.
3400         (grub_elf64_load): Use `NESTED_FUNC_ATTR' with grub_elf64_load_segment()
3401         declaration.
3403 2008-01-21  Robert Millan  <rmh@aybabtu.com>
3405         * conf/i386-pc.rmk (kernel_img_HEADERS): Add `machine/kernel.h'.
3406         (pkglib_MODULES): Add `memdisk.mod'.
3407         (memdisk_mod_SOURCES): New variable.
3408         (memdisk_mod_CFLAGS): Likewise.
3409         (memdisk_mod_LDFLAGS): Likewise.
3411         * disk/memdisk.c: New file.
3413         * include/grub/disk.h (grub_disk_dev_id): Add
3414         `GRUB_DISK_DEVICE_MEMDISK_ID'.
3416         * include/grub/i386/pc/kernel.h
3417         (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): New macro.
3418         (GRUB_KERNEL_MACHINE_PREFIX): Increment by 4.
3419         (grub_kernel_image_size): New variable declaration.
3420         (grub_total_module_size): Likewise.
3421         (grub_memdisk_image_size): Likewise.
3423         * include/grub/i386/pc/memory.h
3424         (GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR): New macro.
3426         * include/grub/kernel.h: Include `<grub/symbol.h>'.
3427         (grub_arch_memdisk_addr): New variable declaration.
3428         (grub_arch_memdisk_size): Likewise.
3430         * kern/i386/pc/init.c (grub_arch_memdisk_addr): New function.
3431         (grub_arch_memdisk_size): Likewise.
3433         * kern/i386/pc/startup.S (grub_memdisk_image_size): New variable.
3434         (codestart): Replace hardcoded `0x100000' with
3435         `GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR' macro.
3437         * util/i386/pc/grub-mkimage.c: Include `<grub/misc.h>'.
3438         (generate_image): Add `memdisk_path' parameter.  When `memdisk_path' is
3439         not NULL, append the contents of the file it refers to, at the end of
3440         the compressed kernel image.  Initialize `grub_memdisk_image_size'
3441         variable (at `GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE' offset).
3442         (options): Add "memdisk"|'m' option.
3443         (main): Parse --memdisk|-m option, and pass user-provided path as
3444         parameter to generate_image().
3446 2008-01-20  Robert Millan  <rmh@aybabtu.com>
3448         * kern/sparc64/ieee1275/openfw.c (grub_devalias_iterate): Copy debug
3449         grub_dprintf() calls from here ...
3450         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): ... to here.
3452 2008-01-20  Robert Millan  <rmh@aybabtu.com>
3454         Fix detection of "real mode" when /options/real-mode? doesn't exist.
3456         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_mmu): New variable
3457         declaration.
3458         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_mmu): New variable.
3459         (grub_ieee1275_find_options): If `grub_ieee1275_mmu' is 0, set
3460         `GRUB_IEEE1275_FLAG_REAL_MODE'.
3461         (cmain): Initialize `grub_ieee1275_mmu' (using /chosen/mmu integer
3462         property).
3463         * kern/powerpc/ieee1275/openfw.c (grub_map): Rely on pre-initialized
3464         `grub_ieee1275_mmu' rather than obtaining a handler on every call.
3466 2008-01-19  Robert Millan  <rmh@aybabtu.com>
3468         Get rid of confusing function (superseded by
3469         `grub_ieee1275_get_integer_property')
3470         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_decode_int_4): Remove
3471         prototype.
3472         * kern/ieee1275/ieee1275.c (grub_ieee1275_decode_int_4): Remove
3473         function.
3474         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid use of
3475         grub_ieee1275_decode_int_4(), by obtaining integer properties directly
3476         in native endianness from grub_ieee1275_get_integer_property().
3478 2008-01-19  Robert Millan  <rmh@aybabtu.com>
3480         * kern/powerpc/ieee1275/openfw.c (grub_halt): Issue "power-off"
3481         command after "shut-down", since implementations differ on which
3482         the command for halt is.
3484 2008-01-19  Robert Millan  <rmh@aybabtu.com>
3486         * include/grub/i386/linuxbios/console.h: Add header protection.
3487         (grub_keyboard_controller_init): New function prototype.
3488         * term/i386/pc/at_keyboard.c (KEYBOARD_COMMAND_ISREADY): New macro.
3489         (KEYBOARD_COMMAND_READ): Likewise.
3490         (KEYBOARD_COMMAND_WRITE): Likewise.
3491         (KEYBOARD_SCANCODE_SET1): Likewise.
3492         (grub_keyboard_controller_write): New function.
3493         (grub_keyboard_controller_read): Likewise.
3494         (grub_keyboard_controller_init): Likewise.
3496         * term/i386/pc/console.c: Include `<grub/machine/machine.h>'.
3497         (grub_console_init): On coreboot/LinuxBIOS, call
3498         grub_keyboard_controller_init().
3500 2008-01-19  Robert Millan  <rmh@aybabtu.com>
3502         PowerPC changes provided by Pavel Roskin.
3504         * kern/powerpc/ieee1275/cmain.c (cmain): Don't take any arguments.
3505         * kern/powerpc/ieee1275/crt0.S: Store r5 in grub_ieee1275_entry_fn,
3506         don't rely on cmain() doing it.
3507         * kern/i386/ieee1275/startup.S (_start): Store %eax in
3508         grub_ieee1275_entry_fn, don't rely on cmain() doing it.
3510 2008-01-16  Robert Millan  <rmh@aybabtu.com>
3512         * include/grub/i386/linuxbios/memory.h
3513         (GRUB_MEMORY_MACHINE_LINUXBIOS_TABLE_ADDR): Remove macro.
3514         * kern/i386/linuxbios/table.c (grub_linuxbios_table_iterate): Do not
3515         receive `table_header' as argument.  Instead, probe for it in the
3516         known memory ranges where it can be present.
3517         (grub_available_iterate): Do not pass a fixed `table_header' address
3518         to grub_linuxbios_table_iterate().
3520 2008-01-15  Robert Millan  <rmh@aybabtu.com>
3522         * configure.ac: Add `i386-ieee1275' to the list of supported targets.
3523         * conf/i386-ieee1275.rmk: New file.
3524         * include/grub/i386/ieee1275/console.h: Likewise.
3525         * include/grub/i386/ieee1275/ieee1275.h: Likewise.
3526         * include/grub/i386/ieee1275/kernel.h: Likewise.
3527         * include/grub/i386/ieee1275/time.h: Likewise.
3528         * kern/i386/ieee1275/init.c: Likewise.
3529         * kern/i386/ieee1275/startup.S: Likewise.
3531 2008-01-15  Robert Millan  <rmh@aybabtu.com>
3533         * kern/misc.c (grub_vsprintf): Do not reset `longlongfmt' to zero
3534         when pointers are 32-bit (but still do set it to one when they are
3535         64-bit).
3537 2008-01-15  Robert Millan  <rmh@aybabtu.com>
3539         * include/grub/ieee1275/ieee1275.h
3540         (grub_ieee1275_get_integer_property): New function prototype.
3542         * kern/ieee1275/ieee1275.c: Include `<grub/types.h>'.
3543         (grub_ieee1275_get_integer_property): New function.  Wraps around
3544         grub_ieee1275_get_property() to handle endianness.
3546         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Replace
3547         grub_ieee1275_get_property() with grub_ieee1275_get_integer_property()
3548         where appropriate.
3549         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Likewise.
3550         (grub_map): Likewise.
3551         * kern/sparc64/ieee1275/openfw.c (grub_map): Likewise.
3553 2008-01-15  Bean  <bean123ch@gmail.com>
3555         * normal/execute.c (grub_script_exec_argument_to_string): Check for undefined variable.
3556         (grub_script_execute_cmdline): Reset grub_errno.
3558         * normal/main.c (read_config_file): Reset grub_errno.
3560         * normal/parse.y (script_init): New.
3561         (script): Move function and menuentry here.
3562         (delimiter): New.
3563         (command): Add delimiter at the end of command.
3564         (commands): Adjust to match the new command.
3565         (commandblock): Remove grub_script_lexer_record_start.
3566         (menuentry): Add grub_script_lexer_record_start, use the new commands.
3567         (if): Use the new commands.
3569         * conf/common.rmk (pkgdata_MODULES): Add echo.mod.
3571 2008-01-15  Robert Millan  <rmh@aybabtu.com>
3573         * normal/menu.c (run_menu): Move timeout message from here ...
3574         (print_timeout): ... to here.
3575         (run_menu): Use print_timeout() once during initial draw to print
3576         the whole message, and again in every clock tick to update only
3577         the number of seconds.
3579 2008-01-15  Robert Millan  <rmh@aybabtu.com>
3581         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Obtain
3582         actual size of `available' from grub_ieee1275_get_property(), and
3583         restrict parsing to that bound.
3585 2008-01-15  Christian Franke  <franke@computer.org>
3587         * util/grub-emu.c: Replace <argp.h> by <getopt.h>.
3588         (argp_program_version): Remove variable.
3589         (argp_program_bug_address): Likewise.
3590         (options): Convert from struct argp_option to struct option.
3591         (struct arguments): Remove.
3592         (parse_opt): Remove.
3593         (usage): New function.
3594         (main): Replace struct args members by simple variables.
3595         Replace argp_parse() by getopt_long().
3596         Add switch to evaluate options.
3597         Add missing "(...)" around root_dev in prefix string.
3599 2008-01-14  Robert Millan  <rmh@aybabtu.com>
3601         * kern/powerpc/ieee1275/init.c (grub_exit): Reimplement as a wrapper
3602         for grub_ieee1275_exit(), in order to improve portability.
3604 2008-01-14  Robert Millan  <rmh@aybabtu.com>
3606         * util/grub.d/10_linux.in (prefix): Define.
3607         (exec_prefix): Likewise.  Both definitions are later used by `libdir'.
3609 2008-01-13  Pavel Roskin  <proski@gnu.org>
3611         * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Don't use
3612         grub_errno if no errors have been detected.
3614 2008-01-12  Robert Millan  <rmh@aybabtu.com>
3616         * include/grub/util/getroot.h (grub_dev_abstraction_types): New enum.
3617         (grub_util_get_dev_abstraction): New function prototype.
3619         * util/getroot.c: Include `<grub/util/getroot.h>'
3620         (grub_util_get_grub_dev): Move detection of abstraction type to ...
3621         (grub_util_get_dev_abstraction): ... here (new function).
3623         * util/grub-probe.c: Convert PRINT_* to an enum.  Add
3624         `PRINT_ABSTRACTION'.
3625         (probe): Probe for abstraction type when requested.
3626         (main): Understand `--target=abstraction'.
3628         * util/i386/efi/grub-install.in: Add abstraction module to core
3629         image when it is found to be necessary.
3630         * util/i386/pc/grub-install.in: Likewise.
3631         * util/powerpc/ieee1275/grub-install.in: Likewise.
3633         * util/update-grub_lib.in (font_path): Return system path without
3634         converting to GRUB path.
3635         * util/update-grub.in: Convert system path returned by font_path()
3636         to a GRUB path.  Use `grub-probe -t abstraction' to determine what
3637         abstraction module is needed for loading fonts (if any).  Export
3638         that as `GRUB_PRELOAD_MODULES'.
3639         * util/grub.d/00_header.in: Process `GRUB_PRELOAD_MODULES' (print
3640         insmod commands).
3642 2008-01-12  Yoshinori K. Okuji  <okuji@enbug.org>
3644         Remove some unused code from reiserfs.
3646         * fs/reiserfs.c (struct grub_reiserfs_key)
3647         [GRUB_REISERFS_KEYV2_BITFIELD]: Removed offset and type.
3648         (struct grub_reiserfs_node_body): Removed.
3649         (grub_reiserfs_get_key_v2_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
3650         Likewise.
3651         (grub_reiserfs_get_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
3652         Likewise.
3653         (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
3654         Likewise.
3655         (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
3656         Likewise.
3657         (grub_reiserfs_set_key_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
3658         Likewise.
3659         (grub_reiserfs_iterate_dir) [GRUB_REISERFS_KEYV2_BITFIELD]:
3660         Likewise.
3661         (grub_reiserfs_open) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
3662         (grub_reiserfs_read) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
3663         (grub_reiserfs_dir) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
3665 2008-01-10  Robert Millan  <rmh@aybabtu.com>
3667         * util/update-grub_lib.in (grub_file_is_not_garbage): New function.
3668         Determines if a file is garbage left by packaging systems, etc.
3669         * util/update-grub.in: Use grub_file_is_not_garbage() as a condition
3670         for processing /etc/grub.d scripts.
3671         * util/grub.d/10_hurd.in: Fix `GRUB_DISTRIBUTOR' comparison.
3672         * util/grub.d/10_linux.in: Likewise.  Use grub_file_is_not_garbage()
3673         as a condition for processing Linux images.
3675 2008-01-10  Pavel Roskin  <proski@gnu.org>
3677         * include/grub/powerpc/libgcc.h (__ucmpdi2): New export.  Needed
3678         to compile reiserfs.c on PowerPC.
3680 2008-01-10  Robert Millan  <rmh@aybabtu.com>
3682         * kern/device.c (grub_device_iterate): Do not abort device iteration
3683         when one of the devices cannot be opened.
3684         * kern/disk.c (grub_disk_open): Do not account previous failures of
3685         unrelated functions when grub_errno is checked for.
3687 2008-01-08  Robert Millan  <rmh@aybabtu.com>
3689         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): For
3690         `! grub_linux_is_bzimage', change order of address comparison to make
3691         it more intuitive, and improve "too big zImage" error message.
3693 2008-01-08  Robert Millan  <rmh@aybabtu.com>
3695         * Makefile.in (uninstall): Handle `$(update-grub_SCRIPTS)' and
3696         `$(update-grub_DATA)'.
3697         (distcheck): Fix race condition when invoking `$(MAKE)' on multiple
3698         targets.
3700 2008-01-07  Robert Millan  <rmh@aybabtu.com>
3702         * boot/i386/pc/boot.S (boot_drive_check): Add a comment indicating
3703         which instruction is modified by grub-setup during installation
3704         (since it wasn't obvious by only looking at this file).
3706 2008-01-07  Robert Millan  <rmh@aybabtu.com>
3708         * TODO: Rewrite.  Just refer to the wiki and the BTS instead of
3709         listing actual TODO items.
3711 2008-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
3713         * fs/reiserfs.c (grub_reiserfs_get_key_v2_type): Handle endianness
3714         correctly.
3715         (grub_reiserfs_get_key_offset): Likewise.
3716         (grub_reiserfs_set_key_offset): Likewise.
3717         (grub_reiserfs_set_key_type): Likewise.
3718         (grub_reiserfs_iterate_dir): Return 1 if found, otherwise 0.
3720         (GRUB_REISERFS_KEYV2_BITFIELD): Undefined. Probably it would be
3721         better to remove the bitfield version completely.
3723 2008-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
3725         * fs/reiserfs.c (grub_reiserfs_iterate_dir): ENTRY_ITEM must be
3726         allocated from the heap, due to the fshelp implementation.
3727         (grub_reiserfs_dir): Free NODE, due to the same reason.
3729 2008-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
3731         Mostly from Vincent Pelletier:
3733         * fs/reiserfs.c: New file.
3735         * conf/common.rmk (pkglib_MODULES): Added reiserfs.mod.
3736         (reiserfs_mod_SOURCES): New variable.
3737         (reiserfs_mod_CFLAGS): Likewise.
3738         (reiserfs_mod_LDFLAGS): Likewise.
3740         * DISTLIST: Added boot/i386/pc/lnxboot.S, commands/hexdump.c,
3741         disk/ata.c, fs/cpio.c, fs/ntfscomp.c, fs/reiserfs.c,
3742         include/grub/ntfs.h, include/grub/i386/pc/machine.h, and
3743         normal/color.c.
3745 2008-01-06  Robert Millan  <rmh@aybabtu.com>
3747         * normal/color.c: Remove `<grub/env.h>'.
3749 2008-01-05  Jeroen Dekkers  <jeroen@dekkers.cx>
3751         * include/grub/normal.h: Include <grub/env.h>.
3753 2008-01-05  Robert Millan  <rmh@aybabtu.com>
3755         * util/i386/pc/grub-setup.c (usage): Replace obsolete `(hd0,0)' in
3756         usage example with `(hd0,1)'.
3757         Reported by Samuel Thibault.
3759 2008-01-05  Robert Millan  <rmh@aybabtu.com>
3761         * kern/i386/loader.S (grub_linux_is_bzimage): New variable.
3762         (grub_linux_boot_zimage): Rename to ...
3763         (grub_linux_boot): ... this.
3764         (grub_linux_boot_bzimage): Merge with `grub_linux_boot_zimage'.
3765         (grub_linux_boot_zimage): Conditionalize zImage copy.
3767         * include/grub/i386/loader.h (grub_linux_is_bzimage): Add prototype.
3768         (grub_linux_boot_bzimage): Remove prototype.
3769         (grub_linux_boot_zimage): Rename to ...
3770         (grub_linux_boot): ... this.
3772         * loader/i386/pc/linux.c (big_linux): Replace with `grub_linux_is_bzimage'.
3773         (grub_linux_boot): Remove function.
3775 2008-01-05  Robert Millan  <rmh@aybabtu.com>
3777         * include/grub/normal.h (grub_env_write_color_normal): New prototype.
3778         (grub_env_write_color_highlight): Likewise.
3779         (grub_wait_after_message): Likewise.
3781         * normal/color.c: New file.
3783         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/color.c'.
3784         (normal_mod_DEPENDENCIES): Likewise.
3786         * conf/i386-efi.rmk (grub_emu_SOURCES): Add `normal/color.c'.
3787         (normal_mod_DEPENDENCIES): Likewise.
3789         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add `normal/color.c'.
3790         (normal_mod_DEPENDENCIES): Likewise.
3792         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `normal/color.c'.
3793         (normal_mod_DEPENDENCIES): Likewise.
3795         * normal/menu_entry.c (run): Rely on grub_wait_after_message()
3796         for waiting after a message is printed.
3797         * normal/main.c (read_config_file): Likewise.
3798         (grub_normal_init): Register grub_env_write_color_normal() and
3799         grub_env_write_color_highlight() hooks.  Mark `color_normal' and
3800         `color_highlight' variables as global.
3802         * normal/menu.c (grub_wait_after_message): New function.
3803         (grub_color_menu_normal): New variable.  Replaces ...
3804         (GRUB_COLOR_MENU_NORMAL): ... this macro.
3805         (grub_color_menu_highlight): New variable.  Replaces ...
3806         (GRUB_COLOR_MENU_HIGHLIGHT): ... this macro.
3807         (draw_border): Set color state to `GRUB_TERM_COLOR_NORMAL' instead of
3808         `GRUB_TERM_COLOR_STANDARD'.
3809         (print_message): Use `grub_setcolorstate' to reload colors.  Rename
3810         `normal_code' and `highlight_code' to `old_color_normal' and
3811         `old_color_highlight', respectively.
3812         (grub_menu_init_page): Update colors when drawing the menu, based on
3813         `menu_color_normal' and `menu_color_highlight' variables.
3814         (grub_menu_run): Rely on grub_wait_after_message() for waiting after
3815         a message is printed.
3817 2008-01-05  Robert Millan  <rmh@aybabtu.com>
3819         * kern/env.c (grub_env_context_open): Propagate hooks for global
3820         variables to new context.
3822         * kern/main.c (grub_set_root_dev): Export `root' variable.
3824 2008-01-05  Robert Millan  <rmh@aybabtu.com>
3826         * util/biosdisk.c (get_os_disk): Check for devfs-style IDE and SCSI
3827         discs unconditionally, since udev and others have options to provide
3828         them.
3830 2008-01-05  Robert Millan  <rmh@aybabtu.com>
3832         * normal/completion.c (iterate_dir): Skip `.' and `..' directories.
3834 2008-01-04  Christian Franke  <franke@computer.org>
3836         * kern/i386/pc/init.c (grub_machine_init): Fix evaluation
3837         of eisa_mmap.
3839 2008-01-03  Pavel Roskin  <proski@gnu.org>
3841         * kern/i386/linuxbios/init.c: Put "void" to all function
3842         declarations with no arguments.
3843         * kern/powerpc/ieee1275/init.c: Likewise.
3844         * term/i386/pc/at_keyboard.c: Likewise.
3845         * term/i386/pc/vga_text.c: Likewise.
3846         * util/grub-mkdevicemap.c: Likewise.
3848 2008-01-02  Robert Millan  <rmh@aybabtu.com>
3850         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Improve error
3851         message when loaded image is out of bounds.
3852         (grub_multiboot_load_elf64): Likewise.
3854 2008-01-02  Pavel Roskin  <proski@gnu.org>
3856         * util/grub.d/10_linux.in: Try version without ".old" when
3857         looking for initrd.  It's better to use initrd from the newer
3858         kernel of the same version than no initrd at all.
3860 2008-01-01  Robert Millan  <rmh@aybabtu.com>
3862         * util/biosdisk.c (get_os_disk): Fix check for IDE or SCSI discs.
3864 2008-01-01  Vesa Jaaskelainen  <chaac@nic.fi>
3866         * include/grub/video.h: Added grub_video_unmap_color and
3867         grub_video_get_active_render_target.
3868         (grub_video_adapter): Added unmap_color and get_active_render_target.
3870         * video/video.c: Added grub_video_unmap_color and
3871         grub_video_get_active_render_target.
3872         (grub_video_get_info): Changed method to accept NULL pointer as an
3873         argument to allow detection of active video adapter.
3875         * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as
3876         grub_video_vbe_unmap_color_int.
3877         Added grub_video_vbe_unmap_color and
3878         grub_video_vbe_get_active_render_target.
3879         (grub_video_vbe_adapter): Added unmap_color and
3880         get_active_render_target.
3882         * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage
3883         with grub_video_vbe_unmap_color_int.
3885         * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added.
3886         (DEFAULT_NORMAL_COLOR): Likewise.
3887         (DEFAULT_HIGHLIGHT_COLOR) Likewise.
3888         (DEFAULT_FG_COLOR): Removed.
3889         (DEFAULT_BG_COLOR): Likewise.
3890         (DEFAULT_CURSOR_COLOR): Changed value.
3891         (grub_virtual_screen): Added standard_color_setting,
3892         normal_color_setting, highlight_color_setting and term_color.
3893         (grub_virtual_screen): Removed fg_color_setting and bg_color_setting.
3894         (bitmap_width): Added.
3895         (bitmap_height): Likewise.
3896         (bitmap): Likewise.
3897         (set_term_color): Likewise.
3898         (grub_virtual_screen_setup): Changed to use new terminal coloring
3899         settings.
3900         (grub_gfxterm_init): Added init for bitmap.
3901         (grub_gfxterm_fini): Added destroy for bitmap.
3902         (redraw_screen_rect): Updated to use background bitmap and new
3903         terminal coloring.
3904         (scroll_up): Added optimization for case when there is no bitmap.
3905         (grub_gfxterm_cls): Fixed to use correct background color.
3906         (grub_virtual_screen_setcolorstate): Changed to use new terminal
3907         coloring.
3908         (grub_virtual_screen_setcolor): Likewise.
3909         (grub_virtual_screen_getcolor): Added.
3910         (grub_gfxterm_background_image_cmd): Likewise.
3911         (grub_video_term): Added setcolor and getcolor.
3912         (MOD_INIT): Added registration of background_image command.
3913         (MOD_TERM): Added unregistration for background_image command.
3915 2007-12-30  Pavel Roskin  <proski@gnu.org>
3917         * loader/multiboot_loader.c: Fix multiboot command
3918         unregistration.  Fix all typos in the word "multiboot".
3920 2007-12-29  Pavel Roskin  <proski@gnu.org>
3922         * util/grub.d/10_linux.in: Refactor search for initrd.  Add
3923         support for initrd names used in Fedora.
3925 2007-12-26  Bean  <bean123ch@gmail.com>
3927         * conf/common.rmk (pkgdata_MODULES): Add cpio.mod.
3928         (cpio_mod_SOURCES): New variable.
3929         (cpio_mod_CFLAGS): Likewise.
3930         (cpio_mod_LDFLAGS): Likewise.
3932         * fs/cpio.c: New file.
3934         * conf/i386-pc.rmk (grub_emu_SOURCES): Add cpio.c.
3936         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
3938         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
3940         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3942 2007-12-25  Robert Millan  <rmh@aybabtu.com>
3944         * include/grub/term.h (struct grub_term): Add `getcolor' function.
3945         (grub_getcolor): New function.
3947         * kern/term.c (grub_getcolor): New function.
3948         * normal/menu.c (GRUB_COLOR_MENU_NORMAL): New macro.
3949         (GRUB_COLOR_MENU_HIGHLIGHT): New macro.
3950         (print_entry): Set normal and highlight colors to
3951         `GRUB_COLOR_MENU_NORMAL' and `GRUB_COLOR_MENU_HIGHLIGHT',
3952         respectively, before printing and restore them to old
3953         values afterwards.
3954         (grub_menu_init_page): Likewise.  Fill an additional colored space
3955         that would otherwise be left blank.
3957         * term/efi/console.c (grub_console_getcolor): New function.
3958         (struct grub_console_term.getcolor): New variable.
3959         * term/i386/pc/console.c (grub_console_getcolor): New function.
3960         (struct grub_console_term.getcolor): New variable.
3961         * term/ieee1275/ofconsole.c (grub_ofconsole_getcolor): New function.
3962         (struct grub_console_term.getcolor): New variable.
3964         * term/i386/pc/serial.c (grub_serial_setcolor): Remove function.
3965         (struct grub_console_term.setcolor): Remove variable.
3966         * term/i386/pc/vesafb.c (grub_virtual_screen_setcolor): Remove function.
3967         (struct grub_console_term.setcolor): Remove variable.
3968         * term/i386/pc/vga.c (grub_vga_setcolor): Remove function.
3969         (struct grub_console_term.setcolor): Remove variable.
3970         * term/gfxterm.c (grub_virtual_screen_setcolor): Remove function.
3971         (struct grub_console_term.setcolor): Remove variable.
3973 2007-12-25  Robert Millan  <rmh@aybabtu.com>
3975         * configure.ac: Search for possible unifont.hex locations, and
3976         define UNIFONT_HEX if found.
3978         * Makefile.in (UNIFONT_HEX): Define variable.
3979         (DATA): Rename to ...
3980         (PKGLIB): ... this.  Update all users.
3981         (PKGDATA): New variable.
3982         (pkgdata_IMAGES): Rename to ...
3983         (pkglib_IMAGES): ... this. Update all users.
3984         (pkgdata_MODULES): Rename to ...
3985         (pkglib_MODULES): ... this. Update all users.
3986         (pkgdata_PROGRAMS): Rename to ...
3987         (pkglib_PROGRAMS): ... this. Update all users.
3988         (pkgdata_DATA): Rename to ...
3989         (pkglib_DATA): ... this. Update all users.
3990         (CLEANFILES): Redefine to `$(pkglib_DATA) $(pkgdata_DATA)'.
3991         (unicode.pff, ascii.pff): New rules.
3992         (all-local): Add `$(PKGDATA)' dependency.
3993         (install-local): Process `$(PKGDATA)'.
3995         * util/update-grub_lib.in (font_path): Search for *.pff files in
3996         a few more locations, including `${pkgdata}'.
3998 2007-12-23  Robert Millan  <rmh@aybabtu.com>
4000         Patch from Bean  <bean123ch@gmail.com>:
4001         * disk/loopback.c (grub_loopback_read): Add missing bit shift to
4002         `size'.
4004 2007-12-21  Bean  <bean123ch@gmail.com>
4006         * conf/common.rmk (pkgdata_MODULES): Add ntfscomp.mod.
4007         (ntfscomp_mod_SOURCES): New variable.
4008         (ntfscomp_mod_CFLAGS): Likewise.
4009         (ntfscomp_mod_LDFLAGS): Likewise.
4011         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfscomp.c.
4012         (grub_probe_SOURCES): Likewise.
4013         (grub_emu_SOURCES): Likewise.
4015         * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
4016         (grub_emu_SOURCES): Likewise.
4018         * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
4019         (grub_emu_SOURCES): Likewise.
4021         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
4022         (grub_emu_SOURCES): Likewise.
4024         * fs/ntfs.c (grub_ntfscomp_func): New variable.
4025         (read_run_list): Renamed to grub_ntfs_read_run_list.
4026         (decomp_nextvcn): Moved to ntfscomp.c.
4027         (decomp_getch): Likewise.
4028         (decomp_get16): Likewise.
4029         (decomp_block): Likewise.
4030         (read_block): Likewise.
4031         (read_data): Partially moved to ntfscomp.c.
4032         (fixup): Change unsigned to grub_uint16_t.
4033         (read_mft): Change unsigned long to grub_uint32_t.
4034         (read_attr): Likewise.
4035         (read_data): Likewise.
4036         (read_run_data): Likewise.
4037         (read_run_list): Likewise.
4038         (read_mft): Likewise.
4040         * fs/ntfscomp.c: New file.
4042         * include/grub/ntfs.h: New file.
4044 2007-12-16  Robert Millan  <rmh@aybabtu.com>
4046         * util/grub-mkdevicemap.c (make_device_map): Iterate up to 20 for
4047         IDE disk check, since Linux is known to support 20 IDE disks.
4048         Reported by Colin Watson.
4050 2007-12-15  Bean  <bean123ch@gmail.com>
4052         * conf/i386-pc.rmk (pkgdata_IMAGES): Add lnxboot.img.
4053         (lnxboot_img_SOURCES): New variable.
4054         (lnxboot_img_ASFLAGS): Likewise.
4055         (lnxboot_img_LDFLAGS): Likewise.
4057         * boot/i386/pc/lnxboot.S: New file.
4059 2007-11-24  Pavel Roskin  <proski@gnu.org>
4061         * configure.ac: Test if '--build-id=none' is supported by the
4062         linker.  If yes, add it to TARGET_LDFLAGS.  Build ID causes
4063         objcopy to generate incorrect binary files (binutils
4064         2.17.50.0.18-1 as shipped by Fedora 8).
4065         * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Use LDFLAGS when
4066         linking, so that build ID doesn't break the test.
4068 2007-11-24  Pavel Roskin  <proski@gnu.org>
4070         * include/grub/i386/time.h: use "void" in the argument list
4071         of grub_cpu_idle().
4072         * include/grub/powerpc/time.h: Likewise.
4073         * include/grub/sparc64/time.h: Likewise.
4075 2007-11-18  Christian Franke  <franke@computer.org>
4077         * util/console.c (grub_ncurses_getkey): Change curses KEY_* mapping,
4078         now return control chars instead of GRUB_CONSOLE_KEY_* constants.
4079         This fixes the problem that function keys did not work in grub-emu.
4081 2007-11-18  Christian Franke  <franke@computer.org>
4083         * disk/host.c (grub_host_open): Remove attribute unused from
4084         name parameter. Add check for "host". This fixes the problem
4085         that grub-emu does not find partitions.
4087 2007-11-18  Christian Franke  <franke@computer.org>
4089         * util/hostfs.c (is_dir): New function.
4090         (grub_hostfs_dir):  Handle missing dirent.d_type case.
4091         (grub_hostfs_read): Add missing fseek().
4092         (grub_hostfs_label): Clear label pointer.  This fixes a crash
4093         of grub-emu on "ls (host)".
4095 2007-11-18  Christian Franke  <franke@computer.org>
4097         * include/grub/i386/pc/init.h (struct grub_machine_mmap_entry):
4098         Add attribute packed, gcc 3.4.4 on Cygwin aligns this
4099         to 64 bit boundary by default.
4101 2007-11-18  Bean  <bean123ch@gmail.com>
4103         * conf/common.rmk (pkgdata_MODULES): Add hexdump.mod.
4104         (hexdump_mod_SOURCES): New variable.
4105         (hexdump_mod_CFLAGS): Likewise.
4106         (hexdump_mod_LDFLAGS): Likewise.
4108         * conf/i386-pc.rmk (grub_emu_SOURCES): Add command/hexdump.c.
4110         * conf/i386-efi.rmk (grub_emu_SOURCES): Add command/hexdump.c.
4112         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add command/hexdump.c.
4114         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add command/hexdump.c.
4116         * include/grub/hexdump.h: New file.
4118         * commands/hexdump.c: New file.
4120 2007-11-10  Robert Millan  <rmh@aybabtu.com>
4122         * commands/i386/pc/play.c (beep_off): Switch order of arguments
4123         in grub_outb() calls.
4124         (beep_on): Likewise.
4126 2007-11-10  Christian Franke  <franke@computer.org>
4128         * normal/menu.c (run_menu): Check for empty menu to avoid crash.
4129         (grub_menu_run): Likewise.
4131 2007-11-10  Robert Millan  <rmh@aybabtu.com>
4133         * include/grub/i386/efi/machine.h: New file.
4134         * include/grub/i386/linuxbios/machine.h: Likewise.
4135         * include/grub/i386/pc/machine.h: Likewise.
4136         * include/grub/powerpc/ieee1275/machine.h: Likewise.
4137         * include/grub/sparc64/ieee1275/machine.h: Likewise.
4139         * term/i386/pc/serial.c: Include <grub/machine/machine.h>.
4140         (serial_hw_io_addr): New variable.
4141         (serial_hw_get_port): Obtain port address from `serial_hw_io_addr'
4142         instead of `(unsigned short *) 0x400'.
4144 2007-11-10  Bean  <bean123ch@gmail.com>
4146         * fs/ntfs.c (read_block): Fix a bug caused by adjacent blocks.
4148 2007-11-10  Vesa Jaaskelainen  <chaac@nic.fi>
4150         * conf/i386-pc.rmk (pkgdata_MODULES): Added vga.mod.
4151         (vga_mod_SOURCES): Added.
4152         (vga_mod_CFLAGS): Likewise.
4153         (vga_mod_LDFLAGS): Likewise.
4155         * term/i386/pc/vga.c (get_map_mask): Switch order of arguments in
4156         grub_outb() calls.
4157         (set_map_mask): Likewise.
4158         (set_read_map): Likewise.
4159         (set_read_address): Likewise.
4160         (vga_font): Removed variable.
4161         (get_vga_glyph): Removed function.
4162         (invalidate_char): Likewise.
4163         (write_char): Changed to use grub_font_get_glyph() for font
4164         information.
4165         (grub_vga_putchar): Likewise.
4166         (grub_vga_getcharwidth): Likewise.
4168 2007-11-10  Vesa Jaaskelainen  <chaac@nic.fi>
4170         * conf/i386-pc.rmk (boot_img_LDFLAGS): Use COMMON_LDFLAGS for target
4171         flags.
4172         (pxeboot_img_LDFLAGS): Likewise.
4173         (diskboot_img_LDFLAGS): Likewise.
4174         (kernel_img_LDFLAGS): Likewise.
4176 2007-11-06  Robert Millan  <rmh@aybabtu.com>
4178         * term/i386/pc/serial.c (serial_hw_put): Switch order of arguments
4179         in grub_outb() calls.
4180         (serial_hw_init): Likewise.
4182 2007-11-05  Robert Millan  <rmh@aybabtu.com>
4184         * util/update-grub.in: Allow files in ${update_grub_dir} to contain
4185         spaces.  Skip non-regular files.
4187 2007-11-05  Robert Millan  <rmh@aybabtu.com>
4189         * kern/disk.c (grub_disk_firmware_fini)
4190         (grub_disk_firmware_is_tainted): New variables.
4192         * include/grub/disk.h (grub_disk_firmware_fini)
4193         (grub_disk_firmware_is_tainted): Likewise.
4195         * disk/i386/pc/biosdisk.c (GRUB_MOD_FINI(biosdisk)): Moved from here ...
4196         (grub_disk_biosdisk_fini): ... to here.
4197         (GRUB_MOD_FINI(biosdisk)): Implement using grub_disk_biosdisk_fini().
4198         (GRUB_MOD_INIT(biosdisk)): Abort when `grub_disk_firmware_is_tainted'
4199         is set.  Register grub_disk_biosdisk_fini() in
4200         `grub_disk_firmware_fini'.
4202         * disk/ata.c: Remove `<grub/machine/biosdisk.h>'.
4203         (GRUB_MOD_INIT(ata)): Remove grub_biosdisk_fini() call.
4204         Use `grub_disk_firmware_is_tainted' and `grub_disk_firmware_fini'
4205         to finish existing firmware disk interface.
4207         * conf/i386-linuxbios.rmk (pkgdata_MODULES): Add `ata.mod'.
4208         (ata_mod_SOURCES): New variable.
4209         (ata_mod_CFLAGS): Likewise.
4210         (ata_mod_LDFLAGS): Likewise.
4212 2007-11-05  Robert Millan  <rmh@aybabtu.com>
4214         * disk/ata.c: Remove `<grub/machine/time.h>'.  Include `<grub/time.h>'.
4215         (grub_ata_wait): Reimplement using grub_millisleep().
4217         * include/grub/misc.h (grub_div_roundup): Fix parenthesization.
4218         * include/grub/i386/time.h (grub_cpu_idle): Disable `hlt' instruction.
4220 2007-11-03  Marco Gerards  <marco@gnu.org>
4222         * term/i386/pc/vga_text.c: Include <grub/cpu/io.h>.
4223         (CRTC_ADDR_PORT): New macro.
4224         (CRTC_DATA_PORT): Likewise.
4225         (CRTC_CURSOR): Likewise.
4226         (CRTC_CURSOR_ADDR_HIGH): Likewise.
4227         (CRTC_CURSOR_ADDR_LOW): Likewise.
4228         (update_cursor): New function.
4229         (grub_console_real_putchar): Call `update_cursor'.
4230         (grub_console_gotoxy): Likewise.
4231         (grub_console_cls): Set the default color when clearing the
4232         screen.
4233         (grub_console_setcursor): Implemented.
4235 2007-11-03  Marco Gerards  <marco@gnu.org>
4237         * disk/ata.c (grub_ata_pio_read): Don't wait for the command to
4238         become activate.
4239         (grub_ata_pio_write): Likewise.
4241         (grub_atapi_identify): Wait after issuing an ATA command.
4242         (grub_atapi_packet): Likewise.
4243         (grub_ata_identify): Likewise.
4244         (grub_ata_readwrite): Likewise.
4246 2007-11-03  Marco Gerards  <marco@gnu.org>
4248         * disk/ata.c (grub_ata_pio_read): Detect and return the error code.
4249         (grub_ata_pio_write): Likewise.
4250         (grub_ata_readwrite): Use `grub_error', instead of
4251         returning `grub_errno'.
4253 2007-11-03  Marco Gerards  <marco@gnu.org>
4255         * disk/ata.c (grub_ata_readwrite): Call grub_ata_pio_read and
4256         grub_ata_pio_write once for every single sector, instead of for
4257         multiple sectors.
4259 2007-10-31  Robert Millan  <rmh@aybabtu.com>
4261         * configure.ac: Add `i386-linuxbios' to the list of supported targets.
4263         * conf/i386-linuxbios.rmk: New file.
4265         * kern/i386/pc/hardware.c: Likewise.
4266         * term/i386/pc/at_keyboard.c: Likewise.
4267         * term/i386/pc/vga_text.c: Likewise.
4269         * include/grub/i386/linuxbios/boot.h: Likewise.
4270         * include/grub/i386/linuxbios/console.h: Likewise.
4271         * include/grub/i386/linuxbios/init.h: Likewise.
4272         * include/grub/i386/linuxbios/kernel.h: Likewise.
4273         * include/grub/i386/linuxbios/loader.h: Likewise.
4274         * include/grub/i386/linuxbios/memory.h: Likewise.
4275         * include/grub/i386/linuxbios/serial.h: Likewise.
4276         * include/grub/i386/linuxbios/time.h: Likewise.
4278         * kern/i386/linuxbios/init.c: Likewise.
4279         * kern/i386/linuxbios/startup.S: Likewise.
4280         * kern/i386/linuxbios/table.c: Likewise.
4282 2007-10-31  Marco Gerards  <marco@gnu.org>
4284         * conf/i386-pc.rmk (pkgdata_MODULES): Add `ata.mod'.
4285         (ata_mod_SOURCES): New variable.
4286         (ata_mod_CFLAGS): Likewise.
4287         (ata_mod_LDFLAGS): Likewise.
4289         * disk/ata.c: New file.
4291         * include/grub/disk.h (grub_disk_dev_id): Add
4292         `GRUB_DISK_DEV_ATA_ID'.
4294 2007-10-31  Robert Millan  <rmh@aybabtu.com>
4296         * include/grub/i386/pc/init.h (grub_lower_mem): Moved from here ...
4297         * include/grub/i386/pc/memory.h (grub_lower_mem): ... to here.
4299         * include/grub/i386/pc/init.h (grub_upper_mem): Moved from here ...
4300         * include/grub/i386/pc/memory.h (grub_upper_mem): ... to here.
4302         * include/grub/i386/pc/memory.h: Include `<grub/symbol.h>' and
4303         `<grub/types.h>'.
4305         * loader/i386/pc/multiboot.c: Include `<grub/machine/memory.h>'.
4307 2007-10-27  Robert Millan  <rmh@aybabtu.com>
4309         * include/grub/types.h (ULONG_MAX): Define macro.
4311 2007-10-22  Robert Millan  <rmh@aybabtu.com>
4313         * kern/i386/pc/startup.S: Remove `"kern/i386/realmode.S"'.  Include
4314         `"../realmode.S"'.
4315         Remove `"kern/i386/loader.S"'.  Include `"../loader.S"'.
4317 2007-10-22  Robert Millan  <rmh@aybabtu.com>
4319         * conf/i386-pc.rmk (kernel_img_SOURCES): Remove `disk/i386/pc/biosdisk.c'.
4320         (pkgdata_MODULES): Add `biosdisk.mod'.
4321         (biosdisk_mod_SOURCES, biosdisk_mod_CFLAGS, biosdisk_mod_LDFLAGS): New
4322         variables.
4324         * disk/i386/pc/biosdisk.c: Include `<grub/dl.h>'.
4325         (grub_biosdisk_init): Replace with ...
4326         (GRUB_MOD_INIT(biosdisk)): ... this.
4327         (grub_biosdisk_fini): Replace with ...
4328         (GRUB_MOD_FINI(biosdisk)): ... this.
4330         * kern/i386/pc/init.c: Remove `<grub/machine/biosdisk.h>'.
4331         (grub_machine_init): Remove call to grub_biosdisk_init().
4332         (grub_machine_fini): Remove call to grub_machine_fini().
4334         * util/i386/pc/grub-install.in (modules): Add `biosdisk'.
4336 2007-10-22  Robert Millan  <rmh@aybabtu.com>
4338         * include/grub/time.h: New file.
4339         * include/grub/i386/time.h: Likewise.
4340         * include/grub/powerpc/time.h: Likewise.
4341         * include/grub/sparc64/time.h: Likewise.
4343         * include/grub/i386/pc/time.h (KERNEL_TIME_HEADER): Rename all
4344         instances to ...
4345         (KERNEL_MACHINE_TIME_HEADER): ... this.
4346         * include/grub/powerpc/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
4347         instances to ...
4348         (KERNEL_MACHINE_TIME_HEADER): ... this.
4349         * include/grub/sparc64/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
4350         instances to ...
4351         (KERNEL_MACHINE_TIME_HEADER): ... this.
4353         * kern/i386/efi/init.c: Include `<grub/time.h>'.
4354         (grub_millisleep): New function.
4355         * kern/i386/pc/init.c: Include `<grub/time.h>'.
4356         (grub_millisleep): New function.
4357         * kern/powerpc/ieee1275/init.c: Include `<grub/time.h>'.
4358         Remove `grub/machine/time.h' include.
4359         (grub_millisleep): New function.
4360         * kern/sparc64/ieee1275/init.c: Include `<grub/time.h>'.
4361         Remove `grub/machine/time.h' include.
4362         (grub_millisleep): New function.
4364         * include/grub/misc.h (grub_div_roundup): New function.
4366         * kern/misc.c: Include `<grub/time.h>'.
4367         (grub_millisleep_generic): New function.
4369         * conf/i386-efi.rmk (kernel_mod_HEADERS): Remove `i386/efi/time.h'.
4370         Add `time.h'.
4371         * conf/i386-pc.rmk (kernel_img_HEADERS): Remove `machine/time.h'.
4372         Add `time.h'.
4373         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Remove
4374         `machine/time.h'.  Add `time.h'.
4375         * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
4377 2007-10-21  Robert Millan  <rmh@aybabtu.com>
4379         * include/grub/misc.h (grub_max): New function.
4381 2007-10-21  Robert Millan  <rmh@aybabtu.com>
4383         * util/misc.c (grub_util_info): Call fflush() before returning.
4385 2007-10-20  Robert Millan  <rmh@aybabtu.com>
4387         * genmk.rb (Image): Copy `extra_flags' from here ...
4388         (PModule): ... to here.  Use it in `#{obj}: #{src}' rule.
4390         * commands/i386/cpuid.c (grub_cmd_cpuid): Add __attribute__ ((unused))
4391         to `argc' and `args' arguments.
4393 2007-10-17  Robert Millan  <rmh@aybabtu.com>
4395         * kern/i386/loader.S: New file.
4397         * kern/i386/pc/startup.S (grub_linux_prot_size): Moved from here ...
4398         * kern/i386/loader.S (grub_linux_prot_size)... to here.
4399         * kern/i386/pc/startup.S (grub_linux_tmp_addr): Moved from here ...
4400         * kern/i386/loader.S (grub_linux_tmp_addr)... to here.
4401         * kern/i386/pc/startup.S (grub_linux_real_addr): Moved from here ...
4402         * kern/i386/loader.S (grub_linux_real_addr)... to here.
4403         * kern/i386/pc/startup.S (grub_linux_boot_zimage): Moved from here ...
4404         * kern/i386/loader.S (grub_linux_boot_zimage)... to here.
4405         * kern/i386/pc/startup.S (grub_linux_boot_bzimage): Moved from here ...
4406         * kern/i386/loader.S (grub_linux_boot_bzimage)... to here.
4407         * kern/i386/pc/startup.S (grub_multiboot_real_boot): Moved from here ...
4408         * kern/i386/loader.S (grub_multiboot_real_boot)... to here.
4409         * kern/i386/pc/startup.S (grub_multiboot2_real_boot): Moved from here ...
4410         * kern/i386/loader.S (grub_multiboot2_real_boot)... to here.
4412         * kern/i386/realmode.S: New file.
4414         * kern/i386/pc/startup.S (protstack): Moved from here ...
4415         * kern/i386/realmode.S (protstack)... to here.
4416         * kern/i386/pc/startup.S (gdt): Moved from here ...
4417         * kern/i386/realmode.S (gdt)... to here.
4418         * kern/i386/pc/startup.S (prot_to_real): Moved from here ...
4419         * kern/i386/realmode.S (prot_to_real)... to here.
4421         * kern/i386/pc/startup.S: Include `kern/i386/loader.S' and
4422         `kern/i386/realmode.S'.
4424 2007-10-17  Robert Millan  <rmh@aybabtu.com>
4426         * include/grub/i386/loader.h: New file.
4428         * include/grub/i386/pc/loader.h (grub_linux_prot_size)
4429         (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
4430         (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
4431         (grub_multiboot_real_boot, grub_multiboot2_real_boot)
4432         (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): Moved from here ...
4433         * include/grub/i386/loader.h (grub_linux_prot_size)
4434         (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
4435         (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
4436         (grub_multiboot_real_boot, grub_multiboot2_real_boot)
4437         (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): ... to here.
4439         * include/grub/i386/pc/loader.h: Include `grub/cpu/loader.h'.
4441 2007-10-15  Robert Millan  <rmh@aybabtu.com>
4443         * normal/misc.c (grub_normal_print_device_info): Do not probe for
4444         filesystem when dev->disk is unset.
4445         Do probe for filesystem even when dev->disk->has_partitions is set.
4446         In case a filesystem is found, always report it.
4447         In case it isn't, if dev->disk->has_partitions is set, report that
4448         a partition table was found instead of reporting that no filesystem
4449         could be identified.
4451 2007-10-12  Robert Millan  <rmh@aybabtu.com>
4453         * conf/powerpc-ieee1275.rmk (grub_mkimage_SOURCES): Replace reference
4454         to util/powerpc/ieee1275/grub-mkimage.c with util/elf/grub-mkimage.c.
4456         * include/grub/types.h (grub_host_to_target16): New macro.
4457         (grub_host_to_target32): Likewise.
4458         (grub_host_to_target64): Likewise.
4459         (grub_target_to_host16): Likewise.
4460         (grub_target_to_host32): Likewise.
4461         (grub_target_to_host64): Likewise.
4463         * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
4464         Renamed from to ...
4465         (GRUB_MOD_ALIGN): ...this.  Update all users.
4467         * util/elf/grub-mkimage.c (load_note): Replace grub_cpu_to_be32 with
4468         grub_host_to_target32.
4469         Replace grub_be_to_cpu32 with grub_target_to_host32.
4470         (load_modules): Likewise.
4471         (add_segments): Replace grub_be_to_cpu16 with grub_target_to_host16.
4472         Replace grub_be_to_cpu32 with grub_target_to_host32.
4473         Replace grub_cpu_to_be16 with grub_host_to_target16.
4474         Replace grub_cpu_to_be32 grub_host_to_target32.
4476 2007-10-12  Robert Millan  <rmh@aybabtu.com>
4478         * util/powerpc/ieee1275/grub-mkimage.c: Moved to ...
4479         * util/elf/grub-mkimage.c: ... here.
4481         * DISTLIST: Add `util/elf/grub-mkimage.c'.  Remove
4482         `util/powerpc/ieee1275/grub-mkimage.c'.
4484 2007-10-07  Robert Millan  <rmh@aybabtu.com>
4486         * kern/powerpc/ieee1275/init.c: Rename HEAP_LIMIT to HEAP_MAX_ADDR,
4487         and make it easier to figure out.
4488         Add HEAP_MIN_SIZE and HEAP_MAX_ADDR definitions.
4489         (grub_claim_heap): Use HEAP_MAX_ADDR rather than taking a parameter.
4490         Do not avoid claiming a region above HEAP_MAX_ADDR if that would
4491         leave us with less than HEAP_MIN_SIZE total heap.
4492         Avoid our total amount of heap to surpass HEAP_MAX_SIZE.
4494 2007-10-03  Robert Millan  <rmh@aybabtu.com>
4496         * include/grub/i386/io.h: New file.
4497         * commands/i386/pc/play.c (inb): Removed.
4498         (outb): Removed.
4499         Include grub/cpu/io.h.  Replace inb() with grub_inb() and outb()
4500         with grub_outb().
4501         * term/i386/pc/serial.c  (inb): Removed.
4502         (outb): Removed.
4503         Include grub/cpu/io.h.  Replace inb() with grub_inb() and outb()
4504         with grub_outb().
4505         * term/i386/pc/vga.c  (inb): Removed.
4506         (outb): Removed.
4507         Include grub/cpu/io.h.  Replace inb() with grub_inb() and outb()
4508         with grub_outb().
4510 2007-10-02  Robert Millan  <rmh@aybabtu.com>
4512         * conf/i386-efi.rmk (grub_emu_SOURCES): Add util/hostfs.c.
4513         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4514         Reported by Marcin Kurek.
4516 2007-09-07  Robert Millan  <rmh@aybabtu.com>
4518         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_test_flag): Detect
4519         SmartFirmware version updates (as released by Sven Luther), and avoid
4520         setting GRUB_IEEE1275_FLAG_NO_PARTITION_0 or
4521         GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS unless the running version is
4522         known broken.
4524 2007-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
4526         From Hitoshi Ozeki:
4527         * kern/i386/pc/init.c (compact_mem_regions): Decrease NUM_REGIONS
4528         when merging two regions.
4530 2007-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
4532         * kern/rescue.c (grub_enter_rescue_mode): Free ARGS.
4533         * normal/completion.c (grub_normal_do_completion): Likewise.
4534         Reported by Hitoshi Ozeki.
4536 2007-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
4538         Do not use devices at boot in chainloading.
4540         * loader/i386/pc/chainloader.c (boot_drive): New variable.
4541         (boot_part_addr): Likewise.
4542         (grub_chainloader_boot): Simply call grub_chainloader_real_boot
4543         with BOOT_DRIVE and BOOT_PART_ADDR.
4544         (grub_chainloader_cmd): Set BOOT_DRIVE and BOOT_PART_ADDR.
4545         Reported by Hitoshi Ozeki <h-ozeki@ck2.so-net.ne.jp>.
4547 2007-08-29  Robert Millan  <rmh@aybabtu.com>
4549         Patch from Simon Peter <dn.tlp@gmx.net>:
4550         * genmk.rb (Utility): Append $(#{src}_DEPENDENCIES) to #{obj} targets.
4551         * conf/i386-pc.rmk: Replace grub-probe_DEPENDENCIES with
4552         util/grub-probe.c_DEPENDENCIES.  Replace grub-setup_DEPENDENCIES with
4553         util/i386/pc/grub-setup.c_DEPENDENCIES.
4554         * conf/i386-efi.rmk: Replace grub-probe_DEPENDENCIES with
4555         util/grub-probe.c_DEPENDENCIES.
4556         * conf/powerpc-ieee1275.rmk: Likewise.
4558 2007-08-28  Robert Millan  <rmh@aybabtu.com>
4560         * util/i386/get_disk_name.c: New.  Implement grub_util_get_disk_name()
4561         to tell grub-mkdevicemap how to name devices.
4562         * util/ieee1275/get_disk_name.c: Likewise (using "ofpathname -a"
4563         feature).
4565         * conf/i386-efi.rmk (grub_mkdevicemap_SOURCES): Add
4566         util/i386/get_disk_name.c.
4567         * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Likewise.
4568         * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Add
4569         util/ieee1275/get_disk_name.c.
4571         * include/grub/util/misc.h: grub_util_get_disk_name() declaration.
4573         * DISTLIST: Add util/i386/get_disk_name.c and
4574         util/ieee1275/get_disk_name.c.
4576         * util/grub-mkdevicemap.c: Replace device naming logic with
4577         grub_util_get_disk_name() calls.
4579 2007-08-20  Robert Millan  <rmh@aybabtu.com>
4581         * normal/menu.c (run_menu): Refer to seconds as "s" not "seconds"
4582         (so that it works for both plural and singular quantities).
4584 2007-08-05  Robert Millan  <rmh@aybabtu.com>
4586         * util/grub.d/10_linux.in (test_gt): Strip out vmlinu[xz]- prefix
4587         so that [xz] isn't taken into account when determining order.
4589 2007-08-02  Marco Gerards  <marco@gnu.org>
4591         * DISTLIST: Add `disk/host.c', `fs/ntfs.c', `include/multiboot.h',
4592         `include/multiboot2.h', `include/grub/elfload.h',
4593         `include/multiboot.h', `include/grub/multiboot.h',
4594         `include/grub/multiboot_loader.h', `include/grub/multiboot2.h',
4595         `include/grub/i386/pc/biosdisk.h', `include/grub/util/biosdisk.h',
4596         `kern/elf.c', `loader/multiboot_loader.c',
4597         `loader/multiboot_loader_normal.c', `loader/multiboot2.c',
4598         `loader/i386/pc/multiboot2.c',
4599         `loader/powerpc/ieee1275/multiboot2.c', `util/hostfs.c' and
4600         `util/i386/pc/grub-mkrescue.in'.  Remove
4601         `include/grub/biosdisk.h', `include/grub/i386/pc/multiboot.h',
4602         `include/grub/i386/pc/util/biosdisk.h' and
4603         `include/grub/powerpc/ieee1275/multiboot.h'.
4605 2007-08-02  Bean  <bean123ch@gmail.com>
4607         * conf/common.rmk (pkgdata_MODULES): Add ntfs.mod.
4608         (ntfs_mod_SOURCES): New variable.
4609         (ntfs_mod_CFLAGS): Likewise.
4610         (ntfs_mod_LDFLAGS): Likewise.
4612         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfs.c.
4613         (grub_probe_SOURCES): Likewise.
4614         (grub_emu_SOURCES): Likewise.
4616         * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
4617         (grub_emu_SOURCES): Likewise.
4619         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
4620         (grub_emu_SOURCES): Likewise.
4622         * conf/misc.c (grub_utf16_to_utf8): Fix unicode conversion bug.
4624         * fs/ntfs.c: New file.
4626 2007-08-02  Bean  <bean123ch@gmail.com>
4628         * disk.h (grub_disk): Use NESTED_FUNC_ATTR.
4630         * file.h (grub_file): Likewise.
4632         * fshelp.h (grub_fshelp_read_file): Likewise.
4634         * util/i386/pc/grub-setup.c (setup): Likewise.
4635         (save_first_sector): Likewise.
4636         (save_blocklists): Likewise.
4638         * fs/affs.c (grub_affs_read_file): Likewise.
4640         * fs/ext2.c (grub_ext2_read_file): Likewise.
4642         * fs/fat.c (grub_fat_read_data): Likewise.
4644         * fs/fshelp.c (grub_fshelp_read_file): Likewise.
4646         * fs/hfs.c (grub_hfs_read_file): Likewise.
4648         * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
4650         * fs/jfs.c (grub_jfs_read_file): Likewise.
4652         * fs/minix.c (grub_minix_read_file): Likewise.
4654         * fs/sfs.c (grub_sfs_read_file): Likewise.
4656         * fs/ufs.c (grub_ufs_read_file): Likewise.
4658         * fs/xfs.c (grub_xfs_read_file): Likewise.
4660         * command/blocklist.c (read_blocklist): Likewise.
4661         (print_blocklist): Likewise.
4663 2007-08-02  Marco Gerards  <marco@gnu.org>
4665         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/host.c' and
4666         `util/hostfs.c'.
4668         * disk/host.c: New file.
4670         * util/hostfs.c: Likewise.
4672         * fs/hfsplus.c (grub_hfsplus_mount): When reading out of disk,
4673         return `GRUB_ERR_BAD_FS'.
4674         * fs/sfs.c (grub_sfs_mount): Likewise.
4675         * fs/xfs.c (grub_xfs_mount): Likewise.
4677         * include/grub/disk.h (enum grub_disk_dev_id): Add
4678         `GRUB_DISK_DEVICE_HOST_ID'.
4680         * util/grub-emu.c (main): Initialize and de-initialize hostfs.
4682 2007-07-24  Jerone Young  <jerone@gmail.com>
4684         * conf/i386-pc.rmk: Add Multiboot loader and multiboot 2 to multiboot
4685         modules for compilation.
4686         * conf/powerpc-ieee1275.rmk: Likewise.
4688         * include/multiboot.h: Move multiboot definitions to one file. Rename
4689         many definitions to not get grub specific.
4690         * include/multiboot2.h: Create header with multiboot 2 definitions.
4691         * include/grub/multiboot.h: Header for grub specific function
4692         prototypes and definitions.
4693         * include/grub/multiboot2.h: Likewise.
4694         * include/grub/multiboot_loader.h: Likewise.
4695         * include/grub/i386/pc/multiboot.h: Removed.
4696         * include/grub/powerpc/ieee1275/multiboot.h: Removed.
4698         * loader/multiboot_loader.c: Created to act as a proxy for multiboot 1
4699         and 2 to allow for one multiboot and module commands.
4700         * loader/multiboot2.c: Add multiboot2 functionality.
4701         * loader/i386/pc/multiboot.c: Modify for new multiboot header location
4702         and definition names.
4703         * loader/i386/pc/multiboot2.c: Created to add i386 specific multiboot
4704         2 functions.
4705         * loader/powerpc/ieee1275/multiboot2.c: Created to add powerpc
4706         ieee1275 specific multiboot2 code.
4708         * kern/i386/pc/startup.S: Change headers and definition names for
4709         multiboot. Add function grub_multiboot2_real_boot for multiboot 2.
4711 2007-07-22  Robert Millan  <rmh@aybabtu.com>
4713         * geninitheader.sh: Process file specified in first parameter rather
4714         than hardcoding grub_modules_init.lst.
4715         * geninit.sh: Likewise.  Also, construct header name dynamically rather
4716         than hardcoding grub_modules_init.h.
4718         * conf/common.rmk: Rename grub_modules_init.[ch] files associated with
4719         grub-emu to grub_emu_init.[ch].  Add rules to build analogous
4720         grub_probe_init.[ch] and grub_setup_init.[ch].
4722         * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Replace
4723         grub_modules_init.h with grub_emu_init.h.
4724         (grub_probe_DEPENDENCIES, grub_probe_SOURCES): Add new
4725         grub_probe_init.[ch] files.
4726         * conf/i386-efi.rmk: Likewise.
4727         * conf/i386-pc.rmk: Likewise.
4728         (grub_setup_DEPENDENCIES, grub_setup_SOURCES): Add new
4729         grub_setup_init.[ch] files.
4731         * util/grub-emu.c: Replace grub_modules_init.h with grub_emu_init.h.
4732         * util/grub-probe.c: Include grub_probe_init.h.  Use grub_init_all()
4733         to initialize modules rather than a list of hardcoded functions.
4734         * util/i386/pc/grub-setup.c: Include grub_setup_init.h.  Use
4735         grub_init_all() to initialize modules rather than a list of hardcoded
4736         functions.
4738 2007-07-22  Robert Millan  <rmh@aybabtu.com>
4740         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set
4741         GRUB_IEEE1275_FLAG_NO_PARTITION_0 flag when running on SmartFirmware.
4743 2007-07-22  Robert Millan  <rmh@aybabtu.com>
4745         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
4746         GRUB_IEEE1275_FLAG_BROKEN_OUTPUT flag.
4747         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set this
4748         flag when running on SmartFirmware.
4749         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid running
4750         "output-device output" command when GRUB_IEEE1275_FLAG_BROKEN_OUTPUT
4751         was set.
4753         * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
4754         Increase partno when GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS flag is set,
4755         rather than decreasing it.
4757         * util/i386/pc/grub-setup.c (setup): When embedding is required, but
4758         there's not enough space to do it, fail in the same way as when it
4759         can't be done because there are no partitions.
4761         * util/powerpc/ieee1275/grub-install.in: Improve error message shown
4762         when nvsetenv failed.
4764 2007-07-22  Yoshinori K. Okuji  <okuji@enbug.org>
4766         * conf/i386-pc.rmk (CLEANFILES): Removed for grub-mkrescue,
4767         because this rule is automatically generated.
4768         (grub-mkrescue): Removed for the same reason as above.
4770 2007-07-22  Yoshinori K. Okuji  <okuji@enbug.org>
4772         Migrate to GNU General Public License Version 3.
4774         * COPYING: Replaced with the plain text version of GPLv3.
4776         * config.guess: Updated from gnulib.
4777         * config.sub: Likewise.
4779         * geninit.sh: Output a GPLv3 copyright notice.
4780         * geninitheader.sh: Likewise.
4781         * genmodsrc.sh: Likewise.
4782         * gensymlist.sh.in: Likewise.
4784         * boot/i386/pc/boot.S: Upgraded to GPLv3.
4785         * boot/i386/pc/diskboot.S: Likewise.
4786         * boot/i386/pc/pxeboot.S: Likewise.
4787         * commands/blocklist.c: Likewise.
4788         * commands/boot.c: Likewise.
4789         * commands/cat.c: Likewise.
4790         * commands/cmp.c: Likewise.
4791         * commands/configfile.c: Likewise.
4792         * commands/echo.c: Likewise.
4793         * commands/help.c: Likewise.
4794         * commands/ls.c: Likewise.
4795         * commands/search.c: Likewise.
4796         * commands/terminal.c: Likewise.
4797         * commands/test.c: Likewise.
4798         * commands/videotest.c: Likewise.
4799         * commands/i386/cpuid.c: Likewise.
4800         * commands/i386/pc/halt.c: Likewise.
4801         * commands/i386/pc/play.c: Likewise.
4802         * commands/i386/pc/reboot.c: Likewise.
4803         * commands/i386/pc/vbeinfo.c: Likewise.
4804         * commands/i386/pc/vbetest.c: Likewise.
4805         * commands/ieee1275/halt.c: Likewise.
4806         * commands/ieee1275/reboot.c: Likewise.
4807         * commands/ieee1275/suspend.c: Likewise.
4808         * disk/loopback.c: Likewise.
4809         * disk/lvm.c: Likewise.
4810         * disk/raid.c: Likewise.
4811         * disk/efi/efidisk.c: Likewise.
4812         * disk/i386/pc/biosdisk.c: Likewise.
4813         * disk/ieee1275/ofdisk.c: Likewise.
4814         * font/manager.c: Likewise.
4815         * fs/affs.c: Likewise.
4816         * fs/ext2.c: Likewise.
4817         * fs/fat.c: Likewise.
4818         * fs/fshelp.c: Likewise.
4819         * fs/hfs.c: Likewise.
4820         * fs/hfsplus.c: Likewise.
4821         * fs/iso9660.c: Likewise.
4822         * fs/jfs.c: Likewise.
4823         * fs/minix.c: Likewise.
4824         * fs/sfs.c: Likewise.
4825         * fs/ufs.c: Likewise.
4826         * fs/xfs.c: Likewise.
4827         * hello/hello.c: Likewise.
4828         * include/grub/acorn_filecore.h: Likewise.
4829         * include/grub/arg.h: Likewise.
4830         * include/grub/bitmap.h: Likewise.
4831         * include/grub/boot.h: Likewise.
4832         * include/grub/cache.h: Likewise.
4833         * include/grub/device.h: Likewise.
4834         * include/grub/disk.h: Likewise.
4835         * include/grub/dl.h: Likewise.
4836         * include/grub/elfload.h: Likewise.
4837         * include/grub/env.h: Likewise.
4838         * include/grub/err.h: Likewise.
4839         * include/grub/file.h: Likewise.
4840         * include/grub/font.h: Likewise.
4841         * include/grub/fs.h: Likewise.
4842         * include/grub/fshelp.h: Likewise.
4843         * include/grub/gzio.h: Likewise.
4844         * include/grub/hfs.h: Likewise.
4845         * include/grub/kernel.h: Likewise.
4846         * include/grub/loader.h: Likewise.
4847         * include/grub/lvm.h: Likewise.
4848         * include/grub/misc.h: Likewise.
4849         * include/grub/mm.h: Likewise.
4850         * include/grub/net.h: Likewise.
4851         * include/grub/normal.h: Likewise.
4852         * include/grub/parser.h: Likewise.
4853         * include/grub/partition.h: Likewise.
4854         * include/grub/pc_partition.h: Likewise.
4855         * include/grub/raid.h: Likewise.
4856         * include/grub/rescue.h: Likewise.
4857         * include/grub/script.h: Likewise.
4858         * include/grub/setjmp.h: Likewise.
4859         * include/grub/symbol.h: Likewise.
4860         * include/grub/term.h: Likewise.
4861         * include/grub/terminfo.h: Likewise.
4862         * include/grub/tparm.h: Likewise.
4863         * include/grub/types.h: Likewise.
4864         * include/grub/video.h: Likewise.
4865         * include/grub/efi/api.h: Likewise.
4866         * include/grub/efi/chainloader.h: Likewise.
4867         * include/grub/efi/console.h: Likewise.
4868         * include/grub/efi/console_control.h: Likewise.
4869         * include/grub/efi/disk.h: Likewise.
4870         * include/grub/efi/efi.h: Likewise.
4871         * include/grub/efi/pe32.h: Likewise.
4872         * include/grub/efi/time.h: Likewise.
4873         * include/grub/i386/linux.h: Likewise.
4874         * include/grub/i386/setjmp.h: Likewise.
4875         * include/grub/i386/types.h: Likewise.
4876         * include/grub/i386/efi/kernel.h: Likewise.
4877         * include/grub/i386/efi/loader.h: Likewise.
4878         * include/grub/i386/efi/time.h: Likewise.
4879         * include/grub/i386/pc/biosdisk.h: Likewise.
4880         * include/grub/i386/pc/boot.h: Likewise.
4881         * include/grub/i386/pc/chainloader.h: Likewise.
4882         * include/grub/i386/pc/console.h: Likewise.
4883         * include/grub/i386/pc/init.h: Likewise.
4884         * include/grub/i386/pc/kernel.h: Likewise.
4885         * include/grub/i386/pc/loader.h: Likewise.
4886         * include/grub/i386/pc/memory.h: Likewise.
4887         * include/grub/i386/pc/multiboot.h: Likewise.
4888         * include/grub/i386/pc/serial.h: Likewise.
4889         * include/grub/i386/pc/time.h: Likewise.
4890         * include/grub/i386/pc/vbe.h: Likewise.
4891         * include/grub/i386/pc/vbeblit.h: Likewise.
4892         * include/grub/i386/pc/vbefill.h: Likewise.
4893         * include/grub/i386/pc/vbeutil.h: Likewise.
4894         * include/grub/i386/pc/vga.h: Likewise.
4895         * include/grub/ieee1275/ieee1275.h: Likewise.
4896         * include/grub/ieee1275/ofdisk.h: Likewise.
4897         * include/grub/powerpc/libgcc.h: Likewise.
4898         * include/grub/powerpc/setjmp.h: Likewise.
4899         * include/grub/powerpc/types.h: Likewise.
4900         * include/grub/powerpc/ieee1275/biosdisk.h: Likewise.
4901         * include/grub/powerpc/ieee1275/console.h: Likewise.
4902         * include/grub/powerpc/ieee1275/ieee1275.h: Likewise.
4903         * include/grub/powerpc/ieee1275/kernel.h: Likewise.
4904         * include/grub/powerpc/ieee1275/loader.h: Likewise.
4905         * include/grub/powerpc/ieee1275/multiboot.h: Likewise.
4906         * include/grub/powerpc/ieee1275/time.h: Likewise.
4907         * include/grub/powerpc/ieee1275/util/biosdisk.h: Likewise.
4908         * include/grub/sparc64/libgcc.h: Likewise.
4909         * include/grub/sparc64/setjmp.h: Likewise.
4910         * include/grub/sparc64/types.h: Likewise.
4911         * include/grub/sparc64/ieee1275/console.h: Likewise.
4912         * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
4913         * include/grub/sparc64/ieee1275/kernel.h: Likewise.
4914         * include/grub/sparc64/ieee1275/time.h: Likewise.
4915         * include/grub/util/biosdisk.h: Likewise.
4916         * include/grub/util/getroot.h: Likewise.
4917         * include/grub/util/lvm.h: Likewise.
4918         * include/grub/util/misc.h: Likewise.
4919         * include/grub/util/raid.h: Likewise.
4920         * include/grub/util/resolve.h: Likewise.
4921         * io/gzio.c: Likewise.
4922         * kern/device.c: Likewise.
4923         * kern/disk.c: Likewise.
4924         * kern/dl.c: Likewise.
4925         * kern/elf.c: Likewise.
4926         * kern/env.c: Likewise.
4927         * kern/err.c: Likewise.
4928         * kern/file.c: Likewise.
4929         * kern/fs.c: Likewise.
4930         * kern/loader.c: Likewise.
4931         * kern/main.c: Likewise.
4932         * kern/misc.c: Likewise.
4933         * kern/mm.c: Likewise.
4934         * kern/parser.c: Likewise.
4935         * kern/partition.c: Likewise.
4936         * kern/rescue.c: Likewise.
4937         * kern/term.c: Likewise.
4938         * kern/efi/efi.c: Likewise.
4939         * kern/efi/init.c: Likewise.
4940         * kern/efi/mm.c: Likewise.
4941         * kern/i386/dl.c: Likewise.
4942         * kern/i386/efi/init.c: Likewise.
4943         * kern/i386/efi/startup.S: Likewise.
4944         * kern/i386/pc/init.c: Likewise.
4945         * kern/i386/pc/lzo1x.S: Likewise.
4946         * kern/i386/pc/startup.S: Likewise.
4947         * kern/ieee1275/ieee1275.c: Likewise.
4948         * kern/powerpc/cache.S: Likewise.
4949         * kern/powerpc/dl.c: Likewise.
4950         * kern/powerpc/ieee1275/cmain.c: Likewise.
4951         * kern/powerpc/ieee1275/crt0.S: Likewise.
4952         * kern/powerpc/ieee1275/init.c: Likewise.
4953         * kern/powerpc/ieee1275/openfw.c: Likewise.
4954         * kern/sparc64/cache.S: Likewise.
4955         * kern/sparc64/dl.c: Likewise.
4956         * kern/sparc64/ieee1275/init.c: Likewise.
4957         * kern/sparc64/ieee1275/openfw.c: Likewise.
4958         * loader/efi/chainloader.c: Likewise.
4959         * loader/efi/chainloader_normal.c: Likewise.
4960         * loader/i386/efi/linux.c: Likewise.
4961         * loader/i386/efi/linux_normal.c: Likewise.
4962         * loader/i386/pc/chainloader.c: Likewise.
4963         * loader/i386/pc/chainloader_normal.c: Likewise.
4964         * loader/i386/pc/linux.c: Likewise.
4965         * loader/i386/pc/linux_normal.c: Likewise.
4966         * loader/i386/pc/multiboot.c: Likewise.
4967         * loader/i386/pc/multiboot_normal.c: Likewise.
4968         * loader/powerpc/ieee1275/linux.c: Likewise.
4969         * loader/powerpc/ieee1275/linux_normal.c: Likewise.
4970         * normal/arg.c: Likewise.
4971         * normal/cmdline.c: Likewise.
4972         * normal/command.c: Likewise.
4973         * normal/completion.c: Likewise.
4974         * normal/execute.c: Likewise.
4975         * normal/function.c: Likewise.
4976         * normal/lexer.c: Likewise.
4977         * normal/main.c: Likewise.
4978         * normal/menu.c: Likewise.
4979         * normal/menu_entry.c: Likewise.
4980         * normal/misc.c: Likewise.
4981         * normal/parser.y: Likewise.
4982         * normal/script.c: Likewise.
4983         * normal/i386/setjmp.S: Likewise.
4984         * normal/powerpc/setjmp.S: Likewise.
4985         * normal/sparc64/setjmp.S: Likewise.
4986         * partmap/acorn.c: Likewise.
4987         * partmap/amiga.c: Likewise.
4988         * partmap/apple.c: Likewise.
4989         * partmap/gpt.c: Likewise.
4990         * partmap/pc.c: Likewise.
4991         * partmap/sun.c: Likewise.
4992         * term/gfxterm.c: Likewise.
4993         * term/terminfo.c: Likewise.
4994         * term/efi/console.c: Likewise.
4995         * term/i386/pc/console.c: Likewise.
4996         * term/i386/pc/serial.c: Likewise.
4997         * term/i386/pc/vesafb.c: Likewise.
4998         * term/i386/pc/vga.c: Likewise.
4999         * term/ieee1275/ofconsole.c: Likewise.
5000         * util/biosdisk.c: Likewise.
5001         * util/console.c: Likewise.
5002         * util/genmoddep.c: Likewise.
5003         * util/getroot.c: Likewise.
5004         * util/grub-emu.c: Likewise.
5005         * util/grub-mkdevicemap.c: Likewise.
5006         * util/grub-probe.c: Likewise.
5007         * util/lvm.c: Likewise.
5008         * util/misc.c: Likewise.
5009         * util/raid.c: Likewise.
5010         * util/resolve.c: Likewise.
5011         * util/update-grub.in: Likewise.
5012         * util/update-grub_lib.in: Likewise.
5013         * util/grub.d/00_header.in: Likewise.
5014         * util/grub.d/10_hurd.in: Likewise.
5015         * util/grub.d/10_linux.in: Likewise.
5016         * util/i386/efi/grub-install.in: Likewise.
5017         * util/i386/efi/grub-mkimage.c: Likewise.
5018         * util/i386/pc/grub-install.in: Likewise.
5019         * util/i386/pc/grub-mkimage.c: Likewise.
5020         * util/i386/pc/grub-mkrescue.in: Likewise.
5021         * util/i386/pc/grub-setup.c: Likewise.
5022         * util/i386/pc/misc.c: Likewise.
5023         * util/powerpc/ieee1275/grub-install.in: Likewise.
5024         * util/powerpc/ieee1275/grub-mkimage.c: Likewise.
5025         * util/powerpc/ieee1275/misc.c: Likewise.
5026         * video/bitmap.c: Likewise.
5027         * video/video.c: Likewise.
5028         * video/i386/pc/vbe.c: Likewise.
5029         * video/i386/pc/vbeblit.c: Likewise.
5030         * video/i386/pc/vbefill.c: Likewise.
5031         * video/i386/pc/vbeutil.c: Likewise.
5032         * video/readers/tga.c: Likewise.
5034 2007-07-02  Robert Millan  <rmh@aybabtu.com>
5036         * conf/i386-efi.rmk: Replace obsolete reference to
5037         util/i386/pc/biosdisk.c with util/biosdisk.c, and util/i386/pc/getroot.c
5038         with util/getroot.c.
5039         * conf/powerpc-ieee1275.rmk: Likewise.
5040         * conf/sparc64-ieee1275.rmk: Likewise.
5042         * util/grub-emu.c (main): Fix unchecked pointer handling.
5044 2007-07-02  Robert Millan  <rmh@aybabtu.com>
5046         * util/i386/efi/grub-install.in: Allow `grub_probe --target=partmap'
5047         invocation to fail, in order to support partition-less media.
5049         * util/i386/pc/grub-install.in: Likewise.
5051         * util/powerpc/ieee1275/grub-install.in: Use grub-probe to determine
5052         which fs or partmap modules are needed (akin to its sister scripts).
5054         Also use grub-probe to get rid of unportable /proc/mounts check.
5056         Print the same informational message that the other scripts do, before
5057         exiting.
5059 2007-06-23  Robert Millan  <rmh@aybabtu.com>
5061         * util/update-grub_lib.in (font_path): New function.  Determine whether
5062         a font file can be found and, if so, echo the GRUB path to it.
5064         * util/update-grub.in: Handle multiple terminals depending on user
5065         input, platform availability and font file presence.  Propagate
5066         variables of our findings to /etc/grub.d/ children.
5068         * util/grub.d/00_header.in: Handle multiple terminals, based on
5069         environment setup by update-grub.
5071 2007-06-23  Robert Millan  <rmh@aybabtu.com>
5073         * conf/i386-pc.rmk (pkgdata_MODULES): Add serial.mod.
5075 2007-06-21  Robert Millan  <rmh@aybabtu.com>
5077         * include/grub/i386/pc/kernel.h: Define GRUB_KERNEL_MACHINE_DATA_END to
5078         indicate end of data section in kernel image.
5079         * include/grub/i386/efi/kernel.h: Define GRUB_KERNEL_MACHINE_PREFIX and
5080         GRUB_KERNEL_MACHINE_DATA_END.
5082         * kern/i386/pc/startup.S: Do not initialize grub_prefix, only reserve
5083         space for it.
5084         * kern/i386/efi/startup.S: Likewise.
5086         * util/i386/pc/grub-mkimage.c: Initialize grub_prefix to /boot/grub
5087         during image generation.  Implement --prefix option to override this
5088         patch.
5089         * util/i386/efi/grub-mkimage.c: Likewise.
5091         * util/update-grub_lib.in (convert_system_path_to_grub_path): Split
5092         code to make path relative to its root into a separate function.
5094         * util/i386/pc/grub-install.in: Use newly provided
5095         make_system_path_relative_to_its_root() to convert ${grubdir}, then
5096         pass the result to grub-install --prefix.
5098 2007-06-13  Robert Millan  <rmh@aybabtu.com>
5100         * include/grub/util/misc.h: Define DEFAULT_DIRECTORY and
5101         DEFAULT_DEVICE_MAP.
5102         * util/grub-emu.c: Use above definitions from misc.h instead of
5103         defining them.
5104         * util/grub-mkdevicemap.c: Likewise.
5105         * util/i386/pc/grub-setup.c: Likewise.
5106         * util/grub-probe.c: Likewise.
5107         (probe): Abort with grub_util_error() when either
5108         grub_guess_root_device or grub_util_get_grub_dev fails.
5110 2007-06-12  Robert Millan  <rmh@aybabtu.com>
5112         * normal/command.c (grub_command_execute): Use NULL rather than 0 for
5113         "pager" assignment.
5114         * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Likewise for
5115         "pcdata".
5116         * util/grub-probe.c (probe): Likewise for "drive_name".
5118 2007-06-11  Robert Millan  <rmh@aybabtu.com>
5120         * util/i386/pc/grub-mkrescue.in: Pad both floppy images with zeroes,
5121         not just the cdrom one.
5123 2007-06-11  Robert Millan  <rmh@aybabtu.com>
5125         * util/i386/pc/grub-mkrescue.in: Add "set -e".
5126         Add --pkglibdir=DIR option to override pkglibdir.
5127         Mention --image-type=TYPE in help output.
5128         Fix --grub-mkimage (it was a no-op).
5129         Abort gracefully when no parameter is given.
5131 2007-06-11  Robert Millan  <rmh@aybabtu.com>
5133         * util/i386/pc/grub-mkrescue.in: New file.
5134         * conf/i386-pc.rmk: Add its build declarations.  Put it in bin_SCRIPTS.
5135         * Makefile.in: Handle bin_SCRIPTS.
5137 2007-06-10  Vesa Jaaskelainen  <chaac@nic.fi>
5139         * term/gfxterm.c (grub_gfxterm_init): Added support for specifying
5140         list of video modes.
5142 2007-06-06  Robert Millan  <rmh@aybabtu.com>
5144         * util/update-grub_lib.in (convert_system_path_to_grub_path): Abort if
5145         file doesn't exist, or if it is in a filesystem grub can't read.
5147         * util/update-grub.in: Set fallback for GRUB_FS check to "unknown".  Do
5148         not abort if GRUB_DRIVE could not be defined.  Rearrange generated
5149         header comment to fit in 80 columns when the variables are resolved.
5151         * util/grub.d/00_header.in: Only set root variable when GRUB_DRIVE
5152         could be identified by update-grub.  Remove redundant check for
5153         unifont.pff existence (since convert_system_path_to_grub_path now
5154         handles that).
5156 2007-06-04  Robert Millan  <rmh@aybabtu.com>
5158         * conf/i386-efi.rmk (grub_probe_SOURCES): Add partmap/apple.c.
5160         * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.
5162         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add partmap/pc.c.
5164 2007-06-04  Robert Millan  <rmh@aybabtu.com>
5166         * conf/powerpc-ieee1275.rmk: Enable grub-mkdevicemap and grub-probe.
5168         * include/grub/partition.h: Declare grub_apple_partition_map_init and
5169         grub_apple_partition_map_fini.
5171         * util/biosdisk.c
5172         (grub_util_biosdisk_open): Replace BLKGETSIZE with BLKGETSIZE64 (needed
5173         to access >2 TiB disks).
5175         Print disk->total_sectors with %llu instead of %lu, since this
5176         variable is always 64-bit (prevents wrong disk size from being displayed
5177         on either >2 TiB disk or big-endian CPU).
5179         (grub_util_biosdisk_get_grub_dev): Convert gpt_partition_map handling
5180         into a generic case that supports all (sane) partition maps.
5182         Stop using grub_cpu_to_le32() on dos_part / bsd_part since it actually
5183         breaks big-endian.
5185         * util/grub-probe.c: Call grub_apple_partition_map_init() before probe()
5186         and grub_apple_partition_map_fini() after that.
5188 2007-06-01  Robert Millan  <rmh@aybabtu.com>
5190         * util/update-grub.in: Export GRUB_CMDLINE_LINUX.
5192         * util/grub.d/00_header.in: Only enable gfxterm when
5193         convert_system_path_to_grub_path() succeeds.
5195 2007-05-20  Robert Millan  <rmh@aybabtu.com>
5197         * util/update-grub_lib.in: New file.
5198         * DISTLIST: Add update-grub_lib.in.
5199         * conf/common.rmk: Generate update-grub_lib and install it in
5200         $(lib_DATA).
5201         * Makefile.in: Add install routine for $(lib_DATA).
5203         * util/grub.d/00_header.in: Use convert_system_path_to_grub_path()
5204         function provided by update-grub_lib to support arbitrary paths of
5205         unifont.pff.
5206         * util/update-grub.in: Use convert_system_path_to_grub_path() to
5207         initialize GRUB_DRIVE_BOOT and GRUB_DRIVE_BOOT_GRUB variables.
5209 2007-05-19  Robert Millan  <rmh@aybabtu.com>
5211         * commands/i386/cpuid.c: New module.
5212         * DISTLIST: Add it.
5213         * conf/i386-efi.rmk: Enable cpuid.mod.
5214         * conf/i386-pc.rmk: Likewise.
5216 2007-05-18  Jeroen Dekkers  <jeroen@dekkers.cx>
5218         * kern/disk.c (grub_disk_read): Check return value of
5219         grub_realloc().
5221 2007-05-18  Jeroen Dekkers  <jeroen@dekkers.cx>
5223         * util/getroot.c (grub_util_get_grub_dev): Support partitionable
5224         arrays.
5225         * disk/raid.c (grub_raid_open): Likewise.
5227 2007-05-17  Jeroen Dekkers  <jeroen@dekkers.cx>
5229         * util/biosdisk.c (linux_find_partition): Allocate real_dev on the
5230         stack instead of on the heap.
5232         * kern/disk.c (grub_disk_read): Make sure tmp_buf is big enough
5233         before doing a read on it.
5235         * configure.ac: Only use -fno-stack-protector for the target
5236         environment.
5238 2007-05-17  Jeroen Dekkers  <jeroen@dekkers.cx>
5240         * video/i386/pc/vbe.c (grub_video_vbe_create_render_target): Add
5241         __attribute_ ((unused)) to mode_type argument.
5243         * util/getroot.c (grub_guess_root_device): Fix #endif.
5245         * kern/misc.c (memcmp): Fix prototype.
5247         * include/grub/partition.h [GRUB_UTIL]
5248         (grub_gpt_partition_map_init): Add prototype.
5249         (grub_gpt_partition_map_fini): Likewise.
5251         * fs/jfs.c (struct grub_jfs_inode): Put __attribute__ ((packed)
5252         at the right place.
5254         * fs/fat.c (grub_fat_mount): Replace ~0UL with ~0U.
5255         (grub_fat_read_data): Likewise.
5256         (grub_fat_find_dir): Likewise.
5258         * font/manager.c (find_glyph): Make table a const.
5259         (grub_font_get_glyph): Remove bitmap from if statement.
5261 2007-05-16  Jeroen Dekkers  <jeroen@dekkers.cx>
5263         * util/getroot.c (grub_guess_root_device): Remove RAID and LVM
5264         code, first search for device in /dev/mapper, then in /dev.
5265         (grub_util_get_grub_dev): New function.
5266         * include/grub/util/getroot.h (grub_util_get_grub_dev): Add
5267         prototype.
5268         * util/grub-probe.c (probe): Remove check for RAID, call
5269         grub_util_get_grub_dev() instead of
5270         grub_util_biosdisk_get_grub_dev().
5271         * util/grub-emu.c (main): Call grub_util_get_grub_dev() instead of
5272         grub_util_biosdisk_get_grub_dev().
5273         * util/i386/pc/grub-setup.c (main): Likewise.
5275 2007-05-16  Robert Millan  <rmh@aybabtu.com>
5277         * DISTLIST: Update for the latest changes.
5278         * conf/i386-pc.rmk: Use the new paths for util/getroot.c,
5279         util/grub-mkdevicemap.c, util/grub-probe.c and util/biosdisk.c.
5280         * util/grub-emu.c: Replace grub/i386/pc/util/biosdisk.h with
5281         grub/util/biosdisk.h.
5282         * util/i386/pc/grub-setup.c: Replace grub/machine/util/biosdisk.h with
5283         grub/util/biosdisk.h.
5285 2007-05-16  Robert Millan  <rmh@aybabtu.com>
5287         * util/grub.d/00_header.in: Set default gfxmode to `640x480'.
5289 2007-05-16  Robert Millan  <rmh@aybabtu.com>
5291         * util/i386/efi/grub-install.in: New.
5292         * conf/i386-efi.rmk: Enable grub-mkdevicemap, grub-probe and the
5293         newly added grub-install.
5294         * util/biosdisk.c: Remove unnecessary grub/machine/biosdisk.h
5295         include.
5296         * util/getroot.c: Replace grub/i386/pc/util/biosdisk.h with
5297         grub/util/biosdisk.h.
5298         * util/grub-probe.c: Replace grub/machine/util/biosdisk.h with
5299         grub/util/biosdisk.h.
5301 2007-05-16  Robert Millan  <rmh@aybabtu.com>
5303         * include/grub/i386/pc/util/biosdisk.h: Moved to ...
5304         * include/grub/util/biosdisk.h: ... here.
5305         * util/i386/pc/biosdisk.c: Moved to ...
5306         * util/biosdisk.c: ... here.
5307         * util/i386/pc/getroot.c: Moved to ...
5308         * util/getroot.c: ... here.
5309         * util/i386/pc/grub-mkdevicemap.c: Moved to ...
5310         * util/grub-mkdevicemap.c: ... here.
5311         * util/i386/pc/grub-probe.c: Moved to ...
5312         * util/grub-probe.c: ... here.
5314 2007-05-15  Robert Millan  <rmh@aybabtu.com>
5316         * util/update-grub.in: Remove duplicated line in grub.cfg header
5317         message.
5319 2007-05-13  Robert Millan  <rmh@aybabtu.com>
5321         * util/update-grub.in: Fix a few assumptions about the devices holding
5322         /, /boot and /boot/grub being the same.
5323         * util/grub.d/00_header.in: Likewise.
5324         * util/grub.d/10_hurd.in: Likewise.
5325         * util/grub.d/10_linux.in: Likewise.
5327         * util/grub.d/10_linux.in: Implement Linux image sorting with arbitrary
5328         patterns.  Use that to define the `.old' suffix as older than `'.
5330         * util/grub.d/00_header.in: Set default gfxmode to `800x600x16'.
5332         * util/update-grub.in: Add a reference to ${sysconfdir}/default/grub in
5333         the grub.cfg header message.
5335 2007-05-11  Robert Millan  <rmh@aybabtu.com>
5337         * util/update-grub.in: Create device.map if it doesn't already exist,
5338         before attempting to run grub-probe.
5339         Check for grub-probe and grub-mkdevicemap with the same code
5340         grub-install is using.
5341         Remove test mode.
5343 2007-05-09  Jeroen Dekkers  <jeroen@dekkers.cx>
5345         * Makefile.in: Add the datarootdir autoconf variable.
5347 2007-05-09  Robert Millan  <rmh@aybabtu.com>
5349         * util/i386/pc/grub-probe.c (probe): When detecting partition map,
5350         fail gracefully if dev->disk->partition == NULL.
5352 2007-05-07  Robert Millan  <rmh@aybabtu.com>
5354         * util/i386/pc/grub-probe.c: Add `grub-probe -t partmap' parameter to
5355         determine partition map module.
5356         * util/i386/pc/grub-install.in: Use this feature to decide which
5357         partition module to load, instead of hardcoding pc and gpt.
5359 2007-05-07  Robert Millan  <rmh@aybabtu.com>
5361         * Makefile.in: Fix assumption that $(srcdir) has a trailing slash when
5362         source directory differs from build directory.
5364 2007-05-05  Robert Millan  <rmh@aybabtu.com>
5366         * util/powerpc/ieee1275/grub-install.in: Fix syntax error in pkglibdir
5367         initialisation.
5369 2007-05-05  Robert Millan  <rmh@aybabtu.com>
5371         * util/update-grub.in: Create ${grub_prefix} if it doesn't exist.
5373 2007-05-05  Robert Millan  <rmh@aybabtu.com>
5375         * util/grub.d/10_linux.in: Allow the administrator to insert Linux
5376         command-line arguments via ${GRUB_CMDLINE_LINUX}.
5378 2007-05-05  Robert Millan  <rmh@aybabtu.com>
5380         * conf/i386-pc.rmk (grub_setup_SOURCES): Add partmap/gpt.c.
5381         (grub_probe_SOURCES): Likewise.
5382         * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): Detect
5383         GPT and initialize dos_part and bsd_part accordingly.
5384         * util/i386/pc/grub-setup.c (setup): Ditto for install_dos_part and
5385         install_bsd_part.
5386         (main): Activate gpt module for use during partition identification,
5387         and deactivate it afterwards.
5388         * util/i386/pc/grub-install.in: Add gpt module to core.img.
5389         * util/i386/pc/grub-probe.c (main): Activate gpt module for use during
5390         partition identification, and deactivate it afterwards.
5392 2007-05-05  Robert Millan  <rmh@aybabtu.com>
5394         * term/i386/pc/console.c (grub_console_fini): Call
5395         grub_term_set_current() before grub_term_unregister().
5397 2007-05-04  Robert Millan  <rmh@aybabtu.com>
5399         * DISTLIST: Add util/update-grub.in, util/grub.d/00_header.in,
5400         util/grub.d/10_hurd.in, util/grub.d/10_linux.in and util/grub.d/README.
5401         * Makefile.in: Build update-grub_SCRIPTS.  Install update-grub_SCRIPTS
5402         and update-grub_DATA.
5403         * conf/common.rmk: Build and install update-grub components.
5404         * conf/common.mk: Regenerate.
5405         * util/update-grub.in: New.  Core of update-grub.
5406         * util/grub.d/00_header.in: New.  Generates grub.cfg header.
5407         * util/grub.d/10_hurd.in: New.  Generates boot entries for the Hurd.
5408         * util/grub.d/10_linux.in: New.  Generates boot entries for Linux.
5409         * util/grub.d/README: New.  Document grub.d directory layout.
5411 2007-05-01  Robert Millan  <rmh@aybabtu.com>
5413         * util/grub-emu.c: Move initialization functions
5414         grub_util_biosdisk_init() and grub_init_all() before
5415         grub_util_biosdisk_get_grub_dev(), which relies on them.
5417 2007-04-19  Robert Millan  <rmh@aybabtu.com>
5419         * util/powerpc/ieee1275/grub-install.in: Initialize ${bindir}, since
5420         it is used later.
5422 2007-04-18  Jerone Young  <jerone@gmail.com>
5424         * kernel/elf.c: Add missing parenthesis for conditional statement
5425         stanza.
5427 2007-04-10  Jerone Young  <jerone@gmail.com>
5429         * util/i386/pc/getroot.c: Update so that if root device is /dev/root ,
5430         continue on and look for device node with real device name.
5432 2007-04-10  Jerone Young  <jerone@gmail.com>
5434         * configure.ac: Add argument for autoconf to use transformation
5435         ability.
5436         * Makefile.in: Add autoconf package transformation code.
5437         * util/i386/pc/grub-install.in: Likewise.
5438         * util/powerpc/ieee1275/grub-install.in: Likewise.
5440 2007-03-19  Yoshinori K. Okuji  <okuji@enbug.org>
5442         * fs/ext2.c (EXT2_GOOD_OLD_REVISION): New macro.
5443         (EXT2_GOOD_OLD_INODE_SIZE): Likewise.
5444         (EXT2_REVISION): Likewise.
5445         (EXT2_INODE_SIZE): Likewise.
5446         (struct grub_ext2_block_group): Added a missing member
5447         "used_dirs".
5448         (grub_ext2_read_inode): Divide by the inode size in a superblock
5449         instead of 128 to obtain INODES_PER_BLOCK.
5450         Use the macro EXT2_INODE_SIZE instead of directly using
5451         SBLOCK->INODE_SIZE.
5453 2007-03-18  Yoshinori K. Okuji  <okuji@enbug.org>
5455         * fs/ext2.c (grub_ext2_read_inode): Use the inode size in a
5456         superblock instead of the structure size to compute an
5457         offset. This fixes the problem that GRUB could not read a
5458         filesystem when inode size is different from 128-byte.
5460 2007-03-05  Marco Gerards  <marco@gnu.org>
5462         * normal/main.c (read_config_file): When "menu" is not set, create
5463         an initial context.
5465 2007-02-21  Hollis Blanchard  <hollis@penguinppc.org>
5467         * kern/powerpc/ieee1275/init.c (HEAP_SIZE): Removed.
5468         (HEAP_LIMIT): New macro.
5469         (grub_claim_heap): Claim memory up to `heaplimit'.
5471 2007-02-21  Hollis Blanchard  <hollis@penguinppc.org>
5473         * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Link at 64KB.
5474         * kern/powerpc/ieee1275/init.c (_end): Add declaration.
5475         (_start): Likewise.
5476         (grub_arch_modules_addr): Return address after `_end'.
5477         * util/powerpc/ieee1275/grub-mkimage.c: Include grub/misc.h.
5478         (load_modules): Use new parameter as `p_paddr' and `p_vaddr'.
5479         (add_segments): Calculate `_end' from phdr size and location.
5480         (ALIGN_UP): Moved to ...
5481         * include/grub/misc.h: here.
5482         * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
5483         New macro.
5484         (GRUB_IEEE1275_MODULE_BASE): Removed.
5486 2007-02-20  Hollis Blanchard  <hollis@penguinppc.org>
5488         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Correct
5489         loop boundary.
5491 2007-02-20  Hollis Blanchard  <hollis@penguinppc.org>
5493         * include/grub/elfload.h (grub_elf32_load_hook_t): Return grub_err_t.
5494         All users updated.
5495         (grub_elf64_load_hook_t): Likewise.
5496         * kern/elf.c: Call `grub_error_push' before `grub_error'. Improve
5497         debug output.
5499 2007-02-20  Hollis Blanchard  <hollis@penguinppc.org>
5501         * kern/mm.c: Update copyright.
5502         (grub_mm_debug): Correct syntax error.
5503         (grub_mm_dump_free): New function.
5504         (grub_debug_free): Call `grub_free'.
5505         * include/grub/mm.h: Update copyright.
5506         (grub_mm_dump_free): Add declaration.
5508 2007-02-12  Hollis Blanchard  <hollis@penguinppc.org>
5510         * include/grub/ieee1275/ieee1275.h: Update copyright.
5511         * kern/powerpc/ieee1275/init.c: Likewise.
5512         * kern/powerpc/ieee1275/openfw.c: Likewise.
5514         * loader/powerpc/ieee1275/linux.c: Likewise.
5515         * include/grub/elfload.h: Likewise.
5516         * kern/elf.c: Likewise.
5517         (grub_elf32_load): Pass `base' and `size' parameters.  Update all
5518         callers.
5519         (grub_elf64_load): Likewise.
5520         (grub_elf32_load_segment): Move to a nested function.
5521         (grub_elf64_load_segment): Likewise.
5523 2007-02-12  Hollis Blanchard  <hollis@penguinppc.org>
5525         * include/grub/ieee1275/ieee1275.h (grub_available_iterate): New
5526         prototype.
5527         * kern/powerpc/ieee1275/init.c (grub_heap_start): Removed.
5528         (grub_heap_len): Likewise.
5529         (HEAP_SIZE): New macro.
5530         (grub_claim_heap): New function.
5531         (grub_machine_init): Don't claim heap directly.  Call
5532         `grub_claim_heap'.
5533         * kern/powerpc/ieee1275/openfw.c: Include alloca.h.
5534         (grub_available_iterate): New function.
5536 2007-02-03  Thomas Schwinge  <tschwinge@gnu.org>
5538         * aclocal.m4 (grub_CHECK_STACK_PROTECTOR): New definition.
5539         * configure.ac: Use it for testing the HOST and TARGET compilers.
5541 2006-12-13  Thomas Schwinge  <tschwinge@gnu.org>
5543         * Makefile.in (enable_grub_emu): New variable.
5544         * configure.ac (--enable-grub-emu): New option.
5545         Do the checks for (n)curses only if `--enable-grub-emu' is requested.
5546         * conf/i386-efi.rmk (sbin_UTILITIES): Add `grub-emu' only if requested.
5547         * conf/i386-pc.rmk: Likewise.
5548         * conf/powerpc-ieee1275.rmk: Likewise.
5549         * conf/sparc64-ieee1275.rmk (bin_UTILITIES): Likewise.
5551 2006-12-12  Marco Gerards  <marco@gnu.org>
5553         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_MENU'.
5555         * kern/env.c (grub_env_unset): Don't free the member `value' when
5556         the type is GRUB_ENV_VAR_DATA, in this case it's a user defined
5557         pointer.
5559         * normal/main.c (current_menu): Removed.
5560         (free_menu): Unset the `menu' environment variable.
5561         (grub_normal_menu_addentry): Make use of the environment variable
5562         `menu', instead of using the global `current_menu'.  Allocate
5563         memory for the sourcecode of this entry.
5564         (read_config_file): New argument `nested', changed all callers.
5565         Only in the case of a new context, initialize a new menu.  Set the
5566         `menu' environment variable.
5567         (grub_normal_execute): Don't set and unset the environment
5568         variable `menu' here anymore.  Only free the menu when leaving the
5569         context.
5571         * util/i386/pc/biosdisk.c (linux_find_partition): Fixed a memory
5572         leak.
5574 2006-12-11  Marco Gerards  <marco@gnu.org>
5576         * normal/menu_entry.c (run): Fix off by one bug so the last line
5577         is executed.  Move the loader check to outside the loop.
5579 2006-12-08  Hollis Blanchard  <hollis@penguinppc.org>
5581         * kern/powerpc/ieee1275/cmain.c (cmain): Mark r3 and r4 as `UNUSED'.
5583 2006-11-25  Yoshinori K. Okuji  <okuji@enbug.org>
5585         * util/i386/pc/grub-mkimage.c (generate_image): Fix the offset of
5586         the number of sectors.  Reported by Andrey Shuvikov
5587         <mr_hyro@yahoo.com>.
5589 2006-11-11  Jeroen Dekkers  <jeroen@dekkers.cx>
5591         * kern/disk.c (grub_disk_read): When there is a read error, always
5592         try to read only the necessary data.
5594         * conf/i386-pc.rmk (grub_probe_SOURCES): Add disk/lvm.c and
5595         disk/raid.c.
5596         * include/grub/disk.h [GRUB_UTIL] (grub_raid_init): New
5597         prototype.
5598         [GRUB_UTIL] (grub_raid_fini): Likewise.
5599         [GRUB_UTIL] (grub_lvm_init): Likewise.
5600         [GRUB_UTIL] (grub_lvm_fini): Likewise.
5601         * util/i386/pc/grub-probe.c (probe): Check whether DEVICE_NAME is
5602         RAID device and copy DEVICE_NAME to DRIVE_NAME in that case.
5603         (main): Call grub_raid_init(), grub_lvm_init(), grub_lvm_fini()
5604         and grub_raid_fini().
5606 2006-11-09  Jeroen Dekkers  <jeroen@dekkers.cx>
5608         * include/grub/types.h (__unused): Rename to UNUSED.
5609         * kern/elf.c (grub_elf32_size): Use UNUSED instead of __unused.
5610         (grub_elf64_size): Likewise.
5612 2006-11-03  Hollis Blanchard  <hollis@penguinppc.org>
5614         * kern/elf.c (grub_elf_file): Call grub_file_seek. Call
5615         grub_error_push and grub_error_pop in the error-handling path.
5616         (grub_elf32_load_segment): Only call grub_file_read with non-zero
5617         length.
5619 2006-11-03  Hollis Blanchard  <hollis@penguinppc.org>
5621         * conf/i386-efi.rmk (grub_emu_SOURCES): Add kern/elf.c.
5622         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
5623         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5624         (kernel_elf_SOURCES): Likewise.
5625         * conf/i386-efi.rmk (kernel_mod_HEADERS): Add elfload.h and cache.h.
5626         * conf/i386-pc.rmk (kernel_mod_HEADERS): Likewise.
5627         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
5628         * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
5629         * conf/common.rmk (pkgdata_MODULES): Add elf.mod.
5630         (elf_mod_SOURCES): New variable.
5631         (elf_mod_CFLAGS): Likewise.
5632         (elf_mod_LDFLAGS): Likewise.
5633         * include/grub/types.h (__unused): New macro.
5634         * include/grub/elfload.h: New file.
5635         * kern/elf.c: Likewise.
5636         * loader/powerpc/ieee1275/linux.c: Include elfload.h.
5637         (ELF32_LOADMASK): New macro.
5638         (ELF64_LOADMASK): Likewise.
5639         (vmlinux): Removed.
5640         (grub_linux_load32): New function.
5641         (grub_linux_load64): Likewise.
5642         (grub_rescue_cmd_linux): Call grub_linux_load32 or grub_linux_load64.
5643         Use grub_elf_t instead of grub_file_t.
5645 2006-11-02  Hollis Blanchard  <hollis@penguinppc.org>
5647         * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): Add
5648         `catch_result' to struct set_color_args.
5650 2006-10-28  Yoshinori K. Okuji  <okuji@enbug.org>
5652         * normal/menu.c: Include grub/script.h.
5653         * normal/menu_entry.c: Likewise.
5654         * include/grub/normal.h: Do not include grub/script.h.
5656 2006-10-27  Hollis Blanchard  <hollis@penguinppc.org>
5658         * kern/disk.c (grub_disk_read): Correct debug printf formatting.
5660 2006-10-27  Hollis Blanchard  <hollis@penguinppc.org>
5662         * kern/disk.c (grub_disk_open): Print debug messages when opening a
5663         disk.
5664         (grub_disk_close): Print debug messages when closing a disk.
5665         (grub_disk_read): Print debug messages when disk read fails.
5666         * kern/fs.c (grub_fs_probe): Print debug messages when detecting
5667         filesystem type.
5668         * kern/partition.c: Include misc.h.
5669         (grub_partition_iterate): Print debug messages when detecting
5670         partition type.
5672 2006-10-27  Hollis Blanchard  <hollis@penguinppc.org>
5674         * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Return error if `status'
5675         is negative.
5676         * kern/ieee1275/ieee1275.c (IEEE1275_IHANDLE_INVALID): Change to 0.
5678 2006-10-26  Hollis Blanchard  <hollis@penguinppc.org>
5680         * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
5681         Reverse GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS test.
5683 2006-10-25  Jeroen Dekkers  <jeroen@dekkers.cx>
5685         * disk/lvm.c (grub_lvm_scan_device): Malloc sizeof(*lv) bytes
5686         instead of sizeof(lv). Patch by Michael Guntsche.
5688 2006-10-18  Jeroen Dekkers  <jeroen@dekkers.cx>
5690         * disk/lvm.c: Rename VGS to VG_LIST.
5691         (grub_lvm_iterate): Change VGS->LV to VG-LV.
5692         (grub_lvm_open): Likewise.
5693         Thanks to Michael Guntsche for finding this bug.
5695 2006-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
5697         * configure.ac (AC_INIT): Bumped to 1.95.
5699 2006-10-14  Robert Millan  <rmh@aybabtu.com>
5701         * util/i386/pc/getroot.c (grub_guess_root_device): Don't compare os_dev
5702         with "/dev/.static/dev/md".
5704 2006-10-14  Yoshinori K. Okuji  <okuji@enbug.org>
5706         * util/i386/pc/grub-probe.c (probe): Print DEVICE_NAME instead of
5707         DRIVE_NAME when grub_util_biosdisk_get_grub_dev fails. Open
5708         DRIVE_NAME instead of DEVICE_NAME. Make sure that DEVICE_NAME and
5709         DRIVE_NAME are always freed.
5711         * util/i386/pc/biosdisk.c (make_device_name): Add one into
5712         DOS_PART, as a DOS partition is counted from one instead of zero
5713         now. Reported by Robert Millan.
5715 2006-10-14  Robert Millan  <rmh@aybabtu.com>
5717         * util/i386/pc/getroot.c (grub_guess_root_device): Stop using
5718         grub_util_biosdisk_get_grub_dev to convert system device to GRUB device.
5719         * util/grub-emu.c (main): Use grub_util_biosdisk_get_grub_dev with the
5720         string returned by grub_guess_root_device.
5721         * util/i386/pc/grub-setup.c: Likewise.
5722         * util/i386/pc/grub-probefs.c: Likewise.
5724         * util/i386/pc/grub-probefs.c: Rename to ...
5725         * util/i386/pc/grub-probe.c: ... this.
5726         * DISTLIST: Remove grub-probefs, add grub-probe.
5727         * conf/i386-efi.rmk: Likewise.
5728         * conf/i386-pc.rmk: Likewise.
5729         * util/i386/pc/grub-install.in: Likewise.
5731         * util/i386/pc/grub-probe.c: Add --target=(fs|device|drive) option to
5732         choose which information we want to print.
5734 2006-10-14  Yoshinori K. Okuji  <okuji@enbug.org>
5736         * DISTLIST: Added commands/echo.c, disk/lvm.c, disk/raid.c,
5737         include/grub/bitmap.h, include/grub/lvm.h, include/grub/raid.h,
5738         include/grub/i386/pc/vbeutil.h, include/grub/util/lvm.h,
5739         include/grub/util/raid.h, util/lvm.c, util/raid.c, video/bitmap.c,
5740         video/readers/tga.c and video/i386/pc/vbeutil.c.
5742 2006-10-14  Jeroen Dekkers  <jeroen@dekkers.cx>
5744         Added support for RAID and LVM.
5746         * disk/lvm.c: New file.
5747         * disk/raid.c: Likewise.
5748         * include/grub/lvm.h: Likewise.
5749         * include/grub/raid.h: Likewise.
5750         * include/grub/util/lvm.h: Likewise.
5751         * include/grub/util/raid.h: Likewise.
5752         * util/lvm.c: Likewise.
5753         * util/raid.c: Likewise.
5755         * include/grub/disk.h (grub_disk_dev_id): Add
5756         GRUB_DISK_DEVICE_RAID_ID and GRUB_DISK_DEVICE_LVM_ID.
5757         (grub_disk_get_size): New prototype.
5758         * kern/disk.c (grub_disk_open): Check whether grub_partition_probe()
5759         returns a partition.
5760         (grub_disk_get_size): New function.
5762         * kern/i386/pc/init.c (make_install_device): Copy the prefix
5763         verbatim if grub_install_dos_part is -2.
5765         * util/i386/pc/getroot.c (grub_guess_root_device): Support RAID
5766         and LVM devices.
5768         * util/i386/pc/grub-setup.c (setup): New argument
5769         MUST_EMBED. Force embedding of GRUB when the argument is
5770         true. Close FILE before returning.
5771         (main): Add support for RAID and LVM.
5773         * conf/common.rmk: Add RAID and LVM modules.
5774         * conf/i386-pc.rmk (grub_setup_SOURCES): Add util/raid.c and
5775         util/lvm.c.
5776         (grub_emu_SOURCES): Add disk/raid.c and disk/lvm.c.
5778         * kern/misc.c (grub_strstr): New function.
5779         * include/grub/misc.h (grub_strstr): New prototype.
5781 2006-10-10  Tristan Gingold  <tristan.gingold@bull.net>
5783         * include/grub/efi/api.h (GRUB_EFI_ERROR_CODE): Long constant.
5785 2006-10-05  Tristan Gingold  <tristan.gingold@bull.net>
5787         * kern/misc.c (grub_strtoull): Guess the base only if not
5788         specified.
5790 2006-10-01  Hollis Blanchard  <hollis@penguinppc.org>
5792         * kern/powerpc/ieee1275/cmain.c (cmain): Remove incomplete Old World
5793         PowerMac support.
5795 2006-10-01  Hollis Blanchard  <hollis@penguinppc.org>
5797         * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Cast `size' to long.
5799         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_next_property):
5800         Remove `flags' argument.  All callers changed.
5801         * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_ROOT): Removed.
5802         (IEEE1275_IHANDLE_INVALID): New variable.
5803         (IEEE1275_CELL_INVALID): New variable.
5804         (grub_ieee1275_finddevice, grub_ieee1275_get_property,
5805         grub_ieee1275_get_property_length, grub_ieee1275_instance_to_package,
5806         grub_ieee1275_package_to_path, grub_ieee1275_instance_to_path,
5807         grub_ieee1275_peer, grub_ieee1275_child, grub_ieee1275_open,
5808         grub_ieee1275_claim, grub_ieee1275_set_property): Error-check return
5809         codes from Open Firmware.  All callers updated.
5810         (grub_ieee1275_next_property): Directly return Open Firmware return
5811         code.
5812         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
5813         Standardize error checking from `grub_ieee1275_get_property'.
5814         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Rename
5815         `devalias' to `aliases'.  Correct comments.  Consolidate error paths.
5817 2006-10-01  Hollis Blanchard  <hollis@penguinppc.org>
5819         * kern/ieee1275/ieee1275.c (grub_ieee1275_instance_to_path): Rename
5820         `instance_to_package_args' to `instance_to_path_args'.
5822         * kern/powerpc/ieee1275/init.c (grub_machine_init): Use
5823         `grub_ieee1275_chosen'.
5825         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Call
5826         `grub_ieee1275_interpret'.
5828 2006-09-25  Hollis Blanchard  <hollis@penguinppc.org>
5830         * util/powerpc/ieee1275/grub-mkimage.c: Include config.h.
5832 2006-09-25  Hollis Blanchard  <hollis@penguinppc.org>
5834         * include/grub/powerpc/libgcc.h (__floatdisf): New prototype.
5835         (__cmpdi): Likewise.
5837         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Pass 0 as
5838         `flags' to `grub_ieee1275_next_property'.  Change `pathlen' to type
5839         `grub_ssize_t'.
5841         * kern/powerpc/ieee1275/cmain.c: Include grub/misc.h.
5843         * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Change `actual'
5844         to type `grub_ssize_t'.
5845         (grub_rescue_cmd_linux): Cast -1 to `grub_off_t'.
5847 2006-09-22  Marco Gerards  <marco@gnu.org>
5849         * normal/script.c (grub_script_create_cmdmenu): Skip leading
5850         newlines.
5852 2006-09-22  Marco Gerards  <marco@gnu.org>
5854         * commands/echo.c: New file.
5856         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/echo.c'.
5858         * conf/common.rmk (echo_mod_SOURCES): New variable.
5859         (echo_mod_CFLAGS): Likewise.
5860         (echo_mod_LDFLAGS): Likewise.
5862 2006-09-22  Marco Gerards  <marco@gnu.org>
5864         * normal/main.c (get_line): Malloc memory instead of using
5865         preallocated memory.  Removed the arguments `cmdline' and
5866         `max_len'.  Updated all callers.
5868 2006-09-22  Marco Gerards  <marco@gnu.org>
5870         * conf/i386-efi.rmk (grub_emu_DEPENDENCIES): New variable.
5871         (normal_mod_DEPENDENCIES): Likewise.
5873         * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Likewise.
5874         (normal_mod_DEPENDENCIES): Likewise.
5876         * conf/sparc64-ieee1275.rmk (normal_mod_DEPENDENCIES): Likewise.
5878 2006-09-22  Johan Rydberg  <jrydberg@gnu.org>
5880         * genmk.rb: Add DEPENDENCIES variables to modules, utilities, and
5881         programs.
5882         * conf/i386-pc.rmk (grub_emu_DEPENDENCIES): Declare.
5883         (normal_mod_DEPENDENCIES): Likewise.
5884         * conf/i386-pc.mk: Regenerate.
5885         * conf/i386-efi.mk: Likewise
5886         * conf/common.mk: Likewise.
5887         * conf/powerpc-ieee1275.mk: Likewise.
5888         * conf/sparc64-ieee1275.mk: Likewise.
5890 2006-09-22  Robert Millan  <rmh@aybabtu.com>
5892         Sync with i386 version.
5893         * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Remove grub-emu, add grub-mkimage.
5894         * conf/powerpc-ieee1275.rmk (sbin_UTILITIES): Remove grub-mkimage, add grub-emu.
5896 2006-09-21  Robert Millan  <rmh@aybabtu.com>
5898         Import from GRUB Legacy (lib/device.c):
5899         * util/i386/pc/grub-mkdevicemap.c (get_i2o_disk_name): New function.
5900         (init_device_map) [__linux__]: Add support for I2O devices.
5902 2006-09-14  Marco Gerards  <marco@gnu.org>
5904         * conf/i386-pc.rmk (COMMON_LDFLAGS): Use `-m32' instead of
5905         `-melf_i386'.
5907 2006-09-14  Robert Millan  <rmh@aybabtu.com>
5909         * util/i386/pc/grub-install.in: Skip menu.lst when removing
5910         /boot/grub/*.lst.
5912         * util/i386/pc/getroot.c: Don't recurse into dotdirs (e.g. ".static").
5914         * util/i386/pc/grub-mkdevicemap.c: Make sure the floppy device exists
5915         before adding it to device.map.
5917 2006-08-15  Johan Rydberg  <jrydberg@gnu.org>
5919         * genmk.rb: Let GCC generate dependencies the first time it
5920         compiles a file; using the -MD option.
5921         * conf/common.mk: Regenerate.
5922         * conf/i386-pc.mk: Likewise.
5923         * conf/i386-efi.mk: Likewise.
5924         * conf/powerpc-ieee1275.mk: Likewise.
5925         * conf/sparc64-ieee1275.mk: Likewise.
5927 2006-08-04  Yoshinori K. Okuji  <okuji@enbug.org>
5929         Move the prototypes of grub_setjmp and grub_longjmp to
5930         cpu/setjmp.h, so that each architecture may specify different
5931         attributes.
5933         * include/grub/i386/setjmp.h (grub_setjmp): New prototype.
5934         (grub_longjmp): Likewise.
5935         * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise..
5936         (grub_longjmp): Likewise.
5937         * include/grub/sparc64/setjmp.h (grub_setjmp): Likewise..
5938         (grub_longjmp): Likewise.
5940         * include/grub/setjmp.h [!GRUB_UTIL] (grub_setjmp): Removed.
5941         [!GRUB_UTIL] (grub_longjmp): Removed.
5943 2006-08-01  Pelletier Vincent  <subdino2004@yahoo.fr>
5945         * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): IEEE1275
5946         "color!" method does not return any value.
5948 2006-07-29  Vesa Jaaskelainen  <chaac@nic.fi>
5950         * include/grub/bitmap.h: New file.
5952         * include/grub/i386/pc/vbeutil.h: Likewise.
5954         * video/bitmap.c: Likewise.
5956         * video/readers/tga.c: Likewise.
5958         * video/i386/pc/vbeutil.c: Likewise.
5960         * commands/videotest.c: Code cleanup and updated to reflect to new
5961         video API.
5963         * term/gfxterm.c: Likewise.
5965         * video/video.c: Likewise.
5967         * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod.
5968         (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c.
5969         (bitmap_mod_SOURCES): New entry.
5970         (bitmap_mod_CFLAGS): Likewise.
5971         (bitmap_mod_LDFLAGS): Likewise.
5972         (tga_mod_SOURCES): Likewise.
5973         (tga_mod_CFLAGS): Likewise.
5974         (tga_mod_LDFLAGS): Likewise.
5976         * include/grub/video.h (grub_video_blit_operators): New enum type.
5977         (grub_video_render_target): Changed as forward declaration and moved
5978         actual definition to be video driver specific.
5979         (grub_video_adapter.blit_bitmap): Added blitting operator.
5980         (grub_video_adapter.blit_render_target): Likewise.
5981         (grub_video_blit_bitmap): Likewise.
5982         (grub_video_blit_render_target): Likewise.
5984         * include/grub/i386/pc/vbe.h (grub_video_render_target): Added
5985         driver specific render target definition.
5986         (grub_video_vbe_map_rgba): Added driver internal helper.
5987         (grub_video_vbe_unmap_color): Updated to use
5988         grub_video_i386_vbeblit_info.
5989         (grub_video_vbe_get_video_ptr): Likewise.
5991         * include/grub/i386/pc/vbeblit.h
5992         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use
5993         grub_video_i386_vbeblit_info.
5994         (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
5995         (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
5996         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
5997         (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
5998         (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
5999         (grub_video_i386_vbeblit_index_index): Likewise.
6000         (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function.
6001         (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
6002         (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
6003         (grub_video_i386_vbeblit_blend): Added generic blitter for blend
6004         operator.
6005         (grub_video_i386_vbeblit_replace): Added generic blitter for replace
6006         operator.
6008         * video/i386/pc/vbeblit.c: Updated to reflect changes on
6009         include/grub/i386/pc/vbeblit.h.
6011         * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8):
6012         Updated to use grub_video_i386_vbeblit_info.
6013         (grub_video_i386_vbefill_R8G8B8): Likewise.
6014         (grub_video_i386_vbefill_index): Likewise.
6015         (grub_video_i386_vbefill): Added generic filler.
6017         * video/i386/pc/vbefill.c: Updated to reflect changes on
6018         include/grub/i386/pc/vbefill.h.
6020         * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use
6021         grub_video_i386_vbeblit_info.
6022         (grub_video_vbe_unmap_color): Likewise.
6023         (grub_video_vbe_blit_glyph): Likewise.
6024         (grub_video_vbe_scroll): Likewise.
6025         (grub_video_vbe_draw_pixel): Removed function.
6026         (grub_video_vbe_get_pixel): Likewise.
6027         (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and
6028         updated code to use it.
6029         (common_blitter): Added common blitter for render target and bitmap.
6030         (grub_video_vbe_blit_bitmap): Updated to use common_blitter.
6031         (grub_video_vbe_blit_render_target): Likewise.
6033 2006-07-30  Johan Rydberg  <jrydberg@gnu.org>
6035         * kern/efi/efi.c (grub_efi_set_text_mode): Assume console already
6036         is in text mode if there is no console control protocol instance
6037         available.
6039 2006-07-29  Vesa Jaaskelainen  <chaac@nic.fi>
6041         * include/grub/video.h: Code cleanup.
6043         * include/grub/i386/pc/vbe.h: Likewise.
6045         * video/i386/pc/vbe.c: Likewise.
6047         * video/i386/pc/vbeblit.c: Likewise.
6049         * video/i386/pc/vbefill.c: Likewise.
6051         * video/video.c: Likewise.  Also added more comments.
6053 2006-07-29  Vesa Jaaskelainen  <chaac@nic.fi>
6055         * disk/i386/pc/biosdisk.c (struct grub_biosdisk_drp): Moved to ...
6056         (struct grub_biosdisk_dap): Likewise.
6058         * include/grub/i386/pc/biosdisk.h: ... to here.  Also corrected
6059         linkage settings for all functions.
6061 2006-07-12  Marco Gerards  <marco@gnu.org>
6063         * configure.ac (--enable-mm-debug): Fix typo.
6065         * genkernsyms.sh.in: Use proper quoting for `CC'.
6067 2006-07-02  Jeroen Dekkers  <jeroen@dekkers.cx>
6069         * conf/i386-pc.rmk (COMMON_ASFLAGS): Add "-m32".
6070         (normal_mod_ASFLAGS): Remove "-m32".
6072 2006-06-14  Yoshinori K. Okuji  <okuji@enbug.org>
6074         * util/misc.c: Include config.h.
6075         [!HAVE_MEMALIGN]: Do not include malloc.h.
6076         (grub_memalign): Use posix_memalign, if present. Then, use
6077         memalign, if present. Otherwise, emit an error.
6079         * util/grub-emu.c: Do not include malloc.h.
6081         * include/grub/util/misc.h: Include unistd.h. This is required for
6082         FreeBSD, because off_t is defined in unistd.h. Reported by Harley
6083         D. Eades III <hde@foobar-qux.org>.
6085         * configure.ac (AC_GNU_SOURCE): Added.
6086         (AC_CHECK_FUNCS): Check posix_memalign and memalign for the host
6087         type.
6089 2006-06-09  Yoshinori K. Okuji  <okuji@enbug.org>
6091         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Make sure that
6092         ADDR_MAX does not exceed GRUB_LINUX_INITRD_MAX_ADDRESS.
6094 2006-06-07  Jeroen Dekkers  <jeroen@dekkers.cx>
6096         * include/grub/types.h (grub_host_addr_t): Rename to
6097         grub_target_addr_t.
6098         (grub_host_off_t): Rename to grub_target_off_t.
6099         (grub_host_size_t): Rename to grub_target_size_t.
6100         (grub_host_ssize_t): Rename to grub_target_ssize_t.
6101         Refer to GRUB_TARGET_SIZEOF_VOID_P to define those variables.
6103         * include/grub/kernel.h (struct grub_module_header): Change type
6104         of OFFSET to grub_target_off_t and type of SIZE to grub_target_size_t.
6105         (grub_module_info): Likewise.
6107 2006-06-05  Yoshinori K. Okuji  <okuji@enbug.org>
6109         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): The conditional
6110         of checking LINUX_MEM_SIZE was reverse. Reported by Jesus
6111         Velazquez <jesus.velazquez@gmail.com>.
6113 2006-06-05  Yoshinori K. Okuji  <okuji@enbug.org>
6115         Count partitions from 1 instead of 0 in the string representation
6116         of partitions. Still use 0-based internally.
6118         * partmap/sun.c (grub_sun_is_valid): A cosmetic change.
6119         (sun_partition_map_iterate): Use grub_partition_t instead of
6120         struct grub_partition *. Cast DESC->START_CYLINDER to
6121         grub_uint64_t after converting the endian.
6122         (sun_partition_map_probe): Subtract 1 for PARTNUM.
6123         (sun_partition_map_get_name): Add 1 to P->INDEX.
6125         * partmap/pc.c (grub_partition_parse): Subtract 1 for
6126         PCDATA->DOS_PART.
6127         (pc_partition_map_get_name): Add 1 into PCDATA->DOS_PART.
6129         * partmap/gpt.c (gpt_partition_map_iterate): Initialize PARTNO to
6130         zero instead of one.
6131         (gpt_partition_map_probe): Subtract 1 for PARTNUM.
6132         (gpt_partition_map_get_name): Add 1 into P->INDEX.
6134         * partmap/apple.c (apple_partition_map_iterate): Change the type
6135         of POS to unsigned.
6136         (apple_partition_map_probe): Subtract 1 for PARTNUM.
6137         (apple_partition_map_get_name): Add 1 into P->INDEX.
6139         * partmap/amiga.c (amiga_partition_map_iterate): Change the type
6140         of POS to unsigned.
6141         (amiga_partition_map_iterate): Cast NEXT to grub_off_t to
6142         calculate the offset of a partition.
6143         (amiga_partition_map_probe): Subtract 1 for PARTNUM.
6144         (amiga_partition_map_get_name): Add 1 into P->INDEX.
6146         * partmap/acorn.c (acorn_partition_map_find): Change the type of
6147         SECTOR to grub_disk_addr_t.
6148         (acorn_partition_map_iterate): Likewise.
6149         (acorn_partition_map_probe): Subtract 1 for PARTNUM.
6150         Change the type of SECTOR to grub_disk_addr_t. Declare P on the
6151         top.
6152         (acorn_partition_map_get_name): Add 1 into P->INDEX.
6154         * kern/i386/pc/init.c (make_install_device): Add 1 into
6155         GRUB_INSTALL_DOS_PART.
6157         * fs/iso9660.c (grub_iso9660_mount): Fixed a reversed
6158         conditional.
6160 2006-06-04  Yoshinori K. Okuji  <okuji@enbug.org>
6162         Clean up the code to support 64-bit addressing in disks and
6163         files. This change is not enough for filesystems yet.
6165         * util/i386/pc/grub-setup.c (struct boot_blocklist): Change the
6166         type of "start" to grub_uint64_t.
6167         (setup): Change the types of KERNEL_SECTOR and FIRST_SECTOR to
6168         grub_disk_addr_t * and grub_disk_addr_t. Fix the format string in
6169         save_first_sector and save_blocklists. Use grub_le_to_cpu64 to
6170         convert addresses.
6172         * util/i386/pc/biosdisk.c (open_device): Change the type of SECTOR
6173         to grub_disk_addr_t.
6175         * partmap/gpt.c (gpt_partition_map_iterate): Fix the format
6176         string.
6178         * partmap/pc.c (pc_partition_map_iterate): Likewise.
6180         * partmap/amiga.c (amiga_partition_map_iterate): Cast RDSK.MAGIC
6181         to char *.
6183         * normal/script.c (grub_script_parse): Remove unused MEMFREE.
6185         * normal/parser.y (YYLTYPE_IS_TRIVIAL): New macro.
6187         * normal/lexer.c (grub_script_yyerror): Specify unused to LEX.
6189         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf64): Cast -1
6190         to grub_off_t, to detect an error from grub_file_seek.
6191         (grub_multiboot_load_elf32): Likewise.
6193         * kern/misc.c (grub_strtoul): Use grub_strtoull. Return the
6194         maximum unsigned long value when an overflow is detected.
6195         (grub_strtoull): New function.
6196         (grub_divmod64): Likewise.
6197         (grub_lltoa): use grub_divmod64.
6199         * kern/fs.c (struct grub_fs_block): Change the type of "offset" to
6200         grub_disk_addr_t.
6201         (grub_fs_blocklist_open): Increase P if P is not NULL to advance
6202         the pointer to next character. Use grub_strtoull instead of
6203         grub_strtoul.
6204         (grub_fs_blocklist_read): Change the types of SECTOR, OFFSET and
6205         SIZE to grub_disk_addr_t, grub_off_t and grub_size_t,
6206         respectively.
6208         * kern/file.c (grub_file_read): Prevent an overflow of LEN, as the
6209         return value is signed.
6210         (grub_file_seek): Change the type of OLD to grub_off_t. Do not
6211         test if OFFSET is less than zero, as OFFSET is unsigned now.
6213         * kern/disk.c (struct grub_disk_cache): Change the type of
6214         "sector" to grub_disk_addr_t.
6215         (grub_disk_cache_get_index): Change the type of SECTOR to
6216         grub_disk_addr_t. Calculate the hash with SECTOR casted to
6217         unsigned after shifting.
6218         (grub_disk_cache_invalidate): Change the type of SECTOR to
6219         grub_disk_addr_t.
6220         (grub_disk_cache_unlock): Likewise.
6221         (grub_disk_cache_store): Likewise.
6222         (grub_disk_check_range): Change the types of SECTOR, OFFSET, SIZE,
6223         START and LEN to grub_disk_addr_t *, grub_off_t *, grub_size_t,
6224         grub_disk_addr_t and grub_uint64_t, respectively.
6225         (grub_disk_read): Use an unsigned variable REAL_OFFSET for the
6226         body, as the value of OFFSET is tweaked by
6227         grub_disk_check_range. Change the types of START_SECTOR, LEN and
6228         POS to grub_disk_addr_t, grub_size_t and grub_size_t,
6229         respectively.
6230         (grub_disk_write): Use an unsigned variable REAL_OFFSET for the
6231         body, as the value of OFFSET is tweaked by
6232         grub_disk_check_range. Change the types of LEN and N to
6233         grub_size_t.
6235         * io/gzio.c (struct grub_gzio): Change the types of "data_offset"
6236         and "saved_offset" to grub_off_t.
6237         (test_header): Cast BUF to char *.
6238         (get_byte): Cast GZIO->DATA_OFFSET to grub_off_t. Cast GZIO->INBUF
6239         to char *.
6240         (grub_gzio_read): Change the types of OFFSET and SIZE to
6241         grub_off_t and grub_size_t, respectively.
6243         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_FORCE_LBA):
6244         Removed.
6245         (GRUB_BOOT_MACHINE_BOOT_DRIVE): Changed to 0x4c.
6246         (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Changed to 0x40.
6247         (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Changed to 0x42.
6248         (GRUB_BOOT_MACHINE_DRIVE_CHECK): Changed to 0x4e.
6249         (GRUB_BOOT_MACHINE_LIST_SIZE): Increased to 12.
6251         * include/grub/types.h (grub_off_t): Unconditionally set to
6252         grub_uint64_t.
6253         (grub_disk_addr_t): Changed to grub_uint64_t.
6255         * include/grub/partition.h (struct grub_partition): Change the
6256         types of "start", "len" and "offset" to grub_disk_addr_t,
6257         grub_uint64_t and grub_disk_addr_t, respectively.
6258         (grub_partition_get_start): Return grub_disk_addr_t.
6259         (grub_partition_get_len): Return grub_uint64_t.
6261         * include/grub/misc.h (grub_strtoull): New prototype.
6262         (grub_divmod64): Likewise.
6264         * include/grub/fshelp.h (grub_fshelp_read_file): Change the types
6265         of SECTOR, LEN and FILESIZE to grub_disk_addr_t, grub_size_t and
6266         grub_off_t, respectively.
6267         All callers and references changed.
6269         * include/grub/fs.h (struct grub_fs): Change the type of LEN to
6270         grub_size_t in "read".
6271         All callers and references changed.
6273         * include/grub/file.h (struct grub_file): Change the types of
6274         "offset" and "size" to grub_off_t and grub_off_t,
6275         respectively. Change the type of SECTOR to grub_disk_addr_t in
6276         "read_hook".
6277         (grub_file_read): Change the type of LEN to grub_size_t.
6278         (grub_file_seek): Return grub_off_t. Change the type of OFFSET to
6279         grub_off_t.
6280         (grub_file_size): Return grub_off_t.
6281         (grub_file_tell): Likewise.
6282         All callers and references changed.
6284         * include/grub/disk.h (struct grub_disk_dev): Change the types of
6285         SECTOR and SIZE to grub_disk_addr_t and grub_size_t in "read" and
6286         "write".
6287         (struct grub_disk): Change the type of "total_sectors" to
6288         grub_uint64_t. Change the type of SECTOR to grub_disk_addr_t in
6289         "read_hook".
6290         (grub_disk_read): Change the types of SECTOR, OFFSET and SIZE to
6291         grub_disk_addr_t, grub_off_t and grub_size_t, respectively.
6292         (grub_disk_write): Likewise.
6293         All callers and references changed.
6295         * fs/iso9660.c (grub_iso9660_susp_iterate): Cast parameters to
6296         char * for grub_strncmp to silence gcc.
6297         (grub_iso9660_mount): Likewise.
6298         (grub_iso9660_mount): Likewise.
6299         (grub_iso9660_read_symlink): Likewise. Also, remove the nonsense
6300         return statement.
6301         (grub_iso9660_iterate_dir): Likewise.
6302         (grub_iso9660_label): Cast DATA->VOLDESC.VOLNAME to char *.
6304         * fs/hfs.c (grub_hfs_read_file): Change the types of SECTOR and
6305         LEN to grub_disk_addr_t and grub_size_t, respectively.
6307         * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
6309         * fs/jfs.c (grub_jfs_read_file): Likewise.
6311         * fs/minix.c (grub_jfs_read_file): Likewise.
6313         * fs/sfs.c (grub_jfs_read_file): Likewise.
6315         * fs/ufs.c (grub_jfs_read_file): Likewise.
6317         * fs/xfs.c (grub_jfs_read_file): Likewise.
6319         * fs/fat.c (grub_fat_read_data): Change the types of SECTOR, LEN
6320         and SIZE to grub_disk_addr_t, grub_size_t and grub_size_t,
6321         respectively.
6323         * fs/ext2.c (grub_ext2_read_block): When an error happens, set
6324         BLKNR to -1 instead of returning GRUB_ERRNO.
6325         (grub_ext2_read_file): Change the types of SECTOR and
6326         LEN to grub_disk_addr_t and grub_size_t, respectively.
6328         * fs/affs.c (grub_affs_read_file): Change the types of SECTOR and
6329         LEN to grub_disk_addr_t and grub_size_t, respectively.
6331         * font/manager.c (grub_font_get_glyph): Cast BITMAP to char * for
6332         grub_file_read.
6334         * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Fix the format
6335         string. Do not cast SECTOR explicitly.
6337         * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Change the type of
6338         TOTAL_SECTORS to grub_uint64_t. Do not mask DRP->TOTAL_SECTORS.
6339         (grub_biosdisk_rw): Change the types of SECTOR and SIZE to
6340         grub_disk_addr_t and grub_size_t, respectively. If the sector is
6341         over 2TB and LBA mode is not supported, raise an error.
6342         (get_safe_sectors): New function.
6343         (grub_biosdisk_read): Use get_safe_sectors.
6344         (grub_biosdisk_write): Likewise.
6346         * disk/efi/efidisk.c (grub_efidisk_read): Fix the format string.
6347         (grub_efidisk_write): Likewise.
6349         * disk/loopback.c (delete_loopback): Cosmetic changes.
6350         (grub_cmd_loopback): Likewise. Also, test NEWDEV->FILENAME
6351         correctly.
6352         (grub_loopback_open): Likewise.
6353         (grub_loopback_read): Likewise. Also, change the type of POS to
6354         grub_off_t, and fix the usage of grub_memset.
6356         * commands/i386/pc/play.c: Include grub/machine/time.h.
6358         * commands/ls.c (grub_ls_list_files): Use "llu" instead of "d" to
6359         print FILE->SIZE.
6361         * commands/configfile.c: Include grub/env.h.
6363         * commands/cmp.c (grub_cmd_cmp): Do not use ERR, but use
6364         GRUB_ERRNO directly instead. Change the type of POS to
6365         grub_off_t. Follow the coding standard.
6367         * commands/blocklist.c: Include grub/partition.h.
6368         (grub_cmd_blocklist): Return an error if the underlying device is
6369         not a disk. Take the starting sector of a partition into account,
6370         if a partition is used.
6372         * boot/i386/pc/diskboot.S (bootloop): Adapted to the new offset of
6373         a length field.
6374         (lba_mode): Support 64-bit addresses.
6375         (chs_mode): Likewise.
6376         (copy_buffer): Adapted to the new offsets of a length field and a
6377         segment field.
6378         (blocklist_default_start): Allocate 64-bit space.
6380         * boot/i386/pc/boot.S (force_lba): Removed.
6381         (boot_drive): Moved to under KERNEL_SECTOR.
6382         (kernel_sector): Moved to under KERNEL_SEGMENT. Allocate 64-bit
6383         space.
6384         (real_start): Set %si earlier. Remove code for FORCE_LBA, since it
6385         is useless.
6386         (lba_mode): Refactored to support a 64-bit address. More size
6387         optimization.
6388         (setup_sectors): Likewise.
6390 2006-06-04  Yoshinori K. Okuji  <okuji@enbug.org>
6392         * DISTLIST: Added include/grub/i386/linux.h. Removed
6393         include/grub/i386/pc/linux.h
6395         * configure.ac (AC_INIT): Bumped to 1.94.
6397         * config.guess: Updated from gnulib.
6398         * config.sub: Likewise.
6399         * install-sh: Likewise.
6400         * mkinstalldirs: Likewise.
6402 2006-06-02  Yoshinori K. Okuji  <okuji@enbug.org>
6404         * conf/common.rmk (grub_modules_init.lst): Depended on
6405         grub_emu_SOURCES, excluding grub_emu_init.c, instead of
6406         MODSRCFILES.
6408         * genmk.rb (PModule::rule): Reverted the previous change.
6410 2006-06-02  Yoshinori K. Okuji  <okuji@enbug.org>
6412         * conf/common.rmk (grub_modules_init.lst): Depends on
6413         $(MODSRCFILES). Grep only the files in $(MODSRCFILES). Make sure
6414         that the target does not exist before producing.
6415         (grub_modules_init.h): Remove the target before generating.
6416         (grub_emu_init.c): Likewise.
6418         * genmk.rb (PModule::rule): Add source files into MODSRCFILES.
6420 2006-05-31  Jeroen Dekkers  <jeroen@dekkers.cx>
6422         * configure.ac: Don't set host_m32 for x86_64. Also reset LIBS
6423         for the target-specific tests. Make sure that we also have the
6424         up-to-date target variables for those tests.
6426 2006-05-31  Yoshinori K. Okuji  <okuji@enbug.org>
6428         * genmk.rb (Image::rule): Prefix CFLAGS or ASFLAGS with TARGET_.
6429         (PModule::rule): Likewise.
6431 2006-05-31  Yoshinori K. Okuji  <okuji@enbug.org>
6433         * genmk.rb (Image::rule): Set FLAG to CFLAGS or ASFLAGS instead of
6434         TARGET_CFLAGS or TARGET_ASFLAGS. There is no reason why
6435         target-specific flags should be prefixed.
6436         (PModule::rule): Likewise.
6438 2006-05-30  Yoshinori K. Okuji  <okuji@enbug.org>
6440         * configure.ac (CMP): Check if cmp is available explicitly.
6442 2006-05-29  Yoshinori K. Okuji  <okuji@enbug.org>
6444         * util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
6445         (target_cpu): New variable.
6446         (pkglibdir): Use target_cpu instead of host_cpu.
6448         * util/i386/pc/grub-install.in (host_cpu): Removed.
6449         (target_cpu): New variable.
6450         (pkglibdir): Use target_cpu instead of host_cpu.
6452         * util/genmoddep.c: Removed.
6454         * kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
6455         instead of GRUB_HOST_SIZEOF_VOID_P.
6456         * kern/dl.c: Likewise.
6458         * include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
6459         ...
6460         (GRUB_TARGET_SIZEOF_VOID_P): ... this.
6461         (GRUB_HOST_SIZEOF_LONG): Renamed to ...
6462         (GRUB_TARGET_SIZEOF_LONG): ... this.
6463         (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
6464         (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
6465         * include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
6466         to ...
6467         (GRUB_TARGET_SIZEOF_VOID_P): ... this.
6468         (GRUB_HOST_SIZEOF_LONG): Renamed to ...
6469         (GRUB_TARGET_SIZEOF_LONG): ... this.
6470         (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
6471         (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
6472         * include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
6473         to ...
6474         (GRUB_TARGET_SIZEOF_VOID_P): ... this.
6475         (GRUB_HOST_SIZEOF_LONG): Renamed to ...
6476         (GRUB_TARGET_SIZEOF_LONG): ... this.
6477         (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
6478         (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
6480         * include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
6481         GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
6482         [!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
6483         instead of GRUB_HOST_SIZEOF_LONG.
6484         [!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
6485         GRUB_HOST_WORDS_BIGENDIAN to define or undefine
6486         GRUB_CPU_WORDS_BIGENDIAN.
6487         Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
6488         define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
6489         grub_host_ssize_t.
6491         * conf/i386-efi.rmk (noinst_UTILITIES): Removed.
6492         (genmoddep_SOURCES): Likewise.
6493         * conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
6494         (genmoddep_SOURCES): Likewise.
6495         * conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
6496         (genmoddep_SOURCES): Likewise.
6497         * conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
6498         Likewise.
6499         (genmoddep_SOURCES): Likewise.
6501         * genmoddep.awk: New file.
6503         * genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
6504         TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
6505         CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
6506         (PModule::rule): Likewise.
6507         (Program::rule): Likewise.
6508         (Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
6509         BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
6510         respectively.
6512         * configure.ac: Rewritten intensively to use host and target
6513         instead of build and host, respectively.
6515         * Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
6516         (host_cpu): Removed.
6517         (target_cpu): New variable.
6518         (CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
6519         (BUILD_CC): Removed.
6520         (BUILD_CFLAGS): Likewise.
6521         (BUILD_CPPFLAGS): Likewise.
6522         (TARGET_CC): New variable.
6523         (TARGET_CFLAGS): Likewise.
6524         (TARGET_CPPFLAGS): Likewise.
6525         (TARGET_LDFLAGS): Likewise.
6526         (AWK): Likewise.
6527         (include): Use target_cpu instead of host_cpu.
6528         (moddep.lst:): Use genmoddep.awk instead of genmoddep.
6530         * DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
6532 2006-05-29  Vesa Jaaskelainen  <chaac@nic.fi>
6534         * include/grub/script.h (grub_script_cmdif): Renamed field 'bool' to
6535         'exec_to_evaluate'.  Renamed field 'true' to 'exec_on_true'.  Renamed
6536         field 'false' to 'exec_on_false'.
6537         (grub_script_create_cmdif): Renamed argument names to reflect above
6538         changes.
6540         * normal/execute.c (grub_script_execute_cmdif): Likewise.
6542         * normal/script.c (grub_script_create_cmdif): Likewise.
6544 2006-05-28  Yoshinori K. Okuji  <okuji@enbug.org>
6546         * fs/hfsplus.c (grub_hfsplus_btree_recoffset): Moved to near the
6547         top.
6548         (grub_hfsplus_btree_recptr): Likewise.
6549         (grub_hfsplus_find_block): Do not take RETRY any longer. Use
6550         FILEBLOCK both to pass a block number and store next block
6551         number.
6552         (grub_hfsplus_read_block): Rewritten heavily to support an extent
6553         overflow file correctly. Specify errors appropriately, because
6554         fshelp expects that GRUB_ERRNO is set when fails. Reuse
6555         grub_hfsplus_btree_recptr to get the pointer to a found key.
6556         (grub_hfsplus_btree_search): Return 1 instead of 0 when no match
6557         is found.
6559         * conf/i386-efi.rmk (pkgdata_MODULES): Added _linux.mod and
6560         linux.mod.
6561         (_linux_mod_SOURCES): New variable.
6562         (_linux_mod_CFLAGS): Likewise.
6563         (_linux_mod_LDFLAGS): Likewise.
6564         (linux_mod_SOURCES): Likewise.
6565         (linux_mod_CFLAGS): Likewise.
6566         (linux_mod_LDFLAGS): Likewise.
6568         * DISTLIST: Added loader/i386/efi/linux.c,
6569         loader/i386/efi/linux_normal.c and
6570         include/grub/i386/efi/loader.h.
6572         * loader/i386/efi/linux.c: New file.
6573         * loader/i386/efi/linux_normal.c: Likewise.
6574         * include/grub/i386/efi/loader.h: Likewise.
6576 2006-05-27  Yoshinori K. Okuji  <okuji@enbug.org>
6578         * commands/blocklist.c: New file.
6580         * DISTLIST: Added commands/blocklist.c.
6582         * term/efi/console.c (grub_console_highlight_color): Use a lighter
6583         color for the background, and a darker color for the foreground.
6584         (grub_console_checkkey): Return READ_KEY.
6585         (grub_console_cls): Set the background to
6586         GRUB_EFI_BACKGROUND_BLACK temporarily to clean out the screen.
6588         * kern/efi/efi.c (grub_efi_exit_boot_services): New function.
6590         * include/grub/i386/linux.h (struct linux_kernel_params): Fixed
6591         the size of "padding5", "hd0_drive_info" and "hd1_drive_info".
6593         * include/grub/efi/efi.h (grub_efi_exit_boot_services): New
6594         prototype.
6596         * include/grub/efi/api.h (GRUB_EFI_TEXT_ATTR): Do not shift
6597         BG. The spec is wrong again.
6599         * include/grub/normal.h [GRUB_UTIL] (grub_blocklist_init): New
6600         prototype.
6601         [GRUB_UTIL] (grub_blocklist_fini): Likewise.
6603         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
6604         commands/blocklist.c.
6605         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6607         * conf/common.rmk (pkgdata_MODULES): Added blocklist.mod.
6608         (blocklist_mod_SOURCES): New variable.
6609         (blocklist_mod_CFLAGS): Likewise.
6610         (blocklist_mod_LDFLAGS): Likewise.
6612 2006-05-20  Yoshinori K. Okuji  <okuji@enbug.org>
6614         * boot/i386/pc/boot.S (real_start): Set %si earlier to eliminate
6615         duplication.
6616         (lba_mode): Use %eax more intensively to reduce the code size.
6618 2006-05-20  Marco Gerards  <marco@gnu.org>
6620         * normal/lexer.c (grub_script_yylex): Don't filter out newlines.
6622         * normal/parser.y (commandblock): Defined as <cmd>.  A subroutine
6623         for `menuentry'.
6624         (script): Accept leading newlines.
6625         (newlines): New rule to describe 0 or more newlines.
6626         (commands): Accept `command' with trailing newline.  Fixed the
6627         order in which arguments were passed to `grub_script_add_cmd'.
6628         Accept commands separated by newlines.
6629         (function): Changed to accept newlines.
6630         (menuentry) Rewritten.
6632         * normal/script.c (grub_script_create_cmdmenu): Add new entries in
6633         front of the list, instead of to the end.
6635 2006-05-19  Yoshinori K. Okuji  <okuji@enbug.org>
6637         * util/i386/pc/grub-install.in (bindir): New variable.
6638         (grub_mkimage): Use BINDIR instead of SBINDIR. Reported by Lee
6639         Shaver <lbgwjl@gmail.com>.
6641 2006-05-14  Yoshinori K. Okuji  <okuji@enbug.org>
6643         * kern/i386/pc/startup.S: Include grub/cpu/linux.h instead of
6644         grub/machine/linux.h
6645         * loader/i386/pc/linux.c: Likewise.
6647         * include/grub/i386/pc/linux.h: Moved to ...
6648         * include/grub/i386/linux.h: ... here.
6650         * include/grub/i386/linux.h (struct linux_kernel_params): New
6651         struct.
6653 2006-05-09  Vesa Jaaskelainen  <chaac@nic.fi>
6655         * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Corrected bounds
6656         checking.
6657         (grub_video_vbe_blit_glyph): Likewise.
6658         (grub_video_vbe_blit_bitmap): Likewise.
6659         (grub_video_vbe_blit_render_target): Likewise.
6661 2006-05-09  Yoshinori K. Okuji  <okuji@enbug.org>
6663         * configure.ac (--with-platform): Properly quote the square
6664         brackets.
6666 2006-05-08  Marco Gerards  <marco@gnu.org>
6668         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Renamed from
6669         this...
6670         (kernel_elf_HEADERS): ...to this.  Updated all users.
6671         (grubof_symlist.c): Renamed from this...
6672         (kernel_elf_symlist.c): ...to this.  Updated all users.
6673         (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
6674         (grubof_SOURCES): Renamed from this...
6675         (kernel_elf_SOURCES): ...to this.
6676         (grubof_HEADERS): Renamed from this...
6677         (kernel_elf_HEADERS): ...to this.
6678         (grubof_CFLAGS): Renamed from this...
6679         (kernel_elf_CFLAGS): ...to this.
6680         (grubof_ASFLAGS): Renamed from this...
6681         (kernel_elf_ASFLAGS): ...to this.
6682         (grubof_LDFLAGS): Renamed from this...
6683         (kernel_elf_LDFLAGS): ...to this.
6685         * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Renamed from
6686         this...
6687         (kernel_elf_HEADERS): ...to this.  Updated all users.
6688         (grubof_symlist.c): Renamed from this...
6689         (kernel_elf_symlist.c): ...to this.  Updated all users.
6690         (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
6691         (grubof_SOURCES): Renamed from this...
6692         (kernel_elf_SOURCES): ...to this.
6693         (grubof_HEADERS): Renamed from this...
6694         (kernel_elf_HEADERS): ...to this.
6695         (grubof_CFLAGS): Renamed from this...
6696         (kernel_elf_CFLAGS): ...to this.
6697         (grubof_ASFLAGS): Renamed from this...
6698         (kernel_elf_ASFLAGS): ...to this.
6699         (grubof_LDFLAGS): Renamed from this...
6700         (kernel_elf_LDFLAGS): ...to this.
6702         * util/powerpc/ieee1275/grub-mkimage.c (add_segments): Use
6703         `kernel.elf' instead of `grubof'.
6705 2006-05-08  Yoshinori K. Okuji  <okuji@enbug.org>
6707         Add --with-platform to configure. Use pkglibdir instead of
6708         pkgdatadir. This is reported by Roger Leigh.
6710         * util/powerpc/ieee1275/grub-install.in (datadir): Removed.
6711         (host_vendor): Likewise.
6712         (host_os): Likewise.
6713         (pkgdatadir): Likewise.
6714         (platform): New variable.
6715         (pkglibdir): Likewise.
6716         Use PKGLIBDIR instead of PKGDATADIR.
6718         * util/i386/pc/grub-install.in (datadir): Removed.
6719         (host_vendor): Likewise.
6720         (host_os): Likewise.
6721         (pkgdatadir): Likewise.
6722         (platform): New variable.
6723         (pkglibdir): Likewise.
6724         Use PKGLIBDIR instead of PKGDATADIR.
6726         * util/powerpc/ieee1275/grub-mkimage.c (usage): Use GRUB_LIBDIR
6727         instead of GRUB_DATADIR.
6728         (main): Likewise.
6729         * util/i386/pc/grub-mkimage.c (usage): Likewise.
6730         (main): Likewise.
6731         * util/i386/efi/grub-mkimage.c (usage): Likewise.
6732         (main): Likewise.
6734         * configure.ac (--with-platform): New option.
6735         Use PLATFORM instead of HOST_VENDOR to specify a platform.
6737         * Makefile.in: Include a makefile based on PLATFORM instead of
6738         HOST_VENDOR.
6739         (pkgdatadir): Not appended by the machine type.
6740         (pkglibdir): Appended by the machine type.
6741         (host_vendor): Removed.
6742         (platform): New variable.
6743         (BUILD_CPPFLAGS): Specify GRUB_LIBDIR instead of GRUB_DATADIR.
6744         (install-local): Use PKGLIBDIR instead of PKGDATADIR.
6745         (uninstall): Likewise.
6747 2006-05-07  Yoshinori K. Okuji  <okuji@enbug.org>
6749         Use the environment context in the menu. Remove the commands
6750         "default" and "timeout", and use variables instead.
6752         * normal/menu.c: Include grub/env.h.
6753         (print_entry): Cast TITLE to silence gcc.
6754         (get_timeout): New function.
6755         (set_timeout): Likewise.
6756         (get_entry_number): Likewise.
6757         (run_menu): Use a default entry, a fallback entry and a timeout
6758         in the environment variables "default", "fallback" and
6759         "timeout". Also, tweak the default entry if it is not within the
6760         current menu entries.
6761         (grub_menu_run): Use a fallback entry in the environment variable
6762         "fallback".
6764         * normal/main.c (read_config_file): Do not initialize
6765         NEWMENU->DEFAULT_ENTRY, NEWMENU->FALLBACK_ENTRY or
6766         NEWMENU->TIMEOUT.
6767         (grub_normal_execute): Use a data slot to store the menu.
6769         * include/grub/normal.h (struct grub_menu): Removed default_entry,
6770         fallback_entry and timeout.
6771         (struct grub_menu_list): Removed.
6772         (grub_menu_list_t): Likewise.
6773         (struct grub_context): Likewise.
6774         (grub_context_t): Likewise.
6775         (grub_context_get): Likewise.
6776         (grub_context_get_current_menu): Likewise.
6777         (grub_context_push_menu): Likewise.
6778         (grub_context_pop_menu): Likewise.
6779         (grub_default_init): Likewise.
6780         (grub_default_fini): Likewise.
6781         (grub_timeout_init): Likewise.
6782         (grub_timeout_fini): Likewise.
6784         * conf/sparc64-ieee1275.rmk (pkgdata_MODULES): Removed default.mod
6785         and timeout.mod.
6786         (normal_mod_SOURCES): Removed normal/context.c.
6788         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Removed
6789         commands/default.c, commands/timeout.c and normal/context.c.
6790         (normal_mod_SOURCES): Removed normal/context.c.
6792         * conf/i386-pc.rmk (grub_emu_SOURCES): Removed commands/default.c,
6793         commands/timeout.c and normal/context.c.
6794         (normal_mod_SOURCES): Removed normal/context.c.
6796         * conf/i386-efi.rmk (grub_emu_SOURCES): Removed
6797         commands/default.c, commands/timeout.c and normal/context.c.
6798         (normal_mod_SOURCES): Removed normal/context.c.
6800         * conf/common.rmk (pkgdata_MODULES): Removed default.mod and
6801         timeout.mod.
6802         (default_mod_SOURCES): Removed.
6803         (default_mod_CFLAGS): Likewise.
6804         (default_mod_LDFLAGS): Likewise.
6805         (timeout_mod_SOURCES): Removed.
6806         (timeout_mod_CFLAGS): Likewise.
6807         (timeout_mod_LDFLAGS): Likewise.
6809         * DISTLIST: Removed commands/default.c, commands/timeout.c and
6810         normal/context.c.
6812         * commands/default.c: Removed.
6813         * commands/timeout.c: Likewise.
6814         * normal/context.c: Likewise.
6816 2006-05-07  Vesa Jaaskelainen  <chaac@nic.fi>
6818         * kern/i386/pc/startup.S (grub_exit): Added missing .code32 tag.
6820 2006-05-02  Yoshinori K. Okuji  <okuji@enbug.org>
6822         * kern/env.c (struct grub_env_context): Removed "sorted". Renamed
6823         "next" to "prev" for readability.
6824         (struct grub_env_sorted_var): New struct.
6825         (grub_env_context): Renamed to ...
6826         (initial_context): ... this.
6827         (grub_env_var_context): Renamed to ...
6828         (current_context): ... this.
6829         (grub_env_find): Look only at CURRENT_CONTEXT.
6830         (grub_env_context_open): Rewritten to copy exported variables from
6831         previous context.
6832         (grub_env_context_close): Rewritten according to the new
6833         scheme. Also, add an assertion to prevent the initial context from
6834         removed.
6835         (grub_env_insert): Removed the code for the sorted list.
6836         (grub_env_remove): Likewise.
6837         (grub_env_export): Simply mark the variable with
6838         GRUB_ENV_VAR_GLOBAL.
6839         (grub_env_set): A cosmetic change for naming consistency.
6840         (grub_env_get): Likewise.
6841         (grub_env_unset): Likewise.
6842         (grub_env_iterate): Rewritten to sort variables within this
6843         function.
6844         (grub_register_variable_hook): Fixed for naming consistency. Call
6845         grub_env_find again, only if NAME is not found at the first time.
6846         (mangle_data_slot_name): New function.
6847         (grub_env_set_data_slot): Likewise.
6848         (grub_env_get_data_slot): Likewise.
6849         (grub_env_unset_data_slot): Likewise.
6851         * include/grub/env.h (grub_env_var_type): New enum.
6852         (GRUB_ENV_VAR_LOCAL): New constant.
6853         (GRUB_ENV_VAR_GLOBAL): Likewise.
6854         (GRUB_ENV_VAR_DATA): Likewise.
6855         (struct grub_env_var): Removed "sort_next" and "sort_prevp". Added
6856         "type".
6857         (grub_env_set): Replace VAR with NAME for consistency.
6858         (grub_register_variable_hook): Likewise.
6859         (grub_env_export): Specify the name of the argument.
6860         (grub_env_set_data_slot): New prototype.
6861         (grub_env_get_data_slot): Likewise.
6862         (grub_env_unset_data_slot): Likewise.
6864 2006-04-30  Yoshinori K. Okuji  <okuji@enbug.org>
6866         Extend the loader so that GRUB can accept a loader which comes
6867         back to GRUB when a loaded image exits. Also, this change adds
6868         support for a chainloader on EFI.
6870         * term/efi/console.c: Include grub/misc.h.
6871         (grub_console_checkkey): Display a scan code on the top for
6872         debugging. This will be removed once the EFI port gets stable.
6873         Correct the scan code mapping.
6875         * kern/efi/mm.c (sort_memory_map): Sort in a descending order to
6876         allocate memory from larger regions, in order to reduce the number
6877         of allocated regions. Otherwise, the MacOSX loader panics.
6878         (filter_memory_map): Avoid less than 1MB for compatibility with
6879         other loaders.
6880         (add_memory_regions): Allocate from the tail of a region, if
6881         possible, to avoid allocating a region near to 1MB, for the MacOSX
6882         loader.
6884         * kern/efi/init.c (grub_efi_set_prefix): Specify
6885         GRUB_EFI_IMAGE_HANDLE to grub_efi_get_loaded_image.
6887         * kern/efi/efi.c (grub_efi_get_loaded_image): Accept a new
6888         argument IMAGE_HANDLE and specify it to get a loaded image.
6889         (grub_arch_modules_addr): Specify GRUB_EFI_IMAGE_HANDLE to
6890         grub_efi_get_loaded_image.
6891         (grub_efi_get_filename): Divide the length by the size of
6892         grub_efi_char16_t.
6893         (grub_efi_get_device_path): New function.
6894         (grub_efi_print_device_path): Print End Device Path nodes. Divide
6895         the length by the size of grub_efi_char16_t for a file path device
6896         path node.
6898         * kern/loader.c (grub_loader_noreturn): New variable.
6899         (grub_loader_set): Accept a new argument NORETURN. Set
6900         GRUB_LOADER_NORETURN to NORETURN.
6901         All callers changed.
6902         (grub_loader_boot): If GRUB_LOADER_NORETURN is false, do not call
6903         grub_machine_fini.
6905         * include/grub/efi/efi.h (grub_efi_get_device_path): New
6906         prototype.
6907         (grub_efi_get_loaded_image): Take an argument to specify an image
6908         handle.
6910         * include/grub/loader.h (grub_loader_set): Added one more argument
6911         NORETURN.
6913         * disk/efi/efidisk.c (make_devices): Use grub_efi_get_device_path
6914         instead of grub_efi_open_protocol.
6915         (grub_efidisk_get_device_name): Likewise.
6916         (grub_efidisk_close): Print a newline.
6917         (grub_efidisk_get_device_handle): Fixed to use
6918         GRUB_EFI_DEVICE_PATH_SUBTYPE instead of
6919         GRUB_EFI_DEVICE_PATH_TYPE.
6921         * disk/efi/efidisk.c (device_path_guid): Moved to ...
6922         * kern/efi/efi.c (device_path_guid): ... here.
6924         * conf/i386-efi.rmk (pkgdata_MODULES): Added _chain.mod and
6925         chain.mod.
6926         (kernel_mod_HEADERS): Added efi/disk.h.
6927         (_chain_mod_SOURCES): New variable.
6928         (_chain_mod_CFLAGS): Likewise.
6929         (_chain_mod_LDFLAGS): Likewise.
6930         (chain_mod_SOURCES): Likewise.
6931         (chain_mod_CFLAGS): Likewise.
6932         (chain_mod_LDFLAGS): Likewise.
6934         * DISTLIST: Added include/grub/efi/chainloader.h,
6935         loader/efi/chainloader.c and loader/efi/chainloader_normal.c.
6937         * include/grub/efi/chainloader.h: New file.
6938         * loader/efi/chainloader.c: Likewise.
6939         * loader/efi/chainloader_normal.c: Likewise.
6941 2006-04-30  Marco Gerards  <marco@gnu.org>
6943         * commands/configfile.c (grub_cmd_source): New function.
6944         (GRUB_MOD_INIT): Register the commands `source' and `.'.
6945         (GRUB_MOD_FINI): De-register the commands `source' and `.'.
6947 2006-04-30  Marco Gerards  <marco@gnu.org>
6949         * normal/execute.c (grub_script_execute_cmd): Change the return
6950         type to `grub_err_t'.  Correctly return the error.
6951         (grub_script_execute_cmdline): In case a command line is not a
6952         command or a function, try to interpret it as an assignment.
6954 2006-04-30  Yoshinori K. Okuji  <okuji@enbug.org>
6956         * fs/hfsplus.c (grub_hfsplus_read_block): Fixed a memory leak.
6957         (grub_hfsplus_iterate_dir): Reordered to skip unknown nodes. Also,
6958         skip a node whose name is obviously invalid as UTF-16,
6959         i.e. contains a NUL character. Stop the iteration when the last
6960         directory entry is found. Instead of using the return value of
6961         grub_hfsplus_btree_iterate_node, store the value in RET and use
6962         it, because the iterator can be stopped by the last directory
6963         entry.
6965 2006-04-30  Marco Gerards  <marco@gnu.org>
6967         * include/grub/env.h (grub_env_export): New prototype.  Reported
6968         by Jan C. Kleinsorge <jan.kleinsorge@udo.edu>.
6970 2006-04-30  Marco Gerards  <marco@gnu.org>
6972         * fs/hfsplus.c (grub_hfsplus_iterate_dir): Correctly calculate the
6973         size of the extents in a catalog file record.
6975 2006-04-29  Marco Gerards  <marco@gnu.org>
6977         * commands/configfile.c (grub_cmd_configfile): Execute the
6978         configfile within its own context.
6980         * include/grub/env.h (grub_env_context_open): New prototype.
6981         (grub_env_context_close): Likewise.
6983         * kern/env.c (grub_env): Removed.
6984         (grub_env_sorted): Likewise.
6985         (grub_env_context): New variable.
6986         (grub_env_var_context): Likewise.
6987         (grub_env_find): Search both the active context and the global
6988         context.
6989         (grub_env_context_open): New function.
6990         (grub_env_context_close): Likewise.
6991         (grub_env_insert): Likewise.
6992         (grub_env_remove): Likewise.
6993         (grub_env_export): Likewise.
6994         (grub_env_set): Changed to use helper functions to avoid code
6995         duplication.
6996         (grub_env_iterate): Rewritten so both the current context and the
6997         global context are being used.
6999         * normal/command.c (export_command): New function.
7000         (grub_command_init): Register the `export' function.
7002 2006-04-26  Yoshinori K. Okuji  <okuji@enbug.org>
7004         * util/i386/pc/grub-mkimage.c (compress_kernel): Cast arguments
7005         explicitly to suppress gcc's warnings.
7006         * fs/fat.c (grub_fat_find_dir): Likewise.
7007         (grub_fat_label): Likewise.
7008         * fs/xfs.c (grub_xfs_read_inode): Likewise.
7009         (grub_xfs_mount): Likewise.
7010         (grub_xfs_label): Likewise.
7011         * fs/affs.c (grub_affs_mount): Likewise.
7012         (grub_affs_label): Likewise.
7013         (grub_affs_iterate_dir): Likewise.
7014         * fs/sfs.c (grub_sfs_mount): Likewise.
7015         (grub_sfs_iterate_dir): Likewise.
7016         * fs/ufs.c (grub_ufs_lookup_symlink): Likewise.
7017         * fs/hfs.c (grub_hfs_mount): Likewise.
7018         (grub_hfs_cmp_catkeys): Likewise.
7019         (grub_hfs_find_dir): Likewise.
7020         (grub_hfs_dir): Likewise.
7021         (grub_hfs_label): Likewise.
7022         * fs/jfs.c (grub_jfs_mount): Likewise.
7023         (grub_jfs_opendir): Likewise.
7024         (grub_jfs_getent): Likewise.
7025         (grub_jfs_lookup_symlink): Likewise.
7026         (grub_jfs_label): Likewise.
7027         * fs/hfsplus.c (grub_hfsplus_cmp_catkey): Likewise.
7028         (grub_hfsplus_iterate_dir): Likewise.
7029         (grub_hfsplus_btree_iterate_node): Made static.
7031         * util/grub-emu.c (prefix): New variable.
7032         (grub_machine_set_prefix): New function.
7033         (main): Do not set the environment variable "prefix" here. Only
7034         set PREFIX, which is used later by grub_machine_set_prefix.
7036         * include/grub/video.h: Do not include grub/symbol.h.
7037         (grub_video_register): Not exported. This symbol is not defined in
7038         the kernel.
7039         (grub_video_unregister): Likewise.
7040         (grub_video_iterate): Likewise.
7041         (grub_video_setup): Likewise.
7042         (grub_video_restore): Likewise.
7043         (grub_video_get_info): Likewise.
7044         (grub_video_get_blit_format): Likewise.
7045         (grub_video_set_palette): Likewise.
7046         (grub_video_get_palette): Likewise.
7047         (grub_video_set_viewport): Likewise.
7048         (grub_video_get_viewport): Likewise.
7049         (grub_video_map_color): Likewise.
7050         (grub_video_map_rgb): Likewise.
7051         (grub_video_map_rgba): Likewise.
7052         (grub_video_fill_rect): Likewise.
7053         (grub_video_blit_glyph): Likewise.
7054         (grub_video_blit_bitmap): Likewise.
7055         (grub_video_blit_render_target): Likewise.
7056         (grub_video_scroll): Likewise.
7057         (grub_video_swap_buffers): Likewise.
7058         (grub_video_create_render_target): Likewise.
7059         (grub_video_delete_render_target): Likewise.
7060         (grub_video_set_active_render_target): Likewise.
7062         * include/grub/symbol.h [GRUB_SYMBOL_GENERATOR] (EXPORT_FUNC):
7063         Undefined.
7064         [GRUB_SYMBOL_GENERATOR] (EXPORT_VAR): Likewise.
7066         * conf/sparc64-ieee1275.rmk (grubof_symlist.c): Depended on
7067         config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
7068         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
7069         instead of $(srcdir)/genkernsyms.sh.
7071         * conf/powerpc-ieee1275.rmk (grubof_symlist.c): Depended on
7072         config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
7073         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
7074         instead of $(srcdir)/genkernsyms.sh.
7076         * conf/i386-pc.rmk (symlist.c): Depended on config.h. Use
7077         gensymlist.sh instead of $(srcdir)/gensymlist.sh.
7078         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
7079         instead of $(srcdir)/genkernsyms.sh.
7081         * conf/i386-efi.rmk (symlist.c): Depended on config.h. Use
7082         gensymlist.sh instead of $(srcdir)/gensymlist.sh.
7083         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
7084         instead of $(srcdir)/genkernsyms.sh.
7086         * configure.ac (AC_CONFIG_FILES): Added gensymlist.sh and
7087         genkernsyms.sh.
7089         * Makefile.in (DISTCLEANFILES): Added gensymlist.sh and
7090         genkernsyms.sh.
7091         (gensymlist.sh): New target.
7092         (genkernsyms.sh): Likewise.
7094         * DISTLIST: Removed genkernsyms.sh and gensymlist.sh. Added
7095         genkernsyms.sh.in and gensymlist.sh.in.
7097         * genkernsyms.sh: Removed.
7098         * gensymlist.sh: Likewise.
7100         * genkernsyms.sh.in: New file.
7101         * gensymlist.sh.in: Likewise.
7103 2006-04-25  Hollis Blanchard  <hollis@penguinppc.org>
7105         * kern/powerpc/ieee1275/init.c (grub_machine_set_prefix): Do not
7106         clobber "prefix", since we may have already set it manually.
7108 2006-04-25  Hollis Blanchard  <hollis@penguinppc.org>
7110         * kern/misc.c (abort): New alias for grub_abort.
7112 2006-04-25  Yoshinori K. Okuji  <okuji@enbug.org>
7114         A new machine-specific function "grub_machine_set_prefix" is
7115         defined. This is called after loading modules, so that a prefix
7116         initialization can use modules. Also, this change adds an
7117         intensive debugging feature for the memory manager via the
7118         configure option "--enable-mm-debug".
7120         * partmap/gpt.c (gpt_partition_map_iterate): Add one more into
7121         PART.LEN.
7123         * kern/sparc64/ieee1275/init.c (abort): Removed.
7124         (grub_stop): Likewise.
7125         (grub_exit): New function.
7126         (grub_set_prefix): Renamed to ...
7127         (grub_machine_set_prefix): ... this.
7128         (grub_machine_init): Do not call grub_set_prefix.
7130         * kern/powerpc/ieee1275/init.c (grub_set_prefix): Renamed to ...
7131         (grub_machine_set_prefix): ... this.
7132         (grub_machine_init): Do not call grub_set_prefix.
7134         * kern/i386/pc/init.c (grub_machine_set_prefix): New function.
7135         (grub_machine_init): Do not set the prefix here.
7137         * kern/i386/efi/init.c (grub_machine_set_prefix): New function.
7139         * kern/efi/init.c: Include grub/mm.h.
7140         (grub_efi_set_prefix): New function.
7142         * kern/efi/efi.c (grub_exit): Call grub_efi_fini.
7143         (grub_efi_get_filename): New function.
7144         (grub_print_device_path): Renamed to ...
7145         (grub_efi_print_device_path): ... this.
7147         * kern/mm.c [MM_DEBUG] (grub_malloc): Undefined.
7148         [MM_DEBUG] (grub_realloc): Likewise.
7149         [MM_DEBUG] (grub_free): Likewise.
7150         [MM_DEBUG] (grub_memalign): Likewise.
7151         [MM_DEBUG] (grub_mm_debug): New variable.
7152         [MM_DEBUG] (grub_debug_malloc): New function.
7153         [MM_DEBUG] (grub_debug_free): New function.
7154         [MM_DEBUG] (grub_debug_realloc): New function.
7155         [MM_DEBUG] (grub_debug_memalign): New function.
7157         * kern/misc.c (grub_abort): Print a newline to distinguish
7158         the message.
7160         * kern/main.c (grub_main): Call grub_machine_set_prefix and
7161         grub_set_root_dev after loading modules. This is necessary when
7162         setting a prefix depends on modules.
7164         * include/grub/efi/efi.h (grub_print_device_path): Renamed to ...
7165         (grub_efi_print_device_path): ... this.
7166         (grub_efi_get_filename): New prototype.
7167         (grub_efi_set_prefix): Likewise.
7169         * include/grub/efi/disk.h: Include grub/efi/api.h, grub/symbol.h
7170         and grub/disk.h.
7171         (grub_efidisk_get_device_handle): New prototype.
7172         (grub_efidisk_get_device_name): Likewise.
7174         * include/grub/mm.h: Include config.h.
7175         (MM_DEBUG): Removed.
7176         [MM_DEBUG && !GRUB_UTIL] (grub_mm_debug): New prototype.
7177         [MM_DEBUG && !GRUB_UTIL] (grub_malloc): New macro.
7178         [MM_DEBUG && !GRUB_UTIL] (grub_realloc): Likewise.
7179         [MM_DEBUG && !GRUB_UTIL] (grub_memalign): Likewise.
7180         [MM_DEBUG && !GRUB_UTIL] (grub_free): Likewise.
7181         [MM_DEBUG && !GRUB_UTIL] (grub_debug_malloc): New prototype.
7182         [MM_DEBUG && !GRUB_UTIL] (grub_debug_realloc): New prototype.
7183         [MM_DEBUG && !GRUB_UTIL] (grub_debug_memalign): New prototype.
7184         [MM_DEBUG && !GRUB_UTIL] (grub_debug_free): New prototype.
7186         * include/grub/kernel.h (grub_machine_set_prefix): New prototype.
7188         * disk/efi/efidisk.c: Include grub/partition.h.
7189         (iterate_child_devices): New function.
7190         (add_device): First, compare only last device path nodes, so that
7191         devices are sorted by the types.
7192         (grub_efidisk_get_device_handle): New function.
7193         (grub_efidisk_get_device_name): Likewise.
7195         * configure.ac (--enable-mm-debug): New option to enable the
7196         memory manager debugging feature. This makes the binary much
7197         bigger, so is disabled by default.
7199 2006-04-23  Yoshinori K. Okuji  <okuji@enbug.org>
7201         Use grub_abort instead of grub_stop, and grub_exit must be
7202         define in each architecture now. Also, this change adds support
7203         for EFI disks.
7205         * util/i386/pc/grub-probefs.c: Include grub/term.h.
7206         (grub_getkey): New function.
7207         (grub_term_get_current): Likewise.
7209         * util/i386/pc/grub-setup.c: Include grub/term.h.
7210         (grub_getkey): New function.
7211         (grub_term_get_current): Likewise.
7213         * util/misc.c (grub_stop): Renamed to ...
7214         (grub_exit): ... this.
7216         * kern/powerpc/ieee1275/init.c (abort): Renamed to ...
7217         (grub_exit): ... this.
7218         (grub_machine_init): Use grub_abort instead of abort.
7219         (grub_stop): Removed.
7221         * kern/powerpc/ieee1275/cmain.c (cmain): Use grub_abort instead of
7222         abort.
7224         * kern/i386/pc/startup.S (grub_exit): New function.
7225         (cold_reboot): New label.
7227         * kern/efi/init.c: Include grub/efi/disk.h and grub/env.h.
7228         (grub_efi_init): Call grub_efidisk_init.
7229         (grub_efi_fini): Call grub_efidisk_fini.
7231         * kern/efi/efi.c: Include grub/mm.h.
7232         (grub_efi_console_control_guid): Renamed to ...
7233         (console_control_guid): ... this.
7234         (grub_efi_loaded_image_guid): Renamed to ...
7235         (loaded_image_guid): ... this.
7236         (grub_efi_locate_handle): New function.
7237         (grub_efi_open_protocol): Likewise.
7238         (grub_efi_set_text_mode): Use CONSOLE_CONTROL_GUID instead of
7239         GRUB_EFI_CONSOLE_CONTROL_GUID.
7240         (grub_efi_exit): Removed.
7241         (grub_stop): Likewise.
7242         (grub_efi_get_loaded_image): Use grub_efi_open_protocol.
7243         (grub_exit): New function.
7244         (grub_print_device_path): Likewise.
7246         * kern/rescue.c (grub_rescue_cmd_exit): New function.
7247         (grub_enter_rescue_mode): Register "exit".
7249         * kern/misc.c (grub_real_dprintf): A cosmetic change.
7250         (grub_abort): New function.
7252         * kern/err.c (grub_fatal): Use grub_abort instead of grub_stop.
7254         * include/grub/sparc64/ieee1275/kernel.h (abort): Removed.
7256         * include/grub/powerpc/ieee1275/kernel.h (abort): Removed.
7258         * include/grub/efi/efi.h (grub_efi_exit): Removed.
7259         (grub_print_device_path): New prototype.
7260         (grub_efi_locate_handle): Likewise.
7261         (grub_efi_open_protocol): Likewise.
7263         * include/grub/efi/disk.h (grub_efidisk_fini): New file.
7264         * disk/efi/efidisk.c: Likewise.
7266         * DISTLIST: Added disk/efi/efidisk.c and include/grub/efi/disk.h.
7268         * include/grub/efi/console_control.h
7269         (GRUB_EFI_CONSOLE_CONTROL_GUID): Use an array for the last 8 bytes.
7271         * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): Specify the
7272         last 8 bytes as an array.
7273         (GRUB_EFI_DISK_IO_GUID): New macro.
7274         (GRUB_EFI_BLOCK_IO_GUID): Likewise.
7275         (GRUB_EFI_DEVICE_PATH_GUID): Likewise.
7276         (grub_efi_ipv6_address_t): Change the type to grub_uint16_t from
7277         grub_uint8_t.
7278         (struct grub_efi_guid): Use an array to specify the last 8 bytes.
7279         (struct grub_efi_device_path): Rename the member "sub_type" to
7280         "subtype".
7281         (GRUB_EFI_DEVICE_PATH_TYPE): New macro.
7282         (GRUB_EFI_DEVICE_PATH_SUBTYPE): Likewise.
7283         (GRUB_EFI_DEVICE_PATH_LENGTH): Likewise.
7284         (GRUB_EFI_END_DEVICE_PATH_TYPE): Likewise.
7285         (GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE): Likewise.
7286         (GRUB_EFI_END_THIS_DEVICE_PATH_SUBTYPE): Likewise.
7287         (GRUB_EFI_END_ENTIRE_DEVICE_PATH): Likewise.
7288         (GRUB_EFI_NEXT_DEVICE_PATH): Likewise.
7289         (GRUB_EFI_HARDWARE_DEVICE_PATH_TYPE): Likewise.
7290         (GRUB_EFI_PCI_DEVICE_PATH_SUBTYPE): Likewise.
7291         (struct grub_efi_pci_device_path): New structure.
7292         (grub_efi_pci_device_path_t): New type.
7293         (GRUB_EFI_PCCARD_DEVICE_PATH_SUBTYPE): New macro.
7294         (struct grub_efi_pccard_device_path): New structure.
7295         (grub_efi_pccard_device_path_t): New type.
7296         (GRUB_EFI_MEMORY_MAPPED_DEVICE_PATH_SUBTYPE): New macro.
7297         (struct grub_efi_memory_mapped_device_path): New structure.
7298         (grub_efi_memory_mapped_device_path_t): New type.
7299         (GRUB_EFI_VENDOR_DEVICE_PATH_SUBTYPE): New macro.
7300         (struct grub_efi_vendor_device_path): New structure.
7301         (grub_efi_vendor_device_path_t): New type.
7302         (GRUB_EFI_CONTROLLER_DEVICE_PATH_SUBTYPE): New macro.
7303         (struct grub_efi_controller_device_path): New structure.
7304         (grub_efi_controller_device_path_t): New type.
7305         (GRUB_EFI_ACPI_DEVICE_PATH_TYPE): New macro.
7306         (GRUB_EFI_ACPI_DEVICE_PATH_SUBTYPE): Likewise.
7307         (struct grub_efi_acpi_device_path): New structure.
7308         (grub_efi_acpi_device_path_t): New type.
7309         (GRUB_EFI_EXPANDED_ACPI_DEVICE_PATH_SUBTYPE): New macro.
7310         (struct grub_efi_expanded_acpi_device_path): New structure.
7311         (grub_efi_expanded_acpi_device_path_t): New type.
7312         (GRUB_EFI_EXPANDED_ACPI_HIDSTR): New macro.
7313         (GRUB_EFI_EXPANDED_ACPI_UIDSTR): Likewise.
7314         (GRUB_EFI_EXPANDED_ACPI_CIDSTR): Likewise.
7315         (GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE): Likewise.
7316         (GRUB_EFI_ATAPI_DEVICE_PATH_SUBTYPE): Likewise.
7317         (struct grub_efi_atapi_device_path): New structure.
7318         (grub_efi_atapi_device_path_t): New type.
7319         (GRUB_EFI_FIBRE_CHANNEL_DEVICE_PATH_SUBTYPE): New macro.
7320         (struct grub_efi_fibre_channel_device_path): New structure.
7321         (grub_efi_fibre_channel_device_path_t): New type.
7322         (GRUB_EFI_1394_DEVICE_PATH_SUBTYPE): New macro.
7323         (struct grub_efi_1394_device_path): New structure.
7324         (grub_efi_1394_device_path_t): New type.
7325         (GRUB_EFI_USB_DEVICE_PATH_SUBTYPE): New macro.
7326         (struct grub_efi_usb_device_path): New structure.
7327         (grub_efi_usb_device_path_t): New type.
7328         (GRUB_EFI_USB_CLASS_DEVICE_PATH_SUBTYPE): New macro.
7329         (struct grub_efi_usb_class_device_path): New structure.
7330         (grub_efi_usb_class_device_path_t): New type.
7331         (GRUB_EFI_I2O_DEVICE_PATH_SUBTYPE): New macro.
7332         (struct grub_efi_i2o_device_path): New structure.
7333         (grub_efi_i2o_device_path_t): New type.
7334         (GRUB_EFI_MAC_ADDRESS_DEVICE_PATH_SUBTYPE): New macro.
7335         (struct grub_efi_mac_address_device_path): New structure.
7336         (grub_efi_mac_address_device_path_t): New type.
7337         (GRUB_EFI_IPV4_DEVICE_PATH_SUBTYPE): New macro.
7338         (struct grub_efi_ipv4_device_path): New structure.
7339         (grub_efi_ipv4_device_path_t): New type.
7340         (GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE): New macro.
7341         (struct grub_efi_ipv6_device_path): New structure.
7342         (grub_efi_ipv6_device_path_t): New type.
7343         (GRUB_EFI_INFINIBAND_DEVICE_PATH_SUBTYPE): New macro.
7344         (struct grub_efi_infiniband_device_path): New structure.
7345         (grub_efi_infiniband_device_path_t): New type.
7346         (GRUB_EFI_UART_DEVICE_PATH_SUBTYPE): New macro.
7347         (struct grub_efi_uart_device_path): New structure.
7348         (grub_efi_uart_device_path_t): New type.
7349         (GRUB_EFI_VENDOR_MESSAGING_DEVICE_PATH_SUBTYPE): New macro.
7350         (struct grub_efi_vendor_messaging_device_path): New structure.
7351         (grub_efi_vendor_messaging_device_path_t): New type.
7352         (GRUB_EFI_MEDIA_DEVICE_PATH_TYPE): New macro.
7353         (GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE): Likewise.
7354         (struct grub_efi_hard_drive_device_path): New structure.
7355         (grub_efi_hard_drive_device_path_t): New type.
7356         (GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE): New macro.
7357         (struct grub_efi_cdrom_device_path): New structure.
7358         (grub_efi_cdrom_device_path_t): New type.
7359         (GRUB_EFI_VENDOR_MEDIA_DEVICE_PATH_SUBTYPE): New macro.
7360         (struct grub_efi_vendor_media_device_path): New structure.
7361         (grub_efi_vendor_media_device_path_t): New type.
7362         (GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE): New macro.
7363         (struct grub_efi_file_path_device_path): New structure.
7364         (grub_efi_file_path_device_path_t): New type.
7365         (GRUB_EFI_PROTOCOL_DEVICE_PATH_SUBTYPE): New macro.
7366         (struct grub_efi_protocol_device_path): New structure.
7367         (grub_efi_protocol_device_path_t): New type.
7368         (GRUB_EFI_BIOS_DEVICE_PATH_TYPE): New macro.
7369         (GRUB_EFI_BIOS_DEVICE_PATH_SUBTYPE): Likewise.
7370         (struct grub_efi_bios_device_path): New structure.
7371         (grub_efi_bios_device_path_t): New type.
7372         (struct grub_efi_disk_io): New structure.
7373         (grub_efi_disk_io_t): New type.
7374         (struct grub_efi_block_io_media): New structure.
7375         (grub_efi_block_io_media_t): New type.
7376         (struct grub_efi_block_io): New structure.
7377         (grub_efi_block_io_t): New type.
7379         * include/grub/misc.h (grub_stop): Removed.
7380         (grub_exit): New prototype.
7381         (grub_abort): Likewise.
7383         * include/grub/disk.h (enum grub_disk_dev_id): Added
7384         GRUB_DISK_DEVICE_EFIDISK_ID.
7386         * conf/i386-efi.rmk (kernel_mod_SOURCES): Added
7387         disk/efi/efidisk.c.
7388         (kernel_syms.lst): Remove the target if an error occurs.
7390 2006-04-22  Yoshinori K. Okuji  <okuji@enbug.org>
7392         * kern/misc.c (grub_lltoa): Rewritten the decimal conversion part,
7393         as it was simply too buggy.
7395 2006-04-21  Yoshinori K. Okuji  <okuji@enbug.org>
7397         * kern/misc.c (grub_lltoa): New function.
7398         (grub_vsprintf): Added support for the long long suffix,
7399         i.e. "ll".
7401 2006-04-20  Hollis Blanchard  <hollis@penguinppc.org>
7403         * Makefile.in (LDFLAGS): Add variable.
7404         (LD): Remove variable.
7405         * configure.ac: Add -m32 to LDFLAGS.
7406         * genmk.rb (PModule#rule): Use $(CC) instead of $(LD).
7407         * conf/powerpc-ieee1275.rmk (COMMON_LDFLAGS): Add variable.
7408         (grubof_LDFLAGS): Use $(COMMON_LDFLAGS).
7409         (_linux_mod_LDFLAGS, linux_mod_LDFLAGS, normal_mod_LDFLAGS,
7410         suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS): New
7411         variables.
7412         * conf/sparc64-ieee1275.rmk (COMMON_LDFLAGS): Add -nostdlib.
7413         * conf/i386-pc.rmk (COMMON_LDFLAGS): Add -nostdlib.
7414         * conf/i386-efi.rmk (COMMON_LDFLAGS): Add -nostdlib.
7416 2006-04-20  Vesa Jaaskelainen  <chaac@nic.fi>
7418         * term/gfxterm.c (grub_gfxterm_getcharwidth): Fixed character
7419         length for unknown glyph.
7421 2006-04-20  Yoshinori K. Okuji  <okuji@enbug.org>
7423         Add support for pre-loaded modules into the EFI port.
7425         * util/i386/efi/grub-mkimage.c (make_mods_section): Rewritten
7426         completely. Accept one more argument DIR. The caller has changed.
7428         * kern/i386/efi/init.c (grub_arch_modules_addr): Removed.
7430         * kern/efi/efi.c: Include grub/efi/pe32.h and grub/kernel.h.
7431         (grub_efi_loaded_image_guid): New variable.
7432         (grub_efi_get_loaded_image): New function.
7433         (grub_arch_modules_addr): Likewise.
7435         * include/grub/efi/efi.h (grub_efi_get_loaded_image): New
7436         prototype.
7438         * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): New macro.
7439         (struct grub_efi_loaded_image): New structure.
7440         (grub_efi_loaded_image_t): New type.
7442 2006-04-20  Yoshinori K. Okuji  <okuji@enbug.org>
7444         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Compare the file
7445         size with GRUB_OS_AREA_SIZE as grub_size_t instead of
7446         grub_ssize_t. Reported by Jeff Chua <jeff84@silk.corp.fedex.com>.
7448 2006-04-19  Roger Leigh  <rleigh@whinlatter.ukfsn.org>
7450         * DISTLIST: Added `util/powerpc/ieee1275/grub-install.in'.
7452 2006-04-19  Yoshinori K. Okuji  <okuji@enbug.org>
7454         * DISTLIST: Added include/grub/efi/console.h,
7455         include/grub/efi/time.h, include/grub/i386/efi/kernel.h,
7456         kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
7458         * include/grub/efi/console.h: New file.
7459         * include/grub/efi/time.h: Likewise.
7460         * include/grub/i386/efi/kernel.h: Likewise.
7461         * kern/efi/init.c: Likewise.
7462         * kern/efi/mm.c: Likewise.
7463         * term/efi/console.c: Likewise.
7465         * kern/i386/efi/init.c: Do not include grub/machine/time.h.
7466         (grub_stop): Removed.
7467         (grub_get_rtc): Likewise.
7468         (grub_machine_init): Simply call grub_efi_init.
7469         (grub_machine_fini): Call grub_efi_fini.
7471         * kern/efi/efi.c: Include grub/machine/time.h and grub/term.h.
7472         (grub_efi_output_string): Removed.
7473         (grub_efi_stall): New function.
7474         (grub_stop): Likewise.
7475         (grub_get_rtc): Likewise.
7477         * include/grub/efi/efi.h (grub_efi_output_string): Removed.
7478         (grub_efi_stall): New prototype.
7479         (grub_efi_allocate_pages): Likewise.
7480         (grub_efi_free_pages): Likewise.
7481         (grub_efi_get_memory_map): Likewise.
7482         (grub_efi_mm_init): Likewise.
7483         (grub_efi_mm_fini): Likewise.
7484         (grub_efi_init): Likewise.
7485         (grub_efi_fini): Likewise.
7487         * include/grub/i386/efi/time.h: Do not include
7488         grub/symbol.h. Include grub/efi/time.h.
7489         (GRUB_TICKS_PER_SECOND): Removed.
7490         (grub_get_rtc): Likewise.
7492         * include/grub/efi/api.h (struct grub_efi_memory_descriptor):
7493         Added padding. The EFI spec is buggy.
7494         (GRUB_EFI_BLACK): New macro.
7495         (GRUB_EFI_BLUE): Likewise.
7496         (GRUB_EFI_GREEN): Likewise.
7497         (GRUB_EFI_CYAN): Likewise.
7498         (GRUB_EFI_RED): Likewise.
7499         (GRUB_EFI_MAGENTA): Likewise.
7500         (GRUB_EFI_BROWN): Likewise.
7501         (GRUB_EFI_LIGHTGRAY): Likewise.
7502         (GRUB_EFI_BRIGHT): Likewise.
7503         (GRUB_EFI_DARKGRAY): Likewise.
7504         (GRUB_EFI_LIGHTBLUE): Likewise.
7505         (GRUB_EFI_LIGHTGREEN): Likewise.
7506         (GRUB_EFI_LIGHTCYAN): Likewise.
7507         (GRUB_EFI_LIGHTRED): Likewise.
7508         (GRUB_EFI_LIGHTMAGENTA): Likewise.
7509         (GRUB_EFI_YELLOW): Likewise.
7510         (GRUB_EFI_WHITE): Likewise.
7511         (GRUB_EFI_BACKGROUND_BLACK): Likewise.
7512         (GRUB_EFI_BACKGROUND_BLUE): Likewise.
7513         (GRUB_EFI_BACKGROUND_GREEN): Likewise.
7514         (GRUB_EFI_BACKGROUND_CYAN): Likewise.
7515         (GRUB_EFI_BACKGROUND_RED): Likewise.
7516         (GRUB_EFI_BACKGROUND_MAGENTA): Likewise.
7517         (GRUB_EFI_BACKGROUND_BROWN): Likewise.
7518         (GRUB_EFI_BACKGROUND_LIGHTGRAY): Likewise.
7519         (GRUB_EFI_TEXT_ATTR): Likewise.
7521         * conf/i386-efi.rmk (kernel_mod_SOURCES): Added kern/efi/efi.c,
7522         kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
7523         (kernel_mod_HEADERS): Added efi/time.h.
7525 2006-04-18  Yoshinori K. Okuji  <okuji@enbug.org>
7527         * DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
7528         include/grub/efi/api.h, include/grub/efi/console_control.h,
7529         include/grub/efi/efi.h, include/grub/efi/pe32.h,
7530         include/grub/i386/efi/time.h, kern/efi/efi.c,
7531         kern/i386/efi/init.c, kern/i386/efi/startup.S,
7532         and util/i386/efi/grub-mkimage.c.
7534         * Makefile.in (RMKFILES): Added i386-efi.rmk.
7536         * genmk.rb (PModule#rule): Do not export symbols if
7537         #{prefix}_EXPORTS is set to "no".
7539         * conf/i386-efi.mk: New file.
7540         * conf/i386-efi.rmk: Likewise.
7541         * include/grub/efi/api.h: Likewise.
7542         * include/grub/efi/console_control.h: Likewise.
7543         * include/grub/efi/efi.h: Likewise.
7544         * include/grub/efi/pe32.h: Likewise.
7545         * include/grub/i386/efi/time.h: Likewise.
7546         * kern/efi/efi.c: Likewise.
7547         * kern/i386/efi/init.c: Likewise.
7548         * kern/i386/efi/startup.S: Likewise.
7549         * util/i386/efi/grub-mkimage.c: Likewise.
7551 2006-04-17  Marco Gerards  <marco@gnu.org>
7553         * include/grub/script.h: Include <grub/parser.h> and
7554         "grub_script.tab.h".
7555         (struct grub_lexer_param): New struct.
7556         (struct grub_parser_param): Likewise.
7557         (grub_script_create_arglist): Pass the state in an argument.
7558         (grub_script_add_arglist): Likewise.
7559         (grub_script_create_cmdline): Likewise.
7560         (grub_script_create_cmdblock): Likewise.
7561         (grub_script_create_cmdif): Likewise.
7562         (grub_script_create_cmdmenu): Likewise.
7563         (grub_script_add_cmd): Likewise.
7564         (grub_script_arg_add): Likewise.
7565         (grub_script_lexer_ref): Likewise.
7566         (grub_script_lexer_deref): Likewise.
7567         (grub_script_lexer_record_start): Likewise.
7568         (grub_script_lexer_record_stop): Likewise.
7569         (grub_script_mem_record): Likewise.
7570         (grub_script_mem_record_stop): Likewise.
7571         (grub_script_malloc): Likewise.
7572         (grub_script_yylex): Likewise.
7573         (grub_script_yyparse): Likewise.
7574         (grub_script_yyerror): Likewise.
7575         (grub_script_yylex): Likewise.
7576         (grub_script_lexer_init): Return the state.
7578         * normal/lexer.c (grub_script_lexer_state): Removed variable.
7579         (grub_script_lexer_done): Likewise.
7580         (grub_script_lexer_getline): Likewise.
7581         (grub_script_lexer_refs): Likewise.
7582         (script): Likewise.
7583         (newscript): Likewise.
7584         (record): Likewise.
7585         (recording): Likewise.
7586         (recordpos): Likewise.
7587         (recordlen): Likewise.
7588         (grub_script_lexer_init): Return the state instead of setting
7589         global variables.
7590         (grub_script_lexer_ref): Use the newly added argument for state
7591         instead of globals.
7592         (grub_script_lexer_deref): Likewise.
7593         (grub_script_lexer_record_start): Likewise.
7594         (grub_script_lexer_record_stop): Likewise.
7595         (recordchar): Likewise.
7596         (nextchar): Likewise.
7597         (grub_script_yylex2): Likewise.
7598         (grub_script_yylex): Likewise.
7599         (grub_script_yyerror): Likewise.
7601         * normal/parser.y (func_mem): Removed variable.
7602         (menu_entry): Likewise.
7603         (err): Likewise.
7604         (%lex-param): New parser option.
7605         (%parse-param): Likewise.
7606         (script): Always return the AST.
7607         (argument): Pass the state around.
7608         (arguments): Likewise.
7609         (grubcmd): Likewise.
7610         (commands): Likewise.
7611         (function): Likewise.
7612         (menuentry): Likewise.
7613         (if_statement): Likewise.
7614         (if): Likewise.
7616         * normal/script.c (grub_script_memused): Removed variable.
7617         (grub_script_parsed): Likewise.
7618         (grub_script_malloc): Added a state argument.  Use that instead of
7619         global variables.
7620         (grub_script_mem_record): Likewise.
7621         (grub_script_mem_record_stop): Likewise.
7622         (grub_script_arg_add): Likewise.
7623         (grub_script_add_arglist): Likewise.
7624         (grub_script_create_cmdline): Likewise.
7625         (grub_script_create_cmdif): Likewise.
7626         (grub_script_create_cmdmenu): Likewise.
7627         (grub_script_add_cmd): Likewise.
7628         (grub_script_parse): Setup the state before calling the parser.
7630 2006-04-16  Marco Gerards  <marco@gnu.org>
7632         * normal/command.c (grub_command_init): Remove the title command.
7634         * normal/lexer.c (grub_script_yylex): Renamed from this...
7635         (grub_script_yylex2): ... to this.
7636         (grub_script_yylex): New function.  Temporary
7637         introduced to filter some tokens.
7638         (grub_script_yyerror): Print a newline.
7640         * normal/main.c (read_config_file): Output information about the
7641         lines that contain errors.  Wait for a key after all lines have
7642         been processed.  Don't return an empty menu.
7644         * normal/parser.y (func_mem): Don't initialize.
7645         (menu_entry): Likewise.
7646         (err): New variable.
7647         (script): Don't return anything when an error was encountered.
7648         (ws, returns): Removed rules.
7649         (argument): Disabled concatenated variable support.
7650         (arguments): Remove explicit separators.
7651         (grubcmd): Likewise.
7652         (function): Likewise.
7653         (menuentry): Likewise.
7654         (if): Likewise.
7655         (commands): Likewise.  Add error handling.
7657         * normal/script.c (grub_script_create_cmdline): If
7658         `grub_script_parsed' is 0, assume the parser encountered an error.
7660 2006-04-02  Yoshinori K. Okuji  <okuji@enbug.org>
7662         * configure.ac: Add support for EFI. Fix the typo
7663         BUILD_LDDFLAGS. Restore the LDFLAGS after testing.
7665 2006-04-01  Vesa Jaaskelainen  <chaac@nic.fi>
7667         * util/unifont2pff.rb: Removed unnecessary byte ordering.  Now
7668         foreign multibyte characters should be shown correctly.
7670 2006-04-01  Vesa Jaaskelainen  <chaac@nic.fi>
7672         * normal/main.c (grub_normal_menu_addentry): Fixed menu size
7673         calculation.
7674         (read_config_file): Made it to close file before returning.
7676 2006-03-31  Vesa Jaaskelainen  <chaac@nic.fi>
7678         * DISTLIST: Added include/grub/i386/pc/vbeblit.h,
7679         include/grub/i386/pc/vbefill.h, video/i386/pc/vbeblit.c,
7680         video/i386/pc/vbefill.c.
7682         * conf/i386-pc.rmk (vbe_mod_SOURCES): Added video/i386/pc/vbeblit.c,
7683         video/i386/pc/vbefill.c.
7685         * include/grub/video.h (grub_video_blit_format): New enum.
7686         (grub_video_mode_info): Added new member blit_format.
7687         (grub_video_get_blit_format): New function prototype.
7689         * include/grub/i386/pc/vbe.h (grub_video_vbe_get_video_ptr): New
7690         function prototype.
7691         (grub_video_vbe_map_rgb): Likewise.
7692         (grub_video_vbe_unmap_color): Likewise.
7694         * include/grub/i386/pc/vbeblit.h: New file.
7696         * include/grub/i386/pc/vbefill.h: New file.
7698         * video/video.c (grub_video_get_blit_format): New function.
7699         (grub_video_vbe_get_video_ptr): Re-declared as non-static.
7700         (grub_video_vbe_map_rgb): Likewise.
7701         (grub_video_vbe_unmap_color): Likewise.
7703         * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Changed to use more
7704         optimized fills.
7705         (grub_video_vbe_blit_render_target): Changed to use more optimized
7706         blits.
7707         (grub_video_vbe_setup): Added detection for optimized settings.
7708         (grub_video_vbe_create_render_target): Likewise.
7710         * video/i386/pc/vbeblit.c: New file.
7712         * video/i386/pc/vbefill.c: New file.
7714 2006-03-30  Vesa Jaaskelainen  <chaac@nic.fi>
7716         * font/manager.c (grub_font_get_glyph): Removed font fixup from
7717         here...
7719         * util/unifont2pff.rb: ... and moved it to here.  Improved argument
7720         parsing to support both hex and dec ranges.  If filename was missing
7721         show usage information.
7723 2006-03-14  Vesa Jaaskelainen  <chaac@nic.fi>
7725         * DISTLIST: Added include/grub/video.h, term/gfxterm.c,
7726         video/video.c, commands/videotest.c.  Removed term/i386/pc/vesafb.c.
7728         * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod,
7729         gfxterm.mod, videotest.mod.  Removed vga.mod, vesafb.mod.
7730         (video_mod_SOURCES): Added.
7731         (video_mod_CFLAGS): Likewise.
7732         (video_mod_LDFLAGS): Likewise.
7733         (gfxterm_mod_SOURCES): Likewise.
7734         (gfxterm_mod_CFLAGS): Likewise.
7735         (gfxterm_mod_LDFLAGS): Likewise.
7736         (videotest_mod_SOURCES): Likewise.
7737         (videotest_mod_CFLAGS): Likewise.
7738         (videotest_mod_LDFLAGS): Likewise.
7739         (vesafb_mod_SOURCES): Removed.
7740         (vesafb_mod_CFLAGS): Likewise.
7741         (vesafb_mod_LDFLAGS): Likewise.
7742         (vga_mod_SOURCES): Likewise.
7743         (vga_mod_CFLAGS): Likewise.
7744         (vga_mod_LDFLAGS): Likewise.
7746         * commands/videotest.c: New file.
7748         * font/manager.c (fill_with_default_glyph): Modified to use
7749         grub_font_glyph.
7750         (grub_font_get_glyph): Likewise.
7751         (fontmanager): Renamed from this...
7752         (font_manager): ... to this.
7754         * include/grub/font.h (grub_font_glyph): Added new structure.
7755         (grub_font_get_glyph): Modified to use grub_font_glyph.
7757         * include/grub/misc.h (grub_abs): Added as inline function.
7759         * include/grub/video.h: New file.
7761         * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro.
7762         (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise.
7763         (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise.
7764         (grub_vbe_get_controller_info): Renamed from this...
7765         (grub_vbe_bios_get_controller_info): ... to this.
7766         (grub_vbe_get_mode_info): Renamed from this...
7767         (grub_vbe_bios_get_mode_info): ... to this.
7768         (grub_vbe_set_mode): Renamed from this...
7769         (grub_vbe_bios_set_mode): ... to this.
7770         (grub_vbe_get_mode): Renamed from this...
7771         (grub_vbe_bios_get_mode): ... to this.
7772         (grub_vbe_set_memory_window): Renamed from this...
7773         (grub_vbe_bios_set_memory_window): ... to this.
7774         (grub_vbe_get_memory_window): Renamed from this...
7775         (grub_vbe_bios_get_memory_window): ... to this.
7776         (grub_vbe_set_scanline_length): Renamed from this...
7777         (grub_vbe_set_scanline_length): ... to this.
7778         (grub_vbe_get_scanline_length): Renamed from this...
7779         (grub_vbe_bios_get_scanline_length): ... to this.
7780         (grub_vbe_set_display_start): Renamed from this...
7781         (grub_vbe_bios_set_display_start): ... to this.
7782         (grub_vbe_get_display_start): Renamed from this...
7783         (grub_vbe_bios_get_display_start): ... to this.
7784         (grub_vbe_set_palette_data): Renamed from this...
7785         (grub_vbe_bios_set_palette_data): ... to this.
7786         (grub_vbe_set_pixel_rgb): Removed.
7787         (grub_vbe_set_pixel_index): Likewise.
7789         * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed
7790         from this...
7791         (grub_vbe_bios_get_controller_info): ... to this.
7792         (grub_vbe_get_mode_info): Renamed from this...
7793         (grub_vbe_bios_get_mode_info): ... to this.
7794         (grub_vbe_set_mode): Renamed from this...
7795         (grub_vbe_bios_set_mode): ... to this.
7796         (grub_vbe_get_mode): Renamed from this...
7797         (grub_vbe_bios_get_mode): ... to this.
7798         (grub_vbe_set_memory_window): Renamed from this...
7799         (grub_vbe_bios_set_memory_window): ... to this.
7800         (grub_vbe_get_memory_window): Renamed from this...
7801         (grub_vbe_bios_get_memory_window): ... to this.
7802         (grub_vbe_set_scanline_length): Renamed from this...
7803         (grub_vbe_set_scanline_length): ... to this.
7804         (grub_vbe_get_scanline_length): Renamed from this...
7805         (grub_vbe_bios_get_scanline_length): ... to this.
7806         (grub_vbe_set_display_start): Renamed from this...
7807         (grub_vbe_bios_set_display_start): ... to this.
7808         (grub_vbe_get_display_start): Renamed from this...
7809         (grub_vbe_bios_get_display_start): ... to this.
7810         (grub_vbe_set_palette_data): Renamed from this...
7811         (grub_vbe_bios_set_palette_data): ... to this.
7812         (grub_vbe_bios_get_controller_info): Fixed problem with registers
7813         getting corrupted after calling it.  Added more pushes and pops.
7814         (grub_vbe_bios_set_mode): Likewise.
7815         (grub_vbe_bios_get_mode): Likewise.
7816         (grub_vbe_bios_get_memory_window): Likewise.
7817         (grub_vbe_bios_set_scanline_length): Likewise.
7818         (grub_vbe_bios_get_scanline_length): Likewise.
7819         (grub_vbe_bios_get_display_start): Likewise.
7820         (grub_vbe_bios_set_palette_data): Likewise.
7822         * normal/cmdline.c (cl_set_pos): Refresh the screen.
7823         (cl_insert): Likewise.
7824         (cl_delete): Likewise.
7826         * term/gfxterm.c: New file.
7828         * term/i386/pc/vesafb.c: Removed file.
7830         * video/video.c: New file.
7832         * video/i386/pc/vbe.c (real2pm): Added new function.
7833         (grub_video_vbe_draw_pixel): Likewise.
7834         (grub_video_vbe_get_video_ptr): Likewise.
7835         (grub_video_vbe_get_pixel): Likewise
7836         (grub_video_vbe_init): Likewise.
7837         (grub_video_vbe_fini): Likewise.
7838         (grub_video_vbe_setup): Likewise.
7839         (grub_video_vbe_get_info): Likewise.
7840         (grub_video_vbe_set_palette): Likewise.
7841         (grub_video_vbe_get_palette): Likewise.
7842         (grub_video_vbe_set_viewport): Likewise.
7843         (grub_video_vbe_get_viewport): Likewise.
7844         (grub_video_vbe_map_color): Likewise.
7845         (grub_video_vbe_map_rgb): Likewise.
7846         (grub_video_vbe_map_rgba): Likewise.
7847         (grub_video_vbe_unmap_color): Likewise.
7848         (grub_video_vbe_fill_rect): Likewise.
7849         (grub_video_vbe_blit_glyph): Likewise.
7850         (grub_video_vbe_blit_bitmap): Likewise.
7851         (grub_video_vbe_blit_render_target): Likewise.
7852         (grub_video_vbe_scroll): Likewise.
7853         (grub_video_vbe_swap_buffers): Likewise.
7854         (grub_video_vbe_create_render_target): Likewise.
7855         (grub_video_vbe_delete_render_target): Likewise.
7856         (grub_video_vbe_set_active_render_target): Likewise.
7857         (grub_vbe_set_pixel_rgb): Remove function.
7858         (grub_vbe_set_pixel_index): Likewise.
7859         (index_color_mode): Remove static variable.
7860         (active_mode): Likewise.
7861         (framebuffer): Likewise.
7862         (bytes_per_scan_line): Likewise.
7863         (grub_video_vbe_adapter): Added new static variable.
7864         (framebuffer): Likewise.
7865         (render_target): Likewise.
7866         (initial_mode): Likewise.
7867         (mode_in_use): Likewise.
7868         (mode_list): Likewise.
7870 2006-03-10  Marco Gerards  <marco@gnu.org>
7872         * configure.ac (AC_INIT): Bumped to 1.93.
7874         * DISTLIST: Added `include/grub/hfs.h'.
7876 2006-02-01  Yoshinori K. Okuji  <okuji@enbug.org>
7878         * boot/i386/pc/boot.S (general_error): Before looping, try INT
7879         18H, which might help the BIOS falling back to next boot media.
7881 2006-01-25  Yoshinori K. Okuji  <okuji@enbug.org>
7883         * util/i386/pc/grub-install.in: Escape a backslash. Reported by
7884         Poe Chen <poe.poechen@gmail.com>.
7886 2006-01-17  Marco Gerards  <marco@gnu.org>
7888         * include/grub/normal.h: Include <grub/script.h>.
7889         (grub_command_list): Removed struct.
7890         (grub_command_list_t): Removed type.
7891         (grub_menu_entry): Remove members `num' and `command_list'.  Add
7892         members `commands' and `sourcecode'.
7893         * include/grub/script.h: Add inclusion guards.
7894         (grub_script_cmd_menuentry): New struct.
7895         (grub_script_execute_menuentry): New prototype.
7896         (grub_script_lexer_record_start): Likewise.
7897         (grub_script_lexer_record_stop): Likewise.
7898         * normal/execute.c (grub_script_execute_menuentry): New function.
7899         * normal/lexer.c (record, recording, recordpos, recordlen): New
7900         variables.
7901         (grub_script_lexer_record_start): New function.
7902         (grub_script_lexer_record_stop): Likewise.
7903         (recordchar): Likewise.
7904         (nextchar): Likewise.
7905         (grub_script_yylex): Use `nextchar' to fetch new characters.  Use
7906         2048 as the buffer size.  Add the tokens `menuentry' and `@'.
7907         * normal/main.c: Include <grub/parser.h> and <grub/script.h>
7908         (current_menu): New variable.
7909         (free_menu): Mainly rewritten.
7910         (grub_normal_menu_addentry): New function.
7911         (read_config_file): Rewritten.
7912         * normal/menu.c (run_menu_entry): Mainly rewritten.
7913         * normal/menu_entry.c (make_screen): Rewritten the code to insert
7914         the menu entry.
7915         (run): Mainly rewritten.
7916         * normal/parser.y (menu_entry): New variable.
7917         (GRUB_PARSER_TOKEN_MENUENTRY): New token.
7918         (menuentry): New rule.
7919         (command): Add `menuentry'.
7920         (if_statement): Allow additional returns before `fi'.
7921         * normal/script.c (grub_script_create_cmdmenu): New function.
7923 2006-01-03  Marco Gerards  <marco@gnu.org>
7925         * INSTALL: GNU Bison is required.
7926         * configure.ac: Rewritten the test to detect Bison.
7927         * Makefile.in (YACC): New variable.  Reported by Xun Sun
7928         <xun.sun.cn@gmail.com>.
7930 2006-01-03  Marco Gerards  <marco@gnu.org>
7932         * fs/hfsplus.c (grub_hfsplus_read_block): Convert the offset of
7933         the HFS+ filesystem to filesystem blocks.
7934         (grub_hfsplus_iterate_dir): Cast the `fileinfo' assignment so a
7935         GCC warning is silenced.
7937 2006-01-03  Marco Gerards  <marco@gnu.org>
7939         * partmap/apple.c (apple_partition_map_iterate): Convert the data
7940         read from disk from big endian to host byte order.
7942 2006-01-03  Hollis Blanchard  <hollis@penguinppc.org>
7944         * fs/hfs.c: Include <grub/hfs.h>.  Added reference to the official
7945         documentation.
7946         (GRUB_HFS_EMBED_HFSPLUS_SIG): New macro.
7947         (grub_hfs_mount): Grammar fix in error. Make sure this is not an
7948         embedded HFS+ filesystem.
7949         (GRUB_HFS_MAGIC, grub_hfs_extent, grub_hfs_datarecord_t)
7950         (grub_hfs_sblock): Move from here...
7951         * include/grub/hfs.h: To here...  New file.
7952         * fs/hfsplus.c: Include <grub/hfs.h>.  Added reference to the official
7953         documentation.
7954         (GRUB_HFSPLUS_MAGIC, GRUB_HFSPLUSX_MAGIC, GRUB_HFSPLUS_SBLOCK):
7955         New macros.
7956         (grub_hfsplus_volheader): Change type of member `magic' to
7957         `grub_uint16_t'.
7958         (grub_hfsplus_data): Add new member `embedded_offset'.
7959         (grub_hfsplus_read_block): Add the HFS+ wrapper offset to the
7960         returned block.
7961         (grub_hfsplus_mount): Read the HFS+ wrapper if it exists.
7962         Calculate the offset.
7964 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
7966         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRP_ADDR):
7967         Removed.
7968         (GRUB_BOOT_MACHINE_DRP_SIZE): Likewise.
7970 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
7972         * kern/env.c (grub_env_set): Check if ENV->VALUE instead of
7973         ENV->NAME is NULL after allocating ENV->VALUE.
7975 2005-12-25  Marco Gerards  <marco@gnu.org>
7977         * kern/env.c (grub_env_set): Rewritten the error handling code.
7979 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
7981         * geninit.sh: Made more robust, and more portable.
7983 2005-12-25  Marco Gerards  <marco@gnu.org>
7985         Add support for Apple HFS+ filesystems.
7987         * fs/hfsplus.c: New file.
7989         * DISTLIST: Added `fs/hfsplus.c'.
7991         * conf/common.rmk (pkgdata_MODULES): Add `hfsplus.mod'.
7992         (hfsplus_mod_SOURCES): New variable.
7993         (hfsplus_mod_CFLAGS): Likewise.
7994         (hfsplus_mod_LDFLAGS): Likewise.
7995         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/hfsplus.c'.
7996         (grub_setup_SOURCES): Likewise.
7997         (grub_mkdevicemap_SOURCES): Likewise.
7998         (grub_emu_SOURCES): Likewise.
7999         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8001         * fs/fshelp.c (grub_fshelp_log2blksize): New function.
8003         * include/grub/fshelp.h (grub_fshelp_log2blksize): new prototype.
8005 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
8007         * DISTLIST: Added geninitheader.sh, geninit.sh, commands/test.c,
8008         commands/i386/pc/play.c, conf/common.mk, conf/common.rmk,
8009         include/grub/parser.h, include/grub/script.h, kern/parser.c,
8010         kern/sparc64/cache.S, normal/execute.c, normal/function.c,
8011         normal/lexer.c, normal/parser.y, normal/script.c, and
8012         partmap/gpt.c.
8013         Removed kern/sparc64/cache.c.
8015         * conf/common.rmk (DISTCLEANFILES): Added grub_script.tab.c,
8016         grub_script.tab.h, grub_modules_init.lst, grub_modules_init.h,
8017         grub_emu_init.c.
8019         * configure.ac (AC_INIT): Bumped to 1.92.
8021 2005-12-24  Vesa Jaaskelainen  <chaac@nic.fi>
8023         * kern/err.c (grub_error_push): Added new function to support error
8024         stacks.
8025         (grub_error_pop): Likewise.
8026         (grub_error_stack_items): New local variable to support error stacks.
8027         (grub_error_stack_pos): Likewise.
8028         (grub_error_stack_assert): Likewise.
8029         (GRUB_ERROR_STACK_SIZE): Added new define to configure maximum error
8030         stack depth.
8031         (grub_print_error): Added support to print errors from error stack.
8033         * include/grub/err.h (grub_error_push): Added function prototype.
8034         (grub_error_pop): Likewise.
8036 2005-12-09  Hollis Blanchard  <hollis@penguinppc.org>
8038         * configure.ac: Accept `powerpc64' as host_cpu.
8039         (amd64): Rename to `biarch32'.
8041         * kern/powerpc/cache.S (grub_arch_sync_caches): Handle
8042         non-cacheline-aligned addresses.
8044         * kern/dl.c (grub_dl_load_core): Add grub_dprintf messages.
8045         (grub_dl_flush_cache): Likewise.  Only call `grub_arch_sync_caches'
8046         if `size' is non-zero.
8048 2005-12-03  Marco Gerards  <mgerards@xs4all.nl>
8050         * conf/common.rmk (grub_modules_init.lst): Use `-printf "%P\n"'
8051         and `cd' to make sure the filename is not prefixed with a
8052         directory name.
8053         (pkgdata_MODULES): Add `gpt.mod'.
8054         (gpt_mod_SOURCES): New variable.
8055         (gpt_mod_CFLAGS): Likewise.
8056         (gpt_mod_LDFLAGS): Likewise.
8058         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/gpt.c'.
8060         * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_GPT_DISK):
8061         New macro.
8063         * partmap/gpt.c: New file.
8065         * partmap/pc.c (pc_partition_map_iterate): Don't continue when a
8066         GPT partition map is detected.
8068 2005-12-03  Vincent Pelletier  <subdino2004@yahoo.fr>
8070         * commands/i386/pc/play.c: New file.
8071         * conf/i386-pc.rmk (pkgdata_MODULES): Added play.mod.
8072         (play_mod_SOURCES, play_mod_CFLAGS, play_mod_LDFLAGS): New
8073         macros.
8075 2005-11-27  Marco Gerards  <mgerards@xs4all.nl>
8077         * include/grub/dl.h (GRUB_MOD_INIT): Use `__attribute__
8078         ((unused))' to silence gcc warning.
8080 2005-11-26  Hollis Blanchard  <hollis@penguinppc.org>
8082         * configure.ac: Correct `AC_PROG_YACC' test.
8084 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
8086         * util/powerpc/ieee1275/grub-install.in: Run the mount point
8087         check before installing files.
8089 2005-11-22  Mike Small  <smallm@panix.com>
8091         * util/powerpc/ieee1275/grub-install.in (grubdir): Fixed partition
8092         number regex so multidigit numbers are recognized correctly.
8094 2005-11-22  Mike Small  <smallm@panix.com>
8096         * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Add a
8097         debugging message before attempting to claim memory.
8098         (grub_rescue_cmd_initrd): Add a claim debugging message and try
8099         multiple addresses in case of failure.
8101 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
8103         * term/tparm.c (get_space): Remove empty `if' statement.
8105         * fs/ufs.c (grub_ufs_find_file): Remove `grub_le_to_cpu32'.
8107         * kern/parser.c (check_varstate): Rename `state' to 's'.
8109 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
8111         * partmap/acorn.c: Change `unsigned' to `unsigned int'.  Move all
8112         variable definitions to the beginning of each function.  Sort stack
8113         variables by size.
8114         (find): Rename to `acorn_partition_map_find'.  Cast `grub_disk_read'
8115         `buf' argument to `char *'.
8117 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
8119         * conf/powerpc-ieee1275.rmk: Include conf/common.mk.
8120         (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
8121         minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
8122         hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
8123         help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
8124         sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
8125         configfile.mod, search.mod, gzio.mod and test.mod.
8126         (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
8127         (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
8128         (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
8129         (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
8130         (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
8131         (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
8132         (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
8133         (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
8134         (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
8135         (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
8136         (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
8137         (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
8138         (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
8139         (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
8140         (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
8141         (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
8142         (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
8143         (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
8144         (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
8145         (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
8146         (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
8147         (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
8148         (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Removed.
8150         * conf/common.mk (grub_modules_init.lst): Use `find' instead of
8151         `grep --include'.
8152         (pkgdata_MODULES): Add test.mod.
8154 2005-11-18  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
8156         * genmk.rb: Fixed list rules moved to Makefile.in.  Recognise
8157         appending to variables with "+=".
8158         (PModule): Use full pathname to generate *.lst filenames.
8160         * Makefile.in: Fixed list rules moved from genmk.rb.
8161         (.DELETE_ON_ERROR): New special target.
8162         (RMKFILES): Add common.rmk and sparc64-ieee1275.rmk.
8164         * conf/i386-pc.rmk: Include conf/common.mk.
8165         (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
8166         minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
8167         hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
8168         help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
8169         sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
8170         configfile.mod, search.mod, gzio.mod and test.mod.
8171         (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
8172         (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
8173         (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
8174         (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
8175         (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
8176         (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
8177         (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
8178         (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
8179         (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
8180         (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
8181         (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
8182         (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
8183         (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
8184         (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
8185         (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
8186         (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
8187         (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
8188         (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
8189         (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
8190         (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
8191         (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
8192         (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
8193         (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Move from
8194         here...
8195         * conf/common.rmk: ... to here.  New file.
8197         * conf/common.mk: New file.
8199 2005-11-18  Yoshinori K. Okuji  <okuji@enbug.org>
8201         * conf/powerpc-ieee1275.rmk (grub_script.tab.h): Unified to ...
8202         (grub_script.tab.c): ... here.
8204         * conf/sparc64-ieee1275.rmk (grub_script.tab.h): Unified to ...
8205         (grub_script.tab.c): ... here.
8207         * conf/i386-pc.rmk (grub_script.tab.h): Unified to ...
8208         (grub_script.tab.c): ... here.
8210         * normal/command.c (grub_command_find): Fixed a memory leak of
8211         MODULE_NAME. Reported by Mike Small <smallm@panix.com>.
8213 2005-11-13  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
8215         * include/grub/symbol.h: (FUNCTION): Use double quotes instead of
8216         "@" which marks the start of a comment on ARM.
8217         (VARIABLE): Likewise.
8219 2005-11-13  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
8221         Add support for Linux/ADFS partition tables.
8223         * partmap/acorn.c: New file.
8225         * include/grub/acorn_filecore.h: Likewise.
8227         * DISTLIST: Added `partmap/acorn.c' and
8228         `include/grub/acorn_filecore.h'.
8230         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
8231         `partmap/acorn.c'.
8232         (pkgdata_MODULES): Add `acorn.mod'.
8233         (acorn_mod_SOURCES): New variable.
8234         (acorn_mod_CFLAGS): Likewise.
8236         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
8237         `partmap/acorn.c'.
8238         (pkgdata_MODULES): Add `acorn.mod'.
8239         (acorn_mod_SOURCES): New variable.
8240         (acorn_mod_CFLAGS): Likewise.
8242         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/acorn.c'.
8243         (pkgdata_MODULES): Add `acorn.mod'.
8244         (acorn_mod_SOURCES): New variable.
8245         (acorn_mod_CFLAGS): Likewise.
8246         (acorn_mod_LDFLAGS): Likewise.
8248         * include/types.h (grub_disk_addr_t): New typedef.
8250 2005-11-13  Marco Gerards  <mgerards@xs4all.nl>
8252         * geninit.sh: New file.
8254         * geninitheader.sh: Likewise.
8256         * commands/boot.c (grub_boot_init, grub_boot_fini): Removed.
8257         * commands/cat.c (grub_cat_init, grub_cat_fini): Likewise.
8258         * commands/cmp.c (grub_cmp_init, grub_cmp_fini): Likewise.
8259         * commands/configfile.c (grub_configfile_init)
8260         (grub_configfile_fini): Likewise.
8261         * commands/default.c (grub_default_init, grub_default_fini):
8262         Likewise.
8263         * commands/help.c (grub_help_init, grub_help_fini): Likewise.
8264         * commands/ls.c (grub_ls_init, grub_ls_fini): Likewise.
8265         * commands/search.c (grub_search_init, grub_search_fini): Likewise.
8266         * commands/terminal.c (grub_terminal_init, grub_terminal_fini):
8267         Likewise.
8268         * commands/test.c (grub_test_init, grub_test_fini): Likewise.
8269         * commands/timeout.c (grub_timeout_init, grub_timeout_fini):
8270         Likewise.
8271         * commands/i386/pc/halt.c (grub_halt_init, grub_halt_fini): Likewise.
8272         * commands/ieee1275/halt.c (grub_halt_init, grub_halt_fini):
8273         Likewise.
8274         * commands/i386/pc/reboot.c (grub_reboot_init, grub_reboot_fini):
8275         Likewise.
8276         * commands/ieee1275/reboot.c (grub_reboot_init, grub_reboot_fini):
8277         Likewise.
8278         * disk/loopback.c (grub_loop_init, grub_loop_fini): Likewise.
8279         * fs/affs.c (grub_affs_init, grub_affs_fini): Likewise.
8280         * fs/ext2.c (grub_ext2_init, grub_ext2_fini): Likewise.
8281         * fs/fat.c (grub_fat_init, grub_fat_fini): Likewise.
8282         * fs/hfs.c (grub_hfs_init, grub_hfs_fini): Likewise.
8283         * fs/iso9660.c (grub_iso9660_init, grub_iso9660_fini): Likewise.
8284         * fs/jfs.c (grub_jfs_init, grub_jfs_fini): Likewise.
8285         * fs/minix.c (grub_minix_init, grub_minix_fini): Likewise.
8286         * fs/sfs.c (grub_sfs_init, grub_sfs_fini): Likewise.
8287         * fs/ufs.c (grub_ufs_init, grub_ufs_fini): Likewise.
8288         * fs/xfs.c (grub_xfs_init, grub_xfs_fini): Likewise.
8289         * normal/main.c (grub_normal_init, grub_normal_fini): Likewise.
8290         * partmap/amiga.c (grub_amiga_partition_map_init)
8291         (grub_amiga_partition_map_fini): Likewise.
8292         * partmap/apple.c (grub_apple_partition_map_init)
8293         (grub_apple_partition_map_fini): Likewise.
8294         * partmap/pc.c (grub_pc_partition_map_init)
8295         (grub_pc_partition_map_fini): Likewise.
8296         * partmap/sun.c (grub_sun_partition_map_init,
8297         grub_sun_partition_map_fini): Likewise.
8298         * term/terminfo.c (grub_terminal_init, grub_terminal_fini):
8299         Likewise.
8301         * util/grub-emu.c: Include <grub_modules_init.h>.
8302         (main): Don't initialize and de-initialize any modules directly,
8303         use `grub_init_all' and `grub_fini_all' instead.
8305         * term/i386/pc/vesafb.c (grub_vesafb_init): Renamed to
8306         `grub_vesafb_mod_init'.
8307         (grub_vesafb_fini): Renamed to `grub_vesafb_mod_fini'.  Updated
8308         all users.
8309         * term/i386/pc/vga.c (grub_vga_init): Renamed to
8310         `grub_vga_mod_init'.  Updated all users.
8311         (grub_vga_fini): Renamed to `grub_vga_mod_fini'.
8313         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `grub_emu_init.c'.
8314         (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c): New
8315         rules.
8317         * include/grub/dl.h (GRUB_MOD_INIT): Add argument `name'.
8318         Generate a function to initialize the module in utilities.
8319         Updated all callers.
8320         (GRUB_MOD_FINI): Add argument `name'.  Generate a function to
8321         initialize the module in utilities.  Updated all callers.
8323 2005-11-09  Hollis Blanchard  <hollis@penguinppc.org>
8325         * term/ieee1275/ofconsole.c (grub_ofconsole_cls): Use both the ANSI
8326         escape sequence and a literal ^L to clear the screen.
8328         * commands/ieee1275/suspend.c (grub_cmd_suspend): Clear the screen
8329         when returning from Open Firmware.
8331 2005-11-09  Hollis Blanchard  <hollis@penguinppc.org>
8333         * term/ieee1275/ofconsole.c (grub_ofconsole_width): New variable.
8334         (grub_ofconsole_height): Likewise.
8335         (grub_ofconsole_putchar): If `grub_curr_x' exceeds console width,
8336         manually insert a '\n'.
8337         (grub_ofconsole_getwh): Set and return `grub_ofconsole_width' and
8338         `grub_ofconsole_height'.  Return early if these are already set.
8340 2005-11-07  Vincent Pelletier  <subdino2004@yahoo.fr>
8342         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
8343         `commands/test.c', `fs/affs.c', `fs/sfs.c', `fs/xfs.c',
8344         `normal/execute.c', `normal/lexer.c', `io/gzio.c',
8345         `kern/parser.c', `grub_script.tab.c', `normal/function.c'
8346         and `normal/script.c'.
8347         (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
8348         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
8349         (test_mod_SOURCES): New variable.
8350         (test_mod_CFLAGS): Likewise.
8351         (test_mod_LDFLAGS): Likewise.
8352         (pkgdata_MODULES): Add `test.mod'.
8353         (grub_script.tab.c): New rule.
8354         (grub_script.tab.h): Likewise.
8356 2005-11-07  Marco Gerards  <mgerards@xs4all.nl>
8358         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
8359         `commands/test.c', `normal/execute.c', `normal/lexer.c',
8360         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
8361         (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
8362         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
8363         (test_mod_SOURCES): New variable.
8364         (test_mod_CFLAGS): Likewise.
8365         (pkgdata_MODULES): Add `test.mod'.
8366         (grub_script.tab.c): New rule.
8367         (grub_script.tab.h): Likewise.
8369 2005-11-06  Marco Gerards  <mgerards@xs4all.nl>
8371         Add initial scripting support.
8373         * commands/test.c: New file.
8374         * include/grub/script.h: Likewise.
8375         * normal/execute.c: Likewise.
8376         * normal/function.c: Likewise.
8377         * normal/lexer.c: Likewise.
8378         * normal/parser.y: Likewise.
8379         * normal/script.c: Likewise.
8381         * configure.ac: Add `AC_PROG_YACC' test.
8383         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/test.c',
8384         `normal/execute.c', `normal/lexer.c', `grub_script.tab.c',
8385         `normal/function.c' and `normal/script.c'.
8386         (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
8387         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
8388         (test_mod_SOURCES, test_mod_CFLAGS, test_mod_LDFLAGS): New
8389         variables.
8390         (pkgdata_MODULES): Add `test.mod'.
8391         (grub_script.tab.c): New rule.
8392         (grub_script.tab.h): Likewise.
8394         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TEST_FAILURE'.
8396         * include/grub/normal.h (grub_test_init): New prototype.
8397         (grub_test_fini): Likewise.
8399         * normal/command.c: Include <grub/script.h>.
8400         (grub_command_execute): Rewritten.
8402         * util/grub-emu.c (main): Call `grub_test_init' and
8403         `grub_test_fini'.
8405 2005-11-03  Hollis Blanchard  <hollis@penguinppc.org>
8407         * kern/powerpc/ieee1275/init.c (grub_get_rtc): Initialize `msecs'
8408         to 0.
8409         * term/ieee1275/ofconsole.c (grub_ofconsole_checkkey): Return -1 if
8410         there are no pending characters.
8412 2005-11-03  Hollis Blanchard  <hollis@penguinppc.org>
8414         * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_get_devname): Use
8415         `grub_strndup' to drop device arguments. Replace unnecessary
8416         `grub_strndup' with `grub_strdup'.
8418 2005-11-03  Hollis Blanchard  <hollis@penguinppc.org>
8420         * kern/term.c (grub_cls): Do not call grub_cur_term->cls() if the
8421         `debug' environment variable has been set.
8423 2005-11-02  Hollis Blanchard  <hollis@penguinppc.org>
8425         * Makefile.in (install-local): Use $(DATA).
8426         (uninstall): Likewise.
8427         * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Move grub-mkimage...
8428         (sbin_UTILITIES): ... to here.
8429         (sbin_SCRIPTS): New variable.
8430         (grub_install_SOURCES): New variable.
8431         * util/powerpc/ieee1275/grub-install.in: New file.
8432         * util/powerpc/ieee1275/grub-mkimage.c (kernel_path): Remove
8433         variable.
8434         (add_segments): Call `grub_util_get_path'.
8436 2005-10-28  Yoshinori K. Okuji  <okuji@enbug.org>
8438         From Timothy Baldwin:
8439         * commands/ls.c (grub_ls_list_files): Close FILE with
8440         grub_file_close.
8441         * kern/misc.c (grub_vsprintf): Terminate the string S with NUL.
8443 2005-10-24  Marco Gerards  <mgerards@xs4all.nl>
8445         * include/grub/parser.h: New file.
8447         * kern/parser.c: Likewise.
8449         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/parser.c'.
8450         (grub_setup_SOURCES): Likewise.
8451         (grub_probefs_SOURCES): Likewise.
8452         (grub_emu_SOURCES): Likewise.
8453         (kernel_img_HEADERS): Add `parser.h'.
8455         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
8456         (grub_emu_SOURCES): Add `kern/parser.c'.
8457         (grubof_SOURCES): Likewise.
8459         * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
8460         (grubof_SOURCES): Add `kern/parser.c'.
8462         * include/grub/misc.h (grub_split_cmdline): Removed prototype.
8464         * kern/misc.c (grub_split_cmdline): Removed function.
8466         * kern/rescue.c: Include <grub/parser.h>.
8467         (grub_enter_rescue_mode): Use `grub_parser_split_cmdline' instead
8468         of `grub_split_cmdline'.
8470         * normal/command.c: Include <grub/parser.h>.
8471         (grub_command_execute):  Use `grub_parser_split_cmdline' instead
8472         of `grub_split_cmdline'.
8474         * normal/completion.c: Include <grub/parser.h>.
8475         (cmdline_state): New variable.
8476         (iterate_dir): End the filename with a quote depending on the
8477         command line state.
8478         (get_state): new function.
8479         (grub_normal_do_completion): Use `grub_parser_split_cmdline' to
8480         split the arguments and determine the current argument.  When the
8481         argument string is not quoted, escape all spaces.
8483 2005-10-23  Vincent Pelletier  <subdino2004@yahoo.fr>
8485         * normal/sparc64/setjmp.S: New file.
8487 2005-10-23  Vincent Pelletier  <subdino2004@yahoo.fr>
8489         * include/grub/sparc64/libgcc.h: New file.
8490         * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Remove -Av9.
8491         (normal_mod_SOURCES): Use normal/sparc64/setjmp.S instead of
8492         normal/sparc64/setjmp.c.
8494 2005-10-23  Vincent Pelletier  <subdino2004@yahoo.fr>
8496         * kern/sparc64/dl.c: Rewritten for SPARCV9 ELF.
8497         * kern/sparc64/cache.S: New file.
8498         * kern/sparc64/cache.c: Removed.
8499         * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Add -Av9.
8500         (COMMON_CFLAGS): Add -mno-app-regs.  Remove -mcpu=v9 and
8501         -mtune=ultrasparc.
8502         (COMMON_LDFLAGS): Add -melf64_sparc.
8503         (grubof_HEADERS): Add sparc64/libgcc.h and machine/kernel.h.
8504         (grubof_SOURCES): Use cache.S instead of cache.c.
8505         (grubof_LDFLAGS): Add -mno-app-regs.  Replace "-Xlinker
8506         --oformat -Xlinker elf64-sparc" by "-Bstatic,-melf64_sparc".
8507         (pkgdata_MODULES): Uncomment. Leave linux.mod and _linux.mod
8508         commented though.
8509         (normal_mod_SOURCES): Add normal/completion.c and normal/misc.c.
8510         (_linux_mod_SOURCES, _linux_mod_CFLAGS, linux_mod_SOURCES)
8511         (linux_mod_CFLAGS): Commented out.
8512         (_linux_mod_LDFLAGS, linux_mod_LDFLAGS): New macro, commented
8513         out because module isn't built.
8514         (fshelp_mod_LDFLAGS, fat_mod_LDFLAGS, ext2_mod_LDFLAGS)
8515         (ufs_mod_LDFLAGS, minix_mod_LDFLAGS, hfs_mod_LDFLAGS)
8516         (jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS, normal_mod_LDFLAGS)
8517         (hello_mod_LDFLAGS, boot_mod_LDFLAGS, terminal_mod_LDFLAGS)
8518         (ls_mod_LDFLAGS, cmp_mod_LDFLAGS, cat_mod_LDFLAGS)
8519         (font_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
8520         (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
8521         (suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS)
8522         (help_mod_LDFLAGS, default_mod_LDFLAGS, timeout_mod_LDFLAGS)
8523         (configfile_mod_LDFLAGS, search_mod_LDFLAGS, xfs_mod_SOURCES)
8524         (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
8525         (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
8526         (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, gzio_mod_SOURCES)
8527         (gzio_mod_CFLAGS, gzio_mod_LDFLAGS): New macro.
8529 2005-10-20  Yoshinori K. Okuji  <okuji@enbug.org>
8531         * util/i386/pc/grub-probefs.c (main): Call grub_xfs_init and
8532         grub_xfs_fini. Do not call grub_hfs_init or grub_hfs_fini any
8533         longer, because HFS should not be used on PC.
8535 2005-10-20  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
8537         * io/gzio.c (grub_gzio_read): Use OFFSET instead of FILE->OFFSET
8538         consistently within the loop.
8540 2005-10-15  Marco Gerards  <mgerards@xs4all.nl>
8542         * fs/xfs.c (grub_xfs_iterate_dir): Detect an error if part of a
8543         directory can not be read.
8545 2005-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
8547         * configure.ac (AC_INIT): Increase the version number to 1.91.
8549         * DISTLIST: Added include/grub/terminfo.h, include/grub/tparm.h,
8550         include/grub/i386/pc/serial.h, term/terminfo.c, term/tparm.c and
8551         term/i386/pc/serial.c.
8553 2005-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
8555         * kern/file.c (grub_file_seek): Seeking to an offset equal to a
8556         file size must be permitted.
8558         * kern/i386/pc/startup.S (multiboot_trampoline): Fix a mistake
8559         between %ah and %al.
8561 2005-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
8563         * fs/xfs.c (grub_xfs_iterate_dir): Change the type of BLK to
8564         grub_uint64_t.
8565         Call the hook with a NUL-terminated filename.
8566         (grub_xfs_mount): Use grub_be_to_cpu32 instead of
8567         grub_cpu_to_be32.
8569         * kern/term.c (cursor_state): New variable.
8570         (grub_term_set_current): Reset the cursor state on a new
8571         terminal.
8572         (grub_setcursor): Rewritten to use CURSOR_STATE.
8573         (grub_getcursor): New function.
8575         * include/grub/term.h (grub_getcursor): New prototype.
8577         * io/gzio.c (test_header): Align BUF for accessing it as 32-bit
8578         integers on ARM. Reported by Timothy Baldwin
8579         <T.E.Baldwin99@members.leeds.ac.uk>.
8581 2005-10-11  Marco Gerards  <mgerards@xs4all.nl>
8583         * fs/sfs.c (grub_sfs_open): Don't free `data->label' if it is not
8584         allocated.
8585         (grub_sfs_dir): Likewise.
8587 2005-10-09  Marco Gerards  <mgerards@xs4all.nl>
8589         Add support for the SFS filesystem.
8591         * fs/sfs.c: New file.
8593         * DISTLIST: Added `fs/sfs.c'.
8595         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/sfs.c'.
8596         (grub_probefs_SOURCES): Likewise.
8597         (grub_emu_SOURCES): Likewise.
8598         (pkgdata_MODULES): Add `sfs.mod'.
8599         (sfs_mod_SOURCES): New variable.
8600         (sfs_mod_CFLAGS): Likewise.
8601         (sfs_mod_LDFLAGS): Likewise.
8603         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/sfs.c'.
8604         (pkgdata_MODULES): Add `sfs.mod'.
8605         (sfs_mod_SOURCES): New variable.
8606         (sfs_mod_CFLAGS): Likewise.
8608         * util/grub-emu.c (main): Call `grub_sfs_init' and
8609         `grub_sfs_fini'.
8611         * include/grub/fs.h (grub_sfs_init): New prototype.
8612         (grub_sfs_fini): Likewise.
8614 2005-10-07  Marco Gerards  <mgerards@xs4all.nl>
8616         Add support for the AFFS filesystem.
8618         * fs/affs.c: New file.
8620         * DISTLIST: Added `fs/affs.c'.
8622         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/affs.c'.
8623         (grub_probefs_SOURCES): Likewise.
8624         (grub_emu_SOURCES): Likewise.
8625         (pkgdata_MODULES): Add `affs.mod'.
8626         (affs_mod_SOURCES): New variable.
8627         (affs_mod_CFLAGS): Likewise.
8628         (affs_mod_LDFLAGS): Likewise.
8630         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/affs.c'.
8631         (pkgdata_MODULES): Add `affs.mod'.
8632         (affs_mod_SOURCES): New variable.
8633         (affs_mod_CFLAGS): Likewise.
8635         * util/grub-emu.c (main): Call `grub_affs_init' and
8636         `grub_affs_fini'.
8638         * include/grub/fs.h (grub_affs_init): New prototype.
8639         (grub_affs_fini): Likewise.
8641 2005-10-01  Marco Gerards  <mgerards@xs4all.nl>
8643         * fs/xfs.c (grub_xfs_iterate_dir): Add parentheses.
8645 2005-10-01  Marco Gerards  <mgerards@xs4all.nl>
8647         * configure.ac: Accept `x86_64' as host_cpu.  In that case add
8648         `-m32' to CFLAGS.
8650         * genmk.rb (class PModule): Always use `$(#{prefix}_LDFLAGS)' when
8651         linking.
8653         * conf/i386-pc.rmk (COMMON_CFLAGS): Add `-m32'.
8654         (COMMON_LDFLAGS): New variable.
8655         (kernel_img_LDFLAGS): Include `COMMON_FLAGS'.
8656         (_chain_mod_LDFLAGS, fshelp_mod_LDFLAGS, fat_mod_LDFLAGS)
8657         (ext2_mod_LDFLAGS, ufs_mod_LDFLAGS, minix_mod_LDFLAGS)
8658         (hfs_mod_LDFLAGS, jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS)
8659         (xfs_mod_LDFLAGS, _linux_mod_LDFLAGS, linux_mod_LDFLAGS)
8660         (normal_mod_LDFLAGS, hello_mod_LDFLAGS, boot_mod_LDFLAGS)
8661         (terminal_mod_LDFLAGS, ls_mod_LDFLAGS, cmp_mod_LDFLAGS)
8662         (cat_mod_LDFLAGS, help_mod_LDFLAGS, reboot_mod_LDFLAGS)
8663         (halt_mod_LDFLAGS, vga_mod_LDFLAGS, font_mod_LDFLAGS)
8664         (terminfo_mod_LDFLAGS, serial_mod_LDFLAGS, _multiboot_mod_LDFLAGS)
8665         (multiboot_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
8666         (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
8667         (default_mod_LDFLAGS, timeout_mod_LDFLAGS, configfile_mod_LDFLAGS)
8668         (vbe_mod_LDFLAGS, vesafb_mod_LDFLAGS, vbeinfo_mod_LDFLAGS)
8669         (vbetest_mod_LDFLAGS, search_mod_LDFLAGS, gzio_mod_LDFLAGS): New
8670         variables.
8671         (normal_mod_ASFLAGS): Add `-m32'.
8673         * include/grub/types.h (grub_host_addr_t, grub_host_off_t)
8674         (grub_host_size_t, grub_host_ssize_t): New types.
8675         (grub_addr_t, grub_off_t, grub_size_t, grub_ssize_t): Make type
8676         dependent of `GRUB_CPU_SIZEOF_VOID_P' instead on
8677         `GRUB_HOST_SIZEOF_VOID_P'.
8679         * include/grub/kernel.h (struct grub_module_header): Type of
8680         member offset changed to `grub_host_off_t'.  Type of member size
8681         changed to `grub_host_size_t'.
8682         (struct grub_module_info): Type of member offset changed to
8683         `grub_host_off_t'.  Type of member size changed to
8684         `grub_host_size_t'.
8686 2005-09-29  Yoshinori K. Okuji  <okuji@enbug.org>
8688         Make GRUB's kernel compliant to Multiboot Specification.
8690         * kern/i386/pc/startup.S (multiboot_header): New label.
8691         (multiboot_entry): Likewise.
8692         (multiboot_trampoline): Likewise.
8694         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
8695         Increased to 0x4A0.
8697         * fs/xfs.c (grub_xfs_iterate_dir): Fix a syntax error. You may not
8698         put parentheses after a question mark.
8699         [!GRUB_UTIL] (my_mod): New variable.
8701         * util/grub-emu.c (main): Call grub_xfs_init and grub_xfs_fini.
8703 2005-09-28  Marco Gerards  <mgerards@xs4all.nl>
8705         Adds support for the XFS filesystem.  Btrees are not supported
8706         yet.
8708         * fs/xfs.c: New file.
8710         * DISTLIST: Added `fs/xfs.c'.
8712         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/xfs.c'.
8713         (grub_probefs_SOURCES): Likewise.
8714         (grub_emu_SOURCES): Likewise.
8715         (pkgdata_MODULES): Add `xfs.mod'.
8716         (xfs_mod_SOURCES): New variable.
8717         (xfs_mod_CFLAGS): Likewise.
8719         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/xfs.c'.
8720         (pkgdata_MODULES): Add `xfs.mod'.
8721         (xfs_mod_SOURCES): New variable.
8722         (xfs_mod_CFLAGS): Likewise.
8724         * util/grub-emu.c (main): Call `grub_xfs_init' and
8725         `grub_xfs_fini'.
8727         * include/grub/fs.h (grub_xfs_init): New prototype.
8728         (grub_xfs_fini): Likewise.
8731 2005-09-18  Vesa Jaaskelainen  <chaac@nic.fi>
8733         * video/i386/pc/vbe.c (grub_vbe_set_video_mode): In indexed
8734         color modes, allow greater than 16 colors to be configured as
8735         a default palette.
8737 2005-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
8739         * normal/completion.c (complete_arguments): Add the qualifier
8740         const into OPTIONS.
8742         From Omniflux <omniflux+lists@omniflux.com>:
8743         * include/grub/terminfo.h: New file.
8744         * include/grub/tparm.h: Likewise.
8745         * include/grub/i386/pc/serial.h: Likewise.
8746         * term/terminfo.c: Likewise.
8747         * term/tparm.c: Likewise.
8748         * term/i386/pc/serial.c: Likewise.
8749         * conf/i386-pc.rmk (pkgdata_MODULES): Added terminfo.mod and
8750         serial.mod.
8751         (terminfo_mod_SOURCES): New variable.
8752         (terminfo_mod_CFLAGS): Likewise.
8753         (serial_mod_SOURCES): Likewise.
8754         (serial_mod_CFLAGS): Likewise.
8756 2005-08-31  Yoshinori K. Okuji  <okuji@enbug.org>
8758         * DISTLIST: Replaced boot/powerpc/ieee1275/crt0.S and
8759         boot/powerpc/ieee1275/cmain.c with kern/powerpc/ieee1275/crt0.S
8760         and kern/powerpc/ieee1275/cmain.c, respectively.
8762         * boot/powerpc/ieee1275/crt0.S: Moved to ...
8763         * kern/powerpc/ieee1275/crt0.S: ... here.
8765         * boot/powerpc/ieee1275/cmain.c: Moved to ...
8766         * kern/powerpc/ieee1275/cmain.c: ... here.
8768         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Use
8769         kern/powerpc/ieee1275/crt0.S and kern/powerpc/ieee1275/cmain.c
8770         instead of boot/powerpc/ieee1275/crt0.S and
8771         boot/powerpc/ieee1275/cmain.c, respectively.
8773         * boot/i386/pc/boot.S (lba_mode): Do not store the total number of
8774         sectors. It was not used anyway.
8776 2005-08-30  Hollis Blanchard  <hollis@penguinppc.org>
8778         * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): Fix
8779         `unused parameter' warning.
8781 2005-08-30  Hollis Blanchard  <hollis@penguinppc.org>
8783         * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): New
8784         function.
8785         (grub_ofconsole_term): Specify grub_ofconsole_getcharwidth as
8786         getcharwidth.
8788 2005-08-28  Marco Gerards  <metgerards@student.han.nl>
8790         * include/grub/normal.h (enum grub_completion_type): Added
8791         `GRUB_COMPLETION_TYPE_ARGUMENT'.
8793         * normal/cmdline.c (print_completion): Handle
8794         the `GRUB_COMPLETION_TYPE_ARGUMENT' type.
8795         * normal/menu_entry.c (store_completion): Likewise.
8797         * normal/completion.c (complete_arguments): New function.
8798         (grub_normal_do_completion): Call `complete_arguments' when the
8799         current words start with a dash.
8801 2005-08-27  Marco Gerards  <metgerards@student.han.nl>
8803         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Fix typo (use
8804         `gzio.mod' instead of `io.mod').
8806 2005-08-22  Yoshinori K. Okuji  <okuji@enbug.org>
8808         * gendistlist.sh (EXTRA_DISTFILES): Added genfslist.sh.
8809         (DISTDIRS): Added io and video.
8810         Rewrite the search routine to make an output consistently.
8812         * DISTLIST: Added conf/sparc64-ieee1275.mk,
8813         conf/sparc64-ieee1275.rmk, include/grub/gzio.h,
8814         include/grub/ieee1275/ieee1275.h, include/grub/ieee1275/ofdisk.h,
8815         io/gzio.c, kern/sparc64/cache.c, kern/sparc64/dl.c,
8816         kern/sparc64/ieee1275/init.c, kern/sparc64/ieee1275/openfw.c and
8817         util/powerpc/ieee1275/misc.c.
8819         * include/grub/gzio.h: New file.
8820         * io/gzio.c: Likewise.
8822         * kern/file.c (grub_file_close): Call grub_device_close only if
8823         FILE->DEVICE is not NULL.
8825         * include/grub/mm.h [!NULL] (NULL): New macro.
8827         * include/grub/err.h (GRUB_ERR_BAD_GZIP_DATA): New constant.
8829         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added io/gzip.c.
8830         (pkgdata_MODULES): Added gzio.mod.
8831         (gzio_mod_SOURCES): New variable.
8832         (gzio_mod_CFLAGS): Likewise.
8834         * conf/i386-pc.rmk (grub_emu_SOURCES): Added io/gzip.c.
8835         (pkgdata_MODULES): Added gzio.mod.
8836         (gzio_mod_SOURCES): New variable.
8837         (gzio_mod_CFLAGS): Likewise.
8839         * commands/cat.c: Include grub/gzio.h.
8840         (grub_cmd_cat): Use grub_gzfile_open instead of
8841         grub_file_open.
8843         * commands/cmp.c: Include grub/gzio.h.
8844         (grub_cmd_cmp): Use grub_gzfile_open instead of
8845         grub_file_open.
8847         * loader/i386/pc/multiboot.c: Include grub/gzio.h.
8848         (grub_rescue_cmd_multiboot): Use grub_gzfile_open instead of
8849         grub_file_open.
8850         (grub_rescue_cmd_module): Likewise.
8852 2005-08-21  Vincent Pelletier  <subdino2004@yahoo.fr>
8854         * conf/sparc64-ieee1275.rmk (grubof_SOURCES): The first file must be
8855         kern/sparc64/ieee1275/init.c because it contains _start.
8856         * conf/sparc64-ieee1275.mk: Generated from conf/sparc64-ieee1275.rmk.
8858 2005-08-21  Vincent Pelletier  <subdino2004@yahoo.fr>
8860         * configure.ac: Add support for sparc64 host with ieee1275
8861         firmware.
8862         * configure: Generated from configure.ac.
8863         * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Use grub_ssize_t
8864         instead of int.
8865         (grub_ofdisk_read): Likewise.
8866         (grub_ofdisk_open): Use %p to print pointer values, and cast the
8867         pointers as (void *) to remove a warning.
8868         (grub_ofdisk_close): Likewise.
8869         (grub_ofdisk_read): Likewise.
8870         * kern/ieee1275/ieee1275.c (grub_ieee1275_exit): This never
8871         returns, so make it return void to remove a warning.
8872         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_exit):
8873         Corresponding prototype change.
8874         * kern/mm.c (grub_mm_init_region): Use %p to print pointer
8875         values, and cast the pointers as (void *) to remove a warning.
8876         (grub_mm_dump): Likewise.
8877         * conf/sparc64-ieee1275.mk: New file.
8878         * conf/sparc64-ieee1275.rmk: Likewise.
8879         * include/grub/sparc64/setjmp.h: Likewise.
8880         * include/grub/sparc64/types.h: Likewise.
8881         * include/grub/sparc64/ieee1275/console.h: Likewise.
8882         * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
8883         * include/grub/sparc64/ieee1275/kernel.h: Likewise.
8884         * include/grub/sparc64/ieee1275/time.h: Likewise.
8885         * kern/sparc64/cache.c: Likewise.
8886         * kern/sparc64/dl.c: Likewise.
8887         * kern/sparc64/ieee1275/init.c: Likewise.
8888         * kern/sparc64/ieee1275/openfw.c: Likewise.
8890 2005-08-21  Yoshinori K. Okuji  <okuji@enbug.org>
8892         * util/console.c (grub_ncurses_putchar): If C is greater than
8893         0x7f, set C to a question mark.
8894         (grub_ncurses_getcharwidth): New function.
8895         (grub_ncurses_term): Specify grub_ncurses_getcharwidth as
8896         getcharwidth.
8898         * normal/menu.c (print_entry): Made aware of Unicode. First,
8899         convert TITLE to UCS-4, and predict the cursor position by
8900         grub_getcharwidth.
8902         * include/grub/misc.h (grub_utf8_to_ucs4): Specify the qualifier
8903         const to SRC.
8904         * kern/misc.c (grub_utf16_to_utf8): Likewise.
8906 2005-08-20  Yoshinori K. Okuji  <okuji@enbug.org>
8908         * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Specify
8909         the boot file by the option BOOT_IMAGE. Use grub_stpcpy instead of
8910         grub_strcat.
8912         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Specify the boot
8913         file by the option BOOT_IMAGE. Use grub_stpcpy instead of
8914         grub_strcpy and grub_strlen. Take it into account that a space
8915         character is inserted as a delimiter.
8917 2005-08-20  Yoshinori K. Okuji  <okuji@enbug.org>
8919         * partmap/pc.c (pc_partition_map_iterate): Include the value of an
8920         invalid magic in the error.
8922         * commands/search.c: New file.
8924         * util/grub-emu.c (main): Call grub_search_init and
8925         grub_search_fini.
8927         * kern/rescue.c (grub_rescue_print_disks): Removed.
8928         (grub_rescue_print_devices): New function.
8929         (grub_rescue_cmd_ls): Use grub_device_iterate with
8930         grub_rescue_print_devices instead of grub_disk_dev_iterate with
8931         grub_rescue_print_disks.
8933         * kern/partition.c (grub_partition_iterate): Return the result of
8934         PARTMAP->ITERATE instead of GRUB_ERRNO.
8936         * kern/device.c: Include grub/partition.h.
8937         (grub_device_iterate): New function.
8939         * include/grub/partition.h (grub_partition_iterate): Return int
8940         instead of grub_err_t.
8942         * include/grub/normal.h [GRUB_UTIL] (grub_search_init): New
8943         prototype.
8944         [GRUB_UTIL] (grub_search_fini): Likewise.
8946         * include/grub/device.h (grub_device_iterate): New prototype.
8948         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
8949         commands/search.c.
8950         (pkgdata_MODULES): Added search.mod.
8951         (search_mod_SOURCES): New variable.
8952         (search_mod_CFLAGS): Likewise.
8954         * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/search.c.
8955         (pkgdata_MODULES): Added search.mod.
8956         (search_mod_SOURCES): New variable.
8957         (search_mod_CFLAGS): Likewise.
8959         * commands/ls.c (grub_ls_list_disks): Renamed to ...
8960         (grub_ls_list_devices): ... this, and use grub_device_iterate.
8961         All callers changed.
8963         * DISTLIST: Added commands/search.c.
8965 2005-08-20  Yoshinori K. Okuji  <okuji@enbug.org>
8967         * kern/term.c (grub_putchar): Use grub_utf8_to_ucs4 for the
8968         conversion.
8969         (grub_getcharwidth): New function.
8971         * kern/misc.c (grub_utf8_to_ucs4): New function.
8973         * include/grub/term.h (struct grub_term): Added a new member
8974         "getcharwidth".
8975         (grub_getcharwidth): New prototype.
8977         * include/grub/misc.h (grub_utf8_to_ucs4): New prototype.
8979         * term/i386/pc/console.c (map_char): New function. Segregated from
8980         grub_console_putchar.
8981         (grub_console_putchar): Use map_char.
8982         (grub_console_getcharwidth): New function.
8983         (grub_console_term): Specified grub_console_getcharwidth as
8984         getcharwidth.
8986         * term/i386/pc/vga.c (grub_vga_getcharwidth): New function.
8987         (grub_vga_term): Specified grub_vga_getcharwidth as getcharwidth.
8989         * term/i386/pc/vesafb.c (grub_virtual_screen_setup): Return
8990         GRUB_ERRNO.
8991         (grub_vesafb_init): Do not use RC. Instead, use GRUB_ERRNO. Rely
8992         on grub_strtoul completely.
8993         (write_char): Declare local variables in the beginning of the
8994         function.
8995         (grub_vesafb_getcharwidth): New function.
8996         (grub_vesafb_term): Specified grub_vesafb_getcharwidth as
8997         getcharwidth.
8999 2005-08-19  Yoshinori K. Okuji  <okuji@enbug.org>
9001         * DISTLIST: Replace commands/i386/pc/vbe_list_modes.c and
9002         commands/i386/pc/vbe_test.c with commands/i386/pc/vbeinfo.c and
9003         commands/i386/pc/vbetest.c.
9005         * video/i386/pc/vbe.c (grub_vbe_probe): If INFOBLOCK is not NULL,
9006         call grub_vbe_get_controller_info again, because the returned
9007         information is volatile.
9008         (grub_vbe_set_video_mode): Mostly rewritten.
9009         (grub_vbe_get_video_mode): Use grub_vbe_probe and use
9010         grub_vbe_status_t correctly.
9011         (grub_vbe_get_video_mode_info): Likewise.
9012         (grub_vbe_set_pixel_rgb): Use a switch statement rather than
9013         several if statements.
9015         * commands/i386/pc/vbe_list_modes.c: Renamed to ...
9016         * commands/i386/pc/vbeinfo.c: ... this.
9018         * commands/i386/pc/vbe_test.c: Renamed to ...
9019         * commands/i386/pc/vbetest.c: ... this.
9021         * commands/i386/pc/vbeinfo.c (grub_cmd_vbe_list_modes): Renamed to
9022         ...
9023         (grub_cmd_vbeinfo): ... this. Save video modes before
9024         iterating. Skip a video mode, if it is not available, not enough
9025         information is given or it is monochrome. Show the memory
9026         model. Leave the interpretation of MODEVAR to grub_strtoul
9027         completely.
9028         (GRUB_MOD_INIT): Rename vbe_list_modes to vbeinfo.
9029         (GRUB_MOD_FINI): Likewise.
9031         * commands/i386/pc/vbetest.c (grub_cmd_vbe_test): Renamed to ...
9032         (grub_cmd_vbetest): ... this. Don't print unnecessarily. Use
9033         grub_err_t instead of grub_uint32_t. Don't use SPTR. Remove a
9034         duplicated grub_env_get. Leave the interpretation of MODEVAR to
9035         grub_strtoul completely.
9036         (real2pm): Removed.
9037         (GRUB_MOD_INIT): Rename vbe_test to vbetest.
9038         (GRUB_MOD_FINI): Likewise.
9040         * normal/misc.c: Include grub/mm.h.
9042         * conf/i386-pc.rmk (pkgdata_MODULES): Replaced vbe_test.mod and
9043         vbe_list_modes with vbetest.mod and vbeinfo.mod.
9044         (vbe_list_modes_mod_SOURCES): Removed.
9045         (vbe_list_modes_mod_CFLAGS): Likewise.
9046         (vbe_test_mod_SOURCES): Likewise.
9047         (vbe_test_mod_CFLAGS): Likewise.
9048         (vbeinfo_mod_SOURCES): New variable.
9049         (vbeinfo_mod_CFLAGS): Likewise.
9050         (vbetest_mod_SOURCES): Likewise.
9051         (vbetest_mod_CFLAGS): Likewise.
9053 2005-08-18  Yoshinori K. Okuji  <okuji@enbug.org>
9055         * normal/misc.c: New file.
9057         * DISTLIST: Added normal/misc.c.
9059         * partmap/amiga.c (amiga_partition_map_iterate): Add an argument
9060         DISK to HOOK. Call HOOK with DISK.
9061         * partmap/apple.c (apple_partition_map_iterate): Likewise.
9062         * partmap/pc.c (pc_partition_map_iterate): Likewise.
9063         * partmap/sun.c (sun_partition_map_iterate): Likewise.
9065         * normal/menu_entry.c (struct screen): Added a new member
9066         "completion_shown".
9067         (completion_buffer): New global variable.
9068         (make_screen): Set SCREEN->COMPLETION_SHOWN to zero.
9069         (store_completion): New function.
9070         (complete): Likewise.
9071         (clear_completions): Likewise.
9072         (grub_menu_entry_run): If SCREEN->COMPLETION_SHOWN is non-zero,
9073         call clear_completions and reset SCREEN->COMPLETION_SHOWN. If C is
9074         a tab, call complete.
9076         * normal/completion.c (disk_dev): Removed.
9077         (print_simple_completion): Likewise.
9078         (print_partition_completion): Likewise.
9079         (print_func): New global variable.
9080         (add_completion): Do not take the arguments WHAT or PRINT any
9081         longer. Added a new argument TYPE. Instead of printing directly,
9082         call PRINT_FUNC if not NULL.
9083         All callers changed.
9084         (complete_device): Use a local variable DEV instead of
9085         DISK_DEV. Do not move CURRENT_WORD to the end of a device name.
9086         (grub_normal_do_completion): Take a new argument HOOK. Do not
9087         initialize DISK_DEV. Initialize PRINT_FUNC to HOOK. If RET is an
9088         empty string, return NULL instead.
9089         All callers changed.
9091         * normal/cmdline.c (print_completion): New function.
9093         * kern/partition.c (grub_partition_iterate): Add an argument DISK
9094         to HOOK.
9095         All callers changed.
9097         * kern/disk.c (grub_print_partinfo): Removed.
9099         * include/grub/partition.h (struct grub_partition_map): Add a new
9100         argument DISK into HOOK of ITERATE.
9101         (grub_partition_iterate): Add a new argument DISK to HOOK.
9103         * include/grub/normal.h (enum grub_completion_type): New enum.
9104         (grub_completion_type_t): New type.
9105         (GRUB_COMPLETION_TYPE_COMMAND): New constant.
9106         (GRUB_COMPLETION_TYPE_DEVICE): Likewise.
9107         (GRUB_COMPLETION_TYPE_PARTITION): Likewise.
9108         (GRUB_COMPLETION_TYPE_FILE): Likewise.
9109         (grub_normal_do_completion): Added a new argument HOOK.
9110         (grub_normal_print_device_info): New prototype.
9112         * include/grub/disk.h (grub_print_partinfo): Removed.
9114         * conf/i386-pc.rmk (grub_emu_SOURCES): Added normal/misc.c.
9115         (normal_mod_SOURCES): Likewise.
9116         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9117         (normal_mod_SOURCES): Likewise.
9119         * commands/ls.c (grub_ls_list_disks): Use
9120         grub_normal_print_device_info instead of grub_print_partinfo. Free
9121         PNAME.
9122         (grub_ls_list_files): Use grub_normal_print_device_info instead of
9123         duplicating the code.
9125 2005-08-16  Vesa Jaaskelainen  <chaac@nic.fi>
9127         * commands/i386/pc/vbe_list_modes.c: Update source formatting to
9128         follow GCS more precisely.
9129         * commands/i386/pc/vbe_test.c: Likewise.
9130         * include/grub/i386/pc/vbe.h: Likewise.
9131         * term/i386/pc/vesafb.c: Likewise.
9132         * video/i386/pc/vbe.c: Likewise.
9134 2005-08-16  Vesa Jaaskelainen  <chaac@nic.fi>
9136         * DISTLIST: Added term/i386/pc/vesafb.c
9137         DISTLIST: Added video/i386/pc/vbe.c
9138         DISTLIST: Added commands/i386/pc/vbe_list_modes.c.
9139         DISTLIST: Added commands/i386/pc/vbe_test.c.
9140         * commands/i386/pc/vbe_list_modes.c: New file.
9141         * commands/i386/pc/vbe_test.c: Likewise.
9142         * term/i386/pc/vesafb.c: Likewise.
9143         * video/i386/pc/vbe.c: Likewise.
9144         * include/grub/i386/pc/vbe.h (GRUB_VBE_DEFAULT_VIDEO_MODE): Added define.
9145         (grub_vbe_probe) Added prototype.
9146         (grub_vbe_set_video_mode) Likewise.
9147         (grub_vbe_get_video_mode) Likewise.
9148         (grub_vbe_get_video_mode_info) Likewise.
9149         (grub_vbe_set_pixel_rgb) Likewise.
9150         (grub_vbe_set_pixel_index) Likewise.
9151         * conf/i386-pc.rmk (pkgdata_MODULES): Added vbe.mod.
9152         (pkgdata_MODULES): Added vesafb.mod.
9153         (pkgdata_MODULES): Added vbe_list_modes.mod.
9154         (pkgdata_MODULES): Added vbe_test.mod.
9155         (vbe_mod_SOURCES): Added.
9156         (vbe_mod_CFLAGS): Likewise.
9157         (vesafb_mod_SOURCES): Likewise.
9158         (vesafb_mod_CFLAGS): Likewise.
9159         (vbe_list_modes_mod_SOURCES): Likewise.
9160         (vbe_list_modes_mod_CFLAGS): Likewise.
9161         (vbe_test_mod_SOURCES): Likewise.
9162         (vbe_test_mod_CFLAGS): Likewise.
9164 2005-08-14  Yoshinori K. Okuji  <okuji@enbug.org>
9166         * normal/command.c (grub_command_execute): If INTERACTIVE is
9167         false and GRUB_COMMAND_FLAG_NO_ECHO is not specified, print
9168         CMDLINE. Disable the pager if INTERACTIVE is true.
9169         All callers are changed.
9171         * normal/main.c (grub_normal_execute): Read command.lst and fs.lst
9172         before reading a config file.
9173         * normal/main.c (read_config_file): Even if a command is not
9174         found, register it if it is within an entry.
9176         * util/grub-emu.c: Include sys/types.h and unistd.h.
9177         (options): Added --hold.
9178         (struct arguments): Added a new member "hold".
9179         (parse_opt): If KEY is 'H', set ARGS->HOLD to ARG or -1 if ARG is
9180         missing.
9181         (main): Initialize ARGS.HOLD to zero. Wait until ARGS.HOLD is
9182         cleared by a debugger, if it is not zero.
9184         * include/grub/normal.h (grub_command_execute): Add an argument
9185         INTERACTIVE.
9187 2005-08-14  Vesa Jaaskelainen  <chaac@nic.fi>
9189         * DISTLIST: Added include/grub/i386/pc/vbe.h.
9191 2005-08-13  Yoshinori K. Okuji  <okuji@enbug.org>
9193         * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Replace the test
9194         program with another one, because the old one didn't detect a bug
9195         in gcc-3.4. Always use regparm 2, because the new test is still
9196         not enough for gcc-4.0. Someone must investigate a simple test
9197         case which detects a bug in gcc-4.0.
9199 2005-08-12  Yoshinori K. Okuji  <okuji@enbug.org>
9201         * DISTLIST: Added normal/completion.c.
9203         * normal/completion.c: New file.
9205         * term/i386/pc/console.c (grub_console_getwh): New function.
9206         (grub_console_term): Assign grub_console_getwh to getwh.
9208         * normal/cmdline.c (grub_tab_complete): Removed. Now the same
9209         function is defined in normal/completion.c as
9210         grub_normal_do_completion.
9211         (grub_cmdline_get): Use grub_normal_do_completion instead of
9212         grub_tab_complete.
9214         * kern/partition.c (grub_partition_map_iterate): Return 1 if HOOK
9215         returns non-zero, otherwise return 0.
9216         (grub_partition_iterate): First, probe the partition map. Then,
9217         call ITERATE only for this partition map.
9219         * kern/misc.c (grub_strncmp): Rewritten.
9221         * kern/disk.c (grub_disk_dev_iterate): Return 1 if P->ITERATE
9222         returns non-zero. Otherwise return 0.
9224         * include/grub/partition.h (grub_partition_map_iterate): Return
9225         int instead of void.
9227         * include/grub/normal.h (grub_normal_do_completion): New prototype.
9229         * include/grub/misc.h (grub_strncmp): Change the type of N to
9230         grub_size_t.
9232         * include/grub/disk.h (grub_disk_dev_iterate): Return int instead
9233         of void.
9235         * normal/menu.c (draw_border): Cast GRUB_TERM_BORDER_WIDTH to
9236         unsigned explicitly before comparing it with I.
9238         * kern/main.c (grub_env_write_root): Add the attribute unused into
9239         VAR.
9241         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
9242         normal/completion.c.
9243         (normal_mod_SOURCES): Likewise.
9244         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
9245         (normal_mod_SOURCES): Likewise.
9247         * normal/command.c (grub_iterate_commands): If ITERATE returns
9248         non-zero, return one immediately.
9250 2005-08-09  Vesa Jaaskelainen  <chaac@nic.fi>
9252         * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vbe.h.
9253         * kern/i386/pc/startup.S: Updated Global Descriptor table's
9254         descriptions.
9255         (grub_vbe_get_controller_info): New function.
9256         (grub_vbe_get_mode_info): Likewise.
9257         (grub_vbe_set_mode): Likewise.
9258         (grub_vbe_get_mode): Likewise.
9259         (grub_vbe_set_memory_window): Likewise.
9260         (grub_vbe_get_memory_window): Likewise.
9261         (grub_vbe_set_scanline_length): Likewise.
9262         (grub_vbe_get_scanline_length): Likewise.
9263         (grub_vbe_set_display_start): Likewise.
9264         (grub_vbe_get_display_start): Likewise.
9265         (grub_vbe_set_palette_data): Likewise.
9266         * include/grub/i386/pc/vbe.h: New file.
9268 2005-08-08  Hollis Blanchard  <hollis@penguinppc.org>
9270         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
9271         kern/ieee1275/of.c with kern/ieee1275/ieee1275.c.
9272         * DISTLIST: Likewise.
9273         * kern/ieee1275/of.c: Moved to ...
9274         * kern/ieee1275/ieee1275.c: ... here.
9276 2005-08-08  Hollis Blanchard  <hollis@penguinppc.org>
9278         * term/ieee1275/ofconsole.c: Include <grub/mm.h>.
9279         (grub_ofconsole_getwh): Cast -1 to type grub_ieee1275_ihandle_t.
9280         Pass 0 as `end' parameter to grub_strtoul().
9282 2005-08-08  Hollis Blanchard  <hollis@penguinppc.org>
9284         * include/grub/powerpc/ieee1275/console.h: Do not include
9285         <grub/types.h>.  Do not include <grub/symbol.h>.  Remove ASM_FILE
9286         ifdef.
9287         (grub_console_cur_color): Remove i386-specific prototype.
9288         (grub_console_real_putchar): Likewise.
9289         (grub_console_checkkey): Likewise.
9290         (grub_console_getkey): Likewise.
9291         (grub_console_getxy): Likewise.
9292         (grub_console_gotoxy): Likewise.
9293         (grub_console_cls): Likewise.
9294         (grub_console_setcursor): Likewise.
9295         * kern/powerpc/ieee1275/init.c: Don't include <grub/console.h>.
9296         Include <grub/machine/console.h>.
9297         * term/ieee1275/ofconsole.c: Likewise.
9299 2005-08-08  Yoshinori K. Okuji  <okuji@enbug.org>
9301         * Makefile.in (LIBLZO): New variable.
9303         * configure.ac: Check for LZO version 2.
9305         * util/i386/pc/grub-mkimage.c [HAVE_LZO_LZO1X_H]: Include
9306         lzo/lzo1x.h instead of lzo1x.h.
9308         * conf/i386-pc.rmk (grub_mkimage_LDFLAGS): Use $(LIBLZO) instead
9309         of -llzo.
9311         * util/i386/pc/grub-setup.c (main): Do not free PREFIX
9312         twice. Reported by Vladimir Serbinenko <phcoder@gmail.com>.
9314         * partmap/pc.c (pc_partition_map_probe): Restore P->DATA after
9315         copying the data from PARTITION to P.
9317 2005-08-07  Yoshinori K. Okuji  <okuji@enbug.org>
9319         * kern/rescue.c (grub_rescue_cmd_rmmod): If the reference count is
9320         negative, unload the module.
9322         * util/i386/pc/grub-setup.c (setup): The name of the PC partition
9323         map is "pc_partition_map" but not "pc".
9324         (usage): Fix the description. The options are --boot-image and
9325         --core-image but not --boot-file or --core-file.
9326         (main): If not specified explicitly, make BOOT_FILE and CORE_FILE
9327         based on DEFAULT_BOOT_FILE and DEFAULT_CORE_FILE with DIR or
9328         DEFAULT_DIRECTORY.
9330         * util/i386/pc/grub-install.in: Do not specify --boot-file or
9331         --core-file. Specify INSTALL_DEVICE as an argument.
9333         * util/console.c: Include config.h.
9334         [HAVE_NCURSeS_CURSES_H]: Include ncurses/curses.h.
9335         [HAVE_NCURSES_H]: Include ncurses.h.
9336         [HAVE_CURSES_H]: Include curses.h.
9337         [!A_NORMAL] (A_NORMAL): Defined as zero.
9338         [!A_STANDOUT] (A_STANDOUT): Likewise.
9340         * conf/i386-pc.rmk (grub_emu_LDFLAGS): Use $(LIBCURSES) instead of
9341         -lncurses.
9342         * conf/powerpc-ieee1275.rmk (grub_emu_LDFLAGS): Likewise.
9344         * configure.ac: Check for curses libraries and headers.
9346         * Makefile.in (LIBCURSES): New variable.
9348         * genmk.rb (Script::rule): Set the executable bits.
9350         * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): The
9351         name of the PC partition map is "pc_partition_map" but not "pc".
9353 2005-08-07  Yoshinori K. Okuji  <okuji@enbug.org>
9355         * util/i386/pc/grub-install.in (grub_probefs): New variable.
9356         (modules): Likewise.
9357         (usage): Added descriptions for --modules and --grub-probefs.
9358         Handle --modules and --grub-probefs. Save the arguments in MODULES
9359         and GRUB_PROBEFS, respectively.
9360         Auto-detect a filesystem module against GRUBDIR. If the result is
9361         empty and modules are not specified explicitly, abort the
9362         installation. Add the result to MODULES.
9364         * DISTLIST: Removed boot/powerpc/ieee1275/ieee1275.c,
9365         disk/powerpc/ieee1275/ofdisk.c,
9366         include/grub/powerpc/ieee1275/init.h and
9367         term/powerpc/ieee1275/ofconsole.c.
9368         Added disk/ieee1275/ofdisk.c, kern/ieee1275/of.c and
9369         term/ieee1275/ofconsole.c.
9371         * include/grub/powerpc/ieee1275/console.h: Resurrected.
9373         * COPYING: Upgraded to the latest version. Only the address of the
9374         FSF office has changed.
9376 2005-08-07  Yoshinori K. Okuji  <okuji@enbug.org>
9378         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
9379         kern/ieee1275.c with kern/ieee1275/of.c.
9381         * kern/ieee1275.c: Moved to ...
9382         * kern/ieee1275/of.c: ... here.
9384 2005-08-06  Yoshinori K. Okuji  <okuji@enbug.org>
9386         * conf/i386-pc.rmk (kernel_img_HEADERS): Reordered for
9387         readability.
9389         * config.guess: Updated to the latest version from gnulib.
9390         * config.sub: Likewise.
9391         * install.sh: Likewise.
9392         * mkinstalldirs: Likewise.
9394         * include/grub/console.h: Removed. This file is arch-specific. Do
9395         not put this in include/grub.
9397         * include/grub/i386/pc/console.h: Resurrected.
9399         * util/console.c: Include grub/machine/console.h instead of
9400         grub/console.h.
9401         * util/grub-emu.c: Likewise.
9403 2005-08-04  Marco Gerards  <metgerards@student.han.nl>
9405         * kern/term.c (grub_putcode): Use `grub_getwh' instead of
9406         hardcoded value.
9408         From Vincent Pelletier  <subdino2004@yahoo.fr>
9409         * include/grub/term.h (GRUB_TERM_WIDTH, GRUB_TERM_HEIGHT):
9410         Redefined to use grub_getwh.
9411         (grub_term): New member named getwh.
9412         (grub_getwh): New prototype.
9413         * kern/term.c (grub_getwh): New function.
9414         * term/i386/pc/console.c (grub_console_getwh): New function.
9415         (grub_console_term): New member `getwh'.
9416         * term/i386/pc/vga.c (grub_vga_getwh): New function.
9417         (grub_vga_term): New member `getwh'.
9418         * term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Use
9419         grub_ssize_t.
9420         (grub_ofconsole_getw): New function.
9421         (grub_ofconsole_init): Use grub_ssize_t and unsigned char.
9422         (grub_ofconsole_term): New field named getwh and new initial
9423         value.
9425 2005-08-03  Hollis Blanchard  <hollis@penguinppc.org>
9427         * include/grub/powerpc/ieee1275/ieee1275.h: Move ...
9428         * include/grub/ieee1275/ieee1275.h: ... to here.  All users updated.
9429         Move `abort', `grub_reboot', and `grub_halt' prototypes ...
9430         * include/grub/powerpc/ieee1275/kernel.h: ... to here.
9431         * commands/ieee1275/halt.c: Include <grub/machine/kernel.h> instead
9432         of <grub/machine/ieee1275.h>.
9433         * commands/ieee1275/reboot.c: Likewise.
9434         * boot/powerpc/ieee1275/ieee1275.c: Move ...
9435         * kern/ieee1275.c: ... to here.  All users updated.  Change all
9436         parameter structs to use new type `grub_ieee1275_cell_t'.
9437         * term/powerpc/ieee1275/ofconsole.c: Move ...
9438         * term/ieee1275/ofconsole.c: ... to here.  All users updated.
9439         * disk/powerpc/ieee1275/ofdisk.c: Move ...
9440         * disk/ieee1275/ofdisk.c: ... to here.  All users updated.
9441         * boot/powerpc/ieee1275/cmain.c: Change `grub_ieee1275_entry_fn' type
9442         to return int.
9443         * include/grub/i386/pc/console.h: Move to include/grub/console.h.
9444         Remove unused prototypes.  All users updated.
9445         * include/grub/powerpc/ieee1275/console.h: Removed.
9446         * include/grub/powerpc/ieee1275/ieee1275.h: Define
9447         `grub_ieee1275_cell_t'.
9448         * kern/powerpc/ieee1275/openfw.c: Include <grub/machine/kernel.h>.
9449         Cast comparisons with -1 to the correct type.
9450         * loader/powerpc/ieee1275/linux.c (kernel_entry_t): Change parameter
9451         type to match `grub_ieee1275_entry_fn'.
9453 2005-08-01  Yoshinori K. Okuji  <okuji@enbug.org>
9455         * DISTLIST: Added util/i386/pc/grub-probefs.c.
9457         * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-probefs.
9458         (grub_setup_SOURCES): Removed partmap/amiga.c, partmap/apple.c and
9459         partmap/sun.c.
9460         (grub_probefs_SOURCES): New variable.
9462         * util/i386/pc/grub-probefs.c: New file.
9464         * util/i386/pc/grub-setup.c (main): Call
9465         grub_pc_partition_map_init, grub_ufs_init, grub_minix_init,
9466         grub_hfs_init and grub_jfs_init to initialize the system. Call
9467         grub_ufs_fini, grub_minix_fini, grub_hfs_fini, grub_jfs_init and
9468         grub_pc_partition_map_fini to finish the system.
9470 2005-07-31  Yoshinori K. Okuji  <okuji@enbug.org>
9472         * loader/i386/pc/multiboot.c (grub_multiboot_is_elf32): New
9473         function.
9474         (grub_multiboot_load_elf32): Likewise.
9475         (grub_multiboot_is_elf64): Likewise.
9476         (grub_multiboot_load_elf64): Likewise.
9477         (grub_multiboot_load_elf): Likewise.
9478         (grub_rescue_cmd_multiboot): Call grub_multiboot_load_elf to load
9479         an ELF32 or ELF64 file.
9480         This is based on a patch from Ruslan Nikolaev <nruslan@mail.com>.
9482         From Serbinenko Vladimir <serbinenko.vova@list.ru>:
9483         * kern/disk.c (grub_print_partinfo): Check if FS->LABEL is not
9484         NULL before calling FS->LABEL.
9485         * fs/fat.c (grub_fat_dir): Initialize DIRNAME to NULL.
9486         * commands/ls.c (grub_ls_list_files): Show labels, if possible.
9487         (grub_ls_list_disks): Check if FS and FS->LABEL are not NULL
9488         before calling FS->LABEL.
9490 2005-07-26  Yoshinori K. Okuji  <okuji@enbug.org>
9492         * util/i386/pc/grub-install.in (datadir): New variable.
9493         (libdir): Removed.
9494         (pkgdatadir): New variable.
9495         (pkglibdir): Removed.
9497 2005-07-24  Yoshinori K. Okuji  <okuji@enbug.org>
9499         * DISTLIST: Added util/i386/pc/grub-install.in.
9501         * util/i386/pc/grub-install.in: New file.
9503         * conf/i386-pc.rmk (sbin_SCRIPTS): New variable.
9504         (grub_install_SOURCES): Likewise.
9506         * genmk.rb: Added support for scripts.
9507         (Script): New class.
9508         (scripts): New variable.
9510         * Makefile.in (install-local): Install sbin_SCRIPTS by
9511         INSTALL_SCRIPT.
9512         (uninstall): Remove sbin_SCRIPTS.
9514         * util/i386/pc/grub-setup.c (main): If the argument is not a GRUB
9515         device, try to get a GRUB device by
9516         grub_util_biosdisk_get_grub_dev.
9517         Free DEST_DEV.
9519         * util/i386/pc/grub-mkdevicemap.c (usage): Remove a duplicated
9520         description for --device-map.
9522 2005-07-20  Yoshinori K. Okuji  <okuji@enbug.org>
9524         Change the semantics of variable hooks. They now return strings
9525         instead of error values.
9527         * util/i386/pc/grub-setup.c: Include grub/env.h.
9528         (setup): Use grub_device_set_root instead of grub_env_set.
9530         * kern/rescue.c (grub_rescue_cmd_root): Use grub_env_set and
9531         grub_env_get instead of grub_device_set_root and
9532         grub_device_get_root, respectively.
9534         * kern/main.c (grub_env_write_root): New function.
9535         (grub_set_root_dev): Register grub_env_write_hook for "root". Use
9536         grub_env_set instead of grub_device_set_root.
9538         * kern/env.c (HASHSZ): Reduced to 13, because GRUB does not need
9539         many variables.
9540         (grub_env_set): Set ENV->VALUE to the result of ENV->WRITE_HOOK
9541         rather than calling ENV->WRITE_HOOK afterwards.
9542         (grub_env_get): Return the result of ENV->READ_HOOK rather than
9543         passing a pointer of a pointer.
9544         (grub_register_variable_hook): Change the types of "read_hook" and
9545         "write_hook" to grub_env_read_hook_t and grub_env_write_hook_t,
9546         respectively.
9547         Allocate the default empty string on the heap, because this string
9548         may be freed later.
9550         * kern/device.c: Include grub/env.h.
9551         (grub_device_set_root): Removed.
9552         (grub_device_get_root): Likewise.
9553         (grub_device_open): Use grub_env_get instead of
9554         grub_device_get_root.
9556         * include/grub/env.h (grub_env_read_hook_t): New type.
9557         (grub_env_write_hook_t): Likewise.
9558         (grub_env_var): Change the types of "read_hook" and "write_hook"
9559         to grub_env_read_hook_t and grub_env_write_hook_t, respectively.
9560         (grub_register_variable_hook): Likewise.
9562         * include/grub/device.h (grub_device_set_root): Removed.
9563         (grub_device_set_root): Likewise.
9565         * fs/fat.c (grub_fat_dir): Make a copy of PATH in DIRNAME, and
9566         make sure that DIRNAME terminates with '/', so that
9567         grub_fat_find_dir will fail if PATH is not a directory.
9569         * commands/ls.c (grub_ls_list_files): Remove the qualifier const
9570         from DIRNAME.
9571         Use the qualifier auto for print_files and print_files_long.
9572         If FS->DIR sets GRUB_ERRNO to GRUB_ERR_BAD_FILE_TYPE, try DIRNAME
9573         as a regular file.
9574         Put a newline only if there is no error.
9575         (grub_cmd_ls): Remove grub_ls_print_files, because this is not
9576         used.
9578 2005-07-20  Yoshinori K. Okuji  <okuji@enbug.org>
9580         * kern/partition.c (grub_partition_probe): Initialize PART to
9581         NULL. Otherwise, when no partition map is registered, this returns
9582         a garbage.
9584 2005-07-19  Yoshinori K. Okuji  <okuji@enbug.org>
9586         * partmap/apple.c (apple_partition_map_iterate): Check if POS
9587         equals GRUB_DISK_SECTOR_SIZE to see if the partition table is
9588         valid.
9590 2005-07-18  Yoshinori K. Okuji  <okuji@enbug.org>
9592         * commands/ls.c (grub_ls_list_disks): Print the filesystem
9593         information on each device, if it does not have partitions. Print
9594         "Device" instead of "Disk", because this function is not specific
9595         to disk devices.
9597         * normal/main.c (grub_rescue_cmd_normal): Make the variable CONFIG
9598         static to ensure that it is put on the memory rather than a
9599         register.
9601 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
9603         * commands/cat.c (GRUB_MOD_INIT): Use better documentation.
9604         (grub_cat_init): Likewise.
9605         * loader/i386/pc/chainloader_normal.c (GRUB_MOD_INIT): Likewise.
9606         (options): Likewise.
9607         * commands/configfile.c (GRUB_MOD_INIT): Likewise.
9608         (grub_configfile_init): Likewise.
9609         * font/manager.c (GRUB_MOD_INIT): Likewise.
9610         * commands/help.c (GRUB_MOD_INIT): Likewise.
9611         (grub_help_init): Likewise.
9612         * normal/command.c (grub_command_init): Likewise.
9613         * loader/i386/pc/linux_normal.c (GRUB_MOD_INIT): Likewise.
9614         * disk/loopback.c (grub_loop_init): Likewise.
9615         (GRUB_MOD_INIT): Likewise.
9616         * commands/ls.c (grub_ls_init): Likewise.
9617         (GRUB_MOD_INIT): Likewise.
9618         (options): Likewise.
9619         * commands/boot.c (grub_boot_init): Likewise.
9620         (GRUB_MOD_INIT): Likewise.
9621         * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Likewise.
9622         * commands/i386/pc/reboot.c (grub_reboot_init): Likewise.
9623         (GRUB_MOD_INIT): Likewise.
9624         * commands/cmp.c (grub_cmp_init): Likewise.
9625         (GRUB_MOD_INIT): Likewise.
9627         * normal/arg.c: Use <> instead of "" to include header files.
9628         (SHORT_ARG_HELP): New macro.
9629         (SHORT_ARG_USAGE): Likewise.
9630         (help_options): Specify SHORT_ARG_HELP and SHORT_ARG_USAGE instead
9631         of 'h' and 'u' for help and usage, respectively. Use more GNU-like
9632         descriptions.
9633         (find_short): Check if C is 'h' or 'u' explicitly.
9634         (grub_arg_show_help): Use space characters instead of tabs. Treat
9635         SHORT_ARG_HELP and SHORT_ARG_USAGE exceptionally so that -h and -u
9636         are shown with --help and --usage only if they are not used for
9637         the command itself.
9638         (parse_option): Use SHORT_ARG_HELP and SHORT_ARG_USAGE instead of
9639         'h' and 'u'.
9641         * include/grub/arg.h (struct grub_arg_option): Add the qualifier
9642         const into "longarg". Change the type of "shortarg" to int.
9644 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
9646         * boot/i386/pc/boot.S (boot_drive_check): New label.
9648         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRIVE_CHECK): New
9649         macro.
9651         * util/i386/pc/grub-setup.c (setup): Added a workaround for BIOSes
9652         which do not pass a boot drive correctly. Copied from GRUB Legacy.
9654 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
9656         * kern/i386/pc/startup.S (gate_a20_try_system_control_port_a):
9657         When turning off Gate A20, skip the check and return immediately,
9658         because this is not fatal usually.
9660 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
9662         * conf/i386-pc.rmk (pxeboot_img_LDFLAGS): The text address should
9663         be 0x7C00 instead of 0x8000.
9665         * boot/i386/pc/pxeboot.S: Rewritten.
9667         * kern/i386/pc/startup.S (gate_a20_try_bios): No need to specify
9668         EXT_C.
9669         (gate_a20_check_state): Read a byte from 0x108000. Invert the
9670         result.
9672 2005-07-16  Yoshinori K. Okuji  <okuji@enbug.org>
9674         * kern/i386/pc/startup.S (grub_gate_a20): Rewritten for
9675         robustness. This routine now supports a BIOS call and System
9676         Control Port A to modify the gate A20.
9678         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
9679         Increased to 0x440.
9681 2005-07-12  Hollis Blanchard  <hollis@penguinppc.org>
9683         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): dprintf the
9684         device path and resulting ihandle.
9685         (grub_ofdisk_close): dprintf the ihandle being closed.
9686         (grub_ofdisk_read): dprintf function parameters.
9687         * kern/mm.c (grub_mm_init_region): Likewise.
9688         * loader/powerpc/ieee1275/linux.c: Remove extra whitespace.
9689         (grub_linux_boot): dprintf the Linux entry point, initrd address and
9690         size, and boot arguments.
9691         (grub_rescue_cmd_linux): dprintf each ELF segment's address and size
9692         before loading into memory.
9693         (grub_rescue_cmd_initrd): dprintf the initrd's address and size
9694         before loading into memory.
9696 2005-07-12  Yoshinori K. Okuji  <okuji@enbug.org>
9698         * kern/mm.c: Added much documentation.
9699         (GRUB_MM_ALIGN_LOG2): When GRUB_CPU_SIZEOF_VOID_P is
9700         8, set to 5 instead of 8.
9702 2005-07-10  Yoshinori Okuji  <okuji@enbug.org>
9704         * DISTLIST: Added util/i386/pc/grub-mkimage.c.
9706         * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-mkdevicemap.
9707         (grub_mkdevicemap_SOURCES): New variable.
9709         * util/i386/pc/grub-mkdevicemap.c: New file. Mostly copied from
9710         lib/device.c of GRUB Legacy.
9712 2005-07-10  Yoshinori Okuji  <okuji@enbug.org>
9714         * commands/ls.c (grub_ls_list_files): Check if *PATH is NUL
9715         instead of PATH is NULL.
9717 2005-07-09  Vincent Pelletier  <subdino2004@yahoo.fr>
9719         * commands/cmp.c (BUFFER_SIZE): New macro.
9720         (grub_cmd_cmp): Close the right file at the right time.  Compare
9721         only data just read.  Don't report files of different  size as
9722         identical.  Dynamically allocate buffers.  Move variable
9723         declarations at the beginning of function.
9725 2005-07-09  Yoshinori Okuji  <okuji@enbug.org>
9727         * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): The return value was
9728         reverse.
9730 2004-07-04  Vincent Pelletier  <subdino2004@yahoo.fr>
9732         * normal/cmdline.c (grub_cmdline_get): Don't fallback on ctrl-d
9733         when backspace is pressed at beginning of line.
9735 2005-07-03  Yoshinori Okuji  <okuji@enbug.org>
9737         * DISTLIST: Added genfslist.sh.
9739         * normal/main.c (fs_module_list): New variable.
9740         (autoload_fs_module): New function.
9741         (read_fs_list): Likewise.
9742         (grub_normal_execute): Call read_fs_list.
9744         * kern/fs.c (grub_fs_autoload_hook): New variable.
9745         (grub_fs_probe): Added support for auto-loading.
9747         * include/grub/normal.h (struct grub_fs_module_list): New struct.
9748         (grub_fs_module_list_t): New type.
9750         * include/grub/fs.h (grub_fs_autoload_hook_t): New type.
9751         (grub_fs_autoload_hook): New prototype.
9753         * genfslist.sh: New file.
9755         * genmk.rb: Added a rule to generate a filesystem list.
9757 2005-06-30  Marco Gerards  <metgerards@student.han.nl>
9759         * configure.ac: Fix the test for cross-compiling.
9761         * genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'.  Don't
9762         define GRUB_UTIL anymore.
9764         * util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes
9765         so this function works on other systems than just big endian.
9766         (load_modules): Likewise.
9767         (add_segments): Likewise.
9769 2005-06-23  Hollis Blanchard  <hollis@penguinppc.org>
9771         * kern/misc.c (grub_vsprintf): Add `longfmt'.  If format string
9772         contains `l' modifier, get a long from va_arg().
9774 2005-06-23  Yoshinori K. Okuji  <okuji@enbug.org>
9776         * kern/mm.c (grub_free): If the next free block which is being
9777         merged is the first free block, set the first block to the block
9778         being freed.
9779         Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.
9781 2005-05-08  Hollis Blanchard  <hollis@penguinppc.org>
9783         * boot/powerpc/ieee1275/cmain.c (cmain): Initialize
9784         `grub_ieee1275_chosen'.
9786 2005-05-08  Hollis Blanchard  <hollis@penguinppc.org>
9788         * boot/powerpc/ieee1275/cmain.c (module_info): Remove definition.
9789         (grub_ieee1275_chosen): New variable.
9790         (cmain): Initialize and use `grub_ieee1275_chosen' instead of
9791         `chosen'.
9792         * boot/powerpc/ieee1275/crt0.S (init_stack): Remove stack space.
9793         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
9794         Rename first argument to `phandle' for consistency.
9795         (grub_ieee1275_get_property_length): Likewise.
9796         (grub_ieee1275_next_property): Likewise.  Change type of first argument
9797         to grub_ieee1275_phandle_t.
9798         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn):
9799         Move export next to declaration.
9800         (grub_ieee1275_chosen): New variable.
9801         * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MODULE_BASE):
9802         Correct cosmetic typo.
9803         * kern/powerpc/ieee1275/init.c (grub_set_prefix): Use
9804         `grub_ieee1275_chosen'.
9805         * kern/powerpc/ieee1275/openfw.c (grub_map): Likewise.
9806         * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Likewise.
9807         (grub_rescue_cmd_linux): Set `initrd_addr' to 0.
9808         * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_refresh): Use
9809         `grub_ieee1275_chosen'.
9811 2005-05-10  Hollis Blanchard  <hollis@penguinppc.org>
9813         * boot/powerpc/ieee1275/cmain.c (cmain): Remove code to parse
9814         /chosen/bootargs.
9815         * kern/powerpc/ieee1275/init.c (grub_machine_init): Parse
9816         /chosen/bootargs as "variable=value" pairs.
9818 2005-05-08  Vincent Pelletier  <subdino2004@yahoo.fr>
9820         * include/grub/misc.h (grub_dprintf): New macro.
9821         (grub_real_dprintf): New prototype.
9822         (grub_strword): Likewise.
9823         (grub_iswordseparator): Likewise.
9824         * kern/misc.c (grub_real_dprintf): New function.
9825         (grub_strword): Likewise.
9826         (grub_iswordseparator): Likewise.
9828 2005-04-30  Hollis Blanchard  <hollis@penguinppc.org>
9830         * boot/powerpc/ieee1275/cmain.c: Don't include grub/machine/init.h.
9831         (roundup): Remove macro.
9832         (grub_ieee1275_flags): Make static.
9833         (grub_ieee1275_realmode): Remove.
9834         (grub_ieee1275_test_flag): New function.
9835         (grub_ieee1275_set_flag): Likewise.
9836         (find_options): Rename to `grub_ieee1275_find_options'; update
9837         callers. Set GRUB_IEEE1275_FLAG_REAL_MODE and
9838         GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS.
9839         (cmain): New prototype.
9840         (cmain): Use `grub_ieee1275_set_flag' instead of accessing
9841         `grub_ieee1275_flags' directly.
9842         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Remove
9843         machine/biosdisk.h.
9844         * disk/powerpc/ieee1275/ofdisk.c: Include grub/machine/ofdisk.h.
9845         Don't include grub/machine/init.h.
9846         (grub_ofdisk_open): Call `grub_ieee1275_test_flag'.
9847         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
9848         Remove prototype.
9849         (grub_ieee1275_realmode): Likewise.
9850         (grub_ieee1275_flag): New enum.
9851         (grub_ieee1275_test_flag): New prototype.
9852         (grub_ieee1275_set_flag): New prototype.
9853         * include/grub/powerpc/ieee1275/init.h: Remove file.
9854         * include/grub/powerpc/ieee1275/ofdisk.h: New file.
9855         * kern/powerpc/ieee1275/init.c: Don't include grub/machine/init.h.
9856         Include grub/machine/console.h.  Include grub/machine/ofdisk.h.
9857         (grub_machine_fini): Don't call `grub_ieee1275_release'.  Remove
9858         comment.
9859         * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Call
9860         `grub_ieee1275_test_flag'.
9861         (grub_ieee1275_encode_devname): Likewise.
9863 2005-04-21  Hollis Blanchard  <hollis@penguinppc.org>
9865         * include/grub/powerpc/ieee1275/ieee1275.h
9866         (grub_ieee1275_encode_devname): New prototype.
9867         (grub_ieee1275_get_filename): Likewise.
9868         * kern/powerpc/ieee1275/init.c (grub_translate_ieee175_path): New
9869         function.
9870         (grub_set_prefix): Likewise.
9871         (grub_machine_init): Call grub_set_prefix.
9872         * kern/powerpc/ieee1275/openfw.c: Fix typos.
9873         (grub_parse_type): New enum.
9874         (grub_ieee1275_get_devargs): New function.
9875         (grub_ieee1275_get_devname): Likewise.
9876         (grub_ieee1275_parse_args): Likewise.
9877         (grub_ieee1275_get_filename): Likewise.
9878         (grub_ieee1275_encode_devname): Likewise.
9880 2005-03-30  Marco Gerards  <metgerards@student.han.nl>
9882         * kern/powerpc/ieee1275/init.c (grub_machine_fini): Don't call
9883         `grub_loader_unset'.
9885 2005-03-26  Hollis Blanchard  <hollis@penguinppc.org>
9887         * commands/ieee1275/halt.c (grub_cmd_halt): Call grub_halt
9888         instead of grub_ieee1275_interpret.
9889         (grub_halt_init): New function.
9890         (grub_halt_fini): Likewise.
9891         (GRUB_MOD_INIT): Correct message grammar.
9892         * commands/ieee1275/reboot.c (grub_cmd_reboot): Call grub_reboot
9893         instead of grub_ieee1275_interpret.
9894         (grub_reboot_init): New function.
9895         (grub_reboot_fini): Likewise.
9896         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace
9897         commands/i386/pc/halt.c, commands/i386/pc/reboot.c, and
9898         util/i386/pc/misc.c with commands/ieee1275/halt.c,
9899         commands/ieee1275/reboot.c, and util/powerpc/ieee1275/misc.c.
9900         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_fini): New
9901         function.
9902         * include/grub/powerpc/ieee1275/console.h (grub_console_fini):
9903         Add prototype.
9904         * include/grub/powerpc/ieee1275/ieee1275.h (grub_reboot): Add
9905         prototype.
9906         (grub_halt): Likewise.
9907         * include/grub/powerpc/ieee1275/init.h: Remove inaccurate comment.
9908         (cmain): Remove __attribute__((unused)).
9909         * kern/powerpc/ieee1275/init.c (grub_heap_start): New variable.
9910         (grub_heap_len): Likewise.
9911         (grub_machine_fini): New function.
9912         * kern/powerpc/ieee1275/openfw.c (grub_reboot): New function.
9913         (grub_halt): Likewise.
9914         * term/powerpc/ieee1275/ofconsole.c (grub_console_fini): New
9915         function.
9916         * util/powerpc/ieee1275/misc.c: New file.
9918 2005-03-19  Yoshinori K. Okuji  <okuji@enbug.org>
9920         * DISTLIST: New file.
9921         * gendistlist.sh: Likewise.
9923         * Makefile.in (COMMON_DISTFILES): Removed.
9924         (BOOT_DISTFILES): Likewise.
9925         (CONF_DISTFILES): Likewise.
9926         (DISK_DISTFILES): Likewise.
9927         (FS_DISTFILES): Likewise.
9928         (INCLUDE_DISTFILES): Likewise.
9929         (KERN_DISTFILES): Likewise.
9930         (LOADER_DISTFILES): Likewise.
9931         (TERM_DISTFILES): Likewise.
9932         (UTIL_DISTFILES): Likewise.
9933         (DISTFILES): Likewise.
9934         (uninstall): Uninstall files in $(pkgdata_DATA).
9935         (DISTLIST): New target.
9936         (distdir): Use the contents of the file DISTLIST to get a list of
9937         distributed files.
9939 2005-03-18  Yoshinori K. Okuji  <okuji@enbug.org>
9941         * fs/fat.c (grub_fat_mount): Ignore the 3rd bit of a media
9942         descriptor. This is ported from GRUB Legacy.
9944         * gencmdlist.sh: Added an extra semicolon to make it work with
9945         old sed versions. Reported by Robert Bihlmeyer
9946         <robbe@orcus.priv.at>.
9948 2005-03-08  Yoshinori Okuji  <okuji@enbug.org>
9950         Automatic loading of commands is supported.
9952         * normal/main.c (read_command_list): New function.
9953         (grub_normal_execute): Call read_command_list.
9955         * normal/command.c (grub_register_command): Return zero or CMD.
9956         Allocate CMD->NAME from the heap.
9957         Initialize CMD->MODULE_NAME to zero.
9958         Find the same name as well. If the same command is found and it is
9959         a dummy command, overwrite members. If it is not a dummy command,
9960         return zero.
9961         (grub_unregister_command): Free Q->NAME and Q->MODULE_NAME.
9962         (grub_command_find): If a dummy command is found, load a module
9963         and retry to find a command only once.
9965         * normal/cmdline.c (grub_tab_complete): Call grub_command_find to
9966         make sure that each command is loaded.
9968         * include/grub/normal.h (GRUB_COMMAND_FLAG_NOT_LOADED): New
9969         macro.
9970         (struct grub_command): Remove const from the member `name'.
9971         Add a new member `module_name'.
9972         (grub_register_command): Return grub_command_t.
9974         * commands/help.c (grub_cmd_help): Call grub_command_find to make
9975         sure that each command is loaded.
9977         * genmk.rb (PModule::rule): Specify a module name without the
9978         suffix ".mod" to gencmdlist.sh.
9980 2005-03-02  Yoshinori K. Okuji  <okuji@enbug.org>
9982         * gencmdlist.sh: New file.
9984         * genmk.rb (PModule::rule): Generate a rule for a command list.
9985         Clean command.lst.
9986         Generate command.lst from $(COMMANDFILES).
9988         * Makefile.in (COMMON_DISTFILES): Added gencmdlist.sh.
9989         (DATA): Added $(pkgdata_DATA).
9990         (install-local): Install files in $(pkgdata_DATA).
9992 2005-03-02  Yoshinori K. Okuji  <okuji@enbug.org>
9994         * term/i386/pc/vga.c (debug_command): Removed.
9995         (GRUB_MOD_INIT): Do not register the command "debug".
9997         From Hollis Blanchard:
9998         * commands/configfile.c: New file.
9999         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
10000         commands/configfile.c.
10001         (pkgdata_MODULES): Added configfile.mod.
10002         (configfile_mod_SOURCES): New variable.
10003         (configfile_mod_CFLAGS): Likewise.
10004         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
10005         commands/configfile.c.
10006         (pkgdata_MODULES): Added configfile.mod.
10007         (configfile_mod_SOURCES): New variable.
10008         (configfile_mod_CFLAGS): Likewise.
10009         * util/grub-emu.c (main): Call grub_configfile_init and
10010         grub_configfile_fini.
10011         * include/grub/normal.h [GRUB_UTIL] (grub_configfile_init): New
10012         prototype.
10013         [GRUB_UTIL] (grub_configfile_fini): Likewise.
10015 2005-02-27  Yoshinori K. Okuji  <okuji@enbug.org>
10017         * normal/arg.c (grub_arg_show_help): Do not show the bug report
10018         address.
10020         * commands/help.c (grub_cmd_help): Do not print newlines after
10021         the last command in print_command_help.
10023 2005-02-27  Yoshinori K. Okuji  <okuji@enbug.org>
10025         * commands/default.h: New file.
10026         * commands/timeout.h: Likewise.
10027         * normal/context.c: Likewise.
10029         * util/misc.c: Do not include sys/times.h.
10030         Include sys/time.h and grub/machine/time.h.
10031         (grub_get_rtc): Rewritten with gettimeofday.
10033         * util/grub-emu.c (main): Call grub_default_init and
10034         grub_timeout_init before grub_normal_init, and call
10035         grub_timeout_fini and grub_default_fini after grub_main.
10037         * util/console.c (grub_ncurses_checkkey): Return the read
10038         character or -1.
10040         * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it
10041         timeouts.
10043         * normal/main.c (read_config_file): Push MENU. If this fails,
10044         print an error and wait for a user input.
10045         Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE.
10046         If a menu is empty or an error occurs, pop MENU.
10047         (grub_normal_execute): Pop and free MENU after grub_menu_run
10048         returns.
10050         * kern/loader.c (grub_loader_boot): Call grub_machine_fini.
10052         * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not
10053         include time.h.
10054         [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
10055         without GRUB_UTIL.
10056         * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include
10057         time.h.
10058         [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
10059         without GRUB_UTIL.
10061         * include/grub/normal.h (struct grub_menu_list): New struct.
10062         (grub_menu_list_t): New type.
10063         (struct grub_context): New struct.
10064         (grub_context_t): New type.
10065         (grub_register_command): Got rid of EXPORT_FUNC.
10066         (grub_unregister_command): Likewise.
10067         (grub_context_get): New prototype.
10068         (grub_context_get_current_menu): Likewise.
10069         (grub_context_push_menu): Likewise.
10070         (grub_context_pop_menu): Likewise.
10071         [GRUB_UTIL] (grub_default_init): Likewise.
10072         [GRUB_UTIL] (grub_default_fini): Likewise.
10073         [GRUB_UTIL] (grub_timeout_init): Likewise.
10074         [GRUB_UTIL] (grub_timeout_fini): Likewise.
10076         * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c,
10077         commands/timeout.c and normal/context.c.
10078         (pkgdata_MODULES): Added default.mod and timeout.mod.
10079         (normal_mod_SOURCES): Added normal/context.c.
10080         (default_mod_SOURCES): New variable.
10081         (default_mod_CFLAGS): Likewise.
10082         (timeout_mod_SOURCES): Likewise.
10083         (timeout_mod_CFLAGS): Likewise.
10084         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from
10085         conf/i386-pc.rmk.
10086         (pkgdata_MODULES): Added default.mod and timeout.mod.
10087         (normal_mod_SOURCES): Added normal/context.c.
10088         (default_mod_SOURCES): New variable.
10089         (default_mod_CFLAGS): Likewise.
10090         (timeout_mod_SOURCES): Likewise.
10091         (timeout_mod_CFLAGS): Likewise.
10093         * Makefile.in (all-local): Added $(MKFILES).
10095 2005-02-21  Vincent Pelletier  <subdino2004@yahoo.fr>
10097         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `partmap/sun.c'.
10098         (grub_emu_SOURCES): Likewise.
10099         (pkgdata_MODULES): Add `sun.mod'.
10100         (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
10101         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
10102         `partmap/sun.c'.
10103         (pkgdata_MODULES): Add `sun.mod'.
10104         (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
10105         * include/grub/partition.h (grub_sun_partition_map_init): New
10106         prototype.
10107         (grub_sun_partition_map_fini): Likewise.
10108         * partmap/sun.c: New file.
10109         * util/grub-emu.c (main): Initialize and de-initialize the sun
10110         partitionmap support.
10112 2005-02-19  Yoshinori K. Okuji  <okuji@enbug.org>
10114         This implements an Emacs-like menu entry editor.
10116         * normal/menu_entry.c: New file.
10118         * util/console.c (grub_ncurses_putchar): Translate some Unicode
10119         characters to ASCII.
10120         (saved_char): New variable.
10121         (grub_ncurses_checkkey): Rewritten completely.
10122         (grub_ncurses_getkey): Likewise.
10123         (grub_ncurses_init): Call raw instead of cbreak.
10125         * normal/menu.c (print_entry): Do not put a space.
10126         (init_page): Renamed to ...
10127         (grub_menu_init_page): ... this. All callers changed.
10128         (edit_menu_entry): Removed.
10129         (run_menu): Call grub_menu_entry_run instead of edit_menu_entry.
10131         * normal/cmdline.c (grub_cmdline_run): Call grub_setcursor.
10133         * kern/misc.c (grub_vprintf): Call grub_refresh.
10135         * normal/menu.c (DISP_LEFT): Renamed to ...
10136         * include/grub/term.h (GRUB_TERM_DISP_LEFT): ... this.
10137         * normal/menu.c (DISP_UP): Renamed to ...
10138         * include/grub/term.h (GRUB_TERM_DISP_UP): ... this.
10139         * normal/menu.c (DISP_RIGHT): Renamed to ...
10140         * include/grub/term.h (GRUB_TERM_DISP_RIGHT): ... this.
10141         * normal/menu.c (DISP_DOWN): Renamed to ...
10142         * include/grub/term.h (GRUB_TERM_DISP_DOWN): ... this.
10143         * normal/menu.c (DISP_HLINE): Renamed to ...
10144         * include/grub/term.h (GRUB_TERM_DISP_HLINE): ... this.
10145         * normal/menu.c (DISP_VLINE): Renamed to ...
10146         * include/grub/term.h (GRUB_TERM_DISP_VLINE): ... this.
10147         * normal/menu.c (DISP_UL): Renamed to ...
10148         * include/grub/term.h (GRUB_TERM_DISP_UL): ... this.
10149         * normal/menu.c (DISP_UR): Renamed to ...
10150         * include/grub/term.h (GRUB_TERM_DISP_UR): ... this.
10151         * normal/menu.c (DISP_LL): Renamed to ...
10152         * include/grub/term.h (GRUB_TERM_DISP_LL): ... this.
10153         * normal/menu.c (DISP_LR): Renamed to ...
10154         * include/grub/term.h (GRUB_TERM_DISP_LR): ... this.
10155         * normal/menu.c (TERM_WIDTH): Renamed to ...
10156         * include/grub/term.h (GRUB_TERM_WIDTH): ... this.
10157         * normal/menu.c (TERM_HEIGHT): Renamed to ...
10158         * include/grub/term.h (GRUB_TERM_HEIGHT): ... this.
10159         * normal/menu.c (TERM_INFO_HEIGHT): Renamed to ...
10160         * include/grub/term.h (GRUB_TERM_INFO_HEIGHT): ... this.
10161         * normal/menu.c (TERM_MARGIN): Renamed to ...
10162         * include/grub/term.h (GRUB_TERM_MARGIN): ... this.
10163         * normal/menu.c (TERM_SCROLL_WIDTH): Renamed to ...
10164         * include/grub/term.h (GRUB_TERM_SCROLL_WIDTH): ... this.
10165         * normal/menu.c (TERM_TOP_BORDER_Y): Renamed to ...
10166         * include/grub/term.h (GRUB_TERM_TOP_BORDER_Y): ... this.
10167         * normal/menu.c (TERM_LEFT_BORDER_X): Renamed to ...
10168         * include/grub/term.h (GRUB_TERM_LEFT_BORDER_X): ... this.
10169         * normal/menu.c (TERM_BORDER_WIDTH): Renamed to ...
10170         * include/grub/term.h (GRUB_TERM_BORDER_WIDTH): ... this.
10171         * normal/menu.c (TERM_MESSAGE_HEIGHT): Renamed to ...
10172         * include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): ... this.
10173         * normal/menu.c (TERM_BORDER_HEIGHT): Renamed to ...
10174         * include/grub/term.h (GRUB_TERM_BORDER_HEIGHT): ... this.
10175         * normal/menu.c (TERM_NUM_ENTRIES): Renamed to ...
10176         * include/grub/term.h (GRUB_TERM_NUM_ENTRIES): ... this.
10177         * normal/menu.c (TERM_FIRST_ENTRY_Y): Renamed to ...
10178         * include/grub/term.h (GRUB_TERM_FIRST_ENTRY_Y): ... this.
10179         * normal/menu.c (TERM_ENTRY_WIDTH): Renamed to ...
10180         * include/grub/term.h (GRUB_TERM_ENTRY_WIDTH): ... this.
10181         * normal/menu.c (TERM_CURSOR_X): Renamed to ...
10182         * include/grub/term.h (GRUB_TERM_CURSOR_X): ... this.
10183         All callers changed.
10185         * include/grub/normal.h: New prototype.
10187         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
10188         normal/menu_entry.c.
10189         (normal_mod_SOURCES): Likewise.
10190         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10191         (normal_mod_SOURCES): Likewise.
10193 2005-02-15  Yoshinori K. Okuji  <okuji@enbug.org>
10195         * include/grub/normal.h (grub_halt_init): New prototype.
10196         (grub_halt_fini): Likewise.
10197         (grub_reboot_init): Likewise.
10198         (grub_reboot_fini): Likewise.
10200         * util/grub-emu.c: Include signal.h.
10201         (main_env): New global variable.
10202         (grub_machine_init): Ignore SIGINT. Otherwise grub-emu cannot
10203         catch C-c.
10204         (grub_machine_fini): New function.
10205         (main): Call grub_halt_init and grub_reboot_init before
10206         grub_main, and grub_reboot_fini and grub_halt_fini after it.
10207         Call setjmp with MAIN_ENV to go back afterwards.
10208         Call grub_machine_fini right before return.
10210         * include/grub/util/misc.h: Include setjmp.h.
10211         (main_env): New prototype.
10213         * include/grub/kernel.h (grub_machine_fini): New prototype.
10214         * include/grub/i386/pc/biosdisk.h (grub_biosdisk_fini): Likewise.
10215         * include/grub/i386/pc/console.h (grub_console_fini): Likewise.
10217         * disk/i386/pc/biosdisk.c (grub_biosdisk_fini): New function.
10218         * kern/i386/pc/init.c (grub_machine_fini): Likewise.
10219         * term/i386/pc/console.c (grub_console_fini): Likewise.
10221         * util/i386/pc/misc.c: New file.
10223         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
10224         util/i386/pc/misc.c, commands/i386/pc/halt.c and
10225         commands/i386/pc/reboot.c.
10227 2005-02-14  Guillem Jover  <guillem@hadrons.org>
10229         * include/grub/dl.h (grub_dl_check_header): New prototype.
10230         (grub_arch_dl_check_header): Change return type to grub_err_t,
10231         remove size parameter and export function.  Update all callers.
10232         * kern/dl.c (grub_dl_check_header): New function.
10233         (grub_dl_load_core): Use `grub_dl_check_header' instead of
10234         `grub_arch_dl_check_header'.  Check ELF type.  Check if sections
10235         are inside the core.
10236         * kern/i386/dl.c (grub_arch_dl_check_header): Remove arch
10237         independent ELF header checks.
10238         * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
10239         * loader/i386/pc/multiboot.c (grub_rescue_cmd_multiboot): Use
10240         `grub_dl_check_header' instead of explicit checks.  Check for the
10241         ELF type.
10242         * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Use
10243         `grub_dl_check_header' instead of explicit checks.  Remove arch
10244         specific ELF header checks.
10246         * util/grub-emu.c (grub_arch_dl_check_header): Remove the
10247         argument SIZE.
10249 2005-02-13  Hollis Blanchard  <hollis@penguinppc.org>
10251         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add ls.mod.
10252         * include/grub/powerpc/libgcc.h (__mulsf3): New prototype.
10254 2005-02-12  Hollis Blanchard  <hollis@penguinppc.org>
10256         * kern/partition.c (grub_partition_probe): Clear `grub_errno' and
10257         return 0 if `grub_errno' is GRUB_ERR_BAD_PART_TABLE.
10258         (part_map_iterate): Clear `grub_errno' and return 0 if
10259         `partmap->iterate' returns GRUB_ERR_BAD_PART_TABLE.
10260         * partmap/amiga.c (amiga_partition_map_iterate): Return
10261         GRUB_ERR_BAD_PART_TABLE if no partition map magic is found.
10262         * partmap/apple.c (apple_partition_map_iterate): Likewise.
10264 2005-02-01  Guillem Jover  <guillem@hadrons.org>
10266         * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Fix module
10267         help info.
10269 2005-01-31  Marco Gerards  <metgerards@student.han.nl>
10271         * include/grub/powerpc/ieee1275/loader.h (grub_load_linux):
10272         Removed prototype.
10273         (grub_rescue_cmd_linux): New prototype.
10274         (grub_rescue_cmd_initrd): Likewise.
10275         * powerpc/ieee1275/linux.c (grub_linux_boot): Remove struct
10276         `bi_rec'.
10277         (grub_linux_release_mem): Release the memory for the initrd.
10278         (grub_load_linux): Renamed from this...
10279         (grub_rescue_cmd_linux): ...To this.  Changed all callers.
10280         Changed `entry' not to be static.  Loop over memory regions to
10281         find another one when the default fails.
10282         (grub_rescue_cmd_initrd): New function.
10283         (grub_linux_init): Remove function.
10284         (grub_linux_fini): Likewise.
10285         (GRUB_MOD_INIT): Register `initrd'.
10286         (GRUB_MOD_FINI): Unregister `initrd'.
10287         * powerpc/ieee1275/linux_normal.c (grub_linux_normal_init):
10288         Function removed.
10289         (grub_linux_normal_fini): Likewise.
10290         (GRUB_MOD_INIT): Register `initrd'.
10291         (GRUB_MOD_FINI): Unregister `initrd'.
10293 2005-01-31  Marco Gerards  <metgerards@student.han.nl>
10295         * commands/help.c: New file.
10296         * normal/arg.c (show_help): Renamed to...
10297         (grub_arg_show_help): ... this.
10298         * commands/i386/pc/halt.c: New file.
10299         * commands/i386/pc/reboot.c: Likewise.
10300         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/help.c'.
10301         (pkgdata_MODULES): Add `reboot.mod', `halt.mod' and `help.mod'.
10302         (help_mod_SOURCES, help_mod_CFLAGS, reboot_mod_SOURCES)
10303         (reboot_mod_CFLAGS, halt_mod_SOURCES, halt_mod_CFLAGS): New
10304         variables.
10305         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
10306         `commands/help.c'.
10307         (pkgdata_MODULES): Add `help.mod'.
10308         (help_mod_SOURCES, help_mod_CFLAGS): New variables.
10309         * grub/i386/pc/init.h (grub_reboot): New prototype.
10310         (grub_halt): Likewise.
10311         * include/grub/normal.h (grub_arg_show_help): New prototype.
10312         (grub_help_init): Likewise.
10313         (grub_help_fini): Likewise.
10314         * util/grub-emu.c (main): Initialize and deinitialize the help
10315         command.
10317         * normal/cmdline.c (grub_cmdline_get): Doc fix.
10319         * normal/command.c (grub_command_init): Fixed the description of
10320         the `set' and `unset' commands.
10322 2005-01-31  Marco Gerards  <metgerards@student.han.nl>
10324         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_interpret): New
10325         function.
10326         * commands/ieee1275/halt.c: New file.
10327         * commands/ieee1275/reboot.c: Likewise.
10328         * commands/ieee1275/suspend.c (grub_cmd_suspend): Use
10329         `__attribute__ ((unused))'.  Some GCS related fixed.
10330         (grub_suspend_init) [GRUB_UTIL]: Function removed.
10331         (grub_suspend_fini): Likewise.
10332         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add `reboot.mod'
10333         and `halt.mod'.
10334         (reboot_mod_SOURCES, reboot_mod_CFLAGS, halt_mod_SOURCES)
10335         (halt_mod_CFLAGS): New variables.
10336         * include/grub/powerpc/ieee1275/ieee1275.h
10337         (grub_ieee1275_interpret): New prototype.
10339 2005-01-29  Yoshinori K. Okuji  <okuji@enbug.org>
10341         * include/grub/misc.h (memmove): New prototype.
10342         (memcpy): Likewise.
10344 2005-01-22  Hollis Blanchard  <hollis@penguinppc.org>
10346         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
10347         `devpath' to 0.  Use `name' instead of `devpath' with `grub_strndup'.
10349 2005-01-22  Marco Gerards  <metgerards@student.han.nl>
10351         * kern/misc.c (grub_strndup): Function rewritten.
10353 2005-01-22  Vincent Pelletier  <subdino2004@yahoo.fr>
10355         * normal/menu.c (TERM_WIDTH): Macro redefined.
10356         (TERM_TOP_BORDER_Y): Likewise.
10357         (draw_border): Replaced while-loop by a for-loop.  Make the number
10358         of lines consistent with the number of lines displayed in
10359         print_entries.  Added a margin below the rectangle.
10360         (print_entry): Make the entry fit in the rectangle.
10361         (print_entries): Display the scroll arrows next to the right
10362         border.
10364 2005-01-21  Marco Gerards  <metgerards@student.han.nl>
10366         * fs/minix.c (grub_minix_find_file): Reserve more space for
10367         `fpath' so the \0 can be stored.  Use `grub_strcpy' instead of
10368         `grub_strncpy' to copy `path' into it.
10370 2005-01-21  Marco Gerards  <metgerards@student.han.nl>
10372         Add the loopback device, a device via which files can be accessed
10373         as devices.
10375         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/loopback.c'.
10376         (pkgdata_MODULES): Add loopback.mod.
10377         (loopback_mod_SOURCES): New variable.
10378         (loopback_mod_CFLAGS): Likewise.
10379         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
10380         `disk/loopback.c'.
10381         (pkgdata_MODULES): Add loopback.mod.
10382         (loopback_mod_SOURCES): New variable.
10383         (loopback_mod_CFLAGS): Likewise.
10384         * disk/loopback.c: new file.
10385         * include/grub/normal.h (grub_loop_init): New prototype.
10386         (grub_loop_fini): New prototype.
10387         * util/grub-emu.c (main): Initialize and de-initialize loopback
10388         support.
10389         * include/grub/disk.h (grub_disk_dev_id): Add
10390         `GRUB_DISK_DEVICE_LOOPBACK_ID'.
10392 2005-01-20  Hollis Blanchard  <hollis@penguinppc.org>
10394         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_enter): New
10395         function.
10396         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add suspend.mod.
10397         (suspend_mod_SOURCES): New variable.
10398         (suspend_mod_CFLAGS): Likewise.
10399         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_enter):
10400         New prototype.
10401         * commands/ieee1275/suspend.c: New file.
10403 2005-01-20  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
10405         * include/grub/dl.h (GRUB_MOD_INIT): Changed `__attribute__
10406         ((unused))' to `__attribute__ ((used))'.
10407         (GRUB_MOD_FINI): Likewise.
10408         * kern/dl.c (grub_dl_load_file): Fix null pointer dereference.
10409         * genmk.rb (PModule): Assign space to common symbols when linking
10410         modules.
10412 2005-01-20  Marco Gerards  <metgerards@student.han.nl>
10414         * include/grub/mm.h (grub_mm_init_region): Change the type of the
10415         `unsigned' arguments to `grub_size_t'.
10416         (grub_malloc): Likewise.
10417         (grub_realloc): Likewise.
10418         (grub_memalign): Likewise.
10419         * kern/i386/dl.c (grub_arch_dl_check_header): Likewise.
10420         * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
10421         * util/misc.c (grub_malloc): Likewise.
10422         (grub_realloc): Likewise.
10423         * kern/mm.c (get_header_from_pointer): Change the casts to
10424         `unsigned' into a cast to `grub_size_t'.
10426         * fs/fshelp.c (grub_fshelp_find_file): The `oldnode' should always
10427         point to `currnode' when `currnode' is changed.
10429         * util/grub-emu.c (main): Initialize `progname'.  Reported by Nico
10430         Schottelius <nico-linux@schottelius.org>.
10432 2005-01-09  Hollis Blanchard  <hollis@penguinppc.org>
10434         * util/powerpc/ieee1275/grub-mkimage.c: Include <string.h>.
10435         (note_path): Remove variable.
10436         (GRUB_IEEE1275_NOTE_NAME): New macro.
10437         (GRUB_IEEE1275_NOTE_TYPE): Likewise.
10438         (grub_ieee1275_note_hdr): New structure.
10439         (grub_ieee1275_note_desc): Likewise.
10440         (grub_ieee1275_note): Likewise.
10441         (load_note): Remove `dir' argument.  All callers updated.  Remove
10442         `note_img' and `path'.  Do not load a file from `note_path'.
10443         Initialize a struct grub_ieee1275_note and write that to `out'.
10444         Use GRUB_IEEE1275_MODULE_BASE instead of MODULE_BASE.
10446 2005-01-05  Marco Gerards  <metgerards@student.han.nl>
10448         * util/misc.c (grub_util_read_image): Revert last change.  It
10449         called `grub_util_read_at', which seeks from the beginning of the
10450         file.
10452 2005-01-04  Hollis Blanchard  <hollis@penguinppc.org>
10454         * TODO: Add note about endianness in grub-mkimage.
10455         * boot/powerpc/ieee1275/crt0.S (note): Remove unused .note
10456         section.
10457         * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Add grub-mkimage.
10458         (grub_mkimage_SOURCES): New target.
10459         * include/grub/kernel.h (grub_start_addr): Remove variable.
10460         (grub_end_addr): Likewise.
10461         (grub_total_module_size): Likewise.
10462         (grub_kernel_image_size): Likewise.
10463         (GRUB_MODULE_MAGIC): New constant.
10464         (grub_module_info): New structure.
10465         (grub_arch_modules_addr): New prototype.
10466         (grub_get_end_addr): Remove prototype.
10467         * include/grub/i386/pc/kernel.h (grub_end_addr): New prototype.
10468         * include/grub/powerpc/ieee1275/kernel.h: New file.
10469         * include/grub/util/misc.h (grub_util_get_fp_size): New
10470         prototype.
10471         (grub_util_read_at): Likewise.
10472         (grub_util_write_image_at): Likewise.
10473         * kern/main.c (grub_get_end_addr): Remove function.
10474         (grub_load_modules): Call grub_arch_modules_addr instead of using
10475         grub_end_addr.  Look for a grub_module_info struct in memory.  Use
10476         the grub_module_info fields instead of calling grub_get_end_addr
10477         as loop conditions.  Move grub_add_unused_region code here.
10478         (grub_add_unused_region): Remove function.
10479         * kern/i386/pc/init.c: Include grub/cache.h.
10480         (grub_machine_init): Remove call to grub_get_end_addr.  Remove
10481         one call to add_mem_region.
10482         (grub_arch_modules_addr): New function.
10483         * kern/powerpc/ieee1275/init.c (grub_end_addr): Remove variable.
10484         (grub_total_module_size): Likewise.
10485         Include grub/machine/kernel.h.
10486         (grub_arch_modules_addr): New function.
10487         * util/grub-emu.c (grub_end_addr): Remove variable.
10488         (grub_total_module_size): Likewise.
10489         (grub_arch_modules_addr): New function.
10490         * util/misc.c: Include unistd.h.
10491         (grub_util_get_fp_size): New function.
10492         (grub_util_read_at): Likewise.
10493         (grub_util_write_image_at): Likewise.
10494         (grub_util_read_image): Call grub_util_read_at.
10495         (grub_util_write_image): Call grub_util_write_image_at.
10496         * util/i386/pc/grub-mkimage.c (generate_image): Allocate
10497         additional memory in kernel_img for a struct grub_module_info.
10498         Fill in that grub_module_info.
10499         * util/powerpc/ieee1275/grub-mkimage.c: New file.
10501 2005-01-03  Hollis Blanchard  <hollis@penguinppc.org>
10503         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_milliseconds):
10504         New function.
10505         * include/grub/powerpc/ieee1275/ieee1275.h
10506         (grub_ieee1275_milliseconds): New prototype.
10507         * include/grub/powerpc/ieee1275/time.h (GRUB_TICKS_PER_SECOND):
10508         Change to 1000.
10509         * kern/powerpc/ieee1275/init.c (grub_get_rtc): Call
10510         grub_ieee1275_milliseconds.
10512 2005-01-03  Hollis Blanchard  <hollis@penguinppc.org>
10514         * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_realmode): New
10515         variable.
10516         (find_options): New function.
10517         (cmain): Call find_options.
10518         * include/grub/powerpc/ieee1275/ieee1275.h
10519         (grub_ieee1275_realmode): New extern variable.
10520         * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Only call
10521         grub_map if grub_ieee1275_realmode is false.
10523 2004-12-29  Marco Gerards  <metgerards@student.han.nl>
10525         * normal/cmdline.c (grub_cmdline_get): Redone logic so no empty
10526         lines are inserted and make it work like readline.  Reported by
10527         Vincent Pelletier <subdino2004@yahoo.fr>.
10529 2004-12-28  Marco Gerards  <metgerards@student.han.nl>
10531         * boot/powerpc/ieee1275/crt0.S (_start): Don't set up the stack.
10533         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCE): Remove
10534         `kern/powerpc/cache.S'.
10536 2004-12-27  Marco Gerards  <metgerards@student.han.nl>
10538         * genmk.rb: Handle the `Program' class in the main loop.  Written
10539         by Johan Rydberg <jrydberg@gnu.org>.
10540         (Program): New class.
10541         (programs): New variable.
10542         * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h>
10543         instead of "grub/machine/ieee1275.h".  Include <grub/kernel.h>
10544         instead of "grub/kernel.h".  Include <grub/machine/init.h>.
10545         (help_arch): Function removed.
10546         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add
10547         `powerpc/libgcc.h' and `loader.h'.
10548         (pkgdata_PROGRAMS): New variable.
10549         (sbin_UTILITIES): Variable removed.
10550         (grub_emu_SOURCES): Added kern/powerpc/cache.S.
10551         (grubof_SOURCES): Variable re-defined so it only includes the
10552         core functionality.
10553         (grubof_CFLAGS): Remove `-DGRUBOF'.
10554         (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS,
10555         (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES)
10556         (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS)
10557         (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES)
10558         (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS)
10559         (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES)
10560         (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS)
10561         (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS)
10562         (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES)
10563         (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS)
10564         (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
10565         (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES)
10566         (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS)
10567         (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES)
10568         (pc_mod_CFLAGS): New variables.
10569         * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>.
10570         (grub_ofdisk_iterate): Add a prototype for `dev_iterate'.
10571         * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype.
10572         * include/grub/loader.h (grub_os_area_addr, grub_os_area_size):
10573         Moved from here...
10574         * include/grub/i386/pc/init.h (grub_os_area_addr)
10575         (rub_os_area_size): ... to here.
10576         * include/grub/powerpc/ieee1275/ieee1275.h
10577         (grub_ieee1275_entry_fn): Export symbol.
10578         * include/grub/powerpc/ieee1275/init.h: New file.
10579         * include/grub/powerpc/libgcc.h: Likewise.
10580         * include/grub/cache.h: Likewise.
10581         * kern/powerpc/cache.S: Likewise.  Written by Hollis Blanchard
10582         <hollis@penguinppc.org>.
10583         * kern/dl.c: Include <grub/cache.h>.
10584         (grub_dl_flush_cache): New function.
10585         (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache
10586         for this module.
10587         * kern/powerpc/ieee1275/init.c (grub_ofdisk_init)
10588         (grub_console_init): Removed prototypes.
10589         (grub_machine_init): Don't initialize the modules anymore.
10590         * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function
10591         static.
10592         * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN):
10593         Macro undef removed.
10594         (GRUB_HOST_WORDS_BIGENDIAN): New macro.
10595         * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add
10596         relocation `R_PPC_REL32'.  Return an error when the relocation is
10597         unknown.
10598         * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'.
10599         * kern/i386/pc/init.c (grub_arch_sync_caches): New function.
10600         * util/misc.c (grub_arch_sync_caches): Likewise.
10602 2004-12-19  Marco Gerards  <metgerards@student.han.nl>
10604         * conf/powerpc-ieee1275.rmk (MOSTLYCLEANFILES): Remove
10605         `symlist.c', add `grubof_symlist.c'.
10606         (symlist.c): Variable removed.
10607         (grubof_HEADERS): Variable added.
10608         (grubof_symlist.c): New target.
10609         (kernel_syms.lst): Use `grubof_HEADERS' instead of
10610         `kernel_img_HEADERS'.
10611         (grubof_SOURCES): Add `kern/powerpc/dl.c' and `grubof_symlist.c'.
10612         * kern/powerpc/dl.c: New file.
10613         * kern/powerpc/ieee1275/init.c (grub_arch_dl_check_header):
10614         Function removed.
10615         (grub_arch_dl_relocate_symbols): Likewise.
10616         (grub_register_exported_symbols): Likewise.
10618 2004-12-13  Marco Gerards  <metgerards@student.han.nl>
10620         * fs/ext2.c (grub_ext2_open): Don't use data after freeing it.
10621         (grub_ext2_dir): Likewise.  Don't return in case of an error, jump
10622         to fail instead.  Reported by Vincent Pelletier
10623         <subdino2004@yahoo.fr>.
10625         * fs/fshelp.c (grub_fshelp_find_file): Don't free `oldnode' when
10626         it is not allocated.  Reported by Vincent Pelletier
10627         <subdino2004@yahoo.fr>.
10629         * normal/cmdline.c (grub_tab_complete): Add a blank line to the
10630         output so the output looks better.
10632 2004-12-04  Marco Gerards  <metgerards@student.han.nl>
10634         Modulize the partition map support and add support for the amiga
10635         partition map.
10637         * commands/ls.c: Include <grub/partition.h> instead of
10638         <grub/machine/partition.h>.
10639         * kern/disk.c: Likewise.
10640         * kern/rescue.c: Likewise.
10641         * loader/i386/pc/chainloader.c: Likewise.
10642         * normal/cmdline.c: Likewise.
10643         * kern/powerpc/ieee1275/init.c: Likewise.
10644         (grub_machine_init): Call `grub_pc_partition_map_init',
10645         `grub_amiga_partition_map_init' and
10646         `grub_apple_partition_map_init'.
10647         * conf/i386-pc.rmk (kernel_img_SOURCES): Remove
10648         `disk/i386/pc/partition.c'.  Add `kern/partition.c'.
10649         (kernel_img_HEADERS): Remove `machine/partition.h'.  Add
10650         `partition.h' and `pc_partition.h'.
10651         (grub_setup_SOURCES): Remove
10652         `disk/i386/pc/partition.c'.  Add `kern/partition.c',
10653         `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
10654         (grub_emu_SOURCES): Likewise.
10655         (pkgdata_MODULES): Add `amiga.mod', `apple.mod' and `pc.mod'.
10656         (amiga_mod_SOURCES, amiga_mod_CFLAGS, apple_mod_SOURCES)
10657         (apple_mod_CFLAGS, pc_mod_SOURCES, pc_mod_CFLAGS): New variables.
10658         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
10659         `disk/powerpc/ieee1275/partition.c'.  Add `kern/partition.c',
10660         `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
10661         (grubof_SOURCES): Likewise.
10662         * disk/i386/pc/partition.c: File removed.
10663         * disk/powerpc/ieee1275/partition.c: Likewise.
10664         * include/grub/powerpc/ieee1275/partition.h: Likewise.
10665         * include/grub/i386/pc/partition.h: Likewise.
10666         * kern/partition.c: New file.
10667         * partmap/amiga.c: Likewise.
10668         * partmap/apple.c: Likewise.
10669         * partmap/pc.c: Likewise.
10670         * include/grub/partition.h: Likewise..
10671         * include/grub/pc_partition.h: Likewise.
10672         * util/grub-emu.c: Include <grub/partition.h> instead of
10673         <grub/machine/partition.h>.
10674         (main): Call `grub_pc_partition_map_init',
10675         `grub_amiga_partition_map_init' and
10676         `grub_apple_partition_map_init' and deinitialize afterwards.
10677         * util/i386/pc/biosdisk.c: Include `#include
10678         <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
10679         `<grub/machine/partition.h>'.
10680         * util/i386/pc/grub-setup.c: Likewise.
10681         * util/i386/pc/biosdisk.c: Likewise.
10682         (grub_util_biosdisk_get_grub_dev): Only access the PC specific
10683         partition information in case of a PC partition.
10684         * util/i386/pc/grub-setup.c: Include `#include
10685         <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
10686         `<grub/machine/partition.h>'.
10687         (setup): Only access the PC specific partition information in case
10688         of a PC partition.
10690 2004-11-17  Hollis Blanchard  <hollis@penguinppc.org>
10692         * kern/powerpc/ieee1275/init.c (grub_setjmp): Remove function.
10693         (grub_longjmp): Likewise.
10694         * include/grub/powerpc/setjmp.h (grub_jmp_buf): Set array size to
10695         20.
10696         * normal/powerpc/setjmp.S: New file.
10697         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
10698         `normal/powerpc/setjmp.S'.
10699         (grubof_CFLAGS): Add `-DGRUBOF'.
10700         * include/grub/setjmp.h [GRUB_UTIL]: Changed condition to
10701         [GRUB_UTIL && !GRUBOF].
10703 2004-11-16  Marco Gerards  <metgerards@student.han.nl>
10705         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Skip any
10706         property named `name'.  Correctly handle the error returned by
10707         `grub_ieee1275_finddevice' if a device can not be opened.
10709 2004-11-02  Hollis Blanchard  <hollis@penguinppc.org>
10711         * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_readkey): Test
10712         `actual' for negativity.
10713         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
10714         kern/fshelp.c.
10716 2004-11-01  Marco Gerards  <metgerards@student.han.nl>
10718         * term/i386/pc/vga.c (VGA_HEIGHT): Changed to 350.
10719         (PAGE_OFFSET): New macro.
10720         (CRTC_ADDR_PORT): Likewise.
10721         (CRTC_DATA_PORT): Likewise.
10722         (START_ADDR_HIGH_REGISTER): Likewise.
10723         (START_ADDR_LOW_REGISTER): Likewise.
10724         (GRAPHICS_ADDR_PORT): Likewise.
10725         (GRAPHICS_DATA_PORT): Likewise.
10726         (READ_MAP_REGISTER): Likewise.
10727         (INPUT_STATUS1_REGISTER): Likewise.
10728         (INPUT_STATUS1_VERTR_BIT): Likewise.
10729         (page): New variable.
10730         (wait_vretrace): New function.
10731         (set_read_map): Likewise.
10732         (set_start_address): Likewise.
10733         (grub_vga_init): Use mode 0x10 instead of mode 0x12.  Switch to
10734         the right page.
10735         (check_vga_mem): Take the page into account.
10736         (write_char): Likewise.
10737         (write_cursor): Likewise.
10738         (scroll_up): Likewise.  Copy the page to the page that is not
10739         shown and switch between both pages.
10740         (grub_vga_putchar): Fix off by one error.
10741         (grub_vga_cls): Wait for the vertical retrace.  Take the page into
10742         account.
10744 2004-11-01  Marco Gerards  <metgerards@student.han.nl>
10746         Add support for iso9660 (including rockridge).
10748         * conf/i386-pc.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
10749         (iso9660_mod_SOURCES): New variable.
10750         (iso9660_mod_CFLAGS): Likewise.
10751         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
10752         * include/grub/fs.h (grub_iso9660_init): New prototype.
10753         * util/grub-emu.c (main): Call `grub_iso9660_init'.
10754         * fs/iso9660.c: New file.
10756         * include/grub/misc.h (grub_strncat): New prototype.
10757         * kern/misc.c (grub_strncat): New function.
10759         * fs/hfs.c (grub_hfs_mount): Translate the error
10760         `GRUB_ERR_OUT_OF_RANGE' to `GRUB_ERR_BAD_FS'.
10761         * fs/jfs.c (grub_jfs_mount): Likewise.
10762         * fs/ufs.c (grub_ufs_mount): Likewise.
10764 2004-10-28  Hollis Blanchard  <hollis@penguinppc.org>
10766         * boot/powerpc/ieee1275/cmain.c (cmain): Remove asm statements
10767         which initialized BAT registers.
10768         * boot/powerpc/ieee1275/ieee1275.c (IEEE1275_CALL_ENTRY_FN,
10769         grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
10770         Move from here...
10771         * include/grub/powerpc/ieee1275/ieee1275.h (IEEE1275_CALL_ENTRY_FN,
10772         grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
10773         ... to here.
10774         * kern/powerpc/ieee1275/openfw.c (grub_map): New function.
10775         (grub_mapclaim): Likewise.
10776         * loader/powerpc/ieee1275/linux.c (grub_load_linux): Use
10777         grub_mapclaim instead of grub_ieee1275_claim.  Assign linux_addr by
10778         hand.
10780 2004-10-19  Hollis Blanchard  <hollis@penguinppc.org>
10782         * conf/powerpc-ieee1275.rmk (COMMON_ASFLAGS): Remove -fno-builtin.
10783         (COMMON_CFLAGS): Remove -fno-builtin and -D__ASSEMBLY__. Add
10784         -ffreestanding and -msoft-float.
10786 2004-10-15  Hollis Blanchard  <hollis@penguinppc.org>
10788         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Do not
10789         append ":0" to devpath if the GRUB_IEEE1275_NO_PARTITION_0 flag is
10790         set in grub_ieee1275_flags.
10792 2004-10-14  Hollis Blanchard  <hollis@penguinppc.org>
10794         * include/grub/powerpc/ieee1275/ieee1275.h (abort): Add function
10795         prototype.
10796         * kern/powerpc/ieee1275/init.c (grub_machine_init): Call
10797         grub_console_init first.
10798         Change the memory range used for grub_ieee1275_claim and
10799         grub_mm_init_region.
10800         Print an error message if the claim fails.
10801         Include <grub/misc.h>.
10803 2004-10-13  Hollis Blanchard  <hollis@penguinppc.org>
10805         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_iterate):
10806         Call grub_children_iterate for device nodes of type `scsi',
10807         `ide', or `ata'.
10808         (grub_ofdisk_open): Remove manual device alias resolution.
10809         Fix memory leak when device cannot be opened.
10810         * include/grub/powerpc/ieee1275/ieee1275.h
10811         (grub_children_iterate): New prototype.
10812         * kern/powerpc/ieee1275/openfw.c (grub_children_iterate):
10813         New function.
10814         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
10815         Return -1 if args.size was -1.
10817 2004-10-11  Hollis Blanchard  <hollis@penguinppc.org>
10819         * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_flags): New global.
10820         (cmain): Accept 3 parameters. Test for 0xdeadbeef, indicating Old
10821         World Macintosh. If Old Wold, set flag in grub_ieee1275_flags; claim
10822         Open Firmware's memory for it; claim memory from _start to _end.
10823         * boot/powerpc/ieee1275/crt0.S (__bss_start): New extern.
10824         (_end): New extern.
10825         (_start): Zero BSS from __bss_start to _end.
10826         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
10827         New extern.
10828         (GRUB_IEEE1275_NO_PARTITION_0): New #define.
10830 2004-10-11  Hollis Blanchard  <hollis@penguinppc.org>
10832         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): Return
10833         -1 if args.base was -1.
10835 2004-10-08  Hollis Blanchard  <hollis@penguinppc.org>
10837         * term/powerpc/ieee1275/ieee1275.c (grub_ofconsole_cls): Use an ANSI
10838         escape sequence instead of a literal ^L. Also call
10839         grub_ofconsole_gotoxy.
10841 2004-10-03  Hollis Blanchard  <hollis@penguinppc.org>
10843         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): change
10844         void *  arguments to grub_addr_t.  All callers updated.  Also make
10845         the `result' argument optional.
10846         (grub_ieee1275_release): change void * arguments to grub_addr_t.
10847         All callers updated.
10849 2004-09-22  Hollis Blanchard  <hollis@penguinppc.org>
10851         * commands/ls.c (grub_ls_list_files): Use the string following the
10852         initial ')', if present, as the filesystem path.
10853         * kern/rescue.c (grub_rescue_cmd_ls): Likewise.
10855         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): List crt0.S first.
10857 2004-09-18  Yoshinori K. Okuji  <okuji@enbug.org>
10859         Make the source code of the menu interface more readable.
10861         * normal/menu.c: Include grub/mm.h.
10862         (TERM_WIDTH): New macro.
10863         (TERM_HEIGHT): Likewise.
10864         (TERM_INFO_HEIGHT): Likewise.
10865         (TERM_MARGIN): Likewise.
10866         (TERM_SCROLL_WIDTH): Likewise.
10867         (TERM_TOP_BORDER_Y): Likewise.
10868         (TERM_LEFT_BORDER_X): Likewise.
10869         (TERM_BORDER_WIDTH): Likewise.
10870         (TERM_MESSAGE_HEIGHT): Likewise.
10871         (TERM_BORDER_HEIGHT): Likewise.
10872         (TERM_NUM_ENTRIES): Likewise.
10873         (TERM_FIRST_ENTRY_Y): Likewise.
10874         (TERM_ENTRY_WIDTH): Likewise.
10875         (TERM_CURSOR_X): Likewise.
10876         (draw_border): Use macros instead of magic numbers.
10877         (print_entry): Likewise.
10878         (print_entries): Likewise.
10879         (run_menu): Likewise. Also, handle the key 'e'.
10880         (run_menu_entry): Ignore empty command lines.
10881         (print_message): Added a new argument EDIT. If EDIT is true,
10882         print a different message.
10883         (init_page): Likewise.
10884         (edit_menu_entry): New function. Not implemented yet.
10886 2004-09-17  Marco Gerards  <metgerards@student.han.nl>
10888         Add `linux.mod' and `multiboot.mod' so linux and multiboot kernels
10889         can be loaded from normal mode.
10891         * conf/i386-pc.rmk (pkgdata_MODULES): Add `linux.mod' and
10892         `multiboot.mod'.
10893         (linux_mod_SOURCES, linux_mod_CFLAGS, multiboot_mod_SOURCES)
10894         (multiboot_mod_CFLAGS): New variables.
10895         * loader/i386/pc/linux_normal.c: New file.
10896         * loader/i386/pc/multiboot_normal.c: Likewise.
10898         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Don't use the
10899         attribute `unused'.
10901         * fs/ext2.c (grub_ext2_iterate_dir): Fix typos in inode type.  Use
10902         `fdiro' to read the mode information from instead of `diro'.
10904         * fs/fshelp.c (grub_fshelp_find_file): Set type to foundtype after
10905         looking up a symlink.
10907         * include/grub/normal.h (GRUB_COMMAND_FLAG_NO_ARG_PARSE): New
10908         macro.
10909         * normal/command.c (grub_command_execute): Don't parse the
10910         arguments when `GRUB_COMMAND_FLAG_NO_ARG_PARSE' is set in the
10911         flags of the command.
10913         * normal/menu.c (grub_menu_run): Fix typo.
10915 2004-09-14  Hollis Blanchard  <hollis@penguinppc.org>
10917         * kern/powerpc/ieee1275/init.c (abort): Trap into Open Firmware.
10919         * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_gotoxy): Use
10920         `y + 1' instead of `y - 1'.
10922         * conf/powerpc-ieee1275.rmk (grubof_LDFLAGS): Add `-N' and `-S'.
10924 2004-09-14  Yoshinori K. Okuji  <okuji@enbug.org>
10926         From Hollis Blanchard <hollis@penguinppc.org>:
10927         * kern/misc.c (memmove): New alias for grub_memmove.
10928         (memcmp): New alias for grub_memcmp.
10929         (memset): New alias for grub_memset.
10930         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
10931         Change "int handle" to "grub_ieee1275_phandle_t handle".
10932         * include/grub/powerpc/ieee1275/ieee1275.h
10933         (grub_ieee1275_get_property): Likewise.
10935 2004-09-12  Tomas Ebenlendr  <ebik@ucw.cz>
10937         Added normal mode command `chainloader' as module chain.mod, which
10938         depends on normal.mod and _chain.mod.
10940         * conf/i386-pc.rmk (pkgdata_MODULES): Add `chain.mod'.
10941         (chain_mod_SOURCES, chain_mod_CFLAGS): Variables added.
10942         * include/grub/i386/pc/loader.h (grub_rescue_cmd_chainloader):
10943         Deleted prototype.
10944         * loader/i386/pc/chainloader.c (grub_rescue_cmd_chainloader): All
10945         but arguments parsing moved to ...
10946         (grub_chainloader_cmd): ... here.  New function.
10947         * include/grub/i386/pc/chainloader.h: New file.
10948         * loader/i386/pc/chainloader_normal.c: Likewise.
10950 2004-09-11  Marco Gerards  <metgerards@student.han.nl>
10952         * conf/i386-pc.rmk (kernel_img_SOURCES): Added kern/fshelp.c.
10953         (grub_mkimage_LDFLAGS): Likewise.
10954         (grub_emu_SOURCES): Likewise.
10955         (kernel_img_HEADERS): Added fshelp.h.
10956         * fs/ext2.c: Include <grub/fshelp.h>.
10957         (FILETYPE_REG): New macro.
10958         (FILETYPE_INO_REG): Likewise.
10959         (grub_ext_sblock): Renamed to `grub_ext2_sblock'.
10960         Changed all users.
10961         (ext2_block_group): Renamed to `grub_ext2_block_group'.  Changed
10962         all users.
10963         (grub_fshelp_node): New struct.
10964         (grub_ext2_data): Added member `diropen'.  Changed member `inode'
10965         to a pointer.
10966         (grub_ext2_get_file_block): Removed function.
10967         (grub_ext2_read_block): New function.
10968         (grub_ext2_read_file): Replaced parameter `data' by `node'.
10969         This function was written.
10970         (grub_ext2_mount): Read the root inode.  Create a diropen struct.
10971         (grub_ext2_find_file): Removed function.
10972         (grub_ext2_read_symlink): New function.
10973         (grub_ext2_iterate_dir): Likewise.
10974         (grub_ext2_open): Rewritten.
10975         (grub_ext2_dir): Rewritten.
10976         * include/grub/fshelp.h: New file.
10977         * fs/fshelp.c: Likewise.
10979 2004-09-10  Yoshinori K. Okuji  <okuji@enbug.org>
10981         * normal/menu.c: Include grub/loader.h and grub/machine/time.h.
10982         (print_message): Add a missing newline.
10983         (run_menu): Added timeout support.
10984         (run_menu_entry): New local function.
10985         (grub_menu_run): Added support for booting.
10987         * kern/loader.c (grub_loader_is_loaded): New function.
10989         * include/grub/powerpc/ieee1275/time.h: Include grub/symbol.h.
10990         (grub_get_rtc): Exported.
10992         * include/grub/i386/pc/time.h: Include grub/symbol.h.
10993         (grub_get_rtc): Exported.
10995         * include/grub/normal.h (struct grub_command_list): Remove
10996         constant from the member `command'.
10998         * include/grub/loader.h (grub_loader_is_loaded): Declared.
11000         * include/grub/err.h (GRUB_ERR_INVALID_COMMAND): New constant.
11002         * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/time.h.
11004 2004-08-28  Marco Gerards  <metgerards@student.han.nl>
11006         Add support for the JFS filesystem.
11008         * fs/jfs.c: New file.
11009         * include/grub/fs.h (grub_jfs_init): New prototype.
11010         (grub_jfs_fini): New prototype.
11011         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/jfs.c.
11012         (grub_emu_SOURCES): Likewise.
11013         (pkgdata_MODULES): Add jfs.mod.
11014         (jfs_mod_SOURCES): New variable.
11015         (jfs_mod_CFLAGS): Likewise.
11016         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs.jfs.c.
11017         (grubof_SOURCES): Likewise.
11018         * util/grub-emu.c (main): Initialize and deinitialize JFS support.
11020         * fs/fat.c (grub_fat_find_dir): Convert the filename little
11021         endian to the host endian.
11022         (grub_fat_utf16_to_utf8): Move function from there...
11023         * kern/misc.c (grub_utf16_to_utf8): ...to here.  Do not convert
11024         the endianness of the source string anymore.
11025         * include/grub/misc.h (grub_utf16_to_utf8): New prototype.
11027 2004-08-24  Marco Gerards  <metgerards@student.han.nl>
11029         * commands/boot.c (grub_boot_init) [GRUB_UTIL]: Make conditional.
11030         (grub_boot_fini) [GRUB_UTIL]: Likewise.
11031         (GRUB_MOD_INIT) [!GRUB_UTIL]: Likewise.
11032         (GRUB_MOD_FINI) [!GRUB_UTIL]: Likewise.
11034         * fs/hfs.c (grub_hfs_find_node): Add a prototype for `node_found'.
11035         (grub_hfs_iterate_dir): Make the function static.  Add prototypes
11036         for `node_found' and `it_dir'.
11037         (grub_hfs_dir): Add prototype for `dir_hook'.
11039         * fs/minix.c (grub_minix_get_file_block): Add prototype for
11040         `grub_get_indir'.  Rename `indir' in two blocks to `indir16'
11041         and `indir32' to silence a gcc warning.
11043         * include/grub/fs.h (grub_hfs_init): New prototype.
11044         (grub_hfs_fini): Likewise.
11047 2004-08-21  Yoshinori K. Okuji  <okuji@enbug.org>
11049         Each disk device has its own id now. This is useful to make use
11050         of multiple disk devices.
11052         * include/grub/disk.h (grub_disk_dev_id): New enum.
11053         (GRUB_DISK_DEVICE_BIOSDISK_ID): New constant.
11054         (GRUB_DISK_DEVICE_OFDISK_ID): Likewise.
11056         * disk/i386/pc/biosdisk.c (grub_biosdisk_dev): Specify
11057         GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
11059         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_dev): Specify
11060         GRUB_DISK_DEVICE_OFDISK_ID as an id.
11062         * util/i386/pc/biosdisk.c (grub_util_biosdisk_dev): Specify
11063         GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
11065         * include/grub/disk.h (struct grub_disk_dev): Added a new member
11066         "id" which is used by the cache manager.
11068         * normal/main.c (grub_normal_init_page): Use "GNU GRUB" instead
11069         of just "GRUB".
11071 2004-08-18  Marco Gerards  <metgerards@student.han.nl>
11073         * fs/hfs.c: New file.
11074         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/hfs.c.
11075         (grub_emu_SOURCES): Likewise.
11076         (pkgdata_MODULES): Add hfs.mod.
11077         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/hfs.c.
11078         (grubof_SOURCES): Likewise.
11079         * util/grub-emu.c (main): Initialize and deinitialize HFS support.
11081         * include/grub/misc.h (grub_strncasecmp): Add prototype.
11082         * kern/misc.c (grub_strncasecmp): Add function.
11084 2004-08-14  Marco Gerards  <metgerards@student.han.nl>
11086         * include/grub/arg.h (GRUB_ARG_OPTION_OPTIONAL): Surround macro
11087         with parentheses.
11089         * fs/ext2.c (FILETYPE_UNKNOWN): New macro.
11090         (grub_ext2_dir): In case the directory entry type is unknown, read
11091         it from the inode.
11093 2004-08-02  Peter Bruin  <pjbruin@dds.nl>
11095         * loader/powerpc/ieee1275/linux.c (grub_linux_init): Pass
11096         grub_load_linux instead of grub_rescue_cmd_linux as second
11097         argument of grub_rescue_register_command.
11099         * Makefile.in (RMKFILES): Add conf/powerpc-ieee1275.rmk.
11101 2004-07-27  Marco Gerards  <metgerards@student.han.nl>
11103         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_release): New
11104         function.
11105         * commands/boot.c: Remove the check for `GRUB_UTIL'.
11106         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
11107         `loader/powerpc/ieee1275/linux.c',
11108         `loader/powerpc/ieee1275/linux_normal.c' and `commands/boot.c'.
11109         * include/grub/powerpc/ieee1275/ieee1275.h
11110         (grub_ieee1275_release): New prototype.
11111         * include/grub/powerpc/ieee1275/loader.h: Rewritten.
11112         * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize
11113         normal, boot, linux and linux_normal.
11114         * loader/powerpc/ieee1275/linux.c: New file.
11115         * loader/powerpc/ieee1275/linux_normal.c: Likewise.
11117 2004-07-12  Marco Gerards  <metgerards@student.han.nl>
11119         * normal/arg.c (grub_arg_parse): Correct error handling after
11120         reallocating the argumentlist (check if `argl' is not null instead
11121         of checking if `args' is not null).
11122         * kern/mm.c (grub_realloc): Return the same pointer when using the
11123         same region, instead of returning the header address.
11125 2004-07-11  Marco Gerards  <metgerards@student.han.nl>
11127         * disk/powerpc/ieee1275/partition.c (grub_partition_iterate): Skip
11128         one block instead of two when looking for the initial partition.
11129         (grub_partition_probe): Initialize the local variable `p' with 0.
11130         Use base 10 for the grub_strtoul call.
11131         * kern/misc.c (grub_strncpy): Fix off by one bug.  Eliminated the
11132         need for one local variable.
11133         (grub_strtoul): Don't add the new value to `num', instead of that
11134         just assign it.
11136 2004-07-11  Marco Gerards  <metgerards@student.han.nl>
11138         * conf/i386-pc.rmk (pkgdata_IMAGE): Add pxeboot.img.
11139         (pxeboot_img_SOURCES): New variable.
11140         (pxeboot_img_ASFLAGS): Likewise.
11141         (pxeboot_img_LDFLAGS): Likewise.
11142         * boot/i386/pc/pxeboot.S: New file.  Based on pxeloader.S from
11143         GRUB Legacy and boot.S.  Adopted for GRUB 2 by lode leroy
11144         <lode_leroy@hotmail.com>.
11146 2004-06-27  Tomas Ebenlendr  <ebik@ucw.cz>
11148         * kern/rescue.c (grub_enter_rescue_mode): Don't continue when
11149         there was no input.
11151 2004-06-27  Tomas Ebenlendr  <ebik@ucw.cz>
11153         * normal/cmdline.c (grub_set_history): Fix off by one bug.  Fixed
11154         the history buffer logic.
11156 2004-06-27  Tomas Ebenlendr  <ebik@ucw.cz>
11158         * fs/ext2.c (FILETYPE_INO_MASK, FILETYPE_INO_DIRECTORY)
11159         (FILETYPE_INO_SYMLINK): New macros.
11160         (grub_ext2_find_file): Check if the node is a directory using the
11161         inode stat information instead of using the filetype in the
11162         dirent.  Exclude the first character of an absolute symlink.
11163         (grub_ext2_dir): Mask out the filetype part of the mode member of
11164         the inode.
11166 2004-05-24  Marco Gerards  <metgerards@student.han.nl>
11168         Add support for UFS version 1 and 2.  Add support for the minix
11169         filesystem version 1 and 2, both the variants with 14 and 30 long
11170         filenames.
11172         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ufs.c and
11173         fs/minix.c.
11174         (grub_emu_SOURCES): Likewise.
11175         (pkgdata_MODULES): Add ufs.mod and minix.mod.
11176         (ufs_mod_SOURCES): New variable.
11177         (ufs_mod_CFLAGS): Likewise.
11178         (minix_mod_SOURCES): Likewise.
11179         (minix_mod_CFLAGS): Likewise.
11180         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/ufs.c and
11181         fs/minix.c.
11182         (grubof_SOURCES): Likewise.
11183         * fs/ufs.c: New file.
11184         * fs/minix.c: New file.
11185         * include/grub/fs.h (grub_ufs_init): New prototype.
11186         (grub_ufs_fini): Likewise.
11187         (grub_minix_init): Likewise.
11188         (grub_minix_fini): Likewise.
11189         * util/grub-emu.c (main): Initialize and deinitialize UFS and
11190         minix fs.
11192 2004-04-30  Jeroen Dekkers  <jeroen@dekkers.cx>
11194         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add normal/arg.c,
11195         commands/ls.c, commands/terminal.c, commands/boot.c,
11196         commands/cmp.c and commands/cat.c.
11197         (grubof_LDFLAGS): Add -nostdlib -static-libgcc -lgcc.
11199         * kern/powerpc/ieee1275/init.c: Include "grub/env.h" instead of
11200         "env.h"
11202 2004-04-04  Yoshinori K. Okuji  <okuji@enbug.org>
11204         All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
11205         and grub_, respectively. Because the conversion is trivial and
11206         mechanical, I omit the details here. Please refer to the CVS
11207         if you need more information.
11209 2004-04-04  Yoshinori K. Okuji  <okuji@enbug.org>
11211         * include/pupa: Renamed to ...
11212         * include/grub: ... this.
11213         * util/i386/pc/pupa-mkimage.c: Renamed to ...
11214         * util/i386/pc/grub-mkimage.c: ... this.
11215         * util/i386/pc/pupa-setup.c: Renamed to ...
11216         * util/i386/pc/grub-setup.c: ... this.
11217         * util/pupa-emu.c: Renamed to ...
11218         * util/grub-emu.c: ... this.
11220 2004-03-29  Marco Gerards  <metgerards@student.han.nl>
11222         Add support for the newworld apple macintosh (PPC).  This has been
11223         tested on the powerbook 2000 only.  It only adds support for
11224         generic ieee1275 functions, console and disk support.  This should
11225         be easy to port to other architectures with support for Open
11226         Firmware.
11228         * configure.ac: Accept the powerpc as host_cpu.  In the case of
11229         the powerpc cpu set the host_vendor to ieee1275.  Make sure the i386
11230         specific tests are only executed while building for the i386.
11231         Inverse test for crosscompile.
11232         * genmk.rb (Utility): Allow assembler files.
11233         * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno.
11234         * conf/powerpc-ieee1275.rmk: New file.
11235         * disk/powerpc/ieee1275/ofdisk.c: Likewise.
11236         * disk/powerpc/ieee1275/partition.c: Likewise.
11237         * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise.
11238         * include/pupa/powerpc/ieee1275/console.h: Likewise.
11239         * include/pupa/powerpc/ieee1275/partition.h: Likewise.
11240         * include/pupa/powerpc/ieee1275/time.h: Likewise.
11241         * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise.
11242         * include/pupa/powerpc/ieee1275/multiboot.h: Likewise.
11243         * include/pupa/powerpc/ieee1275/loader.h
11244         * include/pupa/powerpc/setjmp.h: Likewise.
11245         * include/pupa/powerpc/types.h: Likewise.
11246         * kern/powerpc/ieee1275/init.c: Likewise.
11247         * kern/powerpc/ieee1275/openfw.c: Likewise.
11248         * term/powerpc/ieee1275/ofconsole.c: Likewise.
11250         These files were written by Johan Rydberg
11251         (jrydberg@night.trouble.net) and I only modified them slightly.
11253         * boot/powerpc/ieee1275/cmain.c: New file.
11254         * boot/powerpc/ieee1275/crt0.S: Likewise.
11255         * boot/powerpc/ieee1275/ieee1275.c: Likewise.
11256         * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
11258 2004-03-14  Jeroen Dekkers  <jeroen@dekkers.cx>
11260         * Makefile.in: Update copyright.
11261         * genmodsrc.sh: Likewise.
11262         * gensymlist.sh: Likewise.
11263         * term/i386/pc/vga.c: Indent correctly.
11265         * util/i386/pc/pupa-mkimage.c (usage): Use PACKAGE_BUGREPORT as
11266         bugreporting address.
11267         * util/i386/pc/pupa-setup.c (usage): Likewise,
11268         (main): Call pupa_ext2_init and pupa_ext2_fini.
11270         * fs/fat.c (log2): Renamed to ...
11271         (fat_log2): ... this.
11272         All callers changed.
11273         * kern/misc.c (memcpy): Alias to pupa_memmove.
11274         * loader/i386/pc/multiboot.c (pupa_rescue_cmd_multiboot): Fix
11275         lvalue cast.
11276         * util/console.c (pupa_ncurses_fini): Return 0.
11278         * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open)[__linux__]:
11279         Move fail label here.
11280         [__GNU__]: Don't warn when using stat.
11281         (open_device)[!__linux__]: Check if FD < 0 instead of !FD.
11282         (pupa_util_biosdisk_get_pupa_dev)[__GNU__]: Change type of N to
11283         long int. Use strtol instead of strtoul.
11285 2004-03-14  Marco Gerards  <metgerards@student.han.nl>
11287         * commands/boot.c: New file.
11288         * commands/cat.c: Likewise.
11289         * commands/cmp.c: Likewise.
11290         * commands/ls.c: Likewise.
11291         * commands/terminal.c: Likewise.
11292         * normal/command.c: Include <pupa/env.h> and <pupa/dl.h>.
11293         (pupa_register_command): Changed interface to match the new
11294         argument parser.
11295         (pupa_command_execute): Changed (almost rewritten) so it uses
11296         pupa_split_command.  Added support for setting variables using the
11297         syntax `foo=bar'.
11298         (rescue_command): Changed to work with the new argument parser.
11299         (terminal_command): Moved from here to commands/terminal.c.
11300         (set_command): New function.
11301         (unset_command): New function.
11302         (insmod_command): New function.
11303         (rmmod_command): New function.
11304         (lsmod_command): New function.
11305         (pupa_command_init): Don't initialize the command terminal
11306         anymore.  Initialize the commands set, unset, insmod, rmmod and
11307         lsmod.
11308         * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/env.c.
11309         (kernel_img_HEADERS): Add arg.h and env.h.
11310         (pupa_mkimage_LDFLAGS): Add kern/env.c.
11311         (pupa_emu_SOURCES): Add kern/env.c, commands/ls.c,
11312         commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c,
11313         normal/arg.c.
11314         (pkgdata_MODULES): Add ls.mod, boot.mod, cmp.mod, cat.mod and
11315         terminal.mod.
11316         (normal_mod_SOURCES): Add normal/arg.c and normal/arg.c.
11317         (boot_mod_SOURCES): New variable.
11318         (terminal_mod_SOURCES): Likewise.
11319         (ls_mod_SOURCES): Likewise.
11320         (cmp_mod_SOURCES): Likewise.
11321         (cat_mod_SOURCES): Likewise.
11323         * normal/arg.c: New file.
11324         * kern/env.c: Likewise.
11325         * include/pupa/arg.h: Likewise.
11326         * include/pupa/env.h: Likewise.
11327         * font/manager.c (font_command): Changed to match argument parsing
11328         interface changes.
11329         (PUPA_MOD_INIT): Likewise.
11330         * hello/hello.c (pupa_cmd_hello): Likewise.
11331         (PUPA_MOD_INIT): Likewise.
11332         * include/pupa/disk.h: Include <pupa/device.h>.
11333         (pupa_print_partinfo): New prototype.
11334         * include/pupa/dl.h (pupa_dl_set_prefix): Prototype removed.
11335         (pupa_dl_get_prefix): Likewise.
11336         * include/pupa/misc.h: Include <pupa/err.h>.
11337         (pupa_isgraph): New prototype.
11338         (pupa_isdigit): Likewise.
11339         (pupa_split_cmdline): Likewise.
11340         * include/pupa/normal.h: Include <pupa/arg.h>.
11341         (pupa_command): Changed the prototype of the member `func' to
11342         match the argument parsing interface.  Added member `options'.
11343         (pupa_register_command): Updated to match function.
11344         (pupa_arg_parse): New prototype.
11345         (pupa_hello_init) [PUPA_UTIL]: New prototype.
11346         (pupa_hello_fini) [PUPA_UTIL]: Likewise.
11347         (pupa_ls_init) [PUPA_UTIL]: Likewise.
11348         (pupa_ls_fini) [PUPA_UTIL]: Likewise.
11349         (pupa_cat_init) [PUPA_UTIL]: Likewise.
11350         (pupa_cat_fini) [PUPA_UTIL]: Likewise.
11351         (pupa_boot_init) [PUPA_UTIL]: Likewise.
11352         (pupa_boot_fini) [PUPA_UTIL]: Likewise.
11353         (pupa_cmp_init) [PUPA_UTIL]: Likewise.
11354         (pupa_cmp_fini) [PUPA_UTIL]: Likewise.
11355         (pupa_terminal_init) [PUPA_UTIL]: Likewise.
11356         (pupa_terminal_fini) [PUPA_UTIL]: Likewise.
11357         * kern/disk.c: Include <pupa/file.h>.
11358         (pupa_print_partinfo): New function.
11359         * kern/dl.c: Include <pupa/env.h>.
11360         (pupa_dl_dir): Variable removed.
11361         (pupa_dl_load): Use the environment variable `prefix' instead of
11362         the variable pupa_dl_dir.
11363         (pupa_dl_set_prefix): Function removed.
11364         (pupa_dl_get_prefix): Likewise.
11365         * kern/i386/pc/init.c: Include <pupa/env.h>.
11366         (pupa_machine_init): Use the environment variable `prefix' instead of
11367         using pupa_dl_set_prefix to set the prefix.
11368         * kern/main.c: Include <pupa/env.h>.
11369         (pupa_set_root_dev): Use the environment variable `prefix' instead of
11370         using pupa_dl_get_prefix to get the prefix.
11371         * kern/misc.c: Include <pupa/env.h>.
11372         (pupa_isdigit): New function.
11373         (pupa_isgraph): Likewise.
11374         (pupa_ftoa): Likewise.
11375         (pupa_vsprintf): Added support for printing values of the type
11376         `double'.  Make it possible to format variable output when using
11377         formatting like `%1.2%f'.
11378         (pupa_split_cmdline): New function.
11379         * kern/rescue.c: Include <pupa/env.h>.
11380         (next_word): Removed function.
11381         (pupa_rescue_cmd_prefix): Likewise.
11382         (pupa_rescue_cmd_set): New function.
11383         (pupa_rescue_cmd_unset): New function.
11384         (pupa_enter_rescue_mode): Use the `pupa_split_cmdline' function to
11385         split the command line instead of splitting it here.  Added
11386         support for setting variables using the syntax `foo=bar'.  Don't
11387         initialize the prefix command anymore.  Initialized the set and
11388         unset commands.
11389         * normal/cmdline.c: Include <pupa/env.h>.
11390         (pupa_tab_complete): Added prototypes for print_simple_completion,
11391         print_partition_completion, add_completion, iterate_commands,
11392         iterate_dev, iterate_part and iterate_dir. Moved code to print
11393         partition information from here to kern/disk.c.
11394         (pupa_cmdline_run): Don't check if the function exists anymore.
11395         * normal/main.c: Include <pupa/env.h>.
11396         (pupa_rescue_cmd_normal): Use the environment variable `prefix'
11397         instead of using pupa_dl_get_prefix to get the prefix.
11398         * term/i386/pc/vga.c: Include <pupa/arg.h>.
11399         (check_vga_mem): Cast pointers to `void *' to silence a gcc
11400         warning.
11401         (pupa_vga_putchar) [! DEBUG_VGA]: Removed for this case.
11402         (pupa_vga_setcolor): Declare unused variables with `__attribute__
11403         ((unused))' to silence a gcc warning.
11404         (pupa_vga_setcolor): Likewise.
11405         (debug_command): Changed to match argument parsing
11406         interface changes.
11407         * util/pupa-emu.c: Include <pupa/env.h>.
11408         (options): Added 0's for unused fields to silence a gcc warning.
11409         (argp): Likewise.
11410         (main): Use the environment variable `prefix' instead of using
11411         pupa_dl_set_prefix to set the prefix.  Initialize the commands ls,
11412         boot, cmp, cat and terminal.  Finish the commands boot, cmp, cat
11413         and terminal.
11415         * util/i386/pc/getroot.c: Include <pupa/i386/pc/util/biosdisk.h>.
11416         * util/misc.c: Include <malloc.h>.
11417         (pupa_malloc): Rewritten so errors are correctly reported.
11418         (pupa_realloc): Likewise.
11419         (pupa_memalign): Likewise.
11420         (pupa_mm_init_region): Declare unused variables with
11421         `__attribute__ ((unused))' to silence a gcc warning.
11422         * normal/i386/setjmp.S: Remove tab at the end of the file to
11423         silence a gcc warning.
11424         * loader/i386/pc/linux.c (pupa_rescue_cmd_initrd): Declare unused
11425         variables with `__attribute__ ((unused))' to silence a gcc
11426         warning.
11427         * loader/i386/pc/multiboot.c (pupa_multiboot_unload): Make the
11428         local variable i unsigned to silence a gcc warning.
11430         * kern/term.c: Include <pupa/misc.h>.
11431         (pupa_more_lines): New variable.
11432         (pupa_more): Likewise.
11433         (pupa_putcode): When the pager is active pause at the end of every
11434         screen.
11435         (pupa_set_more): New function.
11436         * include/pupa/term.h (pupa_set_more): New prototype.
11439 2004-03-07  Yoshinori K. Okuji  <okuji@enbug.org>
11441         Now this project is GRUB 2 rather than PUPA. The location of
11442         the CVS repository was moved to GRUB's.
11444         * configure.ac: Use bug-grub as the reporting address.
11445         Use GRUB instead of PUPA.
11446         Change the version number to 1.90.
11448 2004-02-24  Yoshinori K. Okuji  <okuji@enbug.org>
11450         * genkernsyms.sh: Updated copyright information.
11451         * genmk.rb: Likewise.
11452         * genmodsrc.sh: Likewise.
11453         * gensymlist.sh: Likewise.
11454         * boot/i386/pc/boot.S: Likewise.
11455         * boot/i386/pc/diskboot.S: Likewise.
11456         * disk/i386/pc/biosdisk.c: Likewise.
11457         * disk/i386/pc/partition.c: Likewise.
11458         * font/manager.c: Likewise.
11459         * fs/ext2.c: Likewise.
11460         * fs/fat.c: Likewise.
11461         * include/pupa/boot.h: Likewise.
11462         * include/pupa/device.h: Likewise.
11463         * include/pupa/disk.h: Likewise.
11464         * include/pupa/dl.h: Likewise.
11465         * include/pupa/elf.h: Likewise.
11466         * include/pupa/err.h: Likewise.
11467         * include/pupa/file.h: Likewise.
11468         * include/pupa/font.h: Likewise.
11469         * include/pupa/fs.h: Likewise.
11470         * include/pupa/kernel.h: Likewise.
11471         * include/pupa/loader.h: Likewise.
11472         * include/pupa/misc.h: Likewise.
11473         * include/pupa/mm.h: Likewise.
11474         * include/pupa/net.h: Likewise.
11475         * include/pupa/normal.h: Likewise.
11476         * include/pupa/rescue.h: Likewise.
11477         * include/pupa/setjmp.h: Likewise.
11478         * include/pupa/symbol.h: Likewise.
11479         * include/pupa/term.h: Likewise.
11480         * include/pupa/types.h: Likewise.
11481         * include/pupa/i386/setjmp.h: Likewise.
11482         * include/pupa/i386/types.h: Likewise.
11483         * include/pupa/i386/pc/biosdisk.h: Likewise.
11484         * include/pupa/i386/pc/boot.h: Likewise.
11485         * include/pupa/i386/pc/console.h: Likewise.
11486         * include/pupa/i386/pc/init.h: Likewise.
11487         * include/pupa/i386/pc/kernel.h: Likewise.
11488         * include/pupa/i386/pc/linux.h: Likewise.
11489         * include/pupa/i386/pc/loader.h: Likewise.
11490         * include/pupa/i386/pc/memory.h: Likewise.
11491         * include/pupa/i386/pc/multiboot.h: Likewise.
11492         * include/pupa/i386/pc/partition.h: Likewise.
11493         * include/pupa/i386/pc/time.h: Likewise.
11494         * include/pupa/i386/pc/vga.h: Likewise.
11495         * include/pupa/i386/pc/util/biosdisk.h: Likewise.
11496         * include/pupa/util/getroot.h: Likewise.
11497         * include/pupa/util/misc.h: Likewise.
11498         * include/pupa/util/resolve.h: Likewise.
11499         * kern/device.c: Likewise.
11500         * kern/disk.c: Likewise.
11501         * kern/dl.c: Likewise.
11502         * kern/err.c: Likewise.
11503         * kern/file.c: Likewise.
11504         * kern/fs.c: Likewise.
11505         * kern/loader.c: Likewise.
11506         * kern/main.c: Likewise.
11507         * kern/misc.c: Likewise.
11508         * kern/mm.c: Likewise.
11509         * kern/rescue.c: Likewise.
11510         * kern/term.c: Likewise.
11511         * kern/i386/dl.c: Likewise.
11512         * kern/i386/pc/init.c: Likewise.
11513         * kern/i386/pc/lzo1x.S: Likewise.
11514         * kern/i386/pc/startup.S: Likewise.
11515         * loader/i386/pc/chainloader.c: Likewise.
11516         * loader/i386/pc/linux.c: Likewise.
11517         * loader/i386/pc/multiboot.c: Likewise.
11518         * normal/cmdline.c: Likewise.
11519         * normal/command.c: Likewise.
11520         * normal/main.c: Likewise.
11521         * normal/menu.c: Likewise.
11522         * normal/i386/setjmp.S: Likewise.
11523         * term/i386/pc/console.c: Likewise.
11524         * term/i386/pc/vga.c: Likewise.
11525         * util/console.c: Likewise.
11526         * util/genmoddep.c: Likewise.
11527         * util/misc.c: Likewise.
11528         * util/pupa-emu.c: Likewise.
11529         * util/resolve.c: Likewise.
11530         * util/unifont2pff.rb: Likewise.
11531         * util/i386/pc/biosdisk.c: Likewise.
11532         * util/i386/pc/getroot.c: Likewise.
11533         * util/i386/pc/pupa-mkimage.c: Likewise.
11534         * util/i386/pc/pupa-setup.c: Likewise.
11536 2004-02-15  Jeroen Dekkers  <jeroen@dekkers.cx>
11538         * fs/ext2.c (pupa_ext2_read_file): Correct the value of BLOCKEND
11539         when it is EXT2_BLOCK_SIZE (data).  New argument READ_HOOK, all
11540         callers changed.  Set DATA->DISK->READ_HOOK to READ_HOOK before
11541         reading and reset it after reading.
11542         (pupa_ext2_close): Return PUPA_ERR_NONE.
11544         * include/pupa/i386/pc/linux.h (PUPA_LINUX_INITRD_MAX_ADDRESS):
11545         Correct value.
11546         (struct linux_kernel_header): Add kernel_version and
11547         initrd_addr_max.
11548         * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Check whether
11549         pupa_file_read succeeds.
11550         (pupa_rescue_cmd_initrd): Implement.
11552 2003-12-03  Marco Gerards  <metgerards@student.han.nl>
11554         * fs/ext2.c (pupa_ext2_label): New function.
11555         (pupa_ext2_fs): Added label.
11556         * fs/fat.c (pupa_fat_label): New function.
11557         (pupa_fat_fs): Added label.
11558         * include/pupa/fs.h (struct pupa_fs): Added prototype label.
11560         * kern/misc.c (pupa_strndup): New function.
11561         * include/pupa/misc.h (pupa_strndup): New prototype.
11563         * include/pupa/normal.h: Include <pupa/err.h>.
11564         (pupa_set_history): New prototype.
11565         (pupa_iterate_commands): New prototype.
11566         * normal/cmdline.c: Include <pupa/machine/partition.h>,
11567         <pupa/disk.h>, <pupa/file.h>.
11568         (hist_size): New variable.
11569         (hist_lines): Likewise.
11570         (hist_end): Likewise.
11571         (hist_used): Likewise.
11572         (pupa_set_history): New function.
11573         (pupa_history_get): Likewise.
11574         (pupa_history_add): Likewise.
11575         (pupa_history_replace): Likewise.
11576         (pupa_tab_complete): Likewise.
11577         (pupa_cmdline_run): Added tab completion and history buffer.  Tab
11578         completion shows partitionnames while completing partitions, this
11579         feature was suggested by Jeff Bailey.
11580         * normal/command.c (pupa_iterate_commands): New function.
11581         * normal/main.c (PUPA_DEFAULT_HISTORY_SIZE): New macro.
11582         (pupa_normal_init): Initialize history buffer.
11583         (PUPA_MOD_INIT): Likewise.
11584         (pupa_normal_fini): Free the history buffer.
11585         (PUPA_MOD_FINI): Likewise.
11587         * util/console.c (pupa_ncurses_getkey): Accept 127 as backspace
11588         key.
11590         * aclocal.m4 (pupa_I386_CHECK_REGPARM_BUG): New DEFUN.
11591         * configure.ac [i386]: Check for regparam bug.
11592         (NESTED_FUNC_ATTR) [! i386]: Defined.
11594 2003-11-17  Marco Gerards  <metgerards@student.han.nl>
11596         * conf/i386-pc.rmk (sbin_UTILITIES): Added pupa-emu.
11597         (pupa_setup_SOURCES): Added util/i386/pc/getroot.c.
11598         (pupa_emu_SOURCES): New variable.
11599         (pupa_emu_LDFLAGS): Likewise.
11600         * include/pupa/fs.h (pupa_ext2_init) [PUPA_UTIL]: New prototype.
11601         (pupa_ext2_fini) [PUPA_UTIL]: Likewise.
11602         * include/pupa/normal.h (pupa_normal_init) [PUPA_UTIL]: Likewise.
11603         (pupa_normal_fini) [PUPA_UTIL]: Likewise.
11604         * include/pupa/setjmp.h [PUPA_UTIL]: Include <setjmp.h>.
11605         (pupa_jmp_buf): New typedef.
11606         (pupa_setjmp) [PUPA_UTIL]: New macro.
11607         (pupa_longjmp) [PUPA_UTIL]: Likewise.
11608         * include/pupa/term.h (struct pupa_term): New member `refresh'.
11609         (pupa_refresh): New prototype.
11610         * include/pupa/util/getroot.h: New file.
11611         * kern/misc.c (pupa_vsprintf): Refresh the screen after updating
11612         it.
11613         * kern/rescue.c (pupa_rescue_get_command_line): Likewise.
11614         (pupa_rescue_cmd_cat): Likewise.
11615         (pupa_rescue_cmd_ls): Likewise.
11616         (pupa_rescue_cmd_testload): Likewise.
11617         (pupa_rescue_cmd_lsmod): Likewise.
11618         * normal/cmdline.c (pupa_cmdline_get): Likewise.
11619         * normal/menu.c (run_menu): Likewise.
11620         * kern/term.c (pupa_cls): Likewise.
11621         (pupa_refresh): New function.
11622         * normal/normal.c (pupa_normal_init) [PUPA_UTIL]: New function.
11623         (pupa_normal_fini) [PUPA_UTIL]: Likewise.
11624         * util/console.c: New file.
11626         * util/i386/pc/getroot.c: New file.
11627         * util/i386/pc/pupa-setup.c: Include <pupa/util/getroot.h>.
11628         (pupa_putchar): New function.
11629         (pupa_refresh): Likewise.
11630         (xgetcwd): Function moved to ...
11631         (strip_extra_slashes): Likewise.
11632         (get_prefix): Likewise.
11633         * util/i386/pc/getroot.c: ... here.
11634         (find_root_device): Function moved and renamed to...
11635         * util/i386/pc/getroot.c (pupa_find_root_device): ... here.
11636         Changed all callers.
11637         * util/i386/pc/pupa-setup.c (guess_root_device): Function moved
11638         and renamed to...
11639         * util/i386/pc/getroot.c (pupa_guess_root_device): ... here.
11640         Changed all callers.
11641         * util/misc.c (pupa_memalign): New function.
11642         (pupa_mm_init_region): Likewise.
11643         (pupa_register_exported_symbols): Likewise.
11644         (pupa_putchar): Function removed.
11645         * util/pupa-emu.c: New file.
11647 2003-11-16  Jeroen Dekkers  <jeroen@dekkers.cx>
11649         * conf/i386-pc.rmk (pkgdata_MODULES): Add _multiboot.mod.
11650         (_multiboot_mod_SOURCES): New variable.
11651         (_multiboot_mod_CFLAGS): Likewise.
11652         * loader/i386/pc/multiboot.c: New file.
11653         * include/pupa/i386/pc/multiboot.h: Likewise.
11654         * kern/i386/pc/startup.S: Include pupa/machine/multiboot.h.
11655         (pupa_multiboot_real_boot): New function.
11656         * include/pupa/i386/pc/loader.h: Include pupa/machine/multiboot.h.
11657         (pupa_multiboot_real_boot): New prototype.
11658         (pupa_rescue_cmd_multiboot): Likewise
11659         (pupa_rescue_cmd_module): Likewise.
11661         * kern/loader.c (pupa_loader_set): Continue when
11662         pupa_loader_unload_func() fails.
11663         (pupa_loader_unset): New function.
11664         * include/pupa/loader.h (pupa_loader_unset): New prototype.
11666         * kern/misc.c (pupa_stpcpy): New function.
11667         * include/pupa/misc.h (pupa_stpcpy): New prototype.
11669 2003-11-12  Marco Gerards  <metgerards@student.han.nl>
11671         * disk/i386/pc/biosdisk.c (pupa_biosdisk_open): Correctly check
11672         for available extensions.
11674         * include/pupa/i386/pc/time.h: New file.
11675         * kern/disk.c: Include <pupa/machine/time.h>.
11676         (PUPA_CACHE_TIMEOUT): New macro.
11677         (pupa_last_time): New variable.
11678         (pupa_disk_open): Flush the cache when there was a timeout.
11679         (pupa_disk_close): Reset the timer.
11680         * kern/i386/pc/startup.S (pupa_get_rtc): Renamed from
11681         pupa_currticks.
11682         * util/misc.c: Include <sys/times.h>
11683         (pupa_get_rtc): New function.
11685 2003-11-09  Jeroen Dekkers  <jeroen@dekkers.cx>
11687         * fs/ext2.c (struct pupa_ext2_inode): Declare struct datablocks
11688         as blocks.
11689         (pupa_ext2_get_file_block): Use blocks member.
11691         * fs/ext2.c (pupa_ext2_read_file): Only set skipfirst for the
11692         first block. Return -1 instead of pupa_errno on error.
11694 2003-10-27  Marco Gerards  <metgerards@student.han.nl>
11696         * README: In the pupa-mkimage example use _chain instead of chain
11697         and ext2 instead of fat.
11698         * TODO: Replace ext2fs with jfs as an example.  Add an item for
11699         adding journal playback for ext2fs.
11700         * conf/i386-pc.rmk (pupa_setup_SOURCES): Added fs/ext2.c.
11701         (pkgdata_MODULES): Added ext2.mod.
11702         (ext2_mod_SOURCES): New variable.
11703         (ext2_mod_CFLAGS): Likewise.
11704         * include/pupa/err.h (pupa_err_t): Added PUPA_ERR_SYMLINK_LOOP.
11705         * include/pupa/misc.h (pupa_strncpy): New prototype.
11706         (pupa_strcat): Likewise.
11707         (pupa_strncmp): Likewise.
11708         * kern/misc.c (pupa_strcat): Enable function.
11709         (pupa_strncpy): New function.
11710         (pupa_strncmp): Likewise.
11711         * fs/ext2.c: New file.
11713         * kern/disk.c (pupa_disk_read): Set pupa_errno to PUPA_ERR_NONE
11714         when the read failed before retrying.
11715         * util/i386/pc/biosdisk.c (_LARGEFILE_SOURCE): Removed.
11716         (_FILE_OFFSET_BITS): Likewise.
11717         * configure.ac: Added AC_SYS_LARGEFILE.
11719 2003-09-25  Yoshinori K. Okuji  <okuji@enbug.org>
11721         * genmk.rb (PModule#rule): Make sure to get only symbol names
11722         from the output of nm.
11723         Reported by Robert Millan <zeratul2@wanadoo.es>.
11725 2003-09-25  Yoshinori K. Okuji  <okuji@enbug.org>
11727         I forgot to check in these changes for a long time. This adds
11728         incomplete support for VGA console, and this is still very
11729         buggy. Also, a lot of consideration is required for I18N,
11730         UNICODE, and VGA font issues. Therefore, assume that this is
11731         such that "better than nothing".
11733         * font/manager.c: New file.
11734         * include/pupa/font.h: Likewise.
11735         * include/pupa/i386/pc/vga.h: Likewise.
11736         * term/i386/pc/vga.c: Likewise.
11737         * util/unifont2pff.rb: Likewise.
11739         * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vga.h.
11740         (pkgdata_MODULES): Added vga.mod and font.mod.
11741         (vga_mod_SOURCES): New variables.
11742         (vga_mod_CFLAGS): Likewise.
11743         (font_mod_SOURCES): Likewise.
11744         (font_mod_CFLAGS): Likewise.
11746         * include/pupa/err.h (PUPA_ERR_BAD_FONT): New constant.
11748         * include/pupa/term.h: Include pupa/err.h.
11749         (struct pupa_term): Added init and fini.
11750         Changed the argument of putchar to pupa_uint32_t.
11752         * include/pupa/i386/pc/console.h: Include pupa/symbol.h.
11753         (pupa_console_real_putchar): New prototype.
11754         (pupa_console_putchar): Removed.
11755         (pupa_console_checkkey): Exported.
11756         (pupa_console_getkey): Likewise.
11758         * kern/misc.c (pupa_vsprintf): Add support for UNICODE
11759         characters.
11761         * kern/term.c (pupa_term_set_current): Rewritten.
11762         (pupa_putchar): Likewise.
11763         (pupa_putcode): New function.
11765         * kern/i386/pc/startup.S (pupa_console_putchar): Renamed to ...
11766         (pupa_console_real_putchar): ... this.
11767         (pupa_vga_set_mode): New function.
11768         (pupa_vga_get_font): Likewise.
11770         * normal/command.c: Include pupa/term.h.
11771         (terminal_command): New function.
11772         (pupa_command_init): Register the command "terminal".
11774         * normal/menu.c (DISP_LEFT): Changed to a UNICODE value.
11775         (DISP_UP): Likewise.
11776         (DISP_RIGHT): Likewise.
11777         (DISP_DOWN): Likewise.
11778         (DISP_HLINE): Likewise.
11779         (DISP_VLINE): Likewise.
11780         (DISP_UL): Likewise.
11781         (DISP_UR): Likewise.
11782         (DISP_LL): Likewise.
11783         (DISP_LR): Likewise.
11785         * term/i386/pc/console.c (pupa_console_putchar): New function.
11787 2003-02-08  NIIBE Yutaka  <gniibe@m17n.org>
11789         * util/resolve.c (pupa_util_resolve_dependencies): BUG
11790         FIX. Reverse the path_list.
11792         * include/pupa/normal.h: Export pupa_register_command and
11793         pupa_unregister_command.
11795         * hello/hello.c (pupa_cmd_hello): New module.
11796         * conf/i386-pc.rmk: Added hello.mod.
11798 2003-01-31  Yoshinori K. Okuji  <okuji@enbug.org>
11800         * kern/i386/pc/lzo1x.S: New file.
11802         * util/i386/pc/pupa-mkimage.c: Include lzo1x.h.
11803         (compress_kernel): New variable.
11804         (generate_image): Heavily modified to support compressing a
11805         large part of the core image.
11807         * util/misc.c (pupa_util_read_image): Fix a file descriptor
11808         leak.
11809         (pupa_util_load_image): New function.
11811         * kern/i386/pc/startup.S: Include pupa/machine/kernel.h.
11812         (pupa_compressed_size): New variable.
11813         (codestart): Enable Gate A20 here.
11814         Decompress the compressed part of the core image.
11815         Rearrange the code to put functions and variables which are
11816         required for initialization in the non-compressed part.
11817         Include lzo1x.S.
11819         * kern/i386/pc/init.c (pupa_machine_init): Don't enable Gate A20
11820         here.
11822         * include/pupa/util/misc.h (pupa_util_write_image): Declared.
11824         * include/pupa/i386/pc/kernel.h
11825         (PUPA_KERNEL_MACHINE_COMPRESSED_SIZE): New macro.
11826         (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): Increased by 4.
11827         (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
11828         (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
11829         (PUPA_KERNEL_MACHINE_RAW_SIZE): New macro.
11831         * conf/i386-pc.rmk (pupa_mkimage_LDFLAGS): New variable.
11833         * genmk.rb (Image#rule): Put LDFLAGS at the end of a line.
11834         (Utility#rule): Likewise.
11836         * configure.ac: Check if LZO is available.
11838 2003-01-20  Yoshinori K. Okuji  <okuji@enbug.org>
11840         * include/pupa/normal.h: New file.
11841         * include/pupa/setjmp.h: Likewise.
11842         * include/pupa/i386/setjmp.h: Likewise.
11843         * normal/cmdline.c: Likewise.
11844         * normal/command.c: Likewise.
11845         * normal/main.c: Likewise.
11846         * normal/menu.c: Likewise.
11847         * normal/i386/setjmp.S: Likewise.
11849         * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Made global.
11850         (pupa_rescue_cmd_initrd): Likewise.
11852         * loader/i386/pc/chainloader.c (pupa_rescue_cmd_chainloader):
11853         Likewise.
11855         * kern/i386/pc/startup.S (translation_table): New variable.
11856         (translate_keycode): New function.
11857         (pupa_console_getkey): Call translate_keycode.
11859         * kern/rescue.c (attempt_normal_mode): New function.
11860         (pupa_enter_rescue_mode): Attempt to execute the normal mode. If
11861         it failed, print a message.
11863         * kern/mm.c (pupa_real_malloc): Print more information when a
11864         free magic is broken.
11865         (pupa_free): If the first free header is not free actually, set
11866         it to P.
11868         * kern/main.c (pupa_load_normal_mode): Just load the module
11869         "normal".
11870         (pupa_main): Don't print the message
11871         "Entering into rescue mode..." here.
11873         * include/pupa/i386/pc/loader.h (pupa_rescue_cmd_initrd):
11874         Declared.
11875         (pupa_rescue_cmd_initrd): Likewise.
11876         (pupa_rescue_cmd_initrd): Likewise.
11878         * include/pupa/symbol.h (FUNCTION): Specify the type.
11879         (VARIABLE): Likewise.
11881         * include/pupa/err.h (pupa_err_t): Added
11882         PUPA_ERR_UNKNOWN_COMMAND.
11884         * include/pupa/dl.h (pupa_dl_set_prefix): Exported.
11885         (pupa_dl_get_prefix): Likewise.
11887         * conf/i386-pc.rmk (pkgdata_MODULES): Added normal.mod.
11888         Added _chain.mod and _linux.mod instead of chain.mod and
11889         linux.mod.
11890         (chain_mod_SOURCES): Renamed to ...
11891         (_chain_mod_SOURCES): ... this.
11892         (chain_mod_CFLAGS): Renamed to ...
11893         (_chain_mod_CFLAGS): ... this.
11894         (linux_mod_SOURCES): Renamed to ...
11895         (_linux_mod_SOURCES): ... this.
11896         (linux_mod_CFLAGS): Renamed to ...
11897         (_linux_mod_CFLAGS): ... this.
11898         (normal_mod_SOURCES): New variable.
11899         (normal_mod_CFLAGS): Likewise.
11900         (normal_mod_ASFLAGS): Likewise.
11902 2003-01-18  Yoshinori K. Okuji  <okuji@enbug.org>
11904         * kern/rescue.c (pupa_rescue_cmd_rmmod): Call pupa_dl_unload, if
11905         possible.
11907         * kern/dl.c (pupa_dl_ref): Refer depending modules
11908         recursively.
11909         (pupa_dl_unref): Unrefer depending modules recursively.
11910         Don't call pupa_dl_unload implicitly, because PUPA can crash if
11911         a module is unloaded before one depending on that module is
11912         unloaded.
11913         (pupa_dl_unload): Unload depending modules explicitly,
11914         if possible.
11916 2003-01-17  Yoshinori K. Okuji  <okuji@enbug.org>
11918         * include/pupa/i386/pc/linux.h: New file.
11919         * loader/i386/pc/linux.c: Likewise.
11921         * loader/i386/pc/chainloader.c (pupa_chainloader_boot_sector):
11922         Removed.
11923         (pupa_chainloader_unload): Return PUPA_ERR_NONE.
11924         (pupa_rescue_cmd_chainloader): Read the image to 0x7C00 instead
11925         of PUPA_CHAINLOADER_BOOT_SECTOR.
11927         * kern/i386/pc/startup.S: Include pupa/machine/linux.h.
11928         (pupa_linux_prot_size): New variable.
11929         (pupa_linux_tmp_addr): Likewise.
11930         (pupa_linux_real_addr): Likewise.
11931         (pupa_linux_boot_zimage): New function.
11932         (pupa_linux_boot_bzimage): Likewise.
11934         * kern/i386/pc/init.c (struct mem_region): New structure.
11935         (MAX_REGIONS): New macro.
11936         (mem_regions): New variable.
11937         (num_regions): Likewise.
11938         (pupa_os_area_addr): Likewise.
11939         (pupa_os_area_size): Likewise.
11940         (pupa_lower_mem): Likewise.
11941         (pupa_upper_mem): Likewise.
11942         (add_mem_region): New function.
11943         (compact_mem_regions): Likewise.
11944         (pupa_machine_init): Set PUPA_LOWER_MEM and PUPA_UPPER_MEM to
11945         the size of the conventional memory and that of so-called upper
11946         memory (before the first memory hole).
11947         Instead of adding each found region to free memory, use
11948         add_mem_region and add them after removing overlaps.
11949         Also, add only 1/4 of the upper memory to free memory. The rest
11950         is used for loading OS images. Maybe this is ad hoc, but this
11951         makes it much easier to relocate OS images when booting.
11953         * kern/rescue.c (pupa_rescue_cmd_module): Removed.
11954         (pupa_enter_rescue_mode): Don't register initrd and module.
11956         * kern/mm.c: Include pupa/dl.h.
11958         * kern/main.c: Include pupa/file.h and pupa/device.h.
11960         * kern/loader.c (pupa_loader_load_module_func): Removed.
11961         (pupa_loader_load_module): Likewise.
11963         * kern/dl.c (pupa_dl_load): Use the suffix ``.mod'' instead of
11964         ``.o''.
11966         * include/pupa/i386/pc/loader.h (pupa_linux_prot_size): Declared.
11967         (pupa_linux_tmp_addr): Likewise.
11968         (pupa_linux_real_addr): Likewise.
11969         (pupa_linux_boot_zimage): Likewise.
11970         (pupa_linux_boot_bzimage): Likewise.
11972         * include/pupa/i386/pc/init.h (pupa_lower_mem): Declared.
11973         (pupa_upper_mem): Likewise.
11974         (pupa_gate_a20): Don't export, because turning off Gate A20 in a
11975         module is too dangerous.
11977         * include/pupa/loader.h (pupa_os_area_addr): Declared.
11978         (pupa_os_area_size): Likewise.
11979         (pupa_loader_set): Remove the first argument. Loader doesn't
11980         manage modules or initrd any longer.
11981         (pupa_loader_load_module): Removed.
11983         * conf/i386-pc.rmk (pkgdata_MODULES): Added linux.mod.
11984         (linux_mod_SOURCES): New variable.
11985         (linux_mod_CFLAGS): Likewise.
11987 2003-01-07  Yoshinori K. Okuji  <okuji@enbug.org>
11989         * util/i386/pc/pupa-setup.c (setup): Convert the endianness of
11990         the length of a blocklist correctly.
11992         * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open) [__linux__]:
11993         Use ioctl only if the OS file is a block device.
11994         (pupa_util_biosdisk_open): Don't use ST.ST_BLOCKS, because it is
11995         not very useful for normal files.
11997         * kern/main.c (pupa_set_root_dev): New function.
11998         (pupa_load_normal_mode): Likewise.
11999         (pupa_main): Call those above.
12001         * include/pupa/types.h (pupa_swap_bytes16): Cast the result to
12002         pupa_uint16_t.
12004         * include/pupa/kernel.h (pupa_enter_normal_mode): Removed.
12006 2003-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
12008         * util/i386/pc/pupa-setup.c: Include pupa/machine/kernel.h.
12009         (setup): Configure the installed partition information and the
12010         dl prefix.
12012         * loader/i386/pc/chainloader.c (my_mod): New variable.
12013         (pupa_chainloader_unload): New function.
12014         (pupa_rescue_cmd_chainloader): Refer itself.
12015         (PUPA_MOD_INIT): Save its own module in MY_MOD.
12017         * kern/i386/pc/startup.S (install_partition): Removed.
12018         (version_string): Likewise.
12019         (config_file): Likewise.
12020         (pupa_install_dos_part): New variable.
12021         (pupa_install_bsd_part): Likewise.
12022         (pupa_prefix): Likewise.
12023         (pupa_chainloader_real_boot): Call pupa_dl_unload_all.
12025         * kern/i386/pc/init.c: Include pupa/machine/kernel.h, pupa/dl.h
12026         and pupa/misc.h.
12027         (make_install_device): New function.
12028         (pupa_machine_init): Set the dl prefix.
12030         * kern/rescue.c: Include pupa/rescue.h and pupa/dl.h.
12031         (buf): Renamed to ...
12032         (linebuf): ... this.
12033         (pupa_rescue_cmd_prefix): New function.
12034         (pupa_rescue_cmd_insmod): Likewise.
12035         (pupa_rescue_cmd_rmmod): Likewise.
12036         (pupa_rescue_cmd_lsmod): Likewise.
12037         (pupa_enter_rescue_mode): Register new commands: prefix, insmod,
12038         rmmod and lsmod.
12040         * kern/mm.c (pupa_memalign): If failed even after invalidating
12041         disk caches, unload unneeded modules and retry.
12043         * kern/misc.c (pupa_memmove): New function.
12044         (pupa_memcpy): Removed.
12045         (pupa_strcpy): New function.
12046         (pupa_itoa): Made static.
12048         * kern/dl.c (pupa_dl_iterate): New function.
12049         (pupa_dl_ref): Likewise.
12050         (pupa_dl_unref): Likewise.
12051         (pupa_dl_unload): Return if succeeded or not.
12052         (pupa_dl_unload_unneeded): New function.
12053         (pupa_dl_unload_all): Likewise.
12054         (pupa_dl_init): Renamed to ...
12055         (pupa_dl_set_prefix): ... this.
12056         (pupa_dl_get_prefix): New function.
12058         * include/pupa/i386/pc/kernel.h: Include pupa/types.h.
12059         (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): New macro.
12060         (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
12061         (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
12062         (pupa_install_dos_part): Declared.
12063         (pupa_install_bsd_part): Likewise.
12064         (pupa_prefix): Likewise.
12065         (pupa_boot_drive): Likewise.
12067         * include/pupa/types.h: Fix a typo.
12069         * include/pupa/misc.h (pupa_memcpy): New macro. Just an alias to
12070         pupa_memmove.
12071         (pupa_memmove): Declared.
12072         (pupa_strcpy): Likewise.
12074         * include/pupa/dl.h (PUPA_MOD_INIT): Change the prototype. Now
12075         pupa_mod_init takes one argument, its own module.
12076         (pupa_dl_unload_unneeded): Declared.
12077         (pupa_dl_unload_all): Likewise.
12078         (pupa_dl_ref): Likewise.
12079         (pupa_dl_unref): Likewise.
12080         (pupa_dl_iterate): Likewise.
12081         (pupa_dl_init): Renamed to ...
12082         (pupa_dl_set_prefix): ... this.
12083         (pupa_dl_get_prefix): Declared.
12085         * fs/fat.c [!PUPA_UTIL] (my_mod): New variable.
12086         (pupa_fat_dir) [!PUPA_UTIL]: Prevent the fat module from being
12087         unloaded.
12088         (pupa_fat_open) [!PUPA_UTIL]: Refer itself if succeeded.
12089         (pupa_fat_close) [!PUPA_UTIL]: Unrefer itself.
12091         * configure.ac (tmp_CFLAGS): Added -Wshadow, -Wpointer-arith,
12092         -Wmissing-prototypes, -Wundef and -Wstrict-prototypes.
12094 2003-01-03  Yoshinori K. Okuji  <okuji@enbug.org>
12096         * util/i386/pc/pupa-setup.c (setup): Define the internal
12097         function find_first_partition_start at the top level, because GCC
12098         3.0.x cannot compile internal functions in deeper scopes
12099         correctly.
12100         (find_root_device): Use lstat instead of stat.
12101         Don't follow symbolic links.
12102         Fix the path-constructing code.
12104         * util/i386/pc/biosdisk.c [__linux__] (BLKFLSBUF): New macro.
12105         (pupa_util_biosdisk_open) [__linux__]: Get the size of a device
12106         by a BLKGETSIZE ioctl first, because block devices don't fill
12107         the member st_mode of the structure stat on Linux.
12108         [__linux__] (linux_find_partition): Use a temporary buffer
12109         REAL_DEV for the working space. Copy it to DEV before returning.
12110         (open_device) [__linux__]: Call ioctl with BLKFLSBUF to make the
12111         buffer cache consistent.
12112         (get_os_disk) [__linux__]: Use the length 5 instead of 4 for
12113         strncmp. The previous value was merely wrong.
12114         (pupa_util_biosdisk_get_pupa_dev): Use stat instead of lstat.
12116         * fs/fat.c (pupa_fat_read_data): Shift 4 instead of 12 when the
12117         FAT size is 12. The previous value was merely wrong.
12119         * kern/main.c (pupa_main): Don't split the starting message from
12120         newlines.
12122         * kern/term.c (pupa_putchar): Put CR after LF instead of before
12123         LF, because BIOS goes crazy about character attributes in this
12124         case.
12126 2003-01-03  Yoshinori K. Okuji  <okuji@enbug.org>
12128         * include/i386/pc/util/biosdisk.h: New file.
12129         * util/i386/pc/biosdisk.c: Likewise.
12130         * util/i386/pc/pupa-setup.c: Likewise.
12132         * Makefile.in (INCLUDE_DISTFILES): Added
12133         include/pupa/i386/pc/util/biosdisk.h.
12134         (UTIL_DISTFILES): Added biosdisk.c and pupa-setup.c under the
12135         directory util/i386/pc.
12136         (install-local): Added a rule for sbin_UTILITIES.
12137         (uninstall): Likewise.
12139         * util/i386/pc/pupa-mkimage.c (usage): Fix a typo in the doc.
12141         * util/misc.c (xrealloc): New function.
12142         (pupa_malloc): Likewise.
12143         (pupa_free): Likewise.
12144         (pupa_realloc): Likewise.
12145         (pupa_stop): Likewise.
12146         (pupa_putchar): Likewise.
12148         * kern/disk.c (pupa_disk_read): Prevent L from underflowing.
12150         * include/pupa/util/misc.h (xrealloc): Declared.
12152         * include/pupa/i386/pc/boot.h (PUPA_BOOT_MACHINE_BPB_START): New
12153         macro.
12154         (PUPA_BOOT_MACHINE_BPBEND): Renamed to ...
12155         (PUPA_BOOT_MACHINE_BPB_END): ... this.
12157         * include/pupa/fs.h [PUPA_UTIL] (pupa_fat_init): Declared.
12158         [PUPA_UTIL] (pupa_fat_fini): Likewise.
12160         * fs/fat.c [PUPA_UTIL] (pupa_fat_init): Defined. Maybe a better
12161         way should be implemented.
12162         [PUPA_UTIL] (pupa_fat_fini): Likewise.
12164         * disk/i386/pc/biosdisk.c (pupa_biosdisk_call_hook): Increase
12165         the size of NAME for safety.
12166         (pupa_biosdisk_iterate): Search hard disks to 0x90 instead of
12167         0x88.
12169         * conf/i386-pc.rmk (sbin_UTILITIES): New variable.
12170         (pupa_setup_SOURCES): Likewise.
12172         * genmk.rb (Utility#rule): Add $(BUILD_CFLAGS) into the rules.
12174 2002-12-28  Yoshinori K. Okuji  <okuji@enbug.org>
12176         * kern/i386/pc/startup.S (push_get_mmap_entry): Revert to a
12177         bunch of pushl's from pusha, because this destroys the return
12178         value.
12180 2002-12-28  Yoshinori K. Okuji  <okuji@enbug.org>
12182         Use -mrtd and -mregparm=3 to reduce the generated code sizes.
12183         This means that any missing prototypes could be fatal. Also, you
12184         must take care when writing assembly code. See the comments at
12185         the beginning of startup.S, for more details.
12187         * kern/i386/pc/startup.S (pupa_halt): Modified for the new
12188         compilation mechanism.
12189         (pupa_chainloader_real_boot): Likewise.
12190         (pupa_biosdisk_rw_int13_extensions): Likewise.
12191         (pupa_biosdisk_rw_standard): Likewise.
12192         (pupa_biosdisk_check_int13_extensions): Likewise.
12193         (pupa_biosdisk_get_diskinfo_int13_extensions): Likewise.
12194         (pupa_biosdisk_get_diskinfo_standard): Likewise.
12195         (pupa_get_memsize): Likewise.
12196         (pupa_get_mmap_entry): Likewise.
12197         (pupa_console_putchar): Likewise.
12198         (pupa_console_setcursor): Likewise.
12199         (pupa_getrtsecs): Use pushl instead of push.
12201         * kern/i386/pc/init.c (pupa_machine_init): Use the scratch
12202         memory instead of the stack for a mmap entry, because some
12203         BIOSes may ignore the maximum size and overflow.
12205         * conf/i386-pc.rmk (COMMON_CFLAGS): Added -mrtd and -mregparm=3.
12207         * genmk.rb (PModule#rule): Compile automatically generated
12208         sources with module-specific CFLAGS as well as other sources.
12210 2002-12-27  Yoshinori K. Okuji  <okuji@enbug.org>
12212         * configure.ac: Check ld.
12213         Replace CFLAGS and CPPFLAGS with BUILD_CFLAGS and BUILD_CPPFLAGS
12214         respectively, before checking endianness and sizes.
12216         * Makefile.in (LD): New variable.
12218 2002-12-27  Yoshinori K. Okuji  <okuji@enbug.org>
12220         * Makefile.in (BUILD_CC): CC -> BUILD_CC.
12222 2002-12-27  Yoshinori K. Okuji  <okuji@enbug.org>
12224         * Changelog: New file.