Remove incorrect comment that the code must be position independent.
[grub2/bean.git] / ChangeLog
blob51c211c43903c0b1d91209fa66fd3fac1595f7c6
1 2009-05-14  Christian Franke  <franke@computer.org>
3         * commands/i386/pc/drivemap_int13h.S: Add missing EXT_C for symbols.
4         This fixes build on Cygwin.
6 2009-05-14  Pavel Roskin  <proski@gnu.org>
8         * commands/i386/pc/drivemap_int13h.S: Eliminate unconditional
9         jump.  This saves two bytes, so the typical case of 2 swapped
10         drives would fit 32 bytes.
12 2009-05-13  Pavel Roskin  <proski@gnu.org>
14         * loader/i386/multiboot.c (grub_multiboot): Cast mmap_addr to
15         grub_uint32_t to avoid a warning.
17         * loader/i386/linux.c (allocate_pages): When assigning
18         real_mode_mem, cast through grub_size_t to fix a warning.  The
19         code already makes sure that the value would fit a pointer.
20         (grub_linux_setup_video): Cast render_target->data to
21         grub_size_t to fix a warning.
23 2009-05-13  Javier Martín <lordhabbit@gmail.com>
25         * commands/i386/pc/drivemap.c: New file - implement drivemap
26         command.
27         * commands/i386/pc/drivemap_int13h.S: New file - int13 handler.
28         * conf/i386-pc.rmk: Add drivemap.c and drivemap_int13h.S.
30 2009-05-13  Pavel Roskin  <proski@gnu.org>
32         * util/i386/pc/grub-setup.c (setup): Remove unused variable
33         embedding_area_exists.
35 2009-05-13  Robert Millan  <rmh.grub@aybabtu.com>
37         * util/i386/pc/grub-setup.c (setup): Restructure code flow to make
38         it easier to understand / work with.
39         Improve warning messages for cases where there's no embedding area,
40         or when it is too small (or core.img too large).
42 2009-05-13  Pavel Roskin  <proski@gnu.org>
44         * loader/i386/pc/multiboot2.c: Add necessary includes for
45         grub_multiboot2_real_boot().
47         * fs/iso9660.c (grub_iso9660_iterate_dir): The file mode in the
48         PX record is always little-endian.  We only need the lower 2
49         bytes of the mode.
51         * fs/cpio.c: Use the same name "struct head" for tar and cpio to
52         facilitate code reuse.
53         (grub_cpio_mount): Use "struct head", not a char buffer.  This
54         fixes a warning reported by gcc 4.4.
56         * kernel/disk.c (grub_disk_read): Use void pointer for the
57         buffer.
58         (grub_disk_write): Use const void pointer for the buffer.
59         Adjust all callers.  Remove unnecessary casts.
61 2009-05-10  Robert Millan  <rmh.grub@aybabtu.com>
63         * util/i386/pc/grub-install.in: Update copyright year.
65 2009-05-09  Vladimir Serbinenko <phcoder@gmail.com>
67         gptsync
69         * commands/gptsync.c: new file
70         * conf/common.rmk (pkglib_MODULES): add gptsync.mod
71         (gptsync_mod_SOURCES): new variable
72         (gptsync_mod_CFLAGS): likewise
73         (gptsync_mod_LDFLAGS): likewise
74         * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_NTFS): 
75         new definition
76         (GRUB_PC_PARTITION_TYPE_HFS): likewise
77         * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/gptsync.c
78         * conf/i386-ieee1275.rmk: likewise
79         * conf/i386-pc.rmk: likewise
80         * conf/powerpc-ieee1275.rmk: likewise
82 2009-05-09  Vladimir Serbinenko  <phcoder@gmail.com>
84         Fixed grub-emu
86         * kern/dl.c (grub_dl_ref): omit when compiling grub-emu
87         (grub_dl_ref): likewise
89 2009-05-08  Robert Millan  <rmh.grub@aybabtu.com>
91         * util/i386/pc/grub-setup.c (setup): Factorize find_usable_region(),
92         split in two functions (one for msdos and one for gpt).
94 2009-05-08  Pavel Roskin  <proski@gnu.org>
96         * disk/raid.c (grub_raid_block_xor): Make buf2 constant, it's
97         not modified.
99         * disk/raid6_recover.c (grub_raid6_recover): Fix warnings about
100         uninitialized err[0] and err[1].  Rename them to bad1 and bad2.
101         Initialize them with -1.  Add sanity check for bad1.  Eliminate
102         nerr variable.
104 2009-05-08  David S. Miller  <davem@davemloft.net>
106         * util/sparc64/ieee1275/grub-ofpathname.c (main): Set progname.
108 2009-05-06  Robert Millan  <rmh.grub@aybabtu.com>
110         * util/i386/pc/grub-setup.c (setup): Fix check for embed region
111         existance.
113 2009-05-05  Felix Zielcke  <fzielcke@z-51.de>
115         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
116         `kern/rescue_reader.c', `kern/rescue_parser.c' and `normal/autofs.c'.
118 2009-05-05  David S. Miller  <davem@davemloft.net>
120         * util/sparc64/ieee1275/grub-install.in: Fix sed arg quoting.
122 2009-05-05  Pavel Roskin  <proski@gnu.org>
124         * include/grub/dl.h [GRUB_UTIL]: Provide inline implementations
125         of grub_dl_ref() and grub_dl_unref().
126         * commands/parttool.c: Remove preprocessor conditionals around
127         grub_dl_ref() and grub_dl_unref().
128         * fs/affs.c: Likewise.
129         * fs/afs.c: Likewise.
130         * fs/cpio.c: Likewise.
131         * fs/ext2.c: Likewise.
132         * fs/fat.c: Likewise.
133         * fs/hfs.c: Likewise.
134         * fs/hfsplus.c: Likewise.
135         * fs/iso9660.c: Likewise.
136         * fs/jfs.c: Likewise.
137         * fs/minix.c: Likewise.
138         * fs/ntfs.c: Likewise.
139         * fs/reiserfs.c: Likewise.
140         * fs/sfs.c: Likewise.
141         * fs/udf.c: Likewise.
142         * fs/ufs.c: Likewise.
143         * fs/xfs.c: Likewise.
144         * include/grub/dl.h: Likewise.
145         * loader/xnu.c: Likewise.
147 2009-05-04  Pavel Roskin  <proski@gnu.org>
149         * commands/acpi.c: Remove unused variable my_mod.
150         * partmap/amiga.c: Likewise.
151         * partmap/apple.c: Likewise.
152         * partmap/gpt.c: Likewise.
153         * partmap/pc.c: Likewise.
154         * partmap/sun.c: Likewise.
155         * term/gfxterm.c: Likewise.
156         * term/i386/pc/vesafb.c: Likewise.
157         * term/i386/pc/vga.c: Likewise.
159 2009-05-04  David S. Miller  <davem@davemloft.net>
161         * kern/ieee1275/openfw.c (grub_children_iterate): Fix string
162         pointer args to grub_ieee1275_get_property().
164         * conf/sparc64-ieee1275.rmk: Fix build due to missing '\'.
166         * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Bypass cdrom
167         devices, and do not traverse down under controller nodes.
169         * disk/ieee1275/ofdisk.c (compute_dev_path): New.
170         (grub_ofdisk_open): Use it to un-escape "," characters.
171         * kern/disk.c (find_part_sep): New.
172         (grub_disk_open): Use it to find the first non-escaped ','
173         character in the disk name.
174         * util/ieee1275/devicemap.c (escape_of_path): New.
175         (grub_util_emit_devicemap_entry): Use it.
176         * util/sparc64/ieee1275/grub-install.in: Update script to
177         strip partition specifiers properly by not triggering on
178         '\' escaped ',' characters.
180 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
182         * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START): Set
183         to 0x300.
184         * loader/i386/linux.c (vga_modes, linux_vesafb_res): Add a few
185         resolutions.
186         (linux_vesafb_modes): Add a lot of additional modes to the list (based
187         on documentation from Wikipedia).
189 2009-05-04  Pavel Roskin  <proski@gnu.org>
191         * disk/ata.c: Spelling fixes.
192         * disk/raid.c: Likewise.
193         * disk/usbms.c: Likewise.
194         * disk/dmraid_nvidia.c: Likewise.
195         * kern/ieee1275/openfw.c: Likewise.
196         * kern/ieee1275/init.c: Likewise.
197         * kern/ieee1275/cmain.c: Likewise.
198         * boot/i386/pc/cdboot.S: Likewise.
199         * video/readers/png.c: Likewise.
200         * video/i386/pc/vbe.c: Likewise.
201         * fs/udf.c: Likewise.
202         * fs/hfs.c: Likewise.
203         * fs/reiserfs.c: Likewise.
204         * efiemu/runtime/efiemu.c: Likewise.
205         * efiemu/main.c: Likewise.
206         * efiemu/mm.c: Likewise.
207         * include/grub/elf.h: Likewise.
208         * include/grub/xnu.h: Likewise.
209         * include/grub/usbdesc.h: Likewise.
210         * include/grub/usb.h: Likewise.
211         * include/grub/script_sh.h: Likewise.
212         * include/grub/lib/LzmaEnc.h: Likewise.
213         * include/grub/efiemu/efiemu.h: Likewise.
214         * include/grub/command.h: Likewise.
215         * normal/menu.c: Likewise.
216         * normal/main.c: Likewise.
217         * normal/datetime.c: Likewise.
218         * bus/usb/uhci.c: Likewise.
219         * mmap/i386/uppermem.c: Likewise.
220         * mmap/mmap.c: Likewise.
221         * commands/acpi.c: Likewise.
222         * commands/test.c: Likewise.
223         * partmap/apple.c: Likewise.
224         * font/font.c: Likewise.
225         * loader/sparc64/ieee1275/linux.c: Likewise.
226         * loader/macho.c: Likewise.
227         * loader/i386/bsd_trampoline.S: Likewise.
228         * loader/i386/bsd.c: Likewise.
229         * loader/xnu.c: Likewise.
230         * term/i386/pc/vesafb.c: Likewise.
231         * term/usb_keyboard.c: Likewise.
232         * util/resolve.c: Likewise.
233         * util/getroot.c: Likewise.
235 2009-05-04  Felix Zielcke  <fzielcke@z-51.de>
237         * conf/i386-pc.rmk (libpkg_DATA): Rename to pkglib_DATA.
239 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
241         * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (grub_cmd_linux): Fix
242         build error.
244 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
246         * loader/i386/linux.c (grub_cmd_linux): Make "vga=" compatibility
247         parameter only available on BIOS.
249 2009-05-04  Vladimir Serbinenko  <phcoder@gmail.com>
251         Removed wrong semicolon in declaration
253         * grub/misc.h (grub_dprintf): remove semicolon
255 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
257         * loader/i386/linux.c (GRUB_ASSUME_LINUX_HAS_FB_SUPPORT): New macro.
258         (grub_linux_boot): Don't check for `linux_vesafb_modes' bounds (this
259         is done by grub_cmd_linux() now).
260         [! GRUB_ASSUME_LINUX_HAS_FB_SUPPORT]: If "vga=" parameter wasn't set,
261         restore video to text mode.
262         (grub_cmd_linux): Default `vid_mode' initialization to 0, which
263         indicates lack of "vga=" parameter.  "vga=0" is mapped to
264         `GRUB_LINUX_VID_MODE_NORMAL'.
266 2009-05-04  Felix Zielcke  <fzielcke@z-51.de>
268         * conf/i386-efi.rmk (grub_emu_SOURCES): Remove `normal/execute.c',
269         `normal/lexer.c', `kern/rescue.c', `normal/function.c', `normal/misc.c'
270         and `normal/script.c'.  Add `kern/rescue_reader.c',
271         `kern/rescue_parser.c', `script/sh/main.c', `script/sh/execute.c', 
272         `script/sh/function.c', `script/sh/lexer.c', `script/sh/script.c' and
273         `grub_script.tab.c'.
275         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
276         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
277         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
278         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
279         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
281         * Makefile.in: Remove duplicated 2008 in Copyright line.
283 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
285         * util/misc.c (grub_util_warn): New function.  Emmits a warning
286         unconditionally.
287         * include/grub/util/misc.h (grub_util_warn): New declaration.
289         * util/i386/pc/grub-install.in: Understand --force and pass it down
290         to grub-setup.
292         * util/i386/pc/grub-setup.c (main): Understand --force and pass it
293         down to setup().
294         (setup): Improve error messages and add warnings when requested to
295         install in odd layouts.  Refuse to install using blocklists unless
296         --force was set.
298 2009-05-04  martin f. krafft <madduck@madduck.net>
300         * disk/raid.c (grub_raid_scan_device): Improve debug message.
302 2009-05-04  Vladimir Serbinenko  <phcoder@gmail.com>
304         Updated copyright year
306         * fs/hfsplus.c: updated copyright year
307         
308 2009-05-04  Vladimir Serbinenko  <phcoder@gmail.com>
310         HFS+ UUID
312         * fs/hfsplus.c (grub_hfsplus_volheader): added num_serial field 
313         in the space previously used by unused3
314         (grub_hfsplus_uuid): new function
315         (grub_hfsplus_fs): added uuid field
317 2009-05-03  Pavel Roskin  <proski@gnu.org>
319         * disk/ata.c: Don't cast mod to void in GRUB_MOD_INIT to
320         suppress warnings.  It's no longer needed.
321         * disk/host.c: Likewise.
322         * disk/ata_pthru.c: Likewise.
323         * disk/loopback.c: Likewise.
324         * hook/datehook.c: Likewise.
325         * parttool/pcpart.c: Likewise.
326         * fs/i386/pc/pxe.c: Likewise.
327         * fs/ntfscomp.c: Likewise.
328         * efiemu/main.c: Likewise.
329         * mmap/mmap.c: Likewise.
330         * commands/crc.c: Likewise.
331         * commands/hexdump.c: Likewise.
332         * commands/hdparm.c: Likewise.
333         * commands/acpi.c: Likewise.
334         * commands/echo.c: Likewise.
335         * commands/minicmd.c: Likewise.
336         * commands/blocklist.c: Likewise.
337         * commands/memrw.c: Likewise.
338         * commands/loadenv.c: Likewise.
339         * commands/usbtest.c: Likewise.
340         * commands/lsmmap.c: Likewise.
341         * commands/boot.c: Likewise.
342         * commands/parttool.c: Likewise.
343         * commands/configfile.c: Likewise.
344         * commands/search.c: Likewise.
345         * commands/ieee1275/suspend.c: Likewise.
346         * commands/cat.c: Likewise.
347         * commands/i386/pc/pxecmd.c: Likewise.
348         * commands/i386/pc/play.c: Likewise.
349         * commands/i386/pc/halt.c: Likewise.
350         * commands/i386/pc/vbeinfo.c: Likewise.
351         * commands/i386/pc/vbetest.c: Likewise.
352         * commands/lspci.c: Likewise.
353         * commands/date.c: Likewise.
354         * commands/handler.c: Likewise.
355         * commands/ls.c: Likewise.
356         * commands/test.c: Likewise.
357         * commands/cmp.c: Likewise.
358         * commands/efi/loadbios.c: Likewise.
359         * commands/efi/fixvideo.c: Likewise.
360         * commands/halt.c: Likewise.
361         * commands/help.c: Likewise.
362         * commands/reboot.c: Likewise.
363         * hello/hello.c: Likewise.
364         * script/sh/main.c: Likewise.
365         * loader/xnu.c: Likewise.
366         * term/terminfo.c: Likewise.
367         * term/i386/pc/serial.c: Likewise.
368         * term/usb_keyboard.c: Likewise.
370 2009-05-03  David S. Miller  <davem@davemloft.net>
372         * normal/menu.c: Include grub/parser.h
374 2009-05-03  Pavel Roskin  <proski@gnu.org>
376         * mmap/efi/mmap.c (grub_mmap_malign_and_register): Return void*,
377         not char*.
378         * mmap/i386/mmap.c (grub_mmap_malign_and_register): Likewise.
379         Suggested by Javier Martín <lordhabbit@gmail.com>
381         * util/i386/pc/grub-mkrescue.in: Allow for the case when
382         efiemu??.o doesn't exist.
383         * util/i386/pc/grub-install.in: Likewise.  Use "cp -f" for
384         copying.
386 2009-05-03  Bean  <bean123ch@gmail.com> Vladimir Serbinenko <phcoder@gmail.com>
388         FreeBSD 64-bit support
390         * conf/i386-pc.rmk (bsd_mod_SOURCES): add loader/i386/bsd_helper.S 
391         and loader/i386/bsd_trampoline.S
392         (bsd_mod_ASFLAGS): new variable
393         * include/grub/i386/bsd.h (FREEBSD_MODINFOMD_SMAP): new definition
394         (FREEBSD_MODTYPE_KERNEL64): likewise
395         (grub_bsd64_trampoline_start): likewise
396         (grub_bsd64_trampoline_end): likewise
397         (grub_bsd64_trampoline_selfjump): likewise
398         (grub_bsd64_trampoline_gdt): likewise
399         * include/grub/i386/loader.h (grub_unix_real_boot): moved from here ...
400         * include/grub/i386/bsd.h (grub_unix_real_boot): ... moved here
401         * kern/i386/loader.S (grub_unix_real_boot): moved from here ...
402         * loader/i386/bsd_helper.S (grub_unix_real_boot): moved here
403         * include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type 
404         of "attrib" member
405         * loader/i386/bsd_pagetable.c: new file
406         * loader/i386/bsd_trampoline.S: likewise
407         * loader/i386/bsd.c (ALIGN_QWORD): new macro
408         (ALIGN_VAR): likewise
409         (entry_hi): new variable
410         (kern_end_mdofs): likewise
411         (is_64bit): likewise
412         (grub_freebsd_add_meta): use ALIGN_VAR
413         (grub_e820_mmap): new declaration
414         (grub_freebsd_add_mmap): new function
415         (grub_freebsd_add_meta_module): support 64 bit kernels
416         (grub_freebsd_list_modules): use ALIGN_VAR
417         (gdt_descriptor): new declaration
418         (grub_freebsd_boot): support 64 bit kernels
419         (grub_bsd_elf64_hook): new function
420         (grub_bsd_load_elf): support elf64
422 2009-05-03  Bean  <bean123ch@gmail.com>
424         * script/sh/execute.c (grub_script_execute_cmdif): Reset grub_errno
425         after we get the result of if statement.
427 2009-05-03  Bean  <bean123ch@gmail.com>
429         * Makefile.in (enable_efiemu): New variable.
431         * conf/i386-pc.rmk: Only compile efiemu runtimes when enable_efiemu is
432         set.
433         (efiemu32.o): Use macro $< for source file, add $(srcdir) to include
434         path.
435         (efi64_c.o): Use macro $< for source file, add $(srcdir) to include
436         path, add -mno-red-zone option.
437         (efiemu64_s.o): Likewise.
438         (efiemu64.o): Use macro $^ for source file.
440         * configure.ac (--enable-efiemu): New option.
442 2009-05-03  Vladimir Serbinenko  <phcoder@gmail.com>
444         xnu support
446         * conf/i386-efi.rmk (kernel_mod_HEADERS): added i386/pit.h
447         (pkglib_MODULES): add xnu.mod
448         (xnu_mod_SOURCES): new variable
449         (xnu_mod_CFLAGS): likewise
450         (xnu_mod_LDFLAGS): likewise
451         (xnu_mod_ASFLAGS): likewise
452         * conf/i386-pc.rmk: likewise
453         * conf/x86_64-efi.rmk: likewise
454         * include/grub/efi/efi.h (grub_efi_finish_boot_services):
455         new declaration
456         * include/grub/i386/macho.h: new file
457         * include/grub/i386/xnu.h: likewise
458         * include/grub/macho.h: likewise
459         * include/grub/machoload.h: likewise
460         * include/grub/x86_64/macho.h: likewise
461         * include/grub/x86_64/xnu.h: likewise
462         * include/grub/xnu.h: likewise
463         * kern/efi/efi.c (grub_efi_finish_boot_services): new function
464         * kern/efi/mm.c (MAX_HEAP_SIZE): increase
465         * loader/i386/efi/xnu.c: new file
466         * loader/i386/pc/xnu.c: likewise
467         * loader/i386/xnu.c: likewise
468         * loader/i386/xnu_helper.S: likewise
469         * loader/macho.c: likewise
470         * loader/xnu.c: likewise
471         * loader/xnu_resume.c: likewise
472         * util/grub-dumpdevtree: likewise
473         * include/grub/i386/pit.h: include grub/err.h
474         (grub_pit_wait): export
475         * util/grub.d/30_os-prober.in: support Darwin/Mac OS X
477 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
479         Efiemu
481         * conf/i386-pc.rmk: new modules efiemu, efiemu_acpi, efiemu_pnvram,
482         _linux_efi, linux_efi.
483         new files in grub-emu
484         new targets efiemu32.o and efiemu64.o
485         * loader/linux_normal_efiemu.c: likewise
486         * loader/i386/efi/linux.c: added preliminary efiemu support
487         * util/i386/pc/grub-install.in: add efiemu??.o to the list of
488         files to copy
489         * include/grub/autoefi.h: new file
490         * include/grub/i386/efiemu.h: likewise
491         * include/grub/i386/pc/efiemu.h: likewise
492         * include/grub/efi/api.h: add LL suffix when necessary
493         new definitions relating to tables
494         * include/grub/efiemu/efiemu.h: new file
495         * include/grub/efiemu/runtime.h: likewise
496         * efiemu/prepare.c: likewise
497         * efiemu/loadcore_common.c: likewise
498         * efiemu/loadcore64.c: likewise
499         * efiemu/runtime/efiemu.sh: likewise
500         * efiemu/runtime/efiemu.S: likewise
501         * efiemu/runtime/efiemu.c: likewise
502         * efiemu/runtime/config.h: likewise
503         * efiemu/prepare32.c: likewise
504         * efiemu/main.c: likewise
505         * efiemu/modules/pnvram.c: likewise
506         * efiemu/modules/i386: likewise
507         * efiemu/modules/i386/pc: likewise
508         * efiemu/modules/acpi.c: likewise
509         * efiemu/i386/pc/cfgtables.c: likewise
510         * efiemu/i386/loadcore64.c: likewise
511         * efiemu/i386/loadcore32.c: likewise
512         * efiemu/prepare64.c: likewise
513         * efiemu/loadcore.c: likewise
514         * efiemu/symbols.c: likewise
515         * efiemu/mm.c: likewise
516         * efiemu/loadcore32.c: likewise
518 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
520         ACPI spoofing
522         * commands/acpi.c: new file
523         * commands/i386/pc/acpi.c: likewise
524         * commands/efi/acpi.c: likewise
525         * include/grub/acpi.h: likewise
526         * conf/i386-pc.rmk (pkglib_MODULES): added acpi.mod
527         (acpi_mod_SOURCES): new variable
528         (acpi_mod_CFLAGS): likewise
529         (acpi_mod_LDFLAGS): likewise
530         * conf/i386-efi.rmk: likewise
531         * conf/x86_64-efi.rmk: likewise
533 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
535         Missing part from mmap patch
537         * mmap/efi/mmap.c (grub_machine_mmap_unregister): renamed to
538         (grub_mmap_unregister)
539         (grub_mmap_free_and_unregister): use grub_mmap_register
541 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
543         Mmap services
545         * loader/i386/efi/linux.c (grub_linux_boot): use grub_mmap_iterate
546         * loader/i386/linux.c (find_mmap_size): likewise
547         (allocate_pages): likewise
548         * loader/i386/multiboot.c (grub_get_multiboot_mmap_len): likewise
549         (grub_fill_multiboot_mmap): likewise
550         (grub_multiboot): use grub_mmap_get_lower and grub_mmap_get_upper
551         * loader/i386/pc/linux.c (grub_cmd_linux): use grub_mmap_get_lower
552         * include/grub/i386/bsd.h (OPENBSD_MMAP_AVAILABLE): new definition
553         (OPENBSD_MMAP_RESERVED): likewise
554         * include/grub/i386/pc/memory.h: include grub/memory.h
555         (grub_lower_mem): removed
556         (grub_upper_mem): likewise
557         (GRUB_MACHINE_MEMORY_ACPI): new definition
558         (GRUB_MACHINE_MEMORY_NVS): likewise
559         (GRUB_MACHINE_MEMORY_MAX_TYPE): likewise
560         (GRUB_MACHINE_MEMORY_HOLE): likewise
561         (grub_machine_mmap_register): likewise
562         (grub_machine_mmap_unregister): likewise
563         (grub_machine_get_upper): likewise
564         (grub_machine_get_lower): likewise
565         (grub_machine_get_post64): likewise
566         * include/grub/i386/efi/memory.h: new file
567         * include/grub/x86_64/efi/memory.h: likewise
568         * include/grub/efi/memory.h: likewise
569         * conf/i386-pc.rmk (pkglib_MODULES): added mmap.mod
570         (mmap_mod_SOURCES): new variable
571         (mmap_mod_LDFLAGS): likewise
572         (mmap_mod_ASFLAGS): likewise
573         * conf/i386-coreboot.rmk: likewise
574         * conf/i386-ieee1275.rmk: likewise
575         * conf/i386-efi.rmk: likewise
576         * conf/x86_64-efi.rmk: likewise
577         * include/grub/types.h (UINT_TO_PTR): new macro
578         (PTR_TO_UINT32): likewise
579         (PTR_TO_UINT64): likewise
580         * include/grub/memory.h: new file
581         * mmap/i386/pc/mmap.c: likewise
582         * mmap/i386/pc/mmap_helper.S: likewise
583         * mmap/i386/uppermem.c: likewise
584         * mmap/mmap.c: likewise
585         * mmap/efi/mmap.c: likewise
586         * kern/i386/coreboot/init.c (grub_machine_init): don't use
587         grub_upper_mem
588         * kern/i386/pc/init.c (grub_lower_mem): removed variable
589         (grub_upper_mem): likewise
590         (grub_machine_init): don't use grub_upper_mem,
591         make grub_lower_mem local
592         * loader/i386/bsd.c (grub_openbsd_boot): use grub_mmap_get_lower,
593         grub_mmap_iterate and grub_mmap_get_upper
594         (grub_netbsd_boot): use grub_mmap_get_lower and grub_mmap_get_upper
596 2009-05-02  Bean  <bean123ch@gmail.com>
598         * conf/common.rmk (grub_script.tab.c): Change normal/parser.y to
599         script/sh/parser.y.
600         (pkglib_MODULES): Add normal.mod and sh.mod.
601         (normal_SOURCES): New variable.
602         (normal_mod_CFLAGS): Likewise.
603         (normal_mod_LDFLAGS): Likewise.
604         (sh_mod_SOURCES): Likewise.
605         (sh_mod_CFLAGS): Likewise.
606         (sh_mod_LDFLAGS): Likewise.
608         * conf/i386-pc.rmk (normal/lexer.c_DEPENDENCIES): Changed to
609         script/sh/lexer.c_DEPENDENCIES.
610         (kernel_img_SOURCES): Remove kern/rescue.c, and kern/reader.c,
611         kern/rescue_reader.c and kern/rescue_parser.c.
612         (kernel_img_HEADERS): Remove rescue.h, add reader.h.
613         (grub_emu_SOURCES): Change source files.
614         (pkglib_MODULES): Remove normal.mod.
615         (normal_SOURCES): Removed.
616         (normal_mod_CFLAGS): Likewise.
617         (normal_mod_LDFLAGS): Likewise.
618         * conf/i386-coreboot.rmk: Likewise.
619         * conf/i386-efi.rmk: Likewise.
620         * conf/i386-ieee1276.rmk: Likewise.
621         * conf/powerpc-ieee1275.rmk: Likewise.
622         * conf/sparc64-ieee1275.rmk: Likewise.
623         * conf/x86_64-efi.rmk: Likewise.
625         * include/grub/command.h (grub_command_execute): New inline function.
627         * include/grub/menu.h (grub_menu_entry): Removed commands field.
629         * include/grub/normal.h: Remove <grub/setjmp.h>.
630         (grub_fs_module_list): Moved to normal/autofs.c.
631         (grub_exit_env): Removed.
632         (grub_command_execute): Likewise.
633         (grub_normal_menu_addentry): Renamed to grub_menu_addentry, removed
634         parameter script.
635         (read_command_list): New function declaration.
636         (read_fs_list): Likewise.
638         * include/parser.h: Include <grub/reader.h>.
639         (grub_parser_split_cmdline): Change type of getline parameter.
640         (grub_parser): New structure.
641         (grub_parser_class): New variable.
642         (grub_parser_execute): New function declaration.
643         (grub_register_rescue_parser): Likewise.
644         (grub_parser_register): New inline function.
645         (grub_parser_unregister): Likewise.
646         (grub_parser_get_current): Likewise.
647         (grub_parser_set_current): Likewise.
649         * include/grub/reader.h: New file.
650         * kern/reader.c: Likewise.
651         * kern/rescue_parser.c: Likewise.
652         * kern/rescue_reader.c: Likewise.
653         * normal/autofs.c: Likewise.
654         * normal/dyncmd.c: Likewise.
656         * include/grub/rescue.h: Removed.
657         * normal/command.h: Likewise.
659         * include/grub/script.h: Moved to ...
660         * include/grub/script_sh.h: ... Moved here.
661         * normal/execute.c: Moved to ...
662         * script/sh/execute.c: ... Moved here.
663         * normal/function.c: Moved to ...
664         * script/sh/function.c: ... Moved here.
665         * normal/lexer.c: Moved to ...
666         * script/sh/lexer.c: ... Moved here.
667         * normal/parser.y: Moved to ...
668         * script/sh/parser.y: ... Moved here.
669         * normal/script.c: Moved to ...
670         * script/sh/script.c: ... Moved here.
672         * normal/main.c: Remove <grub/rescue.h> and <grub/script.h>, include
673         <grub/reader.h>.
674         (grub_exit_env): Removed.
675         (fs_module_list): Moved to normal/autofs.c.
676         (grub_file_getline): Don't handle comment here.
677         (free_menu): Skip removed field entry->commands.
678         (grub_normal_menu_addentry): Removed as grub_menu_entry, removed
679         script parameter.
680         (read_config_file): Removed nested parameter, change getline function.
681         (grub_enter_normal_mode): Removed.
682         (grub_dyncmd_dispatcher): Moved to normal/dyncmd.c.
683         (read_command_list): Likewise.
684         (autoload_fs_module): Moved to normal/autofs.c.
685         (read_fs_list): Likewise.
686         (reader_nested): New variable.
687         (grub_normal_execute): Run parser.sh to switch to sh parser.
688         (grub_cmd_rescue): Removed.
689         (cmd_normal): Removed.
690         (grub_cmd_normal): Unregister itself at the beginning. Don't register
691         rescue command.
692         (grub_cmdline_run): New function.
693         (grub_normal_reader_init): Likewise.
694         (grub_normal_read_line): Likewise.
695         (grub_env_write_pager): Likewise.
696         (cmdline): New variable.
697         (grub_normal_reader): Likewise.
698         (GRUB_MOD_INIT): Register normal reader and set as current, register
699         pager hook, register normal command with grub_register_command_prio,
700         so that it won't show up in command.lst.
701         (GRUB_MOD_FINI): Unregister normal reader, unhook pager, clear
702         grub_fs_autoload_hook.
704         * normal/menu.c: Remove <grub/script.h>, add <grub/command.h>.
705         (grub_menu_execute_entry): Replace grub_script_execute with
706         grub_parser_execute, change parameter to grub_command_execute.
708         * normal/menu_text.c: Remove <grub/script.h>.
710         * normal/menu_entry.c: Remove <grub/script.h>, add <grub/command.h>
711         and <grub/parser.h>.
712         (run): Change editor_getline to use new parser interface. Change
713         parameter to grub_command_execute.
715         * kern/main.c: Remove <grub/rescue.h>, include <grub/command.h>,
716         <grub/reader.h> and <grub/parser.h>.
717         (grub_load_normal_mode): Execute normal command.
718         (grub_main): Call grub_register_core_commands,
719         grub_register_rescue_parser and grub_register_rescue_reader, use
720         grub_reader_loop to enter input loop.
722         * kern/parser.c (grub_parser_split_cmdline): Change type of
723         getline parameter.
724         (grub_parser_class): New variable.
725         (grub_parser_execute): New function.
727         * loader/i386/multiboot.c: Remove <grub/rescue.h>.
728         * loader/multiboot2.c: Likewise.
729         * loader/sparc64/ieee1275/linux.c: Likewise.
731         * util/grub-emu.c (read_command_list): New dummy function.
733 2009-05-02  Robert Millan  <rmh.grub@aybabtu.com>
735         * util/deviceiter.c (grub_util_iterate_devices): Increase max drive
736         count to 16 for CCISS and IDA.
738 2009-05-02  Robert Millan  <rmh.grub@aybabtu.com>
740         * normal/menu_text.c  (grub_wait_after_message): Print a newline
741         after waiting for user input.
743         * loader/i386/linux.c: Include `<grub/normal.h>'.
744         (grub_cmd_linux): Improve the error message about `ask' mode, by
745         waiting for user input so it's not missed (we can do this, since
746         user requested interaction).
748 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
750         Added missing lst to grub-mkrescue
752         * util/i386/pc/grub-mkrescue.in: added ${input_dir}/handler.lst
753         and ${input_dir}/parttool.lst
755 2009-04-30  David S. Miller  <davem@davemloft.net>
757         * util/hostdisk.c (device_is_wholedisk): New function.
758         (grub_util_biosdisk_get_grub_dev): Shortcut when hdg.start is
759         zero only if device_is_wholedisk() returns true.
761         * util/hostdisk.c (convert_system_partition_to_system_disk):
762         Handle virtual disk devices named /dev/vdiskX as found on sparc
763         and powerpc.
765         * kern/sparc64/ieee1275/init.c (grub_machine_set_prefix): If
766         lettered partition specifier is found, convert to numbered.
768 2009-04-29  David S. Miller  <davem@davemloft.net>
770         * include/grub/powerpc/ieee1275/memory.h: Include ieee1275.h.
771         * include/grub/sparc64/ieee1275/memory.h: Likewise.
773         * normal/command.c: Add missing newline at end of file.
775         * commands/lsmmap.c (grub_cmd_lsmmap): Add casts to avoid printf
776         warnings.
777         * kern/ieee1275/openfw.c (grub_claimmap): Likewise.
778         * disk/ieee1275/ofdisk.c (grub_ofdisk_open, grub_ofdisk_close,
779         grub_ofdisk_read): Likewise, and deal similarly with the fact that
780         ihandles have a 32-bit type but need to be stored in a "void *".
782 2009-04-28  Pavel Roskin  <proski@gnu.org>
784         * disk/fs_uuid.c (grub_fs_uuid_open): Use parent->data for dev,
785         not disk.  Adjust all dependencies.
786         (grub_fs_uuid_close): Use grub_device_close(), not
787         grub_disk_close().
789         * disk/fs_uuid.c (grub_fs_uuid_open): Allocate memory to copy
790         parent's partition, don't copy it by reference, as it gets freed
791         on close.
793 2009-04-27  Vladimir Serbinenko  <phcoder@gmail.com>
795         Preboot hooks support
797         * commands/boot.c (struct grub_preboot_t): new declaration
798         (preboots_head): new variable
799         (preboots_tail): likewise
800         (grub_loader_register_preboot_hook): new function
801         (grub_loader_unregister_preboot_hook): likewise
802         (grub_loader_set): launch preboot hooks
803         * include/grub/loader.h (grub_loader_preboot_hook_prio_t): new type
804         (grub_loader_register_preboot_hook): new declaration
805         (grub_loader_unregister_preboot_hook): likewise
807 2009-04-27  Vladimir Serbinenko  <phcoder@gmail.com>
809         Warning fix
811         * disk/scsi.c (grub_scsi_open): added missing cast when
812         calling grub_dprintf
814 2009-04-26  Vladimir Serbinenko  <phcoder@gmail.com>
816         Bug and warning fixes
818         * include/grub/i386/pc/init.h (grub_stop_floppy): added missing
819         declaration
820         * commands/test.c (test_parse): fixed bug with file tests and corrected
821         declaration of find_file
823 2009-04-26  Pavel Roskin  <proski@gnu.org>
825         * Makefile.in: Don't install empty manual pages if help2man is
826         missing.  Use help2man option for output, not shell redirection.
828 2009-04-26  David S. Miller  <davem@davemloft.net>
830         * util/grub-mkdevicemap.c (make_device_map): Add missing
831         NESTED_FUNC_ATTR to process_device().
833 2009-04-25  Vladimir Serbinenko  <phcoder@gmail.com>
835         Test command
837         * commands/test.c: rewritten to use bash-like test
839 2009-04-25  Vladimir Serbinenko  <phcoder@gmail.com>
841         Parttool autoloading and improvements
843         * Makefile.in (pkglib_DATA): add parttool.lst
844         (parttool.lst): new target
845         * genmk.rb: generate parttool-*
846         (CLEANFILES): add #{parttool}
847         (PARTTOOLFILES): new variable
848         * genparttoollist.sh: new file
849         * parttool/pcpart.c (grub_pcpart_boot): more feedback
850         (grub_pcpart_type): likewise
851         * commands/parttool.c (helpmsg): new variable
852         (grub_cmd_parttool): output help if not enough arguments are supplied
853         autoload modules
854         (GRUB_MOD_INIT(parttool)): use helpmsg
856 2009-04-24  David S. Miller  <davem@davemloft.net>
858         Avoiding opening same device multiple times in device iterator.
860         * kern/device.c: (grub_device_iterate): Define struct part_ent,
861         and use it to build a list of partitions in iterate_disk() and
862         iterate_partition().
864         * disk/fs_uuid.c (grub_fs_uuid_close): Call grub_disk_close()
865         on disk->data.
867         * disk/ieee1275/nand.c (grub_nand_iterate): Return
868         grub_devalias_iterate() result instead of unconditional 0.
869         * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Likewise.
870         Also, capture hook return value, either directly or via
871         grub_children_iterate(), and propagate to caller.
872         * include/grub/ieee1275/ieee1275.h (grub_devalias_iterate,
873         grub_children_iterate): Return value is now 'int' instead of
874         'grub_err_t'.
875         * kern/ieee1275/openfw.c (grub_children_iterate): Fix to behave
876         like a proper iterator, stopping when hooks return non-zero.
877         (grub_devalias_iterate): Likewise.
879 2009-04-23  David S. Miller  <davem@davemloft.net>
881         * kern/sparc64/ieee1275/openfw.c: Unused, delete.
883 2009-04-22  David S. Miller  <davem@davemloft.net>
885         * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): If size_cells
886         is larger than address_cells, use that value for address_cells too.
888         * include/grub/ieee1275/ieee1275.h (IEEE1275_MAX_PROP_LEN,
889         IEEE1275_MAX_PATH_LEN): Define.
890         * kern/ieee1275/openfw.c (grub_children_iterate): Dynamically
891         allocate 'childtype', 'childpath', 'childname', and 'fullname'.
892         (grub_devalias_iterate): Dynamically allocate 'aliasname' and
893         'devtype'.  Explicitly NULL terminate devalias expansion.
895         * util/sparc64/ieee1275/misc.c: New file.
896         * util/sparc64/ieee1275/grub-setup.c: New file.
897         * util/sparc64/ieee1275/grub-ofpathname.c: New file.
898         * util/sparc64/ieee1275/grub-mkimage.c: New file.
899         * util/sparc64/ieee1275/grub-install.in: New file.
900         * util/ieee1275/ofpath.c: New file.
901         * util/ieee1275/devicemap.c: New file.
902         * util/devicemap.c: New file.
903         * util/deviceiter.c: New file.
904         * kern/sparc64/ieee1275/init.c: New file.
905         * include/grub/util/ofpath.h: New file.
906         * include/grub/util/deviceiter.h: New file.
907         * util/grub-mkdevicemap.c: Include deviceiter.h.
908         Implement using grub_util_emit_devicemap_entry and
909         grub_util_iterate_devices.
910         * conf/i386-corebook.rmk: Build util/deviceiter.c and
911         util/devicemap.c into grub-mkdevicemap
912         * conf/i386-efi.rmk: Likewise.
913         * conf/i386-ieee1275.rmk: Likewise.
914         * conf/i386-pc.rmk: Likewise.
915         * conf/powerpc-ieee1275.rmk: Likewise.
916         * conf/sparc64-ieee1275.rmk: Add rules to build boot block
917         images and installation utilities.  Build kernel as image
918         instead of as elf binary.  Use common rules as much as possible.
920 2009-04-19  Vladimir Serbinenko  <phcoder@gmail.com>
922         Correct GPT definition
924         * include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type
925         of "attrib" member
927 2009-04-19  Felix Zielcke  <fzielcke@z-51.de>
929         * INSTALL: Replace `autogen.sh' with `./autogen.sh'.
931 2009-04-19  David S. Miller  <davem@davemloft.net>
933         * loader/sparc64/ieee1275/linux.c: Include grub/command.h
934         (grub_rescue_cmd_linux): Rename to...
935         (grub_cmd_linux): and fix prototype.
936         (grub_rescue_cmd_initrd): Rename to...
937         (grub_cmd_initrd): and fix prototype.
938         (cmd_linux, cmd_initrd): New.
939         (GRUB_MOD_INIT(linux)): Use grub_register_command().
940         (GRUB_MOD_FINI(linux): Use grub_unregister_command().
942 2009-04-17  Pavel Roskin  <proski@gnu.org>
944         * bus/usb/ohci.c (grub_ohci_transaction): Fix incorrect printf
945         format.
946         (grub_ohci_transfer): Likewise.
948         * bus/usb/usbtrans.c (grub_usb_control_msg): Warning fix.
950         * loader/multiboot_loader.c (grub_cmd_multiboot_loader): Fix
951         return without a value.  Fix inconsistent indentation.
953         * fs/i386/pc/pxe.c (grub_pxefs_dir): Fix function prototype to
954         match struct grub_fs.
956         * disk/ata.c (grub_ata_pciinit): Use NESTED_FUNC_ATTR.
957         * bus/usb/ohci.c (grub_ohci_pci_iter): Likewise.
958         * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
959         * commands/lspci.c (grub_lspci_iter): Likewise.
961 2009-04-16  Bean  <bean123ch@gmail.com>
963         * commands/efi/loadbios.c (grub_cmd_fakebios): Add missing return
964         value.
966 2009-04-15  Pavel Roskin  <proski@gnu.org>
968         * include/grub/types.h: Rename ULONG_MAX to GRUB_ULONG_MAX and
969         LONG_MAX to GRUB_LONG_MAX.  Introduce GRUB_LONG_MIN.  Update all
970         users of ULONG_MAX, LONG_MAX and LONG_MIN to use the new
971         definitions.
973 2009-04-15  Felix Zielcke  <fzielcke@z-51.de>
975         * disk/lvm.c (grub_lvm_scan_device): Add `LVM' to the error messages,
976         that no multiple data or metadata areas are supported and `Unknown
977         metadata header'.
979 2009-04-15  Vladimir Serbinenko  <phcoder@gmail.com>
981         Move loader out of the kernel
983         * kern/loader.c: moved to ...
984         * commands/boot.c: ... moved here
985         * commands/minicmd.c (grub_mini_cmd_boot): moved to ...
986         * commands/boot.c (grub_cmd_boot): moved here. All users updated
987         * include/grub/kernel.h (grub_machine_fini): export
988         * include/grub/loader.h (grub_loader_is_loaded): update declaration
989         (grub_loader_set): likewise
990         (grub_loader_unset): likewise
991         (grub_loader_boot): likewise
992         * conf/common.rmk: new module boot.mod
993         (pkglib_MODULES): add boot.mod
994         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): remove kern/loader.c
995         (grub_emu_SOURCES): likewise
996         * conf/i386-efi.rmk (kernel_elf_SOURCES): likewise
997         (grub_emu_SOURCES): likewise
998         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): likewise
999         (grub_emu_SOURCES): likewise
1000         * conf/i386-pc.rmk (kernel_elf_SOURCES): likewise
1001         (grub_emu_SOURCES): likewise
1002         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): likewise
1003         (grub_emu_SOURCES): likewise
1004         * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): likewise
1005         (grub_emu_SOURCES): likewise
1006         * conf/x86_64-efi.rmk (kernel_elf_SOURCES): likewise
1007         (grub_emu_SOURCES): likewise
1009 2009-04-15  Vladimir Serbinenko  <phcoder@gmail.com>
1011         use grub_lltoa instead of grub_itoa and grub_ltoa for all purposes
1013         * kern/misc.c (grub_itoa): Removed function
1014         (grub_ltoa): likewise
1015         (grub_vsprintf): use grub_lltoa
1017 2009-04-15  Vladimir Serbinenko  <phcoder@gmail.com>
1019         Restore grub-emu
1021         * conf/i386-pc.rmk (grub_emu_SOURCES): add normal/handler.c
1022         * conf/i386-coreboot.rmk: likewise
1023         * conf/i386-ieee1275.rmk: likewise
1024         * conf/powerpc-ieee1275.rmk: likewise
1026 2009-04-15  Felix Zielcke  <fzielcke@z-51.de>
1028         * INSTALL: Add that `./autogen.sh' needs to be run before
1029         `./configure.'.
1031 2009-04-14  Bean  <bean123ch@gmail.com>
1033         * Makefile.in (pkglib_DATA): Add handler.lst.
1034         (handler.lst): New rule.
1036         * conf/i386-pc.rmk (normal_mod_SOURCES): Add normal/handler.c.
1037         * conf/i386-coreboot.rmk: Likewise.
1038         * conf/i386-ieee1275.rmk: Likewise.
1039         * conf/i386-efi.rmk: Likewise.
1040         * conf/x86_64-efi.rmk: Likewise.
1041         * conf/powerpc-ieee1275.rmk: Likewise.
1042         * conf/sparc64-ieee1275.rmk: Likewise.
1044         * genhandlerlist.sh: New file.
1046         * genmk.rb: Add rules to generate handler.lst.
1048         * include/grub/normal.h (grub_file_getline): New function definition.
1049         (read_handler_list): Likewise.
1050         (free_handler_list): Likewise.
1052         * include/grub/term.h (grub_term_register_input): Add name parameter
1053         for auto generation of handler.lst.
1054         (grub_term_register_output): Likewise.
1056         * normal/handler.c: New file.
1058         * normal/main.c (get_line): Renamed to grub_file_getline.
1059         (read_config_file): Use the newly renamed grub_file_getline.
1060         (read_command_list): Likewise.
1061         (read_fs_list): Likewise.
1062         (grub_normal_execute): Call read_handler_list to parse handler.lst.
1063         (GRUB_MOD_FINI): Call free_handler_list to free handler list.
1065         * term/efi/console.c (grub_console_init): Add name parameter for auto
1066         generation of handler.lst.
1067         * term/gfxterm.c: Likewise.
1068         * term/i386/pc/at_keyboard.c: Likewise.
1069         * term/i386/pc/console.c: Likewise.
1070         * term/i386/pc/serial.c: Likewise.
1071         * term/i386/pc/vesafb.c: Likewise.
1072         * term/i386/pc/vga.c: Likewise.
1073         * term/i386/pc/vga_text.c: Likewise.
1074         * term/ieee1275/ofconsole.c: Likewise.
1075         * term/usb_keyboard.c: Likewise.
1077 2009-04-14  Bean  <bean123ch@gmail.com>
1079         * util/grub-pe2elf.c (write_symbol_table): Terminate short name symbol
1080         properly with null character.
1082 2009-04-14  Felix Zielcke  <fzielcke@z-51.de>
1084         * configure: Remove.
1085         * config.h.in: Likewise.
1086         * stamp-h.in: Likewise.
1087         * DISTLIST: Likewise.
1088         * conf/common.mk: Likewise.
1089         * conf/i386-coreboot.mk: Likewise.
1090         * conf/i386-efi.mk: Likewise.
1091         * conf/i386-ieee1275.mk: Likewise.
1092         * conf/i386.mk: Likewise.
1093         * conf/i386-pc.mk: Likewise.
1094         * conf/powerpc-ieee1275.mk: Likewise.
1095         * conf/sparc64-ieee1275.mk: Likewise.
1096         * conf/x86_64-efi.mk: Likewise.
1098         * INSTALL: Remove the sentence that Ruby and autoconf are only required if you
1099         develop on GRUB.
1101 2009-04-14  John Stanley  <jpsinthemix@verizon.net>
1102             David S. Miller  <davem@davemloft.net>
1104         * util/hostdisk.c (make_device_name): Fix buffer length
1105         calculations.
1107 2009-04-14  Felix Zielcke  <fzielcke@z-51.de>
1109         * util/hostdisk.c [__FreeBSD__ || __FreeBSD_kernel__]: Include
1110         <sys/param.h> and <sys/sysctl.h>.
1111         (open_device) [__FreeBSD__ || __FreeBSD_kernel_]: Use sysctlgetbyname()
1112         to add 0x10 to `kern.geom.debugflags' if it's not already set, before
1113         opening the device and reset them afterwards.
1115 2009-04-13  Pavel Roskin  <proski@gnu.org>
1117         * conf/common.rmk (grub_fstest_SOURCES): Add normal/datetime.c.
1118         Reported by John Stanley <jpsinthemix@verizon.net>
1120 2009-04-13  Robert Millan  <rmh@aybabtu.com>
1122         * util/grub.d/10_freebsd.in: Detect Debian GNU/kFreeBSD and use
1123         that name for menuentries when appropriate.
1125 2009-04-13  Felix Zielcke  <fzielcke@z-51.de>
1127         * util/grub.d/10_freebsd.in: Add a missing `fi'.
1129 2009-04-13  Robert Millan  <rmh@aybabtu.com>
1131         * loader/i386/linux.c (grub_cmd_linux): Don't pass `vga=ask' parameter
1132         to Linux, simply abort telling the user it's no longer supported.
1134 2009-04-13  Felix Zielcke  <fzielcke@z-51.de>
1136         * util/grub.d/10_freebsd.in: Don't exit if /boot/devices.hints
1137         doesn't exist.  Check also for /boot/kernel/kernel.gz.  Print
1138         `freebsd_loadenv' only when devices.hints exist.
1140 2009-04-13  Pavel Roskin  <proski@gnu.org>
1142         * term/usb_keyboard.c (grub_usb_keyboard_getkey): Warning fixes.
1144 2009-04-13  Felix Zielcke  <fzielcke@z-51.de>
1146         * util/i386/pc/grub-install.in (install_drive): Remove the BSD
1147         partition number.
1148         (grub_drive): Likewise.
1150 2009-04-13  David S. Miller  <davem@davemloft.net>
1152         * kern/sparc64/ieee1275/ieee1275.c: New file.
1153         * include/grub/sparc64/ieee1275/ieee1275.h (IEEE1275_MAP_WRITE,
1154         IEEE1275_MAP_READ, IEEE1275_MAP_EXEC, IEEE1275_MAP_LOCKED,
1155         IEEE1275_MAP_CACHED, IEEE1275_MAP_SE, IEEE1275_MAP_GLOBAL,
1156         IEEE1275_MAP_IE, IEEE1275_MAP_DEFAULT): Define.
1157         (grub_ieee1275_map_physical, grub_ieee1275_claim_vaddr,
1158         grub_ieee1275_alloc_physmem): Declare new exported functions.
1160         * include/grub/sparc64/ieee1275/loader.h: New file.
1161         * include/grub/sparc64/ieee1275/memory.h: Likewise.
1162         * include/grub/sparc64/kernel.h: Likewise.
1163         * loader/sparc64/ieee1275/linux.c: Likewise.
1165         * conf/common.rmk (grub_probe_SOURCES): Add Sun partition module.
1166         (grub_fstest_SOURCES): Likewise.
1168         * util/hostdisk.c (make_device_name): Do not make any assumptions
1169         about the length of drive names.
1171         * kern/dl.c (grub_dl_load_file): Close file immediately when
1172         we are done using it.
1174 2009-04-12  David S. Miller  <davem@davemloft.net>
1176         * kern/misc.c (grub_ltoa): Fix cast when handling negative
1177         values.  Noticed by Pavel Roskin.
1179         * configure.ac: Check for __bswapsi2 and__bswapdi2 using
1180         target compiler.
1182         * genmk.rb: Add more flexible image type specification, also
1183         pass --strip-unneeded to objcopy.
1184         * conf/i386-pc.rmk: Use *_FORMAT.
1185         * conf/i386-pc.mk: Rebuilt.
1187         * disk/ieee1275/ofdisk.c (struct ofdisk_hash_ent): New struct.
1188         (OFDISK_HASH_SZ): Define.
1189         (ofdisk_hash): New hash table.
1190         (ofdisk_hash_fn, ofdisk_hash_find, ofdisk_hash_add): New functions.
1191         (grub_ofdisk_open): Use ofdisk_hash_ent address as disk->id
1192         instead of device phandle which is not unique.
1194         * kern/sparc64/ieee1275/init.c: Delete, replace with...
1195         * kern/sparc64/ieee1275/crt0.S: assembler implementation.
1196         * include/grub/sparc64/ieee1275/kernel.h: Declare grub_prefix[].
1197         (GRUB_MOD_ALIGN, GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_TOTAL_MODULE_SIZE,
1198         GRUB_KERNEL_MACHINE_KERNEL_IMAGE_SIZE,
1199         GRUB_KERNEL_MACHINE_COMPRESSED_SIZE, GRUB_KERNEL_MACHINE_PREFIX,
1200         GRUB_KERNEL_MACHINE_DATA_END): Define.
1201         (grub_kernel_image_size, grub_total_module_size): Declare.
1203 2009-04-12  Pavel Roskin  <proski@gnu.org>
1205          * configure.ac: Change the logic when we check for target tools.
1206          Do it when the target is specified and it's different from the
1207          specified value of the host.
1209 2009-04-11  Felix Zielcke  <fzielcke@z-51.de>
1211         * util/hostdisk.c [__FreeBSD_kernel__]: Include sys/disk.h.
1212         (grub_util_biosdisk_open) [__FreeBSD_kernel__]: Add support for
1213         GNU/kFreeBSD. Check if a device is a character device. Use
1214         DIOCGMEDIASIZE to get the size.
1215         (convert_system_partition_to_system_disk) [__FreeBSD_kernel__]: Add
1216         support for GNU/kFreeBSD.
1217         (grub_util_biosdisk_get_grub_dev) [__FreeBSD_kernel__]: Check if OS_DEV
1218         is a character device instead of a block device. Add support for
1219         FreeBSD device names.
1221         * util/getroot.c (find_root_device) [__FreeBSD_kernel__]: Check if ENT
1222         is a character device instead of a block device.
1224         * util/grub-probe.c (probe) [__FreeBSD_kernel__]: Check if DEVICE_NAME
1225         is a character device instead of a block device.
1227 2009-04-11  Andrey Shuvikov  <mr_hyro@yahoo.com>
1229         * util/hostdisk.c [__FreeBSD__]: Include sys/disk.h.
1230         (grub_util_biosdisk_open) [__FreeBSD__]: Add support for
1231         FreeBSD. Check if a device is a character device. Use
1232         DIOCGMEDIASIZE to get the size.
1233         (convert_system_partition_to_system_disk) [__FreeBSD__]: Add
1234         support for FreeBSD.
1235         (grub_util_biosdisk_get_grub_dev) [__FreeBSD__]: Check if OS_DEV
1236         is a character device instead of a block device. Add support for
1237         FreeBSD device names.
1239         * util/getroot.c (find_root_device) [__FreeBSD__]: Check if ENT is
1240         a character device instead of a block device.
1241         (grub_util_check_char_device): New function.
1243         * util/grub-probe.c (probe) [__FreeBSD__]: Check if DEVICE_NAME is
1244         a character device instead of a block device.
1246         * include/grub/util/getroot.h (grub_util_check_char_device): New
1247         prototype.
1249 2009-04-11  David S. Miller  <davem@davemloft.net>
1251         * conf/sparc64-ieee1275.rmk (kernel_img_LDFLAGS): Link with
1252         static libgcc.
1253         * configure.ac: Check for __bswapsi2 and __bswapdi2 presence.
1254         * include/grub/sparc64/libgcc.h (__bswapsi2): Export libgcc
1255         function, if present.
1256         (__bswapdi2): Likewise.
1258         * include/grub/sparc64/ieee1275/boot.h: New file.
1259         * boot/sparc64/ieee1275/boot.S: Likewise.
1260         * boot/sparc64/ieee1275/diskboot.S: Likewise.
1262         * kern/misc.c (grub_ltoa): New function.
1263         (grub_vsprintf): Use it to format 'long' integers.
1265 2009-04-10  David S. Miller  <davem@davemloft.net>
1267         * disk/ieee1275/nand.c (grub_nand_open): All ieee1275 call arg
1268         slots are of type grub_ieee1275_cell_t.
1269         (grub_nand_read): Likewise.
1270         * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_INVALID,
1271         IEEE1275_IHANDLE_INVALID): Use grub_ieee1275_cell_t since these
1272         macros are used to compare values in arg/ret block of the call.
1273         (grub_ieee1275_finddevice, grub_ieee1275_get_property,
1274         grub_ieee1275_next_property, grub_ieee1275_get_property_length,
1275         grub_ieee1275_instance_to_package, grub_ieee1275_package_to_path,
1276         grub_ieee1275_instance_to_path, grub_ieee1275_write,
1277         grub_ieee1275_read, grub_ieee1275_seek, grub_ieee1275_peer,
1278         grub_ieee1275_child, grub_ieee1275_parent, grub_ieee1275_open,
1279         grub_ieee1275_close, grub_ieee1275_set_property,
1280         grub_ieee1275_set_color): All ieee1275 call arg slots are of type
1281         grub_ieee1275_cell_t.
1282         * kern/ieee1275/openfw.c (grub_map): Likewise.
1283         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_ihandle_t,
1284         grub_ieee1275_phandle_t): Define as grub_unit32_t type.
1286         * kern/ieee1275/init.c (grub_machine_init): Make 'actual' grub_ssize_t.
1287         * kern/ieee1275/openfw.c (grub_children_iterate): Likewise.
1288         (grub_devalias_iterate): Likewise.
1290 2009-04-10  Vladimir Serbinenko  <phcoder@gmail.com>
1292         UFS improvements
1294         * fs/ufs.c (INODE_NBLOCKS): new definition
1295         (struct grub_ufs_dirent): added fields for non-BSD dirents
1296         (grub_ufs_get_file_block): fixed double indirect handling
1297         (grub_ufs_lookup_symlink): use more robust way to determine whether
1298         symlink is inline
1299         (grub_ufs_find_file): support for non-BSD dirents
1300         (grub_ufs_dir): support for non-BSD dirents
1302 2009-04-10  Bean  <bean123ch@gnail.com>
1304         * include/grub/efi/api.h (grub_efi_configuration_table): Add packed
1305         attribute, otherwise the size would be wrong for i386 platform.
1307         * include/grub/pci.h (grub_pci_read_word): New inline function.
1308         (grub_pci_read_byte): Likewise.
1309         (grub_pci_write): Likewise.
1310         (grub_pci_write_word): Likewise.
1311         (grub_pci_write_byte): Likewise.
1313         * include/grub/pci.h (grub_pci_iteratefunc_t): Add NESTED_FUNC_ATTR.
1315         * loader/i386/efi/linux.c (fake_bios_data): Moved to loadbios module.
1316         (find_framebuf): Scan pci to locate the frame buffer address.
1318         * commands/efi/fixvideo.c: New file.
1320         * commands/efi/loadbios.c: Likewise.
1322         * commands/memrw.c: Likewise.
1324         * util/grub-dumpbios.in: Likewise.
1326         * conf/common.rmk (grub-dumpbios): New utility.
1327         (pkglib_MODULES): New module memrw.mod.
1328         (memrw_mod_SOURCE): New macro.
1329         (memrw_mod_CFLAGS): Likewise.
1330         (memrw_mod_LDFLAGS): Likewise.
1332         * conf/i386-efi.rmk (pkglib_MODULES): New module loadbios.mod and
1333         fixvideo.mod.
1334         (loadbios_mod_SOURCE): New macro.
1335         (loadbios_mod_CFLAGS): Likewise.
1336         (loadbios_mod_LDFLAGS): Likewise.
1337         (fixvideo_mod_SOURCE): Likewise.
1338         (fixvideo_mod_CFLAGS): Likewise.
1339         (fixvideo_mod_LDFLAGS): Likewise.
1341         * conf/x86_64.rmk (pkglib_MODULES): New module loadbios.mod and
1342         fixvideo.mod.
1343         (loadbios_mod_SOURCE): New macro.
1344         (loadbios_mod_CFLAGS): Likewise.
1345         (loadbios_mod_LDFLAGS): Likewise.
1346         (fixvideo_mod_SOURCE): Likewise.
1347         (fixvideo_mod_CFLAGS): Likewise.
1348         (fixvideo_mod_LDFLAGS): Likewise.
1350 2009-04-08  Felix Zielcke  <fzielcke@z-51.de>
1352         * disk/lvm.c (grub_lvm_scan_device): Add a missing NULL check.
1354 2009-04-07  David S. Miller  <davem@davemloft.net>
1356         * kern/sparc64/dl.c (grub_arch_dl_relocate_symbols): Add
1357         support for R_SPARC_OLO10 relocations.  Fix compile warning for
1358         R_SPARC_WDISP30 case.
1359         * kern/sparc64/cache.S: Fix grub_arch_sync_caches implementation.
1361 2009-04-06  Pavel Roskin  <proski@gnu.org>
1363         * include/grub/misc.h (ARRAY_SIZE): New macro.
1364         * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START):
1365         New macro.
1366         * loader/i386/linux.c (allocate_pages): Use free_pages().
1367         (grub_linux_unload): Don't use free_pages().
1368         (grub_linux_boot): Prevent accessing linux_vesafb_modes with a
1369         wrong index.  Treat all other modes as text modes.
1370         (grub_cmd_linux): Initialize vid_mode unconditionally to
1371         GRUB_LINUX_VID_MODE_NORMAL.  Recognize and support "vga=ask".
1373         * commands/help.c (print_command_help): Use cmd->prio, not
1374         cmd->flags to check for GRUB_PRIO_LIST_FLAG_ACTIVE.
1376 2009-04-06  Vladimir Serbinenko  <phcoder@gmail.com>
1378         Parttool
1380         * parttool/pcpart.c: new file
1381         * commands/parttool.c: likewise
1382         * conf/common.rmk (pkglib_MODULES): Added parttool.mod and pcpart.mod
1383         (parttool_mod_SOURCES): new variable
1384         (parttool_mod_CFLAGS): likewise
1385         (parttool_mod_LDFLAGS): likewise
1386         (pcpart_mod_SOURCES): likewise
1387         (pcpart_mod_CFLAGS): likewise
1388         (pcpart_mod_LDFLAGS): likewise
1389         * conf/i386-coreboot.rmk (grub_emu_SOURCES): added commands/parttool.c
1390         and parttool/pcpart.c
1391         * conf/i386-efi.rmk: likewise
1392         * conf/i386-ieee1275.rmk: likewise
1393         * conf/i386-pc.rmk: likewise
1394         * conf/powerpc-ieee1275.rmk: likewise
1395         * conf/sparc64-ieee1275.rmk: likewise
1396         * conf/x86_64-ieee1275.rmk: likewise
1398 2009-04-05  Vladimir Serbinenko  <phcoder@gmail.com>
1400         Support for mtime and further expandability of dir command
1402         * include/grub/lib/datetime.h: moved to ...
1403         * include/grub/datetime.h: ... moved here and added
1404         declaration of grub_unixtime2datetime. All users updated
1405         * include/grub/fs.h: new syntax for dir and mtime functions in
1406         struct grub_fs
1407         * include/grub/fshelp.h: new declarations of GRUB_FSHELP_TYPE_MASK
1408         and GRUB_FSHELP_FLAGS_MASK
1409         * commands/ls.c (grub_ls_list_files): Write mtime in long format
1410         * fs/ext2.c (grub_ext2_dir): use new dir syntax and supply mtime
1411         (grub_ext2_mtime): new function
1412         * fs/hfsplus.c (grub_hfsplus_dir): use new dir syntax and supply mtime
1413         (grub_hfsplus_mtime): new function
1414         * fs/ufs.c (GRUB_UFS_ATTR_TYPE): new definition
1415         (GRUB_UFS_ATTR_FILE): likewise
1416         (GRUB_UFS_ATTR_LNK): likewise
1417         (struct grub_ufs_sblock): new fields mtime
1418         (grub_ufs_read_inode): new parameter to read inode to a separate buffer
1419         all users updated
1420         (grub_ufs_dir): mtime support
1421         (grub_ufs_mtime): new function
1422         * fs/affs.c (grub_affs_dir): use new dir syntax
1423         * fs/afs.c (grub_afs_dir): likewise
1424         * fs/cpio.c (grub_cpio_dir): likewise
1425         * fs/fat.c (grub_fat_find_dir): likewise
1426         * fs/hfs.c (grub_hfs_dir): likewise
1427         * fs/iso9660.c (grub_iso9660_dir): likewise
1428         * fs/jfs.c (grub_jfs_dir): likewise
1429         * fs/minix.c (grub_minix_dir): likewise
1430         * fs/ntfs.c (grub_ntfs_dir): likewise
1431         * fs/reiserfs.c (grub_reiserfs_dir): likewise
1432         * fs/sfs.c (grub_sfs_dir): likewise
1433         * fs/xfs.c (grub_xfs_dir): likewise
1434         * util/hostfs.c (grub_hostfs_dir): likewise
1435         * lib/datetime.c: moved to ...
1436         * normal/datetime.c: ... moved here
1437         (grub_unixtime2datetime): new function
1438         * kern/rescue.c (grub_rescue_print_files): use new dir syntax
1439         * normal/completion.c (iterate_dir): use new dir syntax
1440         * normal/misc.c (grub_normal_print_device_info): tell the
1441         last modification time of a volume
1442         * kern/fs.c (grub_fs_probe): updated dummy function to use new syntax
1443         * conf/common.rmk: added lib/datetime.c to ls.mod
1444         * conf/i386-coreboot.rmk (grub_emu_SOURCES): add normal/datetime.c
1445         (normal_mod_SOURCES): likewise
1446         (datetime_mod_SOURCES): Removed lib/datetime.c
1447         * conf/i386-efi.rmk: likewise
1448         * conf/i386-ieee1275.rmk: likewise
1449         * conf/i386-pc.rmk: likewise
1450         * conf/powerpc-ieee1275.rmk: likewise
1451         * conf/sparc64-ieee1275.rmk: likewise
1452         * conf/x86_64-efi.rmk: likewise
1454 2009-04-05  Vladimir Serbinenko  <phcoder@gmail.com>
1456         Trim trailing spaces in FAT label and support mtools-like labels
1458         * fs/fat.c (grub_fat_iterate_dir): New function based
1459         on grub_fat_find_dir
1460         (grub_fat_find_dir): use grub_fat_iterate_dir
1461         (grub_fat_label): likewise
1463 2009-04-04  Vladimir Serbinenko  <phcoder@gmail.com>
1465         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): add list.h
1466         and command.h
1467         remove extraneous kernel_elf_HEADERS
1469 2009-04-04  Bean  <bean123ch@gnail.com>
1471         * include/grub/util/misc.h: Add dummy function fsync for mingw.
1473         * util/misc.c: Likewise.
1475 2009-04-04  Yoshinori K. Okuji  <okuji@enbug.org>
1477         * loader/i386/efi/linux.c (fake_bios_data): Use grub_dprintf
1478         instead of grub_printf.
1480 2009-04-03  Robert Millan  <rmh@aybabtu.com>
1482         * loader/i386/linux.c (grub_linux_setup_video): Fill
1483         `params->{red,green,blue,reserved}_{mask_size,field_pos}' with
1484         values from `mode info' structure instead of hardcoded
1485         values.
1487 2009-04-01  Pavel Roskin  <proski@gnu.org>
1489         * Makefile.in: Remove all references to MODULE_LDFLAGS, it's
1490         unused now.
1491         * genmk.rb: Likewise.
1492         * configure.ac: Likewise.
1494 2009-04-01  Manoel Abranches  <mrabran@linux.vnet.ibm.com>
1496         * aclocal.m4: Move --build-id=none from MODULE_LDFLAGS to
1497         TARGET_LDFLAGS.  This corrects a problem with grub-mkelfimage.
1499 2009-04-01  David S. Miller  <davem@davemloft.net>
1501         * normal/sparc64/setjmp.S: Fix setjmp implementation.
1502         * include/grub/sparc64/setjmp.h (grub_jmp_buf): Update.
1503         (grub_setjmp): Mark with 'returns_twice' attribute.
1504         * include/grub/i386/setjmp.h (grub_setjmp): Likewise
1505         * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise.
1506         * include/grub/x86_64/setjmp.h (grub_setjmp): Likewise.
1508 2009-04-01  Robert Millan  <rmh@aybabtu.com>
1510         Reapply fix from 2008-07-28 which was accidentally reverted; also
1511         perform the same fix to a similar check in same function.
1513         * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
1514         with the same number are found, just use issue a warning with
1515         grub_dprintf(), as this error has been reported to be non-fatal.
1517 2009-03-31  Pavel Roskin  <proski@gnu.org>
1519         * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Provide safe default
1520         for cross-compilation.
1522 2009-03-30  Robert Millan  <rmh@aybabtu.com>
1524         Fix i386-ieee1275 build.
1526         * include/grub/i386/ieee1275/loader.h (grub_multiboot2_real_boot):
1527         Remove declaration.
1529 2009-03-30  Pavel Roskin  <proski@gnu.org>
1531         * fs/hfs.c (grub_hfs_strncasecmp): Integrate into ...
1532         (grub_hfs_cmp_catkeys): ... this.  Don't assume strings to be
1533         zero-terminated, rely only on the strlen value.  Fix comparison
1534         of strings differing in length.
1536 2009-03-30  Robert Millan  <rmh@aybabtu.com>
1538         * loader/i386/linux.c (grub_cmd_linux): Check for zImage before
1539         checking for abi version.  Improve error messages on BIOS to notify
1540         user about `linux16' command.
1542 2009-03-29  Vladimir Serbinenko  <phcoder@gmail.com>
1544         Leak fixes
1546         * kern/disk.c (grub_disk_cache_store): Invalidate previous cache
1547         in case of collision
1548         * disk/scsi.c (grub_scsi_open): free scsi in case of error
1550 2009-03-29  Robert Millan  <rmh@aybabtu.com>
1552         * loader/i386/linux.c (grub_cmd_linux): Parse "vga=" parameter and
1553         set `vid_mode' accordingly.
1554         (grub_linux_boot): Process `vid_mode' and set video mode.
1556 2009-03-29  Robert Millan  <rmh@aybabtu.com>
1558         * util/grub.d/10_linux.in (linux_entry): New function.
1559         Factorize generation of Linux boot entries.
1561 2009-03-29  Yoshinori K. Okuji  <okuji@enbug.org>
1563         Make the format of Environment Block plain text. The boot loader
1564         part is not tested well yet.
1566         * util/grub-editenv.c (DEFAULT_ENVBLK_SIZE): New macro.
1567         (buffer): Removed.
1568         (envblk): Likewise.
1569         (usage): Remove "info" and "clear". Add "unset". Update the
1570         description of "set", as this does not delete variables any
1571         longer.
1572         (create_envblk_file): Complete rewrite.
1573         (open_envblk_file): Likewise.
1574         (cmd_info): Removed.
1575         (cmd_list): Likewise.
1576         (cmd_set): Likewise.
1577         (cmd_clear): Likewise.
1578         (list_variables): New function.
1579         (write_envblk): Likewise.
1580         (set_variables): Likewise.
1581         (unset_variables): Likewise.
1582         (main): Complete rewrite.
1584         * commands/loadenv.c (buffer): Removed.
1585         (envblk): Likewise.
1586         (open_envblk_file): New function.
1587         (read_envblk_file): Complete rewrite.
1588         (grub_cmd_load_env): Likewise.
1589         (grub_cmd_list_env): Likewise.
1590         (struct blocklist): New struct.
1591         (free_blocklists): New function.
1592         (check_blocklists): Likewise.
1593         (write_blocklists): Likewise.
1594         (grub_cmd_save_env): Complete rewrite.
1596         * include/grub/lib/envblk.h (GRUB_ENVBLK_SIGNATURE): Replaced with
1597         a plain text signature.
1598         (GRUB_ENVBLK_MAXLEN): Removed.
1599         (struct grub_envblk): Complete rewrite.
1600         (grub_envblk_find): Removed.
1601         (grub_envblk_insert): Likewise.
1602         (grub_envblk_open): New prototype.
1603         (grub_envblk_set): Likewise.
1604         (grub_envblk_delete): Put const to VALUE.
1605         (grub_envblk_iterate): Put const to NAME and VALUE.
1606         (grub_envblk_close): New prototype.
1607         (grub_envblk_buffer): New inline function.
1608         (grub_envblk_size): Likewise.
1610         * lib/envblk.c: Include grub/mm.h.
1611         (grub_env_find): Removed.
1612         (grub_envblk_open): New function.
1613         (grub_envblk_close): Likewise.
1614         (escaped_value_len): Likewise.
1615         (find_next_line): Likewise.
1616         (grub_envblk_insert): Removed.
1617         (grub_envblk_set): New function.
1618         (grub_envblk_delete): Complete rewrite.
1619         (grub_envblk_iterate): Likewise.
1621 2009-03-28  Robert Millan  <rmh@aybabtu.com>
1623         * conf/i386-pc.rmk (pkglib_MODULES): Add `linux16.mod'.
1624         (linux16_mod_SOURCES, linux16_mod_CFLAGS, linux16_mod_LDFLAGS): New
1625         variables.  Use 16-bit loader.
1626         (linux_mod_SOURCES, linux_mod_CFLAGS, linux_mod_LDFLAGS): Use 32-bit
1627         loader.
1628         * kern/i386/loader.S (grub_linux_boot): Rename to ...
1629         (grub_linux16_boot): ... this.  Update all users.
1630         * loader/i386/linux.c (grub_linux32_boot): Rename to ...
1631         (grub_linux_boot): ... this.  Update all users.
1633         * loader/i386/pc/linux.c (GRUB_MOD_INIT(linux)): Rename to ...
1634         (GRUB_MOD_INIT(linux16)): ... this.  Rename `linux' and `initrd'
1635         commands to `linux16' and `initrd16'.
1636         (GRUB_MOD_FINI(linux)): Rename to ...
1637         (GRUB_MOD_FINI(linux16)): ... this.
1639 2009-03-24  Pavel Roskin  <proski@gnu.org>
1641         * genmk.rb: Define ASM_FILE for *.S files for *.lst generation,
1642         not just for compilation.
1644 2009-03-22  Vladimir Serbinenko  <phcoder@gmail.com>
1646         Move multiboot helper out of kernel
1648         * conf/i386-pc.rmk (multiboot_mod_SOURCES): Add
1649         `loader/i386/multiboot_helper.S'.
1650         * conf/i386-coreboot.rmk: Likewise
1651         * conf/i386-ieee1275.rmk: Likewise
1653         * kern/i386/loader.S: Move multiboot helpers from here...
1654         * loader/i386/multiboot_helper.S: ...moved here
1655         * include/grub/i386/loader.h: Move declarations of multiboot
1656         helpers from here...
1657         * include/grub/i386/multiboot.h: ...moved here
1658         * loader/i386/multiboot.c: Added include of grub/cpu/multiboot.h
1660 2009-03-22  Yoshinori K. Okuji  <okuji@enbug.org>
1662         * kern/env.c (grub_env_context_open): Added an argument to specify
1663         whether a new context inherits exported variables from current
1664         one. This is useful when making a sandbox to interpret a config
1665         file.
1666         All callers updated.
1668         * include/grub/env.h (grub_env_context_open): Updated the prototype.
1670 2009-03-22  Yoshinori K. Okuji  <okuji@enbug.org>
1672         * kern/env.c (grub_env_context_close): Fix memory leaks.
1674 2009-03-22  Yoshinori K. Okuji  <okuji@enbug.org>
1676         * normal/main.c (grub_normal_execute): Added an argument
1677         BATCH to specify if an interactive interface should be provided
1678         after reading a config file.
1679         All callers updated.
1680         (read_command_list): Prevent being executed twice.
1681         (read_fs_list): Likewise.
1683         * include/grub/normal.h (grub_normal_execute): Updated the
1684         prototype.
1686 2009-03-22  Pavel Roskin  <proski@gno.org>
1688         * kern/powerpc/ieee1275/startup.S: Replace EXT_C(start) with
1689         _start.
1690         * kern/i386/pc/startup.S: Likewise.
1691         * kern/i386/efi/startup.S: Likewise.
1692         * kern/i386/ieee1275/startup.S: Likewise.
1693         * kern/i386/coreboot/startup.S: Likewise.
1694         * kern/x86_64/efi/startup.S: Likewise.
1696         * aclocal.m4 (grub_CHECK_START_SYMBOL): Remove.
1697         * configure.ac: Don't call grub_CHECK_START_SYMBOL.
1698         * kern/i386/pc/startup.S: Use _start instead of START_SYMBOL.
1700 2009-03-21  Vladimir Serbinenko  <phcoder@gmail.com>
1702         Bugfixes in multiboot for bugs uncovered by solaris kernel.
1704         * loader/i386/multiboot_elfxx.c (grub_multiboot_load_elf): Corrected
1705         limit detection.
1706         Use vaddr of correct segment for entry_point.
1708 2009-03-21  Bean  <bean123ch@gmail.com>
1710         * commands/blocklist.c: Add include file <grub/command.h>, remove
1711         <grub/normal.h> and <grub/arg.h>.
1712         (grub_cmd_blocklist): Use the new command interface.
1713         (GRUB_MOD_INIT): Likewise.
1714         (GRUB_MOD_FINI): Likewise.
1715         * commands/boot.c: Likewise.
1716         * commands/cat.c: Likewise.
1717         * commands/cmp.c: Likewise.
1718         * commands/configfile.c: Likewise.
1719         * commands/crc.c: Likewise.
1720         * commands/echo.c: Likewise.
1721         * commands/halt.c: Likewise.
1722         * commands/handler.c: Likewise.
1723         * commands/hdparm.c: Likewise.
1724         * commands/help.c: Likewise.
1725         * commands/hexdump.c: Likewise.
1726         * commands/loadenv.c: Likewise.
1727         * commands/ls.c: Likewise.
1728         * commands/lsmmap.c: Likewise.
1729         * commands/lspci.c: Likewise.
1730         * commands/loadenv.c: Likewise.
1731         * commands/read.c: Likewise.
1732         * commands/reboot.c: Likewise.
1733         * commands/search.c: Likewise.
1734         * commands/sleep.c: Likewise.
1735         * commands/test.c: Likewise.
1736         * commands/usbtest.c: Likewise.
1737         * commands/videotest.c: Likewise.
1738         * commands/i386/cpuid.c: Likewise.
1739         * commands/i386/pc/halt.c: Likewise.
1740         * commands/i386/pc/play.c: Likewise.
1741         * commands/i386/pc/pxecmd.c: Likewise.
1742         * commands/i386/pc/vbeinfo.c: Likewise.
1743         * commands/i386/pc/vbetest.c: Likewise.
1744         * commands/ieee1275/suspend.c: Likewise.
1745         * disk/loopback.c: Likewise.
1746         * font/font_cmd.c: Likewise.
1747         * hello/hello.c: Likewise.
1748         * loader/efi/appleloader.c: Likewise.
1749         * loader/efi/chainloader.c: Likewise.
1750         * loader/i386/bsd.c: Likewise.
1751         * loader/i386/efi/linux.c: Likewise.
1752         * loader/i386/ieee1275/linux.c: Likewise.
1753         * loader/i386/linux.c: Likewise.
1754         * loader/i386/pc/chainloader.c: Likewise.
1755         * loader/i386/pc/linux.c: Likewise.
1756         * loader/powerpc/ieee1275/linux.c: Likewise.
1757         * loader/multiboot_loader.c: Likewise.
1758         * term/gfxterm.c: Likewise.
1759         * term/i386/pc/serial.c: Likewise.
1760         * term/terminfo.c: Likewise.
1762         * term/i386/pc/vesafb.c: Removed <grub/arg.h>.
1763         * term/i386/pc/vga.c: Likewise.
1764         * video/readers/jpeg.c: Likewise.
1765         * video/readers/png.c: Likewise.
1766         * video/readers/tga.c: Likewise.
1768         * util/grub-fstest (cmd_loopback): Removed.
1769         (cmd_blocklist): Likewise.
1770         (cmd_ls): Likewise.
1771         (grub_register_command): Likewise.
1772         (grub_unregister_command): Likewise.
1773         (execute_command): Use grub_command_find to locate command and execute
1774         it.
1776         * include/grub/efi/chainloader.h: Removed.
1777         * loader/efi/chainloader_normal.c: Likewise.
1778         * loader/i386/bsd_normal.c: Likewise.
1779         * loader/i386/pc/chainloader_normal.c: Likewise.
1780         * loader/i386/pc/multiboot_normal.c: Likewise.
1781         * loader/linux_normal.c: Likewise.
1782         * loader/multiboot_loader_normal.c: Likewise.
1783         * loader/powerpc/ieee1275/linux_normal.c: Likewise.
1785         * gencmdlist.sh: Scan new registration command grub_register_extcmd
1786         and grub_register_command_p1.
1788         * conf/common.rmk (grub_fstest_SOURCES): Add kern/list.c,
1789         kern/command.c, lib/arg.c and commands/extcmd.c.
1790         (pkglib_MODULES): Remove boot.mod, and minicmd.mod and extcmd.mod.
1791         (minicmd_mod_SOURCES): New variable.
1792         (minicmd_mod_CFLAGS): Likewise.
1793         (minicmd_mod_LDFLAGS): Likewise.
1794         (extcmd_mod_SOURCES): Likewise.
1795         (extcmd_mod_CFLAGS): Likewise.
1796         (extcmd_mod_LDFLAGS): Likewise.
1797         (boot_mod_SOURCES): Removed.
1798         (boot_mod_CFLAGS): Likewise.
1799         (boot_mod_LDFLAGS): Likewise.
1801         * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/command.c and
1802         kern/corecmd.c.
1803         (kernel_img_HEADERS): Add command.h.
1804         (grub_emu_SOURCES): Remove commands/boot.c and normal/arg.c, add
1805         commands/minicmd.c, kern/command.c, kern/corecmd.c, commands/extcmd.c
1806         and lib/arg.c.
1807         (pkglib_MODULES): Change _linux.mod, _chain.mod, _bsd.mod and
1808         _multiboot.mod as linux.mod, chain.mod, bsd.mod and multiboot.mod,
1809         remove the corresponding normal mode command.
1810         (normal_mod_SOURCES): Remove normal/arg.c.
1811         * conf/i386-coreboot.rmk: Likewise.
1812         * conf/i386-efi.rmk: Likewise.
1813         * conf/i386-ieee1275.rmk: Likewise.
1814         * conf/powerpc-ieee1275.rmk: Likewise.
1815         * conf/x86_64-efi.rmk: Likewise.
1817         * include/grub/arg.h: Move from here ...
1818         * include/grub/lib/arg.h: ... to here.
1820         * normal/arg.c: Move from here ...
1821         * lib/arg.c: ... to here.
1823         * commands/extcmd.c: New file.
1824         * commands/minicmd.c: Likewise.
1825         * include/grub/command.h: Likewise.
1826         * include/grub/extcmd.h: Likewise.
1827         * kern/command.c: Likewise.
1828         * kern/corecmd.c: Likewise.
1830         * kern/list.c (grub_list_iterate): Return int instead of void.
1831         (grub_list_insert): New function.
1832         (grub_prio_list_insert): Likewise.
1834         * kern/rescue.c (grub_rescue_command): Removed.
1835         (grub_rescue_command_list): Likewise.
1836         (grub_rescue_register_command): Likewise.
1837         (grub_rescue_unregister_command): Likewise.
1838         (grub_rescue_cmd_boot): Move to minicmd.c
1839         (grub_rescue_cmd_help): Likewise.
1840         (grub_rescue_cmd_info): Likewise.
1841         (grub_rescue_cmd_boot): Likewise.
1842         (grub_rescue_cmd_testload): Likewise.
1843         (grub_rescue_cmd_dump): Likewise.
1844         (grub_rescue_cmd_rmmod): Likewise.
1845         (grub_rescue_cmd_lsmod): Likewise.
1846         (grub_rescue_cmd_exit): Likewise.
1847         (grub_rescue_print_devices): Moved to corecmd.c.
1848         (grub_rescue_print_files): Likewise.
1849         (grub_rescue_cmd_ls): Likewise.
1850         (grub_rescue_cmd_insmod): Likewise.
1851         (grub_rescue_cmd_set): Likewise.
1852         (grub_rescue_cmd_unset): Likewise.
1853         (attempt_normal_mode): Use grub_command_find to get normal module.
1854         (grub_enter_rescue_mode): Use grub_register_core_commands to register
1855         commands, remove grub_rescue_register_command calls.
1857         * normal/command.c (grub_register_command): Removed.
1858         (grub_unregister_command): Likewise.
1859         (grub_command_find): Likewise.
1860         (grub_iterate_commands): Likewise.
1861         (rescue_command): Likewise.
1862         (export_command): Moved to corecmd.c.
1863         (set_command): Removed.
1864         (unset_command): Likewise.
1865         (insmod_command): Likewise.
1866         (rmmod_command): Likewise.
1867         (lsmod_command): Likewise.
1868         (grub_command_init): Likewise.
1870         * normal/completion.c (iterate_command): Use cmd->prio to check for
1871         active command.
1872         (complete_arguments): Use grub_extcmd_t structure to find options.
1873         (grub_normal_do_completion): Change function grub_iterate_commands to
1874         grub_command_iterate.
1876         * normal/execute.c (grub_script_execute_cmd): No need to parse
1877         argument here.
1879         * normal/main.c (grub_dyncmd_dispatcher): New function.
1880         (read_command_list): Register unload commands as dyncmd.
1881         (grub_cmd_normal): Use new command interface, register rescue,
1882         unregister normal at entry, register normal, unregister rescue at exit.
1884         * include/grub/list.h (grub_list_test_t): New type.
1885         (grub_list_iterate): Return int instead of void.
1886         (grub_list_insert): New function.
1887         (GRUB_AS_NAMED_LIST_P): New macro.
1888         (GRUB_AS_PRIO_LIST): Likewise.
1889         (GRUB_AS_PRIO_LIST_P): Likewise.
1890         (GRUB_PRIO_LIST_PRIO_MASK): New constant.
1891         (GRUB_PRIO_LIST_FLAG_ACTIVE): Likewise.
1892         (grub_prio_list): New structure.
1893         (grub_prio_list_insert): New function.
1894         (grub_prio_list_remove): New inline function.
1896         * include/grub/normal.h: Remove <grub/arg.h>, add <grub/command.h>.
1897         (GRUB_COMMAND_FLAG_CMDLINE): Moved to command.h.
1898         (GRUB_COMMAND_FLAG_MENU): Likewise.
1899         (GRUB_COMMAND_FLAG_BOTH): Likewise.
1900         (GRUB_COMMAND_FLAG_TITLE): Likewise.
1901         (GRUB_COMMAND_FLAG_NO_ECHO): Likewise.
1902         (GRUB_COMMAND_FLAG_NO_ARG_PARSE): Removed.
1903         (GRUB_COMMAND_FLAG_NOT_LOADED): Likewise.
1904         (grub_command): Likewise.
1905         (grub_register_command): Likewise.
1906         (grub_command_find): Likewise.
1907         (grub_iterate_commands): Likewise.
1908         (grub_command_init): Likewise.
1909         (grub_arg_parse): Likewise.
1910         (grub_arg_show_help): Likewise.
1912         * include/grub/rescue.h (grub_rescue_register_command): Removed.
1913         (grub_rescue_unregister_command): Likewise.
1915         * include/grub/i386/bsd.h: Remove grub_rescue_cmd_freebsd,
1916         grub_rescue_cmd_openbsd, grub_rescue_cmd_netbsd,
1917         grub_rescue_cmd_freebsd_loadenv and grub_rescue_cmd_freebsd_module.
1919         * include/grub/i386/efi/loader.h: Remove grub_rescue_cmd_linux and
1920         grub_rescue_cmd_initrd.
1921         * include/grub/i386/loader.h: Likewise.
1922         * include/grub/x86_64/loader.h: Likewise.
1924         * include/grub/i386/pc/chainloader.h: Remove grub_chainloader_cmd.
1926 2009-03-21  Bean  <bean123ch@gmail.com>
1928         * util/hostdisk.c (read_device_map): Use grub_util_get_disk_size
1929         instead of stat in mingw environment.
1931         * util/misc.c (grub_millisleep): Use Sleep in mingw environment.
1933         * aclocal.m4 (grub_CHECK_LINK_DIR): New function.
1935         * configure.ac: Use grub_CHECK_LINK_DIR to determine whether to use
1936         AC_CONFIG_LINKS.
1938 2009-03-21  Bean  <bean123ch@gmail.com>
1940         * fs/ext2.c (grub_ext2_mount): Change errno to GRUB_ERR_BAD_FS for
1941         out of range error.
1943 2009-03-18  Michel Dänzer  <michel@daenzer.net>
1945         * fs/ext2.c (grub_ext2_read_block): Take endianness into account when
1946         checking inode flags for EXT4_EXTENTS_FLAG.
1948 2009-03-18  Robert Millan  <rmh@aybabtu.com>
1950         * loader/i386/linux.c: Include `<grub/video.h>' and
1951         `<grub/i386/pc/vbe.h>'..
1952         (grub_linux_setup_video): New function.  Loosely based on the EFI one.
1953         (grub_linux32_boot): Attempt to configure video settings with
1954         grub_linux_setup_video().
1955         (grub_rescue_cmd_linux): Set noreturn=0 in grub_loader_set, in order
1956         to avoid grub_console_fini() which would step out of graphical mode
1957         unconditionally.
1959 2009-03-14  Robert Millan  <rmh@aybabtu.com>
1961         Fix build on powerpc.
1962         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Add `handler.h'.
1964 2009-03-12  Vladimir Serbinenko  <phcoder@gmail.com>
1966         * term/gfxterm.c (GRUB_MOD_FINI(term_gfxterm)): Correct name of
1967         background image command.
1969 2009-03-12  Colin D Bennett  <colin@gibibit.com>
1971         * term/gfxterm.c (draw_cursor): Ensure character is redrawn.
1972         (grub_gfxterm_putchar): Extract pairs of identical calls to
1973         draw_cursor out of conditional blocks.
1975 2009-03-11  Pavel Roskin  <proski@gnu.org>
1977         * fs/hfs.c (grub_hfs_strncasecmp): New function.
1978         (grub_hfs_cmp_catkeys): Use HFS specific string comparison.
1980 2009-03-11  Robert Millan  <rmh@aybabtu.com>
1982         * loader/i386/multiboot_elfxx.c
1983         (CONCAT(grub_multiboot_load_elf, XX)): Do not reject ET_DYN files.
1985 2009-03-11  Felix Zielcke  <fzielcke@z-51.de>
1987         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add `kern/list.c' and
1988         `kern/handler.c'.
1990 2009-03-11  Robert Millan  <rmh@aybabtu.com>
1992         * loader/i386/multiboot.c (code_size): New variable.
1993         (grub_multiboot): Define offsets by adding to `code_size' rather
1994         than subtracting from `grub_multiboot_payload_size'.  Provide
1995         4-byte alignment to MBI and others by increasing
1996         `boot_loader_name_length' appropriately.
1998         * loader/i386/multiboot_elfxx.c
1999         (CONCAT(grub_multiboot_load_elf, XX)): Initialize `code_size'.
2001 2009-03-09  Felix Zielcke  <fzielcke@z-51.de>
2003         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove duplicated
2004         `fs/ext2.c'.
2006 2009-03-08  Robert Millan  <rmh@aybabtu.com>
2008         Make loader/i386/linux.c usable on i386-pc again.
2010         * kern/i386/pc/init.c (grub_machine_init): Disable addition of low
2011         memory to heap.
2012         * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (allocate_pages): Remove
2013         `#error' stanza.
2015 2009-03-07  Bean  <bean123ch@gmail.com>
2017         * loader/i386/efi/linux.c (grub_rescue_cmd_initrd): Fix a bug in initrd
2018         allocation.
2020 2009-03-06  Robert Millan  <rmh@aybabtu.com>
2022         Fix display issue on terminals with screen size other than 80x25
2023         (e.g. gfxterm with resolution higher than 640x480).
2025         * normal/main.c (grub_normal_init_page): Display title text in a
2026         position relative to the center of the terminal instead of relying
2027         on a hardcoded offset.
2029 2009-03-04  Robert Millan  <rmh@aybabtu.com>
2031         Filter /etc/grub.d/10_* so that only add-ons for native kernels are
2032         installed.
2034         * Makefile.in (host_kernel): New variable.
2035         * conf/common.rmk (grub-mkconfig_SCRIPTS): Conditionalize all 10_*.in
2036         scripts instead of just the windows one.
2037         * configure.ac: Initialize and AC_SUBST `host_kernel'.
2039 2009-03-04  Felix Zielcke  <fzielcke@z-51.de>
2041         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `kern/list.c' and
2042         `kern/handler.c'.
2043         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
2044         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
2045         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
2046         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2047         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2048         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2050 2009-03-04  Felix Zielcke  <fzielcke@z-51.de>
2052         * partmap/pc.c (pc_partition_map_iterate): Skip over invalid BSD partitions
2053         or if there's no space for the disk label and print the partition number on a
2054         invalid magic.
2056 2009-03-04  Felix Zielcke  <fzielcke@z-51.de>
2058         * util/misc.c: Include <time.h>.
2059         (grub_millisleep): New function.
2061 2009-03-04  Bean  <bean123ch@gmail.com>
2063         * configure.ac: Only test -mcmodel=large option in x86_64-efi, also add
2064         another option -mno-red-zone.
2066         * commands/handler.c: Change module description.
2068         * kern/handler.c: Add missing space at the end of description line.
2070         * kern/list.c: Likewise.
2072 2009-03-03  Robert Millan  <rmh@aybabtu.com>
2074         Move more components to the relocation area, and fix mbi pointer
2075         handling to use the destination rather than the origin (thanks to
2076         Vladimir Serbinenko for spotting).
2078         * loader/i386/multiboot.c (mbi_dest): New variable.
2079         (grub_multiboot_boot): Use `mbi_dest' instead of `mbi'.
2080         (grub_multiboot): Put cmdline, boot_loader_name and mbi in the
2081         relocation area.
2083 2009-03-01  Bean  <bean123ch@gmail.com>
2085         * include/grub/efi/api.h (GRUB_EFI_MPS_TABLE_GUID): New constant.
2086         (GRUB_EFI_ACPI_TABLE_GUID): Likewise.
2087         (GRUB_EFI_ACPI_20_TABLE_GUID): Likewise.
2088         (GRUB_EFI_SMBIOS_TABLE_GUID): Likewise.
2090         * loader/i386/efi/linux.c (acpi_guid): New variable.
2091         (acpi_guid): Likewise.
2092         (EBDA_SEG_ADDR): New constant.
2093         (LOW_MEM_ADDR): Likewise.
2094         (FAKE_EBDA_SEG): Likewise.
2095         (fake_bios_data): New function.
2096         (grub_linux_boot): Call fake_bios_data.
2098 2009-03-01  Bean  <bean123ch@gmail.com>
2100         * commands/terminal.c: Removed.
2102         * commands/handler.c: New file.
2104         * include/grub/list.h: Likewise.
2106         * include/grub/handler.h: Likewise.
2108         * kern/list.c: Likewise.
2110         * kern/handler.c: Likewise.
2112         * kern/term.h: Include header file <grub/handler.h>.
2113         (grub_term_input): Move next field to the beginning.
2114         (grub_term_output): Likewise.
2115         (grub_term_input_class): New variable.
2116         (grub_term_output_class): Likewise.
2117         (grub_term_register_input): Changed to inline function.
2118         (grub_term_register_output): Likewise.
2119         (grub_term_unregister_input): Likewise.
2120         (grub_term_unregister_output): Likewise.
2121         (grub_term_set_current_input): Likewise.
2122         (grub_term_set_current_output): Likewise.
2123         (grub_term_get_current_input): Likewise.
2124         (grub_term_get_current_output): Likewise.
2125         (grub_term_iterate_input): Removed.
2126         (grub_term_iterate_output): Likewise.
2128         * kern/term.c (grub_term_list_input): Removed.
2129         (grub_term_list_output): Likewise.
2130         (grub_term_input_class): New variable.
2131         (grub_term_output_class): Likewise.
2132         (grub_cur_term_input): Change variable as macro.
2133         (grub_cur_term_output): Likewise.
2134         (grub_term_register_input): Removed.
2135         (grub_term_register_output): Likewise.
2136         (grub_term_unregister_input): Likewise.
2137         (grub_term_unregister_output): Likewise.
2138         (grub_term_set_current_input): Likewise.
2139         (grub_term_set_current_output): Likewise.
2140         (grub_term_iterate_input): Likewise.
2141         (grub_term_iterate_output): Likewise.
2142         (grub_term_get_current_input): Likewise.
2143         (grub_term_get_current_output): Likewise.
2145         * util/grub-editenv.c: Include header file <grub/handler.h>.
2146         (grub_term_get_current_input): Removed.
2147         (grub_term_get_current_output): Likewise.
2148         (grub_term_input_class): New variable.
2149         (grub_term_output_class): Likewise.
2151         * util/grub-fstest.c (grub_term_get_current_input): Removed.
2152         (grub_term_get_current_output): Likewise.
2153         (grub_term_input_class): New variable.
2154         (grub_term_output_class): Likewise.
2156         * util/grub-probe.c (grub_term_get_current_input): Removed.
2157         (grub_term_get_current_output): Likewise.
2158         (grub_term_input_class): New variable.
2159         (grub_term_output_class): Likewise.
2161         * util/i386/pc/grub-setup.c (grub_term_get_current_input): Removed.
2162         (grub_term_get_current_output): Likewise.
2163         (grub_term_input_class): New variable.
2164         (grub_term_output_class): Likewise.
2166         * conf/common.rmk (pkglib_MODULES): Replace terminal with handler.
2167         (terminal_mod_SOURCES): Likewise.
2168         (terminal_mod_CFLAGS): Likewise.
2169         (terminal_mod_LDFLAGS): Likewise.
2171         * conf/i386-pc.rmk (grub_emu_SOURCES): Replace terminal.c with
2172         handler.c.
2173         (kernel_img_SOURCES): Add list.c and handler.c.
2174         (kernel_img_HEADERS): Add list.h and handler.h.
2176         * conf/i386-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
2177         handler.c.
2178         (kernel_mod_SOURCES): Add list.c and handler.c.
2179         (kernel_mod_HEADERS): Add list.h and handler.h.
2181         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Replace terminal.c with
2182         handler.c.
2183         (kernel_elf_SOURCES): Add list.c and handler.c.
2184         (kernel_elf_HEADERS): Add list.h and handler.h.
2186         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
2187         handler.c.
2188         (kernel_elf_SOURCES): Add list.c and handler.c.
2189         (kernel_elf_HEADERS): Add list.h and handler.h.
2191         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
2192         handler.c.
2193         (kernel_mod_SOURCES): Add list.c and handler.c.
2194         (kernel_mod_HEADERS): Add list.h and handler.h.
2196         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
2197         handler.c.
2198         (kernel_elf_SOURCES): Add list.c and handler.c.
2199         (kernel_elf_HEADERS): Add list.h and handler.h.
2201 2009-02-27  Robert Millan  <rmh@aybabtu.com>
2203         Factorize elf32 / elf64 code in Multiboot loader.  This will
2204         prevent it from getting out of sync again.
2206         * loader/i386/multiboot.c (grub_multiboot_is_elf32,
2207         grub_multiboot_load_elf32, grub_multiboot_is_elf64,
2208         grub_multiboot_load_elf64): Move from here ...
2209         * loader/i386/multiboot_elfxx.c (grub_multiboot_is_elf,
2210         grub_multiboot_load_elf): ... to here (new file).
2212 2009-02-27  Robert Millan  <rmh@aybabtu.com>
2214         * util/grub.d/10_linux.in: Rename "single-user mode" to
2215         "recovery mode".
2217 2009-02-27  Vladimir Serbinenko  <phcoder@gmail.com>
2219         Don't leak in SCSI code.
2220         * disk/scsi.c (grub_scsi_close): free `scsi'.
2222 2009-02-27  Robert Millan  <rmh@aybabtu.com>
2224         * loader/i386/pc/multiboot.c: Move from here ...
2225         * loader/i386/multiboot.c: ... to here.  Update all users.
2227 2009-02-27  Robert Millan  <rmh@aybabtu.com>
2229         Patch from Alexandre Bique <bique.alexandre@gmail.com>
2230         * util/i386/pc/grub-setup.c (setup): Fix directory path.
2232 2009-02-27  Krzysztof Smiechowicz  <deadwood@wp.pl>
2234         * fs/sfs.c (grub_sfs_read_extent): Correction to traversing extent
2235         b-tree.
2237 2009-02-27  Robert Millan  <rmh@aybabtu.com>
2239         * kern/misc.c (grub_strtoull): Fix bug (it mistakenly parsed the
2240         `0x' qualifier as 0 when base is specified as parameter).
2242 2009-02-24  Bean  <bean123ch@gmail.com>
2244         * configure.ac: Check for -mcmodel=large in x86_64 target.
2246         * include/grub/efi/api.h (efi_call_10): New macro.
2247         (efi_wrap_10): New function.
2249         * include/grub/efi/pe32.h (GRUB_PE32_REL_BASE_HIGH): New macro.
2250         (GRUB_PE32_REL_BASED_HIGH): Likewise.
2251         (GRUB_PE32_REL_BASED_LOW): Likewise.
2252         (GRUB_PE32_REL_BASED_HIGHLOW): Likewise.
2253         (GRUB_PE32_REL_BASED_HIGHADJ): Likewise.
2254         (GRUB_PE32_REL_BASED_MIPS_JMPADDR): Likewise.
2255         (GRUB_PE32_REL_BASED_SECTION): Likewise.
2256         (GRUB_PE32_REL_BASED_REL): Likewise.
2257         (GRUB_PE32_REL_BASED_IA64_IMM64): Likewise.
2258         (GRUB_PE32_REL_BASED_DIR64): Likewise.
2259         (GRUB_PE32_REL_BASED_HIGH3ADJ): Likewise.
2261         * kern/x86_64/dl.c (grub_arch_dl_relocate_symbols): Fixed relocation
2262         issue.
2264         * kern/x86_64/efi/callwrap.S (efi_wrap_6): Bug fix.
2265         (efi_wrap_10): New function.
2267         * kern/x86_64/efi/startup.S (codestart): Use relative addressing.
2269         * loader/efi/appleloader.c (devpath_5): Add support for late 2008
2270         MB/MBP model (NV chipset).
2271         (devdata_devs): Add devpath_5 to the list.
2273         * load/i386/efi/linux.c (video_base): Remove variable.
2274         (RGB_MASK): New macro.
2275         (RGB_MAGIC): Likewise.
2276         (LINE_MIN): Likewise.
2277         (LINE_MAX): Likewise.
2278         (FBTEST_STEP): Likewise.
2279         (FBTEST_COUNT): Likewise.
2280         (fb_list): New variable.
2281         (grub_find_video_card): Remove function.
2282         (find_framebuf): New function.
2283         (grub_linux_setup_video): Use find_framebuf to get frame buffer and
2284         line length.
2286         * util/i386/efi/grub-mkimage.c (grub_reloc_section): Fix relocation
2287         problem for x86_64.
2289 2009-02-22  Vesa Jääskeläinen  <chaac@nic.fi>
2291         Patch #25624 by Kevin Lacquement <kevin@lacqui>.
2293         * util/grub-mkconfig.in: Use ${grub_mkdevicemap} instead of hard
2294         coding tool name.
2296 2009-02-22  Robert Millan  <rmh@aybabtu.com>
2298         * include/multiboot.h (MULTIBOOT_INFO_ALIGN): New macro.
2299         * loader/i386/pc/multiboot.c (grub_multiboot): Include the MBI
2300         in our relocation, instead of using it directly from heap.  Also
2301         use `MULTIBOOT_INFO_ALIGN' to ensure it is aligned.
2303 2009-02-21  Robert Millan  <rmh@aybabtu.com>
2305         Implement USB keyboard support (based on patch by Marco Gerards)
2307         * conf/i386-pc.rmk (pkglib_MODULES): Add `usb_keyboard.mod'.
2308         (usb_keyboard_mod_SOURCES, usb_keyboard_mod_CFLAGS)
2309         (usb_keyboard_mod_LDFLAGS): New variables.
2311         * term/usb_keyboard.c: New file.
2313 2009-02-14  Vladimir Serbinenko  <phcoder@gmail.com>
2315         Corrected wrong declaration
2317         * kern/disk.c: corrected declaration of grub_disk_ata_pass_through.
2319 2009-02-14  Christian Franke  <franke@computer.org>
2321         * commands/lspci.c (grub_pci_classes): Add `SATA Controller'.
2322         (grub_lspci_iter): Print class code and programming interface byte.
2324 2009-02-14  Christian Franke  <franke@computer.org>
2326         * gendistlist.sh: Ignore `.svn' directories.
2328 2009-02-14  Felix Zielcke  <fzielcke@z-51.de>
2330         * fs/fat.c: Add 2009 to Copyright line.
2332 2009-02-14  Christian Franke  <franke@computer.org>
2334         * commands/hdparm.c: New file.  Provides `hdparm' command
2335         which sends ATA commands via grub_disk_ata_pass_through ().
2337         * conf/i386-pc.rmk: Add ata_pthru.mod and hdparm.mod.
2339         * disk/ata.c: Include <grub/ata.h>.  Move <grub/misc.h>
2340         and <grub/cpu/io.h> to include/grub/ata.h.
2341         (enum grub_ata_addressing_t): Move to include/grub/ata.h.
2342         (GRUB_CDROM_SECTOR_SIZE): Remove.
2343         (GRUB_ATA_*): Move to include/grub/ata.h.
2344         (GRUB_ATAPI_*): Likewise.
2345         (enum grub_ata_commands): Likewise.
2346         (enum grub_ata_timeout_milliseconds): Likewise.
2347         (struct grub_ata_device): Likewise.
2348         (grub_ata_regset): Likewise.
2349         (grub_ata_regget): Likewise.
2350         (grub_ata_regset2): Likewise.
2351         (grub_ata_regget2): Likewise.
2352         (grub_ata_check_ready): Likewise.
2353         (grub_ata_wait_not_busy): Remove static, exported in
2354         include/grub/ata.h.
2355         (grub_ata_wait_drq): Likewise.
2356         (grub_ata_pio_read): Likewise.
2358         * disk/ata_pthru.c: New file.  Provides grub_ata_pass_through ()
2359         function for hdparm.mod.
2361         * include/grub/ata.h: New file, contains declarations from
2362         disk/ata.c.
2363         (enum grub_ata_commands): Add new commands for commands/hdparm.c.
2365         * include/grub/disk.h (grub_disk_ata_pass_through_parms): New struct.
2366         (grub_disk_ata_pass_through): New exported variable.
2368         * kern/disk.c (grub_disk_ata_pass_through): New variable.
2370 2009-02-13  Colin D Bennett  <colin@gibibit.com>
2372         Support multiple fallback entries, and provide an API to support
2373         executing default+fallback menu entries.  Renamed the `terminal' menu
2374         viewer to `text'.
2376         * include/grub/normal.h (grub_normal_text_menu_viewer): New global
2377         variable declaration.
2378         (grub_menu_execute_callback): New structure declaration.
2379         (grub_menu_execute_callback_t): New typedef.
2380         (grub_menu_execute_with_fallback): New function declaration.
2381         (grub_menu_get_entry): Likewise.
2382         (grub_menu_get_timeout): Likewise.
2383         (grub_menu_set_timeout): Likewise.
2385         * normal/main.c (GRUB_MOD_INIT(normal)): Refer to new variable name.
2387         * normal/menu.c (grub_wait_after_message): Moved to
2388         `normal/menu_text.c'.
2389         (draw_border): Likewise.
2390         (print_message): Likewise.
2391         (print_entry): Likewise.
2392         (print_entries): Likewise.
2393         (grub_menu_init_page): Likewise.
2394         (get_entry_number): Likewise.
2395         (print_timeout): Likewise.
2396         (run_menu): Likewise.
2397         (grub_menu_execute_entry): Likewise.
2398         (show_text_menu): Likewise.
2399         (get_and_remove_first_entry_number): New function.
2400         (grub_menu_execute_with_fallback): Likewise.
2401         (get_entry): Renamed to ...
2402         (grub_menu_get_entry): .. this and made it global.
2403         (get_timeout): Renamed to ...
2404         (grub_menu_get_timeout): ... this and made it global.
2405         (set_timeout): Renamed to ...
2406         (grub_menu_set_timeout): ... this and made it global.
2407         (grub_normal_terminal_menu_viewer): Renamed to ...
2408         (grub_normal_text_menu_viewer): ... this.
2410         * normal/menu_text.c: New file.  Extracted text-menu-specific code
2411         from normal/menu.c.
2413         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add `normal/menu_text.c'.
2414         (normal_mod_SOURCES): Likewise.
2416         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
2417         (normal_mod_SOURCES): Likewise.
2419         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2420         (normal_mod_SOURCES): Likewise.
2422         * conf/i386-pc.rmk, (grub_emu_SOURCES): Likewise.
2423         (normal_mod_SOURCES): Likewise.
2425         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2426         (normal_mod_SOURCES): Likewise.
2428         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2429         (normal_mod_SOURCES): Likewise.
2431         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
2432         (normal_mod_SOURCES): Likewise.
2434 2009-02-11  Robert Millan  <rmh@aybabtu.com>
2436         * util/grub.d/00_header.in: Update old reference to `font' command.
2438 2009-02-10  Felix Zielcke  <fzielcke@z-51.de>
2440         * fs/fat.c (grub_fat_mount): Fix wrong comparison.
2442         Based on patch from Javier Martín.
2444 2009-02-09  Felix Zielcke  <fzielcke@z-51.de>
2446         * conf/common.rmk (grub_probe_SOURCES): Move fs/ext2.c before fs/fat.c
2447         to avoid false positives with FAT.
2448         (grub_fstest_SOURCES): Likewise.
2449         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
2450         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
2451         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2452         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
2453         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2454         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2456 2009-02-09  Felix Zielcke  <fzielcke@z-51.de>
2458         * fs/fat.c (grub_fat_mount): Try to avoid false positives by checking
2459         bpb.version_specific.fat12_or_fat16.fstype and
2460         bpb.version_specific.fat32.fstype.
2462 2009-02-08  Robert Millan  <rmh@aybabtu.com>
2464         * fs/tar.c: Replace "fs/cpio.c" with "cpio.c".
2466 2009-02-08  Robert Millan  <rmh@aybabtu.com>
2468         * Makefile.in (host_os, host_cpu): New variables.
2469         (target_os): Remove.  Update all users.
2471 2009-02-08  Marco Gerards  <marco@gnu.org>
2473         * Makefile.in (enable_grub_emu_usb): New variable.
2474         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/scsi.c'.
2475         (grub_emu_SOURCES) [grub_emu_SOURCES]: Add `disk/usbms.c',
2476         `util/usb.c', `bus/usb/usb.c' and `commands/usbtest.c'.
2477         (grub_emu_LDFLAGS): Add `$(LIBUSB)'.
2478         (pkglib_MODULES): Add `usb.mod', `uhci.mod', `ohci.mod',
2479         `usbtest.mod' and `usbms.mod'.
2480         (usb_mod_SOURCES, usb_mod_CFLAGS, usb_mod_LDFLAGS)
2481         (usbtest_mod_SOURCES, usbtest_mod_CFLAGS, usbtest_mod_LDFLAGS)
2482         (uhci_mod_SOURCES, uhci_mod_CFLAGS, uhci_mod_LDFLAGS,
2483         (ohci_mod_SOURCES, ohci_mod_CFLAGS, ohci_mod_LDFLAGS)
2484         (usbms_mod_SOURCES, usbms_mod_CFLAGS, usbms_mod_LDFLAGS): New
2485         variables.
2487         * disk/usbms.c: New file.
2489         * include/grub/usb.h: Likewise.
2491         * include/grub/usbtrans.h: Likewise.
2493         * include/grub/usbdesc.h: Likewise.
2495         * bus/usb/usbtrans.c: Likewise.
2497         * bus/usb/ohci.c: Likewise.
2499         * bus/usb/uhci.c: Likewise.
2501         * bus/usb/usbhub.c: Likewise.
2503         * bus/usb/usb.c: Likewise.
2505         * commands/usbtest.c: Likewise.
2507         * util/usb.c: Likewise.
2509         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_IO'.
2511         * configure.ac: Test for libusb presence.
2513         * util/grub-emu.c (main) [HAVE_LIBUSB_H]: Call `grub_libusb_init'.
2515 2009-02-08  Vesa Jääskeläinen  <chaac@nic.fi>
2517         * kern/mm.c: Add more comments.
2519 2009-02-08  Robert Millan  <rmh@aybabtu.com>
2521         Patch from Javier Martín.
2522         * fs/ext2.c (EXT2_DRIVER_SUPPORTED_INCOMPAT): Add
2523         `EXT4_FEATURE_INCOMPAT_FLEX_BG'.
2525 2009-02-08  Robert Millan  <rmh@aybabtu.com>
2527         * fs/cpio.c: Split tar functionality to ...
2528         * fs/tar.c: ... here (new file).  Update all users.
2530 2009-02-07  Robert Millan  <rmh@aybabtu.com>
2532         * fs/ext2.c (grub_ext2_mount): Avoid mounting filesystems with
2533         backward-incompatible features.
2535         Based on patch from Javier Martín, with some adjustments.
2537 2009-02-07  Michael Scherer  <misc@mandriva.org>
2539         * fs/hfs.c (grub_hfsplus_iterate_dir): Treat hfs+ as case insensitive.
2541 2009-02-07  Robert Millan  <rmh@aybabtu.com>
2543         * conf/common.rmk (grub_probe_SOURCES, grub_fstest_SOURCES): Move
2544         position of `disk/lvm.c' to ensure grub_init_all() always picks it
2545         after the RAID stuff.
2547 2009-02-05  Vesa Jääskeläinen  <chaac@nic.fi>
2549         Fixes problem when running vbetest command as reported by
2550         Vladimir Serbinenko <phcoder@gmail.com>.
2552         * (grub_vbe_set_video_mode): Fixed problem with text modes.
2554 2009-02-04  Felix Zielcke  <fzielcke@z-51.de>
2556         util/getroot.c (grub_util_get_grub_dev): Add support for /dev/mdNpN and
2557         /dev/md/NpN style mdraid devices.
2559 2009-02-03  Felix Zielcke  <fzielcke@z-51.de>
2561         * util/unifont2pff.rb: Remove.
2563 2009-02-03  Felix Zielcke  <fzielcke@z-51.de>
2565         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add a missing trailing
2566         `#'.
2568 2009-02-03  Felix Zielcke  <fzielcke@z-51.de>
2570         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/menu_viewer.c'.
2571         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
2572         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
2573         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
2574         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2575         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2576         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2578 2009-02-02  Christian Franke  <franke@computer.org>
2580         * lib/hexdump.c (hexdump): Print at most 3 lines if data is identical.
2582 2009-02-01  Felix Zielcke  <fzielcke@z-51.de>
2584         * INSTALL: Note that we now require at least autoconf 2.59 and
2585         that LZO is optional.
2587 2009-02-01  Vesa Jääskeläinen  <chaac@nic.fi>
2589         Base on patch on bug #24154 created by Tomas Tintera
2590         <trosos@seznam.cz>.
2592         * video/i386/pc/vbe.c (grub_video_vbe_scroll): Fix downward scrolling.
2594 2009-02-01  Vesa Jääskeläinen  <chaac@nic.fi>
2596         Based on patch on bug #25318 created by Bernhard Rosenkraenzer
2597         <bero@arklinux.org>.
2599         * normal/parser.y (script_init): Add missing semicolon.
2601 2009-01-31  Colin D Bennett  <colin@gibibit.com>
2603         * normal/main.c: Add include to grub/menu_viewer.h.
2604         (free_menu_entry_classes): Added.
2605         (grub_normal_menu_addentry): Added class property handling.
2606         (grub_normal_execute): Changed to use new menu viewer for menu viewing.
2607         (GRUB_MOD_INIT(normal)): Added register for text based menu viewer.
2609         * normal/menu_viewer.c: New file.
2611         * normal/menu.c (run_menu_entry): Renamed to ...
2612         (grub_menu_execute_entry): ... this and made it as global.
2613         (grub_menu_run): Renamed to ...
2614         (show_text_menu): ... this and made it local.
2615         (show_text_menu): Adapt to new function names.
2616         (grub_normal_terminal_menu_viewer): New global variable.
2618         * include/grub/menu.h: New file.
2620         * include/grub/menu_viewer.h: New file.
2622         * include/grub/normal.h: Added include to grub/menu.h.
2623         (grub_menu_entry): Moved to include/grub/menu.h.
2624         (grub_menu_entry_t): Likewise.
2625         (grub_menu): Likewise.
2626         (grub_menu_t): Likewise.
2627         (grub_normal_terminal_menu_viewer): Added.
2628         (grub_menu_execute_entry): Likewise.
2629         (grub_menu_run): Removed.
2631         * DISTLIST: Added include/grub/menu.h.
2632         Added include/grub/menu_viewer.h.
2633         Added normal/menu_viewer.c.
2635 2009-01-31  Vesa Jääskeläinen  <chaac@nic.fi>
2637         * normal/execute.c (grub_script_execute_menuentry): Changed to use
2638         arglist for menutitle arguments.
2640         * normal/main.c (grub_normal_menu_addentry): Likewise.
2642         * normal/parser.y (menuentry): Likewise.
2644         * normal/script.c (grub_script_create_cmdmenu): Likewise.
2646         * include/grub/script.h (grub_script_cmd_menuentry): Likewise.
2647         (grub_script_create_cmdmenu): Likewise.
2649         * include/grub/normal.h (grub_normal_menu_addentry): Likewise.
2651         * conf/i386-pc.rmk (normal_mod_SOURCES): Adapt Colin D Bennett's
2652         changes.
2654         * conf/x86_64-efi.rmk (normal_mod_SOURCES): Likewise.
2656         * conf/i386-coreboot.rmk (normal_mod_SOURCES): Likewise.
2658         * conf/i386-efi.rmk (normal_mod_SOURCES): Likewise.
2660         * conf/i386-ieee1275.rmk (normal_mod_SOURCES): Likewise.
2662         * conf/powerpc-ieee1275.rmk (normal_mod_SOURCES): Likewise.
2664         * conf/sparc64-ieee1275.rmk (normal_mod_SOURCES): Likewise.
2666 2009-01-30  Christian Franke  <franke@computer.org>
2668         * normal/arg.c (grub_arg_show_help): Add indentation if '\n' appears
2669         in option help text.
2671 2009-01-27  Pavel Roskin  <proski@gnu.org>
2673         * disk/fs_uuid.c (search_fs_uuid): Ignore case of the UUID.
2675 2009-01-27  Vesa Jääskeläinen  <chaac@nic.fi>
2677         * commands/lsmmap.c: Add include to grub/machine/memory.h.
2679         * fs/i386/pc/pxe.c (grub_pxefs_open): Fix sign problem.
2681         * term/i386/pc/at_keyboard.c (GRUB_MOD_FINI(at_keyboard)): Use proper
2682         unregister function.
2684 2009-01-27  Vesa Jääskeläinen  <chaac@nic.fi>
2686         * disk/scsi.c (grub_scsi_read): Fix sign problem.
2688         * term/i386/pc/vga_text.c (grub_vga_text_init_fini). Fix declaration.
2690         * util/grub-mkfont.c (usage): Fix typo.
2692         * util/elf/grub-mkimage.c (load_modules): Fix warning.
2694 2009-01-26  Daniel Mierswa  <impulze@impulze.org>
2696         * fs/fat.c (grub_fat_uuid): Fix shift of the first two bytes.
2698         * commands/search.c (search_fs_uuid): Ignore case of the UUID.
2700         * kern/misc.c (grub_strcasecmp): New function.
2701         (grub_strcasecmp): Use grub_size_t instead of int for length.
2702         Fix return value.
2703         * include/grub/misc.h: Update function prototypes.
2705 2009-01-26  Robert Millan  <rmh@aybabtu.com>
2707         * configure.ac: Fix cross-compilation check.
2709 2009-01-22  Christian Franke  <franke@computer.org>
2711         * kern/misc.c (grub_vsprintf): Fix size and termination of `format2'
2712         (precision) digit string.  Allow `.format2' without `format1' (width).
2713         Limit input chars for `%s' output to `format2' if specified.  This is
2714         compatible with standard printf ().
2716 2009-01-22  Christian Franke  <franke@computer.org>
2718         * disk/ata.c (grub_ata_wait_status): Replace by ...
2719         (grub_ata_wait_not_busy): ... this function.  Checks only BSY bit,
2720         other status bits may be invalid while BSY is asserted.
2721         (grub_ata_check_ready): New function.
2722         (grub_ata_cmd): Removed.
2723         (grub_ata_wait_drq): New function.
2724         (grub_ata_strncpy): Remove inline.
2725         (grub_ata_pio_read): Reduce to actual block transfer.  BSY wait
2726         and error check now done by grub_ata_wait_drq ().
2727         (grub_ata_pio_write): Likewise.
2728         (grub_atapi_identify): Set DEV before check for !BSY.  Use
2729         grub_ata_wait_drq () to wait for data.
2730         (grub_ata_device_initialize): Add status register check to
2731         detect missing SATA slave devices.  Add debug messages.
2732         (grub_atapi_wait_drq): Use grub_ata_wait_not_busy ().
2733         (grub_atapi_packet): Set DEV before check for !BSY.  Replace
2734         transfer loop by grub_ata_pio_write ().
2735         (grub_ata_identify): Set DEV before check for !BSY. Use
2736         grub_ata_wait_drq () to wait for data.
2737         (grub_ata_setaddress): Set DEV before check for !BSY.
2738         (grub_ata_readwrite): Remove duplicate code, handle batch/rest and
2739         read/write in one loop.  Fix invalid command on write.  Fix incomplete
2740         command on (size % batch) == 0.  Add missing error check after write of
2741         last block.  Add debug messages.
2742         (grub_atapi_read):  Replace transfer loop by grub_ata_pio_read ().
2744 2009-01-19  Christian Franke  <franke@computer.org>
2746         * disk/ata.c (GRUB_ATAPI_REG_*): New defines.
2747         (GRUB_ATAPI_IREASON_*): Likewise.
2748         (grub_ata_pio_write): Fix timeout error return.
2749         (grub_atapi_identify): Add grub_ata_wait () after cmd.
2750         (grub_atapi_wait_drq): New function.
2751         (grub_atapi_packet): New parameter `size'.
2752         Use grub_atapi_wait_drq () and direct write instead of
2753         grub_ata_pio_write ().
2754         (grub_atapi_read): Replace grub_ata_pio_read () by a loop which
2755         reads the number of bytes requested by the device for each DRQ
2756         assertion.
2757         (grub_atapi_write): Remove old implementation, return not
2758         implemented instead.
2760 2009-01-19  Christian Franke  <franke@computer.org>
2762         * disk/scsi.c (grub_scsi_read10): Use scsi->blocksize instead
2763         of 512 to calculate data size.
2764         (grub_scsi_read12): Likewise.
2765         (grub_scsi_write10): Likewise.
2766         (grub_scsi_write12): Likewise.
2767         (grub_scsi_read): Adjust size according to blocksize.
2768         Add checks for invalid blocksize and unaligned transfer.
2770 2009-01-19  Vesa Jääskeläinen  <chaac@nic.fi>
2772         * font/font.c (grub_font_loader_init): Re-position unknown glyph.
2774         * term/gfxterm.c (write_char): Fix background rendering for wide
2775         width glyphs.
2777 2009-01-19  Robert Millan  <rmh@aybabtu.com>
2779         * config.guess: Update to latest version from config git.
2780         * config.sub: Likewise.
2782 2009-01-17  Felix Zielcke  <fzielcke@z-51.de>
2784         * Makefile.in: Change font compilation to use new grub-mkfont instead
2785         of java version.
2787         * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: Remove.
2788         * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
2789         * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
2790         * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
2791         * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
2792         * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
2793         * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
2794         * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
2795         * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
2797 2009-01-16  Christian Franke  <franke@computer.org>
2799         * disk/ata.c (enum grub_ata_commands): Remove EXEC_DEV_DIAGNOSTICS.
2800         (enum grub_ata_timeout_milliseconds): New enum.
2801         (grub_ata_wait_status): Add parameter milliseconds.
2802         (grub_ata_cmd): Remove variable `err'.  Remove wait for !DRQ to allow
2803         recovery from timed-out commands.
2804         (grub_ata_pio_read): Add parameter milliseconds.  Fix error return,
2805         return grub_errno instead of REG_ERROR.
2806         (grub_ata_pio_write): Add parameter milliseconds.
2807         (grub_atapi_identify): Fix size of ATAPI IDENTIFY sector.
2808         Pass milliseconds to grub_ata_wait_status () and
2809         grub_ata_pio_read ().
2810         (grub_atapi_packet): Pass milliseconds to grub_ata_pio_write ().
2811         (grub_ata_identify): Remove variable `ataerr'.  Pass milliseconds to
2812         grub_ata_wait_status ().  Fix IDENTIFY timeout check.
2813         (grub_ata_device_initialize): Remove EXECUTE DEVICE DIAGNOSTICS.
2814         It is not suitable for device detection, because DEV bit is ignored,
2815         the command may run too long, and not all devices set the signature
2816         properly.
2817         (grub_ata_pciinit): Clear grub_errno before grub_ata_device_initialize ().
2818         (grub_ata_setaddress): Pass milliseconds to grub_ata_wait_status ().
2819         Fix device selection, DEV bit must be set first to address the registers
2820         of the correct device.
2821         (grub_ata_readwrite): Pass milliseconds to grub_ata_wait_status () and
2822         grub_ata_pio_read/write ().
2823         (grub_atapi_read): Pass milliseconds to grub_ata_pio_read ().
2824         (grub_atapi_write): Pass milliseconds to grub_ata_pio_write ().
2826 2009-01-13  Carles Pina i Estany  <carles@pina.cat>
2828         * util/grub-editenv.c (main): Use fseeko(), not fseek().
2830 2009-01-13  Bean  <bean123ch@gmail.com>
2832         * util/grub-mkfont.c (write_font): forget to remove some debug code.
2834 2009-01-13  Bean  <bean123ch@gmail.com>
2836         * Makefile.in: (enable_grub_mkfont): New variable.
2837         (freetype_cflags): Likewise.
2838         (freetype_libs): Likewise.
2840         * common.rmk (bin_UTILITIES): Add `grub-mkfont' if requested.
2841         (grub_mkfont_SOURCES): New variable.
2842         (grub_mkfont_CFLAGS): Likewise.
2843         (grub_mkfont_LDFLAGS): Likewise.
2845         * configure.ac (--enable-grub-mkfont): New option. Check for freetype2
2846         library if `--enable-grub-mkfont' is requested.
2847         (enable_grub_mkfont): New variable.
2848         (freetype_cflags): Likewise.
2849         (freetype_libs): Likewise.
2851         * util/grub-mkfont.c: New file.
2853 2009-01-12  Christian Franke  <franke@computer.org>
2855         * disk/ata.c (grub_ata_pciinit): Fix bit numbers of compatibility
2856         mode check.  Fix setting of compat_use[].
2858 2009-01-10  Robert Millan  <rmh@aybabtu.com>
2860         Update a few copyright years which we forgot to do in 2008 (only for
2861         files whose changes made in 2008 were copyright-significant)
2863         * Makefile.in: Add 2008 to Copyright line.
2864         * disk/ieee1275/ofdisk.c: Likewise.
2865         * disk/efi/efidisk.c: Likewise.
2866         * kern/dl.c: Likewise.
2867         * kern/sparc64/ieee1275/init.c: Likewise.
2868         * kern/mm.c: Likewise.
2869         * kern/efi/mm.c: Likewise.
2870         * boot/i386/pc/boot.S: Likewise.
2871         * genfslist.sh: Likewise.
2872         * fs/iso9660.c: Likewise.
2873         * fs/hfs.c: Likewise.
2874         * fs/jfs.c: Likewise.
2875         * fs/minix.c: Likewise.
2876         * fs/ufs.c: Likewise.
2877         * gensymlist.sh.in: Likewise.
2878         * genkernsyms.sh.in: Likewise.
2879         * include/grub/misc.h: Likewise.
2880         * include/grub/types.h: Likewise.
2881         * include/grub/symbol.h: Likewise.
2882         * include/grub/elf.h: Likewise.
2883         * include/grub/kernel.h: Likewise.
2884         * include/grub/disk.h: Likewise.
2885         * include/grub/dl.h: Likewise.
2886         * include/grub/i386/linux.h: Likewise.
2887         * include/grub/i386/pc/biosdisk.h: Likewise.
2888         * include/grub/efi/api.h: Likewise.
2889         * include/grub/efi/pe32.h: Likewise.
2890         * include/grub/util/misc.h: Likewise.
2891         * normal/execute.c: Likewise.
2892         * normal/arg.c: Likewise.
2893         * normal/completion.c: Likewise.
2894         * normal/lexer.c: Likewise.
2895         * normal/parser.y: Likewise.
2896         * normal/misc.c: Likewise.
2897         * commands/i386/pc/vbeinfo.c: Likewise.
2898         * commands/hexdump.c: Likewise.
2899         * commands/terminal.c: Likewise.
2900         * commands/ls.c: Likewise.
2901         * commands/help.c: Likewise.
2902         * partmap/pc.c: Likewise.
2903         * loader/efi/chainloader.c: Likewise.
2904         * loader/multiboot_loader.c: Likewise.
2905         * loader/i386/pc/multiboot2.c: Likewise.
2906         * term/efi/console.c: Likewise.
2907         * term/i386/pc/serial.c: Likewise.
2908         * util/lvm.c: Likewise.
2909         * util/console.c: Likewise.
2910         * util/i386/efi/grub-mkimage.c: Likewise.
2911         * util/raid.c: Likewise.
2913 2009-01-06  Vesa Jääskeläinen  <chaac@nic.fi>
2915         * commands/videotest.c: Removed include to grub/machine/memory.h.
2917         * conf/i386-pc.rmk (pkglib_MODULES): Removed video.mod, gfxterm.mod,
2918         videotest.mod, bitmap.mod, tga.mod, jpeg.mod, png.mod.
2919         (video_mod_SOURCES): Removed.
2920         (video_mod_CFLAGS): Likewise.
2921         (video_mod_LDFLAGS): Likewise.
2922         (gfxterm_mod_SOURCES): Likewise.
2923         (gfxterm_mod_CFLAGS): Likewise.
2924         (gfxterm_mod_LDFLAGS): Likewise.
2925         (videotest_mod_SOURCES): Likewise.
2926         (videotest_mod_CFLAGS): Likewise.
2927         (videotest_mod_LDFLAGS): Likewise.
2928         (bitmap_mod_SOURCES): Likewise.
2929         (bitmap_mod_CFLAGS): Likewise.
2930         (bitmap_mod_LDFLAGS): Likewise.
2931         (tga_mod_SOURCES): Likewise.
2932         (tga_mod_CFLAGS): Likewise.
2933         (tga_mod_LDFLAGS): Likewise.
2934         (jpeg_mod_SOURCES): Likewise.
2935         (jpeg_mod_CFLAGS): Likewise.
2936         (jpeg_mod_LDFLAGS): Likewise.
2937         (png_mod_SOURCES): Likewise.
2938         (png_mod_CFLAGS): Likewise.
2939         (png_mod_LDFLAGS): Likewise.
2941         * conf/common.rmk (pkglib_MODULES): Added video.mod, videotest.mod,
2942         bitmap.mod, tga.mod, jpeg.mod, png.mod, font.mod, gfxterm.mod
2943         (video_mod_SOURCES): Added.
2944         (video_mod_CFLAGS): Likewise.
2945         (video_mod_LDFLAGS): Likewise.
2946         (videotest_mod_SOURCES): Likewise.
2947         (videotest_mod_CFLAGS): Likewise.
2948         (videotest_mod_LDFLAGS): Likewise.
2949         (bitmap_mod_SOURCES): Likewise.
2950         (bitmap_mod_CFLAGS): Likewise.
2951         (bitmap_mod_LDFLAGS): Likewise.
2952         (tga_mod_SOURCES): Likewise.
2953         (tga_mod_CFLAGS): Likewise.
2954         (tga_mod_LDFLAGS): Likewise.
2955         (jpeg_mod_SOURCES): Likewise.
2956         (jpeg_mod_CFLAGS): Likewise.
2957         (jpeg_mod_LDFLAGS): Likewise.
2958         (png_mod_SOURCES): Likewise.
2959         (png_mod_CFLAGS): Likewise.
2960         (png_mod_LDFLAGS): Likewise.
2961         (gfxterm_mod_SOURCES): Likewise.
2962         (gfxterm_mod_CFLAGS): Likewise.
2963         (gfxterm_mod_LDFLAGS): Likewise.
2965         * term/gfxterm.c: Removed include to grub/machine/memory.h,
2966         grub/machine/console.h.
2968 2009-01-04  Jerone Young  <jerone@gmail.com>
2970         Make on screen instructions clearer
2972         Based on patch created by Jidanni <jidanni@jidanni.org>
2974         * normal/menu.c: print clearer instructions on the screen
2976 2009-01-02  Colin D Bennett  <colin@gibibit.com>
2978         New font engine.
2980         Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to
2981         build system and fixed gfxterm.c to work with different sized fonts.
2983         * configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF.
2985         * configure: Re-generated.
2987         * DISTLIST: Removed font/manager.c.
2988         Added font/font.c.
2989         Added font/font_cmd.c.
2991         * Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF.  Added Font tool
2992         compilation.
2994         * include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype.  Changed users.
2996         * kern/misc.c (grub_utf8_to_ucs4): Changed prototype.
2998         * kern/term.c: Changed users of grub_utf8_to_ucs4.
3000         * normal/menu.c: Likewise.
3002         * conf/common.rmk (font_mod_SOURCES): Removed font/manager.c.
3003         (font_mod_SOURCES): Added font/font_cmd.c, font/font.c.
3005         * include/grub/font.h: Replaced with new file.
3007         * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value.
3008         (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise.
3009         (GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise.
3010         (GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added.
3011         (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED.
3012         (grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha,
3013         fg_red, fg_green, fg_blue, fg_alpha.
3014         (grub_video_adapter): Removed blit_glyph.
3015         (grub_video_blit_glyph): Removed.
3017         * font/manager.c: Removed file.
3019         * font/font.c: New file.
3021         * font/font_cmd.c: Likewise.
3023         * video/video.c (grub_video_blit_glyph): Removed.
3025         * video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support.
3026         (grub_video_vbe_map_rgba): Likewise.
3027         (grub_video_vbe_unmap_color_int): Likewise.
3028         (grub_video_vbe_blit_glyph): Removed.
3029         (grub_video_vbe_adapter): Removed blit_glyph.
3031         * video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support.
3032         (get_pixel): Likewise.
3033         (set_pixel): Likewise.
3035         * commands/videotest.c (grub_cmd_videotest): Added more tests for fonts.
3037         * term/gfxterm.c: Adapted to new font engine.
3039         * term/i386/pc/vesafb.c: Marked as deprecated.  Made it compile.
3041         * term/i386/pc/vga.c: Likewise.
3043         * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file.
3045         * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
3047         * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
3049         * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
3051         * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
3053         * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
3055         * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
3057         * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
3059         * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
3061         * util/grub.d/00_header.in: Changed to use new loadfont command.
3063         * util/grub-mkconfig_lib.in: Changed font extension.
3065 2008-12-28  Felix Zielcke  <fzielcke@z-51.de>
3067         * util/getroot.c (grub_util_get_grub_dev): Add support for
3068         /dev/md/dNNpNN style partitionable mdraid devices.
3070 2008-12-12  Alex Smith  <alex@alex-smith.me.uk>
3072         * fs/i386/pc/pxe.c (grub_pxefs_open): Handle the one open connection
3073         at a time limit of the PXE TFTP API correctly.
3074         (grub_pxefs_close): Likewise.
3076 2008-11-29  Robert Millan  <rmh@aybabtu.com>
3078         * disk/ata.c (grub_ata_pciinit): Handle errors raised by
3079         grub_ata_device_initialize() calls.
3081 2008-11-28  Krzysztof Smiechowicz  <deadwood@wp.pl>
3083         * fs/affs.c (grub_affs_iterate_dir): Return failure when directory
3084         iteration failed.
3085         * fs/sfs.c (grub_sfs_iterate_dir): Likewise.
3087 2008-11-28  Robert Millan  <rmh@aybabtu.com>
3089         Fix build on powerpc-ieee1275.  Based on patch created by
3090         Manoel Abranches <mrabran@linux.vnet.ibm.com>.
3091         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
3092         `kern/ieee1275/mmap.c'.
3093         * include/grub/powerpc/ieee1275/memory.h: New file.
3095         Provide grub-install on coreboot.
3096         * conf/i386-coreboot.rmk (sbin_SCRIPTS): Add `grub-install'.
3097         (grub_install_SOURCES): New variable.
3098         * util/i386/pc/grub-install.in: Add a few condition checks to make it
3099         usable on coreboot.
3101 2008-11-25  Felix Zielcke  <fzielcke@z-51.de>
3103         * util/grub-fstest.c (grub_term_get_current_input): Change return type
3104         to `grub_term_input_t'.
3105         (grub_term_get_current_output): Change return type to
3106         `grub_term_output_t'.
3108 2008-11-22  Robert Millan  <rmh@aybabtu.com>
3110         Fix breakage on coreboot due to declaration mismatch.
3111         * term/i386/pc/vga_text.c (grub_vga_text_init_fini): New function.
3112         (grub_vga_text_term): Use grub_vga_text_init_fini() instead of
3113         grub_vga_text_cls().
3115         * kern/i386/loader.S (grub_multiboot_backward_relocator): Improve
3116         comments.  Avoid copying one more byte than necessary (just in case).
3118         * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Change link address
3119         to 0x200000 (avoids trouble with some OFW implementations, and matches
3120         with the one in Yaboot).
3121         Reported by Manoel Abranches
3123 2008-11-20  Robert Millan  <rmh@aybabtu.com>
3125         * kern/i386/coreboot/init.c (grub_time_tics): Remove variable.
3126         (grub_get_rtc, grub_exit): Abort with grub_fatal() if called.
3128         * util/grub-mkconfig_lib.in (grub_warn): New function.
3129         (convert_system_path_to_grub_path): Use grub_warn() when issuing
3130         warnings, to obtain consistent formatting.
3131         * util/grub.d/00_header.in: Likewise.
3132         * util/update-grub_lib.in: Likewise.
3134         * loader/i386/linux.c (allocate_pages): Fix a warning.
3135         Move comment text to `#error' stanza.
3137         Harmonize ieee1275's grub_available_iterate() with the generic
3138         grub_machine_mmap_iterate() interface (fixes a recently-introduced
3139         build problem on i386-ieee1275):
3140         * kern/ieee1275/openfw.c (grub_available_iterate): Moved from here ...
3141         * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): ... here.  Add third
3142         parameter `type'.  Update all users of this function.
3143         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
3144         `kern/ieee1275/mmap.c'.
3145         * kern/ieee1275/init.c
3146         * include/grub/ieee1275/ieee1275.h (grub_available_iterate): Replace
3147         with ...
3148         (grub_machine_mmap_iterate): ... this.
3149         * include/grub/i386/pc/memory.h (grub_machine_mmap_iterate): Change
3150         return type to `grub_err_t'.  Update all implementations of this
3151         function prototype.
3152         * include/grub/i386/coreboot/memory.h (grub_machine_mmap_iterate):
3153         Likewise.
3155         Add `lsmmap' command (lists firmware-provided memory map):
3156         * commands/lsmmap.c: New file.
3157         * conf/i386-pc.rmk (pkglib_MODULES): Add `lsmmap.mod'.
3158         (lsmmap_mod_SOURCES, lsmmap_mod_CFLAGS, lsmmap_mod_LDFLAGS): New
3159         variables.
3160         * conf/powerpc-ieee1275.rmk: Likewise.
3161         * conf/i386-coreboot.rmk: Likewise.
3162         * conf/i386-ieee1275.rmk: Likewise.
3164 2008-11-19  Robert Millan  <rmh@aybabtu.com>
3166         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Fix a typo.
3167         * loader/i386/linux.c (grub_rescue_cmd_initrd): Implement a few needed
3168         constraints to initrd allocation (based on code from
3169         loader/i386/pc/linux.c).  Without them, initrd was allocated too high
3170         for Linux to find it.
3172 2008-11-14  Robert Millan  <rmh@aybabtu.com>
3174         * fs/cpio.c (grub_cpio_open): Compare `name' and `fn' by hand in
3175         order to cope with duplicate slashes.
3177 2008-11-14  Robert Millan  <rmh@aybabtu.com>
3179         * include/grub/i386/coreboot/memory.h (GRUB_MEMORY_MACHINE_LOWER_SIZE):
3180         Redefine to match with GRUB_MEMORY_MACHINE_UPPER_START (0x100000).  We
3181         don't want to mess with lower memory, because it is used in the Linux
3182         loader.
3184         * loader/i386/linux.c (allocate_pages): Allocate `real_mode_mem' in
3185         an appropriate place in lower memory, between 0x10000 and 0x90000,
3186         like loader/i386/efi/linux.c does.  Linux often panics if real_mode_mem
3187         is in our heap (probably as a result of it being corrupted during
3188         decompression).  Add #error instance with comment to explain why this
3189         loader isn't currently usable on PC/BIOS.
3191 2008-11-14  Robert Millan  <rmh@aybabtu.com>
3193         * term/i386/pc/serial.c [! GRUB_MACHINE_PCBIOS]
3194         (GRUB_SERIAL_PORT_NUM): Fix miscalculation.
3196 2008-11-12  Robert Millan  <rmh@aybabtu.com>
3198         Make loader/i386/linux.c buildable on i386-pc (although disabled).
3200         * include/grub/i386/pc/init.h: Include `<grub/machine/memory.h>'.
3201         (struct grub_machine_mmap_entry, grub_machine_mmap_iterate): Move
3202         from here ...
3203         * include/grub/i386/pc/memory.h: ... to here.
3205 2008-11-12  Robert Millan  <rmh@aybabtu.com>
3207         Fix build problems on i386-ieee1275 and *-efi (introduced by vga_text
3208         split).
3210         * include/grub/i386/pc/console.h: Include `<grub/i386/vga_common.h>'.
3211         (grub_console_cur_color, grub_console_real_putchar)
3212         (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
3213         (grub_console_setcolorstate, grub_console_setcolor)
3214         (grub_console_getcolor): Move from here ...
3215         * include/grub/i386/vga_common.h: ... to here (new file).
3217         * term/i386/pc/vga_text.c: Replace `<grub/machine/console.h>' with
3218         `<grub/i386/vga_common.h>' and `<grub/cpu/io.h>' with
3219         `<grub/i386/io.h>'.
3220         * term/i386/vga_common.c: Replace `<grub/machine/console.h>' with
3221         `<grub/i386/vga_common.h>'.
3223 2008-11-12  Robert Millan  <rmh@aybabtu.com>
3225         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `term/i386/vga_common.c'.
3226         * conf/i386.rmk (pkglib_MODULES): Add `vga_text.mod'.
3227         (vga_text_mod_SOURCES, vga_text_mod_CFLAGS, vga_text_mod_LDFLAGS): New
3228         variables.
3229         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
3230         `term/i386/pc/console.c' with `term/i386/vga_common.c'.
3232         * kern/i386/coreboot/init.c (grub_machine_init): Replace call to
3233         grub_console_init() with call to grub_vga_text_init().
3234         (grub_machine_fini): Replace call to
3235         grub_console_fini() with call to grub_vga_text_fini() and
3236         grub_at_keyboard_fini().
3238         * include/grub/i386/pc/console.h: Include `<grub/term.h>'.
3239         (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
3240         (grub_console_setcolorstate, grub_console_setcolor)
3241         (grub_console_getcolor): New function prototypes.
3243         * term/i386/pc/vga_text.c: Include `<grub/dl.h>'.
3244         (grub_vga_text_getxy, grub_vga_text_gotoxy, grub_vga_text_cls)
3245         (grub_vga_text_setcursor): Static-ize.
3246         (grub_vga_text_term): New structure.
3247         (GRUB_MOD_INIT(vga_text), GRUB_MOD_FINI(vga_text)): New functions.
3249         * term/i386/pc/console.c: Remove `<grub/machine/machine.h>'.
3250         (grub_console_cur_color, grub_console_standard_color)
3251         (grub_console_normal_color, grub_console_highlight_color)
3252         (map_char, grub_console_putchar, grub_console_getcharwidth)
3253         (grub_console_getwh, grub_console_setcolorstate, grub_console_setcolor)
3254         (grub_console_getcolor): Move from here ...
3255         * term/i386/vga_common.c: ... to here (same function names).
3257 2008-11-12  Robert Millan  <rmh@aybabtu.com>
3259         Use newly-added Multiboot support in coreboot.
3261         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
3262         `kern/i386/coreboot/mmap.c' with `kern/i386/multiboot_mmap.c'.
3264         * kern/i386/coreboot/startup.S: Enable Multiboot header, fix its
3265         alignment, set `MULTIBOOT_MEMORY_INFO' flag.
3266         (codestart): Store the MBI in `startup_multiboot_info' when we're
3267         being loaded using Multiboot.
3269         * kern/i386/coreboot/init.c (grub_machine_init): Move
3270         grub_at_keyboard_init() call to beginning of function (useful for
3271         debugging).  Call grub_machine_mmap_init() before attempting to use
3272         grub_machine_mmap_iterate().
3273         (grub_lower_mem, grub_upper_mem): Move from here ...
3274         * kern/i386/multiboot_mmap.c (grub_lower_mem, grub_upper_mem): ... to
3275         here (new file).
3277         * include/grub/i386/coreboot/memory.h (grub_machine_mmap_init): New
3278         function prototype.
3280 2008-11-12  Robert Millan  <rmh@aybabtu.com>
3282         Fix a regression introduced by the at_keyboard.mod split.  Because
3283         some terminals are default on some platforms and non-default on
3284         others, the first terminal being registered determines which is
3285         going to be default.
3287         * kern/term.c (grub_term_register_input): If this is the first
3288         terminal being registered, set it as the current one.
3289         (grub_term_register_output): Likewise.
3291         * term/efi/console.c (grub_console_init): Do not call
3292         grub_term_set_current_output() or grub_term_set_current_input().
3293         * term/ieee1275/ofconsole.c (grub_console_init): Likewise.
3294         * term/i386/pc/console.c (grub_console_init): Likewise.
3295         (grub_console_fini): Do not call grub_term_set_current_input()
3296         (but leave grub_term_set_current_output() to restore text mode).
3298 2008-11-10  Robert Millan  <rmh@aybabtu.com>
3300         * util/grub.d/00_header.in: Add backward compatibility check for
3301         versions of terminal.mod that don't understand `terminal_input' or
3302         `terminal_output'.
3304 2008-11-09  Robert Millan  <rmh@aybabtu.com>
3306         * commands/terminal.c (GRUB_MOD_FINI(terminal)): Unregister
3307         `terminal_input' / `terminal_output', not `terminal'.
3309 2008-11-08  Robert Millan  <rmh@aybabtu.com>
3311         * Makefile.in (include_DATA): Fix srcdir=. assumption.
3312         (DISTCLEANFILES): Add `build_env.mk'.
3314 2008-11-08  Robert Millan  <rmh@aybabtu.com>
3316         * term/i386/pc/vesafb.c (grub_vesafb_term): Change type to
3317         `struct grub_term_output'.  Remove `.checkkey' and `.getkey'
3318         members.  Update all users.
3319         * util/console.c (grub_ncurses_term): Split in ...
3320         (grub_ncurses_term_input): ... this, and ...
3321         (grub_ncurses_term_output): ... this.  Update all users.
3322         * term/ieee1275/ofconsole.c: Remove stale `#endif'.
3324 2008-11-08  Robert Millan  <rmh@aybabtu.com>
3326         * Makefile.in (PKGLIB): Add $(pkglib_BUILDDIR).
3327         (PKGDATA): Add $(pkgdata_SRCDIR).
3328         (pkglib_BUILDDIR): New variable.
3329         (pkgdata_SRCDIR): New variable.
3330         (build_env.mk): New target.
3331         (include_DATA): New variable.
3332         (install-local): Install $(include_DATA) files in $(includedir).
3334 2008-11-07  Pavel Roskin  <proski@gnu.org>
3336         * gendistlist.sh: Use C locale for sorting to ensure consistent
3337         output on all systems.
3339         * util/grub.d/00_header.in: Remove incorrect space before
3340         "serial".
3342 2008-11-07  Robert Millan  <rmh@aybabtu.com>
3344         * include/multiboot2.h (struct multiboot_header): Add `flags' member as
3345         per specification.
3346         * loader/multiboot2.c (grub_multiboot2): Fix Multiboot2 header check.
3347         * loader/multiboot_loader.c (find_multi_boot2_header): New function
3348         (based on find_multi_boot1_header).
3349         (grub_rescue_cmd_multiboot_loader): Check for Multiboot2 header,
3350         using find_multi_boot2_header(), and abort if neither Multiboot or
3351         Multiboot headers were found.
3353 2008-11-07  Robert Millan  <rmh@aybabtu.com>
3355         Modularize at_keyboard.mod:
3357         * conf/i386.rmk (pkglib_MODULES): Add `at_keyboard.mod'.
3358         (at_keyboard_mod_SOURCES, at_keyboard_mod_CFLAGS)
3359         (at_keyboard_mod_LDFLAGS): New variables.
3361         Actual terminal split:
3363         * include/grub/term.h (struct grub_term): Split in ...
3364         (struct grub_term_input): ... this, and ...
3365         (struct grub_term_output): ... this.  Update all users.
3366         (grub_term_set_current): Split in ...
3367         (grub_term_set_current_input): ... this, and ...
3368         (grub_term_set_current_output): ... this.
3369         (grub_term_get_current): Split in ...
3370         (grub_term_get_current_input): ... this, and ...
3371         (grub_term_get_current_output): ... this.
3372         (grub_term_register): Split in ...
3373         (grub_term_register_input): ... this, and ...
3374         (grub_term_register_output): ... this.
3375         (grub_term_unregister): Split in ...
3376         (grub_term_unregister_input): ... this, and ...
3377         (grub_term_unregister_output): ... this.
3378         (grub_term_iterate): Split in ...
3379         (grub_term_iterate_input): ... this, and ...
3380         (grub_term_iterate_output): ... this.
3382         * kern/term.c (grub_term_list): Split in ...
3383         (grub_term_list_input): ... this, and ...
3384         (grub_term_list_output): ... this.  Update all users.
3385         (grub_cur_term): Split in ...
3386         (grub_cur_term_input): ... this, and ...
3387         (grub_cur_term_output): ... this.  Update all users.
3388         (grub_term_set_current): Split in ...
3389         (grub_term_set_current_input): ... this, and ...
3390         (grub_term_set_current_output): ... this.
3391         (grub_term_get_current): Split in ...
3392         (grub_term_get_current_input): ... this, and ...
3393         (grub_term_get_current_output): ... this.
3394         (grub_term_register): Split in ...
3395         (grub_term_register_input): ... this, and ...
3396         (grub_term_register_output): ... this.
3397         (grub_term_unregister): Split in ...
3398         (grub_term_unregister_input): ... this, and ...
3399         (grub_term_unregister_output): ... this.
3400         (grub_term_iterate): Split in ...
3401         (grub_term_iterate_input): ... this, and ...
3402         (grub_term_iterate_output): ... this.
3404         * kern/misc.c (grub_abort): Split use of grub_term_get_current() into
3405         a check for input and one for output (and only attempt to get keys
3406         from user when input works).
3408         * util/grub-probe.c (grub_term_get_current): Split in ...
3409         (grub_term_get_current_input): ... this, and ...
3410         (grub_term_get_current_output): ... this.
3411         * util/grub-fstest.c: Likewise.
3412         * util/i386/pc/grub-setup.c: Likewise.
3413         * util/grub-editenv.c: Likewise.
3415         Portability adjustments:
3417         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Remove
3418         `term/i386/pc/at_keyboard.c'.
3419         * kern/ieee1275/init.c [__i386__] (grub_machine_init): Remove call to
3420         grub_keyboard_controller_init() (now handled by terminal .init).
3421         * kern/i386/coreboot/init.c (grub_machine_init): Add call to
3422         grub_at_keyboard_init().
3423         * include/grub/i386/ieee1275/console.h (grub_keyboard_controller_init)
3424         (grub_console_checkkey, grub_console_getkey): Remove (now provided by
3425         at_keyboard.mod via input terminal interface).
3426         * include/grub/i386/coreboot/console.h: Convert into a stub for
3427         `<grub/i386/pc/console.h>'.
3429         Migrate full terminals to new API:
3431         * term/efi/console.c (grub_console_term): Split into ...
3432         (grub_console_term_input): ... this, and ...
3433         (grub_console_term_output): ... this.  Update all users.
3434         * term/ieee1275/ofconsole.c: Remove __i386__ hack.
3435         (grub_ofconsole_init): Split into ...
3436         (grub_ofconsole_init_input): ... this, and ...
3437         (grub_ofconsole_init_output): ... this.
3438         (grub_ofconsole_term): Split into ...
3439         (grub_ofconsole_term_input): ... this, and ...
3440         (grub_ofconsole_term_output): ... this.  Update all users.
3441         * term/i386/pc/serial.c (grub_serial_term): Split into ...
3442         (grub_serial_term_input): ... this, and ...
3443         (grub_serial_term_output): ... this.  Update all users.
3444         * term/i386/pc/console.c (grub_console_term): Split into ...
3445         (grub_console_term_input): ... this, and ...
3446         (grub_console_term_output): ... this.  Update all users.
3447         (grub_console_term_input): Only enable it on PC/BIOS platform.
3448         (grub_console_init): Remove grub_keyboard_controller_init() call.
3450         Migrate input terminals to new API:
3452         * term/i386/pc/at_keyboard.c: Replace `cpu' and `machine' with
3453         `i386' and `i386/pc' to enable build on x86_64 (this driver is
3454         i386-specific anyway).
3455         (grub_console_checkkey): Rename to ...
3456         (grub_at_keyboard_checkkey): ... this.  Static-ize.  Update all
3457         users.
3458         (grub_keyboard_controller_orig): New variable.
3459         (grub_console_getkey): Rename to ...
3460         (grub_at_keyboard_getkey): ... this.  Static-ize.  Update all
3461         users.
3462         (grub_keyboard_controller_init): Static-ize.  Save original
3463         controller value so that it can be restored ...
3464         (grub_keyboard_controller_fini): ... here (new function).
3465         (grub_at_keyboard_term): New structure.
3466         (GRUB_MOD_INIT(at_keyboard), GRUB_MOD_FINI(at_keyboard)): New
3467         functions.
3469         Migrate output terminals to new API:
3471         * term/i386/pc/vga.c (grub_vga_term): Change type to
3472         `struct  grub_term_output'.  Remove `.checkkey' and `.getkey'
3473         members.  Update all users.
3474         * term/gfxterm.c (grub_video_term): Change type to
3475         `struct  grub_term_output'.  Remove `.checkkey' and `.getkey'
3476         members.  Update all users.
3477         * include/grub/i386/pc/console.h (grub_console_checkkey)
3478         (grub_console_getkey): Do not export (no longer needed by gfxterm,
3479         etc).
3481         Migrate `terminal' command and userland tools to new API:
3483         * commands/terminal.c (grub_cmd_terminal): Split into ...
3484         (grub_cmd_terminal_input): ... this, and ...
3485         (grub_cmd_terminal_output): ... this.
3486         (GRUB_MOD_INIT(terminal)): Split `terminal' command in two commands:
3487         `terminal_input' and `terminal_output'.
3488         * util/grub.d/00_header.in: Adjust `terminal' calls to new
3489         `terminal_input' / `terminal_output' API.
3490         * util/grub-mkconfig.in: Export ${GRUB_TERMINAL_INPUT} and
3491         ${GRUB_TERMINAL_OUTPUT} instead of ${GRUB_TERMINAL} (and if user
3492         provided ${GRUB_TERMINAL}, convert it).
3494 2008-11-04  Robert Millan  <rmh@aybabtu.com>
3496         * util/grub.d/10_freebsd.in: New file.  Generate grub configuration
3497         for FreeBSD.
3498         * conf/common.rmk (grub-mkconfig_SCRIPTS): Add 10_freebsd.
3500 2008-11-03  Bean  <bean123ch@gmail.com>
3502         * kern/elf.c (grub_elf32_load): Revert to previous code.
3503         (grub_elf64_load): Likewise.
3505         * loader/i386/bsd.c (grub_bsd_elf32_hook): Change return address.
3507 2008-11-01  Robert Millan  <rmh@aybabtu.com>
3509         * Makefile.in (CPPFLAGS): Fix builddir=. assumption.
3510         (TARGET_CPPFLAGS): Likewise.
3511         * genmk.rb (mod_src): Fix builddir=. and srcdir=. assumptions.
3513 2008-11-01  Carles Pina i Estany  <carles@pina.cat>
3515         * normal/menu.c (run_menu): Add Previous and Next Page keys in menu.
3517 2008-10-29  Guillem Jover  <guillem.jover@nokia.com>
3519         * disk/lvm.c (grub_lvm_scan_device): Fix error recovery by delaying the
3520         addition of objects until the code is not going to be able to fail.
3522 2008-10-29  Guillem Jover  <guillem.jover@nokia.com>
3524         * disk/lvm.c (grub_lvm_scan_device): Fix possible NULL value handling
3525         (add a missing NULL check, and correct them by moving the pointer
3526         operations after the actual check).
3528 2008-10-29  Robert Millan  <rmh@aybabtu.com>
3530         * util/i386/pc/grub-install.in: Handle empty string as output from
3531         make_system_path_relative_to_its_root().
3533 2008-10-05  Hans Lambermont  <hans@lambermont.dyndns.org>
3535         * disk/lvm.c (grub_lvm_scan_device): Allocate buffer space for the
3536         circular metadata worst case scenario. If the metadata is circular
3537         then copy the wrap in place.
3538         * include/grub/lvm.h: Add GRUB_LVM_MDA_HEADER_SIZE, from the LVM2
3539         project lib/format_text/layout.h
3540         Circular metadata bug found and patch debugged by Jan Derk Gerlings.
3542 2008-10-03  Felix Zielcke  <fzielcke@z-51.de>
3544         * util/i386/pc/grub-install.in: Source grub-mkconfig_lib instead of update-grub_lib.
3546 2008-10-03  Felix Zielcke  <fzielcke@z-51.de>
3548         * util/update-grub_lib.in: Mention filename in warning message.
3550 2008-09-29  Felix Zielcke  <fzielcke@z-51.de>
3552         * NEWS: Update for rename of update-grub to grub-mkconfig.
3554 2008-09-29  Felix Zielcke  <fzielcke@z-51.de>
3556         * util/update-grub_lib.in: Copy to ...
3557         * util/grub-mkconfig_lib.in: ... this.  Update all users.
3558         * util/update-grub_lib.in: Make it a stub to `grub-mkconfig_lib.in'.
3559         * util/update-grub.in: Rename to ...
3560         * util/grub-mkconfig.in: ... this.  Update all users.  Remove `-y'
3561         option. Add `--output' option to allow users to specify the generated
3562         configuration file.  Default to stdout.
3563         (update_grub_dir): Rename to ...
3564         (grub_mkconfig_dir): ... this.
3565         (grub_cfg): Default to an empty string.
3566         * conf/common.rmk (update-grub): Rename to ...
3567         (grub-mkconfig): ... this.
3568         (update-grub_lib): Copy to ...
3569         (grub-mkconfig_lib): ... this.
3570         (update-grub_SCRIPTS): Copy to ...
3571         (grub-mkconfig_SCRIPTS): ... this. Update all users.
3572         (update-grub_DATA): Rename to ...
3573         (grub-mkconfig_DATA): ... this.
3575 2008-09-28  Robert Millan  <rmh@aybabtu.com>
3577         * fs/iso9660.c (struct grub_iso9660_primary_voldesc): Rename `created'
3578         to `modified'.  Add the real `created' field.
3579         (grub_iso9660_uuid): Use `modified' rather than `created' for
3580         constructing the UUID.
3582 2008-09-28  Felix Zielcke  <fzielcke@z-51.de>
3584         fs/jfs.c (grub_jfs_find_file): Treat multiple slashes like one.
3585         Based on code from Tomas Ebenlendr <ebik@ucw.cz>.
3587 2008-09-28  Bean  <bean123ch@gmail.com>
3589         * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a bug in the previous patch.
3590         Thanks to Christian Franke for finding this bug.
3592 2008-09-25  Robert Millan  <rmh@aybabtu.com>
3594         * util/grub-mkdevicemap.c (make_device_map): Actually replace all
3595         instances of grub_util_get_disk_name() (see previous commit).
3597 2008-09-25  Robert Millan  <rmh@aybabtu.com>
3599         * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Remove
3600         `util/i386/get_disk_name.c'.
3601         * conf/i386-efi.rmk: Likewise.
3602         * conf/x86_64-efi.rmk: Likewise.
3603         * conf/i386-coreboot.rmk: Likewise.
3604         * conf/i386-ieee1275.rmk: Likewise.
3605         * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Remove
3606         `util/ieee1275/get_disk_name.c'.
3607         * include/grub/util/misc.h (grub_util_get_disk_name): Remove.
3608         * util/ieee1275/get_disk_name.c: Remove file.
3609         * util/i386/get_disk_name.c: Remove file.
3610         * util/grub-mkdevicemap.c (make_device_map): Back to hardcoding
3611         "hd%d" for device.map entries, rather than using
3612         grub_util_get_disk_name().
3614 2008-09-24  Carles Pina i Estany  <carles@pina.cat>
3616         * disk/dmraid_nvidia.c (grub_dmraid_nv_detect): Fix `unused parameter'
3617         warning.
3618         * commands/i386/pc/pxecmd.c (dmraid_nvidia): Likewise.
3620 2008-09-24  Carles Pina i Estany  <carles@pina.cat>
3622         * include/grub/i386/pc/console.h (GRUB_TERM_NPAGE):
3623         Changed to 0x5100.
3624         (GRUB_TERM_PPAGE): Changed to 0x4900.
3626 2008-09-24  Robert Millan  <rmh@aybabtu.com>
3628         * include/grub/powerpc/ieee1275/console.h (GRUB_CONSOLE_KEY_*): Remove
3629         macros (they were i386-pc specific).
3630         * include/grub/sparc64/ieee1275/console.h: Likewise.
3631         * include/grub/efi/console.h: Likewise.
3633 2008-09-22  Bean  <bean123ch@gmail.com>
3635         * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a rare case where $BITMAP is
3636         resident and in attribute list.
3638         * include/grub/ntfs.h (BMP_LEN): Removed.
3640 2008-09-22  Bean  <bean123ch@gmail.com>
3642         * disk/ata.c (grub_atapi_open): Initialize devfnd, no need to set
3643         scsi->name and scsi->luns, as they will be set in grub_scsi_open.
3645         * disk/scsi.c (grub_scsi_open): Don't call p->close (scsi) here when
3646         error occurs, as grub_disk_open will call grub_disk_close, which will
3647         call p->close (scsi).
3649 2008-09-21  Felix Zielcke  <fzielcke@z-51.de>
3651         * configure.ac (AC_INIT): Quote `GRUB' string and version number.
3652         (AC_PREREQ): Bumped to 2.59.
3653         (AC_TRY_COMPILE): Replace obsolete macro with ...
3654         (AC_COMPILE_IFELSE): ... this.
3655         * aclocal.m4 (AC_TRY_LINK): Replace obsolete macro with ...
3656         (AC_LINK_IFELSE): ... this.
3658 2008-09-21  Felix Zielcke  <fzielcke@z-51.de>
3660         * autogen.sh: Add a call to `gendistlist.sh'.
3662 2008-09-19  Christian Franke  <franke@computer.org>
3664         * aclocal.m4 (grub_CHECK_ENABLE_EXECUTE_STACK): New function.
3665         * configure.ac: Call grub_CHECK_ENABLE_EXECUTE_STACK.
3666         * include/grub/misc.h [NEED_ENABLE_EXECUTE_STACK]:
3667         Export __enable_execute_stack() to modules.
3668         * kern/misc.c [NEED_ENABLE_EXECUTE_STACK] (__enable_execute_stack):
3669         New function.
3671 2008-09-09  Felix Zielcke  <fzielcke@z-51.de>
3673         * Makefile.in (RMKFILES): Add `i386.rmk' and `x86_64-efi.rmk'.
3674         Sort the list.
3676 2008-09-09  Felix Zielcke  <fzielcke@z-51.de>
3678         * util/hostdisk.c: Replace #include <grub/util/biosdisk.h> with
3679         #include <grub/util/hostdisk.h>.
3681 2008-09-08  Robert Millan  <rmh@aybabtu.com>
3683         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Skip
3684         segments when their filesz is zero (grub_file_read() interprets
3685         zero-size as "read until EOF", which results in memory corruption).
3686         Use `lowest_segment' rather than 0 for calculating the current
3687         segment load address.
3689 2008-09-08  Robert Millan  <rmh@aybabtu.com>
3691         * util/hostdisk.c (open_device): Replace a grub_util_info() call
3692         with grub_dprintf("hostdisk", ...), as it was so verbose that it
3693         clobbered useful information.
3695 2008-09-08  Robert Millan  <rmh@aybabtu.com>
3697         * include/grub/util/biosdisk.h: Move to ...
3698         * include/grub/util/hostdisk.h: ... here.  Update all users.
3699         * util/biosdisk.c: Move to ...
3700         * util/hostdisk.c: ... here.  Update all users.
3702 2008-09-07  Robert Millan  <rmh@aybabtu.com>
3704         * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): Remove
3705         variables.
3706         (grub_multiboot): Move `mbi' allocation upwards, so that mmap address
3707         and length can be stored directly in the `mbi->mmap_addr' and
3708         `mbi->mmap_length' struct fields.
3710 2008-09-07  Robert Millan  <rmh@aybabtu.com>
3712         * conf/i386.rmk: New file.  Provides declaration for building
3713         `cpuid.mod'.
3714         * conf/i386-pc.rmk (pkglib_MODULES): Remove `cpuid.mod'.
3715         (cpuid_mod_SOURCES, cpuid_mod_CFLAGS, cpuid_mod_LDFLAGS): Remove
3716         variables.
3717         Include `conf/i386.mk'.
3718         * conf/i386-efi.rmk: Likewise.
3719         * conf/x86_64-efi.rmk: Likewise.
3720         * conf/i386-coreboot.rmk: Likewise.
3721         * conf/i386-ieee1275.rmk: Likewise.
3723 2008-09-07  Vesa Jääskeläinen  <chaac@nic.fi>
3725         Based on patch created by Colin D Bennett <colin@gibibit.com>.
3726         Adds optimization support for BGR based modes.
3728         * include/grub/i386/pc/vbeblit.h (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8) Removed.
3729         (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
3730         (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
3731         (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
3732         (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
3733         (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
3734         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
3735         (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
3736         (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
3737         (grub_video_i386_vbeblit_index_index): Likewise.
3738         (grub_video_i386_vbeblit_replace_directN): Added.
3739         (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
3740         (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
3741         (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
3742         (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
3743         (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
3744         (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
3745         (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
3746         (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
3747         (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
3748         (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
3749         (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
3750         (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
3751         (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
3753         * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8) Removed.
3754         (grub_video_i386_vbefill_R8G8B8): Likewise.
3755         (grub_video_i386_vbefill_index): Likewise.
3756         (grub_video_i386_vbefill_direct32): Added.
3757         (grub_video_i386_vbefill_direct24): Likewise.
3758         (grub_video_i386_vbefill_direct16): Likewise.
3759         (grub_video_i386_vbefill_direct8): Likewise.
3761         * include/grub/video.h (grub_video_blit_format): Removed
3762         GRUB_VIDEO_BLIT_FORMAT_R8G8B8A8, GRUB_VIDEO_BLIT_FORMAT_R8G8B8.
3763         (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_RGBA_8888,
3764         GRUB_VIDEO_BLIT_FORMAT_BGRA_8888, GRUB_VIDEO_BLIT_FORMAT_RGB_888,
3765         GRUB_VIDEO_BLIT_FORMAT_BGR_888, GRUB_VIDEO_BLIT_FORMAT_RGB_565,
3766         GRUB_VIDEO_BLIT_FORMAT_BGR_565.
3768         * video/video.c (grub_video_get_blit_format): Updated to use new
3769         blit formats.  Added handling for 16 bit color modes.
3771         * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Updated to use new
3772         fillers.
3773         (common_blitter): Updated to use new blitters.
3775         * video/i386/pc/vbeblit.c (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8):
3776         Removed.
3777         (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
3778         (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
3779         (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
3780         (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
3781         (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
3782         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
3783         (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
3784         (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
3785         (grub_video_i386_vbeblit_index_index): Likewise.
3786         (grub_video_i386_vbeblit_replace_directN): Added.
3787         (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
3788         (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
3789         (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
3790         (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
3791         (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
3792         (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
3793         (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
3794         (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
3795         (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
3796         (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
3797         (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
3798         (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
3799         (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
3801         * video/i386/pc/vbefill.c (grub_video_i386_vbefill_R8G8B8A8): Removed.
3802         (grub_video_i386_vbefill_R8G8B8): Likewise.
3803         (grub_video_i386_vbefill_index): Likewise.
3804         (grub_video_i386_vbefill_direct32): Added.
3805         (grub_video_i386_vbefill_direct24): Likewise.
3806         (grub_video_i386_vbefill_direct16): Likewise.
3807         (grub_video_i386_vbefill_direct8): Likewise.
3809         * video/readers/jpeg.c (grub_jpeg_decode_sos): Adapt to new blitter
3810         types.
3812         * video/readers/tga.c (grub_video_reader_tga): Adapt to new blitter
3813         types.
3815         * video/readers/png.c (grub_png_decode_image_header): Adapt to new
3816         blitter types.
3818         * video/bitmap.c (grub_video_bitmap_create): Adapt to new blitter
3819         types.
3821 2008-09-06  Felix Zielcke  <fzielcke@z-51.de>
3823         * disk/raid.c (insert_array): Set `array->chunk_size' to 64 for
3824         RAID level 1.
3826 2008-09-06  Felix Zielcke  <fzielcke@z-51.de>
3828         * fs/iso9660.c (grub_iso9660_date): New structure.
3829         (grub_iso9660_primary_voldesc): Add `grub_iso9660_date' member.
3830         (grub_iso9660_uuid): New function.
3832 2008-09-05  Bean  <bean123ch@gmail.com>
3834         * fs/fshelp.c (grub_fshelp_find_file): Handle case insensitive names.
3836         * fs/ntfs.c (list_file): Ignore names in DOS namespace, set the case
3837         insensitive bit for names in Win32 and Win32 & DOS namespace.
3839         * include/grub/fshelp.h (GRUB_FSHELP_CASE_INSENSITIVE): New macro.
3841         * include/grub/types.h (LONG_MAX): Likewise.
3843 2008-09-04  Felix Zielcke  <fzielcke@z-51.de>
3845         * util/getroot.c: Include <config.h>.
3846         (grub_util_get_grub_dev): Rewrite to use asprintf for mdraid devices,
3847         add support for /dev/md/N devices and handle LVM double dash escaping.
3849 2008-09-04  Felix Zielcke  <fzielcke@z-51.de>
3851         * config.guess: Update to latest version from config git.
3852         * config.sub: Likewise.
3854 2008-09-03  Robert Millan  <rmh@aybabtu.com>
3856         * disk/scsi.c (grub_scsi_open): Remove size limit when printing
3857         `disk->total_sectors'.
3859 2008-09-01  Colin D Bennett  <colin@gibibit.com>
3861         * include/grub/normal.h: Fixed incorrect comment for
3862         GRUB_COMMAND_FLAG_NO_ARG_PARSE.
3864 2008-09-01  Colin D Bennett  <colin@gibibit.com>
3866         * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Replaced constant
3867         values with defines.
3869         * include/grub/i386/pc/vbe.h (GRUB_VBE_MODEATTR_SUPPORTED): Added.
3870         (GRUB_VBE_MODEATTR_RESERVED_1): Likewise.
3871         (GRUB_VBE_MODEATTR_BIOS_TTY_OUTPUT_SUPPORT): Likewise.
3872         (GRUB_VBE_MODEATTR_COLOR): Likewise.
3873         (GRUB_VBE_MODEATTR_GRAPHICS): Likewise.
3874         (GRUB_VBE_MODEATTR_VGA_COMPATIBLE): Likewise.
3875         (GRUB_VBE_MODEATTR_VGA_WINDOWED_AVAIL): Likewise.
3876         (GRUB_VBE_MODEATTR_LFB_AVAIL): Likewise.
3877         (GRUB_VBE_MODEATTR_DOUBLE_SCAN_AVAIL): Likewise.
3878         (GRUB_VBE_MODEATTR_INTERLACED_AVAIL): Likewise.
3879         (GRUB_VBE_MODEATTR_TRIPLE_BUF_AVAIL): Likewise.
3880         (GRUB_VBE_MODEATTR_STEREO_AVAIL): Likewise.
3881         (GRUB_VBE_MODEATTR_DUAL_DISPLAY_START): Likewise.
3882         (GRUB_VBE_MEMORY_MODEL_TEXT): Likewise.
3883         (GRUB_VBE_MEMORY_MODEL_CGA): Likewise.
3884         (GRUB_VBE_MEMORY_MODEL_HERCULES): Likewise.
3885         (GRUB_VBE_MEMORY_MODEL_PLANAR): Likewise.
3886         (GRUB_VBE_MEMORY_MODEL_NONCHAIN4_256): Likewise.
3887         (GRUB_VBE_MEMORY_MODEL_YUV): Likewise.
3889 2008-08-31  Robert Millan  <rmh@aybabtu.com>
3891         * loader/i386/pc/multiboot.c (grub_get_multiboot_mmap_len): Fix
3892         declaration.
3893         (grub_multiboot): Fix a few warnings.
3895 2008-08-31  Robert Millan  <rmh@aybabtu.com>
3897         * loader/i386/pc/multiboot.c: Update comment not to say that
3898         boot_device support is unimplemented.
3900 2008-08-31  Robert Millan  <rmh@aybabtu.com>
3902         * loader/i386/pc/multiboot.c: Update comment not to say that a.out
3903         or memory map support are unimplemented.
3905 2008-08-31  Colin D Bennett  <colin@gibibit.com>
3907         * util/i386/pc/grub-mkrescue.in: Support multiple overlay directories.
3909 2008-08-31  Colin D Bennett  <colin@gibibit.com>
3911         * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Show VBE version and
3912         total video memory in 'vbeinfo' output; show color format details for
3913         each video mode.
3915 2008-08-30  Pavel Roskin  <proski@gnu.org>
3917         * util/genmoddep.c: Remove for real this time.
3918         * DISTLIST: Remove util/genmoddep.c.
3920 2008-08-30  Robert Millan  <rmh@aybabtu.com>
3922         * kern/i386/pc/startup.S (multiboot_header): Force 4-byte alignment
3923         as required by Multiboot spec (it was already 4-byte aligned, but
3924         only by chance).
3926 2008-08-29  Pavel Roskin  <proski@gnu.org>
3928         * kern/powerpc/ieee1275/crt0.S: Rename to ...
3929         * kern/powerpc/ieee1275/startup.S: ... this.
3930         * conf/powerpc-ieee1275.rmk: Adjust for the above.
3931         * DISTLIST: Likewise.
3933         * kern/powerpc/ieee1275/crt0.S: Include grub/symbol.h and
3934         grub/cpu/kernel.h.  Add start label for consistency with other
3935         platforms.  Add grub_prefix immediately after start.  Add jump
3936         to the code after grub_prefix.
3937         * include/grub/powerpc/kernel.h: Provide valid values for
3938         GRUB_KERNEL_CPU_PREFIX and GRUB_KERNEL_CPU_DATA_END.
3940 2008-08-29  Bean  <bean123ch@gmail.com>
3942         * configure.ac: Change host_os to cygwin for mingw.
3943         (asprintf): New check for function.
3945         * include/grub/symbol.h: Replace #ifndef __CYGWIN__ with
3946         #if ! defined (__CYGWIN__) && ! defined (__MINGW32__).
3948         * include/grub/util/misc.h: #include <config.h> and <grub/types.h>,
3949         declare asprintf if HAVE_ASPRINTF is not set, declare fseeko, ftello,
3950         sync, sleep and grub_util_get_disk_size for mingw.
3952         * util/biosdisk.c (grub_util_biosdisk_open): Use grub_util_get_disk_size
3953         to get size in mingw.
3954         (open_device): Use flag O_BINARY if it's defined.
3955         (find_root_device): Add dummy code for mingw.
3957         * util/grub-mkdevicemap.c (get_floppy_disk_name): Return 0 for mingw.
3958         (get_ide_disk_name): Return //./PHYSICALDRIVE%d for mingw.
3959         (get_scsi_disk_name): Return 0 for mingw.
3961         * util/hostfs.c: #include <grub/util/misc.h>.
3962         (grub_hostfs_open): Use "rb" flag to open file, use
3963         grub_util_get_disk_size to get disk size for mingw.
3965         * util/misc.c: #include <windows.h> and <winioctl.h> in mingw.
3966         (asprintf): New function if HAVE_ASPRINTF is not set.
3967         (sync): New function for mingw.
3968         (sleep): Likewise.
3969         (grub_util_get_disk_size): Likewise.
3971 2008-08-28  Pavel Roskin  <proski@gnu.org>
3973         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
3974         kern/time.c.
3976 2008-08-28  Robert Millan  <rmh@aybabtu.com>
3978         * util/biosdisk.c (find_grub_drive): Declare missing `i' variable.
3980 2008-08-28  Robert Millan  <rmh@aybabtu.com>
3982         Change find_grub_drive() syntax so it doesn't prevent it from
3983         detecting NULL names as errors.
3985         * util/biosdisk.c (find_grub_drive): Move free slot search code
3986         from here ...
3987         (find_free_slot): ... to here.
3988         (read_device_map): Use find_free_slot() to search for free slots.
3990 2008-08-27  Marco Gerards  <marco@gnu.org>
3992         * conf/common.rmk (pkglib_MODULES): Add scsi.mod.
3993         (scsi_mod_SOURCES): New variable.
3994         (scsi_mod_CFLAGS): Likewise
3995         (scsi_mod_LDFLAGS): Likewise.
3997         * disk/scsi.c: New file.
3999         * include/grub/scsi.h: Likewise.
4001         * include/grub/scsicmd.h: Likewise.
4003         * disk/ata.c: Include <grub/scsi.h>.
4004         (grub_atapi_packet): Do not use grub_ata_cmd, use registers
4005         instead.
4006         (grub_ata_iterate): Skip ATAPI devices.
4007         (grub_ata_open): Only handle ATAPI devices.
4008         (struct grub_atapi_read): Removed.
4009         (grub_atapi_readsector): Likewise.
4010         (grub_ata_read): No longer handle ATAPI devices.
4011         (grub_ata_write): Likewise.
4012         (grub_atapi_iterate): New function.
4013         (grub_atapi_read): Likewise.
4014         (grub_atapi_write): Likewise.
4015         (grub_atapi_open): Likewise.
4016         (grub_atapi_close): Likewise.
4017         (grub_atapi_dev): New variable.
4018         (GRUB_MOD_INIT(ata)): Register ATAPI as SCSI device.
4019         (GRUB_MOD_FINI(ata)): Unregister ATAPI.
4021         * include/grub/disk.h (enum grub_disk_dev_id): Add
4022         `GRUB_DISK_DEVICE_SCSI_ID'.
4024 2008-08-26  Robert Millan  <rmh@aybabtu.com>
4026         * util/biosdisk.c (grub_util_biosdisk_open, open_device)
4027         (grub_util_biosdisk_get_grub_dev): Make error messages a bit more
4028         descriptive.
4030 2008-08-23  Bean  <bean123ch@gmail.com>
4032         * conf/common.rmk (grub_probe_SOURCES): Add disk/mdraid_linux.c.
4033         (grub_fstest_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
4034         disk/mdraid_linux.c and disk/dmraid_nvidia.c and lib/crc.c.
4035         (pkglib_MODULES): Add raid5rec.mod, raid6rec.mod, mdraid.mod and
4036         dm_nv.mod.
4037         (raid5rec_mod_SOURCES): New macro.
4038         (raid5rec_mod_CFLAGS): Likewise.
4039         (raid5rec_mod_LDFLAGS): Likewise.
4040         (raid6rec_mod_SOURCES): Likewise.
4041         (raid6rec_mod_CFLAGS): Likewise.
4042         (raid6rec_mod_LDFLAGS): Likewise.
4043         (mdraid_mod_SOURCES): Likewise.
4044         (mdraid_mod_CFLAGS): Likewise.
4045         (mdraid_mod_LDFLAGS): Likewise.
4046         (dm_nv_mod_SOURCES): Likewise.
4047         (dm_nv_mod_CFLAGS): Likewise.
4048         (dm_nv_mod_LDFLAGS): Likewise.
4050         * conf/i386-pc.rmk (grub_setup_SOURCES): Add disk/mdraid_linux.c.
4051         (grub_emu_SOURCES):  Add disk/raid5_recover.c, disk/raid6_recover.c,
4052         disk/mdraid_linux.c and disk/dmraid_nvidia.c.
4054         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add disk/raid5_recover.c,
4055         disk/raid6_recover.c, disk/mdraid_linux.c and disk/dmraid_nvidia.c.
4057         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
4059         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
4061         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4063         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4065         * disk/raid5_recover.c: New file.
4067         * disk/raid6_recover.c: Likewise.
4069         * disk/mdraid_linux.c: Likewise.
4071         * disk/dmraid_nvidia.c: Likewise.
4073         * disk/i386/pc/biosdisk.c: Set total_sectors of cdrom device to
4074         ULONG_MAX.
4076         * disk/raid.c (grub_raid_open): Use the size of the smallest disk to
4077         calculate the size of raid device.
4078         (grub_raid_read): Simplify raid0 code. Support raid4, raid6 and four
4079         different layout of raid5.
4080         (grub_raid_scan_device): Remove code specific to mdraid.
4081         (grub_raid_list): New variable.
4082         (free_array): New function.
4083         (grub_raid_register): Likewise.
4084         (grub_raid_unregister): Likewise.
4085         (grub_raid_rescan): Likewise.
4086         (GRUB_MOD_INIT): Don't iterate device here.
4087         (GRUB_MOD_FINI): Use free_array to release resource.
4089         * include/grub/raid.h: Remove macro and structure specific to mdraid.
4090         (grub_raid5_recover_func_t): New function variable type.
4091         (grub_raid6_recover_func_t): Likewise.
4092         (grub_raid5_recover_func): New variable.
4093         (grub_raid6_recover_func): Likewise.
4094         (grub_raid_register): New function.
4095         (grub_raid_unregister): Likewise.
4096         (grub_raid_rescan): Likewise.
4097         (grub_raid_block_xor): Likewise.
4099         * util/grub-fstest.c: Add #include <grub/raid.h> and <grub/lib/crc.h>.
4100         (CMD_CRC): New macro.
4101         (part): Removed.
4102         (read_file): Handle device as well as file.
4103         (cmd_crc): New function.
4104         (fstest): Handle multiple disks.
4105         (options): Remove part, raw and long, add root and diskcount.
4106         (usage): Add crc, remove -p, -r, -l, add -r and -c.
4107         (main): Find the first non option entry and ignore subsequent options,
4108         add handling for the new options, support multiple disks.
4110         * util/grub-probe.c (probe): Add mdraid to abstraction_name.
4112 2008-08-23  Bean  <bean123ch@gmail.com>
4114         * normal/x86_64/setjmp.S (grub_longjmp): Return 1 when val = 0.
4116         * genfslist.sh: Ignore kernel.mod.
4118         * genpartmaplist.sh: Likewise.
4120 2008-08-23  Robert Millan  <rmh@aybabtu.com>
4122         * util/getroot.c (find_root_device): Skip anything that starts with
4123         a dot, not just directories.  This avoids things like /dev/.tmp.md0.
4125 2008-08-22  Felix Zielcke  <fzielcke@z-51.de>
4127         * util/update-grub.in (GRUB_GFXMODE): Export variable.
4128         * util/grub.d/00_header.in: Allow the administrator to change default
4129         gfxmode via ${GRUB_GFXMODE}.
4131 2008-08-21  Felix Zielcke  <fzielcke@z-51.de>
4133         * fs/ntfs.c (grub_ntfs_mount): Fix a memory leak.
4135 2008-08-21  Robert Millan  <rmh@aybabtu.com>
4137         * loader/i386/linux.c: New file.  Implements generic 32-bit Linux
4138         loader.
4139         * conf/i386-coreboot.rmk (_linux_mod_SOURCES): Replace
4140         `loader/i386/pc/linux.c' with `loader/i386/linux.c'.
4142 2008-08-20  Carles Pina i Estany  <carles@pina.cat>
4144         * menu/normal.c (run_menu): Replace hardcoded numbers with macros
4145         (16 for GRUB_TERM_UP and 14 for GRUB_TERM_DOWN)
4147 2008-08-19  Robert Millan  <rmh@aybabtu.com>
4149         * term/gfxterm.c (DEFAULT_CURSOR_COLOR): Remove.
4150         (struct grub_virtual_screen): Remove `cursor_color'.
4151         (grub_virtual_screen_setup): Remove `virtual_screen.cursor_color'
4152         initialization.
4153         (write_cursor): Use `virtual_screen.fg_color' to draw cursor.
4155 2008-08-18  Robert Millan  <rmh@aybabtu.com>
4157         Unify (identical) linux_normal.c files.
4158         * loader/i386/efi/linux_normal.c: Move from here ...
4159         * loader/linux_normal.c: ... to here.  Update all users.
4160         * loader/i386/pc/linux_normal.c: Delete.  Update all users.
4161         * loader/i386/ieee1275/linux_normal.c: Likewise.
4163 2008-08-18  Robert Millan  <rmh@aybabtu.com>
4165         * include/grub/i386/linux.h (LINUX_LOADER_ID_LILO)
4166         (LINUX_LOADER_ID_LOADLIN, LINUX_LOADER_ID_BOOTSECT)
4167         (LINUX_LOADER_ID_SYSLINUX, LINUX_LOADER_ID_ETHERBOOT)
4168         (LINUX_LOADER_ID_ELILO, LINUX_LOADER_ID_GRUB, LINUX_LOADER_ID_UBOOT)
4169         (LINUX_LOADER_ID_XEN, LINUX_LOADER_ID_GUJIN, LINUX_LOADER_ID_QEMU):
4170         New macros.
4171         (GRUB_LINUX_CL_OFFSET, GRUB_LINUX_CL_END_OFFSET): Move from here ...
4172         * loader/i386/pc/linux.c (GRUB_LINUX_CL_OFFSET)
4173         (GRUB_LINUX_CL_END_OFFSET): ... to here.
4174         * loader/i386/efi/linux.c (GRUB_EFI_CL_OFFSET): Rename to ...
4175         (GRUB_LINUX_CL_OFFSET): ... this.  Update all users.
4176         (GRUB_EFI_CL_END_OFFSET): Rename to ...
4177         (GRUB_LINUX_CL_END_OFFSET): ... this.  Update all users.
4178         (grub_rescue_cmd_linux): Macroify `type_of_loader' initialization.
4179         Initialize `params->video_cursor_x' and `params->video_cursor_y'
4180         portably using grub_getxy().
4181         Replace `-EFI' with `-bzImage' in boot message.
4183 2008-08-17  Robert Millan  <rmh@aybabtu.com>
4185         * include/grub/x86_64/kernel.h: New file (<grub/i386/kernel.h> stub).
4187 2008-08-17  Robert Millan  <rmh@aybabtu.com>
4189         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pc/mmap.c'.
4191         * include/grub/i386/pc/init.h (GRUB_MACHINE_MEMORY_AVAILABLE)
4192         (GRUB_MACHINE_MEMORY_RESERVED): New macros.
4193         (grub_machine_mmap_iterate): New function declaration.
4194         * include/grub/multiboot.h (struct grub_multiboot_mmap_entry): New
4195         structure.
4196         (GRUB_MMAP_MEMORY_AVAILABLE, GRUB_MMAP_MEMORY_RESERVED): New
4197         macros.
4199         * kern/i386/pc/init.c (grub_machine_init): Replace hardcoded region
4200         type check value with `GRUB_MACHINE_MEMORY_AVAILABLE'.
4201         Move e820 parsing from here ...
4202         * kern/i386/pc/mmap.c: New file.
4203         (grub_machine_mmap_iterate): ... to here.
4205         * include/grub/i386/coreboot/memory.h: Remove `<grub/err.h>'.
4206         (GRUB_LINUXBIOS_MEMORY_AVAILABLE): Rename (for consistency) to ...
4207         (GRUB_MACHINE_MEMORY_AVAILABLE): ... this.  Update all users.
4208         (grub_available_iterate): Redeclare to return `void', and redeclare
4209         its hook to use grub_uint64_t as addr and size parameters, and rename
4210         to ...
4211         (grub_machine_mmap_iterate): ... this.  Update all users.
4213         * kern/i386/coreboot/mmap.c (grub_mmap_iterate): Simplify parser loop
4214         to make it more readable.  Rename to ...
4215         (grub_machine_mmap_iterate): ... this.
4217         * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): New variables.
4218         (grub_get_multiboot_mmap_len, grub_fill_multiboot_mmap): New functions.
4219         (grub_multiboot): Allocate an extra region after the payload, and fill
4220         it with a Multiboot memory map.  Adjust a.out loader to calculate size
4221         with the extra space.
4222         (grub_multiboot_load_elf32): Adjust elf32 loader to calculate size
4223         with the extra space.
4225 2008-08-17  Carles Pina i Estany  <carles@pina.cat>
4227         * menu/normal.c (run_menu): Add Home and End keys in grub-menu.
4229 2008-08-17  Felix Zielcke  <fzielcke@z-51.de>
4231         * gendistlist.sh: Add *.y, *.tex, *.texi, grub.cfg, README, *.sc,
4232         mdate-sh to the list `find' searches for.
4233         * DISTLIST: Regenerated.
4235 2008-08-16  Felix Zielcke  <fzielcke@z-51.de>
4237         * gendistlist.sh (EXTRA_DISTFILES): Remove gensymlist.sh,
4238         genkernsyms.sh.  Add geninit.sh, geninitheader.sh, genkernsyms.sh.in,
4239         genmoddep.awk, gensymlist.sh.in.
4240         (DISTDIRS): Add bus, docs, hook, lib.
4241         * DISTLIST: Regenerated.
4242         * NEWS: Add cygwin support and change the `os-prober' entry a bit.
4244 2008-08-16  Robert Millan  <rmh@aybabtu.com>
4246         * disk/raid.c (grub_raid_init): Handle/report errors set by
4247         grub_device_iterate().
4248         * disk/lvm.c (grub_lvm_init): Likewise.
4250 2008-08-15  Bean  <bean123ch@gmail.com>
4252         * conf/i386-pc.rmk (pkglib_MODULES): Add datetime.mod, date.mod
4253         and datehook.mod.
4254         (datetime_mod_SOURCES): New macro.
4255         (datetime_mod_CFLAGS): Likewise.
4256         (datetime_mod_LDFLAGS): Likewise.
4257         (date_mod_SOURCES): Likewise.
4258         (date_mod_CFLAGS): Likewise.
4259         (date_mod_LDFLAGS): Likewise.
4260         (datehook_mod_SOURCES): Likewise.
4261         (datehook_mod_CFLAGS): Likewise.
4262         (datehook_mod_LDFLAGS): Likewise.
4264         * conf/i386-coreboot.rmk (pkglib_MODULES): Add datetime.mod, date.mod
4265         and datehook.mod.
4266         (datetime_mod_SOURCES): New macro.
4267         (datetime_mod_CFLAGS): Likewise.
4268         (datetime_mod_LDFLAGS): Likewise.
4269         (date_mod_SOURCES): Likewise.
4270         (date_mod_CFLAGS): Likewise.
4271         (date_mod_LDFLAGS): Likewise.
4272         (datehook_mod_SOURCES): Likewise.
4273         (datehook_mod_CFLAGS): Likewise.
4274         (datehook_mod_LDFLAGS): Likewise.
4276         * conf/i386-ieee1275.rmk (pkglib_MODULES): Add datetime.mod, date.mod
4277         and datehook.mod.
4278         (datetime_mod_SOURCES): New macro.
4279         (datetime_mod_CFLAGS): Likewise.
4280         (datetime_mod_LDFLAGS): Likewise.
4281         (date_mod_SOURCES): Likewise.
4282         (date_mod_CFLAGS): Likewise.
4283         (date_mod_LDFLAGS): Likewise.
4284         (datehook_mod_SOURCES): Likewise.
4285         (datehook_mod_CFLAGS): Likewise.
4286         (datehook_mod_LDFLAGS): Likewise.
4288         * conf/i386-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
4289         and datehook.mod.
4290         (datetime_mod_SOURCES): New macro.
4291         (datetime_mod_CFLAGS): Likewise.
4292         (datetime_mod_LDFLAGS): Likewise.
4293         (date_mod_SOURCES): Likewise.
4294         (date_mod_CFLAGS): Likewise.
4295         (date_mod_LDFLAGS): Likewise.
4296         (datehook_mod_SOURCES): Likewise.
4297         (datehook_mod_CFLAGS): Likewise.
4298         (datehook_mod_LDFLAGS): Likewise.
4300         * conf/x86_64-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
4301         and datehook.mod.
4302         (datetime_mod_SOURCES): New macro.
4303         (datetime_mod_CFLAGS): Likewise.
4304         (datetime_mod_LDFLAGS): Likewise.
4305         (date_mod_SOURCES): Likewise.
4306         (date_mod_CFLAGS): Likewise.
4307         (date_mod_LDFLAGS): Likewise.
4308         (datehook_mod_SOURCES): Likewise.
4309         (datehook_mod_CFLAGS): Likewise.
4310         (datehook_mod_LDFLAGS): Likewise.
4312         * kern/env.c (grub_env_insert): Fix a bug in prevp pointer.
4314         * commands/date.c: New file.
4316         * hook/datehook.c: Likewise.
4318         * include/grub/lib/datetime.h: Likewise.
4320         * include/grub/i386/cmos.h: Likewise.
4322         * lib/datetime.c: Likewise.
4324         * lib/i386/datetime.c: Likewise.
4326         * lib/efi/datetime.c: Likewise.
4328 2008-08-14  Robert Millan  <rmh@aybabtu.com>
4330         * conf/common.rmk (bin_UTILITIES): Add `grub-mkelfimage'.
4331         (grub_mkelfimage_SOURCES): New variable.
4332         (util/elf/grub-mkimage.c_DEPENDENCIES): Likewise.
4334         * conf/i386-coreboot.rmk (bin_UTILITIES, grub_mkimage_SOURCES)
4335         (grub_mkimage_LDFLAGS, util/elf/grub-mkimage.c_DEPENDENCIES): Remove.
4336         * conf/powerpc-ieee1275.rmk: Likewise.
4337         * conf/i386-ieee1275.rmk: Likewise.
4339         * kern/ieee1275/init.c: Include `<grub/cpu/kernel.h>'.
4340         * kern/i386/coreboot/init.c: Likewise.
4342         * kern/i386/ieee1275/startup.S: Replace `<grub/machine/kernel.h>'
4343         with `<grub/cpu/kernel.h>'.
4344         (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Renamed
4345         to ...
4346         (GRUB_KERNEL_CPU_PREFIX, GRUB_KERNEL_CPU_DATA_END): ... this.
4347         * kern/i386/coreboot/startup.S: Likewise.
4349         * include/grub/powerpc/ieee1275/kernel.h (GRUB_MOD_ALIGN)
4350         (GRUB_MOD_GAP): Remove.
4351         * include/grub/powerpc/kernel.h: New file.
4352         * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX)
4353         (GRUB_KERNEL_MACHINE_DATA_END): Remove.
4354         * include/grub/i386/kernel.h: New file.
4355         * include/grub/i386/coreboot/kernel.h (GRUB_MOD_ALIGN)
4356         (GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_PREFIX)
4357         (GRUB_KERNEL_MACHINE_DATA_END): Remove.
4359         * util/ieee1275/grub-install.in (grub_mkimage): Initialize to use
4360         `grub-mkelfimage'.
4361         Use --directory when invoking grub_mkimage.
4363         * util/elf/grub-mkimage.c: Include `<grub/cpu/kernel.h>'.
4364         (add_segments): Replace GRUB_KERNEL_MACHINE_DATA_END and
4365         GRUB_KERNEL_MACHINE_PREFIX with GRUB_KERNEL_CPU_DATA_END
4366         and GRUB_KERNEL_CPU_PREFIX.
4368 2008-08-14  Felix Zielcke  <fzielcke@z-51.de>
4370         * include/grub/err.h (grub_err_printf): New function prototype.
4371         * util/misc.c (grub_err_printf): New function.
4372         * kern/misc.c [! GRUB_UTIL] (grub_err_printf): New alias for
4373         grub_printf.
4374         * kern/err.c (grub_print_error): Use grub_err_printf.
4376 2008-08-13  Robert Millan  <rmh@aybabtu.com>
4378         * docs/grub.cfg: Remove `/dev/' prefix in GNU/Hurd boot entry.
4380 2008-08-13  Robert Millan  <rmh@aybabtu.com>
4382         * docs/grub.cfg: Use the native device name for the example GNU/Hurd
4383         boot entry.
4385 2008-08-12  Robert Millan  <rmh@aybabtu.com>
4387         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Move part
4388         of the relocation code from here ...
4389         (grub_multiboot): ... to here.
4390         (forward_relocator, backward_relocator): Move from here ...
4391         * kern/i386/loader.S (grub_multiboot_forward_relocator)
4392         (grub_multiboot_backward_relocator): ... to here.
4393         (grub_multiboot_real_boot): Use %edx for entry offset.  Put Multiboot
4394         magic in %eax.  Use %ebp for jumping (so %edx is not trashed).
4395         * include/grub/i386/loader.h (grub_multiboot_forward_relocator)
4396         (grub_multiboot_forward_relocator_end)
4397         (grub_multiboot_backward_relocator)
4398         (grub_multiboot_backward_relocator_end): New variables.
4400 2008-08-12  Bean  <bean123ch@gmail.com>
4402         * disk/raid.c (grub_raid_read): Fix a bug in raid0 code.
4404 2008-08-11  Robert Millan  <rmh@aybabtu.com>
4406         * kern/i386/linuxbios/startup.S: Move from here ...
4407         * kern/i386/coreboot/startup.S: ... to here.
4409         * kern/i386/linuxbios/init.c: Move from here ...
4410         * kern/i386/coreboot/init.c: ... to here.
4412         * kern/i386/linuxbios/table.c: Move from here ...
4413         * kern/i386/coreboot/mmap.c: ... to here.
4415         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Update moved files.
4417 2008-08-11  Robert Millan  <rmh@aybabtu.com>
4419         * kern/device.c (grub_device_open): Do not handle grub_disk_open()
4420         errors.  Leave it to the upper layer to handle them.
4422 2008-08-09  Christian Franke  <franke@computer.org>
4424         * Makefile.in: Add `target_os' and `enable_grub_pe2elf'.
4425         * conf/common.rmk: Install `grub-pe2elf' only if requested.
4426         Install `grub.d/10_windows' only on Cygwin.
4427         * configure.ac: Add subst of `target_os'.
4428         Check `target_os' also before setting TARGET_OBJ2ELF.
4429         Add `--enable-grub-pe2elf'.
4431 2008-08-08  Robert Millan  <rmh@aybabtu.com>
4433         * kern/disk.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
4434         (grub_last_time): Change type to grub_uint64_t.
4435         (grub_disk_open): Migrate code from to using grub_get_time_ms().
4436         (grub_disk_close): Likewise.
4438         * normal/menu.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
4439         (run_menu): Migrate code from to using grub_get_time_ms().
4441         * util/misc.c (grub_get_time_ms): New function.
4443 2008-08-08  Marco Gerards  <marco@gnu.org>
4445         * disk/ata.c (grub_ata_regget): Change return type to
4446         `grub_uint8_t'.
4447         (grub_ata_regget2): Likewise.
4448         (grub_ata_wait_status): New function.
4449         (grub_ata_wait_busy): Removed function, updated all users to use
4450         `grub_ata_wait_status'.
4451         (grub_ata_wait_drq): Likewise.
4452         (grub_ata_cmd): New function.
4453         (grub_ata_pio_read): Change return type to `grub_uint8_t'.  Add
4454         error handling.
4455         (grub_ata_pio_write): Add error handling.
4456         (grub_atapi_identify): Likewise.
4457         (grub_atapi_packet): Use `grub_ata_cmd' and improve error
4458         handling.
4459         (grub_ata_identify): Use `grub_ata_cmd' and improve error
4460         handling.  Actually use the detected registers.  Reorder the
4461         detection logic such that it is easier to read.
4462         (grub_ata_pciinit): Do not assign the same ID to each controller.
4463         (grub_ata_setaddress): Use `grub_ata_cmd' and improve error
4464         handling.
4465         (grub_atapi_readsector): Check the result of `grub_ata_pio_read'.
4467         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TIMEOUT'.
4469 2008-08-08  Marco Gerards  <marco@gnu.org>
4471         * NEWS: Update.
4473 2008-08-07  Bean  <bean123ch@gmail.com>
4475         * include/grub/x86_64/pci.h: New file.
4477 2008-08-07  Christian Franke  <franke@computer.org>
4479         * kern/i386/pit.c (TIMER2_SPEAKER): New define.
4480         (TIMER2_GATE): Likewise.
4481         (grub_pit_wait): Add enable/disable of the timer2 gate
4482         bit of port 0x61.  This fixes a possible infinite loop.
4484 2008-08-07  Bean  <bean123ch@gmail.com>
4486         * conf/x86_64-efi.rmk (kernel_mod_SOURCES): Add kern/time.c,
4487         kern/i386/tsc.c and kern/i386/pit.c.
4489         * include/grub/i386/tsc.h (grub_cpu_is_cpuid_supported): Handle
4490         x86_64 platform.
4492         * kern/i386/efi/init.c: Replace <grub/cpu/tsc.h> with
4493         <grub/i386/tsc.h>.
4495         * kern/i386/pit.c: Replace <grub/cpu/io.h> with <grub/i386/io.h>.
4497 2008-08-07  Bean  <bean123ch@gmail.com>
4499         * conf/i386-efi.rmk (kernel_mod_SOURCES): Add kern/time.c.
4501         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add kern/time.c,
4503         * include/grub/i386/pit.h: Use macro KERNEL_CPU_PIT_HEADER to avoid
4504         multiple inclusion. Add #include <grub/types.h>.
4506 2008-08-06  Christian Franke  <franke@computer.org>
4508         * conf/common.rmk: Build and install `10_windows'.
4509         * util/grub.d/10_windows.in: New script.
4511 2008-08-06  Pavel Roskin  <proski@gnu.org>
4513         * kern/i386/pit.c: Include `<grub/i386/pit.h>'.
4515 2008-08-06  Robert Millan  <rmh@aybabtu.com>
4517         * conf/i386-coreboot.rmk (kernel_elf_ASFLAGS): New variable.
4518         * kern/i386/tsc.c: Include `<grub/i386/pit.h>'.
4520 2008-08-06  Bean  <bean123ch@gmail.com>
4522         * fs/i386/pc/pxe.c (grub_pxe_data): New member block_size.
4523         (grub_pxefs_fs_int): Remove dummy definition.
4524         (grub_pxefs_open): Use data->block_size to store the current block
4525         size setting.
4526         (grub_pxefs_read): Use block size stored in data->block_size. As the
4527         value of grub_pxe_blksize can be changed after the file is opened.
4529 2008-08-06  Bean  <bean123ch@gmail.com>
4531         * fs/i386/pc/pxe.c (curr_file): new variable.
4532         (grub_pxefs_open): Simply the handling of pxe file system. Don't
4533         require the dummy internal file system anymore.
4534         (grub_pxefs_read): Removed.
4535         (grub_pxefs_close): Likewise.
4536         (grub_pxefs_fs_int): Likewise.
4537         (grub_pxefs_read_int): Renamed to grub_pxefs_read. Reinitialize tftp
4538         connection when we switch file.
4539         (grub_pxefs_close_int): Renamed to grub_pxefs_close.
4541 2008-08-06  Robert Millan  <rmh@aybabtu.com>
4543         * conf/i386-coreboot.rmk (pkglib_MODULES): Add `reboot.mod' and
4544         `halt.mod'.
4545         (reboot_mod_SOURCES, reboot_mod_CFLAGS, reboot_mod_LDFLAGS)
4546         (halt_mod_SOURCES, halt_mod_CFLAGS, halt_mod_LDFLAGS): New variables.
4548         * kern/i386/halt.c: New file.
4549         * kern/i386/reboot.c: Likewise.
4550         * include/grub/i386/reboot.h: Likewise.
4551         * include/grub/i386/halt.h: Likewise.
4553         * commands/halt.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]:
4554         Include `<grub/cpu/halt.h>'.
4555         * commands/reboot.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]
4556         [! GRUB_MACHINE_PCBIOS]: Include `<grub/cpu/reboot.h>'.
4558         * term/i386/pc/at_keyboard.c: Include `<grub/cpu/at_keyboard.h>'.
4559         (SHIFT_L, SHIFT_R, CTRL, ALT, CAPS_LOCK, KEYBOARD_REG_DATA)
4560         (KEYBOARD_REG_STATUS, KEYBOARD_COMMAND_ISREADY, KEYBOARD_COMMAND_READ)
4561         (KEYBOARD_COMMAND_WRITE, KEYBOARD_COMMAND_REBOOT)
4562         (KEYBOARD_SCANCODE_SET1, KEYBOARD_ISMAKE, KEYBOARD_ISREADY)
4563         (KEYBOARD_SCANCODE, OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): Move
4564         from here ...
4565         * include/grub/i386/at_keyboard.h: ... to here.
4567 2008-08-05  Robert Millan  <rmh@aybabtu.com>
4569         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pit.c'.
4570         * conf/i386-efi.rmk (kernel_mod_SOURCES): Likewise.
4571         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Likewise. Also add
4572         `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
4573         `kern/generic/millisleep.c'.
4575         * kern/i386/tsc.c (calibrate_tsc): Rewrite using grub_pit_wait()
4576         instead of grub_get_rtc().
4577         (grub_tsc_init): Initialize `tsc_boot_time'.
4579         * kern/i386/linuxbios/init.c (grub_millisleep): Remove stub.
4580         (grub_machine_init): Use grub_tsc_init() rather than
4581         installing an RTC-based handler via grub_install_get_time_ms().
4583         * kern/i386/pit.c: New file.
4584         * include/grub/i386/pit.h: Likewise.
4586 2008-08-05  Bean  <bean123ch@gmail.com>
4588         * boot/i386/pc/pxeboot.S (_start): Use drive number 0x7F for pxe.
4590         * conf/i386-pc.rmk (kernel_img_HEADERS): Add machine/pxe.h.
4591         (pkglib_MODULES): Add pxe.mod and pxecmd.mod.
4592         (pxe_mod_SOURCES): New macro.
4593         (pxe_mod_CFLAGS): Likewise.
4594         (pxe_mod_LDFLAGS): Likewise.
4595         (pxecmd_mod_SOURCES): Likewise.
4596         (pxecmd_mod_CFLAGS): Likewise.
4597         (pxecmd_mod_LDFLAGS): Likewise.
4599         * kern/i386/pc/startup.S (grub_pxe_scan): New function.
4600         (grub_pxe_call): Likewise.
4602         * include/grub/disk.h (grub_disk_dev_id): Add GRUB_DISK_DEVICE_PXE_ID.
4604         * commands/i386/pc/pxecmd.c: New file.
4606         * fs/i386/pc/pxe.c: Likewise.
4608         * include/grub/i386/pc/pxe.h: Likewise.
4610 2008-08-05  Bean  <bean123ch@gmail.com>
4612         * util/console.c (grub_console_cur_color): New variable.
4613         (grub_console_standard_color): Likewise.
4614         (grub_console_normal_color): Likewise.
4615         (grub_console_highlight_color): Likewise.
4616         (color_map): Likewise.
4617         (use_color): Likewise.
4618         (NUM_COLORS): New macro.
4619         (grub_ncurses_setcolorstate): Handle color properly.
4620         (grub_ncurses_setcolor): Don't change color here, just remember the
4621         settings, color will be set in grub_ncurses_setcolorstate.
4622         (grub_ncurses_getcolor): New function.
4623         (grub_ncurses_init): Initialize color pairs.
4624         (grub_ncurses_term): New member grub_ncurses_getcolor.
4626 2008-08-05  Colin D Bennett  <colin@gibibit.com>
4628         High resolution timer support.  Implemented for x86 CPUs using TSC.
4629         Extracted generic grub_millisleep() so it's linked in only as needed.
4630         This requires a Pentium compatible CPU; if the RDTSC instruction is
4631         not supported, then it falls back on the generic grub_get_time_ms()
4632         implementation that uses the machine's RTC.
4634         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/time.c',
4635         `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
4636         `kern/generic/millisleep.c'.
4638         * conf/i386-efi.rmk (kernel_mod_SOURCES): Add `kern/i386/tsc.c',
4639         `kern/generic/rtc_get_time_ms.c' and `kern/generic/millisleep.c'.
4641         * conf/x86_64-efi.rml (kernel_mod_SOURCES): Add
4642         `kern/generic/millisleep.c' and `kern/generic/rtc_get_time_ms.c'.
4644         * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
4646         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
4647         `kern/generic/millisleep.c'.
4649         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
4651         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Add `kern/time.c'.
4653         * kern/generic/rtc_get_time_ms.c: New file.
4655         * kern/generic/millisleep.c: New file.
4657         * kern/misc.c: Don't include
4658         <kern/time.h> anymore.
4659         (grub_millisleep_generic): Removed.
4661         * commands/sleep.c (grub_interruptible_millisleep): Uses
4662         grub_get_time_ms() instead of grub_get_rtc().
4664         * include/grub/i386/tsc.h (grub_get_tsc): New file.  New inline
4665         function.
4666         (grub_cpu_is_cpuid_supported): New inline function.
4667         (grub_cpu_is_tsc_supported): New inline function.
4668         (grub_tsc_init): New function prototype.
4669         (grub_tsc_get_time_ms): New function prototype.
4671         * kern/i386/tsc.c (grub_get_time_ms): New file.
4673         * include/grub/time.h: Include <grub/types.h.
4674         (grub_millisleep_generic): Removed.
4675         (grub_get_time_ms): New prototype.
4676         (grub_install_get_time_ms): New prototype.
4677         (grub_rtc_get_time_ms): New prototype.
4679         * kern/time.c (grub_get_time_ms): New function.
4680         (grub_install_get_time_ms): New function.
4682         * kern/i386/efi/init.c: Include <grub/cpu/tsc.h>.  Don't include
4683         <grub/time.h> anymore.
4684         (grub_millisleep): Removed.
4685         (grub_machine_init): Call grub_tsc_init.
4687         * kern/i386/linuxbios/init.c (grub_machine_init): Install the RTC
4688         get_time_ms() implementation.
4690         * kern/sparc64/ieee1275/init.c (grub_millisleep): Removed.
4691         (ieee1275_get_time_ms): New function.
4692         (grub_machine_init): Install get_time_ms() implementation.
4694         * kern/i386/pc/init.c: Include <grub/cpu/tsc.h>.
4695         (grub_machine_init): Call grub_tsc_init().
4696         (grub_millisleep): Removed.
4698         * kern/ieee1275/init.c (grub_millisleep): Removed.
4699         (grub_machine_init): Install ieee1275_get_time_ms()
4700         implementation.
4701         (ieee1275_get_time_ms): New function.
4702         (grub_get_rtc): Now calls ieee1275_get_time_ms(), which does the
4703         real work.
4705 2008-08-05  Marco Gerards  <marco@gnu.org>
4707         * disk/ata.c: Include <grub/pci.h>.
4708         (enum grub_ata_commands): Add `GRUB_ATA_CMD_EXEC_DEV_DIAGNOSTICS'.
4709         (grub_ata_initialize): Rewritten.
4710         (grub_ata_device_initialize): New function.
4712 2008-08-04  Pavel Roskin  <proski@gnu.org>
4714         * kern/main.c: Include grub/mm.h.
4716 2008-08-04  Robert Millan  <rmh@aybabtu.com>
4718         * conf/i386-coreboot.rmk (COMMON_ASFLAGS, COMMON_CFLAGS)
4719         (COMMON_LDFLAGS): Harmonize with i386-pc version (fixes a code
4720         corruption problem).
4722 2008-08-04  Robert Millan  <rmh@aybabtu.com>
4724         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Fix misc
4725         warnings introduced in my last commit.
4727 2008-08-03  Robert Millan  <rmh@aybabtu.com>
4729         Make PCI available on all i386 architectures.
4731         * include/grub/i386/pc/pci.h: Move from here ...
4732         * include/grub/i386/pci.h: ... to here.
4734         * include/grub/i386/pc/pci.h: Remove.
4735         * include/grub/i386/efi/pci.h: Remove.
4736         * include/grub/x86_64/efi/pci.h: Remove.
4738         * include/grub/pci.h: Replace `<grub/machine/pci.h>' with
4739         `<grub/cpu/pci.h>'.
4741         * conf/i386-coreboot.rmk (pkglib_MODULES): Add `pci' and `lspci'.
4742         (pci_mod_SOURCES, pci_mod_CFLAGS, pci_mod_LDFLAGS, lspci_mod_SOURCES)
4743         (lspci_mod_CFLAGS, lspci_mod_LDFLAGS): New variables.
4745         * conf/i386-ieee1275.rmk: Likewise.
4747 2008-08-03  Robert Millan  <rmh@aybabtu.com>
4749         * term/i386/pc/vga_text.c (CRTC_CURSOR_DISABLE): New macro.
4750         (grub_console_setcursor): Make it possible to set cursor off.
4752 2008-08-03  Robert Millan  <rmh@aybabtu.com>
4754         * util/grub.d/00_header.in: Be platform-agnostic.  Probe for existence
4755         of modules instead of assuming which platform provides what.
4756         * util/update-grub.in: Likewise.
4758 2008-08-03  Robert Millan  <rmh@aybabtu.com>
4760         * kern/i386/pc/init.c (make_install_device): Check for `grub_prefix'
4761         instead of `grub_install_dos_part' to determine whether a drive needs
4762         to be prepended to prefix (`grub_install_dos_part' is not reliable,
4763         because it can be overridden when loading GRUB via Multiboot).
4765 2008-08-02  Robert Millan  <rmh@aybabtu.com>
4767         * util/i386/pc/grub-install.in: Remove trailing slash from prefix.
4769 2008-08-02  Robert Millan  <rmh@aybabtu.com>
4771         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Add a pair
4772         of informational grub_dprintf() calls.
4774 2008-08-02  Robert Millan  <rmh@aybabtu.com>
4776         * disk/memdisk.c (memdisk_size): Don't initialize.
4777         (GRUB_MOD_INIT(memdisk)): Find memdisk using grub_module_iterate().
4779         * include/grub/i386/pc/kernel.h
4780         (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): Remove macro.
4781         (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Shift.
4782         (grub_memdisk_image_size, grub_arch_memdisk_addr)
4783         (grub_arch_memdisk_size): Remove.
4785         * include/grub/kernel.h (struct grub_module_header): Remove `offset'
4786         field (was only used to transfer a constant).  Add `type' field to
4787         support multiple module types.
4788         (grub_module_iterate): New function.
4790         * kern/device.c (grub_device_open): Do not hide error messages
4791         when grub_disk_open() fails.  Use grub_print_error() instead.
4793         * kern/i386/pc/init.c (grub_arch_modules_addr)
4794         (grub_arch_memdisk_size): Remove functions.
4795         (grub_arch_modules_addr): Return the module address in high memory
4796         (now that it isn't copied anymore).
4798         * kern/i386/pc/startup.S (grub_memdisk_image_size): Remove variable.
4799         (codestart): Don't add grub_memdisk_image_size to %ecx in LZMA
4800         decompression routine (grub_total_module_size already includes that
4801         now).  Don't copy modules back to low memory.
4803         * kern/main.c: Include `<grub/mm.h>'.
4804         (grub_load_modules): Split out (and use) ...
4805         (grub_module_iterate): ... this function, which iterates through
4806         module objects and runs a hook.
4807         Comment out grub_mm_init_region() call, as it would cause non-ELF
4808         modules to be overwritten.
4810         * util/i386/pc/grub-mkimage.c (generate_image): Instead of appending
4811         the memdisk image in its own region, make it part of the module list.
4812         * util/elf/grub-mkimage.c (options): Add "memdisk"|'m' option.
4813         (main): Parse --memdisk|-m option, and pass user-provided path as
4814         parameter to generate_image().
4815         (add_segments): Pass `memdisk_path' down to load_modules().
4816         (load_modules): Embed memdisk image in module section when requested.
4817         * util/i386/efi/grub-mkimage.c (make_mods_section): Initialize
4818         `header.type' instead of `header.offset'.
4820         * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add `memdisk.mod'.
4821         (memdisk_mod_SOURCES, memdisk_mod_CFLAGS)
4822         (memdisk_mod_LDFLAGS): New variables.
4823         * conf/i386-coreboot.rmk: Likewise.
4824         * conf/i386-ieee1275.rmk: Likewise.
4826 2008-08-02  Robert Millan  <rmh@aybabtu.com>
4828         * loader/i386/pc/multiboot.c (playground, forward_relocator)
4829         (backward_relocator): New variables.  Used to allocate and relocate
4830         the payload, respectively.
4831         (grub_multiboot_load_elf32): Load into heap instead of requested
4832         address, install the appropriate relocator code in each bound of
4833         the payload, and set the entry point such that
4834         grub_multiboot_real_boot() will jump to one of them.
4836         * kern/i386/loader.S (grub_multiboot_payload_size)
4837         (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
4838         (grub_multiboot_payload_entry_offset): New variables.
4839         (grub_multiboot_real_boot): Set cpu context to what the relocator
4840         expects, and jump to the relocator instead of the payload.
4842         * include/grub/i386/loader.h (grub_multiboot_payload_size)
4843         (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
4844         (grub_multiboot_payload_entry_offset): Export.
4846 2008-08-01  Bean  <bean123ch@gmail.com>
4848         * normal/menu_entry.c (editor_getline): Don't return the original
4849         string as result, as it will be released by lexer once it has done
4850         using it.
4852 2008-08-01  Robert Millan  <rmh@aybabtu.com>
4854         * util/grub.d/10_linux.in: Use prepare_grub_to_access_device() from
4855         within menuentries, not before them.
4856         util/grub.d/10_hurd.in: Likewise.
4858 2008-08-01  Bean  <bean123ch@gmail.com>
4860         * conf/common.rmk (pkglib_MODULES): Add bufio.mod.
4861         (bufio_mod_SOURCES): New macro.
4862         (bufio_mod_CFLAGS): Likewise.
4863         (bufio_mod_LDFLAGS): Likewise.
4865         * include/grub/bufio.h: New file.
4867         * io/bufio.c: Likewise.
4869         * video/png.c: Replace <grub/file.h> with <grub/bufio.h>.
4870         (grub_video_reader_png): Use grub_buffile_open to open file.
4872         * video/jpeg.c: Replace <grub/file.h> with <grub/bufio.h>.
4873         (grub_video_reader_jpeg): Use grub_buffile_open to open file.
4875         * video/tga.c: Replace <grub/file.h> with <grub/bufio.h>.
4876         (grub_video_reader_tga): Use grub_buffile_open to open file.
4878         * font/manager.c: Include <grub/bufio.h>.
4879         (add_font): Use grub_buffile_open to open file.
4881 2008-07-31  Robert Millan  <rmh@aybabtu.com>
4883         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): When loading
4884         ELF segments, use a macro for arbitrarily accessing any of them instead
4885         of preparing a pointer that allows access to one at a time.
4886         (grub_multiboot_load_elf64): Likewise.
4888 2008-07-31  Bean  <bean123ch@gmail.com>
4890         * boot/i386/pc/lnxboot.S (real_code_2): Replace 0x50 with
4891         GRUB_KERNEL_MACHINE_DATA_END.
4893 2008-07-30  Robert Millan  <rmh@aybabtu.com>
4895         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_DATA_END):
4896         Increase from 0x50 to 0x60.
4897         * util/i386/pc/grub-install.in: Detect cross-disk installs, and
4898         use UUIDs to identify the root drive for them.  If that's not
4899         possible, abort.
4900         * util/i386/pc/grub-setup.c (setup): Do not special-case, or even
4901         check, for cross-disk installs.
4903 2008-07-30  Robert Millan  <rmh@aybabtu.com>
4905         * kern/ieee1275/init.c (grub_machine_set_prefix): If `grub_prefix'
4906         is non-empty, use it to set the `prefix' environment variable instead
4907         of the usual approach.
4908         * kern/i386/linuxbios/init.c (make_install_device): Remove function.
4909         (grub_machine_set_prefix): Use `grub_prefix' to set the `prefix'
4910         environment variable instead of dummy make_install_device().
4912         * kern/i386/ieee1275/startup.S: Include `<grub/machine/kernel.h>'.
4913         (start): Insert a data section, with `grub_prefix' variable.
4914         * kern/i386/linuxbios/startup.S: Likewise.
4916         * include/grub/powerpc/ieee1275/kernel.h [!ASM_FILE] (grub_prefix):
4917         New variable reference.
4918         * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX):
4919         New macro.  Defines offset of `grub_prefix' within startup.S (relative
4920         to `start').
4921         (GRUB_KERNEL_MACHINE_DATA_END): New macro.  Defines the end of data
4922         section within startup.S (relative to `start').
4923         * include/grub/i386/coreboot/kernel.h: Likewise.
4925         * util/elf/grub-mkimage.c (add_segments): Receive `prefix' parameter.
4926         Overwrite grub_prefix with its contents, at the beginning of the
4927         first segment.
4928         (main): Understand -p|--prefix.
4930 2008-07-30  Robert Millan  <rmh@aybabtu.com>
4932         * util/grub.d/10_hurd.in: Source ${libdir}/grub/update-grub_lib.
4934 2008-07-30  Robert Millan  <rmh@aybabtu.com>
4936         * term/i386/pc/vga_text.c (grub_console_cls): Use
4937         grub_console_gotoxy() to go back to beginning of the screen.
4938         Found by Patrick Georgi <patrick.georgi@coresystems.de>
4940 2008-07-29  Christian Franke  <franke@computer.org>
4942         * util/update-grub_lib.in (make_system_path_relative_to_its_root):
4943         Add conversion of emulated mount points on Cygwin.
4945 2008-07-29  Christian Franke  <franke@computer.org>
4947         * util/update-grub.in: Add a check for admin
4948         group on Cygwin.
4949         Remove old `grub.cfg.new' before creation.
4950         Add `-f' to `mv' to handle the different filesystem
4951         semantics of Windows.
4953 2008-07-29  Bean  <bean123ch@gmail.com>
4955         * normal/main.c (get_line): Fix buffer overflow bug.
4957 2008-07-28  Robert Millan  <rmh@aybabtu.com>
4959         * partmap/apple.c (GRUB_APPLE_HEADER_MAGIC): New macro.
4960         (struct grub_apple_header): New struct.  Describes the layout of
4961         the partmap header.
4962         (apple_partition_map_iterate): Check the header magic as well as the
4963         partition magic (which was already being checked).
4965 2008-07-28  Pavel Roskin  <proski@gnu.org>
4967         * genmk.rb: Add a warning to the beginning of the output that
4968         it's a generated file and should not be edited.
4970 2008-07-28  Robert Millan  <rmh@aybabtu.com>
4972         * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
4973         with the same number are found, just use issue a warning with
4974         grub_dprintf(), as this error has been reported to be non-fatal.
4976 2008-07-27  Robert Millan  <rmh@aybabtu.com>
4978         * disk/ata.c (grub_ata_dumpinfo): Use grub_dprintf() for debugging
4979         information.
4981 2008-07-27  Bean  <bean123ch@gmail.com>
4983         * fs/fat.c (GRUB_FAT_MAXFILE): New constant.
4984         (grub_fat_find_dir): Ignore case when comparing filename.
4986 2008-07-27  Bean  <bean123ch@gmail.com>
4988         * fs/xfs.c (grub_xfs_dir_header): Change field i8count back to
4989         smallino, as it's more descriptive, and i8count can be confused with
4990         the other field count.
4991         (grub_xfs_iterate_dir): Adjust grub_xfs_dir_entry pointer for small
4992         inode type.
4994 2008-07-27  Bean  <bean123ch@gmail.com>
4996         * commands/crc.c: New file.
4998         * lib/crc.c: Likewise.
5000         * include/grub/lib/crc.h: Likewise.
5002         * util/grub-fstest.c: grub/hexdump.h => grub/lib/hexdump.h.
5004         * commands/hexdump.c: grub/hexdump.h => grub/lib/hexdump.h.
5005         (hexdump): Move this function to ...
5007         * lib/hexdump.c: ... here.
5009         * include/grub/hexdump.h: Renamed to ...
5011         * include/grub/lib/hexdump.h: ... this.
5013         * commands/loadenv.c: grub/envblk.h => grub/lib/envblk.h
5015         * util/grub-editenv.c: Likewise.
5017         * include/envblk.h: Renamed to ...
5019         * include/lib/envblk.h: ... this.
5021         * util/envblk.c: Renamed to ...
5023         * lib/envblk.c: ... this.
5025         * conf/common.rmk (grub_fstest_SOURCES): commands/hexdump.c =>
5026         lib/hexdump.c.
5027         (grub_editenv_SOURCES): util/envblk.c => lib/envblk.c
5028         (pkglib_MODULES): Add crc.mod.
5029         (hexdump_mod_SOURCES): Add lib/hexdump.c.
5030         (loadenv_mod_SOURCES): util/envblk.c => lib/envblk.c.
5031         (crc_mod_SOURCES): New macro.
5032         (crc_mod_CFLAGS): Likewise.
5033         (crc_mod_LDFLAGS): Likewise.
5035         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add lib/hexdump.c.
5037         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
5039         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
5041         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5043         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
5045 2008-07-27  Felix Zielcke  <fzielcke@z-51.de>
5047         * commands/help.c: Include <grub/term.h>.
5048         (TERM_WIDTH): Removed.  Updated all users.
5050 2008-07-27  Pavel Roskin  <proski@gnu.org>
5052         * util/getroot.c (find_root_device): Rephrase a comment to avoid
5053         spurious warnings about a comment within a comment.
5055 2008-07-25  Robert Millan  <rmh@aybabtu.com>
5057         * util/getroot.c (find_root_device): Skip devices that match
5058         /dev/dm-[0-9].  This lets the real device be found for any type of
5059         abstraction (LVM, EVMS, RAID..).
5060         (grub_guess_root_device): Do not traverse /dev/mapper (for LVM)
5061         and /dev/evms (for EVMS) before traversing /dev.  If a /dev/dm-[0-9]
5062         device is found first, find_root_device() will now skip it.
5064 2008-07-24  Pavel Roskin  <proski@gnu.org>
5066         * include/grub/types.h: Use __builtin_bswap32() and
5067         __builtin_bswap64() with gcc 4.3 and newer.
5069 2008-07-24  Christian Franke  <franke@computer.org>
5071         * util/i386/pc/grub-install.in: If `--debug' is specified,
5072         pass `--verbose' to grub-setup.
5073         Abort script if make_system_path_relative_to_its_root() fails.
5075 2008-07-24  Bean  <bean123ch@gmail.com>
5077         * configure.ac: Fixed a bug caused by the previous cygwin patch,
5078         variable `target_platform' should be `platform'.
5080 2008-07-24  Bean  <bean123ch@gmail.com>
5082         * video/reader/png.c (DEFLATE_HLIT_MAX): Change value.
5083         (grub_png_init_fixed_block): New function.
5084         (grub_png_decode_image_data): Handle fixed huffman code compression.
5086 2008-07-24  Bean  <bean123ch@gmail.com>
5088         * common.rmk (bin_UTILITIES): Add grub-pe2elf.
5089         (grub_pe2elf_SOURCES): New macro.
5090         (CLEANFILES): Add grub-pe2elf.
5092         * include/grub/efi/pe32.h (GRUB_PE32_SCN_ALIGN_1BYTES): New constant.
5093         (GRUB_PE32_SCN_ALIGN_2BYTES): Likewise.
5094         (GRUB_PE32_SCN_ALIGN_4BYTES): Likewise.
5095         (GRUB_PE32_SCN_ALIGN_8BYTES): Likewise.
5096         (GRUB_PE32_SCN_ALIGN_16BYTES): Likewise.
5097         (GRUB_PE32_SCN_ALIGN_32BYTES): Likewise.
5098         (GRUB_PE32_SCN_ALIGN_64BYTES): Likewise.
5099         (GRUB_PE32_SCN_ALIGN_SHIFT): Likewise.
5100         (GRUB_PE32_SCN_ALIGN_MASK): Likewise.
5101         (GRUB_PE32_SYM_CLASS_EXTERNAL): Likewise.
5102         (GRUB_PE32_SYM_CLASS_STATIC): Likewise.
5103         (GRUB_PE32_SYM_CLASS_FILE): Likewise.
5104         (GRUB_PE32_DT_FUNCTION): Likewise.
5105         (GRUB_PE32_REL_I386_DIR32): Likewise.
5106         (GRUB_PE32_REL_I386_REL32): Likewise.
5107         (grub_pe32_symbol): New structure.
5108         (grub_pe32_reloc): Likewise.
5110         * util/grub-pe2elf.c: New file.
5112         * configure.ac: Set TARGET_OBJ2ELF if host os is cygwin. Don't test for
5113         start symbol in non pc platform.
5115         * genmk.rb: Use TARGET_OBJ2ELF to convert native object format to elf.
5117         The following patches are from Christian Franke.
5119         * include/grub/dl.h: Remove .previous, gas supports this only
5120         for ELF format.
5122         * include/grub/symbol.h [__CYGWIN__] (#define FUNCTION/VARIABLE):
5123         Remove .type, gas supports this only for ELF format.
5125         * kern/dl.c (grub_dl_resolve_dependencies): Add check for trailing
5126         nullbytes in symbol table. This fixes an infinite loop if table is
5127         zero filled.
5129         * Makefile.in: Add autoconf replacements TARGET_IMG_LDSCRIPT,
5130         TARGET_IMG_LDFLAGS and EXEEXT.
5132         * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Replace -Wl,-N by
5133         TARGET_IMG_LDFLAGS_AC.
5134         (grub_CHECK_STACK_ARG_PROBE): New function.
5136         * conf/i386-pc.rmk: Replace -Wl,-N by TARGET_IMG_LDFLAGS.
5138         * conf/i386-pc-cygwin-ld-img.sc: New linker script.
5140         * configure.ac: Add check for linker script "conf/${target}-img-ld.c"
5141         to set TARGET_IMG_LD* accordingly.
5142         Add check for Cygwin to set TARGET_MOD_OBJCOPY accordingly.
5143         Add call to grub_CHECK_STACK_ARG_PROBE.
5144         Use TARGET_IMG_LDFLAGS to check start, bss_start, end symbols.
5146         * genkernsyms.sh.in: Handle HAVE_ASM_USCORE case.
5148         * genmk.rb: Add EXEEXT to CLEANFILES.
5150 2008-07-23  Robert Millan  <rmh@aybabtu.com>
5152         * Makefile.in (UNICODE_ARROWS, UNICODE_LINES): New variables (they
5153         define the codes for arrows and lines used for the menu).
5154         (ascii.pff): Generate fonts for $(UNICODE_ARROWS) and $(UNICODE_LINES)
5155         as well.
5157         * util/update-grub_lib.in (font_path): Prefer ascii.pff over complete
5158         fonts, because the latter are too slow.
5160 2008-07-21  Bean  <bean123ch@gmail.com>
5162         * kern/i386/pc/startup.S (gate_a20_try_bios): Change test order for
5163         a20. Run keyboard test last, as it will cause macbook to halt.
5165 2008-07-18  Pavel Roskin  <proski@gnu.org>
5167         * kern/dl.c: Go back to using GRUB_CPU_SIZEOF_VOID_P.  We cannot
5168         load foreign architecture modules correctly anyway.  Keep
5169         support for loading host architecture modules, whether we
5170         compile them or not.
5172 2008-07-17  Pavel Roskin  <proski@gnu.org>
5174         * configure.ac: Use -m32 or -m64 regardless of whether we had to
5175         change target_cpu.  The compiler default can mismatch target_cpu
5176         in any case.
5178         * disk/efi/efidisk.c: Fix format warnings on x86_64.
5179         * kern/efi/efi.c: Likewise.
5181         * aclocal.m4 (grub_PROG_TARGET_CC): New macro.  Check if the
5182         target compiler is functional.
5183         * configure.ac: Call grub_PROG_TARGET_CC once all target flags
5184         are set up.
5186         * configure.ac: Default to efi platform for x86_64-apple.  Allow
5187         powerpc64 CPU, default to ieee1275 platform for it.  Split CPU
5188         adjustments from the rest, only do them if target is not
5189         explicitly given.  Merge other adjustments with the final sanity
5190         check.  Remove an extraneous check for supported CPU.  Be
5191         specific which CPU and which platform is not supported.
5193         * configure.ac: Default to pc platform for x86_64.
5195 2008-07-17  Robert Millan  <rmh@aybabtu.com>
5197         Partial LinuxBIOS -> Coreboot rename.
5199         * conf/i386-linuxbios.rmk: Renamed to ...
5200         * conf/i386-coreboot.rmk: ... this.
5201         * Makefile.in (RMKFILES): s/i386-linuxbios.rmk/i386-coreboot.rmk/g.
5202         * configure.ac: Accept "coreboot" as input platform (but maintain
5203         compatibility with "linuxbios").
5204         * include/grub/i386/linuxbios: Renamed to ...
5205         * include/grub/i386/coreboot: ... this.
5207 2008-07-17  Bean  <bean123ch@gmail.com>
5209         * conf/i386/efi.rmk (pkglib_MODULES): add pci.mod and lspci.mod.
5210         (appleldr_mod_SOURCE): New variable.
5211         (appleldr_mod_CFLAGS): Likewise.
5212         (appleldr_mod_LDFLAGS): Likewise.
5213         (pci_mod_SOURCES): Likewise.
5214         (pci_mod_CFLAGS): Likewise.
5215         (pci_mod_LDFLAGS): Likewise.
5216         (lspci_mod_SOURCES): Likewise.
5217         (lspci_mod_CFLAGS): Likewise.
5218         (lspci_mod_LDFLAGS): Likewise.
5220         * conf/x86_64-efi.rmk: New file.
5222         * disk/efi/efidisk.c (grub_efidisk_read): Wrap efi calls with efi_call_N
5223         macro.
5224         (grub_efidisk_write): Likewise.
5226         * include/efi/api.h (efi_call_0): New macro.
5227         (efi_call_1): Likewise.
5228         (efi_call_2): Likewise.
5229         (efi_call_3): Likewise.
5230         (efi_call_4): Likewise.
5231         (efi_call_5): Likewise.
5232         (efi_call_6): Likewise.
5234         * include/grub/efi/chainloader.h (grub_chainloader_cmd): Rename to
5235         grub_rescue_cmd_chainloader.
5237         * include/grub/efi/pe32.h (GRUB_PE32_MACHINE_X86_64): New macro.
5238         (grub_pe32_optional_header): Change some fields based on i386 or
5239         x86_64 platform.
5240         (GRUB_PE32_PE32_MAGIC): Likewise.
5242         * include/grub/efi/uga_draw.h: New file.
5244         * include/grub/elf.h (STN_ABS): New constant.
5245         (R_X86_64_NONE): Relocation constant for x86_64.
5246         (R_X86_64_64): Likewise.
5247         (R_X86_64_PC32): Likewise.
5248         (R_X86_64_GOT32): Likewise.
5249         (R_X86_64_PLT32): Likewise.
5250         (R_X86_64_COPY): Likewise.
5251         (R_X86_64_GLOB_DAT): Likewise.
5252         (R_X86_64_JUMP_SLOT): Likewise.
5253         (R_X86_64_RELATIVE): Likewise.
5254         (R_X86_64_GOTPCREL): Likewise.
5255         (R_X86_64_32): Likewise.
5256         (R_X86_64_32S): Likewise.
5257         (R_X86_64_16): Likewise.
5258         (R_X86_64_PC16): Likewise.
5259         (R_X86_64_8): Likewise.
5260         (R_X86_64_PC8): Likewise.
5262         * include/grub/i386/efi/pci.h: New file.
5264         * include/grub/i386/linux.h (GRUB_LINUX_EFI_SIGNATURE):
5265         Change it value based on platform.
5266         (GRUB_LINUX_EFI_SIGNATURE_0204): New constant.
5267         (GRUB_E820_RAM): Likewise.
5268         (GRUB_E820_RESERVED): Likewise.
5269         (GRUB_E820_ACPI): Likewise.
5270         (GRUB_E820_NVS): Likewise.
5271         (GRUB_E820_EXEC_CODE): Likewise.
5272         (GRUB_E820_MAX_ENTRY): Likewise.
5273         (grub_e820_mmap): New structure.
5274         (linux_kernel_header): Change the efi field according to different
5275         kernel version, also field from linux_kernel_header.
5277         * include/grub/kernel.h (grub_module_info): Add padding for x86_64.
5279         * include/grub/pci.h (GRUB_PCI_ADDR_SPACE_MASK): New constant.
5280         (GRUB_PCI_ADDR_SPACE_MEMORY): Likewise.
5281         (GRUB_PCI_ADDR_SPACE_IO): Likewise.
5282         (GRUB_PCI_ADDR_MEM_TYPE_MASK): Likewise.
5283         (GRUB_PCI_ADDR_MEM_TYPE_32): Likewise.
5284         (GRUB_PCI_ADDR_MEM_TYPE_1M): Likewise.
5285         (GRUB_PCI_ADDR_MEM_TYPE_64): Likewise.
5286         (GRUB_PCI_ADDR_MEM_PREFETCH): Likewise.
5287         (GRUB_PCI_ADDR_MEM_MASK): Likewise.
5288         (GRUB_PCI_ADDR_IO_MASK): Likewise.
5290         * include/grub/x86_64/efi/kernel.h: New file.
5292         * include/grub/x86_64/efi/loader.h: Likewise.
5294         * include/grub/x86_64/efi/machine.h: Likewise.
5296         * include/grub/x86_64/efi/pci.h: Likewise.
5298         * include/grub/x86_64/efi/time.h: Likewise.
5300         * include/grub/x86_64/linux.h: Likewise.
5302         * include/grub/x86_64/setjmp.h: Likewise.
5304         * include/grub/x86_64/time.h: Likewise.
5306         * include/grub/x86_64/types.h: Likewise.
5308         * kern/dl.c (GRUB_CPU_SIZEOF_VOID_P): Changed to
5309          GRUB_TARGET_SIZEOF_VOID_P.
5311         * kern/efi/efi.c (grub_efi_locate_protocol): Wrap efi calls.
5312         (grub_efi_locate_handle): Likewise.
5313         (grub_efi_open_protocol): Likewise.
5314         (grub_efi_set_text_mode): Likewise.
5315         (grub_efi_stall): Likewise.
5316         (grub_exit): Likewise.
5317         (grub_reboot): Likewise.
5318         (grub_halt): Likewise.
5319         (grub_efi_exit_boot_services): Likewise.
5320         (grub_get_rtc): Likewise.
5322         * kern/efi/mm.c (MEMORY_MAP_SIZE): Change to 0x3000 for new models.
5323         (GRUB_CPU_SIZEOF_VOID_P): Changed to GRUB_TARGET_SIZEOF_VOID_P.
5324         (grub_efi_allocate_pages): Wrap efi calls.
5325         (grub_efi_free_pages): Wrap efi calls.
5326         (grub_efi_get_memory_map): Wrap efi calls.
5328         * kern/x86_64/dl.c: New file.
5330         * kern/x86_64/efi/callwrap.S: Likewise.
5332         * kern/x86_64/efi/startup.S: Likewise.
5334         * loader/efi/appleloader.c: Likewise.
5336         * loader/efi/chainloader.c (cmdline): New variable.
5337         (grub_chainloader_unload): Wrap efi calls.
5338         (grub_chainloader_boot): Likewise.
5339         (grub_rescue_cmd_chainloader): Wrap efi calls, handle
5340         command line.
5342         * loader/efi/chainloader_normal.c (chainloader_command):
5343         Change grub_chainloader_cmd to grub_rescue_cmd_chainloader, pass
5344         command line.
5346         * loader/i386/efi/linux.c (allocate_pages): Change allocation
5347         method.
5348         (grub_e820_add_region): New function.
5349         (grub_linux_boot): Construct e820 map from efi map, handle x86_64
5350         booting.
5351         (grub_find_video_card): New function.
5352         (grub_linux_setup_video): New function.
5353         (grub_rescue_cmd_linux): Probe for video information.
5355         * normal/x86_64/setjmp.S: New file.
5357         * term/efi/console.c (map_char): New function.
5358         (grub_console_putchar): Map unicode char.
5359         (grub_console_checkkey): Wrap efi calls.
5360         (grub_console_getkey): Likewise.
5361         (grub_console_getwh): Likewise.
5362         (grub_console_gotoxy): Likewise.
5363         (grub_console_cls): Likewise.
5364         (grub_console_setcolorstate): Likewise.
5365         (grub_console_setcursor): Likewise.
5367         * util/i386/efi/grub-mkimage.c: Add support for x86_64.
5369 2008-07-16  Pavel Roskin  <proski@gnu.org>
5371         * loader/i386/efi/linux.c (allocate_pages): Fix warnings in
5372         format strings.
5374         * util/i386/efi/grub-mkimage.c (get_target_address): Return a
5375         pointer, not an integer.  This fixes a warning and prevents
5376         precision loss on 64-bit systems.
5377         (relocate_addresses): Remove unneeded cast.
5379 2008-07-15  Pavel Roskin  <proski@gnu.org>
5381         * kern/i386/ieee1275/init.c: Include grub/cache.h.
5383         * term/ieee1275/ofconsole.c: Disable code unused on i386.
5385         * kern/ieee1275/ieee1275.c (grub_ieee1275_get_integer_property):
5386         Fix comparison between signed and unsigned.
5388         * include/grub/i386/ieee1275/console.h: Declare
5389         grub_console_init() and grub_console_fini().
5391         * loader/i386/ieee1275/linux.c (grub_set_bootpath): Remove.
5392         It's empty and unused.
5394         * fs/ext2.c (grub_ext2_read_block): Initialize blknr in the
5395         beginning to avoid warnings with some compilers.
5397         * loader/ieee1275/multiboot2.c: Include grub/machine/loader.h.
5398         [__i386__] (grub_mb2_arch_boot): Avoid unnecessary cast.
5400 2008-07-14  Pavel Roskin  <proski@gnu.org>
5402         * kern/env.c (grub_register_variable_hook): Don't copy empty
5403         string, it leaks memory.  Pass "" to grub_env_set(), it should
5404         handle constant strings.
5406         * commands/blocklist.c (grub_cmd_blocklist): Fix format warning.
5407         * commands/cmp.c (grub_cmd_cmp): Likewise.
5408         * kern/dl.c (grub_dl_flush_cache): Likewise.
5409         (grub_dl_load_core): Likewise.
5410         * kern/elf.c (grub_elf32_load_phdrs): Likewise.
5411         (grub_elf64_load_phdrs): Likewise.
5413 2008-07-13  Pavel Roskin  <proski@gnu.org>
5415         * lib/LzmaEnc.c (LzmaEnc_SetProps): Fix warning about comparison
5416         between signed and unsigned.
5417         (LzmaEnc_Finish): Fix warning about an unused parameter.
5419 2008-07-13  Bean  <bean123ch@gmail.com>
5421         * Makefile.in (enable_lzo): New rule.
5423         * conf/i386-pc.rmk (grub_mkimage_SOURCES): New test with enable_lzo.
5425         * configure.ac (ENABLE_LZO): New option --enable-lzo.
5427         * boot/i386/pc/lnxboot.S: #include <config.h>.
5429         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE): Change
5430         its value according to the compression algorithm used, lzo or lzma.
5432         * util/i386/pc/grub-mkimage.c (compress_kernel): Use different
5433         compression algorithm according to configure macro.
5435         * kern/i386/pc/startup.S (codestart): Likewise.
5437         * kern/i386/pc/lzma_decode.S: New file.
5439         * include/grub/lib/LzFind.h: Likewise.
5441         * include/grub/lib/LzHash.h: Likewise.
5443         * include/grub/lib/LzmaDec.h: Likewise.
5445         * include/grub/lib/LzmaEnc.h: Likewise.
5447         * include/grub/lib/LzmaTypes.h: Likewise.
5449         * lib/LzFind.c: Likewise.
5451         * lib/LzmaDec.c: Likewise.
5453         * lib/LzmaEnc.c: Likewise.
5455 2008-07-13  Bean  <bean123ch@gmail.com>
5457         * fs/ext2.c (EXT4_EXTENTS_FLAG): New macro.
5458         (grub_ext4_extent_header): New structure.
5459         (grub_ext4_extent): Likewise.
5460         (grub_ext4_extent_idx): Likewise.
5461         (grub_ext4_find_leaf): New function.
5462         (grub_ext2_read_block): Handle extents.
5464 2008-07-12  Robert Millan  <rmh@aybabtu.com>
5466         * util/i386/pc/grub-mkrescue.in: s/grub-install/grub-mkrescue/g.
5468 2008-07-11  Robert Millan  <rmh@aybabtu.com>
5470         * util/grub.d/40_custom.in: New file. Example on how to add custom
5471         entries to /etc/grub.d.
5472         * conf/common.rmk (%, update-grub_SCRIPTS, CLEANFILES): Install
5473         40_custom (implicitly, by merging all the grub.d rules).
5475 2008-07-11  Pavel Roskin  <proski@gnu.org>
5477         * commands/read.c (grub_getline): Fix invalid memory access.
5478         Don't add newline to the variable value.
5480         * term/i386/pc/serial.c (GRUB_SERIAL_PORT_NUM): New constant.
5481         [!GRUB_MACHINE_PCBIOS] (serial_hw_io_addr): Add COM2 and COM3.
5482         (serial_hw_get_port): Check validity of the port number.
5483         (grub_cmd_serial): Check return value of serial_hw_get_port().
5485 2008-07-07  Pavel Roskin  <proski@gnu.org>
5487         * boot/i386/pc/diskboot.S (notification_string): Replace
5488         "Loading kernel" with just "loading".  This is shorter, less
5489         confusing and saves a few bytes for possible future changes.
5491 2008-07-05  Pavel Roskin  <proski@gnu.org>
5493         * disk/ata.c (grub_ata_dumpinfo): Don't output addressing and
5494         size for ATAPI devices, they are undefined.  Output sector
5495         number in decimal form.
5497         * disk/ata.c: Use named constants for status bits.
5499 2008-07-04  Pavel Roskin  <proski@gnu.org>
5501         * kern/i386/linuxbios/init.c (grub_machine_init): Cast addr to
5502         grub_addr_t before casting it to the void pointer to fix a
5503         warning.  Non-addressable regions are discarded earlier.
5504         (grub_arch_modules_addr): Cast _end to grub_addr_t.
5505         * kern/i386/linuxbios/table.c: Include grub/misc.h.
5506         (check_signature): Don't shadow table_header.
5507         (grub_linuxbios_table_iterate): Cast numeric constants to
5508         grub_linuxbios_table_header_t.
5509         * include/grub/i386/linuxbios/init.h: Add noreturn attribute to
5510         grub_stop().
5512         * kern/ieee1275/init.c: Cast _start and _end to grub_addr_t to
5513         prevent warnings.
5515         * include/grub/misc.h (ALIGN_UP): Avoid unnecessary cast to a
5516         pointer, which can cause warnings.  Support 64-bit addresses.
5518         * util/elf/grub-mkimage.c: Use GRUB_TARGET_SIZEOF_LONG instead
5519         of sizeof(long).  This fixes PowerPC image generation on x86_64.
5521 2008-07-04  Robert Millan  <rmh@aybabtu.com>
5523         This fixes a performance issue when pc & gpt partmap iterators
5524         didn't abort iteration even after our hook found what it was
5525         looking for (often causing expensive probes of non-existent drives).
5527         Some callers relied on previous buggy behaviour, since they would
5528         raise an error when their own hooks caused early abortion of its
5529         iteration.
5531         * kern/device.c (grub_device_open): Improve error message.
5532         * disk/lvm.c (grub_lvm_open): Likewise.
5533         * disk/raid.c (grub_raid_open): Likewise.
5535         * partmap/pc.c (pc_partition_map_iterate): Abort parent iteration
5536         when hook requests it, independently of grub_errno.
5537         (pc_partition_map_probe): Do not fail when find_func() caused
5538         early abortion of pc_partition_map_iterate().
5540         * partmap/gpt.c (gpt_partition_map_iterate): Abort parent iteration
5541         when hook requests it, independently of grub_errno.
5542         (gpt_partition_map_probe): Do not fail when find_func() caused
5543         early abortion of gpt_partition_map_iterate().
5545         * kern/partition.c (grub_partition_iterate): Abort parent iteration
5546         when hook requests it, independently of grub_errno.  Do not fail when
5547         part_map_iterate_hook() caused early abortion of p->iterate().
5549         * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Do not fail
5550         when grub_partition_iterate() returned with non-zero.
5552 2008-07-03  Pavel Roskin  <proski@gnu.org>
5554         * disk/ata.c (grub_ata_pio_write): Check status before writing,
5555         like we do in grub_ata_pio_read().
5556         (grub_ata_readwrite): Always write individual sectors.  Fix the
5557         sector count for the remainder.
5558         (grub_ata_write): Enable writing to ATA devices.  Correctly
5559         report error for ATAPI devices.
5561 2008-07-02  Pavel Roskin  <proski@gnu.org>
5563         * boot/i386/pc/cdboot.S: Add _start entry to fix a linker
5564         warning.
5566         * disk/ata.c (grub_ata_readwrite): Don't increment sector number
5567         for every read sector, we already increment it for the whole
5568         batch.  This fixes reading more than 256 sectors at once.
5570         * util/grub-editenv.c (cmd_info): Cast argument to long
5571         explicitly.  ptrdiff_t reduces to int on i386.
5573         * util/grub-editenv.c (main): Be specific which parameter is
5574         missing.
5576         * disk/memdisk.c (memdisk_addr): Make a pointer to fix warnings.
5577         (memdisk): Make memdisk_orig_addr a pointer.
5579         * fs/reiserfs.c (grub_reiserfs_read): Fix misuse of grub_size_t
5580         for file offsets, use grub_off_t instead.  Fix printf format
5581         warnings.
5583         * fs/reiserfs.c: Remove #warning, TODO list items don't belong
5584         there.  Real unexpected warnings should not drown in the noise
5585         about known problems.
5587         * commands/hexdump.c (grub_cmd_hexdump): Fix misuse of
5588         grub_disk_addr_t for memory addresses.
5590         * loader/aout.c (grub_aout_load): Cast load_addr to pointer
5591         explicitly to fix a warning.
5593         * util/grub-editenv.c (cmd_info): Fix warning in printf format.
5595         * Makefile.in (MODULE_LDFLAGS): New variable.
5596         * aclocal.m4 (grub_PROG_LD_BUILD_ID_NONE): New macro.  Check if
5597         the linker accepts --build-id=none.
5598         * configure.ac: Call grub_PROG_LD_BUILD_ID_NONE.  Substitute
5599         MODULE_LDFLAGS.
5600         * genmk.rb: Use MODULE_LDFLAGS when linking modules.
5602         * fs/xfs.c (struct grub_xfs_dir_header): Use names similar to
5603         those in Linux XFS code.  Provide a way to access 64-bit parent
5604         inode.
5605         (grub_xfs_iterate_dir): Use the new names.  Avoid reading past
5606         the end of struct grub_xfs_dir_header.
5608 2008-07-02  Bean  <bean123ch@gmail.com>
5610         * include/grub/ieee1275.h (grub_ieee1275_flag): New constant
5611         GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
5612         and GRUB_IEEE1275_FLAG_NO_ANSI.
5614         * kern/ieee1275/cmain.c (grub_ieee1275_find_options): Set flag
5615         GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
5616         and GRUB_IEEE1275_FLAG_NO_ANSI for Open Hackware.
5618         * kern/ieee1275/ieee1275.c (grub_ieee1275_interpret): Return
5619         immediately if GRUB_IEEE1275_FLAG_CANNOT_INTERPRET is set.
5621         * kern/ieee1275/init.c (grub_claim_heap): Claim memory directly if
5622         GRUB_IEEE1275_FLAG_FORCE_CLAIM is set.
5624         * term/ieee1275/ofconsole.c (grub_ofconsole_writeesc): Don't output
5625         esc sequence on non ANSI terminal.
5626         (grub_ofconsole_gotoxy): Emulate backspace key on non ANSI terminal.
5628         * util/elf/grub-mkimage.c (add_segments): Move ELF header to the
5629         beginning of file.
5631 2008-07-02  Bean  <bean123ch@gmail.com>
5633         * conf/common.rmk (bin_UTILITIES): Add grub-editenv.
5634         (grub_editenv_SOURCES): New variable.
5635         (pkglib_MODULES): Add loadenv.mod.
5636         (loadenv_mod_SOURCES): New variable.
5637         (loadenv_mod_CFLAGS): Likewise.
5638         (loadenv_mod_LDFLAGS): Likewise.
5640         * include/grub/envblk.h: New file.
5642         * util/envblk.c: New file.
5644         * util/grub-editenv.c: New file.
5646         * commands/loadenv.c: New file.
5648 2008-07-01  Pavel Roskin  <proski@gnu.org>
5650         * include/multiboot2.h (struct multiboot_tag_module): Use char,
5651         not unsigned char.  This fixes warnings and is consistent with
5652         other tags.
5654         * disk/fs_uuid.c (search_fs_uuid): Correctly increment count.
5656         * normal/parser.y: Define YYENABLE_NLS as 0 to fix warnings.
5658         * term/tparm.c (analyze): Always set *popcount.
5660         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Remove useless
5661         cast to fix a warning.
5663         * loader/i386/pc/multiboot2.c (grub_mb2_arch_module_alloc): Use
5664         cast to suppress a warning.
5666         * fs/afs.c (grub_afs_read_block): Return grub_disk_addr_t, as
5667         grub_fshelp_read_file() expects.
5669         * fs/fat.c: Fix UUID calculation on big-endian systems.  We
5670         write uuid as a 32-bit value in CPU byte order, so declare and
5671         use it as such.
5673         * disk/raid.c: Cast grub_dprintf() arguments to unsigned long
5674         long if the format specifier expects it.
5675         * partmap/gpt.c (gpt_partition_map_iterate): Likewise.
5676         * partmap/pc.c (pc_partition_map_iterate): Likewise.
5677         * fs/ntfs.c (grub_ntfs_uuid): Cast data->uuid to unsigned long
5678         long to fix a warning.
5679         * fs/reiserfs.c (grub_reiserfs_read): Change casts in
5680         grub_dprintf() arguments to fix warnings.
5682 2008-06-30  Pavel Roskin  <proski@gnu.org>
5684         * util/i386/pc/grub-setup.c (setup): Write install_dos_part and
5685         install_bsd_part immediately before core.img is embedded or
5686         modified on disk.  This fixes core.img verification if core.img
5687         cannot be embedded.
5689         * util/i386/pc/grub-setup.c (setup): Use core_path_dev, not
5690         core_path to calculate the blocklist.
5691         Patch from Javier Martín <lordhabbit@gmail.com>
5693 2008-06-29  Robert Millan  <rmh@aybabtu.com>
5695         * fs/xfs.c (GRUB_XFS_FSB_TO_BLOCK): New macro.  Maps filesystem
5696         block to disk block.
5697         (grub_xfs_read_block): Use GRUB_XFS_FSB_TO_BLOCK() on result.
5698         Patch from Niels Böhm <bitbucket@arcor.de>
5700 2008-06-29  Robert Millan  <rmh@aybabtu.com>
5702         * util/update-grub_lib.in (font_path): Search for fonts in
5703         /boot/grub first, which is more likely to be readable (we aren't
5704         deciding where fonts live, just looking for them).
5706 2008-06-26  Pavel Roskin  <proski@gnu.org>
5708         * util/biosdisk.c (read_device_map): Don't leave dead map
5709         entries for devices failing stat() check.
5711         * util/i386/pc/grub-setup.c (setup): Don't reuse core_path, use
5712         core_path_dev for the core.img path on the target device.
5714 2008-06-26  Robert Millan  <rmh@aybabtu.com>
5716         * disk/fs_uuid.c: New file.
5717         * conf/common.rmk (pkglib_MODULES): Add `fs_uuid.mod'.
5718         (fs_uuid_mod_SOURCES, fs_uuid_mod_CFLAGS)
5719         (fs_uuid_mod_LDFLAGS): New variables.
5720         * include/grub/disk.h (grub_disk_dev_id): Add
5721         `GRUB_DISK_DEVICE_UUID_ID'.
5722         * kern/disk.c (grub_disk_dev_iterate): Allow disk devices not to
5723         implement iterate().
5725 2008-06-26  Robert Millan  <rmh@aybabtu.com>
5727         * util/grub.d/10_linux.in: Avoid passing UUIDs to Linux when either
5728         "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" does not exist, or when a
5729         Linux image includes no initrd.
5731 2008-06-21  Javier Martín  <lordhabbit@gmail.com>
5733         * util/i386/pc/grub-setup.c (setup): Remove literal "core.img" in a
5734         call to resolve the core image location that effectively appended the
5735         name twice.
5737 2008-06-21  Robert Millan  <rmh@aybabtu.com>
5739         * util/grub.d/00_header.in: Move last prepare_grub_to_access_device()
5740         call from here ...
5742         * util/grub.d/10_hurd.in: ... to here ...
5743         * util/grub.d/10_linux.in: ... and here.
5745 2008-06-19  Robert Millan  <rmh@aybabtu.com>
5747         * kern/main.c (grub_main): Export `prefix' variable immediately
5748         after it has been set by grub_machine_set_prefix().
5750 2008-06-19  Robert Millan  <rmh@aybabtu.com>
5752         * commands/search.c (search_label, search_fs_uuid, search_file): Print
5753         search result when not saving to variable, not the other way around.
5754         When saving to variable, abort iteration as soon as a match is found.
5756 2008-06-19  Robert Millan  <rmh@aybabtu.com>
5758         * util/update-grub_lib.in (prepare_grub_to_access_device): Remove
5759         check for partition that provides /boot/grub.  Its logic is flawed,
5760         as it prevents prepare_grub_to_access_device() from being called
5761         multiple times.
5763 2008-06-19  Robert Millan  <rmh@aybabtu.com>
5765         * util/update-grub_lib.in (prepare_grub_to_access_device): Issue
5766         "insmod" command directly when abstraction modules are needed,
5767         instead of relying on GRUB_PRELOAD_MODULES (which had no effect
5768         since it had already been processed).
5770 2008-06-19  Pavel Roskin  <proski@gnu.org>
5772         * conf/i386-efi.rmk: Recompile grub-mkimage.c if Makefile has
5773         changed.  This is needed in case GRUB_LIBDIR changes.
5774         * conf/i386-ieee1275.rmk: Likewise.
5775         * conf/i386-linuxbios.rmk: Likewise.
5776         * conf/i386-pc.rmk: Likewise.
5777         * conf/powerpc-ieee1275.rmk: Likewise.
5779 2008-06-18  Pavel Roskin  <proski@gnu.org>
5781         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Rename
5782         kernel_elf_symlist.c to symlist.c for consistency with other
5783         architectures.  Update all users.
5784         * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
5786 2008-06-18  Robert Millan  <rmh@aybabtu.com>
5788         * util/i386/pc/grub-install.in: If the drive is LVM or RAID, prepend
5789         it in prefix.
5791         * util/i386/pc/grub-setup.c (main): Don't handle prefix at all.  Set
5792         `must_embed' to 1 when root_dev is a RAID device.  When dest_dev is
5793         a RAID device, run setup() for all members independently on whether
5794         LVM abstraction is being used.
5795         (setup): Don't handle prefix at all; let grub-mkimage take care of it.
5796         If grub-mkimage has set `*install_dos_part == -2', don't override this
5797         value.
5798         Perform *install_dos_part adjustments independently on whether
5799         we're embedding or not.
5800         Clarify error message when image is too big for embedding.
5801         Remove duplicate *install_dos_part stanza.
5803 2008-06-17  Robert Millan  <rmh@aybabtu.com>
5805         * term/ieee1275/ofconsole.c (fgcolor, bgcolor): Remove variables.
5806         (grub_ofconsole_normal_color, grub_ofconsole_highlight_color): New
5807         variables.
5808         (grub_ofconsole_setcolor, grub_ofconsole_getcolor): Load/store
5809         values in grub_ofconsole_normal_color and
5810         grub_ofconsole_highlight_color (they're not directly related to
5811         background and foreground).
5812         (grub_ofconsole_setcolorstate): Extract background and foreground
5813         from grub_ofconsole_normal_color and grub_ofconsole_highlight_color.
5815 2008-06-17  Robert Millan  <rmh@aybabtu.com>
5817         * util/update-grub_lib.in (prepare_grub_to_access_device): Use
5818         /boot/grub for the check in last commit, not /boot (they could be
5819         different partitions).
5821 2008-06-16  Robert Millan  <rmh@aybabtu.com>
5823         * util/update-grub_lib.in (prepare_grub_to_access_device): If we were
5824         asked to setup access for the same partition that provides /boot,
5825         don't bother using UUIDs since our root already has the value we
5826         want.
5828 2008-06-16  Robert Millan  <rmh@aybabtu.com>
5830         * util/biosdisk.c (convert_system_partition_to_system_disk): Detect
5831         I2O devices.
5832         Patch from Sven Mueller <sven@debian.org>.
5834 2008-06-16  Robert Millan  <rmh@aybabtu.com>
5836         * util/update-grub.in: Check for $EUID instead of $UID.
5837         Reported by Vincent Zweije.
5839 2008-06-16  Bean  <bean123ch@gmail.com>
5841         * fs/ext2.c (grub_ext2_blockgroup): Revert to pre-journal state.
5842         (grub_ext2_read_block): Likewise.
5843         (grub_ext2_read_inode): Likewise.
5844         (grub_ext2_mount): Likewise.
5845         (grub_ext2_close): Likewise.
5846         (grub_ext3_get_journal): Removed.
5848         * fs/reiserfs.c (grub_reiserfs_get_item): Revert to pre-journal state.
5849         (grub_reiserfs_read_symlink): Likewise.
5850         (grub_reiserfs_mount): Likewise.
5851         (grub_reiserfs_open): Likewise.
5852         (grub_reiserfs_read): Likewise.
5853         (grub_reiserfs_close): Likewise.
5854         (grub_reiserfs_get_journal): Removed.
5856         * fs/fshelp.c (grub_fshelp_read): Removed.
5857         (grub_fshelp_map_block): Likewise.
5859         * include/grub/fshelp.h (grub_fshelp_journal_type): Removed.
5860         (grub_fshelp_journal): Likewise.
5861         (grub_fshelp_read): Likewise.
5862         (grub_fshelp_map_block): Likewise.
5864 2008-06-16  Pavel Roskin  <proski@gnu.org>
5866         * conf/powerpc-ieee1275.rmk: Remove -msoft-float, we don't use
5867         floating point anymore.
5868         * include/grub/powerpc/libgcc.h: Leave only necessary exports.
5870 2008-06-15  Pavel Roskin  <proski@gnu.org>
5872         * commands/ls.c (grub_ls_list_files): Use integer calculations
5873         for human readable format, avoid floating point use.
5874         * kern/misc.c (grub_ftoa): Remove.
5875         (grub_vsprintf): Remove floating point support.
5877 2008-06-15  Robert Millan  <rmh@aybabtu.com>
5879         * util/grub.d/10_linux.in: Use the underlying device for loop-AES
5880         devices.
5881         Reported by Max Vozeler.
5883 2008-06-15  Robert Millan  <rmh@aybabtu.com>
5885         * util/i386/pc/grub-mkimage.c (generate_image): If we included a drive
5886         in our prefix, set install_{dos,bsd}_part = -2 to indicate this can be
5887         skipped later.
5888         (main): If a memdisk was requested, add "(memdisk)" drive explicitly to
5889         the beginning of the prefix.
5891         * kern/i386/pc/init.c (make_install_device): Remove memdisk check.
5892         It is assumed that if we have a memdisk, grub-mkimage has set
5893         grub_prefix to include the "(memdisk)" drive in it.
5895 2008-06-15  Robert Millan  <rmh@aybabtu.com>
5897         * term/i386/pc/console.c [GRUB_MACHINE_LINUXBIOS] (grub_console_init):
5898         Initialize keyboard controller after registering the terminal, so that
5899         grub_printf() can be called from grub_keyboard_controller_init().
5901 2008-06-15  Robert Millan  <rmh@aybabtu.com>
5903         * fs/sfs.c (grub_sfs_read_extent): Fix the count of nodes in
5904         extent-btree which is written as big endian on disk.
5905         Reported by Alain Greppin  <al@chilibi.org>.
5907 2008-06-14  Robert Millan  <rmh@aybabtu.com>
5909         * util/i386/efi/grub-install.in (modules): Remove `_chain'.
5910         * util/i386/pc/grub-install.in (modules): Likewise.
5912 2008-06-13  Pavel Roskin  <proski@gnu.org>
5914         * commands/ls.c (grub_ls_list_files): Fix format warnings.
5916 2008-06-13  Bean  <bean123ch@gmail.com>
5918         * commands/hexdump.c (grub_cmd_hexdump): Adjust offset for partition.
5920         * fs/ext2.c (grub_ext3_get_journal): Fix revoke block handling.
5922         * fs/fshelp.c (grub_fshelp_map_block): Don't map block 0 as it's used
5923         to indicate sparse block.
5925 2008-06-12  Pavel Roskin  <proski@gnu.org>
5927         * fs/ext2.c (grub_ext2_read_inode): Don't normalize block
5928         number, grub_fshelp_read() does it for us.
5930         * fs/fshelp.c (grub_fshelp_read): New function.  Implement
5931         linear disk read with journal translation.
5932         * fs/ext2.c: Use grub_fshelp_read() instead of grub_disk_read().
5933         * include/grub/fshelp.h: Declare grub_fshelp_read().
5935 2008-06-09  Pavel Roskin  <proski@gnu.org>
5937         * fs/minix.c (grub_minix_mount): Handle error reading
5938         superblock.
5940 2008-06-08  Robert Millan  <rmh@aybabtu.com>
5942         * util/i386/pc/grub-setup.c (main): If install drive is an LVM,
5943         don't append the RAID prefix afterwards.
5944         Reported by Clint Adams.
5946 2008-06-08  Robert Millan  <rmh@aybabtu.com>
5948         Based on description from Pavel:
5949         * kern/disk.c (grub_disk_check_range): Rename to ...
5950         (grub_disk_adjust_range): ... this.  Add a comment explaining the
5951         tasks performed by this function.
5953 2008-06-08  Robert Millan  <rmh@aybabtu.com>
5955         * include/grub/ntfs.h (struct grub_ntfs_bpb): Rename `serial_number' to
5956         `num_serial' (for consistency with other variables).
5957         (struct grub_ntfs_data): Add `uuid' member.
5958         * fs/ntfs.c (grub_ntfs_mount): Initialize `data->uuid'.
5959         (grub_ntfs_uuid): New function.
5960         (grub_ntfs_fs): Reference grub_ntfs_uuid() in `uuid' struct member.
5962 2008-06-07  Pavel Roskin  <proski@gnu.org>
5964         * util/biosdisk.c (open_device): Revert last change to the
5965         function, it broke installation.  The sector needs to be
5966         different dependent on which device is opened.
5968 2008-06-06  Robert Millan  <rmh@aybabtu.com>
5970         Ensure GRUB_KERNEL_MACHINE_DATA_END is always consistent with the
5971         rest of GRUB, and breakage doesn't happen if its value were modified.
5973         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
5974         Redefine as an offset from `GRUB_KERNEL_MACHINE_DATA_END' instead of
5975         a constant (same value).
5976         * kern/i386/pc/startup.S: Replace hardcoded `0x50' with
5977         `GRUB_KERNEL_MACHINE_DATA_END' (same value).
5979 2008-06-06  Robert Millan  <rmh@aybabtu.com>
5981         * util/biosdisk.c (open_device): Do not modify sector offset when
5982         accessing a partition.  kern/disk.c already handles this for us.
5984 2008-06-06  Robert Millan  <rmh@aybabtu.com>
5986         * util/grub-emu.c (grub_machine_init): Move code in this function from
5987         here ...
5988         (main): ... to here (before grub_util_biosdisk_init() call, to prevent
5989         segfault in case grub_printf() is called).
5991         * util/i386/pc/grub-install.in: Append `--device-map=${device_map}' to
5992         grub_probe.  Update all users not to explicitly add it again.
5993         (grub_device): New variable; contains corresponding device for grubdir.
5994         (fs_module, partmap_module, devabstraction_module): Pass
5995         `--device ${grub_device}' to grub_probe to avoid traversing /dev
5996         every time.
5998 2008-06-05  Robert Millan  <rmh@aybabtu.com>
6000         * normal/misc.c (grub_normal_print_device_info): When a filesystem UUID
6001         is found, print it (same layout as with labels).
6003 2008-06-04  Robert Millan  <rmh@aybabtu.com>
6005         * util/biosdisk.c (get_drive): Rename to ...
6006         (find_grub_drive): ... this.  Update all users.
6008         (get_os_disk): Rename to ...
6009         (convert_system_partition_to_system_disk): ... this.  Update all users.
6011         (find_drive): Rename to ...
6012         (find_system_device): ... this.  Update all users.
6014 2008-06-04  Robert Millan  <rmh@aybabtu.com>
6016         * util/biosdisk.c (get_os_disk): Handle IDA devices.
6017         * util/grub-mkdevicemap.c (get_mmc_disk_name)
6018         (make_device_map): Likewise.
6020 2008-06-01  Robert Millan  <rmh@aybabtu.com>
6022         *  util/biosdisk.c (get_drive): Verify that `map[i].drive' is non-NULL
6023         before dereferencing it.
6025         * fs/fat.c (struct grub_fat_bpb): Move fat32-specific fields into a
6026         union with fat12/fat16-specific ones.  Add some new fields, including
6027         `num_serial' for both versions.
6028         (struct grub_fat_data): Add `uuid' member.
6029         (grub_fat_mount): Refer to fat32-specific fields in `bpb' by their new
6030         names.  Initialize `data->uuid' using `num_serial'.
6031         (grub_fat_uuid): New function.
6032         (grub_fat_fs): Reference grub_fat_uuid() in `uuid' struct member.
6034         * fs/reiserfs.c (grub_reiserfs_superblock): Add `uuid' field.
6035         (grub_reiserfs_uuid): New function.
6036         (grub_reiserfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct
6037         member.
6039         * fs/xfs.c (grub_xfs_sblock): Add `uuid' field.
6040         (grub_xfs_uuid): New function.
6041         (grub_xfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct member.
6043 2008-06-01  Robert Millan  <rmh@aybabtu.com>
6045         * util/update-grub_lib.in (prepare_grub_to_access_device): Generate
6046         code that is backward compatible with pre-uuid search command.
6048 2008-05-31  Robert Millan  <rmh@aybabtu.com>
6050         * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Iterate through
6051         floppies after everything else, to ensure floppy drive isn't accessed
6052         unnecessarily (patch from Bean).
6054 2008-05-31  Robert Millan  <rmh@aybabtu.com>
6056         * commands/search.c (search_label, search_fs_uuid, search_file): Do
6057         not print device names when we were asked to set a variable.
6059 2008-05-31  Robert Millan  <rmh@aybabtu.com>
6061         * term/ieee1275/ofconsole.c (grub_ofconsole_setcursor): Implement
6062         using "cursor-on" and "cursor-off" commands (understood at least by
6063         the Open Firmware flavour on OLPC).
6065 2008-05-31  Michael Gorven  <michael@gorven.za.net>
6067         * term/terminfo.c (grub_terminfo_set_current): Correct vt100 cursor
6068         on and off sequences.
6070 2008-05-31  Robert Millan  <rmh@aybabtu.com>
6072         * util/update-grub_lib.in: Replace `grub-probe' with `${grub_probe}'.
6073         * util/update-grub.in: Likewise.
6075 2008-05-30  Pavel Roskin  <proski@gnu.org>
6077         * util/biosdisk.c (linux_find_partition): Simplify logic and
6078         make the code more universal.  Keep special processing for
6079         devfs, but use a simple rule for all other devices.  If the
6080         device ends with a number, append 'p' and the partition number.
6081         Otherwise, append only the partition number.
6083 2008-05-30  Robert Millan  <rmh@aybabtu.com>
6085         * util/update-grub.in (GRUB_DISABLE_LINUX_UUID): Export variable.
6086         * util/grub.d/10_linux.in: If GRUB_DEVICE_UUID is set, and
6087         GRUB_DISABLE_LINUX_UUID isn't true, use the filesystem UUIDs as
6088         the `root' parameter to Linux.
6090 2008-05-30  Robert Millan  <rmh@aybabtu.com>
6092         * commands/search.c (options): Rename --fs_uuid to --fs-uuid.
6093         * util/update-grub_lib.in (prepare_grub_to_access_device): Replace
6094         --fs_uuid with --fs-uuid.
6095         * util/update-grub.in: Allow filesystem UUID probes to fail (since not
6096         all filesystems support them).
6098 2008-05-30  Robert Millan  <rmh@aybabtu.com>
6100         * fs/ext2.c (grub_ext2_uuid): Use `04x' instead of '02x' as
6101         grub_printf() flags, since we're printing in units of 2 bytes.
6103 2008-05-30  Robert Millan  <rmh@aybabtu.com>
6105         * util/grub.d/00_header.in: Remove obsolete comment referencing
6106         convert_system_path_to_grub_path().
6107         * util/update-grub.in: Likewise.
6108         * util/update-grub_lib.in (is_path_readable_by_grub): New function.
6109         (convert_system_path_to_grub_path): Add a warning message explaining
6110         that this function is deprecated.  Rely on is_path_readable_by_grub()
6111         for the readability checks.
6112         (font_path): Use is_path_readable_by_grub() for the readability
6113         check rather than convert_system_path_to_grub_path().
6115 2008-05-30  Robert Millan  <rmh@aybabtu.com>
6117         * util/update-grub_lib.in (prepare_grub_to_access_device): New function.
6118         * util/update-grub.in: Set `GRUB_FONT_PATH' to the system path, without
6119         converting it first.
6120         * util/grub.d/00_header.in: Use prepare_grub_to_access_device() to setup
6121         grub.cfg for access to font file, and afterwards call it again to set
6122         the root device.
6124 2008-05-30  Robert Millan  <rmh@aybabtu.com>
6126         * commands/search.c (options): Add --fs_uuid option.
6127         (search_fs_uuid): New function.
6128         (grub_cmd_search): Fix --set argument passing.
6129         Use search_fs_uuid() when requested via --fs_uuid.
6130         (grub_search_init): Update help message.
6131         * fs/ext2.c (struct grub_ext2_sblock): Rename `unique_id' to `uuid'
6132         and redeclare it as an array of 16-bit words.
6133         (grub_ext2_uuid): New function.
6134         (grub_ext2_fs): Reference grub_ext2_uuid() in `uuid' struct member.
6135         * include/grub/fs.h (struct grub_fs): Add `uuid' struct member.
6136         * util/update-grub.in (GRUB_DEVICE_UUID, GRUB_DEVICE_BOOT)
6137         (GRUB_DEVICE_BOOT_UUID): New variables.
6138         (GRUB_DRIVE. GRUB_DRIVE_BOOT. GRUB_DRIVE_BOOT_GRUB): Remove.
6139         * util/grub.d/00_header.in: Set root using `search --fs_uuid' command
6140         whenever possible.
6141         * util/grub.d/10_hurd.in: Avoid explicit use of root drive.  Instead,
6142         just assume `root' variable has the right value.
6143         * util/grub.d/10_linux.in: Likewise.
6144         * util/grub-probe.c (probe): Probe for filesystem UUID when requested
6145         via PRINT_FS_UUID.
6146         (main): Recognise `-t fs_uuid' argument.
6148 2008-05-30  Robert Millan  <rmh@aybabtu.com>
6150         * util/biosdisk.c (map): Redefine structure to hold information
6151         about GRUB drive name.
6152         (get_drive): Reimplement without assuming (and verifying) BIOS-like
6153         drive names.
6154         (call_hook): Remove.
6155         (grub_util_biosdisk_iterate): Access drive names via `.drive' struct
6156         member.  Assume drive has partitions.
6157         (grub_util_biosdisk_open): Access device names via `.device' struct
6158         member.
6159         (open_device): Likewise.
6160         (find_drive): Likewise.
6161         (read_device_map): Adjust map[] usage to match the new struct
6162         definition.  Don't check for duplicates (still possible, but not cheap
6163         anymore).
6164         (grub_util_biosdisk_fini): Free malloced buffers referenced by map[].
6165         (make_device_name): Remove assumption of BIOS-like drive names.
6167 2008-05-30  Pavel Roskin  <proski@gnu.org>
6169         * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Remove, as
6170         compiling execute.c doesn't need grub_script.tab.h anymore.
6171         (normal/command.c_DEPENDENCIES): Likewise.
6172         (normal/function.c_DEPENDENCIES): Likewise.
6173         * conf/i386-ieee1275.rmk: Likewise.
6174         * conf/i386-linuxbios.rmk: Likewise.
6175         * conf/i386-pc.rmk: Likewise.
6176         * conf/powerpc-ieee1275.rmk: Likewise.
6177         * conf/sparc64-ieee1275.rmk: Likewise.
6179 2008-05-29  Pavel Roskin  <proski@gnu.org>
6181         * disk/lvm.c (grub_lvm_scan_device): Check for the buffer end
6182         when scanning metadata for volume group name.
6184         * include/grub/script.h: Don't include grub_script.tab.h.  It's
6185         a generated file, which may only be included from the files with
6186         DEPENDENCIES rules in the makefile.  Don't use typedef YYSTYPE,
6187         use union YYSTYPE, as the later allows forward declaration.
6188         * normal/lexer.c: Don't use typedef YYSTYPE, use union YYSTYPE.
6190 2008-05-29  Robert Millan  <rmh@aybabtu.com>
6192         * term/i386/pc/at_keyboard.c: Include `grub/machine/machine.h'.
6193         (OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): New macros.
6194         [GRUB_MACHINE_IEEE1275] (keyboard_map): Add OLPC scan codes
6195         (grub_console_checkkey): Add grub_dprintf() call to report unknown
6196         scan codes.
6198 2008-05-29  Robert Millan  <rmh@aybabtu.com>
6200         * term/i386/pc/at_keyboard.c (grub_console_checkkey): Add support for
6201         control key combinations.
6203 2008-05-29  Robert Millan  <rmh@aybabtu.com>
6205         * util/powerpc/ieee1275/grub-install.in: Move from here ...
6206         * util/ieee1275/grub-install.in: ... to here.
6207         * powerpc-ieee1275.rmk (grub_install_SOURCES): Update location.
6208         * i386-ieee1275.rmk (sbin_SCRIPTS): New variable.
6209         (grub_install_SOURCES): Likewise.
6211 2008-05-29  Robert Millan  <rmh@aybabtu.com>
6213         * fs/affs.c: Update copyright year.
6214         * fs/ext2.c: Likewise.
6215         * fs/fshelp.c: Likewise.
6216         * fs/hfsplus.c: Likewise.
6217         * fs/ntfs.c: Likewise.
6218         * fs/xfs.c: Likewise.
6219         * include/grub/fshelp.h: Likewise.
6220         * util/grub-mkdevicemap.c: Likewise.
6222 2008-05-28  Robert Millan  <rmh@aybabtu.com>
6224         * util/update-grub.in: Allow chmod call to fail, since /boot/grub/
6225         might need to be fatfs to support some firmware implementations
6226         (e.g. OFW or EFI).
6228 2008-05-28  Robert Millan  <rmh@aybabtu.com>
6230         * util/biosdisk.c (linux_find_partition, get_os_disk): Handle MMC
6231         devices.
6232         * util/grub-mkdevicemap.c (get_mmc_disk_name)
6233         (make_device_map): Likewise.
6235 2008-05-20  Bean  <bean123ch@gmail.com>
6237         * fs/fshelp.c (grub_fshelp_map_block): New function.
6238         (grub_fshelp_find_file): Use 64-bit type for pos and block address.
6239         Use `>>' and `&' operator to avoid 64-bit divide and modulo.
6241         * include/grub/fshelp.h (grub_fshelp_journal_type): New enum.
6242         (GRUB_FSHELP_JOURNAL_UNUSED_MAPPING): New macro.
6243         (grub_fshelp_journal): New structure.
6244         (grub_fshelp_map_block): New function prototype.
6245         (grub_fshelp_read_file): Use grub_disk_addr_t as block type.
6246         (grub_fshelp_map_block): Likewise.
6248         * fs/ext2.c (EXT3_FEATURE_COMPAT_HAS_JOURNAL): New macro.
6249         (EXT3_JOURNAL_MAGIC_NUMBER): Likewise.
6250         (EXT3_JOURNAL_DESCRIPTOR_BLOCK): Likewise.
6251         (EXT3_JOURNAL_COMMIT_BLOCK): Likewise.
6252         (EXT3_JOURNAL_SUPERBLOCK_V1): Likewise.
6253         (EXT3_JOURNAL_SUPERBLOCK_V2): Likewise.
6254         (EXT3_JOURNAL_REVOKE_BLOCK): Likewise.
6255         (EXT3_JOURNAL_FLAG_ESCAPE): Likewise.
6256         (EXT3_JOURNAL_FLAG_SAME_UUID): Likewise.
6257         (EXT3_JOURNAL_FLAG_DELETED): Likewise.
6258         (EXT3_JOURNAL_FLAG_LAST_TAG): Likewise.
6259         (grub_ext2_sblock): New members for journal support.
6260         (grub_ext3_journal_header): New structure.
6261         (grub_ext3_journal_revoke_header): Likewise.
6262         (grub_ext3_journal_block_tag): Likewise.
6263         (grub_ext3_journal_sblock): Likewise.
6264         (grub_fshelp_node): New members logfile and journal.
6265         (grub_ext2_read_block): Change block type to grub_disk_addr_t. Use
6266         grub_fshelp_map_block to get real block number.
6267         (grub_ext2_blockgroup): Use grub_fshelp_map_block to get real block
6268         number.
6269         (grub_ext2_read_inode): Likewise.
6270         (grub_ext3_get_journal): New function.
6271         (grub_read_inode): Initialize journal using grub_ext3_get_journal.
6272         (grub_ext2_close): Release memory used by journal.
6274         * fs/reiserfs.c (REISERFS_MAGIC_STRING): Changed to "ReIsEr".
6275         (REISERFS_MAGIC_DESC_BLOCK): New macro.
6276         (grub_reiserfs_transaction_header): Renamed to
6277         grub_reiserfs_description_block, replace field data with real_blocks.
6278         (grub_reiserfs_commit_block): New structure.
6279         (grub_reiserfs_data): New member journal.
6280         (grub_reiserfs_get_item): Use grub_fshelp_map_block to get real block
6281         number.
6282         (grub_reiserfs_read_symlink): Likewise.
6283         (grub_reiserfs_iterate_dir): Likewise.
6284         (grub_reiserfs_open): Likewise.
6285         (grub_reiserfs_read): Likewise.
6286         (grub_reiserfs_get_journal): New function.
6287         (grub_reiserfs_mount): Use "ReIsEr" as super block magic, as there are
6288         three varieties ReIsErFs, ReIsEr2Fs and ReIsEr3Fs. Initialize journal
6289         using grub_reiserfs_get_journal.
6290         (grub_reiserfs_close): Release memory used by journal.
6292         * fs/affs.c (grub_affs_read_block): Change block type to
6293         grub_disk_addr_t. Use grub_divmod64 to do 64-bit division.
6295         * fs/afs.c (grub_afs_read_block): Change block type to grub_disk_addr_t.
6297         * fs/hfsplus.c (grub_hfsplus_read_block): Likewise.
6299         * fs/ntfs.c (grub_ntfs_read_block): Likewise.
6301         * fs/udf.c (grub_udf_read_block): Change block type to
6302         grub_disk_addr_t. Use type cast to avoid warning.
6304         * fs/xfs.c (grub_xfs_read_block): Likewise.
6306 2008-05-16  Christian Franke  <franke@computer.org>
6308         * commands/cat.c (grub_cmd_cat): Remove non-ESC keys from keyboard queue
6309         to ensure that break with ESC will always work.
6310         * commands/sleep.c (grub_interruptible_millisleep): Likewise.
6311         Remove ESC from keyboard queue.
6313 2008-05-16  Christian Franke  <franke@computer.org>
6315         * util/biosdisk.c: [__CYGWIN__] Add includes.
6316         (grub_util_biosdisk_open): Use Linux code also for Cygwin.
6317         (get_os_disk): Move variable declarations to OS specific
6318         parts to avoid warning.
6319         [__GNU__] (get_os_disk): Fix /dev/sdXsN case.
6320         [__CYGWIN__] (get_os_disk): Add Cygwin /dev/sdXN device names.
6321         (grub_util_biosdisk_get_grub_dev): Use Linux code also for
6322         Cygwin.
6323         * util/getroot.c: [__CYGWIN__] Add includes.
6324         (strip_extra_slashes): Fix "/" case.
6325         [__CYGWIN__] (get_win32_path): New function.
6326         [__CYGWIN__] (grub_get_prefix): Add conversion to win32 path.
6327         [__CYGWIN__] (find_root_device): Disable.
6328         [__CYGWIN__] (get_bootsec_serial): New function.
6329         [__CYGWIN__] (find_cygwin_root_device): Likewise.
6330         [__linux__] (grub_guess_root_device): Add early returns to simplify
6331         structure.
6332         [__CYGWIN__] (grub_guess_root_device): Call find_cygwin_root_device.
6333         [__linux__] (grub_util_get_dev_abstraction): Enable LVM and RAID
6334         check for Linux only.
6336 2008-05-15  Bean  <bean123ch@gmail.com>
6338         * kern/i386/pc/startup.S (grub_console_getkey): Workaround for the
6339         keyboard hang problem in apple's intel mac.
6341 2008-05-09  Robert Millan  <rmh@aybabtu.com>
6343         * util/biosdisk.c (linux_find_partition, get_os_disk): Handle Virtio
6344         devices.
6345         * util/grub-mkdevicemap.c (get_virtio_disk_name)
6346         (make_device_map): Likewise.
6347         Reported by Aurelien Jarno <aurel32@debian.org>
6349 2008-05-07  Ian Campbell  <ijc@hellion.org.uk>
6351         * util/biosdisk.c (get_os_disk): Recognise xvd type disks.
6352         * util/grub-mkdevicemap.c (get_xvd_disk_name): New function.
6353         (make_device_map): Output entries for xvd type disks.
6355 2008-05-07  Robert Millan  <rmh@aybabtu.com>
6357         * util/biosdisk.c (linux_find_partition, get_os_disk): Handle CCISS
6358         devices.
6359         * util/grub-mkdevicemap.c (get_cciss_disk_name)
6360         (make_device_map): Likewise.
6361         Reported by Roland Dreier <rdreier@cisco.com>
6363 2008-05-07  Robert Millan  <rmh@aybabtu.com>
6365         * disk/lvm.c (grub_lvm_scan_device): Detect errors in an additional
6366         grub_strstr() call.  Correct a few mistakes in failure path handling.
6368 2008-05-06  Robert Millan  <rmh@aybabtu.com>
6370         * util/update-grub_lib.in (make_system_path_relative_to_its_root):
6371         Do not print a trailing slash (therefore, the root directory is an
6372         empty string).
6373         (convert_system_path_to_grub_path): Do not remove trailing slash
6374         from make_system_path_relative_to_its_root() output.
6376         * util/i386/pc/grub-install.in: Add trailing slash to output from
6377         make_system_path_relative_to_its_root().
6379 2008-05-06  Robert Millan  <rmh@aybabtu.com>
6381         * util/grub-fstest.c (grub_refresh): Call `fflush (stdout)'.  This
6382         ensures that output lines aren't intermangled with those sent to
6383         stderr (via grub_util_info()).
6384         * util/grub-probe.c (grub_refresh): Likewise.
6385         * util/i386/pc/grub-setup.c (grub_refresh): Likewise.
6387 2008-05-05  Christian Franke  <franke@computer.org>
6389         * util/grub-mkdevicemap.c (get_floppy_disk_name) [__CYGWIN__]:
6390         Add Cygwin device names.
6391         (get_ide_disk_name) [__CYGWIN__]: Likewise.
6392         (get_scsi_disk_name) [__CYGWIN__]: Likewise.
6393         (check_device): Return error instead of success on empty name.
6394         (make_device_map): Move label inside linux specific code to
6395         prevent compiler warning.
6397 2008-04-30  Robert Millan  <rmh@aybabtu.com>
6399         Based on patch from Fabian Greffrath <greffrath@leat.rub.de>
6400         * util/grub.d/10_linux.in: Add ${GRUB_CMDLINE_LINUX_DEFAULT} to the
6401         first boot option.
6402         * util/update-grub.in: Export GRUB_CMDLINE_LINUX_DEFAULT.
6404 2008-04-29  Robert Millan  <rmh@aybabtu.com>
6406         * docs/grub.cfg: New file (example GRUB configuration).
6408 2008-04-26  Robert Millan  <rmh@aybabtu.com>
6410         * DISTLIST: Sort (sort -u < DISTLIST | sponge DISTLIST).  Add
6411         `loader/i386/ieee1275/linux.c', `loader/i386/ieee1275/linux_normal.c'
6412         and `disk/ieee1275/nand.c'.
6414 2008-04-25  Bean  <bean123ch@gmail.com>
6416         * Makefile.in (RMKFILES): Add missing arch i386-ieee1275 and
6417         i386-linuxbios.
6419         * commands/hexdump.c (grub_cmd_hexdump): Support dumping of device,
6420         change the buffer size to 4096 for cdrom device.
6422         * conf/i386-ieee1275.rmk (pkglib_MODULES): Add _linux.mod, linux.mod
6423         and nand.mod.
6424         (_linux_mod_SOURCES): New variable.
6425         (_linux_mod_CFLAGS): Likewise.
6426         (_linux_mod_LDFLAGS): Likewise.
6427         (linux_mod_SOURCES): Likewise.
6428         (linux_mod_CFLAGS): Likewise.
6429         (linux_mod_LDFLAGS): Likewise.
6430         (nand_mod_SOURCES): Likewise.
6431         (nand_mod_CFLAGS): Likewise.
6432         (nand_mod_LDFLAGS): Likewise.
6434         * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Return
6435         GRUB_ERR_UNKNOWN_DEVICE instead of GRUB_ERR_BAD_DEVICE if no device
6436         type property. (nand device in olpc don't have this property)
6438         * include/grub/disk.h (grub_disk_dev_id): New macro
6439         GRUB_DISK_DEVICE_NAND_ID.
6441         * include/grub/i386/ieee1275/loader.h (grub_rescue_cmd_linux): New
6442         function prototype.
6443         (grub_rescue_cmd_initrd): Likewise.
6445         * include/grub/i386/linux.h (GRUB_LINUX_OFW_SIGNATURE): New macro.
6446         (linux_kernel_params): Add new member ofw_signature, ofw_num_items,
6447         ofw_cif_handler and ofw_idt, adjust padding number.
6449         * include/grub/i386/pc/memory.h (grub_upper_mem): Export it if
6450         GRUB_MACHINE_IEEE1275 is defined.
6452         * include/grub/ieee1275/ieee1275.h (grub_available_iterate):
6453         Use NESTED_FUNC_ATTR attribute on the hook parameter.
6455         * kern/powerpc/ieee1275/init.c (grub_claim_heap): Use NESTED_FUNC_ATTR
6456         on nested function heap_init.
6457         (grub_upper_mem): New variable for i386-ieee1275.
6458         (grub_get_extended_memory): New function for i386-ieee1275.
6459         (grub_machine_init): Call grub_get_extended_memory for i386-ieee1275.
6461         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Use
6462         NESTED_FUNC_ATTR on the hook parameter. Don't quit if no device type
6463         property.
6465         * loader/i386/ieee1275/linux.c: New file.
6467         * loader/i386/ieee1275/linux_normal.c: New file.
6469         * disk/ieee1275/nand.c: New file.
6471 2008-04-18  Thomas Schwinge  <tschwinge@gnu.org>
6473         * util/i386/pc/grub-mkrescue.in (grub_mkimage): Don't overwrite correct
6474         value.
6475         * util/powerpc/ieee1275/grub-mkrescue.in (grub_mkimage): Likewise.
6477 2008-04-18  Robert Millan  <rmh@aybabtu.com>
6479         Restructures early code path on ieee1275 to unify grub_main() as
6480         the first C function that is executed in every platform.
6482         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_init): New prototype.
6483         * kern/i386/ieee1275/startup.S (_start): Jump to grub_main() instead of
6484         cmain().
6485         * kern/powerpc/ieee1275/crt0.S (_start): Likewise.
6486         * kern/ieee1275/cmain.c (cmain): Rename to ...
6487         * kern/ieee1275/cmain.c (grub_ieee1275_init): ... this.
6488         * kern/ieee1275/init.c (grub_machine_init): Call grub_ieee1275_init()
6489         at the beginning.
6491 2008-04-18  Robert Millan  <rmh@aybabtu.com>
6493         * util/update-grub.in: Fix syntax error when setting
6494         `GRUB_PRELOAD_MODULES'.
6495         Reported by Stephane Chazelas <stephane@artesyncp.com>
6497 2008-04-17  Lubomir Kundrak  <lkundrak@redhat.com>
6499         * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): take only .text
6500         section into account, newer toolchains generate unique build ids
6501         * configure.ac: remove the test for --build-id=none acceptance,
6502         we want build ids to be preserved
6503         * genmk.rb: add -R .note.gnu.build-id to objcopy, so build id
6504         far from other sections don't cause the raw binary images grow
6505         size
6507 2008-04-15  Robert Millan  <rmh@aybabtu.com>
6509         * disk/lvm.c: Update copyright year.
6510         * kern/misc.c: Likewise.
6512 2008-04-14  Vesa Jaaskelainen  <chaac@nic.fi>
6514         * disk/lvm.c (grub_lvm_scan_device): Add forgotten failure path when
6515         there is no memory left for physical volume name.
6517 2008-04-14  Vesa Jaaskelainen  <chaac@nic.fi>
6519         * disk/lvm.c (grub_lvm_scan_device): Fix logical volume's physical
6520         volume name mapping to support bigger than 9 character names properly.
6522 2008-04-13  Robert Millan  <rmh@aybabtu.com>
6524         * disk/i386/pc/biosdisk.c (grub_biosdisk_rw): Fix CHS limit check,
6525         as per http://www.allensmith.net/Storage/HDDlimit/Int13h.htm
6527 2008-04-13  Christian Franke  <franke@computer.org>
6529         * util/i386/pc/grub-mkrescue.in: Add --emulation=floppy
6530         to create a floppy emulation boot CD when non emulation mode
6531         does not work.
6532         Enable Joliet CD filesystem extension.
6534 2008-04-13  Robert Millan  <rmh@aybabtu.com>
6536         * kern/misc.c (grub_strncat): Fix off-by-one error.
6537         Reported by Zhang Huan <zhanghuan@nrchpc.ac.cn>
6539         * kern/env.c (grub_env_context_close): Clear current context, not
6540         previous one.
6541         Patch from Zhang Huan <zhanghuan@nrchpc.ac.cn>
6543         * kern/misc.c (grub_strcat): Minor speed optimization (same code size).
6545 2008-04-13  Robert Millan  <rmh@aybabtu.com>
6547         Improve robustness when handling LVM.
6549         * disk/lvm.c (grub_lvm_getvalue): Return 0 when `*p' is NULL
6550         (and leave `*p' unmodified).
6551         (grub_lvm_iterate): Don't assume `vg->lvs != NULL' when iterating
6552         through it.
6553         (grub_lvm_memberlist): Don't assume `lv->vg->pvs != NULL' when
6554         iterating through it.
6555         (grub_lvm_open): Don't assume `vg->lvs != NULL' when iterating
6556         through it.
6557         (grub_lvm_scan_device): Check the return value (and fail gracefully
6558         when due) on each grub_lvm_getvalue() or grub_strstr() call.
6559         Don't assume `vg->pvs != NULL' when iterating through it.
6561 2008-04-13  Robert Millan  <rmh@aybabtu.com>
6563         * gendistlist.sh (EXTRA_DISTFILES): Add `genpartmaplist.sh'.
6564         * genmk.rb (partmap): New variable.
6565         (CLEANFILES, PARTMAPFILES): Add #{partmap}.
6566         (#{partmap}): New target rule.
6567         * genpartmaplist.sh: New file.
6568         * Makefile.in (pkglib_DATA): Add partmap.lst.
6569         (partmap.lst): New target rule.
6570         * util/i386/pc/grub-mkrescue.in: Generate grub.cfg that loads needed
6571         modules (including all partition maps), instead of preloading them.
6573 2007-04-13  Fabian Greffrath  <fabian.greffrath@web.de>
6575         * util/grub.d/30_os-prober.in: New script. Use `os-prober' and
6576         `linux-boot-prober' (if installed) to detect other operating
6577         systems which are installed on the computer and add them to
6578         the boot menu.
6579         * conf/common.rmk: Build and install 30_os-prober.
6581 2008-04-12  Robert Millan  <rmh@aybabtu.com>
6583         * kern/powerpc/ieee1275/init.c: Move from here ...
6584         * kern/ieee1275/init.c: ... to here.  Update all users.
6586         * kern/powerpc/ieee1275/cmain.c: Move from here ...
6587         * kern/ieee1275/cmain.c: ... to here.  Update all users.
6589         * kern/powerpc/ieee1275/openfw.c: Move from here ...
6590         * kern/ieee1275/openfw.c: ... to here.  Update all users.
6592         * loader/powerpc/ieee1275/multiboot2.c: Move from here ...
6593         * loader/ieee1275/multiboot2.c: ... to here.  Update all users.
6595 2008-04-10  Pavel Roskin  <proski@gnu.org>
6597         * configure.ac: Always use "_cv_" in cache variables for
6598         compatibility with Autoconf 2.62.
6600 2008-04-07  Robert Millan  <rmh@aybabtu.com>
6602         Revert grub/machine/init.h addition by Pavel (since it breaks on
6603         i386-ieee1275 and others):
6604         * util/i386/pc/misc.c: Remove grub/machine/init.h.
6605         * util/powerpc/ieee1275/misc.c: Likewise.
6607 2008-04-07  Robert Millan  <rmh@aybabtu.com>
6609         * util/grub-probe.c (probe): Improve error message.
6611 2008-04-07  Robert Millan  <rmh@aybabtu.com>
6613         * util/biosdisk.c (read_device_map): Skip devices that don't exist
6614         (this prevents the presence of a bogus entry from ruining the whole
6615         thing).
6617 2008-04-06  Pavel Roskin  <proski@gnu.org>
6619         * util/biosdisk.c: Include grub/util/biosdisk.h.
6620         * util/grub-fstest.c (execute_command): Make static.
6621         * util/grub-mkdevicemap.c (check_device): Likewise.
6622         * util/i386/pc/misc.c: Include grub/machine/init.h.
6623         * util/powerpc/ieee1275/misc.c: Likewise.
6624         * util/lvm.c: Include grub/util/lvm.h.
6625         * util/misc.c: Include grub/kernel.h, grub/misc.h and
6626         grub/cache.h.
6627         * util/raid.c: Include grub/util/raid.h.
6628         (grub_util_getdiskname): Make static.
6630         * util/grub-emu.c (main): Remove calls to grub_hostfs_init() and
6631         grub_hostfs_fini(), as they are called from grub_init_all() and
6632         grub_fini_all() respectively.  This fixes an infinite loop in
6633         grub-fstest due to double registration of hostfs.
6634         Reported by Christian Franke <Christian.Franke@t-online.de>
6636 2008-04-05  Pavel Roskin  <proski@gnu.org>
6638         * bus/pci.c (grub_pci_iterate): For multifunction devices, probe
6639         all 8 functions.  Otherwise, probe function 0 only.
6641 2008-04-04  Pavel Roskin  <proski@gnu.org>
6643         * commands/lspci.c (grub_lspci_iter): Print the bus number
6644         correctly.
6646         * commands/lspci.c (grub_pci_classes): Fix typos.
6647         (grub_lspci_iter): Don't print func twice.  Print vendor ID
6648         before device ID, as it's normally done.
6650         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
6651         Fix signedness warnings.
6652         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate):
6653         Likewise.
6654         * util/ieee1275/get_disk_name.c: Include config.h so that
6655         _GNU_SOURCE is defined and getline() is declared.  Mark an
6656         unused argument as such.  Fix a signedness warning.
6658 2008-04-02  Pavel Roskin  <proski@gnu.org>
6660         * genkernsyms.sh.in: Use more robust assignments for CC and
6661         srcdir.  Quote srcdir.
6662         * gensymlist.sh.in: Likewise.  Assert at the compile time that
6663         the symbol table is not empty.
6665         * disk/raid.c (grub_raid_memberlist): Fix a signedness warning.
6666         * fs/cpio.c (grub_cpio_read): Likewise.
6668 2008-04-01  Pavel Roskin  <proski@gnu.org>
6670         * disk/ata.c (grub_ata_open): Don't lose precision in disk->id.
6671         * disk/host.c (grub_host_open): Likewise.
6672         * disk/loopback.c (grub_loopback_open): Likewise.
6673         * disk/memdisk.c (grub_memdisk_open): Use a string pointer for
6674         disk->id as in disk/host.c, not a multi-character constant.
6676         * util/grub-fstest.c (cmd_cmp): Use fseeko(), not fseek().  The
6677         later is obsolete, potentially dangerous and sets a bad example.
6678         * util/i386/efi/grub-mkimage.c (make_header): Likewise.
6679         * util/misc.c (grub_util_get_image_size): Likewise.
6681         * disk/loopback.c (options): Improve help for "--partitions".
6683         * normal/arg.c (grub_arg_show_help): Fix spacing of the long
6684         options to align them with the short options, e.g. "echo -e".
6686 2008-03-31  Bean  <bean123ch@gmail.com>
6688         * video/reader/png.c (grub_png_data): New member is_16bit and
6689         image_data.
6690         (grub_png_decode_image_header): Detect 16 bit png image.
6691         (grub_png_convert_image): New function to convert 16 bit image to 8 bit.
6692         (grub_png_decode_png): Call grub_png_convert_image for 16 bit image.
6693         (grub_video_reader_png): Release memory occupied by image_data.
6695         * fs/ntfs.c (find_attr): Handle non-resident attribute list larger than
6696         4096 bytes.
6697         (grub_nfs_mount): Skip the test for sector per cluster.
6699         * include/grub/ntfs.h (MAX_SPC): Removed.
6701 2008-03-31  Bean  <bean123ch@gmail.com>
6703         * conf/common.rmk (pkgdata_MODULES): Add afs.mod.
6704         (grub_probe_SOURCES): Add fs/afs.c.
6705         (grub_fstest_SOURCES): Likewise.
6706         (afs_mod_SOURCES): New variable.
6707         (afs_mod_CFLAGS): Likewise.
6708         (afs_mod_LDFLAGS): Likewise.
6710         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/afs.c.
6711         (grub_emu_SOURCES): Likewise.
6713         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
6715         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6717         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
6719         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6721         * fs/afs.c: New file.
6723 2008-03-30  Pavel Roskin  <proski@gnu.org>
6725         * disk/host.c: Include grub/misc.h to fix a warning.
6726         * util/hostfs.c: Use GRUB_MOD_INIT and GRUB_MOD_FINI to fix
6727         warnings about implicit declarations.
6729         * fs/udf.c (grub_udf_mount): Fix warning about a shadowing a
6730         variable.
6731         * include/grub/i386/loader.h: Change declaration of
6732         grub_linux_boot() to match what grub_loader_set() expects.
6733         * util/getroot.c (grub_guess_root_device): Return const char* to
6734         fix a warning.
6735         * util/grub-probe.c (probe): Fix a warning about uninitialized
6736         abstraction_name variable.
6737         * util/i386/get_disk_name.c (grub_util_get_disk_name): Mark
6738         second argument as unused to fix a warning.
6740         * loader/i386/pc/multiboot2.c (grub_mb2_arch_elf64_hook): Add
6741         missing grub_error() call.
6743         * util/update-grub_lib.in: Define datarootdir, since Autoconf
6744         2.60 and newer uses it to define datadir.
6746         * commands/sleep.c: Fix warning about implicit declaration.
6747         * disk/memdisk.c: Likewise.
6748         * loader/aout.c: Likewise.
6749         * loader/i386/bsd_normal.c: Likewise.
6750         * util/grub-probe.c: Likewise.
6752         * commands/i386/cpuid.c (has_longmode): Make static.
6753         * disk/i386/pc/biosdisk.c (cd_drive): Likewise.
6754         * include/grub/i386/bsd.h (bios_memmap_t): Remove, it's unused.
6756         * kern/i386/pc/startup.S (real_to_prot): Use %cs prefix to load
6757         GDT.  This is more robust, as %ds can change.
6758         (grub_biosdisk_rw_int13_extensions): Don't clear %ds before
6759         calling real_to_prot().
6760         (grub_biosdisk_get_diskinfo_int13_extensions): Likewise.
6762 2008-03-28  Pavel Roskin  <proski@gnu.org>
6764         * kern/i386/pc/startup.S: Assert that uncompressed functions
6765         don't spill beyond GRUB_KERNEL_MACHINE_RAW_SIZE.
6766         * kern/i386/pc/lzo1x.S: Remove all .align directives in the
6767         code, as they push parts of the code (error handlers) beyond
6768         GRUB_KERNEL_MACHINE_RAW_SIZE.  Speed is not as important in this
6769         code as correctness and size.
6771 2008-03-28  Pavel Roskin  <proski@gnu.org>
6773         * kern/i386/pc/startup.S
6774         (grub_biosdisk_get_diskinfo_int13_extensions): When converting
6775         data block address to the real mode, keep offset minimal.  This
6776         works around a bug in AWARD BIOS on old Athlon systems, which
6777         makes CD detection hang.
6779 2008-03-26  Pavel Roskin  <proski@gnu.org>
6781         * normal/color.c (grub_parse_color_name_pair): Make `name' a
6782         const.
6783         * include/grub/normal.h: Add grub_parse_color_name_pair()
6784         declaration.
6786 2008-03-24  Bean  <bean123ch@gmail.com>
6788         * disk/i386/pc/biosdisk.c (cd_start): Removed.
6789         (cd_count): Removed.
6790         (cd_drive): New variable.
6791         (grub_biosdisk_get_drive): Don't check for (cdN) device.
6792         (grub_biosdisk_call_hook): Likewise.
6793         (grub_biosdisk_iterate): Change cdrom detection method.
6794         (grub_biosdisk_open): Replace cd_start with cd_drive.
6795         (GRUB_MOD_INIT): Use grub_biosdisk_get_cdinfo_int13_extension to
6796         detect cdrom device.
6798         * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_MACHINE_CDROM_START):
6799         Removed.
6800         (GRUB_BIOSDISK_MACHINE_CDROM_END): Removed.
6801         (GRUB_BIOSDISK_CDTYPE_NO_EMUL): New macro.
6802         (GRUB_BIOSDISK_CDTYPE_1_2_M): Likewise.
6803         (GRUB_BIOSDISK_CDTYPE_1_44_M): Likewise.
6804         (GRUB_BIOSDISK_CDTYPE_2_88_M): Likewise.
6805         (GRUB_BIOSDISK_CDTYPE_HARDDISK): Likewise.
6806         (GRUB_BIOSDISK_CDTYPE_MASK): Likewise.
6807         (grub_biosdisk_cdrp): New structure.
6808         (grub_biosdisk_get_cdinfo_int13_extensions): New function.
6810         * include/grub/i386/pc/kernel.h (grub_boot_drive): Export this variable.
6812         * kern/i386/pc/init.c (make_install_device): Don't use (cdN) as root
6813         device.
6815         * kern/i386/pc/startup.S (grub_biosdisk_get_cdinfo_int13_extensions):
6816         New function.
6818 2008-03-20  Robert Millan  <rmh@aybabtu.com>
6820         Remove 2 TiB limit in ata.mod.
6821         * disk/ata.c (grub_ata_device): Promote `size' to grub_uint64_t.
6822         (grub_ata_dumpinfo): Print sector count with 0x%llx.
6823         (grub_ata_identify): Interpret `&info16[100]' as a pointer to
6824         grub_uint64_t instead of grub_uint32_t.
6826 2008-03-05  Bean  <bean123ch@gmail.com>
6828         * loader/i386/pc/multiboot.c (grub_multiboot_get_bootdev): New function.
6829         (grub_multiboot): Set boot device.
6831         * boot/i386/pc/lnxboot.S (real_code_2): Set %dh to 0xFF.
6833 2008-03-02  Bean  <bean123ch@gmail.com>
6835         * fs/reiserfs.c (grub_reiserfs_read_symlink): Add 0 at the end of
6836         symlink_buffer.
6838 2008-03-01  Yoshinori K. Okuji  <okuji@enbug.org>
6840         * DISTLIST: Added docs/fdl.texi, docs/grub.texi, docs/mdate-sh and
6841         texinfo.tex.
6843         * docs/grub.texi: New file. Copied from GRUB Legacy, and slightly
6844         modified.
6846         * docs/fdl.texi: New file.
6848         * docs/mdate-sh: New file. Copied from gnulib.
6849         * docs/texinfo.tex: Likewise.
6851         * config.guess: Updated from gnulib.
6852         * install-sh: Likewise.
6854 2008-02-28  Robert Millan  <rmh@aybabtu.com>
6856         * conf/i386-linuxbios.rmk (pkglib_MODULES): Add aout.mod.
6857         (aout_mod_SOURCES): New variable.
6858         (aout_mod_CFLAGS): Likewise.
6859         (aout_mod_LDFLAGS): Likewise.
6861         * conf/i386-ieee1275.rmk: Likewise.
6863 2008-02-28  Robert Millan  <rmh@aybabtu.com>
6865         * util/update-grub.in: Reorganise terminal validity check.  Accept
6866         `ieee1275:console' (OLPC) and `*:gfxterm' as valid too.
6867         Based on suggestion by Franklin PIAT.
6869 2008-02-28  Fabian Greffrath  <greffrath@leat.rub.de>
6871         * include/grub/util/getroot.h (grub_util_check_block_device): Export new
6872         function.
6873         * util/getroot.c (grub_util_check_block_device): New function that
6874         returns the given argument if it is a block device and returns NULL else.
6875         * util/grub-probe.c (argument_is_device): New variable.
6876         (probe): Promote device_name from a variable to an argument. Receive
6877         device_name from grub_util_check_block_device() if path is NULL and from
6878         grub_guess_root_device() else. Do not free() device_name anymore.
6879         (options): Introduce new parameter '-d, --device'.
6880         (main): Add description of the new parameter to the help screen.
6881         Rename path variable to argument. Set argument_is_device if the '-d'
6882         option is given. Pass argument to probe() depending on
6883         argument_is_device.
6885 2008-02-24  Bean  <bean123ch@gmail.com>
6887         * fs/iso9660.c (GRUB_ISO9660_VOLDESC_BOOT): New macro.
6888         (GRUB_ISO9660_VOLDESC_PRIMARY): Likewise.
6889         (GRUB_ISO9660_VOLDESC_SUPP): Likewise.
6890         (GRUB_ISO9660_VOLDESC_PART): Likewise.
6891         (GRUB_ISO9660_VOLDESC_END): Likewise.
6892         (grub_iso9660_primary_voldesc): New member escape.
6893         (grub_iso9660_data): New member joliet.
6894         (grub_iso9660_convert_string): New function.
6895         (grub_iso9660_mount): Detect joliet extension.
6896         (grub_iso9660_iterate_dir): Convert filename when joliet is detected.
6897         (grub_iso9660_iso9660_label): Likewise.
6899         * conf/common.rmk (pkgdata_MODULES): Add udf.mod.
6900         (grub_setup_SOURCES): Add fs/udf.c.
6901         (grub_fstest_SOURCES): Likewise.
6902         (udf_mod_SOURCES): New variable.
6903         (udf_mod_CFLAGS): Likewise.
6904         (udf_mod_LDFLAGS): Likewise.
6906         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/udf.c.
6907         (grub_emu_SOURCES): Likewise.
6909         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
6911         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6913         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
6915         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6917         * fs/udf.c: New file.
6919 2008-02-24  Robert Millan  <rmh@aybabtu.com>
6921         * conf/i386-efi.rmk (normal/function.c_DEPENDENCIES)
6922         (normal/lexer.c_DEPENDENCIES): New variables.
6923         * conf/i386-ieee1275.rmk (normal/function.c_DEPENDENCIES)
6924         (normal/lexer.c_DEPENDENCIES): Likewise.
6925         * conf/i386-linuxbios.rmk (normal/function.c_DEPENDENCIES)
6926         (normal/lexer.c_DEPENDENCIES): Likewise.
6927         * conf/i386-pc.rmk (normal/function.c_DEPENDENCIES)
6928         (normal/lexer.c_DEPENDENCIES): Likewise.
6929         * conf/powerpc-ieee1275.rmk (normal/function.c_DEPENDENCIES)
6930         (normal/lexer.c_DEPENDENCIES): Likewise.
6931         * conf/sparc64-ieee1275.rmk (normal/function.c_DEPENDENCIES)
6932         (normal/lexer.c_DEPENDENCIES): Likewise.
6934 2008-02-23  Robert Millan  <rmh@aybabtu.com>
6936         * partmap/gpt.c (grub_gpt_magic): Add `0x' qualifier to each member,
6937         since they were intended to be in hex.  This didn't break previously
6938         because of a bug in gpt_partition_map_iterate() (see below).
6940         (gpt_partition_map_iterate): Replace `grub_memcmp' with `! grub_memcmp'
6941         when checking the validity of GPT header.
6942         Remove `partno', since it always provides the same information as `i'.
6944 2008-02-21  Yoshinori K. Okuji  <okuji@enbug.org>
6946         * include/grub/efi/time.h: Fix a wrong comment.
6948 2008-02-19  Pavel Roskin  <proski@gnu.org>
6950         * kern/rescue.c (grub_enter_rescue_mode): Improve initial
6951         message.
6953 2008-02-19  Bean  <bean123ch@gmail.com>
6955         * conf/i386-pc.rmk (pkglib_MODULES): Add aout.mod _bsd.mod and bsd.mod.
6956         (aout_mod_SOURCES): New variable.
6957         (aout_mod_CFLAGS): Likewise.
6958         (aout_mod_LDFLAGS): Likewise.
6959         (_bsd_mod_SOURCES): New variable.
6960         (_bsd_mod_CFLAGS): Likewise.
6961         (_bsd_mod_LDFLAGS): Likewise.
6962         (bsd_mod_SOURCES): New variable.
6963         (bsd_mod_CFLAGS): Likewise.
6964         (bsd_mod_LDFLAGS): Likewise.
6966         * include/grub/aout.h: New file.
6968         * include/grub/i386/loader.h (grub_unix_real_boot): New function.
6970         * include/grub/i386/bsd.h: New file.
6972         * include/grub/i386/pc/init.h (grub_get_mmap_entry): Use EXPORT_FUNC
6973         to make it public.
6975         * kern/elf.c (grub_elf32_load): Get the physical address after the hook
6976         function is called, so that it's possible to change it inside the hook.
6977         (grub_elf64_load): Likewise.
6978         (grub_elf_file): Don't close the file if elf header is not found.
6979         (grub_elf_close): Close the file if grub_elf_file fails (The new
6980         grub_elf_file won't close it).
6981         (grub_elf32_size): Use NESTED_FUNC_ATTR for nested function calcsize.
6982         (grub_elf64_size): Likewise.
6984         * kern/i386/loader.S (grub_unix_real_boot): New function.
6986         * loader/aout.c: New file.
6988         * loader/i386/bsd.c: New file.
6990         * loader/i386/bsd_normal.c: New file.
6992         * loader/i386/pc/multiboot.c (grub_multiboot): Handle a.out format.
6994         * loader/multiboot2.c (grub_multiboot2): Reset grub_errno so that it
6995         can test other formats.
6997 2008-02-19  Robert Millan  <rmh@aybabtu.com>
6999         * partmap/gpt.c: Include `<grub/gpt_partition.h>'.
7000         (grub_gpt_partition_type_empty): Redefine with macro from
7001         `<grub/gpt_partition.h>'.
7002         (gpt_partition_map_iterate): Adjust partition type comparison.
7004         Export `entry' as partmap-specific `part.data' struct.
7005         (grub_gpt_header, grub_gpt_partentry): Move from here ...
7007         * include/grub/gpt_partition.h (grub_gpt_header)
7008         (grub_gpt_partentry): ... to here (new file).
7010         * util/i386/pc/grub-setup.c: Include `<grub/gpt_partition.h>'.
7012         (grub_gpt_partition_type_bios_boot): New const variable, defined
7013         with macro from `<grub/gpt_partition.h>'.
7015         (setup): Replace `first_start' with `embed_region', which keeps
7016         track of the embed region (and is partmap-agnostic).
7018         Replace find_first_partition_start() with find_usable_region(),
7019         which finds a usable region for embedding using partmap-specific
7020         knowledge (supports PC/MSDOS and GPT).
7022         Fix all assumptions that the embed region start at sector 1, using
7023         `embed_region.start' from now on.  Similarly, use `embed_region.end'
7024         rather than `first_start' to calculate available size.
7026         In grub_util_info() message, replace "into after the MBR" with an
7027         indication of the specific sector our embed region starts at.
7029 2008-02-19  Robert Millan  <rmh@aybabtu.com>
7031         * DISTLIST: Replace `commands/ieee1275/halt.c' and
7032         `commands/ieee1275/reboot.c' with `commands/halt.c' and
7033         `commands/reboot.c'.
7034         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
7035         (halt_mod_SOURCES): Likewise.
7036         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
7037         (halt_mod_SOURCES): Likewise.
7039 2008-02-17  Christian Franke  <franke@computer.org>
7041         * commands/cat.c (grub_cmd_cat): Add break on GRUB_TERM_ESC key.
7043 2008-02-17  Robert Millan  <rmh@aybabtu.com>
7045         * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
7046         set `first_start' to 0 for non-PC/MSDOS partition maps.
7048 2008-02-16  Robert Millan  <rmh@aybabtu.com>
7050         * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
7051         do not assume partition map is PC/MSDOS before performing checks that
7052         are specific to that layout.
7054 2008-02-13  Robert Millan  <rmh@aybabtu.com>
7056         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Remove
7057         `commands/i386/pc/halt.c' and `commands/i386/pc/reboot.c'.
7058         * kern/i386/linuxbios/init.c (grub_halt, grub_reboot): Remove stubs.
7060 2008-02-13  Yoshinori K. Okuji  <okuji@enbug.org>
7062         * configure.ac: Only a cosmetic change on the handling of
7063         -fno-stack-protector.
7065 2008-02-12  Alexandre Boeglin  <alex@boeglin.org>
7067         * conf/i386-efi.rmk (grub_emu_SOURCES): Replace
7068         commands/i386/pc/halt.c and reboot.c by commands/halt.c and
7069         reboot.c.
7070         (grub_install_SOURCES): Add halt.mod and reboot.mod.
7071         (halt_mod_SOURCES): New variable.
7072         (halt_mod_CFLAGS): Likewise.
7073         (halt_mod_LDFLAGS): Likewise.
7074         (reboot_mod_SOURCES): Likewise.
7075         (reboot_mod_CFLAGS): Likewise.
7076         (reboot_mod_LDFLAGS): Likewise.
7078         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace
7079         commands/ieee1275/halt.c and reboot.c by commands/halt.c and
7080         reboot.c.
7081         (halt_mod_SOURCES): Likewise.
7082         (reboot_mod_SOURCES): Likewise.
7084         * conf/i386-pc.rmk (grub_emu_SOURCES): Replace
7085         commands/i386/pc/reboot.c by commands/reboot.c.
7086         (reboot_mod_SOURCES): Likewise.
7088         * commands/i386/pc/reboot.c: merge this file ...
7090         * commands/ieee1275/reboot.c: ... and this file ...
7092         * commands/reboot.c: ... to this file.
7093         Add some precompiler directive to include the correct header for
7094         each machine.
7096         * commands/ieee1275/halt.c: move this file ...
7098         * commands/halt.c: ... to here.
7099         Add some precompiler directive to include the correct header for
7100         each machine.
7102         * include/grub/efi/efi.h (grub_reboot): New function declaration.
7103         (grub_halt): Likewise.
7105         * kern/efi/efi.c (grub_reboot): New function.
7106         (grub_halt): Likewise.
7108 2008-02-12  Robert Millan  <rmh@aybabtu.com>
7110         * util/getroot.c (grub_guess_root_device): Inspect /dev/evms before
7111         /dev (like it is done for /dev/mapper).  This doesn't provide support
7112         for EVMS, but at least it is now easy to identify the problem when it
7113         arises.
7115 2008-02-11  Robert Millan  <rmh@aybabtu.com>
7117         * util/biosdisk.c (grub_util_biosdisk_open, linux_find_partition)
7118         (grub_util_biosdisk_get_grub_dev): Check open() exit status by
7119         comparing it with -1, not 0.
7121 2008-02-10  Robert Millan  <rmh@aybabtu.com>
7123         * conf/i386-efi.rmk (grub_emu_SOURCES): Add `disk/raid.c' and
7124         `disk/lvm.c'.
7125         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7126         * conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
7128         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Move `disk/raid.c' and
7129         `disk/lvm.c' to the end of the list.
7130         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
7131         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
7133 2008-02-10  Robert Millan  <rmh@aybabtu.com>
7135         * kern/main.c (grub_load_normal_mode): Do not reset `grub_errno'.  Call
7136         grub_print_error() instead.  This will let user know why we're entering
7137         rescue mode.
7138         Based on suggestions from Sam Morris.
7140 2008-02-10  Alexandre Boeglin  <alex@boeglin.org>
7142         * normal/arg.c (grub_arg_parse): If one of the args is "--", call add_arg()
7143         on remaining N args, instead of "--" arg N times.
7145 2008-02-09  Vesa Jaaskelainen  <chaac@nic.fi>
7147         * font/manager.c (unknown_glyph): Added variable for unknown glyph.
7148         (fill_with_default_glyph): Changed to use unknown_glyph for fill
7149         pattern for unknown glyphs.
7151 2008-02-09  Robert Millan  <rmh@aybabtu.com>
7153         * configure.ac: Probe for `help2man'.
7154         * Makefile.in (builddir): New variable.
7155         (HELP2MAN): Likewise.  Set to `true' when @HELP2MAN@ doesn't provide it,
7156         or otherwise add a few flags/options to it.
7157         (install-local): For every executable utility or script that is
7158         installed, invoke $(HELP2MAN) to install a manpage based on --help
7159         output.
7161         * util/i386/pc/grub-install.in: Move down `update-grub_lib' sourcing, so
7162         that it doesn't prevent --help from working in build tree.
7164         * util/i386/pc/grub-mkrescue.in (usage): Replace `grub-devel@gnu.org'
7165         with `bug-grub@gnu.org'.
7166         * util/powerpc/ieee1275/grub-mkrescue.in (usage): Likewise.
7167         * util/update-grub.in (usage): New function.
7168         Implement proper argument check, with support for --help and --version
7169         (as well as existing -y).
7171 2008-02-09  Christian Franke  <franke@computer.org>
7173         * commands/cat.c (grub_cmd_cat): Print '\r' as hex to
7174         avoid overwriting previous output.
7175         * kern/rescue.c (grub_rescue_cmd_cat): Likewise.
7177 2008-02-09  Robert Millan  <rmh@aybabtu.com>
7179         * normal/menu.c (run_menu): If timeout is set to zero, don't bother
7180         drawing the menu.
7182 2008-02-09  Robert Millan  <rmh@aybabtu.com>
7184         * commands/sleep.c: New file.
7185         * conf/common.rmk (pkglib_MODULES): Add `commands/sleep.c'.
7186         (sleep_mod_SOURCES): New variable.
7187         (sleep_mod_CFLAGS): Likewise.
7188         (sleep_mod_LDFLAGS): Likewise.
7190 2008-02-09  Robert Millan  <rmh@aybabtu.com>
7192         * disk/raid.c (grub_raid_scan_device): Add a pair of sanity checks for
7193         situations in which we can deduce the RAID size and the superblock
7194         doesn't match it.
7196 2008-02-09  Robert Millan  <rmh@aybabtu.com>
7198         * disk/lvm.c [GRUB_UTIL] (grub_lvm_memberlist): New function.  Construct
7199         and return a grub_diskmemberlist_t composed of LVM physical volumes.
7200         [GRUB_UTIL] (grub_lvm_dev): Add `memberlist' member.
7202         * disk/raid.c [GRUB_UTIL] (grub_raid_memberlist): New function.  Construct
7203         and return a grub_diskmemberlist_t composed of physical array members.
7204         [GRUB_UTIL] (grub_raid_dev): Add `memberlist' member.
7206         * include/grub/disk.h [GRUB_UTIL] (grub_disk_memberlist): New struct
7207         prototype.
7208         [GRUB_UTIL] (struct grub_disk_dev): Add `memberlist' function pointer.
7209         [GRUB_UTIL] (struct grub_disk_memberlist): New struct declaration.
7210         [GRUB_UTIL] (grub_disk_memberlist_t): New typedef.
7212         * util/grub-probe.c (probe): Move partmap probing code from here ...
7213         (probe_partmap): ... to here.
7214         (probe): Use probe_partmap() once for the disk we're probing, and
7215         additionally, when such disk contains a memberlist() struct member,
7216         once for each disk that is contained in the structure returned by
7217         memberlist().
7219 2008-02-09  Robert Millan  <rmh@aybabtu.com>
7221         * util/grub-probe.c (main): When `verbosity > 1', set `debug'
7222         environment variable to 'all' in order to obtain debug output from
7223         non-util/ code.
7224         * util/i386/pc/grub-setup.c (main): Likewise.
7226 2008-02-08  Robert Millan  <rmh@aybabtu.com>
7228         * disk/raid.c (grub_raid_scan_device): Check for
7229         `array->device[sb.this_disk.number]' rather than for
7230         `array->device[sb.this_disk.number]->name', since the latter is not
7231         guaranteed to be accessible.
7233 2008-02-08  Robert Millan  <rmh@aybabtu.com>
7235         * disk/raid.c: Update copyright.
7236         * fs/cpio.c: Likewise.
7237         * include/grub/raid.h: Likewise.
7238         * loader/i386/pc/multiboot.c: Likewise.
7239         * util/hostfs.c: Likewise.
7241 2008-02-08  Robert Millan  <rmh@aybabtu.com>
7243         * include/grub/raid.h (struct grub_raid_array): Change type of `device'
7244         to a grub_disk_t array.
7245         * disk/raid.c (grub_raid_read): Replace `device[x].disk' accesses with
7246         `device[x]'.
7247         (grub_raid_scan_device): Replace `device[x].name' accesses with
7248         `device[x]->name'.  Simplify initialization of `array->device[x]'.
7250 2008-02-08  Robert Millan  <rmh@aybabtu.com>
7252         * disk/raid.c (grub_raid_open, grub_raid_scan_device): Add a few
7253         grub_dprintf() calls.
7254         * kern/disk.c (grub_disk_read): Include grub_errmsg in out of range
7255         error message.
7257 2008-02-07  Christian Franke  <franke@computer.org>
7259         * util/hostfs.c (grub_hostfs_open): Use fseeko and ftello
7260         instead of fseek and ftell to support large files.
7261         (grub_hostfs_read): Likewise.
7263 2008-02-07  Robert Millan  <rmh@aybabtu.com>
7265         Patch from Jeroen Dekkers.
7266         * disk/raid.c (grub_raid_scan_device): Reset `grub_errno' on disk
7267         failure, since successfully reading all array members might not be
7268         required.
7270 2008-02-06  Robert Millan  <rmh@aybabtu.com>
7272         * util/grub-probe.c (probe): Simplify partmap probing (with the
7273         assumption that the first word up to the underscore equals to
7274         the module name).
7276 2008-02-06  Christian Franke  <franke@computer.org>
7278         * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_NONE
7279         (and set *ofs = 0) instead of GRUB_ERR_FILE_NOT_FOUND on
7280         last block of a cpio or tar stream.
7281         Check for "TRAILER!!!" instead of any empty data
7282         block to detect last block of a cpio stream.
7283         (grub_cpio_dir): Fix constness of variable np.
7284         (grub_cpio_open): Return GRUB_ERR_FILE_NOT_FOUND if
7285         cpio or tar trailer is detected.  This fixes a crash
7286         on open of a non existing file.
7288 2008-02-05  Bean  <bean123ch@gmail.com>
7290         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Get physical
7291         address of entry.
7292         (grub_multiboot_load_elf64): Likewise.
7293         (grub_multiboot): Initialize mbi structure.
7295         * util/grub-fstest.c: Don't include unused header file script.h.
7297         * conf/common.rmk (grub-fstest.c_DEPENDENCIES): Move to the beginning
7298         of file.
7299         (grub_fstest_SOURCES): Likewise.
7301 2008-02-05  Robert Millan  <rmh@aybabtu.com>
7303         * include/grub/term.h (GRUB_TERM_LEFT, GRUB_TERM_RIGHT)
7304         (GRUB_TERM_UP, GRUB_TERM_DOWN, GRUB_TERM_HOME, GRUB_TERM_END)
7305         (GRUB_TERM_DC, GRUB_TERM_PPAGE, GRUB_TERM_NPAGE, GRUB_TERM_ESC)
7306         (GRUB_TERM_TAB, GRUB_TERM_BACKSPACE): New macros.
7308         * kern/i386/pc/startup.S: Include `<grub/term.h>'.
7309         (translation_table): Replace hardcoded values with macros
7310         provided by `<grub/term.h>'.
7312         * term/i386/pc/at_keyboard.c: Include `<grub/term.h>'.
7313         (keyboard_map): Correct/add a few values, with macros provided
7314         by `<grub/term.h>'.
7315         (keyboard_map_shift): Zero values that don't differ from their
7316         `keyboard_map' equivalents.
7317         (grub_console_checkkey): Optimize KEYBOARD_STATUS_CAPS_LOCK toggling.
7318         Discard the second scan code that is always sent by Caps lock.
7319         Only use `keyboard_map_shift' when it provides a non-zero value,
7320         otherwise fallback to `keyboard_map'.
7322 2008-02-04  Bean  <bean123ch@gmail.com>
7324         * Makefile.in (enable_grub_fstest): New variable.
7326         * conf/common.rmk (grub_fstest_init.lst): New rule.
7327         (grub_fstest_init.h): Likewise.
7328         (grub_fstest_init.c): Likewise.
7329         (util/grub-fstest.c_DEPENDENCIES): New variable.
7330         (grub_fstest_SOURCES): Likewise.
7332         * configure.ac (enable_grub_fstest): Check for --enable-grub-fstest.
7334         * util/grub-fstest.c: New file.
7336 2008-02-03  Yoshinori K. Okuji  <okuji@enbug.org>
7338         Make grub-setup handle a separate root device.
7340         * util/i386/pc/grub-setup.c (setup): Always open the root device,
7341         so that the root device can be compared with the destination
7342         device.
7343         When embedding the core image, if the root and destination devices
7344         are different, set ROOT_DRIVE to ROOT_DEV->DISK->ID. Otherwise, to
7345         0xFF.
7346         When not embedding, set ROOT_DRIVE to 0xFF.
7348 2008-02-03  Yoshinori K. Okuji  <okuji@enbug.org>
7350         Add support for having a grub directory in a different drive. This
7351         is still only the data handling part.
7353         * kern/i386/pc/startup.S (multiboot_trampoline): Set %dh to 0xFF.
7354         (codestart): Save %dh in GRUB_ROOT_DRIVE.
7355         (grub_root_drive): New variable.
7357         * kern/i386/pc/init.c (make_install_device): Use GRUB_ROOT_DRIVE
7358         instead of GRUB_BOOT_DRIVE to construct a device name. Set
7359         GRUB_ROOT_DRIVE to GRUB_BOOT_DRIVE if it is 0xFF, otherwise use it
7360         as it was.
7362         * include/grub/i386/pc/kernel.h (grub_root_drive): New prototype.
7364         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_ROOT_DRIVE): New
7365         macro.
7366         (GRUB_BOOT_MACHINE_DRIVE_CHECK): Set to 0x4f.
7368         * boot/i386/pc/pxeboot.S (_start): Set %dh to 0xFF. For now, this
7369         is bogus, because PXE booting does not specify any drive
7370         correctly.
7372         * boot/i386/pc/lnxboot.S (reg_edx): Set the second byte to 0xFF. I
7373         am not sure if this is really correct.
7375         * boot/i386/pc/cdboot.S: Set %dh to 0xFF, because the root drive
7376         is always identical to the boot drive when booting from a CD.
7378         * boot/i386/pc/boot.S (MOV_MEM_TO_AL): Removed. Not needed any
7379         longer.
7380         (root_drive): New variable.
7381         (real_start): Unconditionally set %dh to ROOT_DRIVE.
7382         (setup_sectors): Push %dx right after popping it, because %dh will
7383         be modified later.
7384         (copy_buffer): Restore %dx.
7386 2008-02-03  Robert Millan  <rmh@aybabtu.com>
7388         * util/i386/pc/grub-mkrescue.in: Rewrite most of image generation to
7389         use `cdboot.img' for cdrom images.
7391 2008-02-03  Robert Millan  <rmh@aybabtu.com>
7393         * util/grub.d/00_header.in: Issue scripting commands for GRUB to
7394         only setup gfxterm when `font' command has succeeded.
7396 2008-02-03  Robert Millan  <rmh@aybabtu.com>
7398         * loader/multiboot_loader.c [GRUB_MACHINE_LINUXBIOS]
7399         (grub_rescue_cmd_multiboot_loader)
7400         (grub_rescue_cmd_module_loader): Enable multiboot1 calls.
7402 2008-02-03  Pavel Roskin  <proski@gnu.org>
7404         * kern/i386/pc/startup.S (grub_chainloader_real_boot): Pop
7405         %edx and %esi from stack only after grub_gate_a20() is called.
7406         grub_gate_a20() clobbers %edx.
7408 2008-02-03  Yoshinori K. Okuji  <okuji@enbug.org>
7410         * configure.ac (AC_INIT): Bumped to 1.96.
7412         * DISTLIST: Added boot/i386/pc/cdboot.S, bus/pci.c,
7413         commands/lspci.c,disk/memdisk.c, include/grub/pci.h,
7414         include/grub/i386/pc/pci.h, video/readers/jpeg.c, and
7415         video/readers/png.c.
7417 2008-02-03  Bean  <bean123ch@gmail.com>
7419         * conf/i386-pc.rmk (pkglib_IMAGES): Add cdboot.img.
7420         (cdboot_img_SOURCES): New variable.
7421         (cdboot_img_ASFLAGS): New variable.
7422         (cdboot_img_LDFLAGS): New variable.
7424         * boot/i386/pc/cdboot.S: New file.
7426         * disk/i386/pc/biosdisk.c (cd_start): New variable.
7427         (cd_count): Likewise.
7428         (grub_biosdisk_get_drive): Add support for cd device.
7429         (grub_biosdisk_call_hook): Likewise.
7430         (grub_biosdisk_iterate): Likewise.
7431         (grub_biosdisk_open): Likewise.
7432         (GRUB_BIOSDISK_CDROM_RETRY_COUNT): New macro.
7433         (grub_biosdisk_rw): Support reading from cd device.
7434         (GRUB_MOD_INIT): Iterate cd devices.
7436         * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_FLAG_CDROM): New macro.
7437         (GRUB_BIOSDISK_MACHINE_CDROM_START): Likewise.
7438         (GRUB_BIOSDISK_MACHINE_CDROM_END): Likewise.
7440         * kern/i386/pc/init.c (make_install_device): Check for cd device.
7442 2008-02-02  Robert Millan  <rmh@aybabtu.com>
7444         * commands/read.c: New file.
7445         * conf/common.rmk (pkglib_MODULES): Add `commands/read.c'.
7446         (read_mod_SOURCES): New variable.
7447         (read_mod_CFLAGS): Likewise.
7448         (read_mod_LDFLAGS): Likewise.
7450 2008-02-02  Robert Millan  <rmh@aybabtu.com>
7452         * normal/main.c (grub_normal_execute): Check for `menu->size' when
7453         determining whether menu has to be displayed.
7455 2008-02-02  Marco Gerards  <marco@gnu.org>
7457         * bus/pci.c: New file.
7459         * include/grub/pci.h: Likewise.
7461         * include/grub/i386/pc/pci.h: Likewise.
7463         * commands/lspci.c: Likewise.
7465         * conf/i386-pc.rmk (pkglib_MODULES): Add `pci.mod' and
7466         `lspci.mod'.
7467         (pci_mod_SOURCES): New variable.
7468         (pci_mod_CFLAGS): Likewise.
7469         (pci_mod_LDFLAGS): Likewise.
7470         (lspci_mod_SOURCES): Likewise.
7471         (lspci_mod_CFLAGS): Likewise.
7472         (lspci_mod_LDFLAGS): Likewise.
7474 2008-02-02  Bean  <bean123ch@gmail.com>
7476         * fs/ufs.c (INODE_BLKSZ): Fix incorrect value.
7477         (grub_ufs_get_file_block): Fix indirect block calculation problem.
7479         * fs/xfs.c (grub_xfs_sblock): New member log2_dirblk.
7480         (grub_xfs_btree_node): New structure.
7481         (grub_xfs_btree_root): New structure.
7482         (grub_xfs_inode): New members nblocks, extsize, nextents and btree.
7483         (GRUB_XFS_EXTENT_OFFSET): Use exts instead of inode->data.extents.
7484         (GRUB_XFS_EXTENT_BLOCK): Likewise.
7485         (GRUB_XFS_EXTENT_SIZE): Likewise.
7486         (grub_xfs_read_block): Support btree format type.
7487         (grub_xfs_iterate_dir): Use NESTED_FUNC_ATTR in call_hook.
7488         Use directory block as basic unit.
7490         * fs/fshelp.c (grub_fshelp_read_file): Bug fix for sparse block.
7492         * aclocal.m4 (grub_i386_CHECK_REGPARM_BUG): Define NESTED_FUNC_ATTR as
7493         __attribute__ ((__regparm__ (1))).
7495 2008-02-01  Robert Millan  <rmh@aybabtu.com>
7497         Correct a mistake in previous commit.
7499         * conf/i386-pc.rmk (normal/execute.c_DEPENDENCIES): Move to the
7500         top.
7501         (normal/command.c_DEPENDENCIES): New variable.
7503 2008-02-01  Robert Millan  <rmh@aybabtu.com>
7505         * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Move to the
7506         top.
7507         (normal/command.c_DEPENDENCIES): New variable.
7508         (grub-emu_DEPENDENCIES, normal_mod_DEPENDENCIES): Remove variables.
7509         * conf/i386-ieee1275.rmk: Likewise.
7510         * conf/i386-linuxbios.rmk: Likewise.
7511         * conf/i386-pc.rmk: Likewise.
7512         * conf/sparc64-ieee1275.rmk: Likewise.
7513         * conf/powerpc-ieee1275.rmk: Likewise.
7514         (grub_emu_SOURCES): Add `fs/fshelp.c'.
7516         * genmk.rb: Add `$(#{src}_DEPENDENCIES)' in targets that require it.
7518 2008-02-01  Robert Millan  <rmh@aybabtu.com>
7520         * kern/disk.c (grub_disk_read, grub_disk_write): Add grub_dprintf()
7521         call at beginning of function.
7523 2008-01-31  Pavel Roskin  <proski@gnu.org>
7525         * util/powerpc/ieee1275/grub-mkrescue.in: New file.
7526         * conf/powerpc-ieee1275.rmk (bin_SCRIPTS): New variable.
7527         (grub_mkrescue_SOURCES): Likewise.
7528         * DISTLIST: Add util/powerpc/ieee1275/grub-mkrescue.in.
7530 2008-01-30  Robert Millan  <rmh@aybabtu.com>
7532         * conf/i386-pc.rmk (sbin_UTILITIES): Remove `grub-probe'.
7533         (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Moved from here ...
7534         * conf/common.rmk (util/grub-probe.c_DEPENDENCIES)
7535         (grub_probe_SOURCES): ... to here.
7537         * conf/i386-efi.rmk (sbin_UTILITIES): Remove `grub-probe'.
7538         (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Remove.
7539         * conf/i386-ieee1275.rmk: Likewise.
7540         * conf/i386-linuxbios.rmk: Likewise.
7541         * conf/powerpc-ieee1275.rmk: Likewise.
7543 2008-01-30  Tristan Gingold  <gingold@free.fr>
7545         * kern/rescue.c: Silently accept empty lines.
7547 2008-01-29  Bean  <bean123ch@gmail.com>
7549         * boot/i386/pc/lnxboot.S (data_start): Code cleanup.
7550         (real_code_2): Code cleanup and change comment style.
7551         (move_memory): Avoid using 32-bit address mode.
7553 2008-01-29  Bean  <bean123ch@gmail.com>
7555         * conf/i386-pc.rmk (pkglib_MODULES): Add `png.mod'.
7556         (png_mod_SOURCES): New variable.
7557         (png_mod_CFLAGS): Likewise.
7558         (png_mod_LDFLAGS): Likewise.
7560         * video/readers/png.c: New file.
7562 2008-01-28  Robert Millan  <rmh@aybabtu.com>
7564         * include/grub/i386/linuxbios/kernel.h (GRUB_MOD_GAP): New macro.
7565         * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Remove
7566         `ifndef GRUB_MOD_GAP' hack.
7567         * util/elf/grub-mkimage.c (add_segments): Likewise.
7569 2008-01-27  Robert Millan  <rmh@aybabtu.com>
7571         * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Skip
7572         `GRUB_MOD_GAP' for platforms in which it's not defined.
7573         * util/elf/grub-mkimage.c (add_segments): Likewise.
7575 2008-01-27  Robert Millan  <rmh@aybabtu.com>
7577         Get grub-emu to build again (including parallel builds).
7579         * conf/i386-pc.rmk (util/grub-emu.c_DEPENDENCIES): Remove variable.
7580         Split into ...
7581         (util/grub-emu.c_DEPENDENCIES): ... this, ...
7582         (normal/execute.c_DEPENDENCIES): ... this, ...
7583         (grub-emu_DEPENDENCIES): ... and this.
7585         * conf/i386-efi.rmk: Likewise.
7586         * conf/i386-linuxbios.rmk: Likewise.
7587         * conf/i386-ieee1275.rmk: Likewise.
7588         * conf/powerpc-ieee1275.rmk: Likewise.
7589         (grub_emu_SOURCES): Remove duplicated `kern/file.c'.
7591 2008-01-27  Robert Millan  <rmh@aybabtu.com>
7593         * NEWS: Add a few items.
7595 2008-01-27  Robert Millan  <rmh@aybabtu.com>
7597         Fix parallel builds with grub-emu.  Based on earlier commit for
7598         grub-probe and grub-setup.
7600         * conf/i386-pc.rmk (grub-emu_DEPENDENCIES): Renamed to ...
7601         (util/grub-emu.c_DEPENDENCIES): ... this.
7602         * conf/i386-efi.rmk (grub-emu_DEPENDENCIES): Renamed to ...
7603         (util/grub-emu.c_DEPENDENCIES): ... this.
7604         * conf/i386-linuxbios.rmk (grub-emu_DEPENDENCIES): Renamed to ...
7605         (util/grub-emu.c_DEPENDENCIES): ... this.
7606         * conf/i386-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
7607         (util/grub-emu.c_DEPENDENCIES): ... this.
7608         * conf/powerpc-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
7609         (util/grub-emu.c_DEPENDENCIES): ... this.
7611 2008-01-27  Pavel Roskin  <proski@gnu.org>
7613         * include/grub/powerpc/ieee1275/kernel.h: Introduce GRUB_MOD_GAP
7614         to create a gap between _end and the modules added to the image
7615         with grub-mkrescue.  That fixes "CLAIM failed" on PowerMAC.
7616         * kern/powerpc/ieee1275/init.c: Use GRUB_MOD_GAP.
7617         * util/elf/grub-mkimage.c (add_segments): Likewise.
7619 2008-01-26  Pavel Roskin  <proski@gnu.org>
7621         * kern/dl.c (grub_dl_load): Don't abort if prefix is not set,
7622         just return an error.
7624 2008-01-26  Bean  <bean123ch@gmail.com>
7626         * fs/reiserfs.c (grub_fshelp_node): New member next_offset.
7627         (grub_reiserfs_get_item): Save offset of the next item.
7628         (grub_reiserfs_iterate_dir): Use next_offset to find next item.
7630 2008-01-25  Robert Millan  <rmh@aybabtu.com>
7632         * conf/i386-pc.rmk (grub_setup_SOURCES, grub_emu_SOURCES): Regroup to
7633         make all filesystem sources appear together (possibly fixing omissions
7634         while at it).
7635         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
7636         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7637         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
7638         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7640         * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.  Additionally,
7641         add `kern/file.c'.
7642         * conf/i386-efi.rmk (grub_probe_SOURCES): Likewise.
7643         * conf/i386-ieee1275.rmk (grub_probe_SOURCES): Likewise.
7644         * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Likewise.
7645         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Likewise.
7647         * util/grub-probe.c: Include `<grub/file.h>' and `<sys/stat.h>'.
7648         (probe): Add a sanity check to make sure of our ability to read
7649         requested files when probing for filesystem type.
7651         * genmk.rb: Update copyright year (2007).
7653         * include/grub/fs.h (grub_fat_init, grub_fat_fini, grub_ext2_init)
7654         (grub_ext2_fini, grub_ufs_init, grub_ufs_fini, grub_minix_init)
7655         (grub_minix_fini, grub_hfs_init, grub_hfs_fini, grub_jfs_init)
7656         (grub_jfs_fini, grub_xfs_init, grub_xfs_fini, grub_affs_init)
7657         (grub_affs_fini, grub_sfs_init, grub_sfs_fini, grub_iso9660_init)
7658         : Remove function prototypes.
7660 2008-01-25  Robert Millan  <rmh@aybabtu.com>
7662         Revert my previous commits (based on wrong assumption of how grub_errno
7663         works).
7665         * kern/disk.c (grub_disk_open): Stop resetting grub_errno.
7666         * kern/file.c (grub_file_open): Likewise.
7668 2008-01-24  Pavel Roskin  <proski@gnu.org>
7670         * include/grub/ieee1275/ieee1275.h: Introduce flag for firmwares
7671         that hang if GRUB tries to setup colors.
7672         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Don't set
7673         colors for firmwares that don't support it.
7674         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag):
7675         Recognize Open Hack'Ware, set flags to work around its
7676         limitations.
7678 2008-01-24  Robert Millan  <rmh@aybabtu.com>
7680         * kern/file.c (grub_file_open): Do not account previous failures of
7681         unrelated functions when grub_errno is checked for.
7682         Reported by Oleg Strikov.
7684 2008-01-24  Bean  <bean123ch@gmail.com>
7686         * fs/ufs.c (GRUB_UFS_VOLNAME_LEN): New macro.
7687         (grub_ufs_sblock): New member volume name.
7688         (grub_ufs_find_file): Fix string copy bug.
7689         (grub_ufs_label): Implement this function properly.
7691         * fs/hfs.c (grub_hfs_cnid_type): New enum.
7692         (grub_hfs_iterate_records): Use the correct file number for extents
7693         and catalog file. Fix problem in next index calculation.
7694         (grub_hfs_find_node): Replace recursive function call with loop.
7695         (grub_hfs_iterate_dir): Replace recursive function call with loop.
7697 2008-01-23  Robert Millan  <rmh@aybabtu.com>
7699         * include/grub/i386/ieee1275/loader.h: Include `<grub/types.h>',
7700         `<grub/symbol.h>' and `<grub/multiboot.h>'.
7701         (grub_multiboot2_real_boot): New function prototype.
7703         * include/grub/i386/pc/memory.h: Include `<grub/machine/machine.h>'.
7704         [!GRUB_MACHINE_IEEE1275] (grub_lower_mem, grub_upper_mem): Disable.
7706         * kern/i386/ieee1275/init.c (grub_os_area_addr)
7707         (grub_os_area_size, grub_lower_mem, grub_upper_mem): Remove variables.
7709 2008-01-23  Robert Millan  <rmh@aybabtu.com>
7711         * kern/mm.c (grub_mm_init_region): Replace grub_dprintf() call with
7712         #ifdef'ed out grub_printf().
7714 2008-01-23  Robert Millan  <rmh@aybabtu.com>
7716         * term/i386/pc/at_keyboard.c (grub_keyboard_isr): #ifdef out
7717         grub_dprintf calls, since they make "debug=all" mode unusable.
7718         (grub_console_checkkey): Likewise.
7720 2008-01-23  Robert Millan  <rmh@aybabtu.com>
7722         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
7723         `term/i386/pc/at_keyboard.c'.
7724         (pkglib_MODULES): Add `serial.mod'.
7725         (serial_mod_SOURCES): New variable.
7726         (serial_mod_CFLAGS): Likewise.
7727         (serial_mod_LDFLAGS): Likewise.
7729         * include/grub/i386/ieee1275/console.h: Add `<grub/symbol.h>'.  Remove
7730         `<grub/powerpc/ieee1275/console.h>'.
7731         (grub_keyboard_controller_init): New function prototype.
7732         (grub_console_checkkey): Likewise.
7733         (grub_console_getkey): Likewise.
7735         * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize AT
7736         keyboard on i386.
7738         * term/ieee1275/ofconsole.c (grub_ofconsole_term): On i386, use
7739         grub_ofconsole_checkkey() and grub_ofconsole_getkey() for input.
7741 2008-01-23  Robert Millan  <rmh@aybabtu.com>
7743         * kern/i386/pc/init.c (make_install_device): When memdisk image is
7744         present, "(memdisk)/boot/grub" becomes the default prefix.
7746         * util/i386/pc/grub-mkrescue.in: Switch to a minimal core.img plus
7747         a memdisk tarball with all the modules.  Add --overlay=DIR option that
7748         allows users to overlay additional files into the image.
7750 2008-01-23  Robert Millan  <rmh@aybabtu.com>
7752         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add `machine/loader.h'
7753         and `machine/memory.h'.
7754         (pkglib_MODULES): Add `multiboot.mod' and `_multiboot.mod'.
7755         (_multiboot_mod_SOURCES): New variable.
7756         (_multiboot_mod_CFLAGS): Likewise.
7757         (_multiboot_mod_LDFLAGS): Likewise.
7758         (multiboot_mod_SOURCES): Likewise.
7759         (multiboot_mod_CFLAGS): Likewise.
7760         (multiboot_mod_LDFLAGS): Likewise.
7762         * include/grub/i386/ieee1275/loader.h: New file.
7764         * include/grub/i386/ieee1275/machine.h: Likewise.
7766         * include/grub/i386/ieee1275/memory.h: Likewise.
7768         * include/grub/i386/pc/init.h (grub_os_area_addr): Remove (redundant)
7769         variable declaration.
7770         (grub_os_area_size): Likewise.
7772         * kern/i386/ieee1275/init.c (grub_os_area_addr, grub_os_area_size)
7773         (grub_lower_mem, grub_upper_mem): New variables.
7774         (grub_stop_floppy): New function (just to make
7775         grub_multiboot2_real_boot() happy).
7777         * kern/i386/ieee1275/startup.S: Include `<grub/machine/memory.h>',
7778         `<grub/cpu/linux.h>', `<multiboot.h>' and `<multiboot2.h>'.
7779         (grub_stop): New function.
7780         Include `"../realmode.S"' and `"../loader.S"'.
7782         * loader/multiboot_loader.c: Include `<grub/machine/machine.h>'.
7783         Replace `__i386__' #ifdefs with `GRUB_MACHINE_PCBIOS'.
7785         * loader/powerpc/ieee1275/multiboot2.c (grub_mb2_arch_boot): On i386,
7786         rely on grub_multiboot2_real_boot() for final boot.
7788 2008-01-22  Robert Millan  <rmh@aybabtu.com>
7790         * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): When
7791         `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag is set, skip any
7792         device that doesn't look like an SD card.
7793         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
7794         `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag.
7795         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag): Detect
7796         OLPC laptop, and set `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' when
7797         found.
7799 2008-01-22  Robert Millan  <rmh@aybabtu.com>
7801         * kern/powerpc/ieee1275/init.c (grub_claim_heap): Add sanity check to
7802         avoid claiming over our own code.
7804 2008-01-22  Bean  <bean123ch@gmail.com>
7806         * conf/i386-pc.rmk (pkglib_MODULES): Add `jpeg.mod'.
7807         (jpeg_mod_SOURCES): New variable.
7808         (jpeg_mod_CFLAGS): Likewise.
7809         (jpeg_mod_LDFLAGS): Likewise.
7811         * video/readers/jpeg.c : New file.
7813 2008-01-22  Bean  <bean123ch@gmail.com>
7815         * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_FILE_NOT_FOUND when
7816         there are no more items.
7818 2008-01-21  Robert Millan  <rmh@aybabtu.com>
7820         * kern/mm.c (grub_mm_init_region): Improve debug message.
7822 2008-01-21  Robert Millan  <rmh@aybabtu.com>
7824         * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): New variable.
7825         (kernel_img_LDFLAGS): Use `GRUB_MEMORY_MACHINE_LINK_ADDR' as link
7826         address.
7827         (grub_mkimage_CFLAGS): Propagate `GRUB_MEMORY_MACHINE_LINK_ADDR' as
7828         a C macro.
7829         * include/grub/i386/pc/memory.h (GRUB_MEMORY_MACHINE_UPPER): New macro.
7830         Indicates start of upper memory.
7831         * util/i386/pc/grub-mkimage.c: Include `<grub/machine/memory.h>'.
7832         (generate_image): Abort when image size is big enough to corrupt
7833         upper memory.
7835         * include/grub/i386/pc/vga.h: Include `<grub/machine/memory.h>'.
7836         (GRUB_MEMORY_MACHINE_VGA_ADDR): Alias for `GRUB_MEMORY_MACHINE_UPPER'.
7837         * term/i386/pc/vga.c (VGA_MEM): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
7838         instead of hardcoding 0xA0000.
7839         * video/i386/pc/vbe.c: Include `<grub/machine/vga.h>'.
7840         (grub_vbe_set_video_mode): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
7841         instead of hardcoding 0xA0000.
7843 2008-01-21  Robert Millan  <rmh@aybabtu.com>
7845         * disk/memdisk.c (memdisk_size): New variable.
7846         (grub_memdisk_open): Replace grub_arch_memdisk_size() call with
7847         `memdisk_size'.
7848         (grub_memdisk_init): Initialize `memdisk_size'.  Reallocate memdisk
7849         image to dynamic memory.
7850         (grub_memdisk_fini): Replace grub_arch_memdisk_size() call with
7851         `memdisk_size'.  Free memdisk block.
7853 2008-01-21  Robert Millan  <rmh@aybabtu.com>
7855         Fix detection of very small filesystems (like tar).
7857         * fs/reiserfs.c (grub_reiserfs_mount): When disk is too small to
7858         contain a ReiserFS, abort with GRUB_ERR_BAD_FS rather than
7859         GRUB_ERR_OUT_OF_RANGE (which made the upper layer think there's
7860         a problem with this disk).
7862 2008-01-21  Robert Millan  <rmh@aybabtu.com>
7864         * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Add debug message
7865         on grub_biosdisk_rw_standard() error.
7867 2008-01-21  Robert Millan  <rmh@aybabtu.com>
7869         * include/grub/ieee1275/ieee1275.h: Add 2008 to Copyright line for
7870         recent changes.
7871         * kern/elf.c: Likewise.
7872         * kern/ieee1275/ieee1275.c: Likewise.
7873         * kern/powerpc/ieee1275/openfw.c: Likewise.
7874         * term/ieee1275/ofconsole.c: Likewise.
7876 2008-01-21  Robert Millan  <rmh@aybabtu.com>
7878         * include/grub/i386/pc/kernel.h: Include `<grub/symbol.h>'.
7880         * include/grub/kernel.h (grub_arch_memdisk_addr)
7881         (grub_arch_memdisk_size): Moved from here ...
7883         * include/grub/i386/pc/kernel.h (grub_arch_memdisk_addr)
7884         (grub_arch_memdisk_size): ... to here.
7886 2008-01-21  Robert Millan  <rmh@aybabtu.com>
7888         Mostly based on bugfix from Bean.
7890         * kern/elf.c (grub_elf32_phdr_iterate): Use `NESTED_FUNC_ATTR'
7891         attribute with hook() parameter.
7892         (grub_elf32_load): Use `NESTED_FUNC_ATTR' with grub_elf32_load_segment()
7893         declaration.
7894         (grub_elf64_phdr_iterate): Use `NESTED_FUNC_ATTR'
7895         attribute with hook() parameter.
7896         (grub_elf64_load): Use `NESTED_FUNC_ATTR' with grub_elf64_load_segment()
7897         declaration.
7899 2008-01-21  Robert Millan  <rmh@aybabtu.com>
7901         * conf/i386-pc.rmk (kernel_img_HEADERS): Add `machine/kernel.h'.
7902         (pkglib_MODULES): Add `memdisk.mod'.
7903         (memdisk_mod_SOURCES): New variable.
7904         (memdisk_mod_CFLAGS): Likewise.
7905         (memdisk_mod_LDFLAGS): Likewise.
7907         * disk/memdisk.c: New file.
7909         * include/grub/disk.h (grub_disk_dev_id): Add
7910         `GRUB_DISK_DEVICE_MEMDISK_ID'.
7912         * include/grub/i386/pc/kernel.h
7913         (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): New macro.
7914         (GRUB_KERNEL_MACHINE_PREFIX): Increment by 4.
7915         (grub_kernel_image_size): New variable declaration.
7916         (grub_total_module_size): Likewise.
7917         (grub_memdisk_image_size): Likewise.
7919         * include/grub/i386/pc/memory.h
7920         (GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR): New macro.
7922         * include/grub/kernel.h: Include `<grub/symbol.h>'.
7923         (grub_arch_memdisk_addr): New variable declaration.
7924         (grub_arch_memdisk_size): Likewise.
7926         * kern/i386/pc/init.c (grub_arch_memdisk_addr): New function.
7927         (grub_arch_memdisk_size): Likewise.
7929         * kern/i386/pc/startup.S (grub_memdisk_image_size): New variable.
7930         (codestart): Replace hardcoded `0x100000' with
7931         `GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR' macro.
7933         * util/i386/pc/grub-mkimage.c: Include `<grub/misc.h>'.
7934         (generate_image): Add `memdisk_path' parameter.  When `memdisk_path' is
7935         not NULL, append the contents of the file it refers to, at the end of
7936         the compressed kernel image.  Initialize `grub_memdisk_image_size'
7937         variable (at `GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE' offset).
7938         (options): Add "memdisk"|'m' option.
7939         (main): Parse --memdisk|-m option, and pass user-provided path as
7940         parameter to generate_image().
7942 2008-01-20  Robert Millan  <rmh@aybabtu.com>
7944         * kern/sparc64/ieee1275/openfw.c (grub_devalias_iterate): Copy debug
7945         grub_dprintf() calls from here ...
7946         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): ... to here.
7948 2008-01-20  Robert Millan  <rmh@aybabtu.com>
7950         Fix detection of "real mode" when /options/real-mode? doesn't exist.
7952         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_mmu): New variable
7953         declaration.
7954         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_mmu): New variable.
7955         (grub_ieee1275_find_options): If `grub_ieee1275_mmu' is 0, set
7956         `GRUB_IEEE1275_FLAG_REAL_MODE'.
7957         (cmain): Initialize `grub_ieee1275_mmu' (using /chosen/mmu integer
7958         property).
7959         * kern/powerpc/ieee1275/openfw.c (grub_map): Rely on pre-initialized
7960         `grub_ieee1275_mmu' rather than obtaining a handler on every call.
7962 2008-01-19  Robert Millan  <rmh@aybabtu.com>
7964         Get rid of confusing function (superseded by
7965         `grub_ieee1275_get_integer_property')
7966         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_decode_int_4): Remove
7967         prototype.
7968         * kern/ieee1275/ieee1275.c (grub_ieee1275_decode_int_4): Remove
7969         function.
7970         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid use of
7971         grub_ieee1275_decode_int_4(), by obtaining integer properties directly
7972         in native endianness from grub_ieee1275_get_integer_property().
7974 2008-01-19  Robert Millan  <rmh@aybabtu.com>
7976         * kern/powerpc/ieee1275/openfw.c (grub_halt): Issue "power-off"
7977         command after "shut-down", since implementations differ on which
7978         the command for halt is.
7980 2008-01-19  Robert Millan  <rmh@aybabtu.com>
7982         * include/grub/i386/linuxbios/console.h: Add header protection.
7983         (grub_keyboard_controller_init): New function prototype.
7984         * term/i386/pc/at_keyboard.c (KEYBOARD_COMMAND_ISREADY): New macro.
7985         (KEYBOARD_COMMAND_READ): Likewise.
7986         (KEYBOARD_COMMAND_WRITE): Likewise.
7987         (KEYBOARD_SCANCODE_SET1): Likewise.
7988         (grub_keyboard_controller_write): New function.
7989         (grub_keyboard_controller_read): Likewise.
7990         (grub_keyboard_controller_init): Likewise.
7992         * term/i386/pc/console.c: Include `<grub/machine/machine.h>'.
7993         (grub_console_init): On coreboot/LinuxBIOS, call
7994         grub_keyboard_controller_init().
7996 2008-01-19  Robert Millan  <rmh@aybabtu.com>
7998         PowerPC changes provided by Pavel Roskin.
8000         * kern/powerpc/ieee1275/cmain.c (cmain): Don't take any arguments.
8001         * kern/powerpc/ieee1275/crt0.S: Store r5 in grub_ieee1275_entry_fn,
8002         don't rely on cmain() doing it.
8003         * kern/i386/ieee1275/startup.S (_start): Store %eax in
8004         grub_ieee1275_entry_fn, don't rely on cmain() doing it.
8006 2008-01-16  Robert Millan  <rmh@aybabtu.com>
8008         * include/grub/i386/linuxbios/memory.h
8009         (GRUB_MEMORY_MACHINE_LINUXBIOS_TABLE_ADDR): Remove macro.
8010         * kern/i386/linuxbios/table.c (grub_linuxbios_table_iterate): Do not
8011         receive `table_header' as argument.  Instead, probe for it in the
8012         known memory ranges where it can be present.
8013         (grub_available_iterate): Do not pass a fixed `table_header' address
8014         to grub_linuxbios_table_iterate().
8016 2008-01-15  Robert Millan  <rmh@aybabtu.com>
8018         * configure.ac: Add `i386-ieee1275' to the list of supported targets.
8019         * conf/i386-ieee1275.rmk: New file.
8020         * include/grub/i386/ieee1275/console.h: Likewise.
8021         * include/grub/i386/ieee1275/ieee1275.h: Likewise.
8022         * include/grub/i386/ieee1275/kernel.h: Likewise.
8023         * include/grub/i386/ieee1275/time.h: Likewise.
8024         * kern/i386/ieee1275/init.c: Likewise.
8025         * kern/i386/ieee1275/startup.S: Likewise.
8027 2008-01-15  Robert Millan  <rmh@aybabtu.com>
8029         * kern/misc.c (grub_vsprintf): Do not reset `longlongfmt' to zero
8030         when pointers are 32-bit (but still do set it to one when they are
8031         64-bit).
8033 2008-01-15  Robert Millan  <rmh@aybabtu.com>
8035         * include/grub/ieee1275/ieee1275.h
8036         (grub_ieee1275_get_integer_property): New function prototype.
8038         * kern/ieee1275/ieee1275.c: Include `<grub/types.h>'.
8039         (grub_ieee1275_get_integer_property): New function.  Wraps around
8040         grub_ieee1275_get_property() to handle endianness.
8042         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Replace
8043         grub_ieee1275_get_property() with grub_ieee1275_get_integer_property()
8044         where appropriate.
8045         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Likewise.
8046         (grub_map): Likewise.
8047         * kern/sparc64/ieee1275/openfw.c (grub_map): Likewise.
8049 2008-01-15  Bean  <bean123ch@gmail.com>
8051         * normal/execute.c (grub_script_exec_argument_to_string): Check for undefined variable.
8052         (grub_script_execute_cmdline): Reset grub_errno.
8054         * normal/main.c (read_config_file): Reset grub_errno.
8056         * normal/parse.y (script_init): New.
8057         (script): Move function and menuentry here.
8058         (delimiter): New.
8059         (command): Add delimiter at the end of command.
8060         (commands): Adjust to match the new command.
8061         (commandblock): Remove grub_script_lexer_record_start.
8062         (menuentry): Add grub_script_lexer_record_start, use the new commands.
8063         (if): Use the new commands.
8065         * conf/common.rmk (pkgdata_MODULES): Add echo.mod.
8067 2008-01-15  Robert Millan  <rmh@aybabtu.com>
8069         * normal/menu.c (run_menu): Move timeout message from here ...
8070         (print_timeout): ... to here.
8071         (run_menu): Use print_timeout() once during initial draw to print
8072         the whole message, and again in every clock tick to update only
8073         the number of seconds.
8075 2008-01-15  Robert Millan  <rmh@aybabtu.com>
8077         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Obtain
8078         actual size of `available' from grub_ieee1275_get_property(), and
8079         restrict parsing to that bound.
8081 2008-01-15  Christian Franke  <franke@computer.org>
8083         * util/grub-emu.c: Replace <argp.h> by <getopt.h>.
8084         (argp_program_version): Remove variable.
8085         (argp_program_bug_address): Likewise.
8086         (options): Convert from struct argp_option to struct option.
8087         (struct arguments): Remove.
8088         (parse_opt): Remove.
8089         (usage): New function.
8090         (main): Replace struct args members by simple variables.
8091         Replace argp_parse() by getopt_long().
8092         Add switch to evaluate options.
8093         Add missing "(...)" around root_dev in prefix string.
8095 2008-01-14  Robert Millan  <rmh@aybabtu.com>
8097         * kern/powerpc/ieee1275/init.c (grub_exit): Reimplement as a wrapper
8098         for grub_ieee1275_exit(), in order to improve portability.
8100 2008-01-14  Robert Millan  <rmh@aybabtu.com>
8102         * util/grub.d/10_linux.in (prefix): Define.
8103         (exec_prefix): Likewise.  Both definitions are later used by `libdir'.
8105 2008-01-13  Pavel Roskin  <proski@gnu.org>
8107         * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Don't use
8108         grub_errno if no errors have been detected.
8110 2008-01-12  Robert Millan  <rmh@aybabtu.com>
8112         * include/grub/util/getroot.h (grub_dev_abstraction_types): New enum.
8113         (grub_util_get_dev_abstraction): New function prototype.
8115         * util/getroot.c: Include `<grub/util/getroot.h>'
8116         (grub_util_get_grub_dev): Move detection of abstraction type to ...
8117         (grub_util_get_dev_abstraction): ... here (new function).
8119         * util/grub-probe.c: Convert PRINT_* to an enum.  Add
8120         `PRINT_ABSTRACTION'.
8121         (probe): Probe for abstraction type when requested.
8122         (main): Understand `--target=abstraction'.
8124         * util/i386/efi/grub-install.in: Add abstraction module to core
8125         image when it is found to be necessary.
8126         * util/i386/pc/grub-install.in: Likewise.
8127         * util/powerpc/ieee1275/grub-install.in: Likewise.
8129         * util/update-grub_lib.in (font_path): Return system path without
8130         converting to GRUB path.
8131         * util/update-grub.in: Convert system path returned by font_path()
8132         to a GRUB path.  Use `grub-probe -t abstraction' to determine what
8133         abstraction module is needed for loading fonts (if any).  Export
8134         that as `GRUB_PRELOAD_MODULES'.
8135         * util/grub.d/00_header.in: Process `GRUB_PRELOAD_MODULES' (print
8136         insmod commands).
8138 2008-01-12  Yoshinori K. Okuji  <okuji@enbug.org>
8140         Remove some unused code from reiserfs.
8142         * fs/reiserfs.c (struct grub_reiserfs_key)
8143         [GRUB_REISERFS_KEYV2_BITFIELD]: Removed offset and type.
8144         (struct grub_reiserfs_node_body): Removed.
8145         (grub_reiserfs_get_key_v2_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
8146         Likewise.
8147         (grub_reiserfs_get_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
8148         Likewise.
8149         (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
8150         Likewise.
8151         (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
8152         Likewise.
8153         (grub_reiserfs_set_key_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
8154         Likewise.
8155         (grub_reiserfs_iterate_dir) [GRUB_REISERFS_KEYV2_BITFIELD]:
8156         Likewise.
8157         (grub_reiserfs_open) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
8158         (grub_reiserfs_read) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
8159         (grub_reiserfs_dir) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
8161 2008-01-10  Robert Millan  <rmh@aybabtu.com>
8163         * util/update-grub_lib.in (grub_file_is_not_garbage): New function.
8164         Determines if a file is garbage left by packaging systems, etc.
8165         * util/update-grub.in: Use grub_file_is_not_garbage() as a condition
8166         for processing /etc/grub.d scripts.
8167         * util/grub.d/10_hurd.in: Fix `GRUB_DISTRIBUTOR' comparison.
8168         * util/grub.d/10_linux.in: Likewise.  Use grub_file_is_not_garbage()
8169         as a condition for processing Linux images.
8171 2008-01-10  Pavel Roskin  <proski@gnu.org>
8173         * include/grub/powerpc/libgcc.h (__ucmpdi2): New export.  Needed
8174         to compile reiserfs.c on PowerPC.
8176 2008-01-10  Robert Millan  <rmh@aybabtu.com>
8178         * kern/device.c (grub_device_iterate): Do not abort device iteration
8179         when one of the devices cannot be opened.
8180         * kern/disk.c (grub_disk_open): Do not account previous failures of
8181         unrelated functions when grub_errno is checked for.
8183 2008-01-08  Robert Millan  <rmh@aybabtu.com>
8185         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): For
8186         `! grub_linux_is_bzimage', change order of address comparison to make
8187         it more intuitive, and improve "too big zImage" error message.
8189 2008-01-08  Robert Millan  <rmh@aybabtu.com>
8191         * Makefile.in (uninstall): Handle `$(update-grub_SCRIPTS)' and
8192         `$(update-grub_DATA)'.
8193         (distcheck): Fix race condition when invoking `$(MAKE)' on multiple
8194         targets.
8196 2008-01-07  Robert Millan  <rmh@aybabtu.com>
8198         * boot/i386/pc/boot.S (boot_drive_check): Add a comment indicating
8199         which instruction is modified by grub-setup during installation
8200         (since it wasn't obvious by only looking at this file).
8202 2008-01-07  Robert Millan  <rmh@aybabtu.com>
8204         * TODO: Rewrite.  Just refer to the wiki and the BTS instead of
8205         listing actual TODO items.
8207 2008-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
8209         * fs/reiserfs.c (grub_reiserfs_get_key_v2_type): Handle endianness
8210         correctly.
8211         (grub_reiserfs_get_key_offset): Likewise.
8212         (grub_reiserfs_set_key_offset): Likewise.
8213         (grub_reiserfs_set_key_type): Likewise.
8214         (grub_reiserfs_iterate_dir): Return 1 if found, otherwise 0.
8216         (GRUB_REISERFS_KEYV2_BITFIELD): Undefined. Probably it would be
8217         better to remove the bitfield version completely.
8219 2008-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
8221         * fs/reiserfs.c (grub_reiserfs_iterate_dir): ENTRY_ITEM must be
8222         allocated from the heap, due to the fshelp implementation.
8223         (grub_reiserfs_dir): Free NODE, due to the same reason.
8225 2008-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
8227         Mostly from Vincent Pelletier:
8229         * fs/reiserfs.c: New file.
8231         * conf/common.rmk (pkglib_MODULES): Added reiserfs.mod.
8232         (reiserfs_mod_SOURCES): New variable.
8233         (reiserfs_mod_CFLAGS): Likewise.
8234         (reiserfs_mod_LDFLAGS): Likewise.
8236         * DISTLIST: Added boot/i386/pc/lnxboot.S, commands/hexdump.c,
8237         disk/ata.c, fs/cpio.c, fs/ntfscomp.c, fs/reiserfs.c,
8238         include/grub/ntfs.h, include/grub/i386/pc/machine.h, and
8239         normal/color.c.
8241 2008-01-06  Robert Millan  <rmh@aybabtu.com>
8243         * normal/color.c: Remove `<grub/env.h>'.
8245 2008-01-05  Jeroen Dekkers  <jeroen@dekkers.cx>
8247         * include/grub/normal.h: Include <grub/env.h>.
8249 2008-01-05  Robert Millan  <rmh@aybabtu.com>
8251         * util/i386/pc/grub-setup.c (usage): Replace obsolete `(hd0,0)' in
8252         usage example with `(hd0,1)'.
8253         Reported by Samuel Thibault.
8255 2008-01-05  Robert Millan  <rmh@aybabtu.com>
8257         * kern/i386/loader.S (grub_linux_is_bzimage): New variable.
8258         (grub_linux_boot_zimage): Rename to ...
8259         (grub_linux_boot): ... this.
8260         (grub_linux_boot_bzimage): Merge with `grub_linux_boot_zimage'.
8261         (grub_linux_boot_zimage): Conditionalize zImage copy.
8263         * include/grub/i386/loader.h (grub_linux_is_bzimage): Add prototype.
8264         (grub_linux_boot_bzimage): Remove prototype.
8265         (grub_linux_boot_zimage): Rename to ...
8266         (grub_linux_boot): ... this.
8268         * loader/i386/pc/linux.c (big_linux): Replace with `grub_linux_is_bzimage'.
8269         (grub_linux_boot): Remove function.
8271 2008-01-05  Robert Millan  <rmh@aybabtu.com>
8273         * include/grub/normal.h (grub_env_write_color_normal): New prototype.
8274         (grub_env_write_color_highlight): Likewise.
8275         (grub_wait_after_message): Likewise.
8277         * normal/color.c: New file.
8279         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/color.c'.
8280         (normal_mod_DEPENDENCIES): Likewise.
8282         * conf/i386-efi.rmk (grub_emu_SOURCES): Add `normal/color.c'.
8283         (normal_mod_DEPENDENCIES): Likewise.
8285         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add `normal/color.c'.
8286         (normal_mod_DEPENDENCIES): Likewise.
8288         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `normal/color.c'.
8289         (normal_mod_DEPENDENCIES): Likewise.
8291         * normal/menu_entry.c (run): Rely on grub_wait_after_message()
8292         for waiting after a message is printed.
8293         * normal/main.c (read_config_file): Likewise.
8294         (grub_normal_init): Register grub_env_write_color_normal() and
8295         grub_env_write_color_highlight() hooks.  Mark `color_normal' and
8296         `color_highlight' variables as global.
8298         * normal/menu.c (grub_wait_after_message): New function.
8299         (grub_color_menu_normal): New variable.  Replaces ...
8300         (GRUB_COLOR_MENU_NORMAL): ... this macro.
8301         (grub_color_menu_highlight): New variable.  Replaces ...
8302         (GRUB_COLOR_MENU_HIGHLIGHT): ... this macro.
8303         (draw_border): Set color state to `GRUB_TERM_COLOR_NORMAL' instead of
8304         `GRUB_TERM_COLOR_STANDARD'.
8305         (print_message): Use `grub_setcolorstate' to reload colors.  Rename
8306         `normal_code' and `highlight_code' to `old_color_normal' and
8307         `old_color_highlight', respectively.
8308         (grub_menu_init_page): Update colors when drawing the menu, based on
8309         `menu_color_normal' and `menu_color_highlight' variables.
8310         (grub_menu_run): Rely on grub_wait_after_message() for waiting after
8311         a message is printed.
8313 2008-01-05  Robert Millan  <rmh@aybabtu.com>
8315         * kern/env.c (grub_env_context_open): Propagate hooks for global
8316         variables to new context.
8318         * kern/main.c (grub_set_root_dev): Export `root' variable.
8320 2008-01-05  Robert Millan  <rmh@aybabtu.com>
8322         * util/biosdisk.c (get_os_disk): Check for devfs-style IDE and SCSI
8323         discs unconditionally, since udev and others have options to provide
8324         them.
8326 2008-01-05  Robert Millan  <rmh@aybabtu.com>
8328         * normal/completion.c (iterate_dir): Skip `.' and `..' directories.
8330 2008-01-04  Christian Franke  <franke@computer.org>
8332         * kern/i386/pc/init.c (grub_machine_init): Fix evaluation
8333         of eisa_mmap.
8335 2008-01-03  Pavel Roskin  <proski@gnu.org>
8337         * kern/i386/linuxbios/init.c: Put "void" to all function
8338         declarations with no arguments.
8339         * kern/powerpc/ieee1275/init.c: Likewise.
8340         * term/i386/pc/at_keyboard.c: Likewise.
8341         * term/i386/pc/vga_text.c: Likewise.
8342         * util/grub-mkdevicemap.c: Likewise.
8344 2008-01-02  Robert Millan  <rmh@aybabtu.com>
8346         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Improve error
8347         message when loaded image is out of bounds.
8348         (grub_multiboot_load_elf64): Likewise.
8350 2008-01-02  Pavel Roskin  <proski@gnu.org>
8352         * util/grub.d/10_linux.in: Try version without ".old" when
8353         looking for initrd.  It's better to use initrd from the newer
8354         kernel of the same version than no initrd at all.
8356 2008-01-01  Robert Millan  <rmh@aybabtu.com>
8358         * util/biosdisk.c (get_os_disk): Fix check for IDE or SCSI discs.
8360 2008-01-01  Vesa Jaaskelainen  <chaac@nic.fi>
8362         * include/grub/video.h: Added grub_video_unmap_color and
8363         grub_video_get_active_render_target.
8364         (grub_video_adapter): Added unmap_color and get_active_render_target.
8366         * video/video.c: Added grub_video_unmap_color and
8367         grub_video_get_active_render_target.
8368         (grub_video_get_info): Changed method to accept NULL pointer as an
8369         argument to allow detection of active video adapter.
8371         * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as
8372         grub_video_vbe_unmap_color_int.
8373         Added grub_video_vbe_unmap_color and
8374         grub_video_vbe_get_active_render_target.
8375         (grub_video_vbe_adapter): Added unmap_color and
8376         get_active_render_target.
8378         * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage
8379         with grub_video_vbe_unmap_color_int.
8381         * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added.
8382         (DEFAULT_NORMAL_COLOR): Likewise.
8383         (DEFAULT_HIGHLIGHT_COLOR) Likewise.
8384         (DEFAULT_FG_COLOR): Removed.
8385         (DEFAULT_BG_COLOR): Likewise.
8386         (DEFAULT_CURSOR_COLOR): Changed value.
8387         (grub_virtual_screen): Added standard_color_setting,
8388         normal_color_setting, highlight_color_setting and term_color.
8389         (grub_virtual_screen): Removed fg_color_setting and bg_color_setting.
8390         (bitmap_width): Added.
8391         (bitmap_height): Likewise.
8392         (bitmap): Likewise.
8393         (set_term_color): Likewise.
8394         (grub_virtual_screen_setup): Changed to use new terminal coloring
8395         settings.
8396         (grub_gfxterm_init): Added init for bitmap.
8397         (grub_gfxterm_fini): Added destroy for bitmap.
8398         (redraw_screen_rect): Updated to use background bitmap and new
8399         terminal coloring.
8400         (scroll_up): Added optimization for case when there is no bitmap.
8401         (grub_gfxterm_cls): Fixed to use correct background color.
8402         (grub_virtual_screen_setcolorstate): Changed to use new terminal
8403         coloring.
8404         (grub_virtual_screen_setcolor): Likewise.
8405         (grub_virtual_screen_getcolor): Added.
8406         (grub_gfxterm_background_image_cmd): Likewise.
8407         (grub_video_term): Added setcolor and getcolor.
8408         (MOD_INIT): Added registration of background_image command.
8409         (MOD_TERM): Added unregistration for background_image command.
8411 2007-12-30  Pavel Roskin  <proski@gnu.org>
8413         * loader/multiboot_loader.c: Fix multiboot command
8414         unregistration.  Fix all typos in the word "multiboot".
8416 2007-12-29  Pavel Roskin  <proski@gnu.org>
8418         * util/grub.d/10_linux.in: Refactor search for initrd.  Add
8419         support for initrd names used in Fedora.
8421 2007-12-26  Bean  <bean123ch@gmail.com>
8423         * conf/common.rmk (pkgdata_MODULES): Add cpio.mod.
8424         (cpio_mod_SOURCES): New variable.
8425         (cpio_mod_CFLAGS): Likewise.
8426         (cpio_mod_LDFLAGS): Likewise.
8428         * fs/cpio.c: New file.
8430         * conf/i386-pc.rmk (grub_emu_SOURCES): Add cpio.c.
8432         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
8434         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
8436         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8438 2007-12-25  Robert Millan  <rmh@aybabtu.com>
8440         * include/grub/term.h (struct grub_term): Add `getcolor' function.
8441         (grub_getcolor): New function.
8443         * kern/term.c (grub_getcolor): New function.
8444         * normal/menu.c (GRUB_COLOR_MENU_NORMAL): New macro.
8445         (GRUB_COLOR_MENU_HIGHLIGHT): New macro.
8446         (print_entry): Set normal and highlight colors to
8447         `GRUB_COLOR_MENU_NORMAL' and `GRUB_COLOR_MENU_HIGHLIGHT',
8448         respectively, before printing and restore them to old
8449         values afterwards.
8450         (grub_menu_init_page): Likewise.  Fill an additional colored space
8451         that would otherwise be left blank.
8453         * term/efi/console.c (grub_console_getcolor): New function.
8454         (struct grub_console_term.getcolor): New variable.
8455         * term/i386/pc/console.c (grub_console_getcolor): New function.
8456         (struct grub_console_term.getcolor): New variable.
8457         * term/ieee1275/ofconsole.c (grub_ofconsole_getcolor): New function.
8458         (struct grub_console_term.getcolor): New variable.
8460         * term/i386/pc/serial.c (grub_serial_setcolor): Remove function.
8461         (struct grub_console_term.setcolor): Remove variable.
8462         * term/i386/pc/vesafb.c (grub_virtual_screen_setcolor): Remove function.
8463         (struct grub_console_term.setcolor): Remove variable.
8464         * term/i386/pc/vga.c (grub_vga_setcolor): Remove function.
8465         (struct grub_console_term.setcolor): Remove variable.
8466         * term/gfxterm.c (grub_virtual_screen_setcolor): Remove function.
8467         (struct grub_console_term.setcolor): Remove variable.
8469 2007-12-25  Robert Millan  <rmh@aybabtu.com>
8471         * configure.ac: Search for possible unifont.hex locations, and
8472         define UNIFONT_HEX if found.
8474         * Makefile.in (UNIFONT_HEX): Define variable.
8475         (DATA): Rename to ...
8476         (PKGLIB): ... this.  Update all users.
8477         (PKGDATA): New variable.
8478         (pkgdata_IMAGES): Rename to ...
8479         (pkglib_IMAGES): ... this. Update all users.
8480         (pkgdata_MODULES): Rename to ...
8481         (pkglib_MODULES): ... this. Update all users.
8482         (pkgdata_PROGRAMS): Rename to ...
8483         (pkglib_PROGRAMS): ... this. Update all users.
8484         (pkgdata_DATA): Rename to ...
8485         (pkglib_DATA): ... this. Update all users.
8486         (CLEANFILES): Redefine to `$(pkglib_DATA) $(pkgdata_DATA)'.
8487         (unicode.pff, ascii.pff): New rules.
8488         (all-local): Add `$(PKGDATA)' dependency.
8489         (install-local): Process `$(PKGDATA)'.
8491         * util/update-grub_lib.in (font_path): Search for *.pff files in
8492         a few more locations, including `${pkgdata}'.
8494 2007-12-23  Robert Millan  <rmh@aybabtu.com>
8496         Patch from Bean  <bean123ch@gmail.com>:
8497         * disk/loopback.c (grub_loopback_read): Add missing bit shift to
8498         `size'.
8500 2007-12-21  Bean  <bean123ch@gmail.com>
8502         * conf/common.rmk (pkgdata_MODULES): Add ntfscomp.mod.
8503         (ntfscomp_mod_SOURCES): New variable.
8504         (ntfscomp_mod_CFLAGS): Likewise.
8505         (ntfscomp_mod_LDFLAGS): Likewise.
8507         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfscomp.c.
8508         (grub_probe_SOURCES): Likewise.
8509         (grub_emu_SOURCES): Likewise.
8511         * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
8512         (grub_emu_SOURCES): Likewise.
8514         * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
8515         (grub_emu_SOURCES): Likewise.
8517         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
8518         (grub_emu_SOURCES): Likewise.
8520         * fs/ntfs.c (grub_ntfscomp_func): New variable.
8521         (read_run_list): Renamed to grub_ntfs_read_run_list.
8522         (decomp_nextvcn): Moved to ntfscomp.c.
8523         (decomp_getch): Likewise.
8524         (decomp_get16): Likewise.
8525         (decomp_block): Likewise.
8526         (read_block): Likewise.
8527         (read_data): Partially moved to ntfscomp.c.
8528         (fixup): Change unsigned to grub_uint16_t.
8529         (read_mft): Change unsigned long to grub_uint32_t.
8530         (read_attr): Likewise.
8531         (read_data): Likewise.
8532         (read_run_data): Likewise.
8533         (read_run_list): Likewise.
8534         (read_mft): Likewise.
8536         * fs/ntfscomp.c: New file.
8538         * include/grub/ntfs.h: New file.
8540 2007-12-16  Robert Millan  <rmh@aybabtu.com>
8542         * util/grub-mkdevicemap.c (make_device_map): Iterate up to 20 for
8543         IDE disk check, since Linux is known to support 20 IDE disks.
8544         Reported by Colin Watson.
8546 2007-12-15  Bean  <bean123ch@gmail.com>
8548         * conf/i386-pc.rmk (pkgdata_IMAGES): Add lnxboot.img.
8549         (lnxboot_img_SOURCES): New variable.
8550         (lnxboot_img_ASFLAGS): Likewise.
8551         (lnxboot_img_LDFLAGS): Likewise.
8553         * boot/i386/pc/lnxboot.S: New file.
8555 2007-11-24  Pavel Roskin  <proski@gnu.org>
8557         * configure.ac: Test if '--build-id=none' is supported by the
8558         linker.  If yes, add it to TARGET_LDFLAGS.  Build ID causes
8559         objcopy to generate incorrect binary files (binutils
8560         2.17.50.0.18-1 as shipped by Fedora 8).
8561         * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Use LDFLAGS when
8562         linking, so that build ID doesn't break the test.
8564 2007-11-24  Pavel Roskin  <proski@gnu.org>
8566         * include/grub/i386/time.h: use "void" in the argument list
8567         of grub_cpu_idle().
8568         * include/grub/powerpc/time.h: Likewise.
8569         * include/grub/sparc64/time.h: Likewise.
8571 2007-11-18  Christian Franke  <franke@computer.org>
8573         * util/console.c (grub_ncurses_getkey): Change curses KEY_* mapping,
8574         now return control chars instead of GRUB_CONSOLE_KEY_* constants.
8575         This fixes the problem that function keys did not work in grub-emu.
8577 2007-11-18  Christian Franke  <franke@computer.org>
8579         * disk/host.c (grub_host_open): Remove attribute unused from
8580         name parameter. Add check for "host". This fixes the problem
8581         that grub-emu does not find partitions.
8583 2007-11-18  Christian Franke  <franke@computer.org>
8585         * util/hostfs.c (is_dir): New function.
8586         (grub_hostfs_dir):  Handle missing dirent.d_type case.
8587         (grub_hostfs_read): Add missing fseek().
8588         (grub_hostfs_label): Clear label pointer.  This fixes a crash
8589         of grub-emu on "ls (host)".
8591 2007-11-18  Christian Franke  <franke@computer.org>
8593         * include/grub/i386/pc/init.h (struct grub_machine_mmap_entry):
8594         Add attribute packed, gcc 3.4.4 on Cygwin aligns this
8595         to 64 bit boundary by default.
8597 2007-11-18  Bean  <bean123ch@gmail.com>
8599         * conf/common.rmk (pkgdata_MODULES): Add hexdump.mod.
8600         (hexdump_mod_SOURCES): New variable.
8601         (hexdump_mod_CFLAGS): Likewise.
8602         (hexdump_mod_LDFLAGS): Likewise.
8604         * conf/i386-pc.rmk (grub_emu_SOURCES): Add command/hexdump.c.
8606         * conf/i386-efi.rmk (grub_emu_SOURCES): Add command/hexdump.c.
8608         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add command/hexdump.c.
8610         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add command/hexdump.c.
8612         * include/grub/hexdump.h: New file.
8614         * commands/hexdump.c: New file.
8616 2007-11-10  Robert Millan  <rmh@aybabtu.com>
8618         * commands/i386/pc/play.c (beep_off): Switch order of arguments
8619         in grub_outb() calls.
8620         (beep_on): Likewise.
8622 2007-11-10  Christian Franke  <franke@computer.org>
8624         * normal/menu.c (run_menu): Check for empty menu to avoid crash.
8625         (grub_menu_run): Likewise.
8627 2007-11-10  Robert Millan  <rmh@aybabtu.com>
8629         * include/grub/i386/efi/machine.h: New file.
8630         * include/grub/i386/linuxbios/machine.h: Likewise.
8631         * include/grub/i386/pc/machine.h: Likewise.
8632         * include/grub/powerpc/ieee1275/machine.h: Likewise.
8633         * include/grub/sparc64/ieee1275/machine.h: Likewise.
8635         * term/i386/pc/serial.c: Include <grub/machine/machine.h>.
8636         (serial_hw_io_addr): New variable.
8637         (serial_hw_get_port): Obtain port address from `serial_hw_io_addr'
8638         instead of `(unsigned short *) 0x400'.
8640 2007-11-10  Bean  <bean123ch@gmail.com>
8642         * fs/ntfs.c (read_block): Fix a bug caused by adjacent blocks.
8644 2007-11-10  Vesa Jaaskelainen  <chaac@nic.fi>
8646         * conf/i386-pc.rmk (pkgdata_MODULES): Added vga.mod.
8647         (vga_mod_SOURCES): Added.
8648         (vga_mod_CFLAGS): Likewise.
8649         (vga_mod_LDFLAGS): Likewise.
8651         * term/i386/pc/vga.c (get_map_mask): Switch order of arguments in
8652         grub_outb() calls.
8653         (set_map_mask): Likewise.
8654         (set_read_map): Likewise.
8655         (set_read_address): Likewise.
8656         (vga_font): Removed variable.
8657         (get_vga_glyph): Removed function.
8658         (invalidate_char): Likewise.
8659         (write_char): Changed to use grub_font_get_glyph() for font
8660         information.
8661         (grub_vga_putchar): Likewise.
8662         (grub_vga_getcharwidth): Likewise.
8664 2007-11-10  Vesa Jaaskelainen  <chaac@nic.fi>
8666         * conf/i386-pc.rmk (boot_img_LDFLAGS): Use COMMON_LDFLAGS for target
8667         flags.
8668         (pxeboot_img_LDFLAGS): Likewise.
8669         (diskboot_img_LDFLAGS): Likewise.
8670         (kernel_img_LDFLAGS): Likewise.
8672 2007-11-06  Robert Millan  <rmh@aybabtu.com>
8674         * term/i386/pc/serial.c (serial_hw_put): Switch order of arguments
8675         in grub_outb() calls.
8676         (serial_hw_init): Likewise.
8678 2007-11-05  Robert Millan  <rmh@aybabtu.com>
8680         * util/update-grub.in: Allow files in ${update_grub_dir} to contain
8681         spaces.  Skip non-regular files.
8683 2007-11-05  Robert Millan  <rmh@aybabtu.com>
8685         * kern/disk.c (grub_disk_firmware_fini)
8686         (grub_disk_firmware_is_tainted): New variables.
8688         * include/grub/disk.h (grub_disk_firmware_fini)
8689         (grub_disk_firmware_is_tainted): Likewise.
8691         * disk/i386/pc/biosdisk.c (GRUB_MOD_FINI(biosdisk)): Moved from here ...
8692         (grub_disk_biosdisk_fini): ... to here.
8693         (GRUB_MOD_FINI(biosdisk)): Implement using grub_disk_biosdisk_fini().
8694         (GRUB_MOD_INIT(biosdisk)): Abort when `grub_disk_firmware_is_tainted'
8695         is set.  Register grub_disk_biosdisk_fini() in
8696         `grub_disk_firmware_fini'.
8698         * disk/ata.c: Remove `<grub/machine/biosdisk.h>'.
8699         (GRUB_MOD_INIT(ata)): Remove grub_biosdisk_fini() call.
8700         Use `grub_disk_firmware_is_tainted' and `grub_disk_firmware_fini'
8701         to finish existing firmware disk interface.
8703         * conf/i386-linuxbios.rmk (pkgdata_MODULES): Add `ata.mod'.
8704         (ata_mod_SOURCES): New variable.
8705         (ata_mod_CFLAGS): Likewise.
8706         (ata_mod_LDFLAGS): Likewise.
8708 2007-11-05  Robert Millan  <rmh@aybabtu.com>
8710         * disk/ata.c: Remove `<grub/machine/time.h>'.  Include `<grub/time.h>'.
8711         (grub_ata_wait): Reimplement using grub_millisleep().
8713         * include/grub/misc.h (grub_div_roundup): Fix parenthesization.
8714         * include/grub/i386/time.h (grub_cpu_idle): Disable `hlt' instruction.
8716 2007-11-03  Marco Gerards  <marco@gnu.org>
8718         * term/i386/pc/vga_text.c: Include <grub/cpu/io.h>.
8719         (CRTC_ADDR_PORT): New macro.
8720         (CRTC_DATA_PORT): Likewise.
8721         (CRTC_CURSOR): Likewise.
8722         (CRTC_CURSOR_ADDR_HIGH): Likewise.
8723         (CRTC_CURSOR_ADDR_LOW): Likewise.
8724         (update_cursor): New function.
8725         (grub_console_real_putchar): Call `update_cursor'.
8726         (grub_console_gotoxy): Likewise.
8727         (grub_console_cls): Set the default color when clearing the
8728         screen.
8729         (grub_console_setcursor): Implemented.
8731 2007-11-03  Marco Gerards  <marco@gnu.org>
8733         * disk/ata.c (grub_ata_pio_read): Don't wait for the command to
8734         become activate.
8735         (grub_ata_pio_write): Likewise.
8737         (grub_atapi_identify): Wait after issuing an ATA command.
8738         (grub_atapi_packet): Likewise.
8739         (grub_ata_identify): Likewise.
8740         (grub_ata_readwrite): Likewise.
8742 2007-11-03  Marco Gerards  <marco@gnu.org>
8744         * disk/ata.c (grub_ata_pio_read): Detect and return the error code.
8745         (grub_ata_pio_write): Likewise.
8746         (grub_ata_readwrite): Use `grub_error', instead of
8747         returning `grub_errno'.
8749 2007-11-03  Marco Gerards  <marco@gnu.org>
8751         * disk/ata.c (grub_ata_readwrite): Call grub_ata_pio_read and
8752         grub_ata_pio_write once for every single sector, instead of for
8753         multiple sectors.
8755 2007-10-31  Robert Millan  <rmh@aybabtu.com>
8757         * configure.ac: Add `i386-linuxbios' to the list of supported targets.
8759         * conf/i386-linuxbios.rmk: New file.
8761         * kern/i386/pc/hardware.c: Likewise.
8762         * term/i386/pc/at_keyboard.c: Likewise.
8763         * term/i386/pc/vga_text.c: Likewise.
8765         * include/grub/i386/linuxbios/boot.h: Likewise.
8766         * include/grub/i386/linuxbios/console.h: Likewise.
8767         * include/grub/i386/linuxbios/init.h: Likewise.
8768         * include/grub/i386/linuxbios/kernel.h: Likewise.
8769         * include/grub/i386/linuxbios/loader.h: Likewise.
8770         * include/grub/i386/linuxbios/memory.h: Likewise.
8771         * include/grub/i386/linuxbios/serial.h: Likewise.
8772         * include/grub/i386/linuxbios/time.h: Likewise.
8774         * kern/i386/linuxbios/init.c: Likewise.
8775         * kern/i386/linuxbios/startup.S: Likewise.
8776         * kern/i386/linuxbios/table.c: Likewise.
8778 2007-10-31  Marco Gerards  <marco@gnu.org>
8780         * conf/i386-pc.rmk (pkgdata_MODULES): Add `ata.mod'.
8781         (ata_mod_SOURCES): New variable.
8782         (ata_mod_CFLAGS): Likewise.
8783         (ata_mod_LDFLAGS): Likewise.
8785         * disk/ata.c: New file.
8787         * include/grub/disk.h (grub_disk_dev_id): Add
8788         `GRUB_DISK_DEV_ATA_ID'.
8790 2007-10-31  Robert Millan  <rmh@aybabtu.com>
8792         * include/grub/i386/pc/init.h (grub_lower_mem): Moved from here ...
8793         * include/grub/i386/pc/memory.h (grub_lower_mem): ... to here.
8795         * include/grub/i386/pc/init.h (grub_upper_mem): Moved from here ...
8796         * include/grub/i386/pc/memory.h (grub_upper_mem): ... to here.
8798         * include/grub/i386/pc/memory.h: Include `<grub/symbol.h>' and
8799         `<grub/types.h>'.
8801         * loader/i386/pc/multiboot.c: Include `<grub/machine/memory.h>'.
8803 2007-10-27  Robert Millan  <rmh@aybabtu.com>
8805         * include/grub/types.h (ULONG_MAX): Define macro.
8807 2007-10-22  Robert Millan  <rmh@aybabtu.com>
8809         * kern/i386/pc/startup.S: Remove `"kern/i386/realmode.S"'.  Include
8810         `"../realmode.S"'.
8811         Remove `"kern/i386/loader.S"'.  Include `"../loader.S"'.
8813 2007-10-22  Robert Millan  <rmh@aybabtu.com>
8815         * conf/i386-pc.rmk (kernel_img_SOURCES): Remove `disk/i386/pc/biosdisk.c'.
8816         (pkgdata_MODULES): Add `biosdisk.mod'.
8817         (biosdisk_mod_SOURCES, biosdisk_mod_CFLAGS, biosdisk_mod_LDFLAGS): New
8818         variables.
8820         * disk/i386/pc/biosdisk.c: Include `<grub/dl.h>'.
8821         (grub_biosdisk_init): Replace with ...
8822         (GRUB_MOD_INIT(biosdisk)): ... this.
8823         (grub_biosdisk_fini): Replace with ...
8824         (GRUB_MOD_FINI(biosdisk)): ... this.
8826         * kern/i386/pc/init.c: Remove `<grub/machine/biosdisk.h>'.
8827         (grub_machine_init): Remove call to grub_biosdisk_init().
8828         (grub_machine_fini): Remove call to grub_machine_fini().
8830         * util/i386/pc/grub-install.in (modules): Add `biosdisk'.
8832 2007-10-22  Robert Millan  <rmh@aybabtu.com>
8834         * include/grub/time.h: New file.
8835         * include/grub/i386/time.h: Likewise.
8836         * include/grub/powerpc/time.h: Likewise.
8837         * include/grub/sparc64/time.h: Likewise.
8839         * include/grub/i386/pc/time.h (KERNEL_TIME_HEADER): Rename all
8840         instances to ...
8841         (KERNEL_MACHINE_TIME_HEADER): ... this.
8842         * include/grub/powerpc/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
8843         instances to ...
8844         (KERNEL_MACHINE_TIME_HEADER): ... this.
8845         * include/grub/sparc64/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
8846         instances to ...
8847         (KERNEL_MACHINE_TIME_HEADER): ... this.
8849         * kern/i386/efi/init.c: Include `<grub/time.h>'.
8850         (grub_millisleep): New function.
8851         * kern/i386/pc/init.c: Include `<grub/time.h>'.
8852         (grub_millisleep): New function.
8853         * kern/powerpc/ieee1275/init.c: Include `<grub/time.h>'.
8854         Remove `grub/machine/time.h' include.
8855         (grub_millisleep): New function.
8856         * kern/sparc64/ieee1275/init.c: Include `<grub/time.h>'.
8857         Remove `grub/machine/time.h' include.
8858         (grub_millisleep): New function.
8860         * include/grub/misc.h (grub_div_roundup): New function.
8862         * kern/misc.c: Include `<grub/time.h>'.
8863         (grub_millisleep_generic): New function.
8865         * conf/i386-efi.rmk (kernel_mod_HEADERS): Remove `i386/efi/time.h'.
8866         Add `time.h'.
8867         * conf/i386-pc.rmk (kernel_img_HEADERS): Remove `machine/time.h'.
8868         Add `time.h'.
8869         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Remove
8870         `machine/time.h'.  Add `time.h'.
8871         * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
8873 2007-10-21  Robert Millan  <rmh@aybabtu.com>
8875         * include/grub/misc.h (grub_max): New function.
8877 2007-10-21  Robert Millan  <rmh@aybabtu.com>
8879         * util/misc.c (grub_util_info): Call fflush() before returning.
8881 2007-10-20  Robert Millan  <rmh@aybabtu.com>
8883         * genmk.rb (Image): Copy `extra_flags' from here ...
8884         (PModule): ... to here.  Use it in `#{obj}: #{src}' rule.
8886         * commands/i386/cpuid.c (grub_cmd_cpuid): Add __attribute__ ((unused))
8887         to `argc' and `args' arguments.
8889 2007-10-17  Robert Millan  <rmh@aybabtu.com>
8891         * kern/i386/loader.S: New file.
8893         * kern/i386/pc/startup.S (grub_linux_prot_size): Moved from here ...
8894         * kern/i386/loader.S (grub_linux_prot_size)... to here.
8895         * kern/i386/pc/startup.S (grub_linux_tmp_addr): Moved from here ...
8896         * kern/i386/loader.S (grub_linux_tmp_addr)... to here.
8897         * kern/i386/pc/startup.S (grub_linux_real_addr): Moved from here ...
8898         * kern/i386/loader.S (grub_linux_real_addr)... to here.
8899         * kern/i386/pc/startup.S (grub_linux_boot_zimage): Moved from here ...
8900         * kern/i386/loader.S (grub_linux_boot_zimage)... to here.
8901         * kern/i386/pc/startup.S (grub_linux_boot_bzimage): Moved from here ...
8902         * kern/i386/loader.S (grub_linux_boot_bzimage)... to here.
8903         * kern/i386/pc/startup.S (grub_multiboot_real_boot): Moved from here ...
8904         * kern/i386/loader.S (grub_multiboot_real_boot)... to here.
8905         * kern/i386/pc/startup.S (grub_multiboot2_real_boot): Moved from here ...
8906         * kern/i386/loader.S (grub_multiboot2_real_boot)... to here.
8908         * kern/i386/realmode.S: New file.
8910         * kern/i386/pc/startup.S (protstack): Moved from here ...
8911         * kern/i386/realmode.S (protstack)... to here.
8912         * kern/i386/pc/startup.S (gdt): Moved from here ...
8913         * kern/i386/realmode.S (gdt)... to here.
8914         * kern/i386/pc/startup.S (prot_to_real): Moved from here ...
8915         * kern/i386/realmode.S (prot_to_real)... to here.
8917         * kern/i386/pc/startup.S: Include `kern/i386/loader.S' and
8918         `kern/i386/realmode.S'.
8920 2007-10-17  Robert Millan  <rmh@aybabtu.com>
8922         * include/grub/i386/loader.h: New file.
8924         * include/grub/i386/pc/loader.h (grub_linux_prot_size)
8925         (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
8926         (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
8927         (grub_multiboot_real_boot, grub_multiboot2_real_boot)
8928         (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): Moved from here ...
8929         * include/grub/i386/loader.h (grub_linux_prot_size)
8930         (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
8931         (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
8932         (grub_multiboot_real_boot, grub_multiboot2_real_boot)
8933         (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): ... to here.
8935         * include/grub/i386/pc/loader.h: Include `grub/cpu/loader.h'.
8937 2007-10-15  Robert Millan  <rmh@aybabtu.com>
8939         * normal/misc.c (grub_normal_print_device_info): Do not probe for
8940         filesystem when dev->disk is unset.
8941         Do probe for filesystem even when dev->disk->has_partitions is set.
8942         In case a filesystem is found, always report it.
8943         In case it isn't, if dev->disk->has_partitions is set, report that
8944         a partition table was found instead of reporting that no filesystem
8945         could be identified.
8947 2007-10-12  Robert Millan  <rmh@aybabtu.com>
8949         * conf/powerpc-ieee1275.rmk (grub_mkimage_SOURCES): Replace reference
8950         to util/powerpc/ieee1275/grub-mkimage.c with util/elf/grub-mkimage.c.
8952         * include/grub/types.h (grub_host_to_target16): New macro.
8953         (grub_host_to_target32): Likewise.
8954         (grub_host_to_target64): Likewise.
8955         (grub_target_to_host16): Likewise.
8956         (grub_target_to_host32): Likewise.
8957         (grub_target_to_host64): Likewise.
8959         * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
8960         Renamed from to ...
8961         (GRUB_MOD_ALIGN): ...this.  Update all users.
8963         * util/elf/grub-mkimage.c (load_note): Replace grub_cpu_to_be32 with
8964         grub_host_to_target32.
8965         Replace grub_be_to_cpu32 with grub_target_to_host32.
8966         (load_modules): Likewise.
8967         (add_segments): Replace grub_be_to_cpu16 with grub_target_to_host16.
8968         Replace grub_be_to_cpu32 with grub_target_to_host32.
8969         Replace grub_cpu_to_be16 with grub_host_to_target16.
8970         Replace grub_cpu_to_be32 grub_host_to_target32.
8972 2007-10-12  Robert Millan  <rmh@aybabtu.com>
8974         * util/powerpc/ieee1275/grub-mkimage.c: Moved to ...
8975         * util/elf/grub-mkimage.c: ... here.
8977         * DISTLIST: Add `util/elf/grub-mkimage.c'.  Remove
8978         `util/powerpc/ieee1275/grub-mkimage.c'.
8980 2007-10-07  Robert Millan  <rmh@aybabtu.com>
8982         * kern/powerpc/ieee1275/init.c: Rename HEAP_LIMIT to HEAP_MAX_ADDR,
8983         and make it easier to figure out.
8984         Add HEAP_MIN_SIZE and HEAP_MAX_ADDR definitions.
8985         (grub_claim_heap): Use HEAP_MAX_ADDR rather than taking a parameter.
8986         Do not avoid claiming a region above HEAP_MAX_ADDR if that would
8987         leave us with less than HEAP_MIN_SIZE total heap.
8988         Avoid our total amount of heap to surpass HEAP_MAX_SIZE.
8990 2007-10-03  Robert Millan  <rmh@aybabtu.com>
8992         * include/grub/i386/io.h: New file.
8993         * commands/i386/pc/play.c (inb): Removed.
8994         (outb): Removed.
8995         Include grub/cpu/io.h.  Replace inb() with grub_inb() and outb()
8996         with grub_outb().
8997         * term/i386/pc/serial.c  (inb): Removed.
8998         (outb): Removed.
8999         Include grub/cpu/io.h.  Replace inb() with grub_inb() and outb()
9000         with grub_outb().
9001         * term/i386/pc/vga.c  (inb): Removed.
9002         (outb): Removed.
9003         Include grub/cpu/io.h.  Replace inb() with grub_inb() and outb()
9004         with grub_outb().
9006 2007-10-02  Robert Millan  <rmh@aybabtu.com>
9008         * conf/i386-efi.rmk (grub_emu_SOURCES): Add util/hostfs.c.
9009         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9010         Reported by Marcin Kurek.
9012 2007-09-07  Robert Millan  <rmh@aybabtu.com>
9014         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_test_flag): Detect
9015         SmartFirmware version updates (as released by Sven Luther), and avoid
9016         setting GRUB_IEEE1275_FLAG_NO_PARTITION_0 or
9017         GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS unless the running version is
9018         known broken.
9020 2007-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
9022         From Hitoshi Ozeki:
9023         * kern/i386/pc/init.c (compact_mem_regions): Decrease NUM_REGIONS
9024         when merging two regions.
9026 2007-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
9028         * kern/rescue.c (grub_enter_rescue_mode): Free ARGS.
9029         * normal/completion.c (grub_normal_do_completion): Likewise.
9030         Reported by Hitoshi Ozeki.
9032 2007-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
9034         Do not use devices at boot in chainloading.
9036         * loader/i386/pc/chainloader.c (boot_drive): New variable.
9037         (boot_part_addr): Likewise.
9038         (grub_chainloader_boot): Simply call grub_chainloader_real_boot
9039         with BOOT_DRIVE and BOOT_PART_ADDR.
9040         (grub_chainloader_cmd): Set BOOT_DRIVE and BOOT_PART_ADDR.
9041         Reported by Hitoshi Ozeki <h-ozeki@ck2.so-net.ne.jp>.
9043 2007-08-29  Robert Millan  <rmh@aybabtu.com>
9045         Patch from Simon Peter <dn.tlp@gmx.net>:
9046         * genmk.rb (Utility): Append $(#{src}_DEPENDENCIES) to #{obj} targets.
9047         * conf/i386-pc.rmk: Replace grub-probe_DEPENDENCIES with
9048         util/grub-probe.c_DEPENDENCIES.  Replace grub-setup_DEPENDENCIES with
9049         util/i386/pc/grub-setup.c_DEPENDENCIES.
9050         * conf/i386-efi.rmk: Replace grub-probe_DEPENDENCIES with
9051         util/grub-probe.c_DEPENDENCIES.
9052         * conf/powerpc-ieee1275.rmk: Likewise.
9054 2007-08-28  Robert Millan  <rmh@aybabtu.com>
9056         * util/i386/get_disk_name.c: New.  Implement grub_util_get_disk_name()
9057         to tell grub-mkdevicemap how to name devices.
9058         * util/ieee1275/get_disk_name.c: Likewise (using "ofpathname -a"
9059         feature).
9061         * conf/i386-efi.rmk (grub_mkdevicemap_SOURCES): Add
9062         util/i386/get_disk_name.c.
9063         * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Likewise.
9064         * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Add
9065         util/ieee1275/get_disk_name.c.
9067         * include/grub/util/misc.h: grub_util_get_disk_name() declaration.
9069         * DISTLIST: Add util/i386/get_disk_name.c and
9070         util/ieee1275/get_disk_name.c.
9072         * util/grub-mkdevicemap.c: Replace device naming logic with
9073         grub_util_get_disk_name() calls.
9075 2007-08-20  Robert Millan  <rmh@aybabtu.com>
9077         * normal/menu.c (run_menu): Refer to seconds as "s" not "seconds"
9078         (so that it works for both plural and singular quantities).
9080 2007-08-05  Robert Millan  <rmh@aybabtu.com>
9082         * util/grub.d/10_linux.in (test_gt): Strip out vmlinu[xz]- prefix
9083         so that [xz] isn't taken into account when determining order.
9085 2007-08-02  Marco Gerards  <marco@gnu.org>
9087         * DISTLIST: Add `disk/host.c', `fs/ntfs.c', `include/multiboot.h',
9088         `include/multiboot2.h', `include/grub/elfload.h',
9089         `include/multiboot.h', `include/grub/multiboot.h',
9090         `include/grub/multiboot_loader.h', `include/grub/multiboot2.h',
9091         `include/grub/i386/pc/biosdisk.h', `include/grub/util/biosdisk.h',
9092         `kern/elf.c', `loader/multiboot_loader.c',
9093         `loader/multiboot_loader_normal.c', `loader/multiboot2.c',
9094         `loader/i386/pc/multiboot2.c',
9095         `loader/powerpc/ieee1275/multiboot2.c', `util/hostfs.c' and
9096         `util/i386/pc/grub-mkrescue.in'.  Remove
9097         `include/grub/biosdisk.h', `include/grub/i386/pc/multiboot.h',
9098         `include/grub/i386/pc/util/biosdisk.h' and
9099         `include/grub/powerpc/ieee1275/multiboot.h'.
9101 2007-08-02  Bean  <bean123ch@gmail.com>
9103         * conf/common.rmk (pkgdata_MODULES): Add ntfs.mod.
9104         (ntfs_mod_SOURCES): New variable.
9105         (ntfs_mod_CFLAGS): Likewise.
9106         (ntfs_mod_LDFLAGS): Likewise.
9108         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfs.c.
9109         (grub_probe_SOURCES): Likewise.
9110         (grub_emu_SOURCES): Likewise.
9112         * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
9113         (grub_emu_SOURCES): Likewise.
9115         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
9116         (grub_emu_SOURCES): Likewise.
9118         * conf/misc.c (grub_utf16_to_utf8): Fix unicode conversion bug.
9120         * fs/ntfs.c: New file.
9122 2007-08-02  Bean  <bean123ch@gmail.com>
9124         * disk.h (grub_disk): Use NESTED_FUNC_ATTR.
9126         * file.h (grub_file): Likewise.
9128         * fshelp.h (grub_fshelp_read_file): Likewise.
9130         * util/i386/pc/grub-setup.c (setup): Likewise.
9131         (save_first_sector): Likewise.
9132         (save_blocklists): Likewise.
9134         * fs/affs.c (grub_affs_read_file): Likewise.
9136         * fs/ext2.c (grub_ext2_read_file): Likewise.
9138         * fs/fat.c (grub_fat_read_data): Likewise.
9140         * fs/fshelp.c (grub_fshelp_read_file): Likewise.
9142         * fs/hfs.c (grub_hfs_read_file): Likewise.
9144         * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
9146         * fs/jfs.c (grub_jfs_read_file): Likewise.
9148         * fs/minix.c (grub_minix_read_file): Likewise.
9150         * fs/sfs.c (grub_sfs_read_file): Likewise.
9152         * fs/ufs.c (grub_ufs_read_file): Likewise.
9154         * fs/xfs.c (grub_xfs_read_file): Likewise.
9156         * command/blocklist.c (read_blocklist): Likewise.
9157         (print_blocklist): Likewise.
9159 2007-08-02  Marco Gerards  <marco@gnu.org>
9161         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/host.c' and
9162         `util/hostfs.c'.
9164         * disk/host.c: New file.
9166         * util/hostfs.c: Likewise.
9168         * fs/hfsplus.c (grub_hfsplus_mount): When reading out of disk,
9169         return `GRUB_ERR_BAD_FS'.
9170         * fs/sfs.c (grub_sfs_mount): Likewise.
9171         * fs/xfs.c (grub_xfs_mount): Likewise.
9173         * include/grub/disk.h (enum grub_disk_dev_id): Add
9174         `GRUB_DISK_DEVICE_HOST_ID'.
9176         * util/grub-emu.c (main): Initialize and de-initialize hostfs.
9178 2007-07-24  Jerone Young  <jerone@gmail.com>
9180         * conf/i386-pc.rmk: Add Multiboot loader and multiboot 2 to multiboot
9181         modules for compilation.
9182         * conf/powerpc-ieee1275.rmk: Likewise.
9184         * include/multiboot.h: Move multiboot definitions to one file. Rename
9185         many definitions to not get grub specific.
9186         * include/multiboot2.h: Create header with multiboot 2 definitions.
9187         * include/grub/multiboot.h: Header for grub specific function
9188         prototypes and definitions.
9189         * include/grub/multiboot2.h: Likewise.
9190         * include/grub/multiboot_loader.h: Likewise.
9191         * include/grub/i386/pc/multiboot.h: Removed.
9192         * include/grub/powerpc/ieee1275/multiboot.h: Removed.
9194         * loader/multiboot_loader.c: Created to act as a proxy for multiboot 1
9195         and 2 to allow for one multiboot and module commands.
9196         * loader/multiboot2.c: Add multiboot2 functionality.
9197         * loader/i386/pc/multiboot.c: Modify for new multiboot header location
9198         and definition names.
9199         * loader/i386/pc/multiboot2.c: Created to add i386 specific multiboot
9200         2 functions.
9201         * loader/powerpc/ieee1275/multiboot2.c: Created to add powerpc
9202         ieee1275 specific multiboot2 code.
9204         * kern/i386/pc/startup.S: Change headers and definition names for
9205         multiboot. Add function grub_multiboot2_real_boot for multiboot 2.
9207 2007-07-22  Robert Millan  <rmh@aybabtu.com>
9209         * geninitheader.sh: Process file specified in first parameter rather
9210         than hardcoding grub_modules_init.lst.
9211         * geninit.sh: Likewise.  Also, construct header name dynamically rather
9212         than hardcoding grub_modules_init.h.
9214         * conf/common.rmk: Rename grub_modules_init.[ch] files associated with
9215         grub-emu to grub_emu_init.[ch].  Add rules to build analogous
9216         grub_probe_init.[ch] and grub_setup_init.[ch].
9218         * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Replace
9219         grub_modules_init.h with grub_emu_init.h.
9220         (grub_probe_DEPENDENCIES, grub_probe_SOURCES): Add new
9221         grub_probe_init.[ch] files.
9222         * conf/i386-efi.rmk: Likewise.
9223         * conf/i386-pc.rmk: Likewise.
9224         (grub_setup_DEPENDENCIES, grub_setup_SOURCES): Add new
9225         grub_setup_init.[ch] files.
9227         * util/grub-emu.c: Replace grub_modules_init.h with grub_emu_init.h.
9228         * util/grub-probe.c: Include grub_probe_init.h.  Use grub_init_all()
9229         to initialize modules rather than a list of hardcoded functions.
9230         * util/i386/pc/grub-setup.c: Include grub_setup_init.h.  Use
9231         grub_init_all() to initialize modules rather than a list of hardcoded
9232         functions.
9234 2007-07-22  Robert Millan  <rmh@aybabtu.com>
9236         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set
9237         GRUB_IEEE1275_FLAG_NO_PARTITION_0 flag when running on SmartFirmware.
9239 2007-07-22  Robert Millan  <rmh@aybabtu.com>
9241         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
9242         GRUB_IEEE1275_FLAG_BROKEN_OUTPUT flag.
9243         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set this
9244         flag when running on SmartFirmware.
9245         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid running
9246         "output-device output" command when GRUB_IEEE1275_FLAG_BROKEN_OUTPUT
9247         was set.
9249         * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
9250         Increase partno when GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS flag is set,
9251         rather than decreasing it.
9253         * util/i386/pc/grub-setup.c (setup): When embedding is required, but
9254         there's not enough space to do it, fail in the same way as when it
9255         can't be done because there are no partitions.
9257         * util/powerpc/ieee1275/grub-install.in: Improve error message shown
9258         when nvsetenv failed.
9260 2007-07-22  Yoshinori K. Okuji  <okuji@enbug.org>
9262         * conf/i386-pc.rmk (CLEANFILES): Removed for grub-mkrescue,
9263         because this rule is automatically generated.
9264         (grub-mkrescue): Removed for the same reason as above.
9266 2007-07-22  Yoshinori K. Okuji  <okuji@enbug.org>
9268         Migrate to GNU General Public License Version 3.
9270         * COPYING: Replaced with the plain text version of GPLv3.
9272         * config.guess: Updated from gnulib.
9273         * config.sub: Likewise.
9275         * geninit.sh: Output a GPLv3 copyright notice.
9276         * geninitheader.sh: Likewise.
9277         * genmodsrc.sh: Likewise.
9278         * gensymlist.sh.in: Likewise.
9280         * boot/i386/pc/boot.S: Upgraded to GPLv3.
9281         * boot/i386/pc/diskboot.S: Likewise.
9282         * boot/i386/pc/pxeboot.S: Likewise.
9283         * commands/blocklist.c: Likewise.
9284         * commands/boot.c: Likewise.
9285         * commands/cat.c: Likewise.
9286         * commands/cmp.c: Likewise.
9287         * commands/configfile.c: Likewise.
9288         * commands/echo.c: Likewise.
9289         * commands/help.c: Likewise.
9290         * commands/ls.c: Likewise.
9291         * commands/search.c: Likewise.
9292         * commands/terminal.c: Likewise.
9293         * commands/test.c: Likewise.
9294         * commands/videotest.c: Likewise.
9295         * commands/i386/cpuid.c: Likewise.
9296         * commands/i386/pc/halt.c: Likewise.
9297         * commands/i386/pc/play.c: Likewise.
9298         * commands/i386/pc/reboot.c: Likewise.
9299         * commands/i386/pc/vbeinfo.c: Likewise.
9300         * commands/i386/pc/vbetest.c: Likewise.
9301         * commands/ieee1275/halt.c: Likewise.
9302         * commands/ieee1275/reboot.c: Likewise.
9303         * commands/ieee1275/suspend.c: Likewise.
9304         * disk/loopback.c: Likewise.
9305         * disk/lvm.c: Likewise.
9306         * disk/raid.c: Likewise.
9307         * disk/efi/efidisk.c: Likewise.
9308         * disk/i386/pc/biosdisk.c: Likewise.
9309         * disk/ieee1275/ofdisk.c: Likewise.
9310         * font/manager.c: Likewise.
9311         * fs/affs.c: Likewise.
9312         * fs/ext2.c: Likewise.
9313         * fs/fat.c: Likewise.
9314         * fs/fshelp.c: Likewise.
9315         * fs/hfs.c: Likewise.
9316         * fs/hfsplus.c: Likewise.
9317         * fs/iso9660.c: Likewise.
9318         * fs/jfs.c: Likewise.
9319         * fs/minix.c: Likewise.
9320         * fs/sfs.c: Likewise.
9321         * fs/ufs.c: Likewise.
9322         * fs/xfs.c: Likewise.
9323         * hello/hello.c: Likewise.
9324         * include/grub/acorn_filecore.h: Likewise.
9325         * include/grub/arg.h: Likewise.
9326         * include/grub/bitmap.h: Likewise.
9327         * include/grub/boot.h: Likewise.
9328         * include/grub/cache.h: Likewise.
9329         * include/grub/device.h: Likewise.
9330         * include/grub/disk.h: Likewise.
9331         * include/grub/dl.h: Likewise.
9332         * include/grub/elfload.h: Likewise.
9333         * include/grub/env.h: Likewise.
9334         * include/grub/err.h: Likewise.
9335         * include/grub/file.h: Likewise.
9336         * include/grub/font.h: Likewise.
9337         * include/grub/fs.h: Likewise.
9338         * include/grub/fshelp.h: Likewise.
9339         * include/grub/gzio.h: Likewise.
9340         * include/grub/hfs.h: Likewise.
9341         * include/grub/kernel.h: Likewise.
9342         * include/grub/loader.h: Likewise.
9343         * include/grub/lvm.h: Likewise.
9344         * include/grub/misc.h: Likewise.
9345         * include/grub/mm.h: Likewise.
9346         * include/grub/net.h: Likewise.
9347         * include/grub/normal.h: Likewise.
9348         * include/grub/parser.h: Likewise.
9349         * include/grub/partition.h: Likewise.
9350         * include/grub/pc_partition.h: Likewise.
9351         * include/grub/raid.h: Likewise.
9352         * include/grub/rescue.h: Likewise.
9353         * include/grub/script.h: Likewise.
9354         * include/grub/setjmp.h: Likewise.
9355         * include/grub/symbol.h: Likewise.
9356         * include/grub/term.h: Likewise.
9357         * include/grub/terminfo.h: Likewise.
9358         * include/grub/tparm.h: Likewise.
9359         * include/grub/types.h: Likewise.
9360         * include/grub/video.h: Likewise.
9361         * include/grub/efi/api.h: Likewise.
9362         * include/grub/efi/chainloader.h: Likewise.
9363         * include/grub/efi/console.h: Likewise.
9364         * include/grub/efi/console_control.h: Likewise.
9365         * include/grub/efi/disk.h: Likewise.
9366         * include/grub/efi/efi.h: Likewise.
9367         * include/grub/efi/pe32.h: Likewise.
9368         * include/grub/efi/time.h: Likewise.
9369         * include/grub/i386/linux.h: Likewise.
9370         * include/grub/i386/setjmp.h: Likewise.
9371         * include/grub/i386/types.h: Likewise.
9372         * include/grub/i386/efi/kernel.h: Likewise.
9373         * include/grub/i386/efi/loader.h: Likewise.
9374         * include/grub/i386/efi/time.h: Likewise.
9375         * include/grub/i386/pc/biosdisk.h: Likewise.
9376         * include/grub/i386/pc/boot.h: Likewise.
9377         * include/grub/i386/pc/chainloader.h: Likewise.
9378         * include/grub/i386/pc/console.h: Likewise.
9379         * include/grub/i386/pc/init.h: Likewise.
9380         * include/grub/i386/pc/kernel.h: Likewise.
9381         * include/grub/i386/pc/loader.h: Likewise.
9382         * include/grub/i386/pc/memory.h: Likewise.
9383         * include/grub/i386/pc/multiboot.h: Likewise.
9384         * include/grub/i386/pc/serial.h: Likewise.
9385         * include/grub/i386/pc/time.h: Likewise.
9386         * include/grub/i386/pc/vbe.h: Likewise.
9387         * include/grub/i386/pc/vbeblit.h: Likewise.
9388         * include/grub/i386/pc/vbefill.h: Likewise.
9389         * include/grub/i386/pc/vbeutil.h: Likewise.
9390         * include/grub/i386/pc/vga.h: Likewise.
9391         * include/grub/ieee1275/ieee1275.h: Likewise.
9392         * include/grub/ieee1275/ofdisk.h: Likewise.
9393         * include/grub/powerpc/libgcc.h: Likewise.
9394         * include/grub/powerpc/setjmp.h: Likewise.
9395         * include/grub/powerpc/types.h: Likewise.
9396         * include/grub/powerpc/ieee1275/biosdisk.h: Likewise.
9397         * include/grub/powerpc/ieee1275/console.h: Likewise.
9398         * include/grub/powerpc/ieee1275/ieee1275.h: Likewise.
9399         * include/grub/powerpc/ieee1275/kernel.h: Likewise.
9400         * include/grub/powerpc/ieee1275/loader.h: Likewise.
9401         * include/grub/powerpc/ieee1275/multiboot.h: Likewise.
9402         * include/grub/powerpc/ieee1275/time.h: Likewise.
9403         * include/grub/powerpc/ieee1275/util/biosdisk.h: Likewise.
9404         * include/grub/sparc64/libgcc.h: Likewise.
9405         * include/grub/sparc64/setjmp.h: Likewise.
9406         * include/grub/sparc64/types.h: Likewise.
9407         * include/grub/sparc64/ieee1275/console.h: Likewise.
9408         * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
9409         * include/grub/sparc64/ieee1275/kernel.h: Likewise.
9410         * include/grub/sparc64/ieee1275/time.h: Likewise.
9411         * include/grub/util/biosdisk.h: Likewise.
9412         * include/grub/util/getroot.h: Likewise.
9413         * include/grub/util/lvm.h: Likewise.
9414         * include/grub/util/misc.h: Likewise.
9415         * include/grub/util/raid.h: Likewise.
9416         * include/grub/util/resolve.h: Likewise.
9417         * io/gzio.c: Likewise.
9418         * kern/device.c: Likewise.
9419         * kern/disk.c: Likewise.
9420         * kern/dl.c: Likewise.
9421         * kern/elf.c: Likewise.
9422         * kern/env.c: Likewise.
9423         * kern/err.c: Likewise.
9424         * kern/file.c: Likewise.
9425         * kern/fs.c: Likewise.
9426         * kern/loader.c: Likewise.
9427         * kern/main.c: Likewise.
9428         * kern/misc.c: Likewise.
9429         * kern/mm.c: Likewise.
9430         * kern/parser.c: Likewise.
9431         * kern/partition.c: Likewise.
9432         * kern/rescue.c: Likewise.
9433         * kern/term.c: Likewise.
9434         * kern/efi/efi.c: Likewise.
9435         * kern/efi/init.c: Likewise.
9436         * kern/efi/mm.c: Likewise.
9437         * kern/i386/dl.c: Likewise.
9438         * kern/i386/efi/init.c: Likewise.
9439         * kern/i386/efi/startup.S: Likewise.
9440         * kern/i386/pc/init.c: Likewise.
9441         * kern/i386/pc/lzo1x.S: Likewise.
9442         * kern/i386/pc/startup.S: Likewise.
9443         * kern/ieee1275/ieee1275.c: Likewise.
9444         * kern/powerpc/cache.S: Likewise.
9445         * kern/powerpc/dl.c: Likewise.
9446         * kern/powerpc/ieee1275/cmain.c: Likewise.
9447         * kern/powerpc/ieee1275/crt0.S: Likewise.
9448         * kern/powerpc/ieee1275/init.c: Likewise.
9449         * kern/powerpc/ieee1275/openfw.c: Likewise.
9450         * kern/sparc64/cache.S: Likewise.
9451         * kern/sparc64/dl.c: Likewise.
9452         * kern/sparc64/ieee1275/init.c: Likewise.
9453         * kern/sparc64/ieee1275/openfw.c: Likewise.
9454         * loader/efi/chainloader.c: Likewise.
9455         * loader/efi/chainloader_normal.c: Likewise.
9456         * loader/i386/efi/linux.c: Likewise.
9457         * loader/i386/efi/linux_normal.c: Likewise.
9458         * loader/i386/pc/chainloader.c: Likewise.
9459         * loader/i386/pc/chainloader_normal.c: Likewise.
9460         * loader/i386/pc/linux.c: Likewise.
9461         * loader/i386/pc/linux_normal.c: Likewise.
9462         * loader/i386/pc/multiboot.c: Likewise.
9463         * loader/i386/pc/multiboot_normal.c: Likewise.
9464         * loader/powerpc/ieee1275/linux.c: Likewise.
9465         * loader/powerpc/ieee1275/linux_normal.c: Likewise.
9466         * normal/arg.c: Likewise.
9467         * normal/cmdline.c: Likewise.
9468         * normal/command.c: Likewise.
9469         * normal/completion.c: Likewise.
9470         * normal/execute.c: Likewise.
9471         * normal/function.c: Likewise.
9472         * normal/lexer.c: Likewise.
9473         * normal/main.c: Likewise.
9474         * normal/menu.c: Likewise.
9475         * normal/menu_entry.c: Likewise.
9476         * normal/misc.c: Likewise.
9477         * normal/parser.y: Likewise.
9478         * normal/script.c: Likewise.
9479         * normal/i386/setjmp.S: Likewise.
9480         * normal/powerpc/setjmp.S: Likewise.
9481         * normal/sparc64/setjmp.S: Likewise.
9482         * partmap/acorn.c: Likewise.
9483         * partmap/amiga.c: Likewise.
9484         * partmap/apple.c: Likewise.
9485         * partmap/gpt.c: Likewise.
9486         * partmap/pc.c: Likewise.
9487         * partmap/sun.c: Likewise.
9488         * term/gfxterm.c: Likewise.
9489         * term/terminfo.c: Likewise.
9490         * term/efi/console.c: Likewise.
9491         * term/i386/pc/console.c: Likewise.
9492         * term/i386/pc/serial.c: Likewise.
9493         * term/i386/pc/vesafb.c: Likewise.
9494         * term/i386/pc/vga.c: Likewise.
9495         * term/ieee1275/ofconsole.c: Likewise.
9496         * util/biosdisk.c: Likewise.
9497         * util/console.c: Likewise.
9498         * util/genmoddep.c: Likewise.
9499         * util/getroot.c: Likewise.
9500         * util/grub-emu.c: Likewise.
9501         * util/grub-mkdevicemap.c: Likewise.
9502         * util/grub-probe.c: Likewise.
9503         * util/lvm.c: Likewise.
9504         * util/misc.c: Likewise.
9505         * util/raid.c: Likewise.
9506         * util/resolve.c: Likewise.
9507         * util/update-grub.in: Likewise.
9508         * util/update-grub_lib.in: Likewise.
9509         * util/grub.d/00_header.in: Likewise.
9510         * util/grub.d/10_hurd.in: Likewise.
9511         * util/grub.d/10_linux.in: Likewise.
9512         * util/i386/efi/grub-install.in: Likewise.
9513         * util/i386/efi/grub-mkimage.c: Likewise.
9514         * util/i386/pc/grub-install.in: Likewise.
9515         * util/i386/pc/grub-mkimage.c: Likewise.
9516         * util/i386/pc/grub-mkrescue.in: Likewise.
9517         * util/i386/pc/grub-setup.c: Likewise.
9518         * util/i386/pc/misc.c: Likewise.
9519         * util/powerpc/ieee1275/grub-install.in: Likewise.
9520         * util/powerpc/ieee1275/grub-mkimage.c: Likewise.
9521         * util/powerpc/ieee1275/misc.c: Likewise.
9522         * video/bitmap.c: Likewise.
9523         * video/video.c: Likewise.
9524         * video/i386/pc/vbe.c: Likewise.
9525         * video/i386/pc/vbeblit.c: Likewise.
9526         * video/i386/pc/vbefill.c: Likewise.
9527         * video/i386/pc/vbeutil.c: Likewise.
9528         * video/readers/tga.c: Likewise.
9530 2007-07-02  Robert Millan  <rmh@aybabtu.com>
9532         * conf/i386-efi.rmk: Replace obsolete reference to
9533         util/i386/pc/biosdisk.c with util/biosdisk.c, and util/i386/pc/getroot.c
9534         with util/getroot.c.
9535         * conf/powerpc-ieee1275.rmk: Likewise.
9536         * conf/sparc64-ieee1275.rmk: Likewise.
9538         * util/grub-emu.c (main): Fix unchecked pointer handling.
9540 2007-07-02  Robert Millan  <rmh@aybabtu.com>
9542         * util/i386/efi/grub-install.in: Allow `grub_probe --target=partmap'
9543         invocation to fail, in order to support partition-less media.
9545         * util/i386/pc/grub-install.in: Likewise.
9547         * util/powerpc/ieee1275/grub-install.in: Use grub-probe to determine
9548         which fs or partmap modules are needed (akin to its sister scripts).
9550         Also use grub-probe to get rid of unportable /proc/mounts check.
9552         Print the same informational message that the other scripts do, before
9553         exiting.
9555 2007-06-23  Robert Millan  <rmh@aybabtu.com>
9557         * util/update-grub_lib.in (font_path): New function.  Determine whether
9558         a font file can be found and, if so, echo the GRUB path to it.
9560         * util/update-grub.in: Handle multiple terminals depending on user
9561         input, platform availability and font file presence.  Propagate
9562         variables of our findings to /etc/grub.d/ children.
9564         * util/grub.d/00_header.in: Handle multiple terminals, based on
9565         environment setup by update-grub.
9567 2007-06-23  Robert Millan  <rmh@aybabtu.com>
9569         * conf/i386-pc.rmk (pkgdata_MODULES): Add serial.mod.
9571 2007-06-21  Robert Millan  <rmh@aybabtu.com>
9573         * include/grub/i386/pc/kernel.h: Define GRUB_KERNEL_MACHINE_DATA_END to
9574         indicate end of data section in kernel image.
9575         * include/grub/i386/efi/kernel.h: Define GRUB_KERNEL_MACHINE_PREFIX and
9576         GRUB_KERNEL_MACHINE_DATA_END.
9578         * kern/i386/pc/startup.S: Do not initialize grub_prefix, only reserve
9579         space for it.
9580         * kern/i386/efi/startup.S: Likewise.
9582         * util/i386/pc/grub-mkimage.c: Initialize grub_prefix to /boot/grub
9583         during image generation.  Implement --prefix option to override this
9584         patch.
9585         * util/i386/efi/grub-mkimage.c: Likewise.
9587         * util/update-grub_lib.in (convert_system_path_to_grub_path): Split
9588         code to make path relative to its root into a separate function.
9590         * util/i386/pc/grub-install.in: Use newly provided
9591         make_system_path_relative_to_its_root() to convert ${grubdir}, then
9592         pass the result to grub-install --prefix.
9594 2007-06-13  Robert Millan  <rmh@aybabtu.com>
9596         * include/grub/util/misc.h: Define DEFAULT_DIRECTORY and
9597         DEFAULT_DEVICE_MAP.
9598         * util/grub-emu.c: Use above definitions from misc.h instead of
9599         defining them.
9600         * util/grub-mkdevicemap.c: Likewise.
9601         * util/i386/pc/grub-setup.c: Likewise.
9602         * util/grub-probe.c: Likewise.
9603         (probe): Abort with grub_util_error() when either
9604         grub_guess_root_device or grub_util_get_grub_dev fails.
9606 2007-06-12  Robert Millan  <rmh@aybabtu.com>
9608         * normal/command.c (grub_command_execute): Use NULL rather than 0 for
9609         "pager" assignment.
9610         * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Likewise for
9611         "pcdata".
9612         * util/grub-probe.c (probe): Likewise for "drive_name".
9614 2007-06-11  Robert Millan  <rmh@aybabtu.com>
9616         * util/i386/pc/grub-mkrescue.in: Pad both floppy images with zeroes,
9617         not just the cdrom one.
9619 2007-06-11  Robert Millan  <rmh@aybabtu.com>
9621         * util/i386/pc/grub-mkrescue.in: Add "set -e".
9622         Add --pkglibdir=DIR option to override pkglibdir.
9623         Mention --image-type=TYPE in help output.
9624         Fix --grub-mkimage (it was a no-op).
9625         Abort gracefully when no parameter is given.
9627 2007-06-11  Robert Millan  <rmh@aybabtu.com>
9629         * util/i386/pc/grub-mkrescue.in: New file.
9630         * conf/i386-pc.rmk: Add its build declarations.  Put it in bin_SCRIPTS.
9631         * Makefile.in: Handle bin_SCRIPTS.
9633 2007-06-10  Vesa Jaaskelainen  <chaac@nic.fi>
9635         * term/gfxterm.c (grub_gfxterm_init): Added support for specifying
9636         list of video modes.
9638 2007-06-06  Robert Millan  <rmh@aybabtu.com>
9640         * util/update-grub_lib.in (convert_system_path_to_grub_path): Abort if
9641         file doesn't exist, or if it is in a filesystem grub can't read.
9643         * util/update-grub.in: Set fallback for GRUB_FS check to "unknown".  Do
9644         not abort if GRUB_DRIVE could not be defined.  Rearrange generated
9645         header comment to fit in 80 columns when the variables are resolved.
9647         * util/grub.d/00_header.in: Only set root variable when GRUB_DRIVE
9648         could be identified by update-grub.  Remove redundant check for
9649         unifont.pff existence (since convert_system_path_to_grub_path now
9650         handles that).
9652 2007-06-04  Robert Millan  <rmh@aybabtu.com>
9654         * conf/i386-efi.rmk (grub_probe_SOURCES): Add partmap/apple.c.
9656         * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.
9658         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add partmap/pc.c.
9660 2007-06-04  Robert Millan  <rmh@aybabtu.com>
9662         * conf/powerpc-ieee1275.rmk: Enable grub-mkdevicemap and grub-probe.
9664         * include/grub/partition.h: Declare grub_apple_partition_map_init and
9665         grub_apple_partition_map_fini.
9667         * util/biosdisk.c
9668         (grub_util_biosdisk_open): Replace BLKGETSIZE with BLKGETSIZE64 (needed
9669         to access >2 TiB disks).
9671         Print disk->total_sectors with %llu instead of %lu, since this
9672         variable is always 64-bit (prevents wrong disk size from being displayed
9673         on either >2 TiB disk or big-endian CPU).
9675         (grub_util_biosdisk_get_grub_dev): Convert gpt_partition_map handling
9676         into a generic case that supports all (sane) partition maps.
9678         Stop using grub_cpu_to_le32() on dos_part / bsd_part since it actually
9679         breaks big-endian.
9681         * util/grub-probe.c: Call grub_apple_partition_map_init() before probe()
9682         and grub_apple_partition_map_fini() after that.
9684 2007-06-01  Robert Millan  <rmh@aybabtu.com>
9686         * util/update-grub.in: Export GRUB_CMDLINE_LINUX.
9688         * util/grub.d/00_header.in: Only enable gfxterm when
9689         convert_system_path_to_grub_path() succeeds.
9691 2007-05-20  Robert Millan  <rmh@aybabtu.com>
9693         * util/update-grub_lib.in: New file.
9694         * DISTLIST: Add update-grub_lib.in.
9695         * conf/common.rmk: Generate update-grub_lib and install it in
9696         $(lib_DATA).
9697         * Makefile.in: Add install routine for $(lib_DATA).
9699         * util/grub.d/00_header.in: Use convert_system_path_to_grub_path()
9700         function provided by update-grub_lib to support arbitrary paths of
9701         unifont.pff.
9702         * util/update-grub.in: Use convert_system_path_to_grub_path() to
9703         initialize GRUB_DRIVE_BOOT and GRUB_DRIVE_BOOT_GRUB variables.
9705 2007-05-19  Robert Millan  <rmh@aybabtu.com>
9707         * commands/i386/cpuid.c: New module.
9708         * DISTLIST: Add it.
9709         * conf/i386-efi.rmk: Enable cpuid.mod.
9710         * conf/i386-pc.rmk: Likewise.
9712 2007-05-18  Jeroen Dekkers  <jeroen@dekkers.cx>
9714         * kern/disk.c (grub_disk_read): Check return value of
9715         grub_realloc().
9717 2007-05-18  Jeroen Dekkers  <jeroen@dekkers.cx>
9719         * util/getroot.c (grub_util_get_grub_dev): Support partitionable
9720         arrays.
9721         * disk/raid.c (grub_raid_open): Likewise.
9723 2007-05-17  Jeroen Dekkers  <jeroen@dekkers.cx>
9725         * util/biosdisk.c (linux_find_partition): Allocate real_dev on the
9726         stack instead of on the heap.
9728         * kern/disk.c (grub_disk_read): Make sure tmp_buf is big enough
9729         before doing a read on it.
9731         * configure.ac: Only use -fno-stack-protector for the target
9732         environment.
9734 2007-05-17  Jeroen Dekkers  <jeroen@dekkers.cx>
9736         * video/i386/pc/vbe.c (grub_video_vbe_create_render_target): Add
9737         __attribute_ ((unused)) to mode_type argument.
9739         * util/getroot.c (grub_guess_root_device): Fix #endif.
9741         * kern/misc.c (memcmp): Fix prototype.
9743         * include/grub/partition.h [GRUB_UTIL]
9744         (grub_gpt_partition_map_init): Add prototype.
9745         (grub_gpt_partition_map_fini): Likewise.
9747         * fs/jfs.c (struct grub_jfs_inode): Put __attribute__ ((packed)
9748         at the right place.
9750         * fs/fat.c (grub_fat_mount): Replace ~0UL with ~0U.
9751         (grub_fat_read_data): Likewise.
9752         (grub_fat_find_dir): Likewise.
9754         * font/manager.c (find_glyph): Make table a const.
9755         (grub_font_get_glyph): Remove bitmap from if statement.
9757 2007-05-16  Jeroen Dekkers  <jeroen@dekkers.cx>
9759         * util/getroot.c (grub_guess_root_device): Remove RAID and LVM
9760         code, first search for device in /dev/mapper, then in /dev.
9761         (grub_util_get_grub_dev): New function.
9762         * include/grub/util/getroot.h (grub_util_get_grub_dev): Add
9763         prototype.
9764         * util/grub-probe.c (probe): Remove check for RAID, call
9765         grub_util_get_grub_dev() instead of
9766         grub_util_biosdisk_get_grub_dev().
9767         * util/grub-emu.c (main): Call grub_util_get_grub_dev() instead of
9768         grub_util_biosdisk_get_grub_dev().
9769         * util/i386/pc/grub-setup.c (main): Likewise.
9771 2007-05-16  Robert Millan  <rmh@aybabtu.com>
9773         * DISTLIST: Update for the latest changes.
9774         * conf/i386-pc.rmk: Use the new paths for util/getroot.c,
9775         util/grub-mkdevicemap.c, util/grub-probe.c and util/biosdisk.c.
9776         * util/grub-emu.c: Replace grub/i386/pc/util/biosdisk.h with
9777         grub/util/biosdisk.h.
9778         * util/i386/pc/grub-setup.c: Replace grub/machine/util/biosdisk.h with
9779         grub/util/biosdisk.h.
9781 2007-05-16  Robert Millan  <rmh@aybabtu.com>
9783         * util/grub.d/00_header.in: Set default gfxmode to `640x480'.
9785 2007-05-16  Robert Millan  <rmh@aybabtu.com>
9787         * util/i386/efi/grub-install.in: New.
9788         * conf/i386-efi.rmk: Enable grub-mkdevicemap, grub-probe and the
9789         newly added grub-install.
9790         * util/biosdisk.c: Remove unnecessary grub/machine/biosdisk.h
9791         include.
9792         * util/getroot.c: Replace grub/i386/pc/util/biosdisk.h with
9793         grub/util/biosdisk.h.
9794         * util/grub-probe.c: Replace grub/machine/util/biosdisk.h with
9795         grub/util/biosdisk.h.
9797 2007-05-16  Robert Millan  <rmh@aybabtu.com>
9799         * include/grub/i386/pc/util/biosdisk.h: Moved to ...
9800         * include/grub/util/biosdisk.h: ... here.
9801         * util/i386/pc/biosdisk.c: Moved to ...
9802         * util/biosdisk.c: ... here.
9803         * util/i386/pc/getroot.c: Moved to ...
9804         * util/getroot.c: ... here.
9805         * util/i386/pc/grub-mkdevicemap.c: Moved to ...
9806         * util/grub-mkdevicemap.c: ... here.
9807         * util/i386/pc/grub-probe.c: Moved to ...
9808         * util/grub-probe.c: ... here.
9810 2007-05-15  Robert Millan  <rmh@aybabtu.com>
9812         * util/update-grub.in: Remove duplicated line in grub.cfg header
9813         message.
9815 2007-05-13  Robert Millan  <rmh@aybabtu.com>
9817         * util/update-grub.in: Fix a few assumptions about the devices holding
9818         /, /boot and /boot/grub being the same.
9819         * util/grub.d/00_header.in: Likewise.
9820         * util/grub.d/10_hurd.in: Likewise.
9821         * util/grub.d/10_linux.in: Likewise.
9823         * util/grub.d/10_linux.in: Implement Linux image sorting with arbitrary
9824         patterns.  Use that to define the `.old' suffix as older than `'.
9826         * util/grub.d/00_header.in: Set default gfxmode to `800x600x16'.
9828         * util/update-grub.in: Add a reference to ${sysconfdir}/default/grub in
9829         the grub.cfg header message.
9831 2007-05-11  Robert Millan  <rmh@aybabtu.com>
9833         * util/update-grub.in: Create device.map if it doesn't already exist,
9834         before attempting to run grub-probe.
9835         Check for grub-probe and grub-mkdevicemap with the same code
9836         grub-install is using.
9837         Remove test mode.
9839 2007-05-09  Jeroen Dekkers  <jeroen@dekkers.cx>
9841         * Makefile.in: Add the datarootdir autoconf variable.
9843 2007-05-09  Robert Millan  <rmh@aybabtu.com>
9845         * util/i386/pc/grub-probe.c (probe): When detecting partition map,
9846         fail gracefully if dev->disk->partition == NULL.
9848 2007-05-07  Robert Millan  <rmh@aybabtu.com>
9850         * util/i386/pc/grub-probe.c: Add `grub-probe -t partmap' parameter to
9851         determine partition map module.
9852         * util/i386/pc/grub-install.in: Use this feature to decide which
9853         partition module to load, instead of hardcoding pc and gpt.
9855 2007-05-07  Robert Millan  <rmh@aybabtu.com>
9857         * Makefile.in: Fix assumption that $(srcdir) has a trailing slash when
9858         source directory differs from build directory.
9860 2007-05-05  Robert Millan  <rmh@aybabtu.com>
9862         * util/powerpc/ieee1275/grub-install.in: Fix syntax error in pkglibdir
9863         initialisation.
9865 2007-05-05  Robert Millan  <rmh@aybabtu.com>
9867         * util/update-grub.in: Create ${grub_prefix} if it doesn't exist.
9869 2007-05-05  Robert Millan  <rmh@aybabtu.com>
9871         * util/grub.d/10_linux.in: Allow the administrator to insert Linux
9872         command-line arguments via ${GRUB_CMDLINE_LINUX}.
9874 2007-05-05  Robert Millan  <rmh@aybabtu.com>
9876         * conf/i386-pc.rmk (grub_setup_SOURCES): Add partmap/gpt.c.
9877         (grub_probe_SOURCES): Likewise.
9878         * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): Detect
9879         GPT and initialize dos_part and bsd_part accordingly.
9880         * util/i386/pc/grub-setup.c (setup): Ditto for install_dos_part and
9881         install_bsd_part.
9882         (main): Activate gpt module for use during partition identification,
9883         and deactivate it afterwards.
9884         * util/i386/pc/grub-install.in: Add gpt module to core.img.
9885         * util/i386/pc/grub-probe.c (main): Activate gpt module for use during
9886         partition identification, and deactivate it afterwards.
9888 2007-05-05  Robert Millan  <rmh@aybabtu.com>
9890         * term/i386/pc/console.c (grub_console_fini): Call
9891         grub_term_set_current() before grub_term_unregister().
9893 2007-05-04  Robert Millan  <rmh@aybabtu.com>
9895         * DISTLIST: Add util/update-grub.in, util/grub.d/00_header.in,
9896         util/grub.d/10_hurd.in, util/grub.d/10_linux.in and util/grub.d/README.
9897         * Makefile.in: Build update-grub_SCRIPTS.  Install update-grub_SCRIPTS
9898         and update-grub_DATA.
9899         * conf/common.rmk: Build and install update-grub components.
9900         * conf/common.mk: Regenerate.
9901         * util/update-grub.in: New.  Core of update-grub.
9902         * util/grub.d/00_header.in: New.  Generates grub.cfg header.
9903         * util/grub.d/10_hurd.in: New.  Generates boot entries for the Hurd.
9904         * util/grub.d/10_linux.in: New.  Generates boot entries for Linux.
9905         * util/grub.d/README: New.  Document grub.d directory layout.
9907 2007-05-01  Robert Millan  <rmh@aybabtu.com>
9909         * util/grub-emu.c: Move initialization functions
9910         grub_util_biosdisk_init() and grub_init_all() before
9911         grub_util_biosdisk_get_grub_dev(), which relies on them.
9913 2007-04-19  Robert Millan  <rmh@aybabtu.com>
9915         * util/powerpc/ieee1275/grub-install.in: Initialize ${bindir}, since
9916         it is used later.
9918 2007-04-18  Jerone Young  <jerone@gmail.com>
9920         * kernel/elf.c: Add missing parenthesis for conditional statement
9921         stanza.
9923 2007-04-10  Jerone Young  <jerone@gmail.com>
9925         * util/i386/pc/getroot.c: Update so that if root device is /dev/root ,
9926         continue on and look for device node with real device name.
9928 2007-04-10  Jerone Young  <jerone@gmail.com>
9930         * configure.ac: Add argument for autoconf to use transformation
9931         ability.
9932         * Makefile.in: Add autoconf package transformation code.
9933         * util/i386/pc/grub-install.in: Likewise.
9934         * util/powerpc/ieee1275/grub-install.in: Likewise.
9936 2007-03-19  Yoshinori K. Okuji  <okuji@enbug.org>
9938         * fs/ext2.c (EXT2_GOOD_OLD_REVISION): New macro.
9939         (EXT2_GOOD_OLD_INODE_SIZE): Likewise.
9940         (EXT2_REVISION): Likewise.
9941         (EXT2_INODE_SIZE): Likewise.
9942         (struct grub_ext2_block_group): Added a missing member
9943         "used_dirs".
9944         (grub_ext2_read_inode): Divide by the inode size in a superblock
9945         instead of 128 to obtain INODES_PER_BLOCK.
9946         Use the macro EXT2_INODE_SIZE instead of directly using
9947         SBLOCK->INODE_SIZE.
9949 2007-03-18  Yoshinori K. Okuji  <okuji@enbug.org>
9951         * fs/ext2.c (grub_ext2_read_inode): Use the inode size in a
9952         superblock instead of the structure size to compute an
9953         offset. This fixes the problem that GRUB could not read a
9954         filesystem when inode size is different from 128-byte.
9956 2007-03-05  Marco Gerards  <marco@gnu.org>
9958         * normal/main.c (read_config_file): When "menu" is not set, create
9959         an initial context.
9961 2007-02-21  Hollis Blanchard  <hollis@penguinppc.org>
9963         * kern/powerpc/ieee1275/init.c (HEAP_SIZE): Removed.
9964         (HEAP_LIMIT): New macro.
9965         (grub_claim_heap): Claim memory up to `heaplimit'.
9967 2007-02-21  Hollis Blanchard  <hollis@penguinppc.org>
9969         * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Link at 64KB.
9970         * kern/powerpc/ieee1275/init.c (_end): Add declaration.
9971         (_start): Likewise.
9972         (grub_arch_modules_addr): Return address after `_end'.
9973         * util/powerpc/ieee1275/grub-mkimage.c: Include grub/misc.h.
9974         (load_modules): Use new parameter as `p_paddr' and `p_vaddr'.
9975         (add_segments): Calculate `_end' from phdr size and location.
9976         (ALIGN_UP): Moved to ...
9977         * include/grub/misc.h: here.
9978         * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
9979         New macro.
9980         (GRUB_IEEE1275_MODULE_BASE): Removed.
9982 2007-02-20  Hollis Blanchard  <hollis@penguinppc.org>
9984         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Correct
9985         loop boundary.
9987 2007-02-20  Hollis Blanchard  <hollis@penguinppc.org>
9989         * include/grub/elfload.h (grub_elf32_load_hook_t): Return grub_err_t.
9990         All users updated.
9991         (grub_elf64_load_hook_t): Likewise.
9992         * kern/elf.c: Call `grub_error_push' before `grub_error'. Improve
9993         debug output.
9995 2007-02-20  Hollis Blanchard  <hollis@penguinppc.org>
9997         * kern/mm.c: Update copyright.
9998         (grub_mm_debug): Correct syntax error.
9999         (grub_mm_dump_free): New function.
10000         (grub_debug_free): Call `grub_free'.
10001         * include/grub/mm.h: Update copyright.
10002         (grub_mm_dump_free): Add declaration.
10004 2007-02-12  Hollis Blanchard  <hollis@penguinppc.org>
10006         * include/grub/ieee1275/ieee1275.h: Update copyright.
10007         * kern/powerpc/ieee1275/init.c: Likewise.
10008         * kern/powerpc/ieee1275/openfw.c: Likewise.
10010         * loader/powerpc/ieee1275/linux.c: Likewise.
10011         * include/grub/elfload.h: Likewise.
10012         * kern/elf.c: Likewise.
10013         (grub_elf32_load): Pass `base' and `size' parameters.  Update all
10014         callers.
10015         (grub_elf64_load): Likewise.
10016         (grub_elf32_load_segment): Move to a nested function.
10017         (grub_elf64_load_segment): Likewise.
10019 2007-02-12  Hollis Blanchard  <hollis@penguinppc.org>
10021         * include/grub/ieee1275/ieee1275.h (grub_available_iterate): New
10022         prototype.
10023         * kern/powerpc/ieee1275/init.c (grub_heap_start): Removed.
10024         (grub_heap_len): Likewise.
10025         (HEAP_SIZE): New macro.
10026         (grub_claim_heap): New function.
10027         (grub_machine_init): Don't claim heap directly.  Call
10028         `grub_claim_heap'.
10029         * kern/powerpc/ieee1275/openfw.c: Include alloca.h.
10030         (grub_available_iterate): New function.
10032 2007-02-03  Thomas Schwinge  <tschwinge@gnu.org>
10034         * aclocal.m4 (grub_CHECK_STACK_PROTECTOR): New definition.
10035         * configure.ac: Use it for testing the HOST and TARGET compilers.
10037 2006-12-13  Thomas Schwinge  <tschwinge@gnu.org>
10039         * Makefile.in (enable_grub_emu): New variable.
10040         * configure.ac (--enable-grub-emu): New option.
10041         Do the checks for (n)curses only if `--enable-grub-emu' is requested.
10042         * conf/i386-efi.rmk (sbin_UTILITIES): Add `grub-emu' only if requested.
10043         * conf/i386-pc.rmk: Likewise.
10044         * conf/powerpc-ieee1275.rmk: Likewise.
10045         * conf/sparc64-ieee1275.rmk (bin_UTILITIES): Likewise.
10047 2006-12-12  Marco Gerards  <marco@gnu.org>
10049         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_MENU'.
10051         * kern/env.c (grub_env_unset): Don't free the member `value' when
10052         the type is GRUB_ENV_VAR_DATA, in this case it's a user defined
10053         pointer.
10055         * normal/main.c (current_menu): Removed.
10056         (free_menu): Unset the `menu' environment variable.
10057         (grub_normal_menu_addentry): Make use of the environment variable
10058         `menu', instead of using the global `current_menu'.  Allocate
10059         memory for the sourcecode of this entry.
10060         (read_config_file): New argument `nested', changed all callers.
10061         Only in the case of a new context, initialize a new menu.  Set the
10062         `menu' environment variable.
10063         (grub_normal_execute): Don't set and unset the environment
10064         variable `menu' here anymore.  Only free the menu when leaving the
10065         context.
10067         * util/i386/pc/biosdisk.c (linux_find_partition): Fixed a memory
10068         leak.
10070 2006-12-11  Marco Gerards  <marco@gnu.org>
10072         * normal/menu_entry.c (run): Fix off by one bug so the last line
10073         is executed.  Move the loader check to outside the loop.
10075 2006-12-08  Hollis Blanchard  <hollis@penguinppc.org>
10077         * kern/powerpc/ieee1275/cmain.c (cmain): Mark r3 and r4 as `UNUSED'.
10079 2006-11-25  Yoshinori K. Okuji  <okuji@enbug.org>
10081         * util/i386/pc/grub-mkimage.c (generate_image): Fix the offset of
10082         the number of sectors.  Reported by Andrey Shuvikov
10083         <mr_hyro@yahoo.com>.
10085 2006-11-11  Jeroen Dekkers  <jeroen@dekkers.cx>
10087         * kern/disk.c (grub_disk_read): When there is a read error, always
10088         try to read only the necessary data.
10090         * conf/i386-pc.rmk (grub_probe_SOURCES): Add disk/lvm.c and
10091         disk/raid.c.
10092         * include/grub/disk.h [GRUB_UTIL] (grub_raid_init): New
10093         prototype.
10094         [GRUB_UTIL] (grub_raid_fini): Likewise.
10095         [GRUB_UTIL] (grub_lvm_init): Likewise.
10096         [GRUB_UTIL] (grub_lvm_fini): Likewise.
10097         * util/i386/pc/grub-probe.c (probe): Check whether DEVICE_NAME is
10098         RAID device and copy DEVICE_NAME to DRIVE_NAME in that case.
10099         (main): Call grub_raid_init(), grub_lvm_init(), grub_lvm_fini()
10100         and grub_raid_fini().
10102 2006-11-09  Jeroen Dekkers  <jeroen@dekkers.cx>
10104         * include/grub/types.h (__unused): Rename to UNUSED.
10105         * kern/elf.c (grub_elf32_size): Use UNUSED instead of __unused.
10106         (grub_elf64_size): Likewise.
10108 2006-11-03  Hollis Blanchard  <hollis@penguinppc.org>
10110         * kern/elf.c (grub_elf_file): Call grub_file_seek. Call
10111         grub_error_push and grub_error_pop in the error-handling path.
10112         (grub_elf32_load_segment): Only call grub_file_read with non-zero
10113         length.
10115 2006-11-03  Hollis Blanchard  <hollis@penguinppc.org>
10117         * conf/i386-efi.rmk (grub_emu_SOURCES): Add kern/elf.c.
10118         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
10119         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10120         (kernel_elf_SOURCES): Likewise.
10121         * conf/i386-efi.rmk (kernel_mod_HEADERS): Add elfload.h and cache.h.
10122         * conf/i386-pc.rmk (kernel_mod_HEADERS): Likewise.
10123         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
10124         * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
10125         * conf/common.rmk (pkgdata_MODULES): Add elf.mod.
10126         (elf_mod_SOURCES): New variable.
10127         (elf_mod_CFLAGS): Likewise.
10128         (elf_mod_LDFLAGS): Likewise.
10129         * include/grub/types.h (__unused): New macro.
10130         * include/grub/elfload.h: New file.
10131         * kern/elf.c: Likewise.
10132         * loader/powerpc/ieee1275/linux.c: Include elfload.h.
10133         (ELF32_LOADMASK): New macro.
10134         (ELF64_LOADMASK): Likewise.
10135         (vmlinux): Removed.
10136         (grub_linux_load32): New function.
10137         (grub_linux_load64): Likewise.
10138         (grub_rescue_cmd_linux): Call grub_linux_load32 or grub_linux_load64.
10139         Use grub_elf_t instead of grub_file_t.
10141 2006-11-02  Hollis Blanchard  <hollis@penguinppc.org>
10143         * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): Add
10144         `catch_result' to struct set_color_args.
10146 2006-10-28  Yoshinori K. Okuji  <okuji@enbug.org>
10148         * normal/menu.c: Include grub/script.h.
10149         * normal/menu_entry.c: Likewise.
10150         * include/grub/normal.h: Do not include grub/script.h.
10152 2006-10-27  Hollis Blanchard  <hollis@penguinppc.org>
10154         * kern/disk.c (grub_disk_read): Correct debug printf formatting.
10156 2006-10-27  Hollis Blanchard  <hollis@penguinppc.org>
10158         * kern/disk.c (grub_disk_open): Print debug messages when opening a
10159         disk.
10160         (grub_disk_close): Print debug messages when closing a disk.
10161         (grub_disk_read): Print debug messages when disk read fails.
10162         * kern/fs.c (grub_fs_probe): Print debug messages when detecting
10163         filesystem type.
10164         * kern/partition.c: Include misc.h.
10165         (grub_partition_iterate): Print debug messages when detecting
10166         partition type.
10168 2006-10-27  Hollis Blanchard  <hollis@penguinppc.org>
10170         * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Return error if `status'
10171         is negative.
10172         * kern/ieee1275/ieee1275.c (IEEE1275_IHANDLE_INVALID): Change to 0.
10174 2006-10-26  Hollis Blanchard  <hollis@penguinppc.org>
10176         * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
10177         Reverse GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS test.
10179 2006-10-25  Jeroen Dekkers  <jeroen@dekkers.cx>
10181         * disk/lvm.c (grub_lvm_scan_device): Malloc sizeof(*lv) bytes
10182         instead of sizeof(lv). Patch by Michael Guntsche.
10184 2006-10-18  Jeroen Dekkers  <jeroen@dekkers.cx>
10186         * disk/lvm.c: Rename VGS to VG_LIST.
10187         (grub_lvm_iterate): Change VGS->LV to VG-LV.
10188         (grub_lvm_open): Likewise.
10189         Thanks to Michael Guntsche for finding this bug.
10191 2006-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
10193         * configure.ac (AC_INIT): Bumped to 1.95.
10195 2006-10-14  Robert Millan  <rmh@aybabtu.com>
10197         * util/i386/pc/getroot.c (grub_guess_root_device): Don't compare os_dev
10198         with "/dev/.static/dev/md".
10200 2006-10-14  Yoshinori K. Okuji  <okuji@enbug.org>
10202         * util/i386/pc/grub-probe.c (probe): Print DEVICE_NAME instead of
10203         DRIVE_NAME when grub_util_biosdisk_get_grub_dev fails. Open
10204         DRIVE_NAME instead of DEVICE_NAME. Make sure that DEVICE_NAME and
10205         DRIVE_NAME are always freed.
10207         * util/i386/pc/biosdisk.c (make_device_name): Add one into
10208         DOS_PART, as a DOS partition is counted from one instead of zero
10209         now. Reported by Robert Millan.
10211 2006-10-14  Robert Millan  <rmh@aybabtu.com>
10213         * util/i386/pc/getroot.c (grub_guess_root_device): Stop using
10214         grub_util_biosdisk_get_grub_dev to convert system device to GRUB device.
10215         * util/grub-emu.c (main): Use grub_util_biosdisk_get_grub_dev with the
10216         string returned by grub_guess_root_device.
10217         * util/i386/pc/grub-setup.c: Likewise.
10218         * util/i386/pc/grub-probefs.c: Likewise.
10220         * util/i386/pc/grub-probefs.c: Rename to ...
10221         * util/i386/pc/grub-probe.c: ... this.
10222         * DISTLIST: Remove grub-probefs, add grub-probe.
10223         * conf/i386-efi.rmk: Likewise.
10224         * conf/i386-pc.rmk: Likewise.
10225         * util/i386/pc/grub-install.in: Likewise.
10227         * util/i386/pc/grub-probe.c: Add --target=(fs|device|drive) option to
10228         choose which information we want to print.
10230 2006-10-14  Yoshinori K. Okuji  <okuji@enbug.org>
10232         * DISTLIST: Added commands/echo.c, disk/lvm.c, disk/raid.c,
10233         include/grub/bitmap.h, include/grub/lvm.h, include/grub/raid.h,
10234         include/grub/i386/pc/vbeutil.h, include/grub/util/lvm.h,
10235         include/grub/util/raid.h, util/lvm.c, util/raid.c, video/bitmap.c,
10236         video/readers/tga.c and video/i386/pc/vbeutil.c.
10238 2006-10-14  Jeroen Dekkers  <jeroen@dekkers.cx>
10240         Added support for RAID and LVM.
10242         * disk/lvm.c: New file.
10243         * disk/raid.c: Likewise.
10244         * include/grub/lvm.h: Likewise.
10245         * include/grub/raid.h: Likewise.
10246         * include/grub/util/lvm.h: Likewise.
10247         * include/grub/util/raid.h: Likewise.
10248         * util/lvm.c: Likewise.
10249         * util/raid.c: Likewise.
10251         * include/grub/disk.h (grub_disk_dev_id): Add
10252         GRUB_DISK_DEVICE_RAID_ID and GRUB_DISK_DEVICE_LVM_ID.
10253         (grub_disk_get_size): New prototype.
10254         * kern/disk.c (grub_disk_open): Check whether grub_partition_probe()
10255         returns a partition.
10256         (grub_disk_get_size): New function.
10258         * kern/i386/pc/init.c (make_install_device): Copy the prefix
10259         verbatim if grub_install_dos_part is -2.
10261         * util/i386/pc/getroot.c (grub_guess_root_device): Support RAID
10262         and LVM devices.
10264         * util/i386/pc/grub-setup.c (setup): New argument
10265         MUST_EMBED. Force embedding of GRUB when the argument is
10266         true. Close FILE before returning.
10267         (main): Add support for RAID and LVM.
10269         * conf/common.rmk: Add RAID and LVM modules.
10270         * conf/i386-pc.rmk (grub_setup_SOURCES): Add util/raid.c and
10271         util/lvm.c.
10272         (grub_emu_SOURCES): Add disk/raid.c and disk/lvm.c.
10274         * kern/misc.c (grub_strstr): New function.
10275         * include/grub/misc.h (grub_strstr): New prototype.
10277 2006-10-10  Tristan Gingold  <tristan.gingold@bull.net>
10279         * include/grub/efi/api.h (GRUB_EFI_ERROR_CODE): Long constant.
10281 2006-10-05  Tristan Gingold  <tristan.gingold@bull.net>
10283         * kern/misc.c (grub_strtoull): Guess the base only if not
10284         specified.
10286 2006-10-01  Hollis Blanchard  <hollis@penguinppc.org>
10288         * kern/powerpc/ieee1275/cmain.c (cmain): Remove incomplete Old World
10289         PowerMac support.
10291 2006-10-01  Hollis Blanchard  <hollis@penguinppc.org>
10293         * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Cast `size' to long.
10295         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_next_property):
10296         Remove `flags' argument.  All callers changed.
10297         * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_ROOT): Removed.
10298         (IEEE1275_IHANDLE_INVALID): New variable.
10299         (IEEE1275_CELL_INVALID): New variable.
10300         (grub_ieee1275_finddevice, grub_ieee1275_get_property,
10301         grub_ieee1275_get_property_length, grub_ieee1275_instance_to_package,
10302         grub_ieee1275_package_to_path, grub_ieee1275_instance_to_path,
10303         grub_ieee1275_peer, grub_ieee1275_child, grub_ieee1275_open,
10304         grub_ieee1275_claim, grub_ieee1275_set_property): Error-check return
10305         codes from Open Firmware.  All callers updated.
10306         (grub_ieee1275_next_property): Directly return Open Firmware return
10307         code.
10308         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
10309         Standardize error checking from `grub_ieee1275_get_property'.
10310         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Rename
10311         `devalias' to `aliases'.  Correct comments.  Consolidate error paths.
10313 2006-10-01  Hollis Blanchard  <hollis@penguinppc.org>
10315         * kern/ieee1275/ieee1275.c (grub_ieee1275_instance_to_path): Rename
10316         `instance_to_package_args' to `instance_to_path_args'.
10318         * kern/powerpc/ieee1275/init.c (grub_machine_init): Use
10319         `grub_ieee1275_chosen'.
10321         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Call
10322         `grub_ieee1275_interpret'.
10324 2006-09-25  Hollis Blanchard  <hollis@penguinppc.org>
10326         * util/powerpc/ieee1275/grub-mkimage.c: Include config.h.
10328 2006-09-25  Hollis Blanchard  <hollis@penguinppc.org>
10330         * include/grub/powerpc/libgcc.h (__floatdisf): New prototype.
10331         (__cmpdi): Likewise.
10333         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Pass 0 as
10334         `flags' to `grub_ieee1275_next_property'.  Change `pathlen' to type
10335         `grub_ssize_t'.
10337         * kern/powerpc/ieee1275/cmain.c: Include grub/misc.h.
10339         * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Change `actual'
10340         to type `grub_ssize_t'.
10341         (grub_rescue_cmd_linux): Cast -1 to `grub_off_t'.
10343 2006-09-22  Marco Gerards  <marco@gnu.org>
10345         * normal/script.c (grub_script_create_cmdmenu): Skip leading
10346         newlines.
10348 2006-09-22  Marco Gerards  <marco@gnu.org>
10350         * commands/echo.c: New file.
10352         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/echo.c'.
10354         * conf/common.rmk (echo_mod_SOURCES): New variable.
10355         (echo_mod_CFLAGS): Likewise.
10356         (echo_mod_LDFLAGS): Likewise.
10358 2006-09-22  Marco Gerards  <marco@gnu.org>
10360         * normal/main.c (get_line): Malloc memory instead of using
10361         preallocated memory.  Removed the arguments `cmdline' and
10362         `max_len'.  Updated all callers.
10364 2006-09-22  Marco Gerards  <marco@gnu.org>
10366         * conf/i386-efi.rmk (grub_emu_DEPENDENCIES): New variable.
10367         (normal_mod_DEPENDENCIES): Likewise.
10369         * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Likewise.
10370         (normal_mod_DEPENDENCIES): Likewise.
10372         * conf/sparc64-ieee1275.rmk (normal_mod_DEPENDENCIES): Likewise.
10374 2006-09-22  Johan Rydberg  <jrydberg@gnu.org>
10376         * genmk.rb: Add DEPENDENCIES variables to modules, utilities, and
10377         programs.
10378         * conf/i386-pc.rmk (grub_emu_DEPENDENCIES): Declare.
10379         (normal_mod_DEPENDENCIES): Likewise.
10380         * conf/i386-pc.mk: Regenerate.
10381         * conf/i386-efi.mk: Likewise
10382         * conf/common.mk: Likewise.
10383         * conf/powerpc-ieee1275.mk: Likewise.
10384         * conf/sparc64-ieee1275.mk: Likewise.
10386 2006-09-22  Robert Millan  <rmh@aybabtu.com>
10388         Sync with i386 version.
10389         * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Remove grub-emu, add grub-mkimage.
10390         * conf/powerpc-ieee1275.rmk (sbin_UTILITIES): Remove grub-mkimage, add grub-emu.
10392 2006-09-21  Robert Millan  <rmh@aybabtu.com>
10394         Import from GRUB Legacy (lib/device.c):
10395         * util/i386/pc/grub-mkdevicemap.c (get_i2o_disk_name): New function.
10396         (init_device_map) [__linux__]: Add support for I2O devices.
10398 2006-09-14  Marco Gerards  <marco@gnu.org>
10400         * conf/i386-pc.rmk (COMMON_LDFLAGS): Use `-m32' instead of
10401         `-melf_i386'.
10403 2006-09-14  Robert Millan  <rmh@aybabtu.com>
10405         * util/i386/pc/grub-install.in: Skip menu.lst when removing
10406         /boot/grub/*.lst.
10408         * util/i386/pc/getroot.c: Don't recurse into dotdirs (e.g. ".static").
10410         * util/i386/pc/grub-mkdevicemap.c: Make sure the floppy device exists
10411         before adding it to device.map.
10413 2006-08-15  Johan Rydberg  <jrydberg@gnu.org>
10415         * genmk.rb: Let GCC generate dependencies the first time it
10416         compiles a file; using the -MD option.
10417         * conf/common.mk: Regenerate.
10418         * conf/i386-pc.mk: Likewise.
10419         * conf/i386-efi.mk: Likewise.
10420         * conf/powerpc-ieee1275.mk: Likewise.
10421         * conf/sparc64-ieee1275.mk: Likewise.
10423 2006-08-04  Yoshinori K. Okuji  <okuji@enbug.org>
10425         Move the prototypes of grub_setjmp and grub_longjmp to
10426         cpu/setjmp.h, so that each architecture may specify different
10427         attributes.
10429         * include/grub/i386/setjmp.h (grub_setjmp): New prototype.
10430         (grub_longjmp): Likewise.
10431         * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise..
10432         (grub_longjmp): Likewise.
10433         * include/grub/sparc64/setjmp.h (grub_setjmp): Likewise..
10434         (grub_longjmp): Likewise.
10436         * include/grub/setjmp.h [!GRUB_UTIL] (grub_setjmp): Removed.
10437         [!GRUB_UTIL] (grub_longjmp): Removed.
10439 2006-08-01  Pelletier Vincent  <subdino2004@yahoo.fr>
10441         * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): IEEE1275
10442         "color!" method does not return any value.
10444 2006-07-29  Vesa Jaaskelainen  <chaac@nic.fi>
10446         * include/grub/bitmap.h: New file.
10448         * include/grub/i386/pc/vbeutil.h: Likewise.
10450         * video/bitmap.c: Likewise.
10452         * video/readers/tga.c: Likewise.
10454         * video/i386/pc/vbeutil.c: Likewise.
10456         * commands/videotest.c: Code cleanup and updated to reflect to new
10457         video API.
10459         * term/gfxterm.c: Likewise.
10461         * video/video.c: Likewise.
10463         * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod.
10464         (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c.
10465         (bitmap_mod_SOURCES): New entry.
10466         (bitmap_mod_CFLAGS): Likewise.
10467         (bitmap_mod_LDFLAGS): Likewise.
10468         (tga_mod_SOURCES): Likewise.
10469         (tga_mod_CFLAGS): Likewise.
10470         (tga_mod_LDFLAGS): Likewise.
10472         * include/grub/video.h (grub_video_blit_operators): New enum type.
10473         (grub_video_render_target): Changed as forward declaration and moved
10474         actual definition to be video driver specific.
10475         (grub_video_adapter.blit_bitmap): Added blitting operator.
10476         (grub_video_adapter.blit_render_target): Likewise.
10477         (grub_video_blit_bitmap): Likewise.
10478         (grub_video_blit_render_target): Likewise.
10480         * include/grub/i386/pc/vbe.h (grub_video_render_target): Added
10481         driver specific render target definition.
10482         (grub_video_vbe_map_rgba): Added driver internal helper.
10483         (grub_video_vbe_unmap_color): Updated to use
10484         grub_video_i386_vbeblit_info.
10485         (grub_video_vbe_get_video_ptr): Likewise.
10487         * include/grub/i386/pc/vbeblit.h
10488         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use
10489         grub_video_i386_vbeblit_info.
10490         (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
10491         (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
10492         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
10493         (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
10494         (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
10495         (grub_video_i386_vbeblit_index_index): Likewise.
10496         (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function.
10497         (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
10498         (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
10499         (grub_video_i386_vbeblit_blend): Added generic blitter for blend
10500         operator.
10501         (grub_video_i386_vbeblit_replace): Added generic blitter for replace
10502         operator.
10504         * video/i386/pc/vbeblit.c: Updated to reflect changes on
10505         include/grub/i386/pc/vbeblit.h.
10507         * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8):
10508         Updated to use grub_video_i386_vbeblit_info.
10509         (grub_video_i386_vbefill_R8G8B8): Likewise.
10510         (grub_video_i386_vbefill_index): Likewise.
10511         (grub_video_i386_vbefill): Added generic filler.
10513         * video/i386/pc/vbefill.c: Updated to reflect changes on
10514         include/grub/i386/pc/vbefill.h.
10516         * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use
10517         grub_video_i386_vbeblit_info.
10518         (grub_video_vbe_unmap_color): Likewise.
10519         (grub_video_vbe_blit_glyph): Likewise.
10520         (grub_video_vbe_scroll): Likewise.
10521         (grub_video_vbe_draw_pixel): Removed function.
10522         (grub_video_vbe_get_pixel): Likewise.
10523         (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and
10524         updated code to use it.
10525         (common_blitter): Added common blitter for render target and bitmap.
10526         (grub_video_vbe_blit_bitmap): Updated to use common_blitter.
10527         (grub_video_vbe_blit_render_target): Likewise.
10529 2006-07-30  Johan Rydberg  <jrydberg@gnu.org>
10531         * kern/efi/efi.c (grub_efi_set_text_mode): Assume console already
10532         is in text mode if there is no console control protocol instance
10533         available.
10535 2006-07-29  Vesa Jaaskelainen  <chaac@nic.fi>
10537         * include/grub/video.h: Code cleanup.
10539         * include/grub/i386/pc/vbe.h: Likewise.
10541         * video/i386/pc/vbe.c: Likewise.
10543         * video/i386/pc/vbeblit.c: Likewise.
10545         * video/i386/pc/vbefill.c: Likewise.
10547         * video/video.c: Likewise.  Also added more comments.
10549 2006-07-29  Vesa Jaaskelainen  <chaac@nic.fi>
10551         * disk/i386/pc/biosdisk.c (struct grub_biosdisk_drp): Moved to ...
10552         (struct grub_biosdisk_dap): Likewise.
10554         * include/grub/i386/pc/biosdisk.h: ... to here.  Also corrected
10555         linkage settings for all functions.
10557 2006-07-12  Marco Gerards  <marco@gnu.org>
10559         * configure.ac (--enable-mm-debug): Fix typo.
10561         * genkernsyms.sh.in: Use proper quoting for `CC'.
10563 2006-07-02  Jeroen Dekkers  <jeroen@dekkers.cx>
10565         * conf/i386-pc.rmk (COMMON_ASFLAGS): Add "-m32".
10566         (normal_mod_ASFLAGS): Remove "-m32".
10568 2006-06-14  Yoshinori K. Okuji  <okuji@enbug.org>
10570         * util/misc.c: Include config.h.
10571         [!HAVE_MEMALIGN]: Do not include malloc.h.
10572         (grub_memalign): Use posix_memalign, if present. Then, use
10573         memalign, if present. Otherwise, emit an error.
10575         * util/grub-emu.c: Do not include malloc.h.
10577         * include/grub/util/misc.h: Include unistd.h. This is required for
10578         FreeBSD, because off_t is defined in unistd.h. Reported by Harley
10579         D. Eades III <hde@foobar-qux.org>.
10581         * configure.ac (AC_GNU_SOURCE): Added.
10582         (AC_CHECK_FUNCS): Check posix_memalign and memalign for the host
10583         type.
10585 2006-06-09  Yoshinori K. Okuji  <okuji@enbug.org>
10587         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Make sure that
10588         ADDR_MAX does not exceed GRUB_LINUX_INITRD_MAX_ADDRESS.
10590 2006-06-07  Jeroen Dekkers  <jeroen@dekkers.cx>
10592         * include/grub/types.h (grub_host_addr_t): Rename to
10593         grub_target_addr_t.
10594         (grub_host_off_t): Rename to grub_target_off_t.
10595         (grub_host_size_t): Rename to grub_target_size_t.
10596         (grub_host_ssize_t): Rename to grub_target_ssize_t.
10597         Refer to GRUB_TARGET_SIZEOF_VOID_P to define those variables.
10599         * include/grub/kernel.h (struct grub_module_header): Change type
10600         of OFFSET to grub_target_off_t and type of SIZE to grub_target_size_t.
10601         (grub_module_info): Likewise.
10603 2006-06-05  Yoshinori K. Okuji  <okuji@enbug.org>
10605         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): The conditional
10606         of checking LINUX_MEM_SIZE was reverse. Reported by Jesus
10607         Velazquez <jesus.velazquez@gmail.com>.
10609 2006-06-05  Yoshinori K. Okuji  <okuji@enbug.org>
10611         Count partitions from 1 instead of 0 in the string representation
10612         of partitions. Still use 0-based internally.
10614         * partmap/sun.c (grub_sun_is_valid): A cosmetic change.
10615         (sun_partition_map_iterate): Use grub_partition_t instead of
10616         struct grub_partition *. Cast DESC->START_CYLINDER to
10617         grub_uint64_t after converting the endian.
10618         (sun_partition_map_probe): Subtract 1 for PARTNUM.
10619         (sun_partition_map_get_name): Add 1 to P->INDEX.
10621         * partmap/pc.c (grub_partition_parse): Subtract 1 for
10622         PCDATA->DOS_PART.
10623         (pc_partition_map_get_name): Add 1 into PCDATA->DOS_PART.
10625         * partmap/gpt.c (gpt_partition_map_iterate): Initialize PARTNO to
10626         zero instead of one.
10627         (gpt_partition_map_probe): Subtract 1 for PARTNUM.
10628         (gpt_partition_map_get_name): Add 1 into P->INDEX.
10630         * partmap/apple.c (apple_partition_map_iterate): Change the type
10631         of POS to unsigned.
10632         (apple_partition_map_probe): Subtract 1 for PARTNUM.
10633         (apple_partition_map_get_name): Add 1 into P->INDEX.
10635         * partmap/amiga.c (amiga_partition_map_iterate): Change the type
10636         of POS to unsigned.
10637         (amiga_partition_map_iterate): Cast NEXT to grub_off_t to
10638         calculate the offset of a partition.
10639         (amiga_partition_map_probe): Subtract 1 for PARTNUM.
10640         (amiga_partition_map_get_name): Add 1 into P->INDEX.
10642         * partmap/acorn.c (acorn_partition_map_find): Change the type of
10643         SECTOR to grub_disk_addr_t.
10644         (acorn_partition_map_iterate): Likewise.
10645         (acorn_partition_map_probe): Subtract 1 for PARTNUM.
10646         Change the type of SECTOR to grub_disk_addr_t. Declare P on the
10647         top.
10648         (acorn_partition_map_get_name): Add 1 into P->INDEX.
10650         * kern/i386/pc/init.c (make_install_device): Add 1 into
10651         GRUB_INSTALL_DOS_PART.
10653         * fs/iso9660.c (grub_iso9660_mount): Fixed a reversed
10654         conditional.
10656 2006-06-04  Yoshinori K. Okuji  <okuji@enbug.org>
10658         Clean up the code to support 64-bit addressing in disks and
10659         files. This change is not enough for filesystems yet.
10661         * util/i386/pc/grub-setup.c (struct boot_blocklist): Change the
10662         type of "start" to grub_uint64_t.
10663         (setup): Change the types of KERNEL_SECTOR and FIRST_SECTOR to
10664         grub_disk_addr_t * and grub_disk_addr_t. Fix the format string in
10665         save_first_sector and save_blocklists. Use grub_le_to_cpu64 to
10666         convert addresses.
10668         * util/i386/pc/biosdisk.c (open_device): Change the type of SECTOR
10669         to grub_disk_addr_t.
10671         * partmap/gpt.c (gpt_partition_map_iterate): Fix the format
10672         string.
10674         * partmap/pc.c (pc_partition_map_iterate): Likewise.
10676         * partmap/amiga.c (amiga_partition_map_iterate): Cast RDSK.MAGIC
10677         to char *.
10679         * normal/script.c (grub_script_parse): Remove unused MEMFREE.
10681         * normal/parser.y (YYLTYPE_IS_TRIVIAL): New macro.
10683         * normal/lexer.c (grub_script_yyerror): Specify unused to LEX.
10685         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf64): Cast -1
10686         to grub_off_t, to detect an error from grub_file_seek.
10687         (grub_multiboot_load_elf32): Likewise.
10689         * kern/misc.c (grub_strtoul): Use grub_strtoull. Return the
10690         maximum unsigned long value when an overflow is detected.
10691         (grub_strtoull): New function.
10692         (grub_divmod64): Likewise.
10693         (grub_lltoa): use grub_divmod64.
10695         * kern/fs.c (struct grub_fs_block): Change the type of "offset" to
10696         grub_disk_addr_t.
10697         (grub_fs_blocklist_open): Increase P if P is not NULL to advance
10698         the pointer to next character. Use grub_strtoull instead of
10699         grub_strtoul.
10700         (grub_fs_blocklist_read): Change the types of SECTOR, OFFSET and
10701         SIZE to grub_disk_addr_t, grub_off_t and grub_size_t,
10702         respectively.
10704         * kern/file.c (grub_file_read): Prevent an overflow of LEN, as the
10705         return value is signed.
10706         (grub_file_seek): Change the type of OLD to grub_off_t. Do not
10707         test if OFFSET is less than zero, as OFFSET is unsigned now.
10709         * kern/disk.c (struct grub_disk_cache): Change the type of
10710         "sector" to grub_disk_addr_t.
10711         (grub_disk_cache_get_index): Change the type of SECTOR to
10712         grub_disk_addr_t. Calculate the hash with SECTOR casted to
10713         unsigned after shifting.
10714         (grub_disk_cache_invalidate): Change the type of SECTOR to
10715         grub_disk_addr_t.
10716         (grub_disk_cache_unlock): Likewise.
10717         (grub_disk_cache_store): Likewise.
10718         (grub_disk_check_range): Change the types of SECTOR, OFFSET, SIZE,
10719         START and LEN to grub_disk_addr_t *, grub_off_t *, grub_size_t,
10720         grub_disk_addr_t and grub_uint64_t, respectively.
10721         (grub_disk_read): Use an unsigned variable REAL_OFFSET for the
10722         body, as the value of OFFSET is tweaked by
10723         grub_disk_check_range. Change the types of START_SECTOR, LEN and
10724         POS to grub_disk_addr_t, grub_size_t and grub_size_t,
10725         respectively.
10726         (grub_disk_write): Use an unsigned variable REAL_OFFSET for the
10727         body, as the value of OFFSET is tweaked by
10728         grub_disk_check_range. Change the types of LEN and N to
10729         grub_size_t.
10731         * io/gzio.c (struct grub_gzio): Change the types of "data_offset"
10732         and "saved_offset" to grub_off_t.
10733         (test_header): Cast BUF to char *.
10734         (get_byte): Cast GZIO->DATA_OFFSET to grub_off_t. Cast GZIO->INBUF
10735         to char *.
10736         (grub_gzio_read): Change the types of OFFSET and SIZE to
10737         grub_off_t and grub_size_t, respectively.
10739         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_FORCE_LBA):
10740         Removed.
10741         (GRUB_BOOT_MACHINE_BOOT_DRIVE): Changed to 0x4c.
10742         (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Changed to 0x40.
10743         (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Changed to 0x42.
10744         (GRUB_BOOT_MACHINE_DRIVE_CHECK): Changed to 0x4e.
10745         (GRUB_BOOT_MACHINE_LIST_SIZE): Increased to 12.
10747         * include/grub/types.h (grub_off_t): Unconditionally set to
10748         grub_uint64_t.
10749         (grub_disk_addr_t): Changed to grub_uint64_t.
10751         * include/grub/partition.h (struct grub_partition): Change the
10752         types of "start", "len" and "offset" to grub_disk_addr_t,
10753         grub_uint64_t and grub_disk_addr_t, respectively.
10754         (grub_partition_get_start): Return grub_disk_addr_t.
10755         (grub_partition_get_len): Return grub_uint64_t.
10757         * include/grub/misc.h (grub_strtoull): New prototype.
10758         (grub_divmod64): Likewise.
10760         * include/grub/fshelp.h (grub_fshelp_read_file): Change the types
10761         of SECTOR, LEN and FILESIZE to grub_disk_addr_t, grub_size_t and
10762         grub_off_t, respectively.
10763         All callers and references changed.
10765         * include/grub/fs.h (struct grub_fs): Change the type of LEN to
10766         grub_size_t in "read".
10767         All callers and references changed.
10769         * include/grub/file.h (struct grub_file): Change the types of
10770         "offset" and "size" to grub_off_t and grub_off_t,
10771         respectively. Change the type of SECTOR to grub_disk_addr_t in
10772         "read_hook".
10773         (grub_file_read): Change the type of LEN to grub_size_t.
10774         (grub_file_seek): Return grub_off_t. Change the type of OFFSET to
10775         grub_off_t.
10776         (grub_file_size): Return grub_off_t.
10777         (grub_file_tell): Likewise.
10778         All callers and references changed.
10780         * include/grub/disk.h (struct grub_disk_dev): Change the types of
10781         SECTOR and SIZE to grub_disk_addr_t and grub_size_t in "read" and
10782         "write".
10783         (struct grub_disk): Change the type of "total_sectors" to
10784         grub_uint64_t. Change the type of SECTOR to grub_disk_addr_t in
10785         "read_hook".
10786         (grub_disk_read): Change the types of SECTOR, OFFSET and SIZE to
10787         grub_disk_addr_t, grub_off_t and grub_size_t, respectively.
10788         (grub_disk_write): Likewise.
10789         All callers and references changed.
10791         * fs/iso9660.c (grub_iso9660_susp_iterate): Cast parameters to
10792         char * for grub_strncmp to silence gcc.
10793         (grub_iso9660_mount): Likewise.
10794         (grub_iso9660_mount): Likewise.
10795         (grub_iso9660_read_symlink): Likewise. Also, remove the nonsense
10796         return statement.
10797         (grub_iso9660_iterate_dir): Likewise.
10798         (grub_iso9660_label): Cast DATA->VOLDESC.VOLNAME to char *.
10800         * fs/hfs.c (grub_hfs_read_file): Change the types of SECTOR and
10801         LEN to grub_disk_addr_t and grub_size_t, respectively.
10803         * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
10805         * fs/jfs.c (grub_jfs_read_file): Likewise.
10807         * fs/minix.c (grub_jfs_read_file): Likewise.
10809         * fs/sfs.c (grub_jfs_read_file): Likewise.
10811         * fs/ufs.c (grub_jfs_read_file): Likewise.
10813         * fs/xfs.c (grub_jfs_read_file): Likewise.
10815         * fs/fat.c (grub_fat_read_data): Change the types of SECTOR, LEN
10816         and SIZE to grub_disk_addr_t, grub_size_t and grub_size_t,
10817         respectively.
10819         * fs/ext2.c (grub_ext2_read_block): When an error happens, set
10820         BLKNR to -1 instead of returning GRUB_ERRNO.
10821         (grub_ext2_read_file): Change the types of SECTOR and
10822         LEN to grub_disk_addr_t and grub_size_t, respectively.
10824         * fs/affs.c (grub_affs_read_file): Change the types of SECTOR and
10825         LEN to grub_disk_addr_t and grub_size_t, respectively.
10827         * font/manager.c (grub_font_get_glyph): Cast BITMAP to char * for
10828         grub_file_read.
10830         * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Fix the format
10831         string. Do not cast SECTOR explicitly.
10833         * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Change the type of
10834         TOTAL_SECTORS to grub_uint64_t. Do not mask DRP->TOTAL_SECTORS.
10835         (grub_biosdisk_rw): Change the types of SECTOR and SIZE to
10836         grub_disk_addr_t and grub_size_t, respectively. If the sector is
10837         over 2TB and LBA mode is not supported, raise an error.
10838         (get_safe_sectors): New function.
10839         (grub_biosdisk_read): Use get_safe_sectors.
10840         (grub_biosdisk_write): Likewise.
10842         * disk/efi/efidisk.c (grub_efidisk_read): Fix the format string.
10843         (grub_efidisk_write): Likewise.
10845         * disk/loopback.c (delete_loopback): Cosmetic changes.
10846         (grub_cmd_loopback): Likewise. Also, test NEWDEV->FILENAME
10847         correctly.
10848         (grub_loopback_open): Likewise.
10849         (grub_loopback_read): Likewise. Also, change the type of POS to
10850         grub_off_t, and fix the usage of grub_memset.
10852         * commands/i386/pc/play.c: Include grub/machine/time.h.
10854         * commands/ls.c (grub_ls_list_files): Use "llu" instead of "d" to
10855         print FILE->SIZE.
10857         * commands/configfile.c: Include grub/env.h.
10859         * commands/cmp.c (grub_cmd_cmp): Do not use ERR, but use
10860         GRUB_ERRNO directly instead. Change the type of POS to
10861         grub_off_t. Follow the coding standard.
10863         * commands/blocklist.c: Include grub/partition.h.
10864         (grub_cmd_blocklist): Return an error if the underlying device is
10865         not a disk. Take the starting sector of a partition into account,
10866         if a partition is used.
10868         * boot/i386/pc/diskboot.S (bootloop): Adapted to the new offset of
10869         a length field.
10870         (lba_mode): Support 64-bit addresses.
10871         (chs_mode): Likewise.
10872         (copy_buffer): Adapted to the new offsets of a length field and a
10873         segment field.
10874         (blocklist_default_start): Allocate 64-bit space.
10876         * boot/i386/pc/boot.S (force_lba): Removed.
10877         (boot_drive): Moved to under KERNEL_SECTOR.
10878         (kernel_sector): Moved to under KERNEL_SEGMENT. Allocate 64-bit
10879         space.
10880         (real_start): Set %si earlier. Remove code for FORCE_LBA, since it
10881         is useless.
10882         (lba_mode): Refactored to support a 64-bit address. More size
10883         optimization.
10884         (setup_sectors): Likewise.
10886 2006-06-04  Yoshinori K. Okuji  <okuji@enbug.org>
10888         * DISTLIST: Added include/grub/i386/linux.h. Removed
10889         include/grub/i386/pc/linux.h
10891         * configure.ac (AC_INIT): Bumped to 1.94.
10893         * config.guess: Updated from gnulib.
10894         * config.sub: Likewise.
10895         * install-sh: Likewise.
10896         * mkinstalldirs: Likewise.
10898 2006-06-02  Yoshinori K. Okuji  <okuji@enbug.org>
10900         * conf/common.rmk (grub_modules_init.lst): Depended on
10901         grub_emu_SOURCES, excluding grub_emu_init.c, instead of
10902         MODSRCFILES.
10904         * genmk.rb (PModule::rule): Reverted the previous change.
10906 2006-06-02  Yoshinori K. Okuji  <okuji@enbug.org>
10908         * conf/common.rmk (grub_modules_init.lst): Depends on
10909         $(MODSRCFILES). Grep only the files in $(MODSRCFILES). Make sure
10910         that the target does not exist before producing.
10911         (grub_modules_init.h): Remove the target before generating.
10912         (grub_emu_init.c): Likewise.
10914         * genmk.rb (PModule::rule): Add source files into MODSRCFILES.
10916 2006-05-31  Jeroen Dekkers  <jeroen@dekkers.cx>
10918         * configure.ac: Don't set host_m32 for x86_64. Also reset LIBS
10919         for the target-specific tests. Make sure that we also have the
10920         up-to-date target variables for those tests.
10922 2006-05-31  Yoshinori K. Okuji  <okuji@enbug.org>
10924         * genmk.rb (Image::rule): Prefix CFLAGS or ASFLAGS with TARGET_.
10925         (PModule::rule): Likewise.
10927 2006-05-31  Yoshinori K. Okuji  <okuji@enbug.org>
10929         * genmk.rb (Image::rule): Set FLAG to CFLAGS or ASFLAGS instead of
10930         TARGET_CFLAGS or TARGET_ASFLAGS. There is no reason why
10931         target-specific flags should be prefixed.
10932         (PModule::rule): Likewise.
10934 2006-05-30  Yoshinori K. Okuji  <okuji@enbug.org>
10936         * configure.ac (CMP): Check if cmp is available explicitly.
10938 2006-05-29  Yoshinori K. Okuji  <okuji@enbug.org>
10940         * util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
10941         (target_cpu): New variable.
10942         (pkglibdir): Use target_cpu instead of host_cpu.
10944         * util/i386/pc/grub-install.in (host_cpu): Removed.
10945         (target_cpu): New variable.
10946         (pkglibdir): Use target_cpu instead of host_cpu.
10948         * util/genmoddep.c: Removed.
10950         * kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
10951         instead of GRUB_HOST_SIZEOF_VOID_P.
10952         * kern/dl.c: Likewise.
10954         * include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
10955         ...
10956         (GRUB_TARGET_SIZEOF_VOID_P): ... this.
10957         (GRUB_HOST_SIZEOF_LONG): Renamed to ...
10958         (GRUB_TARGET_SIZEOF_LONG): ... this.
10959         (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
10960         (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
10961         * include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
10962         to ...
10963         (GRUB_TARGET_SIZEOF_VOID_P): ... this.
10964         (GRUB_HOST_SIZEOF_LONG): Renamed to ...
10965         (GRUB_TARGET_SIZEOF_LONG): ... this.
10966         (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
10967         (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
10968         * include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
10969         to ...
10970         (GRUB_TARGET_SIZEOF_VOID_P): ... this.
10971         (GRUB_HOST_SIZEOF_LONG): Renamed to ...
10972         (GRUB_TARGET_SIZEOF_LONG): ... this.
10973         (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
10974         (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
10976         * include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
10977         GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
10978         [!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
10979         instead of GRUB_HOST_SIZEOF_LONG.
10980         [!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
10981         GRUB_HOST_WORDS_BIGENDIAN to define or undefine
10982         GRUB_CPU_WORDS_BIGENDIAN.
10983         Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
10984         define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
10985         grub_host_ssize_t.
10987         * conf/i386-efi.rmk (noinst_UTILITIES): Removed.
10988         (genmoddep_SOURCES): Likewise.
10989         * conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
10990         (genmoddep_SOURCES): Likewise.
10991         * conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
10992         (genmoddep_SOURCES): Likewise.
10993         * conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
10994         Likewise.
10995         (genmoddep_SOURCES): Likewise.
10997         * genmoddep.awk: New file.
10999         * genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
11000         TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
11001         CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
11002         (PModule::rule): Likewise.
11003         (Program::rule): Likewise.
11004         (Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
11005         BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
11006         respectively.
11008         * configure.ac: Rewritten intensively to use host and target
11009         instead of build and host, respectively.
11011         * Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
11012         (host_cpu): Removed.
11013         (target_cpu): New variable.
11014         (CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
11015         (BUILD_CC): Removed.
11016         (BUILD_CFLAGS): Likewise.
11017         (BUILD_CPPFLAGS): Likewise.
11018         (TARGET_CC): New variable.
11019         (TARGET_CFLAGS): Likewise.
11020         (TARGET_CPPFLAGS): Likewise.
11021         (TARGET_LDFLAGS): Likewise.
11022         (AWK): Likewise.
11023         (include): Use target_cpu instead of host_cpu.
11024         (moddep.lst:): Use genmoddep.awk instead of genmoddep.
11026         * DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
11028 2006-05-29  Vesa Jaaskelainen  <chaac@nic.fi>
11030         * include/grub/script.h (grub_script_cmdif): Renamed field 'bool' to
11031         'exec_to_evaluate'.  Renamed field 'true' to 'exec_on_true'.  Renamed
11032         field 'false' to 'exec_on_false'.
11033         (grub_script_create_cmdif): Renamed argument names to reflect above
11034         changes.
11036         * normal/execute.c (grub_script_execute_cmdif): Likewise.
11038         * normal/script.c (grub_script_create_cmdif): Likewise.
11040 2006-05-28  Yoshinori K. Okuji  <okuji@enbug.org>
11042         * fs/hfsplus.c (grub_hfsplus_btree_recoffset): Moved to near the
11043         top.
11044         (grub_hfsplus_btree_recptr): Likewise.
11045         (grub_hfsplus_find_block): Do not take RETRY any longer. Use
11046         FILEBLOCK both to pass a block number and store next block
11047         number.
11048         (grub_hfsplus_read_block): Rewritten heavily to support an extent
11049         overflow file correctly. Specify errors appropriately, because
11050         fshelp expects that GRUB_ERRNO is set when fails. Reuse
11051         grub_hfsplus_btree_recptr to get the pointer to a found key.
11052         (grub_hfsplus_btree_search): Return 1 instead of 0 when no match
11053         is found.
11055         * conf/i386-efi.rmk (pkgdata_MODULES): Added _linux.mod and
11056         linux.mod.
11057         (_linux_mod_SOURCES): New variable.
11058         (_linux_mod_CFLAGS): Likewise.
11059         (_linux_mod_LDFLAGS): Likewise.
11060         (linux_mod_SOURCES): Likewise.
11061         (linux_mod_CFLAGS): Likewise.
11062         (linux_mod_LDFLAGS): Likewise.
11064         * DISTLIST: Added loader/i386/efi/linux.c,
11065         loader/i386/efi/linux_normal.c and
11066         include/grub/i386/efi/loader.h.
11068         * loader/i386/efi/linux.c: New file.
11069         * loader/i386/efi/linux_normal.c: Likewise.
11070         * include/grub/i386/efi/loader.h: Likewise.
11072 2006-05-27  Yoshinori K. Okuji  <okuji@enbug.org>
11074         * commands/blocklist.c: New file.
11076         * DISTLIST: Added commands/blocklist.c.
11078         * term/efi/console.c (grub_console_highlight_color): Use a lighter
11079         color for the background, and a darker color for the foreground.
11080         (grub_console_checkkey): Return READ_KEY.
11081         (grub_console_cls): Set the background to
11082         GRUB_EFI_BACKGROUND_BLACK temporarily to clean out the screen.
11084         * kern/efi/efi.c (grub_efi_exit_boot_services): New function.
11086         * include/grub/i386/linux.h (struct linux_kernel_params): Fixed
11087         the size of "padding5", "hd0_drive_info" and "hd1_drive_info".
11089         * include/grub/efi/efi.h (grub_efi_exit_boot_services): New
11090         prototype.
11092         * include/grub/efi/api.h (GRUB_EFI_TEXT_ATTR): Do not shift
11093         BG. The spec is wrong again.
11095         * include/grub/normal.h [GRUB_UTIL] (grub_blocklist_init): New
11096         prototype.
11097         [GRUB_UTIL] (grub_blocklist_fini): Likewise.
11099         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
11100         commands/blocklist.c.
11101         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
11103         * conf/common.rmk (pkgdata_MODULES): Added blocklist.mod.
11104         (blocklist_mod_SOURCES): New variable.
11105         (blocklist_mod_CFLAGS): Likewise.
11106         (blocklist_mod_LDFLAGS): Likewise.
11108 2006-05-20  Yoshinori K. Okuji  <okuji@enbug.org>
11110         * boot/i386/pc/boot.S (real_start): Set %si earlier to eliminate
11111         duplication.
11112         (lba_mode): Use %eax more intensively to reduce the code size.
11114 2006-05-20  Marco Gerards  <marco@gnu.org>
11116         * normal/lexer.c (grub_script_yylex): Don't filter out newlines.
11118         * normal/parser.y (commandblock): Defined as <cmd>.  A subroutine
11119         for `menuentry'.
11120         (script): Accept leading newlines.
11121         (newlines): New rule to describe 0 or more newlines.
11122         (commands): Accept `command' with trailing newline.  Fixed the
11123         order in which arguments were passed to `grub_script_add_cmd'.
11124         Accept commands separated by newlines.
11125         (function): Changed to accept newlines.
11126         (menuentry) Rewritten.
11128         * normal/script.c (grub_script_create_cmdmenu): Add new entries in
11129         front of the list, instead of to the end.
11131 2006-05-19  Yoshinori K. Okuji  <okuji@enbug.org>
11133         * util/i386/pc/grub-install.in (bindir): New variable.
11134         (grub_mkimage): Use BINDIR instead of SBINDIR. Reported by Lee
11135         Shaver <lbgwjl@gmail.com>.
11137 2006-05-14  Yoshinori K. Okuji  <okuji@enbug.org>
11139         * kern/i386/pc/startup.S: Include grub/cpu/linux.h instead of
11140         grub/machine/linux.h
11141         * loader/i386/pc/linux.c: Likewise.
11143         * include/grub/i386/pc/linux.h: Moved to ...
11144         * include/grub/i386/linux.h: ... here.
11146         * include/grub/i386/linux.h (struct linux_kernel_params): New
11147         struct.
11149 2006-05-09  Vesa Jaaskelainen  <chaac@nic.fi>
11151         * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Corrected bounds
11152         checking.
11153         (grub_video_vbe_blit_glyph): Likewise.
11154         (grub_video_vbe_blit_bitmap): Likewise.
11155         (grub_video_vbe_blit_render_target): Likewise.
11157 2006-05-09  Yoshinori K. Okuji  <okuji@enbug.org>
11159         * configure.ac (--with-platform): Properly quote the square
11160         brackets.
11162 2006-05-08  Marco Gerards  <marco@gnu.org>
11164         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Renamed from
11165         this...
11166         (kernel_elf_HEADERS): ...to this.  Updated all users.
11167         (grubof_symlist.c): Renamed from this...
11168         (kernel_elf_symlist.c): ...to this.  Updated all users.
11169         (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
11170         (grubof_SOURCES): Renamed from this...
11171         (kernel_elf_SOURCES): ...to this.
11172         (grubof_HEADERS): Renamed from this...
11173         (kernel_elf_HEADERS): ...to this.
11174         (grubof_CFLAGS): Renamed from this...
11175         (kernel_elf_CFLAGS): ...to this.
11176         (grubof_ASFLAGS): Renamed from this...
11177         (kernel_elf_ASFLAGS): ...to this.
11178         (grubof_LDFLAGS): Renamed from this...
11179         (kernel_elf_LDFLAGS): ...to this.
11181         * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Renamed from
11182         this...
11183         (kernel_elf_HEADERS): ...to this.  Updated all users.
11184         (grubof_symlist.c): Renamed from this...
11185         (kernel_elf_symlist.c): ...to this.  Updated all users.
11186         (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
11187         (grubof_SOURCES): Renamed from this...
11188         (kernel_elf_SOURCES): ...to this.
11189         (grubof_HEADERS): Renamed from this...
11190         (kernel_elf_HEADERS): ...to this.
11191         (grubof_CFLAGS): Renamed from this...
11192         (kernel_elf_CFLAGS): ...to this.
11193         (grubof_ASFLAGS): Renamed from this...
11194         (kernel_elf_ASFLAGS): ...to this.
11195         (grubof_LDFLAGS): Renamed from this...
11196         (kernel_elf_LDFLAGS): ...to this.
11198         * util/powerpc/ieee1275/grub-mkimage.c (add_segments): Use
11199         `kernel.elf' instead of `grubof'.
11201 2006-05-08  Yoshinori K. Okuji  <okuji@enbug.org>
11203         Add --with-platform to configure. Use pkglibdir instead of
11204         pkgdatadir. This is reported by Roger Leigh.
11206         * util/powerpc/ieee1275/grub-install.in (datadir): Removed.
11207         (host_vendor): Likewise.
11208         (host_os): Likewise.
11209         (pkgdatadir): Likewise.
11210         (platform): New variable.
11211         (pkglibdir): Likewise.
11212         Use PKGLIBDIR instead of PKGDATADIR.
11214         * util/i386/pc/grub-install.in (datadir): Removed.
11215         (host_vendor): Likewise.
11216         (host_os): Likewise.
11217         (pkgdatadir): Likewise.
11218         (platform): New variable.
11219         (pkglibdir): Likewise.
11220         Use PKGLIBDIR instead of PKGDATADIR.
11222         * util/powerpc/ieee1275/grub-mkimage.c (usage): Use GRUB_LIBDIR
11223         instead of GRUB_DATADIR.
11224         (main): Likewise.
11225         * util/i386/pc/grub-mkimage.c (usage): Likewise.
11226         (main): Likewise.
11227         * util/i386/efi/grub-mkimage.c (usage): Likewise.
11228         (main): Likewise.
11230         * configure.ac (--with-platform): New option.
11231         Use PLATFORM instead of HOST_VENDOR to specify a platform.
11233         * Makefile.in: Include a makefile based on PLATFORM instead of
11234         HOST_VENDOR.
11235         (pkgdatadir): Not appended by the machine type.
11236         (pkglibdir): Appended by the machine type.
11237         (host_vendor): Removed.
11238         (platform): New variable.
11239         (BUILD_CPPFLAGS): Specify GRUB_LIBDIR instead of GRUB_DATADIR.
11240         (install-local): Use PKGLIBDIR instead of PKGDATADIR.
11241         (uninstall): Likewise.
11243 2006-05-07  Yoshinori K. Okuji  <okuji@enbug.org>
11245         Use the environment context in the menu. Remove the commands
11246         "default" and "timeout", and use variables instead.
11248         * normal/menu.c: Include grub/env.h.
11249         (print_entry): Cast TITLE to silence gcc.
11250         (get_timeout): New function.
11251         (set_timeout): Likewise.
11252         (get_entry_number): Likewise.
11253         (run_menu): Use a default entry, a fallback entry and a timeout
11254         in the environment variables "default", "fallback" and
11255         "timeout". Also, tweak the default entry if it is not within the
11256         current menu entries.
11257         (grub_menu_run): Use a fallback entry in the environment variable
11258         "fallback".
11260         * normal/main.c (read_config_file): Do not initialize
11261         NEWMENU->DEFAULT_ENTRY, NEWMENU->FALLBACK_ENTRY or
11262         NEWMENU->TIMEOUT.
11263         (grub_normal_execute): Use a data slot to store the menu.
11265         * include/grub/normal.h (struct grub_menu): Removed default_entry,
11266         fallback_entry and timeout.
11267         (struct grub_menu_list): Removed.
11268         (grub_menu_list_t): Likewise.
11269         (struct grub_context): Likewise.
11270         (grub_context_t): Likewise.
11271         (grub_context_get): Likewise.
11272         (grub_context_get_current_menu): Likewise.
11273         (grub_context_push_menu): Likewise.
11274         (grub_context_pop_menu): Likewise.
11275         (grub_default_init): Likewise.
11276         (grub_default_fini): Likewise.
11277         (grub_timeout_init): Likewise.
11278         (grub_timeout_fini): Likewise.
11280         * conf/sparc64-ieee1275.rmk (pkgdata_MODULES): Removed default.mod
11281         and timeout.mod.
11282         (normal_mod_SOURCES): Removed normal/context.c.
11284         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Removed
11285         commands/default.c, commands/timeout.c and normal/context.c.
11286         (normal_mod_SOURCES): Removed normal/context.c.
11288         * conf/i386-pc.rmk (grub_emu_SOURCES): Removed commands/default.c,
11289         commands/timeout.c and normal/context.c.
11290         (normal_mod_SOURCES): Removed normal/context.c.
11292         * conf/i386-efi.rmk (grub_emu_SOURCES): Removed
11293         commands/default.c, commands/timeout.c and normal/context.c.
11294         (normal_mod_SOURCES): Removed normal/context.c.
11296         * conf/common.rmk (pkgdata_MODULES): Removed default.mod and
11297         timeout.mod.
11298         (default_mod_SOURCES): Removed.
11299         (default_mod_CFLAGS): Likewise.
11300         (default_mod_LDFLAGS): Likewise.
11301         (timeout_mod_SOURCES): Removed.
11302         (timeout_mod_CFLAGS): Likewise.
11303         (timeout_mod_LDFLAGS): Likewise.
11305         * DISTLIST: Removed commands/default.c, commands/timeout.c and
11306         normal/context.c.
11308         * commands/default.c: Removed.
11309         * commands/timeout.c: Likewise.
11310         * normal/context.c: Likewise.
11312 2006-05-07  Vesa Jaaskelainen  <chaac@nic.fi>
11314         * kern/i386/pc/startup.S (grub_exit): Added missing .code32 tag.
11316 2006-05-02  Yoshinori K. Okuji  <okuji@enbug.org>
11318         * kern/env.c (struct grub_env_context): Removed "sorted". Renamed
11319         "next" to "prev" for readability.
11320         (struct grub_env_sorted_var): New struct.
11321         (grub_env_context): Renamed to ...
11322         (initial_context): ... this.
11323         (grub_env_var_context): Renamed to ...
11324         (current_context): ... this.
11325         (grub_env_find): Look only at CURRENT_CONTEXT.
11326         (grub_env_context_open): Rewritten to copy exported variables from
11327         previous context.
11328         (grub_env_context_close): Rewritten according to the new
11329         scheme. Also, add an assertion to prevent the initial context from
11330         removed.
11331         (grub_env_insert): Removed the code for the sorted list.
11332         (grub_env_remove): Likewise.
11333         (grub_env_export): Simply mark the variable with
11334         GRUB_ENV_VAR_GLOBAL.
11335         (grub_env_set): A cosmetic change for naming consistency.
11336         (grub_env_get): Likewise.
11337         (grub_env_unset): Likewise.
11338         (grub_env_iterate): Rewritten to sort variables within this
11339         function.
11340         (grub_register_variable_hook): Fixed for naming consistency. Call
11341         grub_env_find again, only if NAME is not found at the first time.
11342         (mangle_data_slot_name): New function.
11343         (grub_env_set_data_slot): Likewise.
11344         (grub_env_get_data_slot): Likewise.
11345         (grub_env_unset_data_slot): Likewise.
11347         * include/grub/env.h (grub_env_var_type): New enum.
11348         (GRUB_ENV_VAR_LOCAL): New constant.
11349         (GRUB_ENV_VAR_GLOBAL): Likewise.
11350         (GRUB_ENV_VAR_DATA): Likewise.
11351         (struct grub_env_var): Removed "sort_next" and "sort_prevp". Added
11352         "type".
11353         (grub_env_set): Replace VAR with NAME for consistency.
11354         (grub_register_variable_hook): Likewise.
11355         (grub_env_export): Specify the name of the argument.
11356         (grub_env_set_data_slot): New prototype.
11357         (grub_env_get_data_slot): Likewise.
11358         (grub_env_unset_data_slot): Likewise.
11360 2006-04-30  Yoshinori K. Okuji  <okuji@enbug.org>
11362         Extend the loader so that GRUB can accept a loader which comes
11363         back to GRUB when a loaded image exits. Also, this change adds
11364         support for a chainloader on EFI.
11366         * term/efi/console.c: Include grub/misc.h.
11367         (grub_console_checkkey): Display a scan code on the top for
11368         debugging. This will be removed once the EFI port gets stable.
11369         Correct the scan code mapping.
11371         * kern/efi/mm.c (sort_memory_map): Sort in a descending order to
11372         allocate memory from larger regions, in order to reduce the number
11373         of allocated regions. Otherwise, the MacOSX loader panics.
11374         (filter_memory_map): Avoid less than 1MB for compatibility with
11375         other loaders.
11376         (add_memory_regions): Allocate from the tail of a region, if
11377         possible, to avoid allocating a region near to 1MB, for the MacOSX
11378         loader.
11380         * kern/efi/init.c (grub_efi_set_prefix): Specify
11381         GRUB_EFI_IMAGE_HANDLE to grub_efi_get_loaded_image.
11383         * kern/efi/efi.c (grub_efi_get_loaded_image): Accept a new
11384         argument IMAGE_HANDLE and specify it to get a loaded image.
11385         (grub_arch_modules_addr): Specify GRUB_EFI_IMAGE_HANDLE to
11386         grub_efi_get_loaded_image.
11387         (grub_efi_get_filename): Divide the length by the size of
11388         grub_efi_char16_t.
11389         (grub_efi_get_device_path): New function.
11390         (grub_efi_print_device_path): Print End Device Path nodes. Divide
11391         the length by the size of grub_efi_char16_t for a file path device
11392         path node.
11394         * kern/loader.c (grub_loader_noreturn): New variable.
11395         (grub_loader_set): Accept a new argument NORETURN. Set
11396         GRUB_LOADER_NORETURN to NORETURN.
11397         All callers changed.
11398         (grub_loader_boot): If GRUB_LOADER_NORETURN is false, do not call
11399         grub_machine_fini.
11401         * include/grub/efi/efi.h (grub_efi_get_device_path): New
11402         prototype.
11403         (grub_efi_get_loaded_image): Take an argument to specify an image
11404         handle.
11406         * include/grub/loader.h (grub_loader_set): Added one more argument
11407         NORETURN.
11409         * disk/efi/efidisk.c (make_devices): Use grub_efi_get_device_path
11410         instead of grub_efi_open_protocol.
11411         (grub_efidisk_get_device_name): Likewise.
11412         (grub_efidisk_close): Print a newline.
11413         (grub_efidisk_get_device_handle): Fixed to use
11414         GRUB_EFI_DEVICE_PATH_SUBTYPE instead of
11415         GRUB_EFI_DEVICE_PATH_TYPE.
11417         * disk/efi/efidisk.c (device_path_guid): Moved to ...
11418         * kern/efi/efi.c (device_path_guid): ... here.
11420         * conf/i386-efi.rmk (pkgdata_MODULES): Added _chain.mod and
11421         chain.mod.
11422         (kernel_mod_HEADERS): Added efi/disk.h.
11423         (_chain_mod_SOURCES): New variable.
11424         (_chain_mod_CFLAGS): Likewise.
11425         (_chain_mod_LDFLAGS): Likewise.
11426         (chain_mod_SOURCES): Likewise.
11427         (chain_mod_CFLAGS): Likewise.
11428         (chain_mod_LDFLAGS): Likewise.
11430         * DISTLIST: Added include/grub/efi/chainloader.h,
11431         loader/efi/chainloader.c and loader/efi/chainloader_normal.c.
11433         * include/grub/efi/chainloader.h: New file.
11434         * loader/efi/chainloader.c: Likewise.
11435         * loader/efi/chainloader_normal.c: Likewise.
11437 2006-04-30  Marco Gerards  <marco@gnu.org>
11439         * commands/configfile.c (grub_cmd_source): New function.
11440         (GRUB_MOD_INIT): Register the commands `source' and `.'.
11441         (GRUB_MOD_FINI): De-register the commands `source' and `.'.
11443 2006-04-30  Marco Gerards  <marco@gnu.org>
11445         * normal/execute.c (grub_script_execute_cmd): Change the return
11446         type to `grub_err_t'.  Correctly return the error.
11447         (grub_script_execute_cmdline): In case a command line is not a
11448         command or a function, try to interpret it as an assignment.
11450 2006-04-30  Yoshinori K. Okuji  <okuji@enbug.org>
11452         * fs/hfsplus.c (grub_hfsplus_read_block): Fixed a memory leak.
11453         (grub_hfsplus_iterate_dir): Reordered to skip unknown nodes. Also,
11454         skip a node whose name is obviously invalid as UTF-16,
11455         i.e. contains a NUL character. Stop the iteration when the last
11456         directory entry is found. Instead of using the return value of
11457         grub_hfsplus_btree_iterate_node, store the value in RET and use
11458         it, because the iterator can be stopped by the last directory
11459         entry.
11461 2006-04-30  Marco Gerards  <marco@gnu.org>
11463         * include/grub/env.h (grub_env_export): New prototype.  Reported
11464         by Jan C. Kleinsorge <jan.kleinsorge@udo.edu>.
11466 2006-04-30  Marco Gerards  <marco@gnu.org>
11468         * fs/hfsplus.c (grub_hfsplus_iterate_dir): Correctly calculate the
11469         size of the extents in a catalog file record.
11471 2006-04-29  Marco Gerards  <marco@gnu.org>
11473         * commands/configfile.c (grub_cmd_configfile): Execute the
11474         configfile within its own context.
11476         * include/grub/env.h (grub_env_context_open): New prototype.
11477         (grub_env_context_close): Likewise.
11479         * kern/env.c (grub_env): Removed.
11480         (grub_env_sorted): Likewise.
11481         (grub_env_context): New variable.
11482         (grub_env_var_context): Likewise.
11483         (grub_env_find): Search both the active context and the global
11484         context.
11485         (grub_env_context_open): New function.
11486         (grub_env_context_close): Likewise.
11487         (grub_env_insert): Likewise.
11488         (grub_env_remove): Likewise.
11489         (grub_env_export): Likewise.
11490         (grub_env_set): Changed to use helper functions to avoid code
11491         duplication.
11492         (grub_env_iterate): Rewritten so both the current context and the
11493         global context are being used.
11495         * normal/command.c (export_command): New function.
11496         (grub_command_init): Register the `export' function.
11498 2006-04-26  Yoshinori K. Okuji  <okuji@enbug.org>
11500         * util/i386/pc/grub-mkimage.c (compress_kernel): Cast arguments
11501         explicitly to suppress gcc's warnings.
11502         * fs/fat.c (grub_fat_find_dir): Likewise.
11503         (grub_fat_label): Likewise.
11504         * fs/xfs.c (grub_xfs_read_inode): Likewise.
11505         (grub_xfs_mount): Likewise.
11506         (grub_xfs_label): Likewise.
11507         * fs/affs.c (grub_affs_mount): Likewise.
11508         (grub_affs_label): Likewise.
11509         (grub_affs_iterate_dir): Likewise.
11510         * fs/sfs.c (grub_sfs_mount): Likewise.
11511         (grub_sfs_iterate_dir): Likewise.
11512         * fs/ufs.c (grub_ufs_lookup_symlink): Likewise.
11513         * fs/hfs.c (grub_hfs_mount): Likewise.
11514         (grub_hfs_cmp_catkeys): Likewise.
11515         (grub_hfs_find_dir): Likewise.
11516         (grub_hfs_dir): Likewise.
11517         (grub_hfs_label): Likewise.
11518         * fs/jfs.c (grub_jfs_mount): Likewise.
11519         (grub_jfs_opendir): Likewise.
11520         (grub_jfs_getent): Likewise.
11521         (grub_jfs_lookup_symlink): Likewise.
11522         (grub_jfs_label): Likewise.
11523         * fs/hfsplus.c (grub_hfsplus_cmp_catkey): Likewise.
11524         (grub_hfsplus_iterate_dir): Likewise.
11525         (grub_hfsplus_btree_iterate_node): Made static.
11527         * util/grub-emu.c (prefix): New variable.
11528         (grub_machine_set_prefix): New function.
11529         (main): Do not set the environment variable "prefix" here. Only
11530         set PREFIX, which is used later by grub_machine_set_prefix.
11532         * include/grub/video.h: Do not include grub/symbol.h.
11533         (grub_video_register): Not exported. This symbol is not defined in
11534         the kernel.
11535         (grub_video_unregister): Likewise.
11536         (grub_video_iterate): Likewise.
11537         (grub_video_setup): Likewise.
11538         (grub_video_restore): Likewise.
11539         (grub_video_get_info): Likewise.
11540         (grub_video_get_blit_format): Likewise.
11541         (grub_video_set_palette): Likewise.
11542         (grub_video_get_palette): Likewise.
11543         (grub_video_set_viewport): Likewise.
11544         (grub_video_get_viewport): Likewise.
11545         (grub_video_map_color): Likewise.
11546         (grub_video_map_rgb): Likewise.
11547         (grub_video_map_rgba): Likewise.
11548         (grub_video_fill_rect): Likewise.
11549         (grub_video_blit_glyph): Likewise.
11550         (grub_video_blit_bitmap): Likewise.
11551         (grub_video_blit_render_target): Likewise.
11552         (grub_video_scroll): Likewise.
11553         (grub_video_swap_buffers): Likewise.
11554         (grub_video_create_render_target): Likewise.
11555         (grub_video_delete_render_target): Likewise.
11556         (grub_video_set_active_render_target): Likewise.
11558         * include/grub/symbol.h [GRUB_SYMBOL_GENERATOR] (EXPORT_FUNC):
11559         Undefined.
11560         [GRUB_SYMBOL_GENERATOR] (EXPORT_VAR): Likewise.
11562         * conf/sparc64-ieee1275.rmk (grubof_symlist.c): Depended on
11563         config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
11564         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
11565         instead of $(srcdir)/genkernsyms.sh.
11567         * conf/powerpc-ieee1275.rmk (grubof_symlist.c): Depended on
11568         config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
11569         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
11570         instead of $(srcdir)/genkernsyms.sh.
11572         * conf/i386-pc.rmk (symlist.c): Depended on config.h. Use
11573         gensymlist.sh instead of $(srcdir)/gensymlist.sh.
11574         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
11575         instead of $(srcdir)/genkernsyms.sh.
11577         * conf/i386-efi.rmk (symlist.c): Depended on config.h. Use
11578         gensymlist.sh instead of $(srcdir)/gensymlist.sh.
11579         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
11580         instead of $(srcdir)/genkernsyms.sh.
11582         * configure.ac (AC_CONFIG_FILES): Added gensymlist.sh and
11583         genkernsyms.sh.
11585         * Makefile.in (DISTCLEANFILES): Added gensymlist.sh and
11586         genkernsyms.sh.
11587         (gensymlist.sh): New target.
11588         (genkernsyms.sh): Likewise.
11590         * DISTLIST: Removed genkernsyms.sh and gensymlist.sh. Added
11591         genkernsyms.sh.in and gensymlist.sh.in.
11593         * genkernsyms.sh: Removed.
11594         * gensymlist.sh: Likewise.
11596         * genkernsyms.sh.in: New file.
11597         * gensymlist.sh.in: Likewise.
11599 2006-04-25  Hollis Blanchard  <hollis@penguinppc.org>
11601         * kern/powerpc/ieee1275/init.c (grub_machine_set_prefix): Do not
11602         clobber "prefix", since we may have already set it manually.
11604 2006-04-25  Hollis Blanchard  <hollis@penguinppc.org>
11606         * kern/misc.c (abort): New alias for grub_abort.
11608 2006-04-25  Yoshinori K. Okuji  <okuji@enbug.org>
11610         A new machine-specific function "grub_machine_set_prefix" is
11611         defined. This is called after loading modules, so that a prefix
11612         initialization can use modules. Also, this change adds an
11613         intensive debugging feature for the memory manager via the
11614         configure option "--enable-mm-debug".
11616         * partmap/gpt.c (gpt_partition_map_iterate): Add one more into
11617         PART.LEN.
11619         * kern/sparc64/ieee1275/init.c (abort): Removed.
11620         (grub_stop): Likewise.
11621         (grub_exit): New function.
11622         (grub_set_prefix): Renamed to ...
11623         (grub_machine_set_prefix): ... this.
11624         (grub_machine_init): Do not call grub_set_prefix.
11626         * kern/powerpc/ieee1275/init.c (grub_set_prefix): Renamed to ...
11627         (grub_machine_set_prefix): ... this.
11628         (grub_machine_init): Do not call grub_set_prefix.
11630         * kern/i386/pc/init.c (grub_machine_set_prefix): New function.
11631         (grub_machine_init): Do not set the prefix here.
11633         * kern/i386/efi/init.c (grub_machine_set_prefix): New function.
11635         * kern/efi/init.c: Include grub/mm.h.
11636         (grub_efi_set_prefix): New function.
11638         * kern/efi/efi.c (grub_exit): Call grub_efi_fini.
11639         (grub_efi_get_filename): New function.
11640         (grub_print_device_path): Renamed to ...
11641         (grub_efi_print_device_path): ... this.
11643         * kern/mm.c [MM_DEBUG] (grub_malloc): Undefined.
11644         [MM_DEBUG] (grub_realloc): Likewise.
11645         [MM_DEBUG] (grub_free): Likewise.
11646         [MM_DEBUG] (grub_memalign): Likewise.
11647         [MM_DEBUG] (grub_mm_debug): New variable.
11648         [MM_DEBUG] (grub_debug_malloc): New function.
11649         [MM_DEBUG] (grub_debug_free): New function.
11650         [MM_DEBUG] (grub_debug_realloc): New function.
11651         [MM_DEBUG] (grub_debug_memalign): New function.
11653         * kern/misc.c (grub_abort): Print a newline to distinguish
11654         the message.
11656         * kern/main.c (grub_main): Call grub_machine_set_prefix and
11657         grub_set_root_dev after loading modules. This is necessary when
11658         setting a prefix depends on modules.
11660         * include/grub/efi/efi.h (grub_print_device_path): Renamed to ...
11661         (grub_efi_print_device_path): ... this.
11662         (grub_efi_get_filename): New prototype.
11663         (grub_efi_set_prefix): Likewise.
11665         * include/grub/efi/disk.h: Include grub/efi/api.h, grub/symbol.h
11666         and grub/disk.h.
11667         (grub_efidisk_get_device_handle): New prototype.
11668         (grub_efidisk_get_device_name): Likewise.
11670         * include/grub/mm.h: Include config.h.
11671         (MM_DEBUG): Removed.
11672         [MM_DEBUG && !GRUB_UTIL] (grub_mm_debug): New prototype.
11673         [MM_DEBUG && !GRUB_UTIL] (grub_malloc): New macro.
11674         [MM_DEBUG && !GRUB_UTIL] (grub_realloc): Likewise.
11675         [MM_DEBUG && !GRUB_UTIL] (grub_memalign): Likewise.
11676         [MM_DEBUG && !GRUB_UTIL] (grub_free): Likewise.
11677         [MM_DEBUG && !GRUB_UTIL] (grub_debug_malloc): New prototype.
11678         [MM_DEBUG && !GRUB_UTIL] (grub_debug_realloc): New prototype.
11679         [MM_DEBUG && !GRUB_UTIL] (grub_debug_memalign): New prototype.
11680         [MM_DEBUG && !GRUB_UTIL] (grub_debug_free): New prototype.
11682         * include/grub/kernel.h (grub_machine_set_prefix): New prototype.
11684         * disk/efi/efidisk.c: Include grub/partition.h.
11685         (iterate_child_devices): New function.
11686         (add_device): First, compare only last device path nodes, so that
11687         devices are sorted by the types.
11688         (grub_efidisk_get_device_handle): New function.
11689         (grub_efidisk_get_device_name): Likewise.
11691         * configure.ac (--enable-mm-debug): New option to enable the
11692         memory manager debugging feature. This makes the binary much
11693         bigger, so is disabled by default.
11695 2006-04-23  Yoshinori K. Okuji  <okuji@enbug.org>
11697         Use grub_abort instead of grub_stop, and grub_exit must be
11698         define in each architecture now. Also, this change adds support
11699         for EFI disks.
11701         * util/i386/pc/grub-probefs.c: Include grub/term.h.
11702         (grub_getkey): New function.
11703         (grub_term_get_current): Likewise.
11705         * util/i386/pc/grub-setup.c: Include grub/term.h.
11706         (grub_getkey): New function.
11707         (grub_term_get_current): Likewise.
11709         * util/misc.c (grub_stop): Renamed to ...
11710         (grub_exit): ... this.
11712         * kern/powerpc/ieee1275/init.c (abort): Renamed to ...
11713         (grub_exit): ... this.
11714         (grub_machine_init): Use grub_abort instead of abort.
11715         (grub_stop): Removed.
11717         * kern/powerpc/ieee1275/cmain.c (cmain): Use grub_abort instead of
11718         abort.
11720         * kern/i386/pc/startup.S (grub_exit): New function.
11721         (cold_reboot): New label.
11723         * kern/efi/init.c: Include grub/efi/disk.h and grub/env.h.
11724         (grub_efi_init): Call grub_efidisk_init.
11725         (grub_efi_fini): Call grub_efidisk_fini.
11727         * kern/efi/efi.c: Include grub/mm.h.
11728         (grub_efi_console_control_guid): Renamed to ...
11729         (console_control_guid): ... this.
11730         (grub_efi_loaded_image_guid): Renamed to ...
11731         (loaded_image_guid): ... this.
11732         (grub_efi_locate_handle): New function.
11733         (grub_efi_open_protocol): Likewise.
11734         (grub_efi_set_text_mode): Use CONSOLE_CONTROL_GUID instead of
11735         GRUB_EFI_CONSOLE_CONTROL_GUID.
11736         (grub_efi_exit): Removed.
11737         (grub_stop): Likewise.
11738         (grub_efi_get_loaded_image): Use grub_efi_open_protocol.
11739         (grub_exit): New function.
11740         (grub_print_device_path): Likewise.
11742         * kern/rescue.c (grub_rescue_cmd_exit): New function.
11743         (grub_enter_rescue_mode): Register "exit".
11745         * kern/misc.c (grub_real_dprintf): A cosmetic change.
11746         (grub_abort): New function.
11748         * kern/err.c (grub_fatal): Use grub_abort instead of grub_stop.
11750         * include/grub/sparc64/ieee1275/kernel.h (abort): Removed.
11752         * include/grub/powerpc/ieee1275/kernel.h (abort): Removed.
11754         * include/grub/efi/efi.h (grub_efi_exit): Removed.
11755         (grub_print_device_path): New prototype.
11756         (grub_efi_locate_handle): Likewise.
11757         (grub_efi_open_protocol): Likewise.
11759         * include/grub/efi/disk.h (grub_efidisk_fini): New file.
11760         * disk/efi/efidisk.c: Likewise.
11762         * DISTLIST: Added disk/efi/efidisk.c and include/grub/efi/disk.h.
11764         * include/grub/efi/console_control.h
11765         (GRUB_EFI_CONSOLE_CONTROL_GUID): Use an array for the last 8 bytes.
11767         * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): Specify the
11768         last 8 bytes as an array.
11769         (GRUB_EFI_DISK_IO_GUID): New macro.
11770         (GRUB_EFI_BLOCK_IO_GUID): Likewise.
11771         (GRUB_EFI_DEVICE_PATH_GUID): Likewise.
11772         (grub_efi_ipv6_address_t): Change the type to grub_uint16_t from
11773         grub_uint8_t.
11774         (struct grub_efi_guid): Use an array to specify the last 8 bytes.
11775         (struct grub_efi_device_path): Rename the member "sub_type" to
11776         "subtype".
11777         (GRUB_EFI_DEVICE_PATH_TYPE): New macro.
11778         (GRUB_EFI_DEVICE_PATH_SUBTYPE): Likewise.
11779         (GRUB_EFI_DEVICE_PATH_LENGTH): Likewise.
11780         (GRUB_EFI_END_DEVICE_PATH_TYPE): Likewise.
11781         (GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE): Likewise.
11782         (GRUB_EFI_END_THIS_DEVICE_PATH_SUBTYPE): Likewise.
11783         (GRUB_EFI_END_ENTIRE_DEVICE_PATH): Likewise.
11784         (GRUB_EFI_NEXT_DEVICE_PATH): Likewise.
11785         (GRUB_EFI_HARDWARE_DEVICE_PATH_TYPE): Likewise.
11786         (GRUB_EFI_PCI_DEVICE_PATH_SUBTYPE): Likewise.
11787         (struct grub_efi_pci_device_path): New structure.
11788         (grub_efi_pci_device_path_t): New type.
11789         (GRUB_EFI_PCCARD_DEVICE_PATH_SUBTYPE): New macro.
11790         (struct grub_efi_pccard_device_path): New structure.
11791         (grub_efi_pccard_device_path_t): New type.
11792         (GRUB_EFI_MEMORY_MAPPED_DEVICE_PATH_SUBTYPE): New macro.
11793         (struct grub_efi_memory_mapped_device_path): New structure.
11794         (grub_efi_memory_mapped_device_path_t): New type.
11795         (GRUB_EFI_VENDOR_DEVICE_PATH_SUBTYPE): New macro.
11796         (struct grub_efi_vendor_device_path): New structure.
11797         (grub_efi_vendor_device_path_t): New type.
11798         (GRUB_EFI_CONTROLLER_DEVICE_PATH_SUBTYPE): New macro.
11799         (struct grub_efi_controller_device_path): New structure.
11800         (grub_efi_controller_device_path_t): New type.
11801         (GRUB_EFI_ACPI_DEVICE_PATH_TYPE): New macro.
11802         (GRUB_EFI_ACPI_DEVICE_PATH_SUBTYPE): Likewise.
11803         (struct grub_efi_acpi_device_path): New structure.
11804         (grub_efi_acpi_device_path_t): New type.
11805         (GRUB_EFI_EXPANDED_ACPI_DEVICE_PATH_SUBTYPE): New macro.
11806         (struct grub_efi_expanded_acpi_device_path): New structure.
11807         (grub_efi_expanded_acpi_device_path_t): New type.
11808         (GRUB_EFI_EXPANDED_ACPI_HIDSTR): New macro.
11809         (GRUB_EFI_EXPANDED_ACPI_UIDSTR): Likewise.
11810         (GRUB_EFI_EXPANDED_ACPI_CIDSTR): Likewise.
11811         (GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE): Likewise.
11812         (GRUB_EFI_ATAPI_DEVICE_PATH_SUBTYPE): Likewise.
11813         (struct grub_efi_atapi_device_path): New structure.
11814         (grub_efi_atapi_device_path_t): New type.
11815         (GRUB_EFI_FIBRE_CHANNEL_DEVICE_PATH_SUBTYPE): New macro.
11816         (struct grub_efi_fibre_channel_device_path): New structure.
11817         (grub_efi_fibre_channel_device_path_t): New type.
11818         (GRUB_EFI_1394_DEVICE_PATH_SUBTYPE): New macro.
11819         (struct grub_efi_1394_device_path): New structure.
11820         (grub_efi_1394_device_path_t): New type.
11821         (GRUB_EFI_USB_DEVICE_PATH_SUBTYPE): New macro.
11822         (struct grub_efi_usb_device_path): New structure.
11823         (grub_efi_usb_device_path_t): New type.
11824         (GRUB_EFI_USB_CLASS_DEVICE_PATH_SUBTYPE): New macro.
11825         (struct grub_efi_usb_class_device_path): New structure.
11826         (grub_efi_usb_class_device_path_t): New type.
11827         (GRUB_EFI_I2O_DEVICE_PATH_SUBTYPE): New macro.
11828         (struct grub_efi_i2o_device_path): New structure.
11829         (grub_efi_i2o_device_path_t): New type.
11830         (GRUB_EFI_MAC_ADDRESS_DEVICE_PATH_SUBTYPE): New macro.
11831         (struct grub_efi_mac_address_device_path): New structure.
11832         (grub_efi_mac_address_device_path_t): New type.
11833         (GRUB_EFI_IPV4_DEVICE_PATH_SUBTYPE): New macro.
11834         (struct grub_efi_ipv4_device_path): New structure.
11835         (grub_efi_ipv4_device_path_t): New type.
11836         (GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE): New macro.
11837         (struct grub_efi_ipv6_device_path): New structure.
11838         (grub_efi_ipv6_device_path_t): New type.
11839         (GRUB_EFI_INFINIBAND_DEVICE_PATH_SUBTYPE): New macro.
11840         (struct grub_efi_infiniband_device_path): New structure.
11841         (grub_efi_infiniband_device_path_t): New type.
11842         (GRUB_EFI_UART_DEVICE_PATH_SUBTYPE): New macro.
11843         (struct grub_efi_uart_device_path): New structure.
11844         (grub_efi_uart_device_path_t): New type.
11845         (GRUB_EFI_VENDOR_MESSAGING_DEVICE_PATH_SUBTYPE): New macro.
11846         (struct grub_efi_vendor_messaging_device_path): New structure.
11847         (grub_efi_vendor_messaging_device_path_t): New type.
11848         (GRUB_EFI_MEDIA_DEVICE_PATH_TYPE): New macro.
11849         (GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE): Likewise.
11850         (struct grub_efi_hard_drive_device_path): New structure.
11851         (grub_efi_hard_drive_device_path_t): New type.
11852         (GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE): New macro.
11853         (struct grub_efi_cdrom_device_path): New structure.
11854         (grub_efi_cdrom_device_path_t): New type.
11855         (GRUB_EFI_VENDOR_MEDIA_DEVICE_PATH_SUBTYPE): New macro.
11856         (struct grub_efi_vendor_media_device_path): New structure.
11857         (grub_efi_vendor_media_device_path_t): New type.
11858         (GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE): New macro.
11859         (struct grub_efi_file_path_device_path): New structure.
11860         (grub_efi_file_path_device_path_t): New type.
11861         (GRUB_EFI_PROTOCOL_DEVICE_PATH_SUBTYPE): New macro.
11862         (struct grub_efi_protocol_device_path): New structure.
11863         (grub_efi_protocol_device_path_t): New type.
11864         (GRUB_EFI_BIOS_DEVICE_PATH_TYPE): New macro.
11865         (GRUB_EFI_BIOS_DEVICE_PATH_SUBTYPE): Likewise.
11866         (struct grub_efi_bios_device_path): New structure.
11867         (grub_efi_bios_device_path_t): New type.
11868         (struct grub_efi_disk_io): New structure.
11869         (grub_efi_disk_io_t): New type.
11870         (struct grub_efi_block_io_media): New structure.
11871         (grub_efi_block_io_media_t): New type.
11872         (struct grub_efi_block_io): New structure.
11873         (grub_efi_block_io_t): New type.
11875         * include/grub/misc.h (grub_stop): Removed.
11876         (grub_exit): New prototype.
11877         (grub_abort): Likewise.
11879         * include/grub/disk.h (enum grub_disk_dev_id): Added
11880         GRUB_DISK_DEVICE_EFIDISK_ID.
11882         * conf/i386-efi.rmk (kernel_mod_SOURCES): Added
11883         disk/efi/efidisk.c.
11884         (kernel_syms.lst): Remove the target if an error occurs.
11886 2006-04-22  Yoshinori K. Okuji  <okuji@enbug.org>
11888         * kern/misc.c (grub_lltoa): Rewritten the decimal conversion part,
11889         as it was simply too buggy.
11891 2006-04-21  Yoshinori K. Okuji  <okuji@enbug.org>
11893         * kern/misc.c (grub_lltoa): New function.
11894         (grub_vsprintf): Added support for the long long suffix,
11895         i.e. "ll".
11897 2006-04-20  Hollis Blanchard  <hollis@penguinppc.org>
11899         * Makefile.in (LDFLAGS): Add variable.
11900         (LD): Remove variable.
11901         * configure.ac: Add -m32 to LDFLAGS.
11902         * genmk.rb (PModule#rule): Use $(CC) instead of $(LD).
11903         * conf/powerpc-ieee1275.rmk (COMMON_LDFLAGS): Add variable.
11904         (grubof_LDFLAGS): Use $(COMMON_LDFLAGS).
11905         (_linux_mod_LDFLAGS, linux_mod_LDFLAGS, normal_mod_LDFLAGS,
11906         suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS): New
11907         variables.
11908         * conf/sparc64-ieee1275.rmk (COMMON_LDFLAGS): Add -nostdlib.
11909         * conf/i386-pc.rmk (COMMON_LDFLAGS): Add -nostdlib.
11910         * conf/i386-efi.rmk (COMMON_LDFLAGS): Add -nostdlib.
11912 2006-04-20  Vesa Jaaskelainen  <chaac@nic.fi>
11914         * term/gfxterm.c (grub_gfxterm_getcharwidth): Fixed character
11915         length for unknown glyph.
11917 2006-04-20  Yoshinori K. Okuji  <okuji@enbug.org>
11919         Add support for pre-loaded modules into the EFI port.
11921         * util/i386/efi/grub-mkimage.c (make_mods_section): Rewritten
11922         completely. Accept one more argument DIR. The caller has changed.
11924         * kern/i386/efi/init.c (grub_arch_modules_addr): Removed.
11926         * kern/efi/efi.c: Include grub/efi/pe32.h and grub/kernel.h.
11927         (grub_efi_loaded_image_guid): New variable.
11928         (grub_efi_get_loaded_image): New function.
11929         (grub_arch_modules_addr): Likewise.
11931         * include/grub/efi/efi.h (grub_efi_get_loaded_image): New
11932         prototype.
11934         * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): New macro.
11935         (struct grub_efi_loaded_image): New structure.
11936         (grub_efi_loaded_image_t): New type.
11938 2006-04-20  Yoshinori K. Okuji  <okuji@enbug.org>
11940         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Compare the file
11941         size with GRUB_OS_AREA_SIZE as grub_size_t instead of
11942         grub_ssize_t. Reported by Jeff Chua <jeff84@silk.corp.fedex.com>.
11944 2006-04-19  Roger Leigh  <rleigh@whinlatter.ukfsn.org>
11946         * DISTLIST: Added `util/powerpc/ieee1275/grub-install.in'.
11948 2006-04-19  Yoshinori K. Okuji  <okuji@enbug.org>
11950         * DISTLIST: Added include/grub/efi/console.h,
11951         include/grub/efi/time.h, include/grub/i386/efi/kernel.h,
11952         kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
11954         * include/grub/efi/console.h: New file.
11955         * include/grub/efi/time.h: Likewise.
11956         * include/grub/i386/efi/kernel.h: Likewise.
11957         * kern/efi/init.c: Likewise.
11958         * kern/efi/mm.c: Likewise.
11959         * term/efi/console.c: Likewise.
11961         * kern/i386/efi/init.c: Do not include grub/machine/time.h.
11962         (grub_stop): Removed.
11963         (grub_get_rtc): Likewise.
11964         (grub_machine_init): Simply call grub_efi_init.
11965         (grub_machine_fini): Call grub_efi_fini.
11967         * kern/efi/efi.c: Include grub/machine/time.h and grub/term.h.
11968         (grub_efi_output_string): Removed.
11969         (grub_efi_stall): New function.
11970         (grub_stop): Likewise.
11971         (grub_get_rtc): Likewise.
11973         * include/grub/efi/efi.h (grub_efi_output_string): Removed.
11974         (grub_efi_stall): New prototype.
11975         (grub_efi_allocate_pages): Likewise.
11976         (grub_efi_free_pages): Likewise.
11977         (grub_efi_get_memory_map): Likewise.
11978         (grub_efi_mm_init): Likewise.
11979         (grub_efi_mm_fini): Likewise.
11980         (grub_efi_init): Likewise.
11981         (grub_efi_fini): Likewise.
11983         * include/grub/i386/efi/time.h: Do not include
11984         grub/symbol.h. Include grub/efi/time.h.
11985         (GRUB_TICKS_PER_SECOND): Removed.
11986         (grub_get_rtc): Likewise.
11988         * include/grub/efi/api.h (struct grub_efi_memory_descriptor):
11989         Added padding. The EFI spec is buggy.
11990         (GRUB_EFI_BLACK): New macro.
11991         (GRUB_EFI_BLUE): Likewise.
11992         (GRUB_EFI_GREEN): Likewise.
11993         (GRUB_EFI_CYAN): Likewise.
11994         (GRUB_EFI_RED): Likewise.
11995         (GRUB_EFI_MAGENTA): Likewise.
11996         (GRUB_EFI_BROWN): Likewise.
11997         (GRUB_EFI_LIGHTGRAY): Likewise.
11998         (GRUB_EFI_BRIGHT): Likewise.
11999         (GRUB_EFI_DARKGRAY): Likewise.
12000         (GRUB_EFI_LIGHTBLUE): Likewise.
12001         (GRUB_EFI_LIGHTGREEN): Likewise.
12002         (GRUB_EFI_LIGHTCYAN): Likewise.
12003         (GRUB_EFI_LIGHTRED): Likewise.
12004         (GRUB_EFI_LIGHTMAGENTA): Likewise.
12005         (GRUB_EFI_YELLOW): Likewise.
12006         (GRUB_EFI_WHITE): Likewise.
12007         (GRUB_EFI_BACKGROUND_BLACK): Likewise.
12008         (GRUB_EFI_BACKGROUND_BLUE): Likewise.
12009         (GRUB_EFI_BACKGROUND_GREEN): Likewise.
12010         (GRUB_EFI_BACKGROUND_CYAN): Likewise.
12011         (GRUB_EFI_BACKGROUND_RED): Likewise.
12012         (GRUB_EFI_BACKGROUND_MAGENTA): Likewise.
12013         (GRUB_EFI_BACKGROUND_BROWN): Likewise.
12014         (GRUB_EFI_BACKGROUND_LIGHTGRAY): Likewise.
12015         (GRUB_EFI_TEXT_ATTR): Likewise.
12017         * conf/i386-efi.rmk (kernel_mod_SOURCES): Added kern/efi/efi.c,
12018         kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
12019         (kernel_mod_HEADERS): Added efi/time.h.
12021 2006-04-18  Yoshinori K. Okuji  <okuji@enbug.org>
12023         * DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
12024         include/grub/efi/api.h, include/grub/efi/console_control.h,
12025         include/grub/efi/efi.h, include/grub/efi/pe32.h,
12026         include/grub/i386/efi/time.h, kern/efi/efi.c,
12027         kern/i386/efi/init.c, kern/i386/efi/startup.S,
12028         and util/i386/efi/grub-mkimage.c.
12030         * Makefile.in (RMKFILES): Added i386-efi.rmk.
12032         * genmk.rb (PModule#rule): Do not export symbols if
12033         #{prefix}_EXPORTS is set to "no".
12035         * conf/i386-efi.mk: New file.
12036         * conf/i386-efi.rmk: Likewise.
12037         * include/grub/efi/api.h: Likewise.
12038         * include/grub/efi/console_control.h: Likewise.
12039         * include/grub/efi/efi.h: Likewise.
12040         * include/grub/efi/pe32.h: Likewise.
12041         * include/grub/i386/efi/time.h: Likewise.
12042         * kern/efi/efi.c: Likewise.
12043         * kern/i386/efi/init.c: Likewise.
12044         * kern/i386/efi/startup.S: Likewise.
12045         * util/i386/efi/grub-mkimage.c: Likewise.
12047 2006-04-17  Marco Gerards  <marco@gnu.org>
12049         * include/grub/script.h: Include <grub/parser.h> and
12050         "grub_script.tab.h".
12051         (struct grub_lexer_param): New struct.
12052         (struct grub_parser_param): Likewise.
12053         (grub_script_create_arglist): Pass the state in an argument.
12054         (grub_script_add_arglist): Likewise.
12055         (grub_script_create_cmdline): Likewise.
12056         (grub_script_create_cmdblock): Likewise.
12057         (grub_script_create_cmdif): Likewise.
12058         (grub_script_create_cmdmenu): Likewise.
12059         (grub_script_add_cmd): Likewise.
12060         (grub_script_arg_add): Likewise.
12061         (grub_script_lexer_ref): Likewise.
12062         (grub_script_lexer_deref): Likewise.
12063         (grub_script_lexer_record_start): Likewise.
12064         (grub_script_lexer_record_stop): Likewise.
12065         (grub_script_mem_record): Likewise.
12066         (grub_script_mem_record_stop): Likewise.
12067         (grub_script_malloc): Likewise.
12068         (grub_script_yylex): Likewise.
12069         (grub_script_yyparse): Likewise.
12070         (grub_script_yyerror): Likewise.
12071         (grub_script_yylex): Likewise.
12072         (grub_script_lexer_init): Return the state.
12074         * normal/lexer.c (grub_script_lexer_state): Removed variable.
12075         (grub_script_lexer_done): Likewise.
12076         (grub_script_lexer_getline): Likewise.
12077         (grub_script_lexer_refs): Likewise.
12078         (script): Likewise.
12079         (newscript): Likewise.
12080         (record): Likewise.
12081         (recording): Likewise.
12082         (recordpos): Likewise.
12083         (recordlen): Likewise.
12084         (grub_script_lexer_init): Return the state instead of setting
12085         global variables.
12086         (grub_script_lexer_ref): Use the newly added argument for state
12087         instead of globals.
12088         (grub_script_lexer_deref): Likewise.
12089         (grub_script_lexer_record_start): Likewise.
12090         (grub_script_lexer_record_stop): Likewise.
12091         (recordchar): Likewise.
12092         (nextchar): Likewise.
12093         (grub_script_yylex2): Likewise.
12094         (grub_script_yylex): Likewise.
12095         (grub_script_yyerror): Likewise.
12097         * normal/parser.y (func_mem): Removed variable.
12098         (menu_entry): Likewise.
12099         (err): Likewise.
12100         (%lex-param): New parser option.
12101         (%parse-param): Likewise.
12102         (script): Always return the AST.
12103         (argument): Pass the state around.
12104         (arguments): Likewise.
12105         (grubcmd): Likewise.
12106         (commands): Likewise.
12107         (function): Likewise.
12108         (menuentry): Likewise.
12109         (if_statement): Likewise.
12110         (if): Likewise.
12112         * normal/script.c (grub_script_memused): Removed variable.
12113         (grub_script_parsed): Likewise.
12114         (grub_script_malloc): Added a state argument.  Use that instead of
12115         global variables.
12116         (grub_script_mem_record): Likewise.
12117         (grub_script_mem_record_stop): Likewise.
12118         (grub_script_arg_add): Likewise.
12119         (grub_script_add_arglist): Likewise.
12120         (grub_script_create_cmdline): Likewise.
12121         (grub_script_create_cmdif): Likewise.
12122         (grub_script_create_cmdmenu): Likewise.
12123         (grub_script_add_cmd): Likewise.
12124         (grub_script_parse): Setup the state before calling the parser.
12126 2006-04-16  Marco Gerards  <marco@gnu.org>
12128         * normal/command.c (grub_command_init): Remove the title command.
12130         * normal/lexer.c (grub_script_yylex): Renamed from this...
12131         (grub_script_yylex2): ... to this.
12132         (grub_script_yylex): New function.  Temporary
12133         introduced to filter some tokens.
12134         (grub_script_yyerror): Print a newline.
12136         * normal/main.c (read_config_file): Output information about the
12137         lines that contain errors.  Wait for a key after all lines have
12138         been processed.  Don't return an empty menu.
12140         * normal/parser.y (func_mem): Don't initialize.
12141         (menu_entry): Likewise.
12142         (err): New variable.
12143         (script): Don't return anything when an error was encountered.
12144         (ws, returns): Removed rules.
12145         (argument): Disabled concatenated variable support.
12146         (arguments): Remove explicit separators.
12147         (grubcmd): Likewise.
12148         (function): Likewise.
12149         (menuentry): Likewise.
12150         (if): Likewise.
12151         (commands): Likewise.  Add error handling.
12153         * normal/script.c (grub_script_create_cmdline): If
12154         `grub_script_parsed' is 0, assume the parser encountered an error.
12156 2006-04-02  Yoshinori K. Okuji  <okuji@enbug.org>
12158         * configure.ac: Add support for EFI. Fix the typo
12159         BUILD_LDDFLAGS. Restore the LDFLAGS after testing.
12161 2006-04-01  Vesa Jaaskelainen  <chaac@nic.fi>
12163         * util/unifont2pff.rb: Removed unnecessary byte ordering.  Now
12164         foreign multibyte characters should be shown correctly.
12166 2006-04-01  Vesa Jaaskelainen  <chaac@nic.fi>
12168         * normal/main.c (grub_normal_menu_addentry): Fixed menu size
12169         calculation.
12170         (read_config_file): Made it to close file before returning.
12172 2006-03-31  Vesa Jaaskelainen  <chaac@nic.fi>
12174         * DISTLIST: Added include/grub/i386/pc/vbeblit.h,
12175         include/grub/i386/pc/vbefill.h, video/i386/pc/vbeblit.c,
12176         video/i386/pc/vbefill.c.
12178         * conf/i386-pc.rmk (vbe_mod_SOURCES): Added video/i386/pc/vbeblit.c,
12179         video/i386/pc/vbefill.c.
12181         * include/grub/video.h (grub_video_blit_format): New enum.
12182         (grub_video_mode_info): Added new member blit_format.
12183         (grub_video_get_blit_format): New function prototype.
12185         * include/grub/i386/pc/vbe.h (grub_video_vbe_get_video_ptr): New
12186         function prototype.
12187         (grub_video_vbe_map_rgb): Likewise.
12188         (grub_video_vbe_unmap_color): Likewise.
12190         * include/grub/i386/pc/vbeblit.h: New file.
12192         * include/grub/i386/pc/vbefill.h: New file.
12194         * video/video.c (grub_video_get_blit_format): New function.
12195         (grub_video_vbe_get_video_ptr): Re-declared as non-static.
12196         (grub_video_vbe_map_rgb): Likewise.
12197         (grub_video_vbe_unmap_color): Likewise.
12199         * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Changed to use more
12200         optimized fills.
12201         (grub_video_vbe_blit_render_target): Changed to use more optimized
12202         blits.
12203         (grub_video_vbe_setup): Added detection for optimized settings.
12204         (grub_video_vbe_create_render_target): Likewise.
12206         * video/i386/pc/vbeblit.c: New file.
12208         * video/i386/pc/vbefill.c: New file.
12210 2006-03-30  Vesa Jaaskelainen  <chaac@nic.fi>
12212         * font/manager.c (grub_font_get_glyph): Removed font fixup from
12213         here...
12215         * util/unifont2pff.rb: ... and moved it to here.  Improved argument
12216         parsing to support both hex and dec ranges.  If filename was missing
12217         show usage information.
12219 2006-03-14  Vesa Jaaskelainen  <chaac@nic.fi>
12221         * DISTLIST: Added include/grub/video.h, term/gfxterm.c,
12222         video/video.c, commands/videotest.c.  Removed term/i386/pc/vesafb.c.
12224         * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod,
12225         gfxterm.mod, videotest.mod.  Removed vga.mod, vesafb.mod.
12226         (video_mod_SOURCES): Added.
12227         (video_mod_CFLAGS): Likewise.
12228         (video_mod_LDFLAGS): Likewise.
12229         (gfxterm_mod_SOURCES): Likewise.
12230         (gfxterm_mod_CFLAGS): Likewise.
12231         (gfxterm_mod_LDFLAGS): Likewise.
12232         (videotest_mod_SOURCES): Likewise.
12233         (videotest_mod_CFLAGS): Likewise.
12234         (videotest_mod_LDFLAGS): Likewise.
12235         (vesafb_mod_SOURCES): Removed.
12236         (vesafb_mod_CFLAGS): Likewise.
12237         (vesafb_mod_LDFLAGS): Likewise.
12238         (vga_mod_SOURCES): Likewise.
12239         (vga_mod_CFLAGS): Likewise.
12240         (vga_mod_LDFLAGS): Likewise.
12242         * commands/videotest.c: New file.
12244         * font/manager.c (fill_with_default_glyph): Modified to use
12245         grub_font_glyph.
12246         (grub_font_get_glyph): Likewise.
12247         (fontmanager): Renamed from this...
12248         (font_manager): ... to this.
12250         * include/grub/font.h (grub_font_glyph): Added new structure.
12251         (grub_font_get_glyph): Modified to use grub_font_glyph.
12253         * include/grub/misc.h (grub_abs): Added as inline function.
12255         * include/grub/video.h: New file.
12257         * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro.
12258         (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise.
12259         (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise.
12260         (grub_vbe_get_controller_info): Renamed from this...
12261         (grub_vbe_bios_get_controller_info): ... to this.
12262         (grub_vbe_get_mode_info): Renamed from this...
12263         (grub_vbe_bios_get_mode_info): ... to this.
12264         (grub_vbe_set_mode): Renamed from this...
12265         (grub_vbe_bios_set_mode): ... to this.
12266         (grub_vbe_get_mode): Renamed from this...
12267         (grub_vbe_bios_get_mode): ... to this.
12268         (grub_vbe_set_memory_window): Renamed from this...
12269         (grub_vbe_bios_set_memory_window): ... to this.
12270         (grub_vbe_get_memory_window): Renamed from this...
12271         (grub_vbe_bios_get_memory_window): ... to this.
12272         (grub_vbe_set_scanline_length): Renamed from this...
12273         (grub_vbe_set_scanline_length): ... to this.
12274         (grub_vbe_get_scanline_length): Renamed from this...
12275         (grub_vbe_bios_get_scanline_length): ... to this.
12276         (grub_vbe_set_display_start): Renamed from this...
12277         (grub_vbe_bios_set_display_start): ... to this.
12278         (grub_vbe_get_display_start): Renamed from this...
12279         (grub_vbe_bios_get_display_start): ... to this.
12280         (grub_vbe_set_palette_data): Renamed from this...
12281         (grub_vbe_bios_set_palette_data): ... to this.
12282         (grub_vbe_set_pixel_rgb): Removed.
12283         (grub_vbe_set_pixel_index): Likewise.
12285         * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed
12286         from this...
12287         (grub_vbe_bios_get_controller_info): ... to this.
12288         (grub_vbe_get_mode_info): Renamed from this...
12289         (grub_vbe_bios_get_mode_info): ... to this.
12290         (grub_vbe_set_mode): Renamed from this...
12291         (grub_vbe_bios_set_mode): ... to this.
12292         (grub_vbe_get_mode): Renamed from this...
12293         (grub_vbe_bios_get_mode): ... to this.
12294         (grub_vbe_set_memory_window): Renamed from this...
12295         (grub_vbe_bios_set_memory_window): ... to this.
12296         (grub_vbe_get_memory_window): Renamed from this...
12297         (grub_vbe_bios_get_memory_window): ... to this.
12298         (grub_vbe_set_scanline_length): Renamed from this...
12299         (grub_vbe_set_scanline_length): ... to this.
12300         (grub_vbe_get_scanline_length): Renamed from this...
12301         (grub_vbe_bios_get_scanline_length): ... to this.
12302         (grub_vbe_set_display_start): Renamed from this...
12303         (grub_vbe_bios_set_display_start): ... to this.
12304         (grub_vbe_get_display_start): Renamed from this...
12305         (grub_vbe_bios_get_display_start): ... to this.
12306         (grub_vbe_set_palette_data): Renamed from this...
12307         (grub_vbe_bios_set_palette_data): ... to this.
12308         (grub_vbe_bios_get_controller_info): Fixed problem with registers
12309         getting corrupted after calling it.  Added more pushes and pops.
12310         (grub_vbe_bios_set_mode): Likewise.
12311         (grub_vbe_bios_get_mode): Likewise.
12312         (grub_vbe_bios_get_memory_window): Likewise.
12313         (grub_vbe_bios_set_scanline_length): Likewise.
12314         (grub_vbe_bios_get_scanline_length): Likewise.
12315         (grub_vbe_bios_get_display_start): Likewise.
12316         (grub_vbe_bios_set_palette_data): Likewise.
12318         * normal/cmdline.c (cl_set_pos): Refresh the screen.
12319         (cl_insert): Likewise.
12320         (cl_delete): Likewise.
12322         * term/gfxterm.c: New file.
12324         * term/i386/pc/vesafb.c: Removed file.
12326         * video/video.c: New file.
12328         * video/i386/pc/vbe.c (real2pm): Added new function.
12329         (grub_video_vbe_draw_pixel): Likewise.
12330         (grub_video_vbe_get_video_ptr): Likewise.
12331         (grub_video_vbe_get_pixel): Likewise
12332         (grub_video_vbe_init): Likewise.
12333         (grub_video_vbe_fini): Likewise.
12334         (grub_video_vbe_setup): Likewise.
12335         (grub_video_vbe_get_info): Likewise.
12336         (grub_video_vbe_set_palette): Likewise.
12337         (grub_video_vbe_get_palette): Likewise.
12338         (grub_video_vbe_set_viewport): Likewise.
12339         (grub_video_vbe_get_viewport): Likewise.
12340         (grub_video_vbe_map_color): Likewise.
12341         (grub_video_vbe_map_rgb): Likewise.
12342         (grub_video_vbe_map_rgba): Likewise.
12343         (grub_video_vbe_unmap_color): Likewise.
12344         (grub_video_vbe_fill_rect): Likewise.
12345         (grub_video_vbe_blit_glyph): Likewise.
12346         (grub_video_vbe_blit_bitmap): Likewise.
12347         (grub_video_vbe_blit_render_target): Likewise.
12348         (grub_video_vbe_scroll): Likewise.
12349         (grub_video_vbe_swap_buffers): Likewise.
12350         (grub_video_vbe_create_render_target): Likewise.
12351         (grub_video_vbe_delete_render_target): Likewise.
12352         (grub_video_vbe_set_active_render_target): Likewise.
12353         (grub_vbe_set_pixel_rgb): Remove function.
12354         (grub_vbe_set_pixel_index): Likewise.
12355         (index_color_mode): Remove static variable.
12356         (active_mode): Likewise.
12357         (framebuffer): Likewise.
12358         (bytes_per_scan_line): Likewise.
12359         (grub_video_vbe_adapter): Added new static variable.
12360         (framebuffer): Likewise.
12361         (render_target): Likewise.
12362         (initial_mode): Likewise.
12363         (mode_in_use): Likewise.
12364         (mode_list): Likewise.
12366 2006-03-10  Marco Gerards  <marco@gnu.org>
12368         * configure.ac (AC_INIT): Bumped to 1.93.
12370         * DISTLIST: Added `include/grub/hfs.h'.
12372 2006-02-01  Yoshinori K. Okuji  <okuji@enbug.org>
12374         * boot/i386/pc/boot.S (general_error): Before looping, try INT
12375         18H, which might help the BIOS falling back to next boot media.
12377 2006-01-25  Yoshinori K. Okuji  <okuji@enbug.org>
12379         * util/i386/pc/grub-install.in: Escape a backslash. Reported by
12380         Poe Chen <poe.poechen@gmail.com>.
12382 2006-01-17  Marco Gerards  <marco@gnu.org>
12384         * include/grub/normal.h: Include <grub/script.h>.
12385         (grub_command_list): Removed struct.
12386         (grub_command_list_t): Removed type.
12387         (grub_menu_entry): Remove members `num' and `command_list'.  Add
12388         members `commands' and `sourcecode'.
12389         * include/grub/script.h: Add inclusion guards.
12390         (grub_script_cmd_menuentry): New struct.
12391         (grub_script_execute_menuentry): New prototype.
12392         (grub_script_lexer_record_start): Likewise.
12393         (grub_script_lexer_record_stop): Likewise.
12394         * normal/execute.c (grub_script_execute_menuentry): New function.
12395         * normal/lexer.c (record, recording, recordpos, recordlen): New
12396         variables.
12397         (grub_script_lexer_record_start): New function.
12398         (grub_script_lexer_record_stop): Likewise.
12399         (recordchar): Likewise.
12400         (nextchar): Likewise.
12401         (grub_script_yylex): Use `nextchar' to fetch new characters.  Use
12402         2048 as the buffer size.  Add the tokens `menuentry' and `@'.
12403         * normal/main.c: Include <grub/parser.h> and <grub/script.h>
12404         (current_menu): New variable.
12405         (free_menu): Mainly rewritten.
12406         (grub_normal_menu_addentry): New function.
12407         (read_config_file): Rewritten.
12408         * normal/menu.c (run_menu_entry): Mainly rewritten.
12409         * normal/menu_entry.c (make_screen): Rewritten the code to insert
12410         the menu entry.
12411         (run): Mainly rewritten.
12412         * normal/parser.y (menu_entry): New variable.
12413         (GRUB_PARSER_TOKEN_MENUENTRY): New token.
12414         (menuentry): New rule.
12415         (command): Add `menuentry'.
12416         (if_statement): Allow additional returns before `fi'.
12417         * normal/script.c (grub_script_create_cmdmenu): New function.
12419 2006-01-03  Marco Gerards  <marco@gnu.org>
12421         * INSTALL: GNU Bison is required.
12422         * configure.ac: Rewritten the test to detect Bison.
12423         * Makefile.in (YACC): New variable.  Reported by Xun Sun
12424         <xun.sun.cn@gmail.com>.
12426 2006-01-03  Marco Gerards  <marco@gnu.org>
12428         * fs/hfsplus.c (grub_hfsplus_read_block): Convert the offset of
12429         the HFS+ filesystem to filesystem blocks.
12430         (grub_hfsplus_iterate_dir): Cast the `fileinfo' assignment so a
12431         GCC warning is silenced.
12433 2006-01-03  Marco Gerards  <marco@gnu.org>
12435         * partmap/apple.c (apple_partition_map_iterate): Convert the data
12436         read from disk from big endian to host byte order.
12438 2006-01-03  Hollis Blanchard  <hollis@penguinppc.org>
12440         * fs/hfs.c: Include <grub/hfs.h>.  Added reference to the official
12441         documentation.
12442         (GRUB_HFS_EMBED_HFSPLUS_SIG): New macro.
12443         (grub_hfs_mount): Grammar fix in error. Make sure this is not an
12444         embedded HFS+ filesystem.
12445         (GRUB_HFS_MAGIC, grub_hfs_extent, grub_hfs_datarecord_t)
12446         (grub_hfs_sblock): Move from here...
12447         * include/grub/hfs.h: To here...  New file.
12448         * fs/hfsplus.c: Include <grub/hfs.h>.  Added reference to the official
12449         documentation.
12450         (GRUB_HFSPLUS_MAGIC, GRUB_HFSPLUSX_MAGIC, GRUB_HFSPLUS_SBLOCK):
12451         New macros.
12452         (grub_hfsplus_volheader): Change type of member `magic' to
12453         `grub_uint16_t'.
12454         (grub_hfsplus_data): Add new member `embedded_offset'.
12455         (grub_hfsplus_read_block): Add the HFS+ wrapper offset to the
12456         returned block.
12457         (grub_hfsplus_mount): Read the HFS+ wrapper if it exists.
12458         Calculate the offset.
12460 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
12462         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRP_ADDR):
12463         Removed.
12464         (GRUB_BOOT_MACHINE_DRP_SIZE): Likewise.
12466 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
12468         * kern/env.c (grub_env_set): Check if ENV->VALUE instead of
12469         ENV->NAME is NULL after allocating ENV->VALUE.
12471 2005-12-25  Marco Gerards  <marco@gnu.org>
12473         * kern/env.c (grub_env_set): Rewritten the error handling code.
12475 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
12477         * geninit.sh: Made more robust, and more portable.
12479 2005-12-25  Marco Gerards  <marco@gnu.org>
12481         Add support for Apple HFS+ filesystems.
12483         * fs/hfsplus.c: New file.
12485         * DISTLIST: Added `fs/hfsplus.c'.
12487         * conf/common.rmk (pkgdata_MODULES): Add `hfsplus.mod'.
12488         (hfsplus_mod_SOURCES): New variable.
12489         (hfsplus_mod_CFLAGS): Likewise.
12490         (hfsplus_mod_LDFLAGS): Likewise.
12491         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/hfsplus.c'.
12492         (grub_setup_SOURCES): Likewise.
12493         (grub_mkdevicemap_SOURCES): Likewise.
12494         (grub_emu_SOURCES): Likewise.
12495         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
12497         * fs/fshelp.c (grub_fshelp_log2blksize): New function.
12499         * include/grub/fshelp.h (grub_fshelp_log2blksize): new prototype.
12501 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
12503         * DISTLIST: Added geninitheader.sh, geninit.sh, commands/test.c,
12504         commands/i386/pc/play.c, conf/common.mk, conf/common.rmk,
12505         include/grub/parser.h, include/grub/script.h, kern/parser.c,
12506         kern/sparc64/cache.S, normal/execute.c, normal/function.c,
12507         normal/lexer.c, normal/parser.y, normal/script.c, and
12508         partmap/gpt.c.
12509         Removed kern/sparc64/cache.c.
12511         * conf/common.rmk (DISTCLEANFILES): Added grub_script.tab.c,
12512         grub_script.tab.h, grub_modules_init.lst, grub_modules_init.h,
12513         grub_emu_init.c.
12515         * configure.ac (AC_INIT): Bumped to 1.92.
12517 2005-12-24  Vesa Jaaskelainen  <chaac@nic.fi>
12519         * kern/err.c (grub_error_push): Added new function to support error
12520         stacks.
12521         (grub_error_pop): Likewise.
12522         (grub_error_stack_items): New local variable to support error stacks.
12523         (grub_error_stack_pos): Likewise.
12524         (grub_error_stack_assert): Likewise.
12525         (GRUB_ERROR_STACK_SIZE): Added new define to configure maximum error
12526         stack depth.
12527         (grub_print_error): Added support to print errors from error stack.
12529         * include/grub/err.h (grub_error_push): Added function prototype.
12530         (grub_error_pop): Likewise.
12532 2005-12-09  Hollis Blanchard  <hollis@penguinppc.org>
12534         * configure.ac: Accept `powerpc64' as host_cpu.
12535         (amd64): Rename to `biarch32'.
12537         * kern/powerpc/cache.S (grub_arch_sync_caches): Handle
12538         non-cacheline-aligned addresses.
12540         * kern/dl.c (grub_dl_load_core): Add grub_dprintf messages.
12541         (grub_dl_flush_cache): Likewise.  Only call `grub_arch_sync_caches'
12542         if `size' is non-zero.
12544 2005-12-03  Marco Gerards  <mgerards@xs4all.nl>
12546         * conf/common.rmk (grub_modules_init.lst): Use `-printf "%P\n"'
12547         and `cd' to make sure the filename is not prefixed with a
12548         directory name.
12549         (pkgdata_MODULES): Add `gpt.mod'.
12550         (gpt_mod_SOURCES): New variable.
12551         (gpt_mod_CFLAGS): Likewise.
12552         (gpt_mod_LDFLAGS): Likewise.
12554         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/gpt.c'.
12556         * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_GPT_DISK):
12557         New macro.
12559         * partmap/gpt.c: New file.
12561         * partmap/pc.c (pc_partition_map_iterate): Don't continue when a
12562         GPT partition map is detected.
12564 2005-12-03  Vincent Pelletier  <subdino2004@yahoo.fr>
12566         * commands/i386/pc/play.c: New file.
12567         * conf/i386-pc.rmk (pkgdata_MODULES): Added play.mod.
12568         (play_mod_SOURCES, play_mod_CFLAGS, play_mod_LDFLAGS): New
12569         macros.
12571 2005-11-27  Marco Gerards  <mgerards@xs4all.nl>
12573         * include/grub/dl.h (GRUB_MOD_INIT): Use `__attribute__
12574         ((unused))' to silence gcc warning.
12576 2005-11-26  Hollis Blanchard  <hollis@penguinppc.org>
12578         * configure.ac: Correct `AC_PROG_YACC' test.
12580 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
12582         * util/powerpc/ieee1275/grub-install.in: Run the mount point
12583         check before installing files.
12585 2005-11-22  Mike Small  <smallm@panix.com>
12587         * util/powerpc/ieee1275/grub-install.in (grubdir): Fixed partition
12588         number regex so multidigit numbers are recognized correctly.
12590 2005-11-22  Mike Small  <smallm@panix.com>
12592         * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Add a
12593         debugging message before attempting to claim memory.
12594         (grub_rescue_cmd_initrd): Add a claim debugging message and try
12595         multiple addresses in case of failure.
12597 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
12599         * term/tparm.c (get_space): Remove empty `if' statement.
12601         * fs/ufs.c (grub_ufs_find_file): Remove `grub_le_to_cpu32'.
12603         * kern/parser.c (check_varstate): Rename `state' to 's'.
12605 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
12607         * partmap/acorn.c: Change `unsigned' to `unsigned int'.  Move all
12608         variable definitions to the beginning of each function.  Sort stack
12609         variables by size.
12610         (find): Rename to `acorn_partition_map_find'.  Cast `grub_disk_read'
12611         `buf' argument to `char *'.
12613 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
12615         * conf/powerpc-ieee1275.rmk: Include conf/common.mk.
12616         (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
12617         minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
12618         hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
12619         help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
12620         sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
12621         configfile.mod, search.mod, gzio.mod and test.mod.
12622         (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
12623         (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
12624         (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
12625         (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
12626         (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
12627         (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
12628         (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
12629         (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
12630         (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
12631         (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
12632         (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
12633         (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
12634         (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
12635         (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
12636         (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
12637         (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
12638         (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
12639         (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
12640         (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
12641         (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
12642         (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
12643         (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
12644         (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Removed.
12646         * conf/common.mk (grub_modules_init.lst): Use `find' instead of
12647         `grep --include'.
12648         (pkgdata_MODULES): Add test.mod.
12650 2005-11-18  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
12652         * genmk.rb: Fixed list rules moved to Makefile.in.  Recognise
12653         appending to variables with "+=".
12654         (PModule): Use full pathname to generate *.lst filenames.
12656         * Makefile.in: Fixed list rules moved from genmk.rb.
12657         (.DELETE_ON_ERROR): New special target.
12658         (RMKFILES): Add common.rmk and sparc64-ieee1275.rmk.
12660         * conf/i386-pc.rmk: Include conf/common.mk.
12661         (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
12662         minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
12663         hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
12664         help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
12665         sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
12666         configfile.mod, search.mod, gzio.mod and test.mod.
12667         (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
12668         (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
12669         (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
12670         (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
12671         (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
12672         (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
12673         (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
12674         (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
12675         (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
12676         (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
12677         (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
12678         (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
12679         (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
12680         (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
12681         (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
12682         (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
12683         (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
12684         (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
12685         (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
12686         (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
12687         (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
12688         (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
12689         (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Move from
12690         here...
12691         * conf/common.rmk: ... to here.  New file.
12693         * conf/common.mk: New file.
12695 2005-11-18  Yoshinori K. Okuji  <okuji@enbug.org>
12697         * conf/powerpc-ieee1275.rmk (grub_script.tab.h): Unified to ...
12698         (grub_script.tab.c): ... here.
12700         * conf/sparc64-ieee1275.rmk (grub_script.tab.h): Unified to ...
12701         (grub_script.tab.c): ... here.
12703         * conf/i386-pc.rmk (grub_script.tab.h): Unified to ...
12704         (grub_script.tab.c): ... here.
12706         * normal/command.c (grub_command_find): Fixed a memory leak of
12707         MODULE_NAME. Reported by Mike Small <smallm@panix.com>.
12709 2005-11-13  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
12711         * include/grub/symbol.h: (FUNCTION): Use double quotes instead of
12712         "@" which marks the start of a comment on ARM.
12713         (VARIABLE): Likewise.
12715 2005-11-13  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
12717         Add support for Linux/ADFS partition tables.
12719         * partmap/acorn.c: New file.
12721         * include/grub/acorn_filecore.h: Likewise.
12723         * DISTLIST: Added `partmap/acorn.c' and
12724         `include/grub/acorn_filecore.h'.
12726         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
12727         `partmap/acorn.c'.
12728         (pkgdata_MODULES): Add `acorn.mod'.
12729         (acorn_mod_SOURCES): New variable.
12730         (acorn_mod_CFLAGS): Likewise.
12732         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
12733         `partmap/acorn.c'.
12734         (pkgdata_MODULES): Add `acorn.mod'.
12735         (acorn_mod_SOURCES): New variable.
12736         (acorn_mod_CFLAGS): Likewise.
12738         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/acorn.c'.
12739         (pkgdata_MODULES): Add `acorn.mod'.
12740         (acorn_mod_SOURCES): New variable.
12741         (acorn_mod_CFLAGS): Likewise.
12742         (acorn_mod_LDFLAGS): Likewise.
12744         * include/types.h (grub_disk_addr_t): New typedef.
12746 2005-11-13  Marco Gerards  <mgerards@xs4all.nl>
12748         * geninit.sh: New file.
12750         * geninitheader.sh: Likewise.
12752         * commands/boot.c (grub_boot_init, grub_boot_fini): Removed.
12753         * commands/cat.c (grub_cat_init, grub_cat_fini): Likewise.
12754         * commands/cmp.c (grub_cmp_init, grub_cmp_fini): Likewise.
12755         * commands/configfile.c (grub_configfile_init)
12756         (grub_configfile_fini): Likewise.
12757         * commands/default.c (grub_default_init, grub_default_fini):
12758         Likewise.
12759         * commands/help.c (grub_help_init, grub_help_fini): Likewise.
12760         * commands/ls.c (grub_ls_init, grub_ls_fini): Likewise.
12761         * commands/search.c (grub_search_init, grub_search_fini): Likewise.
12762         * commands/terminal.c (grub_terminal_init, grub_terminal_fini):
12763         Likewise.
12764         * commands/test.c (grub_test_init, grub_test_fini): Likewise.
12765         * commands/timeout.c (grub_timeout_init, grub_timeout_fini):
12766         Likewise.
12767         * commands/i386/pc/halt.c (grub_halt_init, grub_halt_fini): Likewise.
12768         * commands/ieee1275/halt.c (grub_halt_init, grub_halt_fini):
12769         Likewise.
12770         * commands/i386/pc/reboot.c (grub_reboot_init, grub_reboot_fini):
12771         Likewise.
12772         * commands/ieee1275/reboot.c (grub_reboot_init, grub_reboot_fini):
12773         Likewise.
12774         * disk/loopback.c (grub_loop_init, grub_loop_fini): Likewise.
12775         * fs/affs.c (grub_affs_init, grub_affs_fini): Likewise.
12776         * fs/ext2.c (grub_ext2_init, grub_ext2_fini): Likewise.
12777         * fs/fat.c (grub_fat_init, grub_fat_fini): Likewise.
12778         * fs/hfs.c (grub_hfs_init, grub_hfs_fini): Likewise.
12779         * fs/iso9660.c (grub_iso9660_init, grub_iso9660_fini): Likewise.
12780         * fs/jfs.c (grub_jfs_init, grub_jfs_fini): Likewise.
12781         * fs/minix.c (grub_minix_init, grub_minix_fini): Likewise.
12782         * fs/sfs.c (grub_sfs_init, grub_sfs_fini): Likewise.
12783         * fs/ufs.c (grub_ufs_init, grub_ufs_fini): Likewise.
12784         * fs/xfs.c (grub_xfs_init, grub_xfs_fini): Likewise.
12785         * normal/main.c (grub_normal_init, grub_normal_fini): Likewise.
12786         * partmap/amiga.c (grub_amiga_partition_map_init)
12787         (grub_amiga_partition_map_fini): Likewise.
12788         * partmap/apple.c (grub_apple_partition_map_init)
12789         (grub_apple_partition_map_fini): Likewise.
12790         * partmap/pc.c (grub_pc_partition_map_init)
12791         (grub_pc_partition_map_fini): Likewise.
12792         * partmap/sun.c (grub_sun_partition_map_init,
12793         grub_sun_partition_map_fini): Likewise.
12794         * term/terminfo.c (grub_terminal_init, grub_terminal_fini):
12795         Likewise.
12797         * util/grub-emu.c: Include <grub_modules_init.h>.
12798         (main): Don't initialize and de-initialize any modules directly,
12799         use `grub_init_all' and `grub_fini_all' instead.
12801         * term/i386/pc/vesafb.c (grub_vesafb_init): Renamed to
12802         `grub_vesafb_mod_init'.
12803         (grub_vesafb_fini): Renamed to `grub_vesafb_mod_fini'.  Updated
12804         all users.
12805         * term/i386/pc/vga.c (grub_vga_init): Renamed to
12806         `grub_vga_mod_init'.  Updated all users.
12807         (grub_vga_fini): Renamed to `grub_vga_mod_fini'.
12809         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `grub_emu_init.c'.
12810         (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c): New
12811         rules.
12813         * include/grub/dl.h (GRUB_MOD_INIT): Add argument `name'.
12814         Generate a function to initialize the module in utilities.
12815         Updated all callers.
12816         (GRUB_MOD_FINI): Add argument `name'.  Generate a function to
12817         initialize the module in utilities.  Updated all callers.
12819 2005-11-09  Hollis Blanchard  <hollis@penguinppc.org>
12821         * term/ieee1275/ofconsole.c (grub_ofconsole_cls): Use both the ANSI
12822         escape sequence and a literal ^L to clear the screen.
12824         * commands/ieee1275/suspend.c (grub_cmd_suspend): Clear the screen
12825         when returning from Open Firmware.
12827 2005-11-09  Hollis Blanchard  <hollis@penguinppc.org>
12829         * term/ieee1275/ofconsole.c (grub_ofconsole_width): New variable.
12830         (grub_ofconsole_height): Likewise.
12831         (grub_ofconsole_putchar): If `grub_curr_x' exceeds console width,
12832         manually insert a '\n'.
12833         (grub_ofconsole_getwh): Set and return `grub_ofconsole_width' and
12834         `grub_ofconsole_height'.  Return early if these are already set.
12836 2005-11-07  Vincent Pelletier  <subdino2004@yahoo.fr>
12838         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
12839         `commands/test.c', `fs/affs.c', `fs/sfs.c', `fs/xfs.c',
12840         `normal/execute.c', `normal/lexer.c', `io/gzio.c',
12841         `kern/parser.c', `grub_script.tab.c', `normal/function.c'
12842         and `normal/script.c'.
12843         (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
12844         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
12845         (test_mod_SOURCES): New variable.
12846         (test_mod_CFLAGS): Likewise.
12847         (test_mod_LDFLAGS): Likewise.
12848         (pkgdata_MODULES): Add `test.mod'.
12849         (grub_script.tab.c): New rule.
12850         (grub_script.tab.h): Likewise.
12852 2005-11-07  Marco Gerards  <mgerards@xs4all.nl>
12854         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
12855         `commands/test.c', `normal/execute.c', `normal/lexer.c',
12856         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
12857         (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
12858         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
12859         (test_mod_SOURCES): New variable.
12860         (test_mod_CFLAGS): Likewise.
12861         (pkgdata_MODULES): Add `test.mod'.
12862         (grub_script.tab.c): New rule.
12863         (grub_script.tab.h): Likewise.
12865 2005-11-06  Marco Gerards  <mgerards@xs4all.nl>
12867         Add initial scripting support.
12869         * commands/test.c: New file.
12870         * include/grub/script.h: Likewise.
12871         * normal/execute.c: Likewise.
12872         * normal/function.c: Likewise.
12873         * normal/lexer.c: Likewise.
12874         * normal/parser.y: Likewise.
12875         * normal/script.c: Likewise.
12877         * configure.ac: Add `AC_PROG_YACC' test.
12879         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/test.c',
12880         `normal/execute.c', `normal/lexer.c', `grub_script.tab.c',
12881         `normal/function.c' and `normal/script.c'.
12882         (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
12883         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
12884         (test_mod_SOURCES, test_mod_CFLAGS, test_mod_LDFLAGS): New
12885         variables.
12886         (pkgdata_MODULES): Add `test.mod'.
12887         (grub_script.tab.c): New rule.
12888         (grub_script.tab.h): Likewise.
12890         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TEST_FAILURE'.
12892         * include/grub/normal.h (grub_test_init): New prototype.
12893         (grub_test_fini): Likewise.
12895         * normal/command.c: Include <grub/script.h>.
12896         (grub_command_execute): Rewritten.
12898         * util/grub-emu.c (main): Call `grub_test_init' and
12899         `grub_test_fini'.
12901 2005-11-03  Hollis Blanchard  <hollis@penguinppc.org>
12903         * kern/powerpc/ieee1275/init.c (grub_get_rtc): Initialize `msecs'
12904         to 0.
12905         * term/ieee1275/ofconsole.c (grub_ofconsole_checkkey): Return -1 if
12906         there are no pending characters.
12908 2005-11-03  Hollis Blanchard  <hollis@penguinppc.org>
12910         * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_get_devname): Use
12911         `grub_strndup' to drop device arguments. Replace unnecessary
12912         `grub_strndup' with `grub_strdup'.
12914 2005-11-03  Hollis Blanchard  <hollis@penguinppc.org>
12916         * kern/term.c (grub_cls): Do not call grub_cur_term->cls() if the
12917         `debug' environment variable has been set.
12919 2005-11-02  Hollis Blanchard  <hollis@penguinppc.org>
12921         * Makefile.in (install-local): Use $(DATA).
12922         (uninstall): Likewise.
12923         * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Move grub-mkimage...
12924         (sbin_UTILITIES): ... to here.
12925         (sbin_SCRIPTS): New variable.
12926         (grub_install_SOURCES): New variable.
12927         * util/powerpc/ieee1275/grub-install.in: New file.
12928         * util/powerpc/ieee1275/grub-mkimage.c (kernel_path): Remove
12929         variable.
12930         (add_segments): Call `grub_util_get_path'.
12932 2005-10-28  Yoshinori K. Okuji  <okuji@enbug.org>
12934         From Timothy Baldwin:
12935         * commands/ls.c (grub_ls_list_files): Close FILE with
12936         grub_file_close.
12937         * kern/misc.c (grub_vsprintf): Terminate the string S with NUL.
12939 2005-10-24  Marco Gerards  <mgerards@xs4all.nl>
12941         * include/grub/parser.h: New file.
12943         * kern/parser.c: Likewise.
12945         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/parser.c'.
12946         (grub_setup_SOURCES): Likewise.
12947         (grub_probefs_SOURCES): Likewise.
12948         (grub_emu_SOURCES): Likewise.
12949         (kernel_img_HEADERS): Add `parser.h'.
12951         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
12952         (grub_emu_SOURCES): Add `kern/parser.c'.
12953         (grubof_SOURCES): Likewise.
12955         * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
12956         (grubof_SOURCES): Add `kern/parser.c'.
12958         * include/grub/misc.h (grub_split_cmdline): Removed prototype.
12960         * kern/misc.c (grub_split_cmdline): Removed function.
12962         * kern/rescue.c: Include <grub/parser.h>.
12963         (grub_enter_rescue_mode): Use `grub_parser_split_cmdline' instead
12964         of `grub_split_cmdline'.
12966         * normal/command.c: Include <grub/parser.h>.
12967         (grub_command_execute):  Use `grub_parser_split_cmdline' instead
12968         of `grub_split_cmdline'.
12970         * normal/completion.c: Include <grub/parser.h>.
12971         (cmdline_state): New variable.
12972         (iterate_dir): End the filename with a quote depending on the
12973         command line state.
12974         (get_state): new function.
12975         (grub_normal_do_completion): Use `grub_parser_split_cmdline' to
12976         split the arguments and determine the current argument.  When the
12977         argument string is not quoted, escape all spaces.
12979 2005-10-23  Vincent Pelletier  <subdino2004@yahoo.fr>
12981         * normal/sparc64/setjmp.S: New file.
12983 2005-10-23  Vincent Pelletier  <subdino2004@yahoo.fr>
12985         * include/grub/sparc64/libgcc.h: New file.
12986         * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Remove -Av9.
12987         (normal_mod_SOURCES): Use normal/sparc64/setjmp.S instead of
12988         normal/sparc64/setjmp.c.
12990 2005-10-23  Vincent Pelletier  <subdino2004@yahoo.fr>
12992         * kern/sparc64/dl.c: Rewritten for SPARCV9 ELF.
12993         * kern/sparc64/cache.S: New file.
12994         * kern/sparc64/cache.c: Removed.
12995         * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Add -Av9.
12996         (COMMON_CFLAGS): Add -mno-app-regs.  Remove -mcpu=v9 and
12997         -mtune=ultrasparc.
12998         (COMMON_LDFLAGS): Add -melf64_sparc.
12999         (grubof_HEADERS): Add sparc64/libgcc.h and machine/kernel.h.
13000         (grubof_SOURCES): Use cache.S instead of cache.c.
13001         (grubof_LDFLAGS): Add -mno-app-regs.  Replace "-Xlinker
13002         --oformat -Xlinker elf64-sparc" by "-Bstatic,-melf64_sparc".
13003         (pkgdata_MODULES): Uncomment. Leave linux.mod and _linux.mod
13004         commented though.
13005         (normal_mod_SOURCES): Add normal/completion.c and normal/misc.c.
13006         (_linux_mod_SOURCES, _linux_mod_CFLAGS, linux_mod_SOURCES)
13007         (linux_mod_CFLAGS): Commented out.
13008         (_linux_mod_LDFLAGS, linux_mod_LDFLAGS): New macro, commented
13009         out because module isn't built.
13010         (fshelp_mod_LDFLAGS, fat_mod_LDFLAGS, ext2_mod_LDFLAGS)
13011         (ufs_mod_LDFLAGS, minix_mod_LDFLAGS, hfs_mod_LDFLAGS)
13012         (jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS, normal_mod_LDFLAGS)
13013         (hello_mod_LDFLAGS, boot_mod_LDFLAGS, terminal_mod_LDFLAGS)
13014         (ls_mod_LDFLAGS, cmp_mod_LDFLAGS, cat_mod_LDFLAGS)
13015         (font_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
13016         (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
13017         (suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS)
13018         (help_mod_LDFLAGS, default_mod_LDFLAGS, timeout_mod_LDFLAGS)
13019         (configfile_mod_LDFLAGS, search_mod_LDFLAGS, xfs_mod_SOURCES)
13020         (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
13021         (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
13022         (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, gzio_mod_SOURCES)
13023         (gzio_mod_CFLAGS, gzio_mod_LDFLAGS): New macro.
13025 2005-10-20  Yoshinori K. Okuji  <okuji@enbug.org>
13027         * util/i386/pc/grub-probefs.c (main): Call grub_xfs_init and
13028         grub_xfs_fini. Do not call grub_hfs_init or grub_hfs_fini any
13029         longer, because HFS should not be used on PC.
13031 2005-10-20  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
13033         * io/gzio.c (grub_gzio_read): Use OFFSET instead of FILE->OFFSET
13034         consistently within the loop.
13036 2005-10-15  Marco Gerards  <mgerards@xs4all.nl>
13038         * fs/xfs.c (grub_xfs_iterate_dir): Detect an error if part of a
13039         directory can not be read.
13041 2005-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
13043         * configure.ac (AC_INIT): Increase the version number to 1.91.
13045         * DISTLIST: Added include/grub/terminfo.h, include/grub/tparm.h,
13046         include/grub/i386/pc/serial.h, term/terminfo.c, term/tparm.c and
13047         term/i386/pc/serial.c.
13049 2005-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
13051         * kern/file.c (grub_file_seek): Seeking to an offset equal to a
13052         file size must be permitted.
13054         * kern/i386/pc/startup.S (multiboot_trampoline): Fix a mistake
13055         between %ah and %al.
13057 2005-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
13059         * fs/xfs.c (grub_xfs_iterate_dir): Change the type of BLK to
13060         grub_uint64_t.
13061         Call the hook with a NUL-terminated filename.
13062         (grub_xfs_mount): Use grub_be_to_cpu32 instead of
13063         grub_cpu_to_be32.
13065         * kern/term.c (cursor_state): New variable.
13066         (grub_term_set_current): Reset the cursor state on a new
13067         terminal.
13068         (grub_setcursor): Rewritten to use CURSOR_STATE.
13069         (grub_getcursor): New function.
13071         * include/grub/term.h (grub_getcursor): New prototype.
13073         * io/gzio.c (test_header): Align BUF for accessing it as 32-bit
13074         integers on ARM. Reported by Timothy Baldwin
13075         <T.E.Baldwin99@members.leeds.ac.uk>.
13077 2005-10-11  Marco Gerards  <mgerards@xs4all.nl>
13079         * fs/sfs.c (grub_sfs_open): Don't free `data->label' if it is not
13080         allocated.
13081         (grub_sfs_dir): Likewise.
13083 2005-10-09  Marco Gerards  <mgerards@xs4all.nl>
13085         Add support for the SFS filesystem.
13087         * fs/sfs.c: New file.
13089         * DISTLIST: Added `fs/sfs.c'.
13091         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/sfs.c'.
13092         (grub_probefs_SOURCES): Likewise.
13093         (grub_emu_SOURCES): Likewise.
13094         (pkgdata_MODULES): Add `sfs.mod'.
13095         (sfs_mod_SOURCES): New variable.
13096         (sfs_mod_CFLAGS): Likewise.
13097         (sfs_mod_LDFLAGS): Likewise.
13099         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/sfs.c'.
13100         (pkgdata_MODULES): Add `sfs.mod'.
13101         (sfs_mod_SOURCES): New variable.
13102         (sfs_mod_CFLAGS): Likewise.
13104         * util/grub-emu.c (main): Call `grub_sfs_init' and
13105         `grub_sfs_fini'.
13107         * include/grub/fs.h (grub_sfs_init): New prototype.
13108         (grub_sfs_fini): Likewise.
13110 2005-10-07  Marco Gerards  <mgerards@xs4all.nl>
13112         Add support for the AFFS filesystem.
13114         * fs/affs.c: New file.
13116         * DISTLIST: Added `fs/affs.c'.
13118         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/affs.c'.
13119         (grub_probefs_SOURCES): Likewise.
13120         (grub_emu_SOURCES): Likewise.
13121         (pkgdata_MODULES): Add `affs.mod'.
13122         (affs_mod_SOURCES): New variable.
13123         (affs_mod_CFLAGS): Likewise.
13124         (affs_mod_LDFLAGS): Likewise.
13126         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/affs.c'.
13127         (pkgdata_MODULES): Add `affs.mod'.
13128         (affs_mod_SOURCES): New variable.
13129         (affs_mod_CFLAGS): Likewise.
13131         * util/grub-emu.c (main): Call `grub_affs_init' and
13132         `grub_affs_fini'.
13134         * include/grub/fs.h (grub_affs_init): New prototype.
13135         (grub_affs_fini): Likewise.
13137 2005-10-01  Marco Gerards  <mgerards@xs4all.nl>
13139         * fs/xfs.c (grub_xfs_iterate_dir): Add parentheses.
13141 2005-10-01  Marco Gerards  <mgerards@xs4all.nl>
13143         * configure.ac: Accept `x86_64' as host_cpu.  In that case add
13144         `-m32' to CFLAGS.
13146         * genmk.rb (class PModule): Always use `$(#{prefix}_LDFLAGS)' when
13147         linking.
13149         * conf/i386-pc.rmk (COMMON_CFLAGS): Add `-m32'.
13150         (COMMON_LDFLAGS): New variable.
13151         (kernel_img_LDFLAGS): Include `COMMON_FLAGS'.
13152         (_chain_mod_LDFLAGS, fshelp_mod_LDFLAGS, fat_mod_LDFLAGS)
13153         (ext2_mod_LDFLAGS, ufs_mod_LDFLAGS, minix_mod_LDFLAGS)
13154         (hfs_mod_LDFLAGS, jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS)
13155         (xfs_mod_LDFLAGS, _linux_mod_LDFLAGS, linux_mod_LDFLAGS)
13156         (normal_mod_LDFLAGS, hello_mod_LDFLAGS, boot_mod_LDFLAGS)
13157         (terminal_mod_LDFLAGS, ls_mod_LDFLAGS, cmp_mod_LDFLAGS)
13158         (cat_mod_LDFLAGS, help_mod_LDFLAGS, reboot_mod_LDFLAGS)
13159         (halt_mod_LDFLAGS, vga_mod_LDFLAGS, font_mod_LDFLAGS)
13160         (terminfo_mod_LDFLAGS, serial_mod_LDFLAGS, _multiboot_mod_LDFLAGS)
13161         (multiboot_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
13162         (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
13163         (default_mod_LDFLAGS, timeout_mod_LDFLAGS, configfile_mod_LDFLAGS)
13164         (vbe_mod_LDFLAGS, vesafb_mod_LDFLAGS, vbeinfo_mod_LDFLAGS)
13165         (vbetest_mod_LDFLAGS, search_mod_LDFLAGS, gzio_mod_LDFLAGS): New
13166         variables.
13167         (normal_mod_ASFLAGS): Add `-m32'.
13169         * include/grub/types.h (grub_host_addr_t, grub_host_off_t)
13170         (grub_host_size_t, grub_host_ssize_t): New types.
13171         (grub_addr_t, grub_off_t, grub_size_t, grub_ssize_t): Make type
13172         dependent of `GRUB_CPU_SIZEOF_VOID_P' instead on
13173         `GRUB_HOST_SIZEOF_VOID_P'.
13175         * include/grub/kernel.h (struct grub_module_header): Type of
13176         member offset changed to `grub_host_off_t'.  Type of member size
13177         changed to `grub_host_size_t'.
13178         (struct grub_module_info): Type of member offset changed to
13179         `grub_host_off_t'.  Type of member size changed to
13180         `grub_host_size_t'.
13182 2005-09-29  Yoshinori K. Okuji  <okuji@enbug.org>
13184         Make GRUB's kernel compliant to Multiboot Specification.
13186         * kern/i386/pc/startup.S (multiboot_header): New label.
13187         (multiboot_entry): Likewise.
13188         (multiboot_trampoline): Likewise.
13190         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
13191         Increased to 0x4A0.
13193         * fs/xfs.c (grub_xfs_iterate_dir): Fix a syntax error. You may not
13194         put parentheses after a question mark.
13195         [!GRUB_UTIL] (my_mod): New variable.
13197         * util/grub-emu.c (main): Call grub_xfs_init and grub_xfs_fini.
13199 2005-09-28  Marco Gerards  <mgerards@xs4all.nl>
13201         Adds support for the XFS filesystem.  Btrees are not supported
13202         yet.
13204         * fs/xfs.c: New file.
13206         * DISTLIST: Added `fs/xfs.c'.
13208         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/xfs.c'.
13209         (grub_probefs_SOURCES): Likewise.
13210         (grub_emu_SOURCES): Likewise.
13211         (pkgdata_MODULES): Add `xfs.mod'.
13212         (xfs_mod_SOURCES): New variable.
13213         (xfs_mod_CFLAGS): Likewise.
13215         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/xfs.c'.
13216         (pkgdata_MODULES): Add `xfs.mod'.
13217         (xfs_mod_SOURCES): New variable.
13218         (xfs_mod_CFLAGS): Likewise.
13220         * util/grub-emu.c (main): Call `grub_xfs_init' and
13221         `grub_xfs_fini'.
13223         * include/grub/fs.h (grub_xfs_init): New prototype.
13224         (grub_xfs_fini): Likewise.
13227 2005-09-18  Vesa Jaaskelainen  <chaac@nic.fi>
13229         * video/i386/pc/vbe.c (grub_vbe_set_video_mode): In indexed
13230         color modes, allow greater than 16 colors to be configured as
13231         a default palette.
13233 2005-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
13235         * normal/completion.c (complete_arguments): Add the qualifier
13236         const into OPTIONS.
13238         From Omniflux <omniflux+lists@omniflux.com>:
13239         * include/grub/terminfo.h: New file.
13240         * include/grub/tparm.h: Likewise.
13241         * include/grub/i386/pc/serial.h: Likewise.
13242         * term/terminfo.c: Likewise.
13243         * term/tparm.c: Likewise.
13244         * term/i386/pc/serial.c: Likewise.
13245         * conf/i386-pc.rmk (pkgdata_MODULES): Added terminfo.mod and
13246         serial.mod.
13247         (terminfo_mod_SOURCES): New variable.
13248         (terminfo_mod_CFLAGS): Likewise.
13249         (serial_mod_SOURCES): Likewise.
13250         (serial_mod_CFLAGS): Likewise.
13252 2005-08-31  Yoshinori K. Okuji  <okuji@enbug.org>
13254         * DISTLIST: Replaced boot/powerpc/ieee1275/crt0.S and
13255         boot/powerpc/ieee1275/cmain.c with kern/powerpc/ieee1275/crt0.S
13256         and kern/powerpc/ieee1275/cmain.c, respectively.
13258         * boot/powerpc/ieee1275/crt0.S: Moved to ...
13259         * kern/powerpc/ieee1275/crt0.S: ... here.
13261         * boot/powerpc/ieee1275/cmain.c: Moved to ...
13262         * kern/powerpc/ieee1275/cmain.c: ... here.
13264         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Use
13265         kern/powerpc/ieee1275/crt0.S and kern/powerpc/ieee1275/cmain.c
13266         instead of boot/powerpc/ieee1275/crt0.S and
13267         boot/powerpc/ieee1275/cmain.c, respectively.
13269         * boot/i386/pc/boot.S (lba_mode): Do not store the total number of
13270         sectors. It was not used anyway.
13272 2005-08-30  Hollis Blanchard  <hollis@penguinppc.org>
13274         * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): Fix
13275         `unused parameter' warning.
13277 2005-08-30  Hollis Blanchard  <hollis@penguinppc.org>
13279         * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): New
13280         function.
13281         (grub_ofconsole_term): Specify grub_ofconsole_getcharwidth as
13282         getcharwidth.
13284 2005-08-28  Marco Gerards  <metgerards@student.han.nl>
13286         * include/grub/normal.h (enum grub_completion_type): Added
13287         `GRUB_COMPLETION_TYPE_ARGUMENT'.
13289         * normal/cmdline.c (print_completion): Handle
13290         the `GRUB_COMPLETION_TYPE_ARGUMENT' type.
13291         * normal/menu_entry.c (store_completion): Likewise.
13293         * normal/completion.c (complete_arguments): New function.
13294         (grub_normal_do_completion): Call `complete_arguments' when the
13295         current words start with a dash.
13297 2005-08-27  Marco Gerards  <metgerards@student.han.nl>
13299         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Fix typo (use
13300         `gzio.mod' instead of `io.mod').
13302 2005-08-22  Yoshinori K. Okuji  <okuji@enbug.org>
13304         * gendistlist.sh (EXTRA_DISTFILES): Added genfslist.sh.
13305         (DISTDIRS): Added io and video.
13306         Rewrite the search routine to make an output consistently.
13308         * DISTLIST: Added conf/sparc64-ieee1275.mk,
13309         conf/sparc64-ieee1275.rmk, include/grub/gzio.h,
13310         include/grub/ieee1275/ieee1275.h, include/grub/ieee1275/ofdisk.h,
13311         io/gzio.c, kern/sparc64/cache.c, kern/sparc64/dl.c,
13312         kern/sparc64/ieee1275/init.c, kern/sparc64/ieee1275/openfw.c and
13313         util/powerpc/ieee1275/misc.c.
13315         * include/grub/gzio.h: New file.
13316         * io/gzio.c: Likewise.
13318         * kern/file.c (grub_file_close): Call grub_device_close only if
13319         FILE->DEVICE is not NULL.
13321         * include/grub/mm.h [!NULL] (NULL): New macro.
13323         * include/grub/err.h (GRUB_ERR_BAD_GZIP_DATA): New constant.
13325         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added io/gzip.c.
13326         (pkgdata_MODULES): Added gzio.mod.
13327         (gzio_mod_SOURCES): New variable.
13328         (gzio_mod_CFLAGS): Likewise.
13330         * conf/i386-pc.rmk (grub_emu_SOURCES): Added io/gzip.c.
13331         (pkgdata_MODULES): Added gzio.mod.
13332         (gzio_mod_SOURCES): New variable.
13333         (gzio_mod_CFLAGS): Likewise.
13335         * commands/cat.c: Include grub/gzio.h.
13336         (grub_cmd_cat): Use grub_gzfile_open instead of
13337         grub_file_open.
13339         * commands/cmp.c: Include grub/gzio.h.
13340         (grub_cmd_cmp): Use grub_gzfile_open instead of
13341         grub_file_open.
13343         * loader/i386/pc/multiboot.c: Include grub/gzio.h.
13344         (grub_rescue_cmd_multiboot): Use grub_gzfile_open instead of
13345         grub_file_open.
13346         (grub_rescue_cmd_module): Likewise.
13348 2005-08-21  Vincent Pelletier  <subdino2004@yahoo.fr>
13350         * conf/sparc64-ieee1275.rmk (grubof_SOURCES): The first file must be
13351         kern/sparc64/ieee1275/init.c because it contains _start.
13352         * conf/sparc64-ieee1275.mk: Generated from conf/sparc64-ieee1275.rmk.
13354 2005-08-21  Vincent Pelletier  <subdino2004@yahoo.fr>
13356         * configure.ac: Add support for sparc64 host with ieee1275
13357         firmware.
13358         * configure: Generated from configure.ac.
13359         * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Use grub_ssize_t
13360         instead of int.
13361         (grub_ofdisk_read): Likewise.
13362         (grub_ofdisk_open): Use %p to print pointer values, and cast the
13363         pointers as (void *) to remove a warning.
13364         (grub_ofdisk_close): Likewise.
13365         (grub_ofdisk_read): Likewise.
13366         * kern/ieee1275/ieee1275.c (grub_ieee1275_exit): This never
13367         returns, so make it return void to remove a warning.
13368         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_exit):
13369         Corresponding prototype change.
13370         * kern/mm.c (grub_mm_init_region): Use %p to print pointer
13371         values, and cast the pointers as (void *) to remove a warning.
13372         (grub_mm_dump): Likewise.
13373         * conf/sparc64-ieee1275.mk: New file.
13374         * conf/sparc64-ieee1275.rmk: Likewise.
13375         * include/grub/sparc64/setjmp.h: Likewise.
13376         * include/grub/sparc64/types.h: Likewise.
13377         * include/grub/sparc64/ieee1275/console.h: Likewise.
13378         * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
13379         * include/grub/sparc64/ieee1275/kernel.h: Likewise.
13380         * include/grub/sparc64/ieee1275/time.h: Likewise.
13381         * kern/sparc64/cache.c: Likewise.
13382         * kern/sparc64/dl.c: Likewise.
13383         * kern/sparc64/ieee1275/init.c: Likewise.
13384         * kern/sparc64/ieee1275/openfw.c: Likewise.
13386 2005-08-21  Yoshinori K. Okuji  <okuji@enbug.org>
13388         * util/console.c (grub_ncurses_putchar): If C is greater than
13389         0x7f, set C to a question mark.
13390         (grub_ncurses_getcharwidth): New function.
13391         (grub_ncurses_term): Specify grub_ncurses_getcharwidth as
13392         getcharwidth.
13394         * normal/menu.c (print_entry): Made aware of Unicode. First,
13395         convert TITLE to UCS-4, and predict the cursor position by
13396         grub_getcharwidth.
13398         * include/grub/misc.h (grub_utf8_to_ucs4): Specify the qualifier
13399         const to SRC.
13400         * kern/misc.c (grub_utf16_to_utf8): Likewise.
13402 2005-08-20  Yoshinori K. Okuji  <okuji@enbug.org>
13404         * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Specify
13405         the boot file by the option BOOT_IMAGE. Use grub_stpcpy instead of
13406         grub_strcat.
13408         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Specify the boot
13409         file by the option BOOT_IMAGE. Use grub_stpcpy instead of
13410         grub_strcpy and grub_strlen. Take it into account that a space
13411         character is inserted as a delimiter.
13413 2005-08-20  Yoshinori K. Okuji  <okuji@enbug.org>
13415         * partmap/pc.c (pc_partition_map_iterate): Include the value of an
13416         invalid magic in the error.
13418         * commands/search.c: New file.
13420         * util/grub-emu.c (main): Call grub_search_init and
13421         grub_search_fini.
13423         * kern/rescue.c (grub_rescue_print_disks): Removed.
13424         (grub_rescue_print_devices): New function.
13425         (grub_rescue_cmd_ls): Use grub_device_iterate with
13426         grub_rescue_print_devices instead of grub_disk_dev_iterate with
13427         grub_rescue_print_disks.
13429         * kern/partition.c (grub_partition_iterate): Return the result of
13430         PARTMAP->ITERATE instead of GRUB_ERRNO.
13432         * kern/device.c: Include grub/partition.h.
13433         (grub_device_iterate): New function.
13435         * include/grub/partition.h (grub_partition_iterate): Return int
13436         instead of grub_err_t.
13438         * include/grub/normal.h [GRUB_UTIL] (grub_search_init): New
13439         prototype.
13440         [GRUB_UTIL] (grub_search_fini): Likewise.
13442         * include/grub/device.h (grub_device_iterate): New prototype.
13444         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
13445         commands/search.c.
13446         (pkgdata_MODULES): Added search.mod.
13447         (search_mod_SOURCES): New variable.
13448         (search_mod_CFLAGS): Likewise.
13450         * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/search.c.
13451         (pkgdata_MODULES): Added search.mod.
13452         (search_mod_SOURCES): New variable.
13453         (search_mod_CFLAGS): Likewise.
13455         * commands/ls.c (grub_ls_list_disks): Renamed to ...
13456         (grub_ls_list_devices): ... this, and use grub_device_iterate.
13457         All callers changed.
13459         * DISTLIST: Added commands/search.c.
13461 2005-08-20  Yoshinori K. Okuji  <okuji@enbug.org>
13463         * kern/term.c (grub_putchar): Use grub_utf8_to_ucs4 for the
13464         conversion.
13465         (grub_getcharwidth): New function.
13467         * kern/misc.c (grub_utf8_to_ucs4): New function.
13469         * include/grub/term.h (struct grub_term): Added a new member
13470         "getcharwidth".
13471         (grub_getcharwidth): New prototype.
13473         * include/grub/misc.h (grub_utf8_to_ucs4): New prototype.
13475         * term/i386/pc/console.c (map_char): New function. Segregated from
13476         grub_console_putchar.
13477         (grub_console_putchar): Use map_char.
13478         (grub_console_getcharwidth): New function.
13479         (grub_console_term): Specified grub_console_getcharwidth as
13480         getcharwidth.
13482         * term/i386/pc/vga.c (grub_vga_getcharwidth): New function.
13483         (grub_vga_term): Specified grub_vga_getcharwidth as getcharwidth.
13485         * term/i386/pc/vesafb.c (grub_virtual_screen_setup): Return
13486         GRUB_ERRNO.
13487         (grub_vesafb_init): Do not use RC. Instead, use GRUB_ERRNO. Rely
13488         on grub_strtoul completely.
13489         (write_char): Declare local variables in the beginning of the
13490         function.
13491         (grub_vesafb_getcharwidth): New function.
13492         (grub_vesafb_term): Specified grub_vesafb_getcharwidth as
13493         getcharwidth.
13495 2005-08-19  Yoshinori K. Okuji  <okuji@enbug.org>
13497         * DISTLIST: Replace commands/i386/pc/vbe_list_modes.c and
13498         commands/i386/pc/vbe_test.c with commands/i386/pc/vbeinfo.c and
13499         commands/i386/pc/vbetest.c.
13501         * video/i386/pc/vbe.c (grub_vbe_probe): If INFOBLOCK is not NULL,
13502         call grub_vbe_get_controller_info again, because the returned
13503         information is volatile.
13504         (grub_vbe_set_video_mode): Mostly rewritten.
13505         (grub_vbe_get_video_mode): Use grub_vbe_probe and use
13506         grub_vbe_status_t correctly.
13507         (grub_vbe_get_video_mode_info): Likewise.
13508         (grub_vbe_set_pixel_rgb): Use a switch statement rather than
13509         several if statements.
13511         * commands/i386/pc/vbe_list_modes.c: Renamed to ...
13512         * commands/i386/pc/vbeinfo.c: ... this.
13514         * commands/i386/pc/vbe_test.c: Renamed to ...
13515         * commands/i386/pc/vbetest.c: ... this.
13517         * commands/i386/pc/vbeinfo.c (grub_cmd_vbe_list_modes): Renamed to
13518         ...
13519         (grub_cmd_vbeinfo): ... this. Save video modes before
13520         iterating. Skip a video mode, if it is not available, not enough
13521         information is given or it is monochrome. Show the memory
13522         model. Leave the interpretation of MODEVAR to grub_strtoul
13523         completely.
13524         (GRUB_MOD_INIT): Rename vbe_list_modes to vbeinfo.
13525         (GRUB_MOD_FINI): Likewise.
13527         * commands/i386/pc/vbetest.c (grub_cmd_vbe_test): Renamed to ...
13528         (grub_cmd_vbetest): ... this. Don't print unnecessarily. Use
13529         grub_err_t instead of grub_uint32_t. Don't use SPTR. Remove a
13530         duplicated grub_env_get. Leave the interpretation of MODEVAR to
13531         grub_strtoul completely.
13532         (real2pm): Removed.
13533         (GRUB_MOD_INIT): Rename vbe_test to vbetest.
13534         (GRUB_MOD_FINI): Likewise.
13536         * normal/misc.c: Include grub/mm.h.
13538         * conf/i386-pc.rmk (pkgdata_MODULES): Replaced vbe_test.mod and
13539         vbe_list_modes with vbetest.mod and vbeinfo.mod.
13540         (vbe_list_modes_mod_SOURCES): Removed.
13541         (vbe_list_modes_mod_CFLAGS): Likewise.
13542         (vbe_test_mod_SOURCES): Likewise.
13543         (vbe_test_mod_CFLAGS): Likewise.
13544         (vbeinfo_mod_SOURCES): New variable.
13545         (vbeinfo_mod_CFLAGS): Likewise.
13546         (vbetest_mod_SOURCES): Likewise.
13547         (vbetest_mod_CFLAGS): Likewise.
13549 2005-08-18  Yoshinori K. Okuji  <okuji@enbug.org>
13551         * normal/misc.c: New file.
13553         * DISTLIST: Added normal/misc.c.
13555         * partmap/amiga.c (amiga_partition_map_iterate): Add an argument
13556         DISK to HOOK. Call HOOK with DISK.
13557         * partmap/apple.c (apple_partition_map_iterate): Likewise.
13558         * partmap/pc.c (pc_partition_map_iterate): Likewise.
13559         * partmap/sun.c (sun_partition_map_iterate): Likewise.
13561         * normal/menu_entry.c (struct screen): Added a new member
13562         "completion_shown".
13563         (completion_buffer): New global variable.
13564         (make_screen): Set SCREEN->COMPLETION_SHOWN to zero.
13565         (store_completion): New function.
13566         (complete): Likewise.
13567         (clear_completions): Likewise.
13568         (grub_menu_entry_run): If SCREEN->COMPLETION_SHOWN is non-zero,
13569         call clear_completions and reset SCREEN->COMPLETION_SHOWN. If C is
13570         a tab, call complete.
13572         * normal/completion.c (disk_dev): Removed.
13573         (print_simple_completion): Likewise.
13574         (print_partition_completion): Likewise.
13575         (print_func): New global variable.
13576         (add_completion): Do not take the arguments WHAT or PRINT any
13577         longer. Added a new argument TYPE. Instead of printing directly,
13578         call PRINT_FUNC if not NULL.
13579         All callers changed.
13580         (complete_device): Use a local variable DEV instead of
13581         DISK_DEV. Do not move CURRENT_WORD to the end of a device name.
13582         (grub_normal_do_completion): Take a new argument HOOK. Do not
13583         initialize DISK_DEV. Initialize PRINT_FUNC to HOOK. If RET is an
13584         empty string, return NULL instead.
13585         All callers changed.
13587         * normal/cmdline.c (print_completion): New function.
13589         * kern/partition.c (grub_partition_iterate): Add an argument DISK
13590         to HOOK.
13591         All callers changed.
13593         * kern/disk.c (grub_print_partinfo): Removed.
13595         * include/grub/partition.h (struct grub_partition_map): Add a new
13596         argument DISK into HOOK of ITERATE.
13597         (grub_partition_iterate): Add a new argument DISK to HOOK.
13599         * include/grub/normal.h (enum grub_completion_type): New enum.
13600         (grub_completion_type_t): New type.
13601         (GRUB_COMPLETION_TYPE_COMMAND): New constant.
13602         (GRUB_COMPLETION_TYPE_DEVICE): Likewise.
13603         (GRUB_COMPLETION_TYPE_PARTITION): Likewise.
13604         (GRUB_COMPLETION_TYPE_FILE): Likewise.
13605         (grub_normal_do_completion): Added a new argument HOOK.
13606         (grub_normal_print_device_info): New prototype.
13608         * include/grub/disk.h (grub_print_partinfo): Removed.
13610         * conf/i386-pc.rmk (grub_emu_SOURCES): Added normal/misc.c.
13611         (normal_mod_SOURCES): Likewise.
13612         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
13613         (normal_mod_SOURCES): Likewise.
13615         * commands/ls.c (grub_ls_list_disks): Use
13616         grub_normal_print_device_info instead of grub_print_partinfo. Free
13617         PNAME.
13618         (grub_ls_list_files): Use grub_normal_print_device_info instead of
13619         duplicating the code.
13621 2005-08-16  Vesa Jaaskelainen  <chaac@nic.fi>
13623         * commands/i386/pc/vbe_list_modes.c: Update source formatting to
13624         follow GCS more precisely.
13625         * commands/i386/pc/vbe_test.c: Likewise.
13626         * include/grub/i386/pc/vbe.h: Likewise.
13627         * term/i386/pc/vesafb.c: Likewise.
13628         * video/i386/pc/vbe.c: Likewise.
13630 2005-08-16  Vesa Jaaskelainen  <chaac@nic.fi>
13632         * DISTLIST: Added term/i386/pc/vesafb.c
13633         DISTLIST: Added video/i386/pc/vbe.c
13634         DISTLIST: Added commands/i386/pc/vbe_list_modes.c.
13635         DISTLIST: Added commands/i386/pc/vbe_test.c.
13636         * commands/i386/pc/vbe_list_modes.c: New file.
13637         * commands/i386/pc/vbe_test.c: Likewise.
13638         * term/i386/pc/vesafb.c: Likewise.
13639         * video/i386/pc/vbe.c: Likewise.
13640         * include/grub/i386/pc/vbe.h (GRUB_VBE_DEFAULT_VIDEO_MODE): Added define.
13641         (grub_vbe_probe) Added prototype.
13642         (grub_vbe_set_video_mode) Likewise.
13643         (grub_vbe_get_video_mode) Likewise.
13644         (grub_vbe_get_video_mode_info) Likewise.
13645         (grub_vbe_set_pixel_rgb) Likewise.
13646         (grub_vbe_set_pixel_index) Likewise.
13647         * conf/i386-pc.rmk (pkgdata_MODULES): Added vbe.mod.
13648         (pkgdata_MODULES): Added vesafb.mod.
13649         (pkgdata_MODULES): Added vbe_list_modes.mod.
13650         (pkgdata_MODULES): Added vbe_test.mod.
13651         (vbe_mod_SOURCES): Added.
13652         (vbe_mod_CFLAGS): Likewise.
13653         (vesafb_mod_SOURCES): Likewise.
13654         (vesafb_mod_CFLAGS): Likewise.
13655         (vbe_list_modes_mod_SOURCES): Likewise.
13656         (vbe_list_modes_mod_CFLAGS): Likewise.
13657         (vbe_test_mod_SOURCES): Likewise.
13658         (vbe_test_mod_CFLAGS): Likewise.
13660 2005-08-14  Yoshinori K. Okuji  <okuji@enbug.org>
13662         * normal/command.c (grub_command_execute): If INTERACTIVE is
13663         false and GRUB_COMMAND_FLAG_NO_ECHO is not specified, print
13664         CMDLINE. Disable the pager if INTERACTIVE is true.
13665         All callers are changed.
13667         * normal/main.c (grub_normal_execute): Read command.lst and fs.lst
13668         before reading a config file.
13669         * normal/main.c (read_config_file): Even if a command is not
13670         found, register it if it is within an entry.
13672         * util/grub-emu.c: Include sys/types.h and unistd.h.
13673         (options): Added --hold.
13674         (struct arguments): Added a new member "hold".
13675         (parse_opt): If KEY is 'H', set ARGS->HOLD to ARG or -1 if ARG is
13676         missing.
13677         (main): Initialize ARGS.HOLD to zero. Wait until ARGS.HOLD is
13678         cleared by a debugger, if it is not zero.
13680         * include/grub/normal.h (grub_command_execute): Add an argument
13681         INTERACTIVE.
13683 2005-08-14  Vesa Jaaskelainen  <chaac@nic.fi>
13685         * DISTLIST: Added include/grub/i386/pc/vbe.h.
13687 2005-08-13  Yoshinori K. Okuji  <okuji@enbug.org>
13689         * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Replace the test
13690         program with another one, because the old one didn't detect a bug
13691         in gcc-3.4. Always use regparm 2, because the new test is still
13692         not enough for gcc-4.0. Someone must investigate a simple test
13693         case which detects a bug in gcc-4.0.
13695 2005-08-12  Yoshinori K. Okuji  <okuji@enbug.org>
13697         * DISTLIST: Added normal/completion.c.
13699         * normal/completion.c: New file.
13701         * term/i386/pc/console.c (grub_console_getwh): New function.
13702         (grub_console_term): Assign grub_console_getwh to getwh.
13704         * normal/cmdline.c (grub_tab_complete): Removed. Now the same
13705         function is defined in normal/completion.c as
13706         grub_normal_do_completion.
13707         (grub_cmdline_get): Use grub_normal_do_completion instead of
13708         grub_tab_complete.
13710         * kern/partition.c (grub_partition_map_iterate): Return 1 if HOOK
13711         returns non-zero, otherwise return 0.
13712         (grub_partition_iterate): First, probe the partition map. Then,
13713         call ITERATE only for this partition map.
13715         * kern/misc.c (grub_strncmp): Rewritten.
13717         * kern/disk.c (grub_disk_dev_iterate): Return 1 if P->ITERATE
13718         returns non-zero. Otherwise return 0.
13720         * include/grub/partition.h (grub_partition_map_iterate): Return
13721         int instead of void.
13723         * include/grub/normal.h (grub_normal_do_completion): New prototype.
13725         * include/grub/misc.h (grub_strncmp): Change the type of N to
13726         grub_size_t.
13728         * include/grub/disk.h (grub_disk_dev_iterate): Return int instead
13729         of void.
13731         * normal/menu.c (draw_border): Cast GRUB_TERM_BORDER_WIDTH to
13732         unsigned explicitly before comparing it with I.
13734         * kern/main.c (grub_env_write_root): Add the attribute unused into
13735         VAR.
13737         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
13738         normal/completion.c.
13739         (normal_mod_SOURCES): Likewise.
13740         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
13741         (normal_mod_SOURCES): Likewise.
13743         * normal/command.c (grub_iterate_commands): If ITERATE returns
13744         non-zero, return one immediately.
13746 2005-08-09  Vesa Jaaskelainen  <chaac@nic.fi>
13748         * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vbe.h.
13749         * kern/i386/pc/startup.S: Updated Global Descriptor table's
13750         descriptions.
13751         (grub_vbe_get_controller_info): New function.
13752         (grub_vbe_get_mode_info): Likewise.
13753         (grub_vbe_set_mode): Likewise.
13754         (grub_vbe_get_mode): Likewise.
13755         (grub_vbe_set_memory_window): Likewise.
13756         (grub_vbe_get_memory_window): Likewise.
13757         (grub_vbe_set_scanline_length): Likewise.
13758         (grub_vbe_get_scanline_length): Likewise.
13759         (grub_vbe_set_display_start): Likewise.
13760         (grub_vbe_get_display_start): Likewise.
13761         (grub_vbe_set_palette_data): Likewise.
13762         * include/grub/i386/pc/vbe.h: New file.
13764 2005-08-08  Hollis Blanchard  <hollis@penguinppc.org>
13766         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
13767         kern/ieee1275/of.c with kern/ieee1275/ieee1275.c.
13768         * DISTLIST: Likewise.
13769         * kern/ieee1275/of.c: Moved to ...
13770         * kern/ieee1275/ieee1275.c: ... here.
13772 2005-08-08  Hollis Blanchard  <hollis@penguinppc.org>
13774         * term/ieee1275/ofconsole.c: Include <grub/mm.h>.
13775         (grub_ofconsole_getwh): Cast -1 to type grub_ieee1275_ihandle_t.
13776         Pass 0 as `end' parameter to grub_strtoul().
13778 2005-08-08  Hollis Blanchard  <hollis@penguinppc.org>
13780         * include/grub/powerpc/ieee1275/console.h: Do not include
13781         <grub/types.h>.  Do not include <grub/symbol.h>.  Remove ASM_FILE
13782         ifdef.
13783         (grub_console_cur_color): Remove i386-specific prototype.
13784         (grub_console_real_putchar): Likewise.
13785         (grub_console_checkkey): Likewise.
13786         (grub_console_getkey): Likewise.
13787         (grub_console_getxy): Likewise.
13788         (grub_console_gotoxy): Likewise.
13789         (grub_console_cls): Likewise.
13790         (grub_console_setcursor): Likewise.
13791         * kern/powerpc/ieee1275/init.c: Don't include <grub/console.h>.
13792         Include <grub/machine/console.h>.
13793         * term/ieee1275/ofconsole.c: Likewise.
13795 2005-08-08  Yoshinori K. Okuji  <okuji@enbug.org>
13797         * Makefile.in (LIBLZO): New variable.
13799         * configure.ac: Check for LZO version 2.
13801         * util/i386/pc/grub-mkimage.c [HAVE_LZO_LZO1X_H]: Include
13802         lzo/lzo1x.h instead of lzo1x.h.
13804         * conf/i386-pc.rmk (grub_mkimage_LDFLAGS): Use $(LIBLZO) instead
13805         of -llzo.
13807         * util/i386/pc/grub-setup.c (main): Do not free PREFIX
13808         twice. Reported by Vladimir Serbinenko <phcoder@gmail.com>.
13810         * partmap/pc.c (pc_partition_map_probe): Restore P->DATA after
13811         copying the data from PARTITION to P.
13813 2005-08-07  Yoshinori K. Okuji  <okuji@enbug.org>
13815         * kern/rescue.c (grub_rescue_cmd_rmmod): If the reference count is
13816         negative, unload the module.
13818         * util/i386/pc/grub-setup.c (setup): The name of the PC partition
13819         map is "pc_partition_map" but not "pc".
13820         (usage): Fix the description. The options are --boot-image and
13821         --core-image but not --boot-file or --core-file.
13822         (main): If not specified explicitly, make BOOT_FILE and CORE_FILE
13823         based on DEFAULT_BOOT_FILE and DEFAULT_CORE_FILE with DIR or
13824         DEFAULT_DIRECTORY.
13826         * util/i386/pc/grub-install.in: Do not specify --boot-file or
13827         --core-file. Specify INSTALL_DEVICE as an argument.
13829         * util/console.c: Include config.h.
13830         [HAVE_NCURSeS_CURSES_H]: Include ncurses/curses.h.
13831         [HAVE_NCURSES_H]: Include ncurses.h.
13832         [HAVE_CURSES_H]: Include curses.h.
13833         [!A_NORMAL] (A_NORMAL): Defined as zero.
13834         [!A_STANDOUT] (A_STANDOUT): Likewise.
13836         * conf/i386-pc.rmk (grub_emu_LDFLAGS): Use $(LIBCURSES) instead of
13837         -lncurses.
13838         * conf/powerpc-ieee1275.rmk (grub_emu_LDFLAGS): Likewise.
13840         * configure.ac: Check for curses libraries and headers.
13842         * Makefile.in (LIBCURSES): New variable.
13844         * genmk.rb (Script::rule): Set the executable bits.
13846         * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): The
13847         name of the PC partition map is "pc_partition_map" but not "pc".
13849 2005-08-07  Yoshinori K. Okuji  <okuji@enbug.org>
13851         * util/i386/pc/grub-install.in (grub_probefs): New variable.
13852         (modules): Likewise.
13853         (usage): Added descriptions for --modules and --grub-probefs.
13854         Handle --modules and --grub-probefs. Save the arguments in MODULES
13855         and GRUB_PROBEFS, respectively.
13856         Auto-detect a filesystem module against GRUBDIR. If the result is
13857         empty and modules are not specified explicitly, abort the
13858         installation. Add the result to MODULES.
13860         * DISTLIST: Removed boot/powerpc/ieee1275/ieee1275.c,
13861         disk/powerpc/ieee1275/ofdisk.c,
13862         include/grub/powerpc/ieee1275/init.h and
13863         term/powerpc/ieee1275/ofconsole.c.
13864         Added disk/ieee1275/ofdisk.c, kern/ieee1275/of.c and
13865         term/ieee1275/ofconsole.c.
13867         * include/grub/powerpc/ieee1275/console.h: Resurrected.
13869         * COPYING: Upgraded to the latest version. Only the address of the
13870         FSF office has changed.
13872 2005-08-07  Yoshinori K. Okuji  <okuji@enbug.org>
13874         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
13875         kern/ieee1275.c with kern/ieee1275/of.c.
13877         * kern/ieee1275.c: Moved to ...
13878         * kern/ieee1275/of.c: ... here.
13880 2005-08-06  Yoshinori K. Okuji  <okuji@enbug.org>
13882         * conf/i386-pc.rmk (kernel_img_HEADERS): Reordered for
13883         readability.
13885         * config.guess: Updated to the latest version from gnulib.
13886         * config.sub: Likewise.
13887         * install.sh: Likewise.
13888         * mkinstalldirs: Likewise.
13890         * include/grub/console.h: Removed. This file is arch-specific. Do
13891         not put this in include/grub.
13893         * include/grub/i386/pc/console.h: Resurrected.
13895         * util/console.c: Include grub/machine/console.h instead of
13896         grub/console.h.
13897         * util/grub-emu.c: Likewise.
13899 2005-08-04  Marco Gerards  <metgerards@student.han.nl>
13901         * kern/term.c (grub_putcode): Use `grub_getwh' instead of
13902         hardcoded value.
13904         From Vincent Pelletier  <subdino2004@yahoo.fr>
13905         * include/grub/term.h (GRUB_TERM_WIDTH, GRUB_TERM_HEIGHT):
13906         Redefined to use grub_getwh.
13907         (grub_term): New member named getwh.
13908         (grub_getwh): New prototype.
13909         * kern/term.c (grub_getwh): New function.
13910         * term/i386/pc/console.c (grub_console_getwh): New function.
13911         (grub_console_term): New member `getwh'.
13912         * term/i386/pc/vga.c (grub_vga_getwh): New function.
13913         (grub_vga_term): New member `getwh'.
13914         * term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Use
13915         grub_ssize_t.
13916         (grub_ofconsole_getw): New function.
13917         (grub_ofconsole_init): Use grub_ssize_t and unsigned char.
13918         (grub_ofconsole_term): New field named getwh and new initial
13919         value.
13921 2005-08-03  Hollis Blanchard  <hollis@penguinppc.org>
13923         * include/grub/powerpc/ieee1275/ieee1275.h: Move ...
13924         * include/grub/ieee1275/ieee1275.h: ... to here.  All users updated.
13925         Move `abort', `grub_reboot', and `grub_halt' prototypes ...
13926         * include/grub/powerpc/ieee1275/kernel.h: ... to here.
13927         * commands/ieee1275/halt.c: Include <grub/machine/kernel.h> instead
13928         of <grub/machine/ieee1275.h>.
13929         * commands/ieee1275/reboot.c: Likewise.
13930         * boot/powerpc/ieee1275/ieee1275.c: Move ...
13931         * kern/ieee1275.c: ... to here.  All users updated.  Change all
13932         parameter structs to use new type `grub_ieee1275_cell_t'.
13933         * term/powerpc/ieee1275/ofconsole.c: Move ...
13934         * term/ieee1275/ofconsole.c: ... to here.  All users updated.
13935         * disk/powerpc/ieee1275/ofdisk.c: Move ...
13936         * disk/ieee1275/ofdisk.c: ... to here.  All users updated.
13937         * boot/powerpc/ieee1275/cmain.c: Change `grub_ieee1275_entry_fn' type
13938         to return int.
13939         * include/grub/i386/pc/console.h: Move to include/grub/console.h.
13940         Remove unused prototypes.  All users updated.
13941         * include/grub/powerpc/ieee1275/console.h: Removed.
13942         * include/grub/powerpc/ieee1275/ieee1275.h: Define
13943         `grub_ieee1275_cell_t'.
13944         * kern/powerpc/ieee1275/openfw.c: Include <grub/machine/kernel.h>.
13945         Cast comparisons with -1 to the correct type.
13946         * loader/powerpc/ieee1275/linux.c (kernel_entry_t): Change parameter
13947         type to match `grub_ieee1275_entry_fn'.
13949 2005-08-01  Yoshinori K. Okuji  <okuji@enbug.org>
13951         * DISTLIST: Added util/i386/pc/grub-probefs.c.
13953         * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-probefs.
13954         (grub_setup_SOURCES): Removed partmap/amiga.c, partmap/apple.c and
13955         partmap/sun.c.
13956         (grub_probefs_SOURCES): New variable.
13958         * util/i386/pc/grub-probefs.c: New file.
13960         * util/i386/pc/grub-setup.c (main): Call
13961         grub_pc_partition_map_init, grub_ufs_init, grub_minix_init,
13962         grub_hfs_init and grub_jfs_init to initialize the system. Call
13963         grub_ufs_fini, grub_minix_fini, grub_hfs_fini, grub_jfs_init and
13964         grub_pc_partition_map_fini to finish the system.
13966 2005-07-31  Yoshinori K. Okuji  <okuji@enbug.org>
13968         * loader/i386/pc/multiboot.c (grub_multiboot_is_elf32): New
13969         function.
13970         (grub_multiboot_load_elf32): Likewise.
13971         (grub_multiboot_is_elf64): Likewise.
13972         (grub_multiboot_load_elf64): Likewise.
13973         (grub_multiboot_load_elf): Likewise.
13974         (grub_rescue_cmd_multiboot): Call grub_multiboot_load_elf to load
13975         an ELF32 or ELF64 file.
13976         This is based on a patch from Ruslan Nikolaev <nruslan@mail.com>.
13978         From Serbinenko Vladimir <serbinenko.vova@list.ru>:
13979         * kern/disk.c (grub_print_partinfo): Check if FS->LABEL is not
13980         NULL before calling FS->LABEL.
13981         * fs/fat.c (grub_fat_dir): Initialize DIRNAME to NULL.
13982         * commands/ls.c (grub_ls_list_files): Show labels, if possible.
13983         (grub_ls_list_disks): Check if FS and FS->LABEL are not NULL
13984         before calling FS->LABEL.
13986 2005-07-26  Yoshinori K. Okuji  <okuji@enbug.org>
13988         * util/i386/pc/grub-install.in (datadir): New variable.
13989         (libdir): Removed.
13990         (pkgdatadir): New variable.
13991         (pkglibdir): Removed.
13993 2005-07-24  Yoshinori K. Okuji  <okuji@enbug.org>
13995         * DISTLIST: Added util/i386/pc/grub-install.in.
13997         * util/i386/pc/grub-install.in: New file.
13999         * conf/i386-pc.rmk (sbin_SCRIPTS): New variable.
14000         (grub_install_SOURCES): Likewise.
14002         * genmk.rb: Added support for scripts.
14003         (Script): New class.
14004         (scripts): New variable.
14006         * Makefile.in (install-local): Install sbin_SCRIPTS by
14007         INSTALL_SCRIPT.
14008         (uninstall): Remove sbin_SCRIPTS.
14010         * util/i386/pc/grub-setup.c (main): If the argument is not a GRUB
14011         device, try to get a GRUB device by
14012         grub_util_biosdisk_get_grub_dev.
14013         Free DEST_DEV.
14015         * util/i386/pc/grub-mkdevicemap.c (usage): Remove a duplicated
14016         description for --device-map.
14018 2005-07-20  Yoshinori K. Okuji  <okuji@enbug.org>
14020         Change the semantics of variable hooks. They now return strings
14021         instead of error values.
14023         * util/i386/pc/grub-setup.c: Include grub/env.h.
14024         (setup): Use grub_device_set_root instead of grub_env_set.
14026         * kern/rescue.c (grub_rescue_cmd_root): Use grub_env_set and
14027         grub_env_get instead of grub_device_set_root and
14028         grub_device_get_root, respectively.
14030         * kern/main.c (grub_env_write_root): New function.
14031         (grub_set_root_dev): Register grub_env_write_hook for "root". Use
14032         grub_env_set instead of grub_device_set_root.
14034         * kern/env.c (HASHSZ): Reduced to 13, because GRUB does not need
14035         many variables.
14036         (grub_env_set): Set ENV->VALUE to the result of ENV->WRITE_HOOK
14037         rather than calling ENV->WRITE_HOOK afterwards.
14038         (grub_env_get): Return the result of ENV->READ_HOOK rather than
14039         passing a pointer of a pointer.
14040         (grub_register_variable_hook): Change the types of "read_hook" and
14041         "write_hook" to grub_env_read_hook_t and grub_env_write_hook_t,
14042         respectively.
14043         Allocate the default empty string on the heap, because this string
14044         may be freed later.
14046         * kern/device.c: Include grub/env.h.
14047         (grub_device_set_root): Removed.
14048         (grub_device_get_root): Likewise.
14049         (grub_device_open): Use grub_env_get instead of
14050         grub_device_get_root.
14052         * include/grub/env.h (grub_env_read_hook_t): New type.
14053         (grub_env_write_hook_t): Likewise.
14054         (grub_env_var): Change the types of "read_hook" and "write_hook"
14055         to grub_env_read_hook_t and grub_env_write_hook_t, respectively.
14056         (grub_register_variable_hook): Likewise.
14058         * include/grub/device.h (grub_device_set_root): Removed.
14059         (grub_device_set_root): Likewise.
14061         * fs/fat.c (grub_fat_dir): Make a copy of PATH in DIRNAME, and
14062         make sure that DIRNAME terminates with '/', so that
14063         grub_fat_find_dir will fail if PATH is not a directory.
14065         * commands/ls.c (grub_ls_list_files): Remove the qualifier const
14066         from DIRNAME.
14067         Use the qualifier auto for print_files and print_files_long.
14068         If FS->DIR sets GRUB_ERRNO to GRUB_ERR_BAD_FILE_TYPE, try DIRNAME
14069         as a regular file.
14070         Put a newline only if there is no error.
14071         (grub_cmd_ls): Remove grub_ls_print_files, because this is not
14072         used.
14074 2005-07-20  Yoshinori K. Okuji  <okuji@enbug.org>
14076         * kern/partition.c (grub_partition_probe): Initialize PART to
14077         NULL. Otherwise, when no partition map is registered, this returns
14078         a garbage.
14080 2005-07-19  Yoshinori K. Okuji  <okuji@enbug.org>
14082         * partmap/apple.c (apple_partition_map_iterate): Check if POS
14083         equals GRUB_DISK_SECTOR_SIZE to see if the partition table is
14084         valid.
14086 2005-07-18  Yoshinori K. Okuji  <okuji@enbug.org>
14088         * commands/ls.c (grub_ls_list_disks): Print the filesystem
14089         information on each device, if it does not have partitions. Print
14090         "Device" instead of "Disk", because this function is not specific
14091         to disk devices.
14093         * normal/main.c (grub_rescue_cmd_normal): Make the variable CONFIG
14094         static to ensure that it is put on the memory rather than a
14095         register.
14097 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
14099         * commands/cat.c (GRUB_MOD_INIT): Use better documentation.
14100         (grub_cat_init): Likewise.
14101         * loader/i386/pc/chainloader_normal.c (GRUB_MOD_INIT): Likewise.
14102         (options): Likewise.
14103         * commands/configfile.c (GRUB_MOD_INIT): Likewise.
14104         (grub_configfile_init): Likewise.
14105         * font/manager.c (GRUB_MOD_INIT): Likewise.
14106         * commands/help.c (GRUB_MOD_INIT): Likewise.
14107         (grub_help_init): Likewise.
14108         * normal/command.c (grub_command_init): Likewise.
14109         * loader/i386/pc/linux_normal.c (GRUB_MOD_INIT): Likewise.
14110         * disk/loopback.c (grub_loop_init): Likewise.
14111         (GRUB_MOD_INIT): Likewise.
14112         * commands/ls.c (grub_ls_init): Likewise.
14113         (GRUB_MOD_INIT): Likewise.
14114         (options): Likewise.
14115         * commands/boot.c (grub_boot_init): Likewise.
14116         (GRUB_MOD_INIT): Likewise.
14117         * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Likewise.
14118         * commands/i386/pc/reboot.c (grub_reboot_init): Likewise.
14119         (GRUB_MOD_INIT): Likewise.
14120         * commands/cmp.c (grub_cmp_init): Likewise.
14121         (GRUB_MOD_INIT): Likewise.
14123         * normal/arg.c: Use <> instead of "" to include header files.
14124         (SHORT_ARG_HELP): New macro.
14125         (SHORT_ARG_USAGE): Likewise.
14126         (help_options): Specify SHORT_ARG_HELP and SHORT_ARG_USAGE instead
14127         of 'h' and 'u' for help and usage, respectively. Use more GNU-like
14128         descriptions.
14129         (find_short): Check if C is 'h' or 'u' explicitly.
14130         (grub_arg_show_help): Use space characters instead of tabs. Treat
14131         SHORT_ARG_HELP and SHORT_ARG_USAGE exceptionally so that -h and -u
14132         are shown with --help and --usage only if they are not used for
14133         the command itself.
14134         (parse_option): Use SHORT_ARG_HELP and SHORT_ARG_USAGE instead of
14135         'h' and 'u'.
14137         * include/grub/arg.h (struct grub_arg_option): Add the qualifier
14138         const into "longarg". Change the type of "shortarg" to int.
14140 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
14142         * boot/i386/pc/boot.S (boot_drive_check): New label.
14144         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRIVE_CHECK): New
14145         macro.
14147         * util/i386/pc/grub-setup.c (setup): Added a workaround for BIOSes
14148         which do not pass a boot drive correctly. Copied from GRUB Legacy.
14150 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
14152         * kern/i386/pc/startup.S (gate_a20_try_system_control_port_a):
14153         When turning off Gate A20, skip the check and return immediately,
14154         because this is not fatal usually.
14156 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
14158         * conf/i386-pc.rmk (pxeboot_img_LDFLAGS): The text address should
14159         be 0x7C00 instead of 0x8000.
14161         * boot/i386/pc/pxeboot.S: Rewritten.
14163         * kern/i386/pc/startup.S (gate_a20_try_bios): No need to specify
14164         EXT_C.
14165         (gate_a20_check_state): Read a byte from 0x108000. Invert the
14166         result.
14168 2005-07-16  Yoshinori K. Okuji  <okuji@enbug.org>
14170         * kern/i386/pc/startup.S (grub_gate_a20): Rewritten for
14171         robustness. This routine now supports a BIOS call and System
14172         Control Port A to modify the gate A20.
14174         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
14175         Increased to 0x440.
14177 2005-07-12  Hollis Blanchard  <hollis@penguinppc.org>
14179         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): dprintf the
14180         device path and resulting ihandle.
14181         (grub_ofdisk_close): dprintf the ihandle being closed.
14182         (grub_ofdisk_read): dprintf function parameters.
14183         * kern/mm.c (grub_mm_init_region): Likewise.
14184         * loader/powerpc/ieee1275/linux.c: Remove extra whitespace.
14185         (grub_linux_boot): dprintf the Linux entry point, initrd address and
14186         size, and boot arguments.
14187         (grub_rescue_cmd_linux): dprintf each ELF segment's address and size
14188         before loading into memory.
14189         (grub_rescue_cmd_initrd): dprintf the initrd's address and size
14190         before loading into memory.
14192 2005-07-12  Yoshinori K. Okuji  <okuji@enbug.org>
14194         * kern/mm.c: Added much documentation.
14195         (GRUB_MM_ALIGN_LOG2): When GRUB_CPU_SIZEOF_VOID_P is
14196         8, set to 5 instead of 8.
14198 2005-07-10  Yoshinori Okuji  <okuji@enbug.org>
14200         * DISTLIST: Added util/i386/pc/grub-mkimage.c.
14202         * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-mkdevicemap.
14203         (grub_mkdevicemap_SOURCES): New variable.
14205         * util/i386/pc/grub-mkdevicemap.c: New file. Mostly copied from
14206         lib/device.c of GRUB Legacy.
14208 2005-07-10  Yoshinori Okuji  <okuji@enbug.org>
14210         * commands/ls.c (grub_ls_list_files): Check if *PATH is NUL
14211         instead of PATH is NULL.
14213 2005-07-09  Vincent Pelletier  <subdino2004@yahoo.fr>
14215         * commands/cmp.c (BUFFER_SIZE): New macro.
14216         (grub_cmd_cmp): Close the right file at the right time.  Compare
14217         only data just read.  Don't report files of different  size as
14218         identical.  Dynamically allocate buffers.  Move variable
14219         declarations at the beginning of function.
14221 2005-07-09  Yoshinori Okuji  <okuji@enbug.org>
14223         * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): The return value was
14224         reverse.
14226 2004-07-04  Vincent Pelletier  <subdino2004@yahoo.fr>
14228         * normal/cmdline.c (grub_cmdline_get): Don't fallback on ctrl-d
14229         when backspace is pressed at beginning of line.
14231 2005-07-03  Yoshinori Okuji  <okuji@enbug.org>
14233         * DISTLIST: Added genfslist.sh.
14235         * normal/main.c (fs_module_list): New variable.
14236         (autoload_fs_module): New function.
14237         (read_fs_list): Likewise.
14238         (grub_normal_execute): Call read_fs_list.
14240         * kern/fs.c (grub_fs_autoload_hook): New variable.
14241         (grub_fs_probe): Added support for auto-loading.
14243         * include/grub/normal.h (struct grub_fs_module_list): New struct.
14244         (grub_fs_module_list_t): New type.
14246         * include/grub/fs.h (grub_fs_autoload_hook_t): New type.
14247         (grub_fs_autoload_hook): New prototype.
14249         * genfslist.sh: New file.
14251         * genmk.rb: Added a rule to generate a filesystem list.
14253 2005-06-30  Marco Gerards  <metgerards@student.han.nl>
14255         * configure.ac: Fix the test for cross-compiling.
14257         * genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'.  Don't
14258         define GRUB_UTIL anymore.
14260         * util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes
14261         so this function works on other systems than just big endian.
14262         (load_modules): Likewise.
14263         (add_segments): Likewise.
14265 2005-06-23  Hollis Blanchard  <hollis@penguinppc.org>
14267         * kern/misc.c (grub_vsprintf): Add `longfmt'.  If format string
14268         contains `l' modifier, get a long from va_arg().
14270 2005-06-23  Yoshinori K. Okuji  <okuji@enbug.org>
14272         * kern/mm.c (grub_free): If the next free block which is being
14273         merged is the first free block, set the first block to the block
14274         being freed.
14275         Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.
14277 2005-05-08  Hollis Blanchard  <hollis@penguinppc.org>
14279         * boot/powerpc/ieee1275/cmain.c (cmain): Initialize
14280         `grub_ieee1275_chosen'.
14282 2005-05-08  Hollis Blanchard  <hollis@penguinppc.org>
14284         * boot/powerpc/ieee1275/cmain.c (module_info): Remove definition.
14285         (grub_ieee1275_chosen): New variable.
14286         (cmain): Initialize and use `grub_ieee1275_chosen' instead of
14287         `chosen'.
14288         * boot/powerpc/ieee1275/crt0.S (init_stack): Remove stack space.
14289         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
14290         Rename first argument to `phandle' for consistency.
14291         (grub_ieee1275_get_property_length): Likewise.
14292         (grub_ieee1275_next_property): Likewise.  Change type of first argument
14293         to grub_ieee1275_phandle_t.
14294         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn):
14295         Move export next to declaration.
14296         (grub_ieee1275_chosen): New variable.
14297         * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MODULE_BASE):
14298         Correct cosmetic typo.
14299         * kern/powerpc/ieee1275/init.c (grub_set_prefix): Use
14300         `grub_ieee1275_chosen'.
14301         * kern/powerpc/ieee1275/openfw.c (grub_map): Likewise.
14302         * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Likewise.
14303         (grub_rescue_cmd_linux): Set `initrd_addr' to 0.
14304         * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_refresh): Use
14305         `grub_ieee1275_chosen'.
14307 2005-05-10  Hollis Blanchard  <hollis@penguinppc.org>
14309         * boot/powerpc/ieee1275/cmain.c (cmain): Remove code to parse
14310         /chosen/bootargs.
14311         * kern/powerpc/ieee1275/init.c (grub_machine_init): Parse
14312         /chosen/bootargs as "variable=value" pairs.
14314 2005-05-08  Vincent Pelletier  <subdino2004@yahoo.fr>
14316         * include/grub/misc.h (grub_dprintf): New macro.
14317         (grub_real_dprintf): New prototype.
14318         (grub_strword): Likewise.
14319         (grub_iswordseparator): Likewise.
14320         * kern/misc.c (grub_real_dprintf): New function.
14321         (grub_strword): Likewise.
14322         (grub_iswordseparator): Likewise.
14324 2005-04-30  Hollis Blanchard  <hollis@penguinppc.org>
14326         * boot/powerpc/ieee1275/cmain.c: Don't include grub/machine/init.h.
14327         (roundup): Remove macro.
14328         (grub_ieee1275_flags): Make static.
14329         (grub_ieee1275_realmode): Remove.
14330         (grub_ieee1275_test_flag): New function.
14331         (grub_ieee1275_set_flag): Likewise.
14332         (find_options): Rename to `grub_ieee1275_find_options'; update
14333         callers. Set GRUB_IEEE1275_FLAG_REAL_MODE and
14334         GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS.
14335         (cmain): New prototype.
14336         (cmain): Use `grub_ieee1275_set_flag' instead of accessing
14337         `grub_ieee1275_flags' directly.
14338         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Remove
14339         machine/biosdisk.h.
14340         * disk/powerpc/ieee1275/ofdisk.c: Include grub/machine/ofdisk.h.
14341         Don't include grub/machine/init.h.
14342         (grub_ofdisk_open): Call `grub_ieee1275_test_flag'.
14343         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
14344         Remove prototype.
14345         (grub_ieee1275_realmode): Likewise.
14346         (grub_ieee1275_flag): New enum.
14347         (grub_ieee1275_test_flag): New prototype.
14348         (grub_ieee1275_set_flag): New prototype.
14349         * include/grub/powerpc/ieee1275/init.h: Remove file.
14350         * include/grub/powerpc/ieee1275/ofdisk.h: New file.
14351         * kern/powerpc/ieee1275/init.c: Don't include grub/machine/init.h.
14352         Include grub/machine/console.h.  Include grub/machine/ofdisk.h.
14353         (grub_machine_fini): Don't call `grub_ieee1275_release'.  Remove
14354         comment.
14355         * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Call
14356         `grub_ieee1275_test_flag'.
14357         (grub_ieee1275_encode_devname): Likewise.
14359 2005-04-21  Hollis Blanchard  <hollis@penguinppc.org>
14361         * include/grub/powerpc/ieee1275/ieee1275.h
14362         (grub_ieee1275_encode_devname): New prototype.
14363         (grub_ieee1275_get_filename): Likewise.
14364         * kern/powerpc/ieee1275/init.c (grub_translate_ieee175_path): New
14365         function.
14366         (grub_set_prefix): Likewise.
14367         (grub_machine_init): Call grub_set_prefix.
14368         * kern/powerpc/ieee1275/openfw.c: Fix typos.
14369         (grub_parse_type): New enum.
14370         (grub_ieee1275_get_devargs): New function.
14371         (grub_ieee1275_get_devname): Likewise.
14372         (grub_ieee1275_parse_args): Likewise.
14373         (grub_ieee1275_get_filename): Likewise.
14374         (grub_ieee1275_encode_devname): Likewise.
14376 2005-03-30  Marco Gerards  <metgerards@student.han.nl>
14378         * kern/powerpc/ieee1275/init.c (grub_machine_fini): Don't call
14379         `grub_loader_unset'.
14381 2005-03-26  Hollis Blanchard  <hollis@penguinppc.org>
14383         * commands/ieee1275/halt.c (grub_cmd_halt): Call grub_halt
14384         instead of grub_ieee1275_interpret.
14385         (grub_halt_init): New function.
14386         (grub_halt_fini): Likewise.
14387         (GRUB_MOD_INIT): Correct message grammar.
14388         * commands/ieee1275/reboot.c (grub_cmd_reboot): Call grub_reboot
14389         instead of grub_ieee1275_interpret.
14390         (grub_reboot_init): New function.
14391         (grub_reboot_fini): Likewise.
14392         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace
14393         commands/i386/pc/halt.c, commands/i386/pc/reboot.c, and
14394         util/i386/pc/misc.c with commands/ieee1275/halt.c,
14395         commands/ieee1275/reboot.c, and util/powerpc/ieee1275/misc.c.
14396         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_fini): New
14397         function.
14398         * include/grub/powerpc/ieee1275/console.h (grub_console_fini):
14399         Add prototype.
14400         * include/grub/powerpc/ieee1275/ieee1275.h (grub_reboot): Add
14401         prototype.
14402         (grub_halt): Likewise.
14403         * include/grub/powerpc/ieee1275/init.h: Remove inaccurate comment.
14404         (cmain): Remove __attribute__((unused)).
14405         * kern/powerpc/ieee1275/init.c (grub_heap_start): New variable.
14406         (grub_heap_len): Likewise.
14407         (grub_machine_fini): New function.
14408         * kern/powerpc/ieee1275/openfw.c (grub_reboot): New function.
14409         (grub_halt): Likewise.
14410         * term/powerpc/ieee1275/ofconsole.c (grub_console_fini): New
14411         function.
14412         * util/powerpc/ieee1275/misc.c: New file.
14414 2005-03-19  Yoshinori K. Okuji  <okuji@enbug.org>
14416         * DISTLIST: New file.
14417         * gendistlist.sh: Likewise.
14419         * Makefile.in (COMMON_DISTFILES): Removed.
14420         (BOOT_DISTFILES): Likewise.
14421         (CONF_DISTFILES): Likewise.
14422         (DISK_DISTFILES): Likewise.
14423         (FS_DISTFILES): Likewise.
14424         (INCLUDE_DISTFILES): Likewise.
14425         (KERN_DISTFILES): Likewise.
14426         (LOADER_DISTFILES): Likewise.
14427         (TERM_DISTFILES): Likewise.
14428         (UTIL_DISTFILES): Likewise.
14429         (DISTFILES): Likewise.
14430         (uninstall): Uninstall files in $(pkgdata_DATA).
14431         (DISTLIST): New target.
14432         (distdir): Use the contents of the file DISTLIST to get a list of
14433         distributed files.
14435 2005-03-18  Yoshinori K. Okuji  <okuji@enbug.org>
14437         * fs/fat.c (grub_fat_mount): Ignore the 3rd bit of a media
14438         descriptor. This is ported from GRUB Legacy.
14440         * gencmdlist.sh: Added an extra semicolon to make it work with
14441         old sed versions. Reported by Robert Bihlmeyer
14442         <robbe@orcus.priv.at>.
14444 2005-03-08  Yoshinori Okuji  <okuji@enbug.org>
14446         Automatic loading of commands is supported.
14448         * normal/main.c (read_command_list): New function.
14449         (grub_normal_execute): Call read_command_list.
14451         * normal/command.c (grub_register_command): Return zero or CMD.
14452         Allocate CMD->NAME from the heap.
14453         Initialize CMD->MODULE_NAME to zero.
14454         Find the same name as well. If the same command is found and it is
14455         a dummy command, overwrite members. If it is not a dummy command,
14456         return zero.
14457         (grub_unregister_command): Free Q->NAME and Q->MODULE_NAME.
14458         (grub_command_find): If a dummy command is found, load a module
14459         and retry to find a command only once.
14461         * normal/cmdline.c (grub_tab_complete): Call grub_command_find to
14462         make sure that each command is loaded.
14464         * include/grub/normal.h (GRUB_COMMAND_FLAG_NOT_LOADED): New
14465         macro.
14466         (struct grub_command): Remove const from the member `name'.
14467         Add a new member `module_name'.
14468         (grub_register_command): Return grub_command_t.
14470         * commands/help.c (grub_cmd_help): Call grub_command_find to make
14471         sure that each command is loaded.
14473         * genmk.rb (PModule::rule): Specify a module name without the
14474         suffix ".mod" to gencmdlist.sh.
14476 2005-03-02  Yoshinori K. Okuji  <okuji@enbug.org>
14478         * gencmdlist.sh: New file.
14480         * genmk.rb (PModule::rule): Generate a rule for a command list.
14481         Clean command.lst.
14482         Generate command.lst from $(COMMANDFILES).
14484         * Makefile.in (COMMON_DISTFILES): Added gencmdlist.sh.
14485         (DATA): Added $(pkgdata_DATA).
14486         (install-local): Install files in $(pkgdata_DATA).
14488 2005-03-02  Yoshinori K. Okuji  <okuji@enbug.org>
14490         * term/i386/pc/vga.c (debug_command): Removed.
14491         (GRUB_MOD_INIT): Do not register the command "debug".
14493         From Hollis Blanchard:
14494         * commands/configfile.c: New file.
14495         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
14496         commands/configfile.c.
14497         (pkgdata_MODULES): Added configfile.mod.
14498         (configfile_mod_SOURCES): New variable.
14499         (configfile_mod_CFLAGS): Likewise.
14500         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
14501         commands/configfile.c.
14502         (pkgdata_MODULES): Added configfile.mod.
14503         (configfile_mod_SOURCES): New variable.
14504         (configfile_mod_CFLAGS): Likewise.
14505         * util/grub-emu.c (main): Call grub_configfile_init and
14506         grub_configfile_fini.
14507         * include/grub/normal.h [GRUB_UTIL] (grub_configfile_init): New
14508         prototype.
14509         [GRUB_UTIL] (grub_configfile_fini): Likewise.
14511 2005-02-27  Yoshinori K. Okuji  <okuji@enbug.org>
14513         * normal/arg.c (grub_arg_show_help): Do not show the bug report
14514         address.
14516         * commands/help.c (grub_cmd_help): Do not print newlines after
14517         the last command in print_command_help.
14519 2005-02-27  Yoshinori K. Okuji  <okuji@enbug.org>
14521         * commands/default.h: New file.
14522         * commands/timeout.h: Likewise.
14523         * normal/context.c: Likewise.
14525         * util/misc.c: Do not include sys/times.h.
14526         Include sys/time.h and grub/machine/time.h.
14527         (grub_get_rtc): Rewritten with gettimeofday.
14529         * util/grub-emu.c (main): Call grub_default_init and
14530         grub_timeout_init before grub_normal_init, and call
14531         grub_timeout_fini and grub_default_fini after grub_main.
14533         * util/console.c (grub_ncurses_checkkey): Return the read
14534         character or -1.
14536         * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it
14537         timeouts.
14539         * normal/main.c (read_config_file): Push MENU. If this fails,
14540         print an error and wait for a user input.
14541         Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE.
14542         If a menu is empty or an error occurs, pop MENU.
14543         (grub_normal_execute): Pop and free MENU after grub_menu_run
14544         returns.
14546         * kern/loader.c (grub_loader_boot): Call grub_machine_fini.
14548         * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not
14549         include time.h.
14550         [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
14551         without GRUB_UTIL.
14552         * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include
14553         time.h.
14554         [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
14555         without GRUB_UTIL.
14557         * include/grub/normal.h (struct grub_menu_list): New struct.
14558         (grub_menu_list_t): New type.
14559         (struct grub_context): New struct.
14560         (grub_context_t): New type.
14561         (grub_register_command): Got rid of EXPORT_FUNC.
14562         (grub_unregister_command): Likewise.
14563         (grub_context_get): New prototype.
14564         (grub_context_get_current_menu): Likewise.
14565         (grub_context_push_menu): Likewise.
14566         (grub_context_pop_menu): Likewise.
14567         [GRUB_UTIL] (grub_default_init): Likewise.
14568         [GRUB_UTIL] (grub_default_fini): Likewise.
14569         [GRUB_UTIL] (grub_timeout_init): Likewise.
14570         [GRUB_UTIL] (grub_timeout_fini): Likewise.
14572         * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c,
14573         commands/timeout.c and normal/context.c.
14574         (pkgdata_MODULES): Added default.mod and timeout.mod.
14575         (normal_mod_SOURCES): Added normal/context.c.
14576         (default_mod_SOURCES): New variable.
14577         (default_mod_CFLAGS): Likewise.
14578         (timeout_mod_SOURCES): Likewise.
14579         (timeout_mod_CFLAGS): Likewise.
14580         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from
14581         conf/i386-pc.rmk.
14582         (pkgdata_MODULES): Added default.mod and timeout.mod.
14583         (normal_mod_SOURCES): Added normal/context.c.
14584         (default_mod_SOURCES): New variable.
14585         (default_mod_CFLAGS): Likewise.
14586         (timeout_mod_SOURCES): Likewise.
14587         (timeout_mod_CFLAGS): Likewise.
14589         * Makefile.in (all-local): Added $(MKFILES).
14591 2005-02-21  Vincent Pelletier  <subdino2004@yahoo.fr>
14593         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `partmap/sun.c'.
14594         (grub_emu_SOURCES): Likewise.
14595         (pkgdata_MODULES): Add `sun.mod'.
14596         (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
14597         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
14598         `partmap/sun.c'.
14599         (pkgdata_MODULES): Add `sun.mod'.
14600         (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
14601         * include/grub/partition.h (grub_sun_partition_map_init): New
14602         prototype.
14603         (grub_sun_partition_map_fini): Likewise.
14604         * partmap/sun.c: New file.
14605         * util/grub-emu.c (main): Initialize and de-initialize the sun
14606         partitionmap support.
14608 2005-02-19  Yoshinori K. Okuji  <okuji@enbug.org>
14610         This implements an Emacs-like menu entry editor.
14612         * normal/menu_entry.c: New file.
14614         * util/console.c (grub_ncurses_putchar): Translate some Unicode
14615         characters to ASCII.
14616         (saved_char): New variable.
14617         (grub_ncurses_checkkey): Rewritten completely.
14618         (grub_ncurses_getkey): Likewise.
14619         (grub_ncurses_init): Call raw instead of cbreak.
14621         * normal/menu.c (print_entry): Do not put a space.
14622         (init_page): Renamed to ...
14623         (grub_menu_init_page): ... this. All callers changed.
14624         (edit_menu_entry): Removed.
14625         (run_menu): Call grub_menu_entry_run instead of edit_menu_entry.
14627         * normal/cmdline.c (grub_cmdline_run): Call grub_setcursor.
14629         * kern/misc.c (grub_vprintf): Call grub_refresh.
14631         * normal/menu.c (DISP_LEFT): Renamed to ...
14632         * include/grub/term.h (GRUB_TERM_DISP_LEFT): ... this.
14633         * normal/menu.c (DISP_UP): Renamed to ...
14634         * include/grub/term.h (GRUB_TERM_DISP_UP): ... this.
14635         * normal/menu.c (DISP_RIGHT): Renamed to ...
14636         * include/grub/term.h (GRUB_TERM_DISP_RIGHT): ... this.
14637         * normal/menu.c (DISP_DOWN): Renamed to ...
14638         * include/grub/term.h (GRUB_TERM_DISP_DOWN): ... this.
14639         * normal/menu.c (DISP_HLINE): Renamed to ...
14640         * include/grub/term.h (GRUB_TERM_DISP_HLINE): ... this.
14641         * normal/menu.c (DISP_VLINE): Renamed to ...
14642         * include/grub/term.h (GRUB_TERM_DISP_VLINE): ... this.
14643         * normal/menu.c (DISP_UL): Renamed to ...
14644         * include/grub/term.h (GRUB_TERM_DISP_UL): ... this.
14645         * normal/menu.c (DISP_UR): Renamed to ...
14646         * include/grub/term.h (GRUB_TERM_DISP_UR): ... this.
14647         * normal/menu.c (DISP_LL): Renamed to ...
14648         * include/grub/term.h (GRUB_TERM_DISP_LL): ... this.
14649         * normal/menu.c (DISP_LR): Renamed to ...
14650         * include/grub/term.h (GRUB_TERM_DISP_LR): ... this.
14651         * normal/menu.c (TERM_WIDTH): Renamed to ...
14652         * include/grub/term.h (GRUB_TERM_WIDTH): ... this.
14653         * normal/menu.c (TERM_HEIGHT): Renamed to ...
14654         * include/grub/term.h (GRUB_TERM_HEIGHT): ... this.
14655         * normal/menu.c (TERM_INFO_HEIGHT): Renamed to ...
14656         * include/grub/term.h (GRUB_TERM_INFO_HEIGHT): ... this.
14657         * normal/menu.c (TERM_MARGIN): Renamed to ...
14658         * include/grub/term.h (GRUB_TERM_MARGIN): ... this.
14659         * normal/menu.c (TERM_SCROLL_WIDTH): Renamed to ...
14660         * include/grub/term.h (GRUB_TERM_SCROLL_WIDTH): ... this.
14661         * normal/menu.c (TERM_TOP_BORDER_Y): Renamed to ...
14662         * include/grub/term.h (GRUB_TERM_TOP_BORDER_Y): ... this.
14663         * normal/menu.c (TERM_LEFT_BORDER_X): Renamed to ...
14664         * include/grub/term.h (GRUB_TERM_LEFT_BORDER_X): ... this.
14665         * normal/menu.c (TERM_BORDER_WIDTH): Renamed to ...
14666         * include/grub/term.h (GRUB_TERM_BORDER_WIDTH): ... this.
14667         * normal/menu.c (TERM_MESSAGE_HEIGHT): Renamed to ...
14668         * include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): ... this.
14669         * normal/menu.c (TERM_BORDER_HEIGHT): Renamed to ...
14670         * include/grub/term.h (GRUB_TERM_BORDER_HEIGHT): ... this.
14671         * normal/menu.c (TERM_NUM_ENTRIES): Renamed to ...
14672         * include/grub/term.h (GRUB_TERM_NUM_ENTRIES): ... this.
14673         * normal/menu.c (TERM_FIRST_ENTRY_Y): Renamed to ...
14674         * include/grub/term.h (GRUB_TERM_FIRST_ENTRY_Y): ... this.
14675         * normal/menu.c (TERM_ENTRY_WIDTH): Renamed to ...
14676         * include/grub/term.h (GRUB_TERM_ENTRY_WIDTH): ... this.
14677         * normal/menu.c (TERM_CURSOR_X): Renamed to ...
14678         * include/grub/term.h (GRUB_TERM_CURSOR_X): ... this.
14679         All callers changed.
14681         * include/grub/normal.h: New prototype.
14683         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
14684         normal/menu_entry.c.
14685         (normal_mod_SOURCES): Likewise.
14686         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
14687         (normal_mod_SOURCES): Likewise.
14689 2005-02-15  Yoshinori K. Okuji  <okuji@enbug.org>
14691         * include/grub/normal.h (grub_halt_init): New prototype.
14692         (grub_halt_fini): Likewise.
14693         (grub_reboot_init): Likewise.
14694         (grub_reboot_fini): Likewise.
14696         * util/grub-emu.c: Include signal.h.
14697         (main_env): New global variable.
14698         (grub_machine_init): Ignore SIGINT. Otherwise grub-emu cannot
14699         catch C-c.
14700         (grub_machine_fini): New function.
14701         (main): Call grub_halt_init and grub_reboot_init before
14702         grub_main, and grub_reboot_fini and grub_halt_fini after it.
14703         Call setjmp with MAIN_ENV to go back afterwards.
14704         Call grub_machine_fini right before return.
14706         * include/grub/util/misc.h: Include setjmp.h.
14707         (main_env): New prototype.
14709         * include/grub/kernel.h (grub_machine_fini): New prototype.
14710         * include/grub/i386/pc/biosdisk.h (grub_biosdisk_fini): Likewise.
14711         * include/grub/i386/pc/console.h (grub_console_fini): Likewise.
14713         * disk/i386/pc/biosdisk.c (grub_biosdisk_fini): New function.
14714         * kern/i386/pc/init.c (grub_machine_fini): Likewise.
14715         * term/i386/pc/console.c (grub_console_fini): Likewise.
14717         * util/i386/pc/misc.c: New file.
14719         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
14720         util/i386/pc/misc.c, commands/i386/pc/halt.c and
14721         commands/i386/pc/reboot.c.
14723 2005-02-14  Guillem Jover  <guillem@hadrons.org>
14725         * include/grub/dl.h (grub_dl_check_header): New prototype.
14726         (grub_arch_dl_check_header): Change return type to grub_err_t,
14727         remove size parameter and export function.  Update all callers.
14728         * kern/dl.c (grub_dl_check_header): New function.
14729         (grub_dl_load_core): Use `grub_dl_check_header' instead of
14730         `grub_arch_dl_check_header'.  Check ELF type.  Check if sections
14731         are inside the core.
14732         * kern/i386/dl.c (grub_arch_dl_check_header): Remove arch
14733         independent ELF header checks.
14734         * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
14735         * loader/i386/pc/multiboot.c (grub_rescue_cmd_multiboot): Use
14736         `grub_dl_check_header' instead of explicit checks.  Check for the
14737         ELF type.
14738         * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Use
14739         `grub_dl_check_header' instead of explicit checks.  Remove arch
14740         specific ELF header checks.
14742         * util/grub-emu.c (grub_arch_dl_check_header): Remove the
14743         argument SIZE.
14745 2005-02-13  Hollis Blanchard  <hollis@penguinppc.org>
14747         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add ls.mod.
14748         * include/grub/powerpc/libgcc.h (__mulsf3): New prototype.
14750 2005-02-12  Hollis Blanchard  <hollis@penguinppc.org>
14752         * kern/partition.c (grub_partition_probe): Clear `grub_errno' and
14753         return 0 if `grub_errno' is GRUB_ERR_BAD_PART_TABLE.
14754         (part_map_iterate): Clear `grub_errno' and return 0 if
14755         `partmap->iterate' returns GRUB_ERR_BAD_PART_TABLE.
14756         * partmap/amiga.c (amiga_partition_map_iterate): Return
14757         GRUB_ERR_BAD_PART_TABLE if no partition map magic is found.
14758         * partmap/apple.c (apple_partition_map_iterate): Likewise.
14760 2005-02-01  Guillem Jover  <guillem@hadrons.org>
14762         * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Fix module
14763         help info.
14765 2005-01-31  Marco Gerards  <metgerards@student.han.nl>
14767         * include/grub/powerpc/ieee1275/loader.h (grub_load_linux):
14768         Removed prototype.
14769         (grub_rescue_cmd_linux): New prototype.
14770         (grub_rescue_cmd_initrd): Likewise.
14771         * powerpc/ieee1275/linux.c (grub_linux_boot): Remove struct
14772         `bi_rec'.
14773         (grub_linux_release_mem): Release the memory for the initrd.
14774         (grub_load_linux): Renamed from this...
14775         (grub_rescue_cmd_linux): ...To this.  Changed all callers.
14776         Changed `entry' not to be static.  Loop over memory regions to
14777         find another one when the default fails.
14778         (grub_rescue_cmd_initrd): New function.
14779         (grub_linux_init): Remove function.
14780         (grub_linux_fini): Likewise.
14781         (GRUB_MOD_INIT): Register `initrd'.
14782         (GRUB_MOD_FINI): Unregister `initrd'.
14783         * powerpc/ieee1275/linux_normal.c (grub_linux_normal_init):
14784         Function removed.
14785         (grub_linux_normal_fini): Likewise.
14786         (GRUB_MOD_INIT): Register `initrd'.
14787         (GRUB_MOD_FINI): Unregister `initrd'.
14789 2005-01-31  Marco Gerards  <metgerards@student.han.nl>
14791         * commands/help.c: New file.
14792         * normal/arg.c (show_help): Renamed to...
14793         (grub_arg_show_help): ... this.
14794         * commands/i386/pc/halt.c: New file.
14795         * commands/i386/pc/reboot.c: Likewise.
14796         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/help.c'.
14797         (pkgdata_MODULES): Add `reboot.mod', `halt.mod' and `help.mod'.
14798         (help_mod_SOURCES, help_mod_CFLAGS, reboot_mod_SOURCES)
14799         (reboot_mod_CFLAGS, halt_mod_SOURCES, halt_mod_CFLAGS): New
14800         variables.
14801         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
14802         `commands/help.c'.
14803         (pkgdata_MODULES): Add `help.mod'.
14804         (help_mod_SOURCES, help_mod_CFLAGS): New variables.
14805         * grub/i386/pc/init.h (grub_reboot): New prototype.
14806         (grub_halt): Likewise.
14807         * include/grub/normal.h (grub_arg_show_help): New prototype.
14808         (grub_help_init): Likewise.
14809         (grub_help_fini): Likewise.
14810         * util/grub-emu.c (main): Initialize and deinitialize the help
14811         command.
14813         * normal/cmdline.c (grub_cmdline_get): Doc fix.
14815         * normal/command.c (grub_command_init): Fixed the description of
14816         the `set' and `unset' commands.
14818 2005-01-31  Marco Gerards  <metgerards@student.han.nl>
14820         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_interpret): New
14821         function.
14822         * commands/ieee1275/halt.c: New file.
14823         * commands/ieee1275/reboot.c: Likewise.
14824         * commands/ieee1275/suspend.c (grub_cmd_suspend): Use
14825         `__attribute__ ((unused))'.  Some GCS related fixed.
14826         (grub_suspend_init) [GRUB_UTIL]: Function removed.
14827         (grub_suspend_fini): Likewise.
14828         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add `reboot.mod'
14829         and `halt.mod'.
14830         (reboot_mod_SOURCES, reboot_mod_CFLAGS, halt_mod_SOURCES)
14831         (halt_mod_CFLAGS): New variables.
14832         * include/grub/powerpc/ieee1275/ieee1275.h
14833         (grub_ieee1275_interpret): New prototype.
14835 2005-01-29  Yoshinori K. Okuji  <okuji@enbug.org>
14837         * include/grub/misc.h (memmove): New prototype.
14838         (memcpy): Likewise.
14840 2005-01-22  Hollis Blanchard  <hollis@penguinppc.org>
14842         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
14843         `devpath' to 0.  Use `name' instead of `devpath' with `grub_strndup'.
14845 2005-01-22  Marco Gerards  <metgerards@student.han.nl>
14847         * kern/misc.c (grub_strndup): Function rewritten.
14849 2005-01-22  Vincent Pelletier  <subdino2004@yahoo.fr>
14851         * normal/menu.c (TERM_WIDTH): Macro redefined.
14852         (TERM_TOP_BORDER_Y): Likewise.
14853         (draw_border): Replaced while-loop by a for-loop.  Make the number
14854         of lines consistent with the number of lines displayed in
14855         print_entries.  Added a margin below the rectangle.
14856         (print_entry): Make the entry fit in the rectangle.
14857         (print_entries): Display the scroll arrows next to the right
14858         border.
14860 2005-01-21  Marco Gerards  <metgerards@student.han.nl>
14862         * fs/minix.c (grub_minix_find_file): Reserve more space for
14863         `fpath' so the \0 can be stored.  Use `grub_strcpy' instead of
14864         `grub_strncpy' to copy `path' into it.
14866 2005-01-21  Marco Gerards  <metgerards@student.han.nl>
14868         Add the loopback device, a device via which files can be accessed
14869         as devices.
14871         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/loopback.c'.
14872         (pkgdata_MODULES): Add loopback.mod.
14873         (loopback_mod_SOURCES): New variable.
14874         (loopback_mod_CFLAGS): Likewise.
14875         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
14876         `disk/loopback.c'.
14877         (pkgdata_MODULES): Add loopback.mod.
14878         (loopback_mod_SOURCES): New variable.
14879         (loopback_mod_CFLAGS): Likewise.
14880         * disk/loopback.c: new file.
14881         * include/grub/normal.h (grub_loop_init): New prototype.
14882         (grub_loop_fini): New prototype.
14883         * util/grub-emu.c (main): Initialize and de-initialize loopback
14884         support.
14885         * include/grub/disk.h (grub_disk_dev_id): Add
14886         `GRUB_DISK_DEVICE_LOOPBACK_ID'.
14888 2005-01-20  Hollis Blanchard  <hollis@penguinppc.org>
14890         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_enter): New
14891         function.
14892         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add suspend.mod.
14893         (suspend_mod_SOURCES): New variable.
14894         (suspend_mod_CFLAGS): Likewise.
14895         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_enter):
14896         New prototype.
14897         * commands/ieee1275/suspend.c: New file.
14899 2005-01-20  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
14901         * include/grub/dl.h (GRUB_MOD_INIT): Changed `__attribute__
14902         ((unused))' to `__attribute__ ((used))'.
14903         (GRUB_MOD_FINI): Likewise.
14904         * kern/dl.c (grub_dl_load_file): Fix null pointer dereference.
14905         * genmk.rb (PModule): Assign space to common symbols when linking
14906         modules.
14908 2005-01-20  Marco Gerards  <metgerards@student.han.nl>
14910         * include/grub/mm.h (grub_mm_init_region): Change the type of the
14911         `unsigned' arguments to `grub_size_t'.
14912         (grub_malloc): Likewise.
14913         (grub_realloc): Likewise.
14914         (grub_memalign): Likewise.
14915         * kern/i386/dl.c (grub_arch_dl_check_header): Likewise.
14916         * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
14917         * util/misc.c (grub_malloc): Likewise.
14918         (grub_realloc): Likewise.
14919         * kern/mm.c (get_header_from_pointer): Change the casts to
14920         `unsigned' into a cast to `grub_size_t'.
14922         * fs/fshelp.c (grub_fshelp_find_file): The `oldnode' should always
14923         point to `currnode' when `currnode' is changed.
14925         * util/grub-emu.c (main): Initialize `progname'.  Reported by Nico
14926         Schottelius <nico-linux@schottelius.org>.
14928 2005-01-09  Hollis Blanchard  <hollis@penguinppc.org>
14930         * util/powerpc/ieee1275/grub-mkimage.c: Include <string.h>.
14931         (note_path): Remove variable.
14932         (GRUB_IEEE1275_NOTE_NAME): New macro.
14933         (GRUB_IEEE1275_NOTE_TYPE): Likewise.
14934         (grub_ieee1275_note_hdr): New structure.
14935         (grub_ieee1275_note_desc): Likewise.
14936         (grub_ieee1275_note): Likewise.
14937         (load_note): Remove `dir' argument.  All callers updated.  Remove
14938         `note_img' and `path'.  Do not load a file from `note_path'.
14939         Initialize a struct grub_ieee1275_note and write that to `out'.
14940         Use GRUB_IEEE1275_MODULE_BASE instead of MODULE_BASE.
14942 2005-01-05  Marco Gerards  <metgerards@student.han.nl>
14944         * util/misc.c (grub_util_read_image): Revert last change.  It
14945         called `grub_util_read_at', which seeks from the beginning of the
14946         file.
14948 2005-01-04  Hollis Blanchard  <hollis@penguinppc.org>
14950         * TODO: Add note about endianness in grub-mkimage.
14951         * boot/powerpc/ieee1275/crt0.S (note): Remove unused .note
14952         section.
14953         * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Add grub-mkimage.
14954         (grub_mkimage_SOURCES): New target.
14955         * include/grub/kernel.h (grub_start_addr): Remove variable.
14956         (grub_end_addr): Likewise.
14957         (grub_total_module_size): Likewise.
14958         (grub_kernel_image_size): Likewise.
14959         (GRUB_MODULE_MAGIC): New constant.
14960         (grub_module_info): New structure.
14961         (grub_arch_modules_addr): New prototype.
14962         (grub_get_end_addr): Remove prototype.
14963         * include/grub/i386/pc/kernel.h (grub_end_addr): New prototype.
14964         * include/grub/powerpc/ieee1275/kernel.h: New file.
14965         * include/grub/util/misc.h (grub_util_get_fp_size): New
14966         prototype.
14967         (grub_util_read_at): Likewise.
14968         (grub_util_write_image_at): Likewise.
14969         * kern/main.c (grub_get_end_addr): Remove function.
14970         (grub_load_modules): Call grub_arch_modules_addr instead of using
14971         grub_end_addr.  Look for a grub_module_info struct in memory.  Use
14972         the grub_module_info fields instead of calling grub_get_end_addr
14973         as loop conditions.  Move grub_add_unused_region code here.
14974         (grub_add_unused_region): Remove function.
14975         * kern/i386/pc/init.c: Include grub/cache.h.
14976         (grub_machine_init): Remove call to grub_get_end_addr.  Remove
14977         one call to add_mem_region.
14978         (grub_arch_modules_addr): New function.
14979         * kern/powerpc/ieee1275/init.c (grub_end_addr): Remove variable.
14980         (grub_total_module_size): Likewise.
14981         Include grub/machine/kernel.h.
14982         (grub_arch_modules_addr): New function.
14983         * util/grub-emu.c (grub_end_addr): Remove variable.
14984         (grub_total_module_size): Likewise.
14985         (grub_arch_modules_addr): New function.
14986         * util/misc.c: Include unistd.h.
14987         (grub_util_get_fp_size): New function.
14988         (grub_util_read_at): Likewise.
14989         (grub_util_write_image_at): Likewise.
14990         (grub_util_read_image): Call grub_util_read_at.
14991         (grub_util_write_image): Call grub_util_write_image_at.
14992         * util/i386/pc/grub-mkimage.c (generate_image): Allocate
14993         additional memory in kernel_img for a struct grub_module_info.
14994         Fill in that grub_module_info.
14995         * util/powerpc/ieee1275/grub-mkimage.c: New file.
14997 2005-01-03  Hollis Blanchard  <hollis@penguinppc.org>
14999         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_milliseconds):
15000         New function.
15001         * include/grub/powerpc/ieee1275/ieee1275.h
15002         (grub_ieee1275_milliseconds): New prototype.
15003         * include/grub/powerpc/ieee1275/time.h (GRUB_TICKS_PER_SECOND):
15004         Change to 1000.
15005         * kern/powerpc/ieee1275/init.c (grub_get_rtc): Call
15006         grub_ieee1275_milliseconds.
15008 2005-01-03  Hollis Blanchard  <hollis@penguinppc.org>
15010         * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_realmode): New
15011         variable.
15012         (find_options): New function.
15013         (cmain): Call find_options.
15014         * include/grub/powerpc/ieee1275/ieee1275.h
15015         (grub_ieee1275_realmode): New extern variable.
15016         * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Only call
15017         grub_map if grub_ieee1275_realmode is false.
15019 2004-12-29  Marco Gerards  <metgerards@student.han.nl>
15021         * normal/cmdline.c (grub_cmdline_get): Redone logic so no empty
15022         lines are inserted and make it work like readline.  Reported by
15023         Vincent Pelletier <subdino2004@yahoo.fr>.
15025 2004-12-28  Marco Gerards  <metgerards@student.han.nl>
15027         * boot/powerpc/ieee1275/crt0.S (_start): Don't set up the stack.
15029         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCE): Remove
15030         `kern/powerpc/cache.S'.
15032 2004-12-27  Marco Gerards  <metgerards@student.han.nl>
15034         * genmk.rb: Handle the `Program' class in the main loop.  Written
15035         by Johan Rydberg <jrydberg@gnu.org>.
15036         (Program): New class.
15037         (programs): New variable.
15038         * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h>
15039         instead of "grub/machine/ieee1275.h".  Include <grub/kernel.h>
15040         instead of "grub/kernel.h".  Include <grub/machine/init.h>.
15041         (help_arch): Function removed.
15042         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add
15043         `powerpc/libgcc.h' and `loader.h'.
15044         (pkgdata_PROGRAMS): New variable.
15045         (sbin_UTILITIES): Variable removed.
15046         (grub_emu_SOURCES): Added kern/powerpc/cache.S.
15047         (grubof_SOURCES): Variable re-defined so it only includes the
15048         core functionality.
15049         (grubof_CFLAGS): Remove `-DGRUBOF'.
15050         (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS,
15051         (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES)
15052         (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS)
15053         (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES)
15054         (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS)
15055         (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES)
15056         (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS)
15057         (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS)
15058         (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES)
15059         (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS)
15060         (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
15061         (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES)
15062         (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS)
15063         (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES)
15064         (pc_mod_CFLAGS): New variables.
15065         * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>.
15066         (grub_ofdisk_iterate): Add a prototype for `dev_iterate'.
15067         * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype.
15068         * include/grub/loader.h (grub_os_area_addr, grub_os_area_size):
15069         Moved from here...
15070         * include/grub/i386/pc/init.h (grub_os_area_addr)
15071         (rub_os_area_size): ... to here.
15072         * include/grub/powerpc/ieee1275/ieee1275.h
15073         (grub_ieee1275_entry_fn): Export symbol.
15074         * include/grub/powerpc/ieee1275/init.h: New file.
15075         * include/grub/powerpc/libgcc.h: Likewise.
15076         * include/grub/cache.h: Likewise.
15077         * kern/powerpc/cache.S: Likewise.  Written by Hollis Blanchard
15078         <hollis@penguinppc.org>.
15079         * kern/dl.c: Include <grub/cache.h>.
15080         (grub_dl_flush_cache): New function.
15081         (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache
15082         for this module.
15083         * kern/powerpc/ieee1275/init.c (grub_ofdisk_init)
15084         (grub_console_init): Removed prototypes.
15085         (grub_machine_init): Don't initialize the modules anymore.
15086         * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function
15087         static.
15088         * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN):
15089         Macro undef removed.
15090         (GRUB_HOST_WORDS_BIGENDIAN): New macro.
15091         * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add
15092         relocation `R_PPC_REL32'.  Return an error when the relocation is
15093         unknown.
15094         * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'.
15095         * kern/i386/pc/init.c (grub_arch_sync_caches): New function.
15096         * util/misc.c (grub_arch_sync_caches): Likewise.
15098 2004-12-19  Marco Gerards  <metgerards@student.han.nl>
15100         * conf/powerpc-ieee1275.rmk (MOSTLYCLEANFILES): Remove
15101         `symlist.c', add `grubof_symlist.c'.
15102         (symlist.c): Variable removed.
15103         (grubof_HEADERS): Variable added.
15104         (grubof_symlist.c): New target.
15105         (kernel_syms.lst): Use `grubof_HEADERS' instead of
15106         `kernel_img_HEADERS'.
15107         (grubof_SOURCES): Add `kern/powerpc/dl.c' and `grubof_symlist.c'.
15108         * kern/powerpc/dl.c: New file.
15109         * kern/powerpc/ieee1275/init.c (grub_arch_dl_check_header):
15110         Function removed.
15111         (grub_arch_dl_relocate_symbols): Likewise.
15112         (grub_register_exported_symbols): Likewise.
15114 2004-12-13  Marco Gerards  <metgerards@student.han.nl>
15116         * fs/ext2.c (grub_ext2_open): Don't use data after freeing it.
15117         (grub_ext2_dir): Likewise.  Don't return in case of an error, jump
15118         to fail instead.  Reported by Vincent Pelletier
15119         <subdino2004@yahoo.fr>.
15121         * fs/fshelp.c (grub_fshelp_find_file): Don't free `oldnode' when
15122         it is not allocated.  Reported by Vincent Pelletier
15123         <subdino2004@yahoo.fr>.
15125         * normal/cmdline.c (grub_tab_complete): Add a blank line to the
15126         output so the output looks better.
15128 2004-12-04  Marco Gerards  <metgerards@student.han.nl>
15130         Modulize the partition map support and add support for the amiga
15131         partition map.
15133         * commands/ls.c: Include <grub/partition.h> instead of
15134         <grub/machine/partition.h>.
15135         * kern/disk.c: Likewise.
15136         * kern/rescue.c: Likewise.
15137         * loader/i386/pc/chainloader.c: Likewise.
15138         * normal/cmdline.c: Likewise.
15139         * kern/powerpc/ieee1275/init.c: Likewise.
15140         (grub_machine_init): Call `grub_pc_partition_map_init',
15141         `grub_amiga_partition_map_init' and
15142         `grub_apple_partition_map_init'.
15143         * conf/i386-pc.rmk (kernel_img_SOURCES): Remove
15144         `disk/i386/pc/partition.c'.  Add `kern/partition.c'.
15145         (kernel_img_HEADERS): Remove `machine/partition.h'.  Add
15146         `partition.h' and `pc_partition.h'.
15147         (grub_setup_SOURCES): Remove
15148         `disk/i386/pc/partition.c'.  Add `kern/partition.c',
15149         `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
15150         (grub_emu_SOURCES): Likewise.
15151         (pkgdata_MODULES): Add `amiga.mod', `apple.mod' and `pc.mod'.
15152         (amiga_mod_SOURCES, amiga_mod_CFLAGS, apple_mod_SOURCES)
15153         (apple_mod_CFLAGS, pc_mod_SOURCES, pc_mod_CFLAGS): New variables.
15154         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
15155         `disk/powerpc/ieee1275/partition.c'.  Add `kern/partition.c',
15156         `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
15157         (grubof_SOURCES): Likewise.
15158         * disk/i386/pc/partition.c: File removed.
15159         * disk/powerpc/ieee1275/partition.c: Likewise.
15160         * include/grub/powerpc/ieee1275/partition.h: Likewise.
15161         * include/grub/i386/pc/partition.h: Likewise.
15162         * kern/partition.c: New file.
15163         * partmap/amiga.c: Likewise.
15164         * partmap/apple.c: Likewise.
15165         * partmap/pc.c: Likewise.
15166         * include/grub/partition.h: Likewise..
15167         * include/grub/pc_partition.h: Likewise.
15168         * util/grub-emu.c: Include <grub/partition.h> instead of
15169         <grub/machine/partition.h>.
15170         (main): Call `grub_pc_partition_map_init',
15171         `grub_amiga_partition_map_init' and
15172         `grub_apple_partition_map_init' and deinitialize afterwards.
15173         * util/i386/pc/biosdisk.c: Include `#include
15174         <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
15175         `<grub/machine/partition.h>'.
15176         * util/i386/pc/grub-setup.c: Likewise.
15177         * util/i386/pc/biosdisk.c: Likewise.
15178         (grub_util_biosdisk_get_grub_dev): Only access the PC specific
15179         partition information in case of a PC partition.
15180         * util/i386/pc/grub-setup.c: Include `#include
15181         <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
15182         `<grub/machine/partition.h>'.
15183         (setup): Only access the PC specific partition information in case
15184         of a PC partition.
15186 2004-11-17  Hollis Blanchard  <hollis@penguinppc.org>
15188         * kern/powerpc/ieee1275/init.c (grub_setjmp): Remove function.
15189         (grub_longjmp): Likewise.
15190         * include/grub/powerpc/setjmp.h (grub_jmp_buf): Set array size to
15191         20.
15192         * normal/powerpc/setjmp.S: New file.
15193         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
15194         `normal/powerpc/setjmp.S'.
15195         (grubof_CFLAGS): Add `-DGRUBOF'.
15196         * include/grub/setjmp.h [GRUB_UTIL]: Changed condition to
15197         [GRUB_UTIL && !GRUBOF].
15199 2004-11-16  Marco Gerards  <metgerards@student.han.nl>
15201         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Skip any
15202         property named `name'.  Correctly handle the error returned by
15203         `grub_ieee1275_finddevice' if a device can not be opened.
15205 2004-11-02  Hollis Blanchard  <hollis@penguinppc.org>
15207         * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_readkey): Test
15208         `actual' for negativity.
15209         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
15210         kern/fshelp.c.
15212 2004-11-01  Marco Gerards  <metgerards@student.han.nl>
15214         * term/i386/pc/vga.c (VGA_HEIGHT): Changed to 350.
15215         (PAGE_OFFSET): New macro.
15216         (CRTC_ADDR_PORT): Likewise.
15217         (CRTC_DATA_PORT): Likewise.
15218         (START_ADDR_HIGH_REGISTER): Likewise.
15219         (START_ADDR_LOW_REGISTER): Likewise.
15220         (GRAPHICS_ADDR_PORT): Likewise.
15221         (GRAPHICS_DATA_PORT): Likewise.
15222         (READ_MAP_REGISTER): Likewise.
15223         (INPUT_STATUS1_REGISTER): Likewise.
15224         (INPUT_STATUS1_VERTR_BIT): Likewise.
15225         (page): New variable.
15226         (wait_vretrace): New function.
15227         (set_read_map): Likewise.
15228         (set_start_address): Likewise.
15229         (grub_vga_init): Use mode 0x10 instead of mode 0x12.  Switch to
15230         the right page.
15231         (check_vga_mem): Take the page into account.
15232         (write_char): Likewise.
15233         (write_cursor): Likewise.
15234         (scroll_up): Likewise.  Copy the page to the page that is not
15235         shown and switch between both pages.
15236         (grub_vga_putchar): Fix off by one error.
15237         (grub_vga_cls): Wait for the vertical retrace.  Take the page into
15238         account.
15240 2004-11-01  Marco Gerards  <metgerards@student.han.nl>
15242         Add support for iso9660 (including rockridge).
15244         * conf/i386-pc.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
15245         (iso9660_mod_SOURCES): New variable.
15246         (iso9660_mod_CFLAGS): Likewise.
15247         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
15248         * include/grub/fs.h (grub_iso9660_init): New prototype.
15249         * util/grub-emu.c (main): Call `grub_iso9660_init'.
15250         * fs/iso9660.c: New file.
15252         * include/grub/misc.h (grub_strncat): New prototype.
15253         * kern/misc.c (grub_strncat): New function.
15255         * fs/hfs.c (grub_hfs_mount): Translate the error
15256         `GRUB_ERR_OUT_OF_RANGE' to `GRUB_ERR_BAD_FS'.
15257         * fs/jfs.c (grub_jfs_mount): Likewise.
15258         * fs/ufs.c (grub_ufs_mount): Likewise.
15260 2004-10-28  Hollis Blanchard  <hollis@penguinppc.org>
15262         * boot/powerpc/ieee1275/cmain.c (cmain): Remove asm statements
15263         which initialized BAT registers.
15264         * boot/powerpc/ieee1275/ieee1275.c (IEEE1275_CALL_ENTRY_FN,
15265         grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
15266         Move from here...
15267         * include/grub/powerpc/ieee1275/ieee1275.h (IEEE1275_CALL_ENTRY_FN,
15268         grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
15269         ... to here.
15270         * kern/powerpc/ieee1275/openfw.c (grub_map): New function.
15271         (grub_mapclaim): Likewise.
15272         * loader/powerpc/ieee1275/linux.c (grub_load_linux): Use
15273         grub_mapclaim instead of grub_ieee1275_claim.  Assign linux_addr by
15274         hand.
15276 2004-10-19  Hollis Blanchard  <hollis@penguinppc.org>
15278         * conf/powerpc-ieee1275.rmk (COMMON_ASFLAGS): Remove -fno-builtin.
15279         (COMMON_CFLAGS): Remove -fno-builtin and -D__ASSEMBLY__. Add
15280         -ffreestanding and -msoft-float.
15282 2004-10-15  Hollis Blanchard  <hollis@penguinppc.org>
15284         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Do not
15285         append ":0" to devpath if the GRUB_IEEE1275_NO_PARTITION_0 flag is
15286         set in grub_ieee1275_flags.
15288 2004-10-14  Hollis Blanchard  <hollis@penguinppc.org>
15290         * include/grub/powerpc/ieee1275/ieee1275.h (abort): Add function
15291         prototype.
15292         * kern/powerpc/ieee1275/init.c (grub_machine_init): Call
15293         grub_console_init first.
15294         Change the memory range used for grub_ieee1275_claim and
15295         grub_mm_init_region.
15296         Print an error message if the claim fails.
15297         Include <grub/misc.h>.
15299 2004-10-13  Hollis Blanchard  <hollis@penguinppc.org>
15301         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_iterate):
15302         Call grub_children_iterate for device nodes of type `scsi',
15303         `ide', or `ata'.
15304         (grub_ofdisk_open): Remove manual device alias resolution.
15305         Fix memory leak when device cannot be opened.
15306         * include/grub/powerpc/ieee1275/ieee1275.h
15307         (grub_children_iterate): New prototype.
15308         * kern/powerpc/ieee1275/openfw.c (grub_children_iterate):
15309         New function.
15310         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
15311         Return -1 if args.size was -1.
15313 2004-10-11  Hollis Blanchard  <hollis@penguinppc.org>
15315         * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_flags): New global.
15316         (cmain): Accept 3 parameters. Test for 0xdeadbeef, indicating Old
15317         World Macintosh. If Old Wold, set flag in grub_ieee1275_flags; claim
15318         Open Firmware's memory for it; claim memory from _start to _end.
15319         * boot/powerpc/ieee1275/crt0.S (__bss_start): New extern.
15320         (_end): New extern.
15321         (_start): Zero BSS from __bss_start to _end.
15322         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
15323         New extern.
15324         (GRUB_IEEE1275_NO_PARTITION_0): New #define.
15326 2004-10-11  Hollis Blanchard  <hollis@penguinppc.org>
15328         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): Return
15329         -1 if args.base was -1.
15331 2004-10-08  Hollis Blanchard  <hollis@penguinppc.org>
15333         * term/powerpc/ieee1275/ieee1275.c (grub_ofconsole_cls): Use an ANSI
15334         escape sequence instead of a literal ^L. Also call
15335         grub_ofconsole_gotoxy.
15337 2004-10-03  Hollis Blanchard  <hollis@penguinppc.org>
15339         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): change
15340         void *  arguments to grub_addr_t.  All callers updated.  Also make
15341         the `result' argument optional.
15342         (grub_ieee1275_release): change void * arguments to grub_addr_t.
15343         All callers updated.
15345 2004-09-22  Hollis Blanchard  <hollis@penguinppc.org>
15347         * commands/ls.c (grub_ls_list_files): Use the string following the
15348         initial ')', if present, as the filesystem path.
15349         * kern/rescue.c (grub_rescue_cmd_ls): Likewise.
15351         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): List crt0.S first.
15353 2004-09-18  Yoshinori K. Okuji  <okuji@enbug.org>
15355         Make the source code of the menu interface more readable.
15357         * normal/menu.c: Include grub/mm.h.
15358         (TERM_WIDTH): New macro.
15359         (TERM_HEIGHT): Likewise.
15360         (TERM_INFO_HEIGHT): Likewise.
15361         (TERM_MARGIN): Likewise.
15362         (TERM_SCROLL_WIDTH): Likewise.
15363         (TERM_TOP_BORDER_Y): Likewise.
15364         (TERM_LEFT_BORDER_X): Likewise.
15365         (TERM_BORDER_WIDTH): Likewise.
15366         (TERM_MESSAGE_HEIGHT): Likewise.
15367         (TERM_BORDER_HEIGHT): Likewise.
15368         (TERM_NUM_ENTRIES): Likewise.
15369         (TERM_FIRST_ENTRY_Y): Likewise.
15370         (TERM_ENTRY_WIDTH): Likewise.
15371         (TERM_CURSOR_X): Likewise.
15372         (draw_border): Use macros instead of magic numbers.
15373         (print_entry): Likewise.
15374         (print_entries): Likewise.
15375         (run_menu): Likewise. Also, handle the key 'e'.
15376         (run_menu_entry): Ignore empty command lines.
15377         (print_message): Added a new argument EDIT. If EDIT is true,
15378         print a different message.
15379         (init_page): Likewise.
15380         (edit_menu_entry): New function. Not implemented yet.
15382 2004-09-17  Marco Gerards  <metgerards@student.han.nl>
15384         Add `linux.mod' and `multiboot.mod' so linux and multiboot kernels
15385         can be loaded from normal mode.
15387         * conf/i386-pc.rmk (pkgdata_MODULES): Add `linux.mod' and
15388         `multiboot.mod'.
15389         (linux_mod_SOURCES, linux_mod_CFLAGS, multiboot_mod_SOURCES)
15390         (multiboot_mod_CFLAGS): New variables.
15391         * loader/i386/pc/linux_normal.c: New file.
15392         * loader/i386/pc/multiboot_normal.c: Likewise.
15394         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Don't use the
15395         attribute `unused'.
15397         * fs/ext2.c (grub_ext2_iterate_dir): Fix typos in inode type.  Use
15398         `fdiro' to read the mode information from instead of `diro'.
15400         * fs/fshelp.c (grub_fshelp_find_file): Set type to foundtype after
15401         looking up a symlink.
15403         * include/grub/normal.h (GRUB_COMMAND_FLAG_NO_ARG_PARSE): New
15404         macro.
15405         * normal/command.c (grub_command_execute): Don't parse the
15406         arguments when `GRUB_COMMAND_FLAG_NO_ARG_PARSE' is set in the
15407         flags of the command.
15409         * normal/menu.c (grub_menu_run): Fix typo.
15411 2004-09-14  Hollis Blanchard  <hollis@penguinppc.org>
15413         * kern/powerpc/ieee1275/init.c (abort): Trap into Open Firmware.
15415         * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_gotoxy): Use
15416         `y + 1' instead of `y - 1'.
15418         * conf/powerpc-ieee1275.rmk (grubof_LDFLAGS): Add `-N' and `-S'.
15420 2004-09-14  Yoshinori K. Okuji  <okuji@enbug.org>
15422         From Hollis Blanchard <hollis@penguinppc.org>:
15423         * kern/misc.c (memmove): New alias for grub_memmove.
15424         (memcmp): New alias for grub_memcmp.
15425         (memset): New alias for grub_memset.
15426         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
15427         Change "int handle" to "grub_ieee1275_phandle_t handle".
15428         * include/grub/powerpc/ieee1275/ieee1275.h
15429         (grub_ieee1275_get_property): Likewise.
15431 2004-09-12  Tomas Ebenlendr  <ebik@ucw.cz>
15433         Added normal mode command `chainloader' as module chain.mod, which
15434         depends on normal.mod and _chain.mod.
15436         * conf/i386-pc.rmk (pkgdata_MODULES): Add `chain.mod'.
15437         (chain_mod_SOURCES, chain_mod_CFLAGS): Variables added.
15438         * include/grub/i386/pc/loader.h (grub_rescue_cmd_chainloader):
15439         Deleted prototype.
15440         * loader/i386/pc/chainloader.c (grub_rescue_cmd_chainloader): All
15441         but arguments parsing moved to ...
15442         (grub_chainloader_cmd): ... here.  New function.
15443         * include/grub/i386/pc/chainloader.h: New file.
15444         * loader/i386/pc/chainloader_normal.c: Likewise.
15446 2004-09-11  Marco Gerards  <metgerards@student.han.nl>
15448         * conf/i386-pc.rmk (kernel_img_SOURCES): Added kern/fshelp.c.
15449         (grub_mkimage_LDFLAGS): Likewise.
15450         (grub_emu_SOURCES): Likewise.
15451         (kernel_img_HEADERS): Added fshelp.h.
15452         * fs/ext2.c: Include <grub/fshelp.h>.
15453         (FILETYPE_REG): New macro.
15454         (FILETYPE_INO_REG): Likewise.
15455         (grub_ext_sblock): Renamed to `grub_ext2_sblock'.
15456         Changed all users.
15457         (ext2_block_group): Renamed to `grub_ext2_block_group'.  Changed
15458         all users.
15459         (grub_fshelp_node): New struct.
15460         (grub_ext2_data): Added member `diropen'.  Changed member `inode'
15461         to a pointer.
15462         (grub_ext2_get_file_block): Removed function.
15463         (grub_ext2_read_block): New function.
15464         (grub_ext2_read_file): Replaced parameter `data' by `node'.
15465         This function was written.
15466         (grub_ext2_mount): Read the root inode.  Create a diropen struct.
15467         (grub_ext2_find_file): Removed function.
15468         (grub_ext2_read_symlink): New function.
15469         (grub_ext2_iterate_dir): Likewise.
15470         (grub_ext2_open): Rewritten.
15471         (grub_ext2_dir): Rewritten.
15472         * include/grub/fshelp.h: New file.
15473         * fs/fshelp.c: Likewise.
15475 2004-09-10  Yoshinori K. Okuji  <okuji@enbug.org>
15477         * normal/menu.c: Include grub/loader.h and grub/machine/time.h.
15478         (print_message): Add a missing newline.
15479         (run_menu): Added timeout support.
15480         (run_menu_entry): New local function.
15481         (grub_menu_run): Added support for booting.
15483         * kern/loader.c (grub_loader_is_loaded): New function.
15485         * include/grub/powerpc/ieee1275/time.h: Include grub/symbol.h.
15486         (grub_get_rtc): Exported.
15488         * include/grub/i386/pc/time.h: Include grub/symbol.h.
15489         (grub_get_rtc): Exported.
15491         * include/grub/normal.h (struct grub_command_list): Remove
15492         constant from the member `command'.
15494         * include/grub/loader.h (grub_loader_is_loaded): Declared.
15496         * include/grub/err.h (GRUB_ERR_INVALID_COMMAND): New constant.
15498         * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/time.h.
15500 2004-08-28  Marco Gerards  <metgerards@student.han.nl>
15502         Add support for the JFS filesystem.
15504         * fs/jfs.c: New file.
15505         * include/grub/fs.h (grub_jfs_init): New prototype.
15506         (grub_jfs_fini): New prototype.
15507         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/jfs.c.
15508         (grub_emu_SOURCES): Likewise.
15509         (pkgdata_MODULES): Add jfs.mod.
15510         (jfs_mod_SOURCES): New variable.
15511         (jfs_mod_CFLAGS): Likewise.
15512         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs.jfs.c.
15513         (grubof_SOURCES): Likewise.
15514         * util/grub-emu.c (main): Initialize and deinitialize JFS support.
15516         * fs/fat.c (grub_fat_find_dir): Convert the filename little
15517         endian to the host endian.
15518         (grub_fat_utf16_to_utf8): Move function from there...
15519         * kern/misc.c (grub_utf16_to_utf8): ...to here.  Do not convert
15520         the endianness of the source string anymore.
15521         * include/grub/misc.h (grub_utf16_to_utf8): New prototype.
15523 2004-08-24  Marco Gerards  <metgerards@student.han.nl>
15525         * commands/boot.c (grub_boot_init) [GRUB_UTIL]: Make conditional.
15526         (grub_boot_fini) [GRUB_UTIL]: Likewise.
15527         (GRUB_MOD_INIT) [!GRUB_UTIL]: Likewise.
15528         (GRUB_MOD_FINI) [!GRUB_UTIL]: Likewise.
15530         * fs/hfs.c (grub_hfs_find_node): Add a prototype for `node_found'.
15531         (grub_hfs_iterate_dir): Make the function static.  Add prototypes
15532         for `node_found' and `it_dir'.
15533         (grub_hfs_dir): Add prototype for `dir_hook'.
15535         * fs/minix.c (grub_minix_get_file_block): Add prototype for
15536         `grub_get_indir'.  Rename `indir' in two blocks to `indir16'
15537         and `indir32' to silence a gcc warning.
15539         * include/grub/fs.h (grub_hfs_init): New prototype.
15540         (grub_hfs_fini): Likewise.
15543 2004-08-21  Yoshinori K. Okuji  <okuji@enbug.org>
15545         Each disk device has its own id now. This is useful to make use
15546         of multiple disk devices.
15548         * include/grub/disk.h (grub_disk_dev_id): New enum.
15549         (GRUB_DISK_DEVICE_BIOSDISK_ID): New constant.
15550         (GRUB_DISK_DEVICE_OFDISK_ID): Likewise.
15552         * disk/i386/pc/biosdisk.c (grub_biosdisk_dev): Specify
15553         GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
15555         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_dev): Specify
15556         GRUB_DISK_DEVICE_OFDISK_ID as an id.
15558         * util/i386/pc/biosdisk.c (grub_util_biosdisk_dev): Specify
15559         GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
15561         * include/grub/disk.h (struct grub_disk_dev): Added a new member
15562         "id" which is used by the cache manager.
15564         * normal/main.c (grub_normal_init_page): Use "GNU GRUB" instead
15565         of just "GRUB".
15567 2004-08-18  Marco Gerards  <metgerards@student.han.nl>
15569         * fs/hfs.c: New file.
15570         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/hfs.c.
15571         (grub_emu_SOURCES): Likewise.
15572         (pkgdata_MODULES): Add hfs.mod.
15573         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/hfs.c.
15574         (grubof_SOURCES): Likewise.
15575         * util/grub-emu.c (main): Initialize and deinitialize HFS support.
15577         * include/grub/misc.h (grub_strncasecmp): Add prototype.
15578         * kern/misc.c (grub_strncasecmp): Add function.
15580 2004-08-14  Marco Gerards  <metgerards@student.han.nl>
15582         * include/grub/arg.h (GRUB_ARG_OPTION_OPTIONAL): Surround macro
15583         with parentheses.
15585         * fs/ext2.c (FILETYPE_UNKNOWN): New macro.
15586         (grub_ext2_dir): In case the directory entry type is unknown, read
15587         it from the inode.
15589 2004-08-02  Peter Bruin  <pjbruin@dds.nl>
15591         * loader/powerpc/ieee1275/linux.c (grub_linux_init): Pass
15592         grub_load_linux instead of grub_rescue_cmd_linux as second
15593         argument of grub_rescue_register_command.
15595         * Makefile.in (RMKFILES): Add conf/powerpc-ieee1275.rmk.
15597 2004-07-27  Marco Gerards  <metgerards@student.han.nl>
15599         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_release): New
15600         function.
15601         * commands/boot.c: Remove the check for `GRUB_UTIL'.
15602         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
15603         `loader/powerpc/ieee1275/linux.c',
15604         `loader/powerpc/ieee1275/linux_normal.c' and `commands/boot.c'.
15605         * include/grub/powerpc/ieee1275/ieee1275.h
15606         (grub_ieee1275_release): New prototype.
15607         * include/grub/powerpc/ieee1275/loader.h: Rewritten.
15608         * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize
15609         normal, boot, linux and linux_normal.
15610         * loader/powerpc/ieee1275/linux.c: New file.
15611         * loader/powerpc/ieee1275/linux_normal.c: Likewise.
15613 2004-07-12  Marco Gerards  <metgerards@student.han.nl>
15615         * normal/arg.c (grub_arg_parse): Correct error handling after
15616         reallocating the argumentlist (check if `argl' is not null instead
15617         of checking if `args' is not null).
15618         * kern/mm.c (grub_realloc): Return the same pointer when using the
15619         same region, instead of returning the header address.
15621 2004-07-11  Marco Gerards  <metgerards@student.han.nl>
15623         * disk/powerpc/ieee1275/partition.c (grub_partition_iterate): Skip
15624         one block instead of two when looking for the initial partition.
15625         (grub_partition_probe): Initialize the local variable `p' with 0.
15626         Use base 10 for the grub_strtoul call.
15627         * kern/misc.c (grub_strncpy): Fix off by one bug.  Eliminated the
15628         need for one local variable.
15629         (grub_strtoul): Don't add the new value to `num', instead of that
15630         just assign it.
15632 2004-07-11  Marco Gerards  <metgerards@student.han.nl>
15634         * conf/i386-pc.rmk (pkgdata_IMAGE): Add pxeboot.img.
15635         (pxeboot_img_SOURCES): New variable.
15636         (pxeboot_img_ASFLAGS): Likewise.
15637         (pxeboot_img_LDFLAGS): Likewise.
15638         * boot/i386/pc/pxeboot.S: New file.  Based on pxeloader.S from
15639         GRUB Legacy and boot.S.  Adopted for GRUB 2 by lode leroy
15640         <lode_leroy@hotmail.com>.
15642 2004-06-27  Tomas Ebenlendr  <ebik@ucw.cz>
15644         * kern/rescue.c (grub_enter_rescue_mode): Don't continue when
15645         there was no input.
15647 2004-06-27  Tomas Ebenlendr  <ebik@ucw.cz>
15649         * normal/cmdline.c (grub_set_history): Fix off by one bug.  Fixed
15650         the history buffer logic.
15652 2004-06-27  Tomas Ebenlendr  <ebik@ucw.cz>
15654         * fs/ext2.c (FILETYPE_INO_MASK, FILETYPE_INO_DIRECTORY)
15655         (FILETYPE_INO_SYMLINK): New macros.
15656         (grub_ext2_find_file): Check if the node is a directory using the
15657         inode stat information instead of using the filetype in the
15658         dirent.  Exclude the first character of an absolute symlink.
15659         (grub_ext2_dir): Mask out the filetype part of the mode member of
15660         the inode.
15662 2004-05-24  Marco Gerards  <metgerards@student.han.nl>
15664         Add support for UFS version 1 and 2.  Add support for the minix
15665         filesystem version 1 and 2, both the variants with 14 and 30 long
15666         filenames.
15668         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ufs.c and
15669         fs/minix.c.
15670         (grub_emu_SOURCES): Likewise.
15671         (pkgdata_MODULES): Add ufs.mod and minix.mod.
15672         (ufs_mod_SOURCES): New variable.
15673         (ufs_mod_CFLAGS): Likewise.
15674         (minix_mod_SOURCES): Likewise.
15675         (minix_mod_CFLAGS): Likewise.
15676         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/ufs.c and
15677         fs/minix.c.
15678         (grubof_SOURCES): Likewise.
15679         * fs/ufs.c: New file.
15680         * fs/minix.c: New file.
15681         * include/grub/fs.h (grub_ufs_init): New prototype.
15682         (grub_ufs_fini): Likewise.
15683         (grub_minix_init): Likewise.
15684         (grub_minix_fini): Likewise.
15685         * util/grub-emu.c (main): Initialize and deinitialize UFS and
15686         minix fs.
15688 2004-04-30  Jeroen Dekkers  <jeroen@dekkers.cx>
15690         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add normal/arg.c,
15691         commands/ls.c, commands/terminal.c, commands/boot.c,
15692         commands/cmp.c and commands/cat.c.
15693         (grubof_LDFLAGS): Add -nostdlib -static-libgcc -lgcc.
15695         * kern/powerpc/ieee1275/init.c: Include "grub/env.h" instead of
15696         "env.h"
15698 2004-04-04  Yoshinori K. Okuji  <okuji@enbug.org>
15700         All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
15701         and grub_, respectively. Because the conversion is trivial and
15702         mechanical, I omit the details here. Please refer to the CVS
15703         if you need more information.
15705 2004-04-04  Yoshinori K. Okuji  <okuji@enbug.org>
15707         * include/pupa: Renamed to ...
15708         * include/grub: ... this.
15709         * util/i386/pc/pupa-mkimage.c: Renamed to ...
15710         * util/i386/pc/grub-mkimage.c: ... this.
15711         * util/i386/pc/pupa-setup.c: Renamed to ...
15712         * util/i386/pc/grub-setup.c: ... this.
15713         * util/pupa-emu.c: Renamed to ...
15714         * util/grub-emu.c: ... this.
15716 2004-03-29  Marco Gerards  <metgerards@student.han.nl>
15718         Add support for the newworld apple macintosh (PPC).  This has been
15719         tested on the powerbook 2000 only.  It only adds support for
15720         generic ieee1275 functions, console and disk support.  This should
15721         be easy to port to other architectures with support for Open
15722         Firmware.
15724         * configure.ac: Accept the powerpc as host_cpu.  In the case of
15725         the powerpc cpu set the host_vendor to ieee1275.  Make sure the i386
15726         specific tests are only executed while building for the i386.
15727         Inverse test for crosscompile.
15728         * genmk.rb (Utility): Allow assembler files.
15729         * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno.
15730         * conf/powerpc-ieee1275.rmk: New file.
15731         * disk/powerpc/ieee1275/ofdisk.c: Likewise.
15732         * disk/powerpc/ieee1275/partition.c: Likewise.
15733         * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise.
15734         * include/pupa/powerpc/ieee1275/console.h: Likewise.
15735         * include/pupa/powerpc/ieee1275/partition.h: Likewise.
15736         * include/pupa/powerpc/ieee1275/time.h: Likewise.
15737         * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise.
15738         * include/pupa/powerpc/ieee1275/multiboot.h: Likewise.
15739         * include/pupa/powerpc/ieee1275/loader.h
15740         * include/pupa/powerpc/setjmp.h: Likewise.
15741         * include/pupa/powerpc/types.h: Likewise.
15742         * kern/powerpc/ieee1275/init.c: Likewise.
15743         * kern/powerpc/ieee1275/openfw.c: Likewise.
15744         * term/powerpc/ieee1275/ofconsole.c: Likewise.
15746         These files were written by Johan Rydberg
15747         (jrydberg@night.trouble.net) and I only modified them slightly.
15749         * boot/powerpc/ieee1275/cmain.c: New file.
15750         * boot/powerpc/ieee1275/crt0.S: Likewise.
15751         * boot/powerpc/ieee1275/ieee1275.c: Likewise.
15752         * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
15754 2004-03-14  Jeroen Dekkers  <jeroen@dekkers.cx>
15756         * Makefile.in: Update copyright.
15757         * genmodsrc.sh: Likewise.
15758         * gensymlist.sh: Likewise.
15759         * term/i386/pc/vga.c: Indent correctly.
15761         * util/i386/pc/pupa-mkimage.c (usage): Use PACKAGE_BUGREPORT as
15762         bugreporting address.
15763         * util/i386/pc/pupa-setup.c (usage): Likewise,
15764         (main): Call pupa_ext2_init and pupa_ext2_fini.
15766         * fs/fat.c (log2): Renamed to ...
15767         (fat_log2): ... this.
15768         All callers changed.
15769         * kern/misc.c (memcpy): Alias to pupa_memmove.
15770         * loader/i386/pc/multiboot.c (pupa_rescue_cmd_multiboot): Fix
15771         lvalue cast.
15772         * util/console.c (pupa_ncurses_fini): Return 0.
15774         * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open)[__linux__]:
15775         Move fail label here.
15776         [__GNU__]: Don't warn when using stat.
15777         (open_device)[!__linux__]: Check if FD < 0 instead of !FD.
15778         (pupa_util_biosdisk_get_pupa_dev)[__GNU__]: Change type of N to
15779         long int. Use strtol instead of strtoul.
15781 2004-03-14  Marco Gerards  <metgerards@student.han.nl>
15783         * commands/boot.c: New file.
15784         * commands/cat.c: Likewise.
15785         * commands/cmp.c: Likewise.
15786         * commands/ls.c: Likewise.
15787         * commands/terminal.c: Likewise.
15788         * normal/command.c: Include <pupa/env.h> and <pupa/dl.h>.
15789         (pupa_register_command): Changed interface to match the new
15790         argument parser.
15791         (pupa_command_execute): Changed (almost rewritten) so it uses
15792         pupa_split_command.  Added support for setting variables using the
15793         syntax `foo=bar'.
15794         (rescue_command): Changed to work with the new argument parser.
15795         (terminal_command): Moved from here to commands/terminal.c.
15796         (set_command): New function.
15797         (unset_command): New function.
15798         (insmod_command): New function.
15799         (rmmod_command): New function.
15800         (lsmod_command): New function.
15801         (pupa_command_init): Don't initialize the command terminal
15802         anymore.  Initialize the commands set, unset, insmod, rmmod and
15803         lsmod.
15804         * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/env.c.
15805         (kernel_img_HEADERS): Add arg.h and env.h.
15806         (pupa_mkimage_LDFLAGS): Add kern/env.c.
15807         (pupa_emu_SOURCES): Add kern/env.c, commands/ls.c,
15808         commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c,
15809         normal/arg.c.
15810         (pkgdata_MODULES): Add ls.mod, boot.mod, cmp.mod, cat.mod and
15811         terminal.mod.
15812         (normal_mod_SOURCES): Add normal/arg.c and normal/arg.c.
15813         (boot_mod_SOURCES): New variable.
15814         (terminal_mod_SOURCES): Likewise.
15815         (ls_mod_SOURCES): Likewise.
15816         (cmp_mod_SOURCES): Likewise.
15817         (cat_mod_SOURCES): Likewise.
15819         * normal/arg.c: New file.
15820         * kern/env.c: Likewise.
15821         * include/pupa/arg.h: Likewise.
15822         * include/pupa/env.h: Likewise.
15823         * font/manager.c (font_command): Changed to match argument parsing
15824         interface changes.
15825         (PUPA_MOD_INIT): Likewise.
15826         * hello/hello.c (pupa_cmd_hello): Likewise.
15827         (PUPA_MOD_INIT): Likewise.
15828         * include/pupa/disk.h: Include <pupa/device.h>.
15829         (pupa_print_partinfo): New prototype.
15830         * include/pupa/dl.h (pupa_dl_set_prefix): Prototype removed.
15831         (pupa_dl_get_prefix): Likewise.
15832         * include/pupa/misc.h: Include <pupa/err.h>.
15833         (pupa_isgraph): New prototype.
15834         (pupa_isdigit): Likewise.
15835         (pupa_split_cmdline): Likewise.
15836         * include/pupa/normal.h: Include <pupa/arg.h>.
15837         (pupa_command): Changed the prototype of the member `func' to
15838         match the argument parsing interface.  Added member `options'.
15839         (pupa_register_command): Updated to match function.
15840         (pupa_arg_parse): New prototype.
15841         (pupa_hello_init) [PUPA_UTIL]: New prototype.
15842         (pupa_hello_fini) [PUPA_UTIL]: Likewise.
15843         (pupa_ls_init) [PUPA_UTIL]: Likewise.
15844         (pupa_ls_fini) [PUPA_UTIL]: Likewise.
15845         (pupa_cat_init) [PUPA_UTIL]: Likewise.
15846         (pupa_cat_fini) [PUPA_UTIL]: Likewise.
15847         (pupa_boot_init) [PUPA_UTIL]: Likewise.
15848         (pupa_boot_fini) [PUPA_UTIL]: Likewise.
15849         (pupa_cmp_init) [PUPA_UTIL]: Likewise.
15850         (pupa_cmp_fini) [PUPA_UTIL]: Likewise.
15851         (pupa_terminal_init) [PUPA_UTIL]: Likewise.
15852         (pupa_terminal_fini) [PUPA_UTIL]: Likewise.
15853         * kern/disk.c: Include <pupa/file.h>.
15854         (pupa_print_partinfo): New function.
15855         * kern/dl.c: Include <pupa/env.h>.
15856         (pupa_dl_dir): Variable removed.
15857         (pupa_dl_load): Use the environment variable `prefix' instead of
15858         the variable pupa_dl_dir.
15859         (pupa_dl_set_prefix): Function removed.
15860         (pupa_dl_get_prefix): Likewise.
15861         * kern/i386/pc/init.c: Include <pupa/env.h>.
15862         (pupa_machine_init): Use the environment variable `prefix' instead of
15863         using pupa_dl_set_prefix to set the prefix.
15864         * kern/main.c: Include <pupa/env.h>.
15865         (pupa_set_root_dev): Use the environment variable `prefix' instead of
15866         using pupa_dl_get_prefix to get the prefix.
15867         * kern/misc.c: Include <pupa/env.h>.
15868         (pupa_isdigit): New function.
15869         (pupa_isgraph): Likewise.
15870         (pupa_ftoa): Likewise.
15871         (pupa_vsprintf): Added support for printing values of the type
15872         `double'.  Make it possible to format variable output when using
15873         formatting like `%1.2%f'.
15874         (pupa_split_cmdline): New function.
15875         * kern/rescue.c: Include <pupa/env.h>.
15876         (next_word): Removed function.
15877         (pupa_rescue_cmd_prefix): Likewise.
15878         (pupa_rescue_cmd_set): New function.
15879         (pupa_rescue_cmd_unset): New function.
15880         (pupa_enter_rescue_mode): Use the `pupa_split_cmdline' function to
15881         split the command line instead of splitting it here.  Added
15882         support for setting variables using the syntax `foo=bar'.  Don't
15883         initialize the prefix command anymore.  Initialized the set and
15884         unset commands.
15885         * normal/cmdline.c: Include <pupa/env.h>.
15886         (pupa_tab_complete): Added prototypes for print_simple_completion,
15887         print_partition_completion, add_completion, iterate_commands,
15888         iterate_dev, iterate_part and iterate_dir. Moved code to print
15889         partition information from here to kern/disk.c.
15890         (pupa_cmdline_run): Don't check if the function exists anymore.
15891         * normal/main.c: Include <pupa/env.h>.
15892         (pupa_rescue_cmd_normal): Use the environment variable `prefix'
15893         instead of using pupa_dl_get_prefix to get the prefix.
15894         * term/i386/pc/vga.c: Include <pupa/arg.h>.
15895         (check_vga_mem): Cast pointers to `void *' to silence a gcc
15896         warning.
15897         (pupa_vga_putchar) [! DEBUG_VGA]: Removed for this case.
15898         (pupa_vga_setcolor): Declare unused variables with `__attribute__
15899         ((unused))' to silence a gcc warning.
15900         (pupa_vga_setcolor): Likewise.
15901         (debug_command): Changed to match argument parsing
15902         interface changes.
15903         * util/pupa-emu.c: Include <pupa/env.h>.
15904         (options): Added 0's for unused fields to silence a gcc warning.
15905         (argp): Likewise.
15906         (main): Use the environment variable `prefix' instead of using
15907         pupa_dl_set_prefix to set the prefix.  Initialize the commands ls,
15908         boot, cmp, cat and terminal.  Finish the commands boot, cmp, cat
15909         and terminal.
15911         * util/i386/pc/getroot.c: Include <pupa/i386/pc/util/biosdisk.h>.
15912         * util/misc.c: Include <malloc.h>.
15913         (pupa_malloc): Rewritten so errors are correctly reported.
15914         (pupa_realloc): Likewise.
15915         (pupa_memalign): Likewise.
15916         (pupa_mm_init_region): Declare unused variables with
15917         `__attribute__ ((unused))' to silence a gcc warning.
15918         * normal/i386/setjmp.S: Remove tab at the end of the file to
15919         silence a gcc warning.
15920         * loader/i386/pc/linux.c (pupa_rescue_cmd_initrd): Declare unused
15921         variables with `__attribute__ ((unused))' to silence a gcc
15922         warning.
15923         * loader/i386/pc/multiboot.c (pupa_multiboot_unload): Make the
15924         local variable i unsigned to silence a gcc warning.
15926         * kern/term.c: Include <pupa/misc.h>.
15927         (pupa_more_lines): New variable.
15928         (pupa_more): Likewise.
15929         (pupa_putcode): When the pager is active pause at the end of every
15930         screen.
15931         (pupa_set_more): New function.
15932         * include/pupa/term.h (pupa_set_more): New prototype.
15935 2004-03-07  Yoshinori K. Okuji  <okuji@enbug.org>
15937         Now this project is GRUB 2 rather than PUPA. The location of
15938         the CVS repository was moved to GRUB's.
15940         * configure.ac: Use bug-grub as the reporting address.
15941         Use GRUB instead of PUPA.
15942         Change the version number to 1.90.
15944 2004-02-24  Yoshinori K. Okuji  <okuji@enbug.org>
15946         * genkernsyms.sh: Updated copyright information.
15947         * genmk.rb: Likewise.
15948         * genmodsrc.sh: Likewise.
15949         * gensymlist.sh: Likewise.
15950         * boot/i386/pc/boot.S: Likewise.
15951         * boot/i386/pc/diskboot.S: Likewise.
15952         * disk/i386/pc/biosdisk.c: Likewise.
15953         * disk/i386/pc/partition.c: Likewise.
15954         * font/manager.c: Likewise.
15955         * fs/ext2.c: Likewise.
15956         * fs/fat.c: Likewise.
15957         * include/pupa/boot.h: Likewise.
15958         * include/pupa/device.h: Likewise.
15959         * include/pupa/disk.h: Likewise.
15960         * include/pupa/dl.h: Likewise.
15961         * include/pupa/elf.h: Likewise.
15962         * include/pupa/err.h: Likewise.
15963         * include/pupa/file.h: Likewise.
15964         * include/pupa/font.h: Likewise.
15965         * include/pupa/fs.h: Likewise.
15966         * include/pupa/kernel.h: Likewise.
15967         * include/pupa/loader.h: Likewise.
15968         * include/pupa/misc.h: Likewise.
15969         * include/pupa/mm.h: Likewise.
15970         * include/pupa/net.h: Likewise.
15971         * include/pupa/normal.h: Likewise.
15972         * include/pupa/rescue.h: Likewise.
15973         * include/pupa/setjmp.h: Likewise.
15974         * include/pupa/symbol.h: Likewise.
15975         * include/pupa/term.h: Likewise.
15976         * include/pupa/types.h: Likewise.
15977         * include/pupa/i386/setjmp.h: Likewise.
15978         * include/pupa/i386/types.h: Likewise.
15979         * include/pupa/i386/pc/biosdisk.h: Likewise.
15980         * include/pupa/i386/pc/boot.h: Likewise.
15981         * include/pupa/i386/pc/console.h: Likewise.
15982         * include/pupa/i386/pc/init.h: Likewise.
15983         * include/pupa/i386/pc/kernel.h: Likewise.
15984         * include/pupa/i386/pc/linux.h: Likewise.
15985         * include/pupa/i386/pc/loader.h: Likewise.
15986         * include/pupa/i386/pc/memory.h: Likewise.
15987         * include/pupa/i386/pc/multiboot.h: Likewise.
15988         * include/pupa/i386/pc/partition.h: Likewise.
15989         * include/pupa/i386/pc/time.h: Likewise.
15990         * include/pupa/i386/pc/vga.h: Likewise.
15991         * include/pupa/i386/pc/util/biosdisk.h: Likewise.
15992         * include/pupa/util/getroot.h: Likewise.
15993         * include/pupa/util/misc.h: Likewise.
15994         * include/pupa/util/resolve.h: Likewise.
15995         * kern/device.c: Likewise.
15996         * kern/disk.c: Likewise.
15997         * kern/dl.c: Likewise.
15998         * kern/err.c: Likewise.
15999         * kern/file.c: Likewise.
16000         * kern/fs.c: Likewise.
16001         * kern/loader.c: Likewise.
16002         * kern/main.c: Likewise.
16003         * kern/misc.c: Likewise.
16004         * kern/mm.c: Likewise.
16005         * kern/rescue.c: Likewise.
16006         * kern/term.c: Likewise.
16007         * kern/i386/dl.c: Likewise.
16008         * kern/i386/pc/init.c: Likewise.
16009         * kern/i386/pc/lzo1x.S: Likewise.
16010         * kern/i386/pc/startup.S: Likewise.
16011         * loader/i386/pc/chainloader.c: Likewise.
16012         * loader/i386/pc/linux.c: Likewise.
16013         * loader/i386/pc/multiboot.c: Likewise.
16014         * normal/cmdline.c: Likewise.
16015         * normal/command.c: Likewise.
16016         * normal/main.c: Likewise.
16017         * normal/menu.c: Likewise.
16018         * normal/i386/setjmp.S: Likewise.
16019         * term/i386/pc/console.c: Likewise.
16020         * term/i386/pc/vga.c: Likewise.
16021         * util/console.c: Likewise.
16022         * util/genmoddep.c: Likewise.
16023         * util/misc.c: Likewise.
16024         * util/pupa-emu.c: Likewise.
16025         * util/resolve.c: Likewise.
16026         * util/unifont2pff.rb: Likewise.
16027         * util/i386/pc/biosdisk.c: Likewise.
16028         * util/i386/pc/getroot.c: Likewise.
16029         * util/i386/pc/pupa-mkimage.c: Likewise.
16030         * util/i386/pc/pupa-setup.c: Likewise.
16032 2004-02-15  Jeroen Dekkers  <jeroen@dekkers.cx>
16034         * fs/ext2.c (pupa_ext2_read_file): Correct the value of BLOCKEND
16035         when it is EXT2_BLOCK_SIZE (data).  New argument READ_HOOK, all
16036         callers changed.  Set DATA->DISK->READ_HOOK to READ_HOOK before
16037         reading and reset it after reading.
16038         (pupa_ext2_close): Return PUPA_ERR_NONE.
16040         * include/pupa/i386/pc/linux.h (PUPA_LINUX_INITRD_MAX_ADDRESS):
16041         Correct value.
16042         (struct linux_kernel_header): Add kernel_version and
16043         initrd_addr_max.
16044         * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Check whether
16045         pupa_file_read succeeds.
16046         (pupa_rescue_cmd_initrd): Implement.
16048 2003-12-03  Marco Gerards  <metgerards@student.han.nl>
16050         * fs/ext2.c (pupa_ext2_label): New function.
16051         (pupa_ext2_fs): Added label.
16052         * fs/fat.c (pupa_fat_label): New function.
16053         (pupa_fat_fs): Added label.
16054         * include/pupa/fs.h (struct pupa_fs): Added prototype label.
16056         * kern/misc.c (pupa_strndup): New function.
16057         * include/pupa/misc.h (pupa_strndup): New prototype.
16059         * include/pupa/normal.h: Include <pupa/err.h>.
16060         (pupa_set_history): New prototype.
16061         (pupa_iterate_commands): New prototype.
16062         * normal/cmdline.c: Include <pupa/machine/partition.h>,
16063         <pupa/disk.h>, <pupa/file.h>.
16064         (hist_size): New variable.
16065         (hist_lines): Likewise.
16066         (hist_end): Likewise.
16067         (hist_used): Likewise.
16068         (pupa_set_history): New function.
16069         (pupa_history_get): Likewise.
16070         (pupa_history_add): Likewise.
16071         (pupa_history_replace): Likewise.
16072         (pupa_tab_complete): Likewise.
16073         (pupa_cmdline_run): Added tab completion and history buffer.  Tab
16074         completion shows partitionnames while completing partitions, this
16075         feature was suggested by Jeff Bailey.
16076         * normal/command.c (pupa_iterate_commands): New function.
16077         * normal/main.c (PUPA_DEFAULT_HISTORY_SIZE): New macro.
16078         (pupa_normal_init): Initialize history buffer.
16079         (PUPA_MOD_INIT): Likewise.
16080         (pupa_normal_fini): Free the history buffer.
16081         (PUPA_MOD_FINI): Likewise.
16083         * util/console.c (pupa_ncurses_getkey): Accept 127 as backspace
16084         key.
16086         * aclocal.m4 (pupa_I386_CHECK_REGPARM_BUG): New DEFUN.
16087         * configure.ac [i386]: Check for regparam bug.
16088         (NESTED_FUNC_ATTR) [! i386]: Defined.
16090 2003-11-17  Marco Gerards  <metgerards@student.han.nl>
16092         * conf/i386-pc.rmk (sbin_UTILITIES): Added pupa-emu.
16093         (pupa_setup_SOURCES): Added util/i386/pc/getroot.c.
16094         (pupa_emu_SOURCES): New variable.
16095         (pupa_emu_LDFLAGS): Likewise.
16096         * include/pupa/fs.h (pupa_ext2_init) [PUPA_UTIL]: New prototype.
16097         (pupa_ext2_fini) [PUPA_UTIL]: Likewise.
16098         * include/pupa/normal.h (pupa_normal_init) [PUPA_UTIL]: Likewise.
16099         (pupa_normal_fini) [PUPA_UTIL]: Likewise.
16100         * include/pupa/setjmp.h [PUPA_UTIL]: Include <setjmp.h>.
16101         (pupa_jmp_buf): New typedef.
16102         (pupa_setjmp) [PUPA_UTIL]: New macro.
16103         (pupa_longjmp) [PUPA_UTIL]: Likewise.
16104         * include/pupa/term.h (struct pupa_term): New member `refresh'.
16105         (pupa_refresh): New prototype.
16106         * include/pupa/util/getroot.h: New file.
16107         * kern/misc.c (pupa_vsprintf): Refresh the screen after updating
16108         it.
16109         * kern/rescue.c (pupa_rescue_get_command_line): Likewise.
16110         (pupa_rescue_cmd_cat): Likewise.
16111         (pupa_rescue_cmd_ls): Likewise.
16112         (pupa_rescue_cmd_testload): Likewise.
16113         (pupa_rescue_cmd_lsmod): Likewise.
16114         * normal/cmdline.c (pupa_cmdline_get): Likewise.
16115         * normal/menu.c (run_menu): Likewise.
16116         * kern/term.c (pupa_cls): Likewise.
16117         (pupa_refresh): New function.
16118         * normal/normal.c (pupa_normal_init) [PUPA_UTIL]: New function.
16119         (pupa_normal_fini) [PUPA_UTIL]: Likewise.
16120         * util/console.c: New file.
16122         * util/i386/pc/getroot.c: New file.
16123         * util/i386/pc/pupa-setup.c: Include <pupa/util/getroot.h>.
16124         (pupa_putchar): New function.
16125         (pupa_refresh): Likewise.
16126         (xgetcwd): Function moved to ...
16127         (strip_extra_slashes): Likewise.
16128         (get_prefix): Likewise.
16129         * util/i386/pc/getroot.c: ... here.
16130         (find_root_device): Function moved and renamed to...
16131         * util/i386/pc/getroot.c (pupa_find_root_device): ... here.
16132         Changed all callers.
16133         * util/i386/pc/pupa-setup.c (guess_root_device): Function moved
16134         and renamed to...
16135         * util/i386/pc/getroot.c (pupa_guess_root_device): ... here.
16136         Changed all callers.
16137         * util/misc.c (pupa_memalign): New function.
16138         (pupa_mm_init_region): Likewise.
16139         (pupa_register_exported_symbols): Likewise.
16140         (pupa_putchar): Function removed.
16141         * util/pupa-emu.c: New file.
16143 2003-11-16  Jeroen Dekkers  <jeroen@dekkers.cx>
16145         * conf/i386-pc.rmk (pkgdata_MODULES): Add _multiboot.mod.
16146         (_multiboot_mod_SOURCES): New variable.
16147         (_multiboot_mod_CFLAGS): Likewise.
16148         * loader/i386/pc/multiboot.c: New file.
16149         * include/pupa/i386/pc/multiboot.h: Likewise.
16150         * kern/i386/pc/startup.S: Include pupa/machine/multiboot.h.
16151         (pupa_multiboot_real_boot): New function.
16152         * include/pupa/i386/pc/loader.h: Include pupa/machine/multiboot.h.
16153         (pupa_multiboot_real_boot): New prototype.
16154         (pupa_rescue_cmd_multiboot): Likewise
16155         (pupa_rescue_cmd_module): Likewise.
16157         * kern/loader.c (pupa_loader_set): Continue when
16158         pupa_loader_unload_func() fails.
16159         (pupa_loader_unset): New function.
16160         * include/pupa/loader.h (pupa_loader_unset): New prototype.
16162         * kern/misc.c (pupa_stpcpy): New function.
16163         * include/pupa/misc.h (pupa_stpcpy): New prototype.
16165 2003-11-12  Marco Gerards  <metgerards@student.han.nl>
16167         * disk/i386/pc/biosdisk.c (pupa_biosdisk_open): Correctly check
16168         for available extensions.
16170         * include/pupa/i386/pc/time.h: New file.
16171         * kern/disk.c: Include <pupa/machine/time.h>.
16172         (PUPA_CACHE_TIMEOUT): New macro.
16173         (pupa_last_time): New variable.
16174         (pupa_disk_open): Flush the cache when there was a timeout.
16175         (pupa_disk_close): Reset the timer.
16176         * kern/i386/pc/startup.S (pupa_get_rtc): Renamed from
16177         pupa_currticks.
16178         * util/misc.c: Include <sys/times.h>
16179         (pupa_get_rtc): New function.
16181 2003-11-09  Jeroen Dekkers  <jeroen@dekkers.cx>
16183         * fs/ext2.c (struct pupa_ext2_inode): Declare struct datablocks
16184         as blocks.
16185         (pupa_ext2_get_file_block): Use blocks member.
16187         * fs/ext2.c (pupa_ext2_read_file): Only set skipfirst for the
16188         first block. Return -1 instead of pupa_errno on error.
16190 2003-10-27  Marco Gerards  <metgerards@student.han.nl>
16192         * README: In the pupa-mkimage example use _chain instead of chain
16193         and ext2 instead of fat.
16194         * TODO: Replace ext2fs with jfs as an example.  Add an item for
16195         adding journal playback for ext2fs.
16196         * conf/i386-pc.rmk (pupa_setup_SOURCES): Added fs/ext2.c.
16197         (pkgdata_MODULES): Added ext2.mod.
16198         (ext2_mod_SOURCES): New variable.
16199         (ext2_mod_CFLAGS): Likewise.
16200         * include/pupa/err.h (pupa_err_t): Added PUPA_ERR_SYMLINK_LOOP.
16201         * include/pupa/misc.h (pupa_strncpy): New prototype.
16202         (pupa_strcat): Likewise.
16203         (pupa_strncmp): Likewise.
16204         * kern/misc.c (pupa_strcat): Enable function.
16205         (pupa_strncpy): New function.
16206         (pupa_strncmp): Likewise.
16207         * fs/ext2.c: New file.
16209         * kern/disk.c (pupa_disk_read): Set pupa_errno to PUPA_ERR_NONE
16210         when the read failed before retrying.
16211         * util/i386/pc/biosdisk.c (_LARGEFILE_SOURCE): Removed.
16212         (_FILE_OFFSET_BITS): Likewise.
16213         * configure.ac: Added AC_SYS_LARGEFILE.
16215 2003-09-25  Yoshinori K. Okuji  <okuji@enbug.org>
16217         * genmk.rb (PModule#rule): Make sure to get only symbol names
16218         from the output of nm.
16219         Reported by Robert Millan <zeratul2@wanadoo.es>.
16221 2003-09-25  Yoshinori K. Okuji  <okuji@enbug.org>
16223         I forgot to check in these changes for a long time. This adds
16224         incomplete support for VGA console, and this is still very
16225         buggy. Also, a lot of consideration is required for I18N,
16226         UNICODE, and VGA font issues. Therefore, assume that this is
16227         such that "better than nothing".
16229         * font/manager.c: New file.
16230         * include/pupa/font.h: Likewise.
16231         * include/pupa/i386/pc/vga.h: Likewise.
16232         * term/i386/pc/vga.c: Likewise.
16233         * util/unifont2pff.rb: Likewise.
16235         * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vga.h.
16236         (pkgdata_MODULES): Added vga.mod and font.mod.
16237         (vga_mod_SOURCES): New variables.
16238         (vga_mod_CFLAGS): Likewise.
16239         (font_mod_SOURCES): Likewise.
16240         (font_mod_CFLAGS): Likewise.
16242         * include/pupa/err.h (PUPA_ERR_BAD_FONT): New constant.
16244         * include/pupa/term.h: Include pupa/err.h.
16245         (struct pupa_term): Added init and fini.
16246         Changed the argument of putchar to pupa_uint32_t.
16248         * include/pupa/i386/pc/console.h: Include pupa/symbol.h.
16249         (pupa_console_real_putchar): New prototype.
16250         (pupa_console_putchar): Removed.
16251         (pupa_console_checkkey): Exported.
16252         (pupa_console_getkey): Likewise.
16254         * kern/misc.c (pupa_vsprintf): Add support for UNICODE
16255         characters.
16257         * kern/term.c (pupa_term_set_current): Rewritten.
16258         (pupa_putchar): Likewise.
16259         (pupa_putcode): New function.
16261         * kern/i386/pc/startup.S (pupa_console_putchar): Renamed to ...
16262         (pupa_console_real_putchar): ... this.
16263         (pupa_vga_set_mode): New function.
16264         (pupa_vga_get_font): Likewise.
16266         * normal/command.c: Include pupa/term.h.
16267         (terminal_command): New function.
16268         (pupa_command_init): Register the command "terminal".
16270         * normal/menu.c (DISP_LEFT): Changed to a UNICODE value.
16271         (DISP_UP): Likewise.
16272         (DISP_RIGHT): Likewise.
16273         (DISP_DOWN): Likewise.
16274         (DISP_HLINE): Likewise.
16275         (DISP_VLINE): Likewise.
16276         (DISP_UL): Likewise.
16277         (DISP_UR): Likewise.
16278         (DISP_LL): Likewise.
16279         (DISP_LR): Likewise.
16281         * term/i386/pc/console.c (pupa_console_putchar): New function.
16283 2003-02-08  NIIBE Yutaka  <gniibe@m17n.org>
16285         * util/resolve.c (pupa_util_resolve_dependencies): BUG
16286         FIX. Reverse the path_list.
16288         * include/pupa/normal.h: Export pupa_register_command and
16289         pupa_unregister_command.
16291         * hello/hello.c (pupa_cmd_hello): New module.
16292         * conf/i386-pc.rmk: Added hello.mod.
16294 2003-01-31  Yoshinori K. Okuji  <okuji@enbug.org>
16296         * kern/i386/pc/lzo1x.S: New file.
16298         * util/i386/pc/pupa-mkimage.c: Include lzo1x.h.
16299         (compress_kernel): New variable.
16300         (generate_image): Heavily modified to support compressing a
16301         large part of the core image.
16303         * util/misc.c (pupa_util_read_image): Fix a file descriptor
16304         leak.
16305         (pupa_util_load_image): New function.
16307         * kern/i386/pc/startup.S: Include pupa/machine/kernel.h.
16308         (pupa_compressed_size): New variable.
16309         (codestart): Enable Gate A20 here.
16310         Decompress the compressed part of the core image.
16311         Rearrange the code to put functions and variables which are
16312         required for initialization in the non-compressed part.
16313         Include lzo1x.S.
16315         * kern/i386/pc/init.c (pupa_machine_init): Don't enable Gate A20
16316         here.
16318         * include/pupa/util/misc.h (pupa_util_write_image): Declared.
16320         * include/pupa/i386/pc/kernel.h
16321         (PUPA_KERNEL_MACHINE_COMPRESSED_SIZE): New macro.
16322         (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): Increased by 4.
16323         (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
16324         (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
16325         (PUPA_KERNEL_MACHINE_RAW_SIZE): New macro.
16327         * conf/i386-pc.rmk (pupa_mkimage_LDFLAGS): New variable.
16329         * genmk.rb (Image#rule): Put LDFLAGS at the end of a line.
16330         (Utility#rule): Likewise.
16332         * configure.ac: Check if LZO is available.
16334 2003-01-20  Yoshinori K. Okuji  <okuji@enbug.org>
16336         * include/pupa/normal.h: New file.
16337         * include/pupa/setjmp.h: Likewise.
16338         * include/pupa/i386/setjmp.h: Likewise.
16339         * normal/cmdline.c: Likewise.
16340         * normal/command.c: Likewise.
16341         * normal/main.c: Likewise.
16342         * normal/menu.c: Likewise.
16343         * normal/i386/setjmp.S: Likewise.
16345         * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Made global.
16346         (pupa_rescue_cmd_initrd): Likewise.
16348         * loader/i386/pc/chainloader.c (pupa_rescue_cmd_chainloader):
16349         Likewise.
16351         * kern/i386/pc/startup.S (translation_table): New variable.
16352         (translate_keycode): New function.
16353         (pupa_console_getkey): Call translate_keycode.
16355         * kern/rescue.c (attempt_normal_mode): New function.
16356         (pupa_enter_rescue_mode): Attempt to execute the normal mode. If
16357         it failed, print a message.
16359         * kern/mm.c (pupa_real_malloc): Print more information when a
16360         free magic is broken.
16361         (pupa_free): If the first free header is not free actually, set
16362         it to P.
16364         * kern/main.c (pupa_load_normal_mode): Just load the module
16365         "normal".
16366         (pupa_main): Don't print the message
16367         "Entering into rescue mode..." here.
16369         * include/pupa/i386/pc/loader.h (pupa_rescue_cmd_initrd):
16370         Declared.
16371         (pupa_rescue_cmd_initrd): Likewise.
16372         (pupa_rescue_cmd_initrd): Likewise.
16374         * include/pupa/symbol.h (FUNCTION): Specify the type.
16375         (VARIABLE): Likewise.
16377         * include/pupa/err.h (pupa_err_t): Added
16378         PUPA_ERR_UNKNOWN_COMMAND.
16380         * include/pupa/dl.h (pupa_dl_set_prefix): Exported.
16381         (pupa_dl_get_prefix): Likewise.
16383         * conf/i386-pc.rmk (pkgdata_MODULES): Added normal.mod.
16384         Added _chain.mod and _linux.mod instead of chain.mod and
16385         linux.mod.
16386         (chain_mod_SOURCES): Renamed to ...
16387         (_chain_mod_SOURCES): ... this.
16388         (chain_mod_CFLAGS): Renamed to ...
16389         (_chain_mod_CFLAGS): ... this.
16390         (linux_mod_SOURCES): Renamed to ...
16391         (_linux_mod_SOURCES): ... this.
16392         (linux_mod_CFLAGS): Renamed to ...
16393         (_linux_mod_CFLAGS): ... this.
16394         (normal_mod_SOURCES): New variable.
16395         (normal_mod_CFLAGS): Likewise.
16396         (normal_mod_ASFLAGS): Likewise.
16398 2003-01-18  Yoshinori K. Okuji  <okuji@enbug.org>
16400         * kern/rescue.c (pupa_rescue_cmd_rmmod): Call pupa_dl_unload, if
16401         possible.
16403         * kern/dl.c (pupa_dl_ref): Refer depending modules
16404         recursively.
16405         (pupa_dl_unref): Unrefer depending modules recursively.
16406         Don't call pupa_dl_unload implicitly, because PUPA can crash if
16407         a module is unloaded before one depending on that module is
16408         unloaded.
16409         (pupa_dl_unload): Unload depending modules explicitly,
16410         if possible.
16412 2003-01-17  Yoshinori K. Okuji  <okuji@enbug.org>
16414         * include/pupa/i386/pc/linux.h: New file.
16415         * loader/i386/pc/linux.c: Likewise.
16417         * loader/i386/pc/chainloader.c (pupa_chainloader_boot_sector):
16418         Removed.
16419         (pupa_chainloader_unload): Return PUPA_ERR_NONE.
16420         (pupa_rescue_cmd_chainloader): Read the image to 0x7C00 instead
16421         of PUPA_CHAINLOADER_BOOT_SECTOR.
16423         * kern/i386/pc/startup.S: Include pupa/machine/linux.h.
16424         (pupa_linux_prot_size): New variable.
16425         (pupa_linux_tmp_addr): Likewise.
16426         (pupa_linux_real_addr): Likewise.
16427         (pupa_linux_boot_zimage): New function.
16428         (pupa_linux_boot_bzimage): Likewise.
16430         * kern/i386/pc/init.c (struct mem_region): New structure.
16431         (MAX_REGIONS): New macro.
16432         (mem_regions): New variable.
16433         (num_regions): Likewise.
16434         (pupa_os_area_addr): Likewise.
16435         (pupa_os_area_size): Likewise.
16436         (pupa_lower_mem): Likewise.
16437         (pupa_upper_mem): Likewise.
16438         (add_mem_region): New function.
16439         (compact_mem_regions): Likewise.
16440         (pupa_machine_init): Set PUPA_LOWER_MEM and PUPA_UPPER_MEM to
16441         the size of the conventional memory and that of so-called upper
16442         memory (before the first memory hole).
16443         Instead of adding each found region to free memory, use
16444         add_mem_region and add them after removing overlaps.
16445         Also, add only 1/4 of the upper memory to free memory. The rest
16446         is used for loading OS images. Maybe this is ad hoc, but this
16447         makes it much easier to relocate OS images when booting.
16449         * kern/rescue.c (pupa_rescue_cmd_module): Removed.
16450         (pupa_enter_rescue_mode): Don't register initrd and module.
16452         * kern/mm.c: Include pupa/dl.h.
16454         * kern/main.c: Include pupa/file.h and pupa/device.h.
16456         * kern/loader.c (pupa_loader_load_module_func): Removed.
16457         (pupa_loader_load_module): Likewise.
16459         * kern/dl.c (pupa_dl_load): Use the suffix ``.mod'' instead of
16460         ``.o''.
16462         * include/pupa/i386/pc/loader.h (pupa_linux_prot_size): Declared.
16463         (pupa_linux_tmp_addr): Likewise.
16464         (pupa_linux_real_addr): Likewise.
16465         (pupa_linux_boot_zimage): Likewise.
16466         (pupa_linux_boot_bzimage): Likewise.
16468         * include/pupa/i386/pc/init.h (pupa_lower_mem): Declared.
16469         (pupa_upper_mem): Likewise.
16470         (pupa_gate_a20): Don't export, because turning off Gate A20 in a
16471         module is too dangerous.
16473         * include/pupa/loader.h (pupa_os_area_addr): Declared.
16474         (pupa_os_area_size): Likewise.
16475         (pupa_loader_set): Remove the first argument. Loader doesn't
16476         manage modules or initrd any longer.
16477         (pupa_loader_load_module): Removed.
16479         * conf/i386-pc.rmk (pkgdata_MODULES): Added linux.mod.
16480         (linux_mod_SOURCES): New variable.
16481         (linux_mod_CFLAGS): Likewise.
16483 2003-01-07  Yoshinori K. Okuji  <okuji@enbug.org>
16485         * util/i386/pc/pupa-setup.c (setup): Convert the endianness of
16486         the length of a blocklist correctly.
16488         * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open) [__linux__]:
16489         Use ioctl only if the OS file is a block device.
16490         (pupa_util_biosdisk_open): Don't use ST.ST_BLOCKS, because it is
16491         not very useful for normal files.
16493         * kern/main.c (pupa_set_root_dev): New function.
16494         (pupa_load_normal_mode): Likewise.
16495         (pupa_main): Call those above.
16497         * include/pupa/types.h (pupa_swap_bytes16): Cast the result to
16498         pupa_uint16_t.
16500         * include/pupa/kernel.h (pupa_enter_normal_mode): Removed.
16502 2003-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
16504         * util/i386/pc/pupa-setup.c: Include pupa/machine/kernel.h.
16505         (setup): Configure the installed partition information and the
16506         dl prefix.
16508         * loader/i386/pc/chainloader.c (my_mod): New variable.
16509         (pupa_chainloader_unload): New function.
16510         (pupa_rescue_cmd_chainloader): Refer itself.
16511         (PUPA_MOD_INIT): Save its own module in MY_MOD.
16513         * kern/i386/pc/startup.S (install_partition): Removed.
16514         (version_string): Likewise.
16515         (config_file): Likewise.
16516         (pupa_install_dos_part): New variable.
16517         (pupa_install_bsd_part): Likewise.
16518         (pupa_prefix): Likewise.
16519         (pupa_chainloader_real_boot): Call pupa_dl_unload_all.
16521         * kern/i386/pc/init.c: Include pupa/machine/kernel.h, pupa/dl.h
16522         and pupa/misc.h.
16523         (make_install_device): New function.
16524         (pupa_machine_init): Set the dl prefix.
16526         * kern/rescue.c: Include pupa/rescue.h and pupa/dl.h.
16527         (buf): Renamed to ...
16528         (linebuf): ... this.
16529         (pupa_rescue_cmd_prefix): New function.
16530         (pupa_rescue_cmd_insmod): Likewise.
16531         (pupa_rescue_cmd_rmmod): Likewise.
16532         (pupa_rescue_cmd_lsmod): Likewise.
16533         (pupa_enter_rescue_mode): Register new commands: prefix, insmod,
16534         rmmod and lsmod.
16536         * kern/mm.c (pupa_memalign): If failed even after invalidating
16537         disk caches, unload unneeded modules and retry.
16539         * kern/misc.c (pupa_memmove): New function.
16540         (pupa_memcpy): Removed.
16541         (pupa_strcpy): New function.
16542         (pupa_itoa): Made static.
16544         * kern/dl.c (pupa_dl_iterate): New function.
16545         (pupa_dl_ref): Likewise.
16546         (pupa_dl_unref): Likewise.
16547         (pupa_dl_unload): Return if succeeded or not.
16548         (pupa_dl_unload_unneeded): New function.
16549         (pupa_dl_unload_all): Likewise.
16550         (pupa_dl_init): Renamed to ...
16551         (pupa_dl_set_prefix): ... this.
16552         (pupa_dl_get_prefix): New function.
16554         * include/pupa/i386/pc/kernel.h: Include pupa/types.h.
16555         (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): New macro.
16556         (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
16557         (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
16558         (pupa_install_dos_part): Declared.
16559         (pupa_install_bsd_part): Likewise.
16560         (pupa_prefix): Likewise.
16561         (pupa_boot_drive): Likewise.
16563         * include/pupa/types.h: Fix a typo.
16565         * include/pupa/misc.h (pupa_memcpy): New macro. Just an alias to
16566         pupa_memmove.
16567         (pupa_memmove): Declared.
16568         (pupa_strcpy): Likewise.
16570         * include/pupa/dl.h (PUPA_MOD_INIT): Change the prototype. Now
16571         pupa_mod_init takes one argument, its own module.
16572         (pupa_dl_unload_unneeded): Declared.
16573         (pupa_dl_unload_all): Likewise.
16574         (pupa_dl_ref): Likewise.
16575         (pupa_dl_unref): Likewise.
16576         (pupa_dl_iterate): Likewise.
16577         (pupa_dl_init): Renamed to ...
16578         (pupa_dl_set_prefix): ... this.
16579         (pupa_dl_get_prefix): Declared.
16581         * fs/fat.c [!PUPA_UTIL] (my_mod): New variable.
16582         (pupa_fat_dir) [!PUPA_UTIL]: Prevent the fat module from being
16583         unloaded.
16584         (pupa_fat_open) [!PUPA_UTIL]: Refer itself if succeeded.
16585         (pupa_fat_close) [!PUPA_UTIL]: Unrefer itself.
16587         * configure.ac (tmp_CFLAGS): Added -Wshadow, -Wpointer-arith,
16588         -Wmissing-prototypes, -Wundef and -Wstrict-prototypes.
16590 2003-01-03  Yoshinori K. Okuji  <okuji@enbug.org>
16592         * util/i386/pc/pupa-setup.c (setup): Define the internal
16593         function find_first_partition_start at the top level, because GCC
16594         3.0.x cannot compile internal functions in deeper scopes
16595         correctly.
16596         (find_root_device): Use lstat instead of stat.
16597         Don't follow symbolic links.
16598         Fix the path-constructing code.
16600         * util/i386/pc/biosdisk.c [__linux__] (BLKFLSBUF): New macro.
16601         (pupa_util_biosdisk_open) [__linux__]: Get the size of a device
16602         by a BLKGETSIZE ioctl first, because block devices don't fill
16603         the member st_mode of the structure stat on Linux.
16604         [__linux__] (linux_find_partition): Use a temporary buffer
16605         REAL_DEV for the working space. Copy it to DEV before returning.
16606         (open_device) [__linux__]: Call ioctl with BLKFLSBUF to make the
16607         buffer cache consistent.
16608         (get_os_disk) [__linux__]: Use the length 5 instead of 4 for
16609         strncmp. The previous value was merely wrong.
16610         (pupa_util_biosdisk_get_pupa_dev): Use stat instead of lstat.
16612         * fs/fat.c (pupa_fat_read_data): Shift 4 instead of 12 when the
16613         FAT size is 12. The previous value was merely wrong.
16615         * kern/main.c (pupa_main): Don't split the starting message from
16616         newlines.
16618         * kern/term.c (pupa_putchar): Put CR after LF instead of before
16619         LF, because BIOS goes crazy about character attributes in this
16620         case.
16622 2003-01-03  Yoshinori K. Okuji  <okuji@enbug.org>
16624         * include/i386/pc/util/biosdisk.h: New file.
16625         * util/i386/pc/biosdisk.c: Likewise.
16626         * util/i386/pc/pupa-setup.c: Likewise.
16628         * Makefile.in (INCLUDE_DISTFILES): Added
16629         include/pupa/i386/pc/util/biosdisk.h.
16630         (UTIL_DISTFILES): Added biosdisk.c and pupa-setup.c under the
16631         directory util/i386/pc.
16632         (install-local): Added a rule for sbin_UTILITIES.
16633         (uninstall): Likewise.
16635         * util/i386/pc/pupa-mkimage.c (usage): Fix a typo in the doc.
16637         * util/misc.c (xrealloc): New function.
16638         (pupa_malloc): Likewise.
16639         (pupa_free): Likewise.
16640         (pupa_realloc): Likewise.
16641         (pupa_stop): Likewise.
16642         (pupa_putchar): Likewise.
16644         * kern/disk.c (pupa_disk_read): Prevent L from underflowing.
16646         * include/pupa/util/misc.h (xrealloc): Declared.
16648         * include/pupa/i386/pc/boot.h (PUPA_BOOT_MACHINE_BPB_START): New
16649         macro.
16650         (PUPA_BOOT_MACHINE_BPBEND): Renamed to ...
16651         (PUPA_BOOT_MACHINE_BPB_END): ... this.
16653         * include/pupa/fs.h [PUPA_UTIL] (pupa_fat_init): Declared.
16654         [PUPA_UTIL] (pupa_fat_fini): Likewise.
16656         * fs/fat.c [PUPA_UTIL] (pupa_fat_init): Defined. Maybe a better
16657         way should be implemented.
16658         [PUPA_UTIL] (pupa_fat_fini): Likewise.
16660         * disk/i386/pc/biosdisk.c (pupa_biosdisk_call_hook): Increase
16661         the size of NAME for safety.
16662         (pupa_biosdisk_iterate): Search hard disks to 0x90 instead of
16663         0x88.
16665         * conf/i386-pc.rmk (sbin_UTILITIES): New variable.
16666         (pupa_setup_SOURCES): Likewise.
16668         * genmk.rb (Utility#rule): Add $(BUILD_CFLAGS) into the rules.
16670 2002-12-28  Yoshinori K. Okuji  <okuji@enbug.org>
16672         * kern/i386/pc/startup.S (push_get_mmap_entry): Revert to a
16673         bunch of pushl's from pusha, because this destroys the return
16674         value.
16676 2002-12-28  Yoshinori K. Okuji  <okuji@enbug.org>
16678         Use -mrtd and -mregparm=3 to reduce the generated code sizes.
16679         This means that any missing prototypes could be fatal. Also, you
16680         must take care when writing assembly code. See the comments at
16681         the beginning of startup.S, for more details.
16683         * kern/i386/pc/startup.S (pupa_halt): Modified for the new
16684         compilation mechanism.
16685         (pupa_chainloader_real_boot): Likewise.
16686         (pupa_biosdisk_rw_int13_extensions): Likewise.
16687         (pupa_biosdisk_rw_standard): Likewise.
16688         (pupa_biosdisk_check_int13_extensions): Likewise.
16689         (pupa_biosdisk_get_diskinfo_int13_extensions): Likewise.
16690         (pupa_biosdisk_get_diskinfo_standard): Likewise.
16691         (pupa_get_memsize): Likewise.
16692         (pupa_get_mmap_entry): Likewise.
16693         (pupa_console_putchar): Likewise.
16694         (pupa_console_setcursor): Likewise.
16695         (pupa_getrtsecs): Use pushl instead of push.
16697         * kern/i386/pc/init.c (pupa_machine_init): Use the scratch
16698         memory instead of the stack for a mmap entry, because some
16699         BIOSes may ignore the maximum size and overflow.
16701         * conf/i386-pc.rmk (COMMON_CFLAGS): Added -mrtd and -mregparm=3.
16703         * genmk.rb (PModule#rule): Compile automatically generated
16704         sources with module-specific CFLAGS as well as other sources.
16706 2002-12-27  Yoshinori K. Okuji  <okuji@enbug.org>
16708         * configure.ac: Check ld.
16709         Replace CFLAGS and CPPFLAGS with BUILD_CFLAGS and BUILD_CPPFLAGS
16710         respectively, before checking endianness and sizes.
16712         * Makefile.in (LD): New variable.
16714 2002-12-27  Yoshinori K. Okuji  <okuji@enbug.org>
16716         * Makefile.in (BUILD_CC): CC -> BUILD_CC.
16718 2002-12-27  Yoshinori K. Okuji  <okuji@enbug.org>
16720         * Changelog: New file.