2008-03-30 Pavel Roskin <proski@gnu.org>
[grub2/bean.git] / ChangeLog
blobb96141de839d6be2a5fe5b2d6f38337dae3a093f
1 2008-03-30  Pavel Roskin  <proski@gnu.org>
3         * commands/i386/cpuid.c (has_longmode): Make static.
4         * disk/i386/pc/biosdisk.c (cd_drive): Likewise.
5         * include/grub/i386/bsd.h (bios_memmap_t): Remove, it's unused.
7         * kern/i386/pc/startup.S (real_to_prot): Use %cs prefix to load
8         GDT.  This is more robust, as %ds can change.
9         (grub_biosdisk_rw_int13_extensions): Don't clear %ds before
10         calling real_to_prot().
11         (grub_biosdisk_get_diskinfo_int13_extensions): Likewise.
13 2008-03-28  Pavel Roskin  <proski@gnu.org>
15         * kern/i386/pc/startup.S: Assert that uncompressed functions
16         don't spill beyond GRUB_KERNEL_MACHINE_RAW_SIZE.
17         * kern/i386/pc/lzo1x.S: Remove all .align directives in the
18         code, as they push parts of the code (error handlers) beyond
19         GRUB_KERNEL_MACHINE_RAW_SIZE.  Speed is not as important in this
20         code as correctness and size.
22 2008-03-28  Pavel Roskin  <proski@gnu.org>
24         * kern/i386/pc/startup.S
25         (grub_biosdisk_get_diskinfo_int13_extensions): When converting
26         data block address to the real mode, keep offset minimal.  This
27         works around a bug in AWARD BIOS on old Athlon systems, which
28         makes CD detection hang.
30 2008-03-26  Pavel Roskin  <proski@gnu.org>
32         * normal/color.c (grub_parse_color_name_pair): Make `name' a
33         const.
34         * include/grub/normal.h: Add grub_parse_color_name_pair()
35         declaration.
37 2008-03-24  Bean  <bean123ch@gmail.com>
39         * disk/i386/pc/biosdisk.c (cd_start): Removed.
40         (cd_count): Removed.
41         (cd_drive): New variable.
42         (grub_biosdisk_get_drive): Don't check for (cdN) device.
43         (grub_biosdisk_call_hook): Likewise.
44         (grub_biosdisk_iterate): Change cdrom detection method.
45         (grub_biosdisk_open): Replace cd_start with cd_drive.
46         (GRUB_MOD_INIT): Use grub_biosdisk_get_cdinfo_int13_extension to
47         detect cdrom device.
49         * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_MACHINE_CDROM_START):
50         Removed.
51         (GRUB_BIOSDISK_MACHINE_CDROM_END): Removed.
52         (GRUB_BIOSDISK_CDTYPE_NO_EMUL): New macro.
53         (GRUB_BIOSDISK_CDTYPE_1_2_M): Likewise.
54         (GRUB_BIOSDISK_CDTYPE_1_44_M): Likewise.
55         (GRUB_BIOSDISK_CDTYPE_2_88_M): Likewise.
56         (GRUB_BIOSDISK_CDTYPE_HARDDISK): Likewise.
57         (GRUB_BIOSDISK_CDTYPE_MASK): Likewise.
58         (grub_biosdisk_cdrp): New structure.
59         (grub_biosdisk_get_cdinfo_int13_extensions): New function.
61         * include/grub/i386/pc/kernel.h (grub_boot_drive): Export this variable.
63         * kern/i386/pc/init.c (make_install_device): Don't use (cdN) as root
64         device.
66         * kern/i386/pc/startup.S (grub_biosdisk_get_cdinfo_int13_extensions):
67         New function.
69 2008-03-20  Robert Millan  <rmh@aybabtu.com>
71         Remove 2 TiB limit in ata.mod.
72         * disk/ata.c (grub_ata_device): Promote `size' to grub_uint64_t.
73         (grub_ata_dumpinfo): Print sector count with 0x%llx.
74         (grub_ata_identify): Interpret `&info16[100]' as a pointer to
75         grub_uint64_t instead of grub_uint32_t.
77 2008-03-05  Bean  <bean123ch@gmail.com>
79         * loader/i386/pc/multiboot.c (grub_multiboot_get_bootdev): New function.
80         (grub_multiboot): Set boot device.
82         * boot/i386/pc/lnxboot.S (real_code_2): Set %dh to 0xFF.
84 2008-03-02  Bean  <bean123ch@gmail.com>
86         * fs/reiserfs.c (grub_reiserfs_read_symlink): Add 0 at the end of
87         symlink_buffer.
89 2008-03-01  Yoshinori K. Okuji  <okuji@enbug.org>
91         * DISTLIST: Added docs/fdl.texi, docs/grub.texi, docs/mdate-sh and
92         texinfo.tex.
94         * docs/grub.texi: New file. Copied from GRUB Legacy, and slightly
95         modified.
97         * docs/fdl.texi: New file.
98         
99         * docs/mdate-sh: New file. Copied from gnulib.
100         * docs/texinfo.tex: Likewise.
102         * config.guess: Updated from gnulib.
103         * install-sh: Likewise.
105 2008-02-28  Robert Millan  <rmh@aybabtu.com>
107         * conf/i386-linuxbios.rmk (pkglib_MODULES): Add aout.mod.
108         (aout_mod_SOURCES): New variable.
109         (aout_mod_CFLAGS): Likewise.
110         (aout_mod_LDFLAGS): Likewise.
112         * conf/i386-ieee1275.rmk: Likewise.
114 2008-02-28  Robert Millan  <rmh@aybabtu.com>
116         * util/update-grub.in: Reorganise terminal validity check.  Accept
117         `ieee1275:console' (OLPC) and `*:gfxterm' as valid too.
118         Based on suggestion by Franklin PIAT.
120 2008-02-28  Fabian Greffrath  <greffrath@leat.rub.de>
122         * include/grub/util/getroot.h (grub_util_check_block_device): Export new
123         function.
124         * util/getroot.c (grub_util_check_block_device): New function that
125         returns the given argument if it is a block device and returns NULL else.
126         * util/grub-probe.c (argument_is_device): New variable.
127         (probe): Promote device_name from a variable to an argument. Receive
128         device_name from grub_util_check_block_device() if path is NULL and from
129         grub_guess_root_device() else. Do not free() device_name anymore.
130         (options): Introduce new parameter '-d, --device'. 
131         (main): Add description of the new parameter to the help screen.
132         Rename path variable to argument. Set argument_is_device if the '-d'
133         option is given. Pass argument to probe() depending on
134         argument_is_device.
136 2008-02-24  Bean  <bean123ch@gmail.com>
138         * fs/iso9660.c (GRUB_ISO9660_VOLDESC_BOOT): New macro.
139         (GRUB_ISO9660_VOLDESC_PRIMARY): Likewise.
140         (GRUB_ISO9660_VOLDESC_SUPP): Likewise.
141         (GRUB_ISO9660_VOLDESC_PART): Likewise.
142         (GRUB_ISO9660_VOLDESC_END): Likewise.
143         (grub_iso9660_primary_voldesc): New member escape.
144         (grub_iso9660_data): New member joliet.
145         (grub_iso9660_convert_string): New function.
146         (grub_iso9660_mount): Detect joliet extension.
147         (grub_iso9660_iterate_dir): Convert filename when joliet is detected.
148         (grub_iso9660_iso9660_label): Likewise.
150         * conf/common.rmk (pkgdata_MODULES): Add udf.mod.
151         (grub_setup_SOURCES): Add fs/udf.c.
152         (grub_fstest_SOURCES): Likewise.
153         (udf_mod_SOURCES): New variable.
154         (udf_mod_CFLAGS): Likewise.
155         (udf_mod_LDFLAGS): Likewise.
157         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/udf.c.
158         (grub_emu_SOURCES): Likewise.
160         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
162         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
164         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
166         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
168         * fs/udf.c: New file.
170 2008-02-24  Robert Millan  <rmh@aybabtu.com>
172         * conf/i386-efi.rmk (normal/function.c_DEPENDENCIES)
173         (normal/lexer.c_DEPENDENCIES): New variables.
174         * conf/i386-ieee1275.rmk (normal/function.c_DEPENDENCIES)
175         (normal/lexer.c_DEPENDENCIES): Likewise.
176         * conf/i386-linuxbios.rmk (normal/function.c_DEPENDENCIES)
177         (normal/lexer.c_DEPENDENCIES): Likewise.
178         * conf/i386-pc.rmk (normal/function.c_DEPENDENCIES)
179         (normal/lexer.c_DEPENDENCIES): Likewise.
180         * conf/powerpc-ieee1275.rmk (normal/function.c_DEPENDENCIES)
181         (normal/lexer.c_DEPENDENCIES): Likewise.
182         * conf/sparc64-ieee1275.rmk (normal/function.c_DEPENDENCIES)
183         (normal/lexer.c_DEPENDENCIES): Likewise.
185 2008-02-23  Robert Millan  <rmh@aybabtu.com>
187         * partmap/gpt.c (grub_gpt_magic): Add `0x' qualifier to each member,
188         since they were intended to be in hex.  This didn't break previously
189         because of a bug in gpt_partition_map_iterate() (see below).
191         (gpt_partition_map_iterate): Replace `grub_memcmp' with `! grub_memcmp'
192         when checking the validity of GPT header.
193         Remove `partno', since it always provides the same information as `i'.
195 2008-02-21  Yoshinori K. Okuji  <okuji@enbug.org>
197         * include/grub/efi/time.h: Fix a wrong comment.
199 2008-02-19  Pavel Roskin  <proski@gnu.org>
201         * kern/rescue.c (grub_enter_rescue_mode): Improve initial
202         message.
204 2008-02-19  Bean  <bean123ch@gmail.com>
206         * conf/i386-pc.rmk (pkglib_MODULES): Add aout.mod _bsd.mod and bsd.mod.
207         (aout_mod_SOURCES): New variable.
208         (aout_mod_CFLAGS): Likewise.
209         (aout_mod_LDFLAGS): Likewise.
210         (_bsd_mod_SOURCES): New variable.
211         (_bsd_mod_CFLAGS): Likewise.
212         (_bsd_mod_LDFLAGS): Likewise.
213         (bsd_mod_SOURCES): New variable.
214         (bsd_mod_CFLAGS): Likewise.
215         (bsd_mod_LDFLAGS): Likewise.
217         * include/grub/aout.h: New file.
219         * include/grub/i386/loader.h (grub_unix_real_boot): New function.
221         * include/grub/i386/bsd.h: New file.
223         * include/grub/i386/pc/init.h (grub_get_mmap_entry): Use EXPORT_FUNC
224         to make it public.
226         * kern/elf.c (grub_elf32_load): Get the physical address after the hook
227         function is called, so that it's possible to change it inside the hook.
228         (grub_elf64_load): Likewise.
229         (grub_elf_file): Don't close the file if elf header is not found.
230         (grub_elf_close): Close the file if grub_elf_file fails (The new
231         grub_elf_file won't close it).
232         (grub_elf32_size): Use NESTED_FUNC_ATTR for nested function calcsize.
233         (grub_elf64_size): Likewise.
235         * kern/i386/loader.S (grub_unix_real_boot): New function.
237         * loader/aout.c: New file.
239         * loader/i386/bsd.c: New file.
241         * loader/i386/bsd_normal.c: New file.
243         * loader/i386/pc/multiboot.c (grub_multiboot): Handle a.out format.
245         * loader/multiboot2.c (grub_multiboot2): Reset grub_errno so that it
246         can test othe formats.
248 2008-02-19  Robert Millan  <rmh@aybabtu.com>
250         * partmap/gpt.c: Include `<grub/gpt_partition.h>'.
251         (grub_gpt_partition_type_empty): Redefine with macro from
252         `<grub/gpt_partition.h>'.
253         (gpt_partition_map_iterate): Adjust partition type comparison.
255         Export `entry' as partmap-specific `part.data' struct.
256         (grub_gpt_header, grub_gpt_partentry): Move from here ...
258         * include/grub/gpt_partition.h (grub_gpt_header)
259         (grub_gpt_partentry): ... to here (new file).
261         * util/i386/pc/grub-setup.c: Include `<grub/gpt_partition.h>'.
263         (grub_gpt_partition_type_bios_boot): New const variable, defined
264         with macro from `<grub/gpt_partition.h>'.
266         (setup): Replace `first_start' with `embed_region', which keeps
267         track of the embed region (and is partmap-agnostic).
269         Replace find_first_partition_start() with find_usable_region(),
270         which finds a usable region for embedding using partmap-specific
271         knowledge (supports PC/MSDOS and GPT).
273         Fix all assumptions that the embed region start at sector 1, using
274         `embed_region.start' from now on.  Similarly, use `embed_region.end'
275         rather than `first_start' to calculate available size.
277         In grub_util_info() message, replace "into after the MBR" with an
278         indication of the specific sector our embed region starts at.
280 2008-02-19  Robert Millan  <rmh@aybabtu.com>
282         * DISTLIST: Replace `commands/ieee1275/halt.c' and
283         `commands/ieee1275/reboot.c' with `commands/halt.c' and
284         `commands/reboot.c'.
285         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
286         (halt_mod_SOURCES): Likewise.
287         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
288         (halt_mod_SOURCES): Likewise.
290 2008-02-17  Christian Franke  <franke@computer.org>
292         * commands/cat.c (grub_cmd_cat): Add break on GRUB_TERM_ESC key.
294 2008-02-17  Robert Millan  <rmh@aybabtu.com>
296         * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
297         set `first_start' to 0 for non-PC/MSDOS partition maps.
299 2008-02-16  Robert Millan  <rmh@aybabtu.com>
301         * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
302         do not assume partition map is PC/MSDOS before performing checks that
303         are specific to that layout.
305 2008-02-13  Robert Millan  <rmh@aybabtu.com>
307         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Remove
308         `commands/i386/pc/halt.c' and `commands/i386/pc/reboot.c'.
309         * kern/i386/linuxbios/init.c (grub_halt, grub_reboot): Remove stubs.
311 2008-02-13  Yoshinori K. Okuji  <okuji@enbug.org>
313         * configure.ac: Only a cosmetic change on the handling of
314         -fno-stack-protector.
316 2008-02-12  Alexandre Boeglin  <alex@boeglin.org>
318         * conf/i386-efi.rmk (grub_emu_SOURCES): Replace
319         commands/i386/pc/halt.c and reboot.c by commands/halt.c and
320         reboot.c.
321         (grub_install_SOURCES): Add halt.mod and reboot.mod.
322         (halt_mod_SOURCES): New variable.
323         (halt_mod_CFLAGS): Likewise.
324         (halt_mod_LDFLAGS): Likewise.
325         (reboot_mod_SOURCES): Likewise.
326         (reboot_mod_CFLAGS): Likewise.
327         (reboot_mod_LDFLAGS): Likewise.
329         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace
330         commands/ieee1275/halt.c and reboot.c by commands/halt.c and
331         reboot.c.
332         (halt_mod_SOURCES): Likewise.
333         (reboot_mod_SOURCES): Likewise.
335         * conf/i386-pc.rmk (grub_emu_SOURCES): Replace
336         commands/i386/pc/reboot.c by commands/reboot.c.
337         (reboot_mod_SOURCES): Likewise.
339         * commands/i386/pc/reboot.c: merge this file ...
341         * commands/ieee1275/reboot.c: ... and this file ...
343         * commands/reboot.c: ... to this file.
344         Add some precompiler directive to include the correct header for
345         each machine.
347         * commands/ieee1275/halt.c: move this file ...
349         * commands/halt.c: ... to here.
350         Add some precompiler directive to include the correct header for
351         each machine.
353         * include/grub/efi/efi.h (grub_reboot): New function declaration.
354         (grub_halt): Likewise.
356         * kern/efi/efi.c (grub_reboot): New function.
357         (grub_halt): Likewise.
359 2008-02-12  Robert Millan  <rmh@aybabtu.com>
361         * util/getroot.c (grub_guess_root_device): Inspect /dev/evms before
362         /dev (like it is done for /dev/mapper).  This doesn't provide support
363         for EVMS, but at least it is now easy to identify the problem when it
364         arises.
366 2008-02-11  Robert Millan  <rmh@aybabtu.com>
368         * util/biosdisk.c (grub_util_biosdisk_open, linux_find_partition)
369         (grub_util_biosdisk_get_grub_dev): Check open() exit status by
370         comparing it with -1, not 0.
372 2008-02-10  Robert Millan  <rmh@aybabtu.com>
374         * conf/i386-efi.rmk (grub_emu_SOURCES): Add `disk/raid.c' and
375         `disk/lvm.c'.
376         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
377         * conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
379         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Move `disk/raid.c' and
380         `disk/lvm.c' to the end of the list.
381         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
382         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
384 2008-02-10  Robert Millan  <rmh@aybabtu.com>
386         * kern/main.c (grub_load_normal_mode): Do not reset `grub_errno'.  Call
387         grub_print_error() instead.  This will let user know why we're entering
388         rescue mode.
389         Based on suggestions from Sam Morris.
391 2008-02-10  Alexandre Boeglin  <alex@boeglin.org>
393         * normal/arg.c (grub_arg_parse): If one of the args is "--", call add_arg()
394         on remaining N args, instead of "--" arg N times.
396 2008-02-09  Vesa Jaaskelainen  <chaac@nic.fi>
398         * font/manager.c (unknown_glyph): Added variable for unknown glyph.
399         (fill_with_default_glyph): Changed to use unknown_glyph for fill
400         pattern for unknown glyphs.
402 2008-02-09  Robert Millan  <rmh@aybabtu.com>
404         * configure.ac: Probe for `help2man'.
405         * Makefile.in (builddir): New variable.
406         (HELP2MAN): Likewise.  Set to `true' when @HELP2MAN@ doesn't provide it,
407         or otherwise add a few flags/options to it.
408         (install-local): For every executable utility or script that is
409         installed, invoke $(HELP2MAN) to install a manpage based on --help
410         output.
412         * util/i386/pc/grub-install.in: Move down `update-grub_lib' sourcing, so
413         that it doesn't prevent --help from working in build tree.
415         * util/i386/pc/grub-mkrescue.in (usage): Replace `grub-devel@gnu.org'
416         with `bug-grub@gnu.org'.
417         * util/powerpc/ieee1275/grub-mkrescue.in (usage): Likewise.
418         * util/update-grub.in (usage): New function.
419         Implement proper argument check, with support for --help and --version
420         (as well as existing -y).
422 2008-02-09  Christian Franke  <franke@computer.org>
424         * commands/cat.c (grub_cmd_cat): Print '\r' as hex to
425         avoid overwriting previous output.
426         * kern/rescue.c (grub_rescue_cmd_cat): Likewise.
428 2008-02-09  Robert Millan  <rmh@aybabtu.com>
430         * normal/menu.c (run_menu): If timeout is set to zero, don't bother
431         drawing the menu.
433 2008-02-09  Robert Millan  <rmh@aybabtu.com>
435         * commands/sleep.c: New file.
436         * conf/common.rmk (pkglib_MODULES): Add `commands/sleep.c'.
437         (sleep_mod_SOURCES): New variable.
438         (sleep_mod_CFLAGS): Likewise.
439         (sleep_mod_LDFLAGS): Likewise.
441 2008-02-09  Robert Millan  <rmh@aybabtu.com>
443         * disk/raid.c (grub_raid_scan_device): Add a pair of sanity checks for
444         situations in which we can deduce the RAID size and the superblock
445         doesn't match it.
447 2008-02-09  Robert Millan  <rmh@aybabtu.com>
449         * disk/lvm.c [GRUB_UTIL] (grub_lvm_memberlist): New function.  Construct
450         and return a grub_diskmemberlist_t composed of LVM physical volumes.
451         [GRUB_UTIL] (grub_lvm_dev): Add `memberlist' member.
453         * disk/raid.c [GRUB_UTIL] (grub_raid_memberlist): New function.  Construct
454         and return a grub_diskmemberlist_t composed of physical array members.
455         [GRUB_UTIL] (grub_raid_dev): Add `memberlist' member.
457         * include/grub/disk.h [GRUB_UTIL] (grub_disk_memberlist): New struct
458         prototype.
459         [GRUB_UTIL] (struct grub_disk_dev): Add `memberlist' function pointer.
460         [GRUB_UTIL] (struct grub_disk_memberlist): New struct declaration.
461         [GRUB_UTIL] (grub_disk_memberlist_t): New typedef.
463         * util/grub-probe.c (probe): Move partmap probing code from here ...
464         (probe_partmap): ... to here.
465         (probe): Use probe_partmap() once for the disk we're probing, and
466         additionally, when such disk contains a memberlist() struct member,
467         once for each disk that is contained in the structure returned by
468         memberlist().
470 2008-02-09  Robert Millan  <rmh@aybabtu.com>
472         * util/grub-probe.c (main): When `verbosity > 1', set `debug'
473         environment variable to 'all' in order to obtain debug output from
474         non-util/ code.
475         * util/i386/pc/grub-setup.c (main): Likewise.
477 2008-02-08  Robert Millan  <rmh@aybabtu.com>
479         * disk/raid.c (grub_raid_scan_device): Check for
480         `array->device[sb.this_disk.number]' rather than for
481         `array->device[sb.this_disk.number]->name', since the latter is not
482         garanteed to be accessible.
484 2008-02-08  Robert Millan  <rmh@aybabtu.com>
486         * disk/raid.c: Update copyright.
487         * fs/cpio.c: Likewise.
488         * include/grub/raid.h: Likewise.
489         * loader/i386/pc/multiboot.c: Likewise.
490         * util/hostfs.c: Likewise.
492 2008-02-08  Robert Millan  <rmh@aybabtu.com>
494         * include/grub/raid.h (struct grub_raid_array): Change type of `device'
495         to a grub_disk_t array.
496         * disk/raid.c (grub_raid_read): Replace `device[x].disk' accesses with
497         `device[x]'.
498         (grub_raid_scan_device): Replace `device[x].name' accesses with
499         `device[x]->name'.  Simplify initialization of `array->device[x]'.
501 2008-02-08  Robert Millan  <rmh@aybabtu.com>
503         * disk/raid.c (grub_raid_open, grub_raid_scan_device): Add a few
504         grub_dprintf() calls.
505         * kern/disk.c (grub_disk_read): Include grub_errmsg in out of range
506         error message.
508 2008-02-07  Christian Franke  <franke@computer.org>
510         * util/hostfs.c (grub_hostfs_open): Use fseeko and ftello
511         instead of fseek and ftell to support large files.
512         (grub_hostfs_read): Likewise.
514 2008-02-07  Robert Millan  <rmh@aybabtu.com>
516         Patch from Jeroen Dekkers.
517         * disk/raid.c (grub_raid_scan_device): Reset `grub_errno' on disk
518         failure, since succesfuly reading all array members might not be
519         required.
521 2008-02-06  Robert Millan  <rmh@aybabtu.com>
523         * util/grub-probe.c (probe): Simplify partmap probing (with the
524         assumption that the first word up to the underscore equals to
525         the module name).
527 2008-02-06  Christian Franke  <franke@computer.org>
529         * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_NONE
530         (and set *ofs = 0) instead of GRUB_ERR_FILE_NOT_FOUND on
531         last block of a cpio or tar stream.
532         Check for "TRAILER!!!" instead of any empty data
533         block to detect last block of a cpio stream.
534         (grub_cpio_dir): Fix constness of variable np.
535         (grub_cpio_open): Return GRUB_ERR_FILE_NOT_FOUND if
536         cpio or tar trailer is detected.  This fixes a crash
537         on open of a non existing file.
539 2008-02-05  Bean  <bean123ch@gmail.com>
541         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Get physical
542         address of entry.
543         (grub_multiboot_load_elf64): Likewise.
544         (grub_multiboot): Initialize mbi structure.
546         * util/grub-fstest.c: Don't include unused header file script.h.
548         * conf/common.rmk (grub-fstest.c_DEPENDENCIES): Move to the begginning
549         of file.
550         (grub_fstest_SOURCES): Likewise.
552 2008-02-05  Robert Millan  <rmh@aybabtu.com>
554         * include/grub/term.h (GRUB_TERM_LEFT, GRUB_TERM_RIGHT)
555         (GRUB_TERM_UP, GRUB_TERM_DOWN, GRUB_TERM_HOME, GRUB_TERM_END)
556         (GRUB_TERM_DC, GRUB_TERM_PPAGE, GRUB_TERM_NPAGE, GRUB_TERM_ESC)
557         (GRUB_TERM_TAB, GRUB_TERM_BACKSPACE): New macros.
559         * kern/i386/pc/startup.S: Include `<grub/term.h>'.
560         (translation_table): Replace hardcoded values with macros
561         provided by `<grub/term.h>'.
563         * term/i386/pc/at_keyboard.c: Include `<grub/term.h>'.
564         (keyboard_map): Correct/add a few values, with macros provided
565         by `<grub/term.h>'.
566         (keyboard_map_shift): Zero values that don't differ from their
567         `keyboard_map' equivalents.
568         (grub_console_checkkey): Optimize KEYBOARD_STATUS_CAPS_LOCK toggling.
569         Discard the second scan code that is always sent by Caps lock.
570         Only use `keyboard_map_shift' when it provides a non-zero value,
571         otherwise fallback to `keyboard_map'.
573 2008-02-04  Bean  <bean123ch@gmail.com>
575         * Makefile.in (enable_grub_fstest): New variable.
577         * conf/common.rmk (grub_fstest_init.lst): New rule.
578         (grub_fstest_init.h): Likewise.
579         (grub_fstest_init.c): Likewise.
580         (util/grub-fstest.c_DEPENDENCIES): New variable.
581         (grub_fstest_SOURCES): Likewise.
583         * configure.ac (enable_grub_fstest): Check for --enable-grub-fstest.
585         * util/grub-fstest.c: New file.
587 2008-02-03  Yoshinori K. Okuji  <okuji@enbug.org>
589         Make grub-setup handle a separate root device.
590         
591         * util/i386/pc/grub-setup.c (setup): Always open the root device,
592         so that the root device can be compared with the destination
593         device.
594         When embedding the core image, if the root and destination devices
595         are different, set ROOT_DRIVE to ROOT_DEV->DISK->ID. Otherwise, to
596         0xFF.
597         When not embedding, set ROOT_DRIVE to 0xFF.
598         
599 2008-02-03  Yoshinori K. Okuji  <okuji@enbug.org>
601         Add support for having a grub directory in a different drive. This
602         is still only the data handling part.
603         
604         * kern/i386/pc/startup.S (multiboot_trampoline): Set %dh to 0xFF.
605         (codestart): Save %dh in GRUB_ROOT_DRIVE.
606         (grub_root_drive): New variable.
608         * kern/i386/pc/init.c (make_install_device): Use GRUB_ROOT_DRIVE
609         instead of GRUB_BOOT_DRIVE to construct a device name. Set
610         GRUB_ROOT_DRIVE to GRUB_BOOT_DRIVE if it is 0xFF, otherwise use it
611         as it was.
613         * include/grub/i386/pc/kernel.h (grub_root_drive): New prototype.
615         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_ROOT_DRIVE): New
616         macro.
617         (GRUB_BOOT_MACHINE_DRIVE_CHECK): Set to 0x4f.
619         * boot/i386/pc/pxeboot.S (_start): Set %dh to 0xFF. For now, this
620         is bogus, because PXE booting does not specify any drive
621         correctly.
623         * boot/i386/pc/lnxboot.S (reg_edx): Set the second byte to 0xFF. I
624         am not sure if this is really correct.
626         * boot/i386/pc/cdboot.S: Set %dh to 0xFF, because the root drive
627         is always identical to the boot drive when booting from a CD.
629         * boot/i386/pc/boot.S (MOV_MEM_TO_AL): Removed. Not needed any
630         longer.
631         (root_drive): New variable.
632         (real_start): Unconditionally set %dh to ROOT_DRIVE.
633         (setup_sectors): Push %dx right after popping it, because %dh will
634         be modified later.
635         (copy_buffer): Restore %dx.
637 2008-02-03  Robert Millan  <rmh@aybabtu.com>
639         * util/i386/pc/grub-mkrescue.in: Rewrite most of image generation to
640         use `cdboot.img' for cdrom images.
642 2008-02-03  Robert Millan  <rmh@aybabtu.com>
644         * util/grub.d/00_header.in: Issue scripting commands for GRUB to
645         only setup gfxterm when `font' command has succeeded.
647 2008-02-03  Robert Millan  <rmh@aybabtu.com>
649         * loader/multiboot_loader.c [GRUB_MACHINE_LINUXBIOS]
650         (grub_rescue_cmd_multiboot_loader)
651         (grub_rescue_cmd_module_loader): Enable multiboot1 calls.
653 2008-02-03  Pavel Roskin  <proski@gnu.org>
655         * a/kern/i386/pc/startup.S (grub_chainloader_real_boot): Pop
656         %edx and %esi from stack only after grub_gate_a20() is called.
657         grub_gate_a20() clobbers %edx.
659 2008-02-03  Yoshinori K. Okuji  <okuji@enbug.org>
661         * configure.ac (AC_INIT): Bumped to 1.96.
663         * DISTLIST: Added boot/i386/pc/cdboot.S, bus/pci.c,
664         commands/lspci.c,disk/memdisk.c, include/grub/pci.h,
665         include/grub/i386/pc/pci.h, video/readers/jpeg.c, and
666         video/readers/png.c.
668 2008-02-03  Bean  <bean123ch@gmail.com>
670         * conf/i386-pc.rmk (pkglib_IMAGES): Add cdboot.img.
671         (cdboot_img_SOURCES): New variable.
672         (cdboot_img_ASFLAGS): New variable.
673         (cdboot_img_LDFLAGS): New variable.
675         * boot/i386/pc/cdboot.S: New file.
677         * disk/i386/pc/biosdisk.c (cd_start): New variable.
678         (cd_count): Likewise.
679         (grub_biosdisk_get_drive): Add support for cd device.
680         (grub_biosdisk_call_hook): Likewise.
681         (grub_biosdisk_iterate): Likewise.
682         (grub_biosdisk_open): Likewise.
683         (GRUB_BIOSDISK_CDROM_RETRY_COUNT): New macro.
684         (grub_biosdisk_rw): Support reading from cd device.
685         (GRUB_MOD_INIT): Iterate cd devices.
687         * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_FLAG_CDROM): New macro.
688         (GRUB_BIOSDISK_MACHINE_CDROM_START): Likewise.
689         (GRUB_BIOSDISK_MACHINE_CDROM_END): Likewise.
691         * kern/i386/pc/init.c (make_install_device): Check for cd device.
693 2008-02-02  Robert Millan  <rmh@aybabtu.com>
695         * commands/read.c: New file.
696         * conf/common.rmk (pkglib_MODULES): Add `commands/read.c'.
697         (read_mod_SOURCES): New variable.
698         (read_mod_CFLAGS): Likewise.
699         (read_mod_LDFLAGS): Likewise.
701 2008-02-02  Robert Millan  <rmh@aybabtu.com>
703         * normal/main.c (grub_normal_execute): Check for `menu->size' when
704         determining whether menu has to be displayed.
706 2008-02-02  Marco Gerards  <marco@gnu.org>
708         * bus/pci.c: New file.
710         * include/grub/pci.h: Likewise.
712         * include/grub/i386/pc/pci.h: Likewise.
714         * commands/lspci.c: Likewise.
716         * conf/i386-pc.rmk (pkglib_MODULES): Add `pci.mod' and
717         `lspci.mod'.
718         (pci_mod_SOURCES): New variable.
719         (pci_mod_CFLAGS): Likewise.
720         (pci_mod_LDFLAGS): Likewise.
721         (lspci_mod_SOURCES): Likewise.
722         (lspci_mod_CFLAGS): Likewise.
723         (lspci_mod_LDFLAGS): Likewise.  
725 2008-02-02  Bean  <bean123ch@gmail.com>
727         * fs/ufs.c (INODE_BLKSZ): Fix incorrect value.
728         (grub_ufs_get_file_block): Fix indirect block calculation problem.
730         * fs/xfs.c (grub_xfs_sblock): New member log2_dirblk.
731         (grub_xfs_btree_node): New structure.
732         (grub_xfs_btree_root): New structure.
733         (grub_xfs_inode): New members nblocks, extsize, nextents and btree.
734         (GRUB_XFS_EXTENT_OFFSET): Use exts instead of inode->data.extents.
735         (GRUB_XFS_EXTENT_BLOCK): Likewise.
736         (GRUB_XFS_EXTENT_SIZE): Likewise.
737         (grub_xfs_read_block): Support btree format type.
738         (grub_xfs_iterate_dir): Use NESTED_FUNC_ATTR in call_hook.
739         Use directory block as basic unit.
741         * fs/fshelp.c (grub_fshelp_read_file): Bug fix for sparse block.
743         * aclocal.m4 (grub_i386_CHECK_REGPARM_BUG): Define NESTED_FUNC_ATTR as
744         __attribute__ ((__regparm__ (1))).
746 2008-02-01  Robert Millan  <rmh@aybabtu.com>
748         Correct a mistake in previous commit.
750         * conf/i386-pc.rmk (normal/execute.c_DEPENDENCIES): Move to the
751         top.
752         (normal/command.c_DEPENDENCIES): New variable.
754 2008-02-01  Robert Millan  <rmh@aybabtu.com>
756         * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Move to the
757         top.
758         (normal/command.c_DEPENDENCIES): New variable.
759         (grub-emu_DEPENDENCIES, normal_mod_DEPENDENCIES): Remove variables.
760         * conf/i386-ieee1275.rmk: Likewise.
761         * conf/i386-linuxbios.rmk: Likewise.
762         * conf/i386-pc.rmk: Likewise.
763         * conf/sparc64-ieee1275.rmk: Likewise.
764         * conf/powerpc-ieee1275.rmk: Likewise.
765         (grub_emu_SOURCES): Add `fs/fshelp.c'.
767         * genmk.rb: Add `$(#{src}_DEPENDENCIES)' in targets that require it.
769 2008-02-01  Robert Millan  <rmh@aybabtu.com>
771         * kern/disk.c (grub_disk_read, grub_disk_write): Add grub_dprintf()
772         call at beginning of function.
774 2008-01-31  Pavel Roskin  <proski@gnu.org>
776         * util/powerpc/ieee1275/grub-mkrescue.in: New file.
777         * conf/powerpc-ieee1275.rmk (bin_SCRIPTS): New variable.
778         (grub_mkrescue_SOURCES): Likewise.
779         * DISTLIST: Add util/powerpc/ieee1275/grub-mkrescue.in.
781 2008-01-30  Robert Millan  <rmh@aybabtu.com>
783         * conf/i386-pc.rmk (sbin_UTILITIES): Remove `grub-probe'.
784         (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Moved from here ...
785         * conf/common.rmk (util/grub-probe.c_DEPENDENCIES)
786         (grub_probe_SOURCES): ... to here.
788         * conf/i386-efi.rmk (sbin_UTILITIES): Remove `grub-probe'.
789         (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Remove.
790         * conf/i386-ieee1275.rmk: Likewise.
791         * conf/i386-linuxbios.rmk: Likewise.
792         * conf/powerpc-ieee1275.rmk: Likewise.
794 2008-01-30  Tristan Gingold  <gingold@free.fr>
796         * kern/rescue.c: Silently accept empty lines.
798 2008-01-29  Bean  <bean123ch@gmail.com>
800         * boot/i386/pc/lnxboot.S (data_start): Code cleanup.
801         (real_code_2): Code cleanup and change comment style.
802         (move_memory): Avoid using 32-bit address mode.
804 2008-01-29  Bean  <bean123ch@gmail.com>
806         * conf/i386-pc.rmk (pkglib_MODULES): Add `png.mod'.
807         (png_mod_SOURCES): New variable.
808         (png_mod_CFLAGS): Likewise.
809         (png_mod_LDFLAGS): Likewise.
811         * video/readers/png.c: New file.
813 2008-01-28  Robert Millan  <rmh@aybabtu.com>
815         * include/grub/i386/linuxbios/kernel.h (GRUB_MOD_GAP): New macro.
816         * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Remove
817         `ifndef GRUB_MOD_GAP' hack.
818         * util/elf/grub-mkimage.c (add_segments): Likewise.
820 2008-01-27  Robert Millan  <rmh@aybabtu.com>
822         * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Skip
823         `GRUB_MOD_GAP' for platforms in which it's not defined.
824         * util/elf/grub-mkimage.c (add_segments): Likewise.
826 2008-01-27  Robert Millan  <rmh@aybabtu.com>
828         Get grub-emu to build again (including parallel builds).
830         * conf/i386-pc.rmk (util/grub-emu.c_DEPENDENCIES): Remove variable.
831         Split into ...
832         (util/grub-emu.c_DEPENDENCIES): ... this, ...
833         (normal/execute.c_DEPENDENCIES): ... this, ...
834         (grub-emu_DEPENDENCIES): ... and this.
836         * conf/i386-efi.rmk: Likewise.
837         * conf/i386-linuxbios.rmk: Likewise.
838         * conf/i386-ieee1275.rmk: Likewise.
839         * conf/powerpc-ieee1275.rmk: Likewise.
840         (grub_emu_SOURCES): Remove duplicated `kern/file.c'.
842 2008-01-27  Robert Millan  <rmh@aybabtu.com>
844         * NEWS: Add a few items.
846 2008-01-27  Robert Millan  <rmh@aybabtu.com>
848         Fix parallel builds with grub-emu.  Based on earlier commit for
849         grub-probe and grub-setup.
851         * conf/i386-pc.rmk (grub-emu_DEPENDENCIES): Renamed to ...
852         (util/grub-emu.c_DEPENDENCIES): ... this.
853         * conf/i386-efi.rmk (grub-emu_DEPENDENCIES): Renamed to ...
854         (util/grub-emu.c_DEPENDENCIES): ... this.
855         * conf/i386-linuxbios.rmk (grub-emu_DEPENDENCIES): Renamed to ...
856         (util/grub-emu.c_DEPENDENCIES): ... this.
857         * conf/i386-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
858         (util/grub-emu.c_DEPENDENCIES): ... this.
859         * conf/powerpc-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
860         (util/grub-emu.c_DEPENDENCIES): ... this.
862 2008-01-27  Pavel Roskin  <proski@gnu.org>
864         * include/grub/powerpc/ieee1275/kernel.h: Introduce GRUB_MOD_GAP
865         to create a gap between _end and the modules added to the image
866         with grub-mkrescue.  That fixes "CLAIM failed" on PowerMAC.
867         * kern/powerpc/ieee1275/init.c: Use GRUB_MOD_GAP.
868         * util/elf/grub-mkimage.c (add_segments): Likewise.
870 2008-01-26  Pavel Roskin  <proski@gnu.org>
872         * kern/dl.c (grub_dl_load): Don't abort if prefix is not set,
873         just return an error.
875 2008-01-26  Bean  <bean123ch@gmail.com>
877         * fs/reiserfs.c (grub_fshelp_node): New member next_offset.
878         (grub_reiserfs_get_item): Save offset of the next item.
879         (grub_reiserfs_iterate_dir): Use next_offset to find next item.
881 2008-01-25  Robert Millan  <rmh@aybabtu.com>
883         * conf/i386-pc.rmk (grub_setup_SOURCES, grub_emu_SOURCES): Regroup to
884         make all filesystem sources appear together (possibly fixing omissions
885         while at it).
886         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
887         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
888         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
889         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
891         * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.  Additionally,
892         add `kern/file.c'.
893         * conf/i386-efi.rmk (grub_probe_SOURCES): Likewise.
894         * conf/i386-ieee1275.rmk (grub_probe_SOURCES): Likewise.
895         * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Likewise.
896         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Likewise.
898         * util/grub-probe.c: Include `<grub/file.h>' and `<sys/stat.h>'.
899         (probe): Add a sanity check to make sure of our ability to read
900         requested files when probing for filesystem type.
902         * genmk.rb: Update copyright year (2007).
904         * include/grub/fs.h (grub_fat_init, grub_fat_fini, grub_ext2_init)
905         (grub_ext2_fini, grub_ufs_init, grub_ufs_fini, grub_minix_init)
906         (grub_minix_fini, grub_hfs_init, grub_hfs_fini, grub_jfs_init)
907         (grub_jfs_fini, grub_xfs_init, grub_xfs_fini, grub_affs_init)
908         (grub_affs_fini, grub_sfs_init, grub_sfs_fini, grub_iso9660_init)
909         : Remove function prototypes.
911 2008-01-25  Robert Millan  <rmh@aybabtu.com>
913         Revert my previous commits (based on wrong assumption of how grub_errno
914         works).
916         * kern/disk.c (grub_disk_open): Stop reseting grub_errno.
917         * kern/file.c (grub_file_open): Likewise.
919 2008-01-24  Pavel Roskin  <proski@gnu.org>
921         * include/grub/ieee1275/ieee1275.h: Introduce flag for firmwares
922         that hang if GRUB tries to setup colors.
923         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Don't set
924         colors for firmwares that don't support it.
925         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag):
926         Recognize Open Hack'Ware, set flags to work around its
927         limitations.
929 2008-01-24  Robert Millan  <rmh@aybabtu.com>
931         * kern/file.c (grub_file_open): Do not account previous failures of
932         unrelated functions when grub_errno is checked for.
933         Reported by Oleg Strikov.
935 2008-01-24  Bean  <bean123ch@gmail.com>
937         * fs/ufs.c (GRUB_UFS_VOLNAME_LEN): New macro.
938         (grub_ufs_sblock): New member volume name.
939         (grub_ufs_find_file): Fix string copy bug.
940         (grub_ufs_label): Implement this function properly.
942         * fs/hfs.c (grub_hfs_cnid_type): New enum.
943         (grub_hfs_iterate_records): Use the correct file number for extents
944         and catalog file. Fix problem in next index calculation.
945         (grub_hfs_find_node): Replace recursive function call with loop.
946         (grub_hfs_iterate_dir): Replace recursive function call with loop.
948 2008-01-23  Robert Millan  <rmh@aybabtu.com>
950         * include/grub/i386/ieee1275/loader.h: Include `<grub/types.h>',
951         `<grub/symbol.h>' and `<grub/multiboot.h>'.
952         (grub_multiboot2_real_boot): New function prototype.
954         * include/grub/i386/pc/memory.h: Include `<grub/machine/machine.h>'.
955         [!GRUB_MACHINE_IEEE1275] (grub_lower_mem, grub_upper_mem): Disable.
957         * kern/i386/ieee1275/init.c (grub_os_area_addr)
958         (grub_os_area_size, grub_lower_mem, grub_upper_mem): Remove variables.
960 2008-01-23  Robert Millan  <rmh@aybabtu.com>
962         * kern/mm.c (grub_mm_init_region): Replace grub_dprintf() call with
963         #ifdef'ed out grub_printf().
965 2008-01-23  Robert Millan  <rmh@aybabtu.com>
967         * term/i386/pc/at_keyboard.c (grub_keyboard_isr): #ifdef out
968         grub_dprintf calls, since they make "debug=all" mode unusable.
969         (grub_console_checkkey): Likewise.
971 2008-01-23  Robert Millan  <rmh@aybabtu.com>
973         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
974         `term/i386/pc/at_keyboard.c'.
975         (pkglib_MODULES): Add `serial.mod'.
976         (serial_mod_SOURCES): New variable.
977         (serial_mod_CFLAGS): Likewise.
978         (serial_mod_LDFLAGS): Likewise.
980         * include/grub/i386/ieee1275/console.h: Add `<grub/symbol.h>'.  Remove
981         `<grub/powerpc/ieee1275/console.h>'.
982         (grub_keyboard_controller_init): New function prototype.
983         (grub_console_checkkey): Likewise.
984         (grub_console_getkey): Likewise.
986         * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize AT
987         keyboard on i386.
989         * term/ieee1275/ofconsole.c (grub_ofconsole_term): On i386, use
990         grub_ofconsole_checkkey() and grub_ofconsole_getkey() for input.
992 2008-01-23  Robert Millan  <rmh@aybabtu.com>
994         * kern/i386/pc/init.c (make_install_device): When memdisk image is
995         present, "(memdisk)/boot/grub" becomes the default prefix.
997         * util/i386/pc/grub-mkrescue.in: Switch to a minimal core.img plus
998         a memdisk tarball with all the modules.  Add --overlay=DIR option that
999         allows users to overlay additional files into the image.
1001 2008-01-23  Robert Millan  <rmh@aybabtu.com>
1003         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add `machine/loader.h'
1004         and `machine/memory.h'.
1005         (pkglib_MODULES): Add `multiboot.mod' and `_multiboot.mod'.
1006         (_multiboot_mod_SOURCES): New variable.
1007         (_multiboot_mod_CFLAGS): Likewise.
1008         (_multiboot_mod_LDFLAGS): Likewise.
1009         (multiboot_mod_SOURCES): Likewise.
1010         (multiboot_mod_CFLAGS): Likewise.
1011         (multiboot_mod_LDFLAGS): Likewise.
1013         * include/grub/i386/ieee1275/loader.h: New file.
1015         * include/grub/i386/ieee1275/machine.h: Likewise.
1017         * include/grub/i386/ieee1275/memory.h: Likewise.
1019         * include/grub/i386/pc/init.h (grub_os_area_addr): Remove (redundant)
1020         variable declaration.
1021         (grub_os_area_size): Likewise.
1023         * kern/i386/ieee1275/init.c (grub_os_area_addr, grub_os_area_size)
1024         (grub_lower_mem, grub_upper_mem): New variables.
1025         (grub_stop_floppy): New function (just to make
1026         grub_multiboot2_real_boot() happy).
1028         * kern/i386/ieee1275/startup.S: Include `<grub/machine/memory.h>',
1029         `<grub/cpu/linux.h>', `<multiboot.h>' and `<multiboot2.h>'.
1030         (grub_stop): New function.
1031         Include `"../realmode.S"' and `"../loader.S"'.
1033         * loader/multiboot_loader.c: Include `<grub/machine/machine.h>'.
1034         Replace `__i386__' #ifdefs with `GRUB_MACHINE_PCBIOS'.
1036         * loader/powerpc/ieee1275/multiboot2.c (grub_mb2_arch_boot): On i386,
1037         rely on grub_multiboot2_real_boot() for final boot.
1039 2008-01-22  Robert Millan  <rmh@aybabtu.com>
1041         * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): When
1042         `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag is set, skip any
1043         device that doesn't look like an SD card.
1044         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
1045         `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag.
1046         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag): Detect
1047         OLPC laptop, and set `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' when
1048         found.
1050 2008-01-22  Robert Millan  <rmh@aybabtu.com>
1052         * kern/powerpc/ieee1275/init.c (grub_claim_heap): Add sanity check to
1053         avoid claiming over our own code.
1055 2008-01-22  Bean  <bean123ch@gmail.com>
1057         * conf/i386-pc.rmk (pkglib_MODULES): Add `jpeg.mod'.
1058         (jpeg_mod_SOURCES): New variable.
1059         (jpeg_mod_CFLAGS): Likewise.
1060         (jpeg_mod_LDFLAGS): Likewise.
1062         * video/readers/jpeg.c : New file.
1064 2008-01-22  Bean  <bean123ch@gmail.com>
1066         * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_FILE_NOT_FOUND when
1067         there are no more items.
1069 2008-01-21  Robert Millan  <rmh@aybabtu.com>
1071         * kern/mm.c (grub_mm_init_region): Improve debug message.
1073 2008-01-21  Robert Millan  <rmh@aybabtu.com>
1075         * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): New variable.
1076         (kernel_img_LDFLAGS): Use `GRUB_MEMORY_MACHINE_LINK_ADDR' as link
1077         address.
1078         (grub_mkimage_CFLAGS): Propagate `GRUB_MEMORY_MACHINE_LINK_ADDR' as
1079         a C macro.
1080         * include/grub/i386/pc/memory.h (GRUB_MEMORY_MACHINE_UPPER): New macro.
1081         Indicates start of upper memory.
1082         * util/i386/pc/grub-mkimage.c: Include `<grub/machine/memory.h>'.
1083         (generate_image): Abort when image size is big enough to corrupt
1084         upper memory.
1086         * include/grub/i386/pc/vga.h: Include `<grub/machine/memory.h>'.
1087         (GRUB_MEMORY_MACHINE_VGA_ADDR): Alias for `GRUB_MEMORY_MACHINE_UPPER'.
1088         * term/i386/pc/vga.c (VGA_MEM): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
1089         instead of hardcoding 0xA0000.
1090         * video/i386/pc/vbe.c: Include `<grub/machine/vga.h>'.
1091         (grub_vbe_set_video_mode): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
1092         instead of hardcoding 0xA0000.
1094 2008-01-21  Robert Millan  <rmh@aybabtu.com>
1096         * disk/memdisk.c (memdisk_size): New variable.
1097         (grub_memdisk_open): Replace grub_arch_memdisk_size() call with
1098         `memdisk_size'.
1099         (grub_memdisk_init): Initialize `memdisk_size'.  Reallocate memdisk
1100         image to dynamic memory.
1101         (grub_memdisk_fini): Replace grub_arch_memdisk_size() call with
1102         `memdisk_size'.  Free memdisk block.
1104 2008-01-21  Robert Millan  <rmh@aybabtu.com>
1106         Fix detection of very small filesystems (like tar).
1108         * fs/reiserfs.c (grub_reiserfs_mount): When disk is too small to
1109         contain a ReiserFS, abort with GRUB_ERR_BAD_FS rather than
1110         GRUB_ERR_OUT_OF_RANGE (which made the upper layer think there's
1111         a problem with this disk).
1113 2008-01-21  Robert Millan  <rmh@aybabtu.com>
1115         * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Add debug message
1116         on grub_biosdisk_rw_standard() error.
1118 2008-01-21  Robert Millan  <rmh@aybabtu.com>
1120         * include/grub/ieee1275/ieee1275.h: Add 2008 to Copyright line for
1121         recent changes.
1122         * kern/elf.c: Likewise.
1123         * kern/ieee1275/ieee1275.c: Likewise.
1124         * kern/powerpc/ieee1275/openfw.c: Likewise.
1125         * term/ieee1275/ofconsole.c: Likewise.
1127 2008-01-21  Robert Millan  <rmh@aybabtu.com>
1129         * include/grub/i386/pc/kernel.h: Include `<grub/symbol.h>'.
1131         * include/grub/kernel.h (grub_arch_memdisk_addr)
1132         (grub_arch_memdisk_size): Moved from here ...
1134         * include/grub/i386/pc/kernel.h (grub_arch_memdisk_addr)
1135         (grub_arch_memdisk_size): ... to here.
1137 2008-01-21  Robert Millan  <rmh@aybabtu.com>
1139         Mostly based on bugfix from Bean.
1141         * kern/elf.c (grub_elf32_phdr_iterate): Use `NESTED_FUNC_ATTR'
1142         attribute with hook() parameter.
1143         (grub_elf32_load): Use `NESTED_FUNC_ATTR' with grub_elf32_load_segment()
1144         declaration.
1145         (grub_elf64_phdr_iterate): Use `NESTED_FUNC_ATTR'
1146         attribute with hook() parameter.
1147         (grub_elf64_load): Use `NESTED_FUNC_ATTR' with grub_elf64_load_segment()
1148         declaration.
1150 2008-01-21  Robert Millan  <rmh@aybabtu.com>
1152         * conf/i386-pc.rmk (kernel_img_HEADERS): Add `machine/kernel.h'.
1153         (pkglib_MODULES): Add `memdisk.mod'.
1154         (memdisk_mod_SOURCES): New variable.
1155         (memdisk_mod_CFLAGS): Likewise.
1156         (memdisk_mod_LDFLAGS): Likewise.
1158         * disk/memdisk.c: New file.
1160         * include/grub/disk.h (grub_disk_dev_id): Add
1161         `GRUB_DISK_DEVICE_MEMDISK_ID'.
1163         * include/grub/i386/pc/kernel.h
1164         (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): New macro.
1165         (GRUB_KERNEL_MACHINE_PREFIX): Increment by 4.
1166         (grub_kernel_image_size): New variable declaration.
1167         (grub_total_module_size): Likewise.
1168         (grub_memdisk_image_size): Likewise.
1170         * include/grub/i386/pc/memory.h
1171         (GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR): New macro.
1173         * include/grub/kernel.h: Include `<grub/symbol.h>'.
1174         (grub_arch_memdisk_addr): New variable declaration.
1175         (grub_arch_memdisk_size): Likewise.
1177         * kern/i386/pc/init.c (grub_arch_memdisk_addr): New function.
1178         (grub_arch_memdisk_size): Likewise.
1180         * kern/i386/pc/startup.S (grub_memdisk_image_size): New variable.
1181         (codestart): Replace hardcoded `0x100000' with
1182         `GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR' macro.
1184         * util/i386/pc/grub-mkimage.c: Include `<grub/misc.h>'.
1185         (generate_image): Add `memdisk_path' parameter.  When `memdisk_path' is
1186         not NULL, append the contents of the file it refers to, at the end of
1187         the compressed kernel image.  Initialize `grub_memdisk_image_size'
1188         variable (at `GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE' offset).
1189         (options): Add "memdisk"|'m' option.
1190         (main): Parse --memdisk|-m option, and pass user-provided path as
1191         parameter to generate_image().
1193 2008-01-20  Robert Millan  <rmh@aybabtu.com>
1195         * kern/sparc64/ieee1275/openfw.c (grub_devalias_iterate): Copy debug
1196         grub_dprintf() calls from here ...
1197         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): ... to here.
1199 2008-01-20  Robert Millan  <rmh@aybabtu.com>
1201         Fix detection of "real mode" when /options/real-mode? doesn't exist.
1203         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_mmu): New variable
1204         declaration.
1205         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_mmu): New variable.
1206         (grub_ieee1275_find_options): If `grub_ieee1275_mmu' is 0, set
1207         `GRUB_IEEE1275_FLAG_REAL_MODE'.
1208         (cmain): Intialize `grub_ieee1275_mmu' (using /chosen/mmu integer
1209         property).
1210         * kern/powerpc/ieee1275/openfw.c (grub_map): Rely on pre-initialized
1211         `grub_ieee1275_mmu' rather than obtaining a handler on every call.
1213 2008-01-19  Robert Millan  <rmh@aybabtu.com>
1215         Get rid of confusing function (superceeded by
1216         `grub_ieee1275_get_integer_property')
1217         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_decode_int_4): Remove
1218         prototype.
1219         * kern/ieee1275/ieee1275.c (grub_ieee1275_decode_int_4): Remove
1220         function.
1221         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid use of
1222         grub_ieee1275_decode_int_4(), by obtaining integer properties directly
1223         in native endianess from grub_ieee1275_get_integer_property().
1225 2008-01-19  Robert Millan  <rmh@aybabtu.com>
1227         * kern/powerpc/ieee1275/openfw.c (grub_halt): Issue "power-off"
1228         command after "shut-down", since implementations differ on which
1229         the command for halt is.
1231 2008-01-19  Robert Millan  <rmh@aybabtu.com>
1233         * include/grub/i386/linuxbios/console.h: Add header protection.
1234         (grub_keyboard_controller_init): New function prototype.
1235         * term/i386/pc/at_keyboard.c (KEYBOARD_COMMAND_ISREADY): New macro.
1236         (KEYBOARD_COMMAND_READ): Likewise.
1237         (KEYBOARD_COMMAND_WRITE): Likewise.
1238         (KEYBOARD_SCANCODE_SET1): Likewise.
1239         (grub_keyboard_controller_write): New function.
1240         (grub_keyboard_controller_read): Likewise.
1241         (grub_keyboard_controller_init): Likewise.
1243         * term/i386/pc/console.c: Include `<grub/machine/machine.h>'.
1244         (grub_console_init): On coreboot/LinuxBIOS, call
1245         grub_keyboard_controller_init().
1247 2008-01-19  Robert Millan  <rmh@aybabtu.com>
1249         PowerPC changes provided by Pavel Roskin.
1251         * kern/powerpc/ieee1275/cmain.c (cmain): Don't take any arguments.
1252         * kern/powerpc/ieee1275/crt0.S: Store r5 in grub_ieee1275_entry_fn,
1253         don't rely on cmain() doing it.
1254         * kern/i386/ieee1275/startup.S (_start): Store %eax in
1255         grub_ieee1275_entry_fn, don't rely on cmain() doing it.
1257 2008-01-16  Robert Millan  <rmh@aybabtu.com>
1259         * include/grub/i386/linuxbios/memory.h
1260         (GRUB_MEMORY_MACHINE_LINUXBIOS_TABLE_ADDR): Remove macro.
1261         * kern/i386/linuxbios/table.c (grub_linuxbios_table_iterate): Do not
1262         receive `table_header' as argument.  Instead, probe for it in the
1263         known memory ranges where it can be present.
1264         (grub_available_iterate): Do not pass a fixed `table_header' address
1265         to grub_linuxbios_table_iterate().
1267 2008-01-15  Robert Millan  <rmh@aybabtu.com>
1269         * configure.ac: Add `i386-ieee1275' to the list of supported targets.
1270         * conf/i386-ieee1275.rmk: New file.
1271         * include/grub/i386/ieee1275/console.h: Likewise.
1272         * include/grub/i386/ieee1275/ieee1275.h: Likewise.
1273         * include/grub/i386/ieee1275/kernel.h: Likewise.
1274         * include/grub/i386/ieee1275/time.h: Likewise.
1275         * kern/i386/ieee1275/init.c: Likewise.
1276         * kern/i386/ieee1275/startup.S: Likewise.
1278 2008-01-15  Robert Millan  <rmh@aybabtu.com>
1280         * kern/misc.c (grub_vsprintf): Do not reset `longlongfmt' to zero
1281         when pointers are 32-bit (but still do set it to one when they are
1282         64-bit).
1284 2008-01-15  Robert Millan  <rmh@aybabtu.com>
1286         * include/grub/ieee1275/ieee1275.h
1287         (grub_ieee1275_get_integer_property): New function prototype.
1289         * kern/ieee1275/ieee1275.c: Include `<grub/types.h>'.
1290         (grub_ieee1275_get_integer_property): New function.  Wraps around
1291         grub_ieee1275_get_property() to handle endianess.
1293         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Replace
1294         grub_ieee1275_get_property() with grub_ieee1275_get_integer_property()
1295         where appropiate.
1296         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Likewise.
1297         (grub_map): Likewise.
1298         * kern/sparc64/ieee1275/openfw.c (grub_map): Likewise.
1300 2008-01-15  Bean  <bean123ch@gmail.com>
1302         * normal/execute.c (grub_script_exec_argument_to_string): Check for undefined variable.
1303         (grub_script_execute_cmdline): Reset grub_errno.
1305         * normal/main.c (read_config_file): Reset grub_errno.
1307         * normal/parse.y (script_init): New.
1308         (script): Move function and menuentry here.
1309         (delimiter): New.
1310         (command): Add delimiter at the end of command.
1311         (commands): Adjust to match the new command.
1312         (commandblock): Remove grub_script_lexer_record_start.
1313         (menuentry): Add grub_script_lexer_record_start, use the new commands. 
1314         (if): Use the new commands.
1316         * conf/common.rmk (pkgdata_MODULES): Add echo.mod.
1318 2008-01-15  Robert Millan  <rmh@aybabtu.com>
1320         * normal/menu.c (run_menu): Move timeout message from here ...
1321         (print_timeout): ... to here.
1322         (run_menu): Use print_timeout() once during initial draw to print
1323         the whole message, and again in every clock tick to update only
1324         the number of seconds.
1326 2008-01-15  Robert Millan  <rmh@aybabtu.com>
1328         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Obtain
1329         actual size of `available' from grub_ieee1275_get_property(), and
1330         restrict parsing to that bound.
1332 2008-01-15  Christian Franke  <franke@computer.org>
1334         * util/grub-emu.c: Replace <argp.h> by <getopt.h>.
1335         (argp_program_version): Remove variable.
1336         (argp_program_bug_address): Likewise.
1337         (options): Convert from struct argp_option to struct option.
1338         (struct arguments): Remove.
1339         (parse_opt): Remove.
1340         (usage): New function.
1341         (main): Replace struct args members by simple variables.
1342         Replace argp_parse() by getopt_long().
1343         Add switch to evaluate options.
1344         Add missing "(...)" around root_dev in prefix string.
1346 2008-01-14  Robert Millan  <rmh@aybabtu.com>
1348         * kern/powerpc/ieee1275/init.c (grub_exit): Reimplement as a wrapper
1349         for grub_ieee1275_exit(), in order to improve portability.
1351 2008-01-14  Robert Millan  <rmh@aybabtu.com>
1353         * util/grub.d/10_linux.in (prefix): Define.
1354         (exec_prefix): Likewise.  Both definitions are later used by `libdir'.
1356 2008-01-13  Pavel Roskin  <proski@gnu.org>
1358         * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Don't use
1359         grub_errno if no errors have been detected.
1361 2008-01-12  Robert Millan  <rmh@aybabtu.com>
1363         * include/grub/util/getroot.h (grub_dev_abstraction_types): New enum.
1364         (grub_util_get_dev_abstraction): New function prototype.
1366         * util/getroot.c: Include `<grub/util/getroot.h>'
1367         (grub_util_get_grub_dev): Move detection of abstraction type to ...
1368         (grub_util_get_dev_abstraction): ... here (new function).
1370         * util/grub-probe.c: Convert PRINT_* to an enum.  Add
1371         `PRINT_ABSTRACTION'.
1372         (probe): Probe for abstraction type when requested.
1373         (main): Understand `--target=abstraction'.
1375         * util/i386/efi/grub-install.in: Add abstraction module to core
1376         image when it is found to be necessary.
1377         * util/i386/pc/grub-install.in: Likewise.
1378         * util/powerpc/ieee1275/grub-install.in: Likewise.
1380         * util/update-grub_lib.in (font_path): Return system path without
1381         converting to GRUB path.
1382         * util/update-grub.in: Convert system path returned by font_path()
1383         to a GRUB path.  Use `grub-probe -t abstraction' to determine what
1384         abstraction module is needed for loading fonts (if any).  Export
1385         that as `GRUB_PRELOAD_MODULES'.
1386         * util/grub.d/00_header.in: Process `GRUB_PRELOAD_MODULES' (print
1387         insmod commands).
1389 2008-01-12  Yoshinori K. Okuji  <okuji@enbug.org>
1391         Remove some unused code from reiserfs.
1392         
1393         * fs/reiserfs.c (struct grub_reiserfs_key)
1394         [GRUB_REISERFS_KEYV2_BITFIELD]: Removed offset and type.
1395         (struct grub_reiserfs_node_body): Removed.
1396         (grub_reiserfs_get_key_v2_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
1397         Likewise.
1398         (grub_reiserfs_get_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
1399         Likewise.
1400         (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
1401         Likewise.
1402         (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
1403         Likewise.
1404         (grub_reiserfs_set_key_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
1405         Likewise.
1406         (grub_reiserfs_iterate_dir) [GRUB_REISERFS_KEYV2_BITFIELD]:
1407         Likewise.
1408         (grub_reiserfs_open) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
1409         (grub_reiserfs_read) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
1410         (grub_reiserfs_dir) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
1412 2008-01-10  Robert Millan  <rmh@aybabtu.com>
1414         * util/update-grub_lib.in (grub_file_is_not_garbage): New function.
1415         Determines if a file is garbage left by packaging systems, etc.
1416         * util/update-grub.in: Use grub_file_is_not_garbage() as a condition
1417         for processing /etc/grub.d scripts.
1418         * util/grub.d/10_hurd.in: Fix `GRUB_DISTRIBUTOR' comparison.
1419         * util/grub.d/10_linux.in: Likewise.  Use grub_file_is_not_garbage()
1420         as a condition for processing Linux images.
1422 2008-01-10  Pavel Roskin  <proski@gnu.org>
1424         * include/grub/powerpc/libgcc.h (__ucmpdi2): New export.  Needed
1425         to compile reiserfs.c on PowerPC.
1427 2008-01-10  Robert Millan  <rmh@aybabtu.com>
1429         * kern/device.c (grub_device_iterate): Do not abort device iteration
1430         when one of the devices cannot be opened.
1431         * kern/disk.c (grub_disk_open): Do not account previous failures of
1432         unrelated functions when grub_errno is checked for.
1434 2008-01-08  Robert Millan  <rmh@aybabtu.com>
1436         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): For
1437         `! grub_linux_is_bzimage', change order of address comparison to make
1438         it more intuitive, and improve "too big zImage" error message.
1440 2008-01-08  Robert Millan  <rmh@aybabtu.com>
1442         * Makefile.in (uninstall): Handle `$(update-grub_SCRIPTS)' and
1443         `$(update-grub_DATA)'.
1444         (distcheck): Fix race condition when invoking `$(MAKE)' on multiple
1445         targets.
1447 2008-01-07  Robert Millan  <rmh@aybabtu.com>
1449         * boot/i386/pc/boot.S (boot_drive_check): Add a comment indicating
1450         which instruction is modified by grub-setup during installation
1451         (since it wasn't obvious by only looking at this file).
1453 2008-01-07  Robert Millan  <rmh@aybabtu.com>
1455         * TODO: Rewrite.  Just refer to the wiki and the BTS instead of
1456         listing actual TODO items.
1458 2008-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
1460         * fs/reiserfs.c (grub_reiserfs_get_key_v2_type): Handle endianness
1461         correctly.
1462         (grub_reiserfs_get_key_offset): Likewise.
1463         (grub_reiserfs_set_key_offset): Likewise.
1464         (grub_reiserfs_set_key_type): Likewise.
1465         (grub_reiserfs_iterate_dir): Return 1 if found, otheriwise 0.
1467         (GRUB_REISERFS_KEYV2_BITFIELD): Undefined. Probably it would be
1468         better to remove the bitfield version completely.
1469         
1470 2008-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
1471         
1472         * fs/reiserfs.c (grub_reiserfs_iterate_dir): ENTRY_ITEM must be
1473         allocated from the heap, due to the fshelp implementation.
1474         (grub_reiserfs_dir): Free NODE, due to the same reason.
1476 2008-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
1478         Mostly from Vincent Pelletier:
1479         
1480         * fs/reiserfs.c: New file.
1481         
1482         * conf/common.rmk (pkglib_MODULES): Added reiserfs.mod.
1483         (reiserfs_mod_SOURCES): New variable.
1484         (reiserfs_mod_CFLAGS): Likewise.
1485         (reiserfs_mod_LDFLAGS): Likewise.
1487         * DISTLIST: Added boot/i386/pc/lnxboot.S, commands/hexdump.c,
1488         disk/ata.c, fs/cpio.c, fs/ntfscomp.c, fs/reiserfs.c,
1489         include/grub/ntfs.h, include/grub/i386/pc/machine.h, and
1490         normal/color.c.
1492 2008-01-06  Robert Millan  <rmh@aybabtu.com>
1494         * normal/color.c: Remove `<grub/env.h>'.
1496 2008-01-05  Jeroen Dekkers  <jeroen@dekkers.cx>
1498         * include/grub/normal.h: Include <grub/env.h>.
1500 2008-01-05  Robert Millan  <rmh@aybabtu.com>
1502         * util/i386/pc/grub-setup.c (usage): Replace obsolete `(hd0,0)' in
1503         usage example with `(hd0,1)'.
1504         Reported by Samuel Thibault.
1506 2008-01-05  Robert Millan  <rmh@aybabtu.com>
1508         * kern/i386/loader.S (grub_linux_is_bzimage): New variable.
1509         (grub_linux_boot_zimage): Rename to ...
1510         (grub_linux_boot): ... this.
1511         (grub_linux_boot_bzimage): Merge with `grub_linux_boot_zimage'.
1512         (grub_linux_boot_zimage): Conditionalize zImage copy.
1514         * include/grub/i386/loader.h (grub_linux_is_bzimage): Add prototype.
1515         (grub_linux_boot_bzimage): Remove prototype.
1516         (grub_linux_boot_zimage): Rename to ...
1517         (grub_linux_boot): ... this.
1519         * loader/i386/pc/linux.c (big_linux): Replace with `grub_linux_is_bzimage'.
1520         (grub_linux_boot): Remove function.
1522 2008-01-05  Robert Millan  <rmh@aybabtu.com>
1524         * include/grub/normal.h (grub_env_write_color_normal): New prototype.
1525         (grub_env_write_color_highlight): Likewise.
1526         (grub_wait_after_message): Likewise.
1528         * normal/color.c: New file.
1530         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/color.c'.
1531         (normal_mod_DEPENDENCIES): Likewise.
1533         * conf/i386-efi.rmk (grub_emu_SOURCES): Add `normal/color.c'.
1534         (normal_mod_DEPENDENCIES): Likewise.
1536         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add `normal/color.c'.
1537         (normal_mod_DEPENDENCIES): Likewise.
1539         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `normal/color.c'.
1540         (normal_mod_DEPENDENCIES): Likewise.
1542         * normal/menu_entry.c (run): Rely on grub_wait_after_message()
1543         for waiting after a message is printed.
1544         * normal/main.c (read_config_file): Likewise.
1545         (grub_normal_init): Register grub_env_write_color_normal() and
1546         grub_env_write_color_highlight() hooks.  Mark `color_normal' and
1547         `color_highlight' variables as global.
1549         * normal/menu.c (grub_wait_after_message): New function.
1550         (grub_color_menu_normal): New variable.  Replaces ...
1551         (GRUB_COLOR_MENU_NORMAL): ... this macro.
1552         (grub_color_menu_highlight): New variable.  Replaces ...
1553         (GRUB_COLOR_MENU_HIGHLIGHT): ... this macro.
1554         (draw_border): Set color state to `GRUB_TERM_COLOR_NORMAL' instead of
1555         `GRUB_TERM_COLOR_STANDARD'.
1556         (print_message): Use `grub_setcolorstate' to reload colors.  Rename
1557         `normal_code' and `highlight_code' to `old_color_normal' and
1558         `old_color_highlight', respectively.
1559         (grub_menu_init_page): Update colors when drawing the menu, based on
1560         `menu_color_normal' and `menu_color_highlight' variables.
1561         (grub_menu_run): Rely on grub_wait_after_message() for waiting after
1562         a message is printed.
1564 2008-01-05  Robert Millan  <rmh@aybabtu.com>
1566         * kern/env.c (grub_env_context_open): Propagate hooks for global
1567         variables to new context.
1569         * kern/main.c (grub_set_root_dev): Export `root' variable.
1571 2008-01-05  Robert Millan  <rmh@aybabtu.com>
1573         * util/biosdisk.c (get_os_disk): Check for devfs-style IDE and SCSI
1574         discs unconditionaly, since udev and others have options to provide
1575         them.
1577 2008-01-05  Robert Millan  <rmh@aybabtu.com>
1579         * normal/completion.c (iterate_dir): Skip `.' and `..' directories.
1581 2008-01-04  Christian Franke  <franke@computer.org>
1583         * kern/i386/pc/init.c (grub_machine_init): Fix evaluation
1584         of eisa_mmap.
1586 2008-01-03  Pavel Roskin  <proski@gnu.org>
1588         * kern/i386/linuxbios/init.c: Put "void" to all function
1589         declarations with no arguments.
1590         * kern/powerpc/ieee1275/init.c: Likewise.
1591         * term/i386/pc/at_keyboard.c: Likewise.
1592         * term/i386/pc/vga_text.c: Likewise.
1593         * util/grub-mkdevicemap.c: Likewise.
1595 2008-01-02  Robert Millan  <rmh@aybabtu.com>
1597         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Improve error
1598         message when loaded image is out of bounds.
1599         (grub_multiboot_load_elf64): Likewise.
1601 2008-01-02  Pavel Roskin  <proski@gnu.org>
1603         * util/grub.d/10_linux.in: Try version without ".old" when
1604         looking for initrd.  It's better to use initrd from the newer
1605         kernel of the same version than no initrd at all.
1607 2008-01-01  Robert Millan  <rmh@aybabtu.com>
1609         * util/biosdisk.c (get_os_disk): Fix check for IDE or SCSI discs.
1611 2008-01-01  Vesa Jaaskelainen  <chaac@nic.fi>
1613         * include/grub/video.h: Added grub_video_unmap_color and 
1614         grub_video_get_active_render_target.
1615         (grub_video_adapter): Added unmap_color and get_active_render_target.
1617         * video/video.c: Added grub_video_unmap_color and 
1618         grub_video_get_active_render_target.
1619         (grub_video_get_info): Changed method to accept NULL pointer as an
1620         argument to allow detection of active video adapter.
1622         * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as
1623         grub_video_vbe_unmap_color_int.
1624         Added grub_video_vbe_unmap_color and
1625         grub_video_vbe_get_active_render_target.
1626         (grub_video_vbe_adapter): Added unmap_color and
1627         get_active_render_target.
1629         * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage 
1630         with grub_video_vbe_unmap_color_int.
1632         * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added.
1633         (DEFAULT_NORMAL_COLOR): Likewise.
1634         (DEFAULT_HIGHLIGHT_COLOR) Likewise.
1635         (DEFAULT_FG_COLOR): Removed.
1636         (DEFAULT_BG_COLOR): Likewise.
1637         (DEFAULT_CURSOR_COLOR): Changed value.
1638         (grub_virtual_screen): Added standard_color_setting,
1639         normal_color_setting, highlight_color_setting and term_color.
1640         (grub_virtual_screen): Removed fg_color_setting and bg_color_setting.
1641         (bitmap_width): Added.
1642         (bitmap_height): Likewise.
1643         (bitmap): Likewise.
1644         (set_term_color): Likewise.
1645         (grub_virtual_screen_setup): Changed to use new terminal coloring
1646         settings.
1647         (grub_gfxterm_init): Added init for bitmap.
1648         (grub_gfxterm_fini): Added destroy for bitmap.
1649         (redraw_screen_rect): Updated to use background bitmap and new
1650         terminal coloring.
1651         (scroll_up): Added optimization for case when there is no bitmap.
1652         (grub_gfxterm_cls): Fixed to use correct background color.
1653         (grub_virtual_screen_setcolorstate): Changed to use new terminal
1654         coloring.
1655         (grub_virtual_screen_setcolor): Likewise.
1656         (grub_virtual_screen_getcolor): Added.
1657         (grub_gfxterm_background_image_cmd): Likewise.
1658         (grub_video_term): Added setcolor and getcolor.
1659         (MOD_INIT): Added registration of background_image command.
1660         (MOD_TERM): Added unregistration for background_image command.
1662 2007-12-30  Pavel Roskin  <proski@gnu.org>
1664         * loader/multiboot_loader.c: Fix multiboot command
1665         unregistration.  Fix all typos in the word "multiboot".
1667 2007-12-29  Pavel Roskin  <proski@gnu.org>
1669         * util/grub.d/10_linux.in: Refactor search for initrd.  Add
1670         support for initrd names used in Fedora.
1672 2007-12-26  Bean  <bean123ch@gmail.com>
1674         * conf/common.rmk (pkgdata_MODULES): Add cpio.mod.
1675         (cpio_mod_SOURCES): New variable.
1676         (cpio_mod_CFLAGS): Likewise.
1677         (cpio_mod_LDFLAGS): Likewise.
1679         * fs/cpio.c: New file.
1681         * conf/i386-pc.rmk (grub_emu_SOURCES): Add cpio.c.
1683         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
1685         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
1687         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1689 2007-12-25  Robert Millan  <rmh@aybabtu.com>
1691         * include/grub/term.h (struct grub_term): Add `getcolor' function.
1692         (grub_getcolor): New function.
1694         * kern/term.c (grub_getcolor): New function.
1695         * normal/menu.c (GRUB_COLOR_MENU_NORMAL): New macro.
1696         (GRUB_COLOR_MENU_HIGHLIGHT): New macro.
1697         (print_entry): Set normal and highlight colors to
1698         `GRUB_COLOR_MENU_NORMAL' and `GRUB_COLOR_MENU_HIGHLIGHT',
1699         respectively, before printing and restore them to old
1700         values afterwards.
1701         (grub_menu_init_page): Likewise.  Fill an additional colored space
1702         that would otherwise be left blank.
1704         * term/efi/console.c (grub_console_getcolor): New function.
1705         (struct grub_console_term.getcolor): New variable.
1706         * term/i386/pc/console.c (grub_console_getcolor): New function.
1707         (struct grub_console_term.getcolor): New variable.
1708         * term/ieee1275/ofconsole.c (grub_ofconsole_getcolor): New function.
1709         (struct grub_console_term.getcolor): New variable.
1711         * term/i386/pc/serial.c (grub_serial_setcolor): Remove function.
1712         (struct grub_console_term.setcolor): Remove variable.
1713         * term/i386/pc/vesafb.c (grub_virtual_screen_setcolor): Remove function.
1714         (struct grub_console_term.setcolor): Remove variable.
1715         * term/i386/pc/vga.c (grub_vga_setcolor): Remove function.
1716         (struct grub_console_term.setcolor): Remove variable.
1717         * term/gfxterm.c (grub_virtual_screen_setcolor): Remove function.
1718         (struct grub_console_term.setcolor): Remove variable.
1720 2007-12-25  Robert Millan  <rmh@aybabtu.com>
1722         * configure.ac: Search for possible unifont.hex locations, and
1723         define UNIFONT_HEX if found.
1725         * Makefile.in (UNIFONT_HEX): Define variable.
1726         (DATA): Rename to ...
1727         (PKGLIB): ... this.  Update all users.
1728         (PKGDATA): New variable.
1729         (pkgdata_IMAGES): Rename to ...
1730         (pkglib_IMAGES): ... this. Update all users.
1731         (pkgdata_MODULES): Rename to ...
1732         (pkglib_MODULES): ... this. Update all users.
1733         (pkgdata_PROGRAMS): Rename to ...
1734         (pkglib_PROGRAMS): ... this. Update all users.
1735         (pkgdata_DATA): Rename to ...
1736         (pkglib_DATA): ... this. Update all users.
1737         (CLEANFILES): Redefine to `$(pkglib_DATA) $(pkgdata_DATA)'.
1738         (unicode.pff, ascii.pff): New rules.
1739         (all-local): Add `$(PKGDATA)' dependency.
1740         (install-local): Process `$(PKGDATA)'.
1742         * util/update-grub_lib.in (font_path): Search for *.pff files in
1743         a few more locations, including `${pkgdata}'.
1745 2007-12-23  Robert Millan  <rmh@aybabtu.com>
1747         Patch from Bean  <bean123ch@gmail.com>:
1748         * disk/loopback.c (grub_loopback_read): Add missing bit shift to
1749         `size'.
1751 2007-12-21  Bean  <bean123ch@gmail.com>
1753         * conf/common.rmk (pkgdata_MODULES): Add ntfscomp.mod.
1754         (ntfscomp_mod_SOURCES): New variable.
1755         (ntfscomp_mod_CFLAGS): Likewise.
1756         (ntfscomp_mod_LDFLAGS): Likewise.
1758         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfscomp.c.
1759         (grub_probe_SOURCES): Likewise.
1760         (grub_emu_SOURCES): Likewise.
1762         * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
1763         (grub_emu_SOURCES): Likewise.
1765         * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
1766         (grub_emu_SOURCES): Likewise.
1768         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
1769         (grub_emu_SOURCES): Likewise.
1771         * fs/ntfs.c (grub_ntfscomp_func): New variable.
1772         (read_run_list): Renamed to grub_ntfs_read_run_list.
1773         (decomp_nextvcn): Moved to ntfscomp.c.
1774         (decomp_getch): Likewise.
1775         (decomp_get16): Likewise.
1776         (decomp_block): Likewise.
1777         (read_block): Likewise.
1778         (read_data): Partially moved to ntfscomp.c.
1779         (fixup): Change unsigned to grub_uint16_t.
1780         (read_mft): Change unsigned long to grub_uint32_t.
1781         (read_attr): Likewise.
1782         (read_data): Likewise.
1783         (read_run_data): Likewise.
1784         (read_run_list): Likewise.
1785         (read_mft): Likewise.
1787         * fs/ntfscomp.c: New file.
1789         * include/grub/ntfs.h: New file.
1791 2007-12-16  Robert Millan  <rmh@aybabtu.com>
1793         * util/grub-mkdevicemap.c (make_device_map): Iterate up to 20 for
1794         IDE disk check, since Linux is known to support 20 IDE disks.
1795         Reported by Colin Watson.
1797 2007-12-15  Bean  <bean123ch@gmail.com>
1799         * conf/i386-pc.rmk (pkgdata_IMAGES): Add lnxboot.img.
1800         (lnxboot_img_SOURCES): New variable.
1801         (lnxboot_img_ASFLAGS): Likewise.
1802         (lnxboot_img_LDFLAGS): Likewise.
1804         * boot/i386/pc/lnxboot.S: New file.
1806 2007-11-24  Pavel Roskin  <proski@gnu.org>
1808         * configure.ac: Test if '--build-id=none' is supported by the
1809         linker.  If yes, add it to TARGET_LDFLAGS.  Build ID causes
1810         objcopy to generate incorrect binary files (binutils
1811         2.17.50.0.18-1 as shipped by Fedora 8).
1812         * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Use LDFLAGS when
1813         linking, so that build ID doesn't break the test.
1815 2007-11-24  Pavel Roskin  <proski@gnu.org>
1817         * include/grub/i386/time.h: use "void" in the argument list
1818         of grub_cpu_idle().
1819         * include/grub/powerpc/time.h: Likewise.
1820         * include/grub/sparc64/time.h: Likewise.
1822 2007-11-18  Christian Franke  <franke@computer.org>
1824         * util/console.c (grub_ncurses_getkey): Change curses KEY_* mapping,
1825         now return control chars instead of GRUB_CONSOLE_KEY_* constants.
1826         This fixes the problem that function keys did not work in grub-emu.
1828 2007-11-18  Christian Franke  <franke@computer.org>
1830         * disk/host.c (grub_host_open): Remove attribute unused from
1831         name parameter. Add check for "host". This fixes the problem
1832         that grub-emu does not find partitions.
1834 2007-11-18  Christian Franke  <franke@computer.org>
1836         * util/hostfs.c (is_dir): New function.
1837         (grub_hostfs_dir):  Handle missing dirent.d_type case.
1838         (grub_hostfs_read): Add missing fseek().
1839         (grub_hostfs_label): Clear label pointer.  This fixes a crash
1840         of grub-emu on "ls (host)".
1842 2007-11-18  Christian Franke  <franke@computer.org>
1844         * include/grub/i386/pc/init.h (struct grub_machine_mmap_entry):
1845         Add attribute packed, gcc 3.4.4 on Cygwin aligns this
1846         to 64 bit boundary by default.
1848 2007-11-18  Bean  <bean123ch@gmail.com>
1850         * conf/common.rmk (pkgdata_MODULES): Add hexdump.mod.
1851         (hexdump_mod_SOURCES): New variable.
1852         (hexdump_mod_CFLAGS): Likewise.
1853         (hexdump_mod_LDFLAGS): Likewise.
1854         
1855         * conf/i386-pc.rmk (grub_emu_SOURCES): Add command/hexdump.c.
1857         * conf/i386-efi.rmk (grub_emu_SOURCES): Add command/hexdump.c.
1859         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add command/hexdump.c.
1861         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add command/hexdump.c.
1863         * include/grub/hexdump.h: New file.
1865         * commands/hexdump.c: New file.
1867 2007-11-10  Robert Millan  <rmh@aybabtu.com>
1869         * commands/i386/pc/play.c (beep_off): Switch order of arguments
1870         in grub_outb() calls.
1871         (beep_on): Likewise.
1873 2007-11-10  Christian Franke  <franke@computer.org>
1875         * normal/menu.c (run_menu): Check for empty menu to avoid crash.
1876         (grub_menu_run): Likewise.
1878 2007-11-10  Robert Millan  <rmh@aybabtu.com>
1880         * include/grub/i386/efi/machine.h: New file.
1881         * include/grub/i386/linuxbios/machine.h: Likewise.
1882         * include/grub/i386/pc/machine.h: Likewise.
1883         * include/grub/powerpc/ieee1275/machine.h: Likewise.
1884         * include/grub/sparc64/ieee1275/machine.h: Likewise.
1886         * term/i386/pc/serial.c: Include <grub/machine/machine.h>.
1887         (serial_hw_io_addr): New variable.
1888         (serial_hw_get_port): Obtain port address from `serial_hw_io_addr'
1889         instead of `(unsigned short *) 0x400'.
1891 2007-11-10  Bean  <bean123ch@gmail.com>
1893         * fs/ntfs.c (read_block): Fix a bug caused by adjacent blocks.
1895 2007-11-10  Vesa Jaaskelainen  <chaac@nic.fi>
1897         * conf/i386-pc.rmk (pkgdata_MODULES): Added vga.mod.
1898         (vga_mod_SOURCES): Added.
1899         (vga_mod_CFLAGS): Likewise.
1900         (vga_mod_LDFLAGS): Likewise.
1902         * term/i386/pc/vga.c (get_map_mask): Switch order of arguments in
1903         grub_outb() calls.
1904         (set_map_mask): Likewise.
1905         (set_read_map): Likewise.
1906         (set_read_address): Likewise.
1907         (vga_font): Removed variable.
1908         (get_vga_glyph): Removed function.
1909         (invalidate_char): Likewise.
1910         (write_char): Changed to use grub_font_get_glyph() for font
1911         information.
1912         (grub_vga_putchar): Likewise.
1913         (grub_vga_getcharwidth): Likewise.
1915 2007-11-10  Vesa Jaaskelainen  <chaac@nic.fi>
1917         * conf/i386-pc.rmk (boot_img_LDFLAGS): Use COMMON_LDFLAGS for target
1918         flags.
1919         (pxeboot_img_LDFLAGS): Likewise.
1920         (diskboot_img_LDFLAGS): Likewise.
1921         (kernel_img_LDFLAGS): Likewise.
1923 2007-11-06  Robert Millan  <rmh@aybabtu.com>
1925         * term/i386/pc/serial.c (serial_hw_put): Switch order of arguments
1926         in grub_outb() calls.
1927         (serial_hw_init): Likewise.
1929 2007-11-05  Robert Millan  <rmh@aybabtu.com>
1931         * util/update-grub.in: Allow files in ${update_grub_dir} to contain
1932         spaces.  Skip non-regular files.
1934 2007-11-05  Robert Millan  <rmh@aybabtu.com>
1936         * kern/disk.c (grub_disk_firmware_fini)
1937         (grub_disk_firmware_is_tainted): New variables.
1939         * include/grub/disk.h (grub_disk_firmware_fini)
1940         (grub_disk_firmware_is_tainted): Likewise.
1942         * disk/i386/pc/biosdisk.c (GRUB_MOD_FINI(biosdisk)): Moved from here ...
1943         (grub_disk_biosdisk_fini): ... to here.
1944         (GRUB_MOD_FINI(biosdisk)): Implement using grub_disk_biosdisk_fini().
1945         (GRUB_MOD_INIT(biosdisk)): Abort when `grub_disk_firmware_is_tainted'
1946         is set.  Register grub_disk_biosdisk_fini() in
1947         `grub_disk_firmware_fini'.
1949         * disk/ata.c: Remove `<grub/machine/biosdisk.h>'.
1950         (GRUB_MOD_INIT(ata)): Remove grub_biosdisk_fini() call.
1951         Use `grub_disk_firmware_is_tainted' and `grub_disk_firmware_fini'
1952         to finish existing firmware disk interface.
1954         * conf/i386-linuxbios.rmk (pkgdata_MODULES): Add `ata.mod'.
1955         (ata_mod_SOURCES): New variable.
1956         (ata_mod_CFLAGS): Likewise.
1957         (ata_mod_LDFLAGS): Likewise.
1959 2007-11-05  Robert Millan  <rmh@aybabtu.com>
1961         * disk/ata.c: Remove `<grub/machine/time.h>'.  Include `<grub/time.h>'.
1962         (grub_ata_wait): Reimplement using grub_millisleep().
1964         * include/grub/misc.h (grub_div_roundup): Fix parenthesization.
1965         * include/grub/i386/time.h (grub_cpu_idle): Disable `hlt' instruction.
1967 2007-11-03  Marco Gerards  <marco@gnu.org>
1969         * term/i386/pc/vga_text.c: Include <grub/cpu/io.h>.
1970         (CRTC_ADDR_PORT): New macro.
1971         (CRTC_DATA_PORT): Likewise.
1972         (CRTC_CURSOR): Likewise.
1973         (CRTC_CURSOR_ADDR_HIGH): Likewise.
1974         (CRTC_CURSOR_ADDR_LOW): Likewise.
1975         (update_cursor): New function.
1976         (grub_console_real_putchar): Call `update_cursor'.
1977         (grub_console_gotoxy): Likewise.
1978         (grub_console_cls): Set the default color when clearing the
1979         screen.
1980         (grub_console_setcursor): Implemented.
1982 2007-11-03  Marco Gerards  <marco@gnu.org>
1984         * disk/ata.c (grub_ata_pio_read): Don't wait for the command to
1985         become activate.
1986         (grub_ata_pio_write): Likewise.
1988         (grub_atapi_identify): Wait after issuing an ATA command.
1989         (grub_atapi_packet): Likewise.
1990         (grub_ata_identify): Likewise.
1991         (grub_ata_readwrite): Likewise.
1993 2007-11-03  Marco Gerards  <marco@gnu.org>
1995         * disk/ata.c (grub_ata_pio_read): Detect and return the error code.
1996         (grub_ata_pio_write): Likewise.
1997         (grub_ata_readwrite): Use `grub_error', instead of
1998         returning `grub_errno'.
2000 2007-11-03  Marco Gerards  <marco@gnu.org>
2002         * disk/ata.c (grub_ata_readwrite): Call grub_ata_pio_read and
2003         grub_ata_pio_write once for every single sector, instead of for
2004         multiple sectors.
2006 2007-10-31  Robert Millan  <rmh@aybabtu.com>
2008         * configure.ac: Add `i386-linuxbios' to the list of supported targets.
2010         * conf/i386-linuxbios.rmk: New file.
2012         * kern/i386/pc/hardware.c: Likewise.
2013         * term/i386/pc/at_keyboard.c: Likewise.
2014         * term/i386/pc/vga_text.c: Likewise.
2016         * include/grub/i386/linuxbios/boot.h: Likewise.
2017         * include/grub/i386/linuxbios/console.h: Likewise.
2018         * include/grub/i386/linuxbios/init.h: Likewise.
2019         * include/grub/i386/linuxbios/kernel.h: Likewise.
2020         * include/grub/i386/linuxbios/loader.h: Likewise.
2021         * include/grub/i386/linuxbios/memory.h: Likewise.
2022         * include/grub/i386/linuxbios/serial.h: Likewise.
2023         * include/grub/i386/linuxbios/time.h: Likewise.
2025         * kern/i386/linuxbios/init.c: Likewise.
2026         * kern/i386/linuxbios/startup.S: Likewise.
2027         * kern/i386/linuxbios/table.c: Likewise.
2029 2007-10-31  Marco Gerards  <marco@gnu.org>
2031         * conf/i386-pc.rmk (pkgdata_MODULES): Add `ata.mod'.
2032         (ata_mod_SOURCES): New variable.
2033         (ata_mod_CFLAGS): Likewise.
2034         (ata_mod_LDFLAGS): Likewise.
2036         * disk/ata.c: New file.
2038         * include/grub/disk.h (grub_disk_dev_id): Add
2039         `GRUB_DISK_DEV_ATA_ID'.
2040         
2041 2007-10-31  Robert Millan  <rmh@aybabtu.com>
2043         * include/grub/i386/pc/init.h (grub_lower_mem): Moved from here ...
2044         * include/grub/i386/pc/memory.h (grub_lower_mem): ... to here.
2046         * include/grub/i386/pc/init.h (grub_upper_mem): Moved from here ...
2047         * include/grub/i386/pc/memory.h (grub_upper_mem): ... to here.
2049         * include/grub/i386/pc/memory.h: Include `<grub/symbol.h>' and
2050         `<grub/types.h>'.
2052         * loader/i386/pc/multiboot.c: Include `<grub/machine/memory.h>'.
2054 2007-10-27  Robert Millan  <rmh@aybabtu.com>
2056         * include/grub/types.h (ULONG_MAX): Define macro.
2058 2007-10-22  Robert Millan  <rmh@aybabtu.com>
2060         * kern/i386/pc/startup.S: Remove `"kern/i386/realmode.S"'.  Include
2061         `"../realmode.S"'.
2062         Remove `"kern/i386/loader.S"'.  Include `"../loader.S"'.
2064 2007-10-22  Robert Millan  <rmh@aybabtu.com>
2066         * conf/i386-pc.rmk (kernel_img_SOURCES): Remove `disk/i386/pc/biosdisk.c'.
2067         (pkgdata_MODULES): Add `biosdisk.mod'.
2068         (biosdisk_mod_SOURCES, biosdisk_mod_CFLAGS, biosdisk_mod_LDFLAGS): New
2069         variables.
2071         * disk/i386/pc/biosdisk.c: Include `<grub/dl.h>'.
2072         (grub_biosdisk_init): Replace with ...
2073         (GRUB_MOD_INIT(biosdisk)): ... this.
2074         (grub_biosdisk_fini): Replace with ...
2075         (GRUB_MOD_FINI(biosdisk)): ... this.
2077         * kern/i386/pc/init.c: Remove `<grub/machine/biosdisk.h>'.
2078         (grub_machine_init): Remove call to grub_biosdisk_init().
2079         (grub_machine_fini): Remove call to grub_machine_fini().
2081         * util/i386/pc/grub-install.in (modules): Add `biosdisk'.
2083 2007-10-22  Robert Millan  <rmh@aybabtu.com>
2085         * include/grub/time.h: New file.
2086         * include/grub/i386/time.h: Likewise.
2087         * include/grub/powerpc/time.h: Likewise.
2088         * include/grub/sparc64/time.h: Likewise.
2090         * include/grub/i386/pc/time.h (KERNEL_TIME_HEADER): Rename all
2091         instances to ...
2092         (KERNEL_MACHINE_TIME_HEADER): ... this.
2093         * include/grub/powerpc/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
2094         instances to ...
2095         (KERNEL_MACHINE_TIME_HEADER): ... this.
2096         * include/grub/sparc64/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
2097         instances to ...
2098         (KERNEL_MACHINE_TIME_HEADER): ... this.
2100         * kern/i386/efi/init.c: Include `<grub/time.h>'.
2101         (grub_millisleep): New function.
2102         * kern/i386/pc/init.c: Include `<grub/time.h>'.
2103         (grub_millisleep): New function.
2104         * kern/powerpc/ieee1275/init.c: Include `<grub/time.h>'.
2105         Remove `grub/machine/time.h' include.
2106         (grub_millisleep): New function.
2107         * kern/sparc64/ieee1275/init.c: Include `<grub/time.h>'.
2108         Remove `grub/machine/time.h' include.
2109         (grub_millisleep): New function.
2111         * include/grub/misc.h (grub_div_roundup): New function.
2113         * kern/misc.c: Include `<grub/time.h>'.
2114         (grub_millisleep_generic): New function.
2116         * conf/i386-efi.rmk (kernel_mod_HEADERS): Remove `i386/efi/time.h'.
2117         Add `time.h'.
2118         * conf/i386-pc.rmk (kernel_img_HEADERS): Remove `machine/time.h'.
2119         Add `time.h'.
2120         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Remove
2121         `machine/time.h'.  Add `time.h'.
2122         * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
2124 2007-10-21  Robert Millan  <rmh@aybabtu.com>
2126         * include/grub/misc.h (grub_max): New function.
2128 2007-10-21  Robert Millan  <rmh@aybabtu.com>
2130         * util/misc.c (grub_util_info): Call fflush() before returning.
2132 2007-10-20  Robert Millan  <rmh@aybabtu.com>
2134         * genmk.rb (Image): Copy `extra_flags' from here ...
2135         (PModule): ... to here.  Use it in `#{obj}: #{src}' rule.
2137         * commands/i386/cpuid.c (grub_cmd_cpuid): Add __attribute__ ((unused))
2138         to `argc' and `args' arguments.
2140 2007-10-17  Robert Millan  <rmh@aybabtu.com>
2142         * kern/i386/loader.S: New file.
2144         * kern/i386/pc/startup.S (grub_linux_prot_size): Moved from here ...
2145         * kern/i386/loader.S (grub_linux_prot_size)... to here.
2146         * kern/i386/pc/startup.S (grub_linux_tmp_addr): Moved from here ...
2147         * kern/i386/loader.S (grub_linux_tmp_addr)... to here.
2148         * kern/i386/pc/startup.S (grub_linux_real_addr): Moved from here ...
2149         * kern/i386/loader.S (grub_linux_real_addr)... to here.
2150         * kern/i386/pc/startup.S (grub_linux_boot_zimage): Moved from here ...
2151         * kern/i386/loader.S (grub_linux_boot_zimage)... to here.
2152         * kern/i386/pc/startup.S (grub_linux_boot_bzimage): Moved from here ...
2153         * kern/i386/loader.S (grub_linux_boot_bzimage)... to here.
2154         * kern/i386/pc/startup.S (grub_multiboot_real_boot): Moved from here ...
2155         * kern/i386/loader.S (grub_multiboot_real_boot)... to here.
2156         * kern/i386/pc/startup.S (grub_multiboot2_real_boot): Moved from here ...
2157         * kern/i386/loader.S (grub_multiboot2_real_boot)... to here.
2159         * kern/i386/realmode.S: New file.
2161         * kern/i386/pc/startup.S (protstack): Moved from here ...
2162         * kern/i386/realmode.S (protstack)... to here.
2163         * kern/i386/pc/startup.S (gdt): Moved from here ...
2164         * kern/i386/realmode.S (gdt)... to here.
2165         * kern/i386/pc/startup.S (prot_to_real): Moved from here ...
2166         * kern/i386/realmode.S (prot_to_real)... to here.
2168         * kern/i386/pc/startup.S: Include `kern/i386/loader.S' and
2169         `kern/i386/realmode.S'.
2171 2007-10-17  Robert Millan  <rmh@aybabtu.com>
2173         * include/grub/i386/loader.h: New file.
2175         * include/grub/i386/pc/loader.h (grub_linux_prot_size)
2176         (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
2177         (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
2178         (grub_multiboot_real_boot, grub_multiboot2_real_boot)
2179         (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): Moved from here ...
2180         * include/grub/i386/loader.h (grub_linux_prot_size)
2181         (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
2182         (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
2183         (grub_multiboot_real_boot, grub_multiboot2_real_boot)
2184         (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): ... to here.
2186         * include/grub/i386/pc/loader.h: Include `grub/cpu/loader.h'.
2188 2007-10-15  Robert Millan  <rmh@aybabtu.com>
2190         * normal/misc.c (grub_normal_print_device_info): Do not probe for
2191         filesystem when dev->disk is unset.
2192         Do probe for filesystem even when dev->disk->has_partitions is set.
2193         In case a filesystem is found, always report it.
2194         In case it isn't, if dev->disk->has_partitions is set, report that
2195         a partition table was found instead of reporting that no filesystem
2196         could be identified.
2198 2007-10-12  Robert Millan  <rmh@aybabtu.com>
2200         * conf/powerpc-ieee1275.rmk (grub_mkimage_SOURCES): Replace reference
2201         to util/powerpc/ieee1275/grub-mkimage.c with util/elf/grub-mkimage.c.
2203         * include/grub/types.h (grub_host_to_target16): New macro.
2204         (grub_host_to_target32): Likewise.
2205         (grub_host_to_target64): Likewise.
2206         (grub_target_to_host16): Likewise.
2207         (grub_target_to_host32): Likewise.
2208         (grub_target_to_host64): Likewise.
2210         * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
2211         Renamed from to ...
2212         (GRUB_MOD_ALIGN): ...this.  Update all users.
2214         * util/elf/grub-mkimage.c (load_note): Replace grub_cpu_to_be32 with
2215         grub_host_to_target32.
2216         Replace grub_be_to_cpu32 with grub_target_to_host32.
2217         (load_modules): Likewise.
2218         (add_segments): Replace grub_be_to_cpu16 with grub_target_to_host16.
2219         Replace grub_be_to_cpu32 with grub_target_to_host32.
2220         Replace grub_cpu_to_be16 with grub_host_to_target16.
2221         Replace grub_cpu_to_be32 grub_host_to_target32.
2223 2007-10-12  Robert Millan  <rmh@aybabtu.com>
2225         * util/powerpc/ieee1275/grub-mkimage.c: Moved to ...
2226         * util/elf/grub-mkimage.c: ... here.
2228         * DISTLIST: Add `util/elf/grub-mkimage.c'.  Remove
2229         `util/powerpc/ieee1275/grub-mkimage.c'.
2231 2007-10-07  Robert Millan  <rmh@aybabtu.com>
2233         * kern/powerpc/ieee1275/init.c: Rename HEAP_LIMIT to HEAP_MAX_ADDR,
2234         and make it easier to figure out.
2235         Add HEAP_MIN_SIZE and HEAP_MAX_ADDR definitions.
2236         (grub_claim_heap): Use HEAP_MAX_ADDR rather than taking a parameter.
2237         Do not avoid claiming a region above HEAP_MAX_ADDR if that would
2238         leave us with less than HEAP_MIN_SIZE total heap.
2239         Avoid our total amount of heap to surpass HEAP_MAX_SIZE.
2241 2007-10-03  Robert Millan  <rmh@aybabtu.com>
2243         * include/grub/i386/io.h: New file.
2244         * commands/i386/pc/play.c (inb): Removed.
2245         (outb): Removed.
2246         Include grub/cpu/io.h.  Replace inb() with grub_inb() and outb()
2247         with grub_outb().
2248         * term/i386/pc/serial.c  (inb): Removed.
2249         (outb): Removed.
2250         Include grub/cpu/io.h.  Replace inb() with grub_inb() and outb()
2251         with grub_outb().
2252         * term/i386/pc/vga.c  (inb): Removed.
2253         (outb): Removed.
2254         Include grub/cpu/io.h.  Replace inb() with grub_inb() and outb()
2255         with grub_outb().
2257 2007-10-02  Robert Millan  <rmh@aybabtu.com>
2259         * conf/i386-efi.rmk (grub_emu_SOURCES): Add util/hostfs.c.
2260         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2261         Reported by Marcin Kurek.
2263 2007-09-07  Robert Millan  <rmh@aybabtu.com>
2265         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_test_flag): Detect
2266         SmartFirmware version updates (as released by Sven Luther), and avoid
2267         setting GRUB_IEEE1275_FLAG_NO_PARTITION_0 or
2268         GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS unless the running version is
2269         known broken.
2271 2007-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
2273         From Hitoshi Ozeki:
2274         * kern/i386/pc/init.c (compact_mem_regions): Decrease NUM_REGIONS
2275         when merging two regions.
2277 2007-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
2279         * kern/rescue.c (grub_enter_rescue_mode): Free ARGS.
2280         * normal/completion.c (grub_normal_do_completion): Likewise.
2281         Reported by Hitoshi Ozeki.
2283 2007-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
2284         
2285         Do not use devices at boot in chainloading.
2286         
2287         * loader/i386/pc/chainloader.c (boot_drive): New variable.
2288         (boot_part_addr): Likewise.
2289         (grub_chainloader_boot): Simply call grub_chainloader_real_boot
2290         with BOOT_DRIVE and BOOT_PART_ADDR.
2291         (grub_chainloader_cmd): Set BOOT_DRIVE and BOOT_PART_ADDR.
2292         Reported by Hitoshi Ozeki <h-ozeki@ck2.so-net.ne.jp>.
2294 2007-08-29  Robert Millan  <rmh@aybabtu.com>
2296         Patch from Simon Peter <dn.tlp@gmx.net>:
2297         * genmk.rb (Utility): Append $(#{src}_DEPENDENCIES) to #{obj} targets.
2298         * conf/i386-pc.rmk: Replace grub-probe_DEPENDENCIES with
2299         util/grub-probe.c_DEPENDENCIES.  Replace grub-setup_DEPENDENCIES with
2300         util/i386/pc/grub-setup.c_DEPENDENCIES.
2301         * conf/i386-efi.rmk: Replace grub-probe_DEPENDENCIES with
2302         util/grub-probe.c_DEPENDENCIES.
2303         * conf/powerpc-ieee1275.rmk: Likewise.
2305 2007-08-28  Robert Millan  <rmh@aybabtu.com>
2307         * util/i386/get_disk_name.c: New.  Implement grub_util_get_disk_name()
2308         to tell grub-mkdevicemap how to name devices.
2309         * util/ieee1275/get_disk_name.c: Likewise (using "ofpathname -a"
2310         feature).
2312         * conf/i386-efi.rmk (grub_mkdevicemap_SOURCES): Add
2313         util/i386/get_disk_name.c.
2314         * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Likewise.
2315         * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Add
2316         util/ieee1275/get_disk_name.c.
2318         * include/grub/util/misc.h: grub_util_get_disk_name() declaration.
2320         * DISTLIST: Add util/i386/get_disk_name.c and
2321         util/ieee1275/get_disk_name.c.
2323         * util/grub-mkdevicemap.c: Replace device naming logic with
2324         grub_util_get_disk_name() calls.
2326 2007-08-20  Robert Millan  <rmh@aybabtu.com>
2328         * normal/menu.c (run_menu): Refer to seconds as "s" not "seconds"
2329         (so that it works for both plural and singular quantities).
2331 2007-08-05  Robert Millan  <rmh@aybabtu.com>
2333         * util/grub.d/10_linux.in (test_gt): Strip out vmlinu[xz]- prefix
2334         so that [xz] isn't taken into account when determining order.
2336 2007-08-02  Marco Gerards  <marco@gnu.org>
2338         * DISTLIST: Add `disk/host.c', `fs/ntfs.c', `include/multiboot.h',
2339         `include/multiboot2.h', `include/grub/elfload.h',
2340         `include/multiboot.h', `include/grub/multiboot.h',
2341         `include/grub/multiboot_loader.h', `include/grub/multiboot2.h',
2342         `include/grub/i386/pc/biosdisk.h', `include/grub/util/biosdisk.h',
2343         `kern/elf.c', `loader/multiboot_loader.c',
2344         `loader/multiboot_loader_normal.c', `loader/multiboot2.c',
2345         `loader/i386/pc/multiboot2.c',
2346         `loader/powerpc/ieee1275/multiboot2.c', `util/hostfs.c' and
2347         `util/i386/pc/grub-mkrescue.in'.  Remove
2348         `include/grub/biosdisk.h', `include/grub/i386/pc/multiboot.h',
2349         `include/grub/i386/pc/util/biosdisk.h' and
2350         `include/grub/powerpc/ieee1275/multiboot.h'.
2352 2007-08-02  Bean  <bean123ch@gmail.com>
2354         * conf/common.rmk (pkgdata_MODULES): Add ntfs.mod.
2355         (ntfs_mod_SOURCES): New variable.
2356         (ntfs_mod_CFLAGS): Likewise.
2357         (ntfs_mod_LDFLAGS): Likewise.
2359         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfs.c.
2360         (grub_probe_SOURCES): Likewise.
2361         (grub_emu_SOURCES): Likewise.
2363         * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
2364         (grub_emu_SOURCES): Likewise.
2366         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
2367         (grub_emu_SOURCES): Likewise.
2368         
2369         * conf/misc.c (grub_utf16_to_utf8): Fix unicode conversion bug.
2371         * fs/ntfs.c: New file.
2373 2007-08-02  Bean  <bean123ch@gmail.com>
2375         * disk.h (grub_disk): Use NESTED_FUNC_ATTR.
2377         * file.h (grub_file): Likewise.
2379         * fshelp.h (grub_fshelp_read_file): Likewise.
2381         * util/i386/pc/grub-setup.c (setup): Likewise.
2382         (save_first_sector): Likewise.
2383         (save_blocklists): Likewise.
2384         
2385         * fs/affs.c (grub_affs_read_file): Likewise.
2387         * fs/ext2.c (grub_ext2_read_file): Likewise.
2389         * fs/fat.c (grub_fat_read_data): Likewise.
2391         * fs/fshelp.c (grub_fshelp_read_file): Likewise.
2393         * fs/hfs.c (grub_hfs_read_file): Likewise.
2395         * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
2397         * fs/jfs.c (grub_jfs_read_file): Likewise.
2399         * fs/minix.c (grub_minix_read_file): Likewise.
2401         * fs/sfs.c (grub_sfs_read_file): Likewise.
2403         * fs/ufs.c (grub_ufs_read_file): Likewise.
2404         
2405         * fs/xfs.c (grub_xfs_read_file): Likewise.
2407         * command/blocklist.c (read_blocklist): Likewise.
2408         (print_blocklist): Likewise.
2410 2007-08-02  Marco Gerards  <marco@gnu.org>
2412         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/host.c' and
2413         `util/hostfs.c'.
2415         * disk/host.c: New file.
2417         * util/hostfs.c: Likewise.
2419         * fs/hfsplus.c (grub_hfsplus_mount): When reading out of disk,
2420         return `GRUB_ERR_BAD_FS'.
2421         * fs/sfs.c (grub_sfs_mount): Likewise.
2422         * fs/xfs.c (grub_xfs_mount): Likewise.
2424         * include/grub/disk.h (enum grub_disk_dev_id): Add
2425         `GRUB_DISK_DEVICE_HOST_ID'.
2427         * util/grub-emu.c (main): Initialize and de-initialize hostfs.
2429 2007-07-24  Jerone Young  <jerone@gmail.com>
2431         * conf/i386-pc.rmk: Add Multiboot loader and multiboot 2 to multiboot
2432         modules for compilation.
2433         * conf/powerpc-ieee1275.rmk: Likewise.
2435         * include/multiboot.h: Move multiboot definitions to one file. Rename
2436         many definitions to not get grub specific.
2437         * include/multiboot2.h: Create header with multiboot 2 definitions.
2438         * include/grub/multiboot.h: Header for grub specific function
2439         prototypes and definitions.
2440         * include/grub/multiboot2.h: Likewise.
2441         * include/grub/multiboot_loader.h: Likewise.
2442         * include/grub/i386/pc/multiboot.h: Removed.
2443         * include/grub/powerpc/ieee1275/multiboot.h: Removed.
2445         * loader/multiboot_loader.c: Created to act as a proxy for multiboot 1
2446         and 2 to allow for one multiboot and module commands.
2447         * loader/multiboot2.c: Add multiboot2 functionality.
2448         * loader/i386/pc/multiboot.c: Modify for new multiboot header location
2449         and definition names.
2450         * loader/i386/pc/multiboot2.c: Created to add i386 specific multiboot
2451         2 functions.
2452         * loader/powerpc/ieee1275/multiboot2.c: Created to add powerpc
2453         ieee1275 specific multiboot2 code.
2455         * kern/i386/pc/startup.S: Change headers and definition names for
2456         multiboot. Add function grub_multiboot2_real_boot for multiboot 2.
2458 2007-07-22  Robert Millan  <rmh@aybabtu.com>
2460         * geninitheader.sh: Process file specified in first parameter rather
2461         than hardcoding grub_modules_init.lst.
2462         * geninit.sh: Likewise.  Also, construct header name dynamicaly rather
2463         than hardcoding grub_modules_init.h.
2465         * conf/common.rmk: Rename grub_modules_init.[ch] files associated with
2466         grub-emu to grub_emu_init.[ch].  Add rules to build analogous
2467         grub_probe_init.[ch] and grub_setup_init.[ch].
2469         * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Replace
2470         grub_modules_init.h with grub_emu_init.h.
2471         (grub_probe_DEPENDENCIES, grub_probe_SOURCES): Add new
2472         grub_probe_init.[ch] files.
2473         * conf/i386-efi.rmk: Likewise.
2474         * conf/i386-pc.rmk: Likewise.
2475         (grub_setup_DEPENDENCIES, grub_setup_SOURCES): Add new
2476         grub_setup_init.[ch] files.
2478         * util/grub-emu.c: Replace grub_modules_init.h with grub_emu_init.h.
2479         * util/grub-probe.c: Include grub_probe_init.h.  Use grub_init_all()
2480         to initialize modules rather than a list of hardcoded functions.
2481         * util/i386/pc/grub-setup.c: Include grub_setup_init.h.  Use
2482         grub_init_all() to initialize modules rather than a list of hardcoded
2483         functions.
2485 2007-07-22  Robert Millan  <rmh@aybabtu.com>
2487         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set
2488         GRUB_IEEE1275_FLAG_NO_PARTITION_0 flag when running on SmartFirmware.
2490 2007-07-22  Robert Millan  <rmh@aybabtu.com>
2492         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
2493         GRUB_IEEE1275_FLAG_BROKEN_OUTPUT flag.
2494         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set this
2495         flag when running on SmartFirmware.
2496         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid running
2497         "output-device output" command when GRUB_IEEE1275_FLAG_BROKEN_OUTPUT
2498         was set.
2500         * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
2501         Increase partno when GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS flag is set,
2502         rather than decreasing it.
2504         * util/i386/pc/grub-setup.c (setup): When embedding is required, but
2505         there's not enough space to do it, fail in the same way as when it
2506         can't be done because there are no partitions.
2508         * util/powerpc/ieee1275/grub-install.in: Improve error message shown
2509         when nvsetenv failed.
2511 2007-07-22  Yoshinori K. Okuji  <okuji@enbug.org>
2513         * conf/i386-pc.rmk (CLEANFILES): Removed for grub-mkrescue,
2514         because this rule is automatically generated.
2515         (grub-mkrescue): Removed for the same reason as above.
2517 2007-07-22  Yoshinori K. Okuji  <okuji@enbug.org>
2519         Migrate to GNU General Public License Version 3.
2520         
2521         * COPYING: Replaced with the plain text version of GPLv3.
2523         * config.guess: Updated from gnulib.
2524         * config.sub: Likewise.
2526         * geninit.sh: Output a GPLv3 copyright notice.
2527         * geninitheader.sh: Likewise.
2528         * genmodsrc.sh: Likewise.
2529         * gensymlist.sh.in: Likewise.
2531         * boot/i386/pc/boot.S: Upgraded to GPLv3.
2532         * boot/i386/pc/diskboot.S: Likewise.
2533         * boot/i386/pc/pxeboot.S: Likewise.
2534         * commands/blocklist.c: Likewise.
2535         * commands/boot.c: Likewise.
2536         * commands/cat.c: Likewise.
2537         * commands/cmp.c: Likewise.
2538         * commands/configfile.c: Likewise.
2539         * commands/echo.c: Likewise.
2540         * commands/help.c: Likewise.
2541         * commands/ls.c: Likewise.
2542         * commands/search.c: Likewise.
2543         * commands/terminal.c: Likewise.
2544         * commands/test.c: Likewise.
2545         * commands/videotest.c: Likewise.
2546         * commands/i386/cpuid.c: Likewise.
2547         * commands/i386/pc/halt.c: Likewise.
2548         * commands/i386/pc/play.c: Likewise.
2549         * commands/i386/pc/reboot.c: Likewise.
2550         * commands/i386/pc/vbeinfo.c: Likewise.
2551         * commands/i386/pc/vbetest.c: Likewise.
2552         * commands/ieee1275/halt.c: Likewise.
2553         * commands/ieee1275/reboot.c: Likewise.
2554         * commands/ieee1275/suspend.c: Likewise.
2555         * disk/loopback.c: Likewise.
2556         * disk/lvm.c: Likewise.
2557         * disk/raid.c: Likewise.
2558         * disk/efi/efidisk.c: Likewise.
2559         * disk/i386/pc/biosdisk.c: Likewise.
2560         * disk/ieee1275/ofdisk.c: Likewise.
2561         * font/manager.c: Likewise.
2562         * fs/affs.c: Likewise.
2563         * fs/ext2.c: Likewise.
2564         * fs/fat.c: Likewise.
2565         * fs/fshelp.c: Likewise.
2566         * fs/hfs.c: Likewise.
2567         * fs/hfsplus.c: Likewise.
2568         * fs/iso9660.c: Likewise.
2569         * fs/jfs.c: Likewise.
2570         * fs/minix.c: Likewise.
2571         * fs/sfs.c: Likewise.
2572         * fs/ufs.c: Likewise.
2573         * fs/xfs.c: Likewise.
2574         * hello/hello.c: Likewise.
2575         * include/grub/acorn_filecore.h: Likewise.
2576         * include/grub/arg.h: Likewise.
2577         * include/grub/bitmap.h: Likewise.
2578         * include/grub/boot.h: Likewise.
2579         * include/grub/cache.h: Likewise.
2580         * include/grub/device.h: Likewise.
2581         * include/grub/disk.h: Likewise.
2582         * include/grub/dl.h: Likewise.
2583         * include/grub/elfload.h: Likewise.
2584         * include/grub/env.h: Likewise.
2585         * include/grub/err.h: Likewise.
2586         * include/grub/file.h: Likewise.
2587         * include/grub/font.h: Likewise.
2588         * include/grub/fs.h: Likewise.
2589         * include/grub/fshelp.h: Likewise.
2590         * include/grub/gzio.h: Likewise.
2591         * include/grub/hfs.h: Likewise.
2592         * include/grub/kernel.h: Likewise.
2593         * include/grub/loader.h: Likewise.
2594         * include/grub/lvm.h: Likewise.
2595         * include/grub/misc.h: Likewise.
2596         * include/grub/mm.h: Likewise.
2597         * include/grub/net.h: Likewise.
2598         * include/grub/normal.h: Likewise.
2599         * include/grub/parser.h: Likewise.
2600         * include/grub/partition.h: Likewise.
2601         * include/grub/pc_partition.h: Likewise.
2602         * include/grub/raid.h: Likewise.
2603         * include/grub/rescue.h: Likewise.
2604         * include/grub/script.h: Likewise.
2605         * include/grub/setjmp.h: Likewise.
2606         * include/grub/symbol.h: Likewise.
2607         * include/grub/term.h: Likewise.
2608         * include/grub/terminfo.h: Likewise.
2609         * include/grub/tparm.h: Likewise.
2610         * include/grub/types.h: Likewise.
2611         * include/grub/video.h: Likewise.
2612         * include/grub/efi/api.h: Likewise.
2613         * include/grub/efi/chainloader.h: Likewise.
2614         * include/grub/efi/console.h: Likewise.
2615         * include/grub/efi/console_control.h: Likewise.
2616         * include/grub/efi/disk.h: Likewise.
2617         * include/grub/efi/efi.h: Likewise.
2618         * include/grub/efi/pe32.h: Likewise.
2619         * include/grub/efi/time.h: Likewise.
2620         * include/grub/i386/linux.h: Likewise.
2621         * include/grub/i386/setjmp.h: Likewise.
2622         * include/grub/i386/types.h: Likewise.
2623         * include/grub/i386/efi/kernel.h: Likewise.
2624         * include/grub/i386/efi/loader.h: Likewise.
2625         * include/grub/i386/efi/time.h: Likewise.
2626         * include/grub/i386/pc/biosdisk.h: Likewise.
2627         * include/grub/i386/pc/boot.h: Likewise.
2628         * include/grub/i386/pc/chainloader.h: Likewise.
2629         * include/grub/i386/pc/console.h: Likewise.
2630         * include/grub/i386/pc/init.h: Likewise.
2631         * include/grub/i386/pc/kernel.h: Likewise.
2632         * include/grub/i386/pc/loader.h: Likewise.
2633         * include/grub/i386/pc/memory.h: Likewise.
2634         * include/grub/i386/pc/multiboot.h: Likewise.
2635         * include/grub/i386/pc/serial.h: Likewise.
2636         * include/grub/i386/pc/time.h: Likewise.
2637         * include/grub/i386/pc/vbe.h: Likewise.
2638         * include/grub/i386/pc/vbeblit.h: Likewise.
2639         * include/grub/i386/pc/vbefill.h: Likewise.
2640         * include/grub/i386/pc/vbeutil.h: Likewise.
2641         * include/grub/i386/pc/vga.h: Likewise.
2642         * include/grub/ieee1275/ieee1275.h: Likewise.
2643         * include/grub/ieee1275/ofdisk.h: Likewise.
2644         * include/grub/powerpc/libgcc.h: Likewise.
2645         * include/grub/powerpc/setjmp.h: Likewise.
2646         * include/grub/powerpc/types.h: Likewise.
2647         * include/grub/powerpc/ieee1275/biosdisk.h: Likewise.
2648         * include/grub/powerpc/ieee1275/console.h: Likewise.
2649         * include/grub/powerpc/ieee1275/ieee1275.h: Likewise.
2650         * include/grub/powerpc/ieee1275/kernel.h: Likewise.
2651         * include/grub/powerpc/ieee1275/loader.h: Likewise.
2652         * include/grub/powerpc/ieee1275/multiboot.h: Likewise.
2653         * include/grub/powerpc/ieee1275/time.h: Likewise.
2654         * include/grub/powerpc/ieee1275/util/biosdisk.h: Likewise.
2655         * include/grub/sparc64/libgcc.h: Likewise.
2656         * include/grub/sparc64/setjmp.h: Likewise.
2657         * include/grub/sparc64/types.h: Likewise.
2658         * include/grub/sparc64/ieee1275/console.h: Likewise.
2659         * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
2660         * include/grub/sparc64/ieee1275/kernel.h: Likewise.
2661         * include/grub/sparc64/ieee1275/time.h: Likewise.
2662         * include/grub/util/biosdisk.h: Likewise.
2663         * include/grub/util/getroot.h: Likewise.
2664         * include/grub/util/lvm.h: Likewise.
2665         * include/grub/util/misc.h: Likewise.
2666         * include/grub/util/raid.h: Likewise.
2667         * include/grub/util/resolve.h: Likewise.
2668         * io/gzio.c: Likewise.
2669         * kern/device.c: Likewise.
2670         * kern/disk.c: Likewise.
2671         * kern/dl.c: Likewise.
2672         * kern/elf.c: Likewise.
2673         * kern/env.c: Likewise.
2674         * kern/err.c: Likewise.
2675         * kern/file.c: Likewise.
2676         * kern/fs.c: Likewise.
2677         * kern/loader.c: Likewise.
2678         * kern/main.c: Likewise.
2679         * kern/misc.c: Likewise.
2680         * kern/mm.c: Likewise.
2681         * kern/parser.c: Likewise.
2682         * kern/partition.c: Likewise.
2683         * kern/rescue.c: Likewise.
2684         * kern/term.c: Likewise.
2685         * kern/efi/efi.c: Likewise.
2686         * kern/efi/init.c: Likewise.
2687         * kern/efi/mm.c: Likewise.
2688         * kern/i386/dl.c: Likewise.
2689         * kern/i386/efi/init.c: Likewise.
2690         * kern/i386/efi/startup.S: Likewise.
2691         * kern/i386/pc/init.c: Likewise.
2692         * kern/i386/pc/lzo1x.S: Likewise.
2693         * kern/i386/pc/startup.S: Likewise.
2694         * kern/ieee1275/ieee1275.c: Likewise.
2695         * kern/powerpc/cache.S: Likewise.
2696         * kern/powerpc/dl.c: Likewise.
2697         * kern/powerpc/ieee1275/cmain.c: Likewise.
2698         * kern/powerpc/ieee1275/crt0.S: Likewise.
2699         * kern/powerpc/ieee1275/init.c: Likewise.
2700         * kern/powerpc/ieee1275/openfw.c: Likewise.
2701         * kern/sparc64/cache.S: Likewise.
2702         * kern/sparc64/dl.c: Likewise.
2703         * kern/sparc64/ieee1275/init.c: Likewise.
2704         * kern/sparc64/ieee1275/openfw.c: Likewise.
2705         * loader/efi/chainloader.c: Likewise.
2706         * loader/efi/chainloader_normal.c: Likewise.
2707         * loader/i386/efi/linux.c: Likewise.
2708         * loader/i386/efi/linux_normal.c: Likewise.
2709         * loader/i386/pc/chainloader.c: Likewise.
2710         * loader/i386/pc/chainloader_normal.c: Likewise.
2711         * loader/i386/pc/linux.c: Likewise.
2712         * loader/i386/pc/linux_normal.c: Likewise.
2713         * loader/i386/pc/multiboot.c: Likewise.
2714         * loader/i386/pc/multiboot_normal.c: Likewise.
2715         * loader/powerpc/ieee1275/linux.c: Likewise.
2716         * loader/powerpc/ieee1275/linux_normal.c: Likewise.
2717         * normal/arg.c: Likewise.
2718         * normal/cmdline.c: Likewise.
2719         * normal/command.c: Likewise.
2720         * normal/completion.c: Likewise.
2721         * normal/execute.c: Likewise.
2722         * normal/function.c: Likewise.
2723         * normal/lexer.c: Likewise.
2724         * normal/main.c: Likewise.
2725         * normal/menu.c: Likewise.
2726         * normal/menu_entry.c: Likewise.
2727         * normal/misc.c: Likewise.
2728         * normal/parser.y: Likewise.
2729         * normal/script.c: Likewise.
2730         * normal/i386/setjmp.S: Likewise.
2731         * normal/powerpc/setjmp.S: Likewise.
2732         * normal/sparc64/setjmp.S: Likewise.
2733         * partmap/acorn.c: Likewise.
2734         * partmap/amiga.c: Likewise.
2735         * partmap/apple.c: Likewise.
2736         * partmap/gpt.c: Likewise.
2737         * partmap/pc.c: Likewise.
2738         * partmap/sun.c: Likewise.
2739         * term/gfxterm.c: Likewise.
2740         * term/terminfo.c: Likewise.
2741         * term/efi/console.c: Likewise.
2742         * term/i386/pc/console.c: Likewise.
2743         * term/i386/pc/serial.c: Likewise.
2744         * term/i386/pc/vesafb.c: Likewise.
2745         * term/i386/pc/vga.c: Likewise.
2746         * term/ieee1275/ofconsole.c: Likewise.
2747         * util/biosdisk.c: Likewise.
2748         * util/console.c: Likewise.
2749         * util/genmoddep.c: Likewise.
2750         * util/getroot.c: Likewise.
2751         * util/grub-emu.c: Likewise.
2752         * util/grub-mkdevicemap.c: Likewise.
2753         * util/grub-probe.c: Likewise.
2754         * util/lvm.c: Likewise.
2755         * util/misc.c: Likewise.
2756         * util/raid.c: Likewise.
2757         * util/resolve.c: Likewise.
2758         * util/update-grub.in: Likewise.
2759         * util/update-grub_lib.in: Likewise.
2760         * util/grub.d/00_header.in: Likewise.
2761         * util/grub.d/10_hurd.in: Likewise.
2762         * util/grub.d/10_linux.in: Likewise.
2763         * util/i386/efi/grub-install.in: Likewise.
2764         * util/i386/efi/grub-mkimage.c: Likewise.
2765         * util/i386/pc/grub-install.in: Likewise.
2766         * util/i386/pc/grub-mkimage.c: Likewise.
2767         * util/i386/pc/grub-mkrescue.in: Likewise.
2768         * util/i386/pc/grub-setup.c: Likewise.
2769         * util/i386/pc/misc.c: Likewise.
2770         * util/powerpc/ieee1275/grub-install.in: Likewise.
2771         * util/powerpc/ieee1275/grub-mkimage.c: Likewise.
2772         * util/powerpc/ieee1275/misc.c: Likewise.
2773         * video/bitmap.c: Likewise.
2774         * video/video.c: Likewise.
2775         * video/i386/pc/vbe.c: Likewise.
2776         * video/i386/pc/vbeblit.c: Likewise.
2777         * video/i386/pc/vbefill.c: Likewise.
2778         * video/i386/pc/vbeutil.c: Likewise.
2779         * video/readers/tga.c: Likewise.
2781 2007-07-02  Robert Millan  <rmh@aybabtu.com>
2783         * conf/i386-efi.rmk: Replace obsolete reference to
2784         util/i386/pc/biosdisk.c with util/biosdisk.c, and util/i386/pc/getroot.c
2785         with util/getroot.c.
2786         * conf/powerpc-ieee1275.rmk: Likewise.
2787         * conf/sparc64-ieee1275.rmk: Likewise.
2789         * util/grub-emu.c (main): Fix unchecked pointer handling.
2791 2007-07-02  Robert Millan  <rmh@aybabtu.com>
2793         * util/i386/efi/grub-install.in: Allow `grub_probe --target=partmap'
2794         invocation to fail, in order to support partition-less media.
2796         * util/i386/pc/grub-install.in: Likewise.
2798         * util/powerpc/ieee1275/grub-install.in: Use grub-probe to determine
2799         which fs or partmap modules are needed (akin to its sister scripts).
2801         Also use grub-probe to get rid of unportable /proc/mounts check.
2803         Print the same informational message that the other scripts do, before
2804         exitting.
2806 2007-06-23  Robert Millan  <rmh@aybabtu.com>
2808         * util/update-grub_lib.in (font_path): New function.  Determine wether
2809         a font file can be found and, if so, echo the GRUB path to it.
2811         * util/update-grub.in: Handle multiple terminals depending on user
2812         input, platform availability and font file presence.  Propagate
2813         variables of our findings to /etc/grub.d/ children.
2815         * util/grub.d/00_header.in: Handle multiple terminals, based on
2816         environment setup by update-grub.
2818 2007-06-23  Robert Millan  <rmh@aybabtu.com>
2820         * conf/i386-pc.rmk (pkgdata_MODULES): Add serial.mod.
2822 2007-06-21  Robert Millan  <rmh@aybabtu.com>
2824         * include/grub/i386/pc/kernel.h: Define GRUB_KERNEL_MACHINE_DATA_END to
2825         indicate end of data section in kernel image.
2826         * include/grub/i386/efi/kernel.h: Define GRUB_KERNEL_MACHINE_PREFIX and
2827         GRUB_KERNEL_MACHINE_DATA_END.
2829         * kern/i386/pc/startup.S: Do not initialize grub_prefix, only reserve
2830         space for it.
2831         * kern/i386/efi/startup.S: Likewise.
2833         * util/i386/pc/grub-mkimage.c: Initialize grub_prefix to /boot/grub
2834         during image generation.  Implement --prefix option to override this
2835         patch.
2836         * util/i386/efi/grub-mkimage.c: Likewise.
2838         * util/update-grub_lib.in (convert_system_path_to_grub_path): Split
2839         code to make path relative to its root into a separate function.
2841         * util/i386/pc/grub-install.in: Use newly provided
2842         make_system_path_relative_to_its_root() to convert ${grubdir}, then
2843         pass the result to grub-install --prefix.
2845 2007-06-13  Robert Millan  <rmh@aybabtu.com>
2847         * include/grub/util/misc.h: Define DEFAULT_DIRECTORY and
2848         DEFAULT_DEVICE_MAP.
2849         * util/grub-emu.c: Use above definitions from misc.h instead of
2850         defining them.
2851         * util/grub-mkdevicemap.c: Likewise.
2852         * util/i386/pc/grub-setup.c: Likewise.
2853         * util/grub-probe.c: Likewise.
2854         (probe): Abort with grub_util_error() when either
2855         grub_guess_root_device or grub_util_get_grub_dev fails.
2857 2007-06-12  Robert Millan  <rmh@aybabtu.com>
2859         * normal/command.c (grub_command_execute): Use NULL rather than 0 for
2860         "pager" assignment.
2861         * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Likewise for
2862         "pcdata".
2863         * util/grub-probe.c (probe): Likewise for "drive_name".
2865 2007-06-11  Robert Millan  <rmh@aybabtu.com>
2867         * util/i386/pc/grub-mkrescue.in: Pad both floppy images with zeroes,
2868         not just the cdrom one.
2870 2007-06-11  Robert Millan  <rmh@aybabtu.com>
2872         * util/i386/pc/grub-mkrescue.in: Add "set -e".
2873         Add --pkglibdir=DIR option to override pkglibdir.
2874         Mention --image-type=TYPE in help output.
2875         Fix --grub-mkimage (it was a no-op).
2876         Abort gracefuly when no parameter is given.
2878 2007-06-11  Robert Millan  <rmh@aybabtu.com>
2880         * util/i386/pc/grub-mkrescue.in: New file.
2881         * conf/i386-pc.rmk: Add its build declarations.  Put it in bin_SCRIPTS.
2882         * Makefile.in: Handle bin_SCRIPTS.
2884 2007-06-10  Vesa Jaaskelainen  <chaac@nic.fi>
2886         * term/gfxterm.c (grub_gfxterm_init): Added support for specifying
2887         list of video modes.
2889 2007-06-06  Robert Millan  <rmh@aybabtu.com>
2891         * util/update-grub_lib.in (convert_system_path_to_grub_path): Abort if
2892         file doesn't exist, or if it is in a filesystem grub can't read.
2894         * util/update-grub.in: Set fallback for GRUB_FS check to "unknown".  Do
2895         not abort if GRUB_DRIVE could not be defined.  Rearrange generated
2896         header comment to fit in 80 columns when the variables are resolved.
2898         * util/grub.d/00_header.in: Only set root variable when GRUB_DRIVE
2899         could be identified by update-grub.  Remove redundant check for
2900         unifont.pff existance (since convert_system_path_to_grub_path now
2901         handles that).
2903 2007-06-04  Robert Millan  <rmh@aybabtu.com>
2905         * conf/i386-efi.rmk (grub_probe_SOURCES): Add partmap/apple.c.
2907         * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.
2909         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add partmap/pc.c.
2911 2007-06-04  Robert Millan  <rmh@aybabtu.com>
2913         * conf/powerpc-ieee1275.rmk: Enable grub-mkdevicemap and grub-probe.
2915         * include/grub/partition.h: Declare grub_apple_partition_map_init and
2916         grub_apple_partition_map_fini.
2918         * util/biosdisk.c
2919         (grub_util_biosdisk_open): Replace BLKGETSIZE with BLKGETSIZE64 (needed
2920         to access >2 TiB disks).
2922         Print disk->total_sectors with %llu instead of %lu, since this
2923         variable is always 64-bit (prevents wrong disk size from being displayed
2924         on either >2 TiB disk or big-endian CPU).
2926         (grub_util_biosdisk_get_grub_dev): Convert gpt_partition_map handling
2927         into a generic case that supports all (sane) partition maps.
2929         Stop using grub_cpu_to_le32() on dos_part / bsd_part since it actually
2930         breaks big-endian.
2932         * util/grub-probe.c: Call grub_apple_partition_map_init() before probe()
2933         and grub_apple_partition_map_fini() after that.
2935 2007-06-01  Robert Millan  <rmh@aybabtu.com>
2937         * util/update-grub.in: Export GRUB_CMDLINE_LINUX.
2939         * util/grub.d/00_header.in: Only enable gfxterm when
2940         convert_system_path_to_grub_path() succeeds.
2942 2007-05-20  Robert Millan  <rmh@aybabtu.com>
2944         * util/update-grub_lib.in: New file.
2945         * DISTLIST: Add update-grub_lib.in.
2946         * conf/common.rmk: Generate update-grub_lib and install it in
2947         $(lib_DATA).
2948         * Makefile.in: Add install routine for $(lib_DATA).
2950         * util/grub.d/00_header.in: Use convert_system_path_to_grub_path()
2951         function provided by update-grub_lib to support arbitrary paths of
2952         unifont.pff.
2953         * util/update-grub.in: Use convert_system_path_to_grub_path() to
2954         initialize GRUB_DRIVE_BOOT and GRUB_DRIVE_BOOT_GRUB variables.
2956 2007-05-19  Robert Millan  <rmh@aybabtu.com>
2958         * commands/i386/cpuid.c: New module.
2959         * DISTLIST: Add it.
2960         * conf/i386-efi.rmk: Enable cpuid.mod.
2961         * conf/i386-pc.rmk: Likewise.
2963 2007-05-18  Jeroen Dekkers  <jeroen@dekkers.cx>
2965         * kern/disk.c (grub_disk_read): Check return value of
2966         grub_realloc().
2968 2007-05-18  Jeroen Dekkers  <jeroen@dekkers.cx>
2970         * util/getroot.c (grub_util_get_grub_dev): Support partitionable
2971         arrays.
2972         * disk/raid.c (grub_raid_open): Likewise.
2974 2007-05-17  Jeroen Dekkers  <jeroen@dekkers.cx>
2976         * util/biosdisk.c (linux_find_partition): Allocate real_dev on the
2977         stack instead of on the heap.
2979         * kern/disk.c (grub_disk_read): Make sure tmp_buf is big enough
2980         before doing a read on it.
2982         * configure.ac: Only use -fno-stack-protector for the target
2983         environment.
2984         
2985 2007-05-17  Jeroen Dekkers  <jeroen@dekkers.cx>
2987         * video/i386/pc/vbe.c (grub_video_vbe_create_render_target): Add
2988         __attribute_ ((unused)) to mode_type argument.
2990         * util/getroot.c (grub_guess_root_device): Fix #endif.
2991         
2992         * kern/misc.c (memcmp): Fix prototype.
2994         * include/grub/partition.h [GRUB_UTIL]
2995         (grub_gpt_partition_map_init): Add prototype.
2996         (grub_gpt_partition_map_fini): Likewise.
2998         * fs/jfs.c (struct grub_jfs_inode): Put __attribute__ ((packed)
2999         at the right place.
3001         * fs/fat.c (grub_fat_mount): Replace ~0UL with ~0U.
3002         (grub_fat_read_data): Likewise.
3003         (grub_fat_find_dir): Likewise.
3005         * font/manager.c (find_glyph): Make table a const.
3006         (grub_font_get_glyph): Remove bitmap from if statement.
3007         
3008 2007-05-16  Jeroen Dekkers  <jeroen@dekkers.cx>
3010         * util/getroot.c (grub_guess_root_device): Remove RAID and LVM
3011         code, first search for device in /dev/mapper, then in /dev.
3012         (grub_util_get_grub_dev): New function.
3013         * include/grub/util/getroot.h (grub_util_get_grub_dev): Add
3014         prototype.
3015         * util/grub-probe.c (probe): Remove check for RAID, call
3016         grub_util_get_grub_dev() instead of
3017         grub_util_biosdisk_get_grub_dev().
3018         * util/grub-emu.c (main): Call grub_util_get_grub_dev() instead of
3019         grub_util_biosdisk_get_grub_dev().
3020         * util/i386/pc/grub-setup.c (main): Likewise.
3022 2007-05-16  Robert Millan  <rmh@aybabtu.com>
3024         * DISTLIST: Update for the latest changes.
3025         * conf/i386-pc.rmk: Use the new paths for util/getroot.c,
3026         util/grub-mkdevicemap.c, util/grub-probe.c and util/biosdisk.c.
3027         * util/grub-emu.c: Replace grub/i386/pc/util/biosdisk.h with
3028         grub/util/biosdisk.h.
3029         * util/i386/pc/grub-setup.c: Replace grub/machine/util/biosdisk.h with
3030         grub/util/biosdisk.h.
3032 2007-05-16  Robert Millan  <rmh@aybabtu.com>
3034         * util/grub.d/00_header.in: Set default gfxmode to `640x480'.
3036 2007-05-16  Robert Millan  <rmh@aybabtu.com>
3038         * util/i386/efi/grub-install.in: New.
3039         * conf/i386-efi.rmk: Enable grub-mkdevicemap, grub-probe and the
3040         newly added grub-install.
3041         * util/biosdisk.c: Remove unnecessary grub/machine/biosdisk.h
3042         include.
3043         * util/getroot.c: Replace grub/i386/pc/util/biosdisk.h with
3044         grub/util/biosdisk.h.
3045         * util/grub-probe.c: Replace grub/machine/util/biosdisk.h with
3046         grub/util/biosdisk.h.
3048 2007-05-16  Robert Millan  <rmh@aybabtu.com>
3050         * include/grub/i386/pc/util/biosdisk.h: Moved to ...
3051         * include/grub/util/biosdisk.h: ... here.
3052         * util/i386/pc/biosdisk.c: Moved to ...
3053         * util/biosdisk.c: ... here.
3054         * util/i386/pc/getroot.c: Moved to ...
3055         * util/getroot.c: ... here.
3056         * util/i386/pc/grub-mkdevicemap.c: Moved to ...
3057         * util/grub-mkdevicemap.c: ... here.
3058         * util/i386/pc/grub-probe.c: Moved to ...
3059         * util/grub-probe.c: ... here.
3061 2007-05-15  Robert Millan  <rmh@aybabtu.com>
3063         * util/update-grub.in: Remove duplicated line in grub.cfg header
3064         message.
3066 2007-05-13  Robert Millan  <rmh@aybabtu.com>
3068         * util/update-grub.in: Fix a few assumptions about the devices holding
3069         /, /boot and /boot/grub being the same.
3070         * util/grub.d/00_header.in: Likewise.
3071         * util/grub.d/10_hurd.in: Likewise.
3072         * util/grub.d/10_linux.in: Likewise.
3074         * util/grub.d/10_linux.in: Implement Linux image sorting with arbitrary
3075         patterns.  Use that to define the `.old' suffix as older than `'.
3077         * util/grub.d/00_header.in: Set default gfxmode to `800x600x16'.
3079         * util/update-grub.in: Add a reference to ${sysconfdir}/default/grub in
3080         the grub.cfg header message.
3082 2007-05-11  Robert Millan  <rmh@aybabtu.com>
3084         * util/update-grub.in: Create device.map if it doesn't already exist,
3085         before attempting to run grub-probe.
3086         Check for grub-probe and grub-mkdevicemap with the same code
3087         grub-install is using.
3088         Remove test mode.
3090 2007-05-09  Jeroen Dekkers  <jeroen@dekkers.cx>
3092         * Makefile.in: Add the datarootdir autoconf variable.
3094 2007-05-09  Robert Millan  <rmh@aybabtu.com>
3096         * util/i386/pc/grub-probe.c (probe): When detecting partition map,
3097         fail gracefuly if dev->disk->partition == NULL.
3099 2007-05-07  Robert Millan  <rmh@aybabtu.com>
3101         * util/i386/pc/grub-probe.c: Add `grub-probe -t partmap' parameter to
3102         determine partition map module.
3103         * util/i386/pc/grub-install.in: Use this feature to decide which
3104         partition module to load, instead of hardcoding pc and gpt.
3106 2007-05-07  Robert Millan  <rmh@aybabtu.com>
3108         * Makefile.in: Fix assumption that $(srcdir) has a trailing slash when
3109         source directory differs from build directory.
3111 2007-05-05  Robert Millan  <rmh@aybabtu.com>
3113         * util/powerpc/ieee1275/grub-install.in: Fix syntax error in pkglibdir
3114         initialisation.
3116 2007-05-05  Robert Millan  <rmh@aybabtu.com>
3118         * util/update-grub.in: Create ${grub_prefix} if it doesn't exist.
3120 2007-05-05  Robert Millan  <rmh@aybabtu.com>
3122         * util/grub.d/10_linux.in: Allow the administrator to insert Linux
3123         command-line arguments via ${GRUB_CMDLINE_LINUX}.
3125 2007-05-05  Robert Millan  <rmh@aybabtu.com>
3127         * conf/i386-pc.rmk (grub_setup_SOURCES): Add partmap/gpt.c.
3128         (grub_probe_SOURCES): Likewise.
3129         * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): Detect
3130         GPT and initialize dos_part and bsd_part accordingly.
3131         * util/i386/pc/grub-setup.c (setup): Ditto for install_dos_part and
3132         install_bsd_part.
3133         (main): Activate gpt module for use during partition identification,
3134         and deactivate it afterwards.
3135         * util/i386/pc/grub-install.in: Add gpt module to core.img.
3136         * util/i386/pc/grub-probe.c (main): Activate gpt module for use during
3137         partition identification, and deactivate it afterwards.
3139 2007-05-05  Robert Millan  <rmh@aybabtu.com>
3141         * term/i386/pc/console.c (grub_console_fini): Call
3142         grub_term_set_current() before grub_term_unregister().
3144 2007-05-04  Robert Millan  <rmh@aybabtu.com>
3146         * DISTLIST: Add util/update-grub.in, util/grub.d/00_header.in,
3147         util/grub.d/10_hurd.in, util/grub.d/10_linux.in and util/grub.d/README.
3148         * Makefile.in: Build update-grub_SCRIPTS.  Install update-grub_SCRIPTS
3149         and update-grub_DATA.
3150         * conf/common.rmk: Build and install update-grub components.
3151         * conf/common.mk: Regenerate.
3152         * util/update-grub.in: New.  Core of update-grub.
3153         * util/grub.d/00_header.in: New.  Generates grub.cfg header.
3154         * util/grub.d/10_hurd.in: New.  Generates boot entries for the Hurd.
3155         * util/grub.d/10_linux.in: New.  Generates boot entries for Linux.
3156         * util/grub.d/README: New.  Document grub.d directory layout.
3158 2007-05-01  Robert Millan  <rmh@aybabtu.com>
3160         * util/grub-emu.c: Move initialization functions
3161         grub_util_biosdisk_init() and grub_init_all() before
3162         grub_util_biosdisk_get_grub_dev(), which relies on them.
3164 2007-04-19  Robert Millan  <rmh@aybabtu.com>
3166         * util/powerpc/ieee1275/grub-install.in: Initialize ${bindir}, since
3167         it is used later.
3169 2007-04-18  Jerone Young  <jerone@gmail.com>
3171         * kernel/elf.c: Add missing parenthesis for conditional statement 
3172         stanza.
3174 2007-04-10  Jerone Young  <jerone@gmail.com>
3176         * util/i386/pc/getroot.c: Update so that if root device is /dev/root ,
3177         continue on and look for device node with real device name.
3179 2007-04-10  Jerone Young  <jerone@gmail.com>
3180         
3181         * configure.ac: Add argument for autoconf to use tranformation
3182         ability.
3183         * Makefile.in: Add autoconf package transformation code.
3184         * util/i386/pc/grub-install.in: Likewise.
3185         * util/powerpc/ieee1275/grub-install.in: Likewise.
3187 2007-03-19  Yoshinori K. Okuji  <okuji@enbug.org>
3189         * fs/ext2.c (EXT2_GOOD_OLD_REVISION): New macro.
3190         (EXT2_GOOD_OLD_INODE_SIZE): Likewise.
3191         (EXT2_REVISION): Likewise.
3192         (EXT2_INODE_SIZE): Likewise.
3193         (struct grub_ext2_block_group): Added a missing member
3194         "used_dirs".
3195         (grub_ext2_read_inode): Divide by the inode size in a superblock
3196         instead of 128 to obtain INODES_PER_BLOCK.
3197         Use the macro EXT2_INODE_SIZE instead of directly using
3198         SBLOCK->INODE_SIZE.
3200 2007-03-18  Yoshinori K. Okuji  <okuji@enbug.org>
3202         * fs/ext2.c (grub_ext2_read_inode): Use the inode size in a
3203         superblock instead of the structure size to compute an
3204         offset. This fixes the problem that GRUB could not read a
3205         filesystem when inode size is different from 128-byte.
3207 2007-03-05  Marco Gerards  <marco@gnu.org>
3209         * normal/main.c (read_config_file): When "menu" is not set, create
3210         an initial context.
3212 2007-02-21  Hollis Blanchard  <hollis@penguinppc.org>
3214         * kern/powerpc/ieee1275/init.c (HEAP_SIZE): Removed.
3215         (HEAP_LIMIT): New macro.
3216         (grub_claim_heap): Claim memory up to `heaplimit'.
3218 2007-02-21  Hollis Blanchard  <hollis@penguinppc.org>
3220         * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Link at 64KB.
3221         * kern/powerpc/ieee1275/init.c (_end): Add declaration.
3222         (_start): Likewise.
3223         (grub_arch_modules_addr): Return address after `_end'.
3224         * util/powerpc/ieee1275/grub-mkimage.c: Include grub/misc.h.
3225         (load_modules): Use new parameter as `p_paddr' and `p_vaddr'.
3226         (add_segments): Calculate `_end' from phdr size and location.
3227         (ALIGN_UP): Moved to ...
3228         * include/grub/misc.h: here.
3229         * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
3230         New macro.
3231         (GRUB_IEEE1275_MODULE_BASE): Removed.
3233 2007-02-20  Hollis Blanchard  <hollis@penguinppc.org>
3235         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Correct
3236         loop boundary.
3238 2007-02-20  Hollis Blanchard  <hollis@penguinppc.org>
3240         * include/grub/elfload.h (grub_elf32_load_hook_t): Return grub_err_t.
3241         All users updated.
3242         (grub_elf64_load_hook_t): Likewise.
3243         * kern/elf.c: Call `grub_error_push' before `grub_error'. Improve
3244         debug output.
3246 2007-02-20  Hollis Blanchard  <hollis@penguinppc.org>
3248         * kern/mm.c: Update copyright.
3249         (grub_mm_debug): Correct syntax error.
3250         (grub_mm_dump_free): New function.
3251         (grub_debug_free): Call `grub_free'.
3252         * include/grub/mm.h: Update copyright.
3253         (grub_mm_dump_free): Add declaration.
3255 2007-02-12  Hollis Blanchard  <hollis@penguinppc.org>
3257         * include/grub/ieee1275/ieee1275.h: Update copyright.
3258         * kern/powerpc/ieee1275/init.c: Likewise.
3259         * kern/powerpc/ieee1275/openfw.c: Likewise.
3261         * loader/powerpc/ieee1275/linux.c: Likewise.
3262         * include/grub/elfload.h: Likewise.
3263         * kern/elf.c: Likewise.
3264         (grub_elf32_load): Pass `base' and `size' parameters.  Update all
3265         callers.
3266         (grub_elf64_load): Likewise.
3267         (grub_elf32_load_segment): Move to a nested function.
3268         (grub_elf64_load_segment): Likewise.
3270 2007-02-12  Hollis Blanchard  <hollis@penguinppc.org>
3272         * include/grub/ieee1275/ieee1275.h (grub_available_iterate): New
3273         prototype.
3274         * kern/powerpc/ieee1275/init.c (grub_heap_start): Removed.
3275         (grub_heap_len): Likewise.
3276         (HEAP_SIZE): New macro.
3277         (grub_claim_heap): New function.
3278         (grub_machine_init): Don't claim heap directly.  Call
3279         `grub_claim_heap'.
3280         * kern/powerpc/ieee1275/openfw.c: Include alloca.h.
3281         (grub_available_iterate): New function.
3283 2007-02-03  Thomas Schwinge  <tschwinge@gnu.org>
3285         * aclocal.m4 (grub_CHECK_STACK_PROTECTOR): New definition.
3286         * configure.ac: Use it for testing the HOST and TARGET compilers.
3288 2006-12-13  Thomas Schwinge  <tschwinge@gnu.org>
3290         * Makefile.in (enable_grub_emu): New variable.
3291         * configure.ac (--enable-grub-emu): New option.
3292         Do the checks for (n)curses only if `--enable-grub-emu' is requested.
3293         * conf/i386-efi.rmk (sbin_UTILITIES): Add `grub-emu' only if requested.
3294         * conf/i386-pc.rmk: Likewise.
3295         * conf/powerpc-ieee1275.rmk: Likewise.
3296         * conf/sparc64-ieee1275.rmk (bin_UTILITIES): Likewise.
3298 2006-12-12  Marco Gerards  <marco@gnu.org>
3300         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_MENU'.
3302         * kern/env.c (grub_env_unset): Don't free the member `value' when
3303         the type is GRUB_ENV_VAR_DATA, in this case it's a user defined
3304         pointer.
3306         * normal/main.c (current_menu): Removed.
3307         (free_menu): Unset the `menu' environment variable.
3308         (grub_normal_menu_addentry): Make use of the environment variable
3309         `menu', instead of using the global `current_menu'.  Allocate
3310         memory for the sourcecode of this entry.
3311         (read_config_file): New argument `nested', changed all callers.
3312         Only in the case of a new context, initialize a new menu.  Set the
3313         `menu' environment variable.
3314         (grub_normal_execute): Don't set and unset the environment
3315         variable `menu' here anymore.  Only free the menu when leaving the
3316         context.
3318         * util/i386/pc/biosdisk.c (linux_find_partition): Fixed a memory
3319         leak.
3321 2006-12-11  Marco Gerards  <marco@gnu.org>
3323         * normal/menu_entry.c (run): Fix off by one bug so the last line
3324         is executed.  Move the loader check to outside the loop.
3326 2006-12-08  Hollis Blanchard  <hollis@penguinppc.org>
3328         * kern/powerpc/ieee1275/cmain.c (cmain): Mark r3 and r4 as `UNUSED'.
3330 2006-11-25  Yoshinori K. Okuji  <okuji@enbug.org>
3332         * util/i386/pc/grub-mkimage.c (generate_image): Fix the offset of
3333         the number of sectors.  Reported by Andrey Shuvikov
3334         <mr_hyro@yahoo.com>.
3335         
3336 2006-11-11  Jeroen Dekkers  <jeroen@dekkers.cx>
3338         * kern/disk.c (grub_disk_read): When there is a read error, always
3339         try to read only the necessary data.
3340         
3341         * conf/i386-pc.rmk (grub_probe_SOURCES): Add disk/lvm.c and
3342         disk/raid.c.
3343         * include/grub/disk.h [GRUB_UTIL] (grub_raid_init): New
3344         prototype.
3345         [GRUB_UTIL] (grub_raid_fini): Likewise.
3346         [GRUB_UTIL] (grub_lvm_init): Likewise.
3347         [GRUB_UTIL] (grub_lvm_fini): Likewise.  
3348         * util/i386/pc/grub-probe.c (probe): Check whether DEVICE_NAME is
3349         RAID device and copy DEVICE_NAME to DRIVE_NAME in that case.
3350         (main): Call grub_raid_init(), grub_lvm_init(), grub_lvm_fini()
3351         and grub_raid_fini().
3352         
3353 2006-11-09  Jeroen Dekkers  <jeroen@dekkers.cx>
3355         * include/grub/types.h (__unused): Rename to UNUSED.
3356         * kern/elf.c (grub_elf32_size): Use UNUSED instead of __unused.
3357         (grub_elf64_size): Likewise.
3358         
3359 2006-11-03  Hollis Blanchard  <hollis@penguinppc.org>
3361         * kern/elf.c (grub_elf_file): Call grub_file_seek. Call
3362         grub_error_push and grub_error_pop in the error-handling path.
3363         (grub_elf32_load_segment): Only call grub_file_read with non-zero
3364         length.
3366 2006-11-03  Hollis Blanchard  <hollis@penguinppc.org>
3368         * conf/i386-efi.rmk (grub_emu_SOURCES): Add kern/elf.c.
3369         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
3370         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3371         (kernel_elf_SOURCES): Likewise.
3372         * conf/i386-efi.rmk (kernel_mod_HEADERS): Add elfload.h and cache.h.
3373         * conf/i386-pc.rmk (kernel_mod_HEADERS): Likewise.
3374         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
3375         * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
3376         * conf/common.rmk (pkgdata_MODULES): Add elf.mod.
3377         (elf_mod_SOURCES): New variable.
3378         (elf_mod_CFLAGS): Likewise.
3379         (elf_mod_LDFLAGS): Likewise.
3380         * include/grub/types.h (__unused): New macro.
3381         * include/grub/elfload.h: New file.
3382         * kern/elf.c: Likewise.
3383         * loader/powerpc/ieee1275/linux.c: Include elfload.h.
3384         (ELF32_LOADMASK): New macro.
3385         (ELF64_LOADMASK): Likewise.
3386         (vmlinux): Removed.
3387         (grub_linux_load32): New function.
3388         (grub_linux_load64): Likewise.
3389         (grub_rescue_cmd_linux): Call grub_linux_load32 or grub_linux_load64.
3390         Use grub_elf_t instead of grub_file_t.
3392 2006-11-02  Hollis Blanchard  <hollis@penguinppc.org>
3394         * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): Add
3395         `catch_result' to struct set_color_args.
3397 2006-10-28  Yoshinori K. Okuji  <okuji@enbug.org>
3399         * normal/menu.c: Include grub/script.h.
3400         * normal/menu_entry.c: Likewise.
3401         * include/grub/normal.h: Do not include grub/script.h.
3403 2006-10-27  Hollis Blanchard  <hollis@penguinppc.org>
3405         * kern/disk.c (grub_disk_read): Correct debug printf formatting.
3407 2006-10-27  Hollis Blanchard  <hollis@penguinppc.org>
3409         * kern/disk.c (grub_disk_open): Print debug messages when opening a
3410         disk.
3411         (grub_disk_close): Print debug messages when closing a disk.
3412         (grub_disk_read): Print debug messages when disk read fails.
3413         * kern/fs.c (grub_fs_probe): Print debug messages when detecting
3414         filesystem type.
3415         * kern/partition.c: Include misc.h.
3416         (grub_partition_iterate): Print debug messages when detecting
3417         partition type.
3419 2006-10-27  Hollis Blanchard  <hollis@penguinppc.org>
3421         * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Return error if `status'
3422         is negative.
3423         * kern/ieee1275/ieee1275.c (IEEE1275_IHANDLE_INVALID): Change to 0.
3425 2006-10-26  Hollis Blanchard  <hollis@penguinppc.org>
3427         * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
3428         Reverse GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS test.
3430 2006-10-25  Jeroen Dekkers  <jeroen@dekkers.cx>
3432         * disk/lvm.c (grub_lvm_scan_device): Malloc sizeof(*lv) bytes
3433         instead of sizeof(lv). Patch by Michael Guntsche.
3435 2006-10-18  Jeroen Dekkers  <jeroen@dekkers.cx>
3437         * disk/lvm.c: Rename VGS to VG_LIST.
3438         (grub_lvm_iterate): Change VGS->LV to VG-LV.
3439         (grub_lvm_open): Likewise.
3440         Thanks to Michael Guntsche for finding this bug.
3442 2006-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
3444         * configure.ac (AC_INIT): Bumped to 1.95.
3446 2006-10-14  Robert Millan  <rmh@aybabtu.com>
3448         * util/i386/pc/getroot.c (grub_guess_root_device): Don't compare os_dev
3449         with "/dev/.static/dev/md".
3451 2006-10-14  Yoshinori K. Okuji  <okuji@enbug.org>
3453         * util/i386/pc/grub-probe.c (probe): Print DEVICE_NAME instead of
3454         DRIVE_NAME when grub_util_biosdisk_get_grub_dev fails. Open
3455         DRIVE_NAME instead of DEVICE_NAME. Make sure that DEVICE_NAME and
3456         DRIVE_NAME are always freed.
3458         * util/i386/pc/biosdisk.c (make_device_name): Add one into
3459         DOS_PART, as a DOS partition is counted from one instead of zero
3460         now. Reported by Robert Millan.
3462 2006-10-14  Robert Millan  <rmh@aybabtu.com>
3464         * util/i386/pc/getroot.c (grub_guess_root_device): Stop using
3465         grub_util_biosdisk_get_grub_dev to convert system device to GRUB device.
3466         * util/grub-emu.c (main): Use grub_util_biosdisk_get_grub_dev with the
3467         string returned by grub_guess_root_device.
3468         * util/i386/pc/grub-setup.c: Likewise.
3469         * util/i386/pc/grub-probefs.c: Likewise.
3471         * util/i386/pc/grub-probefs.c: Rename to ...
3472         * util/i386/pc/grub-probe.c: ... this.
3473         * DISTLIST: Remove grub-probefs, add grub-probe.
3474         * conf/i386-efi.rmk: Likewise.
3475         * conf/i386-pc.rmk: Likewise.
3476         * util/i386/pc/grub-install.in: Likewise.
3478         * util/i386/pc/grub-probe.c: Add --target=(fs|device|drive) option to
3479         choose which information we want to print.
3481 2006-10-14  Yoshinori K. Okuji  <okuji@enbug.org>
3483         * DISTLIST: Added commands/echo.c, disk/lvm.c, disk/raid.c,
3484         include/grub/bitmap.h, include/grub/lvm.h, include/grub/raid.h,
3485         include/grub/i386/pc/vbeutil.h, include/grub/util/lvm.h,
3486         include/grub/util/raid.h, util/lvm.c, util/raid.c, video/bitmap.c,
3487         video/readers/tga.c and video/i386/pc/vbeutil.c.
3489 2006-10-14  Jeroen Dekkers  <jeroen@dekkers.cx>
3491         Added support for RAID and LVM.
3492         
3493         * disk/lvm.c: New file.
3494         * disk/raid.c: Likewise.
3495         * include/grub/lvm.h: Likewise.
3496         * include/grub/raid.h: Likewise.        
3497         * include/grub/util/lvm.h: Likewise.
3498         * include/grub/util/raid.h: Likewise.
3499         * util/lvm.c: Likewise.
3500         * util/raid.c: Likewise.
3502         * include/grub/disk.h (grub_disk_dev_id): Add
3503         GRUB_DISK_DEVICE_RAID_ID and GRUB_DISK_DEVICE_LVM_ID.
3504         (grub_disk_get_size): New prototype.
3505         * kern/disk.c (grub_disk_open): Check whether grub_partition_probe()
3506         returns a partition.
3507         (grub_disk_get_size): New function.
3508         
3509         * kern/i386/pc/init.c (make_install_device): Copy the prefix
3510         verbatim if grub_install_dos_part is -2.
3512         * util/i386/pc/getroot.c (grub_guess_root_device): Support RAID
3513         and LVM devices.
3515         * util/i386/pc/grub-setup.c (setup): New argument
3516         MUST_EMBED. Force embedding of GRUB when the argument is
3517         true. Close FILE before returning.
3518         (main): Add support for RAID and LVM.
3519         
3520         * conf/common.rmk: Add RAID and LVM modules.
3521         * conf/i386-pc.rmk (grub_setup_SOURCES): Add util/raid.c and
3522         util/lvm.c.
3523         (grub_emu_SOURCES): Add disk/raid.c and disk/lvm.c.
3525         * kern/misc.c (grub_strstr): New function.
3526         * include/grub/misc.h (grub_strstr): New prototype.
3528 2006-10-10  Tristan Gingold  <tristan.gingold@bull.net>
3530         * include/grub/efi/api.h (GRUB_EFI_ERROR_CODE): Long constant.
3532 2006-10-05  Tristan Gingold  <tristan.gingold@bull.net>
3534         * kern/misc.c (grub_strtoull): Guess the base only if not
3535         specified.
3537 2006-10-01  Hollis Blanchard  <hollis@penguinppc.org>
3539         * kern/powerpc/ieee1275/cmain.c (cmain): Remove incomplete Old World
3540         PowerMac support.
3542 2006-10-01  Hollis Blanchard  <hollis@penguinppc.org>
3544         * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Cast `size' to long.
3546         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_next_property):
3547         Remove `flags' argument.  All callers changed.
3548         * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_ROOT): Removed.
3549         (IEEE1275_IHANDLE_INVALID): New variable.
3550         (IEEE1275_CELL_INVALID): New variable.
3551         (grub_ieee1275_finddevice, grub_ieee1275_get_property,
3552         grub_ieee1275_get_property_length, grub_ieee1275_instance_to_package,
3553         grub_ieee1275_package_to_path, grub_ieee1275_instance_to_path,
3554         grub_ieee1275_peer, grub_ieee1275_child, grub_ieee1275_open,
3555         grub_ieee1275_claim, grub_ieee1275_set_property): Error-check return
3556         codes from Open Firmware.  All callers updated.
3557         (grub_ieee1275_next_property): Directly return Open Firmware return
3558         code.
3559         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
3560         Standardize error checking from `grub_ieee1275_get_property'.
3561         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Rename
3562         `devalias' to `aliases'.  Correct comments.  Consolidate error paths.
3564 2006-10-01  Hollis Blanchard  <hollis@penguinppc.org>
3566         * kern/ieee1275/ieee1275.c (grub_ieee1275_instance_to_path): Rename
3567         `instance_to_package_args' to `instance_to_path_args'.
3569         * kern/powerpc/ieee1275/init.c (grub_machine_init): Use
3570         `grub_ieee1275_chosen'.
3572         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Call
3573         `grub_ieee1275_interpret'.
3575 2006-09-25  Hollis Blanchard  <hollis@penguinppc.org>
3577         * util/powerpc/ieee1275/grub-mkimage.c: Include config.h.
3579 2006-09-25  Hollis Blanchard  <hollis@penguinppc.org>
3581         * include/grub/powerpc/libgcc.h (__floatdisf): New prototype.
3582         (__cmpdi): Likewise.
3584         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Pass 0 as
3585         `flags' to `grub_ieee1275_next_property'.  Change `pathlen' to type
3586         `grub_ssize_t'.
3588         * kern/powerpc/ieee1275/cmain.c: Include grub/misc.h.
3590         * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Change `actual'
3591         to type `grub_ssize_t'.
3592         (grub_rescue_cmd_linux): Cast -1 to `grub_off_t'.
3594 2006-09-22  Marco Gerards  <marco@gnu.org>
3596         * normal/script.c (grub_script_create_cmdmenu): Skip leading
3597         newlines.
3599 2006-09-22  Marco Gerards  <marco@gnu.org>
3601         * commands/echo.c: New file.
3603         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/echo.c'.
3605         * conf/common.rmk (echo_mod_SOURCES): New variable.
3606         (echo_mod_CFLAGS): Likewise.
3607         (echo_mod_LDFLAGS): Likewise.
3609 2006-09-22  Marco Gerards  <marco@gnu.org>
3611         * normal/main.c (get_line): Malloc memory instead of using
3612         preallocated memory.  Removed the arguments `cmdline' and
3613         `max_len'.  Updated all callers.
3615 2006-09-22  Marco Gerards  <marco@gnu.org>
3617         * conf/i386-efi.rmk (grub_emu_DEPENDENCIES): New variable.
3618         (normal_mod_DEPENDENCIES): Likewise.
3620         * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Likewise.
3621         (normal_mod_DEPENDENCIES): Likewise.
3623         * conf/sparc64-ieee1275.rmk (normal_mod_DEPENDENCIES): Likewise.
3625 2006-09-22  Johan Rydberg  <jrydberg@gnu.org>
3627         * genmk.rb: Add DEPENDENCIES variables to modules, utilities, and
3628         programs.
3629         * conf/i386-pc.rmk (grub_emu_DEPENDENCIES): Declare.
3630         (normal_mod_DEPENDENCIES): Likewise.
3631         * conf/i386-pc.mk: Regenerate.
3632         * conf/i386-efi.mk: Likewise
3633         * conf/common.mk: Likewise.
3634         * conf/powerpc-ieee1275.mk: Likewise.
3635         * conf/sparc64-ieee1275.mk: Likewise.
3636         
3637 2006-09-22  Robert Millan  <rmh@aybabtu.com>
3639         Sync with i386 version.
3640         * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Remove grub-emu, add grub-mkimage.
3641         * conf/powerpc-ieee1275.rmk (sbin_UTILITIES): Remove grub-mkimage, add grub-emu.
3643 2006-09-21  Robert Millan  <rmh@aybabtu.com>
3645         Import from GRUB Legacy (lib/device.c):
3646         * util/i386/pc/grub-mkdevicemap.c (get_i2o_disk_name): New function.
3647         (init_device_map) [__linux__]: Add support for I2O devices.
3649 2006-09-14  Marco Gerards  <marco@gnu.org>
3651         * conf/i386-pc.rmk (COMMON_LDFLAGS): Use `-m32' instead of
3652         `-melf_i386'.
3654 2006-09-14  Robert Millan  <rmh@aybabtu.com>
3656         * util/i386/pc/grub-install.in: Skip menu.lst when removing
3657         /boot/grub/*.lst.
3659         * util/i386/pc/getroot.c: Don't recurse into dotdirs (e.g. ".static").
3661         * util/i386/pc/grub-mkdevicemap.c: Make sure the floppy device exists
3662         before adding it to device.map.
3664 2006-08-15  Johan Rydberg  <jrydberg@gnu.org>
3666         * genmk.rb: Let GCC generate dependenceies the first time it
3667         compiles a file; using the -MD option.
3668         * conf/common.mk: Regenerate.
3669         * conf/i386-pc.mk: Likewise.
3670         * conf/i386-efi.mk: Likewise.
3671         * conf/powerpc-ieee1275.mk: Likewise.
3672         * conf/sparc64-ieee1275.mk: Likewise.
3673         
3674 2006-08-04  Yoshinori K. Okuji  <okuji@enbug.org>
3676         Move the prototypes of grub_setjmp and grub_longjmp to
3677         cpu/setjmp.h, so that each architecture may specify different
3678         attributes.
3679         
3680         * include/grub/i386/setjmp.h (grub_setjmp): New prototype.
3681         (grub_longjmp): Likewise.
3682         * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise..
3683         (grub_longjmp): Likewise.
3684         * include/grub/sparc64/setjmp.h (grub_setjmp): Likewise..
3685         (grub_longjmp): Likewise.
3687         * include/grub/setjmp.h [!GRUB_UTIL] (grub_setjmp): Removed.
3688         [!GRUB_UTIL] (grub_longjmp): Removed.
3690 2006-08-01  Pelletier Vincent  <subdino2004@yahoo.fr>
3692         * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): IEEE1275
3693         "color!" method does not return any value.
3695 2006-07-29  Vesa Jaaskelainen  <chaac@nic.fi>
3697         * include/grub/bitmap.h: New file.
3699         * include/grub/i386/pc/vbeutil.h: Likewise.
3701         * video/bitmap.c: Likewise.
3703         * video/readers/tga.c: Likewise.
3705         * video/i386/pc/vbeutil.c: Likewise.
3707         * commands/videotest.c: Code cleanup and updated to reflect to new
3708         video API.
3710         * term/gfxterm.c: Likewise.
3712         * video/video.c: Likewise.
3714         * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod.
3715         (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c.
3716         (bitmap_mod_SOURCES): New entry.
3717         (bitmap_mod_CFLAGS): Likewise.
3718         (bitmap_mod_LDFLAGS): Likewise.
3719         (tga_mod_SOURCES): Likewise.
3720         (tga_mod_CFLAGS): Likewise.
3721         (tga_mod_LDFLAGS): Likewise.
3723         * include/grub/video.h (grub_video_blit_operators): New enum type.
3724         (grub_video_render_target): Changed as forward declaration and moved
3725         actual definition to be video driver specific.
3726         (grub_video_adapter.blit_bitmap): Added blitting operator.
3727         (grub_video_adapter.blit_render_target): Likewise.
3728         (grub_video_blit_bitmap): Likewise.
3729         (grub_video_blit_render_target): Likewise.
3731         * include/grub/i386/pc/vbe.h (grub_video_render_target): Added
3732         driver specific render target definition.
3733         (grub_video_vbe_map_rgba): Added driver internal helper.
3734         (grub_video_vbe_unmap_color): Updated to use
3735         grub_video_i386_vbeblit_info.
3736         (grub_video_vbe_get_video_ptr): Likewise.
3738         * include/grub/i386/pc/vbeblit.h
3739         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use
3740         grub_video_i386_vbeblit_info.
3741         (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
3742         (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
3743         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
3744         (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
3745         (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
3746         (grub_video_i386_vbeblit_index_index): Likewise.
3747         (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function.
3748         (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
3749         (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
3750         (grub_video_i386_vbeblit_blend): Added generic blitter for blend
3751         operator.
3752         (grub_video_i386_vbeblit_replace): Added generic blitter for replace
3753         operator.
3755         * video/i386/pc/vbeblit.c: Updated to reflect changes on
3756         include/grub/i386/pc/vbeblit.h.
3758         * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8):
3759         Updated to use grub_video_i386_vbeblit_info.
3760         (grub_video_i386_vbefill_R8G8B8): Likewise.
3761         (grub_video_i386_vbefill_index): Likewise.
3762         (grub_video_i386_vbefill): Added generic filler.
3764         * video/i386/pc/vbefill.c: Updated to reflect changes on
3765         include/grub/i386/pc/vbefill.h.
3767         * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use
3768         grub_video_i386_vbeblit_info.
3769         (grub_video_vbe_unmap_color): Likewise.
3770         (grub_video_vbe_blit_glyph): Likewise.
3771         (grub_video_vbe_scroll): Likewise.
3772         (grub_video_vbe_draw_pixel): Removed function.
3773         (grub_video_vbe_get_pixel): Likewise.
3774         (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and
3775         updated code to use it.
3776         (common_blitter): Added common blitter for render target and bitmap.
3777         (grub_video_vbe_blit_bitmap): Updated to use common_blitter.
3778         (grub_video_vbe_blit_render_target): Likewise.
3780 2006-07-30  Johan Rydberg  <jrydberg@gnu.org>
3782         * kern/efi/efi.c (grub_efi_set_text_mode): Assume console already
3783         is in text mode if there is no console control protocol instance
3784         available.
3786 2006-07-29  Vesa Jaaskelainen  <chaac@nic.fi>
3788         * include/grub/video.h: Code cleanup.
3790         * include/grub/i386/pc/vbe.h: Likewise.
3792         * video/i386/pc/vbe.c: Likewise.
3794         * video/i386/pc/vbeblit.c: Likewise.
3796         * video/i386/pc/vbefill.c: Likewise.
3798         * video/video.c: Likewise.  Also added more comments.
3800 2006-07-29  Vesa Jaaskelainen  <chaac@nic.fi>
3802         * disk/i386/pc/biosdisk.c (struct grub_biosdisk_drp): Moved to ...
3803         (struct grub_biosdisk_dap): Likewise.
3805         * include/grub/i386/pc/biosdisk.h: ... to here.  Also corrected
3806         linkage settings for all functions.
3808 2006-07-12  Marco Gerards  <marco@gnu.org>
3810         * configure.ac (--enable-mm-debug): Fix typo.
3812         * genkernsyms.sh.in: Use proper quoting for `CC'.
3814 2006-07-02  Jeroen Dekkers  <jeroen@dekkers.cx>
3816         * conf/i386-pc.rmk (COMMON_ASFLAGS): Add "-m32".
3817         (normal_mod_ASFLAGS): Remove "-m32".
3819 2006-06-14  Yoshinori K. Okuji  <okuji@enbug.org>
3821         * util/misc.c: Include config.h.
3822         [!HAVE_MEMALIGN]: Do not include malloc.h.
3823         (grub_memalign): Use posix_memalign, if present. Then, use
3824         memalign, if present. Otherwise, emit an error.
3826         * util/grub-emu.c: Do not include malloc.h.
3828         * include/grub/util/misc.h: Include unistd.h. This is required for
3829         FreeBSD, because off_t is defined in unistd.h. Reported by Harley
3830         D. Eades III <hde@foobar-qux.org>.
3832         * configure.ac (AC_GNU_SOURCE): Added.
3833         (AC_CHECK_FUNCS): Check posix_memalign and memalign for the host
3834         type.
3836 2006-06-09  Yoshinori K. Okuji  <okuji@enbug.org>
3838         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Make sure that
3839         ADDR_MAX does not exceed GRUB_LINUX_INITRD_MAX_ADDRESS.
3841 2006-06-07  Jeroen Dekkers  <jeroen@dekkers.cx>
3843         * include/grub/types.h (grub_host_addr_t): Rename to
3844         grub_target_addr_t.
3845         (grub_host_off_t): Rename to grub_target_off_t.
3846         (grub_host_size_t): Rename to grub_target_size_t.
3847         (grub_host_ssize_t): Rename to grub_target_ssize_t.
3848         Refer to GRUB_TARGET_SIZEOF_VOID_P to define those variables.
3850         * include/grub/kernel.h (struct grub_module_header): Change type
3851         of OFFSET to grub_target_off_t and type of SIZE to grub_target_size_t.
3852         (grub_module_info): Likewise.
3853         
3854 2006-06-05  Yoshinori K. Okuji  <okuji@enbug.org>
3856         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): The conditional
3857         of checking LINUX_MEM_SIZE was reverse. Reported by Jesus
3858         Velazquez <jesus.velazquez@gmail.com>.
3860 2006-06-05  Yoshinori K. Okuji  <okuji@enbug.org>
3862         Count partitions from 1 instead of 0 in the string representation
3863         of partitions. Still use 0-based internally.
3864         
3865         * partmap/sun.c (grub_sun_is_valid): A cosmetic change.
3866         (sun_partition_map_iterate): Use grub_partition_t instead of
3867         struct grub_partition *. Cast DESC->START_CYLINDER to
3868         grub_uint64_t after converting the endian.
3869         (sun_partition_map_probe): Subtract 1 for PARTNUM.
3870         (sun_partition_map_get_name): Add 1 to P->INDEX.
3872         * partmap/pc.c (grub_partition_parse): Subtract 1 for
3873         PCDATA->DOS_PART.
3874         (pc_partition_map_get_name): Add 1 into PCDATA->DOS_PART.
3876         * partmap/gpt.c (gpt_partition_map_iterate): Initialize PARTNO to
3877         zero instead of one.
3878         (gpt_partition_map_probe): Subtract 1 for PARTNUM.
3879         (gpt_partition_map_get_name): Add 1 into P->INDEX.
3881         * partmap/apple.c (apple_partition_map_iterate): Change the type
3882         of POS to unsigned.
3883         (apple_partition_map_probe): Subtract 1 for PARTNUM.
3884         (apple_partition_map_get_name): Add 1 into P->INDEX.
3886         * partmap/amiga.c (amiga_partition_map_iterate): Change the type
3887         of POS to unsigned.
3888         (amiga_partition_map_iterate): Cast NEXT to grub_off_t to
3889         calculate the offset of a partition.
3890         (amiga_partition_map_probe): Subtract 1 for PARTNUM.
3891         (amiga_partition_map_get_name): Add 1 into P->INDEX.
3893         * partmap/acorn.c (acorn_partition_map_find): Change the type of
3894         SECTOR to grub_disk_addr_t.
3895         (acorn_partition_map_iterate): Likewise.
3896         (acorn_partition_map_probe): Subtract 1 for PARTNUM.
3897         Change the type of SECTOR to grub_disk_addr_t. Declare P on the
3898         top.
3899         (acorn_partition_map_get_name): Add 1 into P->INDEX.
3901         * kern/i386/pc/init.c (make_install_device): Add 1 into
3902         GRUB_INSTALL_DOS_PART.
3904         * fs/iso9660.c (grub_iso9660_mount): Fixed a reversed
3905         conditional.
3907 2006-06-04  Yoshinori K. Okuji  <okuji@enbug.org>
3909         Clean up the code to support 64-bit addressing in disks and
3910         files. This change is not enough for filesystems yet.
3911         
3912         * util/i386/pc/grub-setup.c (struct boot_blocklist): Change the
3913         type of "start" to grub_uint64_t.
3914         (setup): Change the types of KERNEL_SECTOR and FIRST_SECTOR to
3915         grub_disk_addr_t * and grub_disk_addr_t. Fix the format string in
3916         save_first_sector and save_blocklists. Use grub_le_to_cpu64 to
3917         convert addresses.
3919         * util/i386/pc/biosdisk.c (open_device): Change the type of SECTOR
3920         to grub_disk_addr_t.
3922         * partmap/gpt.c (gpt_partition_map_iterate): Fix the format
3923         string.
3925         * partmap/pc.c (pc_partition_map_iterate): Likewise.
3927         * partmap/amiga.c (amiga_partition_map_iterate): Cast RDSK.MAGIC
3928         to char *.
3930         * normal/script.c (grub_script_parse): Remove unused MEMFREE.
3932         * normal/parser.y (YYLTYPE_IS_TRIVIAL): New macro.
3934         * normal/lexer.c (grub_script_yyerror): Specify unused to LEX.
3936         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf64): Cast -1
3937         to grub_off_t, to detect an error from grub_file_seek.
3938         (grub_multiboot_load_elf32): Likewise.
3940         * kern/misc.c (grub_strtoul): Use grub_strtoull. Return the
3941         maximum unsigned long value when an overflow is detected.
3942         (grub_strtoull): New function.
3943         (grub_divmod64): Likewise.
3944         (grub_lltoa): use grub_divmod64.
3946         * kern/fs.c (struct grub_fs_block): Change the type of "offset" to
3947         grub_disk_addr_t.
3948         (grub_fs_blocklist_open): Increase P if P is not NULL to advance
3949         the pointer to next character. Use grub_strtoull instead of
3950         grub_strtoul.
3951         (grub_fs_blocklist_read): Change the types of SECTOR, OFFSET and
3952         SIZE to grub_disk_addr_t, grub_off_t and grub_size_t,
3953         respectively.
3955         * kern/file.c (grub_file_read): Prevent an oveflow of LEN, as the
3956         return value is signed.
3957         (grub_file_seek): Change the type of OLD to grub_off_t. Do not
3958         test if OFFSET is less than zero, as OFFSET is unsigned now.
3960         * kern/disk.c (struct grub_disk_cache): Change the type of
3961         "sector" to grub_disk_addr_t.
3962         (grub_disk_cache_get_index): Change the type of SECTOR to
3963         grub_disk_addr_t. Calculate the hash with SECTOR casted to
3964         unsigned after shifting.
3965         (grub_disk_cache_invalidate): Change the type of SECTOR to
3966         grub_disk_addr_t.
3967         (grub_disk_cache_unlock): Likewise.
3968         (grub_disk_cache_store): Likewise.
3969         (grub_disk_check_range): Change the types of SECTOR, OFFSET, SIZE,
3970         START and LEN to grub_disk_addr_t *, grub_off_t *, grub_size_t,
3971         grub_disk_addr_t and grub_uint64_t, respectively.
3972         (grub_disk_read): Use an unsigned variable REAL_OFFSET for the
3973         body, as the value of OFFSET is tweaked by
3974         grub_disk_check_range. Change the types of START_SECTOR, LEN and
3975         POS to grub_disk_addr_t, grub_size_t and grub_size_t,
3976         respectively.
3977         (grub_disk_write): Use an unsigned variable REAL_OFFSET for the
3978         body, as the value of OFFSET is tweaked by
3979         grub_disk_check_range. Change the types of LEN and N to
3980         grub_size_t.
3982         * io/gzio.c (struct grub_gzio): Change the types of "data_offset"
3983         and "saved_offset" to grub_off_t.
3984         (test_header): Cast BUF to char *.
3985         (get_byte): Cast GZIO->DATA_OFFSET to grub_off_t. Cast GZIO->INBUF
3986         to char *.
3987         (grub_gzio_read): Change the types of OFFSET and SIZE to
3988         grub_off_t and grub_size_t, respectively.
3990         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_FORCE_LBA):
3991         Removed.
3992         (GRUB_BOOT_MACHINE_BOOT_DRIVE): Changed to 0x4c.
3993         (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Changed to 0x40.
3994         (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Changed to 0x42.
3995         (GRUB_BOOT_MACHINE_DRIVE_CHECK): Changed to 0x4e.
3996         (GRUB_BOOT_MACHINE_LIST_SIZE): Increased to 12.
3998         * include/grub/types.h (grub_off_t): Unconditionally set to
3999         grub_uint64_t.
4000         (grub_disk_addr_t): Changed to grub_uint64_t.
4002         * include/grub/partition.h (struct grub_partition): Change the
4003         types of "start", "len" and "offset" to grub_disk_addr_t,
4004         grub_uint64_t and grub_disk_addr_t, respectively.
4005         (grub_partition_get_start): Return grub_disk_addr_t.
4006         (grub_partition_get_len): Return grub_uint64_t.
4008         * include/grub/misc.h (grub_strtoull): New prototype.
4009         (grub_divmod64): Likewise.
4011         * include/grub/fshelp.h (grub_fshelp_read_file): Change the types
4012         of SECTOR, LEN and FILESIZE to grub_disk_addr_t, grub_size_t and
4013         grub_off_t, respectively.
4014         All callers and references changed.
4016         * include/grub/fs.h (struct grub_fs): Change the type of LEN to
4017         grub_size_t in "read".
4018         All callers and references changed.
4020         * include/grub/file.h (struct grub_file): Change the types of
4021         "offset" and "size" to grub_off_t and grub_off_t,
4022         respectively. Change the type of SECTOR to grub_disk_addr_t in
4023         "read_hook".
4024         (grub_file_read): Change the type of LEN to grub_size_t.
4025         (grub_file_seek): Return grub_off_t. Change the type of OFFSET to
4026         grub_off_t.
4027         (grub_file_size): Return grub_off_t.
4028         (grub_file_tell): Likewise.
4029         All callers and references changed.
4031         * include/grub/disk.h (struct grub_disk_dev): Change the types of
4032         SECTOR and SIZE to grub_disk_addr_t and grub_size_t in "read" and
4033         "write".
4034         (struct grub_disk): Change the type of "total_sectors" to
4035         grub_uint64_t. Change the type of SECTOR to grub_disk_addr_t in
4036         "read_hook". 
4037         (grub_disk_read): Change the types of SECTOR, OFFSET and SIZE to
4038         grub_disk_addr_t, grub_off_t and grub_size_t, respectively.
4039         (grub_disk_write): Likewise.
4040         All callers and references changed.
4042         * fs/iso9660.c (grub_iso9660_susp_iterate): Cast parameters to
4043         char * for grub_strncmp to silence gcc.
4044         (grub_iso9660_mount): Likewise.
4045         (grub_iso9660_mount): Likewise.
4046         (grub_iso9660_read_symlink): Likewise. Also, remove the nonsense
4047         return statement.
4048         (grub_iso9660_iterate_dir): Likewise.
4049         (grub_iso9660_label): Cast DATA->VOLDESC.VOLNAME to char *.
4051         * fs/hfs.c (grub_hfs_read_file): Change the types of SECTOR and
4052         LEN to grub_disk_addr_t and grub_size_t, respectively.
4054         * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
4056         * fs/jfs.c (grub_jfs_read_file): Likewise.
4058         * fs/minix.c (grub_jfs_read_file): Likewise.
4060         * fs/sfs.c (grub_jfs_read_file): Likewise.
4062         * fs/ufs.c (grub_jfs_read_file): Likewise.
4064         * fs/xfs.c (grub_jfs_read_file): Likewise.
4066         * fs/fat.c (grub_fat_read_data): Change the types of SECTOR, LEN
4067         and SIZE to grub_disk_addr_t, grub_size_t and grub_size_t,
4068         respectively.
4070         * fs/ext2.c (grub_ext2_read_block): When an error happens, set
4071         BLKNR to -1 instead of returning GRUB_ERRNO.
4072         (grub_ext2_read_file): Change the types of SECTOR and
4073         LEN to grub_disk_addr_t and grub_size_t, respectively.
4075         * fs/affs.c (grub_affs_read_file): Change the types of SECTOR and
4076         LEN to grub_disk_addr_t and grub_size_t, respectively.
4078         * font/manager.c (grub_font_get_glyph): Cast BITMAP to char * for
4079         grub_file_read.
4081         * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Fix the format
4082         string. Do not cast SECTOR explicitly.
4084         * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Change the type of
4085         TOTAL_SECTORS to grub_uint64_t. Do not mask DRP->TOTAL_SECTORS.
4086         (grub_biosdisk_rw): Change the types of SECTOR and SIZE to
4087         grub_disk_addr_t and grub_size_t, respectively. If the sector is
4088         over 2TB and LBA mode is not supported, raise an error.
4089         (get_safe_sectors): New function.
4090         (grub_biosdisk_read): Use get_safe_sectors.
4091         (grub_biosdisk_write): Likewise.
4093         * disk/efi/efidisk.c (grub_efidisk_read): Fix the format string.
4094         (grub_efidisk_write): Likewise.
4096         * disk/loopback.c (delete_loopback): Cosmetic changes.
4097         (grub_cmd_loopback): Likewise. Also, test NEWDEV->FILENAME
4098         correctly.
4099         (grub_loopback_open): Likewise.
4100         (grub_loopback_read): Likewise. Also, change the type of POS to
4101         grub_off_t, and fix the usage of grub_memset.
4103         * commands/i386/pc/play.c: Include grub/machine/time.h.
4105         * commands/ls.c (grub_ls_list_files): Use "llu" instead of "d" to
4106         print FILE->SIZE.
4108         * commands/configfile.c: Include grub/env.h.
4110         * commands/cmp.c (grub_cmd_cmp): Do not use ERR, but use
4111         GRUB_ERRNO directly instead. Change the type of POS to
4112         grub_off_t. Follow the coding standard.
4114         * commands/blocklist.c: Include grub/partition.h.
4115         (grub_cmd_blocklist): Return an error if the underlying device is
4116         not a disk. Take the starting sector of a partition into account,
4117         if a partition is used.
4119         * boot/i386/pc/diskboot.S (bootloop): Adapted to the new offset of
4120         a length field.
4121         (lba_mode): Support 64-bit addresses.
4122         (chs_mode): Likewise.
4123         (copy_buffer): Adapted to the new offsets of a length field and a
4124         segment field.
4125         (blocklist_default_start): Allocate 64-bit space.
4127         * boot/i386/pc/boot.S (force_lba): Removed.
4128         (boot_drive): Moved to under KERNEL_SECTOR.
4129         (kernel_sector): Moved to under KENREL_SEGMENT. Allocate 64-bit
4130         space.
4131         (real_start): Set %si earlier. Remove code for FORCE_LBA, since it
4132         is useless.
4133         (lba_mode): Refactored to support a 64-bit address. More size
4134         optimization.
4135         (setup_sectors): Likewise.
4137 2006-06-04  Yoshinori K. Okuji  <okuji@enbug.org>
4139         * DISTLIST: Added include/grub/i386/linux.h. Removed
4140         include/grub/i386/pc/linux.h
4142         * configure.ac (AC_INIT): Bumped to 1.94.
4144         * config.guess: Updated from gnulib.
4145         * config.sub: Likewise.
4146         * install-sh: Likewise.
4147         * mkinstalldirs: Likewise.
4149 2006-06-02  Yoshinori K. Okuji  <okuji@enbug.org>
4151         * conf/common.rmk (grub_modules_init.lst): Depended on
4152         grub_emu_SOURCES, excluding grub_emu_init.c, instead of
4153         MODSRCFILES.
4155         * genmk.rb (PModule::rule): Reverted the previous change.
4157 2006-06-02  Yoshinori K. Okuji  <okuji@enbug.org>
4159         * conf/common.rmk (grub_modules_init.lst): Depends on
4160         $(MODSRCFILES). Grep only the files in $(MODSRCFILES). Make sure
4161         that the target does not exist before producing.
4162         (grub_modules_init.h): Remove the target before generating.
4163         (grub_emu_init.c): Likewise.
4165         * genmk.rb (PModule::rule): Add source files into MODSRCFILES.
4167 2006-05-31  Jeroen Dekkers  <jeroen@dekkers.cx>
4169         * configure.ac: Don't set host_m32 for x86_64. Also reset LIBS
4170         for the target-specific tests. Make sure that we also have the
4171         up-to-date target variables for those tests.
4173 2006-05-31  Yoshinori K. Okuji  <okuji@enbug.org>
4175         * genmk.rb (Image::rule): Prefix CFLAGS or ASFLAGS with TARGET_.
4176         (PModule::rule): Likewise.
4178 2006-05-31  Yoshinori K. Okuji  <okuji@enbug.org>
4180         * genmk.rb (Image::rule): Set FLAG to CFLAGS or ASFLAGS instead of
4181         TARGET_CFLAGS or TARGET_ASFLAGS. There is no reason why
4182         target-specific flags should be prefixed.
4183         (PModule::rule): Likewise.
4185 2006-05-30  Yoshinori K. Okuji  <okuji@enbug.org>
4187         * configure.ac (CMP): Check if cmp is available explicitly.
4189 2006-05-29  Yoshinori K. Okuji  <okuji@enbug.org>
4191         * util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
4192         (target_cpu): New variable.
4193         (pkglibdir): Use target_cpu instead of host_cpu.
4194         
4195         * util/i386/pc/grub-install.in (host_cpu): Removed.
4196         (target_cpu): New variable.
4197         (pkglibdir): Use target_cpu instead of host_cpu.
4199         * util/genmoddep.c: Removed.
4200         
4201         * kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
4202         instead of GRUB_HOST_SIZEOF_VOID_P.
4203         * kern/dl.c: Likewise.
4205         * include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
4206         ...
4207         (GRUB_TARGET_SIZEOF_VOID_P): ... this.
4208         (GRUB_HOST_SIZEOF_LONG): Renamed to ...
4209         (GRUB_TARGET_SIZEOF_LONG): ... this.
4210         (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
4211         (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
4212         * include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
4213         to ...
4214         (GRUB_TARGET_SIZEOF_VOID_P): ... this.
4215         (GRUB_HOST_SIZEOF_LONG): Renamed to ...
4216         (GRUB_TARGET_SIZEOF_LONG): ... this.
4217         (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
4218         (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
4219         * include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
4220         to ...
4221         (GRUB_TARGET_SIZEOF_VOID_P): ... this.
4222         (GRUB_HOST_SIZEOF_LONG): Renamed to ...
4223         (GRUB_TARGET_SIZEOF_LONG): ... this.
4224         (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
4225         (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
4227         * include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
4228         GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
4229         [!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
4230         instead of GRUB_HOST_SIZEOF_LONG.
4231         [!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
4232         GRUB_HOST_WORDS_BIGENDIAN to define or undefine
4233         GRUB_CPU_WORDS_BIGENDIAN.
4234         Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
4235         define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
4236         grub_host_ssize_t.
4238         * conf/i386-efi.rmk (noinst_UTILITIES): Removed.
4239         (genmoddep_SOURCES): Likewise.
4240         * conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
4241         (genmoddep_SOURCES): Likewise.
4242         * conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
4243         (genmoddep_SOURCES): Likewise.
4244         * conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
4245         Likewise.
4246         (genmoddep_SOURCES): Likewise.
4248         * genmoddep.awk: New file.
4250         * genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
4251         TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
4252         CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
4253         (PModule::rule): Likewise.
4254         (Program::rule): Likewise.
4255         (Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
4256         BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
4257         respectively.
4259         * configure.ac: Rewritten intensively to use host and target
4260         instead of build and host, respectively.
4262         * Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
4263         (host_cpu): Removed.
4264         (target_cpu): New variable.
4265         (CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
4266         (BUILD_CC): Removed.
4267         (BUILD_CFLAGS): Likewise.
4268         (BUILD_CPPFLAGS): Likewise.
4269         (TARGET_CC): New variable.
4270         (TARGET_CFLAGS): Likewise.
4271         (TARGET_CPPFLAGS): Likewise.
4272         (TARGET_LDFLAGS): Likewise.
4273         (AWK): Likewise.
4274         (include): Use target_cpu instead of host_cpu.
4275         (moddep.lst:): Use genmoddep.awk instead of genmoddep.
4276         
4277         * DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
4279 2006-05-29  Vesa Jaaskelainen  <chaac@nic.fi>
4281         * include/grub/script.h (grub_script_cmdif): Renamed field 'bool' to
4282         'exec_to_evaluate'.  Renamed field 'true' to 'exec_on_true'.  Renamed
4283         field 'false' to 'exec_on_false'.
4284         (grub_script_create_cmdif): Renamed argument names to reflect above
4285         changes.
4287         * normal/execute.c (grub_script_execute_cmdif): Likewise.
4289         * normal/script.c (grub_script_create_cmdif): Likewise.
4291 2006-05-28  Yoshinori K. Okuji  <okuji@enbug.org>
4293         * fs/hfsplus.c (grub_hfsplus_btree_recoffset): Moved to near the
4294         top.
4295         (grub_hfsplus_btree_recptr): Likewise.
4296         (grub_hfsplus_find_block): Do not take RETRY any longer. Use
4297         FILEBLOCK both to pass a block number and store next block
4298         number.
4299         (grub_hfsplus_read_block): Rewritten heavily to support an extent
4300         overflow file correctly. Specify errors appropriately, because
4301         fshelp expects that GRUB_ERRNO is set when fails. Reuse
4302         grub_hfsplus_btree_recptr to get the pointer to a found key.
4303         (grub_hfsplus_btree_search): Return 1 instead of 0 when no match
4304         is found.
4306         * conf/i386-efi.rmk (pkgdata_MODULES): Added _linux.mod and
4307         linux.mod.
4308         (_linux_mod_SOURCES): New variable.
4309         (_linux_mod_CFLAGS): Likewise.
4310         (_linux_mod_LDFLAGS): Likewise.
4311         (linux_mod_SOURCES): Likewise.
4312         (linux_mod_CFLAGS): Likewise.
4313         (linux_mod_LDFLAGS): Likewise.
4315         * DISTLIST: Added loader/i386/efi/linux.c,
4316         loader/i386/efi/linux_normal.c and
4317         include/grub/i386/efi/loader.h.
4319         * loader/i386/efi/linux.c: New file.
4320         * loader/i386/efi/linux_normal.c: Likewise.
4321         * include/grub/i386/efi/loader.h: Likewise.
4323 2006-05-27  Yoshinori K. Okuji  <okuji@enbug.org>
4325         * commands/blocklist.c: New file.
4327         * DISTLIST: Added commands/blocklist.c.
4329         * term/efi/console.c (grub_console_highlight_color): Use a lighter
4330         color for the background, and a darker color for the foreground.
4331         (grub_console_checkkey): Return READ_KEY.
4332         (grub_console_cls): Set the background to
4333         GRUB_EFI_BACKGROUND_BLACK temporarily to clean out the screen.
4335         * kern/efi/efi.c (grub_efi_exit_boot_services): New function.
4337         * include/grub/i386/linux.h (struct linux_kernel_params): Fixed
4338         the size of "padding5", "hd0_drive_info" and "hd1_drive_info".
4340         * include/grub/efi/efi.h (grub_efi_exit_boot_services): New
4341         prototype.
4343         * include/grub/efi/api.h (GRUB_EFI_TEXT_ATTR): Do not shift
4344         BG. The spec is wrong again.
4346         * include/grub/normal.h [GRUB_UTIL] (grub_blocklist_init): New
4347         prototype.
4348         [GRUB_UTIL] (grub_blocklist_fini): Likewise.
4350         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
4351         commands/blocklist.c.
4352         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4353         
4354         * conf/common.rmk (pkgdata_MODULES): Added blocklist.mod.
4355         (blocklist_mod_SOURCES): New variable.
4356         (blocklist_mod_CFLAGS): Likewise.
4357         (blocklist_mod_LDFLAGS): Likewise.
4359 2006-05-20  Yoshinori K. Okuji  <okuji@enbug.org>
4361         * boot/i386/pc/boot.S (real_start): Set %si earlier to eliminate
4362         duplication.
4363         (lba_mode): Use %eax more intensively to reduce the code size.
4365 2006-05-20  Marco Gerards  <marco@gnu.org>
4367         * normal/lexer.c (grub_script_yylex): Don't filter out newlines.
4369         * normal/parser.y (commandblock): Defined as <cmd>.  A subroutine
4370         for `menuentry'.
4371         (script): Accept leading newlines.
4372         (newlines): New rule to describe 0 or more newlines.
4373         (commands): Accept `command' with trailing newline.  Fixed the
4374         order in which arguments were passed to `grub_script_add_cmd'.
4375         Accept commands separated by newlines.
4376         (function): Changed to accept newlines.
4377         (menuentry) Rewritten.
4379         * normal/script.c (grub_script_create_cmdmenu): Add new entries in
4380         front of the list, instead of to the end.
4382 2006-05-19  Yoshinori K. Okuji  <okuji@enbug.org>
4384         * util/i386/pc/grub-install.in (bindir): New variable.
4385         (grub_mkimage): Use BINDIR instead of SBINDIR. Reported by Lee
4386         Shaver <lbgwjl@gmail.com>.
4388 2006-05-14  Yoshinori K. Okuji  <okuji@enbug.org>
4390         * kern/i386/pc/startup.S: Include grub/cpu/linux.h instead of
4391         grub/machine/linux.h
4392         * loader/i386/pc/linux.c: Likewise.
4394         * include/grub/i386/pc/linux.h: Moved to ...
4395         * include/grub/i386/linux.h: ... here.
4397         * include/grub/i386/linux.h (struct linux_kernel_params): New
4398         struct.
4399         
4400 2006-05-09  Vesa Jaaskelainen  <chaac@nic.fi>
4402         * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Corrected bounds
4403         checking.
4404         (grub_video_vbe_blit_glyph): Likewise.
4405         (grub_video_vbe_blit_bitmap): Likewise.
4406         (grub_video_vbe_blit_render_target): Likewise.
4408 2006-05-09  Yoshinori K. Okuji  <okuji@enbug.org>
4410         * configure.ac (--with-platform): Properly quote the square
4411         brackets.
4413 2006-05-08  Marco Gerards  <marco@gnu.org>
4415         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Renamed from
4416         this...
4417         (kernel_elf_HEADERS): ...to this.  Updated all users.
4418         (grubof_symlist.c): Renamed from this...
4419         (kernel_elf_symlist.c): ...to this.  Updated all users.
4420         (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
4421         (grubof_SOURCES): Renamed from this...
4422         (kernel_elf_SOURCES): ...to this.
4423         (grubof_HEADERS): Renamed from this...
4424         (kernel_elf_HEADERS): ...to this.
4425         (grubof_CFLAGS): Renamed from this...
4426         (kernel_elf_CFLAGS): ...to this.
4427         (grubof_ASFLAGS): Renamed from this...
4428         (kernel_elf_ASFLAGS): ...to this.
4429         (grubof_LDFLAGS): Renamed from this...
4430         (kernel_elf_LDFLAGS): ...to this.
4432         * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Renamed from
4433         this...
4434         (kernel_elf_HEADERS): ...to this.  Updated all users.
4435         (grubof_symlist.c): Renamed from this...
4436         (kernel_elf_symlist.c): ...to this.  Updated all users.
4437         (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
4438         (grubof_SOURCES): Renamed from this...
4439         (kernel_elf_SOURCES): ...to this.
4440         (grubof_HEADERS): Renamed from this...
4441         (kernel_elf_HEADERS): ...to this.
4442         (grubof_CFLAGS): Renamed from this...
4443         (kernel_elf_CFLAGS): ...to this.
4444         (grubof_ASFLAGS): Renamed from this...
4445         (kernel_elf_ASFLAGS): ...to this.
4446         (grubof_LDFLAGS): Renamed from this...
4447         (kernel_elf_LDFLAGS): ...to this.
4449         * util/powerpc/ieee1275/grub-mkimage.c (add_segments): Use
4450         `kernel.elf' instead of `grubof'.
4452 2006-05-08  Yoshinori K. Okuji  <okuji@enbug.org>
4454         Add --with-platform to configure. Use pkglibdir instead of
4455         pkgdatadir. This is reported by Roger Leigh.
4457         * util/powerpc/ieee1275/grub-install.in (datadir): Removed.
4458         (host_vendor): Likewise.
4459         (host_os): Likewise.
4460         (pkgdatadir): Likewise.
4461         (platform): New variable.
4462         (pkglibdir): Likewise.
4463         Use PKGLIBDIR instead of PKGDATADIR.
4464         
4465         * util/i386/pc/grub-install.in (datadir): Removed.
4466         (host_vendor): Likewise.
4467         (host_os): Likewise.
4468         (pkgdatadir): Likewise.
4469         (platform): New variable.
4470         (pkglibdir): Likewise.
4471         Use PKGLIBDIR instead of PKGDATADIR.
4473         * util/powerpc/ieee1275/grub-mkimage.c (usage): Use GRUB_LIBDIR
4474         instead of GRUB_DATADIR.
4475         (main): Likewise.
4476         * util/i386/pc/grub-mkimage.c (usage): Likewise.
4477         (main): Likewise.
4478         * util/i386/efi/grub-mkimage.c (usage): Likewise.
4479         (main): Likewise.
4481         * configure.ac (--with-platform): New option.
4482         Use PLATFORM instead of HOST_VENDOR to specify a platform.
4484         * Makefile.in: Include a makefile based on PLATFORM instead of
4485         HOST_VENDOR.
4486         (pkgdatadir): Not appended by the machine type.
4487         (pkglibdir): Appended by the machine type.
4488         (host_vendor): Removed.
4489         (platform): New variable.
4490         (BUILD_CPPFLAGS): Specify GRUB_LIBDIR instead of GRUB_DATADIR.
4491         (install-local): Use PKGLIBDIR instead of PKGDATADIR.
4492         (uninstall): Likewise.
4494 2006-05-07  Yoshinori K. Okuji  <okuji@enbug.org>
4496         Use the environment context in the menu. Remove the commands
4497         "default" and "timeout", and use variables instead.
4498         
4499         * normal/menu.c: Include grub/env.h.
4500         (print_entry): Cast TITLE to silence gcc.
4501         (get_timeout): New function.
4502         (set_timeout): Likewise.
4503         (get_entry_number): Likewise.
4504         (run_menu): Use a default entry, a fallback entry and a timeout
4505         in the environment variables "default", "fallback" and
4506         "timeout". Also, tweak the default entry if it is not within the
4507         current menu entries.
4508         (grub_menu_run): Use a fallback entry in the environment variable
4509         "fallback".
4511         * normal/main.c (read_config_file): Do not initialize
4512         NEWMENU->DEFAULT_ENTRY, NEWMENU->FALLBACK_ENTRY or
4513         NEWMENU->TIMEOUT.
4514         (grub_normal_execute): Use a data slot to store the menu.
4516         * include/grub/normal.h (struct grub_menu): Removed default_entry,
4517         fallback_entry and timeout.
4518         (struct grub_menu_list): Removed.
4519         (grub_menu_list_t): Likewise.
4520         (struct grub_context): Likewise.
4521         (grub_context_t): Likewise.
4522         (grub_context_get): Likewise.
4523         (grub_context_get_current_menu): Likewise.
4524         (grub_context_push_menu): Likewise.
4525         (grub_context_pop_menu): Likewise.
4526         (grub_default_init): Likewise.
4527         (grub_default_fini): Likewise.
4528         (grub_timeout_init): Likewise.
4529         (grub_timeout_fini): Likewise.
4531         * conf/sparc64-ieee1275.rmk (pkgdata_MODULES): Removed default.mod
4532         and timeout.mod.
4533         (normal_mod_SOURCES): Removed normal/context.c.
4535         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Removed
4536         commands/default.c, commands/timeout.c and normal/context.c.
4537         (normal_mod_SOURCES): Removed normal/context.c.
4539         * conf/i386-pc.rmk (grub_emu_SOURCES): Removed commands/default.c,
4540         commands/timeout.c and normal/context.c.
4541         (normal_mod_SOURCES): Removed normal/context.c.
4543         * conf/i386-efi.rmk (grub_emu_SOURCES): Removed
4544         commands/default.c, commands/timeout.c and normal/context.c.
4545         (normal_mod_SOURCES): Removed normal/context.c.
4547         * conf/common.rmk (pkgdata_MODULES): Removed default.mod and
4548         timeout.mod.
4549         (default_mod_SOURCES): Removed.
4550         (default_mod_CFLAGS): Likewise.
4551         (default_mod_LDFLAGS): Likewise.
4552         (timeout_mod_SOURCES): Removed.
4553         (timeout_mod_CFLAGS): Likewise.
4554         (timeout_mod_LDFLAGS): Likewise.
4556         * DISTLIST: Removed commands/default.c, commands/timeout.c and
4557         normal/context.c.
4559         * commands/default.c: Removed.
4560         * commands/timeout.c: Likewise.
4561         * normal/context.c: Likewise.
4563 2006-05-07  Vesa Jaaskelainen  <chaac@nic.fi>
4565         * kern/i386/pc/startup.S (grub_exit): Added missing .code32 tag.
4567 2006-05-02  Yoshinori K. Okuji  <okuji@enbug.org>
4569         * kern/env.c (struct grub_env_context): Removed "sorted". Renamed
4570         "next" to "prev" for readability.
4571         (struct grub_env_sorted_var): New struct.
4572         (grub_env_context): Renamed to ...
4573         (initial_context): ... this.
4574         (grub_env_var_context): Renamed to ...
4575         (current_context): ... this.
4576         (grub_env_find): Look only at CURRENT_CONTEXT.
4577         (grub_env_context_open): Rewritten to copy exported variables from
4578         previous context.
4579         (grub_env_context_close): Rewritten according to the new
4580         scheme. Also, add an assertion to prevent the initial context from
4581         removed.
4582         (grub_env_insert): Removed the code for the sorted list.
4583         (grub_env_remove): Likewise.
4584         (grub_env_export): Simply mark the variable with
4585         GRUB_ENV_VAR_GLOBAL.
4586         (grub_env_set): A cosmetic change for naming consistency.
4587         (grub_env_get): Likewise.
4588         (grub_env_unset): Likewise.
4589         (grub_env_iterate): Rewritten to sort variables within this
4590         function.
4591         (grub_register_variable_hook): Fixed for naming consistency. Call
4592         grub_env_find again, only if NAME is not found at the first time.
4593         (mangle_data_slot_name): New function.
4594         (grub_env_set_data_slot): Likewise.
4595         (grub_env_get_data_slot): Likewise.
4596         (grub_env_unset_data_slot): Likewise.
4598         * include/grub/env.h (grub_env_var_type): New enum.
4599         (GRUB_ENV_VAR_LOCAL): New constant.
4600         (GRUB_ENV_VAR_GLOBAL): Likewise.
4601         (GRUB_ENV_VAR_DATA): Likewise.
4602         (struct grub_env_var): Removed "sort_next" and "sort_prevp". Added
4603         "type".
4604         (grub_env_set): Replace VAR with NAME for consistency.
4605         (grub_register_variable_hook): Likewise.
4606         (grub_env_export): Specify the name of the argument.
4607         (grub_env_set_data_slot): New prototype.
4608         (grub_env_get_data_slot): Likewise.
4609         (grub_env_unset_data_slot): Likewise.
4611 2006-04-30  Yoshinori K. Okuji  <okuji@enbug.org>
4613         Extend the loader so that GRUB can accept a loader which comes
4614         back to GRUB when a loaded image exits. Also, this change adds
4615         support for a chainloader on EFI.
4616         
4617         * term/efi/console.c: Include grub/misc.h.
4618         (grub_console_checkkey): Display a scan code on the top for
4619         debugging. This will be removed once the EFI port gets stable.
4620         Correct the scan code mapping.
4622         * kern/efi/mm.c (sort_memory_map): Sort in a descending order to
4623         allocate memory from larger regions, in order to reduce the number
4624         of allocated regions. Otherwise, the MacOSX loader panics.
4625         (filter_memory_map): Avoid less than 1MB for compatibility with
4626         other loaders.
4627         (add_memory_regions): Allocate from the tail of a region, if
4628         possible, to avoid allocating a region near to 1MB, for the MacOSX
4629         loader.
4631         * kern/efi/init.c (grub_efi_set_prefix): Specify
4632         GRUB_EFI_IMAGE_HANDLE to grub_efi_get_loaded_image.
4634         * kern/efi/efi.c (grub_efi_get_loaded_image): Accept a new
4635         argument IMAGE_HANDLE and specify it to get a loaded image.
4636         (grub_arch_modules_addr): Specify GRUB_EFI_IMAGE_HANDLE to
4637         grub_efi_get_loaded_image.
4638         (grub_efi_get_filename): Divide the legnth by the size of
4639         grub_efi_char16_t.
4640         (grub_efi_get_device_path): New function.
4641         (grub_efi_print_device_path): Print End Device Path nodes. Divide
4642         the length by the size of grub_efi_char16_t for a file path device
4643         path node.
4645         * kern/loader.c (grub_loader_noreturn): New variable.
4646         (grub_loader_set): Accept a new argument NORETURN. Set
4647         GRUB_LOADER_NORETURN to NORETURN.
4648         All callers changed.
4649         (grub_loader_boot): If GRUB_LOADER_NORETURN is false, do not call
4650         grub_machine_fini.
4652         * include/grub/efi/efi.h (grub_efi_get_device_path): New
4653         prototype.
4654         (grub_efi_get_loaded_image): Take an argument to specify an image
4655         handle.
4657         * include/grub/loader.h (grub_loader_set): Added one more argument
4658         NORETURN.
4660         * disk/efi/efidisk.c (make_devices): Use grub_efi_get_device_path
4661         instead of grub_efi_open_protocol.
4662         (grub_efidisk_get_device_name): Likewise.
4663         (grub_efidisk_close): Print a newline.
4664         (grub_efidisk_get_device_handle): Fixed to use
4665         GRUB_EFI_DEVICE_PATH_SUBTYPE instead of
4666         GRUB_EFI_DEVICE_PATH_TYPE.
4668         * disk/efi/efidisk.c (device_path_guid): Moved to ...
4669         * kern/efi/efi.c (device_path_guid): ... here.
4671         * conf/i386-efi.rmk (pkgdata_MODULES): Added _chain.mod and
4672         chain.mod.
4673         (kernel_mod_HEADERS): Added efi/disk.h.
4674         (_chain_mod_SOURCES): New variable.
4675         (_chain_mod_CFLAGS): Likewise.
4676         (_chain_mod_LDFLAGS): Likewise.
4677         (chain_mod_SOURCES): Likewise.
4678         (chain_mod_CFLAGS): Likewise.
4679         (chain_mod_LDFLAGS): Likewise.
4681         * DISTLIST: Added include/grub/efi/chainloader.h,
4682         loader/efi/chainloader.c and loader/efi/chainloader_normal.c.
4684         * include/grub/efi/chainloader.h: New file.
4685         * loader/efi/chainloader.c: Likewise.
4686         * loader/efi/chainloader_normal.c: Likewise.
4688 2006-04-30  Marco Gerards  <marco@gnu.org>
4690         * commands/configfile.c (grub_cmd_source): New function.
4691         (GRUB_MOD_INIT): Register the commands `source' and `.'.
4692         (GRUB_MOD_FINI): De-register the commands `source' and `.'.
4694 2006-04-30  Marco Gerards  <marco@gnu.org>
4696         * normal/execute.c (grub_script_execute_cmd): Change the return
4697         type to `grub_err_t'.  Correctly return the error.
4698         (grub_script_execute_cmdline): In case a command line is not a
4699         command or a function, try to interpret it as an assignment.
4701 2006-04-30  Yoshinori K. Okuji  <okuji@enbug.org>
4703         * fs/hfsplus.c (grub_hfsplus_read_block): Fixed a memory leak.
4704         (grub_hfsplus_iterate_dir): Reordered to skip unknown nodes. Also,
4705         skip a node whose name is obviously invalid as UTF-16,
4706         i.e. contains a NUL character. Stop the iteration when the last
4707         directory entry is found. Instead of using the return value of
4708         grub_hfsplus_btree_iterate_node, store the value in RET and use
4709         it, because the iterator can be stopped by the last directory
4710         entry.
4712 2006-04-30  Marco Gerards  <marco@gnu.org>
4714         * include/grub/env.h (grub_env_export): New prototype.  Reported
4715         by Jan C. Kleinsorge <jan.kleinsorge@udo.edu>.
4717 2006-04-30  Marco Gerards  <marco@gnu.org>
4719         * fs/hfsplus.c (grub_hfsplus_iterate_dir): Correctly calculate the
4720         size of the extents in a catalog file record.
4722 2006-04-29  Marco Gerards  <marco@gnu.org>
4724         * commands/configfile.c (grub_cmd_configfile): Execute the
4725         configfile within its own context.
4727         * include/grub/env.h (grub_env_context_open): New prototype.
4728         (grub_env_context_close): Likewise.
4730         * kern/env.c (grub_env): Removed.
4731         (grub_env_sorted): Likewise.
4732         (grub_env_context): New variable.
4733         (grub_env_var_context): Likewise.
4734         (grub_env_find): Search both the active context and the global
4735         context.
4736         (grub_env_context_open): New function.
4737         (grub_env_context_close): Likewise.
4738         (grub_env_insert): Likewise.
4739         (grub_env_remove): Likewise.
4740         (grub_env_export): Likewise.
4741         (grub_env_set): Changed to use helper functions to avoid code
4742         duplication.
4743         (grub_env_iterate): Rewritten so both the current context and the
4744         global context are being used.
4746         * normal/command.c (export_command): New function.
4747         (grub_command_init): Register the `export' function.
4749 2006-04-26  Yoshinori K. Okuji  <okuji@enbug.org>
4751         * util/i386/pc/grub-mkimage.c (compress_kernel): Cast arguments
4752         explicitly to suppress gcc's warnings.
4753         * fs/fat.c (grub_fat_find_dir): Likewise.
4754         (grub_fat_label): Likewise.
4755         * fs/xfs.c (grub_xfs_read_inode): Likewise.
4756         (grub_xfs_mount): Likewise.
4757         (grub_xfs_label): Likewise.
4758         * fs/affs.c (grub_affs_mount): Likewise.
4759         (grub_affs_label): Likewise.
4760         (grub_affs_iterate_dir): Likewise.
4761         * fs/sfs.c (grub_sfs_mount): Likewise.
4762         (grub_sfs_iterate_dir): Likewise.
4763         * fs/ufs.c (grub_ufs_lookup_symlink): Likewise.
4764         * fs/hfs.c (grub_hfs_mount): Likewise.
4765         (grub_hfs_cmp_catkeys): Likewise.
4766         (grub_hfs_find_dir): Likewise.
4767         (grub_hfs_dir): Likewise.
4768         (grub_hfs_label): Likewise.
4769         * fs/jfs.c (grub_jfs_mount): Likewise.
4770         (grub_jfs_opendir): Likewise.
4771         (grub_jfs_getent): Likewise.
4772         (grub_jfs_lookup_symlink): Likewise.
4773         (grub_jfs_label): Likewise.
4774         * fs/hfsplus.c (grub_hfsplus_cmp_catkey): Likewise.
4775         (grub_hfsplus_iterate_dir): Likewise.
4776         (grub_hfsplus_btree_iterate_node): Made static.
4778         * util/grub-emu.c (prefix): New variable.
4779         (grub_machine_set_prefix): New function.
4780         (main): Do not set the environment variable "prefix" here. Only
4781         set PREFIX, which is used later by grub_machine_set_prefix.
4783         * include/grub/video.h: Do not include grub/symbol.h.
4784         (grub_video_register): Not exported. This symbol is not defined in
4785         the kernel.
4786         (grub_video_unregister): Likewise.
4787         (grub_video_iterate): Likewise.
4788         (grub_video_setup): Likewise.
4789         (grub_video_restore): Likewise.
4790         (grub_video_get_info): Likewise.
4791         (grub_video_get_blit_format): Likewise.
4792         (grub_video_set_palette): Likewise.
4793         (grub_video_get_palette): Likewise.
4794         (grub_video_set_viewport): Likewise.
4795         (grub_video_get_viewport): Likewise.
4796         (grub_video_map_color): Likewise.
4797         (grub_video_map_rgb): Likewise.
4798         (grub_video_map_rgba): Likewise.
4799         (grub_video_fill_rect): Likewise.
4800         (grub_video_blit_glyph): Likewise.
4801         (grub_video_blit_bitmap): Likewise.
4802         (grub_video_blit_render_target): Likewise.
4803         (grub_video_scroll): Likewise.
4804         (grub_video_swap_buffers): Likewise.
4805         (grub_video_create_render_target): Likewise.
4806         (grub_video_delete_render_target): Likewise.
4807         (grub_video_set_active_render_target): Likewise.
4809         * include/grub/symbol.h [GRUB_SYMBOL_GENERATOR] (EXPORT_FUNC):
4810         Undefined.
4811         [GRUB_SYMBOL_GENERATOR] (EXPORT_VAR): Likewise.
4813         * conf/sparc64-ieee1275.rmk (grubof_symlist.c): Depended on
4814         config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
4815         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
4816         instead of $(srcdir)/genkernsyms.sh.
4818         * conf/powerpc-ieee1275.rmk (grubof_symlist.c): Depended on
4819         config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
4820         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
4821         instead of $(srcdir)/genkernsyms.sh.
4823         * conf/i386-pc.rmk (symlist.c): Depended on config.h. Use
4824         gensymlist.sh instead of $(srcdir)/gensymlist.sh.
4825         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
4826         instead of $(srcdir)/genkernsyms.sh.
4828         * conf/i386-efi.rmk (symlist.c): Depended on config.h. Use
4829         gensymlist.sh instead of $(srcdir)/gensymlist.sh.
4830         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
4831         instead of $(srcdir)/genkernsyms.sh.
4833         * configure.ac (AC_CONFIG_FILES): Added gensymlist.sh and
4834         genkernsyms.sh.
4836         * Makefile.in (DISTCLEANFILES): Added gensymlist.sh and
4837         genkernsyms.sh.
4838         (gensymlist.sh): New target.
4839         (genkernsyms.sh): Likewise.
4841         * DISTLIST: Removed genkernsyms.sh and gensymlist.sh. Added
4842         genkernsyms.sh.in and gensymlist.sh.in.
4844         * genkernsyms.sh: Removed.
4845         * gensymlist.sh: Likewise.
4846         
4847         * genkernsyms.sh.in: New file.
4848         * gensymlist.sh.in: Likewise.
4850 2006-04-25  Hollis Blanchard  <hollis@penguinppc.org>
4852         * kern/powerpc/ieee1275/init.c (grub_machine_set_prefix): Do not
4853         clobber "prefix", since we may have already set it manually.
4855 2006-04-25  Hollis Blanchard  <hollis@penguinppc.org>
4857         * kern/misc.c (abort): New alias for grub_abort.
4859 2006-04-25  Yoshinori K. Okuji  <okuji@enbug.org>
4861         A new machine-specific function "grub_machine_set_prefix" is
4862         defined. This is called after loading modules, so that a prefix
4863         initialization can use modules. Also, this change adds an
4864         intensive debugging feature for the memory manager via the
4865         configure option "--enable-mm-debug".
4866         
4867         * partmap/gpt.c (gpt_partition_map_iterate): Add one more into
4868         PART.LEN.
4870         * kern/sparc64/ieee1275/init.c (abort): Removed.
4871         (grub_stop): Likewise.
4872         (grub_exit): New function.
4873         (grub_set_prefix): Renamed to ...
4874         (grub_machine_set_prefix): ... this.
4875         (grub_machine_init): Do not call grub_set_prefix.
4877         * kern/powerpc/ieee1275/init.c (grub_set_prefix): Renamed to ...
4878         (grub_machine_set_prefix): ... this.
4879         (grub_machine_init): Do not call grub_set_prefix.
4881         * kern/i386/pc/init.c (grub_machine_set_prefix): New function.
4882         (grub_machine_init): Do not set the prefix here.
4884         * kern/i386/efi/init.c (grub_machine_set_prefix): New function.
4886         * kern/efi/init.c: Include grub/mm.h.
4887         (grub_efi_set_prefix): New function.
4889         * kern/efi/efi.c (grub_exit): Call grub_efi_fini.
4890         (grub_efi_get_filename): New function.
4891         (grub_print_device_path): Renamed to ...
4892         (grub_efi_print_device_path): ... this.
4894         * kern/mm.c [MM_DEBUG] (grub_malloc): Undefined.
4895         [MM_DEBUG] (grub_realloc): Likewise.
4896         [MM_DEBUG] (grub_free): Likewise.
4897         [MM_DEBUG] (grub_memalign): Likewise.
4898         [MM_DEBUG] (grub_mm_debug): New variable.
4899         [MM_DEBUG] (grub_debug_malloc): New function.
4900         [MM_DEBUG] (grub_debug_free): New function.
4901         [MM_DEBUG] (grub_debug_realloc): New function.
4902         [MM_DEBUG] (grub_debug_memalign): New function.
4904         * kern/misc.c (grub_abort): Print a newline to distinguish
4905         the message.
4907         * kern/main.c (grub_main): Call grub_machine_set_prefix and
4908         grub_set_root_dev after loading modules. This is necessary when
4909         setting a prefix depends on modules.
4911         * include/grub/efi/efi.h (grub_print_device_path): Renamed to ...
4912         (grub_efi_print_device_path): ... this.
4913         (grub_efi_get_filename): New prototype.
4914         (grub_efi_set_prefix): Likewise.
4916         * include/grub/efi/disk.h: Include grub/efi/api.h, grub/symbol.h
4917         and grub/disk.h.
4918         (grub_efidisk_get_device_handle): New prototype.
4919         (grub_efidisk_get_device_name): Likewise.
4921         * include/grub/mm.h: Include config.h.
4922         (MM_DEBUG): Removed.
4923         [MM_DEBUG && !GRUB_UTIL] (grub_mm_debug): New prototype.
4924         [MM_DEBUG && !GRUB_UTIL] (grub_malloc): New macro.
4925         [MM_DEBUG && !GRUB_UTIL] (grub_realloc): Likewise.
4926         [MM_DEBUG && !GRUB_UTIL] (grub_memalign): Likewise.
4927         [MM_DEBUG && !GRUB_UTIL] (grub_free): Likewise.
4928         [MM_DEBUG && !GRUB_UTIL] (grub_debug_malloc): New prototype.
4929         [MM_DEBUG && !GRUB_UTIL] (grub_debug_realloc): New prototype.
4930         [MM_DEBUG && !GRUB_UTIL] (grub_debug_memalign): New prototype.
4931         [MM_DEBUG && !GRUB_UTIL] (grub_debug_free): New prototype.
4933         * include/grub/kernel.h (grub_machine_set_prefix): New prototype.
4935         * disk/efi/efidisk.c: Include grub/partition.h.
4936         (iterate_child_devices): New function.
4937         (add_device): First, compare only last device path nodes, so that
4938         devices are sorted by the types.
4939         (grub_efidisk_get_device_handle): New function.
4940         (grub_efidisk_get_device_name): Likewise.
4942         * configure.ac (--enable-mm-debug): New option to enable the
4943         memory manager debugging feature. This makes the binary much
4944         bigger, so is disabled by default.
4946 2006-04-23  Yoshinori K. Okuji  <okuji@enbug.org>
4948         Use grub_abort instead of grub_stop, and grub_exit must be
4949         define in each architecture now. Also, this change adds support
4950         for EFI disks.
4951         
4952         * util/i386/pc/grub-probefs.c: Include grub/term.h.
4953         (grub_getkey): New function.
4954         (grub_term_get_current): Likewise.
4956         * util/i386/pc/grub-setup.c: Include grub/term.h.
4957         (grub_getkey): New function.
4958         (grub_term_get_current): Likewise.
4960         * util/misc.c (grub_stop): Renamed to ...
4961         (grub_exit): ... this.
4963         * kern/powerpc/ieee1275/init.c (abort): Renamed to ...
4964         (grub_exit): ... this.
4965         (grub_machine_init): Use grub_abort instead of abort.
4966         (grub_stop): Removed.
4968         * kern/powerpc/ieee1275/cmain.c (cmain): Use grub_abort instead of
4969         abort.
4971         * kern/i386/pc/startup.S (grub_exit): New function.
4972         (cold_reboot): New label.
4974         * kern/efi/init.c: Include grub/efi/disk.h and grub/env.h.
4975         (grub_efi_init): Call grub_efidisk_init.
4976         (grub_efi_fini): Call grub_efidisk_fini.
4978         * kern/efi/efi.c: Include grub/mm.h.
4979         (grub_efi_console_control_guid): Renamed to ...
4980         (console_control_guid): ... this.
4981         (grub_efi_loaded_image_guid): Renamed to ...
4982         (loaded_image_guid): ... this.
4983         (grub_efi_locate_handle): New function.
4984         (grub_efi_open_protocol): Likewise.
4985         (grub_efi_set_text_mode): Use CONSOLE_CONTROL_GUID instead of
4986         GRUB_EFI_CONSOLE_CONTROL_GUID.
4987         (grub_efi_exit): Removed.
4988         (grub_stop): Likewise.
4989         (grub_efi_get_loaded_image): Use grub_efi_open_protocol.
4990         (grub_exit): New function.
4991         (grub_print_device_path): Likewise.
4993         * kern/rescue.c (grub_rescue_cmd_exit): New function.
4994         (grub_enter_rescue_mode): Register "exit".
4996         * kern/misc.c (grub_real_dprintf): A cosmetic change.
4997         (grub_abort): New function.
4999         * kern/err.c (grub_fatal): Use grub_abort instead of grub_stop.
5001         * include/grub/sparc64/ieee1275/kernel.h (abort): Removed.
5003         * include/grub/powerpc/ieee1275/kernel.h (abort): Removed.
5005         * include/grub/efi/efi.h (grub_efi_exit): Removed.
5006         (grub_print_device_path): New prototype.
5007         (grub_efi_locate_handle): Likewise.
5008         (grub_efi_open_protocol): Likewise.
5010         * include/grub/efi/disk.h (grub_efidisk_fini): New file.
5011         * disk/efi/efidisk.c: Likewise.
5013         * DISTLIST: Added disk/efi/efidisk.c and include/grub/efi/disk.h.
5015         * include/grub/efi/console_control.h
5016         (GRUB_EFI_CONSOLE_CONTROL_GUID): Use an array for the last 8 bytes.
5018         * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): Specify the
5019         last 8 bytes as an array.
5020         (GRUB_EFI_DISK_IO_GUID): New macro.
5021         (GRUB_EFI_BLOCK_IO_GUID): Likewise.
5022         (GRUB_EFI_DEVICE_PATH_GUID): Likewise.
5023         (grub_efi_ipv6_address_t): Change the type to grub_uint16_t from
5024         grub_uint8_t.
5025         (struct grub_efi_guid): Use an array to specify the last 8 bytes.
5026         (struct grub_efi_device_path): Rename the member "sub_type" to
5027         "subtype".
5028         (GRUB_EFI_DEVICE_PATH_TYPE): New macro.
5029         (GRUB_EFI_DEVICE_PATH_SUBTYPE): Likewise.
5030         (GRUB_EFI_DEVICE_PATH_LENGTH): Likewise.
5031         (GRUB_EFI_END_DEVICE_PATH_TYPE): Likewise.
5032         (GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE): Likewise.
5033         (GRUB_EFI_END_THIS_DEVICE_PATH_SUBTYPE): Likewise.
5034         (GRUB_EFI_END_ENTIRE_DEVICE_PATH): Likewise.
5035         (GRUB_EFI_NEXT_DEVICE_PATH): Likewise.
5036         (GRUB_EFI_HARDWARE_DEVICE_PATH_TYPE): Likewise.
5037         (GRUB_EFI_PCI_DEVICE_PATH_SUBTYPE): Likewise.
5038         (struct grub_efi_pci_device_path): New structure.
5039         (grub_efi_pci_device_path_t): New type.
5040         (GRUB_EFI_PCCARD_DEVICE_PATH_SUBTYPE): New macro.
5041         (struct grub_efi_pccard_device_path): New structure.
5042         (grub_efi_pccard_device_path_t): New type.
5043         (GRUB_EFI_MEMORY_MAPPED_DEVICE_PATH_SUBTYPE): New macro.
5044         (struct grub_efi_memory_mapped_device_path): New structure.
5045         (grub_efi_memory_mapped_device_path_t): New type.
5046         (GRUB_EFI_VENDOR_DEVICE_PATH_SUBTYPE): New macro.
5047         (struct grub_efi_vendor_device_path): New structure.
5048         (grub_efi_vendor_device_path_t): New type.
5049         (GRUB_EFI_CONTROLLER_DEVICE_PATH_SUBTYPE): New macro.
5050         (struct grub_efi_controller_device_path): New structure.
5051         (grub_efi_controller_device_path_t): New type.
5052         (GRUB_EFI_ACPI_DEVICE_PATH_TYPE): New macro.
5053         (GRUB_EFI_ACPI_DEVICE_PATH_SUBTYPE): Likewise.
5054         (struct grub_efi_acpi_device_path): New structure.
5055         (grub_efi_acpi_device_path_t): New type.
5056         (GRUB_EFI_EXPANDED_ACPI_DEVICE_PATH_SUBTYPE): New macro.
5057         (struct grub_efi_expanded_acpi_device_path): New structure.
5058         (grub_efi_expanded_acpi_device_path_t): New type.
5059         (GRUB_EFI_EXPANDED_ACPI_HIDSTR): New macro.
5060         (GRUB_EFI_EXPANDED_ACPI_UIDSTR): Likewise.
5061         (GRUB_EFI_EXPANDED_ACPI_CIDSTR): Likewise.
5062         (GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE): Likewise.
5063         (GRUB_EFI_ATAPI_DEVICE_PATH_SUBTYPE): Likewise.
5064         (struct grub_efi_atapi_device_path): New structure.
5065         (grub_efi_atapi_device_path_t): New type.
5066         (GRUB_EFI_FIBRE_CHANNEL_DEVICE_PATH_SUBTYPE): New macro.
5067         (struct grub_efi_fibre_channel_device_path): New structure.
5068         (grub_efi_fibre_channel_device_path_t): New type.
5069         (GRUB_EFI_1394_DEVICE_PATH_SUBTYPE): New macro.
5070         (struct grub_efi_1394_device_path): New structure.
5071         (grub_efi_1394_device_path_t): New type.
5072         (GRUB_EFI_USB_DEVICE_PATH_SUBTYPE): New macro.
5073         (struct grub_efi_usb_device_path): New structure.
5074         (grub_efi_usb_device_path_t): New type.
5075         (GRUB_EFI_USB_CLASS_DEVICE_PATH_SUBTYPE): New macro.
5076         (struct grub_efi_usb_class_device_path): New structure.
5077         (grub_efi_usb_class_device_path_t): New type.
5078         (GRUB_EFI_I2O_DEVICE_PATH_SUBTYPE): New macro.
5079         (struct grub_efi_i2o_device_path): New structure.
5080         (grub_efi_i2o_device_path_t): New type.
5081         (GRUB_EFI_MAC_ADDRESS_DEVICE_PATH_SUBTYPE): New macro.
5082         (struct grub_efi_mac_address_device_path): New structure.
5083         (grub_efi_mac_address_device_path_t): New type.
5084         (GRUB_EFI_IPV4_DEVICE_PATH_SUBTYPE): New macro.
5085         (struct grub_efi_ipv4_device_path): New structure.
5086         (grub_efi_ipv4_device_path_t): New type.
5087         (GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE): New macro.
5088         (struct grub_efi_ipv6_device_path): New structure.
5089         (grub_efi_ipv6_device_path_t): New type.
5090         (GRUB_EFI_INFINIBAND_DEVICE_PATH_SUBTYPE): New macro.
5091         (struct grub_efi_infiniband_device_path): New structure.
5092         (grub_efi_infiniband_device_path_t): New type.
5093         (GRUB_EFI_UART_DEVICE_PATH_SUBTYPE): New macro.
5094         (struct grub_efi_uart_device_path): New structure.
5095         (grub_efi_uart_device_path_t): New type.
5096         (GRUB_EFI_VENDOR_MESSAGING_DEVICE_PATH_SUBTYPE): New macro.
5097         (struct grub_efi_vendor_messaging_device_path): New structure.
5098         (grub_efi_vendor_messaging_device_path_t): New type.
5099         (GRUB_EFI_MEDIA_DEVICE_PATH_TYPE): New macro.
5100         (GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE): Likewise.
5101         (struct grub_efi_hard_drive_device_path): New structure.
5102         (grub_efi_hard_drive_device_path_t): New type.
5103         (GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE): New macro.
5104         (struct grub_efi_cdrom_device_path): New structure.
5105         (grub_efi_cdrom_device_path_t): New type.
5106         (GRUB_EFI_VENDOR_MEDIA_DEVICE_PATH_SUBTYPE): New macro.
5107         (struct grub_efi_vendor_media_device_path): New structure.
5108         (grub_efi_vendor_media_device_path_t): New type.
5109         (GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE): New macro.
5110         (struct grub_efi_file_path_device_path): New structure.
5111         (grub_efi_file_path_device_path_t): New type.
5112         (GRUB_EFI_PROTOCOL_DEVICE_PATH_SUBTYPE): New macro.
5113         (struct grub_efi_protocol_device_path): New structure.
5114         (grub_efi_protocol_device_path_t): New type.
5115         (GRUB_EFI_BIOS_DEVICE_PATH_TYPE): New macro.
5116         (GRUB_EFI_BIOS_DEVICE_PATH_SUBTYPE): Likewise.
5117         (struct grub_efi_bios_device_path): New structure.
5118         (grub_efi_bios_device_path_t): New type.
5119         (struct grub_efi_disk_io): New structure.
5120         (grub_efi_disk_io_t): New type.
5121         (struct grub_efi_block_io_media): New structure.
5122         (grub_efi_block_io_media_t): New type.
5123         (struct grub_efi_block_io): New structure.
5124         (grub_efi_block_io_t): New type.
5126         * include/grub/misc.h (grub_stop): Removed.
5127         (grub_exit): New prototype.
5128         (grub_abort): Likewise.
5130         * include/grub/disk.h (enum grub_disk_dev_id): Added
5131         GRUB_DISK_DEVICE_EFIDISK_ID.
5133         * conf/i386-efi.rmk (kernel_mod_SOURCES): Added
5134         disk/efi/efidisk.c.
5135         (kernel_syms.lst): Remove the target if an error occurs.
5137 2006-04-22  Yoshinori K. Okuji  <okuji@enbug.org>
5139         * kern/misc.c (grub_lltoa): Rewritten the decimal conversion part,
5140         as it was simply too buggy.
5142 2006-04-21  Yoshinori K. Okuji  <okuji@enbug.org>
5144         * kern/misc.c (grub_lltoa): New function.
5145         (grub_vsprintf): Added support for the long long suffix,
5146         i.e. "ll".
5148 2006-04-20  Hollis Blanchard  <hollis@penguinppc.org>
5150         * Makefile.in (LDFLAGS): Add variable.
5151         (LD): Remove variable.
5152         * configure.ac: Add -m32 to LDFLAGS.
5153         * genmk.rb (PModule#rule): Use $(CC) instead of $(LD).
5154         * conf/powerpc-ieee1275.rmk (COMMON_LDFLAGS): Add variable.
5155         (grubof_LDFLAGS): Use $(COMMON_LDFLAGS).
5156         (_linux_mod_LDFLAGS, linux_mod_LDFLAGS, normal_mod_LDFLAGS,
5157         suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS): New
5158         variables.
5159         * conf/sparc64-ieee1275.rmk (COMMON_LDFLAGS): Add -nostdlib.
5160         * conf/i386-pc.rmk (COMMON_LDFLAGS): Add -nostdlib.
5161         * conf/i386-efi.rmk (COMMON_LDFLAGS): Add -nostdlib.
5163 2006-04-20  Vesa Jaaskelainen  <chaac@nic.fi>
5165         * term/gfxterm.c (grub_gfxterm_getcharwidth): Fixed character
5166         length for unknown glyph.
5168 2006-04-20  Yoshinori K. Okuji  <okuji@enbug.org>
5170         Add support for pre-loaded modules into the EFI port.
5171         
5172         * util/i386/efi/grub-mkimage.c (make_mods_section): Rewritten
5173         completely. Accept one more argument DIR. The caller has changed.
5175         * kern/i386/efi/init.c (grub_arch_modules_addr): Removed.
5177         * kern/efi/efi.c: Include grub/efi/pe32.h and grub/kernel.h.
5178         (grub_efi_loaded_image_guid): New variable.
5179         (grub_efi_get_loaded_image): New function.
5180         (grub_arch_modules_addr): Likewise.
5182         * include/grub/efi/efi.h (grub_efi_get_loaded_image): New
5183         prototype.
5185         * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): New macro.
5186         (struct grub_efi_loaded_image): New structure.
5187         (grub_efi_loaded_image_t): New type.
5189 2006-04-20  Yoshinori K. Okuji  <okuji@enbug.org>
5190         
5191         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Compare the file
5192         size with GRUB_OS_AREA_SIZE as grub_size_t instead of
5193         grub_ssize_t. Reported by Jeff Chua <jeff84@silk.corp.fedex.com>.
5195 2006-04-19  Roger Leigh  <rleigh@whinlatter.ukfsn.org>
5197         * DISTLIST: Added `util/powerpc/ieee1275/grub-install.in'.
5199 2006-04-19  Yoshinori K. Okuji  <okuji@enbug.org>
5201         * DISTLIST: Added include/grub/efi/console.h,
5202         include/grub/efi/time.h, include/grub/i386/efi/kernel.h,
5203         kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
5205         * include/grub/efi/console.h: New file.
5206         * include/grub/efi/time.h: Likewise.
5207         * include/grub/i386/efi/kernel.h: Likewise.
5208         * kern/efi/init.c: Likewise.
5209         * kern/efi/mm.c: Likewise.
5210         * term/efi/console.c: Likewise.
5211         
5212         * kern/i386/efi/init.c: Do not include grub/machine/time.h.
5213         (grub_stop): Removed.
5214         (grub_get_rtc): Likewise.
5215         (grub_machine_init): Simply call grub_efi_init.
5216         (grub_machine_fini): Call grub_efi_fini.
5218         * kern/efi/efi.c: Include grub/machine/time.h and grub/term.h.
5219         (grub_efi_output_string): Removed.
5220         (grub_efi_stall): New function.
5221         (grub_stop): Likewise.
5222         (grub_get_rtc): Likewise.
5224         * include/grub/efi/efi.h (grub_efi_output_string): Removed.
5225         (grub_efi_stall): New prototype.
5226         (grub_efi_allocate_pages): Likewise.
5227         (grub_efi_free_pages): Likewise.
5228         (grub_efi_get_memory_map): Likewise.
5229         (grub_efi_mm_init): Likewise.
5230         (grub_efi_mm_fini): Likewise.
5231         (grub_efi_init): Likewise.
5232         (grub_efi_fini): Likewise.
5234         * include/grub/i386/efi/time.h: Do not include
5235         grub/symbol.h. Include grub/efi/time.h.
5236         (GRUB_TICKS_PER_SECOND): Removed.
5237         (grub_get_rtc): Likewise.
5239         * include/grub/efi/api.h (struct grub_efi_memory_descriptor):
5240         Added padding. The EFI spec is buggy.
5241         (GRUB_EFI_BLACK): New macro.
5242         (GRUB_EFI_BLUE): Likewise.
5243         (GRUB_EFI_GREEN): Likewise.
5244         (GRUB_EFI_CYAN): Likewise.
5245         (GRUB_EFI_RED): Likewise.
5246         (GRUB_EFI_MAGENTA): Likewise.
5247         (GRUB_EFI_BROWN): Likewise.
5248         (GRUB_EFI_LIGHTGRAY): Likewise.
5249         (GRUB_EFI_BRIGHT): Likewise.
5250         (GRUB_EFI_DARKGRAY): Likewise.
5251         (GRUB_EFI_LIGHTBLUE): Likewise.
5252         (GRUB_EFI_LIGHTGREEN): Likewise.
5253         (GRUB_EFI_LIGHTCYAN): Likewise.
5254         (GRUB_EFI_LIGHTRED): Likewise.
5255         (GRUB_EFI_LIGHTMAGENTA): Likewise.
5256         (GRUB_EFI_YELLOW): Likewise.
5257         (GRUB_EFI_WHITE): Likewise.
5258         (GRUB_EFI_BACKGROUND_BLACK): Likewise.
5259         (GRUB_EFI_BACKGROUND_BLUE): Likewise.
5260         (GRUB_EFI_BACKGROUND_GREEN): Likewise.
5261         (GRUB_EFI_BACKGROUND_CYAN): Likewise.
5262         (GRUB_EFI_BACKGROUND_RED): Likewise.
5263         (GRUB_EFI_BACKGROUND_MAGENTA): Likewise.
5264         (GRUB_EFI_BACKGROUND_BROWN): Likewise.
5265         (GRUB_EFI_BACKGROUND_LIGHTGRAY): Likewise.
5266         (GRUB_EFI_TEXT_ATTR): Likewise.
5268         * conf/i386-efi.rmk (kernel_mod_SOURCES): Added kern/efi/efi.c,
5269         kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
5270         (kernel_mod_HEADERS): Added efi/time.h.
5272 2006-04-18  Yoshinori K. Okuji  <okuji@enbug.org>
5274         * DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
5275         include/grub/efi/api.h, include/grub/efi/console_control.h,
5276         include/grub/efi/efi.h, include/grub/efi/pe32.h,
5277         include/grub/i386/efi/time.h, kern/efi/efi.c,
5278         kern/i386/efi/init.c, kern/i386/efi/startup.S,
5279         and util/i386/efi/grub-mkimage.c.
5281         * Makefile.in (RMKFILES): Added i386-efi.rmk.
5283         * genmk.rb (PModule#rule): Do not export symbols if
5284         #{prefix}_EXPORTS is set to "no".
5286         * conf/i386-efi.mk: New file.
5287         * conf/i386-efi.rmk: Likewise.
5288         * include/grub/efi/api.h: Likewise.
5289         * include/grub/efi/console_control.h: Likewise.
5290         * include/grub/efi/efi.h: Likewise.
5291         * include/grub/efi/pe32.h: Likewise.
5292         * include/grub/i386/efi/time.h: Likewise.
5293         * kern/efi/efi.c: Likewise.
5294         * kern/i386/efi/init.c: Likewise.
5295         * kern/i386/efi/startup.S: Likewise.
5296         * util/i386/efi/grub-mkimage.c: Likewise.
5298 2006-04-17  Marco Gerards  <marco@gnu.org>
5300         * include/grub/script.h: Include <grub/parser.h> and
5301         "grub_script.tab.h".
5302         (struct grub_lexer_param): New struct.
5303         (struct grub_parser_param): Likewise.
5304         (grub_script_create_arglist): Pass the state in an argument.
5305         (grub_script_add_arglist): Likewise.
5306         (grub_script_create_cmdline): Likewise.
5307         (grub_script_create_cmdblock): Likewise.
5308         (grub_script_create_cmdif): Likewise.
5309         (grub_script_create_cmdmenu): Likewise.
5310         (grub_script_add_cmd): Likewise.
5311         (grub_script_arg_add): Likewise.
5312         (grub_script_lexer_ref): Likewise.
5313         (grub_script_lexer_deref): Likewise.
5314         (grub_script_lexer_record_start): Likewise.
5315         (grub_script_lexer_record_stop): Likewise.
5316         (grub_script_mem_record): Likewise.
5317         (grub_script_mem_record_stop): Likewise.
5318         (grub_script_malloc): Likewise.
5319         (grub_script_yylex): Likewise.
5320         (grub_script_yyparse): Likewise.
5321         (grub_script_yyerror): Likewise.
5322         (grub_script_yylex): Likewise.
5323         (grub_script_lexer_init): Return the state.
5325         * normal/lexer.c (grub_script_lexer_state): Removed variable.
5326         (grub_script_lexer_done): Likewise.
5327         (grub_script_lexer_getline): Likewise.
5328         (grub_script_lexer_refs): Likewise.
5329         (script): Likewise.
5330         (newscript): Likewise.
5331         (record): Likewise.
5332         (recording): Likewise.
5333         (recordpos): Likewise.
5334         (recordlen): Likewise.
5335         (grub_script_lexer_init): Return the state instead of setting
5336         global variables.
5337         (grub_script_lexer_ref): Use the newly added argument for state
5338         instead of globals.
5339         (grub_script_lexer_deref): Likewise.
5340         (grub_script_lexer_record_start): Likewise.
5341         (grub_script_lexer_record_stop): Likewise.
5342         (recordchar): Likewise.
5343         (nextchar): Likewise.
5344         (grub_script_yylex2): Likewise.
5345         (grub_script_yylex): Likewise.
5346         (grub_script_yyerror): Likewise.
5348         * normal/parser.y (func_mem): Removed variable.
5349         (menu_entry): Likewise.
5350         (err): Likewise.
5351         (%lex-param): New parser option.
5352         (%parse-param): Likewise.
5353         (script): Always return the AST.
5354         (argument): Pass the state around.
5355         (arguments): Likewise.
5356         (grubcmd): Likewise.
5357         (commands): Likewise.
5358         (function): Likewise.
5359         (menuentry): Likewise.
5360         (if_statement): Likewise.
5361         (if): Likewise.
5363         * normal/script.c (grub_script_memused): Removed variable.
5364         (grub_script_parsed): Likewise.
5365         (grub_script_malloc): Added a state argument.  Use that instead of
5366         global variables.
5367         (grub_script_mem_record): Likewise.
5368         (grub_script_mem_record_stop): Likewise.
5369         (grub_script_arg_add): Likewise.
5370         (grub_script_add_arglist): Likewise.
5371         (grub_script_create_cmdline): Likewise.
5372         (grub_script_create_cmdif): Likewise.
5373         (grub_script_create_cmdmenu): Likewise.
5374         (grub_script_add_cmd): Likewise.
5375         (grub_script_parse): Setup the state before calling the parser.
5376         
5377 2006-04-16  Marco Gerards  <marco@gnu.org>
5379         * normal/command.c (grub_command_init): Remove the title command.
5381         * normal/lexer.c (grub_script_yylex): Renamed from this...
5382         (grub_script_yylex2): ... to this.
5383         (grub_script_yylex): New function.  Temporary
5384         introduced to filter some tokens.
5385         (grub_script_yyerror): Print a newline.
5387         * normal/main.c (read_config_file): Output information about the
5388         lines that contain errors.  Wait for a key after all lines have
5389         been processed.  Don't return an empty menu.
5391         * normal/parser.y (func_mem): Don't initialize.
5392         (menu_entry): Likewise.
5393         (err): New variable.
5394         (script): Don't return anything when an error was encountered.
5395         (ws, returns): Removed rules.
5396         (argument): Disabled concatenated variable support.
5397         (arguments): Remove explicit separators.
5398         (grubcmd): Likewise.
5399         (function): Likewise.
5400         (menuentry): Likewise.
5401         (if): Likewise.
5402         (commands): Likewise.  Add error handling.
5404         * normal/script.c (grub_script_create_cmdline): If
5405         `grub_script_parsed' is 0, assume the parser encountered an error.
5407 2006-04-02  Yoshinori K. Okuji  <okuji@enbug.org>
5409         * configure.ac: Add support for EFI. Fix the typo
5410         BUILD_LDDFLAGS. Restore the LDFLAGS after testing.
5412 2006-04-01  Vesa Jaaskelainen  <chaac@nic.fi>
5414         * util/unifont2pff.rb: Removed unnecessary byte ordering.  Now
5415         foreign multibyte characters should be shown correctly.
5417 2006-04-01  Vesa Jaaskelainen  <chaac@nic.fi>
5419         * normal/main.c (grub_normal_menu_addentry): Fixed menu size
5420         calculation.
5421         (read_config_file): Made it to close file before returning.
5423 2006-03-31  Vesa Jaaskelainen  <chaac@nic.fi>
5425         * DISTLIST: Added include/grub/i386/pc/vbeblit.h,
5426         include/grub/i386/pc/vbefill.h, video/i386/pc/vbeblit.c,
5427         video/i386/pc/vbefill.c.
5429         * conf/i386-pc.rmk (vbe_mod_SOURCES): Added video/i386/pc/vbeblit.c,
5430         video/i386/pc/vbefill.c.
5432         * include/grub/video.h (grub_video_blit_format): New enum.
5433         (grub_video_mode_info): Added new member blit_format.
5434         (grub_video_get_blit_format): New function prototype.
5436         * include/grub/i386/pc/vbe.h (grub_video_vbe_get_video_ptr): New
5437         function prototype.
5438         (grub_video_vbe_map_rgb): Likewise.
5439         (grub_video_vbe_unmap_color): Likewise.
5441         * include/grub/i386/pc/vbeblit.h: New file.
5443         * include/grub/i386/pc/vbefill.h: New file.
5445         * video/video.c (grub_video_get_blit_format): New function.
5446         (grub_video_vbe_get_video_ptr): Re-declared as non-static.
5447         (grub_video_vbe_map_rgb): Likewise.
5448         (grub_video_vbe_unmap_color): Likewise.
5450         * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Changed to use more
5451         optimized fills.
5452         (grub_video_vbe_blit_render_target): Changed to use more optimized
5453         blits.
5454         (grub_video_vbe_setup): Added detection for optimized settings.
5455         (grub_video_vbe_create_render_target): Likewise.
5457         * video/i386/pc/vbeblit.c: New file.
5459         * video/i386/pc/vbefill.c: New file.
5461 2006-03-30  Vesa Jaaskelainen  <chaac@nic.fi>
5463         * font/manager.c (grub_font_get_glyph): Removed font fixup from
5464         here...
5466         * util/unifont2pff.rb: ... and moved it to here.  Improved argument
5467         parsing to support both hex and dec ranges.  If filename was missing
5468         show usage information.
5470 2006-03-14  Vesa Jaaskelainen  <chaac@nic.fi>
5472         * DISTLIST: Added include/grub/video.h, term/gfxterm.c,
5473         video/video.c, commands/videotest.c.  Removed term/i386/pc/vesafb.c.
5475         * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod,
5476         gfxterm.mod, videotest.mod.  Removed vga.mod, vesafb.mod.
5477         (video_mod_SOURCES): Added.
5478         (video_mod_CFLAGS): Likewise.
5479         (video_mod_LDFLAGS): Likewise.
5480         (gfxterm_mod_SOURCES): Likewise.
5481         (gfxterm_mod_CFLAGS): Likewise.
5482         (gfxterm_mod_LDFLAGS): Likewise.
5483         (videotest_mod_SOURCES): Likewise.
5484         (videotest_mod_CFLAGS): Likewise.
5485         (videotest_mod_LDFLAGS): Likewise.
5486         (vesafb_mod_SOURCES): Removed.
5487         (vesafb_mod_CFLAGS): Likewise.
5488         (vesafb_mod_LDFLAGS): Likewise.
5489         (vga_mod_SOURCES): Likewise.
5490         (vga_mod_CFLAGS): Likewise.
5491         (vga_mod_LDFLAGS): Likewise.
5493         * commands/videotest.c: New file.
5495         * font/manager.c (fill_with_default_glyph): Modified to use
5496         grub_font_glyph.
5497         (grub_font_get_glyph): Likewise.
5498         (fontmanager): Renamed from this...
5499         (font_manager): ... to this.
5501         * include/grub/font.h (grub_font_glyph): Added new structure.
5502         (grub_font_get_glyph): Modified to use grub_font_glyph.
5504         * include/grub/misc.h (grub_abs): Added as inline function.
5506         * include/grub/video.h: New file.
5508         * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro.
5509         (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise.
5510         (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise.
5511         (grub_vbe_get_controller_info): Renamed from this...
5512         (grub_vbe_bios_get_controller_info): ... to this.
5513         (grub_vbe_get_mode_info): Renamed from this...
5514         (grub_vbe_bios_get_mode_info): ... to this.
5515         (grub_vbe_set_mode): Renamed from this...
5516         (grub_vbe_bios_set_mode): ... to this.
5517         (grub_vbe_get_mode): Renamed from this...
5518         (grub_vbe_bios_get_mode): ... to this.
5519         (grub_vbe_set_memory_window): Renamed from this...
5520         (grub_vbe_bios_set_memory_window): ... to this.
5521         (grub_vbe_get_memory_window): Renamed from this...
5522         (grub_vbe_bios_get_memory_window): ... to this.
5523         (grub_vbe_set_scanline_length): Renamed from this...
5524         (grub_vbe_set_scanline_length): ... to this.
5525         (grub_vbe_get_scanline_length): Renamed from this...
5526         (grub_vbe_bios_get_scanline_length): ... to this.
5527         (grub_vbe_set_display_start): Renamed from this...
5528         (grub_vbe_bios_set_display_start): ... to this.
5529         (grub_vbe_get_display_start): Renamed from this...
5530         (grub_vbe_bios_get_display_start): ... to this.
5531         (grub_vbe_set_palette_data): Renamed from this...
5532         (grub_vbe_bios_set_palette_data): ... to this.
5533         (grub_vbe_set_pixel_rgb): Removed.
5534         (grub_vbe_set_pixel_index): Likewise.
5536         * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed
5537         from this...
5538         (grub_vbe_bios_get_controller_info): ... to this.
5539         (grub_vbe_get_mode_info): Renamed from this...
5540         (grub_vbe_bios_get_mode_info): ... to this.
5541         (grub_vbe_set_mode): Renamed from this...
5542         (grub_vbe_bios_set_mode): ... to this.
5543         (grub_vbe_get_mode): Renamed from this...
5544         (grub_vbe_bios_get_mode): ... to this.
5545         (grub_vbe_set_memory_window): Renamed from this...
5546         (grub_vbe_bios_set_memory_window): ... to this.
5547         (grub_vbe_get_memory_window): Renamed from this...
5548         (grub_vbe_bios_get_memory_window): ... to this.
5549         (grub_vbe_set_scanline_length): Renamed from this...
5550         (grub_vbe_set_scanline_length): ... to this.
5551         (grub_vbe_get_scanline_length): Renamed from this...
5552         (grub_vbe_bios_get_scanline_length): ... to this.
5553         (grub_vbe_set_display_start): Renamed from this...
5554         (grub_vbe_bios_set_display_start): ... to this.
5555         (grub_vbe_get_display_start): Renamed from this...
5556         (grub_vbe_bios_get_display_start): ... to this.
5557         (grub_vbe_set_palette_data): Renamed from this...
5558         (grub_vbe_bios_set_palette_data): ... to this.
5559         (grub_vbe_bios_get_controller_info): Fixed problem with registers
5560         getting corrupted after calling it.  Added more pushes and pops.
5561         (grub_vbe_bios_set_mode): Likewise.
5562         (grub_vbe_bios_get_mode): Likewise.
5563         (grub_vbe_bios_get_memory_window): Likewise.
5564         (grub_vbe_bios_set_scanline_length): Likewise.
5565         (grub_vbe_bios_get_scanline_length): Likewise.
5566         (grub_vbe_bios_get_display_start): Likewise.
5567         (grub_vbe_bios_set_palette_data): Likewise.
5569         * normal/cmdline.c (cl_set_pos): Refresh the screen.
5570         (cl_insert): Likewise.
5571         (cl_delete): Likewise.
5573         * term/gfxterm.c: New file.
5575         * term/i386/pc/vesafb.c: Removed file.
5577         * video/video.c: New file.
5579         * video/i386/pc/vbe.c (real2pm): Added new function.
5580         (grub_video_vbe_draw_pixel): Likewise.
5581         (grub_video_vbe_get_video_ptr): Likewise.
5582         (grub_video_vbe_get_pixel): Likewise
5583         (grub_video_vbe_init): Likewise.
5584         (grub_video_vbe_fini): Likewise.
5585         (grub_video_vbe_setup): Likewise.
5586         (grub_video_vbe_get_info): Likewise.
5587         (grub_video_vbe_set_palette): Likewise.
5588         (grub_video_vbe_get_palette): Likewise.
5589         (grub_video_vbe_set_viewport): Likewise.
5590         (grub_video_vbe_get_viewport): Likewise.
5591         (grub_video_vbe_map_color): Likewise.
5592         (grub_video_vbe_map_rgb): Likewise.
5593         (grub_video_vbe_map_rgba): Likewise.
5594         (grub_video_vbe_unmap_color): Likewise.
5595         (grub_video_vbe_fill_rect): Likewise.
5596         (grub_video_vbe_blit_glyph): Likewise.
5597         (grub_video_vbe_blit_bitmap): Likewise.
5598         (grub_video_vbe_blit_render_target): Likewise.
5599         (grub_video_vbe_scroll): Likewise.
5600         (grub_video_vbe_swap_buffers): Likewise.
5601         (grub_video_vbe_create_render_target): Likewise.
5602         (grub_video_vbe_delete_render_target): Likewise.
5603         (grub_video_vbe_set_active_render_target): Likewise.
5604         (grub_vbe_set_pixel_rgb): Remove function.
5605         (grub_vbe_set_pixel_index): Likewise.
5606         (index_color_mode): Remove static variable.
5607         (active_mode): Likewise.
5608         (framebuffer): Likewise.
5609         (bytes_per_scan_line): Likewise.
5610         (grub_video_vbe_adapter): Added new static variable.
5611         (framebuffer): Likewise.
5612         (render_target): Likewise.
5613         (initial_mode): Likewise.
5614         (mode_in_use): Likewise.
5615         (mode_list): Likewise.
5617 2006-03-10  Marco Gerards  <marco@gnu.org>
5619         * configure.ac (AC_INIT): Bumped to 1.93.
5621         * DISTLIST: Added `include/grub/hfs.h'.
5623 2006-02-01  Yoshinori K. Okuji  <okuji@enbug.org>
5625         * boot/i386/pc/boot.S (general_error): Before looping, try INT
5626         18H, which might help the BIOS falling back to next boot media.
5628 2006-01-25  Yoshinori K. Okuji  <okuji@enbug.org>
5630         * util/i386/pc/grub-install.in: Escape a backslash. Reported by
5631         Poe Chen <poe.poechen@gmail.com>.
5633 2006-01-17  Marco Gerards  <marco@gnu.org>
5635         * include/grub/normal.h: Include <grub/script.h>.
5636         (grub_command_list): Removed struct.
5637         (grub_command_list_t): Removed type.
5638         (grub_menu_entry): Remove members `num' and `command_list'.  Add
5639         members `commands' and `sourcecode'.
5640         * include/grub/script.h: Add inclusion guards.
5641         (grub_script_cmd_menuentry): New struct.
5642         (grub_script_execute_menuentry): New prototype.
5643         (grub_script_lexer_record_start): Likewise.
5644         (grub_script_lexer_record_stop): Likewise.
5645         * normal/execute.c (grub_script_execute_menuentry): New function.
5646         * normal/lexer.c (record, recording, recordpos, recordlen): New
5647         variables.
5648         (grub_script_lexer_record_start): New function.
5649         (grub_script_lexer_record_stop): Likewise.
5650         (recordchar): Likewise.
5651         (nextchar): Likewise.
5652         (grub_script_yylex): Use `nextchar' to fetch new characters.  Use
5653         2048 as the buffer size.  Add the tokens `menuentry' and `@'.
5654         * normal/main.c: Include <grub/parser.h> and <grub/script.h>
5655         (current_menu): New variable.
5656         (free_menu): Mainly rewritten.
5657         (grub_normal_menu_addentry): New function.
5658         (read_config_file): Rewritten.
5659         * normal/menu.c (run_menu_entry): Mainly rewritten.
5660         * normal/menu_entry.c (make_screen): Rewritten te code to insert
5661         the menu entry.
5662         (run): Mainly rewritten.
5663         * normal/parser.y (menu_entry): New variable.
5664         (GRUB_PARSER_TOKEN_MENUENTRY): New token.
5665         (menuentry): New rule.
5666         (command): Add `menuentry'.
5667         (if_statement): Allow additional returns before `fi'.
5668         * normal/script.c (grub_script_create_cmdmenu): New function.
5670 2006-01-03  Marco Gerards  <marco@gnu.org>
5672         * INSTALL: GNU Bison is required.
5673         * configure.ac: Rewritten the test to detect Bison.
5674         * Makefile.in (YACC): New variable.  Reported by Xun Sun
5675         <xun.sun.cn@gmail.com>.
5677 2006-01-03  Marco Gerards  <marco@gnu.org>
5679         * fs/hfsplus.c (grub_hfsplus_read_block): Convert the offset of
5680         the HFS+ filesystem to filesystem blocks.
5681         (grub_hfsplus_iterate_dir): Cast the `fileinfo' assignment so a
5682         GCC warning is silenced.
5684 2006-01-03  Marco Gerards  <marco@gnu.org>
5686         * partmap/apple.c (apple_partition_map_iterate): Convert the data
5687         read from disk from big endian to host byte order.
5689 2006-01-03  Hollis Blanchard  <hollis@penguinppc.org>
5691         * fs/hfs.c: Include <grub/hfs.h>.  Added reference to the official
5692         documentation.
5693         (GRUB_HFS_EMBED_HFSPLUS_SIG): New macro.
5694         (grub_hfs_mount): Grammar fix in error. Make sure this is not an
5695         embedded HFS+ filesystem.
5696         (GRUB_HFS_MAGIC, grub_hfs_extent, grub_hfs_datarecord_t)
5697         (grub_hfs_sblock): Move from here...
5698         * include/grub/hfs.h: To here...  New file.
5699         * fs/hfsplus.c: Include <grub/hfs.h>.  Added reference to the official
5700         documentation.
5701         (GRUB_HFSPLUS_MAGIC, GRUB_HFSPLUSX_MAGIC, GRUB_HFSPLUS_SBLOCK):
5702         New macros.
5703         (grub_hfsplus_volheader): Change type of member `magic' to
5704         `grub_uint16_t'.
5705         (grub_hfsplus_data): Add new member `embedded_offset'.
5706         (grub_hfsplus_read_block): Add the HFS+ wrapper offset to the
5707         returned block.
5708         (grub_hfsplus_mount): Read the HFS+ wrapper if it exists.
5709         Calculate the offset.
5711 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
5713         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRP_ADDR):
5714         Removed.
5715         (GRUB_BOOT_MACHINE_DRP_SIZE): Likewise.
5717 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
5719         * kern/env.c (grub_env_set): Check if ENV->VALUE instead of
5720         ENV->NAME is NULL after allocating ENV->VALUE.
5722 2005-12-25  Marco Gerards  <marco@gnu.org>
5724         * kern/env.c (grub_env_set): Rewritten the error handling code.
5726 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
5728         * geninit.sh: Made more robust, and more portable.
5730 2005-12-25  Marco Gerards  <marco@gnu.org>
5732         Add support for Apple HFS+ filesystems.
5733         
5734         * fs/hfsplus.c: New file.
5736         * DISTLIST: Added `fs/hfsplus.c'.
5738         * conf/common.rmk (pkgdata_MODULES): Add `hfsplus.mod'.
5739         (hfsplus_mod_SOURCES): New variable.
5740         (hfsplus_mod_CFLAGS): Likewise.
5741         (hfsplus_mod_LDFLAGS): Likewise.
5742         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/hfsplus.c'.
5743         (grub_setup_SOURCES): Likewise.
5744         (grub_mkdevicemap_SOURCES): Likewise.
5745         (grub_emu_SOURCES): Likewise.
5746         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5748         * fs/fshelp.c (grub_fshelp_log2blksize): New function.
5750         * include/grub/fshelp.h (grub_fshelp_log2blksize): new prototype.
5752 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
5754         * DISTLIST: Added geninitheader.sh, geninit.sh, commands/test.c,
5755         commands/i386/pc/play.c, conf/common.mk, conf/common.rmk,
5756         include/grub/parser.h, include/grub/script.h, kern/parser.c,
5757         kern/sparc64/cache.S, normal/execute.c, normal/function.c,
5758         normal/lexer.c, normal/parser.y, normal/script.c, and
5759         partmap/gpt.c.
5760         Removed kern/sparc64/cache.c.
5762         * conf/common.rmk (DISTCLEANFILES): Added grub_script.tab.c,
5763         grub_script.tab.h, grub_modules_init.lst, grub_modules_init.h,
5764         grub_emu_init.c.
5766         * configure.ac (AC_INIT): Bumped to 1.92.
5768 2005-12-24  Vesa Jaaskelainen  <chaac@nic.fi>
5770         * kern/err.c (grub_error_push): Added new function to support error
5771         stacks.
5772         (grub_error_pop): Likewise.
5773         (grub_error_stack_items): New local variable to support error stacks.
5774         (grub_error_stack_pos): Likewise.
5775         (grub_error_stack_assert): Likewise.
5776         (GRUB_ERROR_STACK_SIZE): Added new define to configure maximum error
5777         stack depth.
5778         (grub_print_error): Added support to print errors from error stack.
5780         * include/grub/err.h (grub_error_push): Added function prototype.
5781         (grub_error_pop): Likewise.
5783 2005-12-09  Hollis Blanchard  <hollis@penguinppc.org>
5785         * configure.ac: Accept `powerpc64' as host_cpu.
5786         (amd64): Rename to `biarch32'.
5788         * kern/powerpc/cache.S (grub_arch_sync_caches): Handle
5789         non-cacheline-aligned addresses.
5791         * kern/dl.c (grub_dl_load_core): Add grub_dprintf messages.
5792         (grub_dl_flush_cache): Likewise.  Only call `grub_arch_sync_caches'
5793         if `size' is non-zero.
5795 2005-12-03  Marco Gerards  <mgerards@xs4all.nl>
5797         * conf/common.rmk (grub_modules_init.lst): Use `-printf "%P\n"'
5798         and `cd' to make sure the filename is not prefixed with a
5799         directory name.
5800         (pkgdata_MODULES): Add `gpt.mod'.
5801         (gpt_mod_SOURCES): New variable.
5802         (gpt_mod_CFLAGS): Likewise.
5803         (gpt_mod_LDFLAGS): Likewise.
5805         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/gpt.c'.
5807         * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_GPT_DISK):
5808         New macro.
5810         * partmap/gpt.c: New file.
5812         * partmap/pc.c (pc_partition_map_iterate): Don't continue when a
5813         GPT partition map is detected.
5815 2005-12-03  Vincent Pelletier  <subdino2004@yahoo.fr>
5817         * commands/i386/pc/play.c: New file.
5818         * conf/i386-pc.rmk (pkgdata_MODULES): Added play.mod.
5819         (play_mod_SOURCES, play_mod_CFLAGS, play_mod_LDFLAGS): New
5820         macros.
5821         
5822 2005-11-27  Marco Gerards  <mgerards@xs4all.nl>
5824         * include/grub/dl.h (GRUB_MOD_INIT): Use `__attribute__
5825         ((unused))' to silence gcc warning.
5827 2005-11-26  Hollis Blanchard  <hollis@penguinppc.org>
5829         * configure.ac: Correct `AC_PROG_YACC' test.
5831 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
5833         * util/powerpc/ieee1275/grub-install.in: Run the mount point
5834         check before installing files.
5836 2005-11-22  Mike Small  <smallm@panix.com>
5838         * util/powerpc/ieee1275/grub-install.in (grubdir): Fixed partition
5839         number regex so multidigit numbers are recognized correctly.
5841 2005-11-22  Mike Small  <smallm@panix.com>
5843         * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Add a
5844         debugging message before attempting to claim memory.
5845         (grub_rescue_cmd_initrd): Add a claim debugging message and try
5846         multiple addresses in case of failure.
5848 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
5850         * term/tparm.c (get_space): Remove empty `if' statement.
5852         * fs/ufs.c (grub_ufs_find_file): Remove `grub_le_to_cpu32'.
5854         * kern/parser.c (check_varstate): Rename `state' to 's'.
5856 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
5858         * partmap/acorn.c: Change `unsigned' to `unsigned int'.  Move all
5859         variable definitions to the beginning of each function.  Sort stack
5860         variables by size.
5861         (find): Rename to `acorn_partition_map_find'.  Cast `grub_disk_read'
5862         `buf' argument to `char *'.
5864 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
5866         * conf/powerpc-ieee1275.rmk: Include conf/common.mk.
5867         (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
5868         minux.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
5869         hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
5870         help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
5871         sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
5872         configfile.mod, search.mod, gzio.mod and test.mod.
5873         (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
5874         (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
5875         (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
5876         (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
5877         (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
5878         (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
5879         (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
5880         (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
5881         (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
5882         (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
5883         (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
5884         (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
5885         (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
5886         (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
5887         (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
5888         (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
5889         (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
5890         (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
5891         (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
5892         (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
5893         (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
5894         (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
5895         (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Removed.
5897         * conf/common.mk (grub_modules_init.lst): Use `find' instead of
5898         `grep --include'.
5899         (pkgdata_MODULES): Add test.mod.
5901 2005-11-18  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
5903         * genmk.rb: Fixed list rules moved to Makefile.in.  Recognise
5904         appending to variables with "+=".
5905         (PModule): Use full pathname to generate *.lst filenames.
5907         * Makefile.in: Fixed list rules moved from genmk.rb.
5908         (.DELETE_ON_ERROR): New special target.
5909         (RMKFILES): Add common.rmk and sparc64-ieee1275.rmk.
5911         * conf/i386-pc.rmk: Include conf/common.mk.
5912         (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
5913         minux.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
5914         hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
5915         help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
5916         sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
5917         configfile.mod, search.mod, gzio.mod and test.mod.
5918         (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
5919         (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
5920         (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
5921         (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
5922         (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
5923         (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
5924         (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
5925         (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
5926         (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
5927         (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
5928         (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
5929         (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
5930         (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
5931         (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
5932         (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
5933         (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
5934         (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
5935         (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
5936         (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
5937         (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
5938         (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
5939         (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
5940         (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Move from
5941         here...
5942         * conf/common.rmk: ... to here.  New file.
5944         * conf/common.mk: New file.
5946 2005-11-18  Yoshinori K. Okuji  <okuji@enbug.org>
5948         * conf/powerpc-ieee1275.rmk (grub_script.tab.h): Unified to ...
5949         (grub_script.tab.c): ... here.
5951         * conf/sparc64-ieee1275.rmk (grub_script.tab.h): Unified to ...
5952         (grub_script.tab.c): ... here.
5954         * conf/i386-pc.rmk (grub_script.tab.h): Unified to ...
5955         (grub_script.tab.c): ... here.
5957         * normal/command.c (grub_command_find): Fixed a memory leak of
5958         MODULE_NAME. Reported by Mike Small <smallm@panix.com>.
5960 2005-11-13  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
5962         * include/grub/symbol.h: (FUNCTION): Use double quotes instead of
5963         "@" which marks the start of a comment on ARM.
5964         (VARIABLE): Likewise.
5966 2005-11-13  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
5968         Add support for Linux/ADFS partition tables.
5970         * partmap/acorn.c: New file.
5972         * include/grub/acorn_filecore.h: Likewise.
5974         * DISTLIST: Added `partmap/acorn.c' and
5975         `include/grub/acorn_filecore.h'.
5976         
5977         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
5978         `partmap/acorn.c'.
5979         (pkgdata_MODULES): Add `acorn.mod'.
5980         (acorn_mod_SOURCES): New variable.
5981         (acorn_mod_CFLAGS): Likewise.
5983         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
5984         `partmap/acorn.c'.
5985         (pkgdata_MODULES): Add `acorn.mod'.
5986         (acorn_mod_SOURCES): New variable.
5987         (acorn_mod_CFLAGS): Likewise.
5989         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/acorn.c'.
5990         (pkgdata_MODULES): Add `acorn.mod'.
5991         (acorn_mod_SOURCES): New variable.
5992         (acorn_mod_CFLAGS): Likewise.
5993         (acorn_mod_LDFLAGS): Likewise.
5995         * include/types.h (grub_disk_addr_t): New typedef.
5997 2005-11-13  Marco Gerards  <mgerards@xs4all.nl>
5999         * geninit.sh: New file.
6001         * geninitheader.sh: Likewise.
6003         * commands/boot.c (grub_boot_init, grub_boot_fini): Removed.
6004         * commands/cat.c (grub_cat_init, grub_cat_fini): Likewise.
6005         * commands/cmp.c (grub_cmp_init, grub_cmp_fini): Likewise.
6006         * commands/configfile.c (grub_configfile_init)
6007         (grub_configfile_fini): Likewise.
6008         * commands/default.c (grub_default_init, grub_default_fini):
6009         Likewise.
6010         * commands/help.c (grub_help_init, grub_help_fini): Likewise.
6011         * commands/ls.c (grub_ls_init, grub_ls_fini): Likewise.
6012         * commands/search.c (grub_search_init, grub_search_fini): Likewise.
6013         * commands/terminal.c (grub_terminal_init, grub_terminal_fini):
6014         Likewise.
6015         * commands/test.c (grub_test_init, grub_test_fini): Likewise.
6016         * commands/timeout.c (grub_timeout_init, grub_timeout_fini):
6017         Likewise.
6018         * commands/i386/pc/halt.c (grub_halt_init, grub_halt_fini): Likewise.
6019         * commands/iee1275/halt.c (grub_halt_init, grub_halt_fini):
6020         Likewise.
6021         * commands/i386/pc/reboot.c (grub_reboot_init, grub_reboot_fini):
6022         Likewise.
6023         * commands/iee1275/reboot.c (grub_reboot_init, grub_reboot_fini):
6024         Likewise.
6025         * disk/loopback.c (grub_loop_init, grub_loop_fini): Likewise.
6026         * fs/affs.c (grub_affs_init, grub_affs_fini): Likewise.
6027         * fs/ext2.c (grub_ext2_init, grub_ext2_fini): Likewise.
6028         * fs/fat.c (grub_fat_init, grub_fat_fini): Likewise.
6029         * fs/hfs.c (grub_hfs_init, grub_hfs_fini): Likewise.
6030         * fs/iso9660.c (grub_iso9660_init, grub_iso9660_fini): Likewise.
6031         * fs/jfs.c (grub_jfs_init, grub_jfs_fini): Likewise.
6032         * fs/minix.c (grub_minix_init, grub_minix_fini): Likewise.
6033         * fs/sfs.c (grub_sfs_init, grub_sfs_fini): Likewise.
6034         * fs/ufs.c (grub_ufs_init, grub_ufs_fini): Likewise.
6035         * fs/xfs.c (grub_xfs_init, grub_xfs_fini): Likewise.
6036         * normal/main.c (grub_normal_init, grub_normal_fini): Likewise.
6037         * partmap/amiga.c (grub_amiga_partition_map_init)
6038         (grub_amiga_partition_map_fini): Likewise.
6039         * partmap/apple.c (grub_apple_partition_map_init)
6040         (grub_apple_partition_map_fini): Likewise.
6041         * partmap/pc.c (grub_pc_partition_map_init)
6042         (grub_pc_partition_map_fini): Likewise.
6043         * partmap/sun.c (grub_sun_partition_map_init,
6044         grub_sun_partition_map_fini): Likewise.
6045         * term/terminfo.c (grub_terminal_init, grub_terminal_fini):
6046         Likewise.
6048         * util/grub-emu.c: Include <grub_modules_init.h>.
6049         (main): Don't initialize and de-initialize any modules directly,
6050         use `grub_init_all' and `grub_fini_all' instead.
6052         * term/i386/pc/vesafb.c (grub_vesafb_init): Renamed to
6053         `grub_vesafb_mod_init'.
6054         (grub_vesafb_fini): Renamed to `grub_vesafb_mod_fini'.  Updated
6055         all users.
6056         * term/i386/pc/vga.c (grub_vga_init): Renamed to
6057         `grub_vga_mod_init'.  Updated all users.
6058         (grub_vga_fini): Renamed to `grub_vga_mod_fini'.
6059         
6060         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `grub_emu_init.c'.
6061         (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c): New
6062         rules.
6064         * include/grub/dl.h (GRUB_MOD_INIT): Add argument `name'.
6065         Generate a function to initialize the module in utilities.
6066         Updated all callers.
6067         (GRUB_MOD_FINI): Add argument `name'.  Generate a function to
6068         initialize the module in utilities.  Updated all callers.
6070 2005-11-09  Hollis Blanchard  <hollis@penguinppc.org>
6072         * term/ieee1275/ofconsole.c (grub_ofconsole_cls): Use both the ANSI
6073         escape sequence and a literal ^L to clear the screen.
6075         * commands/ieee1275/suspend.c (grub_cmd_suspend): Clear the screen
6076         when returning from Open Firmware.
6078 2005-11-09  Hollis Blanchard  <hollis@penguinppc.org>
6080         * term/ieee1275/ofconsole.c (grub_ofconsole_width): New variable.
6081         (grub_ofconsole_height): Likewise.
6082         (grub_ofconsole_putchar): If `grub_curr_x' exceeds console width,
6083         manually insert a '\n'.
6084         (grub_ofconsole_getwh): Set and return `grub_ofconsole_width' and
6085         `grub_ofconsole_height'.  Return early if these are already set.
6087 2005-11-07  Vincent Pelletier  <subdino2004@yahoo.fr>
6089         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
6090         `commands/test.c', `fs/affs.c', `fs/sfs.c', `fs/xfs.c',
6091         `normal/execute.c', `normal/lexer.c', `io/gzio.c',
6092         `kern/parser.c', `grub_script.tab.c', `normal/function.c'
6093         and `normal/script.c'.
6094         (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
6095         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
6096         (test_mod_SOURCES): New variable.
6097         (test_mod_CFLAGS): Likewise.
6098         (test_mod_LDFLAGS): Likewise.
6099         (pkgdata_MODULES): Add `test.mod'.
6100         (grub_script.tab.c): New rule.
6101         (grub_script.tab.h): Likewise.
6103 2005-11-07  Marco Gerards  <mgerards@xs4all.nl>
6105         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
6106         `commands/test.c', `normal/execute.c', `normal/lexer.c',
6107         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
6108         (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
6109         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
6110         (test_mod_SOURCES): New variable.
6111         (test_mod_CFLAGS): Likewise.
6112         (pkgdata_MODULES): Add `test.mod'.
6113         (grub_script.tab.c): New rule.
6114         (grub_script.tab.h): Likewise.
6116 2005-11-06  Marco Gerards  <mgerards@xs4all.nl>
6118         Add initial scripting support.
6120         * commands/test.c: New file.
6121         * include/grub/script.h: Likewise.
6122         * normal/execute.c: Likewise.
6123         * normal/function.c: Likewise.
6124         * normal/lexer.c: Likewise.
6125         * normal/parser.y: Likewise.
6126         * normal/script.c: Likewise.
6128         * configure.ac: Add `AC_PROG_YACC' test.
6129         
6130         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/test.c',
6131         `normal/execute.c', `normal/lexer.c', `grub_script.tab.c',
6132         `normal/function.c' and `normal/script.c'.
6133         (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
6134         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
6135         (test_mod_SOURCES, test_mod_CFLAGS, test_mod_LDFLAGS): New
6136         variables.
6137         (pkgdata_MODULES): Add `test.mod'.
6138         (grub_script.tab.c): New rule.
6139         (grub_script.tab.h): Likewise.
6141         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TEST_FAILURE'.
6143         * include/grub/normal.h (grub_test_init): New prototype.
6144         (grub_test_fini): Likewise.
6145         
6146         * normal/command.c: Include <grub/script.h>.
6147         (grub_command_execute): Rewritten.
6148         
6149         * util/grub-emu.c (main): Call `grub_test_init' and
6150         `grub_test_fini'.
6152 2005-11-03  Hollis Blanchard  <hollis@penguinppc.org>
6154         * kern/powerpc/ieee1275/init.c (grub_get_rtc): Initialize `msecs'
6155         to 0.
6156         * term/ieee1275/ofconsole.c (grub_ofconsole_checkkey): Return -1 if
6157         there are no pending characters.
6159 2005-11-03  Hollis Blanchard  <hollis@penguinppc.org>
6161         * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_get_devname): Use
6162         `grub_strndup' to drop device arguments. Replace unnecessary
6163         `grub_strndup' with `grub_strdup'.
6165 2005-11-03  Hollis Blanchard  <hollis@penguinppc.org>
6167         * kern/term.c (grub_cls): Do not call grub_cur_term->cls() if the
6168         `debug' environment variable has been set.
6170 2005-11-02  Hollis Blanchard  <hollis@penguinppc.org>
6171         
6172         * Makefile.in (install-local): Use $(DATA).
6173         (uninstall): Likewise.
6174         * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Move grub-mkimage...
6175         (sbin_UTILITIES): ... to here.
6176         (sbin_SCRIPTS): New variable.
6177         (grub_install_SOURCES): New variable.
6178         * util/powerpc/ieee1275/grub-install.in: New file.
6179         * util/powerpc/ieee1275/grub-mkimage.c (kernel_path): Remove
6180         variable.
6181         (add_segments): Call `grub_util_get_path'.
6183 2005-10-28  Yoshinori K. Okuji  <okuji@enbug.org>
6185         From Timothy Baldwin:
6186         * commands/ls.c (grub_ls_list_files): Close FILE with
6187         grub_file_close.
6188         * kern/misc.c (grub_vsprintf): Terminate the string S with NUL.
6190 2005-10-24  Marco Gerards  <mgerards@xs4all.nl>
6192         * include/grub/parser.h: New file.
6194         * kern/parser.c: Likewise.
6196         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/parser.c'.
6197         (grub_setup_SOURCES): Likewise.
6198         (grub_probefs_SOURCES): Likewise.
6199         (grub_emu_SOURCES): Likewise.
6200         (kernel_img_HEADERS): Add `parser.h'.
6202         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
6203         (grub_emu_SOURCES): Add `kern/parser.c'.
6204         (grubof_SOURCES): Likewise.
6206         * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
6207         (grubof_SOURCES): Add `kern/parser.c'.
6209         * include/grub/misc.h (grub_split_cmdline): Removed prototype.
6211         * kern/misc.c (grub_split_cmdline): Removed function.
6213         * kern/rescue.c: Include <grub/parser.h>.
6214         (grub_enter_rescue_mode): Use `grub_parser_split_cmdline' instead
6215         of `grub_split_cmdline'.
6217         * normal/command.c: Include <grub/parser.h>.
6218         (grub_command_execute):  Use `grub_parser_split_cmdline' instead
6219         of `grub_split_cmdline'.
6221         * normal/completion.c: Include <grub/parser.h>.
6222         (cmdline_state): New variable.
6223         (iterate_dir): End the filename with a quote depending on the
6224         command line state.
6225         (get_state): new function.
6226         (grub_normal_do_completion): Use `grub_parser_split_cmdline' to
6227         split the arguments and determine the current argument.  When the
6228         argument string is not quoted, escape all spaces.
6230 2005-10-23  Vincent Pelletier  <subdino2004@yahoo.fr>
6232         * normal/sparc64/setjmp.S: New file.
6234 2005-10-23  Vincent Pelletier  <subdino2004@yahoo.fr>
6236         * include/grub/sparc64/libgcc.h: New file.
6237         * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Remove -Av9.
6238         (normal_mod_SOURCES): Use normal/sparc64/setjmp.S instead of
6239         normal/sparc64/setjmp.c.
6241 2005-10-23  Vincent Pelletier  <subdino2004@yahoo.fr>
6243         * kern/sparc64/dl.c: Rewritten for SPARCV9 ELF.
6244         * kern/sparc64/cache.S: New file.
6245         * kern/sparc64/cache.c: Removed.
6246         * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Add -Av9.
6247         (COMMON_CFLAGS): Add -mno-app-regs.  Remove -mcpu=v9 and
6248         -mtune=ultrasparc.
6249         (COMMON_LDFLAGS): Add -melf64_sparc.
6250         (grubof_HEADERS): Add sparc64/libgcc.h and machine/kernel.h.
6251         (grubof_SOURCES): Use cache.S instead of cache.c.
6252         (grubof_LDFLAGS): Add -mno-app-regs.  Replace "-Xlinker
6253         --oformat -Xlinker elf64-sparc" by "-Bstatic,-melf64_sparc".
6254         (pkgdata_MODULES): Uncomment. Leave linux.mod and _linux.mod
6255         commented though.
6256         (normal_mod_SOURCES): Add normal/completion.c and normal/misc.c.
6257         (_linux_mod_SOURCES, _linux_mod_CFLAGS, linux_mod_SOURCES)
6258         (linux_mod_CFLAGS): Commented out.
6259         (_linux_mod_LDFLAGS, linux_mod_LDFLAGS): New macro, commented
6260         out because module isn't built.
6261         (fshelp_mod_LDFLAGS, fat_mod_LDFLAGS, ext2_mod_LDFLAGS)
6262         (ufs_mod_LDFLAGS, minix_mod_LDFLAGS, hfs_mod_LDFLAGS)
6263         (jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS, normal_mod_LDFLAGS)
6264         (hello_mod_LDFLAGS, boot_mod_LDFLAGS, terminal_mod_LDFLAGS)
6265         (ls_mod_LDFLAGS, cmp_mod_LDFLAGS, cat_mod_LDFLAGS)
6266         (font_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
6267         (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
6268         (suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS)
6269         (help_mod_LDFLAGS, default_mod_LDFLAGS, timeout_mod_LDFLAGS)
6270         (configfile_mod_LDFLAGS, search_mod_LDFLAGS, xfs_mod_SOURCES)
6271         (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
6272         (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
6273         (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, gzio_mod_SOURCES)
6274         (gzio_mod_CFLAGS, gzio_mod_LDFLAGS): New macro.
6276 2005-10-20  Yoshinori K. Okuji  <okuji@enbug.org>
6278         * util/i386/pc/grub-probefs.c (main): Call grub_xfs_init and
6279         grub_xfs_fini. Do not call grub_hfs_init or grub_hfs_fini any
6280         longer, because HFS should not be used on PC.
6282 2005-10-20  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
6284         * io/gzio.c (grub_gzio_read): Use OFFSET instead of FILE->OFFSET
6285         consistently within the loop.
6287 2005-10-15  Marco Gerards  <mgerards@xs4all.nl>
6289         * fs/xfs.c (grub_xfs_iterate_dir): Detect an error if part of a
6290         directory can not be read.
6292 2005-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
6294         * configure.ac (AC_INIT): Increase the version number to 1.91.
6296         * DISTLIST: Added include/grub/terminfo.h, include/grub/tparm.h,
6297         include/grub/i386/pc/serial.h, term/terminfo.c, term/tparm.c and
6298         term/i386/pc/serial.c.
6300 2005-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
6302         * kern/file.c (grub_file_seek): Seeking to an offset equal to a
6303         file size must be permitted.
6305         * kern/i386/pc/startup.S (multiboot_trampoline): Fix a mistake
6306         between %ah and %al.
6308 2005-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
6310         * fs/xfs.c (grub_xfs_iterate_dir): Change the type of BLK to
6311         grub_uint64_t.
6312         Call the hook with a NUL-terminated filename.
6313         (grub_xfs_mount): Use grub_be_to_cpu32 instead of
6314         grub_cpu_to_be32.
6316         * kern/term.c (cursor_state): New variable.
6317         (grub_term_set_current): Reset the cursor state on a new
6318         terminal.
6319         (grub_setcursor): Rewritten to use CURSOR_STATE.
6320         (grub_getcursor): New function.
6322         * include/grub/term.h (grub_getcursor): New prototype.
6324         * io/gzio.c (test_header): Align BUF for accessing it as 32-bit
6325         integers on ARM. Reported by Timothy Baldwin
6326         <T.E.Baldwin99@members.leeds.ac.uk>.
6328 2005-10-11  Marco Gerards  <mgerards@xs4all.nl>
6330         * fs/sfs.c (grub_sfs_open): Don't free `data->label' if it is not
6331         allocated.
6332         (grub_sfs_dir): Likewise.
6334 2005-10-09  Marco Gerards  <mgerards@xs4all.nl>
6336         Add support for the SFS filesystem.
6338         * fs/sfs.c: New file.
6340         * DISTLIST: Added `fs/sfs.c'.
6342         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/sfs.c'.
6343         (grub_probefs_SOURCES): Likewise.
6344         (grub_emu_SOURCES): Likewise.
6345         (pkgdata_MODULES): Add `sfs.mod'.
6346         (sfs_mod_SOURCES): New variable.
6347         (sfs_mod_CFLAGS): Likewise.
6348         (sfs_mod_LDFLAGS): Likewise.
6350         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/sfs.c'.
6351         (pkgdata_MODULES): Add `sfs.mod'.
6352         (sfs_mod_SOURCES): New variable.
6353         (sfs_mod_CFLAGS): Likewise.
6355         * util/grub-emu.c (main): Call `grub_sfs_init' and
6356         `grub_sfs_fini'.
6358         * include/grub/fs.h (grub_sfs_init): New prototype.
6359         (grub_sfs_fini): Likewise.
6361 2005-10-07  Marco Gerards  <mgerards@xs4all.nl>
6363         Add support for the AFFS filesystem.
6365         * fs/affs.c: New file.
6367         * DISTLIST: Added `fs/affs.c'.
6369         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/affs.c'.
6370         (grub_probefs_SOURCES): Likewise.
6371         (grub_emu_SOURCES): Likewise.
6372         (pkgdata_MODULES): Add `affs.mod'.
6373         (affs_mod_SOURCES): New variable.
6374         (affs_mod_CFLAGS): Likewise.
6375         (affs_mod_LDFLAGS): Likewise.
6377         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/affs.c'.
6378         (pkgdata_MODULES): Add `affs.mod'.
6379         (affs_mod_SOURCES): New variable.
6380         (affs_mod_CFLAGS): Likewise.
6382         * util/grub-emu.c (main): Call `grub_affs_init' and
6383         `grub_affs_fini'.
6385         * include/grub/fs.h (grub_affs_init): New prototype.
6386         (grub_affs_fini): Likewise.
6388 2005-10-01  Marco Gerards  <mgerards@xs4all.nl>
6390         * fs/xfs.c (grub_xfs_iterate_dir): Add parentheses.
6392 2005-10-01  Marco Gerards  <mgerards@xs4all.nl>
6394         * configure.ac: Accept `x86_64' as host_cpu.  In that case add
6395         `-m32' to CFLAGS.
6397         * genmk.rb (class PModule): Always use `$(#{prefix}_LDFLAGS)' when
6398         linking.
6399         
6400         * conf/i386-pc.rmk (COMMON_CFLAGS): Add `-m32'.
6401         (COMMON_LDFLAGS): New variable.
6402         (kernel_img_LDFLAGS): Include `COMMON_FLAGS'.
6403         (_chain_mod_LDFLAGS, fshelp_mod_LDFLAGS, fat_mod_LDFLAGS)
6404         (ext2_mod_LDFLAGS, ufs_mod_LDFLAGS, minix_mod_LDFLAGS)
6405         (hfs_mod_LDFLAGS, jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS)
6406         (xfs_mod_LDFLAGS, _linux_mod_LDFLAGS, linux_mod_LDFLAGS)
6407         (normal_mod_LDFLAGS, hello_mod_LDFLAGS, boot_mod_LDFLAGS)
6408         (terminal_mod_LDFLAGS, ls_mod_LDFLAGS, cmp_mod_LDFLAGS)
6409         (cat_mod_LDFLAGS, help_mod_LDFLAGS, reboot_mod_LDFLAGS)
6410         (halt_mod_LDFLAGS, vga_mod_LDFLAGS, font_mod_LDFLAGS)
6411         (terminfo_mod_LDFLAGS, serial_mod_LDFLAGS, _multiboot_mod_LDFLAGS)
6412         (multiboot_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
6413         (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
6414         (default_mod_LDFLAGS, timeout_mod_LDFLAGS, configfile_mod_LDFLAGS)
6415         (vbe_mod_LDFLAGS, vesafb_mod_LDFLAGS, vbeinfo_mod_LDFLAGS)
6416         (vbetest_mod_LDFLAGS, search_mod_LDFLAGS, gzio_mod_LDFLAGS): New
6417         variables.
6418         (normal_mod_ASFLAGS): Add `-m32'.
6420         * include/grub/types.h (grub_host_addr_t, grub_host_off_t)
6421         (grub_host_size_t, grub_host_ssize_t): New types.
6422         (grub_addr_t, grub_off_t, grub_size_t, grub_ssize_t): Make type
6423         dependant of `GRUB_CPU_SIZEOF_VOID_P' instead on
6424         `GRUB_HOST_SIZEOF_VOID_P'.
6426         * include/grub/kernel.h (struct grub_module_header): Type of
6427         member offset changed to `grub_host_off_t'.  Type of member size
6428         changed to `grub_host_size_t'.
6429         (struct grub_module_info): Type of member offset changed to
6430         `grub_host_off_t'.  Type of member size changed to
6431         `grub_host_size_t'.
6433 2005-09-29  Yoshinori K. Okuji  <okuji@enbug.org>
6435         Make GRUB's kernel compliant to Multiboot Specification.
6436         
6437         * kern/i386/pc/startup.S (multiboot_header): New label.
6438         (multiboot_entry): Likewise.
6439         (multiboot_trampoline): Likewise.
6441         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
6442         Increased to 0x4A0.
6444         * fs/xfs.c (grub_xfs_iterate_dir): Fix a syntax error. You may not
6445         put parentheses after a question mark.
6446         [!GRUB_UTIL] (my_mod): New variable.
6448         * util/grub-emu.c (main): Call grub_xfs_init and grub_xfs_fini.
6450 2005-09-28  Marco Gerards  <mgerards@xs4all.nl>
6452         Adds support for the XFS filesystem.  Btrees are not supported
6453         yet.
6455         * fs/xfs.c: New file.
6457         * DISTLIST: Added `fs/xfs.c'.
6459         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/xfs.c'.
6460         (grub_probefs_SOURCES): Likewise.
6461         (grub_emu_SOURCES): Likewise.
6462         (pkgdata_MODULES): Add `xfs.mod'.
6463         (xfs_mod_SOURCES): New variable.
6464         (xfs_mod_CFLAGS): Likewise.
6466         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/xfs.c'.
6467         (pkgdata_MODULES): Add `xfs.mod'.
6468         (xfs_mod_SOURCES): New variable.
6469         (xfs_mod_CFLAGS): Likewise.
6471         * util/grub-emu.c (main): Call `grub_xfs_init' and
6472         `grub_xfs_fini'.
6474         * include/grub/fs.h (grub_xfs_init): New prototype.
6475         (grub_xfs_fini): Likewise.
6477         
6478 2005-09-18  Vesa Jaaskelainen  <chaac@nic.fi>
6480         * video/i386/pc/vbe.c (grub_vbe_set_video_mode): In indexed
6481         color modes, allow greater than 16 colors to be configured as
6482         a default palette.
6484 2005-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
6486         * normal/completion.c (complete_arguments): Add the qualifier
6487         const into OPTIONS.
6489         From Omniflux <omniflux+lists@omniflux.com>:
6490         * include/grub/terminfo.h: New file.
6491         * include/grub/tparm.h: Likewise.
6492         * include/grub/i386/pc/serial.h: Likewise.
6493         * term/terminfo.c: Likewise.
6494         * term/tparm.c: Likewise.
6495         * term/i386/pc/serial.c: Likewise.
6496         * conf/i386-pc.rmk (pkgdata_MODULES): Added terminfo.mod and
6497         serial.mod.
6498         (terminfo_mod_SOURCES): New variable.
6499         (terminfo_mod_CFLAGS): Likewise.
6500         (serial_mod_SOURCES): Likewise.
6501         (serial_mod_CFLAGS): Likewise.
6503 2005-08-31  Yoshinori K. Okuji  <okuji@enbug.org>
6505         * DISTLIST: Replaced boot/powerpc/ieee1275/crt0.S and
6506         boot/powerpc/ieee1275/cmain.c with kern/powerpc/ieee1275/crt0.S
6507         and kern/powerpc/ieee1275/cmain.c, respectively.
6509         * boot/powerpc/ieee1275/crt0.S: Moved to ...
6510         * kern/powerpc/ieee1275/crt0.S: ... here.
6512         * boot/powerpc/ieee1275/cmain.c: Moved to ...
6513         * kern/powerpc/ieee1275/cmain.c: ... here.
6514         
6515         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Use
6516         kern/powerpc/ieee1275/crt0.S and kern/powerpc/ieee1275/cmain.c
6517         instead of boot/powerpc/ieee1275/crt0.S and
6518         boot/powerpc/ieee1275/cmain.c, respectively.
6520         * boot/i386/pc/boot.S (lba_mode): Do not store the total number of
6521         sectors. It was not used anyway.
6523 2005-08-30  Hollis Blanchard  <hollis@penguinppc.org>
6525         * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): Fix
6526         `unused parameter' warning.
6528 2005-08-30  Hollis Blanchard  <hollis@penguinppc.org>
6530         * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): New
6531         function.
6532         (grub_ofconsole_term): Specify grub_ofconsole_getcharwidth as
6533         getcharwidth.
6535 2005-08-28  Marco Gerards  <metgerards@student.han.nl>
6537         * include/grub/normal.h (enum grub_completion_type): Added
6538         `GRUB_COMPLETION_TYPE_ARGUMENT'.
6540         * normal/cmdline.c (print_completion): Handle
6541         the `GRUB_COMPLETION_TYPE_ARGUMENT' type.
6542         * normal/menu_entry.c (store_completion): Likewise.
6544         * normal/completion.c (complete_arguments): New function.
6545         (grub_normal_do_completion): Call `complete_arguments' when the
6546         current words start with a dash.
6548 2005-08-27  Marco Gerards  <metgerards@student.han.nl>
6550         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Fix typo (use
6551         `gzio.mod' instead of `io.mod').
6553 2005-08-22  Yoshinori K. Okuji  <okuji@enbug.org>
6555         * gendistlist.sh (EXTRA_DISTFILES): Added genfslist.sh.
6556         (DISTDIRS): Added io and video.
6557         Rewrite the search routine to make an output consistently.
6559         * DISTLIST: Added conf/sparc64-ieee1275.mk,
6560         conf/sparc64-ieee1275.rmk, include/grub/gzio.h,
6561         include/grub/ieee1275/ieee1275.h, include/grub/ieee1275/ofdisk.h,
6562         io/gzio.c, kern/sparc64/cache.c, kern/sparc64/dl.c,
6563         kern/sparc64/ieee1275/init.c, kern/sparc64/ieee1275/openfw.c and
6564         util/powerpc/ieee1275/misc.c.
6565         
6566         * include/grub/gzio.h: New file.
6567         * io/gzio.c: Likewise.
6568         
6569         * kern/file.c (grub_file_close): Call grub_device_close only if
6570         FILE->DEVICE is not NULL.
6572         * include/grub/mm.h [!NULL] (NULL): New macro.
6574         * include/grub/err.h (GRUB_ERR_BAD_GZIP_DATA): New constant.
6576         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added io/gzip.c.
6577         (pkgdata_MODULES): Added gzio.mod.
6578         (gzio_mod_SOURCES): New variable.
6579         (gzio_mod_CFLAGS): Likewise.
6581         * conf/i386-pc.rmk (grub_emu_SOURCES): Added io/gzip.c.
6582         (pkgdata_MODULES): Added gzio.mod.
6583         (gzio_mod_SOURCES): New variable.
6584         (gzio_mod_CFLAGS): Likewise.
6586         * commands/cat.c: Include grub/gzio.h.
6587         (grub_cmd_cat): Use grub_gzfile_open instead of
6588         grub_file_open.
6589         
6590         * commands/cmp.c: Include grub/gzio.h.
6591         (grub_cmd_cmp): Use grub_gzfile_open instead of
6592         grub_file_open.
6594         * loader/i386/pc/multiboot.c: Include grub/gzio.h.
6595         (grub_rescue_cmd_multiboot): Use grub_gzfile_open instead of
6596         grub_file_open.
6597         (grub_rescue_cmd_module): Likewise.
6599 2005-08-21  Vincent Pelletier  <subdino2004@yahoo.fr>
6601         * conf/sparc64-ieee1275.rmk (grubof_SOURCES): The first file must be
6602         kern/sparc64/ieee1275/init.c because it contains _start.
6603         * conf/sparc64-ieee1275.mk: Generated from conf/sparc64-ieee1275.rmk.
6605 2005-08-21  Vincent Pelletier  <subdino2004@yahoo.fr>
6607         * configure.ac: Add support for sparc64 host with ieee1275
6608         firmware.
6609         * configure: Generated from configure.ac.
6610         * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Use grub_ssize_t
6611         instead of int.
6612         (grub_ofdisk_read): Likewise.
6613         (grub_ofdisk_open): Use %p to print pointer values, and cast the
6614         pointers as (void *) to remove a warning.
6615         (grub_ofdisk_close): Likewise.
6616         (grub_ofdisk_read): Likewise.
6617         * kern/ieee1275/ieee1275.c (grub_ieee1275_exit): This never
6618         returns, so make it return void to remove a warning.
6619         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_exit):
6620         Corresponding prototype change.
6621         * kern/mm.c (grub_mm_init_region): Use %p to print pointer
6622         values, and cast the pointers as (void *) to remove a warning.
6623         (grub_mm_dump): Likewise.
6624         * conf/sparc64-ieee1275.mk: New file.
6625         * conf/sparc64-ieee1275.rmk: Likewise.
6626         * include/grub/sparc64/setjmp.h: Likewise.
6627         * include/grub/sparc64/types.h: Likewise.
6628         * include/grub/sparc64/ieee1275/console.h: Likewise.
6629         * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
6630         * include/grub/sparc64/ieee1275/kernel.h: Likewise.
6631         * include/grub/sparc64/ieee1275/time.h: Likewise.
6632         * kern/sparc64/cache.c: Likewise.
6633         * kern/sparc64/dl.c: Likewise.
6634         * kern/sparc64/ieee1275/init.c: Likewise.
6635         * kern/sparc64/ieee1275/openfw.c: Likewise.
6637 2005-08-21  Yoshinori K. Okuji  <okuji@enbug.org>
6639         * util/console.c (grub_ncurses_putchar): If C is greater than
6640         0x7f, set C to a question mark.
6641         (grub_ncurses_getcharwidth): New function.
6642         (grub_ncurses_term): Specify grub_ncurses_getcharwidth as
6643         getcharwidth.
6645         * normal/menu.c (print_entry): Made aware of Unicode. First,
6646         convert TITLE to UCS-4, and predict the cursor position by
6647         grub_getcharwidth.
6649         * include/grub/misc.h (grub_utf8_to_ucs4): Specify the qualifier
6650         const to SRC.
6651         * kern/misc.c (grub_utf16_to_utf8): Likewise.
6653 2005-08-20  Yoshinori K. Okuji  <okuji@enbug.org>
6655         * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Specify
6656         the boot file by the option BOOT_IMAGE. Use grub_stpcpy instead of
6657         grub_strcat.
6659         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Specify the boot
6660         file by the option BOOT_IMAGE. Use grub_stpcpy instead of
6661         grub_strcpy and grub_strlen. Take it into account that a space
6662         character is inserted as a delimiter.
6664 2005-08-20  Yoshinori K. Okuji  <okuji@enbug.org>
6666         * partmap/pc.c (pc_partition_map_iterate): Include the value of an
6667         invalid magic in thre error.
6669         * commands/search.c: New file.
6670         
6671         * util/grub-emu.c (main): Call grub_search_init and
6672         grub_search_fini.
6674         * kern/rescue.c (grub_rescue_print_disks): Removed.
6675         (grub_rescue_print_devices): New function.
6676         (grub_rescue_cmd_ls): Use grub_device_iterate with
6677         grub_rescue_print_devices instead of grub_disk_dev_iterate with
6678         grub_rescue_print_disks.
6680         * kern/partition.c (grub_partition_iterate): Return the result of
6681         PARTMAP->ITERATE instead of GRUB_ERRNO.
6683         * kern/device.c: Include grub/partition.h.
6684         (grub_device_iterate): New function.
6686         * include/grub/partition.h (grub_partition_iterate): Return int
6687         instead of grub_err_t.
6689         * include/grub/normal.h [GRUB_UTIL] (grub_search_init): New
6690         prototype.
6691         [GRUB_UTIL] (grub_search_fini): Likewise.
6693         * include/grub/device.h (grub_device_iterate): New prototype.
6695         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
6696         commands/search.c.
6697         (pkgdata_MODULES): Added search.mod.
6698         (search_mod_SOURCES): New variable.
6699         (search_mod_CFLAGS): Likewise.
6701         * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/search.c.
6702         (pkgdata_MODULES): Added search.mod.
6703         (search_mod_SOURCES): New variable.
6704         (search_mod_CFLAGS): Likewise.
6706         * commands/ls.c (grub_ls_list_disks): Renamed to ...
6707         (grub_ls_list_devices): ... this, and use grub_device_iterate.
6708         All callers changed.
6710         * DISTLIST: Added commands/search.c.
6712 2005-08-20  Yoshinori K. Okuji  <okuji@enbug.org>
6714         * kern/term.c (grub_putchar): Use grub_utf8_to_ucs4 for the
6715         conversion.
6716         (grub_getcharwidth): New function.
6718         * kern/misc.c (grub_utf8_to_ucs4): New function.
6720         * include/grub/term.h (struct grub_term): Added a new member
6721         "getcharwidth".
6722         (grub_getcharwidth): New prototype.
6724         * include/grub/misc.h (grub_utf8_to_ucs4): New prototype.
6726         * term/i386/pc/console.c (map_char): New function. Segregated from
6727         grub_console_putchar.
6728         (grub_console_putchar): Use map_char.
6729         (grub_console_getcharwidth): New function.
6730         (grub_console_term): Specified grub_console_getcharwidth as
6731         getcharwidth.
6733         * term/i386/pc/vga.c (grub_vga_getcharwidth): New function.
6734         (grub_vga_term): Specified grub_vga_getcharwidth as getcharwidth.
6736         * term/i386/pc/vesafb.c (grub_virtual_screen_setup): Return
6737         GRUB_ERRNO.
6738         (grub_vesafb_init): Do not use RC. Instead, use GRUB_ERRNO. Rely
6739         on grub_strtoul completely.
6740         (write_char): Declare local variables in the beginning of the
6741         function.
6742         (grub_vesafb_getcharwidth): New function.
6743         (grub_vesafb_term): Specified grub_vesafb_getcharwidth as
6744         getcharwidth.
6746 2005-08-19  Yoshinori K. Okuji  <okuji@enbug.org>
6748         * DISTLIST: Replace commands/i386/pc/vbe_list_modes.c and
6749         commands/i386/pc/vbe_test.c with commands/i386/pc/vbeinfo.c and
6750         commands/i386/pc/vbetest.c.
6752         * video/i386/pc/vbe.c (grub_vbe_probe): If INFOBLOCK is not NULL,
6753         call grub_vbe_get_controller_info again, because the returned
6754         information is volatile.
6755         (grub_vbe_set_video_mode): Mostly rewritten.
6756         (grub_vbe_get_video_mode): Use grub_vbe_probe and use
6757         grub_vbe_status_t correctly.
6758         (grub_vbe_get_video_mode_info): Likewise.
6759         (grub_vbe_set_pixel_rgb): Use a switch statement rather than
6760         several if statements.
6762         * commands/i386/pc/vbe_list_modes.c: Renamed to ...
6763         * commands/i386/pc/vbeinfo.c: ... this.
6765         * commands/i386/pc/vbe_test.c: Renamed to ...
6766         * commands/i386/pc/vbetest.c: ... this.
6768         * commands/i386/pc/vbeinfo.c (grub_cmd_vbe_list_modes): Renamed to
6769         ...
6770         (grub_cmd_vbeinfo): ... this. Save video modes before
6771         iterating. Skip a video mode, if it is not available, not enough
6772         information is given or it is monochrome. Show the memory
6773         model. Leave the interpretation of MODEVAR to grub_strtoul
6774         completely.
6775         (GRUB_MOD_INIT): Rename vbe_list_modes to vbeinfo.
6776         (GRUB_MOD_FINI): Likewise.
6778         * commands/i386/pc/vbetest.c (grub_cmd_vbe_test): Renamed to ...
6779         (grub_cmd_vbetest): ... this. Don't print unnecessarily. Use
6780         grub_err_t instead of grub_uint32_t. Don't use SPTR. Remove a
6781         duplicated grub_env_get. Leave the interpretation of MODEVAR to
6782         grub_strtoul completely.
6783         (real2pm): Removed.
6784         (GRUB_MOD_INIT): Rename vbe_test to vbetest.
6785         (GRUB_MOD_FINI): Likewise.
6787         * normal/misc.c: Include grub/mm.h.
6789         * conf/i386-pc.rmk (pkgdata_MODULES): Replaced vbe_test.mod and
6790         vbe_list_modes with vbetest.mod and vbeinfo.mod.
6791         (vbe_list_modes_mod_SOURCES): Removed.
6792         (vbe_list_modes_mod_CFLAGS): Likewise.
6793         (vbe_test_mod_SOURCES): Likewise.
6794         (vbe_test_mod_CFLAGS): Likewise.
6795         (vbeinfo_mod_SOURCES): New variable.
6796         (vbeinfo_mod_CFLAGS): Likewise.
6797         (vbetest_mod_SOURCES): Likewise.
6798         (vbetest_mod_CFLAGS): Likewise.
6800 2005-08-18  Yoshinori K. Okuji  <okuji@enbug.org>
6802         * normal/misc.c: New file.
6804         * DISTLIST: Added normal/misc.c.
6805         
6806         * partmap/amiga.c (amiga_partition_map_iterate): Add an argument
6807         DISK to HOOK. Call HOOK with DISK.
6808         * partmap/apple.c (apple_partition_map_iterate): Likewise.
6809         * partmap/pc.c (pc_partition_map_iterate): Likewise.
6810         * partmap/sun.c (sun_partition_map_iterate): Likewise.
6812         * normal/menu_entry.c (struct screen): Added a new member
6813         "completion_shown".
6814         (completion_buffer): New global variable.
6815         (make_screen): Set SCREEN->COMPLETION_SHOWN to zero.
6816         (store_completion): New function.
6817         (complete): Likewise.
6818         (clear_completions): Likewise.
6819         (grub_menu_entry_run): If SCREEN->COMPLETION_SHOWN is non-zero,
6820         call clear_completions and reset SCREEN->COMPLETION_SHOWN. If C is
6821         a tab, call complete.
6823         * normal/completion.c (disk_dev): Removed.
6824         (print_simple_completion): Likewise.
6825         (print_partition_completion): Likewise.
6826         (print_func): New global variable.
6827         (add_completion): Do not take the arguments WHAT or PRINT any
6828         longer. Added a new argument TYPE. Instead of printing directly,
6829         call PRINT_FUNC if not NULL.
6830         All callers changed.
6831         (complete_device): Use a local variable DEV instead of
6832         DISK_DEV. Do not move CURRENT_WORD to the end of a device name.
6833         (grub_normal_do_completion): Take a new argument HOOK. Do not
6834         initialize DISK_DEV. Initialize PRINT_FUNC to HOOK. If RET is an
6835         empty string, return NULL instead.
6836         All callers changed.
6838         * normal/cmdline.c (print_completion): New function.
6840         * kern/partition.c (grub_partition_iterate): Add an argument DISK
6841         to HOOK.
6842         All callers changed.
6844         * kern/disk.c (grub_print_partinfo): Removed.
6846         * include/grub/partition.h (struct grub_partition_map): Add a new
6847         argument DISK into HOOK of ITERATE.
6848         (grub_partition_iterate): Add a new argument DISK to HOOK.
6850         * include/grub/normal.h (enum grub_completion_type): New enum.
6851         (grub_completion_type_t): New type.
6852         (GRUB_COMPLETION_TYPE_COMMAND): New constant.
6853         (GRUB_COMPLETION_TYPE_DEVICE): Likewise.
6854         (GRUB_COMPLETION_TYPE_PARTITION): Likewise.
6855         (GRUB_COMPLETION_TYPE_FILE): Likewise.
6856         (grub_normal_do_completion): Added a new argument HOOK.
6857         (grub_normal_print_device_info): New prototype.
6859         * include/grub/disk.h (grub_print_partinfo): Removed.
6861         * conf/i386-pc.rmk (grub_emu_SOURCES): Added normal/misc.c.
6862         (normal_mod_SOURCES): Likewise.
6863         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6864         (normal_mod_SOURCES): Likewise.
6866         * commands/ls.c (grub_ls_list_disks): Use
6867         grub_normal_print_device_info instead of grub_print_partinfo. Free
6868         PNAME.
6869         (grub_ls_list_files): Use grub_normal_print_device_info instead of
6870         duplicating the code.
6872 2005-08-16  Vesa Jaaskelainen  <chaac@nic.fi>
6874         * commands/i386/pc/vbe_list_modes.c: Update source formatting to
6875         follow GCS more precisely.
6876         * commands/i386/pc/vbe_test.c: Likewise.
6877         * include/grub/i386/pc/vbe.h: Likewise.
6878         * term/i386/pc/vesafb.c: Likewise.
6879         * video/i386/pc/vbe.c: Likewise.
6881 2005-08-16  Vesa Jaaskelainen  <chaac@nic.fi>
6883         * DISTLIST: Added term/i386/pc/vesafb.c
6884         DISTLIST: Added video/i386/pc/vbe.c
6885         DISTLIST: Added commands/i386/pc/vbe_list_modes.c.
6886         DISTLIST: Added commands/i386/pc/vbe_test.c.
6887         * commands/i386/pc/vbe_list_modes.c: New file.
6888         * commands/i386/pc/vbe_test.c: Likewise.
6889         * term/i386/pc/vesafb.c: Likewise.
6890         * video/i386/pc/vbe.c: Likewise.
6891         * include/grub/i386/pc/vbe.h (GRUB_VBE_DEFAULT_VIDEO_MODE): Added define.
6892         (grub_vbe_probe) Added prototype.
6893         (grub_vbe_set_video_mode) Likewise.
6894         (grub_vbe_get_video_mode) Likewise.
6895         (grub_vbe_get_video_mode_info) Likewise.
6896         (grub_vbe_set_pixel_rgb) Likewise.
6897         (grub_vbe_set_pixel_index) Likewise.
6898         * conf/i386-pc.rmk (pkgdata_MODULES): Added vbe.mod.
6899         (pkgdata_MODULES): Added vesafb.mod.
6900         (pkgdata_MODULES): Added vbe_list_modes.mod.
6901         (pkgdata_MODULES): Added vbe_test.mod.
6902         (vbe_mod_SOURCES): Added.
6903         (vbe_mod_CFLAGS): Likewise.
6904         (vesafb_mod_SOURCES): Likewise.
6905         (vesafb_mod_CFLAGS): Likewise.
6906         (vbe_list_modes_mod_SOURCES): Likewise.
6907         (vbe_list_modes_mod_CFLAGS): Likewise.
6908         (vbe_test_mod_SOURCES): Likewise.
6909         (vbe_test_mod_CFLAGS): Likewise.
6911 2005-08-14  Yoshinori K. Okuji  <okuji@enbug.org>
6913         * normal/command.c (grub_command_execute): If INTERACTIVE is
6914         false and GRUB_COMMAND_FLAG_NO_ECHO is not specified, print
6915         CMDLINE. Disable the pager if INTERACTIVE is true.
6916         All callers are changed.
6918         * normal/main.c (grub_normal_execute): Read command.lst and fs.lst
6919         before reading a config file.
6920         * normal/main.c (read_config_file): Even if a command is not
6921         found, register it if it is within an entry.
6923         * util/grub-emu.c: Include sys/types.h and unistd.h.
6924         (options): Added --hold.
6925         (struct arguments): Added a new member "hold".
6926         (parse_opt): If KEY is 'H', set ARGS->HOLD to ARG or -1 if ARG is
6927         missing.
6928         (main): Initialize ARGS.HOLD to zero. Wait until ARGS.HOLD is
6929         cleared by a debugger, if it is not zero.
6931         * include/grub/normal.h (grub_command_execute): Add an argument
6932         INTERACTIVE.
6934 2005-08-14  Vesa Jaaskelainen  <chaac@nic.fi>
6936         * DISTLIST: Added include/grub/i386/pc/vbe.h.
6938 2005-08-13  Yoshinori K. Okuji  <okuji@enbug.org>
6940         * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Replace the test
6941         program with another one, because the old one didn't detect a bug
6942         in gcc-3.4. Always use regparm 2, because the new test is still
6943         not enough for gcc-4.0. Someone must investigate a simple test
6944         case which detects a bug in gcc-4.0.
6946 2005-08-12  Yoshinori K. Okuji  <okuji@enbug.org>
6948         * DISTLIST: Added normal/completion.c.
6950         * normal/completion.c: New file.
6951         
6952         * term/i386/pc/console.c (grub_console_getwh): New function.
6953         (grub_console_term): Assign grub_console_getwh to getwh.
6955         * normal/cmdline.c (grub_tab_complete): Removed. Now the same
6956         function is defined in normal/completion.c as
6957         grub_normal_do_completion.
6958         (grub_cmdline_get): Use grub_normal_do_completion instead of
6959         grub_tab_complete.
6961         * kern/partition.c (grub_partition_map_iterate): Return 1 if HOOK
6962         returns non-zero, otherwise return 0.
6963         (grub_partition_iterate): First, probe the partition map. Then,
6964         call ITERATE only for this partition map.
6966         * kern/misc.c (grub_strncmp): Rewritten.
6968         * kern/disk.c (grub_disk_dev_iterate): Return 1 if P->ITERATE
6969         returns non-zero. Otherwise return 0.
6971         * include/grub/partition.h (grub_partition_map_iterate): Return
6972         int instead of void.
6974         * include/grub/normal.h (grub_normal_do_completion): New prototype.
6976         * include/grub/misc.h (grub_strncmp): Change the type of N to
6977         grub_size_t.
6979         * include/grub/disk.h (grub_disk_dev_iterate): Return int instead
6980         of void.
6982         * normal/menu.c (draw_border): Cast GRUB_TERM_BORDER_WIDTH to
6983         unsigned explictly before comparing it with I.
6985         * kern/main.c (grub_env_write_root): Add the attribute unused into
6986         VAR.
6988         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
6989         normal/completion.c.
6990         (normal_mod_SOURCES): Likewise.
6991         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
6992         (normal_mod_SOURCES): Likewise.
6994         * normal/command.c (grub_iterate_commands): If ITERATE returns
6995         non-zero, return one immediately.
6997 2005-08-09  Vesa Jaaskelainen  <chaac@nic.fi>
6999         * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vbe.h.
7000         * kern/i386/pc/startup.S: Updated Global Descriptor table's
7001         descriptions.
7002         (grub_vbe_get_controller_info): New function.
7003         (grub_vbe_get_mode_info): Likewise.
7004         (grub_vbe_set_mode): Likewise.
7005         (grub_vbe_get_mode): Likewise.
7006         (grub_vbe_set_memory_window): Likewise.
7007         (grub_vbe_get_memory_window): Likewise.
7008         (grub_vbe_set_scanline_length): Likewise.
7009         (grub_vbe_get_scanline_length): Likewise.
7010         (grub_vbe_set_display_start): Likewise.
7011         (grub_vbe_get_display_start): Likewise.
7012         (grub_vbe_set_palette_data): Likewise.
7013         * include/grub/i386/pc/vbe.h: New file.
7015 2005-08-08  Hollis Blanchard  <hollis@penguinppc.org>
7017         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
7018         kern/ieee1275/of.c with kern/ieee1275/ieee1275.c.
7019         * DISTLIST: Likewise.
7020         * kern/ieee1275/of.c: Moved to ...
7021         * kern/ieee1275/ieee1275.c: ... here.
7023 2005-08-08  Hollis Blanchard  <hollis@penguinppc.org>
7025         * term/ieee1275/ofconsole.c: Include <grub/mm.h>.
7026         (grub_ofconsole_getwh): Cast -1 to type grub_ieee1275_ihandle_t.
7027         Pass 0 as `end' parameter to grub_strtoul().
7029 2005-08-08  Hollis Blanchard  <hollis@penguinppc.org>
7031         * include/grub/powerpc/ieee1275/console.h: Do not include
7032         <grub/types.h>.  Do not include <grub/symbol.h>.  Remove ASM_FILE
7033         ifdef.
7034         (grub_console_cur_color): Remove i386-specific prototype.
7035         (grub_console_real_putchar): Likewise.
7036         (grub_console_checkkey): Likewise.
7037         (grub_console_getkey): Likewise.
7038         (grub_console_getxy): Likewise.
7039         (grub_console_gotoxy): Likewise.
7040         (grub_console_cls): Likewise.
7041         (grub_console_setcursor): Likewise.
7042         * kern/powerpc/ieee1275/init.c: Don't include <grub/console.h>.
7043         Include <grub/machine/console.h>.
7044         * term/ieee1275/ofconsole.c: Likewise.
7046 2005-08-08  Yoshinori K. Okuji  <okuji@enbug.org>
7048         * Makefile.in (LIBLZO): New variable.
7050         * configure.ac: Check for LZO version 2.
7052         * util/i386/pc/grub-mkimage.c [HAVE_LZO_LZO1X_H]: Include
7053         lzo/lzo1x.h instead of lzo1x.h.
7055         * conf/i386-pc.rmk (grub_mkimage_LDFLAGS): Use $(LIBLZO) instead
7056         of -llzo.
7058         * util/i386/pc/grub-setup.c (main): Do not free PREFIX
7059         twice. Reported by Vladimir Serbinenko <phcoder@gmail.com>.
7061         * partmap/pc.c (pc_partition_map_probe): Restore P->DATA after
7062         copying the data from PARTITION to P.
7064 2005-08-07  Yoshinori K. Okuji  <okuji@enbug.org>
7066         * kern/rescue.c (grub_rescue_cmd_rmmod): If the reference count is
7067         negative, unload the module.
7069         * util/i386/pc/grub-setup.c (setup): The name of the PC partition
7070         map is "pc_partition_map" but not "pc".
7071         (usage): Fix the description. The options are --boot-image and
7072         --core-image but not --boot-file or --core-file.
7073         (main): If not specified explicitly, make BOOT_FILE and CORE_FILE
7074         based on DEFAULT_BOOT_FILE and DEFAULT_CORE_FILE with DIR or
7075         DEFAULT_DIRECTORY.
7077         * util/i386/pc/grub-install.in: Do not specify --boot-file or
7078         --core-file. Specify INSTALL_DEVICE as an argument.
7080         * util/console.c: Include config.h.
7081         [HAVE_NCURSeS_CURSES_H]: Include ncurses/curses.h.
7082         [HAVE_NCURSES_H]: Include ncurses.h.
7083         [HAVE_CURSES_H]: Include curses.h.
7084         [!A_NORMAL] (A_NORMAL): Defined as zero.
7085         [!A_STANDOUT] (A_STANDOUT): Likewise.
7087         * conf/i386-pc.rmk (grub_emu_LDFLAGS): Use $(LIBCURSES) instead of
7088         -lncurses.
7089         * conf/powerpc-ieee1275.rmk (grub_emu_LDFLAGS): Likewise.
7091         * configure.ac: Check for curses libraries and headers.
7093         * Makefile.in (LIBCURSES): New variable.
7095         * genmk.rb (Script::rule): Set the executable bits.
7097         * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): The
7098         name of the PC partition map is "pc_partition_map" but not "pc".
7100 2005-08-07  Yoshinori K. Okuji  <okuji@enbug.org>
7102         * util/i386/pc/grub-install.in (grub_probefs): New variable.
7103         (modules): Likewise.
7104         (usage): Added descriptions for --modules and --grub-probefs.
7105         Handle --modules and --grub-probefs. Save the arguments in MODULES
7106         and GRUB_PROBEFS, respectively.
7107         Auto-detect a filesystem module against GRUBDIR. If the result is
7108         empty and modules are not specified explicitly, abort the
7109         installation. Add the result to MODULES.
7111         * DISTLIST: Removed boot/powerpc/ieee1275/ieee1275.c,
7112         disk/powerpc/ieee1275/ofdisk.c,
7113         include/grub/powerpc/ieee1275/init.h and
7114         term/powerpc/ieee1275/ofconsole.c.
7115         Added disk/ieee1275/ofdisk.c, kern/ieee1275/of.c and
7116         term/ieee1275/ofconsole.c.
7118         * include/grub/powerpc/ieee1275/console.h: Resurrected.
7120         * COPYING: Upgraded to the latest version. Only the address of the
7121         FSF office has changed.
7122         
7123 2005-08-07  Yoshinori K. Okuji  <okuji@enbug.org>
7125         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
7126         kern/ieee1275.c with kern/ieee1275/of.c.
7128         * kern/ieee1275.c: Moved to ...
7129         * kern/ieee1275/of.c: ... here.
7131 2005-08-06  Yoshinori K. Okuji  <okuji@enbug.org>
7133         * conf/i386-pc.rmk (kernel_img_HEADERS): Reordered for
7134         readablity.
7136         * config.guess: Updated to the latest version from gnulib.
7137         * config.sub: Likewise.
7138         * install.sh: Likewise.
7139         * mkinstalldirs: Likewise.
7141         * include/grub/console.h: Removed. This file is arch-specific. Do
7142         not put this in include/grub.
7144         * include/grub/i386/pc/console.h: Resurrected.
7146         * util/console.c: Include grub/machine/console.h instead of
7147         grub/console.h.
7148         * util/grub-emu.c: Likewise.
7150 2005-08-04  Marco Gerards  <metgerards@student.han.nl>
7152         * kern/term.c (grub_putcode): Use `grub_getwh' instead of
7153         hardcoded value.
7154                 
7155         From Vincent Pelletier  <subdino2004@yahoo.fr>
7156         * include/grub/term.h (GRUB_TERM_WIDTH, GRUB_TERM_HEIGHT):
7157         Redefined to use grub_getwh.
7158         (grub_term): New member named getwh.
7159         (grub_getwh): New prototype.
7160         * kern/term.c (grub_getwh): New function.
7161         * term/i386/pc/console.c (grub_console_getwh): New function.
7162         (grub_console_term): New member `getwh'.
7163         * term/i386/pc/vga.c (grub_vga_getwh): New function.
7164         (grub_vga_term): New member `getwh'.
7165         * term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Use
7166         grub_ssize_t.
7167         (grub_ofconsole_getw): New function.
7168         (grub_ofconsole_init): Use grub_ssize_t and unsigned char.
7169         (grub_ofconsole_term): New field named getwh and new initial
7170         value.
7172 2005-08-03  Hollis Blanchard  <hollis@penguinppc.org>
7174         * include/grub/powerpc/ieee1275/ieee1275.h: Move ...
7175         * include/grub/ieee1275/ieee1275.h: ... to here.  All users updated.
7176         Move `abort', `grub_reboot', and `grub_halt' prototypes ...
7177         * include/grub/powerpc/ieee1275/kernel.h: ... to here.
7178         * commands/ieee1275/halt.c: Include <grub/machine/kernel.h> instead
7179         of <grub/machine/ieee1275.h>.
7180         * commands/ieee1275/reboot.c: Likewise.
7181         * boot/powerpc/ieee1275/ieee1275.c: Move ...
7182         * kern/ieee1275.c: ... to here.  All users updated.  Change all
7183         parameter structs to use new type `grub_ieee1275_cell_t'.
7184         * term/powerpc/ieee1275/ofconsole.c: Move ...
7185         * term/ieee1275/ofconsole.c: ... to here.  All users updated.
7186         * disk/powerpc/ieee1275/ofdisk.c: Move ...
7187         * disk/ieee1275/ofdisk.c: ... to here.  All users updated.
7188         * boot/powerpc/ieee1275/cmain.c: Change `grub_ieee1275_entry_fn' type
7189         to return int.
7190         * include/grub/i386/pc/console.h: Move to include/grub/console.h.
7191         Remove unused prototypes.  All users updated.
7192         * include/grub/powerpc/ieee1275/console.h: Removed.
7193         * include/grub/powerpc/ieee1275/ieee1275.h: Define
7194         `grub_ieee1275_cell_t'.
7195         * kern/powerpc/ieee1275/openfw.c: Include <grub/machine/kernel.h>.
7196         Cast comparisons with -1 to the correct type.
7197         * loader/powerpc/ieee1275/linux.c (kernel_entry_t): Change parameter
7198         type to match `grub_ieee1275_entry_fn'.
7200 2005-08-01  Yoshinori K. Okuji  <okuji@enbug.org>
7202         * DISTLIST: Added util/i386/pc/grub-probefs.c.
7204         * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-probefs.
7205         (grub_setup_SOURCES): Removed partmap/amiga.c, partmap/apple.c and
7206         partmap/sun.c.
7207         (grub_probefs_SOURCES): New variable.
7209         * util/i386/pc/grub-probefs.c: New file.
7211         * util/i386/pc/grub-setup.c (main): Call
7212         grub_pc_partition_map_init, grub_ufs_init, grub_minix_init,
7213         grub_hfs_init and grub_jfs_init to initialize the system. Call
7214         grub_ufs_fini, grub_minix_fini, grub_hfs_fini, grub_jfs_init and
7215         grub_pc_partition_map_fini to finish the system.
7217 2005-07-31  Yoshinori K. Okuji  <okuji@enbug.org>
7219         * loader/i386/pc/multiboot.c (grub_multiboot_is_elf32): New
7220         function.
7221         (grub_multiboot_load_elf32): Likewise.
7222         (grub_multiboot_is_elf64): Likewise.
7223         (grub_multiboot_load_elf64): Likewise.
7224         (grub_multiboot_load_elf): Likewise.
7225         (grub_rescue_cmd_multiboot): Call grub_multiboot_load_elf to load
7226         an ELF32 or ELF64 file.
7227         This is based on a patch from Ruslan Nikolaev <nruslan@mail.com>.
7229         From Serbinenko Vladimir <serbinenko.vova@list.ru>:
7230         * kern/disk.c (grub_print_partinfo): Check if FS->LABEL is not
7231         NULL before calling FS->LABEL.
7232         * fs/fat.c (grub_fat_dir): Initialize DIRNAME to NULL.
7233         * commands/ls.c (grub_ls_list_files): Show labels, if possible.
7234         (grub_ls_list_disks): Check if FS and FS->LABEL are not NULL
7235         before calling FS->LABEL.
7237 2005-07-26  Yoshinori K. Okuji  <okuji@enbug.org>
7239         * util/i386/pc/grub-install.in (datadir): New variable.
7240         (libdir): Removed.
7241         (pkgdatadir): New variable.
7242         (pkglibdir): Removed.
7244 2005-07-24  Yoshinori K. Okuji  <okuji@enbug.org>
7246         * DISTLIST: Added util/i386/pc/grub-install.in.
7248         * util/i386/pc/grub-install.in: New file.
7250         * conf/i386-pc.rmk (sbin_SCRIPTS): New variable.
7251         (grub_install_SOURCES): Likewise.
7253         * genmk.rb: Added support for scripts.
7254         (Script): New class.
7255         (scripts): New variable.
7257         * Makefile.in (install-local): Install sbin_SCRIPTS by
7258         INSTALL_SCRIPT.
7259         (uninstall): Remove sbin_SCRIPTS.
7261         * util/i386/pc/grub-setup.c (main): If the argument is not a GRUB
7262         device, try to get a GRUB device by
7263         grub_util_biosdisk_get_grub_dev.
7264         Free DEST_DEV.
7266         * util/i386/pc/grub-mkdevicemap.c (usage): Remove a duplicated
7267         description for --device-map.
7269 2005-07-20  Yoshinori K. Okuji  <okuji@enbug.org>
7271         Change the semantics of variable hooks. They now return strings
7272         instead of error values.
7273         
7274         * util/i386/pc/grub-setup.c: Include grub/env.h.
7275         (setup): Use grub_device_set_root instead of grub_env_set.
7277         * kern/rescue.c (grub_rescue_cmd_root): Use grub_env_set and
7278         grub_env_get instead of grub_device_set_root and
7279         grub_device_get_root, respectively.
7281         * kern/main.c (grub_env_write_root): New function.
7282         (grub_set_root_dev): Register grub_env_write_hook for "root". Use
7283         grub_env_set instead of grub_device_set_root.
7285         * kern/env.c (HASHSZ): Reduced to 13, because GRUB does not need
7286         many variables.
7287         (grub_env_set): Set ENV->VALUE to the result of ENV->WRITE_HOOK
7288         rather than calling ENV->WRITE_HOOK afterwards.
7289         (grub_env_get): Return the result of ENV->READ_HOOK rather than
7290         passing a pointer of a pointer.
7291         (grub_register_variable_hook): Change the types of "read_hook" and
7292         "write_hook" to grub_env_read_hook_t and grub_env_write_hook_t,
7293         respectively.
7294         Allocate the default empty string on the heap, because this string
7295         may be freed later.
7297         * kern/device.c: Include grub/env.h.
7298         (grub_device_set_root): Removed.
7299         (grub_device_get_root): Likewise.
7300         (grub_device_open): Use grub_env_get instead of
7301         grub_device_get_root.
7303         * include/grub/env.h (grub_env_read_hook_t): New type.
7304         (grub_env_write_hook_t): Likewise.
7305         (grub_env_var): Change the types of "read_hook" and "write_hook"
7306         to grub_env_read_hook_t and grub_env_write_hook_t, respectively.
7307         (grub_register_variable_hook): Likewise.
7309         * include/grub/device.h (grub_device_set_root): Removed.
7310         (grub_device_set_root): Likewise.
7312         * fs/fat.c (grub_fat_dir): Make a copy of PATH in DIRNAME, and
7313         make sure that DIRNAME terminates with '/', so that
7314         grub_fat_find_dir will fail if PATH is not a directory.
7316         * commands/ls.c (grub_ls_list_files): Remove the qualifier const
7317         from DIRNAME.
7318         Use the qualifier auto for print_files and print_files_long.
7319         If FS->DIR sets GRUB_ERRNO to GRUB_ERR_BAD_FILE_TYPE, try DIRNAME
7320         as a regular file.
7321         Put a newline only if there is no error.
7322         (grub_cmd_ls): Remove grub_ls_print_files, because this is not
7323         used.
7325 2005-07-20  Yoshinori K. Okuji  <okuji@enbug.org>
7327         * kern/partition.c (grub_partition_probe): Initialize PART to
7328         NULL. Otherwise, when no partition map is registered, this returns
7329         a garbage.
7331 2005-07-19  Yoshinori K. Okuji  <okuji@enbug.org>
7333         * partmap/apple.c (apple_partition_map_iterate): Check if POS
7334         equals GRUB_DISK_SECTOR_SIZE to see if the partition table is
7335         valid.
7337 2005-07-18  Yoshinori K. Okuji  <okuji@enbug.org>
7339         * commands/ls.c (grub_ls_list_disks): Print the filesystem
7340         information on each device, if it does not have partitions. Print
7341         "Device" instead of "Disk", because this function is not specific
7342         to disk devices.
7344         * normal/main.c (grub_rescue_cmd_normal): Make the variable CONFIG
7345         static to ensure that it is put on the memory rather than a
7346         register.
7348 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
7350         * commands/cat.c (GRUB_MOD_INIT): Use better documentation.
7351         (grub_cat_init): Likewise.
7352         * loader/i386/pc/chainloader_normal.c (GRUB_MOD_INIT): Likewise.
7353         (options): Likewise.
7354         * commands/configfile.c (GRUB_MOD_INIT): Likewise.
7355         (grub_configfile_init): Likewise.
7356         * font/manager.c (GRUB_MOD_INIT): Likewise.
7357         * commands/help.c (GRUB_MOD_INIT): Likewise.
7358         (grub_help_init): Likewise.
7359         * normal/command.c (grub_command_init): Likewise.
7360         * loader/i386/pc/linux_normal.c (GRUB_MOD_INIT): Likewise.
7361         * disk/loopback.c (grub_loop_init): Likewise.
7362         (GRUB_MOD_INIT): Likewise.
7363         * commands/ls.c (grub_ls_init): Likewise.
7364         (GRUB_MOD_INIT): Likewise.
7365         (options): Likewise.
7366         * commands/boot.c (grub_boot_init): Likewise.
7367         (GRUB_MOD_INIT): Likewise.
7368         * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Likewise.
7369         * commands/i386/pc/reboot.c (grub_reboot_init): Likewise.
7370         (GRUB_MOD_INIT): Likewise.
7371         * commands/cmp.c (grub_cmp_init): Likewise.
7372         (GRUB_MOD_INIT): Likewise.
7374         * normal/arg.c: Use <> instead of "" to include header files.
7375         (SHORT_ARG_HELP): New macro.
7376         (SHORT_ARG_USAGE): Likewise.
7377         (help_options): Specify SHORT_ARG_HELP and SHORT_ARG_USAGE instead
7378         of 'h' and 'u' for help and usage, respectively. Use more GNU-like
7379         descriptions.
7380         (find_short): Check if C is 'h' or 'u' explicitly.
7381         (grub_arg_show_help): Use space characters instead of tabs. Treat
7382         SHORT_ARG_HELP and SHORT_ARG_USAGE exceptionally so that -h and -u
7383         are shown with --help and --usage only if they are not used for
7384         the command itself.
7385         (parse_option): Use SHORT_ARG_HELP and SHORT_ARG_USAGE instead of
7386         'h' and 'u'.
7388         * include/grub/arg.h (struct grub_arg_option): Add the qualifier
7389         const into "longarg". Change the type of "shortarg" to int.
7391 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
7393         * boot/i386/pc/boot.S (boot_drive_check): New label.
7395         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRIVE_CHECK): New
7396         macro.
7398         * util/i386/pc/grub-setup.c (setup): Added a workaround for BIOSes
7399         which do not pass a boot drive correctly. Copied from GRUB Legacy.
7401 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
7403         * kern/i386/pc/startup.S (gate_a20_try_system_control_port_a):
7404         When turning off Gate A20, skip the check and return immediately,
7405         because this is not fatal usually.
7407 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
7409         * conf/i386-pc.rmk (pxeboot_img_LDFLAGS): The text address should
7410         be 0x7C00 instead of 0x8000.
7412         * boot/i386/pc/pxeboot.S: Rewritten.
7414         * kern/i386/pc/startup.S (gate_a20_try_bios): No need to specify
7415         EXT_C.
7416         (gate_a20_check_state): Read a byte from 0x108000. Invert the
7417         result.
7419 2005-07-16  Yoshinori K. Okuji  <okuji@enbug.org>
7421         * kern/i386/pc/startup.S (grub_gate_a20): Rewritten for
7422         robustness. This routine now supports a BIOS call and System
7423         Control Port A to modify the gate A20.
7425         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
7426         Increased to 0x440.
7428 2005-07-12  Hollis Blanchard  <hollis@penguinppc.org>
7430         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): dprintf the
7431         device path and resulting ihandle.
7432         (grub_ofdisk_close): dprintf the ihandle being closed.
7433         (grub_ofdisk_read): dprintf function parameters.
7434         * kern/mm.c (grub_mm_init_region): Likewise.
7435         * loader/powerpc/ieee1275/linux.c: Remove extra whitespace.
7436         (grub_linux_boot): dprintf the Linux entry point, initrd address and
7437         size, and boot arguments.
7438         (grub_rescue_cmd_linux): dprintf each ELF segment's address and size
7439         before loading into memory.
7440         (grub_rescue_cmd_initrd): dprintf the initrd's address and size
7441         before loading into memory.
7443 2005-07-12  Yoshinori K. Okuji  <okuji@enbug.org>
7445         * kern/mm.c: Added much documentation.
7446         (GRUB_MM_ALIGN_LOG2): When GRUB_CPU_SIZEOF_VOID_P is
7447         8, set to 5 instead of 8.
7449 2005-07-10  Yoshinori Okuji  <okuji@enbug.org>
7451         * DISTLIST: Added util/i386/pc/grub-mkimage.c.
7453         * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-mkdevicemap.
7454         (grub_mkdevicemap_SOURCES): New variable.
7456         * util/i386/pc/grub-mkdevicemap.c: New file. Mostly copied from
7457         lib/device.c of GRUB Legacy.
7459 2005-07-10  Yoshinori Okuji  <okuji@enbug.org>
7461         * commands/ls.c (grub_ls_list_files): Check if *PATH is NUL
7462         instead of PATH is NULL.
7464 2005-07-09  Vincent Pelletier  <subdino2004@yahoo.fr>
7466         * commands/cmp.c (BUFFER_SIZE): New macro.
7467         (grub_cmd_cmp): Close the right file at the right time.  Compare
7468         only data just read.  Don't report files of different  size as
7469         identical.  Dynamically allocate buffers.  Move variable
7470         declarations at the beginning of function.
7472 2005-07-09  Yoshinori Okuji  <okuji@enbug.org>
7474         * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): The return value was
7475         reverse.
7477 2004-07-04  Vincent Pelletier  <subdino2004@yahoo.fr>
7479         * normal/cmdline.c (grub_cmdline_get): Don't fallback on ctrl-d
7480         when backspace is pressed at beginning of line.
7482 2005-07-03  Yoshinori Okuji  <okuji@enbug.org>
7484         * DISTLIST: Added genfslist.sh.
7486         * normal/main.c (fs_module_list): New variable.
7487         (autoload_fs_module): New function.
7488         (read_fs_list): Likewise.
7489         (grub_normal_execute): Call read_fs_list.
7491         * kern/fs.c (grub_fs_autoload_hook): New variable.
7492         (grub_fs_probe): Added support for auto-loading.
7494         * include/grub/normal.h (struct grub_fs_module_list): New struct.
7495         (grub_fs_module_list_t): New type.
7497         * include/grub/fs.h (grub_fs_autoload_hook_t): New type.
7498         (grub_fs_autoload_hook): New prototype.
7500         * genfslist.sh: New file.
7501         
7502         * genmk.rb: Added a rule to generate a filesystem list.
7504 2005-06-30  Marco Gerards  <metgerards@student.han.nl>
7506         * configure.ac: Fix the test for cross-compiling.
7508         * genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'.  Don't
7509         define GRUB_UTIL anymore.
7511         * util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes
7512         so this function works on other systems than just big endian.
7513         (load_modules): Likewise.
7514         (add_segments): Likewise.
7516 2005-06-23  Hollis Blanchard  <hollis@penguinppc.org>
7518         * kern/misc.c (grub_vsprintf): Add `longfmt'.  If format string
7519         contains `l' modifier, get a long from va_arg().
7521 2005-06-23  Yoshinori K. Okuji  <okuji@enbug.org>
7523         * kern/mm.c (grub_free): If the next free block which is being
7524         merged is the first free block, set the first block to the block
7525         being freed.
7526         Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.
7528 2005-05-08  Hollis Blanchard  <hollis@penguinppc.org>
7530         * boot/powerpc/ieee1275/cmain.c (cmain): Initialize
7531         `grub_ieee1275_chosen'.
7533 2005-05-08  Hollis Blanchard  <hollis@penguinppc.org>
7535         * boot/powerpc/ieee1275/cmain.c (module_info): Remove definition.
7536         (grub_ieee1275_chosen): New variable.
7537         (cmain): Initialize and use `grub_ieee1275_chosen' instead of
7538         `chosen'.
7539         * boot/powerpc/ieee1275/crt0.S (init_stack): Remove stack space.
7540         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
7541         Rename first argument to `phandle' for consistency.
7542         (grub_ieee1275_get_property_length): Likewise.
7543         (grub_ieee1275_next_property): Likewise.  Change type of first argument
7544         to grub_ieee1275_phandle_t.
7545         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn):
7546         Move export next to declaration.
7547         (grub_ieee1275_chosen): New variable.
7548         * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MODULE_BASE):
7549         Correct cosmetic typo.
7550         * kern/powerpc/ieee1275/init.c (grub_set_prefix): Use
7551         `grub_ieee1275_chosen'.
7552         * kern/powerpc/ieee1275/openfw.c (grub_map): Likewise.
7553         * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Likewise.
7554         (grub_rescue_cmd_linux): Set `initrd_addr' to 0.
7555         * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_refresh): Use
7556         `grub_ieee1275_chosen'.
7558 2005-05-10  Hollis Blanchard  <hollis@penguinppc.org>
7560         * boot/powerpc/ieee1275/cmain.c (cmain): Remove code to parse
7561         /chosen/bootargs.
7562         * kern/powerpc/ieee1275/init.c (grub_machine_init): Parse
7563         /chosen/bootargs as "variable=value" pairs.
7565 2005-05-08  Vincent Pelletier  <subdino2004@yahoo.fr>
7567         * include/grub/misc.h (grub_dprintf): New macro.
7568         (grub_real_dprintf): New prototype.
7569         (grub_strword): Likewise.
7570         (grub_iswordseparator): Likewise.
7571         * kern/misc.c (grub_real_dprintf): New function.
7572         (grub_strword): Likewise.
7573         (grub_iswordseparator): Likewise.
7575 2005-04-30  Hollis Blanchard  <hollis@penguinppc.org>
7577         * boot/powerpc/ieee1275/cmain.c: Don't include grub/machine/init.h.
7578         (roundup): Remove macro.
7579         (grub_ieee1275_flags): Make static.
7580         (grub_ieee1275_realmode): Remove.
7581         (grub_ieee1275_test_flag): New function.
7582         (grub_ieee1275_set_flag): Likewise.
7583         (find_options): Rename to `grub_ieee1275_find_options'; update
7584         callers. Set GRUB_IEEE1275_FLAG_REAL_MODE and
7585         GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS.
7586         (cmain): New prototype.
7587         (cmain): Use `grub_ieee1275_set_flag' instead of accessing
7588         `grub_ieee1275_flags' directly.
7589         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Remove
7590         machine/biosdisk.h.
7591         * disk/powerpc/ieee1275/ofdisk.c: Include grub/machine/ofdisk.h.
7592         Don't include grub/machine/init.h.
7593         (grub_ofdisk_open): Call `grub_ieee1275_test_flag'.
7594         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
7595         Remove prototype.
7596         (grub_ieee1275_realmode): Likewise.
7597         (grub_ieee1275_flag): New enum.
7598         (grub_ieee1275_test_flag): New prototype.
7599         (grub_ieee1275_set_flag): New prototype.
7600         * include/grub/powerpc/ieee1275/init.h: Remove file.
7601         * include/grub/powerpc/ieee1275/ofdisk.h: New file.
7602         * kern/powerpc/ieee1275/init.c: Don't include grub/machine/init.h.
7603         Include grub/machine/console.h.  Include grub/machine/ofdisk.h.
7604         (grub_machine_fini): Don't call `grub_ieee1275_release'.  Remove
7605         comment.
7606         * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Call
7607         `grub_ieee1275_test_flag'.
7608         (grub_ieee1275_encode_devname): Likewise.
7610 2005-04-21  Hollis Blanchard  <hollis@penguinppc.org>
7612         * include/grub/powerpc/ieee1275/ieee1275.h
7613         (grub_ieee1275_encode_devname): New prototype.
7614         (grub_ieee1275_get_filename): Likewise.
7615         * kern/powerpc/ieee1275/init.c (grub_translate_ieee175_path): New
7616         function.
7617         (grub_set_prefix): Likewise.
7618         (grub_machine_init): Call grub_set_prefix.
7619         * kern/powerpc/ieee1275/openfw.c: Fix typos.
7620         (grub_parse_type): New enum.
7621         (grub_ieee1275_get_devargs): New function.
7622         (grub_ieee1275_get_devname): Likewise.
7623         (grub_ieee1275_parse_args): Likewise.
7624         (grub_ieee1275_get_filename): Likewise.
7625         (grub_ieee1275_encode_devname): Likewise.
7627 2005-03-30  Marco Gerards  <metgerards@student.han.nl>
7629         * kern/powerpc/ieee1275/init.c (grub_machine_fini): Don't call
7630         `grub_loader_unset'.
7632 2005-03-26  Hollis Blanchard  <hollis@penguinppc.org>
7634         * commands/ieee1275/halt.c (grub_cmd_halt): Call grub_halt
7635         instead of grub_ieee1275_interpret.
7636         (grub_halt_init): New function.
7637         (grub_halt_fini): Likewise.
7638         (GRUB_MOD_INIT): Correct message grammar.
7639         * commands/ieee1275/reboot.c (grub_cmd_reboot): Call grub_reboot
7640         instead of grub_ieee1275_interpret.
7641         (grub_reboot_init): New function.
7642         (grub_reboot_fini): Likewise.
7643         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace
7644         commands/i386/pc/halt.c, commands/i386/pc/reboot.c, and
7645         util/i386/pc/misc.c with commands/ieee1275/halt.c,
7646         commands/ieee1275/reboot.c, and util/powerpc/ieee1275/misc.c.
7647         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_fini): New
7648         function.
7649         * include/grub/powerpc/ieee1275/console.h (grub_console_fini):
7650         Add prototype.
7651         * include/grub/powerpc/ieee1275/ieee1275.h (grub_reboot): Add
7652         prototype.
7653         (grub_halt): Likewise.
7654         * include/grub/powerpc/ieee1275/init.h: Remove inaccurate comment.
7655         (cmain): Remove __attribute__((unused)).
7656         * kern/powerpc/ieee1275/init.c (grub_heap_start): New variable.
7657         (grub_heap_len): Likewise.
7658         (grub_machine_fini): New function.
7659         * kern/powerpc/ieee1275/openfw.c (grub_reboot): New function.
7660         (grub_halt): Likewise.
7661         * term/powerpc/ieee1275/ofconsole.c (grub_console_fini): New
7662         function.
7663         * util/powerpc/ieee1275/misc.c: New file.
7665 2005-03-19  Yoshinori K. Okuji  <okuji@enbug.org>
7667         * DISTLIST: New file.
7668         * gendistlist.sh: Likewise.
7669         
7670         * Makefile.in (COMMON_DISTFILES): Removed.
7671         (BOOT_DISTFILES): Likewise.
7672         (CONF_DISTFILES): Likewise.
7673         (DISK_DISTFILES): Likewise.
7674         (FS_DISTFILES): Likewise.
7675         (INCLUDE_DISTFILES): Likewise.
7676         (KERN_DISTFILES): Likewise.
7677         (LOADER_DISTFILES): Likewise.
7678         (TERM_DISTFILES): Likewise.
7679         (UTIL_DISTFILES): Likewise.
7680         (DISTFILES): Likewise.
7681         (uninstall): Uninstall files in $(pkgdata_DATA).
7682         (DISTLIST): New target.
7683         (distdir): Use the contents of the file DISTLIST to get a list of
7684         distributed files.
7686 2005-03-18  Yoshinori K. Okuji  <okuji@enbug.org>
7688         * fs/fat.c (grub_fat_mount): Ignore the 3rd bit of a media
7689         descriptor. This is ported from GRUB Legacy.
7691         * gencmdlist.sh: Added an extra semicolon to make it work with
7692         old sed versions. Reported by Robert Bihlmeyer
7693         <robbe@orcus.priv.at>.
7695 2005-03-08  Yoshinori Okuji  <okuji@enbug.org>
7697         Automatic loading of commands is supported.
7698         
7699         * normal/main.c (read_command_list): New function.
7700         (grub_normal_execute): Call read_command_list.
7702         * normal/command.c (grub_register_command): Return zero or CMD.
7703         Allocate CMD->NAME from the heap.
7704         Initialize CMD->MODULE_NAME to zero.
7705         Find the same name as well. If the same command is found and it is
7706         a dummy command, overwrite members. If it is not a dummy command,
7707         return zero.
7708         (grub_unregister_command): Free Q->NAME and Q->MODULE_NAME.
7709         (grub_command_find): If a dummy command is found, load a module
7710         and retry to find a command only once.
7712         * normal/cmdline.c (grub_tab_complete): Call grub_command_find to
7713         make sure that each command is loaded.
7715         * include/grub/normal.h (GRUB_COMMAND_FLAG_NOT_LOADED): New
7716         macro.
7717         (struct grub_command): Remove const from the member `name'.
7718         Add a new member `module_name'.
7719         (grub_register_command): Return grub_command_t.
7721         * commands/help.c (grub_cmd_help): Call grub_command_find to make
7722         sure that each command is loaded.
7724         * genmk.rb (PModule::rule): Specify a module name without the
7725         suffix ".mod" to gencmdlist.sh.
7727 2005-03-02  Yoshinori K. Okuji  <okuji@enbug.org>
7729         * gencmdlist.sh: New file.
7730         
7731         * genmk.rb (PModule::rule): Generate a rule for a command list.
7732         Clean command.lst.
7733         Generate command.lst from $(COMMANDFILES).
7735         * Makefile.in (COMMON_DISTFILES): Added gencmdlist.sh.
7736         (DATA): Added $(pkgdata_DATA).
7737         (install-local): Install files in $(pkgdata_DATA).
7739 2005-03-02  Yoshinori K. Okuji  <okuji@enbug.org>
7741         * term/i386/pc/vga.c (debug_command): Removed.
7742         (GRUB_MOD_INIT): Do not register the command "debug".
7744         From Hollis Blanchard:
7745         * commands/configfile.c: New file.
7746         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
7747         commands/configfile.c.
7748         (pkgdata_MODULES): Added configfile.mod.
7749         (configfile_mod_SOURCES): New variable.
7750         (configfile_mod_CFLAGS): Likewise.
7751         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
7752         commands/configfile.c.
7753         (pkgdata_MODULES): Added configfile.mod.
7754         (configfile_mod_SOURCES): New variable.
7755         (configfile_mod_CFLAGS): Likewise.
7756         * util/grub-emu.c (main): Call grub_configfile_init and
7757         grub_configfile_fini.
7758         * include/grub/normal.h [GRUB_UTIL] (grub_configfile_init): New
7759         prototype.
7760         [GRUB_UTIL] (grub_configfile_fini): Likewise.
7761         
7762 2005-02-27  Yoshinori K. Okuji  <okuji@enbug.org>
7764         * normal/arg.c (grub_arg_show_help): Do not show the bug report
7765         address.
7767         * commands/help.c (grub_cmd_help): Do not print newlines after
7768         the last command in print_command_help.
7770 2005-02-27  Yoshinori K. Okuji  <okuji@enbug.org>
7772         * commands/default.h: New file.
7773         * commands/timeout.h: Likewise.
7774         * normal/context.c: Likewise.
7775         
7776         * util/misc.c: Do not include sys/times.h.
7777         Include sys/time.h and grub/machine/time.h.
7778         (grub_get_rtc): Rewritten with gettimeofday.
7780         * util/grub-emu.c (main): Call grub_default_init and
7781         grub_timeout_init before grub_normal_init, and call
7782         grub_timeout_fini and grub_default_fini after grub_main.
7784         * util/console.c (grub_ncurses_checkkey): Return the read
7785         character or -1.
7787         * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it
7788         timeouts.
7790         * normal/main.c (read_config_file): Push MENU. If this fails,
7791         print an error and wait for a user input.
7792         Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE.
7793         If a menu is empty or an error occurs, pop MENU.
7794         (grub_normal_execute): Pop and free MENU after grub_menu_run
7795         returns.
7797         * kern/loader.c (grub_loader_boot): Call grub_machine_fini.
7799         * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not
7800         include time.h.
7801         [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
7802         without GRUB_UTIL.
7803         * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include
7804         time.h.
7805         [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
7806         without GRUB_UTIL.
7808         * include/grub/normal.h (struct grub_menu_list): New struct.
7809         (grub_menu_list_t): New type.
7810         (struct grub_context): New struct.
7811         (grub_context_t): New type.
7812         (grub_register_command): Got rid of EXPORT_FUNC.
7813         (grub_unregister_command): Likewise.
7814         (grub_context_get): New prototype.
7815         (grub_context_get_current_menu): Likewise.
7816         (grub_context_push_menu): Likewise.
7817         (grub_context_pop_menu): Likewise.
7818         [GRUB_UTIL] (grub_default_init): Likewise.
7819         [GRUB_UTIL] (grub_default_fini): Likewise.
7820         [GRUB_UTIL] (grub_timeout_init): Likewise.
7821         [GRUB_UTIL] (grub_timeout_fini): Likewise.
7823         * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c,
7824         commands/timeout.c and normal/context.c.
7825         (pkgdata_MODULES): Added default.mod and timeout.mod.
7826         (normal_mod_SOURCES): Added normal/context.c.
7827         (default_mod_SOURCES): New variable.
7828         (default_mod_CFLAGS): Likewise.
7829         (timeout_mod_SOURCES): Likewise.
7830         (timeout_mod_CFLAGS): Likewise.
7831         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from
7832         conf/i386-pc.rmk.
7833         (pkgdata_MODULES): Added default.mod and timeout.mod.
7834         (normal_mod_SOURCES): Added normal/context.c.
7835         (default_mod_SOURCES): New variable.
7836         (default_mod_CFLAGS): Likewise.
7837         (timeout_mod_SOURCES): Likewise.
7838         (timeout_mod_CFLAGS): Likewise.
7840         * Makefile.in (all-local): Added $(MKFILES).
7842 2005-02-21  Vincent Pelletier  <subdino2004@yahoo.fr>
7844         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `partmap/sun.c'.
7845         (grub_emu_SOURCES): Likewise.
7846         (pkgdata_MODULES): Add `sun.mod'.
7847         (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
7848         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
7849         `partmap/sun.c'.
7850         (pkgdata_MODULES): Add `sun.mod'.
7851         (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
7852         * include/grub/partition.h (grub_sun_partition_map_init): New
7853         prototype.
7854         (grub_sun_partition_map_fini): Likewise.
7855         * partmap/sun.c: New file.
7856         * util/grub-emu.c (main): Initialize and de-initialize the sun
7857         partitionmap support.
7859 2005-02-19  Yoshinori K. Okuji  <okuji@enbug.org>
7861         This implements an Emacs-like menu entry editor.
7862         
7863         * normal/menu_entry.c: New file.
7864         
7865         * util/console.c (grub_ncurses_putchar): Translate some Unicode
7866         characters to ASCII.
7867         (saved_char): New variable.
7868         (grub_ncurses_checkkey): Rewritten completely.
7869         (grub_ncurses_getkey): Likewise.
7870         (grub_ncurses_init): Call raw instead of cbreak.
7872         * normal/menu.c (print_entry): Do not put a space.
7873         (init_page): Renamed to ...
7874         (grub_menu_init_page): ... this. All callers changed.
7875         (edit_menu_entry): Removed.
7876         (run_menu): Call grub_menu_entry_run instead of edit_menu_entry.
7878         * normal/cmdline.c (grub_cmdline_run): Call grub_setcursor.
7880         * kern/misc.c (grub_vprintf): Call grub_refresh.
7882         * normal/menu.c (DISP_LEFT): Renamed to ...
7883         * include/grub/term.h (GRUB_TERM_DISP_LEFT): ... this.
7884         * normal/menu.c (DISP_UP): Renamed to ...
7885         * include/grub/term.h (GRUB_TERM_DISP_UP): ... this.
7886         * normal/menu.c (DISP_RIGHT): Renamed to ...
7887         * include/grub/term.h (GRUB_TERM_DISP_RIGHT): ... this.
7888         * normal/menu.c (DISP_DOWN): Renamed to ...
7889         * include/grub/term.h (GRUB_TERM_DISP_DOWN): ... this.
7890         * normal/menu.c (DISP_HLINE): Renamed to ...
7891         * include/grub/term.h (GRUB_TERM_DISP_HLINE): ... this.
7892         * normal/menu.c (DISP_VLINE): Renamed to ...
7893         * include/grub/term.h (GRUB_TERM_DISP_VLINE): ... this.
7894         * normal/menu.c (DISP_UL): Renamed to ...
7895         * include/grub/term.h (GRUB_TERM_DISP_UL): ... this.
7896         * normal/menu.c (DISP_UR): Renamed to ...
7897         * include/grub/term.h (GRUB_TERM_DISP_UR): ... this.
7898         * normal/menu.c (DISP_LL): Renamed to ...
7899         * include/grub/term.h (GRUB_TERM_DISP_LL): ... this.
7900         * normal/menu.c (DISP_LR): Renamed to ...
7901         * include/grub/term.h (GRUB_TERM_DISP_LR): ... this.
7902         * normal/menu.c (TERM_WIDTH): Renamed to ...
7903         * include/grub/term.h (GRUB_TERM_WIDTH): ... this.
7904         * normal/menu.c (TERM_HEIGHT): Renamed to ...
7905         * include/grub/term.h (GRUB_TERM_HEIGHT): ... this.
7906         * normal/menu.c (TERM_INFO_HEIGHT): Renamed to ...
7907         * include/grub/term.h (GRUB_TERM_INFO_HEIGHT): ... this.
7908         * normal/menu.c (TERM_MARGIN): Renamed to ...
7909         * include/grub/term.h (GRUB_TERM_MARGIN): ... this.
7910         * normal/menu.c (TERM_SCROLL_WIDTH): Renamed to ...
7911         * include/grub/term.h (GRUB_TERM_SCROLL_WIDTH): ... this.
7912         * normal/menu.c (TERM_TOP_BORDER_Y): Renamed to ...
7913         * include/grub/term.h (GRUB_TERM_TOP_BORDER_Y): ... this.
7914         * normal/menu.c (TERM_LEFT_BORDER_X): Renamed to ...
7915         * include/grub/term.h (GRUB_TERM_LEFT_BORDER_X): ... this.
7916         * normal/menu.c (TERM_BORDER_WIDTH): Renamed to ...
7917         * include/grub/term.h (GRUB_TERM_BORDER_WIDTH): ... this.
7918         * normal/menu.c (TERM_MESSAGE_HEIGHT): Renamed to ...
7919         * include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): ... this.
7920         * normal/menu.c (TERM_BORDER_HEIGHT): Renamed to ...
7921         * include/grub/term.h (GRUB_TERM_BORDER_HEIGHT): ... this.
7922         * normal/menu.c (TERM_NUM_ENTRIES): Renamed to ...
7923         * include/grub/term.h (GRUB_TERM_NUM_ENTRIES): ... this.
7924         * normal/menu.c (TERM_FIRST_ENTRY_Y): Renamed to ...
7925         * include/grub/term.h (GRUB_TERM_FIRST_ENTRY_Y): ... this.
7926         * normal/menu.c (TERM_ENTRY_WIDTH): Renamed to ...
7927         * include/grub/term.h (GRUB_TERM_ENTRY_WIDTH): ... this.
7928         * normal/menu.c (TERM_CURSOR_X): Renamed to ...
7929         * include/grub/term.h (GRUB_TERM_CURSOR_X): ... this.
7930         All callers changed.
7932         * include/grub/normal.h: New prototype.
7934         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
7935         normal/menu_entry.c.
7936         (normal_mod_SOURCES): Likewise.
7937         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7938         (normal_mod_SOURCES): Likewise.
7940 2005-02-15  Yoshinori K. Okuji  <okuji@enbug.org>
7942         * include/grub/normal.h (grub_halt_init): New prototype.
7943         (grub_halt_fini): Likewise.
7944         (grub_reboot_init): Likewise.
7945         (grub_reboot_fini): Likewise.
7947         * util/grub-emu.c: Include signal.h.
7948         (main_env): New global variable.
7949         (grub_machine_init): Ignore SIGINT. Otherwise grub-emu cannot
7950         catch C-c.
7951         (grub_machine_fini): New function.
7952         (main): Call grub_halt_init and grub_reboot_init before
7953         grub_main, and grub_reboot_fini and grub_halt_fini after it.
7954         Call setjmp with MAIN_ENV to go back afterwards.
7955         Call grub_machine_fini right before return.
7957         * include/grub/util/misc.h: Include setjmp.h.
7958         (main_env): New prototype.
7960         * include/grub/kernel.h (grub_machine_fini): New prototype.
7961         * include/grub/i386/pc/biosdisk.h (grub_biosdisk_fini): Likewise.
7962         * include/grub/i386/pc/console.h (grub_console_fini): Likewise.
7964         * disk/i386/pc/biosdisk.c (grub_biosdisk_fini): New function.
7965         * kern/i386/pc/init.c (grub_machine_fini): Likewise.
7966         * term/i386/pc/console.c (grub_console_fini): Likewise.
7967         
7968         * util/i386/pc/misc.c: New file.
7969         
7970         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
7971         util/i386/pc/misc.c, commands/i386/pc/halt.c and
7972         commands/i386/pc/reboot.c.
7974 2005-02-14  Guillem Jover  <guillem@hadrons.org>
7976         * include/grub/dl.h (grub_dl_check_header): New prototype.
7977         (grub_arch_dl_check_header): Change return type to grub_err_t,
7978         remove size parameter and export function.  Update all callers.
7979         * kern/dl.c (grub_dl_check_header): New function.
7980         (grub_dl_load_core): Use `grub_dl_check_header' instead of
7981         `grub_arch_dl_check_header'.  Check ELF type.  Check if sections
7982         are inside the core.
7983         * kern/i386/dl.c (grub_arch_dl_check_header): Remove arch
7984         independent ELF header checks.
7985         * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
7986         * loader/i386/pc/multiboot.c (grub_rescue_cmd_multiboot): Use
7987         `grub_dl_check_header' instead of explicit checks.  Check for the
7988         ELF type.
7989         * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Use
7990         `grub_dl_check_header' instead of explicit checks.  Remove arch
7991         specific ELF header checks.
7993         * util/grub-emu.c (grub_arch_dl_check_header): Remove the
7994         argument SIZE.
7996 2005-02-13  Hollis Blanchard  <hollis@penguinppc.org>
7998         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add ls.mod.
7999         * include/grub/powerpc/libgcc.h (__mulsf3): New prototype.
8001 2005-02-12  Hollis Blanchard  <hollis@penguinppc.org>
8003         * kern/partition.c (grub_partition_probe): Clear `grub_errno' and
8004         return 0 if `grub_errno' is GRUB_ERR_BAD_PART_TABLE. 
8005         (part_map_iterate): Clear `grub_errno' and return 0 if
8006         `partmap->iterate' returns GRUB_ERR_BAD_PART_TABLE. 
8007         * partmap/amiga.c (amiga_partition_map_iterate): Return
8008         GRUB_ERR_BAD_PART_TABLE if no partition map magic is found.
8009         * partmap/apple.c (apple_partition_map_iterate): Likewise.
8011 2005-02-01  Guillem Jover  <guillem@hadrons.org>
8013         * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Fix module
8014         help info.
8016 2005-01-31  Marco Gerards  <metgerards@student.han.nl>
8018         * include/grub/powerpc/ieee1275/loader.h (grub_load_linux):
8019         Removed prototype.
8020         (grub_rescue_cmd_linux): New prototype.
8021         (grub_rescue_cmd_initrd): Likewise.
8022         * powerpc/ieee1275/linux.c (grub_linux_boot): Remove struct
8023         `bi_rec'.
8024         (grub_linux_release_mem): Release the memory for the initrd.
8025         (grub_load_linux): Renamed from this...
8026         (grub_rescue_cmd_linux): ...To this.  Changed all callers.
8027         Changed `entry' not to be static.  Loop over memory regions to
8028         find another one when the default fails.
8029         (grub_rescue_cmd_initrd): New function.
8030         (grub_linux_init): Remove function.
8031         (grub_linux_fini): Likewise.
8032         (GRUB_MOD_INIT): Register `initrd'.
8033         (GRUB_MOD_FINI): Unregister `initrd'.
8034         * powerpc/ieee1275/linux_normal.c (grub_linux_normal_init):
8035         Function removed.
8036         (grub_linux_normal_fini): Likewise.
8037         (GRUB_MOD_INIT): Register `initrd'.
8038         (GRUB_MOD_FINI): Unregister `initrd'.
8040 2005-01-31  Marco Gerards  <metgerards@student.han.nl>
8042         * commands/help.c: New file.
8043         * normal/arg.c (show_help): Renamed to...
8044         (grub_arg_show_help): ... this.
8045         * commands/i386/pc/halt.c: New file.
8046         * commands/i386/pc/reboot.c: Likewise.
8047         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/help.c'.
8048         (pkgdata_MODULES): Add `reboot.mod', `halt.mod' and `help.mod'.
8049         (help_mod_SOURCES, help_mod_CFLAGS, reboot_mod_SOURCES)
8050         (reboot_mod_CFLAGS, halt_mod_SOURCES, halt_mod_CFLAGS): New
8051         variables.
8052         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
8053         `commands/help.c'.
8054         (pkgdata_MODULES): Add `help.mod'.
8055         (help_mod_SOURCES, help_mod_CFLAGS): New variables.
8056         * grub/i386/pc/init.h (grub_reboot): New prototype.
8057         (grub_halt): Likewise.
8058         * include/grub/normal.h (grub_arg_show_help): New prototype.
8059         (grub_help_init): Likewise.
8060         (grub_help_fini): Likewise.
8061         * util/grub-emu.c (main): Initialize and deinitialize the help
8062         command.
8064         * normal/cmdline.c (grub_cmdline_get): Doc fix.
8066         * normal/command.c (grub_command_init): Fixed the description of
8067         the `set' and `unset' commands.
8069 2005-01-31  Marco Gerards  <metgerards@student.han.nl>
8071         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_interpret): New
8072         function.
8073         * commands/ieee1275/halt.c: New file.
8074         * commands/ieee1275/reboot.c: Likewise.
8075         * commands/ieee1275/suspend.c (grub_cmd_suspend): Use
8076         `__attribute__ ((unused))'.  Some GCS related fixed.
8077         (grub_suspend_init) [GRUB_UTIL]: Function removed.
8078         (grub_suspend_fini): Likewise.
8079         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add `reboot.mod'
8080         and `halt.mod'.
8081         (reboot_mod_SOURCES, reboot_mod_CFLAGS, halt_mod_SOURCES)
8082         (halt_mod_CFLAGS): New variables.
8083         * include/grub/powerpc/ieee1275/ieee1275.h
8084         (grub_ieee1275_interpret): New prototype.
8086 2005-01-29  Yoshinori K. Okuji  <okuji@enbug.org>
8088         * include/grub/misc.h (memmove): New prototype.
8089         (memcpy): Likewise.
8091 2005-01-22  Hollis Blanchard  <hollis@penguinppc.org>
8093         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
8094         `devpath' to 0.  Use `name' instead of `devpath' with `grub_strndup'.
8096 2005-01-22  Marco Gerards  <metgerards@student.han.nl>
8098         * kern/misc.c (grub_strndup): Function rewritten.
8100 2005-01-22  Vincent Pelletier  <subdino2004@yahoo.fr>
8102         * normal/menu.c (TERM_WIDTH): Macro redefined.
8103         (TERM_TOP_BORDER_Y): Likewise.
8104         (draw_border): Replaced while-loop by a for-loop.  Make the number
8105         of lines consistent with the number of lines displayed in
8106         print_entries.  Added a margin below the rectangle.
8107         (print_entry): Make the entry fit in the rectangle.
8108         (print_entries): Display the scroll arrows next to the right
8109         border.
8111 2005-01-21  Marco Gerards  <metgerards@student.han.nl>
8113         * fs/minix.c (grub_minix_find_file): Reserve more space for
8114         `fpath' so the \0 can be stored.  Use `grub_strcpy' instead of
8115         `grub_strncpy' to copy `path' into it.
8117 2005-01-21  Marco Gerards  <metgerards@student.han.nl>
8119         Add the loopback device, a device via which files can be accessed
8120         as devices.
8121         
8122         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/loopback.c'.
8123         (pkgdata_MODULES): Add loopback.mod.
8124         (loopback_mod_SOURCES): New variable.
8125         (loopback_mod_CFLAGS): Likewise.
8126         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
8127         `disk/loopback.c'.
8128         (pkgdata_MODULES): Add loopback.mod.
8129         (loopback_mod_SOURCES): New variable.
8130         (loopback_mod_CFLAGS): Likewise.
8131         * disk/loopback.c: new file.
8132         * include/grub/normal.h (grub_loop_init): New prototype.
8133         (grub_loop_fini): New prototype.
8134         * util/grub-emu.c (main): Initialize and de-initialize loopback
8135         support.
8136         * include/grub/disk.h (grub_disk_dev_id): Add
8137         `GRUB_DISK_DEVICE_LOOPBACK_ID'.
8139 2005-01-20  Hollis Blanchard  <hollis@penguinppc.org>
8141         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_enter): New
8142         function.
8143         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add suspend.mod.
8144         (suspend_mod_SOURCES): New variable.
8145         (suspend_mod_CFLAGS): Likewise.
8146         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_enter):
8147         New prototype.
8148         * commands/ieee1275/suspend.c: New file.
8150 2005-01-20  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
8152         * include/grub/dl.h (GRUB_MOD_INIT): Changed `__attribute__
8153         ((unused))' to `__attribute__ ((used))'.        
8154         (GRUB_MOD_FINI): Likewise.
8155         * kern/dl.c (grub_dl_load_file): Fix null pointer dereference.
8156         * genmk.rb (PModule): Assign space to common symbols when linking
8157         modules.
8159 2005-01-20  Marco Gerards  <metgerards@student.han.nl>
8161         * include/grub/mm.h (grub_mm_init_region): Change the type of the
8162         `unsigned' arguments to `grub_size_t'.
8163         (grub_malloc): Likewise.
8164         (grub_realloc): Likewise.
8165         (grub_memalign): Likewise.
8166         * kern/i386/dl.c (grub_arch_dl_check_header): Likewise.
8167         * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
8168         * util/misc.c (grub_malloc): Likewise.
8169         (grub_realloc): Likewise.
8170         * kern/mm.c (get_header_from_pointer): Change the casts to
8171         `unsigned' into a cast to `grub_size_t'.
8173         * fs/fshelp.c (grub_fshelp_find_file): The `oldnode' should always
8174         point to `currnode' when `currnode' is changed.
8176         * util/grub-emu.c (main): Initialize `progname'.  Reported by Nico
8177         Schottelius <nico-linux@schottelius.org>.
8179 2005-01-09  Hollis Blanchard  <hollis@penguinppc.org>
8181         * util/powerpc/ieee1275/grub-mkimage.c: Include <string.h>.
8182         (note_path): Remove variable.
8183         (GRUB_IEEE1275_NOTE_NAME): New macro.
8184         (GRUB_IEEE1275_NOTE_TYPE): Likewise.
8185         (grub_ieee1275_note_hdr): New structure.
8186         (grub_ieee1275_note_desc): Likewise.
8187         (grub_ieee1275_note): Likewise.
8188         (load_note): Remove `dir' argument.  All callers updated.  Remove
8189         `note_img' and `path'.  Do not load a file from `note_path'.
8190         Initialize a struct grub_ieee1275_note and write that to `out'.
8191         Use GRUB_IEEE1275_MODULE_BASE instead of MODULE_BASE.
8193 2005-01-05  Marco Gerards  <metgerards@student.han.nl>
8195         * util/misc.c (grub_util_read_image): Revert last change.  It
8196         called `grub_util_read_at', which seeks from the beginning of the
8197         file.
8199 2005-01-04  Hollis Blanchard  <hollis@penguinppc.org>
8201         * TODO: Add note about endianness in grub-mkimage.
8202         * boot/powerpc/ieee1275/crt0.S (note): Remove unused .note
8203         section.
8204         * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Add grub-mkimage.
8205         (grub_mkimage_SOURCES): New target.
8206         * include/grub/kernel.h (grub_start_addr): Remove variable.
8207         (grub_end_addr): Likewise.
8208         (grub_total_module_size): Likewise.
8209         (grub_kernel_image_size): Likewise.
8210         (GRUB_MODULE_MAGIC): New constant.
8211         (grub_module_info): New structure.
8212         (grub_arch_modules_addr): New prototype.
8213         (grub_get_end_addr): Remove prototype.
8214         * include/grub/i386/pc/kernel.h (grub_end_addr): New prototype.
8215         * include/grub/powerpc/ieee1275/kernel.h: New file.
8216         * include/grub/util/misc.h (grub_util_get_fp_size): New
8217         prototype.
8218         (grub_util_read_at): Likewise.
8219         (grub_util_write_image_at): Likewise.
8220         * kern/main.c (grub_get_end_addr): Remove function.
8221         (grub_load_modules): Call grub_arch_modules_addr instead of using
8222         grub_end_addr.  Look for a grub_module_info struct in memory.  Use
8223         the grub_module_info fields instead of calling grub_get_end_addr
8224         as loop conditions.  Move grub_add_unused_region code here.
8225         (grub_add_unused_region): Remove function.
8226         * kern/i386/pc/init.c: Include grub/cache.h.
8227         (grub_machine_init): Remove call to grub_get_end_addr.  Remove
8228         one call to add_mem_region.
8229         (grub_arch_modules_addr): New function.
8230         * kern/powerpc/ieee1275/init.c (grub_end_addr): Remove variable.
8231         (grub_total_module_size): Likewise.
8232         Include grub/machine/kernel.h.
8233         (grub_arch_modules_addr): New function.
8234         * util/grub-emu.c (grub_end_addr): Remove variable.
8235         (grub_total_module_size): Likewise.
8236         (grub_arch_modules_addr): New function.
8237         * util/misc.c: Include unistd.h.
8238         (grub_util_get_fp_size): New function.
8239         (grub_util_read_at): Likewise.
8240         (grub_util_write_image_at): Likewise.
8241         (grub_util_read_image): Call grub_util_read_at.
8242         (grub_util_write_image): Call grub_util_write_image_at.
8243         * util/i386/pc/grub-mkimage.c (generate_image): Allocate
8244         additional memory in kernel_img for a struct grub_module_info.
8245         Fill in that grub_module_info.
8246         * util/powerpc/ieee1275/grub-mkimage.c: New file.
8248 2005-01-03  Hollis Blanchard  <hollis@penguinppc.org>
8250         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_milliseconds):
8251         New function.
8252         * include/grub/powerpc/ieee1275/ieee1275.h
8253         (grub_ieee1275_milliseconds): New prototype.
8254         * include/grub/powerpc/ieee1275/time.h (GRUB_TICKS_PER_SECOND):
8255         Change to 1000.
8256         * kern/powerpc/ieee1275/init.c (grub_get_rtc): Call
8257         grub_ieee1275_milliseconds.
8259 2005-01-03  Hollis Blanchard  <hollis@penguinppc.org>
8261         * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_realmode): New
8262         variable.
8263         (find_options): New function.
8264         (cmain): Call find_options.
8265         * include/grub/powerpc/ieee1275/ieee1275.h
8266         (grub_ieee1275_realmode): New extern variable.
8267         * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Only call
8268         grub_map if grub_ieee1275_realmode is false.
8270 2004-12-29  Marco Gerards  <metgerards@student.han.nl>
8272         * normal/cmdline.c (grub_cmdline_get): Redone logic so no empty
8273         lines are inserted and make it work like readline.  Reported by
8274         Vincent Pelletier <subdino2004@yahoo.fr>.
8276 2004-12-28  Marco Gerards  <metgerards@student.han.nl>
8278         * boot/powerpc/ieee1275/crt0.S (_start): Don't set up the stack.
8280         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCE): Remove
8281         `kern/powerpc/cache.S'.
8283 2004-12-27  Marco Gerards  <metgerards@student.han.nl>
8285         * genmk.rb: Handle the `Program' class in the main loop.  Written
8286         by Johan Rydberg <jrydberg@gnu.org>.
8287         (Program): New class.
8288         (programs): New variable.
8289         * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h>
8290         instead of "grub/machine/ieee1275.h".  Include <grub/kernel.h>
8291         instead of "grub/kernel.h".  Include <grub/machine/init.h>.
8292         (help_arch): Function removed.
8293         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add
8294         `powerpc/libgcc.h' and `loader.h'.
8295         (pkgdata_PROGRAMS): New variable.
8296         (sbin_UTILITIES): Variable removed.
8297         (grub_emu_SOURCES): Added kern/powerpc/cache.S.
8298         (grubof_SOURCES): Variable re-defined so it only includes the
8299         core functionality.
8300         (grubof_CFLAGS): Remove `-DGRUBOF'.
8301         (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS,
8302         (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES)
8303         (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS)
8304         (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES)
8305         (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS)
8306         (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES)
8307         (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS)
8308         (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS)
8309         (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES)
8310         (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS)
8311         (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
8312         (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES)
8313         (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS)
8314         (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES)
8315         (pc_mod_CFLAGS): New variables.
8316         * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>.
8317         (grub_ofdisk_iterate): Add a prototype for `dev_iterate'.
8318         * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype.
8319         * include/grub/loader.h (grub_os_area_addr, grub_os_area_size):
8320         Moved from here...
8321         * include/grub/i386/pc/init.h (grub_os_area_addr)
8322         (rub_os_area_size): ... to here.
8323         * include/grub/powerpc/ieee1275/ieee1275.h
8324         (grub_ieee1275_entry_fn): Export symbol.
8325         * include/grub/powerpc/ieee1275/init.h: New file.
8326         * include/grub/powerpc/libgcc.h: Likewise.
8327         * include/grub/cache.h: Likewise.
8328         * kern/powerpc/cache.S: Likewise.  Written by Hollis Blanchard
8329         <hollis@penguinppc.org>.
8330         * kern/dl.c: Include <grub/cache.h>.
8331         (grub_dl_flush_cache): New function.
8332         (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache
8333         for this module.
8334         * kern/powerpc/ieee1275/init.c (grub_ofdisk_init)
8335         (grub_console_init): Removed prototypes.
8336         (grub_machine_init): Don't initialize the modules anymore.
8337         * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function
8338         static.
8339         * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN):
8340         Macro undef removed.
8341         (GRUB_HOST_WORDS_BIGENDIAN): New macro.
8342         * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add
8343         relocation `R_PPC_REL32'.  Return an error when the relocation is
8344         unknown.
8345         * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'.
8346         * kern/i386/pc/init.c (grub_arch_sync_caches): New function.
8347         * util/misc.c (grub_arch_sync_caches): Likewise.
8349 2004-12-19  Marco Gerards  <metgerards@student.han.nl>
8351         * conf/powerpc-ieee1275.rmk (MOSTLYCLEANFILES): Remove
8352         `symlist.c', add `grubof_symlist.c'.
8353         (symlist.c): Variable removed.
8354         (grubof_HEADERS): Variable added.
8355         (grubof_symlist.c): New target.
8356         (kernel_syms.lst): Use `grubof_HEADERS' instead of
8357         `kernel_img_HEADERS'.
8358         (grubof_SOURCES): Add `kern/powerpc/dl.c' and `grubof_symlist.c'.
8359         * kern/powerpc/dl.c: New file.
8360         * kern/powerpc/ieee1275/init.c (grub_arch_dl_check_header):
8361         Function removed.
8362         (grub_arch_dl_relocate_symbols): Likewise.
8363         (grub_register_exported_symbols): Likewise.
8365 2004-12-13  Marco Gerards  <metgerards@student.han.nl>
8367         * fs/ext2.c (grub_ext2_open): Don't use data after freeing it.
8368         (grub_ext2_dir): Likewise.  Don't return in case of an error, jump
8369         to fail instead.  Reported by Vincent Pelletier
8370         <subdino2004@yahoo.fr>.
8372         * fs/fshelp.c (grub_fshelp_find_file): Don't free `oldnode' when
8373         it is not allocated.  Reported by Vincent Pelletier
8374         <subdino2004@yahoo.fr>.
8376         * normal/cmdline.c (grub_tab_complete): Add a blank line to the
8377         output so the output looks better.
8378         
8379 2004-12-04  Marco Gerards  <metgerards@student.han.nl>
8381         Modulize the partition map support and add support for the amiga
8382         partition map.
8383         
8384         * commands/ls.c: Include <grub/partition.h> instead of
8385         <grub/machine/partition.h>.
8386         * kern/disk.c: Likewise.
8387         * kern/rescue.c: Likewise.
8388         * loader/i386/pc/chainloader.c: Likewise.
8389         * normal/cmdline.c: Likewise.
8390         * kern/powerpc/ieee1275/init.c: Likewise.
8391         (grub_machine_init): Call `grub_pc_partition_map_init',
8392         `grub_amiga_partition_map_init' and
8393         `grub_apple_partition_map_init'.
8394         * conf/i386-pc.rmk (kernel_img_SOURCES): Remove
8395         `disk/i386/pc/partition.c'.  Add `kern/partition.c'.
8396         (kernel_img_HEADERS): Remove `machine/partition.h'.  Add
8397         `partition.h' and `pc_partition.h'.
8398         (grub_setup_SOURCES): Remove
8399         `disk/i386/pc/partition.c'.  Add `kern/partition.c',
8400         `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
8401         (grub_emu_SOURCES): Likewise.
8402         (pkgdata_MODULES): Add `amiga.mod', `apple.mod' and `pc.mod'.
8403         (amiga_mod_SOURCES, amiga_mod_CFLAGS, apple_mod_SOURCES)
8404         (apple_mod_CFLAGS, pc_mod_SOURCES, pc_mod_CFLAGS): New variables.
8405         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
8406         `disk/powerpc/ieee1275/partition.c'.  Add `kern/partition.c',
8407         `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
8408         (grubof_SOURCES): Likewise.
8409         * disk/i386/pc/partition.c: File removed.
8410         * disk/powerpc/ieee1275/partition.c: Likewise.
8411         * include/grub/powerpc/ieee1275/partition.h: Likewise.
8412         * include/grub/i386/pc/partition.h: Likewise.
8413         * kern/partition.c: New file.
8414         * partmap/amiga.c: Likewise.
8415         * partmap/apple.c: Likewise.
8416         * partmap/pc.c: Likewise.
8417         * include/grub/partition.h: Likewise..
8418         * include/grub/pc_partition.h: Likewise.
8419         * util/grub-emu.c: Include <grub/partition.h> instead of
8420         <grub/machine/partition.h>.
8421         (main): Call `grub_pc_partition_map_init',
8422         `grub_amiga_partition_map_init' and
8423         `grub_apple_partition_map_init' and deinitialize afterwards.
8424         * util/i386/pc/biosdisk.c: Include `#include
8425         <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
8426         `<grub/machine/partition.h>'.
8427         * util/i386/pc/grub-setup.c: Likewise.
8428         * util/i386/pc/biosdisk.c: Likewise.
8429         (grub_util_biosdisk_get_grub_dev): Only access the PC specific
8430         partition information in case of a PC partition.
8431         * util/i386/pc/grub-setup.c: Include `#include
8432         <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
8433         `<grub/machine/partition.h>'.
8434         (setup): Only access the PC specific partition information in case
8435         of a PC partition.
8437 2004-11-17  Hollis Blanchard  <hollis@penguinppc.org>
8438         
8439         * kern/powerpc/ieee1275/init.c (grub_setjmp): Remove function.
8440         (grub_longjmp): Likewise.
8441         * include/grub/powerpc/setjmp.h (grub_jmp_buf): Set array size to
8442         20.
8443         * normal/powerpc/setjmp.S: New file.
8444         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
8445         `normal/powerpc/setjmp.S'.
8446         (grubof_CFLAGS): Add `-DGRUBOF'.
8447         * include/grub/setjmp.h [GRUB_UTIL]: Changed condition to
8448         [GRUB_UTIL && !GRUBOF].
8449         
8450 2004-11-16  Marco Gerards  <metgerards@student.han.nl>
8452         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Skip any
8453         property named `name'.  Correctly handle the error returned by
8454         `grub_ieee1275_finddevice' if a device can not be opened.
8456 2004-11-02  Hollis Blanchard  <hollis@penguinppc.org>
8458         * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_readkey): Test
8459         `actual' for negativity.
8460         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
8461         kern/fshelp.c.
8463 2004-11-01  Marco Gerards  <metgerards@student.han.nl>
8465         * term/i386/pc/vga.c (VGA_HEIGHT): Changed to 350.
8466         (PAGE_OFFSET): New macro.
8467         (CRTC_ADDR_PORT): Likewise.
8468         (CRTC_DATA_PORT): Likewise.
8469         (START_ADDR_HIGH_REGISTER): Likewise.
8470         (START_ADDR_LOW_REGISTER): Likewise.
8471         (GRAPHICS_ADDR_PORT): Likewise.
8472         (GRAPHICS_DATA_PORT): Likewise.
8473         (READ_MAP_REGISTER): Likewise.
8474         (INPUT_STATUS1_REGISTER): Likewise.
8475         (INPUT_STATUS1_VERTR_BIT): Likewise.
8476         (page): New variable.
8477         (wait_vretrace): New function.
8478         (set_read_map): Likewise.
8479         (set_start_address): Likewise.
8480         (grub_vga_init): Use mode 0x10 instead of mode 0x12.  Switch to
8481         the right page.
8482         (check_vga_mem): Take the page into account.
8483         (write_char): Likewise.
8484         (write_cursor): Likewise.
8485         (scroll_up): Likewise.  Copy the page to the page that is not
8486         shown and switch between both pages.
8487         (grub_vga_putchar): Fix off by one error.
8488         (grub_vga_cls): Wait for the vertical retrace.  Take the page into
8489         account.
8491 2004-11-01  Marco Gerards  <metgerards@student.han.nl>
8493         Add support for iso9660 (including rockridge).
8494         
8495         * conf/i386-pc.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
8496         (iso9660_mod_SOURCES): New variable.
8497         (iso9660_mod_CFLAGS): Likewise.
8498         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
8499         * include/grub/fs.h (grub_iso9660_init): New prototype.
8500         * util/grub-emu.c (main): Call `grub_iso9660_init'.
8501         * fs/iso9660.c: New file.
8503         * include/grub/misc.h (grub_strncat): New prototype.
8504         * kern/misc.c (grub_strncat): New function.
8505         
8506         * fs/hfs.c (grub_hfs_mount): Translate the error
8507         `GRUB_ERR_OUT_OF_RANGE' to `GRUB_ERR_BAD_FS'.
8508         * fs/jfs.c (grub_jfs_mount): Likewise.
8509         * fs/ufs.c (grub_ufs_mount): Likewise.
8511 2004-10-28  Hollis Blanchard  <hollis@penguinppc.org>
8513         * boot/powerpc/ieee1275/cmain.c (cmain): Remove asm statements
8514         which initialized BAT registers.
8515         * boot/powerpc/ieee1275/ieee1275.c (IEEE1275_CALL_ENTRY_FN,
8516         grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
8517         Move from here...
8518         * include/grub/powerpc/ieee1275/ieee1275.h (IEEE1275_CALL_ENTRY_FN,
8519         grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
8520         ... to here.
8521         * kern/powerpc/ieee1275/openfw.c (grub_map): New function.
8522         (grub_mapclaim): Likewise.
8523         * loader/powerpc/ieee1275/linux.c (grub_load_linux): Use
8524         grub_mapclaim instead of grub_ieee1275_claim.  Assign linux_addr by
8525         hand.
8527 2004-10-19  Hollis Blanchard  <hollis@penguinppc.org>
8529         * conf/powerpc-ieee1275.rmk (COMMON_ASFLAGS): Remove -fno-builtin.
8530         (COMMON_CFLAGS): Remove -fno-builtin and -D__ASSEMBLY__. Add
8531         -ffreestanding and -msoft-float.
8533 2004-10-15  Hollis Blanchard  <hollis@penguinppc.org>
8535         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Do not
8536         append ":0" to devpath if the GRUB_IEEE1275_NO_PARTITION_0 flag is
8537         set in grub_ieee1275_flags.
8539 2004-10-14  Hollis Blanchard  <hollis@penguinppc.org>
8541         * include/grub/powerpc/ieee1275/ieee1275.h (abort): Add function
8542         prototype.
8543         * kern/powerpc/ieee1275/init.c (grub_machine_init): Call
8544         grub_console_init first.
8545         Change the memory range used for grub_ieee1275_claim and
8546         grub_mm_init_region.
8547         Print an error message if the claim fails.
8548         Include <grub/misc.h>.
8550 2004-10-13  Hollis Blanchard  <hollis@penguinppc.org>
8552         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_iterate):
8553         Call grub_children_iterate for device nodes of type `scsi',
8554         `ide', or `ata'.
8555         (grub_ofdisk_open): Remove manual device alias resolution.
8556         Fix memory leak when device cannot be opened.
8557         * include/grub/powerpc/ieee1275/ieee1275.h 
8558         (grub_children_iterate): New prototype.
8559         * kern/powerpc/ieee1275/openfw.c (grub_children_iterate):
8560         New function.
8561         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
8562         Return -1 if args.size was -1.
8564 2004-10-11  Hollis Blanchard  <hollis@penguinppc.org>
8566         * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_flags): New global.
8567         (cmain): Accept 3 parameters. Test for 0xdeadbeef, indicating Old
8568         World Macintosh. If Old Wold, set flag in grub_ieee1275_flags; claim
8569         Open Firmware's memory for it; claim memory from _start to _end.
8570         * boot/powerpc/ieee1275/crt0.S (__bss_start): New extern.
8571         (_end): New extern.
8572         (_start): Zero BSS from __bss_start to _end.
8573         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
8574         New extern.
8575         (GRUB_IEEE1275_NO_PARTITION_0): New #define.
8577 2004-10-11  Hollis Blanchard  <hollis@penguinppc.org>
8579         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): Return
8580         -1 if args.base was -1.
8582 2004-10-08  Hollis Blanchard  <hollis@penguinppc.org>
8584         * term/powerpc/ieee1275/ieee1275.c (grub_ofconsole_cls): Use an ANSI
8585         escape sequence instead of a literal ^L. Also call
8586         grub_ofconsole_gotoxy.
8588 2004-10-03  Hollis Blanchard  <hollis@penguinppc.org>
8590         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): change
8591         void *  arguments to grub_addr_t.  All callers updated.  Also make
8592         the `result' argument optional.
8593         (grub_ieee1275_release): change void * arguments to grub_addr_t.
8594         All callers updated.
8596 2004-09-22  Hollis Blanchard  <hollis@penguinppc.org>
8598         * commands/ls.c (grub_ls_list_files): Use the string following the
8599         initial ')', if present, as the filesystem path.
8600         * kern/rescue.c (grub_rescue_cmd_ls): Likewise.
8602         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): List crt0.S first.
8604 2004-09-18  Yoshinori K. Okuji  <okuji@enbug.org>
8606         Make the source code of the menu interface more readable.
8607         
8608         * normal/menu.c: Include grub/mm.h.
8609         (TERM_WIDTH): New macro.
8610         (TERM_HEIGHT): Likewise.
8611         (TERM_INFO_HEIGHT): Likewise.
8612         (TERM_MARGIN): Likewise.
8613         (TERM_SCROLL_WIDTH): Likewise.
8614         (TERM_TOP_BORDER_Y): Likewise.
8615         (TERM_LEFT_BORDER_X): Likewise.
8616         (TERM_BORDER_WIDTH): Likewise.
8617         (TERM_MESSAGE_HEIGHT): Likewise.
8618         (TERM_BORDER_HEIGHT): Likewise.
8619         (TERM_NUM_ENTRIES): Likewise.
8620         (TERM_FIRST_ENTRY_Y): Likewise.
8621         (TERM_ENTRY_WIDTH): Likewise.
8622         (TERM_CURSOR_X): Likewise.
8623         (draw_border): Use macros instead of magic numbers.
8624         (print_entry): Likewise.
8625         (print_entries): Likewise.
8626         (run_menu): Likewise. Also, handle the key 'e'.
8627         (run_menu_entry): Ignore empty command lines.
8628         (print_message): Added a new argument EDIT. If EDIT is true,
8629         print a different message.
8630         (init_page): Likewise.
8631         (edit_menu_entry): New function. Not implemented yet.
8633 2004-09-17  Marco Gerards  <metgerards@student.han.nl>
8635         Add `linux.mod' and `multiboot.mod' so linux and multiboot kernels
8636         can be loaded from normal mode.
8637         
8638         * conf/i386-pc.rmk (pkgdata_MODULES): Add `linux.mod' and
8639         `multiboot.mod'.
8640         (linux_mod_SOURCES, linux_mod_CFLAGS, multiboot_mod_SOURCES)
8641         (multiboot_mod_CFLAGS): New variables.
8642         * loader/i386/pc/linux_normal.c: New file.
8643         * loader/i386/pc/multiboot_normal.c: Likewise.  
8644         
8645         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Don't use the
8646         attribute `unused'.
8647         
8648         * fs/ext2.c (grub_ext2_iterate_dir): Fix typos in inode type.  Use
8649         `fdiro' to read the mode information from instead of `diro'.
8651         * fs/fshelp.c (grub_fshelp_find_file): Set type to foundtype after
8652         looking up a symlink.
8654         * include/grub/normal.h (GRUB_COMMAND_FLAG_NO_ARG_PARSE): New
8655         macro.
8656         * normal/command.c (grub_command_execute): Don't parse the
8657         arguments when `GRUB_COMMAND_FLAG_NO_ARG_PARSE' is set in the
8658         flags of the command.
8660         * normal/menu.c (grub_menu_run): Fix typo.
8662 2004-09-14  Hollis Blanchard  <hollis@penguinppc.org>
8664         * kern/powerpc/ieee1275/init.c (abort): Trap into Open Firmware.
8666         * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_gotoxy): Use
8667         `y + 1' instead of `y - 1'.
8669         * conf/powerpc-ieee1275.rmk (grubof_LDFLAGS): Add `-N' and `-S'.
8670         
8671 2004-09-14  Yoshinori K. Okuji  <okuji@enbug.org>
8673         From Hollis Blanchard <hollis@penguinppc.org>:
8674         * kern/misc.c (memmove): New alias for grub_memmove.
8675         (memcmp): New alias for grub_memcmp.
8676         (memset): New alias for grub_memset.
8677         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property): 
8678         Change "int handle" to "grub_ieee1275_phandle_t handle".
8679         * include/grub/powerpc/ieee1275/ieee1275.h 
8680         (grub_ieee1275_get_property): Likewise.
8681         
8682 2004-09-12  Tomas Ebenlendr  <ebik@ucw.cz>
8684         Added normal mode command `chainloader' as module chain.mod, which
8685         depends on normal.mod and _chain.mod.
8686         
8687         * conf/i386-pc.rmk (pkgdata_MODULES): Add `chain.mod'.
8688         (chain_mod_SOURCES, chain_mod_CFLAGS): Variables added.
8689         * include/grub/i386/pc/loader.h (grub_rescue_cmd_chainloader):
8690         Deleted prototype.
8691         * loader/i386/pc/chainloader.c (grub_rescue_cmd_chainloader): All
8692         but arguments parsing moved to ...
8693         (grub_chainloader_cmd): ... here.  New function.
8694         * include/grub/i386/pc/chainloader.h: New file.
8695         * loader/i386/pc/chainloader_normal.c: Likewise.
8697 2004-09-11  Marco Gerards  <metgerards@student.han.nl>
8699         * conf/i386-pc.rmk (kernel_img_SOURCES): Added kern/fshelp.c.
8700         (grub_mkimage_LDFLAGS): Likewise.
8701         (grub_emu_SOURCES): Likewise.
8702         (kernel_img_HEADERS): Added fshelp.h.
8703         * fs/ext2.c: Include <grub/fshelp.h>.
8704         (FILETYPE_REG): New macro.
8705         (FILETYPE_INO_REG): Likewise.
8706         (grub_ext_sblock): Renamed to `grub_ext2_sblock'.
8707         Changed all users.
8708         (ext2_block_group): Renamed to `grub_ext2_block_group'.  Changed
8709         all users.
8710         (grub_fshelp_node): New struct.
8711         (grub_ext2_data): Added member `diropen'.  Changed member `inode'
8712         to a pointer.
8713         (grub_ext2_get_file_block): Removed function.
8714         (grub_ext2_read_block): New function.
8715         (grub_ext2_read_file): Replaced parameter `data' by `node'.
8716         This function was written.
8717         (grub_ext2_mount): Read the root inode.  Create a diropen struct.
8718         (grub_ext2_find_file): Removed function.
8719         (grub_ext2_read_symlink): New function.
8720         (grub_ext2_iterate_dir): Likewise.
8721         (grub_ext2_open): Rewritten.
8722         (grub_ext2_dir): Rewritten.
8723         * include/grub/fshelp.h: New file.
8724         * fs/fshelp.c: Likewise.
8726 2004-09-10  Yoshinori K. Okuji  <okuji@enbug.org>
8728         * normal/menu.c: Include grub/loader.h and grub/machine/time.h.
8729         (print_message): Add a missing newline.
8730         (run_menu): Added timeout support.
8731         (run_menu_entry): New local function.
8732         (grub_menu_run): Added support for booting.
8734         * kern/loader.c (grub_loader_is_loaded): New function.
8736         * include/grub/powerpc/ieee1275/time.h: Include grub/symbol.h.
8737         (grub_get_rtc): Exported.
8739         * include/grub/i386/pc/time.h: Include grub/symbol.h.
8740         (grub_get_rtc): Exported.
8742         * include/grub/normal.h (struct grub_command_list): Remove
8743         constant from the member `command'.
8745         * include/grub/loader.h (grub_loader_is_loaded): Declared.
8747         * include/grub/err.h (GRUB_ERR_INVALID_COMMAND): New constant.
8749         * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/time.h.
8751 2004-08-28  Marco Gerards  <metgerards@student.han.nl>
8753         Add support for the JFS filesystem.
8755         * fs/jfs.c: New file.
8756         * include/grub/fs.h (grub_jfs_init): New prototype.
8757         (grub_jfs_fini): New prototype.
8758         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/jfs.c.
8759         (grub_emu_SOURCES): Likewise.
8760         (pkgdata_MODULES): Add jfs.mod.
8761         (jfs_mod_SOURCES): New variable.
8762         (jfs_mod_CFLAGS): Likewise.
8763         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs.jfs.c.
8764         (grubof_SOURCES): Likewise.
8765         * util/grub-emu.c (main): Initialize and deinitialize JFS support.
8767         * fs/fat.c (grub_fat_find_dir): Convert the filename little
8768         endian to the host endian.
8769         (grub_fat_utf16_to_utf8): Move function from there...
8770         * kern/misc.c (grub_utf16_to_utf8): ...to here.  Do not convert
8771         the endianess of the source string anymore.
8772         * include/grub/misc.h (grub_utf16_to_utf8): New prototype.
8774 2004-08-24  Marco Gerards  <metgerards@student.han.nl>
8776         * commands/boot.c (grub_boot_init) [GRUB_UTIL]: Make conditional.
8777         (grub_boot_fini) [GRUB_UTIL]: Likewise.
8778         (GRUB_MOD_INIT) [!GRUB_UTIL]: Likewise.
8779         (GRUB_MOD_FINI) [!GRUB_UTIL]: Likewise.
8780         
8781         * fs/hfs.c (grub_hfs_find_node): Add a prototype for `node_found'.
8782         (grub_hfs_iterate_dir): Make the function static.  Add prototypes
8783         for `node_found' and `it_dir'.
8784         (grub_hfs_dir): Add prototype for `dir_hook'.
8786         * fs/minix.c (grub_minix_get_file_block): Add prototype for
8787         `grub_get_indir'.  Rename `indir' in two blocks to `indir16'
8788         and `indir32' to silence a gcc warning.
8790         * include/grub/fs.h (grub_hfs_init): New prototype.
8791         (grub_hfs_fini): Likewise.
8792         
8793         
8794 2004-08-21  Yoshinori K. Okuji  <okuji@enbug.org>
8796         Each disk device has its own id now. This is useful to make use
8797         of multiple disk devices.
8798         
8799         * include/grub/disk.h (grub_disk_dev_id): New enum.
8800         (GRUB_DISK_DEVICE_BIOSDISK_ID): New constant.
8801         (GRUB_DISK_DEVICE_OFDISK_ID): Likewise.
8803         * disk/i386/pc/biosdisk.c (grub_biosdisk_dev): Specify
8804         GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
8806         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_dev): Specify
8807         GRUB_DISK_DEVICE_OFDISK_ID as an id.
8809         * util/i386/pc/biosdisk.c (grub_util_biosdisk_dev): Specify
8810         GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
8812         * include/grub/disk.h (struct grub_disk_dev): Added a new member
8813         "id" which is used by the cache manager.
8815         * normal/main.c (grub_normal_init_page): Use "GNU GRUB" instead
8816         of just "GRUB".
8818 2004-08-18  Marco Gerards  <metgerards@student.han.nl>
8820         * fs/hfs.c: New file.
8821         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/hfs.c.
8822         (grub_emu_SOURCES): Likewise.
8823         (pkgdata_MODULES): Add hfs.mod.
8824         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/hfs.c.
8825         (grubof_SOURCES): Likewise.
8826         * util/grub-emu.c (main): Initialize and deinitialize HFS support.
8828         * include/grub/misc.h (grub_strncasecmp): Add prototype.
8829         * kern/misc.c (grub_strncasecmp): Add function.
8831 2004-08-14  Marco Gerards  <metgerards@student.han.nl>
8833         * include/grub/arg.h (GRUB_ARG_OPTION_OPTIONAL): Surround macro
8834         with parentheses.
8836         * fs/ext2.c (FILETYPE_UNKNOWN): New macro.
8837         (grub_ext2_dir): In case the directory entry type is unknown, read
8838         it from the inode.
8840 2004-08-02  Peter Bruin  <pjbruin@dds.nl>
8842         * loader/powerpc/ieee1275/linux.c (grub_linux_init): Pass
8843         grub_load_linux instead of grub_rescue_cmd_linux as second
8844         argument of grub_rescue_register_command.
8846         * Makefile.in (RMKFILES): Add conf/powerpc-ieee1275.rmk.
8848 2004-07-27  Marco Gerards  <metgerards@student.han.nl>
8850         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_release): New
8851         function.
8852         * commands/boot.c: Remove the check for `GRUB_UTIL'.
8853         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
8854         `loader/powerpc/ieee1275/linux.c',
8855         `loader/powerpc/ieee1275/linux_normal.c' and `commands/boot.c'.
8856         * include/grub/powerpc/ieee1275/ieee1275.h
8857         (grub_ieee1275_release): New prototype.
8858         * include/grub/powerpc/ieee1275/loader.h: Rewritten.
8859         * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize
8860         normal, boot, linux and linux_normal.
8861         * loader/powerpc/ieee1275/linux.c: New file.
8862         * loader/powerpc/ieee1275/linux_normal.c: Likewise.
8864 2004-07-12  Marco Gerards  <metgerards@student.han.nl>
8866         * normal/arg.c (grub_arg_parse): Correct error handling after
8867         reallocating the argumentlist (check if `argl' is not null instead
8868         of checking if `args' is not null).
8869         * kern/mm.c (grub_realloc): Return the same pointer when using the
8870         same region, instead of returning the header address.
8872 2004-07-11  Marco Gerards  <metgerards@student.han.nl>
8874         * disk/powerpc/ieee1275/partition.c (grub_partition_iterate): Skip
8875         one block instead of two when looking for the initial partition.
8876         (grub_partition_probe): Initialize the local variable `p' with 0.
8877         Use base 10 for the grub_strtoul call.
8878         * kern/misc.c (grub_strncpy): Fix off by one bug.  Eliminated the
8879         need for one local variable.
8880         (grub_strtoul): Don't add the new value to `num', instead of that
8881         just assign it.
8883 2004-07-11  Marco Gerards  <metgerards@student.han.nl>
8885         * conf/i386-pc.rmk (pkgdata_IMAGE): Add pxeboot.img.
8886         (pxeboot_img_SOURCES): New variable.
8887         (pxeboot_img_ASFLAGS): Likewise.
8888         (pxeboot_img_LDFLAGS): Likewise.
8889         * boot/i386/pc/pxeboot.S: New file.  Based on pxeloader.S from
8890         GRUB Legacy and boot.S.  Adopted for GRUB 2 by lode leroy
8891         <lode_leroy@hotmail.com>.
8893 2004-06-27  Tomas Ebenlendr  <ebik@ucw.cz>
8895         * kern/rescue.c (grub_enter_rescue_mode): Don't continue when
8896         there was no input.
8898 2004-06-27  Tomas Ebenlendr  <ebik@ucw.cz>
8900         * normal/cmdline.c (grub_set_history): Fix off by one bug.  Fixed
8901         the history buffer logic.
8903 2004-06-27  Tomas Ebenlendr  <ebik@ucw.cz>
8905         * fs/ext2.c (FILETYPE_INO_MASK, FILETYPE_INO_DIRECTORY)
8906         (FILETYPE_INO_SYMLINK): New macros.
8907         (grub_ext2_find_file): Check if the node is a directory using the
8908         inode stat information instead of using the filetype in the
8909         dirent.  Exclude the first character of an absolute symlink.
8910         (grub_ext2_dir): Mask out the filetype part of the mode member of
8911         the inode.
8913 2004-05-24  Marco Gerards  <metgerards@student.han.nl>
8915         Add support for UFS version 1 and 2.  Add support for the minix
8916         filesystem version 1 and 2, both the variants with 14 and 30 long
8917         filenames.
8918         
8919         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ufs.c and
8920         fs/minix.c.
8921         (grub_emu_SOURCES): Likewise.
8922         (pkgdata_MODULES): Add ufs.mod and minix.mod.
8923         (ufs_mod_SOURCES): New variable.
8924         (ufs_mod_CFLAGS): Likewise.
8925         (minix_mod_SOURCES): Likewise.
8926         (minix_mod_CFLAGS): Likewise.
8927         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/ufs.c and
8928         fs/minix.c.
8929         (grubof_SOURCES): Likewise.
8930         * fs/ufs.c: New file.
8931         * fs/minix.c: New file.
8932         * include/grub/fs.h (grub_ufs_init): New prototype.
8933         (grub_ufs_fini): Likewise.
8934         (grub_minix_init): Likewise.
8935         (grub_minix_fini): Likewise.
8936         * util/grub-emu.c (main): Initialize and deinitialize UFS and
8937         minix fs.
8939 2004-04-30  Jeroen Dekkers  <jeroen@dekkers.cx>
8941         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add normal/arg.c,
8942         commands/ls.c, commands/terminal.c, commands/boot.c,
8943         commands/cmp.c and commands/cat.c.
8944         (grubof_LDFLAGS): Add -nostdlib -static-libgcc -lgcc.
8946         * kern/powerpc/ieee1275/init.c: Include "grub/env.h" instead of
8947         "env.h"
8949 2004-04-04  Yoshinori K. Okuji  <okuji@enbug.org>
8951         All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
8952         and grub_, respectively. Because the conversion is trivial and
8953         mechanical, I omit the details here. Please refer to the CVS
8954         if you need more information.
8956 2004-04-04  Yoshinori K. Okuji  <okuji@enbug.org>
8958         * include/pupa: Renamed to ...
8959         * include/grub: ... this.
8960         * util/i386/pc/pupa-mkimage.c: Renamed to ...
8961         * util/i386/pc/grub-mkimage.c: ... this.
8962         * util/i386/pc/pupa-setup.c: Renamed to ...
8963         * util/i386/pc/grub-setup.c: ... this.
8964         * util/pupa-emu.c: Renamed to ...
8965         * util/grub-emu.c: ... this.
8967 2004-03-29  Marco Gerards  <metgerards@student.han.nl>
8969         Add support for the newworld apple macintosh (PPC).  This has been
8970         tested on the powerbook 2000 only.  It only adds support for
8971         generic ieee1275 functions, console and disk support.  This should
8972         be easy to port to other architectures with support for Open
8973         Firmware.
8974         
8975         * configure.ac: Accept the powerpc as host_cpu.  In the case of
8976         the powerpc cpu set the host_vendor to ieee1275.  Make sure the i386
8977         specific tests are only executed while building for the i386.
8978         Inverse test for crosscompile.
8979         * genmk.rb (Utility): Allow assembler files.
8980         * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno.
8981         * conf/powerpc-ieee1275.rmk: New file.
8982         * disk/powerpc/ieee1275/ofdisk.c: Likewise.
8983         * disk/powerpc/ieee1275/partition.c: Likewise.
8984         * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise.
8985         * include/pupa/powerpc/ieee1275/console.h: Likewise.
8986         * include/pupa/powerpc/ieee1275/partition.h: Likewise.
8987         * include/pupa/powerpc/ieee1275/time.h: Likewise.
8988         * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise.
8989         * include/pupa/powerpc/ieee1275/multiboot.h: Likewise.
8990         * include/pupa/powerpc/ieee1275/loader.h
8991         * include/pupa/powerpc/setjmp.h: Likewise.
8992         * include/pupa/powerpc/types.h: Likewise.
8993         * kern/powerpc/ieee1275/init.c: Likewise.
8994         * kern/powerpc/ieee1275/openfw.c: Likewise.
8995         * term/powerpc/ieee1275/ofconsole.c: Likewise.
8997         These files were written by Johan Rydberg
8998         (jrydberg@night.trouble.net) and I only modified them slightly.
8999                 
9000         * boot/powerpc/ieee1275/cmain.c: New file.
9001         * boot/powerpc/ieee1275/crt0.S: Likewise.
9002         * boot/powerpc/ieee1275/ieee1275.c: Likewise.
9003         * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
9005 2004-03-14  Jeroen Dekkers  <jeroen@dekkers.cx>
9007         * Makefile.in: Update copyright.
9008         * genmodsrc.sh: Likewise.
9009         * gensymlist.sh: Likewise.
9010         * term/i386/pc/vga.c: Indent correctly.
9012         * util/i386/pc/pupa-mkimage.c (usage): Use PACKAGE_BUGREPORT as
9013         bugreporting address.
9014         * util/i386/pc/pupa-setup.c (usage): Likewise,
9015         (main): Call pupa_ext2_init and pupa_ext2_fini.
9017         * fs/fat.c (log2): Renamed to ... 
9018         (fat_log2): ... this.
9019         All callers changed.
9020         * kern/misc.c (memcpy): Alias to pupa_memmove.
9021         * loader/i386/pc/multiboot.c (pupa_rescue_cmd_multiboot): Fix
9022         lvalue cast.
9023         * util/console.c (pupa_ncurses_fini): Return 0.
9025         * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open)[__linux__]:
9026         Move fail label here.
9027         [__GNU__]: Don't warn when using stat.
9028         (open_device)[!__linux__]: Check if FD < 0 instead of !FD.
9029         (pupa_util_biosdisk_get_pupa_dev)[__GNU__]: Change type of N to
9030         long int. Use strtol instead of strtoul.
9031         
9032 2004-03-14  Marco Gerards  <metgerards@student.han.nl>
9034         * commands/boot.c: New file.
9035         * commands/cat.c: Likewise.
9036         * commands/cmp.c: Likewise.
9037         * commands/ls.c: Likewise.
9038         * commands/terminal.c: Likewise.
9039         * normal/command.c: Include <pupa/env.h> and <pupa/dl.h>.
9040         (pupa_register_command): Changed interface to match the new
9041         argument parser.
9042         (pupa_command_execute): Changed (almost rewritten) so it uses
9043         pupa_split_command.  Added support for setting variables using the
9044         syntax `foo=bar'.
9045         (rescue_command): Changed to work with the new argument parser.
9046         (terminal_command): Moved from here to commands/terminal.c.
9047         (set_command): New function.
9048         (unset_command): New function.
9049         (insmod_command): New function.
9050         (rmmod_command): New function.
9051         (lsmod_command): New function.
9052         (pupa_command_init): Don't initialize the command terminal
9053         anymore.  Initialize the commands set, unset, insmod, rmmod and
9054         lsmod.
9055         * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/env.c.
9056         (kernel_img_HEADERS): Add arg.h and env.h.
9057         (pupa_mkimage_LDFLAGS): Add kern/env.c.
9058         (pupa_emu_SOURCES): Add kern/env.c, commands/ls.c,
9059         commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c,
9060         normal/arg.c.
9061         (pkgdata_MODULES): Add ls.mod, boot.mod, cmp.mod, cat.mod and
9062         terminal.mod.
9063         (normal_mod_SOURCES): Add normal/arg.c and normal/arg.c.
9064         (boot_mod_SOURCES): New variable.
9065         (terminal_mod_SOURCES): Likewise.
9066         (ls_mod_SOURCES): Likewise.
9067         (cmp_mod_SOURCES): Likewise.
9068         (cat_mod_SOURCES): Likewise.
9070         * normal/arg.c: New file.
9071         * kern/env.c: Likewise.
9072         * include/pupa/arg.h: Likewise.
9073         * include/pupa/env.h: Likewise.
9074         * font/manager.c (font_command): Changed to match argument parsing
9075         interface changes.
9076         (PUPA_MOD_INIT): Likewise.
9077         * hello/hello.c (pupa_cmd_hello): Likewise.
9078         (PUPA_MOD_INIT): Likewise.
9079         * include/pupa/disk.h: Include <pupa/device.h>.
9080         (pupa_print_partinfo): New prototype.
9081         * include/pupa/dl.h (pupa_dl_set_prefix): Prototype removed.
9082         (pupa_dl_get_prefix): Likewise.
9083         * include/pupa/misc.h: Include <pupa/err.h>.
9084         (pupa_isgraph): New prototype.
9085         (pupa_isdigit): Likewise.
9086         (pupa_split_cmdline): Likewise.
9087         * include/pupa/normal.h: Include <pupa/arg.h>.
9088         (pupa_command): Changed the prototype of the member `func' to
9089         match the argument parsing interface.  Added member `options'.
9090         (pupa_register_command): Updated to match function.
9091         (pupa_arg_parse): New prototype.
9092         (pupa_hello_init) [PUPA_UTIL]: New prototype.
9093         (pupa_hello_fini) [PUPA_UTIL]: Likewise.
9094         (pupa_ls_init) [PUPA_UTIL]: Likewise.
9095         (pupa_ls_fini) [PUPA_UTIL]: Likewise.
9096         (pupa_cat_init) [PUPA_UTIL]: Likewise.
9097         (pupa_cat_fini) [PUPA_UTIL]: Likewise.
9098         (pupa_boot_init) [PUPA_UTIL]: Likewise.
9099         (pupa_boot_fini) [PUPA_UTIL]: Likewise.
9100         (pupa_cmp_init) [PUPA_UTIL]: Likewise.
9101         (pupa_cmp_fini) [PUPA_UTIL]: Likewise.
9102         (pupa_terminal_init) [PUPA_UTIL]: Likewise.
9103         (pupa_terminal_fini) [PUPA_UTIL]: Likewise.
9104         * kern/disk.c: Include <pupa/file.h>.
9105         (pupa_print_partinfo): New function.
9106         * kern/dl.c: Include <pupa/env.h>.
9107         (pupa_dl_dir): Variable removed.
9108         (pupa_dl_load): Use the environment variable `prefix' instead of
9109         the variable pupa_dl_dir.
9110         (pupa_dl_set_prefix): Function removed.
9111         (pupa_dl_get_prefix): Likewise.
9112         * kern/i386/pc/init.c: Include <pupa/env.h>.
9113         (pupa_machine_init): Use the environment variable `prefix' instead of
9114         using pupa_dl_set_prefix to set the prefix.
9115         * kern/main.c: Include <pupa/env.h>.
9116         (pupa_set_root_dev): Use the environment variable `prefix' instead of
9117         using pupa_dl_get_prefix to get the prefix.
9118         * kern/misc.c: Include <pupa/env.h>.
9119         (pupa_isdigit): New function.
9120         (pupa_isgraph): Likewise.
9121         (pupa_ftoa): Likewise.
9122         (pupa_vsprintf): Added support for printing values of the type
9123         `double'.  Make it possible to format variable output when using
9124         formatting like `%1.2%f'.
9125         (pupa_split_cmdline): New function.
9126         * kern/rescue.c: Include <pupa/env.h>.
9127         (next_word): Removed function.
9128         (pupa_rescue_cmd_prefix): Likewise.
9129         (pupa_rescue_cmd_set): New function.
9130         (pupa_rescue_cmd_unset): New function.
9131         (pupa_enter_rescue_mode): Use the `pupa_split_cmdline' function to
9132         split the command line instead of splitting it here.  Added
9133         support for setting variables using the syntax `foo=bar'.  Don't
9134         initialize the prefix command anymore.  Initialized the set and
9135         unset commands.
9136         * normal/cmdline.c: Include <pupa/env.h>.
9137         (pupa_tab_complete): Added prototypes for print_simple_completion,
9138         print_partition_completion, add_completion, iterate_commands,
9139         iterate_dev, iterate_part and iterate_dir. Moved code to print
9140         partition information from here to kern/disk.c.
9141         (pupa_cmdline_run): Don't check if the funtion exists anymore.
9142         * normal/main.c: Include <pupa/env.h>.
9143         (pupa_rescue_cmd_normal): Use the environment variable `prefix'
9144         instead of using pupa_dl_get_prefix to get the prefix.
9145         * term/i386/pc/vga.c: Include <pupa/arg.h>.
9146         (check_vga_mem): Cast pointers to `void *' to silence a gcc
9147         warning.
9148         (pupa_vga_putchar) [! DEBUG_VGA]: Removed for this case.
9149         (pupa_vga_setcolor): Declare unused variables with `__attribute__
9150         ((unused))' to silence a gcc warning.
9151         (pupa_vga_setcolor): Likewise.
9152         (debug_command): Changed to match argument parsing
9153         interface changes.
9154         * util/pupa-emu.c: Include <pupa/env.h>.
9155         (options): Added 0's for unused fields to silence a gcc warning.
9156         (argp): Likewise.
9157         (main): Use the environment variable `prefix' instead of using
9158         pupa_dl_set_prefix to set the prefix.  Initialize the commands ls,
9159         boot, cmp, cat and terminal.  Finish the commands boot, cmp, cat
9160         and terminal.
9162         * util/i386/pc/getroot.c: Include <pupa/i386/pc/util/biosdisk.h>.
9163         * util/misc.c: Include <malloc.h>.
9164         (pupa_malloc): Rewritten so errors are correctly reported.
9165         (pupa_realloc): Likewise.
9166         (pupa_memalign): Likewise.
9167         (pupa_mm_init_region): Declare unused variables with
9168         `__attribute__ ((unused))' to silence a gcc warning.
9169         * normal/i386/setjmp.S: Remove tab at the end of the file to
9170         silence a gcc warning.
9171         * loader/i386/pc/linux.c (pupa_rescue_cmd_initrd): Declare unused
9172         variables with `__attribute__ ((unused))' to silence a gcc
9173         warning.
9174         * loader/i386/pc/multiboot.c (pupa_multiboot_unload): Make the
9175         local variable i unsigned to silence a gcc warning.
9177         * kern/term.c: Include <pupa/misc.h>.
9178         (pupa_more_lines): New variable.
9179         (pupa_more): Likewise.
9180         (pupa_putcode): When the pager is active pause at the end of every
9181         screen.
9182         (pupa_set_more): New function.
9183         * include/pupa/term.h (pupa_set_more): New prototype.
9186 2004-03-07  Yoshinori K. Okuji  <okuji@enbug.org>
9188         Now this project is GRUB 2 rather than PUPA. The location of
9189         the CVS repository was moved to GRUB's.
9190         
9191         * configure.ac: Use bug-grub as the reporting address.
9192         Use GRUB instead of PUPA.
9193         Change the version number to 1.90.
9195 2004-02-24  Yoshinori K. Okuji  <okuji@enbug.org>
9197         * genkernsyms.sh: Updated copyright information.
9198         * genmk.rb: Likewise.
9199         * genmodsrc.sh: Likewise.
9200         * gensymlist.sh: Likewise.
9201         * boot/i386/pc/boot.S: Likewise.
9202         * boot/i386/pc/diskboot.S: Likewise.
9203         * disk/i386/pc/biosdisk.c: Likewise.
9204         * disk/i386/pc/partition.c: Likewise.
9205         * font/manager.c: Likewise.
9206         * fs/ext2.c: Likewise.
9207         * fs/fat.c: Likewise.
9208         * include/pupa/boot.h: Likewise.
9209         * include/pupa/device.h: Likewise.
9210         * include/pupa/disk.h: Likewise.
9211         * include/pupa/dl.h: Likewise.
9212         * include/pupa/elf.h: Likewise.
9213         * include/pupa/err.h: Likewise.
9214         * include/pupa/file.h: Likewise.
9215         * include/pupa/font.h: Likewise.
9216         * include/pupa/fs.h: Likewise.
9217         * include/pupa/kernel.h: Likewise.
9218         * include/pupa/loader.h: Likewise.
9219         * include/pupa/misc.h: Likewise.
9220         * include/pupa/mm.h: Likewise.
9221         * include/pupa/net.h: Likewise.
9222         * include/pupa/normal.h: Likewise.
9223         * include/pupa/rescue.h: Likewise.
9224         * include/pupa/setjmp.h: Likewise.
9225         * include/pupa/symbol.h: Likewise.
9226         * include/pupa/term.h: Likewise.
9227         * include/pupa/types.h: Likewise.
9228         * include/pupa/i386/setjmp.h: Likewise.
9229         * include/pupa/i386/types.h: Likewise.
9230         * include/pupa/i386/pc/biosdisk.h: Likewise.
9231         * include/pupa/i386/pc/boot.h: Likewise.
9232         * include/pupa/i386/pc/console.h: Likewise.
9233         * include/pupa/i386/pc/init.h: Likewise.
9234         * include/pupa/i386/pc/kernel.h: Likewise.
9235         * include/pupa/i386/pc/linux.h: Likewise.
9236         * include/pupa/i386/pc/loader.h: Likewise.
9237         * include/pupa/i386/pc/memory.h: Likewise.
9238         * include/pupa/i386/pc/multiboot.h: Likewise.
9239         * include/pupa/i386/pc/partition.h: Likewise.
9240         * include/pupa/i386/pc/time.h: Likewise.
9241         * include/pupa/i386/pc/vga.h: Likewise.
9242         * include/pupa/i386/pc/util/biosdisk.h: Likewise.
9243         * include/pupa/util/getroot.h: Likewise.
9244         * include/pupa/util/misc.h: Likewise.
9245         * include/pupa/util/resolve.h: Likewise.
9246         * kern/device.c: Likewise.
9247         * kern/disk.c: Likewise.
9248         * kern/dl.c: Likewise.
9249         * kern/err.c: Likewise.
9250         * kern/file.c: Likewise.
9251         * kern/fs.c: Likewise.
9252         * kern/loader.c: Likewise.
9253         * kern/main.c: Likewise.
9254         * kern/misc.c: Likewise.
9255         * kern/mm.c: Likewise.
9256         * kern/rescue.c: Likewise.
9257         * kern/term.c: Likewise.
9258         * kern/i386/dl.c: Likewise.
9259         * kern/i386/pc/init.c: Likewise.
9260         * kern/i386/pc/lzo1x.S: Likewise.
9261         * kern/i386/pc/startup.S: Likewise.
9262         * loader/i386/pc/chainloader.c: Likewise.
9263         * loader/i386/pc/linux.c: Likewise.
9264         * loader/i386/pc/multiboot.c: Likewise.
9265         * normal/cmdline.c: Likewise.
9266         * normal/command.c: Likewise.
9267         * normal/main.c: Likewise.
9268         * normal/menu.c: Likewise.
9269         * normal/i386/setjmp.S: Likewise.
9270         * term/i386/pc/console.c: Likewise.
9271         * term/i386/pc/vga.c: Likewise.
9272         * util/console.c: Likewise.
9273         * util/genmoddep.c: Likewise.
9274         * util/misc.c: Likewise.
9275         * util/pupa-emu.c: Likewise.
9276         * util/resolve.c: Likewise.
9277         * util/unifont2pff.rb: Likewise.
9278         * util/i386/pc/biosdisk.c: Likewise.
9279         * util/i386/pc/getroot.c: Likewise.
9280         * util/i386/pc/pupa-mkimage.c: Likewise.
9281         * util/i386/pc/pupa-setup.c: Likewise.
9283 2004-02-15  Jeroen Dekkers  <jeroen@dekkers.cx>
9285         * fs/ext2.c (pupa_ext2_read_file): Correct the value of BLOCKEND
9286         when it is EXT2_BLOCK_SIZE (data).  New argument READ_HOOK, all
9287         callers changed.  Set DATA->DISK->READ_HOOK to READ_HOOK before
9288         reading and reset it after reading.
9289         (pupa_ext2_close): Return PUPA_ERR_NONE.
9291         * include/pupa/i386/pc/linux.h (PUPA_LINUX_INITRD_MAX_ADDRESS):
9292         Correct value.
9293         (struct linux_kernel_header): Add kernel_version and
9294         initrd_addr_max.
9295         * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Check whether
9296         pupa_file_read succeeds.
9297         (pupa_rescue_cmd_initrd): Implement.
9299 2003-12-03  Marco Gerards  <metgerards@student.han.nl>
9301         * fs/ext2.c (pupa_ext2_label): New function.
9302         (pupa_ext2_fs): Added label.
9303         * fs/fat.c (pupa_fat_label): New function.
9304         (pupa_fat_fs): Added label.
9305         * include/pupa/fs.h (struct pupa_fs): Added prototype label.
9307         * kern/misc.c (pupa_strndup): New function.
9308         * include/pupa/misc.h (pupa_strndup): New prototype.
9310         * include/pupa/normal.h: Include <pupa/err.h>.
9311         (pupa_set_history): New prototype.
9312         (pupa_iterate_commands): New prototype.
9313         * normal/cmdline.c: Include <pupa/machine/partition.h>,
9314         <pupa/disk.h>, <pupa/file.h>.
9315         (hist_size): New variable.
9316         (hist_lines): Likewise.
9317         (hist_end): Likewise.
9318         (hist_used): Likewise.
9319         (pupa_set_history): New function.
9320         (pupa_history_get): Likewise.
9321         (pupa_history_add): Likewise.
9322         (pupa_history_replace): Likewise.
9323         (pupa_tab_complete): Likewise.
9324         (pupa_cmdline_run): Added tab completion and history buffer.  Tab
9325         completion shows partitionnames while completing partitions, this
9326         feature was suggested by Jeff Bailey.
9327         * normal/command.c (pupa_iterate_commands): New function.
9328         * normal/main.c (PUPA_DEFAULT_HISTORY_SIZE): New macro.
9329         (pupa_normal_init): Initialize history buffer.
9330         (PUPA_MOD_INIT): Likewise.
9331         (pupa_normal_fini): Free the history buffer.
9332         (PUPA_MOD_FINI): Likewise.
9334         * util/console.c (pupa_ncurses_getkey): Accept 127 as backspace
9335         key.
9337         * aclocal.m4 (pupa_I386_CHECK_REGPARM_BUG): New DEFUN.
9338         * configure.ac [i386]: Check for regparam bug.
9339         (NESTED_FUNC_ATTR) [! i386]: Defined.
9341 2003-11-17  Marco Gerards  <metgerards@student.han.nl>
9343         * conf/i386-pc.rmk (sbin_UTILITIES): Added pupa-emu.
9344         (pupa_setup_SOURCES): Added util/i386/pc/getroot.c.
9345         (pupa_emu_SOURCES): New variable.
9346         (pupa_emu_LDFLAGS): Likewise.
9347         * include/pupa/fs.h (pupa_ext2_init) [PUPA_UTIL]: New prototype.
9348         (pupa_ext2_fini) [PUPA_UTIL]: Likewise.
9349         * include/pupa/normal.h (pupa_normal_init) [PUPA_UTIL]: Likewise.
9350         (pupa_normal_fini) [PUPA_UTIL]: Likewise.
9351         * include/pupa/setjmp.h [PUPA_UTIL]: Include <setjmp.h>.
9352         (pupa_jmp_buf): New typedef.
9353         (pupa_setjmp) [PUPA_UTIL]: New macro.
9354         (pupa_longjmp) [PUPA_UTIL]: Likewise.
9355         * include/pupa/term.h (struct pupa_term): New member `refresh'.
9356         (pupa_refresh): New prototype.
9357         * include/pupa/util/getroot.h: New file.
9358         * kern/misc.c (pupa_vsprintf): Refresh the screen after updating
9359         it.
9360         * kern/rescue.c (pupa_rescue_get_command_line): Likewise.
9361         (pupa_rescue_cmd_cat): Likewise.
9362         (pupa_rescue_cmd_ls): Likewise.
9363         (pupa_rescue_cmd_testload): Likewise.
9364         (pupa_rescue_cmd_lsmod): Likewise.
9365         * normal/cmdline.c (pupa_cmdline_get): Likewise.
9366         * normal/menu.c (run_menu): Likewise.
9367         * kern/term.c (pupa_cls): Likewise.
9368         (pupa_refresh): New function.
9369         * normal/normal.c (pupa_normal_init) [PUPA_UTIL]: New function.
9370         (pupa_normal_fini) [PUPA_UTIL]: Likewise.
9371         * util/console.c: New file.
9372         
9373         * util/i386/pc/getroot.c: New file.
9374         * util/i386/pc/pupa-setup.c: Include <pupa/util/getroot.h>.
9375         (pupa_putchar): New function.
9376         (pupa_refresh): Likewise.
9377         (xgetcwd): Function moved to ...
9378         (strip_extra_slashes): Likewise.
9379         (get_prefix): Likewise.
9380         * util/i386/pc/getroot.c: ... here.     
9381         (find_root_device): Function moved and renamed to...
9382         * util/i386/pc/getroot.c (pupa_find_root_device): ... here.
9383         Changed all callers.
9384         * util/i386/pc/pupa-setup.c (guess_root_device): Function moved
9385         and renamed to...
9386         * util/i386/pc/getroot.c (pupa_guess_root_device): ... here.
9387         Changed all callers.
9388         * util/misc.c (pupa_memalign): New function.
9389         (pupa_mm_init_region): Likewise.
9390         (pupa_register_exported_symbols): Likewise.
9391         (pupa_putchar): Function removed.
9392         * util/pupa-emu.c: New file.
9394 2003-11-16  Jeroen Dekkers  <jeroen@dekkers.cx>
9396         * conf/i386-pc.rmk (pkgdata_MODULES): Add _multiboot.mod.
9397         (_multiboot_mod_SOURCES): New variable.
9398         (_multiboot_mod_CFLAGS): Likewise.
9399         * loader/i386/pc/multiboot.c: New file.
9400         * include/pupa/i386/pc/multiboot.h: Likewise.
9401         * kern/i386/pc/startup.S: Include pupa/machine/multiboot.h.
9402         (pupa_multiboot_real_boot): New function.
9403         * include/pupa/i386/pc/loader.h: Include pupa/machine/multiboot.h.
9404         (pupa_multiboot_real_boot): New prototype.
9405         (pupa_rescue_cmd_multiboot): Likewise
9406         (pupa_rescue_cmd_module): Likewise.
9408         * kern/loader.c (pupa_loader_set): Continue when
9409         pupa_loader_unload_func() fails.
9410         (pupa_loader_unset): New function.
9411         * include/pupa/loader.h (pupa_loader_unset): New prototype.
9413         * kern/misc.c (pupa_stpcpy): New function.
9414         * include/pupa/misc.h (pupa_stpcpy): New prototype.
9416 2003-11-12  Marco Gerards  <metgerards@student.han.nl>
9418         * disk/i386/pc/biosdisk.c (pupa_biosdisk_open): Correctly check
9419         for available extensions.
9421         * include/pupa/i386/pc/time.h: New file.
9422         * kern/disk.c: Include <pupa/machine/time.h>.
9423         (PUPA_CACHE_TIMEOUT): New macro.
9424         (pupa_last_time): New variable.
9425         (pupa_disk_open): Flush the cache when there was a timeout.
9426         (pupa_disk_close): Reset the timer.
9427         * kern/i386/pc/startup.S (pupa_get_rtc): Renamed from
9428         pupa_currticks.
9429         * util/misc.c: Include <sys/times.h>
9430         (pupa_get_rtc): New function.
9432 2003-11-09  Jeroen Dekkers  <jeroen@dekkers.cx>
9434         * fs/ext2.c (struct pupa_ext2_inode): Declare struct datablocks
9435         as blocks.
9436         (pupa_ext2_get_file_block): Use blocks member.
9438         * fs/ext2.c (pupa_ext2_read_file): Only set skipfirst for the
9439         first block. Return -1 instead of pupa_errno on error.
9441 2003-10-27  Marco Gerards  <metgerards@student.han.nl>
9443         * README: In the pupa-mkimage example use _chain instead of chain
9444         and ext2 instead of fat.
9445         * TODO: Replace ext2fs with jfs as an example.  Add an item for
9446         adding journal playback for ext2fs.
9447         * conf/i386-pc.rmk (pupa_setup_SOURCES): Added fs/ext2.c.
9448         (pkgdata_MODULES): Added ext2.mod.
9449         (ext2_mod_SOURCES): New variable.
9450         (ext2_mod_CFLAGS): Likewise.
9451         * include/pupa/err.h (pupa_err_t): Added PUPA_ERR_SYMLINK_LOOP.
9452         * include/pupa/misc.h (pupa_strncpy): New prototype.
9453         (pupa_strcat): Likewise.
9454         (pupa_strncmp): Likewise.
9455         * kern/misc.c (pupa_strcat): Enable function.
9456         (pupa_strncpy): New function.
9457         (pupa_strncmp): Likewise.
9458         * fs/ext2.c: New file.
9459         
9460         * kern/disk.c (pupa_disk_read): Set pupa_errno to PUPA_ERR_NONE
9461         when the read failed before retrying.
9462         * util/i386/pc/biosdisk.c (_LARGEFILE_SOURCE): Removed.
9463         (_FILE_OFFSET_BITS): Likewise.
9464         * configure.ac: Added AC_SYS_LARGEFILE.
9466 2003-09-25  Yoshinori K. Okuji  <okuji@enbug.org>
9468         * genmk.rb (PModule#rule): Make sure to get only symbol names
9469         from the output of nm.
9470         Reported by Robert Millan <zeratul2@wanadoo.es>.
9472 2003-09-25  Yoshinori K. Okuji  <okuji@enbug.org>
9474         I forgot to check in these changes for a long time. This adds
9475         incomplete support for VGA console, and this is still very
9476         buggy. Also, a lot of consideration is required for I18N,
9477         UNICODE, and VGA font issues. Therefore, assume that this is
9478         such that "better than nothing".
9479         
9480         * font/manager.c: New file.
9481         * include/pupa/font.h: Likewise.
9482         * include/pupa/i386/pc/vga.h: Likewise.
9483         * term/i386/pc/vga.c: Likewise.
9484         * util/unifont2pff.rb: Likewise.
9486         * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vga.h.
9487         (pkgdata_MODULES): Added vga.mod and font.mod.
9488         (vga_mod_SOURCES): New variables.
9489         (vga_mod_CFLAGS): Likewise.
9490         (font_mod_SOURCES): Likewise.
9491         (font_mod_CFLAGS): Likewise.
9493         * include/pupa/err.h (PUPA_ERR_BAD_FONT): New constant.
9495         * include/pupa/term.h: Include pupa/err.h.
9496         (struct pupa_term): Added init and fini. 
9497         Changed the argument of putchar to pupa_uint32_t.
9499         * include/pupa/i386/pc/console.h: Include pupa/symbol.h.
9500         (pupa_console_real_putchar): New prototype.
9501         (pupa_console_putchar): Removed.
9502         (pupa_console_checkkey): Exported.
9503         (pupa_console_getkey): Likewise.
9505         * kern/misc.c (pupa_vsprintf): Add support for UNICODE
9506         characters.
9508         * kern/term.c (pupa_term_set_current): Rewritten.
9509         (pupa_putchar): Likewise.
9510         (pupa_putcode): New function.
9512         * kern/i386/pc/startup.S (pupa_console_putchar): Renamed to ...
9513         (pupa_console_real_putchar): ... this.
9514         (pupa_vga_set_mode): New function.
9515         (pupa_vga_get_font): Likewise.
9517         * normal/command.c: Include pupa/term.h.
9518         (terminal_command): New function.
9519         (pupa_command_init): Register the command "terminal".
9521         * normal/menu.c (DISP_LEFT): Changed to a UNICODE value.
9522         (DISP_UP): Likewise.
9523         (DISP_RIGHT): Likewise.
9524         (DISP_DOWN): Likewise.
9525         (DISP_HLINE): Likewise.
9526         (DISP_VLINE): Likewise.
9527         (DISP_UL): Likewise.
9528         (DISP_UR): Likewise.
9529         (DISP_LL): Likewise.
9530         (DISP_LR): Likewise.
9532         * term/i386/pc/console.c (pupa_console_putchar): New function.
9533         
9534 2003-02-08  NIIBE Yutaka  <gniibe@m17n.org>
9536         * util/resolve.c (pupa_util_resolve_dependencies): BUG
9537         FIX. Reverse the path_list.
9539         * include/pupa/normal.h: Export pupa_register_command and
9540         pupa_unregister_command.
9542         * hello/hello.c (pupa_cmd_hello): New module.
9543         * conf/i386-pc.rmk: Added hello.mod.
9545 2003-01-31  Yoshinori K. Okuji  <okuji@enbug.org>
9547         * kern/i386/pc/lzo1x.S: New file.
9548         
9549         * util/i386/pc/pupa-mkimage.c: Include lzo1x.h.
9550         (compress_kernel): New variable.
9551         (generate_image): Heavily modified to support compressing a
9552         large part of the core image.
9554         * util/misc.c (pupa_util_read_image): Fix a file descriptor
9555         leak.
9556         (pupa_util_load_image): New function.
9558         * kern/i386/pc/startup.S: Include pupa/machine/kernel.h.
9559         (pupa_compressed_size): New variable.
9560         (codestart): Enable Gate A20 here.
9561         Decompress the compressed part of the core image.
9562         Rearrange the code to put functions and variables which are
9563         required for initialization in the non-compressed part.
9564         Include lzo1x.S.
9566         * kern/i386/pc/init.c (pupa_machine_init): Don't enable Gate A20
9567         here.
9569         * include/pupa/util/misc.h (pupa_util_write_image): Declared.
9571         * include/pupa/i386/pc/kernel.h 
9572         (PUPA_KERNEL_MACHINE_COMPRESSED_SIZE): New macro.
9573         (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): Increased by 4.
9574         (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
9575         (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
9576         (PUPA_KERNEL_MACHINE_RAW_SIZE): New macro.
9578         * conf/i386-pc.rmk (pupa_mkimage_LDFLAGS): New variable.
9580         * genmk.rb (Image#rule): Put LDFLAGS at the end of a line.
9581         (Utility#rule): Likewise.
9583         * configure.ac: Check if LZO is available.
9585 2003-01-20  Yoshinori K. Okuji  <okuji@enbug.org>
9587         * include/pupa/normal.h: New file.
9588         * include/pupa/setjmp.h: Likewise.
9589         * include/pupa/i386/setjmp.h: Likewise.
9590         * normal/cmdline.c: Likewise.
9591         * normal/command.c: Likewise.
9592         * normal/main.c: Likewise.
9593         * normal/menu.c: Likewise.
9594         * normal/i386/setjmp.S: Likewise.
9595         
9596         * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Made global.
9597         (pupa_rescue_cmd_initrd): Likewise.
9599         * loader/i386/pc/chainloader.c (pupa_rescue_cmd_chainloader):
9600         Likewise.
9602         * kern/i386/pc/startup.S (translation_table): New variable.
9603         (translate_keycode): New function.
9604         (pupa_console_getkey): Call translate_keycode.
9606         * kern/rescue.c (attempt_normal_mode): New function.
9607         (pupa_enter_rescue_mode): Attempt to execute the normal mode. If
9608         it failed, print a message.
9610         * kern/mm.c (pupa_real_malloc): Print more information when a
9611         free magic is broken.
9612         (pupa_free): If the first free header is not free actually, set
9613         it to P.
9615         * kern/main.c (pupa_load_normal_mode): Just load the module
9616         "normal".
9617         (pupa_main): Don't print the message
9618         "Entering into rescue mode..." here.
9620         * include/pupa/i386/pc/loader.h (pupa_rescue_cmd_initrd):
9621         Declared.
9622         (pupa_rescue_cmd_initrd): Likewise.
9623         (pupa_rescue_cmd_initrd): Likewise.
9625         * include/pupa/symbol.h (FUNCTION): Specify the type.
9626         (VARIABLE): Likewise.
9628         * include/pupa/err.h (pupa_err_t): Added
9629         PUPA_ERR_UNKNOWN_COMMAND.
9631         * include/pupa/dl.h (pupa_dl_set_prefix): Exported.
9632         (pupa_dl_get_prefix): Likewise.
9634         * conf/i386-pc.rmk (pkgdata_MODULES): Added normal.mod.
9635         Added _chain.mod and _linux.mod instead of chain.mod and
9636         linux.mod.
9637         (chain_mod_SOURCES): Renamed to ...
9638         (_chain_mod_SOURCES): ... this.
9639         (chain_mod_CFLAGS): Renamed to ...
9640         (_chain_mod_CFLAGS): ... this.
9641         (linux_mod_SOURCES): Renamed to ...
9642         (_linux_mod_SOURCES): ... this.
9643         (linux_mod_CFLAGS): Renamed to ...
9644         (_linux_mod_CFLAGS): ... this.
9645         (normal_mod_SOURCES): New variable.
9646         (normal_mod_CFLAGS): Likewise.
9647         (normal_mod_ASFLAGS): Likewise.
9649 2003-01-18  Yoshinori K. Okuji  <okuji@enbug.org>
9651         * kern/rescue.c (pupa_rescue_cmd_rmmod): Call pupa_dl_unload, if
9652         possible.
9654         * kern/dl.c (pupa_dl_ref): Refer dependending modules
9655         recursively.
9656         (pupa_dl_unref): Unrefer depending modules recursively.
9657         Don't call pupa_dl_unload implicitly, because PUPA can crash if
9658         a module is unloaded before one depending on that module is
9659         unloaded.
9660         (pupa_dl_unload): Unload depending modules explicitly,
9661         if possible.
9663 2003-01-17  Yoshinori K. Okuji  <okuji@enbug.org>
9665         * include/pupa/i386/pc/linux.h: New file.
9666         * loader/i386/pc/linux.c: Likewise.
9667         
9668         * loader/i386/pc/chainloader.c (pupa_chainloader_boot_sector):
9669         Removed.
9670         (pupa_chainloader_unload): Return PUPA_ERR_NONE.
9671         (pupa_rescue_cmd_chainloader): Read the image to 0x7C00 instead
9672         of PUPA_CHAINLOADER_BOOT_SECTOR.
9674         * kern/i386/pc/startup.S: Include pupa/machine/linux.h.
9675         (pupa_linux_prot_size): New variable.
9676         (pupa_linux_tmp_addr): Likewise.
9677         (pupa_linux_real_addr): Likewise.
9678         (pupa_linux_boot_zimage): New function.
9679         (pupa_linux_boot_bzimage): Likewise.
9681         * kern/i386/pc/init.c (struct mem_region): New structure.
9682         (MAX_REGIONS): New macro.
9683         (mem_regions): New variable.
9684         (num_regions): Likewise.
9685         (pupa_os_area_addr): Likewise.
9686         (pupa_os_area_size): Likewise.
9687         (pupa_lower_mem): Likewise.
9688         (pupa_upper_mem): Likewise.
9689         (add_mem_region): New function.
9690         (compact_mem_regions): Likewise.
9691         (pupa_machine_init): Set PUPA_LOWER_MEM and PUPA_UPPER_MEM to
9692         the size of the conventional memory and that of so-called upper
9693         memory (before the first memory hole).
9694         Instead of adding each found region to free memory, use
9695         add_mem_region and add them after removing overlaps.
9696         Also, add only 1/4 of the upper memory to free memory. The rest
9697         is used for loading OS images. Maybe this is ad hoc, but this
9698         makes it much easier to relocate OS images when booting.
9700         * kern/rescue.c (pupa_rescue_cmd_module): Removed.
9701         (pupa_enter_rescue_mode): Don't register initrd and module.
9703         * kern/mm.c: Include pupa/dl.h.
9705         * kern/main.c: Include pupa/file.h and pupa/device.h.
9707         * kern/loader.c (pupa_loader_load_module_func): Removed.
9708         (pupa_loader_load_module): Likewise.
9710         * kern/dl.c (pupa_dl_load): Use the suffix ``.mod'' instead of
9711         ``.o''.
9713         * include/pupa/i386/pc/loader.h (pupa_linux_prot_size): Declared.
9714         (pupa_linux_tmp_addr): Likewise.
9715         (pupa_linux_real_addr): Likewise.
9716         (pupa_linux_boot_zimage): Likewise.
9717         (pupa_linux_boot_bzimage): Likewise.
9719         * include/pupa/i386/pc/init.h (pupa_lower_mem): Declared.
9720         (pupa_upper_mem): Likewise.
9721         (pupa_gate_a20): Don't export, because turning off Gate A20 in a
9722         module is too dangerous.
9724         * include/pupa/loader.h (pupa_os_area_addr): Declared.
9725         (pupa_os_area_size): Likewise.
9726         (pupa_loader_set): Remove the first argument. Loader doesn't
9727         manage modules or initrd any longer.
9728         (pupa_loader_load_module): Removed.
9730         * conf/i386-pc.rmk (pkgdata_MODULES): Added linux.mod.
9731         (linux_mod_SOURCES): New variable.
9732         (linux_mod_CFLAGS): Likewise.
9734 2003-01-07  Yoshinori K. Okuji  <okuji@enbug.org>
9736         * util/i386/pc/pupa-setup.c (setup): Convert the endianness of
9737         the length of a blocklist correctly.
9739         * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open) [__linux__]:
9740         Use ioctl only if the OS file is a block device.
9741         (pupa_util_biosdisk_open): Don't use ST.ST_BLOCKS, because it is
9742         not very useful for normal files.
9744         * kern/main.c (pupa_set_root_dev): New function.
9745         (pupa_load_normal_mode): Likewise.
9746         (pupa_main): Call those above.
9748         * include/pupa/types.h (pupa_swap_bytes16): Cast the result to
9749         pupa_uint16_t.
9751         * include/pupa/kernel.h (pupa_enter_normal_mode): Removed.
9753 2003-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
9755         * util/i386/pc/pupa-setup.c: Include pupa/machine/kernel.h.
9756         (setup): Configure the installed partition information and the
9757         dl prefix.
9759         * loader/i386/pc/chainloader.c (my_mod): New variable.
9760         (pupa_chainloader_unload): New function.
9761         (pupa_rescue_cmd_chainloader): Refer itself.
9762         (PUPA_MOD_INIT): Save its own module in MY_MOD.
9764         * kern/i386/pc/startup.S (install_partition): Removed.
9765         (version_string): Likewise.
9766         (config_file): Likewise.
9767         (pupa_install_dos_part): New variable.
9768         (pupa_install_bsd_part): Likewise.
9769         (pupa_prefix): Likewise.
9770         (pupa_chainloader_real_boot): Call pupa_dl_unload_all.
9772         * kern/i386/pc/init.c: Include pupa/machine/kernel.h, pupa/dl.h
9773         and pupa/misc.h.
9774         (make_install_device): New function.
9775         (pupa_machine_init): Set the dl prefix.
9777         * kern/rescue.c: Include pupa/rescue.h and pupa/dl.h.
9778         (buf): Renamed to ...
9779         (linebuf): ... this.
9780         (pupa_rescue_cmd_prefix): New function.
9781         (pupa_rescue_cmd_insmod): Likewise.
9782         (pupa_rescue_cmd_rmmod): Likewise.
9783         (pupa_rescue_cmd_lsmod): Likewise.
9784         (pupa_enter_rescue_mode): Register new commands: prefix, insmod,
9785         rmmod and lsmod.
9787         * kern/mm.c (pupa_memalign): If failed even after invalidating
9788         disk caches, unload unneeded modules and retry.
9790         * kern/misc.c (pupa_memmove): New function.
9791         (pupa_memcpy): Removed.
9792         (pupa_strcpy): New function.
9793         (pupa_itoa): Made static.
9795         * kern/dl.c (pupa_dl_iterate): New function.
9796         (pupa_dl_ref): Likewise.
9797         (pupa_dl_unref): Likewise.
9798         (pupa_dl_unload): Return if succeeded or not.
9799         (pupa_dl_unload_unneeded): New function.
9800         (pupa_dl_unload_all): Likewise.
9801         (pupa_dl_init): Renamed to ...
9802         (pupa_dl_set_prefix): ... this.
9803         (pupa_dl_get_prefix): New function.
9805         * include/pupa/i386/pc/kernel.h: Include pupa/types.h.
9806         (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): New macro.
9807         (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
9808         (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
9809         (pupa_install_dos_part): Declared.
9810         (pupa_install_bsd_part): Likewise.
9811         (pupa_prefix): Likewise.
9812         (pupa_boot_drive): Likewise.
9814         * include/pupa/types.h: Fix a typo.
9816         * include/pupa/misc.h (pupa_memcpy): New macro. Just an alias to
9817         pupa_memmove.
9818         (pupa_memmove): Declared.
9819         (pupa_strcpy): Likewise.
9821         * include/pupa/dl.h (PUPA_MOD_INIT): Change the prototype. Now
9822         pupa_mod_init takes one argument, its own module.
9823         (pupa_dl_unload_unneeded): Declared.
9824         (pupa_dl_unload_all): Likewise.
9825         (pupa_dl_ref): Likewise.
9826         (pupa_dl_unref): Likewise.
9827         (pupa_dl_iterate): Likewise.
9828         (pupa_dl_init): Renamed to ...
9829         (pupa_dl_set_prefix): ... this.
9830         (pupa_dl_get_prefix): Declared.
9832         * fs/fat.c [!PUPA_UTIL] (my_mod): New variable.
9833         (pupa_fat_dir) [!PUPA_UTIL]: Prevent the fat module from being 
9834         unloaded.
9835         (pupa_fat_open) [!PUPA_UTIL]: Refer itself if succeeded.
9836         (pupa_fat_close) [!PUPA_UTIL]: Unrefer itself.
9838         * configure.ac (tmp_CFLAGS): Added -Wshadow, -Wpointer-arith,
9839         -Wmissing-prototypes, -Wundef and -Wstrict-prototypes.
9841 2003-01-03  Yoshinori K. Okuji  <okuji@enbug.org>
9843         * util/i386/pc/pupa-setup.c (setup): Define the internal
9844         function find_first_partition_start at the top level, because GCC
9845         3.0.x cannot compile internal functions in deeper scopes
9846         correctly.
9847         (find_root_device): Use lstat instead of stat.
9848         Don't follow symbolic links.
9849         Fix the path-constructing code.
9851         * util/i386/pc/biosdisk.c [__linux__] (BLKFLSBUF): New macro.
9852         (pupa_util_biosdisk_open) [__linux__]: Get the size of a device
9853         by a BLKGETSIZE ioctl first, because block devices don't fill
9854         the member st_mode of the structure stat on Linux.
9855         [__linux__] (linux_find_partition): Use a temporary buffer
9856         REAL_DEV for the working space. Copy it to DEV before returning.
9857         (open_device) [__linux__]: Call ioctl with BLKFLSBUF to make the
9858         buffer cache consistent.
9859         (get_os_disk) [__linux__]: Use the length 5 instead of 4 for
9860         strncmp. The previous value was merely wrong.
9861         (pupa_util_biosdisk_get_pupa_dev): Use stat instead of lstat.
9863         * fs/fat.c (pupa_fat_read_data): Shift 4 instead of 12 when the
9864         FAT size is 12. The previous value was merely wrong.
9866         * kern/main.c (pupa_main): Don't split the starting message from
9867         newlines.
9869         * kern/term.c (pupa_putchar): Put CR after LF instead of before
9870         LF, because BIOS goes crazy about character attributes in this
9871         case.
9873 2003-01-03  Yoshinori K. Okuji  <okuji@enbug.org>
9875         * include/i386/pc/util/biosdisk.h: New file.
9876         * util/i386/pc/biosdisk.c: Likewise.
9877         * util/i386/pc/pupa-setup.c: Likewise.
9878         
9879         * Makefile.in (INCLUDE_DISTFILES): Added
9880         include/pupa/i386/pc/util/biosdisk.h.
9881         (UTIL_DISTFILES): Added biosdisk.c and pupa-setup.c under the
9882         directory util/i386/pc.
9883         (install-local): Added a rule for sbin_UTILITIES.
9884         (uninstall): Likewise.
9886         * util/i386/pc/pupa-mkimage.c (usage): Fix a typo in the doc.
9888         * util/misc.c (xrealloc): New function.
9889         (pupa_malloc): Likewise.
9890         (pupa_free): Likewise.
9891         (pupa_realloc): Likewise.
9892         (pupa_stop): Likewise.
9893         (pupa_putchar): Likewise.
9895         * kern/disk.c (pupa_disk_read): Prevent L from underflowing.
9897         * include/pupa/util/misc.h (xrealloc): Declared.
9899         * include/pupa/i386/pc/boot.h (PUPA_BOOT_MACHINE_BPB_START): New
9900         macro.
9901         (PUPA_BOOT_MACHINE_BPBEND): Renamed to ...
9902         (PUPA_BOOT_MACHINE_BPB_END): ... this.
9904         * include/pupa/fs.h [PUPA_UTIL] (pupa_fat_init): Declared.
9905         [PUPA_UTIL] (pupa_fat_fini): Likewise.
9907         * fs/fat.c [PUPA_UTIL] (pupa_fat_init): Defined. Maybe a better
9908         way should be implemented.
9909         [PUPA_UTIL] (pupa_fat_fini): Likewise.
9911         * disk/i386/pc/biosdisk.c (pupa_biosdisk_call_hook): Increase
9912         the size of NAME for safety.
9913         (pupa_biosdisk_iterate): Search hard disks to 0x90 instead of
9914         0x88.
9916         * conf/i386-pc.rmk (sbin_UTILITIES): New variable.
9917         (pupa_setup_SOURCES): Likewise.
9919         * genmk.rb (Utility#rule): Add $(BUILD_CFLAGS) into the rules.
9921 2002-12-28  Yoshinori K. Okuji  <okuji@enbug.org>
9923         * kern/i386/pc/startup.S (push_get_mmap_entry): Revert to a
9924         bunch of pushl's from pusha, because this destroys the return
9925         value.
9927 2002-12-28  Yoshinori K. Okuji  <okuji@enbug.org>
9929         Use -mrtd and -mregparm=3 to reduce the generated code sizes.
9930         This means that any missing prototypes could be fatal. Also, you
9931         must take care when writing assembly code. See the comments at
9932         the beginning of startup.S, for more details.
9933         
9934         * kern/i386/pc/startup.S (pupa_halt): Modified for the new
9935         compilation mechanism.
9936         (pupa_chainloader_real_boot): Likewise.
9937         (pupa_biosdisk_rw_int13_extensions): Likewise.
9938         (pupa_biosdisk_rw_standard): Likewise.
9939         (pupa_biosdisk_check_int13_extensions): Likewise.
9940         (pupa_biosdisk_get_diskinfo_int13_extensions): Likewise.
9941         (pupa_biosdisk_get_diskinfo_standard): Likewise.
9942         (pupa_get_memsize): Likewise.
9943         (pupa_get_mmap_entry): Likewise.
9944         (pupa_console_putchar): Likewise.
9945         (pupa_console_setcursor): Likewise.
9946         (pupa_getrtsecs): Use pushl instead of push.
9948         * kern/i386/pc/init.c (pupa_machine_init): Use the scratch
9949         memory instead of the stack for a mmap entry, because some
9950         BIOSes may ignore the maximum size and overflow.
9952         * conf/i386-pc.rmk (COMMON_CFLAGS): Added -mrtd and -mregparm=3.
9954         * genmk.rb (PModule#rule): Compile automatically generated
9955         sources with module-specific CFLAGS as well as other sources.
9957 2002-12-27  Yoshinori K. Okuji  <okuji@enbug.org>
9959         * configure.ac: Check ld.
9960         Replace CFLAGS and CPPFLAGS with BUILD_CFLAGS and BUILD_CPPFLAGS
9961         respectively, before checking endianness and sizes.
9963         * Makefile.in (LD): New variable.
9964         
9965 2002-12-27  Yoshinori K. Okuji  <okuji@enbug.org>
9967         * Makefile.in (BUILD_CC): CC -> BUILD_CC.
9969 2002-12-27  Yoshinori K. Okuji  <okuji@enbug.org>
9971         * Changelog: New file.