2009-05-16 Felix Zielcke <fzielcke@z-51.de>
[grub2/phcoder.git] / ChangeLog
blob7ef7953364380cec9a1fc890f36a03c39cd0ca51
1 2009-05-16  Felix Zielcke  <fzielcke@z-51.de>
3         * conf/i386.rmk (setjmp_mod_CFLAGS): Rename to ...
4         (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS)
6 2009-05-16  Felix Zielcke  <fzielcke@z-51.de>
8         * util/grub-mkconfig.in: Export GRUB_TERMINAL_INPUT.
10 2009-05-16  Bean  <bean123ch@gmail.com>
12         * conf/common.rmk (pkglib_MODULES): Add lua.mod.
13         (lua_mod_SOURCES): New variable.
14         (lua_mod_CFLAGS): Likewise.
15         (lua_mod_LDFLAGS): Likewise.
17         * conf/i386.rmk (pkglib_MODULES): Add setjmp.mod.
18         (setjmp_mod_SOURCES): New variable.
19         (setjmp_mod_CFLAGS): Likewise.
20         (setjmp_LDFLAGS): Likewise.
22         * conf/x86_64-efi.rmk (pkglib_MODULES): Add setjmp.mod.
23         (setjmp_mod_SOURCES): New variable.
24         (setjmp_mod_CFLAGS): Likewise.
25         (setjmp_LDFLAGS): Likewise.
27         * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add setjmp.mod.
28         (setjmp_mod_SOURCES): New variable.
29         (setjmp_mod_CFLAGS): Likewise.
30         (setjmp_LDFLAGS): Likewise.
32         * conf/sparc64-ieee1275.rmk (pkglib_MODULES): Add setjmp.mod.
33         (setjmp_mod_SOURCES): New variable.
34         (setjmp_mod_CFLAGS): Likewise.
35         (setjmp_LDFLAGS): Likewise.
37         * normal/i386/setjmp.S: Moved from here ...
38         * lib/i386/setjmp.S: ... Moved here
39         * normal/x86_64/setjmp.S: Moved from here ...
40         * lib/x86_64/setjmp.S: ... Moved here
41         * normal/powerpc/setjmp.S: Moved from here ...
42         * lib/powerpc/setjmp.S: ... Moved here
43         * normal/sparc64/setjmp.S: Moved from here ...
44         * lib/sparc64/setjmp.S: ... Moved here
46         * include/grub/i386/setjmp.h (grub_setjmp): Don't use attribute
47         returns_twice in mingw.
49         * script/lua/grub_lib.c: New file.
50         * script/lua/grub_lib.h: Likewise.
51         * script/lua/grub_lua.h: Likewise.
52         * script/lua/grub_main.c: Likewise.
53         * script/lua/lapi.c: Likewise.
54         * script/lua/lapi.h: Likewise.
55         * script/lua/lauxlib.c: Likewise.
56         * script/lua/lauxlib.h: Likewise.
57         * script/lua/lbaselib.c: Likewise.
58         * script/lua/lcode.c: Likewise.
59         * script/lua/lcode.h: Likewise.
60         * script/lua/ldblib.c: Likewise.
61         * script/lua/ldebug.c: Likewise.
62         * script/lua/ldebug.h: Likewise.
63         * script/lua/ldo.c: Likewise.
64         * script/lua/ldo.h: Likewise.
65         * script/lua/ldump.c: Likewise.
66         * script/lua/lfunc.c: Likewise.
67         * script/lua/lfunc.h: Likewise.
68         * script/lua/lgc.c: Likewise.
69         * script/lua/lgc.h: Likewise.
70         * script/lua/linit.c: Likewise.
71         * script/lua/liolib.c: Likewise.
72         * script/lua/llex.c: Likewise.
73         * script/lua/llex.h: Likewise.
74         * script/lua/llimits.h: Likewise.
75         * script/lua/lmathlib.c: Likewise.
76         * script/lua/lmem.c: Likewise.
77         * script/lua/lmem.h: Likewise.
78         * script/lua/loadlib.c: Likewise.
79         * script/lua/lobject.c: Likewise.
80         * script/lua/lobject.h: Likewise.
81         * script/lua/lopcodes.c: Likewise.
82         * script/lua/lopcodes.h: Likewise.
83         * script/lua/loslib.c: Likewise.
84         * script/lua/lparser.c: Likewise.
85         * script/lua/lparser.h: Likewise.
86         * script/lua/lstate.c: Likewise.
87         * script/lua/lstate.h: Likewise.
88         * script/lua/lstring.c: Likewise.
89         * script/lua/lstring.h: Likewise.
90         * script/lua/lstrlib.c: Likewise.
91         * script/lua/ltable.c: Likewise.
92         * script/lua/ltable.h: Likewise.
93         * script/lua/ltablib.c: Likewise.
94         * script/lua/ltm.c: Likewise.
95         * script/lua/ltm.h: Likewise.
96         * script/lua/lua.h: Likewise.
97         * script/lua/luaconf.h: Likewise.
98         * script/lua/lualib.h: Likewise.
99         * script/lua/lundump.c: Likewise.
100         * script/lua/lundump.h: Likewise.
101         * script/lua/lvm.c: Likewise.
102         * script/lua/lvm.h: Likewise.
103         * script/lua/lzio.c: Likewise.
104         * script/lua/lzio.h: Likewise.
106 2009-05-16  Bean  <bean123ch@gmail.com>
108         * include/grub/kernel.h (grub_module_header_types): Add type
109         OBJ_TYPE_CONFIG.
111         * kern/main.c (grub_load_config): New function.
112         (grub_main): Call grub_load_config to read boot config.
114         * grub-mkimage (generate_image): New parameter config_path.
115         (options): New option --config.
116         (main): Parse --config option, and pass it to generate_image.
118 2009-05-14  Christian Franke  <franke@computer.org>
120         * commands/i386/pc/drivemap_int13h.S: Add missing EXT_C for symbols.
121         This fixes build on Cygwin.
123 2009-05-14  Pavel Roskin  <proski@gnu.org>
125         * commands/i386/pc/drivemap_int13h.S: Eliminate unconditional
126         jump.  This saves two bytes, so the typical case of 2 swapped
127         drives would fit 32 bytes.
129 2009-05-13  Pavel Roskin  <proski@gnu.org>
131         * loader/i386/multiboot.c (grub_multiboot): Cast mmap_addr to
132         grub_uint32_t to avoid a warning.
134         * loader/i386/linux.c (allocate_pages): When assigning
135         real_mode_mem, cast through grub_size_t to fix a warning.  The
136         code already makes sure that the value would fit a pointer.
137         (grub_linux_setup_video): Cast render_target->data to
138         grub_size_t to fix a warning.
140 2009-05-13  Javier Martín <lordhabbit@gmail.com>
142         * commands/i386/pc/drivemap.c: New file - implement drivemap
143         command.
144         * commands/i386/pc/drivemap_int13h.S: New file - int13 handler.
145         * conf/i386-pc.rmk: Add drivemap.c and drivemap_int13h.S.
147 2009-05-13  Pavel Roskin  <proski@gnu.org>
149         * util/i386/pc/grub-setup.c (setup): Remove unused variable
150         embedding_area_exists.
152 2009-05-13  Robert Millan  <rmh.grub@aybabtu.com>
154         * util/i386/pc/grub-setup.c (setup): Restructure code flow to make
155         it easier to understand / work with.
156         Improve warning messages for cases where there's no embedding area,
157         or when it is too small (or core.img too large).
159 2009-05-13  Pavel Roskin  <proski@gnu.org>
161         * loader/i386/pc/multiboot2.c: Add necessary includes for
162         grub_multiboot2_real_boot().
164         * fs/iso9660.c (grub_iso9660_iterate_dir): The file mode in the
165         PX record is always little-endian.  We only need the lower 2
166         bytes of the mode.
168         * fs/cpio.c: Use the same name "struct head" for tar and cpio to
169         facilitate code reuse.
170         (grub_cpio_mount): Use "struct head", not a char buffer.  This
171         fixes a warning reported by gcc 4.4.
173         * kernel/disk.c (grub_disk_read): Use void pointer for the
174         buffer.
175         (grub_disk_write): Use const void pointer for the buffer.
176         Adjust all callers.  Remove unnecessary casts.
178 2009-05-10  Robert Millan  <rmh.grub@aybabtu.com>
180         * util/i386/pc/grub-install.in: Update copyright year.
182 2009-05-09  Vladimir Serbinenko <phcoder@gmail.com>
184         gptsync
186         * commands/gptsync.c: new file
187         * conf/common.rmk (pkglib_MODULES): add gptsync.mod
188         (gptsync_mod_SOURCES): new variable
189         (gptsync_mod_CFLAGS): likewise
190         (gptsync_mod_LDFLAGS): likewise
191         * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_NTFS): 
192         new definition
193         (GRUB_PC_PARTITION_TYPE_HFS): likewise
194         * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/gptsync.c
195         * conf/i386-ieee1275.rmk: likewise
196         * conf/i386-pc.rmk: likewise
197         * conf/powerpc-ieee1275.rmk: likewise
199 2009-05-09  Vladimir Serbinenko  <phcoder@gmail.com>
201         Fixed grub-emu
203         * kern/dl.c (grub_dl_ref): omit when compiling grub-emu
204         (grub_dl_ref): likewise
206 2009-05-08  Robert Millan  <rmh.grub@aybabtu.com>
208         * util/i386/pc/grub-setup.c (setup): Factorize find_usable_region(),
209         split in two functions (one for msdos and one for gpt).
211 2009-05-08  Pavel Roskin  <proski@gnu.org>
213         * disk/raid.c (grub_raid_block_xor): Make buf2 constant, it's
214         not modified.
216         * disk/raid6_recover.c (grub_raid6_recover): Fix warnings about
217         uninitialized err[0] and err[1].  Rename them to bad1 and bad2.
218         Initialize them with -1.  Add sanity check for bad1.  Eliminate
219         nerr variable.
221 2009-05-08  David S. Miller  <davem@davemloft.net>
223         * util/sparc64/ieee1275/grub-ofpathname.c (main): Set progname.
225 2009-05-06  Robert Millan  <rmh.grub@aybabtu.com>
227         * util/i386/pc/grub-setup.c (setup): Fix check for embed region
228         existance.
230 2009-05-05  Felix Zielcke  <fzielcke@z-51.de>
232         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
233         `kern/rescue_reader.c', `kern/rescue_parser.c' and `normal/autofs.c'.
235 2009-05-05  David S. Miller  <davem@davemloft.net>
237         * util/sparc64/ieee1275/grub-install.in: Fix sed arg quoting.
239 2009-05-05  Pavel Roskin  <proski@gnu.org>
241         * include/grub/dl.h [GRUB_UTIL]: Provide inline implementations
242         of grub_dl_ref() and grub_dl_unref().
243         * commands/parttool.c: Remove preprocessor conditionals around
244         grub_dl_ref() and grub_dl_unref().
245         * fs/affs.c: Likewise.
246         * fs/afs.c: Likewise.
247         * fs/cpio.c: Likewise.
248         * fs/ext2.c: Likewise.
249         * fs/fat.c: Likewise.
250         * fs/hfs.c: Likewise.
251         * fs/hfsplus.c: Likewise.
252         * fs/iso9660.c: Likewise.
253         * fs/jfs.c: Likewise.
254         * fs/minix.c: Likewise.
255         * fs/ntfs.c: Likewise.
256         * fs/reiserfs.c: Likewise.
257         * fs/sfs.c: Likewise.
258         * fs/udf.c: Likewise.
259         * fs/ufs.c: Likewise.
260         * fs/xfs.c: Likewise.
261         * include/grub/dl.h: Likewise.
262         * loader/xnu.c: Likewise.
264 2009-05-04  Pavel Roskin  <proski@gnu.org>
266         * commands/acpi.c: Remove unused variable my_mod.
267         * partmap/amiga.c: Likewise.
268         * partmap/apple.c: Likewise.
269         * partmap/gpt.c: Likewise.
270         * partmap/pc.c: Likewise.
271         * partmap/sun.c: Likewise.
272         * term/gfxterm.c: Likewise.
273         * term/i386/pc/vesafb.c: Likewise.
274         * term/i386/pc/vga.c: Likewise.
276 2009-05-04  David S. Miller  <davem@davemloft.net>
278         * kern/ieee1275/openfw.c (grub_children_iterate): Fix string
279         pointer args to grub_ieee1275_get_property().
281         * conf/sparc64-ieee1275.rmk: Fix build due to missing '\'.
283         * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Bypass cdrom
284         devices, and do not traverse down under controller nodes.
286         * disk/ieee1275/ofdisk.c (compute_dev_path): New.
287         (grub_ofdisk_open): Use it to un-escape "," characters.
288         * kern/disk.c (find_part_sep): New.
289         (grub_disk_open): Use it to find the first non-escaped ','
290         character in the disk name.
291         * util/ieee1275/devicemap.c (escape_of_path): New.
292         (grub_util_emit_devicemap_entry): Use it.
293         * util/sparc64/ieee1275/grub-install.in: Update script to
294         strip partition specifiers properly by not triggering on
295         '\' escaped ',' characters.
297 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
299         * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START): Set
300         to 0x300.
301         * loader/i386/linux.c (vga_modes, linux_vesafb_res): Add a few
302         resolutions.
303         (linux_vesafb_modes): Add a lot of additional modes to the list (based
304         on documentation from Wikipedia).
306 2009-05-04  Pavel Roskin  <proski@gnu.org>
308         * disk/ata.c: Spelling fixes.
309         * disk/raid.c: Likewise.
310         * disk/usbms.c: Likewise.
311         * disk/dmraid_nvidia.c: Likewise.
312         * kern/ieee1275/openfw.c: Likewise.
313         * kern/ieee1275/init.c: Likewise.
314         * kern/ieee1275/cmain.c: Likewise.
315         * boot/i386/pc/cdboot.S: Likewise.
316         * video/readers/png.c: Likewise.
317         * video/i386/pc/vbe.c: Likewise.
318         * fs/udf.c: Likewise.
319         * fs/hfs.c: Likewise.
320         * fs/reiserfs.c: Likewise.
321         * efiemu/runtime/efiemu.c: Likewise.
322         * efiemu/main.c: Likewise.
323         * efiemu/mm.c: Likewise.
324         * include/grub/elf.h: Likewise.
325         * include/grub/xnu.h: Likewise.
326         * include/grub/usbdesc.h: Likewise.
327         * include/grub/usb.h: Likewise.
328         * include/grub/script_sh.h: Likewise.
329         * include/grub/lib/LzmaEnc.h: Likewise.
330         * include/grub/efiemu/efiemu.h: Likewise.
331         * include/grub/command.h: Likewise.
332         * normal/menu.c: Likewise.
333         * normal/main.c: Likewise.
334         * normal/datetime.c: Likewise.
335         * bus/usb/uhci.c: Likewise.
336         * mmap/i386/uppermem.c: Likewise.
337         * mmap/mmap.c: Likewise.
338         * commands/acpi.c: Likewise.
339         * commands/test.c: Likewise.
340         * partmap/apple.c: Likewise.
341         * font/font.c: Likewise.
342         * loader/sparc64/ieee1275/linux.c: Likewise.
343         * loader/macho.c: Likewise.
344         * loader/i386/bsd_trampoline.S: Likewise.
345         * loader/i386/bsd.c: Likewise.
346         * loader/xnu.c: Likewise.
347         * term/i386/pc/vesafb.c: Likewise.
348         * term/usb_keyboard.c: Likewise.
349         * util/resolve.c: Likewise.
350         * util/getroot.c: Likewise.
352 2009-05-04  Felix Zielcke  <fzielcke@z-51.de>
354         * conf/i386-pc.rmk (libpkg_DATA): Rename to pkglib_DATA.
356 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
358         * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (grub_cmd_linux): Fix
359         build error.
361 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
363         * loader/i386/linux.c (grub_cmd_linux): Make "vga=" compatibility
364         parameter only available on BIOS.
366 2009-05-04  Vladimir Serbinenko  <phcoder@gmail.com>
368         Removed wrong semicolon in declaration
370         * grub/misc.h (grub_dprintf): remove semicolon
372 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
374         * loader/i386/linux.c (GRUB_ASSUME_LINUX_HAS_FB_SUPPORT): New macro.
375         (grub_linux_boot): Don't check for `linux_vesafb_modes' bounds (this
376         is done by grub_cmd_linux() now).
377         [! GRUB_ASSUME_LINUX_HAS_FB_SUPPORT]: If "vga=" parameter wasn't set,
378         restore video to text mode.
379         (grub_cmd_linux): Default `vid_mode' initialization to 0, which
380         indicates lack of "vga=" parameter.  "vga=0" is mapped to
381         `GRUB_LINUX_VID_MODE_NORMAL'.
383 2009-05-04  Felix Zielcke  <fzielcke@z-51.de>
385         * conf/i386-efi.rmk (grub_emu_SOURCES): Remove `normal/execute.c',
386         `normal/lexer.c', `kern/rescue.c', `normal/function.c', `normal/misc.c'
387         and `normal/script.c'.  Add `kern/rescue_reader.c',
388         `kern/rescue_parser.c', `script/sh/main.c', `script/sh/execute.c', 
389         `script/sh/function.c', `script/sh/lexer.c', `script/sh/script.c' and
390         `grub_script.tab.c'.
392         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
393         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
394         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
395         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
396         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
398         * Makefile.in: Remove duplicated 2008 in Copyright line.
400 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
402         * util/misc.c (grub_util_warn): New function.  Emmits a warning
403         unconditionally.
404         * include/grub/util/misc.h (grub_util_warn): New declaration.
406         * util/i386/pc/grub-install.in: Understand --force and pass it down
407         to grub-setup.
409         * util/i386/pc/grub-setup.c (main): Understand --force and pass it
410         down to setup().
411         (setup): Improve error messages and add warnings when requested to
412         install in odd layouts.  Refuse to install using blocklists unless
413         --force was set.
415 2009-05-04  martin f. krafft <madduck@madduck.net>
417         * disk/raid.c (grub_raid_scan_device): Improve debug message.
419 2009-05-04  Vladimir Serbinenko  <phcoder@gmail.com>
421         Updated copyright year
423         * fs/hfsplus.c: updated copyright year
424         
425 2009-05-04  Vladimir Serbinenko  <phcoder@gmail.com>
427         HFS+ UUID
429         * fs/hfsplus.c (grub_hfsplus_volheader): added num_serial field 
430         in the space previously used by unused3
431         (grub_hfsplus_uuid): new function
432         (grub_hfsplus_fs): added uuid field
434 2009-05-03  Pavel Roskin  <proski@gnu.org>
436         * disk/ata.c: Don't cast mod to void in GRUB_MOD_INIT to
437         suppress warnings.  It's no longer needed.
438         * disk/host.c: Likewise.
439         * disk/ata_pthru.c: Likewise.
440         * disk/loopback.c: Likewise.
441         * hook/datehook.c: Likewise.
442         * parttool/pcpart.c: Likewise.
443         * fs/i386/pc/pxe.c: Likewise.
444         * fs/ntfscomp.c: Likewise.
445         * efiemu/main.c: Likewise.
446         * mmap/mmap.c: Likewise.
447         * commands/crc.c: Likewise.
448         * commands/hexdump.c: Likewise.
449         * commands/hdparm.c: Likewise.
450         * commands/acpi.c: Likewise.
451         * commands/echo.c: Likewise.
452         * commands/minicmd.c: Likewise.
453         * commands/blocklist.c: Likewise.
454         * commands/memrw.c: Likewise.
455         * commands/loadenv.c: Likewise.
456         * commands/usbtest.c: Likewise.
457         * commands/lsmmap.c: Likewise.
458         * commands/boot.c: Likewise.
459         * commands/parttool.c: Likewise.
460         * commands/configfile.c: Likewise.
461         * commands/search.c: Likewise.
462         * commands/ieee1275/suspend.c: Likewise.
463         * commands/cat.c: Likewise.
464         * commands/i386/pc/pxecmd.c: Likewise.
465         * commands/i386/pc/play.c: Likewise.
466         * commands/i386/pc/halt.c: Likewise.
467         * commands/i386/pc/vbeinfo.c: Likewise.
468         * commands/i386/pc/vbetest.c: Likewise.
469         * commands/lspci.c: Likewise.
470         * commands/date.c: Likewise.
471         * commands/handler.c: Likewise.
472         * commands/ls.c: Likewise.
473         * commands/test.c: Likewise.
474         * commands/cmp.c: Likewise.
475         * commands/efi/loadbios.c: Likewise.
476         * commands/efi/fixvideo.c: Likewise.
477         * commands/halt.c: Likewise.
478         * commands/help.c: Likewise.
479         * commands/reboot.c: Likewise.
480         * hello/hello.c: Likewise.
481         * script/sh/main.c: Likewise.
482         * loader/xnu.c: Likewise.
483         * term/terminfo.c: Likewise.
484         * term/i386/pc/serial.c: Likewise.
485         * term/usb_keyboard.c: Likewise.
487 2009-05-03  David S. Miller  <davem@davemloft.net>
489         * normal/menu.c: Include grub/parser.h
491 2009-05-03  Pavel Roskin  <proski@gnu.org>
493         * mmap/efi/mmap.c (grub_mmap_malign_and_register): Return void*,
494         not char*.
495         * mmap/i386/mmap.c (grub_mmap_malign_and_register): Likewise.
496         Suggested by Javier Martín <lordhabbit@gmail.com>
498         * util/i386/pc/grub-mkrescue.in: Allow for the case when
499         efiemu??.o doesn't exist.
500         * util/i386/pc/grub-install.in: Likewise.  Use "cp -f" for
501         copying.
503 2009-05-03  Bean  <bean123ch@gmail.com> Vladimir Serbinenko <phcoder@gmail.com>
505         FreeBSD 64-bit support
507         * conf/i386-pc.rmk (bsd_mod_SOURCES): add loader/i386/bsd_helper.S 
508         and loader/i386/bsd_trampoline.S
509         (bsd_mod_ASFLAGS): new variable
510         * include/grub/i386/bsd.h (FREEBSD_MODINFOMD_SMAP): new definition
511         (FREEBSD_MODTYPE_KERNEL64): likewise
512         (grub_bsd64_trampoline_start): likewise
513         (grub_bsd64_trampoline_end): likewise
514         (grub_bsd64_trampoline_selfjump): likewise
515         (grub_bsd64_trampoline_gdt): likewise
516         * include/grub/i386/loader.h (grub_unix_real_boot): moved from here ...
517         * include/grub/i386/bsd.h (grub_unix_real_boot): ... moved here
518         * kern/i386/loader.S (grub_unix_real_boot): moved from here ...
519         * loader/i386/bsd_helper.S (grub_unix_real_boot): moved here
520         * include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type 
521         of "attrib" member
522         * loader/i386/bsd_pagetable.c: new file
523         * loader/i386/bsd_trampoline.S: likewise
524         * loader/i386/bsd.c (ALIGN_QWORD): new macro
525         (ALIGN_VAR): likewise
526         (entry_hi): new variable
527         (kern_end_mdofs): likewise
528         (is_64bit): likewise
529         (grub_freebsd_add_meta): use ALIGN_VAR
530         (grub_e820_mmap): new declaration
531         (grub_freebsd_add_mmap): new function
532         (grub_freebsd_add_meta_module): support 64 bit kernels
533         (grub_freebsd_list_modules): use ALIGN_VAR
534         (gdt_descriptor): new declaration
535         (grub_freebsd_boot): support 64 bit kernels
536         (grub_bsd_elf64_hook): new function
537         (grub_bsd_load_elf): support elf64
539 2009-05-03  Bean  <bean123ch@gmail.com>
541         * script/sh/execute.c (grub_script_execute_cmdif): Reset grub_errno
542         after we get the result of if statement.
544 2009-05-03  Bean  <bean123ch@gmail.com>
546         * Makefile.in (enable_efiemu): New variable.
548         * conf/i386-pc.rmk: Only compile efiemu runtimes when enable_efiemu is
549         set.
550         (efiemu32.o): Use macro $< for source file, add $(srcdir) to include
551         path.
552         (efi64_c.o): Use macro $< for source file, add $(srcdir) to include
553         path, add -mno-red-zone option.
554         (efiemu64_s.o): Likewise.
555         (efiemu64.o): Use macro $^ for source file.
557         * configure.ac (--enable-efiemu): New option.
559 2009-05-03  Vladimir Serbinenko  <phcoder@gmail.com>
561         xnu support
563         * conf/i386-efi.rmk (kernel_mod_HEADERS): added i386/pit.h
564         (pkglib_MODULES): add xnu.mod
565         (xnu_mod_SOURCES): new variable
566         (xnu_mod_CFLAGS): likewise
567         (xnu_mod_LDFLAGS): likewise
568         (xnu_mod_ASFLAGS): likewise
569         * conf/i386-pc.rmk: likewise
570         * conf/x86_64-efi.rmk: likewise
571         * include/grub/efi/efi.h (grub_efi_finish_boot_services):
572         new declaration
573         * include/grub/i386/macho.h: new file
574         * include/grub/i386/xnu.h: likewise
575         * include/grub/macho.h: likewise
576         * include/grub/machoload.h: likewise
577         * include/grub/x86_64/macho.h: likewise
578         * include/grub/x86_64/xnu.h: likewise
579         * include/grub/xnu.h: likewise
580         * kern/efi/efi.c (grub_efi_finish_boot_services): new function
581         * kern/efi/mm.c (MAX_HEAP_SIZE): increase
582         * loader/i386/efi/xnu.c: new file
583         * loader/i386/pc/xnu.c: likewise
584         * loader/i386/xnu.c: likewise
585         * loader/i386/xnu_helper.S: likewise
586         * loader/macho.c: likewise
587         * loader/xnu.c: likewise
588         * loader/xnu_resume.c: likewise
589         * util/grub-dumpdevtree: likewise
590         * include/grub/i386/pit.h: include grub/err.h
591         (grub_pit_wait): export
592         * util/grub.d/30_os-prober.in: support Darwin/Mac OS X
594 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
596         Efiemu
598         * conf/i386-pc.rmk: new modules efiemu, efiemu_acpi, efiemu_pnvram,
599         _linux_efi, linux_efi.
600         new files in grub-emu
601         new targets efiemu32.o and efiemu64.o
602         * loader/linux_normal_efiemu.c: likewise
603         * loader/i386/efi/linux.c: added preliminary efiemu support
604         * util/i386/pc/grub-install.in: add efiemu??.o to the list of
605         files to copy
606         * include/grub/autoefi.h: new file
607         * include/grub/i386/efiemu.h: likewise
608         * include/grub/i386/pc/efiemu.h: likewise
609         * include/grub/efi/api.h: add LL suffix when necessary
610         new definitions relating to tables
611         * include/grub/efiemu/efiemu.h: new file
612         * include/grub/efiemu/runtime.h: likewise
613         * efiemu/prepare.c: likewise
614         * efiemu/loadcore_common.c: likewise
615         * efiemu/loadcore64.c: likewise
616         * efiemu/runtime/efiemu.sh: likewise
617         * efiemu/runtime/efiemu.S: likewise
618         * efiemu/runtime/efiemu.c: likewise
619         * efiemu/runtime/config.h: likewise
620         * efiemu/prepare32.c: likewise
621         * efiemu/main.c: likewise
622         * efiemu/modules/pnvram.c: likewise
623         * efiemu/modules/i386: likewise
624         * efiemu/modules/i386/pc: likewise
625         * efiemu/modules/acpi.c: likewise
626         * efiemu/i386/pc/cfgtables.c: likewise
627         * efiemu/i386/loadcore64.c: likewise
628         * efiemu/i386/loadcore32.c: likewise
629         * efiemu/prepare64.c: likewise
630         * efiemu/loadcore.c: likewise
631         * efiemu/symbols.c: likewise
632         * efiemu/mm.c: likewise
633         * efiemu/loadcore32.c: likewise
635 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
637         ACPI spoofing
639         * commands/acpi.c: new file
640         * commands/i386/pc/acpi.c: likewise
641         * commands/efi/acpi.c: likewise
642         * include/grub/acpi.h: likewise
643         * conf/i386-pc.rmk (pkglib_MODULES): added acpi.mod
644         (acpi_mod_SOURCES): new variable
645         (acpi_mod_CFLAGS): likewise
646         (acpi_mod_LDFLAGS): likewise
647         * conf/i386-efi.rmk: likewise
648         * conf/x86_64-efi.rmk: likewise
650 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
652         Missing part from mmap patch
654         * mmap/efi/mmap.c (grub_machine_mmap_unregister): renamed to
655         (grub_mmap_unregister)
656         (grub_mmap_free_and_unregister): use grub_mmap_register
658 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
660         Mmap services
662         * loader/i386/efi/linux.c (grub_linux_boot): use grub_mmap_iterate
663         * loader/i386/linux.c (find_mmap_size): likewise
664         (allocate_pages): likewise
665         * loader/i386/multiboot.c (grub_get_multiboot_mmap_len): likewise
666         (grub_fill_multiboot_mmap): likewise
667         (grub_multiboot): use grub_mmap_get_lower and grub_mmap_get_upper
668         * loader/i386/pc/linux.c (grub_cmd_linux): use grub_mmap_get_lower
669         * include/grub/i386/bsd.h (OPENBSD_MMAP_AVAILABLE): new definition
670         (OPENBSD_MMAP_RESERVED): likewise
671         * include/grub/i386/pc/memory.h: include grub/memory.h
672         (grub_lower_mem): removed
673         (grub_upper_mem): likewise
674         (GRUB_MACHINE_MEMORY_ACPI): new definition
675         (GRUB_MACHINE_MEMORY_NVS): likewise
676         (GRUB_MACHINE_MEMORY_MAX_TYPE): likewise
677         (GRUB_MACHINE_MEMORY_HOLE): likewise
678         (grub_machine_mmap_register): likewise
679         (grub_machine_mmap_unregister): likewise
680         (grub_machine_get_upper): likewise
681         (grub_machine_get_lower): likewise
682         (grub_machine_get_post64): likewise
683         * include/grub/i386/efi/memory.h: new file
684         * include/grub/x86_64/efi/memory.h: likewise
685         * include/grub/efi/memory.h: likewise
686         * conf/i386-pc.rmk (pkglib_MODULES): added mmap.mod
687         (mmap_mod_SOURCES): new variable
688         (mmap_mod_LDFLAGS): likewise
689         (mmap_mod_ASFLAGS): likewise
690         * conf/i386-coreboot.rmk: likewise
691         * conf/i386-ieee1275.rmk: likewise
692         * conf/i386-efi.rmk: likewise
693         * conf/x86_64-efi.rmk: likewise
694         * include/grub/types.h (UINT_TO_PTR): new macro
695         (PTR_TO_UINT32): likewise
696         (PTR_TO_UINT64): likewise
697         * include/grub/memory.h: new file
698         * mmap/i386/pc/mmap.c: likewise
699         * mmap/i386/pc/mmap_helper.S: likewise
700         * mmap/i386/uppermem.c: likewise
701         * mmap/mmap.c: likewise
702         * mmap/efi/mmap.c: likewise
703         * kern/i386/coreboot/init.c (grub_machine_init): don't use
704         grub_upper_mem
705         * kern/i386/pc/init.c (grub_lower_mem): removed variable
706         (grub_upper_mem): likewise
707         (grub_machine_init): don't use grub_upper_mem,
708         make grub_lower_mem local
709         * loader/i386/bsd.c (grub_openbsd_boot): use grub_mmap_get_lower,
710         grub_mmap_iterate and grub_mmap_get_upper
711         (grub_netbsd_boot): use grub_mmap_get_lower and grub_mmap_get_upper
713 2009-05-02  Bean  <bean123ch@gmail.com>
715         * conf/common.rmk (grub_script.tab.c): Change normal/parser.y to
716         script/sh/parser.y.
717         (pkglib_MODULES): Add normal.mod and sh.mod.
718         (normal_SOURCES): New variable.
719         (normal_mod_CFLAGS): Likewise.
720         (normal_mod_LDFLAGS): Likewise.
721         (sh_mod_SOURCES): Likewise.
722         (sh_mod_CFLAGS): Likewise.
723         (sh_mod_LDFLAGS): Likewise.
725         * conf/i386-pc.rmk (normal/lexer.c_DEPENDENCIES): Changed to
726         script/sh/lexer.c_DEPENDENCIES.
727         (kernel_img_SOURCES): Remove kern/rescue.c, and kern/reader.c,
728         kern/rescue_reader.c and kern/rescue_parser.c.
729         (kernel_img_HEADERS): Remove rescue.h, add reader.h.
730         (grub_emu_SOURCES): Change source files.
731         (pkglib_MODULES): Remove normal.mod.
732         (normal_SOURCES): Removed.
733         (normal_mod_CFLAGS): Likewise.
734         (normal_mod_LDFLAGS): Likewise.
735         * conf/i386-coreboot.rmk: Likewise.
736         * conf/i386-efi.rmk: Likewise.
737         * conf/i386-ieee1276.rmk: Likewise.
738         * conf/powerpc-ieee1275.rmk: Likewise.
739         * conf/sparc64-ieee1275.rmk: Likewise.
740         * conf/x86_64-efi.rmk: Likewise.
742         * include/grub/command.h (grub_command_execute): New inline function.
744         * include/grub/menu.h (grub_menu_entry): Removed commands field.
746         * include/grub/normal.h: Remove <grub/setjmp.h>.
747         (grub_fs_module_list): Moved to normal/autofs.c.
748         (grub_exit_env): Removed.
749         (grub_command_execute): Likewise.
750         (grub_normal_menu_addentry): Renamed to grub_menu_addentry, removed
751         parameter script.
752         (read_command_list): New function declaration.
753         (read_fs_list): Likewise.
755         * include/parser.h: Include <grub/reader.h>.
756         (grub_parser_split_cmdline): Change type of getline parameter.
757         (grub_parser): New structure.
758         (grub_parser_class): New variable.
759         (grub_parser_execute): New function declaration.
760         (grub_register_rescue_parser): Likewise.
761         (grub_parser_register): New inline function.
762         (grub_parser_unregister): Likewise.
763         (grub_parser_get_current): Likewise.
764         (grub_parser_set_current): Likewise.
766         * include/grub/reader.h: New file.
767         * kern/reader.c: Likewise.
768         * kern/rescue_parser.c: Likewise.
769         * kern/rescue_reader.c: Likewise.
770         * normal/autofs.c: Likewise.
771         * normal/dyncmd.c: Likewise.
773         * include/grub/rescue.h: Removed.
774         * normal/command.h: Likewise.
776         * include/grub/script.h: Moved to ...
777         * include/grub/script_sh.h: ... Moved here.
778         * normal/execute.c: Moved to ...
779         * script/sh/execute.c: ... Moved here.
780         * normal/function.c: Moved to ...
781         * script/sh/function.c: ... Moved here.
782         * normal/lexer.c: Moved to ...
783         * script/sh/lexer.c: ... Moved here.
784         * normal/parser.y: Moved to ...
785         * script/sh/parser.y: ... Moved here.
786         * normal/script.c: Moved to ...
787         * script/sh/script.c: ... Moved here.
789         * normal/main.c: Remove <grub/rescue.h> and <grub/script.h>, include
790         <grub/reader.h>.
791         (grub_exit_env): Removed.
792         (fs_module_list): Moved to normal/autofs.c.
793         (grub_file_getline): Don't handle comment here.
794         (free_menu): Skip removed field entry->commands.
795         (grub_normal_menu_addentry): Removed as grub_menu_entry, removed
796         script parameter.
797         (read_config_file): Removed nested parameter, change getline function.
798         (grub_enter_normal_mode): Removed.
799         (grub_dyncmd_dispatcher): Moved to normal/dyncmd.c.
800         (read_command_list): Likewise.
801         (autoload_fs_module): Moved to normal/autofs.c.
802         (read_fs_list): Likewise.
803         (reader_nested): New variable.
804         (grub_normal_execute): Run parser.sh to switch to sh parser.
805         (grub_cmd_rescue): Removed.
806         (cmd_normal): Removed.
807         (grub_cmd_normal): Unregister itself at the beginning. Don't register
808         rescue command.
809         (grub_cmdline_run): New function.
810         (grub_normal_reader_init): Likewise.
811         (grub_normal_read_line): Likewise.
812         (grub_env_write_pager): Likewise.
813         (cmdline): New variable.
814         (grub_normal_reader): Likewise.
815         (GRUB_MOD_INIT): Register normal reader and set as current, register
816         pager hook, register normal command with grub_register_command_prio,
817         so that it won't show up in command.lst.
818         (GRUB_MOD_FINI): Unregister normal reader, unhook pager, clear
819         grub_fs_autoload_hook.
821         * normal/menu.c: Remove <grub/script.h>, add <grub/command.h>.
822         (grub_menu_execute_entry): Replace grub_script_execute with
823         grub_parser_execute, change parameter to grub_command_execute.
825         * normal/menu_text.c: Remove <grub/script.h>.
827         * normal/menu_entry.c: Remove <grub/script.h>, add <grub/command.h>
828         and <grub/parser.h>.
829         (run): Change editor_getline to use new parser interface. Change
830         parameter to grub_command_execute.
832         * kern/main.c: Remove <grub/rescue.h>, include <grub/command.h>,
833         <grub/reader.h> and <grub/parser.h>.
834         (grub_load_normal_mode): Execute normal command.
835         (grub_main): Call grub_register_core_commands,
836         grub_register_rescue_parser and grub_register_rescue_reader, use
837         grub_reader_loop to enter input loop.
839         * kern/parser.c (grub_parser_split_cmdline): Change type of
840         getline parameter.
841         (grub_parser_class): New variable.
842         (grub_parser_execute): New function.
844         * loader/i386/multiboot.c: Remove <grub/rescue.h>.
845         * loader/multiboot2.c: Likewise.
846         * loader/sparc64/ieee1275/linux.c: Likewise.
848         * util/grub-emu.c (read_command_list): New dummy function.
850 2009-05-02  Robert Millan  <rmh.grub@aybabtu.com>
852         * util/deviceiter.c (grub_util_iterate_devices): Increase max drive
853         count to 16 for CCISS and IDA.
855 2009-05-02  Robert Millan  <rmh.grub@aybabtu.com>
857         * normal/menu_text.c  (grub_wait_after_message): Print a newline
858         after waiting for user input.
860         * loader/i386/linux.c: Include `<grub/normal.h>'.
861         (grub_cmd_linux): Improve the error message about `ask' mode, by
862         waiting for user input so it's not missed (we can do this, since
863         user requested interaction).
865 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
867         Added missing lst to grub-mkrescue
869         * util/i386/pc/grub-mkrescue.in: added ${input_dir}/handler.lst
870         and ${input_dir}/parttool.lst
872 2009-04-30  David S. Miller  <davem@davemloft.net>
874         * util/hostdisk.c (device_is_wholedisk): New function.
875         (grub_util_biosdisk_get_grub_dev): Shortcut when hdg.start is
876         zero only if device_is_wholedisk() returns true.
878         * util/hostdisk.c (convert_system_partition_to_system_disk):
879         Handle virtual disk devices named /dev/vdiskX as found on sparc
880         and powerpc.
882         * kern/sparc64/ieee1275/init.c (grub_machine_set_prefix): If
883         lettered partition specifier is found, convert to numbered.
885 2009-04-29  David S. Miller  <davem@davemloft.net>
887         * include/grub/powerpc/ieee1275/memory.h: Include ieee1275.h.
888         * include/grub/sparc64/ieee1275/memory.h: Likewise.
890         * normal/command.c: Add missing newline at end of file.
892         * commands/lsmmap.c (grub_cmd_lsmmap): Add casts to avoid printf
893         warnings.
894         * kern/ieee1275/openfw.c (grub_claimmap): Likewise.
895         * disk/ieee1275/ofdisk.c (grub_ofdisk_open, grub_ofdisk_close,
896         grub_ofdisk_read): Likewise, and deal similarly with the fact that
897         ihandles have a 32-bit type but need to be stored in a "void *".
899 2009-04-28  Pavel Roskin  <proski@gnu.org>
901         * disk/fs_uuid.c (grub_fs_uuid_open): Use parent->data for dev,
902         not disk.  Adjust all dependencies.
903         (grub_fs_uuid_close): Use grub_device_close(), not
904         grub_disk_close().
906         * disk/fs_uuid.c (grub_fs_uuid_open): Allocate memory to copy
907         parent's partition, don't copy it by reference, as it gets freed
908         on close.
910 2009-04-27  Vladimir Serbinenko  <phcoder@gmail.com>
912         Preboot hooks support
914         * commands/boot.c (struct grub_preboot_t): new declaration
915         (preboots_head): new variable
916         (preboots_tail): likewise
917         (grub_loader_register_preboot_hook): new function
918         (grub_loader_unregister_preboot_hook): likewise
919         (grub_loader_set): launch preboot hooks
920         * include/grub/loader.h (grub_loader_preboot_hook_prio_t): new type
921         (grub_loader_register_preboot_hook): new declaration
922         (grub_loader_unregister_preboot_hook): likewise
924 2009-04-27  Vladimir Serbinenko  <phcoder@gmail.com>
926         Warning fix
928         * disk/scsi.c (grub_scsi_open): added missing cast when
929         calling grub_dprintf
931 2009-04-26  Vladimir Serbinenko  <phcoder@gmail.com>
933         Bug and warning fixes
935         * include/grub/i386/pc/init.h (grub_stop_floppy): added missing
936         declaration
937         * commands/test.c (test_parse): fixed bug with file tests and corrected
938         declaration of find_file
940 2009-04-26  Pavel Roskin  <proski@gnu.org>
942         * Makefile.in: Don't install empty manual pages if help2man is
943         missing.  Use help2man option for output, not shell redirection.
945 2009-04-26  David S. Miller  <davem@davemloft.net>
947         * util/grub-mkdevicemap.c (make_device_map): Add missing
948         NESTED_FUNC_ATTR to process_device().
950 2009-04-25  Vladimir Serbinenko  <phcoder@gmail.com>
952         Test command
954         * commands/test.c: rewritten to use bash-like test
956 2009-04-25  Vladimir Serbinenko  <phcoder@gmail.com>
958         Parttool autoloading and improvements
960         * Makefile.in (pkglib_DATA): add parttool.lst
961         (parttool.lst): new target
962         * genmk.rb: generate parttool-*
963         (CLEANFILES): add #{parttool}
964         (PARTTOOLFILES): new variable
965         * genparttoollist.sh: new file
966         * parttool/pcpart.c (grub_pcpart_boot): more feedback
967         (grub_pcpart_type): likewise
968         * commands/parttool.c (helpmsg): new variable
969         (grub_cmd_parttool): output help if not enough arguments are supplied
970         autoload modules
971         (GRUB_MOD_INIT(parttool)): use helpmsg
973 2009-04-24  David S. Miller  <davem@davemloft.net>
975         Avoiding opening same device multiple times in device iterator.
977         * kern/device.c: (grub_device_iterate): Define struct part_ent,
978         and use it to build a list of partitions in iterate_disk() and
979         iterate_partition().
981         * disk/fs_uuid.c (grub_fs_uuid_close): Call grub_disk_close()
982         on disk->data.
984         * disk/ieee1275/nand.c (grub_nand_iterate): Return
985         grub_devalias_iterate() result instead of unconditional 0.
986         * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Likewise.
987         Also, capture hook return value, either directly or via
988         grub_children_iterate(), and propagate to caller.
989         * include/grub/ieee1275/ieee1275.h (grub_devalias_iterate,
990         grub_children_iterate): Return value is now 'int' instead of
991         'grub_err_t'.
992         * kern/ieee1275/openfw.c (grub_children_iterate): Fix to behave
993         like a proper iterator, stopping when hooks return non-zero.
994         (grub_devalias_iterate): Likewise.
996 2009-04-23  David S. Miller  <davem@davemloft.net>
998         * kern/sparc64/ieee1275/openfw.c: Unused, delete.
1000 2009-04-22  David S. Miller  <davem@davemloft.net>
1002         * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): If size_cells
1003         is larger than address_cells, use that value for address_cells too.
1005         * include/grub/ieee1275/ieee1275.h (IEEE1275_MAX_PROP_LEN,
1006         IEEE1275_MAX_PATH_LEN): Define.
1007         * kern/ieee1275/openfw.c (grub_children_iterate): Dynamically
1008         allocate 'childtype', 'childpath', 'childname', and 'fullname'.
1009         (grub_devalias_iterate): Dynamically allocate 'aliasname' and
1010         'devtype'.  Explicitly NULL terminate devalias expansion.
1012         * util/sparc64/ieee1275/misc.c: New file.
1013         * util/sparc64/ieee1275/grub-setup.c: New file.
1014         * util/sparc64/ieee1275/grub-ofpathname.c: New file.
1015         * util/sparc64/ieee1275/grub-mkimage.c: New file.
1016         * util/sparc64/ieee1275/grub-install.in: New file.
1017         * util/ieee1275/ofpath.c: New file.
1018         * util/ieee1275/devicemap.c: New file.
1019         * util/devicemap.c: New file.
1020         * util/deviceiter.c: New file.
1021         * kern/sparc64/ieee1275/init.c: New file.
1022         * include/grub/util/ofpath.h: New file.
1023         * include/grub/util/deviceiter.h: New file.
1024         * util/grub-mkdevicemap.c: Include deviceiter.h.
1025         Implement using grub_util_emit_devicemap_entry and
1026         grub_util_iterate_devices.
1027         * conf/i386-corebook.rmk: Build util/deviceiter.c and
1028         util/devicemap.c into grub-mkdevicemap
1029         * conf/i386-efi.rmk: Likewise.
1030         * conf/i386-ieee1275.rmk: Likewise.
1031         * conf/i386-pc.rmk: Likewise.
1032         * conf/powerpc-ieee1275.rmk: Likewise.
1033         * conf/sparc64-ieee1275.rmk: Add rules to build boot block
1034         images and installation utilities.  Build kernel as image
1035         instead of as elf binary.  Use common rules as much as possible.
1037 2009-04-19  Vladimir Serbinenko  <phcoder@gmail.com>
1039         Correct GPT definition
1041         * include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type
1042         of "attrib" member
1044 2009-04-19  Felix Zielcke  <fzielcke@z-51.de>
1046         * INSTALL: Replace `autogen.sh' with `./autogen.sh'.
1048 2009-04-19  David S. Miller  <davem@davemloft.net>
1050         * loader/sparc64/ieee1275/linux.c: Include grub/command.h
1051         (grub_rescue_cmd_linux): Rename to...
1052         (grub_cmd_linux): and fix prototype.
1053         (grub_rescue_cmd_initrd): Rename to...
1054         (grub_cmd_initrd): and fix prototype.
1055         (cmd_linux, cmd_initrd): New.
1056         (GRUB_MOD_INIT(linux)): Use grub_register_command().
1057         (GRUB_MOD_FINI(linux): Use grub_unregister_command().
1059 2009-04-17  Pavel Roskin  <proski@gnu.org>
1061         * bus/usb/ohci.c (grub_ohci_transaction): Fix incorrect printf
1062         format.
1063         (grub_ohci_transfer): Likewise.
1065         * bus/usb/usbtrans.c (grub_usb_control_msg): Warning fix.
1067         * loader/multiboot_loader.c (grub_cmd_multiboot_loader): Fix
1068         return without a value.  Fix inconsistent indentation.
1070         * fs/i386/pc/pxe.c (grub_pxefs_dir): Fix function prototype to
1071         match struct grub_fs.
1073         * disk/ata.c (grub_ata_pciinit): Use NESTED_FUNC_ATTR.
1074         * bus/usb/ohci.c (grub_ohci_pci_iter): Likewise.
1075         * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
1076         * commands/lspci.c (grub_lspci_iter): Likewise.
1078 2009-04-16  Bean  <bean123ch@gmail.com>
1080         * commands/efi/loadbios.c (grub_cmd_fakebios): Add missing return
1081         value.
1083 2009-04-15  Pavel Roskin  <proski@gnu.org>
1085         * include/grub/types.h: Rename ULONG_MAX to GRUB_ULONG_MAX and
1086         LONG_MAX to GRUB_LONG_MAX.  Introduce GRUB_LONG_MIN.  Update all
1087         users of ULONG_MAX, LONG_MAX and LONG_MIN to use the new
1088         definitions.
1090 2009-04-15  Felix Zielcke  <fzielcke@z-51.de>
1092         * disk/lvm.c (grub_lvm_scan_device): Add `LVM' to the error messages,
1093         that no multiple data or metadata areas are supported and `Unknown
1094         metadata header'.
1096 2009-04-15  Vladimir Serbinenko  <phcoder@gmail.com>
1098         Move loader out of the kernel
1100         * kern/loader.c: moved to ...
1101         * commands/boot.c: ... moved here
1102         * commands/minicmd.c (grub_mini_cmd_boot): moved to ...
1103         * commands/boot.c (grub_cmd_boot): moved here. All users updated
1104         * include/grub/kernel.h (grub_machine_fini): export
1105         * include/grub/loader.h (grub_loader_is_loaded): update declaration
1106         (grub_loader_set): likewise
1107         (grub_loader_unset): likewise
1108         (grub_loader_boot): likewise
1109         * conf/common.rmk: new module boot.mod
1110         (pkglib_MODULES): add boot.mod
1111         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): remove kern/loader.c
1112         (grub_emu_SOURCES): likewise
1113         * conf/i386-efi.rmk (kernel_elf_SOURCES): likewise
1114         (grub_emu_SOURCES): likewise
1115         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): likewise
1116         (grub_emu_SOURCES): likewise
1117         * conf/i386-pc.rmk (kernel_elf_SOURCES): likewise
1118         (grub_emu_SOURCES): likewise
1119         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): likewise
1120         (grub_emu_SOURCES): likewise
1121         * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): likewise
1122         (grub_emu_SOURCES): likewise
1123         * conf/x86_64-efi.rmk (kernel_elf_SOURCES): likewise
1124         (grub_emu_SOURCES): likewise
1126 2009-04-15  Vladimir Serbinenko  <phcoder@gmail.com>
1128         use grub_lltoa instead of grub_itoa and grub_ltoa for all purposes
1130         * kern/misc.c (grub_itoa): Removed function
1131         (grub_ltoa): likewise
1132         (grub_vsprintf): use grub_lltoa
1134 2009-04-15  Vladimir Serbinenko  <phcoder@gmail.com>
1136         Restore grub-emu
1138         * conf/i386-pc.rmk (grub_emu_SOURCES): add normal/handler.c
1139         * conf/i386-coreboot.rmk: likewise
1140         * conf/i386-ieee1275.rmk: likewise
1141         * conf/powerpc-ieee1275.rmk: likewise
1143 2009-04-15  Felix Zielcke  <fzielcke@z-51.de>
1145         * INSTALL: Add that `./autogen.sh' needs to be run before
1146         `./configure.'.
1148 2009-04-14  Bean  <bean123ch@gmail.com>
1150         * Makefile.in (pkglib_DATA): Add handler.lst.
1151         (handler.lst): New rule.
1153         * conf/i386-pc.rmk (normal_mod_SOURCES): Add normal/handler.c.
1154         * conf/i386-coreboot.rmk: Likewise.
1155         * conf/i386-ieee1275.rmk: Likewise.
1156         * conf/i386-efi.rmk: Likewise.
1157         * conf/x86_64-efi.rmk: Likewise.
1158         * conf/powerpc-ieee1275.rmk: Likewise.
1159         * conf/sparc64-ieee1275.rmk: Likewise.
1161         * genhandlerlist.sh: New file.
1163         * genmk.rb: Add rules to generate handler.lst.
1165         * include/grub/normal.h (grub_file_getline): New function definition.
1166         (read_handler_list): Likewise.
1167         (free_handler_list): Likewise.
1169         * include/grub/term.h (grub_term_register_input): Add name parameter
1170         for auto generation of handler.lst.
1171         (grub_term_register_output): Likewise.
1173         * normal/handler.c: New file.
1175         * normal/main.c (get_line): Renamed to grub_file_getline.
1176         (read_config_file): Use the newly renamed grub_file_getline.
1177         (read_command_list): Likewise.
1178         (read_fs_list): Likewise.
1179         (grub_normal_execute): Call read_handler_list to parse handler.lst.
1180         (GRUB_MOD_FINI): Call free_handler_list to free handler list.
1182         * term/efi/console.c (grub_console_init): Add name parameter for auto
1183         generation of handler.lst.
1184         * term/gfxterm.c: Likewise.
1185         * term/i386/pc/at_keyboard.c: Likewise.
1186         * term/i386/pc/console.c: Likewise.
1187         * term/i386/pc/serial.c: Likewise.
1188         * term/i386/pc/vesafb.c: Likewise.
1189         * term/i386/pc/vga.c: Likewise.
1190         * term/i386/pc/vga_text.c: Likewise.
1191         * term/ieee1275/ofconsole.c: Likewise.
1192         * term/usb_keyboard.c: Likewise.
1194 2009-04-14  Bean  <bean123ch@gmail.com>
1196         * util/grub-pe2elf.c (write_symbol_table): Terminate short name symbol
1197         properly with null character.
1199 2009-04-14  Felix Zielcke  <fzielcke@z-51.de>
1201         * configure: Remove.
1202         * config.h.in: Likewise.
1203         * stamp-h.in: Likewise.
1204         * DISTLIST: Likewise.
1205         * conf/common.mk: Likewise.
1206         * conf/i386-coreboot.mk: Likewise.
1207         * conf/i386-efi.mk: Likewise.
1208         * conf/i386-ieee1275.mk: Likewise.
1209         * conf/i386.mk: Likewise.
1210         * conf/i386-pc.mk: Likewise.
1211         * conf/powerpc-ieee1275.mk: Likewise.
1212         * conf/sparc64-ieee1275.mk: Likewise.
1213         * conf/x86_64-efi.mk: Likewise.
1215         * INSTALL: Remove the sentence that Ruby and autoconf are only required if you
1216         develop on GRUB.
1218 2009-04-14  John Stanley  <jpsinthemix@verizon.net>
1219             David S. Miller  <davem@davemloft.net>
1221         * util/hostdisk.c (make_device_name): Fix buffer length
1222         calculations.
1224 2009-04-14  Felix Zielcke  <fzielcke@z-51.de>
1226         * util/hostdisk.c [__FreeBSD__ || __FreeBSD_kernel__]: Include
1227         <sys/param.h> and <sys/sysctl.h>.
1228         (open_device) [__FreeBSD__ || __FreeBSD_kernel_]: Use sysctlgetbyname()
1229         to add 0x10 to `kern.geom.debugflags' if it's not already set, before
1230         opening the device and reset them afterwards.
1232 2009-04-13  Pavel Roskin  <proski@gnu.org>
1234         * conf/common.rmk (grub_fstest_SOURCES): Add normal/datetime.c.
1235         Reported by John Stanley <jpsinthemix@verizon.net>
1237 2009-04-13  Robert Millan  <rmh@aybabtu.com>
1239         * util/grub.d/10_freebsd.in: Detect Debian GNU/kFreeBSD and use
1240         that name for menuentries when appropriate.
1242 2009-04-13  Felix Zielcke  <fzielcke@z-51.de>
1244         * util/grub.d/10_freebsd.in: Add a missing `fi'.
1246 2009-04-13  Robert Millan  <rmh@aybabtu.com>
1248         * loader/i386/linux.c (grub_cmd_linux): Don't pass `vga=ask' parameter
1249         to Linux, simply abort telling the user it's no longer supported.
1251 2009-04-13  Felix Zielcke  <fzielcke@z-51.de>
1253         * util/grub.d/10_freebsd.in: Don't exit if /boot/devices.hints
1254         doesn't exist.  Check also for /boot/kernel/kernel.gz.  Print
1255         `freebsd_loadenv' only when devices.hints exist.
1257 2009-04-13  Pavel Roskin  <proski@gnu.org>
1259         * term/usb_keyboard.c (grub_usb_keyboard_getkey): Warning fixes.
1261 2009-04-13  Felix Zielcke  <fzielcke@z-51.de>
1263         * util/i386/pc/grub-install.in (install_drive): Remove the BSD
1264         partition number.
1265         (grub_drive): Likewise.
1267 2009-04-13  David S. Miller  <davem@davemloft.net>
1269         * kern/sparc64/ieee1275/ieee1275.c: New file.
1270         * include/grub/sparc64/ieee1275/ieee1275.h (IEEE1275_MAP_WRITE,
1271         IEEE1275_MAP_READ, IEEE1275_MAP_EXEC, IEEE1275_MAP_LOCKED,
1272         IEEE1275_MAP_CACHED, IEEE1275_MAP_SE, IEEE1275_MAP_GLOBAL,
1273         IEEE1275_MAP_IE, IEEE1275_MAP_DEFAULT): Define.
1274         (grub_ieee1275_map_physical, grub_ieee1275_claim_vaddr,
1275         grub_ieee1275_alloc_physmem): Declare new exported functions.
1277         * include/grub/sparc64/ieee1275/loader.h: New file.
1278         * include/grub/sparc64/ieee1275/memory.h: Likewise.
1279         * include/grub/sparc64/kernel.h: Likewise.
1280         * loader/sparc64/ieee1275/linux.c: Likewise.
1282         * conf/common.rmk (grub_probe_SOURCES): Add Sun partition module.
1283         (grub_fstest_SOURCES): Likewise.
1285         * util/hostdisk.c (make_device_name): Do not make any assumptions
1286         about the length of drive names.
1288         * kern/dl.c (grub_dl_load_file): Close file immediately when
1289         we are done using it.
1291 2009-04-12  David S. Miller  <davem@davemloft.net>
1293         * kern/misc.c (grub_ltoa): Fix cast when handling negative
1294         values.  Noticed by Pavel Roskin.
1296         * configure.ac: Check for __bswapsi2 and__bswapdi2 using
1297         target compiler.
1299         * genmk.rb: Add more flexible image type specification, also
1300         pass --strip-unneeded to objcopy.
1301         * conf/i386-pc.rmk: Use *_FORMAT.
1302         * conf/i386-pc.mk: Rebuilt.
1304         * disk/ieee1275/ofdisk.c (struct ofdisk_hash_ent): New struct.
1305         (OFDISK_HASH_SZ): Define.
1306         (ofdisk_hash): New hash table.
1307         (ofdisk_hash_fn, ofdisk_hash_find, ofdisk_hash_add): New functions.
1308         (grub_ofdisk_open): Use ofdisk_hash_ent address as disk->id
1309         instead of device phandle which is not unique.
1311         * kern/sparc64/ieee1275/init.c: Delete, replace with...
1312         * kern/sparc64/ieee1275/crt0.S: assembler implementation.
1313         * include/grub/sparc64/ieee1275/kernel.h: Declare grub_prefix[].
1314         (GRUB_MOD_ALIGN, GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_TOTAL_MODULE_SIZE,
1315         GRUB_KERNEL_MACHINE_KERNEL_IMAGE_SIZE,
1316         GRUB_KERNEL_MACHINE_COMPRESSED_SIZE, GRUB_KERNEL_MACHINE_PREFIX,
1317         GRUB_KERNEL_MACHINE_DATA_END): Define.
1318         (grub_kernel_image_size, grub_total_module_size): Declare.
1320 2009-04-12  Pavel Roskin  <proski@gnu.org>
1322          * configure.ac: Change the logic when we check for target tools.
1323          Do it when the target is specified and it's different from the
1324          specified value of the host.
1326 2009-04-11  Felix Zielcke  <fzielcke@z-51.de>
1328         * util/hostdisk.c [__FreeBSD_kernel__]: Include sys/disk.h.
1329         (grub_util_biosdisk_open) [__FreeBSD_kernel__]: Add support for
1330         GNU/kFreeBSD. Check if a device is a character device. Use
1331         DIOCGMEDIASIZE to get the size.
1332         (convert_system_partition_to_system_disk) [__FreeBSD_kernel__]: Add
1333         support for GNU/kFreeBSD.
1334         (grub_util_biosdisk_get_grub_dev) [__FreeBSD_kernel__]: Check if OS_DEV
1335         is a character device instead of a block device. Add support for
1336         FreeBSD device names.
1338         * util/getroot.c (find_root_device) [__FreeBSD_kernel__]: Check if ENT
1339         is a character device instead of a block device.
1341         * util/grub-probe.c (probe) [__FreeBSD_kernel__]: Check if DEVICE_NAME
1342         is a character device instead of a block device.
1344 2009-04-11  Andrey Shuvikov  <mr_hyro@yahoo.com>
1346         * util/hostdisk.c [__FreeBSD__]: Include sys/disk.h.
1347         (grub_util_biosdisk_open) [__FreeBSD__]: Add support for
1348         FreeBSD. Check if a device is a character device. Use
1349         DIOCGMEDIASIZE to get the size.
1350         (convert_system_partition_to_system_disk) [__FreeBSD__]: Add
1351         support for FreeBSD.
1352         (grub_util_biosdisk_get_grub_dev) [__FreeBSD__]: Check if OS_DEV
1353         is a character device instead of a block device. Add support for
1354         FreeBSD device names.
1356         * util/getroot.c (find_root_device) [__FreeBSD__]: Check if ENT is
1357         a character device instead of a block device.
1358         (grub_util_check_char_device): New function.
1360         * util/grub-probe.c (probe) [__FreeBSD__]: Check if DEVICE_NAME is
1361         a character device instead of a block device.
1363         * include/grub/util/getroot.h (grub_util_check_char_device): New
1364         prototype.
1366 2009-04-11  David S. Miller  <davem@davemloft.net>
1368         * conf/sparc64-ieee1275.rmk (kernel_img_LDFLAGS): Link with
1369         static libgcc.
1370         * configure.ac: Check for __bswapsi2 and __bswapdi2 presence.
1371         * include/grub/sparc64/libgcc.h (__bswapsi2): Export libgcc
1372         function, if present.
1373         (__bswapdi2): Likewise.
1375         * include/grub/sparc64/ieee1275/boot.h: New file.
1376         * boot/sparc64/ieee1275/boot.S: Likewise.
1377         * boot/sparc64/ieee1275/diskboot.S: Likewise.
1379         * kern/misc.c (grub_ltoa): New function.
1380         (grub_vsprintf): Use it to format 'long' integers.
1382 2009-04-10  David S. Miller  <davem@davemloft.net>
1384         * disk/ieee1275/nand.c (grub_nand_open): All ieee1275 call arg
1385         slots are of type grub_ieee1275_cell_t.
1386         (grub_nand_read): Likewise.
1387         * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_INVALID,
1388         IEEE1275_IHANDLE_INVALID): Use grub_ieee1275_cell_t since these
1389         macros are used to compare values in arg/ret block of the call.
1390         (grub_ieee1275_finddevice, grub_ieee1275_get_property,
1391         grub_ieee1275_next_property, grub_ieee1275_get_property_length,
1392         grub_ieee1275_instance_to_package, grub_ieee1275_package_to_path,
1393         grub_ieee1275_instance_to_path, grub_ieee1275_write,
1394         grub_ieee1275_read, grub_ieee1275_seek, grub_ieee1275_peer,
1395         grub_ieee1275_child, grub_ieee1275_parent, grub_ieee1275_open,
1396         grub_ieee1275_close, grub_ieee1275_set_property,
1397         grub_ieee1275_set_color): All ieee1275 call arg slots are of type
1398         grub_ieee1275_cell_t.
1399         * kern/ieee1275/openfw.c (grub_map): Likewise.
1400         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_ihandle_t,
1401         grub_ieee1275_phandle_t): Define as grub_unit32_t type.
1403         * kern/ieee1275/init.c (grub_machine_init): Make 'actual' grub_ssize_t.
1404         * kern/ieee1275/openfw.c (grub_children_iterate): Likewise.
1405         (grub_devalias_iterate): Likewise.
1407 2009-04-10  Vladimir Serbinenko  <phcoder@gmail.com>
1409         UFS improvements
1411         * fs/ufs.c (INODE_NBLOCKS): new definition
1412         (struct grub_ufs_dirent): added fields for non-BSD dirents
1413         (grub_ufs_get_file_block): fixed double indirect handling
1414         (grub_ufs_lookup_symlink): use more robust way to determine whether
1415         symlink is inline
1416         (grub_ufs_find_file): support for non-BSD dirents
1417         (grub_ufs_dir): support for non-BSD dirents
1419 2009-04-10  Bean  <bean123ch@gnail.com>
1421         * include/grub/efi/api.h (grub_efi_configuration_table): Add packed
1422         attribute, otherwise the size would be wrong for i386 platform.
1424         * include/grub/pci.h (grub_pci_read_word): New inline function.
1425         (grub_pci_read_byte): Likewise.
1426         (grub_pci_write): Likewise.
1427         (grub_pci_write_word): Likewise.
1428         (grub_pci_write_byte): Likewise.
1430         * include/grub/pci.h (grub_pci_iteratefunc_t): Add NESTED_FUNC_ATTR.
1432         * loader/i386/efi/linux.c (fake_bios_data): Moved to loadbios module.
1433         (find_framebuf): Scan pci to locate the frame buffer address.
1435         * commands/efi/fixvideo.c: New file.
1437         * commands/efi/loadbios.c: Likewise.
1439         * commands/memrw.c: Likewise.
1441         * util/grub-dumpbios.in: Likewise.
1443         * conf/common.rmk (grub-dumpbios): New utility.
1444         (pkglib_MODULES): New module memrw.mod.
1445         (memrw_mod_SOURCE): New macro.
1446         (memrw_mod_CFLAGS): Likewise.
1447         (memrw_mod_LDFLAGS): Likewise.
1449         * conf/i386-efi.rmk (pkglib_MODULES): New module loadbios.mod and
1450         fixvideo.mod.
1451         (loadbios_mod_SOURCE): New macro.
1452         (loadbios_mod_CFLAGS): Likewise.
1453         (loadbios_mod_LDFLAGS): Likewise.
1454         (fixvideo_mod_SOURCE): Likewise.
1455         (fixvideo_mod_CFLAGS): Likewise.
1456         (fixvideo_mod_LDFLAGS): Likewise.
1458         * conf/x86_64.rmk (pkglib_MODULES): New module loadbios.mod and
1459         fixvideo.mod.
1460         (loadbios_mod_SOURCE): New macro.
1461         (loadbios_mod_CFLAGS): Likewise.
1462         (loadbios_mod_LDFLAGS): Likewise.
1463         (fixvideo_mod_SOURCE): Likewise.
1464         (fixvideo_mod_CFLAGS): Likewise.
1465         (fixvideo_mod_LDFLAGS): Likewise.
1467 2009-04-08  Felix Zielcke  <fzielcke@z-51.de>
1469         * disk/lvm.c (grub_lvm_scan_device): Add a missing NULL check.
1471 2009-04-07  David S. Miller  <davem@davemloft.net>
1473         * kern/sparc64/dl.c (grub_arch_dl_relocate_symbols): Add
1474         support for R_SPARC_OLO10 relocations.  Fix compile warning for
1475         R_SPARC_WDISP30 case.
1476         * kern/sparc64/cache.S: Fix grub_arch_sync_caches implementation.
1478 2009-04-06  Pavel Roskin  <proski@gnu.org>
1480         * include/grub/misc.h (ARRAY_SIZE): New macro.
1481         * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START):
1482         New macro.
1483         * loader/i386/linux.c (allocate_pages): Use free_pages().
1484         (grub_linux_unload): Don't use free_pages().
1485         (grub_linux_boot): Prevent accessing linux_vesafb_modes with a
1486         wrong index.  Treat all other modes as text modes.
1487         (grub_cmd_linux): Initialize vid_mode unconditionally to
1488         GRUB_LINUX_VID_MODE_NORMAL.  Recognize and support "vga=ask".
1490         * commands/help.c (print_command_help): Use cmd->prio, not
1491         cmd->flags to check for GRUB_PRIO_LIST_FLAG_ACTIVE.
1493 2009-04-06  Vladimir Serbinenko  <phcoder@gmail.com>
1495         Parttool
1497         * parttool/pcpart.c: new file
1498         * commands/parttool.c: likewise
1499         * conf/common.rmk (pkglib_MODULES): Added parttool.mod and pcpart.mod
1500         (parttool_mod_SOURCES): new variable
1501         (parttool_mod_CFLAGS): likewise
1502         (parttool_mod_LDFLAGS): likewise
1503         (pcpart_mod_SOURCES): likewise
1504         (pcpart_mod_CFLAGS): likewise
1505         (pcpart_mod_LDFLAGS): likewise
1506         * conf/i386-coreboot.rmk (grub_emu_SOURCES): added commands/parttool.c
1507         and parttool/pcpart.c
1508         * conf/i386-efi.rmk: likewise
1509         * conf/i386-ieee1275.rmk: likewise
1510         * conf/i386-pc.rmk: likewise
1511         * conf/powerpc-ieee1275.rmk: likewise
1512         * conf/sparc64-ieee1275.rmk: likewise
1513         * conf/x86_64-ieee1275.rmk: likewise
1515 2009-04-05  Vladimir Serbinenko  <phcoder@gmail.com>
1517         Support for mtime and further expandability of dir command
1519         * include/grub/lib/datetime.h: moved to ...
1520         * include/grub/datetime.h: ... moved here and added
1521         declaration of grub_unixtime2datetime. All users updated
1522         * include/grub/fs.h: new syntax for dir and mtime functions in
1523         struct grub_fs
1524         * include/grub/fshelp.h: new declarations of GRUB_FSHELP_TYPE_MASK
1525         and GRUB_FSHELP_FLAGS_MASK
1526         * commands/ls.c (grub_ls_list_files): Write mtime in long format
1527         * fs/ext2.c (grub_ext2_dir): use new dir syntax and supply mtime
1528         (grub_ext2_mtime): new function
1529         * fs/hfsplus.c (grub_hfsplus_dir): use new dir syntax and supply mtime
1530         (grub_hfsplus_mtime): new function
1531         * fs/ufs.c (GRUB_UFS_ATTR_TYPE): new definition
1532         (GRUB_UFS_ATTR_FILE): likewise
1533         (GRUB_UFS_ATTR_LNK): likewise
1534         (struct grub_ufs_sblock): new fields mtime
1535         (grub_ufs_read_inode): new parameter to read inode to a separate buffer
1536         all users updated
1537         (grub_ufs_dir): mtime support
1538         (grub_ufs_mtime): new function
1539         * fs/affs.c (grub_affs_dir): use new dir syntax
1540         * fs/afs.c (grub_afs_dir): likewise
1541         * fs/cpio.c (grub_cpio_dir): likewise
1542         * fs/fat.c (grub_fat_find_dir): likewise
1543         * fs/hfs.c (grub_hfs_dir): likewise
1544         * fs/iso9660.c (grub_iso9660_dir): likewise
1545         * fs/jfs.c (grub_jfs_dir): likewise
1546         * fs/minix.c (grub_minix_dir): likewise
1547         * fs/ntfs.c (grub_ntfs_dir): likewise
1548         * fs/reiserfs.c (grub_reiserfs_dir): likewise
1549         * fs/sfs.c (grub_sfs_dir): likewise
1550         * fs/xfs.c (grub_xfs_dir): likewise
1551         * util/hostfs.c (grub_hostfs_dir): likewise
1552         * lib/datetime.c: moved to ...
1553         * normal/datetime.c: ... moved here
1554         (grub_unixtime2datetime): new function
1555         * kern/rescue.c (grub_rescue_print_files): use new dir syntax
1556         * normal/completion.c (iterate_dir): use new dir syntax
1557         * normal/misc.c (grub_normal_print_device_info): tell the
1558         last modification time of a volume
1559         * kern/fs.c (grub_fs_probe): updated dummy function to use new syntax
1560         * conf/common.rmk: added lib/datetime.c to ls.mod
1561         * conf/i386-coreboot.rmk (grub_emu_SOURCES): add normal/datetime.c
1562         (normal_mod_SOURCES): likewise
1563         (datetime_mod_SOURCES): Removed lib/datetime.c
1564         * conf/i386-efi.rmk: likewise
1565         * conf/i386-ieee1275.rmk: likewise
1566         * conf/i386-pc.rmk: likewise
1567         * conf/powerpc-ieee1275.rmk: likewise
1568         * conf/sparc64-ieee1275.rmk: likewise
1569         * conf/x86_64-efi.rmk: likewise
1571 2009-04-05  Vladimir Serbinenko  <phcoder@gmail.com>
1573         Trim trailing spaces in FAT label and support mtools-like labels
1575         * fs/fat.c (grub_fat_iterate_dir): New function based
1576         on grub_fat_find_dir
1577         (grub_fat_find_dir): use grub_fat_iterate_dir
1578         (grub_fat_label): likewise
1580 2009-04-04  Vladimir Serbinenko  <phcoder@gmail.com>
1582         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): add list.h
1583         and command.h
1584         remove extraneous kernel_elf_HEADERS
1586 2009-04-04  Bean  <bean123ch@gnail.com>
1588         * include/grub/util/misc.h: Add dummy function fsync for mingw.
1590         * util/misc.c: Likewise.
1592 2009-04-04  Yoshinori K. Okuji  <okuji@enbug.org>
1594         * loader/i386/efi/linux.c (fake_bios_data): Use grub_dprintf
1595         instead of grub_printf.
1597 2009-04-03  Robert Millan  <rmh@aybabtu.com>
1599         * loader/i386/linux.c (grub_linux_setup_video): Fill
1600         `params->{red,green,blue,reserved}_{mask_size,field_pos}' with
1601         values from `mode info' structure instead of hardcoded
1602         values.
1604 2009-04-01  Pavel Roskin  <proski@gnu.org>
1606         * Makefile.in: Remove all references to MODULE_LDFLAGS, it's
1607         unused now.
1608         * genmk.rb: Likewise.
1609         * configure.ac: Likewise.
1611 2009-04-01  Manoel Abranches  <mrabran@linux.vnet.ibm.com>
1613         * aclocal.m4: Move --build-id=none from MODULE_LDFLAGS to
1614         TARGET_LDFLAGS.  This corrects a problem with grub-mkelfimage.
1616 2009-04-01  David S. Miller  <davem@davemloft.net>
1618         * normal/sparc64/setjmp.S: Fix setjmp implementation.
1619         * include/grub/sparc64/setjmp.h (grub_jmp_buf): Update.
1620         (grub_setjmp): Mark with 'returns_twice' attribute.
1621         * include/grub/i386/setjmp.h (grub_setjmp): Likewise
1622         * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise.
1623         * include/grub/x86_64/setjmp.h (grub_setjmp): Likewise.
1625 2009-04-01  Robert Millan  <rmh@aybabtu.com>
1627         Reapply fix from 2008-07-28 which was accidentally reverted; also
1628         perform the same fix to a similar check in same function.
1630         * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
1631         with the same number are found, just use issue a warning with
1632         grub_dprintf(), as this error has been reported to be non-fatal.
1634 2009-03-31  Pavel Roskin  <proski@gnu.org>
1636         * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Provide safe default
1637         for cross-compilation.
1639 2009-03-30  Robert Millan  <rmh@aybabtu.com>
1641         Fix i386-ieee1275 build.
1643         * include/grub/i386/ieee1275/loader.h (grub_multiboot2_real_boot):
1644         Remove declaration.
1646 2009-03-30  Pavel Roskin  <proski@gnu.org>
1648         * fs/hfs.c (grub_hfs_strncasecmp): Integrate into ...
1649         (grub_hfs_cmp_catkeys): ... this.  Don't assume strings to be
1650         zero-terminated, rely only on the strlen value.  Fix comparison
1651         of strings differing in length.
1653 2009-03-30  Robert Millan  <rmh@aybabtu.com>
1655         * loader/i386/linux.c (grub_cmd_linux): Check for zImage before
1656         checking for abi version.  Improve error messages on BIOS to notify
1657         user about `linux16' command.
1659 2009-03-29  Vladimir Serbinenko  <phcoder@gmail.com>
1661         Leak fixes
1663         * kern/disk.c (grub_disk_cache_store): Invalidate previous cache
1664         in case of collision
1665         * disk/scsi.c (grub_scsi_open): free scsi in case of error
1667 2009-03-29  Robert Millan  <rmh@aybabtu.com>
1669         * loader/i386/linux.c (grub_cmd_linux): Parse "vga=" parameter and
1670         set `vid_mode' accordingly.
1671         (grub_linux_boot): Process `vid_mode' and set video mode.
1673 2009-03-29  Robert Millan  <rmh@aybabtu.com>
1675         * util/grub.d/10_linux.in (linux_entry): New function.
1676         Factorize generation of Linux boot entries.
1678 2009-03-29  Yoshinori K. Okuji  <okuji@enbug.org>
1680         Make the format of Environment Block plain text. The boot loader
1681         part is not tested well yet.
1683         * util/grub-editenv.c (DEFAULT_ENVBLK_SIZE): New macro.
1684         (buffer): Removed.
1685         (envblk): Likewise.
1686         (usage): Remove "info" and "clear". Add "unset". Update the
1687         description of "set", as this does not delete variables any
1688         longer.
1689         (create_envblk_file): Complete rewrite.
1690         (open_envblk_file): Likewise.
1691         (cmd_info): Removed.
1692         (cmd_list): Likewise.
1693         (cmd_set): Likewise.
1694         (cmd_clear): Likewise.
1695         (list_variables): New function.
1696         (write_envblk): Likewise.
1697         (set_variables): Likewise.
1698         (unset_variables): Likewise.
1699         (main): Complete rewrite.
1701         * commands/loadenv.c (buffer): Removed.
1702         (envblk): Likewise.
1703         (open_envblk_file): New function.
1704         (read_envblk_file): Complete rewrite.
1705         (grub_cmd_load_env): Likewise.
1706         (grub_cmd_list_env): Likewise.
1707         (struct blocklist): New struct.
1708         (free_blocklists): New function.
1709         (check_blocklists): Likewise.
1710         (write_blocklists): Likewise.
1711         (grub_cmd_save_env): Complete rewrite.
1713         * include/grub/lib/envblk.h (GRUB_ENVBLK_SIGNATURE): Replaced with
1714         a plain text signature.
1715         (GRUB_ENVBLK_MAXLEN): Removed.
1716         (struct grub_envblk): Complete rewrite.
1717         (grub_envblk_find): Removed.
1718         (grub_envblk_insert): Likewise.
1719         (grub_envblk_open): New prototype.
1720         (grub_envblk_set): Likewise.
1721         (grub_envblk_delete): Put const to VALUE.
1722         (grub_envblk_iterate): Put const to NAME and VALUE.
1723         (grub_envblk_close): New prototype.
1724         (grub_envblk_buffer): New inline function.
1725         (grub_envblk_size): Likewise.
1727         * lib/envblk.c: Include grub/mm.h.
1728         (grub_env_find): Removed.
1729         (grub_envblk_open): New function.
1730         (grub_envblk_close): Likewise.
1731         (escaped_value_len): Likewise.
1732         (find_next_line): Likewise.
1733         (grub_envblk_insert): Removed.
1734         (grub_envblk_set): New function.
1735         (grub_envblk_delete): Complete rewrite.
1736         (grub_envblk_iterate): Likewise.
1738 2009-03-28  Robert Millan  <rmh@aybabtu.com>
1740         * conf/i386-pc.rmk (pkglib_MODULES): Add `linux16.mod'.
1741         (linux16_mod_SOURCES, linux16_mod_CFLAGS, linux16_mod_LDFLAGS): New
1742         variables.  Use 16-bit loader.
1743         (linux_mod_SOURCES, linux_mod_CFLAGS, linux_mod_LDFLAGS): Use 32-bit
1744         loader.
1745         * kern/i386/loader.S (grub_linux_boot): Rename to ...
1746         (grub_linux16_boot): ... this.  Update all users.
1747         * loader/i386/linux.c (grub_linux32_boot): Rename to ...
1748         (grub_linux_boot): ... this.  Update all users.
1750         * loader/i386/pc/linux.c (GRUB_MOD_INIT(linux)): Rename to ...
1751         (GRUB_MOD_INIT(linux16)): ... this.  Rename `linux' and `initrd'
1752         commands to `linux16' and `initrd16'.
1753         (GRUB_MOD_FINI(linux)): Rename to ...
1754         (GRUB_MOD_FINI(linux16)): ... this.
1756 2009-03-24  Pavel Roskin  <proski@gnu.org>
1758         * genmk.rb: Define ASM_FILE for *.S files for *.lst generation,
1759         not just for compilation.
1761 2009-03-22  Vladimir Serbinenko  <phcoder@gmail.com>
1763         Move multiboot helper out of kernel
1765         * conf/i386-pc.rmk (multiboot_mod_SOURCES): Add
1766         `loader/i386/multiboot_helper.S'.
1767         * conf/i386-coreboot.rmk: Likewise
1768         * conf/i386-ieee1275.rmk: Likewise
1770         * kern/i386/loader.S: Move multiboot helpers from here...
1771         * loader/i386/multiboot_helper.S: ...moved here
1772         * include/grub/i386/loader.h: Move declarations of multiboot
1773         helpers from here...
1774         * include/grub/i386/multiboot.h: ...moved here
1775         * loader/i386/multiboot.c: Added include of grub/cpu/multiboot.h
1777 2009-03-22  Yoshinori K. Okuji  <okuji@enbug.org>
1779         * kern/env.c (grub_env_context_open): Added an argument to specify
1780         whether a new context inherits exported variables from current
1781         one. This is useful when making a sandbox to interpret a config
1782         file.
1783         All callers updated.
1785         * include/grub/env.h (grub_env_context_open): Updated the prototype.
1787 2009-03-22  Yoshinori K. Okuji  <okuji@enbug.org>
1789         * kern/env.c (grub_env_context_close): Fix memory leaks.
1791 2009-03-22  Yoshinori K. Okuji  <okuji@enbug.org>
1793         * normal/main.c (grub_normal_execute): Added an argument
1794         BATCH to specify if an interactive interface should be provided
1795         after reading a config file.
1796         All callers updated.
1797         (read_command_list): Prevent being executed twice.
1798         (read_fs_list): Likewise.
1800         * include/grub/normal.h (grub_normal_execute): Updated the
1801         prototype.
1803 2009-03-22  Pavel Roskin  <proski@gno.org>
1805         * kern/powerpc/ieee1275/startup.S: Replace EXT_C(start) with
1806         _start.
1807         * kern/i386/pc/startup.S: Likewise.
1808         * kern/i386/efi/startup.S: Likewise.
1809         * kern/i386/ieee1275/startup.S: Likewise.
1810         * kern/i386/coreboot/startup.S: Likewise.
1811         * kern/x86_64/efi/startup.S: Likewise.
1813         * aclocal.m4 (grub_CHECK_START_SYMBOL): Remove.
1814         * configure.ac: Don't call grub_CHECK_START_SYMBOL.
1815         * kern/i386/pc/startup.S: Use _start instead of START_SYMBOL.
1817 2009-03-21  Vladimir Serbinenko  <phcoder@gmail.com>
1819         Bugfixes in multiboot for bugs uncovered by solaris kernel.
1821         * loader/i386/multiboot_elfxx.c (grub_multiboot_load_elf): Corrected
1822         limit detection.
1823         Use vaddr of correct segment for entry_point.
1825 2009-03-21  Bean  <bean123ch@gmail.com>
1827         * commands/blocklist.c: Add include file <grub/command.h>, remove
1828         <grub/normal.h> and <grub/arg.h>.
1829         (grub_cmd_blocklist): Use the new command interface.
1830         (GRUB_MOD_INIT): Likewise.
1831         (GRUB_MOD_FINI): Likewise.
1832         * commands/boot.c: Likewise.
1833         * commands/cat.c: Likewise.
1834         * commands/cmp.c: Likewise.
1835         * commands/configfile.c: Likewise.
1836         * commands/crc.c: Likewise.
1837         * commands/echo.c: Likewise.
1838         * commands/halt.c: Likewise.
1839         * commands/handler.c: Likewise.
1840         * commands/hdparm.c: Likewise.
1841         * commands/help.c: Likewise.
1842         * commands/hexdump.c: Likewise.
1843         * commands/loadenv.c: Likewise.
1844         * commands/ls.c: Likewise.
1845         * commands/lsmmap.c: Likewise.
1846         * commands/lspci.c: Likewise.
1847         * commands/loadenv.c: Likewise.
1848         * commands/read.c: Likewise.
1849         * commands/reboot.c: Likewise.
1850         * commands/search.c: Likewise.
1851         * commands/sleep.c: Likewise.
1852         * commands/test.c: Likewise.
1853         * commands/usbtest.c: Likewise.
1854         * commands/videotest.c: Likewise.
1855         * commands/i386/cpuid.c: Likewise.
1856         * commands/i386/pc/halt.c: Likewise.
1857         * commands/i386/pc/play.c: Likewise.
1858         * commands/i386/pc/pxecmd.c: Likewise.
1859         * commands/i386/pc/vbeinfo.c: Likewise.
1860         * commands/i386/pc/vbetest.c: Likewise.
1861         * commands/ieee1275/suspend.c: Likewise.
1862         * disk/loopback.c: Likewise.
1863         * font/font_cmd.c: Likewise.
1864         * hello/hello.c: Likewise.
1865         * loader/efi/appleloader.c: Likewise.
1866         * loader/efi/chainloader.c: Likewise.
1867         * loader/i386/bsd.c: Likewise.
1868         * loader/i386/efi/linux.c: Likewise.
1869         * loader/i386/ieee1275/linux.c: Likewise.
1870         * loader/i386/linux.c: Likewise.
1871         * loader/i386/pc/chainloader.c: Likewise.
1872         * loader/i386/pc/linux.c: Likewise.
1873         * loader/powerpc/ieee1275/linux.c: Likewise.
1874         * loader/multiboot_loader.c: Likewise.
1875         * term/gfxterm.c: Likewise.
1876         * term/i386/pc/serial.c: Likewise.
1877         * term/terminfo.c: Likewise.
1879         * term/i386/pc/vesafb.c: Removed <grub/arg.h>.
1880         * term/i386/pc/vga.c: Likewise.
1881         * video/readers/jpeg.c: Likewise.
1882         * video/readers/png.c: Likewise.
1883         * video/readers/tga.c: Likewise.
1885         * util/grub-fstest (cmd_loopback): Removed.
1886         (cmd_blocklist): Likewise.
1887         (cmd_ls): Likewise.
1888         (grub_register_command): Likewise.
1889         (grub_unregister_command): Likewise.
1890         (execute_command): Use grub_command_find to locate command and execute
1891         it.
1893         * include/grub/efi/chainloader.h: Removed.
1894         * loader/efi/chainloader_normal.c: Likewise.
1895         * loader/i386/bsd_normal.c: Likewise.
1896         * loader/i386/pc/chainloader_normal.c: Likewise.
1897         * loader/i386/pc/multiboot_normal.c: Likewise.
1898         * loader/linux_normal.c: Likewise.
1899         * loader/multiboot_loader_normal.c: Likewise.
1900         * loader/powerpc/ieee1275/linux_normal.c: Likewise.
1902         * gencmdlist.sh: Scan new registration command grub_register_extcmd
1903         and grub_register_command_p1.
1905         * conf/common.rmk (grub_fstest_SOURCES): Add kern/list.c,
1906         kern/command.c, lib/arg.c and commands/extcmd.c.
1907         (pkglib_MODULES): Remove boot.mod, and minicmd.mod and extcmd.mod.
1908         (minicmd_mod_SOURCES): New variable.
1909         (minicmd_mod_CFLAGS): Likewise.
1910         (minicmd_mod_LDFLAGS): Likewise.
1911         (extcmd_mod_SOURCES): Likewise.
1912         (extcmd_mod_CFLAGS): Likewise.
1913         (extcmd_mod_LDFLAGS): Likewise.
1914         (boot_mod_SOURCES): Removed.
1915         (boot_mod_CFLAGS): Likewise.
1916         (boot_mod_LDFLAGS): Likewise.
1918         * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/command.c and
1919         kern/corecmd.c.
1920         (kernel_img_HEADERS): Add command.h.
1921         (grub_emu_SOURCES): Remove commands/boot.c and normal/arg.c, add
1922         commands/minicmd.c, kern/command.c, kern/corecmd.c, commands/extcmd.c
1923         and lib/arg.c.
1924         (pkglib_MODULES): Change _linux.mod, _chain.mod, _bsd.mod and
1925         _multiboot.mod as linux.mod, chain.mod, bsd.mod and multiboot.mod,
1926         remove the corresponding normal mode command.
1927         (normal_mod_SOURCES): Remove normal/arg.c.
1928         * conf/i386-coreboot.rmk: Likewise.
1929         * conf/i386-efi.rmk: Likewise.
1930         * conf/i386-ieee1275.rmk: Likewise.
1931         * conf/powerpc-ieee1275.rmk: Likewise.
1932         * conf/x86_64-efi.rmk: Likewise.
1934         * include/grub/arg.h: Move from here ...
1935         * include/grub/lib/arg.h: ... to here.
1937         * normal/arg.c: Move from here ...
1938         * lib/arg.c: ... to here.
1940         * commands/extcmd.c: New file.
1941         * commands/minicmd.c: Likewise.
1942         * include/grub/command.h: Likewise.
1943         * include/grub/extcmd.h: Likewise.
1944         * kern/command.c: Likewise.
1945         * kern/corecmd.c: Likewise.
1947         * kern/list.c (grub_list_iterate): Return int instead of void.
1948         (grub_list_insert): New function.
1949         (grub_prio_list_insert): Likewise.
1951         * kern/rescue.c (grub_rescue_command): Removed.
1952         (grub_rescue_command_list): Likewise.
1953         (grub_rescue_register_command): Likewise.
1954         (grub_rescue_unregister_command): Likewise.
1955         (grub_rescue_cmd_boot): Move to minicmd.c
1956         (grub_rescue_cmd_help): Likewise.
1957         (grub_rescue_cmd_info): Likewise.
1958         (grub_rescue_cmd_boot): Likewise.
1959         (grub_rescue_cmd_testload): Likewise.
1960         (grub_rescue_cmd_dump): Likewise.
1961         (grub_rescue_cmd_rmmod): Likewise.
1962         (grub_rescue_cmd_lsmod): Likewise.
1963         (grub_rescue_cmd_exit): Likewise.
1964         (grub_rescue_print_devices): Moved to corecmd.c.
1965         (grub_rescue_print_files): Likewise.
1966         (grub_rescue_cmd_ls): Likewise.
1967         (grub_rescue_cmd_insmod): Likewise.
1968         (grub_rescue_cmd_set): Likewise.
1969         (grub_rescue_cmd_unset): Likewise.
1970         (attempt_normal_mode): Use grub_command_find to get normal module.
1971         (grub_enter_rescue_mode): Use grub_register_core_commands to register
1972         commands, remove grub_rescue_register_command calls.
1974         * normal/command.c (grub_register_command): Removed.
1975         (grub_unregister_command): Likewise.
1976         (grub_command_find): Likewise.
1977         (grub_iterate_commands): Likewise.
1978         (rescue_command): Likewise.
1979         (export_command): Moved to corecmd.c.
1980         (set_command): Removed.
1981         (unset_command): Likewise.
1982         (insmod_command): Likewise.
1983         (rmmod_command): Likewise.
1984         (lsmod_command): Likewise.
1985         (grub_command_init): Likewise.
1987         * normal/completion.c (iterate_command): Use cmd->prio to check for
1988         active command.
1989         (complete_arguments): Use grub_extcmd_t structure to find options.
1990         (grub_normal_do_completion): Change function grub_iterate_commands to
1991         grub_command_iterate.
1993         * normal/execute.c (grub_script_execute_cmd): No need to parse
1994         argument here.
1996         * normal/main.c (grub_dyncmd_dispatcher): New function.
1997         (read_command_list): Register unload commands as dyncmd.
1998         (grub_cmd_normal): Use new command interface, register rescue,
1999         unregister normal at entry, register normal, unregister rescue at exit.
2001         * include/grub/list.h (grub_list_test_t): New type.
2002         (grub_list_iterate): Return int instead of void.
2003         (grub_list_insert): New function.
2004         (GRUB_AS_NAMED_LIST_P): New macro.
2005         (GRUB_AS_PRIO_LIST): Likewise.
2006         (GRUB_AS_PRIO_LIST_P): Likewise.
2007         (GRUB_PRIO_LIST_PRIO_MASK): New constant.
2008         (GRUB_PRIO_LIST_FLAG_ACTIVE): Likewise.
2009         (grub_prio_list): New structure.
2010         (grub_prio_list_insert): New function.
2011         (grub_prio_list_remove): New inline function.
2013         * include/grub/normal.h: Remove <grub/arg.h>, add <grub/command.h>.
2014         (GRUB_COMMAND_FLAG_CMDLINE): Moved to command.h.
2015         (GRUB_COMMAND_FLAG_MENU): Likewise.
2016         (GRUB_COMMAND_FLAG_BOTH): Likewise.
2017         (GRUB_COMMAND_FLAG_TITLE): Likewise.
2018         (GRUB_COMMAND_FLAG_NO_ECHO): Likewise.
2019         (GRUB_COMMAND_FLAG_NO_ARG_PARSE): Removed.
2020         (GRUB_COMMAND_FLAG_NOT_LOADED): Likewise.
2021         (grub_command): Likewise.
2022         (grub_register_command): Likewise.
2023         (grub_command_find): Likewise.
2024         (grub_iterate_commands): Likewise.
2025         (grub_command_init): Likewise.
2026         (grub_arg_parse): Likewise.
2027         (grub_arg_show_help): Likewise.
2029         * include/grub/rescue.h (grub_rescue_register_command): Removed.
2030         (grub_rescue_unregister_command): Likewise.
2032         * include/grub/i386/bsd.h: Remove grub_rescue_cmd_freebsd,
2033         grub_rescue_cmd_openbsd, grub_rescue_cmd_netbsd,
2034         grub_rescue_cmd_freebsd_loadenv and grub_rescue_cmd_freebsd_module.
2036         * include/grub/i386/efi/loader.h: Remove grub_rescue_cmd_linux and
2037         grub_rescue_cmd_initrd.
2038         * include/grub/i386/loader.h: Likewise.
2039         * include/grub/x86_64/loader.h: Likewise.
2041         * include/grub/i386/pc/chainloader.h: Remove grub_chainloader_cmd.
2043 2009-03-21  Bean  <bean123ch@gmail.com>
2045         * util/hostdisk.c (read_device_map): Use grub_util_get_disk_size
2046         instead of stat in mingw environment.
2048         * util/misc.c (grub_millisleep): Use Sleep in mingw environment.
2050         * aclocal.m4 (grub_CHECK_LINK_DIR): New function.
2052         * configure.ac: Use grub_CHECK_LINK_DIR to determine whether to use
2053         AC_CONFIG_LINKS.
2055 2009-03-21  Bean  <bean123ch@gmail.com>
2057         * fs/ext2.c (grub_ext2_mount): Change errno to GRUB_ERR_BAD_FS for
2058         out of range error.
2060 2009-03-18  Michel Dänzer  <michel@daenzer.net>
2062         * fs/ext2.c (grub_ext2_read_block): Take endianness into account when
2063         checking inode flags for EXT4_EXTENTS_FLAG.
2065 2009-03-18  Robert Millan  <rmh@aybabtu.com>
2067         * loader/i386/linux.c: Include `<grub/video.h>' and
2068         `<grub/i386/pc/vbe.h>'..
2069         (grub_linux_setup_video): New function.  Loosely based on the EFI one.
2070         (grub_linux32_boot): Attempt to configure video settings with
2071         grub_linux_setup_video().
2072         (grub_rescue_cmd_linux): Set noreturn=0 in grub_loader_set, in order
2073         to avoid grub_console_fini() which would step out of graphical mode
2074         unconditionally.
2076 2009-03-14  Robert Millan  <rmh@aybabtu.com>
2078         Fix build on powerpc.
2079         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Add `handler.h'.
2081 2009-03-12  Vladimir Serbinenko  <phcoder@gmail.com>
2083         * term/gfxterm.c (GRUB_MOD_FINI(term_gfxterm)): Correct name of
2084         background image command.
2086 2009-03-12  Colin D Bennett  <colin@gibibit.com>
2088         * term/gfxterm.c (draw_cursor): Ensure character is redrawn.
2089         (grub_gfxterm_putchar): Extract pairs of identical calls to
2090         draw_cursor out of conditional blocks.
2092 2009-03-11  Pavel Roskin  <proski@gnu.org>
2094         * fs/hfs.c (grub_hfs_strncasecmp): New function.
2095         (grub_hfs_cmp_catkeys): Use HFS specific string comparison.
2097 2009-03-11  Robert Millan  <rmh@aybabtu.com>
2099         * loader/i386/multiboot_elfxx.c
2100         (CONCAT(grub_multiboot_load_elf, XX)): Do not reject ET_DYN files.
2102 2009-03-11  Felix Zielcke  <fzielcke@z-51.de>
2104         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add `kern/list.c' and
2105         `kern/handler.c'.
2107 2009-03-11  Robert Millan  <rmh@aybabtu.com>
2109         * loader/i386/multiboot.c (code_size): New variable.
2110         (grub_multiboot): Define offsets by adding to `code_size' rather
2111         than subtracting from `grub_multiboot_payload_size'.  Provide
2112         4-byte alignment to MBI and others by increasing
2113         `boot_loader_name_length' appropriately.
2115         * loader/i386/multiboot_elfxx.c
2116         (CONCAT(grub_multiboot_load_elf, XX)): Initialize `code_size'.
2118 2009-03-09  Felix Zielcke  <fzielcke@z-51.de>
2120         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove duplicated
2121         `fs/ext2.c'.
2123 2009-03-08  Robert Millan  <rmh@aybabtu.com>
2125         Make loader/i386/linux.c usable on i386-pc again.
2127         * kern/i386/pc/init.c (grub_machine_init): Disable addition of low
2128         memory to heap.
2129         * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (allocate_pages): Remove
2130         `#error' stanza.
2132 2009-03-07  Bean  <bean123ch@gmail.com>
2134         * loader/i386/efi/linux.c (grub_rescue_cmd_initrd): Fix a bug in initrd
2135         allocation.
2137 2009-03-06  Robert Millan  <rmh@aybabtu.com>
2139         Fix display issue on terminals with screen size other than 80x25
2140         (e.g. gfxterm with resolution higher than 640x480).
2142         * normal/main.c (grub_normal_init_page): Display title text in a
2143         position relative to the center of the terminal instead of relying
2144         on a hardcoded offset.
2146 2009-03-04  Robert Millan  <rmh@aybabtu.com>
2148         Filter /etc/grub.d/10_* so that only add-ons for native kernels are
2149         installed.
2151         * Makefile.in (host_kernel): New variable.
2152         * conf/common.rmk (grub-mkconfig_SCRIPTS): Conditionalize all 10_*.in
2153         scripts instead of just the windows one.
2154         * configure.ac: Initialize and AC_SUBST `host_kernel'.
2156 2009-03-04  Felix Zielcke  <fzielcke@z-51.de>
2158         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `kern/list.c' and
2159         `kern/handler.c'.
2160         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
2161         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
2162         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
2163         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2164         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2165         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2167 2009-03-04  Felix Zielcke  <fzielcke@z-51.de>
2169         * partmap/pc.c (pc_partition_map_iterate): Skip over invalid BSD partitions
2170         or if there's no space for the disk label and print the partition number on a
2171         invalid magic.
2173 2009-03-04  Felix Zielcke  <fzielcke@z-51.de>
2175         * util/misc.c: Include <time.h>.
2176         (grub_millisleep): New function.
2178 2009-03-04  Bean  <bean123ch@gmail.com>
2180         * configure.ac: Only test -mcmodel=large option in x86_64-efi, also add
2181         another option -mno-red-zone.
2183         * commands/handler.c: Change module description.
2185         * kern/handler.c: Add missing space at the end of description line.
2187         * kern/list.c: Likewise.
2189 2009-03-03  Robert Millan  <rmh@aybabtu.com>
2191         Move more components to the relocation area, and fix mbi pointer
2192         handling to use the destination rather than the origin (thanks to
2193         Vladimir Serbinenko for spotting).
2195         * loader/i386/multiboot.c (mbi_dest): New variable.
2196         (grub_multiboot_boot): Use `mbi_dest' instead of `mbi'.
2197         (grub_multiboot): Put cmdline, boot_loader_name and mbi in the
2198         relocation area.
2200 2009-03-01  Bean  <bean123ch@gmail.com>
2202         * include/grub/efi/api.h (GRUB_EFI_MPS_TABLE_GUID): New constant.
2203         (GRUB_EFI_ACPI_TABLE_GUID): Likewise.
2204         (GRUB_EFI_ACPI_20_TABLE_GUID): Likewise.
2205         (GRUB_EFI_SMBIOS_TABLE_GUID): Likewise.
2207         * loader/i386/efi/linux.c (acpi_guid): New variable.
2208         (acpi_guid): Likewise.
2209         (EBDA_SEG_ADDR): New constant.
2210         (LOW_MEM_ADDR): Likewise.
2211         (FAKE_EBDA_SEG): Likewise.
2212         (fake_bios_data): New function.
2213         (grub_linux_boot): Call fake_bios_data.
2215 2009-03-01  Bean  <bean123ch@gmail.com>
2217         * commands/terminal.c: Removed.
2219         * commands/handler.c: New file.
2221         * include/grub/list.h: Likewise.
2223         * include/grub/handler.h: Likewise.
2225         * kern/list.c: Likewise.
2227         * kern/handler.c: Likewise.
2229         * kern/term.h: Include header file <grub/handler.h>.
2230         (grub_term_input): Move next field to the beginning.
2231         (grub_term_output): Likewise.
2232         (grub_term_input_class): New variable.
2233         (grub_term_output_class): Likewise.
2234         (grub_term_register_input): Changed to inline function.
2235         (grub_term_register_output): Likewise.
2236         (grub_term_unregister_input): Likewise.
2237         (grub_term_unregister_output): Likewise.
2238         (grub_term_set_current_input): Likewise.
2239         (grub_term_set_current_output): Likewise.
2240         (grub_term_get_current_input): Likewise.
2241         (grub_term_get_current_output): Likewise.
2242         (grub_term_iterate_input): Removed.
2243         (grub_term_iterate_output): Likewise.
2245         * kern/term.c (grub_term_list_input): Removed.
2246         (grub_term_list_output): Likewise.
2247         (grub_term_input_class): New variable.
2248         (grub_term_output_class): Likewise.
2249         (grub_cur_term_input): Change variable as macro.
2250         (grub_cur_term_output): Likewise.
2251         (grub_term_register_input): Removed.
2252         (grub_term_register_output): Likewise.
2253         (grub_term_unregister_input): Likewise.
2254         (grub_term_unregister_output): Likewise.
2255         (grub_term_set_current_input): Likewise.
2256         (grub_term_set_current_output): Likewise.
2257         (grub_term_iterate_input): Likewise.
2258         (grub_term_iterate_output): Likewise.
2259         (grub_term_get_current_input): Likewise.
2260         (grub_term_get_current_output): Likewise.
2262         * util/grub-editenv.c: Include header file <grub/handler.h>.
2263         (grub_term_get_current_input): Removed.
2264         (grub_term_get_current_output): Likewise.
2265         (grub_term_input_class): New variable.
2266         (grub_term_output_class): Likewise.
2268         * util/grub-fstest.c (grub_term_get_current_input): Removed.
2269         (grub_term_get_current_output): Likewise.
2270         (grub_term_input_class): New variable.
2271         (grub_term_output_class): Likewise.
2273         * util/grub-probe.c (grub_term_get_current_input): Removed.
2274         (grub_term_get_current_output): Likewise.
2275         (grub_term_input_class): New variable.
2276         (grub_term_output_class): Likewise.
2278         * util/i386/pc/grub-setup.c (grub_term_get_current_input): Removed.
2279         (grub_term_get_current_output): Likewise.
2280         (grub_term_input_class): New variable.
2281         (grub_term_output_class): Likewise.
2283         * conf/common.rmk (pkglib_MODULES): Replace terminal with handler.
2284         (terminal_mod_SOURCES): Likewise.
2285         (terminal_mod_CFLAGS): Likewise.
2286         (terminal_mod_LDFLAGS): Likewise.
2288         * conf/i386-pc.rmk (grub_emu_SOURCES): Replace terminal.c with
2289         handler.c.
2290         (kernel_img_SOURCES): Add list.c and handler.c.
2291         (kernel_img_HEADERS): Add list.h and handler.h.
2293         * conf/i386-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
2294         handler.c.
2295         (kernel_mod_SOURCES): Add list.c and handler.c.
2296         (kernel_mod_HEADERS): Add list.h and handler.h.
2298         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Replace terminal.c with
2299         handler.c.
2300         (kernel_elf_SOURCES): Add list.c and handler.c.
2301         (kernel_elf_HEADERS): Add list.h and handler.h.
2303         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
2304         handler.c.
2305         (kernel_elf_SOURCES): Add list.c and handler.c.
2306         (kernel_elf_HEADERS): Add list.h and handler.h.
2308         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
2309         handler.c.
2310         (kernel_mod_SOURCES): Add list.c and handler.c.
2311         (kernel_mod_HEADERS): Add list.h and handler.h.
2313         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
2314         handler.c.
2315         (kernel_elf_SOURCES): Add list.c and handler.c.
2316         (kernel_elf_HEADERS): Add list.h and handler.h.
2318 2009-02-27  Robert Millan  <rmh@aybabtu.com>
2320         Factorize elf32 / elf64 code in Multiboot loader.  This will
2321         prevent it from getting out of sync again.
2323         * loader/i386/multiboot.c (grub_multiboot_is_elf32,
2324         grub_multiboot_load_elf32, grub_multiboot_is_elf64,
2325         grub_multiboot_load_elf64): Move from here ...
2326         * loader/i386/multiboot_elfxx.c (grub_multiboot_is_elf,
2327         grub_multiboot_load_elf): ... to here (new file).
2329 2009-02-27  Robert Millan  <rmh@aybabtu.com>
2331         * util/grub.d/10_linux.in: Rename "single-user mode" to
2332         "recovery mode".
2334 2009-02-27  Vladimir Serbinenko  <phcoder@gmail.com>
2336         Don't leak in SCSI code.
2337         * disk/scsi.c (grub_scsi_close): free `scsi'.
2339 2009-02-27  Robert Millan  <rmh@aybabtu.com>
2341         * loader/i386/pc/multiboot.c: Move from here ...
2342         * loader/i386/multiboot.c: ... to here.  Update all users.
2344 2009-02-27  Robert Millan  <rmh@aybabtu.com>
2346         Patch from Alexandre Bique <bique.alexandre@gmail.com>
2347         * util/i386/pc/grub-setup.c (setup): Fix directory path.
2349 2009-02-27  Krzysztof Smiechowicz  <deadwood@wp.pl>
2351         * fs/sfs.c (grub_sfs_read_extent): Correction to traversing extent
2352         b-tree.
2354 2009-02-27  Robert Millan  <rmh@aybabtu.com>
2356         * kern/misc.c (grub_strtoull): Fix bug (it mistakenly parsed the
2357         `0x' qualifier as 0 when base is specified as parameter).
2359 2009-02-24  Bean  <bean123ch@gmail.com>
2361         * configure.ac: Check for -mcmodel=large in x86_64 target.
2363         * include/grub/efi/api.h (efi_call_10): New macro.
2364         (efi_wrap_10): New function.
2366         * include/grub/efi/pe32.h (GRUB_PE32_REL_BASE_HIGH): New macro.
2367         (GRUB_PE32_REL_BASED_HIGH): Likewise.
2368         (GRUB_PE32_REL_BASED_LOW): Likewise.
2369         (GRUB_PE32_REL_BASED_HIGHLOW): Likewise.
2370         (GRUB_PE32_REL_BASED_HIGHADJ): Likewise.
2371         (GRUB_PE32_REL_BASED_MIPS_JMPADDR): Likewise.
2372         (GRUB_PE32_REL_BASED_SECTION): Likewise.
2373         (GRUB_PE32_REL_BASED_REL): Likewise.
2374         (GRUB_PE32_REL_BASED_IA64_IMM64): Likewise.
2375         (GRUB_PE32_REL_BASED_DIR64): Likewise.
2376         (GRUB_PE32_REL_BASED_HIGH3ADJ): Likewise.
2378         * kern/x86_64/dl.c (grub_arch_dl_relocate_symbols): Fixed relocation
2379         issue.
2381         * kern/x86_64/efi/callwrap.S (efi_wrap_6): Bug fix.
2382         (efi_wrap_10): New function.
2384         * kern/x86_64/efi/startup.S (codestart): Use relative addressing.
2386         * loader/efi/appleloader.c (devpath_5): Add support for late 2008
2387         MB/MBP model (NV chipset).
2388         (devdata_devs): Add devpath_5 to the list.
2390         * load/i386/efi/linux.c (video_base): Remove variable.
2391         (RGB_MASK): New macro.
2392         (RGB_MAGIC): Likewise.
2393         (LINE_MIN): Likewise.
2394         (LINE_MAX): Likewise.
2395         (FBTEST_STEP): Likewise.
2396         (FBTEST_COUNT): Likewise.
2397         (fb_list): New variable.
2398         (grub_find_video_card): Remove function.
2399         (find_framebuf): New function.
2400         (grub_linux_setup_video): Use find_framebuf to get frame buffer and
2401         line length.
2403         * util/i386/efi/grub-mkimage.c (grub_reloc_section): Fix relocation
2404         problem for x86_64.
2406 2009-02-22  Vesa Jääskeläinen  <chaac@nic.fi>
2408         Patch #25624 by Kevin Lacquement <kevin@lacqui>.
2410         * util/grub-mkconfig.in: Use ${grub_mkdevicemap} instead of hard
2411         coding tool name.
2413 2009-02-22  Robert Millan  <rmh@aybabtu.com>
2415         * include/multiboot.h (MULTIBOOT_INFO_ALIGN): New macro.
2416         * loader/i386/pc/multiboot.c (grub_multiboot): Include the MBI
2417         in our relocation, instead of using it directly from heap.  Also
2418         use `MULTIBOOT_INFO_ALIGN' to ensure it is aligned.
2420 2009-02-21  Robert Millan  <rmh@aybabtu.com>
2422         Implement USB keyboard support (based on patch by Marco Gerards)
2424         * conf/i386-pc.rmk (pkglib_MODULES): Add `usb_keyboard.mod'.
2425         (usb_keyboard_mod_SOURCES, usb_keyboard_mod_CFLAGS)
2426         (usb_keyboard_mod_LDFLAGS): New variables.
2428         * term/usb_keyboard.c: New file.
2430 2009-02-14  Vladimir Serbinenko  <phcoder@gmail.com>
2432         Corrected wrong declaration
2434         * kern/disk.c: corrected declaration of grub_disk_ata_pass_through.
2436 2009-02-14  Christian Franke  <franke@computer.org>
2438         * commands/lspci.c (grub_pci_classes): Add `SATA Controller'.
2439         (grub_lspci_iter): Print class code and programming interface byte.
2441 2009-02-14  Christian Franke  <franke@computer.org>
2443         * gendistlist.sh: Ignore `.svn' directories.
2445 2009-02-14  Felix Zielcke  <fzielcke@z-51.de>
2447         * fs/fat.c: Add 2009 to Copyright line.
2449 2009-02-14  Christian Franke  <franke@computer.org>
2451         * commands/hdparm.c: New file.  Provides `hdparm' command
2452         which sends ATA commands via grub_disk_ata_pass_through ().
2454         * conf/i386-pc.rmk: Add ata_pthru.mod and hdparm.mod.
2456         * disk/ata.c: Include <grub/ata.h>.  Move <grub/misc.h>
2457         and <grub/cpu/io.h> to include/grub/ata.h.
2458         (enum grub_ata_addressing_t): Move to include/grub/ata.h.
2459         (GRUB_CDROM_SECTOR_SIZE): Remove.
2460         (GRUB_ATA_*): Move to include/grub/ata.h.
2461         (GRUB_ATAPI_*): Likewise.
2462         (enum grub_ata_commands): Likewise.
2463         (enum grub_ata_timeout_milliseconds): Likewise.
2464         (struct grub_ata_device): Likewise.
2465         (grub_ata_regset): Likewise.
2466         (grub_ata_regget): Likewise.
2467         (grub_ata_regset2): Likewise.
2468         (grub_ata_regget2): Likewise.
2469         (grub_ata_check_ready): Likewise.
2470         (grub_ata_wait_not_busy): Remove static, exported in
2471         include/grub/ata.h.
2472         (grub_ata_wait_drq): Likewise.
2473         (grub_ata_pio_read): Likewise.
2475         * disk/ata_pthru.c: New file.  Provides grub_ata_pass_through ()
2476         function for hdparm.mod.
2478         * include/grub/ata.h: New file, contains declarations from
2479         disk/ata.c.
2480         (enum grub_ata_commands): Add new commands for commands/hdparm.c.
2482         * include/grub/disk.h (grub_disk_ata_pass_through_parms): New struct.
2483         (grub_disk_ata_pass_through): New exported variable.
2485         * kern/disk.c (grub_disk_ata_pass_through): New variable.
2487 2009-02-13  Colin D Bennett  <colin@gibibit.com>
2489         Support multiple fallback entries, and provide an API to support
2490         executing default+fallback menu entries.  Renamed the `terminal' menu
2491         viewer to `text'.
2493         * include/grub/normal.h (grub_normal_text_menu_viewer): New global
2494         variable declaration.
2495         (grub_menu_execute_callback): New structure declaration.
2496         (grub_menu_execute_callback_t): New typedef.
2497         (grub_menu_execute_with_fallback): New function declaration.
2498         (grub_menu_get_entry): Likewise.
2499         (grub_menu_get_timeout): Likewise.
2500         (grub_menu_set_timeout): Likewise.
2502         * normal/main.c (GRUB_MOD_INIT(normal)): Refer to new variable name.
2504         * normal/menu.c (grub_wait_after_message): Moved to
2505         `normal/menu_text.c'.
2506         (draw_border): Likewise.
2507         (print_message): Likewise.
2508         (print_entry): Likewise.
2509         (print_entries): Likewise.
2510         (grub_menu_init_page): Likewise.
2511         (get_entry_number): Likewise.
2512         (print_timeout): Likewise.
2513         (run_menu): Likewise.
2514         (grub_menu_execute_entry): Likewise.
2515         (show_text_menu): Likewise.
2516         (get_and_remove_first_entry_number): New function.
2517         (grub_menu_execute_with_fallback): Likewise.
2518         (get_entry): Renamed to ...
2519         (grub_menu_get_entry): .. this and made it global.
2520         (get_timeout): Renamed to ...
2521         (grub_menu_get_timeout): ... this and made it global.
2522         (set_timeout): Renamed to ...
2523         (grub_menu_set_timeout): ... this and made it global.
2524         (grub_normal_terminal_menu_viewer): Renamed to ...
2525         (grub_normal_text_menu_viewer): ... this.
2527         * normal/menu_text.c: New file.  Extracted text-menu-specific code
2528         from normal/menu.c.
2530         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add `normal/menu_text.c'.
2531         (normal_mod_SOURCES): Likewise.
2533         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
2534         (normal_mod_SOURCES): Likewise.
2536         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2537         (normal_mod_SOURCES): Likewise.
2539         * conf/i386-pc.rmk, (grub_emu_SOURCES): Likewise.
2540         (normal_mod_SOURCES): Likewise.
2542         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2543         (normal_mod_SOURCES): Likewise.
2545         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2546         (normal_mod_SOURCES): Likewise.
2548         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
2549         (normal_mod_SOURCES): Likewise.
2551 2009-02-11  Robert Millan  <rmh@aybabtu.com>
2553         * util/grub.d/00_header.in: Update old reference to `font' command.
2555 2009-02-10  Felix Zielcke  <fzielcke@z-51.de>
2557         * fs/fat.c (grub_fat_mount): Fix wrong comparison.
2559         Based on patch from Javier Martín.
2561 2009-02-09  Felix Zielcke  <fzielcke@z-51.de>
2563         * conf/common.rmk (grub_probe_SOURCES): Move fs/ext2.c before fs/fat.c
2564         to avoid false positives with FAT.
2565         (grub_fstest_SOURCES): Likewise.
2566         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
2567         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
2568         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2569         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
2570         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2571         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2573 2009-02-09  Felix Zielcke  <fzielcke@z-51.de>
2575         * fs/fat.c (grub_fat_mount): Try to avoid false positives by checking
2576         bpb.version_specific.fat12_or_fat16.fstype and
2577         bpb.version_specific.fat32.fstype.
2579 2009-02-08  Robert Millan  <rmh@aybabtu.com>
2581         * fs/tar.c: Replace "fs/cpio.c" with "cpio.c".
2583 2009-02-08  Robert Millan  <rmh@aybabtu.com>
2585         * Makefile.in (host_os, host_cpu): New variables.
2586         (target_os): Remove.  Update all users.
2588 2009-02-08  Marco Gerards  <marco@gnu.org>
2590         * Makefile.in (enable_grub_emu_usb): New variable.
2591         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/scsi.c'.
2592         (grub_emu_SOURCES) [grub_emu_SOURCES]: Add `disk/usbms.c',
2593         `util/usb.c', `bus/usb/usb.c' and `commands/usbtest.c'.
2594         (grub_emu_LDFLAGS): Add `$(LIBUSB)'.
2595         (pkglib_MODULES): Add `usb.mod', `uhci.mod', `ohci.mod',
2596         `usbtest.mod' and `usbms.mod'.
2597         (usb_mod_SOURCES, usb_mod_CFLAGS, usb_mod_LDFLAGS)
2598         (usbtest_mod_SOURCES, usbtest_mod_CFLAGS, usbtest_mod_LDFLAGS)
2599         (uhci_mod_SOURCES, uhci_mod_CFLAGS, uhci_mod_LDFLAGS,
2600         (ohci_mod_SOURCES, ohci_mod_CFLAGS, ohci_mod_LDFLAGS)
2601         (usbms_mod_SOURCES, usbms_mod_CFLAGS, usbms_mod_LDFLAGS): New
2602         variables.
2604         * disk/usbms.c: New file.
2606         * include/grub/usb.h: Likewise.
2608         * include/grub/usbtrans.h: Likewise.
2610         * include/grub/usbdesc.h: Likewise.
2612         * bus/usb/usbtrans.c: Likewise.
2614         * bus/usb/ohci.c: Likewise.
2616         * bus/usb/uhci.c: Likewise.
2618         * bus/usb/usbhub.c: Likewise.
2620         * bus/usb/usb.c: Likewise.
2622         * commands/usbtest.c: Likewise.
2624         * util/usb.c: Likewise.
2626         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_IO'.
2628         * configure.ac: Test for libusb presence.
2630         * util/grub-emu.c (main) [HAVE_LIBUSB_H]: Call `grub_libusb_init'.
2632 2009-02-08  Vesa Jääskeläinen  <chaac@nic.fi>
2634         * kern/mm.c: Add more comments.
2636 2009-02-08  Robert Millan  <rmh@aybabtu.com>
2638         Patch from Javier Martín.
2639         * fs/ext2.c (EXT2_DRIVER_SUPPORTED_INCOMPAT): Add
2640         `EXT4_FEATURE_INCOMPAT_FLEX_BG'.
2642 2009-02-08  Robert Millan  <rmh@aybabtu.com>
2644         * fs/cpio.c: Split tar functionality to ...
2645         * fs/tar.c: ... here (new file).  Update all users.
2647 2009-02-07  Robert Millan  <rmh@aybabtu.com>
2649         * fs/ext2.c (grub_ext2_mount): Avoid mounting filesystems with
2650         backward-incompatible features.
2652         Based on patch from Javier Martín, with some adjustments.
2654 2009-02-07  Michael Scherer  <misc@mandriva.org>
2656         * fs/hfs.c (grub_hfsplus_iterate_dir): Treat hfs+ as case insensitive.
2658 2009-02-07  Robert Millan  <rmh@aybabtu.com>
2660         * conf/common.rmk (grub_probe_SOURCES, grub_fstest_SOURCES): Move
2661         position of `disk/lvm.c' to ensure grub_init_all() always picks it
2662         after the RAID stuff.
2664 2009-02-05  Vesa Jääskeläinen  <chaac@nic.fi>
2666         Fixes problem when running vbetest command as reported by
2667         Vladimir Serbinenko <phcoder@gmail.com>.
2669         * (grub_vbe_set_video_mode): Fixed problem with text modes.
2671 2009-02-04  Felix Zielcke  <fzielcke@z-51.de>
2673         util/getroot.c (grub_util_get_grub_dev): Add support for /dev/mdNpN and
2674         /dev/md/NpN style mdraid devices.
2676 2009-02-03  Felix Zielcke  <fzielcke@z-51.de>
2678         * util/unifont2pff.rb: Remove.
2680 2009-02-03  Felix Zielcke  <fzielcke@z-51.de>
2682         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add a missing trailing
2683         `#'.
2685 2009-02-03  Felix Zielcke  <fzielcke@z-51.de>
2687         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/menu_viewer.c'.
2688         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
2689         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
2690         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
2691         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2692         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2693         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2695 2009-02-02  Christian Franke  <franke@computer.org>
2697         * lib/hexdump.c (hexdump): Print at most 3 lines if data is identical.
2699 2009-02-01  Felix Zielcke  <fzielcke@z-51.de>
2701         * INSTALL: Note that we now require at least autoconf 2.59 and
2702         that LZO is optional.
2704 2009-02-01  Vesa Jääskeläinen  <chaac@nic.fi>
2706         Base on patch on bug #24154 created by Tomas Tintera
2707         <trosos@seznam.cz>.
2709         * video/i386/pc/vbe.c (grub_video_vbe_scroll): Fix downward scrolling.
2711 2009-02-01  Vesa Jääskeläinen  <chaac@nic.fi>
2713         Based on patch on bug #25318 created by Bernhard Rosenkraenzer
2714         <bero@arklinux.org>.
2716         * normal/parser.y (script_init): Add missing semicolon.
2718 2009-01-31  Colin D Bennett  <colin@gibibit.com>
2720         * normal/main.c: Add include to grub/menu_viewer.h.
2721         (free_menu_entry_classes): Added.
2722         (grub_normal_menu_addentry): Added class property handling.
2723         (grub_normal_execute): Changed to use new menu viewer for menu viewing.
2724         (GRUB_MOD_INIT(normal)): Added register for text based menu viewer.
2726         * normal/menu_viewer.c: New file.
2728         * normal/menu.c (run_menu_entry): Renamed to ...
2729         (grub_menu_execute_entry): ... this and made it as global.
2730         (grub_menu_run): Renamed to ...
2731         (show_text_menu): ... this and made it local.
2732         (show_text_menu): Adapt to new function names.
2733         (grub_normal_terminal_menu_viewer): New global variable.
2735         * include/grub/menu.h: New file.
2737         * include/grub/menu_viewer.h: New file.
2739         * include/grub/normal.h: Added include to grub/menu.h.
2740         (grub_menu_entry): Moved to include/grub/menu.h.
2741         (grub_menu_entry_t): Likewise.
2742         (grub_menu): Likewise.
2743         (grub_menu_t): Likewise.
2744         (grub_normal_terminal_menu_viewer): Added.
2745         (grub_menu_execute_entry): Likewise.
2746         (grub_menu_run): Removed.
2748         * DISTLIST: Added include/grub/menu.h.
2749         Added include/grub/menu_viewer.h.
2750         Added normal/menu_viewer.c.
2752 2009-01-31  Vesa Jääskeläinen  <chaac@nic.fi>
2754         * normal/execute.c (grub_script_execute_menuentry): Changed to use
2755         arglist for menutitle arguments.
2757         * normal/main.c (grub_normal_menu_addentry): Likewise.
2759         * normal/parser.y (menuentry): Likewise.
2761         * normal/script.c (grub_script_create_cmdmenu): Likewise.
2763         * include/grub/script.h (grub_script_cmd_menuentry): Likewise.
2764         (grub_script_create_cmdmenu): Likewise.
2766         * include/grub/normal.h (grub_normal_menu_addentry): Likewise.
2768         * conf/i386-pc.rmk (normal_mod_SOURCES): Adapt Colin D Bennett's
2769         changes.
2771         * conf/x86_64-efi.rmk (normal_mod_SOURCES): Likewise.
2773         * conf/i386-coreboot.rmk (normal_mod_SOURCES): Likewise.
2775         * conf/i386-efi.rmk (normal_mod_SOURCES): Likewise.
2777         * conf/i386-ieee1275.rmk (normal_mod_SOURCES): Likewise.
2779         * conf/powerpc-ieee1275.rmk (normal_mod_SOURCES): Likewise.
2781         * conf/sparc64-ieee1275.rmk (normal_mod_SOURCES): Likewise.
2783 2009-01-30  Christian Franke  <franke@computer.org>
2785         * normal/arg.c (grub_arg_show_help): Add indentation if '\n' appears
2786         in option help text.
2788 2009-01-27  Pavel Roskin  <proski@gnu.org>
2790         * disk/fs_uuid.c (search_fs_uuid): Ignore case of the UUID.
2792 2009-01-27  Vesa Jääskeläinen  <chaac@nic.fi>
2794         * commands/lsmmap.c: Add include to grub/machine/memory.h.
2796         * fs/i386/pc/pxe.c (grub_pxefs_open): Fix sign problem.
2798         * term/i386/pc/at_keyboard.c (GRUB_MOD_FINI(at_keyboard)): Use proper
2799         unregister function.
2801 2009-01-27  Vesa Jääskeläinen  <chaac@nic.fi>
2803         * disk/scsi.c (grub_scsi_read): Fix sign problem.
2805         * term/i386/pc/vga_text.c (grub_vga_text_init_fini). Fix declaration.
2807         * util/grub-mkfont.c (usage): Fix typo.
2809         * util/elf/grub-mkimage.c (load_modules): Fix warning.
2811 2009-01-26  Daniel Mierswa  <impulze@impulze.org>
2813         * fs/fat.c (grub_fat_uuid): Fix shift of the first two bytes.
2815         * commands/search.c (search_fs_uuid): Ignore case of the UUID.
2817         * kern/misc.c (grub_strcasecmp): New function.
2818         (grub_strcasecmp): Use grub_size_t instead of int for length.
2819         Fix return value.
2820         * include/grub/misc.h: Update function prototypes.
2822 2009-01-26  Robert Millan  <rmh@aybabtu.com>
2824         * configure.ac: Fix cross-compilation check.
2826 2009-01-22  Christian Franke  <franke@computer.org>
2828         * kern/misc.c (grub_vsprintf): Fix size and termination of `format2'
2829         (precision) digit string.  Allow `.format2' without `format1' (width).
2830         Limit input chars for `%s' output to `format2' if specified.  This is
2831         compatible with standard printf ().
2833 2009-01-22  Christian Franke  <franke@computer.org>
2835         * disk/ata.c (grub_ata_wait_status): Replace by ...
2836         (grub_ata_wait_not_busy): ... this function.  Checks only BSY bit,
2837         other status bits may be invalid while BSY is asserted.
2838         (grub_ata_check_ready): New function.
2839         (grub_ata_cmd): Removed.
2840         (grub_ata_wait_drq): New function.
2841         (grub_ata_strncpy): Remove inline.
2842         (grub_ata_pio_read): Reduce to actual block transfer.  BSY wait
2843         and error check now done by grub_ata_wait_drq ().
2844         (grub_ata_pio_write): Likewise.
2845         (grub_atapi_identify): Set DEV before check for !BSY.  Use
2846         grub_ata_wait_drq () to wait for data.
2847         (grub_ata_device_initialize): Add status register check to
2848         detect missing SATA slave devices.  Add debug messages.
2849         (grub_atapi_wait_drq): Use grub_ata_wait_not_busy ().
2850         (grub_atapi_packet): Set DEV before check for !BSY.  Replace
2851         transfer loop by grub_ata_pio_write ().
2852         (grub_ata_identify): Set DEV before check for !BSY. Use
2853         grub_ata_wait_drq () to wait for data.
2854         (grub_ata_setaddress): Set DEV before check for !BSY.
2855         (grub_ata_readwrite): Remove duplicate code, handle batch/rest and
2856         read/write in one loop.  Fix invalid command on write.  Fix incomplete
2857         command on (size % batch) == 0.  Add missing error check after write of
2858         last block.  Add debug messages.
2859         (grub_atapi_read):  Replace transfer loop by grub_ata_pio_read ().
2861 2009-01-19  Christian Franke  <franke@computer.org>
2863         * disk/ata.c (GRUB_ATAPI_REG_*): New defines.
2864         (GRUB_ATAPI_IREASON_*): Likewise.
2865         (grub_ata_pio_write): Fix timeout error return.
2866         (grub_atapi_identify): Add grub_ata_wait () after cmd.
2867         (grub_atapi_wait_drq): New function.
2868         (grub_atapi_packet): New parameter `size'.
2869         Use grub_atapi_wait_drq () and direct write instead of
2870         grub_ata_pio_write ().
2871         (grub_atapi_read): Replace grub_ata_pio_read () by a loop which
2872         reads the number of bytes requested by the device for each DRQ
2873         assertion.
2874         (grub_atapi_write): Remove old implementation, return not
2875         implemented instead.
2877 2009-01-19  Christian Franke  <franke@computer.org>
2879         * disk/scsi.c (grub_scsi_read10): Use scsi->blocksize instead
2880         of 512 to calculate data size.
2881         (grub_scsi_read12): Likewise.
2882         (grub_scsi_write10): Likewise.
2883         (grub_scsi_write12): Likewise.
2884         (grub_scsi_read): Adjust size according to blocksize.
2885         Add checks for invalid blocksize and unaligned transfer.
2887 2009-01-19  Vesa Jääskeläinen  <chaac@nic.fi>
2889         * font/font.c (grub_font_loader_init): Re-position unknown glyph.
2891         * term/gfxterm.c (write_char): Fix background rendering for wide
2892         width glyphs.
2894 2009-01-19  Robert Millan  <rmh@aybabtu.com>
2896         * config.guess: Update to latest version from config git.
2897         * config.sub: Likewise.
2899 2009-01-17  Felix Zielcke  <fzielcke@z-51.de>
2901         * Makefile.in: Change font compilation to use new grub-mkfont instead
2902         of java version.
2904         * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: Remove.
2905         * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
2906         * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
2907         * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
2908         * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
2909         * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
2910         * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
2911         * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
2912         * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
2914 2009-01-16  Christian Franke  <franke@computer.org>
2916         * disk/ata.c (enum grub_ata_commands): Remove EXEC_DEV_DIAGNOSTICS.
2917         (enum grub_ata_timeout_milliseconds): New enum.
2918         (grub_ata_wait_status): Add parameter milliseconds.
2919         (grub_ata_cmd): Remove variable `err'.  Remove wait for !DRQ to allow
2920         recovery from timed-out commands.
2921         (grub_ata_pio_read): Add parameter milliseconds.  Fix error return,
2922         return grub_errno instead of REG_ERROR.
2923         (grub_ata_pio_write): Add parameter milliseconds.
2924         (grub_atapi_identify): Fix size of ATAPI IDENTIFY sector.
2925         Pass milliseconds to grub_ata_wait_status () and
2926         grub_ata_pio_read ().
2927         (grub_atapi_packet): Pass milliseconds to grub_ata_pio_write ().
2928         (grub_ata_identify): Remove variable `ataerr'.  Pass milliseconds to
2929         grub_ata_wait_status ().  Fix IDENTIFY timeout check.
2930         (grub_ata_device_initialize): Remove EXECUTE DEVICE DIAGNOSTICS.
2931         It is not suitable for device detection, because DEV bit is ignored,
2932         the command may run too long, and not all devices set the signature
2933         properly.
2934         (grub_ata_pciinit): Clear grub_errno before grub_ata_device_initialize ().
2935         (grub_ata_setaddress): Pass milliseconds to grub_ata_wait_status ().
2936         Fix device selection, DEV bit must be set first to address the registers
2937         of the correct device.
2938         (grub_ata_readwrite): Pass milliseconds to grub_ata_wait_status () and
2939         grub_ata_pio_read/write ().
2940         (grub_atapi_read): Pass milliseconds to grub_ata_pio_read ().
2941         (grub_atapi_write): Pass milliseconds to grub_ata_pio_write ().
2943 2009-01-13  Carles Pina i Estany  <carles@pina.cat>
2945         * util/grub-editenv.c (main): Use fseeko(), not fseek().
2947 2009-01-13  Bean  <bean123ch@gmail.com>
2949         * util/grub-mkfont.c (write_font): forget to remove some debug code.
2951 2009-01-13  Bean  <bean123ch@gmail.com>
2953         * Makefile.in: (enable_grub_mkfont): New variable.
2954         (freetype_cflags): Likewise.
2955         (freetype_libs): Likewise.
2957         * common.rmk (bin_UTILITIES): Add `grub-mkfont' if requested.
2958         (grub_mkfont_SOURCES): New variable.
2959         (grub_mkfont_CFLAGS): Likewise.
2960         (grub_mkfont_LDFLAGS): Likewise.
2962         * configure.ac (--enable-grub-mkfont): New option. Check for freetype2
2963         library if `--enable-grub-mkfont' is requested.
2964         (enable_grub_mkfont): New variable.
2965         (freetype_cflags): Likewise.
2966         (freetype_libs): Likewise.
2968         * util/grub-mkfont.c: New file.
2970 2009-01-12  Christian Franke  <franke@computer.org>
2972         * disk/ata.c (grub_ata_pciinit): Fix bit numbers of compatibility
2973         mode check.  Fix setting of compat_use[].
2975 2009-01-10  Robert Millan  <rmh@aybabtu.com>
2977         Update a few copyright years which we forgot to do in 2008 (only for
2978         files whose changes made in 2008 were copyright-significant)
2980         * Makefile.in: Add 2008 to Copyright line.
2981         * disk/ieee1275/ofdisk.c: Likewise.
2982         * disk/efi/efidisk.c: Likewise.
2983         * kern/dl.c: Likewise.
2984         * kern/sparc64/ieee1275/init.c: Likewise.
2985         * kern/mm.c: Likewise.
2986         * kern/efi/mm.c: Likewise.
2987         * boot/i386/pc/boot.S: Likewise.
2988         * genfslist.sh: Likewise.
2989         * fs/iso9660.c: Likewise.
2990         * fs/hfs.c: Likewise.
2991         * fs/jfs.c: Likewise.
2992         * fs/minix.c: Likewise.
2993         * fs/ufs.c: Likewise.
2994         * gensymlist.sh.in: Likewise.
2995         * genkernsyms.sh.in: Likewise.
2996         * include/grub/misc.h: Likewise.
2997         * include/grub/types.h: Likewise.
2998         * include/grub/symbol.h: Likewise.
2999         * include/grub/elf.h: Likewise.
3000         * include/grub/kernel.h: Likewise.
3001         * include/grub/disk.h: Likewise.
3002         * include/grub/dl.h: Likewise.
3003         * include/grub/i386/linux.h: Likewise.
3004         * include/grub/i386/pc/biosdisk.h: Likewise.
3005         * include/grub/efi/api.h: Likewise.
3006         * include/grub/efi/pe32.h: Likewise.
3007         * include/grub/util/misc.h: Likewise.
3008         * normal/execute.c: Likewise.
3009         * normal/arg.c: Likewise.
3010         * normal/completion.c: Likewise.
3011         * normal/lexer.c: Likewise.
3012         * normal/parser.y: Likewise.
3013         * normal/misc.c: Likewise.
3014         * commands/i386/pc/vbeinfo.c: Likewise.
3015         * commands/hexdump.c: Likewise.
3016         * commands/terminal.c: Likewise.
3017         * commands/ls.c: Likewise.
3018         * commands/help.c: Likewise.
3019         * partmap/pc.c: Likewise.
3020         * loader/efi/chainloader.c: Likewise.
3021         * loader/multiboot_loader.c: Likewise.
3022         * loader/i386/pc/multiboot2.c: Likewise.
3023         * term/efi/console.c: Likewise.
3024         * term/i386/pc/serial.c: Likewise.
3025         * util/lvm.c: Likewise.
3026         * util/console.c: Likewise.
3027         * util/i386/efi/grub-mkimage.c: Likewise.
3028         * util/raid.c: Likewise.
3030 2009-01-06  Vesa Jääskeläinen  <chaac@nic.fi>
3032         * commands/videotest.c: Removed include to grub/machine/memory.h.
3034         * conf/i386-pc.rmk (pkglib_MODULES): Removed video.mod, gfxterm.mod,
3035         videotest.mod, bitmap.mod, tga.mod, jpeg.mod, png.mod.
3036         (video_mod_SOURCES): Removed.
3037         (video_mod_CFLAGS): Likewise.
3038         (video_mod_LDFLAGS): Likewise.
3039         (gfxterm_mod_SOURCES): Likewise.
3040         (gfxterm_mod_CFLAGS): Likewise.
3041         (gfxterm_mod_LDFLAGS): Likewise.
3042         (videotest_mod_SOURCES): Likewise.
3043         (videotest_mod_CFLAGS): Likewise.
3044         (videotest_mod_LDFLAGS): Likewise.
3045         (bitmap_mod_SOURCES): Likewise.
3046         (bitmap_mod_CFLAGS): Likewise.
3047         (bitmap_mod_LDFLAGS): Likewise.
3048         (tga_mod_SOURCES): Likewise.
3049         (tga_mod_CFLAGS): Likewise.
3050         (tga_mod_LDFLAGS): Likewise.
3051         (jpeg_mod_SOURCES): Likewise.
3052         (jpeg_mod_CFLAGS): Likewise.
3053         (jpeg_mod_LDFLAGS): Likewise.
3054         (png_mod_SOURCES): Likewise.
3055         (png_mod_CFLAGS): Likewise.
3056         (png_mod_LDFLAGS): Likewise.
3058         * conf/common.rmk (pkglib_MODULES): Added video.mod, videotest.mod,
3059         bitmap.mod, tga.mod, jpeg.mod, png.mod, font.mod, gfxterm.mod
3060         (video_mod_SOURCES): Added.
3061         (video_mod_CFLAGS): Likewise.
3062         (video_mod_LDFLAGS): Likewise.
3063         (videotest_mod_SOURCES): Likewise.
3064         (videotest_mod_CFLAGS): Likewise.
3065         (videotest_mod_LDFLAGS): Likewise.
3066         (bitmap_mod_SOURCES): Likewise.
3067         (bitmap_mod_CFLAGS): Likewise.
3068         (bitmap_mod_LDFLAGS): Likewise.
3069         (tga_mod_SOURCES): Likewise.
3070         (tga_mod_CFLAGS): Likewise.
3071         (tga_mod_LDFLAGS): Likewise.
3072         (jpeg_mod_SOURCES): Likewise.
3073         (jpeg_mod_CFLAGS): Likewise.
3074         (jpeg_mod_LDFLAGS): Likewise.
3075         (png_mod_SOURCES): Likewise.
3076         (png_mod_CFLAGS): Likewise.
3077         (png_mod_LDFLAGS): Likewise.
3078         (gfxterm_mod_SOURCES): Likewise.
3079         (gfxterm_mod_CFLAGS): Likewise.
3080         (gfxterm_mod_LDFLAGS): Likewise.
3082         * term/gfxterm.c: Removed include to grub/machine/memory.h,
3083         grub/machine/console.h.
3085 2009-01-04  Jerone Young  <jerone@gmail.com>
3087         Make on screen instructions clearer
3089         Based on patch created by Jidanni <jidanni@jidanni.org>
3091         * normal/menu.c: print clearer instructions on the screen
3093 2009-01-02  Colin D Bennett  <colin@gibibit.com>
3095         New font engine.
3097         Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to
3098         build system and fixed gfxterm.c to work with different sized fonts.
3100         * configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF.
3102         * configure: Re-generated.
3104         * DISTLIST: Removed font/manager.c.
3105         Added font/font.c.
3106         Added font/font_cmd.c.
3108         * Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF.  Added Font tool
3109         compilation.
3111         * include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype.  Changed users.
3113         * kern/misc.c (grub_utf8_to_ucs4): Changed prototype.
3115         * kern/term.c: Changed users of grub_utf8_to_ucs4.
3117         * normal/menu.c: Likewise.
3119         * conf/common.rmk (font_mod_SOURCES): Removed font/manager.c.
3120         (font_mod_SOURCES): Added font/font_cmd.c, font/font.c.
3122         * include/grub/font.h: Replaced with new file.
3124         * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value.
3125         (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise.
3126         (GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise.
3127         (GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added.
3128         (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED.
3129         (grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha,
3130         fg_red, fg_green, fg_blue, fg_alpha.
3131         (grub_video_adapter): Removed blit_glyph.
3132         (grub_video_blit_glyph): Removed.
3134         * font/manager.c: Removed file.
3136         * font/font.c: New file.
3138         * font/font_cmd.c: Likewise.
3140         * video/video.c (grub_video_blit_glyph): Removed.
3142         * video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support.
3143         (grub_video_vbe_map_rgba): Likewise.
3144         (grub_video_vbe_unmap_color_int): Likewise.
3145         (grub_video_vbe_blit_glyph): Removed.
3146         (grub_video_vbe_adapter): Removed blit_glyph.
3148         * video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support.
3149         (get_pixel): Likewise.
3150         (set_pixel): Likewise.
3152         * commands/videotest.c (grub_cmd_videotest): Added more tests for fonts.
3154         * term/gfxterm.c: Adapted to new font engine.
3156         * term/i386/pc/vesafb.c: Marked as deprecated.  Made it compile.
3158         * term/i386/pc/vga.c: Likewise.
3160         * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file.
3162         * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
3164         * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
3166         * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
3168         * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
3170         * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
3172         * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
3174         * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
3176         * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
3178         * util/grub.d/00_header.in: Changed to use new loadfont command.
3180         * util/grub-mkconfig_lib.in: Changed font extension.
3182 2008-12-28  Felix Zielcke  <fzielcke@z-51.de>
3184         * util/getroot.c (grub_util_get_grub_dev): Add support for
3185         /dev/md/dNNpNN style partitionable mdraid devices.
3187 2008-12-12  Alex Smith  <alex@alex-smith.me.uk>
3189         * fs/i386/pc/pxe.c (grub_pxefs_open): Handle the one open connection
3190         at a time limit of the PXE TFTP API correctly.
3191         (grub_pxefs_close): Likewise.
3193 2008-11-29  Robert Millan  <rmh@aybabtu.com>
3195         * disk/ata.c (grub_ata_pciinit): Handle errors raised by
3196         grub_ata_device_initialize() calls.
3198 2008-11-28  Krzysztof Smiechowicz  <deadwood@wp.pl>
3200         * fs/affs.c (grub_affs_iterate_dir): Return failure when directory
3201         iteration failed.
3202         * fs/sfs.c (grub_sfs_iterate_dir): Likewise.
3204 2008-11-28  Robert Millan  <rmh@aybabtu.com>
3206         Fix build on powerpc-ieee1275.  Based on patch created by
3207         Manoel Abranches <mrabran@linux.vnet.ibm.com>.
3208         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
3209         `kern/ieee1275/mmap.c'.
3210         * include/grub/powerpc/ieee1275/memory.h: New file.
3212         Provide grub-install on coreboot.
3213         * conf/i386-coreboot.rmk (sbin_SCRIPTS): Add `grub-install'.
3214         (grub_install_SOURCES): New variable.
3215         * util/i386/pc/grub-install.in: Add a few condition checks to make it
3216         usable on coreboot.
3218 2008-11-25  Felix Zielcke  <fzielcke@z-51.de>
3220         * util/grub-fstest.c (grub_term_get_current_input): Change return type
3221         to `grub_term_input_t'.
3222         (grub_term_get_current_output): Change return type to
3223         `grub_term_output_t'.
3225 2008-11-22  Robert Millan  <rmh@aybabtu.com>
3227         Fix breakage on coreboot due to declaration mismatch.
3228         * term/i386/pc/vga_text.c (grub_vga_text_init_fini): New function.
3229         (grub_vga_text_term): Use grub_vga_text_init_fini() instead of
3230         grub_vga_text_cls().
3232         * kern/i386/loader.S (grub_multiboot_backward_relocator): Improve
3233         comments.  Avoid copying one more byte than necessary (just in case).
3235         * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Change link address
3236         to 0x200000 (avoids trouble with some OFW implementations, and matches
3237         with the one in Yaboot).
3238         Reported by Manoel Abranches
3240 2008-11-20  Robert Millan  <rmh@aybabtu.com>
3242         * kern/i386/coreboot/init.c (grub_time_tics): Remove variable.
3243         (grub_get_rtc, grub_exit): Abort with grub_fatal() if called.
3245         * util/grub-mkconfig_lib.in (grub_warn): New function.
3246         (convert_system_path_to_grub_path): Use grub_warn() when issuing
3247         warnings, to obtain consistent formatting.
3248         * util/grub.d/00_header.in: Likewise.
3249         * util/update-grub_lib.in: Likewise.
3251         * loader/i386/linux.c (allocate_pages): Fix a warning.
3252         Move comment text to `#error' stanza.
3254         Harmonize ieee1275's grub_available_iterate() with the generic
3255         grub_machine_mmap_iterate() interface (fixes a recently-introduced
3256         build problem on i386-ieee1275):
3257         * kern/ieee1275/openfw.c (grub_available_iterate): Moved from here ...
3258         * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): ... here.  Add third
3259         parameter `type'.  Update all users of this function.
3260         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
3261         `kern/ieee1275/mmap.c'.
3262         * kern/ieee1275/init.c
3263         * include/grub/ieee1275/ieee1275.h (grub_available_iterate): Replace
3264         with ...
3265         (grub_machine_mmap_iterate): ... this.
3266         * include/grub/i386/pc/memory.h (grub_machine_mmap_iterate): Change
3267         return type to `grub_err_t'.  Update all implementations of this
3268         function prototype.
3269         * include/grub/i386/coreboot/memory.h (grub_machine_mmap_iterate):
3270         Likewise.
3272         Add `lsmmap' command (lists firmware-provided memory map):
3273         * commands/lsmmap.c: New file.
3274         * conf/i386-pc.rmk (pkglib_MODULES): Add `lsmmap.mod'.
3275         (lsmmap_mod_SOURCES, lsmmap_mod_CFLAGS, lsmmap_mod_LDFLAGS): New
3276         variables.
3277         * conf/powerpc-ieee1275.rmk: Likewise.
3278         * conf/i386-coreboot.rmk: Likewise.
3279         * conf/i386-ieee1275.rmk: Likewise.
3281 2008-11-19  Robert Millan  <rmh@aybabtu.com>
3283         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Fix a typo.
3284         * loader/i386/linux.c (grub_rescue_cmd_initrd): Implement a few needed
3285         constraints to initrd allocation (based on code from
3286         loader/i386/pc/linux.c).  Without them, initrd was allocated too high
3287         for Linux to find it.
3289 2008-11-14  Robert Millan  <rmh@aybabtu.com>
3291         * fs/cpio.c (grub_cpio_open): Compare `name' and `fn' by hand in
3292         order to cope with duplicate slashes.
3294 2008-11-14  Robert Millan  <rmh@aybabtu.com>
3296         * include/grub/i386/coreboot/memory.h (GRUB_MEMORY_MACHINE_LOWER_SIZE):
3297         Redefine to match with GRUB_MEMORY_MACHINE_UPPER_START (0x100000).  We
3298         don't want to mess with lower memory, because it is used in the Linux
3299         loader.
3301         * loader/i386/linux.c (allocate_pages): Allocate `real_mode_mem' in
3302         an appropriate place in lower memory, between 0x10000 and 0x90000,
3303         like loader/i386/efi/linux.c does.  Linux often panics if real_mode_mem
3304         is in our heap (probably as a result of it being corrupted during
3305         decompression).  Add #error instance with comment to explain why this
3306         loader isn't currently usable on PC/BIOS.
3308 2008-11-14  Robert Millan  <rmh@aybabtu.com>
3310         * term/i386/pc/serial.c [! GRUB_MACHINE_PCBIOS]
3311         (GRUB_SERIAL_PORT_NUM): Fix miscalculation.
3313 2008-11-12  Robert Millan  <rmh@aybabtu.com>
3315         Make loader/i386/linux.c buildable on i386-pc (although disabled).
3317         * include/grub/i386/pc/init.h: Include `<grub/machine/memory.h>'.
3318         (struct grub_machine_mmap_entry, grub_machine_mmap_iterate): Move
3319         from here ...
3320         * include/grub/i386/pc/memory.h: ... to here.
3322 2008-11-12  Robert Millan  <rmh@aybabtu.com>
3324         Fix build problems on i386-ieee1275 and *-efi (introduced by vga_text
3325         split).
3327         * include/grub/i386/pc/console.h: Include `<grub/i386/vga_common.h>'.
3328         (grub_console_cur_color, grub_console_real_putchar)
3329         (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
3330         (grub_console_setcolorstate, grub_console_setcolor)
3331         (grub_console_getcolor): Move from here ...
3332         * include/grub/i386/vga_common.h: ... to here (new file).
3334         * term/i386/pc/vga_text.c: Replace `<grub/machine/console.h>' with
3335         `<grub/i386/vga_common.h>' and `<grub/cpu/io.h>' with
3336         `<grub/i386/io.h>'.
3337         * term/i386/vga_common.c: Replace `<grub/machine/console.h>' with
3338         `<grub/i386/vga_common.h>'.
3340 2008-11-12  Robert Millan  <rmh@aybabtu.com>
3342         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `term/i386/vga_common.c'.
3343         * conf/i386.rmk (pkglib_MODULES): Add `vga_text.mod'.
3344         (vga_text_mod_SOURCES, vga_text_mod_CFLAGS, vga_text_mod_LDFLAGS): New
3345         variables.
3346         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
3347         `term/i386/pc/console.c' with `term/i386/vga_common.c'.
3349         * kern/i386/coreboot/init.c (grub_machine_init): Replace call to
3350         grub_console_init() with call to grub_vga_text_init().
3351         (grub_machine_fini): Replace call to
3352         grub_console_fini() with call to grub_vga_text_fini() and
3353         grub_at_keyboard_fini().
3355         * include/grub/i386/pc/console.h: Include `<grub/term.h>'.
3356         (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
3357         (grub_console_setcolorstate, grub_console_setcolor)
3358         (grub_console_getcolor): New function prototypes.
3360         * term/i386/pc/vga_text.c: Include `<grub/dl.h>'.
3361         (grub_vga_text_getxy, grub_vga_text_gotoxy, grub_vga_text_cls)
3362         (grub_vga_text_setcursor): Static-ize.
3363         (grub_vga_text_term): New structure.
3364         (GRUB_MOD_INIT(vga_text), GRUB_MOD_FINI(vga_text)): New functions.
3366         * term/i386/pc/console.c: Remove `<grub/machine/machine.h>'.
3367         (grub_console_cur_color, grub_console_standard_color)
3368         (grub_console_normal_color, grub_console_highlight_color)
3369         (map_char, grub_console_putchar, grub_console_getcharwidth)
3370         (grub_console_getwh, grub_console_setcolorstate, grub_console_setcolor)
3371         (grub_console_getcolor): Move from here ...
3372         * term/i386/vga_common.c: ... to here (same function names).
3374 2008-11-12  Robert Millan  <rmh@aybabtu.com>
3376         Use newly-added Multiboot support in coreboot.
3378         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
3379         `kern/i386/coreboot/mmap.c' with `kern/i386/multiboot_mmap.c'.
3381         * kern/i386/coreboot/startup.S: Enable Multiboot header, fix its
3382         alignment, set `MULTIBOOT_MEMORY_INFO' flag.
3383         (codestart): Store the MBI in `startup_multiboot_info' when we're
3384         being loaded using Multiboot.
3386         * kern/i386/coreboot/init.c (grub_machine_init): Move
3387         grub_at_keyboard_init() call to beginning of function (useful for
3388         debugging).  Call grub_machine_mmap_init() before attempting to use
3389         grub_machine_mmap_iterate().
3390         (grub_lower_mem, grub_upper_mem): Move from here ...
3391         * kern/i386/multiboot_mmap.c (grub_lower_mem, grub_upper_mem): ... to
3392         here (new file).
3394         * include/grub/i386/coreboot/memory.h (grub_machine_mmap_init): New
3395         function prototype.
3397 2008-11-12  Robert Millan  <rmh@aybabtu.com>
3399         Fix a regression introduced by the at_keyboard.mod split.  Because
3400         some terminals are default on some platforms and non-default on
3401         others, the first terminal being registered determines which is
3402         going to be default.
3404         * kern/term.c (grub_term_register_input): If this is the first
3405         terminal being registered, set it as the current one.
3406         (grub_term_register_output): Likewise.
3408         * term/efi/console.c (grub_console_init): Do not call
3409         grub_term_set_current_output() or grub_term_set_current_input().
3410         * term/ieee1275/ofconsole.c (grub_console_init): Likewise.
3411         * term/i386/pc/console.c (grub_console_init): Likewise.
3412         (grub_console_fini): Do not call grub_term_set_current_input()
3413         (but leave grub_term_set_current_output() to restore text mode).
3415 2008-11-10  Robert Millan  <rmh@aybabtu.com>
3417         * util/grub.d/00_header.in: Add backward compatibility check for
3418         versions of terminal.mod that don't understand `terminal_input' or
3419         `terminal_output'.
3421 2008-11-09  Robert Millan  <rmh@aybabtu.com>
3423         * commands/terminal.c (GRUB_MOD_FINI(terminal)): Unregister
3424         `terminal_input' / `terminal_output', not `terminal'.
3426 2008-11-08  Robert Millan  <rmh@aybabtu.com>
3428         * Makefile.in (include_DATA): Fix srcdir=. assumption.
3429         (DISTCLEANFILES): Add `build_env.mk'.
3431 2008-11-08  Robert Millan  <rmh@aybabtu.com>
3433         * term/i386/pc/vesafb.c (grub_vesafb_term): Change type to
3434         `struct grub_term_output'.  Remove `.checkkey' and `.getkey'
3435         members.  Update all users.
3436         * util/console.c (grub_ncurses_term): Split in ...
3437         (grub_ncurses_term_input): ... this, and ...
3438         (grub_ncurses_term_output): ... this.  Update all users.
3439         * term/ieee1275/ofconsole.c: Remove stale `#endif'.
3441 2008-11-08  Robert Millan  <rmh@aybabtu.com>
3443         * Makefile.in (PKGLIB): Add $(pkglib_BUILDDIR).
3444         (PKGDATA): Add $(pkgdata_SRCDIR).
3445         (pkglib_BUILDDIR): New variable.
3446         (pkgdata_SRCDIR): New variable.
3447         (build_env.mk): New target.
3448         (include_DATA): New variable.
3449         (install-local): Install $(include_DATA) files in $(includedir).
3451 2008-11-07  Pavel Roskin  <proski@gnu.org>
3453         * gendistlist.sh: Use C locale for sorting to ensure consistent
3454         output on all systems.
3456         * util/grub.d/00_header.in: Remove incorrect space before
3457         "serial".
3459 2008-11-07  Robert Millan  <rmh@aybabtu.com>
3461         * include/multiboot2.h (struct multiboot_header): Add `flags' member as
3462         per specification.
3463         * loader/multiboot2.c (grub_multiboot2): Fix Multiboot2 header check.
3464         * loader/multiboot_loader.c (find_multi_boot2_header): New function
3465         (based on find_multi_boot1_header).
3466         (grub_rescue_cmd_multiboot_loader): Check for Multiboot2 header,
3467         using find_multi_boot2_header(), and abort if neither Multiboot or
3468         Multiboot headers were found.
3470 2008-11-07  Robert Millan  <rmh@aybabtu.com>
3472         Modularize at_keyboard.mod:
3474         * conf/i386.rmk (pkglib_MODULES): Add `at_keyboard.mod'.
3475         (at_keyboard_mod_SOURCES, at_keyboard_mod_CFLAGS)
3476         (at_keyboard_mod_LDFLAGS): New variables.
3478         Actual terminal split:
3480         * include/grub/term.h (struct grub_term): Split in ...
3481         (struct grub_term_input): ... this, and ...
3482         (struct grub_term_output): ... this.  Update all users.
3483         (grub_term_set_current): Split in ...
3484         (grub_term_set_current_input): ... this, and ...
3485         (grub_term_set_current_output): ... this.
3486         (grub_term_get_current): Split in ...
3487         (grub_term_get_current_input): ... this, and ...
3488         (grub_term_get_current_output): ... this.
3489         (grub_term_register): Split in ...
3490         (grub_term_register_input): ... this, and ...
3491         (grub_term_register_output): ... this.
3492         (grub_term_unregister): Split in ...
3493         (grub_term_unregister_input): ... this, and ...
3494         (grub_term_unregister_output): ... this.
3495         (grub_term_iterate): Split in ...
3496         (grub_term_iterate_input): ... this, and ...
3497         (grub_term_iterate_output): ... this.
3499         * kern/term.c (grub_term_list): Split in ...
3500         (grub_term_list_input): ... this, and ...
3501         (grub_term_list_output): ... this.  Update all users.
3502         (grub_cur_term): Split in ...
3503         (grub_cur_term_input): ... this, and ...
3504         (grub_cur_term_output): ... this.  Update all users.
3505         (grub_term_set_current): Split in ...
3506         (grub_term_set_current_input): ... this, and ...
3507         (grub_term_set_current_output): ... this.
3508         (grub_term_get_current): Split in ...
3509         (grub_term_get_current_input): ... this, and ...
3510         (grub_term_get_current_output): ... this.
3511         (grub_term_register): Split in ...
3512         (grub_term_register_input): ... this, and ...
3513         (grub_term_register_output): ... this.
3514         (grub_term_unregister): Split in ...
3515         (grub_term_unregister_input): ... this, and ...
3516         (grub_term_unregister_output): ... this.
3517         (grub_term_iterate): Split in ...
3518         (grub_term_iterate_input): ... this, and ...
3519         (grub_term_iterate_output): ... this.
3521         * kern/misc.c (grub_abort): Split use of grub_term_get_current() into
3522         a check for input and one for output (and only attempt to get keys
3523         from user when input works).
3525         * util/grub-probe.c (grub_term_get_current): Split in ...
3526         (grub_term_get_current_input): ... this, and ...
3527         (grub_term_get_current_output): ... this.
3528         * util/grub-fstest.c: Likewise.
3529         * util/i386/pc/grub-setup.c: Likewise.
3530         * util/grub-editenv.c: Likewise.
3532         Portability adjustments:
3534         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Remove
3535         `term/i386/pc/at_keyboard.c'.
3536         * kern/ieee1275/init.c [__i386__] (grub_machine_init): Remove call to
3537         grub_keyboard_controller_init() (now handled by terminal .init).
3538         * kern/i386/coreboot/init.c (grub_machine_init): Add call to
3539         grub_at_keyboard_init().
3540         * include/grub/i386/ieee1275/console.h (grub_keyboard_controller_init)
3541         (grub_console_checkkey, grub_console_getkey): Remove (now provided by
3542         at_keyboard.mod via input terminal interface).
3543         * include/grub/i386/coreboot/console.h: Convert into a stub for
3544         `<grub/i386/pc/console.h>'.
3546         Migrate full terminals to new API:
3548         * term/efi/console.c (grub_console_term): Split into ...
3549         (grub_console_term_input): ... this, and ...
3550         (grub_console_term_output): ... this.  Update all users.
3551         * term/ieee1275/ofconsole.c: Remove __i386__ hack.
3552         (grub_ofconsole_init): Split into ...
3553         (grub_ofconsole_init_input): ... this, and ...
3554         (grub_ofconsole_init_output): ... this.
3555         (grub_ofconsole_term): Split into ...
3556         (grub_ofconsole_term_input): ... this, and ...
3557         (grub_ofconsole_term_output): ... this.  Update all users.
3558         * term/i386/pc/serial.c (grub_serial_term): Split into ...
3559         (grub_serial_term_input): ... this, and ...
3560         (grub_serial_term_output): ... this.  Update all users.
3561         * term/i386/pc/console.c (grub_console_term): Split into ...
3562         (grub_console_term_input): ... this, and ...
3563         (grub_console_term_output): ... this.  Update all users.
3564         (grub_console_term_input): Only enable it on PC/BIOS platform.
3565         (grub_console_init): Remove grub_keyboard_controller_init() call.
3567         Migrate input terminals to new API:
3569         * term/i386/pc/at_keyboard.c: Replace `cpu' and `machine' with
3570         `i386' and `i386/pc' to enable build on x86_64 (this driver is
3571         i386-specific anyway).
3572         (grub_console_checkkey): Rename to ...
3573         (grub_at_keyboard_checkkey): ... this.  Static-ize.  Update all
3574         users.
3575         (grub_keyboard_controller_orig): New variable.
3576         (grub_console_getkey): Rename to ...
3577         (grub_at_keyboard_getkey): ... this.  Static-ize.  Update all
3578         users.
3579         (grub_keyboard_controller_init): Static-ize.  Save original
3580         controller value so that it can be restored ...
3581         (grub_keyboard_controller_fini): ... here (new function).
3582         (grub_at_keyboard_term): New structure.
3583         (GRUB_MOD_INIT(at_keyboard), GRUB_MOD_FINI(at_keyboard)): New
3584         functions.
3586         Migrate output terminals to new API:
3588         * term/i386/pc/vga.c (grub_vga_term): Change type to
3589         `struct  grub_term_output'.  Remove `.checkkey' and `.getkey'
3590         members.  Update all users.
3591         * term/gfxterm.c (grub_video_term): Change type to
3592         `struct  grub_term_output'.  Remove `.checkkey' and `.getkey'
3593         members.  Update all users.
3594         * include/grub/i386/pc/console.h (grub_console_checkkey)
3595         (grub_console_getkey): Do not export (no longer needed by gfxterm,
3596         etc).
3598         Migrate `terminal' command and userland tools to new API:
3600         * commands/terminal.c (grub_cmd_terminal): Split into ...
3601         (grub_cmd_terminal_input): ... this, and ...
3602         (grub_cmd_terminal_output): ... this.
3603         (GRUB_MOD_INIT(terminal)): Split `terminal' command in two commands:
3604         `terminal_input' and `terminal_output'.
3605         * util/grub.d/00_header.in: Adjust `terminal' calls to new
3606         `terminal_input' / `terminal_output' API.
3607         * util/grub-mkconfig.in: Export ${GRUB_TERMINAL_INPUT} and
3608         ${GRUB_TERMINAL_OUTPUT} instead of ${GRUB_TERMINAL} (and if user
3609         provided ${GRUB_TERMINAL}, convert it).
3611 2008-11-04  Robert Millan  <rmh@aybabtu.com>
3613         * util/grub.d/10_freebsd.in: New file.  Generate grub configuration
3614         for FreeBSD.
3615         * conf/common.rmk (grub-mkconfig_SCRIPTS): Add 10_freebsd.
3617 2008-11-03  Bean  <bean123ch@gmail.com>
3619         * kern/elf.c (grub_elf32_load): Revert to previous code.
3620         (grub_elf64_load): Likewise.
3622         * loader/i386/bsd.c (grub_bsd_elf32_hook): Change return address.
3624 2008-11-01  Robert Millan  <rmh@aybabtu.com>
3626         * Makefile.in (CPPFLAGS): Fix builddir=. assumption.
3627         (TARGET_CPPFLAGS): Likewise.
3628         * genmk.rb (mod_src): Fix builddir=. and srcdir=. assumptions.
3630 2008-11-01  Carles Pina i Estany  <carles@pina.cat>
3632         * normal/menu.c (run_menu): Add Previous and Next Page keys in menu.
3634 2008-10-29  Guillem Jover  <guillem.jover@nokia.com>
3636         * disk/lvm.c (grub_lvm_scan_device): Fix error recovery by delaying the
3637         addition of objects until the code is not going to be able to fail.
3639 2008-10-29  Guillem Jover  <guillem.jover@nokia.com>
3641         * disk/lvm.c (grub_lvm_scan_device): Fix possible NULL value handling
3642         (add a missing NULL check, and correct them by moving the pointer
3643         operations after the actual check).
3645 2008-10-29  Robert Millan  <rmh@aybabtu.com>
3647         * util/i386/pc/grub-install.in: Handle empty string as output from
3648         make_system_path_relative_to_its_root().
3650 2008-10-05  Hans Lambermont  <hans@lambermont.dyndns.org>
3652         * disk/lvm.c (grub_lvm_scan_device): Allocate buffer space for the
3653         circular metadata worst case scenario. If the metadata is circular
3654         then copy the wrap in place.
3655         * include/grub/lvm.h: Add GRUB_LVM_MDA_HEADER_SIZE, from the LVM2
3656         project lib/format_text/layout.h
3657         Circular metadata bug found and patch debugged by Jan Derk Gerlings.
3659 2008-10-03  Felix Zielcke  <fzielcke@z-51.de>
3661         * util/i386/pc/grub-install.in: Source grub-mkconfig_lib instead of update-grub_lib.
3663 2008-10-03  Felix Zielcke  <fzielcke@z-51.de>
3665         * util/update-grub_lib.in: Mention filename in warning message.
3667 2008-09-29  Felix Zielcke  <fzielcke@z-51.de>
3669         * NEWS: Update for rename of update-grub to grub-mkconfig.
3671 2008-09-29  Felix Zielcke  <fzielcke@z-51.de>
3673         * util/update-grub_lib.in: Copy to ...
3674         * util/grub-mkconfig_lib.in: ... this.  Update all users.
3675         * util/update-grub_lib.in: Make it a stub to `grub-mkconfig_lib.in'.
3676         * util/update-grub.in: Rename to ...
3677         * util/grub-mkconfig.in: ... this.  Update all users.  Remove `-y'
3678         option. Add `--output' option to allow users to specify the generated
3679         configuration file.  Default to stdout.
3680         (update_grub_dir): Rename to ...
3681         (grub_mkconfig_dir): ... this.
3682         (grub_cfg): Default to an empty string.
3683         * conf/common.rmk (update-grub): Rename to ...
3684         (grub-mkconfig): ... this.
3685         (update-grub_lib): Copy to ...
3686         (grub-mkconfig_lib): ... this.
3687         (update-grub_SCRIPTS): Copy to ...
3688         (grub-mkconfig_SCRIPTS): ... this. Update all users.
3689         (update-grub_DATA): Rename to ...
3690         (grub-mkconfig_DATA): ... this.
3692 2008-09-28  Robert Millan  <rmh@aybabtu.com>
3694         * fs/iso9660.c (struct grub_iso9660_primary_voldesc): Rename `created'
3695         to `modified'.  Add the real `created' field.
3696         (grub_iso9660_uuid): Use `modified' rather than `created' for
3697         constructing the UUID.
3699 2008-09-28  Felix Zielcke  <fzielcke@z-51.de>
3701         fs/jfs.c (grub_jfs_find_file): Treat multiple slashes like one.
3702         Based on code from Tomas Ebenlendr <ebik@ucw.cz>.
3704 2008-09-28  Bean  <bean123ch@gmail.com>
3706         * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a bug in the previous patch.
3707         Thanks to Christian Franke for finding this bug.
3709 2008-09-25  Robert Millan  <rmh@aybabtu.com>
3711         * util/grub-mkdevicemap.c (make_device_map): Actually replace all
3712         instances of grub_util_get_disk_name() (see previous commit).
3714 2008-09-25  Robert Millan  <rmh@aybabtu.com>
3716         * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Remove
3717         `util/i386/get_disk_name.c'.
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.
3722         * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Remove
3723         `util/ieee1275/get_disk_name.c'.
3724         * include/grub/util/misc.h (grub_util_get_disk_name): Remove.
3725         * util/ieee1275/get_disk_name.c: Remove file.
3726         * util/i386/get_disk_name.c: Remove file.
3727         * util/grub-mkdevicemap.c (make_device_map): Back to hardcoding
3728         "hd%d" for device.map entries, rather than using
3729         grub_util_get_disk_name().
3731 2008-09-24  Carles Pina i Estany  <carles@pina.cat>
3733         * disk/dmraid_nvidia.c (grub_dmraid_nv_detect): Fix `unused parameter'
3734         warning.
3735         * commands/i386/pc/pxecmd.c (dmraid_nvidia): Likewise.
3737 2008-09-24  Carles Pina i Estany  <carles@pina.cat>
3739         * include/grub/i386/pc/console.h (GRUB_TERM_NPAGE):
3740         Changed to 0x5100.
3741         (GRUB_TERM_PPAGE): Changed to 0x4900.
3743 2008-09-24  Robert Millan  <rmh@aybabtu.com>
3745         * include/grub/powerpc/ieee1275/console.h (GRUB_CONSOLE_KEY_*): Remove
3746         macros (they were i386-pc specific).
3747         * include/grub/sparc64/ieee1275/console.h: Likewise.
3748         * include/grub/efi/console.h: Likewise.
3750 2008-09-22  Bean  <bean123ch@gmail.com>
3752         * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a rare case where $BITMAP is
3753         resident and in attribute list.
3755         * include/grub/ntfs.h (BMP_LEN): Removed.
3757 2008-09-22  Bean  <bean123ch@gmail.com>
3759         * disk/ata.c (grub_atapi_open): Initialize devfnd, no need to set
3760         scsi->name and scsi->luns, as they will be set in grub_scsi_open.
3762         * disk/scsi.c (grub_scsi_open): Don't call p->close (scsi) here when
3763         error occurs, as grub_disk_open will call grub_disk_close, which will
3764         call p->close (scsi).
3766 2008-09-21  Felix Zielcke  <fzielcke@z-51.de>
3768         * configure.ac (AC_INIT): Quote `GRUB' string and version number.
3769         (AC_PREREQ): Bumped to 2.59.
3770         (AC_TRY_COMPILE): Replace obsolete macro with ...
3771         (AC_COMPILE_IFELSE): ... this.
3772         * aclocal.m4 (AC_TRY_LINK): Replace obsolete macro with ...
3773         (AC_LINK_IFELSE): ... this.
3775 2008-09-21  Felix Zielcke  <fzielcke@z-51.de>
3777         * autogen.sh: Add a call to `gendistlist.sh'.
3779 2008-09-19  Christian Franke  <franke@computer.org>
3781         * aclocal.m4 (grub_CHECK_ENABLE_EXECUTE_STACK): New function.
3782         * configure.ac: Call grub_CHECK_ENABLE_EXECUTE_STACK.
3783         * include/grub/misc.h [NEED_ENABLE_EXECUTE_STACK]:
3784         Export __enable_execute_stack() to modules.
3785         * kern/misc.c [NEED_ENABLE_EXECUTE_STACK] (__enable_execute_stack):
3786         New function.
3788 2008-09-09  Felix Zielcke  <fzielcke@z-51.de>
3790         * Makefile.in (RMKFILES): Add `i386.rmk' and `x86_64-efi.rmk'.
3791         Sort the list.
3793 2008-09-09  Felix Zielcke  <fzielcke@z-51.de>
3795         * util/hostdisk.c: Replace #include <grub/util/biosdisk.h> with
3796         #include <grub/util/hostdisk.h>.
3798 2008-09-08  Robert Millan  <rmh@aybabtu.com>
3800         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Skip
3801         segments when their filesz is zero (grub_file_read() interprets
3802         zero-size as "read until EOF", which results in memory corruption).
3803         Use `lowest_segment' rather than 0 for calculating the current
3804         segment load address.
3806 2008-09-08  Robert Millan  <rmh@aybabtu.com>
3808         * util/hostdisk.c (open_device): Replace a grub_util_info() call
3809         with grub_dprintf("hostdisk", ...), as it was so verbose that it
3810         clobbered useful information.
3812 2008-09-08  Robert Millan  <rmh@aybabtu.com>
3814         * include/grub/util/biosdisk.h: Move to ...
3815         * include/grub/util/hostdisk.h: ... here.  Update all users.
3816         * util/biosdisk.c: Move to ...
3817         * util/hostdisk.c: ... here.  Update all users.
3819 2008-09-07  Robert Millan  <rmh@aybabtu.com>
3821         * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): Remove
3822         variables.
3823         (grub_multiboot): Move `mbi' allocation upwards, so that mmap address
3824         and length can be stored directly in the `mbi->mmap_addr' and
3825         `mbi->mmap_length' struct fields.
3827 2008-09-07  Robert Millan  <rmh@aybabtu.com>
3829         * conf/i386.rmk: New file.  Provides declaration for building
3830         `cpuid.mod'.
3831         * conf/i386-pc.rmk (pkglib_MODULES): Remove `cpuid.mod'.
3832         (cpuid_mod_SOURCES, cpuid_mod_CFLAGS, cpuid_mod_LDFLAGS): Remove
3833         variables.
3834         Include `conf/i386.mk'.
3835         * conf/i386-efi.rmk: Likewise.
3836         * conf/x86_64-efi.rmk: Likewise.
3837         * conf/i386-coreboot.rmk: Likewise.
3838         * conf/i386-ieee1275.rmk: Likewise.
3840 2008-09-07  Vesa Jääskeläinen  <chaac@nic.fi>
3842         Based on patch created by Colin D Bennett <colin@gibibit.com>.
3843         Adds optimization support for BGR based modes.
3845         * include/grub/i386/pc/vbeblit.h (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8) Removed.
3846         (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
3847         (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
3848         (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
3849         (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
3850         (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
3851         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
3852         (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
3853         (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
3854         (grub_video_i386_vbeblit_index_index): Likewise.
3855         (grub_video_i386_vbeblit_replace_directN): Added.
3856         (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
3857         (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
3858         (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
3859         (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
3860         (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
3861         (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
3862         (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
3863         (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
3864         (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
3865         (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
3866         (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
3867         (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
3868         (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
3870         * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8) Removed.
3871         (grub_video_i386_vbefill_R8G8B8): Likewise.
3872         (grub_video_i386_vbefill_index): Likewise.
3873         (grub_video_i386_vbefill_direct32): Added.
3874         (grub_video_i386_vbefill_direct24): Likewise.
3875         (grub_video_i386_vbefill_direct16): Likewise.
3876         (grub_video_i386_vbefill_direct8): Likewise.
3878         * include/grub/video.h (grub_video_blit_format): Removed
3879         GRUB_VIDEO_BLIT_FORMAT_R8G8B8A8, GRUB_VIDEO_BLIT_FORMAT_R8G8B8.
3880         (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_RGBA_8888,
3881         GRUB_VIDEO_BLIT_FORMAT_BGRA_8888, GRUB_VIDEO_BLIT_FORMAT_RGB_888,
3882         GRUB_VIDEO_BLIT_FORMAT_BGR_888, GRUB_VIDEO_BLIT_FORMAT_RGB_565,
3883         GRUB_VIDEO_BLIT_FORMAT_BGR_565.
3885         * video/video.c (grub_video_get_blit_format): Updated to use new
3886         blit formats.  Added handling for 16 bit color modes.
3888         * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Updated to use new
3889         fillers.
3890         (common_blitter): Updated to use new blitters.
3892         * video/i386/pc/vbeblit.c (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8):
3893         Removed.
3894         (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
3895         (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
3896         (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
3897         (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
3898         (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
3899         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
3900         (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
3901         (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
3902         (grub_video_i386_vbeblit_index_index): Likewise.
3903         (grub_video_i386_vbeblit_replace_directN): Added.
3904         (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
3905         (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
3906         (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
3907         (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
3908         (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
3909         (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
3910         (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
3911         (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
3912         (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
3913         (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
3914         (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
3915         (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
3916         (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
3918         * video/i386/pc/vbefill.c (grub_video_i386_vbefill_R8G8B8A8): Removed.
3919         (grub_video_i386_vbefill_R8G8B8): Likewise.
3920         (grub_video_i386_vbefill_index): Likewise.
3921         (grub_video_i386_vbefill_direct32): Added.
3922         (grub_video_i386_vbefill_direct24): Likewise.
3923         (grub_video_i386_vbefill_direct16): Likewise.
3924         (grub_video_i386_vbefill_direct8): Likewise.
3926         * video/readers/jpeg.c (grub_jpeg_decode_sos): Adapt to new blitter
3927         types.
3929         * video/readers/tga.c (grub_video_reader_tga): Adapt to new blitter
3930         types.
3932         * video/readers/png.c (grub_png_decode_image_header): Adapt to new
3933         blitter types.
3935         * video/bitmap.c (grub_video_bitmap_create): Adapt to new blitter
3936         types.
3938 2008-09-06  Felix Zielcke  <fzielcke@z-51.de>
3940         * disk/raid.c (insert_array): Set `array->chunk_size' to 64 for
3941         RAID level 1.
3943 2008-09-06  Felix Zielcke  <fzielcke@z-51.de>
3945         * fs/iso9660.c (grub_iso9660_date): New structure.
3946         (grub_iso9660_primary_voldesc): Add `grub_iso9660_date' member.
3947         (grub_iso9660_uuid): New function.
3949 2008-09-05  Bean  <bean123ch@gmail.com>
3951         * fs/fshelp.c (grub_fshelp_find_file): Handle case insensitive names.
3953         * fs/ntfs.c (list_file): Ignore names in DOS namespace, set the case
3954         insensitive bit for names in Win32 and Win32 & DOS namespace.
3956         * include/grub/fshelp.h (GRUB_FSHELP_CASE_INSENSITIVE): New macro.
3958         * include/grub/types.h (LONG_MAX): Likewise.
3960 2008-09-04  Felix Zielcke  <fzielcke@z-51.de>
3962         * util/getroot.c: Include <config.h>.
3963         (grub_util_get_grub_dev): Rewrite to use asprintf for mdraid devices,
3964         add support for /dev/md/N devices and handle LVM double dash escaping.
3966 2008-09-04  Felix Zielcke  <fzielcke@z-51.de>
3968         * config.guess: Update to latest version from config git.
3969         * config.sub: Likewise.
3971 2008-09-03  Robert Millan  <rmh@aybabtu.com>
3973         * disk/scsi.c (grub_scsi_open): Remove size limit when printing
3974         `disk->total_sectors'.
3976 2008-09-01  Colin D Bennett  <colin@gibibit.com>
3978         * include/grub/normal.h: Fixed incorrect comment for
3979         GRUB_COMMAND_FLAG_NO_ARG_PARSE.
3981 2008-09-01  Colin D Bennett  <colin@gibibit.com>
3983         * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Replaced constant
3984         values with defines.
3986         * include/grub/i386/pc/vbe.h (GRUB_VBE_MODEATTR_SUPPORTED): Added.
3987         (GRUB_VBE_MODEATTR_RESERVED_1): Likewise.
3988         (GRUB_VBE_MODEATTR_BIOS_TTY_OUTPUT_SUPPORT): Likewise.
3989         (GRUB_VBE_MODEATTR_COLOR): Likewise.
3990         (GRUB_VBE_MODEATTR_GRAPHICS): Likewise.
3991         (GRUB_VBE_MODEATTR_VGA_COMPATIBLE): Likewise.
3992         (GRUB_VBE_MODEATTR_VGA_WINDOWED_AVAIL): Likewise.
3993         (GRUB_VBE_MODEATTR_LFB_AVAIL): Likewise.
3994         (GRUB_VBE_MODEATTR_DOUBLE_SCAN_AVAIL): Likewise.
3995         (GRUB_VBE_MODEATTR_INTERLACED_AVAIL): Likewise.
3996         (GRUB_VBE_MODEATTR_TRIPLE_BUF_AVAIL): Likewise.
3997         (GRUB_VBE_MODEATTR_STEREO_AVAIL): Likewise.
3998         (GRUB_VBE_MODEATTR_DUAL_DISPLAY_START): Likewise.
3999         (GRUB_VBE_MEMORY_MODEL_TEXT): Likewise.
4000         (GRUB_VBE_MEMORY_MODEL_CGA): Likewise.
4001         (GRUB_VBE_MEMORY_MODEL_HERCULES): Likewise.
4002         (GRUB_VBE_MEMORY_MODEL_PLANAR): Likewise.
4003         (GRUB_VBE_MEMORY_MODEL_NONCHAIN4_256): Likewise.
4004         (GRUB_VBE_MEMORY_MODEL_YUV): Likewise.
4006 2008-08-31  Robert Millan  <rmh@aybabtu.com>
4008         * loader/i386/pc/multiboot.c (grub_get_multiboot_mmap_len): Fix
4009         declaration.
4010         (grub_multiboot): Fix a few warnings.
4012 2008-08-31  Robert Millan  <rmh@aybabtu.com>
4014         * loader/i386/pc/multiboot.c: Update comment not to say that
4015         boot_device support is unimplemented.
4017 2008-08-31  Robert Millan  <rmh@aybabtu.com>
4019         * loader/i386/pc/multiboot.c: Update comment not to say that a.out
4020         or memory map support are unimplemented.
4022 2008-08-31  Colin D Bennett  <colin@gibibit.com>
4024         * util/i386/pc/grub-mkrescue.in: Support multiple overlay directories.
4026 2008-08-31  Colin D Bennett  <colin@gibibit.com>
4028         * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Show VBE version and
4029         total video memory in 'vbeinfo' output; show color format details for
4030         each video mode.
4032 2008-08-30  Pavel Roskin  <proski@gnu.org>
4034         * util/genmoddep.c: Remove for real this time.
4035         * DISTLIST: Remove util/genmoddep.c.
4037 2008-08-30  Robert Millan  <rmh@aybabtu.com>
4039         * kern/i386/pc/startup.S (multiboot_header): Force 4-byte alignment
4040         as required by Multiboot spec (it was already 4-byte aligned, but
4041         only by chance).
4043 2008-08-29  Pavel Roskin  <proski@gnu.org>
4045         * kern/powerpc/ieee1275/crt0.S: Rename to ...
4046         * kern/powerpc/ieee1275/startup.S: ... this.
4047         * conf/powerpc-ieee1275.rmk: Adjust for the above.
4048         * DISTLIST: Likewise.
4050         * kern/powerpc/ieee1275/crt0.S: Include grub/symbol.h and
4051         grub/cpu/kernel.h.  Add start label for consistency with other
4052         platforms.  Add grub_prefix immediately after start.  Add jump
4053         to the code after grub_prefix.
4054         * include/grub/powerpc/kernel.h: Provide valid values for
4055         GRUB_KERNEL_CPU_PREFIX and GRUB_KERNEL_CPU_DATA_END.
4057 2008-08-29  Bean  <bean123ch@gmail.com>
4059         * configure.ac: Change host_os to cygwin for mingw.
4060         (asprintf): New check for function.
4062         * include/grub/symbol.h: Replace #ifndef __CYGWIN__ with
4063         #if ! defined (__CYGWIN__) && ! defined (__MINGW32__).
4065         * include/grub/util/misc.h: #include <config.h> and <grub/types.h>,
4066         declare asprintf if HAVE_ASPRINTF is not set, declare fseeko, ftello,
4067         sync, sleep and grub_util_get_disk_size for mingw.
4069         * util/biosdisk.c (grub_util_biosdisk_open): Use grub_util_get_disk_size
4070         to get size in mingw.
4071         (open_device): Use flag O_BINARY if it's defined.
4072         (find_root_device): Add dummy code for mingw.
4074         * util/grub-mkdevicemap.c (get_floppy_disk_name): Return 0 for mingw.
4075         (get_ide_disk_name): Return //./PHYSICALDRIVE%d for mingw.
4076         (get_scsi_disk_name): Return 0 for mingw.
4078         * util/hostfs.c: #include <grub/util/misc.h>.
4079         (grub_hostfs_open): Use "rb" flag to open file, use
4080         grub_util_get_disk_size to get disk size for mingw.
4082         * util/misc.c: #include <windows.h> and <winioctl.h> in mingw.
4083         (asprintf): New function if HAVE_ASPRINTF is not set.
4084         (sync): New function for mingw.
4085         (sleep): Likewise.
4086         (grub_util_get_disk_size): Likewise.
4088 2008-08-28  Pavel Roskin  <proski@gnu.org>
4090         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
4091         kern/time.c.
4093 2008-08-28  Robert Millan  <rmh@aybabtu.com>
4095         * util/biosdisk.c (find_grub_drive): Declare missing `i' variable.
4097 2008-08-28  Robert Millan  <rmh@aybabtu.com>
4099         Change find_grub_drive() syntax so it doesn't prevent it from
4100         detecting NULL names as errors.
4102         * util/biosdisk.c (find_grub_drive): Move free slot search code
4103         from here ...
4104         (find_free_slot): ... to here.
4105         (read_device_map): Use find_free_slot() to search for free slots.
4107 2008-08-27  Marco Gerards  <marco@gnu.org>
4109         * conf/common.rmk (pkglib_MODULES): Add scsi.mod.
4110         (scsi_mod_SOURCES): New variable.
4111         (scsi_mod_CFLAGS): Likewise
4112         (scsi_mod_LDFLAGS): Likewise.
4114         * disk/scsi.c: New file.
4116         * include/grub/scsi.h: Likewise.
4118         * include/grub/scsicmd.h: Likewise.
4120         * disk/ata.c: Include <grub/scsi.h>.
4121         (grub_atapi_packet): Do not use grub_ata_cmd, use registers
4122         instead.
4123         (grub_ata_iterate): Skip ATAPI devices.
4124         (grub_ata_open): Only handle ATAPI devices.
4125         (struct grub_atapi_read): Removed.
4126         (grub_atapi_readsector): Likewise.
4127         (grub_ata_read): No longer handle ATAPI devices.
4128         (grub_ata_write): Likewise.
4129         (grub_atapi_iterate): New function.
4130         (grub_atapi_read): Likewise.
4131         (grub_atapi_write): Likewise.
4132         (grub_atapi_open): Likewise.
4133         (grub_atapi_close): Likewise.
4134         (grub_atapi_dev): New variable.
4135         (GRUB_MOD_INIT(ata)): Register ATAPI as SCSI device.
4136         (GRUB_MOD_FINI(ata)): Unregister ATAPI.
4138         * include/grub/disk.h (enum grub_disk_dev_id): Add
4139         `GRUB_DISK_DEVICE_SCSI_ID'.
4141 2008-08-26  Robert Millan  <rmh@aybabtu.com>
4143         * util/biosdisk.c (grub_util_biosdisk_open, open_device)
4144         (grub_util_biosdisk_get_grub_dev): Make error messages a bit more
4145         descriptive.
4147 2008-08-23  Bean  <bean123ch@gmail.com>
4149         * conf/common.rmk (grub_probe_SOURCES): Add disk/mdraid_linux.c.
4150         (grub_fstest_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
4151         disk/mdraid_linux.c and disk/dmraid_nvidia.c and lib/crc.c.
4152         (pkglib_MODULES): Add raid5rec.mod, raid6rec.mod, mdraid.mod and
4153         dm_nv.mod.
4154         (raid5rec_mod_SOURCES): New macro.
4155         (raid5rec_mod_CFLAGS): Likewise.
4156         (raid5rec_mod_LDFLAGS): Likewise.
4157         (raid6rec_mod_SOURCES): Likewise.
4158         (raid6rec_mod_CFLAGS): Likewise.
4159         (raid6rec_mod_LDFLAGS): Likewise.
4160         (mdraid_mod_SOURCES): Likewise.
4161         (mdraid_mod_CFLAGS): Likewise.
4162         (mdraid_mod_LDFLAGS): Likewise.
4163         (dm_nv_mod_SOURCES): Likewise.
4164         (dm_nv_mod_CFLAGS): Likewise.
4165         (dm_nv_mod_LDFLAGS): Likewise.
4167         * conf/i386-pc.rmk (grub_setup_SOURCES): Add disk/mdraid_linux.c.
4168         (grub_emu_SOURCES):  Add disk/raid5_recover.c, disk/raid6_recover.c,
4169         disk/mdraid_linux.c and disk/dmraid_nvidia.c.
4171         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add disk/raid5_recover.c,
4172         disk/raid6_recover.c, disk/mdraid_linux.c and disk/dmraid_nvidia.c.
4174         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
4176         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
4178         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4180         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4182         * disk/raid5_recover.c: New file.
4184         * disk/raid6_recover.c: Likewise.
4186         * disk/mdraid_linux.c: Likewise.
4188         * disk/dmraid_nvidia.c: Likewise.
4190         * disk/i386/pc/biosdisk.c: Set total_sectors of cdrom device to
4191         ULONG_MAX.
4193         * disk/raid.c (grub_raid_open): Use the size of the smallest disk to
4194         calculate the size of raid device.
4195         (grub_raid_read): Simplify raid0 code. Support raid4, raid6 and four
4196         different layout of raid5.
4197         (grub_raid_scan_device): Remove code specific to mdraid.
4198         (grub_raid_list): New variable.
4199         (free_array): New function.
4200         (grub_raid_register): Likewise.
4201         (grub_raid_unregister): Likewise.
4202         (grub_raid_rescan): Likewise.
4203         (GRUB_MOD_INIT): Don't iterate device here.
4204         (GRUB_MOD_FINI): Use free_array to release resource.
4206         * include/grub/raid.h: Remove macro and structure specific to mdraid.
4207         (grub_raid5_recover_func_t): New function variable type.
4208         (grub_raid6_recover_func_t): Likewise.
4209         (grub_raid5_recover_func): New variable.
4210         (grub_raid6_recover_func): Likewise.
4211         (grub_raid_register): New function.
4212         (grub_raid_unregister): Likewise.
4213         (grub_raid_rescan): Likewise.
4214         (grub_raid_block_xor): Likewise.
4216         * util/grub-fstest.c: Add #include <grub/raid.h> and <grub/lib/crc.h>.
4217         (CMD_CRC): New macro.
4218         (part): Removed.
4219         (read_file): Handle device as well as file.
4220         (cmd_crc): New function.
4221         (fstest): Handle multiple disks.
4222         (options): Remove part, raw and long, add root and diskcount.
4223         (usage): Add crc, remove -p, -r, -l, add -r and -c.
4224         (main): Find the first non option entry and ignore subsequent options,
4225         add handling for the new options, support multiple disks.
4227         * util/grub-probe.c (probe): Add mdraid to abstraction_name.
4229 2008-08-23  Bean  <bean123ch@gmail.com>
4231         * normal/x86_64/setjmp.S (grub_longjmp): Return 1 when val = 0.
4233         * genfslist.sh: Ignore kernel.mod.
4235         * genpartmaplist.sh: Likewise.
4237 2008-08-23  Robert Millan  <rmh@aybabtu.com>
4239         * util/getroot.c (find_root_device): Skip anything that starts with
4240         a dot, not just directories.  This avoids things like /dev/.tmp.md0.
4242 2008-08-22  Felix Zielcke  <fzielcke@z-51.de>
4244         * util/update-grub.in (GRUB_GFXMODE): Export variable.
4245         * util/grub.d/00_header.in: Allow the administrator to change default
4246         gfxmode via ${GRUB_GFXMODE}.
4248 2008-08-21  Felix Zielcke  <fzielcke@z-51.de>
4250         * fs/ntfs.c (grub_ntfs_mount): Fix a memory leak.
4252 2008-08-21  Robert Millan  <rmh@aybabtu.com>
4254         * loader/i386/linux.c: New file.  Implements generic 32-bit Linux
4255         loader.
4256         * conf/i386-coreboot.rmk (_linux_mod_SOURCES): Replace
4257         `loader/i386/pc/linux.c' with `loader/i386/linux.c'.
4259 2008-08-20  Carles Pina i Estany  <carles@pina.cat>
4261         * menu/normal.c (run_menu): Replace hardcoded numbers with macros
4262         (16 for GRUB_TERM_UP and 14 for GRUB_TERM_DOWN)
4264 2008-08-19  Robert Millan  <rmh@aybabtu.com>
4266         * term/gfxterm.c (DEFAULT_CURSOR_COLOR): Remove.
4267         (struct grub_virtual_screen): Remove `cursor_color'.
4268         (grub_virtual_screen_setup): Remove `virtual_screen.cursor_color'
4269         initialization.
4270         (write_cursor): Use `virtual_screen.fg_color' to draw cursor.
4272 2008-08-18  Robert Millan  <rmh@aybabtu.com>
4274         Unify (identical) linux_normal.c files.
4275         * loader/i386/efi/linux_normal.c: Move from here ...
4276         * loader/linux_normal.c: ... to here.  Update all users.
4277         * loader/i386/pc/linux_normal.c: Delete.  Update all users.
4278         * loader/i386/ieee1275/linux_normal.c: Likewise.
4280 2008-08-18  Robert Millan  <rmh@aybabtu.com>
4282         * include/grub/i386/linux.h (LINUX_LOADER_ID_LILO)
4283         (LINUX_LOADER_ID_LOADLIN, LINUX_LOADER_ID_BOOTSECT)
4284         (LINUX_LOADER_ID_SYSLINUX, LINUX_LOADER_ID_ETHERBOOT)
4285         (LINUX_LOADER_ID_ELILO, LINUX_LOADER_ID_GRUB, LINUX_LOADER_ID_UBOOT)
4286         (LINUX_LOADER_ID_XEN, LINUX_LOADER_ID_GUJIN, LINUX_LOADER_ID_QEMU):
4287         New macros.
4288         (GRUB_LINUX_CL_OFFSET, GRUB_LINUX_CL_END_OFFSET): Move from here ...
4289         * loader/i386/pc/linux.c (GRUB_LINUX_CL_OFFSET)
4290         (GRUB_LINUX_CL_END_OFFSET): ... to here.
4291         * loader/i386/efi/linux.c (GRUB_EFI_CL_OFFSET): Rename to ...
4292         (GRUB_LINUX_CL_OFFSET): ... this.  Update all users.
4293         (GRUB_EFI_CL_END_OFFSET): Rename to ...
4294         (GRUB_LINUX_CL_END_OFFSET): ... this.  Update all users.
4295         (grub_rescue_cmd_linux): Macroify `type_of_loader' initialization.
4296         Initialize `params->video_cursor_x' and `params->video_cursor_y'
4297         portably using grub_getxy().
4298         Replace `-EFI' with `-bzImage' in boot message.
4300 2008-08-17  Robert Millan  <rmh@aybabtu.com>
4302         * include/grub/x86_64/kernel.h: New file (<grub/i386/kernel.h> stub).
4304 2008-08-17  Robert Millan  <rmh@aybabtu.com>
4306         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pc/mmap.c'.
4308         * include/grub/i386/pc/init.h (GRUB_MACHINE_MEMORY_AVAILABLE)
4309         (GRUB_MACHINE_MEMORY_RESERVED): New macros.
4310         (grub_machine_mmap_iterate): New function declaration.
4311         * include/grub/multiboot.h (struct grub_multiboot_mmap_entry): New
4312         structure.
4313         (GRUB_MMAP_MEMORY_AVAILABLE, GRUB_MMAP_MEMORY_RESERVED): New
4314         macros.
4316         * kern/i386/pc/init.c (grub_machine_init): Replace hardcoded region
4317         type check value with `GRUB_MACHINE_MEMORY_AVAILABLE'.
4318         Move e820 parsing from here ...
4319         * kern/i386/pc/mmap.c: New file.
4320         (grub_machine_mmap_iterate): ... to here.
4322         * include/grub/i386/coreboot/memory.h: Remove `<grub/err.h>'.
4323         (GRUB_LINUXBIOS_MEMORY_AVAILABLE): Rename (for consistency) to ...
4324         (GRUB_MACHINE_MEMORY_AVAILABLE): ... this.  Update all users.
4325         (grub_available_iterate): Redeclare to return `void', and redeclare
4326         its hook to use grub_uint64_t as addr and size parameters, and rename
4327         to ...
4328         (grub_machine_mmap_iterate): ... this.  Update all users.
4330         * kern/i386/coreboot/mmap.c (grub_mmap_iterate): Simplify parser loop
4331         to make it more readable.  Rename to ...
4332         (grub_machine_mmap_iterate): ... this.
4334         * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): New variables.
4335         (grub_get_multiboot_mmap_len, grub_fill_multiboot_mmap): New functions.
4336         (grub_multiboot): Allocate an extra region after the payload, and fill
4337         it with a Multiboot memory map.  Adjust a.out loader to calculate size
4338         with the extra space.
4339         (grub_multiboot_load_elf32): Adjust elf32 loader to calculate size
4340         with the extra space.
4342 2008-08-17  Carles Pina i Estany  <carles@pina.cat>
4344         * menu/normal.c (run_menu): Add Home and End keys in grub-menu.
4346 2008-08-17  Felix Zielcke  <fzielcke@z-51.de>
4348         * gendistlist.sh: Add *.y, *.tex, *.texi, grub.cfg, README, *.sc,
4349         mdate-sh to the list `find' searches for.
4350         * DISTLIST: Regenerated.
4352 2008-08-16  Felix Zielcke  <fzielcke@z-51.de>
4354         * gendistlist.sh (EXTRA_DISTFILES): Remove gensymlist.sh,
4355         genkernsyms.sh.  Add geninit.sh, geninitheader.sh, genkernsyms.sh.in,
4356         genmoddep.awk, gensymlist.sh.in.
4357         (DISTDIRS): Add bus, docs, hook, lib.
4358         * DISTLIST: Regenerated.
4359         * NEWS: Add cygwin support and change the `os-prober' entry a bit.
4361 2008-08-16  Robert Millan  <rmh@aybabtu.com>
4363         * disk/raid.c (grub_raid_init): Handle/report errors set by
4364         grub_device_iterate().
4365         * disk/lvm.c (grub_lvm_init): Likewise.
4367 2008-08-15  Bean  <bean123ch@gmail.com>
4369         * conf/i386-pc.rmk (pkglib_MODULES): Add datetime.mod, date.mod
4370         and datehook.mod.
4371         (datetime_mod_SOURCES): New macro.
4372         (datetime_mod_CFLAGS): Likewise.
4373         (datetime_mod_LDFLAGS): Likewise.
4374         (date_mod_SOURCES): Likewise.
4375         (date_mod_CFLAGS): Likewise.
4376         (date_mod_LDFLAGS): Likewise.
4377         (datehook_mod_SOURCES): Likewise.
4378         (datehook_mod_CFLAGS): Likewise.
4379         (datehook_mod_LDFLAGS): Likewise.
4381         * conf/i386-coreboot.rmk (pkglib_MODULES): Add datetime.mod, date.mod
4382         and datehook.mod.
4383         (datetime_mod_SOURCES): New macro.
4384         (datetime_mod_CFLAGS): Likewise.
4385         (datetime_mod_LDFLAGS): Likewise.
4386         (date_mod_SOURCES): Likewise.
4387         (date_mod_CFLAGS): Likewise.
4388         (date_mod_LDFLAGS): Likewise.
4389         (datehook_mod_SOURCES): Likewise.
4390         (datehook_mod_CFLAGS): Likewise.
4391         (datehook_mod_LDFLAGS): Likewise.
4393         * conf/i386-ieee1275.rmk (pkglib_MODULES): Add datetime.mod, date.mod
4394         and datehook.mod.
4395         (datetime_mod_SOURCES): New macro.
4396         (datetime_mod_CFLAGS): Likewise.
4397         (datetime_mod_LDFLAGS): Likewise.
4398         (date_mod_SOURCES): Likewise.
4399         (date_mod_CFLAGS): Likewise.
4400         (date_mod_LDFLAGS): Likewise.
4401         (datehook_mod_SOURCES): Likewise.
4402         (datehook_mod_CFLAGS): Likewise.
4403         (datehook_mod_LDFLAGS): Likewise.
4405         * conf/i386-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
4406         and datehook.mod.
4407         (datetime_mod_SOURCES): New macro.
4408         (datetime_mod_CFLAGS): Likewise.
4409         (datetime_mod_LDFLAGS): Likewise.
4410         (date_mod_SOURCES): Likewise.
4411         (date_mod_CFLAGS): Likewise.
4412         (date_mod_LDFLAGS): Likewise.
4413         (datehook_mod_SOURCES): Likewise.
4414         (datehook_mod_CFLAGS): Likewise.
4415         (datehook_mod_LDFLAGS): Likewise.
4417         * conf/x86_64-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
4418         and datehook.mod.
4419         (datetime_mod_SOURCES): New macro.
4420         (datetime_mod_CFLAGS): Likewise.
4421         (datetime_mod_LDFLAGS): Likewise.
4422         (date_mod_SOURCES): Likewise.
4423         (date_mod_CFLAGS): Likewise.
4424         (date_mod_LDFLAGS): Likewise.
4425         (datehook_mod_SOURCES): Likewise.
4426         (datehook_mod_CFLAGS): Likewise.
4427         (datehook_mod_LDFLAGS): Likewise.
4429         * kern/env.c (grub_env_insert): Fix a bug in prevp pointer.
4431         * commands/date.c: New file.
4433         * hook/datehook.c: Likewise.
4435         * include/grub/lib/datetime.h: Likewise.
4437         * include/grub/i386/cmos.h: Likewise.
4439         * lib/datetime.c: Likewise.
4441         * lib/i386/datetime.c: Likewise.
4443         * lib/efi/datetime.c: Likewise.
4445 2008-08-14  Robert Millan  <rmh@aybabtu.com>
4447         * conf/common.rmk (bin_UTILITIES): Add `grub-mkelfimage'.
4448         (grub_mkelfimage_SOURCES): New variable.
4449         (util/elf/grub-mkimage.c_DEPENDENCIES): Likewise.
4451         * conf/i386-coreboot.rmk (bin_UTILITIES, grub_mkimage_SOURCES)
4452         (grub_mkimage_LDFLAGS, util/elf/grub-mkimage.c_DEPENDENCIES): Remove.
4453         * conf/powerpc-ieee1275.rmk: Likewise.
4454         * conf/i386-ieee1275.rmk: Likewise.
4456         * kern/ieee1275/init.c: Include `<grub/cpu/kernel.h>'.
4457         * kern/i386/coreboot/init.c: Likewise.
4459         * kern/i386/ieee1275/startup.S: Replace `<grub/machine/kernel.h>'
4460         with `<grub/cpu/kernel.h>'.
4461         (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Renamed
4462         to ...
4463         (GRUB_KERNEL_CPU_PREFIX, GRUB_KERNEL_CPU_DATA_END): ... this.
4464         * kern/i386/coreboot/startup.S: Likewise.
4466         * include/grub/powerpc/ieee1275/kernel.h (GRUB_MOD_ALIGN)
4467         (GRUB_MOD_GAP): Remove.
4468         * include/grub/powerpc/kernel.h: New file.
4469         * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX)
4470         (GRUB_KERNEL_MACHINE_DATA_END): Remove.
4471         * include/grub/i386/kernel.h: New file.
4472         * include/grub/i386/coreboot/kernel.h (GRUB_MOD_ALIGN)
4473         (GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_PREFIX)
4474         (GRUB_KERNEL_MACHINE_DATA_END): Remove.
4476         * util/ieee1275/grub-install.in (grub_mkimage): Initialize to use
4477         `grub-mkelfimage'.
4478         Use --directory when invoking grub_mkimage.
4480         * util/elf/grub-mkimage.c: Include `<grub/cpu/kernel.h>'.
4481         (add_segments): Replace GRUB_KERNEL_MACHINE_DATA_END and
4482         GRUB_KERNEL_MACHINE_PREFIX with GRUB_KERNEL_CPU_DATA_END
4483         and GRUB_KERNEL_CPU_PREFIX.
4485 2008-08-14  Felix Zielcke  <fzielcke@z-51.de>
4487         * include/grub/err.h (grub_err_printf): New function prototype.
4488         * util/misc.c (grub_err_printf): New function.
4489         * kern/misc.c [! GRUB_UTIL] (grub_err_printf): New alias for
4490         grub_printf.
4491         * kern/err.c (grub_print_error): Use grub_err_printf.
4493 2008-08-13  Robert Millan  <rmh@aybabtu.com>
4495         * docs/grub.cfg: Remove `/dev/' prefix in GNU/Hurd boot entry.
4497 2008-08-13  Robert Millan  <rmh@aybabtu.com>
4499         * docs/grub.cfg: Use the native device name for the example GNU/Hurd
4500         boot entry.
4502 2008-08-12  Robert Millan  <rmh@aybabtu.com>
4504         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Move part
4505         of the relocation code from here ...
4506         (grub_multiboot): ... to here.
4507         (forward_relocator, backward_relocator): Move from here ...
4508         * kern/i386/loader.S (grub_multiboot_forward_relocator)
4509         (grub_multiboot_backward_relocator): ... to here.
4510         (grub_multiboot_real_boot): Use %edx for entry offset.  Put Multiboot
4511         magic in %eax.  Use %ebp for jumping (so %edx is not trashed).
4512         * include/grub/i386/loader.h (grub_multiboot_forward_relocator)
4513         (grub_multiboot_forward_relocator_end)
4514         (grub_multiboot_backward_relocator)
4515         (grub_multiboot_backward_relocator_end): New variables.
4517 2008-08-12  Bean  <bean123ch@gmail.com>
4519         * disk/raid.c (grub_raid_read): Fix a bug in raid0 code.
4521 2008-08-11  Robert Millan  <rmh@aybabtu.com>
4523         * kern/i386/linuxbios/startup.S: Move from here ...
4524         * kern/i386/coreboot/startup.S: ... to here.
4526         * kern/i386/linuxbios/init.c: Move from here ...
4527         * kern/i386/coreboot/init.c: ... to here.
4529         * kern/i386/linuxbios/table.c: Move from here ...
4530         * kern/i386/coreboot/mmap.c: ... to here.
4532         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Update moved files.
4534 2008-08-11  Robert Millan  <rmh@aybabtu.com>
4536         * kern/device.c (grub_device_open): Do not handle grub_disk_open()
4537         errors.  Leave it to the upper layer to handle them.
4539 2008-08-09  Christian Franke  <franke@computer.org>
4541         * Makefile.in: Add `target_os' and `enable_grub_pe2elf'.
4542         * conf/common.rmk: Install `grub-pe2elf' only if requested.
4543         Install `grub.d/10_windows' only on Cygwin.
4544         * configure.ac: Add subst of `target_os'.
4545         Check `target_os' also before setting TARGET_OBJ2ELF.
4546         Add `--enable-grub-pe2elf'.
4548 2008-08-08  Robert Millan  <rmh@aybabtu.com>
4550         * kern/disk.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
4551         (grub_last_time): Change type to grub_uint64_t.
4552         (grub_disk_open): Migrate code from to using grub_get_time_ms().
4553         (grub_disk_close): Likewise.
4555         * normal/menu.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
4556         (run_menu): Migrate code from to using grub_get_time_ms().
4558         * util/misc.c (grub_get_time_ms): New function.
4560 2008-08-08  Marco Gerards  <marco@gnu.org>
4562         * disk/ata.c (grub_ata_regget): Change return type to
4563         `grub_uint8_t'.
4564         (grub_ata_regget2): Likewise.
4565         (grub_ata_wait_status): New function.
4566         (grub_ata_wait_busy): Removed function, updated all users to use
4567         `grub_ata_wait_status'.
4568         (grub_ata_wait_drq): Likewise.
4569         (grub_ata_cmd): New function.
4570         (grub_ata_pio_read): Change return type to `grub_uint8_t'.  Add
4571         error handling.
4572         (grub_ata_pio_write): Add error handling.
4573         (grub_atapi_identify): Likewise.
4574         (grub_atapi_packet): Use `grub_ata_cmd' and improve error
4575         handling.
4576         (grub_ata_identify): Use `grub_ata_cmd' and improve error
4577         handling.  Actually use the detected registers.  Reorder the
4578         detection logic such that it is easier to read.
4579         (grub_ata_pciinit): Do not assign the same ID to each controller.
4580         (grub_ata_setaddress): Use `grub_ata_cmd' and improve error
4581         handling.
4582         (grub_atapi_readsector): Check the result of `grub_ata_pio_read'.
4584         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TIMEOUT'.
4586 2008-08-08  Marco Gerards  <marco@gnu.org>
4588         * NEWS: Update.
4590 2008-08-07  Bean  <bean123ch@gmail.com>
4592         * include/grub/x86_64/pci.h: New file.
4594 2008-08-07  Christian Franke  <franke@computer.org>
4596         * kern/i386/pit.c (TIMER2_SPEAKER): New define.
4597         (TIMER2_GATE): Likewise.
4598         (grub_pit_wait): Add enable/disable of the timer2 gate
4599         bit of port 0x61.  This fixes a possible infinite loop.
4601 2008-08-07  Bean  <bean123ch@gmail.com>
4603         * conf/x86_64-efi.rmk (kernel_mod_SOURCES): Add kern/time.c,
4604         kern/i386/tsc.c and kern/i386/pit.c.
4606         * include/grub/i386/tsc.h (grub_cpu_is_cpuid_supported): Handle
4607         x86_64 platform.
4609         * kern/i386/efi/init.c: Replace <grub/cpu/tsc.h> with
4610         <grub/i386/tsc.h>.
4612         * kern/i386/pit.c: Replace <grub/cpu/io.h> with <grub/i386/io.h>.
4614 2008-08-07  Bean  <bean123ch@gmail.com>
4616         * conf/i386-efi.rmk (kernel_mod_SOURCES): Add kern/time.c.
4618         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add kern/time.c,
4620         * include/grub/i386/pit.h: Use macro KERNEL_CPU_PIT_HEADER to avoid
4621         multiple inclusion. Add #include <grub/types.h>.
4623 2008-08-06  Christian Franke  <franke@computer.org>
4625         * conf/common.rmk: Build and install `10_windows'.
4626         * util/grub.d/10_windows.in: New script.
4628 2008-08-06  Pavel Roskin  <proski@gnu.org>
4630         * kern/i386/pit.c: Include `<grub/i386/pit.h>'.
4632 2008-08-06  Robert Millan  <rmh@aybabtu.com>
4634         * conf/i386-coreboot.rmk (kernel_elf_ASFLAGS): New variable.
4635         * kern/i386/tsc.c: Include `<grub/i386/pit.h>'.
4637 2008-08-06  Bean  <bean123ch@gmail.com>
4639         * fs/i386/pc/pxe.c (grub_pxe_data): New member block_size.
4640         (grub_pxefs_fs_int): Remove dummy definition.
4641         (grub_pxefs_open): Use data->block_size to store the current block
4642         size setting.
4643         (grub_pxefs_read): Use block size stored in data->block_size. As the
4644         value of grub_pxe_blksize can be changed after the file is opened.
4646 2008-08-06  Bean  <bean123ch@gmail.com>
4648         * fs/i386/pc/pxe.c (curr_file): new variable.
4649         (grub_pxefs_open): Simply the handling of pxe file system. Don't
4650         require the dummy internal file system anymore.
4651         (grub_pxefs_read): Removed.
4652         (grub_pxefs_close): Likewise.
4653         (grub_pxefs_fs_int): Likewise.
4654         (grub_pxefs_read_int): Renamed to grub_pxefs_read. Reinitialize tftp
4655         connection when we switch file.
4656         (grub_pxefs_close_int): Renamed to grub_pxefs_close.
4658 2008-08-06  Robert Millan  <rmh@aybabtu.com>
4660         * conf/i386-coreboot.rmk (pkglib_MODULES): Add `reboot.mod' and
4661         `halt.mod'.
4662         (reboot_mod_SOURCES, reboot_mod_CFLAGS, reboot_mod_LDFLAGS)
4663         (halt_mod_SOURCES, halt_mod_CFLAGS, halt_mod_LDFLAGS): New variables.
4665         * kern/i386/halt.c: New file.
4666         * kern/i386/reboot.c: Likewise.
4667         * include/grub/i386/reboot.h: Likewise.
4668         * include/grub/i386/halt.h: Likewise.
4670         * commands/halt.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]:
4671         Include `<grub/cpu/halt.h>'.
4672         * commands/reboot.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]
4673         [! GRUB_MACHINE_PCBIOS]: Include `<grub/cpu/reboot.h>'.
4675         * term/i386/pc/at_keyboard.c: Include `<grub/cpu/at_keyboard.h>'.
4676         (SHIFT_L, SHIFT_R, CTRL, ALT, CAPS_LOCK, KEYBOARD_REG_DATA)
4677         (KEYBOARD_REG_STATUS, KEYBOARD_COMMAND_ISREADY, KEYBOARD_COMMAND_READ)
4678         (KEYBOARD_COMMAND_WRITE, KEYBOARD_COMMAND_REBOOT)
4679         (KEYBOARD_SCANCODE_SET1, KEYBOARD_ISMAKE, KEYBOARD_ISREADY)
4680         (KEYBOARD_SCANCODE, OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): Move
4681         from here ...
4682         * include/grub/i386/at_keyboard.h: ... to here.
4684 2008-08-05  Robert Millan  <rmh@aybabtu.com>
4686         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pit.c'.
4687         * conf/i386-efi.rmk (kernel_mod_SOURCES): Likewise.
4688         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Likewise. Also add
4689         `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
4690         `kern/generic/millisleep.c'.
4692         * kern/i386/tsc.c (calibrate_tsc): Rewrite using grub_pit_wait()
4693         instead of grub_get_rtc().
4694         (grub_tsc_init): Initialize `tsc_boot_time'.
4696         * kern/i386/linuxbios/init.c (grub_millisleep): Remove stub.
4697         (grub_machine_init): Use grub_tsc_init() rather than
4698         installing an RTC-based handler via grub_install_get_time_ms().
4700         * kern/i386/pit.c: New file.
4701         * include/grub/i386/pit.h: Likewise.
4703 2008-08-05  Bean  <bean123ch@gmail.com>
4705         * boot/i386/pc/pxeboot.S (_start): Use drive number 0x7F for pxe.
4707         * conf/i386-pc.rmk (kernel_img_HEADERS): Add machine/pxe.h.
4708         (pkglib_MODULES): Add pxe.mod and pxecmd.mod.
4709         (pxe_mod_SOURCES): New macro.
4710         (pxe_mod_CFLAGS): Likewise.
4711         (pxe_mod_LDFLAGS): Likewise.
4712         (pxecmd_mod_SOURCES): Likewise.
4713         (pxecmd_mod_CFLAGS): Likewise.
4714         (pxecmd_mod_LDFLAGS): Likewise.
4716         * kern/i386/pc/startup.S (grub_pxe_scan): New function.
4717         (grub_pxe_call): Likewise.
4719         * include/grub/disk.h (grub_disk_dev_id): Add GRUB_DISK_DEVICE_PXE_ID.
4721         * commands/i386/pc/pxecmd.c: New file.
4723         * fs/i386/pc/pxe.c: Likewise.
4725         * include/grub/i386/pc/pxe.h: Likewise.
4727 2008-08-05  Bean  <bean123ch@gmail.com>
4729         * util/console.c (grub_console_cur_color): New variable.
4730         (grub_console_standard_color): Likewise.
4731         (grub_console_normal_color): Likewise.
4732         (grub_console_highlight_color): Likewise.
4733         (color_map): Likewise.
4734         (use_color): Likewise.
4735         (NUM_COLORS): New macro.
4736         (grub_ncurses_setcolorstate): Handle color properly.
4737         (grub_ncurses_setcolor): Don't change color here, just remember the
4738         settings, color will be set in grub_ncurses_setcolorstate.
4739         (grub_ncurses_getcolor): New function.
4740         (grub_ncurses_init): Initialize color pairs.
4741         (grub_ncurses_term): New member grub_ncurses_getcolor.
4743 2008-08-05  Colin D Bennett  <colin@gibibit.com>
4745         High resolution timer support.  Implemented for x86 CPUs using TSC.
4746         Extracted generic grub_millisleep() so it's linked in only as needed.
4747         This requires a Pentium compatible CPU; if the RDTSC instruction is
4748         not supported, then it falls back on the generic grub_get_time_ms()
4749         implementation that uses the machine's RTC.
4751         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/time.c',
4752         `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
4753         `kern/generic/millisleep.c'.
4755         * conf/i386-efi.rmk (kernel_mod_SOURCES): Add `kern/i386/tsc.c',
4756         `kern/generic/rtc_get_time_ms.c' and `kern/generic/millisleep.c'.
4758         * conf/x86_64-efi.rml (kernel_mod_SOURCES): Add
4759         `kern/generic/millisleep.c' and `kern/generic/rtc_get_time_ms.c'.
4761         * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
4763         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
4764         `kern/generic/millisleep.c'.
4766         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
4768         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Add `kern/time.c'.
4770         * kern/generic/rtc_get_time_ms.c: New file.
4772         * kern/generic/millisleep.c: New file.
4774         * kern/misc.c: Don't include
4775         <kern/time.h> anymore.
4776         (grub_millisleep_generic): Removed.
4778         * commands/sleep.c (grub_interruptible_millisleep): Uses
4779         grub_get_time_ms() instead of grub_get_rtc().
4781         * include/grub/i386/tsc.h (grub_get_tsc): New file.  New inline
4782         function.
4783         (grub_cpu_is_cpuid_supported): New inline function.
4784         (grub_cpu_is_tsc_supported): New inline function.
4785         (grub_tsc_init): New function prototype.
4786         (grub_tsc_get_time_ms): New function prototype.
4788         * kern/i386/tsc.c (grub_get_time_ms): New file.
4790         * include/grub/time.h: Include <grub/types.h.
4791         (grub_millisleep_generic): Removed.
4792         (grub_get_time_ms): New prototype.
4793         (grub_install_get_time_ms): New prototype.
4794         (grub_rtc_get_time_ms): New prototype.
4796         * kern/time.c (grub_get_time_ms): New function.
4797         (grub_install_get_time_ms): New function.
4799         * kern/i386/efi/init.c: Include <grub/cpu/tsc.h>.  Don't include
4800         <grub/time.h> anymore.
4801         (grub_millisleep): Removed.
4802         (grub_machine_init): Call grub_tsc_init.
4804         * kern/i386/linuxbios/init.c (grub_machine_init): Install the RTC
4805         get_time_ms() implementation.
4807         * kern/sparc64/ieee1275/init.c (grub_millisleep): Removed.
4808         (ieee1275_get_time_ms): New function.
4809         (grub_machine_init): Install get_time_ms() implementation.
4811         * kern/i386/pc/init.c: Include <grub/cpu/tsc.h>.
4812         (grub_machine_init): Call grub_tsc_init().
4813         (grub_millisleep): Removed.
4815         * kern/ieee1275/init.c (grub_millisleep): Removed.
4816         (grub_machine_init): Install ieee1275_get_time_ms()
4817         implementation.
4818         (ieee1275_get_time_ms): New function.
4819         (grub_get_rtc): Now calls ieee1275_get_time_ms(), which does the
4820         real work.
4822 2008-08-05  Marco Gerards  <marco@gnu.org>
4824         * disk/ata.c: Include <grub/pci.h>.
4825         (enum grub_ata_commands): Add `GRUB_ATA_CMD_EXEC_DEV_DIAGNOSTICS'.
4826         (grub_ata_initialize): Rewritten.
4827         (grub_ata_device_initialize): New function.
4829 2008-08-04  Pavel Roskin  <proski@gnu.org>
4831         * kern/main.c: Include grub/mm.h.
4833 2008-08-04  Robert Millan  <rmh@aybabtu.com>
4835         * conf/i386-coreboot.rmk (COMMON_ASFLAGS, COMMON_CFLAGS)
4836         (COMMON_LDFLAGS): Harmonize with i386-pc version (fixes a code
4837         corruption problem).
4839 2008-08-04  Robert Millan  <rmh@aybabtu.com>
4841         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Fix misc
4842         warnings introduced in my last commit.
4844 2008-08-03  Robert Millan  <rmh@aybabtu.com>
4846         Make PCI available on all i386 architectures.
4848         * include/grub/i386/pc/pci.h: Move from here ...
4849         * include/grub/i386/pci.h: ... to here.
4851         * include/grub/i386/pc/pci.h: Remove.
4852         * include/grub/i386/efi/pci.h: Remove.
4853         * include/grub/x86_64/efi/pci.h: Remove.
4855         * include/grub/pci.h: Replace `<grub/machine/pci.h>' with
4856         `<grub/cpu/pci.h>'.
4858         * conf/i386-coreboot.rmk (pkglib_MODULES): Add `pci' and `lspci'.
4859         (pci_mod_SOURCES, pci_mod_CFLAGS, pci_mod_LDFLAGS, lspci_mod_SOURCES)
4860         (lspci_mod_CFLAGS, lspci_mod_LDFLAGS): New variables.
4862         * conf/i386-ieee1275.rmk: Likewise.
4864 2008-08-03  Robert Millan  <rmh@aybabtu.com>
4866         * term/i386/pc/vga_text.c (CRTC_CURSOR_DISABLE): New macro.
4867         (grub_console_setcursor): Make it possible to set cursor off.
4869 2008-08-03  Robert Millan  <rmh@aybabtu.com>
4871         * util/grub.d/00_header.in: Be platform-agnostic.  Probe for existence
4872         of modules instead of assuming which platform provides what.
4873         * util/update-grub.in: Likewise.
4875 2008-08-03  Robert Millan  <rmh@aybabtu.com>
4877         * kern/i386/pc/init.c (make_install_device): Check for `grub_prefix'
4878         instead of `grub_install_dos_part' to determine whether a drive needs
4879         to be prepended to prefix (`grub_install_dos_part' is not reliable,
4880         because it can be overridden when loading GRUB via Multiboot).
4882 2008-08-02  Robert Millan  <rmh@aybabtu.com>
4884         * util/i386/pc/grub-install.in: Remove trailing slash from prefix.
4886 2008-08-02  Robert Millan  <rmh@aybabtu.com>
4888         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Add a pair
4889         of informational grub_dprintf() calls.
4891 2008-08-02  Robert Millan  <rmh@aybabtu.com>
4893         * disk/memdisk.c (memdisk_size): Don't initialize.
4894         (GRUB_MOD_INIT(memdisk)): Find memdisk using grub_module_iterate().
4896         * include/grub/i386/pc/kernel.h
4897         (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): Remove macro.
4898         (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Shift.
4899         (grub_memdisk_image_size, grub_arch_memdisk_addr)
4900         (grub_arch_memdisk_size): Remove.
4902         * include/grub/kernel.h (struct grub_module_header): Remove `offset'
4903         field (was only used to transfer a constant).  Add `type' field to
4904         support multiple module types.
4905         (grub_module_iterate): New function.
4907         * kern/device.c (grub_device_open): Do not hide error messages
4908         when grub_disk_open() fails.  Use grub_print_error() instead.
4910         * kern/i386/pc/init.c (grub_arch_modules_addr)
4911         (grub_arch_memdisk_size): Remove functions.
4912         (grub_arch_modules_addr): Return the module address in high memory
4913         (now that it isn't copied anymore).
4915         * kern/i386/pc/startup.S (grub_memdisk_image_size): Remove variable.
4916         (codestart): Don't add grub_memdisk_image_size to %ecx in LZMA
4917         decompression routine (grub_total_module_size already includes that
4918         now).  Don't copy modules back to low memory.
4920         * kern/main.c: Include `<grub/mm.h>'.
4921         (grub_load_modules): Split out (and use) ...
4922         (grub_module_iterate): ... this function, which iterates through
4923         module objects and runs a hook.
4924         Comment out grub_mm_init_region() call, as it would cause non-ELF
4925         modules to be overwritten.
4927         * util/i386/pc/grub-mkimage.c (generate_image): Instead of appending
4928         the memdisk image in its own region, make it part of the module list.
4929         * util/elf/grub-mkimage.c (options): Add "memdisk"|'m' option.
4930         (main): Parse --memdisk|-m option, and pass user-provided path as
4931         parameter to generate_image().
4932         (add_segments): Pass `memdisk_path' down to load_modules().
4933         (load_modules): Embed memdisk image in module section when requested.
4934         * util/i386/efi/grub-mkimage.c (make_mods_section): Initialize
4935         `header.type' instead of `header.offset'.
4937         * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add `memdisk.mod'.
4938         (memdisk_mod_SOURCES, memdisk_mod_CFLAGS)
4939         (memdisk_mod_LDFLAGS): New variables.
4940         * conf/i386-coreboot.rmk: Likewise.
4941         * conf/i386-ieee1275.rmk: Likewise.
4943 2008-08-02  Robert Millan  <rmh@aybabtu.com>
4945         * loader/i386/pc/multiboot.c (playground, forward_relocator)
4946         (backward_relocator): New variables.  Used to allocate and relocate
4947         the payload, respectively.
4948         (grub_multiboot_load_elf32): Load into heap instead of requested
4949         address, install the appropriate relocator code in each bound of
4950         the payload, and set the entry point such that
4951         grub_multiboot_real_boot() will jump to one of them.
4953         * kern/i386/loader.S (grub_multiboot_payload_size)
4954         (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
4955         (grub_multiboot_payload_entry_offset): New variables.
4956         (grub_multiboot_real_boot): Set cpu context to what the relocator
4957         expects, and jump to the relocator instead of the payload.
4959         * include/grub/i386/loader.h (grub_multiboot_payload_size)
4960         (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
4961         (grub_multiboot_payload_entry_offset): Export.
4963 2008-08-01  Bean  <bean123ch@gmail.com>
4965         * normal/menu_entry.c (editor_getline): Don't return the original
4966         string as result, as it will be released by lexer once it has done
4967         using it.
4969 2008-08-01  Robert Millan  <rmh@aybabtu.com>
4971         * util/grub.d/10_linux.in: Use prepare_grub_to_access_device() from
4972         within menuentries, not before them.
4973         util/grub.d/10_hurd.in: Likewise.
4975 2008-08-01  Bean  <bean123ch@gmail.com>
4977         * conf/common.rmk (pkglib_MODULES): Add bufio.mod.
4978         (bufio_mod_SOURCES): New macro.
4979         (bufio_mod_CFLAGS): Likewise.
4980         (bufio_mod_LDFLAGS): Likewise.
4982         * include/grub/bufio.h: New file.
4984         * io/bufio.c: Likewise.
4986         * video/png.c: Replace <grub/file.h> with <grub/bufio.h>.
4987         (grub_video_reader_png): Use grub_buffile_open to open file.
4989         * video/jpeg.c: Replace <grub/file.h> with <grub/bufio.h>.
4990         (grub_video_reader_jpeg): Use grub_buffile_open to open file.
4992         * video/tga.c: Replace <grub/file.h> with <grub/bufio.h>.
4993         (grub_video_reader_tga): Use grub_buffile_open to open file.
4995         * font/manager.c: Include <grub/bufio.h>.
4996         (add_font): Use grub_buffile_open to open file.
4998 2008-07-31  Robert Millan  <rmh@aybabtu.com>
5000         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): When loading
5001         ELF segments, use a macro for arbitrarily accessing any of them instead
5002         of preparing a pointer that allows access to one at a time.
5003         (grub_multiboot_load_elf64): Likewise.
5005 2008-07-31  Bean  <bean123ch@gmail.com>
5007         * boot/i386/pc/lnxboot.S (real_code_2): Replace 0x50 with
5008         GRUB_KERNEL_MACHINE_DATA_END.
5010 2008-07-30  Robert Millan  <rmh@aybabtu.com>
5012         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_DATA_END):
5013         Increase from 0x50 to 0x60.
5014         * util/i386/pc/grub-install.in: Detect cross-disk installs, and
5015         use UUIDs to identify the root drive for them.  If that's not
5016         possible, abort.
5017         * util/i386/pc/grub-setup.c (setup): Do not special-case, or even
5018         check, for cross-disk installs.
5020 2008-07-30  Robert Millan  <rmh@aybabtu.com>
5022         * kern/ieee1275/init.c (grub_machine_set_prefix): If `grub_prefix'
5023         is non-empty, use it to set the `prefix' environment variable instead
5024         of the usual approach.
5025         * kern/i386/linuxbios/init.c (make_install_device): Remove function.
5026         (grub_machine_set_prefix): Use `grub_prefix' to set the `prefix'
5027         environment variable instead of dummy make_install_device().
5029         * kern/i386/ieee1275/startup.S: Include `<grub/machine/kernel.h>'.
5030         (start): Insert a data section, with `grub_prefix' variable.
5031         * kern/i386/linuxbios/startup.S: Likewise.
5033         * include/grub/powerpc/ieee1275/kernel.h [!ASM_FILE] (grub_prefix):
5034         New variable reference.
5035         * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX):
5036         New macro.  Defines offset of `grub_prefix' within startup.S (relative
5037         to `start').
5038         (GRUB_KERNEL_MACHINE_DATA_END): New macro.  Defines the end of data
5039         section within startup.S (relative to `start').
5040         * include/grub/i386/coreboot/kernel.h: Likewise.
5042         * util/elf/grub-mkimage.c (add_segments): Receive `prefix' parameter.
5043         Overwrite grub_prefix with its contents, at the beginning of the
5044         first segment.
5045         (main): Understand -p|--prefix.
5047 2008-07-30  Robert Millan  <rmh@aybabtu.com>
5049         * util/grub.d/10_hurd.in: Source ${libdir}/grub/update-grub_lib.
5051 2008-07-30  Robert Millan  <rmh@aybabtu.com>
5053         * term/i386/pc/vga_text.c (grub_console_cls): Use
5054         grub_console_gotoxy() to go back to beginning of the screen.
5055         Found by Patrick Georgi <patrick.georgi@coresystems.de>
5057 2008-07-29  Christian Franke  <franke@computer.org>
5059         * util/update-grub_lib.in (make_system_path_relative_to_its_root):
5060         Add conversion of emulated mount points on Cygwin.
5062 2008-07-29  Christian Franke  <franke@computer.org>
5064         * util/update-grub.in: Add a check for admin
5065         group on Cygwin.
5066         Remove old `grub.cfg.new' before creation.
5067         Add `-f' to `mv' to handle the different filesystem
5068         semantics of Windows.
5070 2008-07-29  Bean  <bean123ch@gmail.com>
5072         * normal/main.c (get_line): Fix buffer overflow bug.
5074 2008-07-28  Robert Millan  <rmh@aybabtu.com>
5076         * partmap/apple.c (GRUB_APPLE_HEADER_MAGIC): New macro.
5077         (struct grub_apple_header): New struct.  Describes the layout of
5078         the partmap header.
5079         (apple_partition_map_iterate): Check the header magic as well as the
5080         partition magic (which was already being checked).
5082 2008-07-28  Pavel Roskin  <proski@gnu.org>
5084         * genmk.rb: Add a warning to the beginning of the output that
5085         it's a generated file and should not be edited.
5087 2008-07-28  Robert Millan  <rmh@aybabtu.com>
5089         * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
5090         with the same number are found, just use issue a warning with
5091         grub_dprintf(), as this error has been reported to be non-fatal.
5093 2008-07-27  Robert Millan  <rmh@aybabtu.com>
5095         * disk/ata.c (grub_ata_dumpinfo): Use grub_dprintf() for debugging
5096         information.
5098 2008-07-27  Bean  <bean123ch@gmail.com>
5100         * fs/fat.c (GRUB_FAT_MAXFILE): New constant.
5101         (grub_fat_find_dir): Ignore case when comparing filename.
5103 2008-07-27  Bean  <bean123ch@gmail.com>
5105         * fs/xfs.c (grub_xfs_dir_header): Change field i8count back to
5106         smallino, as it's more descriptive, and i8count can be confused with
5107         the other field count.
5108         (grub_xfs_iterate_dir): Adjust grub_xfs_dir_entry pointer for small
5109         inode type.
5111 2008-07-27  Bean  <bean123ch@gmail.com>
5113         * commands/crc.c: New file.
5115         * lib/crc.c: Likewise.
5117         * include/grub/lib/crc.h: Likewise.
5119         * util/grub-fstest.c: grub/hexdump.h => grub/lib/hexdump.h.
5121         * commands/hexdump.c: grub/hexdump.h => grub/lib/hexdump.h.
5122         (hexdump): Move this function to ...
5124         * lib/hexdump.c: ... here.
5126         * include/grub/hexdump.h: Renamed to ...
5128         * include/grub/lib/hexdump.h: ... this.
5130         * commands/loadenv.c: grub/envblk.h => grub/lib/envblk.h
5132         * util/grub-editenv.c: Likewise.
5134         * include/envblk.h: Renamed to ...
5136         * include/lib/envblk.h: ... this.
5138         * util/envblk.c: Renamed to ...
5140         * lib/envblk.c: ... this.
5142         * conf/common.rmk (grub_fstest_SOURCES): commands/hexdump.c =>
5143         lib/hexdump.c.
5144         (grub_editenv_SOURCES): util/envblk.c => lib/envblk.c
5145         (pkglib_MODULES): Add crc.mod.
5146         (hexdump_mod_SOURCES): Add lib/hexdump.c.
5147         (loadenv_mod_SOURCES): util/envblk.c => lib/envblk.c.
5148         (crc_mod_SOURCES): New macro.
5149         (crc_mod_CFLAGS): Likewise.
5150         (crc_mod_LDFLAGS): Likewise.
5152         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add lib/hexdump.c.
5154         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
5156         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
5158         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5160         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
5162 2008-07-27  Felix Zielcke  <fzielcke@z-51.de>
5164         * commands/help.c: Include <grub/term.h>.
5165         (TERM_WIDTH): Removed.  Updated all users.
5167 2008-07-27  Pavel Roskin  <proski@gnu.org>
5169         * util/getroot.c (find_root_device): Rephrase a comment to avoid
5170         spurious warnings about a comment within a comment.
5172 2008-07-25  Robert Millan  <rmh@aybabtu.com>
5174         * util/getroot.c (find_root_device): Skip devices that match
5175         /dev/dm-[0-9].  This lets the real device be found for any type of
5176         abstraction (LVM, EVMS, RAID..).
5177         (grub_guess_root_device): Do not traverse /dev/mapper (for LVM)
5178         and /dev/evms (for EVMS) before traversing /dev.  If a /dev/dm-[0-9]
5179         device is found first, find_root_device() will now skip it.
5181 2008-07-24  Pavel Roskin  <proski@gnu.org>
5183         * include/grub/types.h: Use __builtin_bswap32() and
5184         __builtin_bswap64() with gcc 4.3 and newer.
5186 2008-07-24  Christian Franke  <franke@computer.org>
5188         * util/i386/pc/grub-install.in: If `--debug' is specified,
5189         pass `--verbose' to grub-setup.
5190         Abort script if make_system_path_relative_to_its_root() fails.
5192 2008-07-24  Bean  <bean123ch@gmail.com>
5194         * configure.ac: Fixed a bug caused by the previous cygwin patch,
5195         variable `target_platform' should be `platform'.
5197 2008-07-24  Bean  <bean123ch@gmail.com>
5199         * video/reader/png.c (DEFLATE_HLIT_MAX): Change value.
5200         (grub_png_init_fixed_block): New function.
5201         (grub_png_decode_image_data): Handle fixed huffman code compression.
5203 2008-07-24  Bean  <bean123ch@gmail.com>
5205         * common.rmk (bin_UTILITIES): Add grub-pe2elf.
5206         (grub_pe2elf_SOURCES): New macro.
5207         (CLEANFILES): Add grub-pe2elf.
5209         * include/grub/efi/pe32.h (GRUB_PE32_SCN_ALIGN_1BYTES): New constant.
5210         (GRUB_PE32_SCN_ALIGN_2BYTES): Likewise.
5211         (GRUB_PE32_SCN_ALIGN_4BYTES): Likewise.
5212         (GRUB_PE32_SCN_ALIGN_8BYTES): Likewise.
5213         (GRUB_PE32_SCN_ALIGN_16BYTES): Likewise.
5214         (GRUB_PE32_SCN_ALIGN_32BYTES): Likewise.
5215         (GRUB_PE32_SCN_ALIGN_64BYTES): Likewise.
5216         (GRUB_PE32_SCN_ALIGN_SHIFT): Likewise.
5217         (GRUB_PE32_SCN_ALIGN_MASK): Likewise.
5218         (GRUB_PE32_SYM_CLASS_EXTERNAL): Likewise.
5219         (GRUB_PE32_SYM_CLASS_STATIC): Likewise.
5220         (GRUB_PE32_SYM_CLASS_FILE): Likewise.
5221         (GRUB_PE32_DT_FUNCTION): Likewise.
5222         (GRUB_PE32_REL_I386_DIR32): Likewise.
5223         (GRUB_PE32_REL_I386_REL32): Likewise.
5224         (grub_pe32_symbol): New structure.
5225         (grub_pe32_reloc): Likewise.
5227         * util/grub-pe2elf.c: New file.
5229         * configure.ac: Set TARGET_OBJ2ELF if host os is cygwin. Don't test for
5230         start symbol in non pc platform.
5232         * genmk.rb: Use TARGET_OBJ2ELF to convert native object format to elf.
5234         The following patches are from Christian Franke.
5236         * include/grub/dl.h: Remove .previous, gas supports this only
5237         for ELF format.
5239         * include/grub/symbol.h [__CYGWIN__] (#define FUNCTION/VARIABLE):
5240         Remove .type, gas supports this only for ELF format.
5242         * kern/dl.c (grub_dl_resolve_dependencies): Add check for trailing
5243         nullbytes in symbol table. This fixes an infinite loop if table is
5244         zero filled.
5246         * Makefile.in: Add autoconf replacements TARGET_IMG_LDSCRIPT,
5247         TARGET_IMG_LDFLAGS and EXEEXT.
5249         * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Replace -Wl,-N by
5250         TARGET_IMG_LDFLAGS_AC.
5251         (grub_CHECK_STACK_ARG_PROBE): New function.
5253         * conf/i386-pc.rmk: Replace -Wl,-N by TARGET_IMG_LDFLAGS.
5255         * conf/i386-pc-cygwin-ld-img.sc: New linker script.
5257         * configure.ac: Add check for linker script "conf/${target}-img-ld.c"
5258         to set TARGET_IMG_LD* accordingly.
5259         Add check for Cygwin to set TARGET_MOD_OBJCOPY accordingly.
5260         Add call to grub_CHECK_STACK_ARG_PROBE.
5261         Use TARGET_IMG_LDFLAGS to check start, bss_start, end symbols.
5263         * genkernsyms.sh.in: Handle HAVE_ASM_USCORE case.
5265         * genmk.rb: Add EXEEXT to CLEANFILES.
5267 2008-07-23  Robert Millan  <rmh@aybabtu.com>
5269         * Makefile.in (UNICODE_ARROWS, UNICODE_LINES): New variables (they
5270         define the codes for arrows and lines used for the menu).
5271         (ascii.pff): Generate fonts for $(UNICODE_ARROWS) and $(UNICODE_LINES)
5272         as well.
5274         * util/update-grub_lib.in (font_path): Prefer ascii.pff over complete
5275         fonts, because the latter are too slow.
5277 2008-07-21  Bean  <bean123ch@gmail.com>
5279         * kern/i386/pc/startup.S (gate_a20_try_bios): Change test order for
5280         a20. Run keyboard test last, as it will cause macbook to halt.
5282 2008-07-18  Pavel Roskin  <proski@gnu.org>
5284         * kern/dl.c: Go back to using GRUB_CPU_SIZEOF_VOID_P.  We cannot
5285         load foreign architecture modules correctly anyway.  Keep
5286         support for loading host architecture modules, whether we
5287         compile them or not.
5289 2008-07-17  Pavel Roskin  <proski@gnu.org>
5291         * configure.ac: Use -m32 or -m64 regardless of whether we had to
5292         change target_cpu.  The compiler default can mismatch target_cpu
5293         in any case.
5295         * disk/efi/efidisk.c: Fix format warnings on x86_64.
5296         * kern/efi/efi.c: Likewise.
5298         * aclocal.m4 (grub_PROG_TARGET_CC): New macro.  Check if the
5299         target compiler is functional.
5300         * configure.ac: Call grub_PROG_TARGET_CC once all target flags
5301         are set up.
5303         * configure.ac: Default to efi platform for x86_64-apple.  Allow
5304         powerpc64 CPU, default to ieee1275 platform for it.  Split CPU
5305         adjustments from the rest, only do them if target is not
5306         explicitly given.  Merge other adjustments with the final sanity
5307         check.  Remove an extraneous check for supported CPU.  Be
5308         specific which CPU and which platform is not supported.
5310         * configure.ac: Default to pc platform for x86_64.
5312 2008-07-17  Robert Millan  <rmh@aybabtu.com>
5314         Partial LinuxBIOS -> Coreboot rename.
5316         * conf/i386-linuxbios.rmk: Renamed to ...
5317         * conf/i386-coreboot.rmk: ... this.
5318         * Makefile.in (RMKFILES): s/i386-linuxbios.rmk/i386-coreboot.rmk/g.
5319         * configure.ac: Accept "coreboot" as input platform (but maintain
5320         compatibility with "linuxbios").
5321         * include/grub/i386/linuxbios: Renamed to ...
5322         * include/grub/i386/coreboot: ... this.
5324 2008-07-17  Bean  <bean123ch@gmail.com>
5326         * conf/i386/efi.rmk (pkglib_MODULES): add pci.mod and lspci.mod.
5327         (appleldr_mod_SOURCE): New variable.
5328         (appleldr_mod_CFLAGS): Likewise.
5329         (appleldr_mod_LDFLAGS): Likewise.
5330         (pci_mod_SOURCES): Likewise.
5331         (pci_mod_CFLAGS): Likewise.
5332         (pci_mod_LDFLAGS): Likewise.
5333         (lspci_mod_SOURCES): Likewise.
5334         (lspci_mod_CFLAGS): Likewise.
5335         (lspci_mod_LDFLAGS): Likewise.
5337         * conf/x86_64-efi.rmk: New file.
5339         * disk/efi/efidisk.c (grub_efidisk_read): Wrap efi calls with efi_call_N
5340         macro.
5341         (grub_efidisk_write): Likewise.
5343         * include/efi/api.h (efi_call_0): New macro.
5344         (efi_call_1): Likewise.
5345         (efi_call_2): Likewise.
5346         (efi_call_3): Likewise.
5347         (efi_call_4): Likewise.
5348         (efi_call_5): Likewise.
5349         (efi_call_6): Likewise.
5351         * include/grub/efi/chainloader.h (grub_chainloader_cmd): Rename to
5352         grub_rescue_cmd_chainloader.
5354         * include/grub/efi/pe32.h (GRUB_PE32_MACHINE_X86_64): New macro.
5355         (grub_pe32_optional_header): Change some fields based on i386 or
5356         x86_64 platform.
5357         (GRUB_PE32_PE32_MAGIC): Likewise.
5359         * include/grub/efi/uga_draw.h: New file.
5361         * include/grub/elf.h (STN_ABS): New constant.
5362         (R_X86_64_NONE): Relocation constant for x86_64.
5363         (R_X86_64_64): Likewise.
5364         (R_X86_64_PC32): Likewise.
5365         (R_X86_64_GOT32): Likewise.
5366         (R_X86_64_PLT32): Likewise.
5367         (R_X86_64_COPY): Likewise.
5368         (R_X86_64_GLOB_DAT): Likewise.
5369         (R_X86_64_JUMP_SLOT): Likewise.
5370         (R_X86_64_RELATIVE): Likewise.
5371         (R_X86_64_GOTPCREL): Likewise.
5372         (R_X86_64_32): Likewise.
5373         (R_X86_64_32S): Likewise.
5374         (R_X86_64_16): Likewise.
5375         (R_X86_64_PC16): Likewise.
5376         (R_X86_64_8): Likewise.
5377         (R_X86_64_PC8): Likewise.
5379         * include/grub/i386/efi/pci.h: New file.
5381         * include/grub/i386/linux.h (GRUB_LINUX_EFI_SIGNATURE):
5382         Change it value based on platform.
5383         (GRUB_LINUX_EFI_SIGNATURE_0204): New constant.
5384         (GRUB_E820_RAM): Likewise.
5385         (GRUB_E820_RESERVED): Likewise.
5386         (GRUB_E820_ACPI): Likewise.
5387         (GRUB_E820_NVS): Likewise.
5388         (GRUB_E820_EXEC_CODE): Likewise.
5389         (GRUB_E820_MAX_ENTRY): Likewise.
5390         (grub_e820_mmap): New structure.
5391         (linux_kernel_header): Change the efi field according to different
5392         kernel version, also field from linux_kernel_header.
5394         * include/grub/kernel.h (grub_module_info): Add padding for x86_64.
5396         * include/grub/pci.h (GRUB_PCI_ADDR_SPACE_MASK): New constant.
5397         (GRUB_PCI_ADDR_SPACE_MEMORY): Likewise.
5398         (GRUB_PCI_ADDR_SPACE_IO): Likewise.
5399         (GRUB_PCI_ADDR_MEM_TYPE_MASK): Likewise.
5400         (GRUB_PCI_ADDR_MEM_TYPE_32): Likewise.
5401         (GRUB_PCI_ADDR_MEM_TYPE_1M): Likewise.
5402         (GRUB_PCI_ADDR_MEM_TYPE_64): Likewise.
5403         (GRUB_PCI_ADDR_MEM_PREFETCH): Likewise.
5404         (GRUB_PCI_ADDR_MEM_MASK): Likewise.
5405         (GRUB_PCI_ADDR_IO_MASK): Likewise.
5407         * include/grub/x86_64/efi/kernel.h: New file.
5409         * include/grub/x86_64/efi/loader.h: Likewise.
5411         * include/grub/x86_64/efi/machine.h: Likewise.
5413         * include/grub/x86_64/efi/pci.h: Likewise.
5415         * include/grub/x86_64/efi/time.h: Likewise.
5417         * include/grub/x86_64/linux.h: Likewise.
5419         * include/grub/x86_64/setjmp.h: Likewise.
5421         * include/grub/x86_64/time.h: Likewise.
5423         * include/grub/x86_64/types.h: Likewise.
5425         * kern/dl.c (GRUB_CPU_SIZEOF_VOID_P): Changed to
5426          GRUB_TARGET_SIZEOF_VOID_P.
5428         * kern/efi/efi.c (grub_efi_locate_protocol): Wrap efi calls.
5429         (grub_efi_locate_handle): Likewise.
5430         (grub_efi_open_protocol): Likewise.
5431         (grub_efi_set_text_mode): Likewise.
5432         (grub_efi_stall): Likewise.
5433         (grub_exit): Likewise.
5434         (grub_reboot): Likewise.
5435         (grub_halt): Likewise.
5436         (grub_efi_exit_boot_services): Likewise.
5437         (grub_get_rtc): Likewise.
5439         * kern/efi/mm.c (MEMORY_MAP_SIZE): Change to 0x3000 for new models.
5440         (GRUB_CPU_SIZEOF_VOID_P): Changed to GRUB_TARGET_SIZEOF_VOID_P.
5441         (grub_efi_allocate_pages): Wrap efi calls.
5442         (grub_efi_free_pages): Wrap efi calls.
5443         (grub_efi_get_memory_map): Wrap efi calls.
5445         * kern/x86_64/dl.c: New file.
5447         * kern/x86_64/efi/callwrap.S: Likewise.
5449         * kern/x86_64/efi/startup.S: Likewise.
5451         * loader/efi/appleloader.c: Likewise.
5453         * loader/efi/chainloader.c (cmdline): New variable.
5454         (grub_chainloader_unload): Wrap efi calls.
5455         (grub_chainloader_boot): Likewise.
5456         (grub_rescue_cmd_chainloader): Wrap efi calls, handle
5457         command line.
5459         * loader/efi/chainloader_normal.c (chainloader_command):
5460         Change grub_chainloader_cmd to grub_rescue_cmd_chainloader, pass
5461         command line.
5463         * loader/i386/efi/linux.c (allocate_pages): Change allocation
5464         method.
5465         (grub_e820_add_region): New function.
5466         (grub_linux_boot): Construct e820 map from efi map, handle x86_64
5467         booting.
5468         (grub_find_video_card): New function.
5469         (grub_linux_setup_video): New function.
5470         (grub_rescue_cmd_linux): Probe for video information.
5472         * normal/x86_64/setjmp.S: New file.
5474         * term/efi/console.c (map_char): New function.
5475         (grub_console_putchar): Map unicode char.
5476         (grub_console_checkkey): Wrap efi calls.
5477         (grub_console_getkey): Likewise.
5478         (grub_console_getwh): Likewise.
5479         (grub_console_gotoxy): Likewise.
5480         (grub_console_cls): Likewise.
5481         (grub_console_setcolorstate): Likewise.
5482         (grub_console_setcursor): Likewise.
5484         * util/i386/efi/grub-mkimage.c: Add support for x86_64.
5486 2008-07-16  Pavel Roskin  <proski@gnu.org>
5488         * loader/i386/efi/linux.c (allocate_pages): Fix warnings in
5489         format strings.
5491         * util/i386/efi/grub-mkimage.c (get_target_address): Return a
5492         pointer, not an integer.  This fixes a warning and prevents
5493         precision loss on 64-bit systems.
5494         (relocate_addresses): Remove unneeded cast.
5496 2008-07-15  Pavel Roskin  <proski@gnu.org>
5498         * kern/i386/ieee1275/init.c: Include grub/cache.h.
5500         * term/ieee1275/ofconsole.c: Disable code unused on i386.
5502         * kern/ieee1275/ieee1275.c (grub_ieee1275_get_integer_property):
5503         Fix comparison between signed and unsigned.
5505         * include/grub/i386/ieee1275/console.h: Declare
5506         grub_console_init() and grub_console_fini().
5508         * loader/i386/ieee1275/linux.c (grub_set_bootpath): Remove.
5509         It's empty and unused.
5511         * fs/ext2.c (grub_ext2_read_block): Initialize blknr in the
5512         beginning to avoid warnings with some compilers.
5514         * loader/ieee1275/multiboot2.c: Include grub/machine/loader.h.
5515         [__i386__] (grub_mb2_arch_boot): Avoid unnecessary cast.
5517 2008-07-14  Pavel Roskin  <proski@gnu.org>
5519         * kern/env.c (grub_register_variable_hook): Don't copy empty
5520         string, it leaks memory.  Pass "" to grub_env_set(), it should
5521         handle constant strings.
5523         * commands/blocklist.c (grub_cmd_blocklist): Fix format warning.
5524         * commands/cmp.c (grub_cmd_cmp): Likewise.
5525         * kern/dl.c (grub_dl_flush_cache): Likewise.
5526         (grub_dl_load_core): Likewise.
5527         * kern/elf.c (grub_elf32_load_phdrs): Likewise.
5528         (grub_elf64_load_phdrs): Likewise.
5530 2008-07-13  Pavel Roskin  <proski@gnu.org>
5532         * lib/LzmaEnc.c (LzmaEnc_SetProps): Fix warning about comparison
5533         between signed and unsigned.
5534         (LzmaEnc_Finish): Fix warning about an unused parameter.
5536 2008-07-13  Bean  <bean123ch@gmail.com>
5538         * Makefile.in (enable_lzo): New rule.
5540         * conf/i386-pc.rmk (grub_mkimage_SOURCES): New test with enable_lzo.
5542         * configure.ac (ENABLE_LZO): New option --enable-lzo.
5544         * boot/i386/pc/lnxboot.S: #include <config.h>.
5546         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE): Change
5547         its value according to the compression algorithm used, lzo or lzma.
5549         * util/i386/pc/grub-mkimage.c (compress_kernel): Use different
5550         compression algorithm according to configure macro.
5552         * kern/i386/pc/startup.S (codestart): Likewise.
5554         * kern/i386/pc/lzma_decode.S: New file.
5556         * include/grub/lib/LzFind.h: Likewise.
5558         * include/grub/lib/LzHash.h: Likewise.
5560         * include/grub/lib/LzmaDec.h: Likewise.
5562         * include/grub/lib/LzmaEnc.h: Likewise.
5564         * include/grub/lib/LzmaTypes.h: Likewise.
5566         * lib/LzFind.c: Likewise.
5568         * lib/LzmaDec.c: Likewise.
5570         * lib/LzmaEnc.c: Likewise.
5572 2008-07-13  Bean  <bean123ch@gmail.com>
5574         * fs/ext2.c (EXT4_EXTENTS_FLAG): New macro.
5575         (grub_ext4_extent_header): New structure.
5576         (grub_ext4_extent): Likewise.
5577         (grub_ext4_extent_idx): Likewise.
5578         (grub_ext4_find_leaf): New function.
5579         (grub_ext2_read_block): Handle extents.
5581 2008-07-12  Robert Millan  <rmh@aybabtu.com>
5583         * util/i386/pc/grub-mkrescue.in: s/grub-install/grub-mkrescue/g.
5585 2008-07-11  Robert Millan  <rmh@aybabtu.com>
5587         * util/grub.d/40_custom.in: New file. Example on how to add custom
5588         entries to /etc/grub.d.
5589         * conf/common.rmk (%, update-grub_SCRIPTS, CLEANFILES): Install
5590         40_custom (implicitly, by merging all the grub.d rules).
5592 2008-07-11  Pavel Roskin  <proski@gnu.org>
5594         * commands/read.c (grub_getline): Fix invalid memory access.
5595         Don't add newline to the variable value.
5597         * term/i386/pc/serial.c (GRUB_SERIAL_PORT_NUM): New constant.
5598         [!GRUB_MACHINE_PCBIOS] (serial_hw_io_addr): Add COM2 and COM3.
5599         (serial_hw_get_port): Check validity of the port number.
5600         (grub_cmd_serial): Check return value of serial_hw_get_port().
5602 2008-07-07  Pavel Roskin  <proski@gnu.org>
5604         * boot/i386/pc/diskboot.S (notification_string): Replace
5605         "Loading kernel" with just "loading".  This is shorter, less
5606         confusing and saves a few bytes for possible future changes.
5608 2008-07-05  Pavel Roskin  <proski@gnu.org>
5610         * disk/ata.c (grub_ata_dumpinfo): Don't output addressing and
5611         size for ATAPI devices, they are undefined.  Output sector
5612         number in decimal form.
5614         * disk/ata.c: Use named constants for status bits.
5616 2008-07-04  Pavel Roskin  <proski@gnu.org>
5618         * kern/i386/linuxbios/init.c (grub_machine_init): Cast addr to
5619         grub_addr_t before casting it to the void pointer to fix a
5620         warning.  Non-addressable regions are discarded earlier.
5621         (grub_arch_modules_addr): Cast _end to grub_addr_t.
5622         * kern/i386/linuxbios/table.c: Include grub/misc.h.
5623         (check_signature): Don't shadow table_header.
5624         (grub_linuxbios_table_iterate): Cast numeric constants to
5625         grub_linuxbios_table_header_t.
5626         * include/grub/i386/linuxbios/init.h: Add noreturn attribute to
5627         grub_stop().
5629         * kern/ieee1275/init.c: Cast _start and _end to grub_addr_t to
5630         prevent warnings.
5632         * include/grub/misc.h (ALIGN_UP): Avoid unnecessary cast to a
5633         pointer, which can cause warnings.  Support 64-bit addresses.
5635         * util/elf/grub-mkimage.c: Use GRUB_TARGET_SIZEOF_LONG instead
5636         of sizeof(long).  This fixes PowerPC image generation on x86_64.
5638 2008-07-04  Robert Millan  <rmh@aybabtu.com>
5640         This fixes a performance issue when pc & gpt partmap iterators
5641         didn't abort iteration even after our hook found what it was
5642         looking for (often causing expensive probes of non-existent drives).
5644         Some callers relied on previous buggy behaviour, since they would
5645         raise an error when their own hooks caused early abortion of its
5646         iteration.
5648         * kern/device.c (grub_device_open): Improve error message.
5649         * disk/lvm.c (grub_lvm_open): Likewise.
5650         * disk/raid.c (grub_raid_open): Likewise.
5652         * partmap/pc.c (pc_partition_map_iterate): Abort parent iteration
5653         when hook requests it, independently of grub_errno.
5654         (pc_partition_map_probe): Do not fail when find_func() caused
5655         early abortion of pc_partition_map_iterate().
5657         * partmap/gpt.c (gpt_partition_map_iterate): Abort parent iteration
5658         when hook requests it, independently of grub_errno.
5659         (gpt_partition_map_probe): Do not fail when find_func() caused
5660         early abortion of gpt_partition_map_iterate().
5662         * kern/partition.c (grub_partition_iterate): Abort parent iteration
5663         when hook requests it, independently of grub_errno.  Do not fail when
5664         part_map_iterate_hook() caused early abortion of p->iterate().
5666         * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Do not fail
5667         when grub_partition_iterate() returned with non-zero.
5669 2008-07-03  Pavel Roskin  <proski@gnu.org>
5671         * disk/ata.c (grub_ata_pio_write): Check status before writing,
5672         like we do in grub_ata_pio_read().
5673         (grub_ata_readwrite): Always write individual sectors.  Fix the
5674         sector count for the remainder.
5675         (grub_ata_write): Enable writing to ATA devices.  Correctly
5676         report error for ATAPI devices.
5678 2008-07-02  Pavel Roskin  <proski@gnu.org>
5680         * boot/i386/pc/cdboot.S: Add _start entry to fix a linker
5681         warning.
5683         * disk/ata.c (grub_ata_readwrite): Don't increment sector number
5684         for every read sector, we already increment it for the whole
5685         batch.  This fixes reading more than 256 sectors at once.
5687         * util/grub-editenv.c (cmd_info): Cast argument to long
5688         explicitly.  ptrdiff_t reduces to int on i386.
5690         * util/grub-editenv.c (main): Be specific which parameter is
5691         missing.
5693         * disk/memdisk.c (memdisk_addr): Make a pointer to fix warnings.
5694         (memdisk): Make memdisk_orig_addr a pointer.
5696         * fs/reiserfs.c (grub_reiserfs_read): Fix misuse of grub_size_t
5697         for file offsets, use grub_off_t instead.  Fix printf format
5698         warnings.
5700         * fs/reiserfs.c: Remove #warning, TODO list items don't belong
5701         there.  Real unexpected warnings should not drown in the noise
5702         about known problems.
5704         * commands/hexdump.c (grub_cmd_hexdump): Fix misuse of
5705         grub_disk_addr_t for memory addresses.
5707         * loader/aout.c (grub_aout_load): Cast load_addr to pointer
5708         explicitly to fix a warning.
5710         * util/grub-editenv.c (cmd_info): Fix warning in printf format.
5712         * Makefile.in (MODULE_LDFLAGS): New variable.
5713         * aclocal.m4 (grub_PROG_LD_BUILD_ID_NONE): New macro.  Check if
5714         the linker accepts --build-id=none.
5715         * configure.ac: Call grub_PROG_LD_BUILD_ID_NONE.  Substitute
5716         MODULE_LDFLAGS.
5717         * genmk.rb: Use MODULE_LDFLAGS when linking modules.
5719         * fs/xfs.c (struct grub_xfs_dir_header): Use names similar to
5720         those in Linux XFS code.  Provide a way to access 64-bit parent
5721         inode.
5722         (grub_xfs_iterate_dir): Use the new names.  Avoid reading past
5723         the end of struct grub_xfs_dir_header.
5725 2008-07-02  Bean  <bean123ch@gmail.com>
5727         * include/grub/ieee1275.h (grub_ieee1275_flag): New constant
5728         GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
5729         and GRUB_IEEE1275_FLAG_NO_ANSI.
5731         * kern/ieee1275/cmain.c (grub_ieee1275_find_options): Set flag
5732         GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
5733         and GRUB_IEEE1275_FLAG_NO_ANSI for Open Hackware.
5735         * kern/ieee1275/ieee1275.c (grub_ieee1275_interpret): Return
5736         immediately if GRUB_IEEE1275_FLAG_CANNOT_INTERPRET is set.
5738         * kern/ieee1275/init.c (grub_claim_heap): Claim memory directly if
5739         GRUB_IEEE1275_FLAG_FORCE_CLAIM is set.
5741         * term/ieee1275/ofconsole.c (grub_ofconsole_writeesc): Don't output
5742         esc sequence on non ANSI terminal.
5743         (grub_ofconsole_gotoxy): Emulate backspace key on non ANSI terminal.
5745         * util/elf/grub-mkimage.c (add_segments): Move ELF header to the
5746         beginning of file.
5748 2008-07-02  Bean  <bean123ch@gmail.com>
5750         * conf/common.rmk (bin_UTILITIES): Add grub-editenv.
5751         (grub_editenv_SOURCES): New variable.
5752         (pkglib_MODULES): Add loadenv.mod.
5753         (loadenv_mod_SOURCES): New variable.
5754         (loadenv_mod_CFLAGS): Likewise.
5755         (loadenv_mod_LDFLAGS): Likewise.
5757         * include/grub/envblk.h: New file.
5759         * util/envblk.c: New file.
5761         * util/grub-editenv.c: New file.
5763         * commands/loadenv.c: New file.
5765 2008-07-01  Pavel Roskin  <proski@gnu.org>
5767         * include/multiboot2.h (struct multiboot_tag_module): Use char,
5768         not unsigned char.  This fixes warnings and is consistent with
5769         other tags.
5771         * disk/fs_uuid.c (search_fs_uuid): Correctly increment count.
5773         * normal/parser.y: Define YYENABLE_NLS as 0 to fix warnings.
5775         * term/tparm.c (analyze): Always set *popcount.
5777         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Remove useless
5778         cast to fix a warning.
5780         * loader/i386/pc/multiboot2.c (grub_mb2_arch_module_alloc): Use
5781         cast to suppress a warning.
5783         * fs/afs.c (grub_afs_read_block): Return grub_disk_addr_t, as
5784         grub_fshelp_read_file() expects.
5786         * fs/fat.c: Fix UUID calculation on big-endian systems.  We
5787         write uuid as a 32-bit value in CPU byte order, so declare and
5788         use it as such.
5790         * disk/raid.c: Cast grub_dprintf() arguments to unsigned long
5791         long if the format specifier expects it.
5792         * partmap/gpt.c (gpt_partition_map_iterate): Likewise.
5793         * partmap/pc.c (pc_partition_map_iterate): Likewise.
5794         * fs/ntfs.c (grub_ntfs_uuid): Cast data->uuid to unsigned long
5795         long to fix a warning.
5796         * fs/reiserfs.c (grub_reiserfs_read): Change casts in
5797         grub_dprintf() arguments to fix warnings.
5799 2008-06-30  Pavel Roskin  <proski@gnu.org>
5801         * util/i386/pc/grub-setup.c (setup): Write install_dos_part and
5802         install_bsd_part immediately before core.img is embedded or
5803         modified on disk.  This fixes core.img verification if core.img
5804         cannot be embedded.
5806         * util/i386/pc/grub-setup.c (setup): Use core_path_dev, not
5807         core_path to calculate the blocklist.
5808         Patch from Javier Martín <lordhabbit@gmail.com>
5810 2008-06-29  Robert Millan  <rmh@aybabtu.com>
5812         * fs/xfs.c (GRUB_XFS_FSB_TO_BLOCK): New macro.  Maps filesystem
5813         block to disk block.
5814         (grub_xfs_read_block): Use GRUB_XFS_FSB_TO_BLOCK() on result.
5815         Patch from Niels Böhm <bitbucket@arcor.de>
5817 2008-06-29  Robert Millan  <rmh@aybabtu.com>
5819         * util/update-grub_lib.in (font_path): Search for fonts in
5820         /boot/grub first, which is more likely to be readable (we aren't
5821         deciding where fonts live, just looking for them).
5823 2008-06-26  Pavel Roskin  <proski@gnu.org>
5825         * util/biosdisk.c (read_device_map): Don't leave dead map
5826         entries for devices failing stat() check.
5828         * util/i386/pc/grub-setup.c (setup): Don't reuse core_path, use
5829         core_path_dev for the core.img path on the target device.
5831 2008-06-26  Robert Millan  <rmh@aybabtu.com>
5833         * disk/fs_uuid.c: New file.
5834         * conf/common.rmk (pkglib_MODULES): Add `fs_uuid.mod'.
5835         (fs_uuid_mod_SOURCES, fs_uuid_mod_CFLAGS)
5836         (fs_uuid_mod_LDFLAGS): New variables.
5837         * include/grub/disk.h (grub_disk_dev_id): Add
5838         `GRUB_DISK_DEVICE_UUID_ID'.
5839         * kern/disk.c (grub_disk_dev_iterate): Allow disk devices not to
5840         implement iterate().
5842 2008-06-26  Robert Millan  <rmh@aybabtu.com>
5844         * util/grub.d/10_linux.in: Avoid passing UUIDs to Linux when either
5845         "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" does not exist, or when a
5846         Linux image includes no initrd.
5848 2008-06-21  Javier Martín  <lordhabbit@gmail.com>
5850         * util/i386/pc/grub-setup.c (setup): Remove literal "core.img" in a
5851         call to resolve the core image location that effectively appended the
5852         name twice.
5854 2008-06-21  Robert Millan  <rmh@aybabtu.com>
5856         * util/grub.d/00_header.in: Move last prepare_grub_to_access_device()
5857         call from here ...
5859         * util/grub.d/10_hurd.in: ... to here ...
5860         * util/grub.d/10_linux.in: ... and here.
5862 2008-06-19  Robert Millan  <rmh@aybabtu.com>
5864         * kern/main.c (grub_main): Export `prefix' variable immediately
5865         after it has been set by grub_machine_set_prefix().
5867 2008-06-19  Robert Millan  <rmh@aybabtu.com>
5869         * commands/search.c (search_label, search_fs_uuid, search_file): Print
5870         search result when not saving to variable, not the other way around.
5871         When saving to variable, abort iteration as soon as a match is found.
5873 2008-06-19  Robert Millan  <rmh@aybabtu.com>
5875         * util/update-grub_lib.in (prepare_grub_to_access_device): Remove
5876         check for partition that provides /boot/grub.  Its logic is flawed,
5877         as it prevents prepare_grub_to_access_device() from being called
5878         multiple times.
5880 2008-06-19  Robert Millan  <rmh@aybabtu.com>
5882         * util/update-grub_lib.in (prepare_grub_to_access_device): Issue
5883         "insmod" command directly when abstraction modules are needed,
5884         instead of relying on GRUB_PRELOAD_MODULES (which had no effect
5885         since it had already been processed).
5887 2008-06-19  Pavel Roskin  <proski@gnu.org>
5889         * conf/i386-efi.rmk: Recompile grub-mkimage.c if Makefile has
5890         changed.  This is needed in case GRUB_LIBDIR changes.
5891         * conf/i386-ieee1275.rmk: Likewise.
5892         * conf/i386-linuxbios.rmk: Likewise.
5893         * conf/i386-pc.rmk: Likewise.
5894         * conf/powerpc-ieee1275.rmk: Likewise.
5896 2008-06-18  Pavel Roskin  <proski@gnu.org>
5898         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Rename
5899         kernel_elf_symlist.c to symlist.c for consistency with other
5900         architectures.  Update all users.
5901         * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
5903 2008-06-18  Robert Millan  <rmh@aybabtu.com>
5905         * util/i386/pc/grub-install.in: If the drive is LVM or RAID, prepend
5906         it in prefix.
5908         * util/i386/pc/grub-setup.c (main): Don't handle prefix at all.  Set
5909         `must_embed' to 1 when root_dev is a RAID device.  When dest_dev is
5910         a RAID device, run setup() for all members independently on whether
5911         LVM abstraction is being used.
5912         (setup): Don't handle prefix at all; let grub-mkimage take care of it.
5913         If grub-mkimage has set `*install_dos_part == -2', don't override this
5914         value.
5915         Perform *install_dos_part adjustments independently on whether
5916         we're embedding or not.
5917         Clarify error message when image is too big for embedding.
5918         Remove duplicate *install_dos_part stanza.
5920 2008-06-17  Robert Millan  <rmh@aybabtu.com>
5922         * term/ieee1275/ofconsole.c (fgcolor, bgcolor): Remove variables.
5923         (grub_ofconsole_normal_color, grub_ofconsole_highlight_color): New
5924         variables.
5925         (grub_ofconsole_setcolor, grub_ofconsole_getcolor): Load/store
5926         values in grub_ofconsole_normal_color and
5927         grub_ofconsole_highlight_color (they're not directly related to
5928         background and foreground).
5929         (grub_ofconsole_setcolorstate): Extract background and foreground
5930         from grub_ofconsole_normal_color and grub_ofconsole_highlight_color.
5932 2008-06-17  Robert Millan  <rmh@aybabtu.com>
5934         * util/update-grub_lib.in (prepare_grub_to_access_device): Use
5935         /boot/grub for the check in last commit, not /boot (they could be
5936         different partitions).
5938 2008-06-16  Robert Millan  <rmh@aybabtu.com>
5940         * util/update-grub_lib.in (prepare_grub_to_access_device): If we were
5941         asked to setup access for the same partition that provides /boot,
5942         don't bother using UUIDs since our root already has the value we
5943         want.
5945 2008-06-16  Robert Millan  <rmh@aybabtu.com>
5947         * util/biosdisk.c (convert_system_partition_to_system_disk): Detect
5948         I2O devices.
5949         Patch from Sven Mueller <sven@debian.org>.
5951 2008-06-16  Robert Millan  <rmh@aybabtu.com>
5953         * util/update-grub.in: Check for $EUID instead of $UID.
5954         Reported by Vincent Zweije.
5956 2008-06-16  Bean  <bean123ch@gmail.com>
5958         * fs/ext2.c (grub_ext2_blockgroup): Revert to pre-journal state.
5959         (grub_ext2_read_block): Likewise.
5960         (grub_ext2_read_inode): Likewise.
5961         (grub_ext2_mount): Likewise.
5962         (grub_ext2_close): Likewise.
5963         (grub_ext3_get_journal): Removed.
5965         * fs/reiserfs.c (grub_reiserfs_get_item): Revert to pre-journal state.
5966         (grub_reiserfs_read_symlink): Likewise.
5967         (grub_reiserfs_mount): Likewise.
5968         (grub_reiserfs_open): Likewise.
5969         (grub_reiserfs_read): Likewise.
5970         (grub_reiserfs_close): Likewise.
5971         (grub_reiserfs_get_journal): Removed.
5973         * fs/fshelp.c (grub_fshelp_read): Removed.
5974         (grub_fshelp_map_block): Likewise.
5976         * include/grub/fshelp.h (grub_fshelp_journal_type): Removed.
5977         (grub_fshelp_journal): Likewise.
5978         (grub_fshelp_read): Likewise.
5979         (grub_fshelp_map_block): Likewise.
5981 2008-06-16  Pavel Roskin  <proski@gnu.org>
5983         * conf/powerpc-ieee1275.rmk: Remove -msoft-float, we don't use
5984         floating point anymore.
5985         * include/grub/powerpc/libgcc.h: Leave only necessary exports.
5987 2008-06-15  Pavel Roskin  <proski@gnu.org>
5989         * commands/ls.c (grub_ls_list_files): Use integer calculations
5990         for human readable format, avoid floating point use.
5991         * kern/misc.c (grub_ftoa): Remove.
5992         (grub_vsprintf): Remove floating point support.
5994 2008-06-15  Robert Millan  <rmh@aybabtu.com>
5996         * util/grub.d/10_linux.in: Use the underlying device for loop-AES
5997         devices.
5998         Reported by Max Vozeler.
6000 2008-06-15  Robert Millan  <rmh@aybabtu.com>
6002         * util/i386/pc/grub-mkimage.c (generate_image): If we included a drive
6003         in our prefix, set install_{dos,bsd}_part = -2 to indicate this can be
6004         skipped later.
6005         (main): If a memdisk was requested, add "(memdisk)" drive explicitly to
6006         the beginning of the prefix.
6008         * kern/i386/pc/init.c (make_install_device): Remove memdisk check.
6009         It is assumed that if we have a memdisk, grub-mkimage has set
6010         grub_prefix to include the "(memdisk)" drive in it.
6012 2008-06-15  Robert Millan  <rmh@aybabtu.com>
6014         * term/i386/pc/console.c [GRUB_MACHINE_LINUXBIOS] (grub_console_init):
6015         Initialize keyboard controller after registering the terminal, so that
6016         grub_printf() can be called from grub_keyboard_controller_init().
6018 2008-06-15  Robert Millan  <rmh@aybabtu.com>
6020         * fs/sfs.c (grub_sfs_read_extent): Fix the count of nodes in
6021         extent-btree which is written as big endian on disk.
6022         Reported by Alain Greppin  <al@chilibi.org>.
6024 2008-06-14  Robert Millan  <rmh@aybabtu.com>
6026         * util/i386/efi/grub-install.in (modules): Remove `_chain'.
6027         * util/i386/pc/grub-install.in (modules): Likewise.
6029 2008-06-13  Pavel Roskin  <proski@gnu.org>
6031         * commands/ls.c (grub_ls_list_files): Fix format warnings.
6033 2008-06-13  Bean  <bean123ch@gmail.com>
6035         * commands/hexdump.c (grub_cmd_hexdump): Adjust offset for partition.
6037         * fs/ext2.c (grub_ext3_get_journal): Fix revoke block handling.
6039         * fs/fshelp.c (grub_fshelp_map_block): Don't map block 0 as it's used
6040         to indicate sparse block.
6042 2008-06-12  Pavel Roskin  <proski@gnu.org>
6044         * fs/ext2.c (grub_ext2_read_inode): Don't normalize block
6045         number, grub_fshelp_read() does it for us.
6047         * fs/fshelp.c (grub_fshelp_read): New function.  Implement
6048         linear disk read with journal translation.
6049         * fs/ext2.c: Use grub_fshelp_read() instead of grub_disk_read().
6050         * include/grub/fshelp.h: Declare grub_fshelp_read().
6052 2008-06-09  Pavel Roskin  <proski@gnu.org>
6054         * fs/minix.c (grub_minix_mount): Handle error reading
6055         superblock.
6057 2008-06-08  Robert Millan  <rmh@aybabtu.com>
6059         * util/i386/pc/grub-setup.c (main): If install drive is an LVM,
6060         don't append the RAID prefix afterwards.
6061         Reported by Clint Adams.
6063 2008-06-08  Robert Millan  <rmh@aybabtu.com>
6065         Based on description from Pavel:
6066         * kern/disk.c (grub_disk_check_range): Rename to ...
6067         (grub_disk_adjust_range): ... this.  Add a comment explaining the
6068         tasks performed by this function.
6070 2008-06-08  Robert Millan  <rmh@aybabtu.com>
6072         * include/grub/ntfs.h (struct grub_ntfs_bpb): Rename `serial_number' to
6073         `num_serial' (for consistency with other variables).
6074         (struct grub_ntfs_data): Add `uuid' member.
6075         * fs/ntfs.c (grub_ntfs_mount): Initialize `data->uuid'.
6076         (grub_ntfs_uuid): New function.
6077         (grub_ntfs_fs): Reference grub_ntfs_uuid() in `uuid' struct member.
6079 2008-06-07  Pavel Roskin  <proski@gnu.org>
6081         * util/biosdisk.c (open_device): Revert last change to the
6082         function, it broke installation.  The sector needs to be
6083         different dependent on which device is opened.
6085 2008-06-06  Robert Millan  <rmh@aybabtu.com>
6087         Ensure GRUB_KERNEL_MACHINE_DATA_END is always consistent with the
6088         rest of GRUB, and breakage doesn't happen if its value were modified.
6090         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
6091         Redefine as an offset from `GRUB_KERNEL_MACHINE_DATA_END' instead of
6092         a constant (same value).
6093         * kern/i386/pc/startup.S: Replace hardcoded `0x50' with
6094         `GRUB_KERNEL_MACHINE_DATA_END' (same value).
6096 2008-06-06  Robert Millan  <rmh@aybabtu.com>
6098         * util/biosdisk.c (open_device): Do not modify sector offset when
6099         accessing a partition.  kern/disk.c already handles this for us.
6101 2008-06-06  Robert Millan  <rmh@aybabtu.com>
6103         * util/grub-emu.c (grub_machine_init): Move code in this function from
6104         here ...
6105         (main): ... to here (before grub_util_biosdisk_init() call, to prevent
6106         segfault in case grub_printf() is called).
6108         * util/i386/pc/grub-install.in: Append `--device-map=${device_map}' to
6109         grub_probe.  Update all users not to explicitly add it again.
6110         (grub_device): New variable; contains corresponding device for grubdir.
6111         (fs_module, partmap_module, devabstraction_module): Pass
6112         `--device ${grub_device}' to grub_probe to avoid traversing /dev
6113         every time.
6115 2008-06-05  Robert Millan  <rmh@aybabtu.com>
6117         * normal/misc.c (grub_normal_print_device_info): When a filesystem UUID
6118         is found, print it (same layout as with labels).
6120 2008-06-04  Robert Millan  <rmh@aybabtu.com>
6122         * util/biosdisk.c (get_drive): Rename to ...
6123         (find_grub_drive): ... this.  Update all users.
6125         (get_os_disk): Rename to ...
6126         (convert_system_partition_to_system_disk): ... this.  Update all users.
6128         (find_drive): Rename to ...
6129         (find_system_device): ... this.  Update all users.
6131 2008-06-04  Robert Millan  <rmh@aybabtu.com>
6133         * util/biosdisk.c (get_os_disk): Handle IDA devices.
6134         * util/grub-mkdevicemap.c (get_mmc_disk_name)
6135         (make_device_map): Likewise.
6137 2008-06-01  Robert Millan  <rmh@aybabtu.com>
6139         *  util/biosdisk.c (get_drive): Verify that `map[i].drive' is non-NULL
6140         before dereferencing it.
6142         * fs/fat.c (struct grub_fat_bpb): Move fat32-specific fields into a
6143         union with fat12/fat16-specific ones.  Add some new fields, including
6144         `num_serial' for both versions.
6145         (struct grub_fat_data): Add `uuid' member.
6146         (grub_fat_mount): Refer to fat32-specific fields in `bpb' by their new
6147         names.  Initialize `data->uuid' using `num_serial'.
6148         (grub_fat_uuid): New function.
6149         (grub_fat_fs): Reference grub_fat_uuid() in `uuid' struct member.
6151         * fs/reiserfs.c (grub_reiserfs_superblock): Add `uuid' field.
6152         (grub_reiserfs_uuid): New function.
6153         (grub_reiserfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct
6154         member.
6156         * fs/xfs.c (grub_xfs_sblock): Add `uuid' field.
6157         (grub_xfs_uuid): New function.
6158         (grub_xfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct member.
6160 2008-06-01  Robert Millan  <rmh@aybabtu.com>
6162         * util/update-grub_lib.in (prepare_grub_to_access_device): Generate
6163         code that is backward compatible with pre-uuid search command.
6165 2008-05-31  Robert Millan  <rmh@aybabtu.com>
6167         * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Iterate through
6168         floppies after everything else, to ensure floppy drive isn't accessed
6169         unnecessarily (patch from Bean).
6171 2008-05-31  Robert Millan  <rmh@aybabtu.com>
6173         * commands/search.c (search_label, search_fs_uuid, search_file): Do
6174         not print device names when we were asked to set a variable.
6176 2008-05-31  Robert Millan  <rmh@aybabtu.com>
6178         * term/ieee1275/ofconsole.c (grub_ofconsole_setcursor): Implement
6179         using "cursor-on" and "cursor-off" commands (understood at least by
6180         the Open Firmware flavour on OLPC).
6182 2008-05-31  Michael Gorven  <michael@gorven.za.net>
6184         * term/terminfo.c (grub_terminfo_set_current): Correct vt100 cursor
6185         on and off sequences.
6187 2008-05-31  Robert Millan  <rmh@aybabtu.com>
6189         * util/update-grub_lib.in: Replace `grub-probe' with `${grub_probe}'.
6190         * util/update-grub.in: Likewise.
6192 2008-05-30  Pavel Roskin  <proski@gnu.org>
6194         * util/biosdisk.c (linux_find_partition): Simplify logic and
6195         make the code more universal.  Keep special processing for
6196         devfs, but use a simple rule for all other devices.  If the
6197         device ends with a number, append 'p' and the partition number.
6198         Otherwise, append only the partition number.
6200 2008-05-30  Robert Millan  <rmh@aybabtu.com>
6202         * util/update-grub.in (GRUB_DISABLE_LINUX_UUID): Export variable.
6203         * util/grub.d/10_linux.in: If GRUB_DEVICE_UUID is set, and
6204         GRUB_DISABLE_LINUX_UUID isn't true, use the filesystem UUIDs as
6205         the `root' parameter to Linux.
6207 2008-05-30  Robert Millan  <rmh@aybabtu.com>
6209         * commands/search.c (options): Rename --fs_uuid to --fs-uuid.
6210         * util/update-grub_lib.in (prepare_grub_to_access_device): Replace
6211         --fs_uuid with --fs-uuid.
6212         * util/update-grub.in: Allow filesystem UUID probes to fail (since not
6213         all filesystems support them).
6215 2008-05-30  Robert Millan  <rmh@aybabtu.com>
6217         * fs/ext2.c (grub_ext2_uuid): Use `04x' instead of '02x' as
6218         grub_printf() flags, since we're printing in units of 2 bytes.
6220 2008-05-30  Robert Millan  <rmh@aybabtu.com>
6222         * util/grub.d/00_header.in: Remove obsolete comment referencing
6223         convert_system_path_to_grub_path().
6224         * util/update-grub.in: Likewise.
6225         * util/update-grub_lib.in (is_path_readable_by_grub): New function.
6226         (convert_system_path_to_grub_path): Add a warning message explaining
6227         that this function is deprecated.  Rely on is_path_readable_by_grub()
6228         for the readability checks.
6229         (font_path): Use is_path_readable_by_grub() for the readability
6230         check rather than convert_system_path_to_grub_path().
6232 2008-05-30  Robert Millan  <rmh@aybabtu.com>
6234         * util/update-grub_lib.in (prepare_grub_to_access_device): New function.
6235         * util/update-grub.in: Set `GRUB_FONT_PATH' to the system path, without
6236         converting it first.
6237         * util/grub.d/00_header.in: Use prepare_grub_to_access_device() to setup
6238         grub.cfg for access to font file, and afterwards call it again to set
6239         the root device.
6241 2008-05-30  Robert Millan  <rmh@aybabtu.com>
6243         * commands/search.c (options): Add --fs_uuid option.
6244         (search_fs_uuid): New function.
6245         (grub_cmd_search): Fix --set argument passing.
6246         Use search_fs_uuid() when requested via --fs_uuid.
6247         (grub_search_init): Update help message.
6248         * fs/ext2.c (struct grub_ext2_sblock): Rename `unique_id' to `uuid'
6249         and redeclare it as an array of 16-bit words.
6250         (grub_ext2_uuid): New function.
6251         (grub_ext2_fs): Reference grub_ext2_uuid() in `uuid' struct member.
6252         * include/grub/fs.h (struct grub_fs): Add `uuid' struct member.
6253         * util/update-grub.in (GRUB_DEVICE_UUID, GRUB_DEVICE_BOOT)
6254         (GRUB_DEVICE_BOOT_UUID): New variables.
6255         (GRUB_DRIVE. GRUB_DRIVE_BOOT. GRUB_DRIVE_BOOT_GRUB): Remove.
6256         * util/grub.d/00_header.in: Set root using `search --fs_uuid' command
6257         whenever possible.
6258         * util/grub.d/10_hurd.in: Avoid explicit use of root drive.  Instead,
6259         just assume `root' variable has the right value.
6260         * util/grub.d/10_linux.in: Likewise.
6261         * util/grub-probe.c (probe): Probe for filesystem UUID when requested
6262         via PRINT_FS_UUID.
6263         (main): Recognise `-t fs_uuid' argument.
6265 2008-05-30  Robert Millan  <rmh@aybabtu.com>
6267         * util/biosdisk.c (map): Redefine structure to hold information
6268         about GRUB drive name.
6269         (get_drive): Reimplement without assuming (and verifying) BIOS-like
6270         drive names.
6271         (call_hook): Remove.
6272         (grub_util_biosdisk_iterate): Access drive names via `.drive' struct
6273         member.  Assume drive has partitions.
6274         (grub_util_biosdisk_open): Access device names via `.device' struct
6275         member.
6276         (open_device): Likewise.
6277         (find_drive): Likewise.
6278         (read_device_map): Adjust map[] usage to match the new struct
6279         definition.  Don't check for duplicates (still possible, but not cheap
6280         anymore).
6281         (grub_util_biosdisk_fini): Free malloced buffers referenced by map[].
6282         (make_device_name): Remove assumption of BIOS-like drive names.
6284 2008-05-30  Pavel Roskin  <proski@gnu.org>
6286         * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Remove, as
6287         compiling execute.c doesn't need grub_script.tab.h anymore.
6288         (normal/command.c_DEPENDENCIES): Likewise.
6289         (normal/function.c_DEPENDENCIES): Likewise.
6290         * conf/i386-ieee1275.rmk: Likewise.
6291         * conf/i386-linuxbios.rmk: Likewise.
6292         * conf/i386-pc.rmk: Likewise.
6293         * conf/powerpc-ieee1275.rmk: Likewise.
6294         * conf/sparc64-ieee1275.rmk: Likewise.
6296 2008-05-29  Pavel Roskin  <proski@gnu.org>
6298         * disk/lvm.c (grub_lvm_scan_device): Check for the buffer end
6299         when scanning metadata for volume group name.
6301         * include/grub/script.h: Don't include grub_script.tab.h.  It's
6302         a generated file, which may only be included from the files with
6303         DEPENDENCIES rules in the makefile.  Don't use typedef YYSTYPE,
6304         use union YYSTYPE, as the later allows forward declaration.
6305         * normal/lexer.c: Don't use typedef YYSTYPE, use union YYSTYPE.
6307 2008-05-29  Robert Millan  <rmh@aybabtu.com>
6309         * term/i386/pc/at_keyboard.c: Include `grub/machine/machine.h'.
6310         (OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): New macros.
6311         [GRUB_MACHINE_IEEE1275] (keyboard_map): Add OLPC scan codes
6312         (grub_console_checkkey): Add grub_dprintf() call to report unknown
6313         scan codes.
6315 2008-05-29  Robert Millan  <rmh@aybabtu.com>
6317         * term/i386/pc/at_keyboard.c (grub_console_checkkey): Add support for
6318         control key combinations.
6320 2008-05-29  Robert Millan  <rmh@aybabtu.com>
6322         * util/powerpc/ieee1275/grub-install.in: Move from here ...
6323         * util/ieee1275/grub-install.in: ... to here.
6324         * powerpc-ieee1275.rmk (grub_install_SOURCES): Update location.
6325         * i386-ieee1275.rmk (sbin_SCRIPTS): New variable.
6326         (grub_install_SOURCES): Likewise.
6328 2008-05-29  Robert Millan  <rmh@aybabtu.com>
6330         * fs/affs.c: Update copyright year.
6331         * fs/ext2.c: Likewise.
6332         * fs/fshelp.c: Likewise.
6333         * fs/hfsplus.c: Likewise.
6334         * fs/ntfs.c: Likewise.
6335         * fs/xfs.c: Likewise.
6336         * include/grub/fshelp.h: Likewise.
6337         * util/grub-mkdevicemap.c: Likewise.
6339 2008-05-28  Robert Millan  <rmh@aybabtu.com>
6341         * util/update-grub.in: Allow chmod call to fail, since /boot/grub/
6342         might need to be fatfs to support some firmware implementations
6343         (e.g. OFW or EFI).
6345 2008-05-28  Robert Millan  <rmh@aybabtu.com>
6347         * util/biosdisk.c (linux_find_partition, get_os_disk): Handle MMC
6348         devices.
6349         * util/grub-mkdevicemap.c (get_mmc_disk_name)
6350         (make_device_map): Likewise.
6352 2008-05-20  Bean  <bean123ch@gmail.com>
6354         * fs/fshelp.c (grub_fshelp_map_block): New function.
6355         (grub_fshelp_find_file): Use 64-bit type for pos and block address.
6356         Use `>>' and `&' operator to avoid 64-bit divide and modulo.
6358         * include/grub/fshelp.h (grub_fshelp_journal_type): New enum.
6359         (GRUB_FSHELP_JOURNAL_UNUSED_MAPPING): New macro.
6360         (grub_fshelp_journal): New structure.
6361         (grub_fshelp_map_block): New function prototype.
6362         (grub_fshelp_read_file): Use grub_disk_addr_t as block type.
6363         (grub_fshelp_map_block): Likewise.
6365         * fs/ext2.c (EXT3_FEATURE_COMPAT_HAS_JOURNAL): New macro.
6366         (EXT3_JOURNAL_MAGIC_NUMBER): Likewise.
6367         (EXT3_JOURNAL_DESCRIPTOR_BLOCK): Likewise.
6368         (EXT3_JOURNAL_COMMIT_BLOCK): Likewise.
6369         (EXT3_JOURNAL_SUPERBLOCK_V1): Likewise.
6370         (EXT3_JOURNAL_SUPERBLOCK_V2): Likewise.
6371         (EXT3_JOURNAL_REVOKE_BLOCK): Likewise.
6372         (EXT3_JOURNAL_FLAG_ESCAPE): Likewise.
6373         (EXT3_JOURNAL_FLAG_SAME_UUID): Likewise.
6374         (EXT3_JOURNAL_FLAG_DELETED): Likewise.
6375         (EXT3_JOURNAL_FLAG_LAST_TAG): Likewise.
6376         (grub_ext2_sblock): New members for journal support.
6377         (grub_ext3_journal_header): New structure.
6378         (grub_ext3_journal_revoke_header): Likewise.
6379         (grub_ext3_journal_block_tag): Likewise.
6380         (grub_ext3_journal_sblock): Likewise.
6381         (grub_fshelp_node): New members logfile and journal.
6382         (grub_ext2_read_block): Change block type to grub_disk_addr_t. Use
6383         grub_fshelp_map_block to get real block number.
6384         (grub_ext2_blockgroup): Use grub_fshelp_map_block to get real block
6385         number.
6386         (grub_ext2_read_inode): Likewise.
6387         (grub_ext3_get_journal): New function.
6388         (grub_read_inode): Initialize journal using grub_ext3_get_journal.
6389         (grub_ext2_close): Release memory used by journal.
6391         * fs/reiserfs.c (REISERFS_MAGIC_STRING): Changed to "ReIsEr".
6392         (REISERFS_MAGIC_DESC_BLOCK): New macro.
6393         (grub_reiserfs_transaction_header): Renamed to
6394         grub_reiserfs_description_block, replace field data with real_blocks.
6395         (grub_reiserfs_commit_block): New structure.
6396         (grub_reiserfs_data): New member journal.
6397         (grub_reiserfs_get_item): Use grub_fshelp_map_block to get real block
6398         number.
6399         (grub_reiserfs_read_symlink): Likewise.
6400         (grub_reiserfs_iterate_dir): Likewise.
6401         (grub_reiserfs_open): Likewise.
6402         (grub_reiserfs_read): Likewise.
6403         (grub_reiserfs_get_journal): New function.
6404         (grub_reiserfs_mount): Use "ReIsEr" as super block magic, as there are
6405         three varieties ReIsErFs, ReIsEr2Fs and ReIsEr3Fs. Initialize journal
6406         using grub_reiserfs_get_journal.
6407         (grub_reiserfs_close): Release memory used by journal.
6409         * fs/affs.c (grub_affs_read_block): Change block type to
6410         grub_disk_addr_t. Use grub_divmod64 to do 64-bit division.
6412         * fs/afs.c (grub_afs_read_block): Change block type to grub_disk_addr_t.
6414         * fs/hfsplus.c (grub_hfsplus_read_block): Likewise.
6416         * fs/ntfs.c (grub_ntfs_read_block): Likewise.
6418         * fs/udf.c (grub_udf_read_block): Change block type to
6419         grub_disk_addr_t. Use type cast to avoid warning.
6421         * fs/xfs.c (grub_xfs_read_block): Likewise.
6423 2008-05-16  Christian Franke  <franke@computer.org>
6425         * commands/cat.c (grub_cmd_cat): Remove non-ESC keys from keyboard queue
6426         to ensure that break with ESC will always work.
6427         * commands/sleep.c (grub_interruptible_millisleep): Likewise.
6428         Remove ESC from keyboard queue.
6430 2008-05-16  Christian Franke  <franke@computer.org>
6432         * util/biosdisk.c: [__CYGWIN__] Add includes.
6433         (grub_util_biosdisk_open): Use Linux code also for Cygwin.
6434         (get_os_disk): Move variable declarations to OS specific
6435         parts to avoid warning.
6436         [__GNU__] (get_os_disk): Fix /dev/sdXsN case.
6437         [__CYGWIN__] (get_os_disk): Add Cygwin /dev/sdXN device names.
6438         (grub_util_biosdisk_get_grub_dev): Use Linux code also for
6439         Cygwin.
6440         * util/getroot.c: [__CYGWIN__] Add includes.
6441         (strip_extra_slashes): Fix "/" case.
6442         [__CYGWIN__] (get_win32_path): New function.
6443         [__CYGWIN__] (grub_get_prefix): Add conversion to win32 path.
6444         [__CYGWIN__] (find_root_device): Disable.
6445         [__CYGWIN__] (get_bootsec_serial): New function.
6446         [__CYGWIN__] (find_cygwin_root_device): Likewise.
6447         [__linux__] (grub_guess_root_device): Add early returns to simplify
6448         structure.
6449         [__CYGWIN__] (grub_guess_root_device): Call find_cygwin_root_device.
6450         [__linux__] (grub_util_get_dev_abstraction): Enable LVM and RAID
6451         check for Linux only.
6453 2008-05-15  Bean  <bean123ch@gmail.com>
6455         * kern/i386/pc/startup.S (grub_console_getkey): Workaround for the
6456         keyboard hang problem in apple's intel mac.
6458 2008-05-09  Robert Millan  <rmh@aybabtu.com>
6460         * util/biosdisk.c (linux_find_partition, get_os_disk): Handle Virtio
6461         devices.
6462         * util/grub-mkdevicemap.c (get_virtio_disk_name)
6463         (make_device_map): Likewise.
6464         Reported by Aurelien Jarno <aurel32@debian.org>
6466 2008-05-07  Ian Campbell  <ijc@hellion.org.uk>
6468         * util/biosdisk.c (get_os_disk): Recognise xvd type disks.
6469         * util/grub-mkdevicemap.c (get_xvd_disk_name): New function.
6470         (make_device_map): Output entries for xvd type disks.
6472 2008-05-07  Robert Millan  <rmh@aybabtu.com>
6474         * util/biosdisk.c (linux_find_partition, get_os_disk): Handle CCISS
6475         devices.
6476         * util/grub-mkdevicemap.c (get_cciss_disk_name)
6477         (make_device_map): Likewise.
6478         Reported by Roland Dreier <rdreier@cisco.com>
6480 2008-05-07  Robert Millan  <rmh@aybabtu.com>
6482         * disk/lvm.c (grub_lvm_scan_device): Detect errors in an additional
6483         grub_strstr() call.  Correct a few mistakes in failure path handling.
6485 2008-05-06  Robert Millan  <rmh@aybabtu.com>
6487         * util/update-grub_lib.in (make_system_path_relative_to_its_root):
6488         Do not print a trailing slash (therefore, the root directory is an
6489         empty string).
6490         (convert_system_path_to_grub_path): Do not remove trailing slash
6491         from make_system_path_relative_to_its_root() output.
6493         * util/i386/pc/grub-install.in: Add trailing slash to output from
6494         make_system_path_relative_to_its_root().
6496 2008-05-06  Robert Millan  <rmh@aybabtu.com>
6498         * util/grub-fstest.c (grub_refresh): Call `fflush (stdout)'.  This
6499         ensures that output lines aren't intermangled with those sent to
6500         stderr (via grub_util_info()).
6501         * util/grub-probe.c (grub_refresh): Likewise.
6502         * util/i386/pc/grub-setup.c (grub_refresh): Likewise.
6504 2008-05-05  Christian Franke  <franke@computer.org>
6506         * util/grub-mkdevicemap.c (get_floppy_disk_name) [__CYGWIN__]:
6507         Add Cygwin device names.
6508         (get_ide_disk_name) [__CYGWIN__]: Likewise.
6509         (get_scsi_disk_name) [__CYGWIN__]: Likewise.
6510         (check_device): Return error instead of success on empty name.
6511         (make_device_map): Move label inside linux specific code to
6512         prevent compiler warning.
6514 2008-04-30  Robert Millan  <rmh@aybabtu.com>
6516         Based on patch from Fabian Greffrath <greffrath@leat.rub.de>
6517         * util/grub.d/10_linux.in: Add ${GRUB_CMDLINE_LINUX_DEFAULT} to the
6518         first boot option.
6519         * util/update-grub.in: Export GRUB_CMDLINE_LINUX_DEFAULT.
6521 2008-04-29  Robert Millan  <rmh@aybabtu.com>
6523         * docs/grub.cfg: New file (example GRUB configuration).
6525 2008-04-26  Robert Millan  <rmh@aybabtu.com>
6527         * DISTLIST: Sort (sort -u < DISTLIST | sponge DISTLIST).  Add
6528         `loader/i386/ieee1275/linux.c', `loader/i386/ieee1275/linux_normal.c'
6529         and `disk/ieee1275/nand.c'.
6531 2008-04-25  Bean  <bean123ch@gmail.com>
6533         * Makefile.in (RMKFILES): Add missing arch i386-ieee1275 and
6534         i386-linuxbios.
6536         * commands/hexdump.c (grub_cmd_hexdump): Support dumping of device,
6537         change the buffer size to 4096 for cdrom device.
6539         * conf/i386-ieee1275.rmk (pkglib_MODULES): Add _linux.mod, linux.mod
6540         and nand.mod.
6541         (_linux_mod_SOURCES): New variable.
6542         (_linux_mod_CFLAGS): Likewise.
6543         (_linux_mod_LDFLAGS): Likewise.
6544         (linux_mod_SOURCES): Likewise.
6545         (linux_mod_CFLAGS): Likewise.
6546         (linux_mod_LDFLAGS): Likewise.
6547         (nand_mod_SOURCES): Likewise.
6548         (nand_mod_CFLAGS): Likewise.
6549         (nand_mod_LDFLAGS): Likewise.
6551         * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Return
6552         GRUB_ERR_UNKNOWN_DEVICE instead of GRUB_ERR_BAD_DEVICE if no device
6553         type property. (nand device in olpc don't have this property)
6555         * include/grub/disk.h (grub_disk_dev_id): New macro
6556         GRUB_DISK_DEVICE_NAND_ID.
6558         * include/grub/i386/ieee1275/loader.h (grub_rescue_cmd_linux): New
6559         function prototype.
6560         (grub_rescue_cmd_initrd): Likewise.
6562         * include/grub/i386/linux.h (GRUB_LINUX_OFW_SIGNATURE): New macro.
6563         (linux_kernel_params): Add new member ofw_signature, ofw_num_items,
6564         ofw_cif_handler and ofw_idt, adjust padding number.
6566         * include/grub/i386/pc/memory.h (grub_upper_mem): Export it if
6567         GRUB_MACHINE_IEEE1275 is defined.
6569         * include/grub/ieee1275/ieee1275.h (grub_available_iterate):
6570         Use NESTED_FUNC_ATTR attribute on the hook parameter.
6572         * kern/powerpc/ieee1275/init.c (grub_claim_heap): Use NESTED_FUNC_ATTR
6573         on nested function heap_init.
6574         (grub_upper_mem): New variable for i386-ieee1275.
6575         (grub_get_extended_memory): New function for i386-ieee1275.
6576         (grub_machine_init): Call grub_get_extended_memory for i386-ieee1275.
6578         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Use
6579         NESTED_FUNC_ATTR on the hook parameter. Don't quit if no device type
6580         property.
6582         * loader/i386/ieee1275/linux.c: New file.
6584         * loader/i386/ieee1275/linux_normal.c: New file.
6586         * disk/ieee1275/nand.c: New file.
6588 2008-04-18  Thomas Schwinge  <tschwinge@gnu.org>
6590         * util/i386/pc/grub-mkrescue.in (grub_mkimage): Don't overwrite correct
6591         value.
6592         * util/powerpc/ieee1275/grub-mkrescue.in (grub_mkimage): Likewise.
6594 2008-04-18  Robert Millan  <rmh@aybabtu.com>
6596         Restructures early code path on ieee1275 to unify grub_main() as
6597         the first C function that is executed in every platform.
6599         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_init): New prototype.
6600         * kern/i386/ieee1275/startup.S (_start): Jump to grub_main() instead of
6601         cmain().
6602         * kern/powerpc/ieee1275/crt0.S (_start): Likewise.
6603         * kern/ieee1275/cmain.c (cmain): Rename to ...
6604         * kern/ieee1275/cmain.c (grub_ieee1275_init): ... this.
6605         * kern/ieee1275/init.c (grub_machine_init): Call grub_ieee1275_init()
6606         at the beginning.
6608 2008-04-18  Robert Millan  <rmh@aybabtu.com>
6610         * util/update-grub.in: Fix syntax error when setting
6611         `GRUB_PRELOAD_MODULES'.
6612         Reported by Stephane Chazelas <stephane@artesyncp.com>
6614 2008-04-17  Lubomir Kundrak  <lkundrak@redhat.com>
6616         * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): take only .text
6617         section into account, newer toolchains generate unique build ids
6618         * configure.ac: remove the test for --build-id=none acceptance,
6619         we want build ids to be preserved
6620         * genmk.rb: add -R .note.gnu.build-id to objcopy, so build id
6621         far from other sections don't cause the raw binary images grow
6622         size
6624 2008-04-15  Robert Millan  <rmh@aybabtu.com>
6626         * disk/lvm.c: Update copyright year.
6627         * kern/misc.c: Likewise.
6629 2008-04-14  Vesa Jaaskelainen  <chaac@nic.fi>
6631         * disk/lvm.c (grub_lvm_scan_device): Add forgotten failure path when
6632         there is no memory left for physical volume name.
6634 2008-04-14  Vesa Jaaskelainen  <chaac@nic.fi>
6636         * disk/lvm.c (grub_lvm_scan_device): Fix logical volume's physical
6637         volume name mapping to support bigger than 9 character names properly.
6639 2008-04-13  Robert Millan  <rmh@aybabtu.com>
6641         * disk/i386/pc/biosdisk.c (grub_biosdisk_rw): Fix CHS limit check,
6642         as per http://www.allensmith.net/Storage/HDDlimit/Int13h.htm
6644 2008-04-13  Christian Franke  <franke@computer.org>
6646         * util/i386/pc/grub-mkrescue.in: Add --emulation=floppy
6647         to create a floppy emulation boot CD when non emulation mode
6648         does not work.
6649         Enable Joliet CD filesystem extension.
6651 2008-04-13  Robert Millan  <rmh@aybabtu.com>
6653         * kern/misc.c (grub_strncat): Fix off-by-one error.
6654         Reported by Zhang Huan <zhanghuan@nrchpc.ac.cn>
6656         * kern/env.c (grub_env_context_close): Clear current context, not
6657         previous one.
6658         Patch from Zhang Huan <zhanghuan@nrchpc.ac.cn>
6660         * kern/misc.c (grub_strcat): Minor speed optimization (same code size).
6662 2008-04-13  Robert Millan  <rmh@aybabtu.com>
6664         Improve robustness when handling LVM.
6666         * disk/lvm.c (grub_lvm_getvalue): Return 0 when `*p' is NULL
6667         (and leave `*p' unmodified).
6668         (grub_lvm_iterate): Don't assume `vg->lvs != NULL' when iterating
6669         through it.
6670         (grub_lvm_memberlist): Don't assume `lv->vg->pvs != NULL' when
6671         iterating through it.
6672         (grub_lvm_open): Don't assume `vg->lvs != NULL' when iterating
6673         through it.
6674         (grub_lvm_scan_device): Check the return value (and fail gracefully
6675         when due) on each grub_lvm_getvalue() or grub_strstr() call.
6676         Don't assume `vg->pvs != NULL' when iterating through it.
6678 2008-04-13  Robert Millan  <rmh@aybabtu.com>
6680         * gendistlist.sh (EXTRA_DISTFILES): Add `genpartmaplist.sh'.
6681         * genmk.rb (partmap): New variable.
6682         (CLEANFILES, PARTMAPFILES): Add #{partmap}.
6683         (#{partmap}): New target rule.
6684         * genpartmaplist.sh: New file.
6685         * Makefile.in (pkglib_DATA): Add partmap.lst.
6686         (partmap.lst): New target rule.
6687         * util/i386/pc/grub-mkrescue.in: Generate grub.cfg that loads needed
6688         modules (including all partition maps), instead of preloading them.
6690 2007-04-13  Fabian Greffrath  <fabian.greffrath@web.de>
6692         * util/grub.d/30_os-prober.in: New script. Use `os-prober' and
6693         `linux-boot-prober' (if installed) to detect other operating
6694         systems which are installed on the computer and add them to
6695         the boot menu.
6696         * conf/common.rmk: Build and install 30_os-prober.
6698 2008-04-12  Robert Millan  <rmh@aybabtu.com>
6700         * kern/powerpc/ieee1275/init.c: Move from here ...
6701         * kern/ieee1275/init.c: ... to here.  Update all users.
6703         * kern/powerpc/ieee1275/cmain.c: Move from here ...
6704         * kern/ieee1275/cmain.c: ... to here.  Update all users.
6706         * kern/powerpc/ieee1275/openfw.c: Move from here ...
6707         * kern/ieee1275/openfw.c: ... to here.  Update all users.
6709         * loader/powerpc/ieee1275/multiboot2.c: Move from here ...
6710         * loader/ieee1275/multiboot2.c: ... to here.  Update all users.
6712 2008-04-10  Pavel Roskin  <proski@gnu.org>
6714         * configure.ac: Always use "_cv_" in cache variables for
6715         compatibility with Autoconf 2.62.
6717 2008-04-07  Robert Millan  <rmh@aybabtu.com>
6719         Revert grub/machine/init.h addition by Pavel (since it breaks on
6720         i386-ieee1275 and others):
6721         * util/i386/pc/misc.c: Remove grub/machine/init.h.
6722         * util/powerpc/ieee1275/misc.c: Likewise.
6724 2008-04-07  Robert Millan  <rmh@aybabtu.com>
6726         * util/grub-probe.c (probe): Improve error message.
6728 2008-04-07  Robert Millan  <rmh@aybabtu.com>
6730         * util/biosdisk.c (read_device_map): Skip devices that don't exist
6731         (this prevents the presence of a bogus entry from ruining the whole
6732         thing).
6734 2008-04-06  Pavel Roskin  <proski@gnu.org>
6736         * util/biosdisk.c: Include grub/util/biosdisk.h.
6737         * util/grub-fstest.c (execute_command): Make static.
6738         * util/grub-mkdevicemap.c (check_device): Likewise.
6739         * util/i386/pc/misc.c: Include grub/machine/init.h.
6740         * util/powerpc/ieee1275/misc.c: Likewise.
6741         * util/lvm.c: Include grub/util/lvm.h.
6742         * util/misc.c: Include grub/kernel.h, grub/misc.h and
6743         grub/cache.h.
6744         * util/raid.c: Include grub/util/raid.h.
6745         (grub_util_getdiskname): Make static.
6747         * util/grub-emu.c (main): Remove calls to grub_hostfs_init() and
6748         grub_hostfs_fini(), as they are called from grub_init_all() and
6749         grub_fini_all() respectively.  This fixes an infinite loop in
6750         grub-fstest due to double registration of hostfs.
6751         Reported by Christian Franke <Christian.Franke@t-online.de>
6753 2008-04-05  Pavel Roskin  <proski@gnu.org>
6755         * bus/pci.c (grub_pci_iterate): For multifunction devices, probe
6756         all 8 functions.  Otherwise, probe function 0 only.
6758 2008-04-04  Pavel Roskin  <proski@gnu.org>
6760         * commands/lspci.c (grub_lspci_iter): Print the bus number
6761         correctly.
6763         * commands/lspci.c (grub_pci_classes): Fix typos.
6764         (grub_lspci_iter): Don't print func twice.  Print vendor ID
6765         before device ID, as it's normally done.
6767         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
6768         Fix signedness warnings.
6769         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate):
6770         Likewise.
6771         * util/ieee1275/get_disk_name.c: Include config.h so that
6772         _GNU_SOURCE is defined and getline() is declared.  Mark an
6773         unused argument as such.  Fix a signedness warning.
6775 2008-04-02  Pavel Roskin  <proski@gnu.org>
6777         * genkernsyms.sh.in: Use more robust assignments for CC and
6778         srcdir.  Quote srcdir.
6779         * gensymlist.sh.in: Likewise.  Assert at the compile time that
6780         the symbol table is not empty.
6782         * disk/raid.c (grub_raid_memberlist): Fix a signedness warning.
6783         * fs/cpio.c (grub_cpio_read): Likewise.
6785 2008-04-01  Pavel Roskin  <proski@gnu.org>
6787         * disk/ata.c (grub_ata_open): Don't lose precision in disk->id.
6788         * disk/host.c (grub_host_open): Likewise.
6789         * disk/loopback.c (grub_loopback_open): Likewise.
6790         * disk/memdisk.c (grub_memdisk_open): Use a string pointer for
6791         disk->id as in disk/host.c, not a multi-character constant.
6793         * util/grub-fstest.c (cmd_cmp): Use fseeko(), not fseek().  The
6794         later is obsolete, potentially dangerous and sets a bad example.
6795         * util/i386/efi/grub-mkimage.c (make_header): Likewise.
6796         * util/misc.c (grub_util_get_image_size): Likewise.
6798         * disk/loopback.c (options): Improve help for "--partitions".
6800         * normal/arg.c (grub_arg_show_help): Fix spacing of the long
6801         options to align them with the short options, e.g. "echo -e".
6803 2008-03-31  Bean  <bean123ch@gmail.com>
6805         * video/reader/png.c (grub_png_data): New member is_16bit and
6806         image_data.
6807         (grub_png_decode_image_header): Detect 16 bit png image.
6808         (grub_png_convert_image): New function to convert 16 bit image to 8 bit.
6809         (grub_png_decode_png): Call grub_png_convert_image for 16 bit image.
6810         (grub_video_reader_png): Release memory occupied by image_data.
6812         * fs/ntfs.c (find_attr): Handle non-resident attribute list larger than
6813         4096 bytes.
6814         (grub_nfs_mount): Skip the test for sector per cluster.
6816         * include/grub/ntfs.h (MAX_SPC): Removed.
6818 2008-03-31  Bean  <bean123ch@gmail.com>
6820         * conf/common.rmk (pkgdata_MODULES): Add afs.mod.
6821         (grub_probe_SOURCES): Add fs/afs.c.
6822         (grub_fstest_SOURCES): Likewise.
6823         (afs_mod_SOURCES): New variable.
6824         (afs_mod_CFLAGS): Likewise.
6825         (afs_mod_LDFLAGS): Likewise.
6827         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/afs.c.
6828         (grub_emu_SOURCES): Likewise.
6830         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
6832         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6834         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
6836         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6838         * fs/afs.c: New file.
6840 2008-03-30  Pavel Roskin  <proski@gnu.org>
6842         * disk/host.c: Include grub/misc.h to fix a warning.
6843         * util/hostfs.c: Use GRUB_MOD_INIT and GRUB_MOD_FINI to fix
6844         warnings about implicit declarations.
6846         * fs/udf.c (grub_udf_mount): Fix warning about a shadowing a
6847         variable.
6848         * include/grub/i386/loader.h: Change declaration of
6849         grub_linux_boot() to match what grub_loader_set() expects.
6850         * util/getroot.c (grub_guess_root_device): Return const char* to
6851         fix a warning.
6852         * util/grub-probe.c (probe): Fix a warning about uninitialized
6853         abstraction_name variable.
6854         * util/i386/get_disk_name.c (grub_util_get_disk_name): Mark
6855         second argument as unused to fix a warning.
6857         * loader/i386/pc/multiboot2.c (grub_mb2_arch_elf64_hook): Add
6858         missing grub_error() call.
6860         * util/update-grub_lib.in: Define datarootdir, since Autoconf
6861         2.60 and newer uses it to define datadir.
6863         * commands/sleep.c: Fix warning about implicit declaration.
6864         * disk/memdisk.c: Likewise.
6865         * loader/aout.c: Likewise.
6866         * loader/i386/bsd_normal.c: Likewise.
6867         * util/grub-probe.c: Likewise.
6869         * commands/i386/cpuid.c (has_longmode): Make static.
6870         * disk/i386/pc/biosdisk.c (cd_drive): Likewise.
6871         * include/grub/i386/bsd.h (bios_memmap_t): Remove, it's unused.
6873         * kern/i386/pc/startup.S (real_to_prot): Use %cs prefix to load
6874         GDT.  This is more robust, as %ds can change.
6875         (grub_biosdisk_rw_int13_extensions): Don't clear %ds before
6876         calling real_to_prot().
6877         (grub_biosdisk_get_diskinfo_int13_extensions): Likewise.
6879 2008-03-28  Pavel Roskin  <proski@gnu.org>
6881         * kern/i386/pc/startup.S: Assert that uncompressed functions
6882         don't spill beyond GRUB_KERNEL_MACHINE_RAW_SIZE.
6883         * kern/i386/pc/lzo1x.S: Remove all .align directives in the
6884         code, as they push parts of the code (error handlers) beyond
6885         GRUB_KERNEL_MACHINE_RAW_SIZE.  Speed is not as important in this
6886         code as correctness and size.
6888 2008-03-28  Pavel Roskin  <proski@gnu.org>
6890         * kern/i386/pc/startup.S
6891         (grub_biosdisk_get_diskinfo_int13_extensions): When converting
6892         data block address to the real mode, keep offset minimal.  This
6893         works around a bug in AWARD BIOS on old Athlon systems, which
6894         makes CD detection hang.
6896 2008-03-26  Pavel Roskin  <proski@gnu.org>
6898         * normal/color.c (grub_parse_color_name_pair): Make `name' a
6899         const.
6900         * include/grub/normal.h: Add grub_parse_color_name_pair()
6901         declaration.
6903 2008-03-24  Bean  <bean123ch@gmail.com>
6905         * disk/i386/pc/biosdisk.c (cd_start): Removed.
6906         (cd_count): Removed.
6907         (cd_drive): New variable.
6908         (grub_biosdisk_get_drive): Don't check for (cdN) device.
6909         (grub_biosdisk_call_hook): Likewise.
6910         (grub_biosdisk_iterate): Change cdrom detection method.
6911         (grub_biosdisk_open): Replace cd_start with cd_drive.
6912         (GRUB_MOD_INIT): Use grub_biosdisk_get_cdinfo_int13_extension to
6913         detect cdrom device.
6915         * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_MACHINE_CDROM_START):
6916         Removed.
6917         (GRUB_BIOSDISK_MACHINE_CDROM_END): Removed.
6918         (GRUB_BIOSDISK_CDTYPE_NO_EMUL): New macro.
6919         (GRUB_BIOSDISK_CDTYPE_1_2_M): Likewise.
6920         (GRUB_BIOSDISK_CDTYPE_1_44_M): Likewise.
6921         (GRUB_BIOSDISK_CDTYPE_2_88_M): Likewise.
6922         (GRUB_BIOSDISK_CDTYPE_HARDDISK): Likewise.
6923         (GRUB_BIOSDISK_CDTYPE_MASK): Likewise.
6924         (grub_biosdisk_cdrp): New structure.
6925         (grub_biosdisk_get_cdinfo_int13_extensions): New function.
6927         * include/grub/i386/pc/kernel.h (grub_boot_drive): Export this variable.
6929         * kern/i386/pc/init.c (make_install_device): Don't use (cdN) as root
6930         device.
6932         * kern/i386/pc/startup.S (grub_biosdisk_get_cdinfo_int13_extensions):
6933         New function.
6935 2008-03-20  Robert Millan  <rmh@aybabtu.com>
6937         Remove 2 TiB limit in ata.mod.
6938         * disk/ata.c (grub_ata_device): Promote `size' to grub_uint64_t.
6939         (grub_ata_dumpinfo): Print sector count with 0x%llx.
6940         (grub_ata_identify): Interpret `&info16[100]' as a pointer to
6941         grub_uint64_t instead of grub_uint32_t.
6943 2008-03-05  Bean  <bean123ch@gmail.com>
6945         * loader/i386/pc/multiboot.c (grub_multiboot_get_bootdev): New function.
6946         (grub_multiboot): Set boot device.
6948         * boot/i386/pc/lnxboot.S (real_code_2): Set %dh to 0xFF.
6950 2008-03-02  Bean  <bean123ch@gmail.com>
6952         * fs/reiserfs.c (grub_reiserfs_read_symlink): Add 0 at the end of
6953         symlink_buffer.
6955 2008-03-01  Yoshinori K. Okuji  <okuji@enbug.org>
6957         * DISTLIST: Added docs/fdl.texi, docs/grub.texi, docs/mdate-sh and
6958         texinfo.tex.
6960         * docs/grub.texi: New file. Copied from GRUB Legacy, and slightly
6961         modified.
6963         * docs/fdl.texi: New file.
6965         * docs/mdate-sh: New file. Copied from gnulib.
6966         * docs/texinfo.tex: Likewise.
6968         * config.guess: Updated from gnulib.
6969         * install-sh: Likewise.
6971 2008-02-28  Robert Millan  <rmh@aybabtu.com>
6973         * conf/i386-linuxbios.rmk (pkglib_MODULES): Add aout.mod.
6974         (aout_mod_SOURCES): New variable.
6975         (aout_mod_CFLAGS): Likewise.
6976         (aout_mod_LDFLAGS): Likewise.
6978         * conf/i386-ieee1275.rmk: Likewise.
6980 2008-02-28  Robert Millan  <rmh@aybabtu.com>
6982         * util/update-grub.in: Reorganise terminal validity check.  Accept
6983         `ieee1275:console' (OLPC) and `*:gfxterm' as valid too.
6984         Based on suggestion by Franklin PIAT.
6986 2008-02-28  Fabian Greffrath  <greffrath@leat.rub.de>
6988         * include/grub/util/getroot.h (grub_util_check_block_device): Export new
6989         function.
6990         * util/getroot.c (grub_util_check_block_device): New function that
6991         returns the given argument if it is a block device and returns NULL else.
6992         * util/grub-probe.c (argument_is_device): New variable.
6993         (probe): Promote device_name from a variable to an argument. Receive
6994         device_name from grub_util_check_block_device() if path is NULL and from
6995         grub_guess_root_device() else. Do not free() device_name anymore.
6996         (options): Introduce new parameter '-d, --device'.
6997         (main): Add description of the new parameter to the help screen.
6998         Rename path variable to argument. Set argument_is_device if the '-d'
6999         option is given. Pass argument to probe() depending on
7000         argument_is_device.
7002 2008-02-24  Bean  <bean123ch@gmail.com>
7004         * fs/iso9660.c (GRUB_ISO9660_VOLDESC_BOOT): New macro.
7005         (GRUB_ISO9660_VOLDESC_PRIMARY): Likewise.
7006         (GRUB_ISO9660_VOLDESC_SUPP): Likewise.
7007         (GRUB_ISO9660_VOLDESC_PART): Likewise.
7008         (GRUB_ISO9660_VOLDESC_END): Likewise.
7009         (grub_iso9660_primary_voldesc): New member escape.
7010         (grub_iso9660_data): New member joliet.
7011         (grub_iso9660_convert_string): New function.
7012         (grub_iso9660_mount): Detect joliet extension.
7013         (grub_iso9660_iterate_dir): Convert filename when joliet is detected.
7014         (grub_iso9660_iso9660_label): Likewise.
7016         * conf/common.rmk (pkgdata_MODULES): Add udf.mod.
7017         (grub_setup_SOURCES): Add fs/udf.c.
7018         (grub_fstest_SOURCES): Likewise.
7019         (udf_mod_SOURCES): New variable.
7020         (udf_mod_CFLAGS): Likewise.
7021         (udf_mod_LDFLAGS): Likewise.
7023         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/udf.c.
7024         (grub_emu_SOURCES): Likewise.
7026         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
7028         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7030         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
7032         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7034         * fs/udf.c: New file.
7036 2008-02-24  Robert Millan  <rmh@aybabtu.com>
7038         * conf/i386-efi.rmk (normal/function.c_DEPENDENCIES)
7039         (normal/lexer.c_DEPENDENCIES): New variables.
7040         * conf/i386-ieee1275.rmk (normal/function.c_DEPENDENCIES)
7041         (normal/lexer.c_DEPENDENCIES): Likewise.
7042         * conf/i386-linuxbios.rmk (normal/function.c_DEPENDENCIES)
7043         (normal/lexer.c_DEPENDENCIES): Likewise.
7044         * conf/i386-pc.rmk (normal/function.c_DEPENDENCIES)
7045         (normal/lexer.c_DEPENDENCIES): Likewise.
7046         * conf/powerpc-ieee1275.rmk (normal/function.c_DEPENDENCIES)
7047         (normal/lexer.c_DEPENDENCIES): Likewise.
7048         * conf/sparc64-ieee1275.rmk (normal/function.c_DEPENDENCIES)
7049         (normal/lexer.c_DEPENDENCIES): Likewise.
7051 2008-02-23  Robert Millan  <rmh@aybabtu.com>
7053         * partmap/gpt.c (grub_gpt_magic): Add `0x' qualifier to each member,
7054         since they were intended to be in hex.  This didn't break previously
7055         because of a bug in gpt_partition_map_iterate() (see below).
7057         (gpt_partition_map_iterate): Replace `grub_memcmp' with `! grub_memcmp'
7058         when checking the validity of GPT header.
7059         Remove `partno', since it always provides the same information as `i'.
7061 2008-02-21  Yoshinori K. Okuji  <okuji@enbug.org>
7063         * include/grub/efi/time.h: Fix a wrong comment.
7065 2008-02-19  Pavel Roskin  <proski@gnu.org>
7067         * kern/rescue.c (grub_enter_rescue_mode): Improve initial
7068         message.
7070 2008-02-19  Bean  <bean123ch@gmail.com>
7072         * conf/i386-pc.rmk (pkglib_MODULES): Add aout.mod _bsd.mod and bsd.mod.
7073         (aout_mod_SOURCES): New variable.
7074         (aout_mod_CFLAGS): Likewise.
7075         (aout_mod_LDFLAGS): Likewise.
7076         (_bsd_mod_SOURCES): New variable.
7077         (_bsd_mod_CFLAGS): Likewise.
7078         (_bsd_mod_LDFLAGS): Likewise.
7079         (bsd_mod_SOURCES): New variable.
7080         (bsd_mod_CFLAGS): Likewise.
7081         (bsd_mod_LDFLAGS): Likewise.
7083         * include/grub/aout.h: New file.
7085         * include/grub/i386/loader.h (grub_unix_real_boot): New function.
7087         * include/grub/i386/bsd.h: New file.
7089         * include/grub/i386/pc/init.h (grub_get_mmap_entry): Use EXPORT_FUNC
7090         to make it public.
7092         * kern/elf.c (grub_elf32_load): Get the physical address after the hook
7093         function is called, so that it's possible to change it inside the hook.
7094         (grub_elf64_load): Likewise.
7095         (grub_elf_file): Don't close the file if elf header is not found.
7096         (grub_elf_close): Close the file if grub_elf_file fails (The new
7097         grub_elf_file won't close it).
7098         (grub_elf32_size): Use NESTED_FUNC_ATTR for nested function calcsize.
7099         (grub_elf64_size): Likewise.
7101         * kern/i386/loader.S (grub_unix_real_boot): New function.
7103         * loader/aout.c: New file.
7105         * loader/i386/bsd.c: New file.
7107         * loader/i386/bsd_normal.c: New file.
7109         * loader/i386/pc/multiboot.c (grub_multiboot): Handle a.out format.
7111         * loader/multiboot2.c (grub_multiboot2): Reset grub_errno so that it
7112         can test other formats.
7114 2008-02-19  Robert Millan  <rmh@aybabtu.com>
7116         * partmap/gpt.c: Include `<grub/gpt_partition.h>'.
7117         (grub_gpt_partition_type_empty): Redefine with macro from
7118         `<grub/gpt_partition.h>'.
7119         (gpt_partition_map_iterate): Adjust partition type comparison.
7121         Export `entry' as partmap-specific `part.data' struct.
7122         (grub_gpt_header, grub_gpt_partentry): Move from here ...
7124         * include/grub/gpt_partition.h (grub_gpt_header)
7125         (grub_gpt_partentry): ... to here (new file).
7127         * util/i386/pc/grub-setup.c: Include `<grub/gpt_partition.h>'.
7129         (grub_gpt_partition_type_bios_boot): New const variable, defined
7130         with macro from `<grub/gpt_partition.h>'.
7132         (setup): Replace `first_start' with `embed_region', which keeps
7133         track of the embed region (and is partmap-agnostic).
7135         Replace find_first_partition_start() with find_usable_region(),
7136         which finds a usable region for embedding using partmap-specific
7137         knowledge (supports PC/MSDOS and GPT).
7139         Fix all assumptions that the embed region start at sector 1, using
7140         `embed_region.start' from now on.  Similarly, use `embed_region.end'
7141         rather than `first_start' to calculate available size.
7143         In grub_util_info() message, replace "into after the MBR" with an
7144         indication of the specific sector our embed region starts at.
7146 2008-02-19  Robert Millan  <rmh@aybabtu.com>
7148         * DISTLIST: Replace `commands/ieee1275/halt.c' and
7149         `commands/ieee1275/reboot.c' with `commands/halt.c' and
7150         `commands/reboot.c'.
7151         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
7152         (halt_mod_SOURCES): Likewise.
7153         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
7154         (halt_mod_SOURCES): Likewise.
7156 2008-02-17  Christian Franke  <franke@computer.org>
7158         * commands/cat.c (grub_cmd_cat): Add break on GRUB_TERM_ESC key.
7160 2008-02-17  Robert Millan  <rmh@aybabtu.com>
7162         * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
7163         set `first_start' to 0 for non-PC/MSDOS partition maps.
7165 2008-02-16  Robert Millan  <rmh@aybabtu.com>
7167         * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
7168         do not assume partition map is PC/MSDOS before performing checks that
7169         are specific to that layout.
7171 2008-02-13  Robert Millan  <rmh@aybabtu.com>
7173         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Remove
7174         `commands/i386/pc/halt.c' and `commands/i386/pc/reboot.c'.
7175         * kern/i386/linuxbios/init.c (grub_halt, grub_reboot): Remove stubs.
7177 2008-02-13  Yoshinori K. Okuji  <okuji@enbug.org>
7179         * configure.ac: Only a cosmetic change on the handling of
7180         -fno-stack-protector.
7182 2008-02-12  Alexandre Boeglin  <alex@boeglin.org>
7184         * conf/i386-efi.rmk (grub_emu_SOURCES): Replace
7185         commands/i386/pc/halt.c and reboot.c by commands/halt.c and
7186         reboot.c.
7187         (grub_install_SOURCES): Add halt.mod and reboot.mod.
7188         (halt_mod_SOURCES): New variable.
7189         (halt_mod_CFLAGS): Likewise.
7190         (halt_mod_LDFLAGS): Likewise.
7191         (reboot_mod_SOURCES): Likewise.
7192         (reboot_mod_CFLAGS): Likewise.
7193         (reboot_mod_LDFLAGS): Likewise.
7195         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace
7196         commands/ieee1275/halt.c and reboot.c by commands/halt.c and
7197         reboot.c.
7198         (halt_mod_SOURCES): Likewise.
7199         (reboot_mod_SOURCES): Likewise.
7201         * conf/i386-pc.rmk (grub_emu_SOURCES): Replace
7202         commands/i386/pc/reboot.c by commands/reboot.c.
7203         (reboot_mod_SOURCES): Likewise.
7205         * commands/i386/pc/reboot.c: merge this file ...
7207         * commands/ieee1275/reboot.c: ... and this file ...
7209         * commands/reboot.c: ... to this file.
7210         Add some precompiler directive to include the correct header for
7211         each machine.
7213         * commands/ieee1275/halt.c: move this file ...
7215         * commands/halt.c: ... to here.
7216         Add some precompiler directive to include the correct header for
7217         each machine.
7219         * include/grub/efi/efi.h (grub_reboot): New function declaration.
7220         (grub_halt): Likewise.
7222         * kern/efi/efi.c (grub_reboot): New function.
7223         (grub_halt): Likewise.
7225 2008-02-12  Robert Millan  <rmh@aybabtu.com>
7227         * util/getroot.c (grub_guess_root_device): Inspect /dev/evms before
7228         /dev (like it is done for /dev/mapper).  This doesn't provide support
7229         for EVMS, but at least it is now easy to identify the problem when it
7230         arises.
7232 2008-02-11  Robert Millan  <rmh@aybabtu.com>
7234         * util/biosdisk.c (grub_util_biosdisk_open, linux_find_partition)
7235         (grub_util_biosdisk_get_grub_dev): Check open() exit status by
7236         comparing it with -1, not 0.
7238 2008-02-10  Robert Millan  <rmh@aybabtu.com>
7240         * conf/i386-efi.rmk (grub_emu_SOURCES): Add `disk/raid.c' and
7241         `disk/lvm.c'.
7242         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7243         * conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
7245         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Move `disk/raid.c' and
7246         `disk/lvm.c' to the end of the list.
7247         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
7248         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
7250 2008-02-10  Robert Millan  <rmh@aybabtu.com>
7252         * kern/main.c (grub_load_normal_mode): Do not reset `grub_errno'.  Call
7253         grub_print_error() instead.  This will let user know why we're entering
7254         rescue mode.
7255         Based on suggestions from Sam Morris.
7257 2008-02-10  Alexandre Boeglin  <alex@boeglin.org>
7259         * normal/arg.c (grub_arg_parse): If one of the args is "--", call add_arg()
7260         on remaining N args, instead of "--" arg N times.
7262 2008-02-09  Vesa Jaaskelainen  <chaac@nic.fi>
7264         * font/manager.c (unknown_glyph): Added variable for unknown glyph.
7265         (fill_with_default_glyph): Changed to use unknown_glyph for fill
7266         pattern for unknown glyphs.
7268 2008-02-09  Robert Millan  <rmh@aybabtu.com>
7270         * configure.ac: Probe for `help2man'.
7271         * Makefile.in (builddir): New variable.
7272         (HELP2MAN): Likewise.  Set to `true' when @HELP2MAN@ doesn't provide it,
7273         or otherwise add a few flags/options to it.
7274         (install-local): For every executable utility or script that is
7275         installed, invoke $(HELP2MAN) to install a manpage based on --help
7276         output.
7278         * util/i386/pc/grub-install.in: Move down `update-grub_lib' sourcing, so
7279         that it doesn't prevent --help from working in build tree.
7281         * util/i386/pc/grub-mkrescue.in (usage): Replace `grub-devel@gnu.org'
7282         with `bug-grub@gnu.org'.
7283         * util/powerpc/ieee1275/grub-mkrescue.in (usage): Likewise.
7284         * util/update-grub.in (usage): New function.
7285         Implement proper argument check, with support for --help and --version
7286         (as well as existing -y).
7288 2008-02-09  Christian Franke  <franke@computer.org>
7290         * commands/cat.c (grub_cmd_cat): Print '\r' as hex to
7291         avoid overwriting previous output.
7292         * kern/rescue.c (grub_rescue_cmd_cat): Likewise.
7294 2008-02-09  Robert Millan  <rmh@aybabtu.com>
7296         * normal/menu.c (run_menu): If timeout is set to zero, don't bother
7297         drawing the menu.
7299 2008-02-09  Robert Millan  <rmh@aybabtu.com>
7301         * commands/sleep.c: New file.
7302         * conf/common.rmk (pkglib_MODULES): Add `commands/sleep.c'.
7303         (sleep_mod_SOURCES): New variable.
7304         (sleep_mod_CFLAGS): Likewise.
7305         (sleep_mod_LDFLAGS): Likewise.
7307 2008-02-09  Robert Millan  <rmh@aybabtu.com>
7309         * disk/raid.c (grub_raid_scan_device): Add a pair of sanity checks for
7310         situations in which we can deduce the RAID size and the superblock
7311         doesn't match it.
7313 2008-02-09  Robert Millan  <rmh@aybabtu.com>
7315         * disk/lvm.c [GRUB_UTIL] (grub_lvm_memberlist): New function.  Construct
7316         and return a grub_diskmemberlist_t composed of LVM physical volumes.
7317         [GRUB_UTIL] (grub_lvm_dev): Add `memberlist' member.
7319         * disk/raid.c [GRUB_UTIL] (grub_raid_memberlist): New function.  Construct
7320         and return a grub_diskmemberlist_t composed of physical array members.
7321         [GRUB_UTIL] (grub_raid_dev): Add `memberlist' member.
7323         * include/grub/disk.h [GRUB_UTIL] (grub_disk_memberlist): New struct
7324         prototype.
7325         [GRUB_UTIL] (struct grub_disk_dev): Add `memberlist' function pointer.
7326         [GRUB_UTIL] (struct grub_disk_memberlist): New struct declaration.
7327         [GRUB_UTIL] (grub_disk_memberlist_t): New typedef.
7329         * util/grub-probe.c (probe): Move partmap probing code from here ...
7330         (probe_partmap): ... to here.
7331         (probe): Use probe_partmap() once for the disk we're probing, and
7332         additionally, when such disk contains a memberlist() struct member,
7333         once for each disk that is contained in the structure returned by
7334         memberlist().
7336 2008-02-09  Robert Millan  <rmh@aybabtu.com>
7338         * util/grub-probe.c (main): When `verbosity > 1', set `debug'
7339         environment variable to 'all' in order to obtain debug output from
7340         non-util/ code.
7341         * util/i386/pc/grub-setup.c (main): Likewise.
7343 2008-02-08  Robert Millan  <rmh@aybabtu.com>
7345         * disk/raid.c (grub_raid_scan_device): Check for
7346         `array->device[sb.this_disk.number]' rather than for
7347         `array->device[sb.this_disk.number]->name', since the latter is not
7348         guaranteed to be accessible.
7350 2008-02-08  Robert Millan  <rmh@aybabtu.com>
7352         * disk/raid.c: Update copyright.
7353         * fs/cpio.c: Likewise.
7354         * include/grub/raid.h: Likewise.
7355         * loader/i386/pc/multiboot.c: Likewise.
7356         * util/hostfs.c: Likewise.
7358 2008-02-08  Robert Millan  <rmh@aybabtu.com>
7360         * include/grub/raid.h (struct grub_raid_array): Change type of `device'
7361         to a grub_disk_t array.
7362         * disk/raid.c (grub_raid_read): Replace `device[x].disk' accesses with
7363         `device[x]'.
7364         (grub_raid_scan_device): Replace `device[x].name' accesses with
7365         `device[x]->name'.  Simplify initialization of `array->device[x]'.
7367 2008-02-08  Robert Millan  <rmh@aybabtu.com>
7369         * disk/raid.c (grub_raid_open, grub_raid_scan_device): Add a few
7370         grub_dprintf() calls.
7371         * kern/disk.c (grub_disk_read): Include grub_errmsg in out of range
7372         error message.
7374 2008-02-07  Christian Franke  <franke@computer.org>
7376         * util/hostfs.c (grub_hostfs_open): Use fseeko and ftello
7377         instead of fseek and ftell to support large files.
7378         (grub_hostfs_read): Likewise.
7380 2008-02-07  Robert Millan  <rmh@aybabtu.com>
7382         Patch from Jeroen Dekkers.
7383         * disk/raid.c (grub_raid_scan_device): Reset `grub_errno' on disk
7384         failure, since successfully reading all array members might not be
7385         required.
7387 2008-02-06  Robert Millan  <rmh@aybabtu.com>
7389         * util/grub-probe.c (probe): Simplify partmap probing (with the
7390         assumption that the first word up to the underscore equals to
7391         the module name).
7393 2008-02-06  Christian Franke  <franke@computer.org>
7395         * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_NONE
7396         (and set *ofs = 0) instead of GRUB_ERR_FILE_NOT_FOUND on
7397         last block of a cpio or tar stream.
7398         Check for "TRAILER!!!" instead of any empty data
7399         block to detect last block of a cpio stream.
7400         (grub_cpio_dir): Fix constness of variable np.
7401         (grub_cpio_open): Return GRUB_ERR_FILE_NOT_FOUND if
7402         cpio or tar trailer is detected.  This fixes a crash
7403         on open of a non existing file.
7405 2008-02-05  Bean  <bean123ch@gmail.com>
7407         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Get physical
7408         address of entry.
7409         (grub_multiboot_load_elf64): Likewise.
7410         (grub_multiboot): Initialize mbi structure.
7412         * util/grub-fstest.c: Don't include unused header file script.h.
7414         * conf/common.rmk (grub-fstest.c_DEPENDENCIES): Move to the beginning
7415         of file.
7416         (grub_fstest_SOURCES): Likewise.
7418 2008-02-05  Robert Millan  <rmh@aybabtu.com>
7420         * include/grub/term.h (GRUB_TERM_LEFT, GRUB_TERM_RIGHT)
7421         (GRUB_TERM_UP, GRUB_TERM_DOWN, GRUB_TERM_HOME, GRUB_TERM_END)
7422         (GRUB_TERM_DC, GRUB_TERM_PPAGE, GRUB_TERM_NPAGE, GRUB_TERM_ESC)
7423         (GRUB_TERM_TAB, GRUB_TERM_BACKSPACE): New macros.
7425         * kern/i386/pc/startup.S: Include `<grub/term.h>'.
7426         (translation_table): Replace hardcoded values with macros
7427         provided by `<grub/term.h>'.
7429         * term/i386/pc/at_keyboard.c: Include `<grub/term.h>'.
7430         (keyboard_map): Correct/add a few values, with macros provided
7431         by `<grub/term.h>'.
7432         (keyboard_map_shift): Zero values that don't differ from their
7433         `keyboard_map' equivalents.
7434         (grub_console_checkkey): Optimize KEYBOARD_STATUS_CAPS_LOCK toggling.
7435         Discard the second scan code that is always sent by Caps lock.
7436         Only use `keyboard_map_shift' when it provides a non-zero value,
7437         otherwise fallback to `keyboard_map'.
7439 2008-02-04  Bean  <bean123ch@gmail.com>
7441         * Makefile.in (enable_grub_fstest): New variable.
7443         * conf/common.rmk (grub_fstest_init.lst): New rule.
7444         (grub_fstest_init.h): Likewise.
7445         (grub_fstest_init.c): Likewise.
7446         (util/grub-fstest.c_DEPENDENCIES): New variable.
7447         (grub_fstest_SOURCES): Likewise.
7449         * configure.ac (enable_grub_fstest): Check for --enable-grub-fstest.
7451         * util/grub-fstest.c: New file.
7453 2008-02-03  Yoshinori K. Okuji  <okuji@enbug.org>
7455         Make grub-setup handle a separate root device.
7457         * util/i386/pc/grub-setup.c (setup): Always open the root device,
7458         so that the root device can be compared with the destination
7459         device.
7460         When embedding the core image, if the root and destination devices
7461         are different, set ROOT_DRIVE to ROOT_DEV->DISK->ID. Otherwise, to
7462         0xFF.
7463         When not embedding, set ROOT_DRIVE to 0xFF.
7465 2008-02-03  Yoshinori K. Okuji  <okuji@enbug.org>
7467         Add support for having a grub directory in a different drive. This
7468         is still only the data handling part.
7470         * kern/i386/pc/startup.S (multiboot_trampoline): Set %dh to 0xFF.
7471         (codestart): Save %dh in GRUB_ROOT_DRIVE.
7472         (grub_root_drive): New variable.
7474         * kern/i386/pc/init.c (make_install_device): Use GRUB_ROOT_DRIVE
7475         instead of GRUB_BOOT_DRIVE to construct a device name. Set
7476         GRUB_ROOT_DRIVE to GRUB_BOOT_DRIVE if it is 0xFF, otherwise use it
7477         as it was.
7479         * include/grub/i386/pc/kernel.h (grub_root_drive): New prototype.
7481         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_ROOT_DRIVE): New
7482         macro.
7483         (GRUB_BOOT_MACHINE_DRIVE_CHECK): Set to 0x4f.
7485         * boot/i386/pc/pxeboot.S (_start): Set %dh to 0xFF. For now, this
7486         is bogus, because PXE booting does not specify any drive
7487         correctly.
7489         * boot/i386/pc/lnxboot.S (reg_edx): Set the second byte to 0xFF. I
7490         am not sure if this is really correct.
7492         * boot/i386/pc/cdboot.S: Set %dh to 0xFF, because the root drive
7493         is always identical to the boot drive when booting from a CD.
7495         * boot/i386/pc/boot.S (MOV_MEM_TO_AL): Removed. Not needed any
7496         longer.
7497         (root_drive): New variable.
7498         (real_start): Unconditionally set %dh to ROOT_DRIVE.
7499         (setup_sectors): Push %dx right after popping it, because %dh will
7500         be modified later.
7501         (copy_buffer): Restore %dx.
7503 2008-02-03  Robert Millan  <rmh@aybabtu.com>
7505         * util/i386/pc/grub-mkrescue.in: Rewrite most of image generation to
7506         use `cdboot.img' for cdrom images.
7508 2008-02-03  Robert Millan  <rmh@aybabtu.com>
7510         * util/grub.d/00_header.in: Issue scripting commands for GRUB to
7511         only setup gfxterm when `font' command has succeeded.
7513 2008-02-03  Robert Millan  <rmh@aybabtu.com>
7515         * loader/multiboot_loader.c [GRUB_MACHINE_LINUXBIOS]
7516         (grub_rescue_cmd_multiboot_loader)
7517         (grub_rescue_cmd_module_loader): Enable multiboot1 calls.
7519 2008-02-03  Pavel Roskin  <proski@gnu.org>
7521         * kern/i386/pc/startup.S (grub_chainloader_real_boot): Pop
7522         %edx and %esi from stack only after grub_gate_a20() is called.
7523         grub_gate_a20() clobbers %edx.
7525 2008-02-03  Yoshinori K. Okuji  <okuji@enbug.org>
7527         * configure.ac (AC_INIT): Bumped to 1.96.
7529         * DISTLIST: Added boot/i386/pc/cdboot.S, bus/pci.c,
7530         commands/lspci.c,disk/memdisk.c, include/grub/pci.h,
7531         include/grub/i386/pc/pci.h, video/readers/jpeg.c, and
7532         video/readers/png.c.
7534 2008-02-03  Bean  <bean123ch@gmail.com>
7536         * conf/i386-pc.rmk (pkglib_IMAGES): Add cdboot.img.
7537         (cdboot_img_SOURCES): New variable.
7538         (cdboot_img_ASFLAGS): New variable.
7539         (cdboot_img_LDFLAGS): New variable.
7541         * boot/i386/pc/cdboot.S: New file.
7543         * disk/i386/pc/biosdisk.c (cd_start): New variable.
7544         (cd_count): Likewise.
7545         (grub_biosdisk_get_drive): Add support for cd device.
7546         (grub_biosdisk_call_hook): Likewise.
7547         (grub_biosdisk_iterate): Likewise.
7548         (grub_biosdisk_open): Likewise.
7549         (GRUB_BIOSDISK_CDROM_RETRY_COUNT): New macro.
7550         (grub_biosdisk_rw): Support reading from cd device.
7551         (GRUB_MOD_INIT): Iterate cd devices.
7553         * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_FLAG_CDROM): New macro.
7554         (GRUB_BIOSDISK_MACHINE_CDROM_START): Likewise.
7555         (GRUB_BIOSDISK_MACHINE_CDROM_END): Likewise.
7557         * kern/i386/pc/init.c (make_install_device): Check for cd device.
7559 2008-02-02  Robert Millan  <rmh@aybabtu.com>
7561         * commands/read.c: New file.
7562         * conf/common.rmk (pkglib_MODULES): Add `commands/read.c'.
7563         (read_mod_SOURCES): New variable.
7564         (read_mod_CFLAGS): Likewise.
7565         (read_mod_LDFLAGS): Likewise.
7567 2008-02-02  Robert Millan  <rmh@aybabtu.com>
7569         * normal/main.c (grub_normal_execute): Check for `menu->size' when
7570         determining whether menu has to be displayed.
7572 2008-02-02  Marco Gerards  <marco@gnu.org>
7574         * bus/pci.c: New file.
7576         * include/grub/pci.h: Likewise.
7578         * include/grub/i386/pc/pci.h: Likewise.
7580         * commands/lspci.c: Likewise.
7582         * conf/i386-pc.rmk (pkglib_MODULES): Add `pci.mod' and
7583         `lspci.mod'.
7584         (pci_mod_SOURCES): New variable.
7585         (pci_mod_CFLAGS): Likewise.
7586         (pci_mod_LDFLAGS): Likewise.
7587         (lspci_mod_SOURCES): Likewise.
7588         (lspci_mod_CFLAGS): Likewise.
7589         (lspci_mod_LDFLAGS): Likewise.
7591 2008-02-02  Bean  <bean123ch@gmail.com>
7593         * fs/ufs.c (INODE_BLKSZ): Fix incorrect value.
7594         (grub_ufs_get_file_block): Fix indirect block calculation problem.
7596         * fs/xfs.c (grub_xfs_sblock): New member log2_dirblk.
7597         (grub_xfs_btree_node): New structure.
7598         (grub_xfs_btree_root): New structure.
7599         (grub_xfs_inode): New members nblocks, extsize, nextents and btree.
7600         (GRUB_XFS_EXTENT_OFFSET): Use exts instead of inode->data.extents.
7601         (GRUB_XFS_EXTENT_BLOCK): Likewise.
7602         (GRUB_XFS_EXTENT_SIZE): Likewise.
7603         (grub_xfs_read_block): Support btree format type.
7604         (grub_xfs_iterate_dir): Use NESTED_FUNC_ATTR in call_hook.
7605         Use directory block as basic unit.
7607         * fs/fshelp.c (grub_fshelp_read_file): Bug fix for sparse block.
7609         * aclocal.m4 (grub_i386_CHECK_REGPARM_BUG): Define NESTED_FUNC_ATTR as
7610         __attribute__ ((__regparm__ (1))).
7612 2008-02-01  Robert Millan  <rmh@aybabtu.com>
7614         Correct a mistake in previous commit.
7616         * conf/i386-pc.rmk (normal/execute.c_DEPENDENCIES): Move to the
7617         top.
7618         (normal/command.c_DEPENDENCIES): New variable.
7620 2008-02-01  Robert Millan  <rmh@aybabtu.com>
7622         * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Move to the
7623         top.
7624         (normal/command.c_DEPENDENCIES): New variable.
7625         (grub-emu_DEPENDENCIES, normal_mod_DEPENDENCIES): Remove variables.
7626         * conf/i386-ieee1275.rmk: Likewise.
7627         * conf/i386-linuxbios.rmk: Likewise.
7628         * conf/i386-pc.rmk: Likewise.
7629         * conf/sparc64-ieee1275.rmk: Likewise.
7630         * conf/powerpc-ieee1275.rmk: Likewise.
7631         (grub_emu_SOURCES): Add `fs/fshelp.c'.
7633         * genmk.rb: Add `$(#{src}_DEPENDENCIES)' in targets that require it.
7635 2008-02-01  Robert Millan  <rmh@aybabtu.com>
7637         * kern/disk.c (grub_disk_read, grub_disk_write): Add grub_dprintf()
7638         call at beginning of function.
7640 2008-01-31  Pavel Roskin  <proski@gnu.org>
7642         * util/powerpc/ieee1275/grub-mkrescue.in: New file.
7643         * conf/powerpc-ieee1275.rmk (bin_SCRIPTS): New variable.
7644         (grub_mkrescue_SOURCES): Likewise.
7645         * DISTLIST: Add util/powerpc/ieee1275/grub-mkrescue.in.
7647 2008-01-30  Robert Millan  <rmh@aybabtu.com>
7649         * conf/i386-pc.rmk (sbin_UTILITIES): Remove `grub-probe'.
7650         (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Moved from here ...
7651         * conf/common.rmk (util/grub-probe.c_DEPENDENCIES)
7652         (grub_probe_SOURCES): ... to here.
7654         * conf/i386-efi.rmk (sbin_UTILITIES): Remove `grub-probe'.
7655         (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Remove.
7656         * conf/i386-ieee1275.rmk: Likewise.
7657         * conf/i386-linuxbios.rmk: Likewise.
7658         * conf/powerpc-ieee1275.rmk: Likewise.
7660 2008-01-30  Tristan Gingold  <gingold@free.fr>
7662         * kern/rescue.c: Silently accept empty lines.
7664 2008-01-29  Bean  <bean123ch@gmail.com>
7666         * boot/i386/pc/lnxboot.S (data_start): Code cleanup.
7667         (real_code_2): Code cleanup and change comment style.
7668         (move_memory): Avoid using 32-bit address mode.
7670 2008-01-29  Bean  <bean123ch@gmail.com>
7672         * conf/i386-pc.rmk (pkglib_MODULES): Add `png.mod'.
7673         (png_mod_SOURCES): New variable.
7674         (png_mod_CFLAGS): Likewise.
7675         (png_mod_LDFLAGS): Likewise.
7677         * video/readers/png.c: New file.
7679 2008-01-28  Robert Millan  <rmh@aybabtu.com>
7681         * include/grub/i386/linuxbios/kernel.h (GRUB_MOD_GAP): New macro.
7682         * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Remove
7683         `ifndef GRUB_MOD_GAP' hack.
7684         * util/elf/grub-mkimage.c (add_segments): Likewise.
7686 2008-01-27  Robert Millan  <rmh@aybabtu.com>
7688         * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Skip
7689         `GRUB_MOD_GAP' for platforms in which it's not defined.
7690         * util/elf/grub-mkimage.c (add_segments): Likewise.
7692 2008-01-27  Robert Millan  <rmh@aybabtu.com>
7694         Get grub-emu to build again (including parallel builds).
7696         * conf/i386-pc.rmk (util/grub-emu.c_DEPENDENCIES): Remove variable.
7697         Split into ...
7698         (util/grub-emu.c_DEPENDENCIES): ... this, ...
7699         (normal/execute.c_DEPENDENCIES): ... this, ...
7700         (grub-emu_DEPENDENCIES): ... and this.
7702         * conf/i386-efi.rmk: Likewise.
7703         * conf/i386-linuxbios.rmk: Likewise.
7704         * conf/i386-ieee1275.rmk: Likewise.
7705         * conf/powerpc-ieee1275.rmk: Likewise.
7706         (grub_emu_SOURCES): Remove duplicated `kern/file.c'.
7708 2008-01-27  Robert Millan  <rmh@aybabtu.com>
7710         * NEWS: Add a few items.
7712 2008-01-27  Robert Millan  <rmh@aybabtu.com>
7714         Fix parallel builds with grub-emu.  Based on earlier commit for
7715         grub-probe and grub-setup.
7717         * conf/i386-pc.rmk (grub-emu_DEPENDENCIES): Renamed to ...
7718         (util/grub-emu.c_DEPENDENCIES): ... this.
7719         * conf/i386-efi.rmk (grub-emu_DEPENDENCIES): Renamed to ...
7720         (util/grub-emu.c_DEPENDENCIES): ... this.
7721         * conf/i386-linuxbios.rmk (grub-emu_DEPENDENCIES): Renamed to ...
7722         (util/grub-emu.c_DEPENDENCIES): ... this.
7723         * conf/i386-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
7724         (util/grub-emu.c_DEPENDENCIES): ... this.
7725         * conf/powerpc-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
7726         (util/grub-emu.c_DEPENDENCIES): ... this.
7728 2008-01-27  Pavel Roskin  <proski@gnu.org>
7730         * include/grub/powerpc/ieee1275/kernel.h: Introduce GRUB_MOD_GAP
7731         to create a gap between _end and the modules added to the image
7732         with grub-mkrescue.  That fixes "CLAIM failed" on PowerMAC.
7733         * kern/powerpc/ieee1275/init.c: Use GRUB_MOD_GAP.
7734         * util/elf/grub-mkimage.c (add_segments): Likewise.
7736 2008-01-26  Pavel Roskin  <proski@gnu.org>
7738         * kern/dl.c (grub_dl_load): Don't abort if prefix is not set,
7739         just return an error.
7741 2008-01-26  Bean  <bean123ch@gmail.com>
7743         * fs/reiserfs.c (grub_fshelp_node): New member next_offset.
7744         (grub_reiserfs_get_item): Save offset of the next item.
7745         (grub_reiserfs_iterate_dir): Use next_offset to find next item.
7747 2008-01-25  Robert Millan  <rmh@aybabtu.com>
7749         * conf/i386-pc.rmk (grub_setup_SOURCES, grub_emu_SOURCES): Regroup to
7750         make all filesystem sources appear together (possibly fixing omissions
7751         while at it).
7752         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
7753         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7754         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
7755         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7757         * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.  Additionally,
7758         add `kern/file.c'.
7759         * conf/i386-efi.rmk (grub_probe_SOURCES): Likewise.
7760         * conf/i386-ieee1275.rmk (grub_probe_SOURCES): Likewise.
7761         * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Likewise.
7762         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Likewise.
7764         * util/grub-probe.c: Include `<grub/file.h>' and `<sys/stat.h>'.
7765         (probe): Add a sanity check to make sure of our ability to read
7766         requested files when probing for filesystem type.
7768         * genmk.rb: Update copyright year (2007).
7770         * include/grub/fs.h (grub_fat_init, grub_fat_fini, grub_ext2_init)
7771         (grub_ext2_fini, grub_ufs_init, grub_ufs_fini, grub_minix_init)
7772         (grub_minix_fini, grub_hfs_init, grub_hfs_fini, grub_jfs_init)
7773         (grub_jfs_fini, grub_xfs_init, grub_xfs_fini, grub_affs_init)
7774         (grub_affs_fini, grub_sfs_init, grub_sfs_fini, grub_iso9660_init)
7775         : Remove function prototypes.
7777 2008-01-25  Robert Millan  <rmh@aybabtu.com>
7779         Revert my previous commits (based on wrong assumption of how grub_errno
7780         works).
7782         * kern/disk.c (grub_disk_open): Stop resetting grub_errno.
7783         * kern/file.c (grub_file_open): Likewise.
7785 2008-01-24  Pavel Roskin  <proski@gnu.org>
7787         * include/grub/ieee1275/ieee1275.h: Introduce flag for firmwares
7788         that hang if GRUB tries to setup colors.
7789         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Don't set
7790         colors for firmwares that don't support it.
7791         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag):
7792         Recognize Open Hack'Ware, set flags to work around its
7793         limitations.
7795 2008-01-24  Robert Millan  <rmh@aybabtu.com>
7797         * kern/file.c (grub_file_open): Do not account previous failures of
7798         unrelated functions when grub_errno is checked for.
7799         Reported by Oleg Strikov.
7801 2008-01-24  Bean  <bean123ch@gmail.com>
7803         * fs/ufs.c (GRUB_UFS_VOLNAME_LEN): New macro.
7804         (grub_ufs_sblock): New member volume name.
7805         (grub_ufs_find_file): Fix string copy bug.
7806         (grub_ufs_label): Implement this function properly.
7808         * fs/hfs.c (grub_hfs_cnid_type): New enum.
7809         (grub_hfs_iterate_records): Use the correct file number for extents
7810         and catalog file. Fix problem in next index calculation.
7811         (grub_hfs_find_node): Replace recursive function call with loop.
7812         (grub_hfs_iterate_dir): Replace recursive function call with loop.
7814 2008-01-23  Robert Millan  <rmh@aybabtu.com>
7816         * include/grub/i386/ieee1275/loader.h: Include `<grub/types.h>',
7817         `<grub/symbol.h>' and `<grub/multiboot.h>'.
7818         (grub_multiboot2_real_boot): New function prototype.
7820         * include/grub/i386/pc/memory.h: Include `<grub/machine/machine.h>'.
7821         [!GRUB_MACHINE_IEEE1275] (grub_lower_mem, grub_upper_mem): Disable.
7823         * kern/i386/ieee1275/init.c (grub_os_area_addr)
7824         (grub_os_area_size, grub_lower_mem, grub_upper_mem): Remove variables.
7826 2008-01-23  Robert Millan  <rmh@aybabtu.com>
7828         * kern/mm.c (grub_mm_init_region): Replace grub_dprintf() call with
7829         #ifdef'ed out grub_printf().
7831 2008-01-23  Robert Millan  <rmh@aybabtu.com>
7833         * term/i386/pc/at_keyboard.c (grub_keyboard_isr): #ifdef out
7834         grub_dprintf calls, since they make "debug=all" mode unusable.
7835         (grub_console_checkkey): Likewise.
7837 2008-01-23  Robert Millan  <rmh@aybabtu.com>
7839         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
7840         `term/i386/pc/at_keyboard.c'.
7841         (pkglib_MODULES): Add `serial.mod'.
7842         (serial_mod_SOURCES): New variable.
7843         (serial_mod_CFLAGS): Likewise.
7844         (serial_mod_LDFLAGS): Likewise.
7846         * include/grub/i386/ieee1275/console.h: Add `<grub/symbol.h>'.  Remove
7847         `<grub/powerpc/ieee1275/console.h>'.
7848         (grub_keyboard_controller_init): New function prototype.
7849         (grub_console_checkkey): Likewise.
7850         (grub_console_getkey): Likewise.
7852         * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize AT
7853         keyboard on i386.
7855         * term/ieee1275/ofconsole.c (grub_ofconsole_term): On i386, use
7856         grub_ofconsole_checkkey() and grub_ofconsole_getkey() for input.
7858 2008-01-23  Robert Millan  <rmh@aybabtu.com>
7860         * kern/i386/pc/init.c (make_install_device): When memdisk image is
7861         present, "(memdisk)/boot/grub" becomes the default prefix.
7863         * util/i386/pc/grub-mkrescue.in: Switch to a minimal core.img plus
7864         a memdisk tarball with all the modules.  Add --overlay=DIR option that
7865         allows users to overlay additional files into the image.
7867 2008-01-23  Robert Millan  <rmh@aybabtu.com>
7869         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add `machine/loader.h'
7870         and `machine/memory.h'.
7871         (pkglib_MODULES): Add `multiboot.mod' and `_multiboot.mod'.
7872         (_multiboot_mod_SOURCES): New variable.
7873         (_multiboot_mod_CFLAGS): Likewise.
7874         (_multiboot_mod_LDFLAGS): Likewise.
7875         (multiboot_mod_SOURCES): Likewise.
7876         (multiboot_mod_CFLAGS): Likewise.
7877         (multiboot_mod_LDFLAGS): Likewise.
7879         * include/grub/i386/ieee1275/loader.h: New file.
7881         * include/grub/i386/ieee1275/machine.h: Likewise.
7883         * include/grub/i386/ieee1275/memory.h: Likewise.
7885         * include/grub/i386/pc/init.h (grub_os_area_addr): Remove (redundant)
7886         variable declaration.
7887         (grub_os_area_size): Likewise.
7889         * kern/i386/ieee1275/init.c (grub_os_area_addr, grub_os_area_size)
7890         (grub_lower_mem, grub_upper_mem): New variables.
7891         (grub_stop_floppy): New function (just to make
7892         grub_multiboot2_real_boot() happy).
7894         * kern/i386/ieee1275/startup.S: Include `<grub/machine/memory.h>',
7895         `<grub/cpu/linux.h>', `<multiboot.h>' and `<multiboot2.h>'.
7896         (grub_stop): New function.
7897         Include `"../realmode.S"' and `"../loader.S"'.
7899         * loader/multiboot_loader.c: Include `<grub/machine/machine.h>'.
7900         Replace `__i386__' #ifdefs with `GRUB_MACHINE_PCBIOS'.
7902         * loader/powerpc/ieee1275/multiboot2.c (grub_mb2_arch_boot): On i386,
7903         rely on grub_multiboot2_real_boot() for final boot.
7905 2008-01-22  Robert Millan  <rmh@aybabtu.com>
7907         * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): When
7908         `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag is set, skip any
7909         device that doesn't look like an SD card.
7910         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
7911         `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag.
7912         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag): Detect
7913         OLPC laptop, and set `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' when
7914         found.
7916 2008-01-22  Robert Millan  <rmh@aybabtu.com>
7918         * kern/powerpc/ieee1275/init.c (grub_claim_heap): Add sanity check to
7919         avoid claiming over our own code.
7921 2008-01-22  Bean  <bean123ch@gmail.com>
7923         * conf/i386-pc.rmk (pkglib_MODULES): Add `jpeg.mod'.
7924         (jpeg_mod_SOURCES): New variable.
7925         (jpeg_mod_CFLAGS): Likewise.
7926         (jpeg_mod_LDFLAGS): Likewise.
7928         * video/readers/jpeg.c : New file.
7930 2008-01-22  Bean  <bean123ch@gmail.com>
7932         * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_FILE_NOT_FOUND when
7933         there are no more items.
7935 2008-01-21  Robert Millan  <rmh@aybabtu.com>
7937         * kern/mm.c (grub_mm_init_region): Improve debug message.
7939 2008-01-21  Robert Millan  <rmh@aybabtu.com>
7941         * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): New variable.
7942         (kernel_img_LDFLAGS): Use `GRUB_MEMORY_MACHINE_LINK_ADDR' as link
7943         address.
7944         (grub_mkimage_CFLAGS): Propagate `GRUB_MEMORY_MACHINE_LINK_ADDR' as
7945         a C macro.
7946         * include/grub/i386/pc/memory.h (GRUB_MEMORY_MACHINE_UPPER): New macro.
7947         Indicates start of upper memory.
7948         * util/i386/pc/grub-mkimage.c: Include `<grub/machine/memory.h>'.
7949         (generate_image): Abort when image size is big enough to corrupt
7950         upper memory.
7952         * include/grub/i386/pc/vga.h: Include `<grub/machine/memory.h>'.
7953         (GRUB_MEMORY_MACHINE_VGA_ADDR): Alias for `GRUB_MEMORY_MACHINE_UPPER'.
7954         * term/i386/pc/vga.c (VGA_MEM): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
7955         instead of hardcoding 0xA0000.
7956         * video/i386/pc/vbe.c: Include `<grub/machine/vga.h>'.
7957         (grub_vbe_set_video_mode): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
7958         instead of hardcoding 0xA0000.
7960 2008-01-21  Robert Millan  <rmh@aybabtu.com>
7962         * disk/memdisk.c (memdisk_size): New variable.
7963         (grub_memdisk_open): Replace grub_arch_memdisk_size() call with
7964         `memdisk_size'.
7965         (grub_memdisk_init): Initialize `memdisk_size'.  Reallocate memdisk
7966         image to dynamic memory.
7967         (grub_memdisk_fini): Replace grub_arch_memdisk_size() call with
7968         `memdisk_size'.  Free memdisk block.
7970 2008-01-21  Robert Millan  <rmh@aybabtu.com>
7972         Fix detection of very small filesystems (like tar).
7974         * fs/reiserfs.c (grub_reiserfs_mount): When disk is too small to
7975         contain a ReiserFS, abort with GRUB_ERR_BAD_FS rather than
7976         GRUB_ERR_OUT_OF_RANGE (which made the upper layer think there's
7977         a problem with this disk).
7979 2008-01-21  Robert Millan  <rmh@aybabtu.com>
7981         * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Add debug message
7982         on grub_biosdisk_rw_standard() error.
7984 2008-01-21  Robert Millan  <rmh@aybabtu.com>
7986         * include/grub/ieee1275/ieee1275.h: Add 2008 to Copyright line for
7987         recent changes.
7988         * kern/elf.c: Likewise.
7989         * kern/ieee1275/ieee1275.c: Likewise.
7990         * kern/powerpc/ieee1275/openfw.c: Likewise.
7991         * term/ieee1275/ofconsole.c: Likewise.
7993 2008-01-21  Robert Millan  <rmh@aybabtu.com>
7995         * include/grub/i386/pc/kernel.h: Include `<grub/symbol.h>'.
7997         * include/grub/kernel.h (grub_arch_memdisk_addr)
7998         (grub_arch_memdisk_size): Moved from here ...
8000         * include/grub/i386/pc/kernel.h (grub_arch_memdisk_addr)
8001         (grub_arch_memdisk_size): ... to here.
8003 2008-01-21  Robert Millan  <rmh@aybabtu.com>
8005         Mostly based on bugfix from Bean.
8007         * kern/elf.c (grub_elf32_phdr_iterate): Use `NESTED_FUNC_ATTR'
8008         attribute with hook() parameter.
8009         (grub_elf32_load): Use `NESTED_FUNC_ATTR' with grub_elf32_load_segment()
8010         declaration.
8011         (grub_elf64_phdr_iterate): Use `NESTED_FUNC_ATTR'
8012         attribute with hook() parameter.
8013         (grub_elf64_load): Use `NESTED_FUNC_ATTR' with grub_elf64_load_segment()
8014         declaration.
8016 2008-01-21  Robert Millan  <rmh@aybabtu.com>
8018         * conf/i386-pc.rmk (kernel_img_HEADERS): Add `machine/kernel.h'.
8019         (pkglib_MODULES): Add `memdisk.mod'.
8020         (memdisk_mod_SOURCES): New variable.
8021         (memdisk_mod_CFLAGS): Likewise.
8022         (memdisk_mod_LDFLAGS): Likewise.
8024         * disk/memdisk.c: New file.
8026         * include/grub/disk.h (grub_disk_dev_id): Add
8027         `GRUB_DISK_DEVICE_MEMDISK_ID'.
8029         * include/grub/i386/pc/kernel.h
8030         (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): New macro.
8031         (GRUB_KERNEL_MACHINE_PREFIX): Increment by 4.
8032         (grub_kernel_image_size): New variable declaration.
8033         (grub_total_module_size): Likewise.
8034         (grub_memdisk_image_size): Likewise.
8036         * include/grub/i386/pc/memory.h
8037         (GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR): New macro.
8039         * include/grub/kernel.h: Include `<grub/symbol.h>'.
8040         (grub_arch_memdisk_addr): New variable declaration.
8041         (grub_arch_memdisk_size): Likewise.
8043         * kern/i386/pc/init.c (grub_arch_memdisk_addr): New function.
8044         (grub_arch_memdisk_size): Likewise.
8046         * kern/i386/pc/startup.S (grub_memdisk_image_size): New variable.
8047         (codestart): Replace hardcoded `0x100000' with
8048         `GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR' macro.
8050         * util/i386/pc/grub-mkimage.c: Include `<grub/misc.h>'.
8051         (generate_image): Add `memdisk_path' parameter.  When `memdisk_path' is
8052         not NULL, append the contents of the file it refers to, at the end of
8053         the compressed kernel image.  Initialize `grub_memdisk_image_size'
8054         variable (at `GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE' offset).
8055         (options): Add "memdisk"|'m' option.
8056         (main): Parse --memdisk|-m option, and pass user-provided path as
8057         parameter to generate_image().
8059 2008-01-20  Robert Millan  <rmh@aybabtu.com>
8061         * kern/sparc64/ieee1275/openfw.c (grub_devalias_iterate): Copy debug
8062         grub_dprintf() calls from here ...
8063         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): ... to here.
8065 2008-01-20  Robert Millan  <rmh@aybabtu.com>
8067         Fix detection of "real mode" when /options/real-mode? doesn't exist.
8069         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_mmu): New variable
8070         declaration.
8071         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_mmu): New variable.
8072         (grub_ieee1275_find_options): If `grub_ieee1275_mmu' is 0, set
8073         `GRUB_IEEE1275_FLAG_REAL_MODE'.
8074         (cmain): Initialize `grub_ieee1275_mmu' (using /chosen/mmu integer
8075         property).
8076         * kern/powerpc/ieee1275/openfw.c (grub_map): Rely on pre-initialized
8077         `grub_ieee1275_mmu' rather than obtaining a handler on every call.
8079 2008-01-19  Robert Millan  <rmh@aybabtu.com>
8081         Get rid of confusing function (superseded by
8082         `grub_ieee1275_get_integer_property')
8083         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_decode_int_4): Remove
8084         prototype.
8085         * kern/ieee1275/ieee1275.c (grub_ieee1275_decode_int_4): Remove
8086         function.
8087         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid use of
8088         grub_ieee1275_decode_int_4(), by obtaining integer properties directly
8089         in native endianness from grub_ieee1275_get_integer_property().
8091 2008-01-19  Robert Millan  <rmh@aybabtu.com>
8093         * kern/powerpc/ieee1275/openfw.c (grub_halt): Issue "power-off"
8094         command after "shut-down", since implementations differ on which
8095         the command for halt is.
8097 2008-01-19  Robert Millan  <rmh@aybabtu.com>
8099         * include/grub/i386/linuxbios/console.h: Add header protection.
8100         (grub_keyboard_controller_init): New function prototype.
8101         * term/i386/pc/at_keyboard.c (KEYBOARD_COMMAND_ISREADY): New macro.
8102         (KEYBOARD_COMMAND_READ): Likewise.
8103         (KEYBOARD_COMMAND_WRITE): Likewise.
8104         (KEYBOARD_SCANCODE_SET1): Likewise.
8105         (grub_keyboard_controller_write): New function.
8106         (grub_keyboard_controller_read): Likewise.
8107         (grub_keyboard_controller_init): Likewise.
8109         * term/i386/pc/console.c: Include `<grub/machine/machine.h>'.
8110         (grub_console_init): On coreboot/LinuxBIOS, call
8111         grub_keyboard_controller_init().
8113 2008-01-19  Robert Millan  <rmh@aybabtu.com>
8115         PowerPC changes provided by Pavel Roskin.
8117         * kern/powerpc/ieee1275/cmain.c (cmain): Don't take any arguments.
8118         * kern/powerpc/ieee1275/crt0.S: Store r5 in grub_ieee1275_entry_fn,
8119         don't rely on cmain() doing it.
8120         * kern/i386/ieee1275/startup.S (_start): Store %eax in
8121         grub_ieee1275_entry_fn, don't rely on cmain() doing it.
8123 2008-01-16  Robert Millan  <rmh@aybabtu.com>
8125         * include/grub/i386/linuxbios/memory.h
8126         (GRUB_MEMORY_MACHINE_LINUXBIOS_TABLE_ADDR): Remove macro.
8127         * kern/i386/linuxbios/table.c (grub_linuxbios_table_iterate): Do not
8128         receive `table_header' as argument.  Instead, probe for it in the
8129         known memory ranges where it can be present.
8130         (grub_available_iterate): Do not pass a fixed `table_header' address
8131         to grub_linuxbios_table_iterate().
8133 2008-01-15  Robert Millan  <rmh@aybabtu.com>
8135         * configure.ac: Add `i386-ieee1275' to the list of supported targets.
8136         * conf/i386-ieee1275.rmk: New file.
8137         * include/grub/i386/ieee1275/console.h: Likewise.
8138         * include/grub/i386/ieee1275/ieee1275.h: Likewise.
8139         * include/grub/i386/ieee1275/kernel.h: Likewise.
8140         * include/grub/i386/ieee1275/time.h: Likewise.
8141         * kern/i386/ieee1275/init.c: Likewise.
8142         * kern/i386/ieee1275/startup.S: Likewise.
8144 2008-01-15  Robert Millan  <rmh@aybabtu.com>
8146         * kern/misc.c (grub_vsprintf): Do not reset `longlongfmt' to zero
8147         when pointers are 32-bit (but still do set it to one when they are
8148         64-bit).
8150 2008-01-15  Robert Millan  <rmh@aybabtu.com>
8152         * include/grub/ieee1275/ieee1275.h
8153         (grub_ieee1275_get_integer_property): New function prototype.
8155         * kern/ieee1275/ieee1275.c: Include `<grub/types.h>'.
8156         (grub_ieee1275_get_integer_property): New function.  Wraps around
8157         grub_ieee1275_get_property() to handle endianness.
8159         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Replace
8160         grub_ieee1275_get_property() with grub_ieee1275_get_integer_property()
8161         where appropriate.
8162         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Likewise.
8163         (grub_map): Likewise.
8164         * kern/sparc64/ieee1275/openfw.c (grub_map): Likewise.
8166 2008-01-15  Bean  <bean123ch@gmail.com>
8168         * normal/execute.c (grub_script_exec_argument_to_string): Check for undefined variable.
8169         (grub_script_execute_cmdline): Reset grub_errno.
8171         * normal/main.c (read_config_file): Reset grub_errno.
8173         * normal/parse.y (script_init): New.
8174         (script): Move function and menuentry here.
8175         (delimiter): New.
8176         (command): Add delimiter at the end of command.
8177         (commands): Adjust to match the new command.
8178         (commandblock): Remove grub_script_lexer_record_start.
8179         (menuentry): Add grub_script_lexer_record_start, use the new commands.
8180         (if): Use the new commands.
8182         * conf/common.rmk (pkgdata_MODULES): Add echo.mod.
8184 2008-01-15  Robert Millan  <rmh@aybabtu.com>
8186         * normal/menu.c (run_menu): Move timeout message from here ...
8187         (print_timeout): ... to here.
8188         (run_menu): Use print_timeout() once during initial draw to print
8189         the whole message, and again in every clock tick to update only
8190         the number of seconds.
8192 2008-01-15  Robert Millan  <rmh@aybabtu.com>
8194         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Obtain
8195         actual size of `available' from grub_ieee1275_get_property(), and
8196         restrict parsing to that bound.
8198 2008-01-15  Christian Franke  <franke@computer.org>
8200         * util/grub-emu.c: Replace <argp.h> by <getopt.h>.
8201         (argp_program_version): Remove variable.
8202         (argp_program_bug_address): Likewise.
8203         (options): Convert from struct argp_option to struct option.
8204         (struct arguments): Remove.
8205         (parse_opt): Remove.
8206         (usage): New function.
8207         (main): Replace struct args members by simple variables.
8208         Replace argp_parse() by getopt_long().
8209         Add switch to evaluate options.
8210         Add missing "(...)" around root_dev in prefix string.
8212 2008-01-14  Robert Millan  <rmh@aybabtu.com>
8214         * kern/powerpc/ieee1275/init.c (grub_exit): Reimplement as a wrapper
8215         for grub_ieee1275_exit(), in order to improve portability.
8217 2008-01-14  Robert Millan  <rmh@aybabtu.com>
8219         * util/grub.d/10_linux.in (prefix): Define.
8220         (exec_prefix): Likewise.  Both definitions are later used by `libdir'.
8222 2008-01-13  Pavel Roskin  <proski@gnu.org>
8224         * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Don't use
8225         grub_errno if no errors have been detected.
8227 2008-01-12  Robert Millan  <rmh@aybabtu.com>
8229         * include/grub/util/getroot.h (grub_dev_abstraction_types): New enum.
8230         (grub_util_get_dev_abstraction): New function prototype.
8232         * util/getroot.c: Include `<grub/util/getroot.h>'
8233         (grub_util_get_grub_dev): Move detection of abstraction type to ...
8234         (grub_util_get_dev_abstraction): ... here (new function).
8236         * util/grub-probe.c: Convert PRINT_* to an enum.  Add
8237         `PRINT_ABSTRACTION'.
8238         (probe): Probe for abstraction type when requested.
8239         (main): Understand `--target=abstraction'.
8241         * util/i386/efi/grub-install.in: Add abstraction module to core
8242         image when it is found to be necessary.
8243         * util/i386/pc/grub-install.in: Likewise.
8244         * util/powerpc/ieee1275/grub-install.in: Likewise.
8246         * util/update-grub_lib.in (font_path): Return system path without
8247         converting to GRUB path.
8248         * util/update-grub.in: Convert system path returned by font_path()
8249         to a GRUB path.  Use `grub-probe -t abstraction' to determine what
8250         abstraction module is needed for loading fonts (if any).  Export
8251         that as `GRUB_PRELOAD_MODULES'.
8252         * util/grub.d/00_header.in: Process `GRUB_PRELOAD_MODULES' (print
8253         insmod commands).
8255 2008-01-12  Yoshinori K. Okuji  <okuji@enbug.org>
8257         Remove some unused code from reiserfs.
8259         * fs/reiserfs.c (struct grub_reiserfs_key)
8260         [GRUB_REISERFS_KEYV2_BITFIELD]: Removed offset and type.
8261         (struct grub_reiserfs_node_body): Removed.
8262         (grub_reiserfs_get_key_v2_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
8263         Likewise.
8264         (grub_reiserfs_get_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
8265         Likewise.
8266         (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
8267         Likewise.
8268         (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
8269         Likewise.
8270         (grub_reiserfs_set_key_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
8271         Likewise.
8272         (grub_reiserfs_iterate_dir) [GRUB_REISERFS_KEYV2_BITFIELD]:
8273         Likewise.
8274         (grub_reiserfs_open) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
8275         (grub_reiserfs_read) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
8276         (grub_reiserfs_dir) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
8278 2008-01-10  Robert Millan  <rmh@aybabtu.com>
8280         * util/update-grub_lib.in (grub_file_is_not_garbage): New function.
8281         Determines if a file is garbage left by packaging systems, etc.
8282         * util/update-grub.in: Use grub_file_is_not_garbage() as a condition
8283         for processing /etc/grub.d scripts.
8284         * util/grub.d/10_hurd.in: Fix `GRUB_DISTRIBUTOR' comparison.
8285         * util/grub.d/10_linux.in: Likewise.  Use grub_file_is_not_garbage()
8286         as a condition for processing Linux images.
8288 2008-01-10  Pavel Roskin  <proski@gnu.org>
8290         * include/grub/powerpc/libgcc.h (__ucmpdi2): New export.  Needed
8291         to compile reiserfs.c on PowerPC.
8293 2008-01-10  Robert Millan  <rmh@aybabtu.com>
8295         * kern/device.c (grub_device_iterate): Do not abort device iteration
8296         when one of the devices cannot be opened.
8297         * kern/disk.c (grub_disk_open): Do not account previous failures of
8298         unrelated functions when grub_errno is checked for.
8300 2008-01-08  Robert Millan  <rmh@aybabtu.com>
8302         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): For
8303         `! grub_linux_is_bzimage', change order of address comparison to make
8304         it more intuitive, and improve "too big zImage" error message.
8306 2008-01-08  Robert Millan  <rmh@aybabtu.com>
8308         * Makefile.in (uninstall): Handle `$(update-grub_SCRIPTS)' and
8309         `$(update-grub_DATA)'.
8310         (distcheck): Fix race condition when invoking `$(MAKE)' on multiple
8311         targets.
8313 2008-01-07  Robert Millan  <rmh@aybabtu.com>
8315         * boot/i386/pc/boot.S (boot_drive_check): Add a comment indicating
8316         which instruction is modified by grub-setup during installation
8317         (since it wasn't obvious by only looking at this file).
8319 2008-01-07  Robert Millan  <rmh@aybabtu.com>
8321         * TODO: Rewrite.  Just refer to the wiki and the BTS instead of
8322         listing actual TODO items.
8324 2008-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
8326         * fs/reiserfs.c (grub_reiserfs_get_key_v2_type): Handle endianness
8327         correctly.
8328         (grub_reiserfs_get_key_offset): Likewise.
8329         (grub_reiserfs_set_key_offset): Likewise.
8330         (grub_reiserfs_set_key_type): Likewise.
8331         (grub_reiserfs_iterate_dir): Return 1 if found, otherwise 0.
8333         (GRUB_REISERFS_KEYV2_BITFIELD): Undefined. Probably it would be
8334         better to remove the bitfield version completely.
8336 2008-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
8338         * fs/reiserfs.c (grub_reiserfs_iterate_dir): ENTRY_ITEM must be
8339         allocated from the heap, due to the fshelp implementation.
8340         (grub_reiserfs_dir): Free NODE, due to the same reason.
8342 2008-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
8344         Mostly from Vincent Pelletier:
8346         * fs/reiserfs.c: New file.
8348         * conf/common.rmk (pkglib_MODULES): Added reiserfs.mod.
8349         (reiserfs_mod_SOURCES): New variable.
8350         (reiserfs_mod_CFLAGS): Likewise.
8351         (reiserfs_mod_LDFLAGS): Likewise.
8353         * DISTLIST: Added boot/i386/pc/lnxboot.S, commands/hexdump.c,
8354         disk/ata.c, fs/cpio.c, fs/ntfscomp.c, fs/reiserfs.c,
8355         include/grub/ntfs.h, include/grub/i386/pc/machine.h, and
8356         normal/color.c.
8358 2008-01-06  Robert Millan  <rmh@aybabtu.com>
8360         * normal/color.c: Remove `<grub/env.h>'.
8362 2008-01-05  Jeroen Dekkers  <jeroen@dekkers.cx>
8364         * include/grub/normal.h: Include <grub/env.h>.
8366 2008-01-05  Robert Millan  <rmh@aybabtu.com>
8368         * util/i386/pc/grub-setup.c (usage): Replace obsolete `(hd0,0)' in
8369         usage example with `(hd0,1)'.
8370         Reported by Samuel Thibault.
8372 2008-01-05  Robert Millan  <rmh@aybabtu.com>
8374         * kern/i386/loader.S (grub_linux_is_bzimage): New variable.
8375         (grub_linux_boot_zimage): Rename to ...
8376         (grub_linux_boot): ... this.
8377         (grub_linux_boot_bzimage): Merge with `grub_linux_boot_zimage'.
8378         (grub_linux_boot_zimage): Conditionalize zImage copy.
8380         * include/grub/i386/loader.h (grub_linux_is_bzimage): Add prototype.
8381         (grub_linux_boot_bzimage): Remove prototype.
8382         (grub_linux_boot_zimage): Rename to ...
8383         (grub_linux_boot): ... this.
8385         * loader/i386/pc/linux.c (big_linux): Replace with `grub_linux_is_bzimage'.
8386         (grub_linux_boot): Remove function.
8388 2008-01-05  Robert Millan  <rmh@aybabtu.com>
8390         * include/grub/normal.h (grub_env_write_color_normal): New prototype.
8391         (grub_env_write_color_highlight): Likewise.
8392         (grub_wait_after_message): Likewise.
8394         * normal/color.c: New file.
8396         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/color.c'.
8397         (normal_mod_DEPENDENCIES): Likewise.
8399         * conf/i386-efi.rmk (grub_emu_SOURCES): Add `normal/color.c'.
8400         (normal_mod_DEPENDENCIES): Likewise.
8402         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add `normal/color.c'.
8403         (normal_mod_DEPENDENCIES): Likewise.
8405         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `normal/color.c'.
8406         (normal_mod_DEPENDENCIES): Likewise.
8408         * normal/menu_entry.c (run): Rely on grub_wait_after_message()
8409         for waiting after a message is printed.
8410         * normal/main.c (read_config_file): Likewise.
8411         (grub_normal_init): Register grub_env_write_color_normal() and
8412         grub_env_write_color_highlight() hooks.  Mark `color_normal' and
8413         `color_highlight' variables as global.
8415         * normal/menu.c (grub_wait_after_message): New function.
8416         (grub_color_menu_normal): New variable.  Replaces ...
8417         (GRUB_COLOR_MENU_NORMAL): ... this macro.
8418         (grub_color_menu_highlight): New variable.  Replaces ...
8419         (GRUB_COLOR_MENU_HIGHLIGHT): ... this macro.
8420         (draw_border): Set color state to `GRUB_TERM_COLOR_NORMAL' instead of
8421         `GRUB_TERM_COLOR_STANDARD'.
8422         (print_message): Use `grub_setcolorstate' to reload colors.  Rename
8423         `normal_code' and `highlight_code' to `old_color_normal' and
8424         `old_color_highlight', respectively.
8425         (grub_menu_init_page): Update colors when drawing the menu, based on
8426         `menu_color_normal' and `menu_color_highlight' variables.
8427         (grub_menu_run): Rely on grub_wait_after_message() for waiting after
8428         a message is printed.
8430 2008-01-05  Robert Millan  <rmh@aybabtu.com>
8432         * kern/env.c (grub_env_context_open): Propagate hooks for global
8433         variables to new context.
8435         * kern/main.c (grub_set_root_dev): Export `root' variable.
8437 2008-01-05  Robert Millan  <rmh@aybabtu.com>
8439         * util/biosdisk.c (get_os_disk): Check for devfs-style IDE and SCSI
8440         discs unconditionally, since udev and others have options to provide
8441         them.
8443 2008-01-05  Robert Millan  <rmh@aybabtu.com>
8445         * normal/completion.c (iterate_dir): Skip `.' and `..' directories.
8447 2008-01-04  Christian Franke  <franke@computer.org>
8449         * kern/i386/pc/init.c (grub_machine_init): Fix evaluation
8450         of eisa_mmap.
8452 2008-01-03  Pavel Roskin  <proski@gnu.org>
8454         * kern/i386/linuxbios/init.c: Put "void" to all function
8455         declarations with no arguments.
8456         * kern/powerpc/ieee1275/init.c: Likewise.
8457         * term/i386/pc/at_keyboard.c: Likewise.
8458         * term/i386/pc/vga_text.c: Likewise.
8459         * util/grub-mkdevicemap.c: Likewise.
8461 2008-01-02  Robert Millan  <rmh@aybabtu.com>
8463         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Improve error
8464         message when loaded image is out of bounds.
8465         (grub_multiboot_load_elf64): Likewise.
8467 2008-01-02  Pavel Roskin  <proski@gnu.org>
8469         * util/grub.d/10_linux.in: Try version without ".old" when
8470         looking for initrd.  It's better to use initrd from the newer
8471         kernel of the same version than no initrd at all.
8473 2008-01-01  Robert Millan  <rmh@aybabtu.com>
8475         * util/biosdisk.c (get_os_disk): Fix check for IDE or SCSI discs.
8477 2008-01-01  Vesa Jaaskelainen  <chaac@nic.fi>
8479         * include/grub/video.h: Added grub_video_unmap_color and
8480         grub_video_get_active_render_target.
8481         (grub_video_adapter): Added unmap_color and get_active_render_target.
8483         * video/video.c: Added grub_video_unmap_color and
8484         grub_video_get_active_render_target.
8485         (grub_video_get_info): Changed method to accept NULL pointer as an
8486         argument to allow detection of active video adapter.
8488         * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as
8489         grub_video_vbe_unmap_color_int.
8490         Added grub_video_vbe_unmap_color and
8491         grub_video_vbe_get_active_render_target.
8492         (grub_video_vbe_adapter): Added unmap_color and
8493         get_active_render_target.
8495         * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage
8496         with grub_video_vbe_unmap_color_int.
8498         * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added.
8499         (DEFAULT_NORMAL_COLOR): Likewise.
8500         (DEFAULT_HIGHLIGHT_COLOR) Likewise.
8501         (DEFAULT_FG_COLOR): Removed.
8502         (DEFAULT_BG_COLOR): Likewise.
8503         (DEFAULT_CURSOR_COLOR): Changed value.
8504         (grub_virtual_screen): Added standard_color_setting,
8505         normal_color_setting, highlight_color_setting and term_color.
8506         (grub_virtual_screen): Removed fg_color_setting and bg_color_setting.
8507         (bitmap_width): Added.
8508         (bitmap_height): Likewise.
8509         (bitmap): Likewise.
8510         (set_term_color): Likewise.
8511         (grub_virtual_screen_setup): Changed to use new terminal coloring
8512         settings.
8513         (grub_gfxterm_init): Added init for bitmap.
8514         (grub_gfxterm_fini): Added destroy for bitmap.
8515         (redraw_screen_rect): Updated to use background bitmap and new
8516         terminal coloring.
8517         (scroll_up): Added optimization for case when there is no bitmap.
8518         (grub_gfxterm_cls): Fixed to use correct background color.
8519         (grub_virtual_screen_setcolorstate): Changed to use new terminal
8520         coloring.
8521         (grub_virtual_screen_setcolor): Likewise.
8522         (grub_virtual_screen_getcolor): Added.
8523         (grub_gfxterm_background_image_cmd): Likewise.
8524         (grub_video_term): Added setcolor and getcolor.
8525         (MOD_INIT): Added registration of background_image command.
8526         (MOD_TERM): Added unregistration for background_image command.
8528 2007-12-30  Pavel Roskin  <proski@gnu.org>
8530         * loader/multiboot_loader.c: Fix multiboot command
8531         unregistration.  Fix all typos in the word "multiboot".
8533 2007-12-29  Pavel Roskin  <proski@gnu.org>
8535         * util/grub.d/10_linux.in: Refactor search for initrd.  Add
8536         support for initrd names used in Fedora.
8538 2007-12-26  Bean  <bean123ch@gmail.com>
8540         * conf/common.rmk (pkgdata_MODULES): Add cpio.mod.
8541         (cpio_mod_SOURCES): New variable.
8542         (cpio_mod_CFLAGS): Likewise.
8543         (cpio_mod_LDFLAGS): Likewise.
8545         * fs/cpio.c: New file.
8547         * conf/i386-pc.rmk (grub_emu_SOURCES): Add cpio.c.
8549         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
8551         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
8553         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8555 2007-12-25  Robert Millan  <rmh@aybabtu.com>
8557         * include/grub/term.h (struct grub_term): Add `getcolor' function.
8558         (grub_getcolor): New function.
8560         * kern/term.c (grub_getcolor): New function.
8561         * normal/menu.c (GRUB_COLOR_MENU_NORMAL): New macro.
8562         (GRUB_COLOR_MENU_HIGHLIGHT): New macro.
8563         (print_entry): Set normal and highlight colors to
8564         `GRUB_COLOR_MENU_NORMAL' and `GRUB_COLOR_MENU_HIGHLIGHT',
8565         respectively, before printing and restore them to old
8566         values afterwards.
8567         (grub_menu_init_page): Likewise.  Fill an additional colored space
8568         that would otherwise be left blank.
8570         * term/efi/console.c (grub_console_getcolor): New function.
8571         (struct grub_console_term.getcolor): New variable.
8572         * term/i386/pc/console.c (grub_console_getcolor): New function.
8573         (struct grub_console_term.getcolor): New variable.
8574         * term/ieee1275/ofconsole.c (grub_ofconsole_getcolor): New function.
8575         (struct grub_console_term.getcolor): New variable.
8577         * term/i386/pc/serial.c (grub_serial_setcolor): Remove function.
8578         (struct grub_console_term.setcolor): Remove variable.
8579         * term/i386/pc/vesafb.c (grub_virtual_screen_setcolor): Remove function.
8580         (struct grub_console_term.setcolor): Remove variable.
8581         * term/i386/pc/vga.c (grub_vga_setcolor): Remove function.
8582         (struct grub_console_term.setcolor): Remove variable.
8583         * term/gfxterm.c (grub_virtual_screen_setcolor): Remove function.
8584         (struct grub_console_term.setcolor): Remove variable.
8586 2007-12-25  Robert Millan  <rmh@aybabtu.com>
8588         * configure.ac: Search for possible unifont.hex locations, and
8589         define UNIFONT_HEX if found.
8591         * Makefile.in (UNIFONT_HEX): Define variable.
8592         (DATA): Rename to ...
8593         (PKGLIB): ... this.  Update all users.
8594         (PKGDATA): New variable.
8595         (pkgdata_IMAGES): Rename to ...
8596         (pkglib_IMAGES): ... this. Update all users.
8597         (pkgdata_MODULES): Rename to ...
8598         (pkglib_MODULES): ... this. Update all users.
8599         (pkgdata_PROGRAMS): Rename to ...
8600         (pkglib_PROGRAMS): ... this. Update all users.
8601         (pkgdata_DATA): Rename to ...
8602         (pkglib_DATA): ... this. Update all users.
8603         (CLEANFILES): Redefine to `$(pkglib_DATA) $(pkgdata_DATA)'.
8604         (unicode.pff, ascii.pff): New rules.
8605         (all-local): Add `$(PKGDATA)' dependency.
8606         (install-local): Process `$(PKGDATA)'.
8608         * util/update-grub_lib.in (font_path): Search for *.pff files in
8609         a few more locations, including `${pkgdata}'.
8611 2007-12-23  Robert Millan  <rmh@aybabtu.com>
8613         Patch from Bean  <bean123ch@gmail.com>:
8614         * disk/loopback.c (grub_loopback_read): Add missing bit shift to
8615         `size'.
8617 2007-12-21  Bean  <bean123ch@gmail.com>
8619         * conf/common.rmk (pkgdata_MODULES): Add ntfscomp.mod.
8620         (ntfscomp_mod_SOURCES): New variable.
8621         (ntfscomp_mod_CFLAGS): Likewise.
8622         (ntfscomp_mod_LDFLAGS): Likewise.
8624         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfscomp.c.
8625         (grub_probe_SOURCES): Likewise.
8626         (grub_emu_SOURCES): Likewise.
8628         * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
8629         (grub_emu_SOURCES): Likewise.
8631         * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
8632         (grub_emu_SOURCES): Likewise.
8634         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
8635         (grub_emu_SOURCES): Likewise.
8637         * fs/ntfs.c (grub_ntfscomp_func): New variable.
8638         (read_run_list): Renamed to grub_ntfs_read_run_list.
8639         (decomp_nextvcn): Moved to ntfscomp.c.
8640         (decomp_getch): Likewise.
8641         (decomp_get16): Likewise.
8642         (decomp_block): Likewise.
8643         (read_block): Likewise.
8644         (read_data): Partially moved to ntfscomp.c.
8645         (fixup): Change unsigned to grub_uint16_t.
8646         (read_mft): Change unsigned long to grub_uint32_t.
8647         (read_attr): Likewise.
8648         (read_data): Likewise.
8649         (read_run_data): Likewise.
8650         (read_run_list): Likewise.
8651         (read_mft): Likewise.
8653         * fs/ntfscomp.c: New file.
8655         * include/grub/ntfs.h: New file.
8657 2007-12-16  Robert Millan  <rmh@aybabtu.com>
8659         * util/grub-mkdevicemap.c (make_device_map): Iterate up to 20 for
8660         IDE disk check, since Linux is known to support 20 IDE disks.
8661         Reported by Colin Watson.
8663 2007-12-15  Bean  <bean123ch@gmail.com>
8665         * conf/i386-pc.rmk (pkgdata_IMAGES): Add lnxboot.img.
8666         (lnxboot_img_SOURCES): New variable.
8667         (lnxboot_img_ASFLAGS): Likewise.
8668         (lnxboot_img_LDFLAGS): Likewise.
8670         * boot/i386/pc/lnxboot.S: New file.
8672 2007-11-24  Pavel Roskin  <proski@gnu.org>
8674         * configure.ac: Test if '--build-id=none' is supported by the
8675         linker.  If yes, add it to TARGET_LDFLAGS.  Build ID causes
8676         objcopy to generate incorrect binary files (binutils
8677         2.17.50.0.18-1 as shipped by Fedora 8).
8678         * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Use LDFLAGS when
8679         linking, so that build ID doesn't break the test.
8681 2007-11-24  Pavel Roskin  <proski@gnu.org>
8683         * include/grub/i386/time.h: use "void" in the argument list
8684         of grub_cpu_idle().
8685         * include/grub/powerpc/time.h: Likewise.
8686         * include/grub/sparc64/time.h: Likewise.
8688 2007-11-18  Christian Franke  <franke@computer.org>
8690         * util/console.c (grub_ncurses_getkey): Change curses KEY_* mapping,
8691         now return control chars instead of GRUB_CONSOLE_KEY_* constants.
8692         This fixes the problem that function keys did not work in grub-emu.
8694 2007-11-18  Christian Franke  <franke@computer.org>
8696         * disk/host.c (grub_host_open): Remove attribute unused from
8697         name parameter. Add check for "host". This fixes the problem
8698         that grub-emu does not find partitions.
8700 2007-11-18  Christian Franke  <franke@computer.org>
8702         * util/hostfs.c (is_dir): New function.
8703         (grub_hostfs_dir):  Handle missing dirent.d_type case.
8704         (grub_hostfs_read): Add missing fseek().
8705         (grub_hostfs_label): Clear label pointer.  This fixes a crash
8706         of grub-emu on "ls (host)".
8708 2007-11-18  Christian Franke  <franke@computer.org>
8710         * include/grub/i386/pc/init.h (struct grub_machine_mmap_entry):
8711         Add attribute packed, gcc 3.4.4 on Cygwin aligns this
8712         to 64 bit boundary by default.
8714 2007-11-18  Bean  <bean123ch@gmail.com>
8716         * conf/common.rmk (pkgdata_MODULES): Add hexdump.mod.
8717         (hexdump_mod_SOURCES): New variable.
8718         (hexdump_mod_CFLAGS): Likewise.
8719         (hexdump_mod_LDFLAGS): Likewise.
8721         * conf/i386-pc.rmk (grub_emu_SOURCES): Add command/hexdump.c.
8723         * conf/i386-efi.rmk (grub_emu_SOURCES): Add command/hexdump.c.
8725         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add command/hexdump.c.
8727         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add command/hexdump.c.
8729         * include/grub/hexdump.h: New file.
8731         * commands/hexdump.c: New file.
8733 2007-11-10  Robert Millan  <rmh@aybabtu.com>
8735         * commands/i386/pc/play.c (beep_off): Switch order of arguments
8736         in grub_outb() calls.
8737         (beep_on): Likewise.
8739 2007-11-10  Christian Franke  <franke@computer.org>
8741         * normal/menu.c (run_menu): Check for empty menu to avoid crash.
8742         (grub_menu_run): Likewise.
8744 2007-11-10  Robert Millan  <rmh@aybabtu.com>
8746         * include/grub/i386/efi/machine.h: New file.
8747         * include/grub/i386/linuxbios/machine.h: Likewise.
8748         * include/grub/i386/pc/machine.h: Likewise.
8749         * include/grub/powerpc/ieee1275/machine.h: Likewise.
8750         * include/grub/sparc64/ieee1275/machine.h: Likewise.
8752         * term/i386/pc/serial.c: Include <grub/machine/machine.h>.
8753         (serial_hw_io_addr): New variable.
8754         (serial_hw_get_port): Obtain port address from `serial_hw_io_addr'
8755         instead of `(unsigned short *) 0x400'.
8757 2007-11-10  Bean  <bean123ch@gmail.com>
8759         * fs/ntfs.c (read_block): Fix a bug caused by adjacent blocks.
8761 2007-11-10  Vesa Jaaskelainen  <chaac@nic.fi>
8763         * conf/i386-pc.rmk (pkgdata_MODULES): Added vga.mod.
8764         (vga_mod_SOURCES): Added.
8765         (vga_mod_CFLAGS): Likewise.
8766         (vga_mod_LDFLAGS): Likewise.
8768         * term/i386/pc/vga.c (get_map_mask): Switch order of arguments in
8769         grub_outb() calls.
8770         (set_map_mask): Likewise.
8771         (set_read_map): Likewise.
8772         (set_read_address): Likewise.
8773         (vga_font): Removed variable.
8774         (get_vga_glyph): Removed function.
8775         (invalidate_char): Likewise.
8776         (write_char): Changed to use grub_font_get_glyph() for font
8777         information.
8778         (grub_vga_putchar): Likewise.
8779         (grub_vga_getcharwidth): Likewise.
8781 2007-11-10  Vesa Jaaskelainen  <chaac@nic.fi>
8783         * conf/i386-pc.rmk (boot_img_LDFLAGS): Use COMMON_LDFLAGS for target
8784         flags.
8785         (pxeboot_img_LDFLAGS): Likewise.
8786         (diskboot_img_LDFLAGS): Likewise.
8787         (kernel_img_LDFLAGS): Likewise.
8789 2007-11-06  Robert Millan  <rmh@aybabtu.com>
8791         * term/i386/pc/serial.c (serial_hw_put): Switch order of arguments
8792         in grub_outb() calls.
8793         (serial_hw_init): Likewise.
8795 2007-11-05  Robert Millan  <rmh@aybabtu.com>
8797         * util/update-grub.in: Allow files in ${update_grub_dir} to contain
8798         spaces.  Skip non-regular files.
8800 2007-11-05  Robert Millan  <rmh@aybabtu.com>
8802         * kern/disk.c (grub_disk_firmware_fini)
8803         (grub_disk_firmware_is_tainted): New variables.
8805         * include/grub/disk.h (grub_disk_firmware_fini)
8806         (grub_disk_firmware_is_tainted): Likewise.
8808         * disk/i386/pc/biosdisk.c (GRUB_MOD_FINI(biosdisk)): Moved from here ...
8809         (grub_disk_biosdisk_fini): ... to here.
8810         (GRUB_MOD_FINI(biosdisk)): Implement using grub_disk_biosdisk_fini().
8811         (GRUB_MOD_INIT(biosdisk)): Abort when `grub_disk_firmware_is_tainted'
8812         is set.  Register grub_disk_biosdisk_fini() in
8813         `grub_disk_firmware_fini'.
8815         * disk/ata.c: Remove `<grub/machine/biosdisk.h>'.
8816         (GRUB_MOD_INIT(ata)): Remove grub_biosdisk_fini() call.
8817         Use `grub_disk_firmware_is_tainted' and `grub_disk_firmware_fini'
8818         to finish existing firmware disk interface.
8820         * conf/i386-linuxbios.rmk (pkgdata_MODULES): Add `ata.mod'.
8821         (ata_mod_SOURCES): New variable.
8822         (ata_mod_CFLAGS): Likewise.
8823         (ata_mod_LDFLAGS): Likewise.
8825 2007-11-05  Robert Millan  <rmh@aybabtu.com>
8827         * disk/ata.c: Remove `<grub/machine/time.h>'.  Include `<grub/time.h>'.
8828         (grub_ata_wait): Reimplement using grub_millisleep().
8830         * include/grub/misc.h (grub_div_roundup): Fix parenthesization.
8831         * include/grub/i386/time.h (grub_cpu_idle): Disable `hlt' instruction.
8833 2007-11-03  Marco Gerards  <marco@gnu.org>
8835         * term/i386/pc/vga_text.c: Include <grub/cpu/io.h>.
8836         (CRTC_ADDR_PORT): New macro.
8837         (CRTC_DATA_PORT): Likewise.
8838         (CRTC_CURSOR): Likewise.
8839         (CRTC_CURSOR_ADDR_HIGH): Likewise.
8840         (CRTC_CURSOR_ADDR_LOW): Likewise.
8841         (update_cursor): New function.
8842         (grub_console_real_putchar): Call `update_cursor'.
8843         (grub_console_gotoxy): Likewise.
8844         (grub_console_cls): Set the default color when clearing the
8845         screen.
8846         (grub_console_setcursor): Implemented.
8848 2007-11-03  Marco Gerards  <marco@gnu.org>
8850         * disk/ata.c (grub_ata_pio_read): Don't wait for the command to
8851         become activate.
8852         (grub_ata_pio_write): Likewise.
8854         (grub_atapi_identify): Wait after issuing an ATA command.
8855         (grub_atapi_packet): Likewise.
8856         (grub_ata_identify): Likewise.
8857         (grub_ata_readwrite): Likewise.
8859 2007-11-03  Marco Gerards  <marco@gnu.org>
8861         * disk/ata.c (grub_ata_pio_read): Detect and return the error code.
8862         (grub_ata_pio_write): Likewise.
8863         (grub_ata_readwrite): Use `grub_error', instead of
8864         returning `grub_errno'.
8866 2007-11-03  Marco Gerards  <marco@gnu.org>
8868         * disk/ata.c (grub_ata_readwrite): Call grub_ata_pio_read and
8869         grub_ata_pio_write once for every single sector, instead of for
8870         multiple sectors.
8872 2007-10-31  Robert Millan  <rmh@aybabtu.com>
8874         * configure.ac: Add `i386-linuxbios' to the list of supported targets.
8876         * conf/i386-linuxbios.rmk: New file.
8878         * kern/i386/pc/hardware.c: Likewise.
8879         * term/i386/pc/at_keyboard.c: Likewise.
8880         * term/i386/pc/vga_text.c: Likewise.
8882         * include/grub/i386/linuxbios/boot.h: Likewise.
8883         * include/grub/i386/linuxbios/console.h: Likewise.
8884         * include/grub/i386/linuxbios/init.h: Likewise.
8885         * include/grub/i386/linuxbios/kernel.h: Likewise.
8886         * include/grub/i386/linuxbios/loader.h: Likewise.
8887         * include/grub/i386/linuxbios/memory.h: Likewise.
8888         * include/grub/i386/linuxbios/serial.h: Likewise.
8889         * include/grub/i386/linuxbios/time.h: Likewise.
8891         * kern/i386/linuxbios/init.c: Likewise.
8892         * kern/i386/linuxbios/startup.S: Likewise.
8893         * kern/i386/linuxbios/table.c: Likewise.
8895 2007-10-31  Marco Gerards  <marco@gnu.org>
8897         * conf/i386-pc.rmk (pkgdata_MODULES): Add `ata.mod'.
8898         (ata_mod_SOURCES): New variable.
8899         (ata_mod_CFLAGS): Likewise.
8900         (ata_mod_LDFLAGS): Likewise.
8902         * disk/ata.c: New file.
8904         * include/grub/disk.h (grub_disk_dev_id): Add
8905         `GRUB_DISK_DEV_ATA_ID'.
8907 2007-10-31  Robert Millan  <rmh@aybabtu.com>
8909         * include/grub/i386/pc/init.h (grub_lower_mem): Moved from here ...
8910         * include/grub/i386/pc/memory.h (grub_lower_mem): ... to here.
8912         * include/grub/i386/pc/init.h (grub_upper_mem): Moved from here ...
8913         * include/grub/i386/pc/memory.h (grub_upper_mem): ... to here.
8915         * include/grub/i386/pc/memory.h: Include `<grub/symbol.h>' and
8916         `<grub/types.h>'.
8918         * loader/i386/pc/multiboot.c: Include `<grub/machine/memory.h>'.
8920 2007-10-27  Robert Millan  <rmh@aybabtu.com>
8922         * include/grub/types.h (ULONG_MAX): Define macro.
8924 2007-10-22  Robert Millan  <rmh@aybabtu.com>
8926         * kern/i386/pc/startup.S: Remove `"kern/i386/realmode.S"'.  Include
8927         `"../realmode.S"'.
8928         Remove `"kern/i386/loader.S"'.  Include `"../loader.S"'.
8930 2007-10-22  Robert Millan  <rmh@aybabtu.com>
8932         * conf/i386-pc.rmk (kernel_img_SOURCES): Remove `disk/i386/pc/biosdisk.c'.
8933         (pkgdata_MODULES): Add `biosdisk.mod'.
8934         (biosdisk_mod_SOURCES, biosdisk_mod_CFLAGS, biosdisk_mod_LDFLAGS): New
8935         variables.
8937         * disk/i386/pc/biosdisk.c: Include `<grub/dl.h>'.
8938         (grub_biosdisk_init): Replace with ...
8939         (GRUB_MOD_INIT(biosdisk)): ... this.
8940         (grub_biosdisk_fini): Replace with ...
8941         (GRUB_MOD_FINI(biosdisk)): ... this.
8943         * kern/i386/pc/init.c: Remove `<grub/machine/biosdisk.h>'.
8944         (grub_machine_init): Remove call to grub_biosdisk_init().
8945         (grub_machine_fini): Remove call to grub_machine_fini().
8947         * util/i386/pc/grub-install.in (modules): Add `biosdisk'.
8949 2007-10-22  Robert Millan  <rmh@aybabtu.com>
8951         * include/grub/time.h: New file.
8952         * include/grub/i386/time.h: Likewise.
8953         * include/grub/powerpc/time.h: Likewise.
8954         * include/grub/sparc64/time.h: Likewise.
8956         * include/grub/i386/pc/time.h (KERNEL_TIME_HEADER): Rename all
8957         instances to ...
8958         (KERNEL_MACHINE_TIME_HEADER): ... this.
8959         * include/grub/powerpc/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
8960         instances to ...
8961         (KERNEL_MACHINE_TIME_HEADER): ... this.
8962         * include/grub/sparc64/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
8963         instances to ...
8964         (KERNEL_MACHINE_TIME_HEADER): ... this.
8966         * kern/i386/efi/init.c: Include `<grub/time.h>'.
8967         (grub_millisleep): New function.
8968         * kern/i386/pc/init.c: Include `<grub/time.h>'.
8969         (grub_millisleep): New function.
8970         * kern/powerpc/ieee1275/init.c: Include `<grub/time.h>'.
8971         Remove `grub/machine/time.h' include.
8972         (grub_millisleep): New function.
8973         * kern/sparc64/ieee1275/init.c: Include `<grub/time.h>'.
8974         Remove `grub/machine/time.h' include.
8975         (grub_millisleep): New function.
8977         * include/grub/misc.h (grub_div_roundup): New function.
8979         * kern/misc.c: Include `<grub/time.h>'.
8980         (grub_millisleep_generic): New function.
8982         * conf/i386-efi.rmk (kernel_mod_HEADERS): Remove `i386/efi/time.h'.
8983         Add `time.h'.
8984         * conf/i386-pc.rmk (kernel_img_HEADERS): Remove `machine/time.h'.
8985         Add `time.h'.
8986         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Remove
8987         `machine/time.h'.  Add `time.h'.
8988         * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
8990 2007-10-21  Robert Millan  <rmh@aybabtu.com>
8992         * include/grub/misc.h (grub_max): New function.
8994 2007-10-21  Robert Millan  <rmh@aybabtu.com>
8996         * util/misc.c (grub_util_info): Call fflush() before returning.
8998 2007-10-20  Robert Millan  <rmh@aybabtu.com>
9000         * genmk.rb (Image): Copy `extra_flags' from here ...
9001         (PModule): ... to here.  Use it in `#{obj}: #{src}' rule.
9003         * commands/i386/cpuid.c (grub_cmd_cpuid): Add __attribute__ ((unused))
9004         to `argc' and `args' arguments.
9006 2007-10-17  Robert Millan  <rmh@aybabtu.com>
9008         * kern/i386/loader.S: New file.
9010         * kern/i386/pc/startup.S (grub_linux_prot_size): Moved from here ...
9011         * kern/i386/loader.S (grub_linux_prot_size)... to here.
9012         * kern/i386/pc/startup.S (grub_linux_tmp_addr): Moved from here ...
9013         * kern/i386/loader.S (grub_linux_tmp_addr)... to here.
9014         * kern/i386/pc/startup.S (grub_linux_real_addr): Moved from here ...
9015         * kern/i386/loader.S (grub_linux_real_addr)... to here.
9016         * kern/i386/pc/startup.S (grub_linux_boot_zimage): Moved from here ...
9017         * kern/i386/loader.S (grub_linux_boot_zimage)... to here.
9018         * kern/i386/pc/startup.S (grub_linux_boot_bzimage): Moved from here ...
9019         * kern/i386/loader.S (grub_linux_boot_bzimage)... to here.
9020         * kern/i386/pc/startup.S (grub_multiboot_real_boot): Moved from here ...
9021         * kern/i386/loader.S (grub_multiboot_real_boot)... to here.
9022         * kern/i386/pc/startup.S (grub_multiboot2_real_boot): Moved from here ...
9023         * kern/i386/loader.S (grub_multiboot2_real_boot)... to here.
9025         * kern/i386/realmode.S: New file.
9027         * kern/i386/pc/startup.S (protstack): Moved from here ...
9028         * kern/i386/realmode.S (protstack)... to here.
9029         * kern/i386/pc/startup.S (gdt): Moved from here ...
9030         * kern/i386/realmode.S (gdt)... to here.
9031         * kern/i386/pc/startup.S (prot_to_real): Moved from here ...
9032         * kern/i386/realmode.S (prot_to_real)... to here.
9034         * kern/i386/pc/startup.S: Include `kern/i386/loader.S' and
9035         `kern/i386/realmode.S'.
9037 2007-10-17  Robert Millan  <rmh@aybabtu.com>
9039         * include/grub/i386/loader.h: New file.
9041         * include/grub/i386/pc/loader.h (grub_linux_prot_size)
9042         (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
9043         (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
9044         (grub_multiboot_real_boot, grub_multiboot2_real_boot)
9045         (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): Moved from here ...
9046         * include/grub/i386/loader.h (grub_linux_prot_size)
9047         (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
9048         (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
9049         (grub_multiboot_real_boot, grub_multiboot2_real_boot)
9050         (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): ... to here.
9052         * include/grub/i386/pc/loader.h: Include `grub/cpu/loader.h'.
9054 2007-10-15  Robert Millan  <rmh@aybabtu.com>
9056         * normal/misc.c (grub_normal_print_device_info): Do not probe for
9057         filesystem when dev->disk is unset.
9058         Do probe for filesystem even when dev->disk->has_partitions is set.
9059         In case a filesystem is found, always report it.
9060         In case it isn't, if dev->disk->has_partitions is set, report that
9061         a partition table was found instead of reporting that no filesystem
9062         could be identified.
9064 2007-10-12  Robert Millan  <rmh@aybabtu.com>
9066         * conf/powerpc-ieee1275.rmk (grub_mkimage_SOURCES): Replace reference
9067         to util/powerpc/ieee1275/grub-mkimage.c with util/elf/grub-mkimage.c.
9069         * include/grub/types.h (grub_host_to_target16): New macro.
9070         (grub_host_to_target32): Likewise.
9071         (grub_host_to_target64): Likewise.
9072         (grub_target_to_host16): Likewise.
9073         (grub_target_to_host32): Likewise.
9074         (grub_target_to_host64): Likewise.
9076         * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
9077         Renamed from to ...
9078         (GRUB_MOD_ALIGN): ...this.  Update all users.
9080         * util/elf/grub-mkimage.c (load_note): Replace grub_cpu_to_be32 with
9081         grub_host_to_target32.
9082         Replace grub_be_to_cpu32 with grub_target_to_host32.
9083         (load_modules): Likewise.
9084         (add_segments): Replace grub_be_to_cpu16 with grub_target_to_host16.
9085         Replace grub_be_to_cpu32 with grub_target_to_host32.
9086         Replace grub_cpu_to_be16 with grub_host_to_target16.
9087         Replace grub_cpu_to_be32 grub_host_to_target32.
9089 2007-10-12  Robert Millan  <rmh@aybabtu.com>
9091         * util/powerpc/ieee1275/grub-mkimage.c: Moved to ...
9092         * util/elf/grub-mkimage.c: ... here.
9094         * DISTLIST: Add `util/elf/grub-mkimage.c'.  Remove
9095         `util/powerpc/ieee1275/grub-mkimage.c'.
9097 2007-10-07  Robert Millan  <rmh@aybabtu.com>
9099         * kern/powerpc/ieee1275/init.c: Rename HEAP_LIMIT to HEAP_MAX_ADDR,
9100         and make it easier to figure out.
9101         Add HEAP_MIN_SIZE and HEAP_MAX_ADDR definitions.
9102         (grub_claim_heap): Use HEAP_MAX_ADDR rather than taking a parameter.
9103         Do not avoid claiming a region above HEAP_MAX_ADDR if that would
9104         leave us with less than HEAP_MIN_SIZE total heap.
9105         Avoid our total amount of heap to surpass HEAP_MAX_SIZE.
9107 2007-10-03  Robert Millan  <rmh@aybabtu.com>
9109         * include/grub/i386/io.h: New file.
9110         * commands/i386/pc/play.c (inb): Removed.
9111         (outb): Removed.
9112         Include grub/cpu/io.h.  Replace inb() with grub_inb() and outb()
9113         with grub_outb().
9114         * term/i386/pc/serial.c  (inb): Removed.
9115         (outb): Removed.
9116         Include grub/cpu/io.h.  Replace inb() with grub_inb() and outb()
9117         with grub_outb().
9118         * term/i386/pc/vga.c  (inb): Removed.
9119         (outb): Removed.
9120         Include grub/cpu/io.h.  Replace inb() with grub_inb() and outb()
9121         with grub_outb().
9123 2007-10-02  Robert Millan  <rmh@aybabtu.com>
9125         * conf/i386-efi.rmk (grub_emu_SOURCES): Add util/hostfs.c.
9126         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9127         Reported by Marcin Kurek.
9129 2007-09-07  Robert Millan  <rmh@aybabtu.com>
9131         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_test_flag): Detect
9132         SmartFirmware version updates (as released by Sven Luther), and avoid
9133         setting GRUB_IEEE1275_FLAG_NO_PARTITION_0 or
9134         GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS unless the running version is
9135         known broken.
9137 2007-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
9139         From Hitoshi Ozeki:
9140         * kern/i386/pc/init.c (compact_mem_regions): Decrease NUM_REGIONS
9141         when merging two regions.
9143 2007-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
9145         * kern/rescue.c (grub_enter_rescue_mode): Free ARGS.
9146         * normal/completion.c (grub_normal_do_completion): Likewise.
9147         Reported by Hitoshi Ozeki.
9149 2007-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
9151         Do not use devices at boot in chainloading.
9153         * loader/i386/pc/chainloader.c (boot_drive): New variable.
9154         (boot_part_addr): Likewise.
9155         (grub_chainloader_boot): Simply call grub_chainloader_real_boot
9156         with BOOT_DRIVE and BOOT_PART_ADDR.
9157         (grub_chainloader_cmd): Set BOOT_DRIVE and BOOT_PART_ADDR.
9158         Reported by Hitoshi Ozeki <h-ozeki@ck2.so-net.ne.jp>.
9160 2007-08-29  Robert Millan  <rmh@aybabtu.com>
9162         Patch from Simon Peter <dn.tlp@gmx.net>:
9163         * genmk.rb (Utility): Append $(#{src}_DEPENDENCIES) to #{obj} targets.
9164         * conf/i386-pc.rmk: Replace grub-probe_DEPENDENCIES with
9165         util/grub-probe.c_DEPENDENCIES.  Replace grub-setup_DEPENDENCIES with
9166         util/i386/pc/grub-setup.c_DEPENDENCIES.
9167         * conf/i386-efi.rmk: Replace grub-probe_DEPENDENCIES with
9168         util/grub-probe.c_DEPENDENCIES.
9169         * conf/powerpc-ieee1275.rmk: Likewise.
9171 2007-08-28  Robert Millan  <rmh@aybabtu.com>
9173         * util/i386/get_disk_name.c: New.  Implement grub_util_get_disk_name()
9174         to tell grub-mkdevicemap how to name devices.
9175         * util/ieee1275/get_disk_name.c: Likewise (using "ofpathname -a"
9176         feature).
9178         * conf/i386-efi.rmk (grub_mkdevicemap_SOURCES): Add
9179         util/i386/get_disk_name.c.
9180         * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Likewise.
9181         * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Add
9182         util/ieee1275/get_disk_name.c.
9184         * include/grub/util/misc.h: grub_util_get_disk_name() declaration.
9186         * DISTLIST: Add util/i386/get_disk_name.c and
9187         util/ieee1275/get_disk_name.c.
9189         * util/grub-mkdevicemap.c: Replace device naming logic with
9190         grub_util_get_disk_name() calls.
9192 2007-08-20  Robert Millan  <rmh@aybabtu.com>
9194         * normal/menu.c (run_menu): Refer to seconds as "s" not "seconds"
9195         (so that it works for both plural and singular quantities).
9197 2007-08-05  Robert Millan  <rmh@aybabtu.com>
9199         * util/grub.d/10_linux.in (test_gt): Strip out vmlinu[xz]- prefix
9200         so that [xz] isn't taken into account when determining order.
9202 2007-08-02  Marco Gerards  <marco@gnu.org>
9204         * DISTLIST: Add `disk/host.c', `fs/ntfs.c', `include/multiboot.h',
9205         `include/multiboot2.h', `include/grub/elfload.h',
9206         `include/multiboot.h', `include/grub/multiboot.h',
9207         `include/grub/multiboot_loader.h', `include/grub/multiboot2.h',
9208         `include/grub/i386/pc/biosdisk.h', `include/grub/util/biosdisk.h',
9209         `kern/elf.c', `loader/multiboot_loader.c',
9210         `loader/multiboot_loader_normal.c', `loader/multiboot2.c',
9211         `loader/i386/pc/multiboot2.c',
9212         `loader/powerpc/ieee1275/multiboot2.c', `util/hostfs.c' and
9213         `util/i386/pc/grub-mkrescue.in'.  Remove
9214         `include/grub/biosdisk.h', `include/grub/i386/pc/multiboot.h',
9215         `include/grub/i386/pc/util/biosdisk.h' and
9216         `include/grub/powerpc/ieee1275/multiboot.h'.
9218 2007-08-02  Bean  <bean123ch@gmail.com>
9220         * conf/common.rmk (pkgdata_MODULES): Add ntfs.mod.
9221         (ntfs_mod_SOURCES): New variable.
9222         (ntfs_mod_CFLAGS): Likewise.
9223         (ntfs_mod_LDFLAGS): Likewise.
9225         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfs.c.
9226         (grub_probe_SOURCES): Likewise.
9227         (grub_emu_SOURCES): Likewise.
9229         * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
9230         (grub_emu_SOURCES): Likewise.
9232         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
9233         (grub_emu_SOURCES): Likewise.
9235         * conf/misc.c (grub_utf16_to_utf8): Fix unicode conversion bug.
9237         * fs/ntfs.c: New file.
9239 2007-08-02  Bean  <bean123ch@gmail.com>
9241         * disk.h (grub_disk): Use NESTED_FUNC_ATTR.
9243         * file.h (grub_file): Likewise.
9245         * fshelp.h (grub_fshelp_read_file): Likewise.
9247         * util/i386/pc/grub-setup.c (setup): Likewise.
9248         (save_first_sector): Likewise.
9249         (save_blocklists): Likewise.
9251         * fs/affs.c (grub_affs_read_file): Likewise.
9253         * fs/ext2.c (grub_ext2_read_file): Likewise.
9255         * fs/fat.c (grub_fat_read_data): Likewise.
9257         * fs/fshelp.c (grub_fshelp_read_file): Likewise.
9259         * fs/hfs.c (grub_hfs_read_file): Likewise.
9261         * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
9263         * fs/jfs.c (grub_jfs_read_file): Likewise.
9265         * fs/minix.c (grub_minix_read_file): Likewise.
9267         * fs/sfs.c (grub_sfs_read_file): Likewise.
9269         * fs/ufs.c (grub_ufs_read_file): Likewise.
9271         * fs/xfs.c (grub_xfs_read_file): Likewise.
9273         * command/blocklist.c (read_blocklist): Likewise.
9274         (print_blocklist): Likewise.
9276 2007-08-02  Marco Gerards  <marco@gnu.org>
9278         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/host.c' and
9279         `util/hostfs.c'.
9281         * disk/host.c: New file.
9283         * util/hostfs.c: Likewise.
9285         * fs/hfsplus.c (grub_hfsplus_mount): When reading out of disk,
9286         return `GRUB_ERR_BAD_FS'.
9287         * fs/sfs.c (grub_sfs_mount): Likewise.
9288         * fs/xfs.c (grub_xfs_mount): Likewise.
9290         * include/grub/disk.h (enum grub_disk_dev_id): Add
9291         `GRUB_DISK_DEVICE_HOST_ID'.
9293         * util/grub-emu.c (main): Initialize and de-initialize hostfs.
9295 2007-07-24  Jerone Young  <jerone@gmail.com>
9297         * conf/i386-pc.rmk: Add Multiboot loader and multiboot 2 to multiboot
9298         modules for compilation.
9299         * conf/powerpc-ieee1275.rmk: Likewise.
9301         * include/multiboot.h: Move multiboot definitions to one file. Rename
9302         many definitions to not get grub specific.
9303         * include/multiboot2.h: Create header with multiboot 2 definitions.
9304         * include/grub/multiboot.h: Header for grub specific function
9305         prototypes and definitions.
9306         * include/grub/multiboot2.h: Likewise.
9307         * include/grub/multiboot_loader.h: Likewise.
9308         * include/grub/i386/pc/multiboot.h: Removed.
9309         * include/grub/powerpc/ieee1275/multiboot.h: Removed.
9311         * loader/multiboot_loader.c: Created to act as a proxy for multiboot 1
9312         and 2 to allow for one multiboot and module commands.
9313         * loader/multiboot2.c: Add multiboot2 functionality.
9314         * loader/i386/pc/multiboot.c: Modify for new multiboot header location
9315         and definition names.
9316         * loader/i386/pc/multiboot2.c: Created to add i386 specific multiboot
9317         2 functions.
9318         * loader/powerpc/ieee1275/multiboot2.c: Created to add powerpc
9319         ieee1275 specific multiboot2 code.
9321         * kern/i386/pc/startup.S: Change headers and definition names for
9322         multiboot. Add function grub_multiboot2_real_boot for multiboot 2.
9324 2007-07-22  Robert Millan  <rmh@aybabtu.com>
9326         * geninitheader.sh: Process file specified in first parameter rather
9327         than hardcoding grub_modules_init.lst.
9328         * geninit.sh: Likewise.  Also, construct header name dynamically rather
9329         than hardcoding grub_modules_init.h.
9331         * conf/common.rmk: Rename grub_modules_init.[ch] files associated with
9332         grub-emu to grub_emu_init.[ch].  Add rules to build analogous
9333         grub_probe_init.[ch] and grub_setup_init.[ch].
9335         * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Replace
9336         grub_modules_init.h with grub_emu_init.h.
9337         (grub_probe_DEPENDENCIES, grub_probe_SOURCES): Add new
9338         grub_probe_init.[ch] files.
9339         * conf/i386-efi.rmk: Likewise.
9340         * conf/i386-pc.rmk: Likewise.
9341         (grub_setup_DEPENDENCIES, grub_setup_SOURCES): Add new
9342         grub_setup_init.[ch] files.
9344         * util/grub-emu.c: Replace grub_modules_init.h with grub_emu_init.h.
9345         * util/grub-probe.c: Include grub_probe_init.h.  Use grub_init_all()
9346         to initialize modules rather than a list of hardcoded functions.
9347         * util/i386/pc/grub-setup.c: Include grub_setup_init.h.  Use
9348         grub_init_all() to initialize modules rather than a list of hardcoded
9349         functions.
9351 2007-07-22  Robert Millan  <rmh@aybabtu.com>
9353         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set
9354         GRUB_IEEE1275_FLAG_NO_PARTITION_0 flag when running on SmartFirmware.
9356 2007-07-22  Robert Millan  <rmh@aybabtu.com>
9358         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
9359         GRUB_IEEE1275_FLAG_BROKEN_OUTPUT flag.
9360         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set this
9361         flag when running on SmartFirmware.
9362         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid running
9363         "output-device output" command when GRUB_IEEE1275_FLAG_BROKEN_OUTPUT
9364         was set.
9366         * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
9367         Increase partno when GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS flag is set,
9368         rather than decreasing it.
9370         * util/i386/pc/grub-setup.c (setup): When embedding is required, but
9371         there's not enough space to do it, fail in the same way as when it
9372         can't be done because there are no partitions.
9374         * util/powerpc/ieee1275/grub-install.in: Improve error message shown
9375         when nvsetenv failed.
9377 2007-07-22  Yoshinori K. Okuji  <okuji@enbug.org>
9379         * conf/i386-pc.rmk (CLEANFILES): Removed for grub-mkrescue,
9380         because this rule is automatically generated.
9381         (grub-mkrescue): Removed for the same reason as above.
9383 2007-07-22  Yoshinori K. Okuji  <okuji@enbug.org>
9385         Migrate to GNU General Public License Version 3.
9387         * COPYING: Replaced with the plain text version of GPLv3.
9389         * config.guess: Updated from gnulib.
9390         * config.sub: Likewise.
9392         * geninit.sh: Output a GPLv3 copyright notice.
9393         * geninitheader.sh: Likewise.
9394         * genmodsrc.sh: Likewise.
9395         * gensymlist.sh.in: Likewise.
9397         * boot/i386/pc/boot.S: Upgraded to GPLv3.
9398         * boot/i386/pc/diskboot.S: Likewise.
9399         * boot/i386/pc/pxeboot.S: Likewise.
9400         * commands/blocklist.c: Likewise.
9401         * commands/boot.c: Likewise.
9402         * commands/cat.c: Likewise.
9403         * commands/cmp.c: Likewise.
9404         * commands/configfile.c: Likewise.
9405         * commands/echo.c: Likewise.
9406         * commands/help.c: Likewise.
9407         * commands/ls.c: Likewise.
9408         * commands/search.c: Likewise.
9409         * commands/terminal.c: Likewise.
9410         * commands/test.c: Likewise.
9411         * commands/videotest.c: Likewise.
9412         * commands/i386/cpuid.c: Likewise.
9413         * commands/i386/pc/halt.c: Likewise.
9414         * commands/i386/pc/play.c: Likewise.
9415         * commands/i386/pc/reboot.c: Likewise.
9416         * commands/i386/pc/vbeinfo.c: Likewise.
9417         * commands/i386/pc/vbetest.c: Likewise.
9418         * commands/ieee1275/halt.c: Likewise.
9419         * commands/ieee1275/reboot.c: Likewise.
9420         * commands/ieee1275/suspend.c: Likewise.
9421         * disk/loopback.c: Likewise.
9422         * disk/lvm.c: Likewise.
9423         * disk/raid.c: Likewise.
9424         * disk/efi/efidisk.c: Likewise.
9425         * disk/i386/pc/biosdisk.c: Likewise.
9426         * disk/ieee1275/ofdisk.c: Likewise.
9427         * font/manager.c: Likewise.
9428         * fs/affs.c: Likewise.
9429         * fs/ext2.c: Likewise.
9430         * fs/fat.c: Likewise.
9431         * fs/fshelp.c: Likewise.
9432         * fs/hfs.c: Likewise.
9433         * fs/hfsplus.c: Likewise.
9434         * fs/iso9660.c: Likewise.
9435         * fs/jfs.c: Likewise.
9436         * fs/minix.c: Likewise.
9437         * fs/sfs.c: Likewise.
9438         * fs/ufs.c: Likewise.
9439         * fs/xfs.c: Likewise.
9440         * hello/hello.c: Likewise.
9441         * include/grub/acorn_filecore.h: Likewise.
9442         * include/grub/arg.h: Likewise.
9443         * include/grub/bitmap.h: Likewise.
9444         * include/grub/boot.h: Likewise.
9445         * include/grub/cache.h: Likewise.
9446         * include/grub/device.h: Likewise.
9447         * include/grub/disk.h: Likewise.
9448         * include/grub/dl.h: Likewise.
9449         * include/grub/elfload.h: Likewise.
9450         * include/grub/env.h: Likewise.
9451         * include/grub/err.h: Likewise.
9452         * include/grub/file.h: Likewise.
9453         * include/grub/font.h: Likewise.
9454         * include/grub/fs.h: Likewise.
9455         * include/grub/fshelp.h: Likewise.
9456         * include/grub/gzio.h: Likewise.
9457         * include/grub/hfs.h: Likewise.
9458         * include/grub/kernel.h: Likewise.
9459         * include/grub/loader.h: Likewise.
9460         * include/grub/lvm.h: Likewise.
9461         * include/grub/misc.h: Likewise.
9462         * include/grub/mm.h: Likewise.
9463         * include/grub/net.h: Likewise.
9464         * include/grub/normal.h: Likewise.
9465         * include/grub/parser.h: Likewise.
9466         * include/grub/partition.h: Likewise.
9467         * include/grub/pc_partition.h: Likewise.
9468         * include/grub/raid.h: Likewise.
9469         * include/grub/rescue.h: Likewise.
9470         * include/grub/script.h: Likewise.
9471         * include/grub/setjmp.h: Likewise.
9472         * include/grub/symbol.h: Likewise.
9473         * include/grub/term.h: Likewise.
9474         * include/grub/terminfo.h: Likewise.
9475         * include/grub/tparm.h: Likewise.
9476         * include/grub/types.h: Likewise.
9477         * include/grub/video.h: Likewise.
9478         * include/grub/efi/api.h: Likewise.
9479         * include/grub/efi/chainloader.h: Likewise.
9480         * include/grub/efi/console.h: Likewise.
9481         * include/grub/efi/console_control.h: Likewise.
9482         * include/grub/efi/disk.h: Likewise.
9483         * include/grub/efi/efi.h: Likewise.
9484         * include/grub/efi/pe32.h: Likewise.
9485         * include/grub/efi/time.h: Likewise.
9486         * include/grub/i386/linux.h: Likewise.
9487         * include/grub/i386/setjmp.h: Likewise.
9488         * include/grub/i386/types.h: Likewise.
9489         * include/grub/i386/efi/kernel.h: Likewise.
9490         * include/grub/i386/efi/loader.h: Likewise.
9491         * include/grub/i386/efi/time.h: Likewise.
9492         * include/grub/i386/pc/biosdisk.h: Likewise.
9493         * include/grub/i386/pc/boot.h: Likewise.
9494         * include/grub/i386/pc/chainloader.h: Likewise.
9495         * include/grub/i386/pc/console.h: Likewise.
9496         * include/grub/i386/pc/init.h: Likewise.
9497         * include/grub/i386/pc/kernel.h: Likewise.
9498         * include/grub/i386/pc/loader.h: Likewise.
9499         * include/grub/i386/pc/memory.h: Likewise.
9500         * include/grub/i386/pc/multiboot.h: Likewise.
9501         * include/grub/i386/pc/serial.h: Likewise.
9502         * include/grub/i386/pc/time.h: Likewise.
9503         * include/grub/i386/pc/vbe.h: Likewise.
9504         * include/grub/i386/pc/vbeblit.h: Likewise.
9505         * include/grub/i386/pc/vbefill.h: Likewise.
9506         * include/grub/i386/pc/vbeutil.h: Likewise.
9507         * include/grub/i386/pc/vga.h: Likewise.
9508         * include/grub/ieee1275/ieee1275.h: Likewise.
9509         * include/grub/ieee1275/ofdisk.h: Likewise.
9510         * include/grub/powerpc/libgcc.h: Likewise.
9511         * include/grub/powerpc/setjmp.h: Likewise.
9512         * include/grub/powerpc/types.h: Likewise.
9513         * include/grub/powerpc/ieee1275/biosdisk.h: Likewise.
9514         * include/grub/powerpc/ieee1275/console.h: Likewise.
9515         * include/grub/powerpc/ieee1275/ieee1275.h: Likewise.
9516         * include/grub/powerpc/ieee1275/kernel.h: Likewise.
9517         * include/grub/powerpc/ieee1275/loader.h: Likewise.
9518         * include/grub/powerpc/ieee1275/multiboot.h: Likewise.
9519         * include/grub/powerpc/ieee1275/time.h: Likewise.
9520         * include/grub/powerpc/ieee1275/util/biosdisk.h: Likewise.
9521         * include/grub/sparc64/libgcc.h: Likewise.
9522         * include/grub/sparc64/setjmp.h: Likewise.
9523         * include/grub/sparc64/types.h: Likewise.
9524         * include/grub/sparc64/ieee1275/console.h: Likewise.
9525         * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
9526         * include/grub/sparc64/ieee1275/kernel.h: Likewise.
9527         * include/grub/sparc64/ieee1275/time.h: Likewise.
9528         * include/grub/util/biosdisk.h: Likewise.
9529         * include/grub/util/getroot.h: Likewise.
9530         * include/grub/util/lvm.h: Likewise.
9531         * include/grub/util/misc.h: Likewise.
9532         * include/grub/util/raid.h: Likewise.
9533         * include/grub/util/resolve.h: Likewise.
9534         * io/gzio.c: Likewise.
9535         * kern/device.c: Likewise.
9536         * kern/disk.c: Likewise.
9537         * kern/dl.c: Likewise.
9538         * kern/elf.c: Likewise.
9539         * kern/env.c: Likewise.
9540         * kern/err.c: Likewise.
9541         * kern/file.c: Likewise.
9542         * kern/fs.c: Likewise.
9543         * kern/loader.c: Likewise.
9544         * kern/main.c: Likewise.
9545         * kern/misc.c: Likewise.
9546         * kern/mm.c: Likewise.
9547         * kern/parser.c: Likewise.
9548         * kern/partition.c: Likewise.
9549         * kern/rescue.c: Likewise.
9550         * kern/term.c: Likewise.
9551         * kern/efi/efi.c: Likewise.
9552         * kern/efi/init.c: Likewise.
9553         * kern/efi/mm.c: Likewise.
9554         * kern/i386/dl.c: Likewise.
9555         * kern/i386/efi/init.c: Likewise.
9556         * kern/i386/efi/startup.S: Likewise.
9557         * kern/i386/pc/init.c: Likewise.
9558         * kern/i386/pc/lzo1x.S: Likewise.
9559         * kern/i386/pc/startup.S: Likewise.
9560         * kern/ieee1275/ieee1275.c: Likewise.
9561         * kern/powerpc/cache.S: Likewise.
9562         * kern/powerpc/dl.c: Likewise.
9563         * kern/powerpc/ieee1275/cmain.c: Likewise.
9564         * kern/powerpc/ieee1275/crt0.S: Likewise.
9565         * kern/powerpc/ieee1275/init.c: Likewise.
9566         * kern/powerpc/ieee1275/openfw.c: Likewise.
9567         * kern/sparc64/cache.S: Likewise.
9568         * kern/sparc64/dl.c: Likewise.
9569         * kern/sparc64/ieee1275/init.c: Likewise.
9570         * kern/sparc64/ieee1275/openfw.c: Likewise.
9571         * loader/efi/chainloader.c: Likewise.
9572         * loader/efi/chainloader_normal.c: Likewise.
9573         * loader/i386/efi/linux.c: Likewise.
9574         * loader/i386/efi/linux_normal.c: Likewise.
9575         * loader/i386/pc/chainloader.c: Likewise.
9576         * loader/i386/pc/chainloader_normal.c: Likewise.
9577         * loader/i386/pc/linux.c: Likewise.
9578         * loader/i386/pc/linux_normal.c: Likewise.
9579         * loader/i386/pc/multiboot.c: Likewise.
9580         * loader/i386/pc/multiboot_normal.c: Likewise.
9581         * loader/powerpc/ieee1275/linux.c: Likewise.
9582         * loader/powerpc/ieee1275/linux_normal.c: Likewise.
9583         * normal/arg.c: Likewise.
9584         * normal/cmdline.c: Likewise.
9585         * normal/command.c: Likewise.
9586         * normal/completion.c: Likewise.
9587         * normal/execute.c: Likewise.
9588         * normal/function.c: Likewise.
9589         * normal/lexer.c: Likewise.
9590         * normal/main.c: Likewise.
9591         * normal/menu.c: Likewise.
9592         * normal/menu_entry.c: Likewise.
9593         * normal/misc.c: Likewise.
9594         * normal/parser.y: Likewise.
9595         * normal/script.c: Likewise.
9596         * normal/i386/setjmp.S: Likewise.
9597         * normal/powerpc/setjmp.S: Likewise.
9598         * normal/sparc64/setjmp.S: Likewise.
9599         * partmap/acorn.c: Likewise.
9600         * partmap/amiga.c: Likewise.
9601         * partmap/apple.c: Likewise.
9602         * partmap/gpt.c: Likewise.
9603         * partmap/pc.c: Likewise.
9604         * partmap/sun.c: Likewise.
9605         * term/gfxterm.c: Likewise.
9606         * term/terminfo.c: Likewise.
9607         * term/efi/console.c: Likewise.
9608         * term/i386/pc/console.c: Likewise.
9609         * term/i386/pc/serial.c: Likewise.
9610         * term/i386/pc/vesafb.c: Likewise.
9611         * term/i386/pc/vga.c: Likewise.
9612         * term/ieee1275/ofconsole.c: Likewise.
9613         * util/biosdisk.c: Likewise.
9614         * util/console.c: Likewise.
9615         * util/genmoddep.c: Likewise.
9616         * util/getroot.c: Likewise.
9617         * util/grub-emu.c: Likewise.
9618         * util/grub-mkdevicemap.c: Likewise.
9619         * util/grub-probe.c: Likewise.
9620         * util/lvm.c: Likewise.
9621         * util/misc.c: Likewise.
9622         * util/raid.c: Likewise.
9623         * util/resolve.c: Likewise.
9624         * util/update-grub.in: Likewise.
9625         * util/update-grub_lib.in: Likewise.
9626         * util/grub.d/00_header.in: Likewise.
9627         * util/grub.d/10_hurd.in: Likewise.
9628         * util/grub.d/10_linux.in: Likewise.
9629         * util/i386/efi/grub-install.in: Likewise.
9630         * util/i386/efi/grub-mkimage.c: Likewise.
9631         * util/i386/pc/grub-install.in: Likewise.
9632         * util/i386/pc/grub-mkimage.c: Likewise.
9633         * util/i386/pc/grub-mkrescue.in: Likewise.
9634         * util/i386/pc/grub-setup.c: Likewise.
9635         * util/i386/pc/misc.c: Likewise.
9636         * util/powerpc/ieee1275/grub-install.in: Likewise.
9637         * util/powerpc/ieee1275/grub-mkimage.c: Likewise.
9638         * util/powerpc/ieee1275/misc.c: Likewise.
9639         * video/bitmap.c: Likewise.
9640         * video/video.c: Likewise.
9641         * video/i386/pc/vbe.c: Likewise.
9642         * video/i386/pc/vbeblit.c: Likewise.
9643         * video/i386/pc/vbefill.c: Likewise.
9644         * video/i386/pc/vbeutil.c: Likewise.
9645         * video/readers/tga.c: Likewise.
9647 2007-07-02  Robert Millan  <rmh@aybabtu.com>
9649         * conf/i386-efi.rmk: Replace obsolete reference to
9650         util/i386/pc/biosdisk.c with util/biosdisk.c, and util/i386/pc/getroot.c
9651         with util/getroot.c.
9652         * conf/powerpc-ieee1275.rmk: Likewise.
9653         * conf/sparc64-ieee1275.rmk: Likewise.
9655         * util/grub-emu.c (main): Fix unchecked pointer handling.
9657 2007-07-02  Robert Millan  <rmh@aybabtu.com>
9659         * util/i386/efi/grub-install.in: Allow `grub_probe --target=partmap'
9660         invocation to fail, in order to support partition-less media.
9662         * util/i386/pc/grub-install.in: Likewise.
9664         * util/powerpc/ieee1275/grub-install.in: Use grub-probe to determine
9665         which fs or partmap modules are needed (akin to its sister scripts).
9667         Also use grub-probe to get rid of unportable /proc/mounts check.
9669         Print the same informational message that the other scripts do, before
9670         exiting.
9672 2007-06-23  Robert Millan  <rmh@aybabtu.com>
9674         * util/update-grub_lib.in (font_path): New function.  Determine whether
9675         a font file can be found and, if so, echo the GRUB path to it.
9677         * util/update-grub.in: Handle multiple terminals depending on user
9678         input, platform availability and font file presence.  Propagate
9679         variables of our findings to /etc/grub.d/ children.
9681         * util/grub.d/00_header.in: Handle multiple terminals, based on
9682         environment setup by update-grub.
9684 2007-06-23  Robert Millan  <rmh@aybabtu.com>
9686         * conf/i386-pc.rmk (pkgdata_MODULES): Add serial.mod.
9688 2007-06-21  Robert Millan  <rmh@aybabtu.com>
9690         * include/grub/i386/pc/kernel.h: Define GRUB_KERNEL_MACHINE_DATA_END to
9691         indicate end of data section in kernel image.
9692         * include/grub/i386/efi/kernel.h: Define GRUB_KERNEL_MACHINE_PREFIX and
9693         GRUB_KERNEL_MACHINE_DATA_END.
9695         * kern/i386/pc/startup.S: Do not initialize grub_prefix, only reserve
9696         space for it.
9697         * kern/i386/efi/startup.S: Likewise.
9699         * util/i386/pc/grub-mkimage.c: Initialize grub_prefix to /boot/grub
9700         during image generation.  Implement --prefix option to override this
9701         patch.
9702         * util/i386/efi/grub-mkimage.c: Likewise.
9704         * util/update-grub_lib.in (convert_system_path_to_grub_path): Split
9705         code to make path relative to its root into a separate function.
9707         * util/i386/pc/grub-install.in: Use newly provided
9708         make_system_path_relative_to_its_root() to convert ${grubdir}, then
9709         pass the result to grub-install --prefix.
9711 2007-06-13  Robert Millan  <rmh@aybabtu.com>
9713         * include/grub/util/misc.h: Define DEFAULT_DIRECTORY and
9714         DEFAULT_DEVICE_MAP.
9715         * util/grub-emu.c: Use above definitions from misc.h instead of
9716         defining them.
9717         * util/grub-mkdevicemap.c: Likewise.
9718         * util/i386/pc/grub-setup.c: Likewise.
9719         * util/grub-probe.c: Likewise.
9720         (probe): Abort with grub_util_error() when either
9721         grub_guess_root_device or grub_util_get_grub_dev fails.
9723 2007-06-12  Robert Millan  <rmh@aybabtu.com>
9725         * normal/command.c (grub_command_execute): Use NULL rather than 0 for
9726         "pager" assignment.
9727         * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Likewise for
9728         "pcdata".
9729         * util/grub-probe.c (probe): Likewise for "drive_name".
9731 2007-06-11  Robert Millan  <rmh@aybabtu.com>
9733         * util/i386/pc/grub-mkrescue.in: Pad both floppy images with zeroes,
9734         not just the cdrom one.
9736 2007-06-11  Robert Millan  <rmh@aybabtu.com>
9738         * util/i386/pc/grub-mkrescue.in: Add "set -e".
9739         Add --pkglibdir=DIR option to override pkglibdir.
9740         Mention --image-type=TYPE in help output.
9741         Fix --grub-mkimage (it was a no-op).
9742         Abort gracefully when no parameter is given.
9744 2007-06-11  Robert Millan  <rmh@aybabtu.com>
9746         * util/i386/pc/grub-mkrescue.in: New file.
9747         * conf/i386-pc.rmk: Add its build declarations.  Put it in bin_SCRIPTS.
9748         * Makefile.in: Handle bin_SCRIPTS.
9750 2007-06-10  Vesa Jaaskelainen  <chaac@nic.fi>
9752         * term/gfxterm.c (grub_gfxterm_init): Added support for specifying
9753         list of video modes.
9755 2007-06-06  Robert Millan  <rmh@aybabtu.com>
9757         * util/update-grub_lib.in (convert_system_path_to_grub_path): Abort if
9758         file doesn't exist, or if it is in a filesystem grub can't read.
9760         * util/update-grub.in: Set fallback for GRUB_FS check to "unknown".  Do
9761         not abort if GRUB_DRIVE could not be defined.  Rearrange generated
9762         header comment to fit in 80 columns when the variables are resolved.
9764         * util/grub.d/00_header.in: Only set root variable when GRUB_DRIVE
9765         could be identified by update-grub.  Remove redundant check for
9766         unifont.pff existence (since convert_system_path_to_grub_path now
9767         handles that).
9769 2007-06-04  Robert Millan  <rmh@aybabtu.com>
9771         * conf/i386-efi.rmk (grub_probe_SOURCES): Add partmap/apple.c.
9773         * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.
9775         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add partmap/pc.c.
9777 2007-06-04  Robert Millan  <rmh@aybabtu.com>
9779         * conf/powerpc-ieee1275.rmk: Enable grub-mkdevicemap and grub-probe.
9781         * include/grub/partition.h: Declare grub_apple_partition_map_init and
9782         grub_apple_partition_map_fini.
9784         * util/biosdisk.c
9785         (grub_util_biosdisk_open): Replace BLKGETSIZE with BLKGETSIZE64 (needed
9786         to access >2 TiB disks).
9788         Print disk->total_sectors with %llu instead of %lu, since this
9789         variable is always 64-bit (prevents wrong disk size from being displayed
9790         on either >2 TiB disk or big-endian CPU).
9792         (grub_util_biosdisk_get_grub_dev): Convert gpt_partition_map handling
9793         into a generic case that supports all (sane) partition maps.
9795         Stop using grub_cpu_to_le32() on dos_part / bsd_part since it actually
9796         breaks big-endian.
9798         * util/grub-probe.c: Call grub_apple_partition_map_init() before probe()
9799         and grub_apple_partition_map_fini() after that.
9801 2007-06-01  Robert Millan  <rmh@aybabtu.com>
9803         * util/update-grub.in: Export GRUB_CMDLINE_LINUX.
9805         * util/grub.d/00_header.in: Only enable gfxterm when
9806         convert_system_path_to_grub_path() succeeds.
9808 2007-05-20  Robert Millan  <rmh@aybabtu.com>
9810         * util/update-grub_lib.in: New file.
9811         * DISTLIST: Add update-grub_lib.in.
9812         * conf/common.rmk: Generate update-grub_lib and install it in
9813         $(lib_DATA).
9814         * Makefile.in: Add install routine for $(lib_DATA).
9816         * util/grub.d/00_header.in: Use convert_system_path_to_grub_path()
9817         function provided by update-grub_lib to support arbitrary paths of
9818         unifont.pff.
9819         * util/update-grub.in: Use convert_system_path_to_grub_path() to
9820         initialize GRUB_DRIVE_BOOT and GRUB_DRIVE_BOOT_GRUB variables.
9822 2007-05-19  Robert Millan  <rmh@aybabtu.com>
9824         * commands/i386/cpuid.c: New module.
9825         * DISTLIST: Add it.
9826         * conf/i386-efi.rmk: Enable cpuid.mod.
9827         * conf/i386-pc.rmk: Likewise.
9829 2007-05-18  Jeroen Dekkers  <jeroen@dekkers.cx>
9831         * kern/disk.c (grub_disk_read): Check return value of
9832         grub_realloc().
9834 2007-05-18  Jeroen Dekkers  <jeroen@dekkers.cx>
9836         * util/getroot.c (grub_util_get_grub_dev): Support partitionable
9837         arrays.
9838         * disk/raid.c (grub_raid_open): Likewise.
9840 2007-05-17  Jeroen Dekkers  <jeroen@dekkers.cx>
9842         * util/biosdisk.c (linux_find_partition): Allocate real_dev on the
9843         stack instead of on the heap.
9845         * kern/disk.c (grub_disk_read): Make sure tmp_buf is big enough
9846         before doing a read on it.
9848         * configure.ac: Only use -fno-stack-protector for the target
9849         environment.
9851 2007-05-17  Jeroen Dekkers  <jeroen@dekkers.cx>
9853         * video/i386/pc/vbe.c (grub_video_vbe_create_render_target): Add
9854         __attribute_ ((unused)) to mode_type argument.
9856         * util/getroot.c (grub_guess_root_device): Fix #endif.
9858         * kern/misc.c (memcmp): Fix prototype.
9860         * include/grub/partition.h [GRUB_UTIL]
9861         (grub_gpt_partition_map_init): Add prototype.
9862         (grub_gpt_partition_map_fini): Likewise.
9864         * fs/jfs.c (struct grub_jfs_inode): Put __attribute__ ((packed)
9865         at the right place.
9867         * fs/fat.c (grub_fat_mount): Replace ~0UL with ~0U.
9868         (grub_fat_read_data): Likewise.
9869         (grub_fat_find_dir): Likewise.
9871         * font/manager.c (find_glyph): Make table a const.
9872         (grub_font_get_glyph): Remove bitmap from if statement.
9874 2007-05-16  Jeroen Dekkers  <jeroen@dekkers.cx>
9876         * util/getroot.c (grub_guess_root_device): Remove RAID and LVM
9877         code, first search for device in /dev/mapper, then in /dev.
9878         (grub_util_get_grub_dev): New function.
9879         * include/grub/util/getroot.h (grub_util_get_grub_dev): Add
9880         prototype.
9881         * util/grub-probe.c (probe): Remove check for RAID, call
9882         grub_util_get_grub_dev() instead of
9883         grub_util_biosdisk_get_grub_dev().
9884         * util/grub-emu.c (main): Call grub_util_get_grub_dev() instead of
9885         grub_util_biosdisk_get_grub_dev().
9886         * util/i386/pc/grub-setup.c (main): Likewise.
9888 2007-05-16  Robert Millan  <rmh@aybabtu.com>
9890         * DISTLIST: Update for the latest changes.
9891         * conf/i386-pc.rmk: Use the new paths for util/getroot.c,
9892         util/grub-mkdevicemap.c, util/grub-probe.c and util/biosdisk.c.
9893         * util/grub-emu.c: Replace grub/i386/pc/util/biosdisk.h with
9894         grub/util/biosdisk.h.
9895         * util/i386/pc/grub-setup.c: Replace grub/machine/util/biosdisk.h with
9896         grub/util/biosdisk.h.
9898 2007-05-16  Robert Millan  <rmh@aybabtu.com>
9900         * util/grub.d/00_header.in: Set default gfxmode to `640x480'.
9902 2007-05-16  Robert Millan  <rmh@aybabtu.com>
9904         * util/i386/efi/grub-install.in: New.
9905         * conf/i386-efi.rmk: Enable grub-mkdevicemap, grub-probe and the
9906         newly added grub-install.
9907         * util/biosdisk.c: Remove unnecessary grub/machine/biosdisk.h
9908         include.
9909         * util/getroot.c: Replace grub/i386/pc/util/biosdisk.h with
9910         grub/util/biosdisk.h.
9911         * util/grub-probe.c: Replace grub/machine/util/biosdisk.h with
9912         grub/util/biosdisk.h.
9914 2007-05-16  Robert Millan  <rmh@aybabtu.com>
9916         * include/grub/i386/pc/util/biosdisk.h: Moved to ...
9917         * include/grub/util/biosdisk.h: ... here.
9918         * util/i386/pc/biosdisk.c: Moved to ...
9919         * util/biosdisk.c: ... here.
9920         * util/i386/pc/getroot.c: Moved to ...
9921         * util/getroot.c: ... here.
9922         * util/i386/pc/grub-mkdevicemap.c: Moved to ...
9923         * util/grub-mkdevicemap.c: ... here.
9924         * util/i386/pc/grub-probe.c: Moved to ...
9925         * util/grub-probe.c: ... here.
9927 2007-05-15  Robert Millan  <rmh@aybabtu.com>
9929         * util/update-grub.in: Remove duplicated line in grub.cfg header
9930         message.
9932 2007-05-13  Robert Millan  <rmh@aybabtu.com>
9934         * util/update-grub.in: Fix a few assumptions about the devices holding
9935         /, /boot and /boot/grub being the same.
9936         * util/grub.d/00_header.in: Likewise.
9937         * util/grub.d/10_hurd.in: Likewise.
9938         * util/grub.d/10_linux.in: Likewise.
9940         * util/grub.d/10_linux.in: Implement Linux image sorting with arbitrary
9941         patterns.  Use that to define the `.old' suffix as older than `'.
9943         * util/grub.d/00_header.in: Set default gfxmode to `800x600x16'.
9945         * util/update-grub.in: Add a reference to ${sysconfdir}/default/grub in
9946         the grub.cfg header message.
9948 2007-05-11  Robert Millan  <rmh@aybabtu.com>
9950         * util/update-grub.in: Create device.map if it doesn't already exist,
9951         before attempting to run grub-probe.
9952         Check for grub-probe and grub-mkdevicemap with the same code
9953         grub-install is using.
9954         Remove test mode.
9956 2007-05-09  Jeroen Dekkers  <jeroen@dekkers.cx>
9958         * Makefile.in: Add the datarootdir autoconf variable.
9960 2007-05-09  Robert Millan  <rmh@aybabtu.com>
9962         * util/i386/pc/grub-probe.c (probe): When detecting partition map,
9963         fail gracefully if dev->disk->partition == NULL.
9965 2007-05-07  Robert Millan  <rmh@aybabtu.com>
9967         * util/i386/pc/grub-probe.c: Add `grub-probe -t partmap' parameter to
9968         determine partition map module.
9969         * util/i386/pc/grub-install.in: Use this feature to decide which
9970         partition module to load, instead of hardcoding pc and gpt.
9972 2007-05-07  Robert Millan  <rmh@aybabtu.com>
9974         * Makefile.in: Fix assumption that $(srcdir) has a trailing slash when
9975         source directory differs from build directory.
9977 2007-05-05  Robert Millan  <rmh@aybabtu.com>
9979         * util/powerpc/ieee1275/grub-install.in: Fix syntax error in pkglibdir
9980         initialisation.
9982 2007-05-05  Robert Millan  <rmh@aybabtu.com>
9984         * util/update-grub.in: Create ${grub_prefix} if it doesn't exist.
9986 2007-05-05  Robert Millan  <rmh@aybabtu.com>
9988         * util/grub.d/10_linux.in: Allow the administrator to insert Linux
9989         command-line arguments via ${GRUB_CMDLINE_LINUX}.
9991 2007-05-05  Robert Millan  <rmh@aybabtu.com>
9993         * conf/i386-pc.rmk (grub_setup_SOURCES): Add partmap/gpt.c.
9994         (grub_probe_SOURCES): Likewise.
9995         * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): Detect
9996         GPT and initialize dos_part and bsd_part accordingly.
9997         * util/i386/pc/grub-setup.c (setup): Ditto for install_dos_part and
9998         install_bsd_part.
9999         (main): Activate gpt module for use during partition identification,
10000         and deactivate it afterwards.
10001         * util/i386/pc/grub-install.in: Add gpt module to core.img.
10002         * util/i386/pc/grub-probe.c (main): Activate gpt module for use during
10003         partition identification, and deactivate it afterwards.
10005 2007-05-05  Robert Millan  <rmh@aybabtu.com>
10007         * term/i386/pc/console.c (grub_console_fini): Call
10008         grub_term_set_current() before grub_term_unregister().
10010 2007-05-04  Robert Millan  <rmh@aybabtu.com>
10012         * DISTLIST: Add util/update-grub.in, util/grub.d/00_header.in,
10013         util/grub.d/10_hurd.in, util/grub.d/10_linux.in and util/grub.d/README.
10014         * Makefile.in: Build update-grub_SCRIPTS.  Install update-grub_SCRIPTS
10015         and update-grub_DATA.
10016         * conf/common.rmk: Build and install update-grub components.
10017         * conf/common.mk: Regenerate.
10018         * util/update-grub.in: New.  Core of update-grub.
10019         * util/grub.d/00_header.in: New.  Generates grub.cfg header.
10020         * util/grub.d/10_hurd.in: New.  Generates boot entries for the Hurd.
10021         * util/grub.d/10_linux.in: New.  Generates boot entries for Linux.
10022         * util/grub.d/README: New.  Document grub.d directory layout.
10024 2007-05-01  Robert Millan  <rmh@aybabtu.com>
10026         * util/grub-emu.c: Move initialization functions
10027         grub_util_biosdisk_init() and grub_init_all() before
10028         grub_util_biosdisk_get_grub_dev(), which relies on them.
10030 2007-04-19  Robert Millan  <rmh@aybabtu.com>
10032         * util/powerpc/ieee1275/grub-install.in: Initialize ${bindir}, since
10033         it is used later.
10035 2007-04-18  Jerone Young  <jerone@gmail.com>
10037         * kernel/elf.c: Add missing parenthesis for conditional statement
10038         stanza.
10040 2007-04-10  Jerone Young  <jerone@gmail.com>
10042         * util/i386/pc/getroot.c: Update so that if root device is /dev/root ,
10043         continue on and look for device node with real device name.
10045 2007-04-10  Jerone Young  <jerone@gmail.com>
10047         * configure.ac: Add argument for autoconf to use transformation
10048         ability.
10049         * Makefile.in: Add autoconf package transformation code.
10050         * util/i386/pc/grub-install.in: Likewise.
10051         * util/powerpc/ieee1275/grub-install.in: Likewise.
10053 2007-03-19  Yoshinori K. Okuji  <okuji@enbug.org>
10055         * fs/ext2.c (EXT2_GOOD_OLD_REVISION): New macro.
10056         (EXT2_GOOD_OLD_INODE_SIZE): Likewise.
10057         (EXT2_REVISION): Likewise.
10058         (EXT2_INODE_SIZE): Likewise.
10059         (struct grub_ext2_block_group): Added a missing member
10060         "used_dirs".
10061         (grub_ext2_read_inode): Divide by the inode size in a superblock
10062         instead of 128 to obtain INODES_PER_BLOCK.
10063         Use the macro EXT2_INODE_SIZE instead of directly using
10064         SBLOCK->INODE_SIZE.
10066 2007-03-18  Yoshinori K. Okuji  <okuji@enbug.org>
10068         * fs/ext2.c (grub_ext2_read_inode): Use the inode size in a
10069         superblock instead of the structure size to compute an
10070         offset. This fixes the problem that GRUB could not read a
10071         filesystem when inode size is different from 128-byte.
10073 2007-03-05  Marco Gerards  <marco@gnu.org>
10075         * normal/main.c (read_config_file): When "menu" is not set, create
10076         an initial context.
10078 2007-02-21  Hollis Blanchard  <hollis@penguinppc.org>
10080         * kern/powerpc/ieee1275/init.c (HEAP_SIZE): Removed.
10081         (HEAP_LIMIT): New macro.
10082         (grub_claim_heap): Claim memory up to `heaplimit'.
10084 2007-02-21  Hollis Blanchard  <hollis@penguinppc.org>
10086         * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Link at 64KB.
10087         * kern/powerpc/ieee1275/init.c (_end): Add declaration.
10088         (_start): Likewise.
10089         (grub_arch_modules_addr): Return address after `_end'.
10090         * util/powerpc/ieee1275/grub-mkimage.c: Include grub/misc.h.
10091         (load_modules): Use new parameter as `p_paddr' and `p_vaddr'.
10092         (add_segments): Calculate `_end' from phdr size and location.
10093         (ALIGN_UP): Moved to ...
10094         * include/grub/misc.h: here.
10095         * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
10096         New macro.
10097         (GRUB_IEEE1275_MODULE_BASE): Removed.
10099 2007-02-20  Hollis Blanchard  <hollis@penguinppc.org>
10101         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Correct
10102         loop boundary.
10104 2007-02-20  Hollis Blanchard  <hollis@penguinppc.org>
10106         * include/grub/elfload.h (grub_elf32_load_hook_t): Return grub_err_t.
10107         All users updated.
10108         (grub_elf64_load_hook_t): Likewise.
10109         * kern/elf.c: Call `grub_error_push' before `grub_error'. Improve
10110         debug output.
10112 2007-02-20  Hollis Blanchard  <hollis@penguinppc.org>
10114         * kern/mm.c: Update copyright.
10115         (grub_mm_debug): Correct syntax error.
10116         (grub_mm_dump_free): New function.
10117         (grub_debug_free): Call `grub_free'.
10118         * include/grub/mm.h: Update copyright.
10119         (grub_mm_dump_free): Add declaration.
10121 2007-02-12  Hollis Blanchard  <hollis@penguinppc.org>
10123         * include/grub/ieee1275/ieee1275.h: Update copyright.
10124         * kern/powerpc/ieee1275/init.c: Likewise.
10125         * kern/powerpc/ieee1275/openfw.c: Likewise.
10127         * loader/powerpc/ieee1275/linux.c: Likewise.
10128         * include/grub/elfload.h: Likewise.
10129         * kern/elf.c: Likewise.
10130         (grub_elf32_load): Pass `base' and `size' parameters.  Update all
10131         callers.
10132         (grub_elf64_load): Likewise.
10133         (grub_elf32_load_segment): Move to a nested function.
10134         (grub_elf64_load_segment): Likewise.
10136 2007-02-12  Hollis Blanchard  <hollis@penguinppc.org>
10138         * include/grub/ieee1275/ieee1275.h (grub_available_iterate): New
10139         prototype.
10140         * kern/powerpc/ieee1275/init.c (grub_heap_start): Removed.
10141         (grub_heap_len): Likewise.
10142         (HEAP_SIZE): New macro.
10143         (grub_claim_heap): New function.
10144         (grub_machine_init): Don't claim heap directly.  Call
10145         `grub_claim_heap'.
10146         * kern/powerpc/ieee1275/openfw.c: Include alloca.h.
10147         (grub_available_iterate): New function.
10149 2007-02-03  Thomas Schwinge  <tschwinge@gnu.org>
10151         * aclocal.m4 (grub_CHECK_STACK_PROTECTOR): New definition.
10152         * configure.ac: Use it for testing the HOST and TARGET compilers.
10154 2006-12-13  Thomas Schwinge  <tschwinge@gnu.org>
10156         * Makefile.in (enable_grub_emu): New variable.
10157         * configure.ac (--enable-grub-emu): New option.
10158         Do the checks for (n)curses only if `--enable-grub-emu' is requested.
10159         * conf/i386-efi.rmk (sbin_UTILITIES): Add `grub-emu' only if requested.
10160         * conf/i386-pc.rmk: Likewise.
10161         * conf/powerpc-ieee1275.rmk: Likewise.
10162         * conf/sparc64-ieee1275.rmk (bin_UTILITIES): Likewise.
10164 2006-12-12  Marco Gerards  <marco@gnu.org>
10166         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_MENU'.
10168         * kern/env.c (grub_env_unset): Don't free the member `value' when
10169         the type is GRUB_ENV_VAR_DATA, in this case it's a user defined
10170         pointer.
10172         * normal/main.c (current_menu): Removed.
10173         (free_menu): Unset the `menu' environment variable.
10174         (grub_normal_menu_addentry): Make use of the environment variable
10175         `menu', instead of using the global `current_menu'.  Allocate
10176         memory for the sourcecode of this entry.
10177         (read_config_file): New argument `nested', changed all callers.
10178         Only in the case of a new context, initialize a new menu.  Set the
10179         `menu' environment variable.
10180         (grub_normal_execute): Don't set and unset the environment
10181         variable `menu' here anymore.  Only free the menu when leaving the
10182         context.
10184         * util/i386/pc/biosdisk.c (linux_find_partition): Fixed a memory
10185         leak.
10187 2006-12-11  Marco Gerards  <marco@gnu.org>
10189         * normal/menu_entry.c (run): Fix off by one bug so the last line
10190         is executed.  Move the loader check to outside the loop.
10192 2006-12-08  Hollis Blanchard  <hollis@penguinppc.org>
10194         * kern/powerpc/ieee1275/cmain.c (cmain): Mark r3 and r4 as `UNUSED'.
10196 2006-11-25  Yoshinori K. Okuji  <okuji@enbug.org>
10198         * util/i386/pc/grub-mkimage.c (generate_image): Fix the offset of
10199         the number of sectors.  Reported by Andrey Shuvikov
10200         <mr_hyro@yahoo.com>.
10202 2006-11-11  Jeroen Dekkers  <jeroen@dekkers.cx>
10204         * kern/disk.c (grub_disk_read): When there is a read error, always
10205         try to read only the necessary data.
10207         * conf/i386-pc.rmk (grub_probe_SOURCES): Add disk/lvm.c and
10208         disk/raid.c.
10209         * include/grub/disk.h [GRUB_UTIL] (grub_raid_init): New
10210         prototype.
10211         [GRUB_UTIL] (grub_raid_fini): Likewise.
10212         [GRUB_UTIL] (grub_lvm_init): Likewise.
10213         [GRUB_UTIL] (grub_lvm_fini): Likewise.
10214         * util/i386/pc/grub-probe.c (probe): Check whether DEVICE_NAME is
10215         RAID device and copy DEVICE_NAME to DRIVE_NAME in that case.
10216         (main): Call grub_raid_init(), grub_lvm_init(), grub_lvm_fini()
10217         and grub_raid_fini().
10219 2006-11-09  Jeroen Dekkers  <jeroen@dekkers.cx>
10221         * include/grub/types.h (__unused): Rename to UNUSED.
10222         * kern/elf.c (grub_elf32_size): Use UNUSED instead of __unused.
10223         (grub_elf64_size): Likewise.
10225 2006-11-03  Hollis Blanchard  <hollis@penguinppc.org>
10227         * kern/elf.c (grub_elf_file): Call grub_file_seek. Call
10228         grub_error_push and grub_error_pop in the error-handling path.
10229         (grub_elf32_load_segment): Only call grub_file_read with non-zero
10230         length.
10232 2006-11-03  Hollis Blanchard  <hollis@penguinppc.org>
10234         * conf/i386-efi.rmk (grub_emu_SOURCES): Add kern/elf.c.
10235         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
10236         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10237         (kernel_elf_SOURCES): Likewise.
10238         * conf/i386-efi.rmk (kernel_mod_HEADERS): Add elfload.h and cache.h.
10239         * conf/i386-pc.rmk (kernel_mod_HEADERS): Likewise.
10240         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
10241         * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
10242         * conf/common.rmk (pkgdata_MODULES): Add elf.mod.
10243         (elf_mod_SOURCES): New variable.
10244         (elf_mod_CFLAGS): Likewise.
10245         (elf_mod_LDFLAGS): Likewise.
10246         * include/grub/types.h (__unused): New macro.
10247         * include/grub/elfload.h: New file.
10248         * kern/elf.c: Likewise.
10249         * loader/powerpc/ieee1275/linux.c: Include elfload.h.
10250         (ELF32_LOADMASK): New macro.
10251         (ELF64_LOADMASK): Likewise.
10252         (vmlinux): Removed.
10253         (grub_linux_load32): New function.
10254         (grub_linux_load64): Likewise.
10255         (grub_rescue_cmd_linux): Call grub_linux_load32 or grub_linux_load64.
10256         Use grub_elf_t instead of grub_file_t.
10258 2006-11-02  Hollis Blanchard  <hollis@penguinppc.org>
10260         * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): Add
10261         `catch_result' to struct set_color_args.
10263 2006-10-28  Yoshinori K. Okuji  <okuji@enbug.org>
10265         * normal/menu.c: Include grub/script.h.
10266         * normal/menu_entry.c: Likewise.
10267         * include/grub/normal.h: Do not include grub/script.h.
10269 2006-10-27  Hollis Blanchard  <hollis@penguinppc.org>
10271         * kern/disk.c (grub_disk_read): Correct debug printf formatting.
10273 2006-10-27  Hollis Blanchard  <hollis@penguinppc.org>
10275         * kern/disk.c (grub_disk_open): Print debug messages when opening a
10276         disk.
10277         (grub_disk_close): Print debug messages when closing a disk.
10278         (grub_disk_read): Print debug messages when disk read fails.
10279         * kern/fs.c (grub_fs_probe): Print debug messages when detecting
10280         filesystem type.
10281         * kern/partition.c: Include misc.h.
10282         (grub_partition_iterate): Print debug messages when detecting
10283         partition type.
10285 2006-10-27  Hollis Blanchard  <hollis@penguinppc.org>
10287         * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Return error if `status'
10288         is negative.
10289         * kern/ieee1275/ieee1275.c (IEEE1275_IHANDLE_INVALID): Change to 0.
10291 2006-10-26  Hollis Blanchard  <hollis@penguinppc.org>
10293         * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
10294         Reverse GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS test.
10296 2006-10-25  Jeroen Dekkers  <jeroen@dekkers.cx>
10298         * disk/lvm.c (grub_lvm_scan_device): Malloc sizeof(*lv) bytes
10299         instead of sizeof(lv). Patch by Michael Guntsche.
10301 2006-10-18  Jeroen Dekkers  <jeroen@dekkers.cx>
10303         * disk/lvm.c: Rename VGS to VG_LIST.
10304         (grub_lvm_iterate): Change VGS->LV to VG-LV.
10305         (grub_lvm_open): Likewise.
10306         Thanks to Michael Guntsche for finding this bug.
10308 2006-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
10310         * configure.ac (AC_INIT): Bumped to 1.95.
10312 2006-10-14  Robert Millan  <rmh@aybabtu.com>
10314         * util/i386/pc/getroot.c (grub_guess_root_device): Don't compare os_dev
10315         with "/dev/.static/dev/md".
10317 2006-10-14  Yoshinori K. Okuji  <okuji@enbug.org>
10319         * util/i386/pc/grub-probe.c (probe): Print DEVICE_NAME instead of
10320         DRIVE_NAME when grub_util_biosdisk_get_grub_dev fails. Open
10321         DRIVE_NAME instead of DEVICE_NAME. Make sure that DEVICE_NAME and
10322         DRIVE_NAME are always freed.
10324         * util/i386/pc/biosdisk.c (make_device_name): Add one into
10325         DOS_PART, as a DOS partition is counted from one instead of zero
10326         now. Reported by Robert Millan.
10328 2006-10-14  Robert Millan  <rmh@aybabtu.com>
10330         * util/i386/pc/getroot.c (grub_guess_root_device): Stop using
10331         grub_util_biosdisk_get_grub_dev to convert system device to GRUB device.
10332         * util/grub-emu.c (main): Use grub_util_biosdisk_get_grub_dev with the
10333         string returned by grub_guess_root_device.
10334         * util/i386/pc/grub-setup.c: Likewise.
10335         * util/i386/pc/grub-probefs.c: Likewise.
10337         * util/i386/pc/grub-probefs.c: Rename to ...
10338         * util/i386/pc/grub-probe.c: ... this.
10339         * DISTLIST: Remove grub-probefs, add grub-probe.
10340         * conf/i386-efi.rmk: Likewise.
10341         * conf/i386-pc.rmk: Likewise.
10342         * util/i386/pc/grub-install.in: Likewise.
10344         * util/i386/pc/grub-probe.c: Add --target=(fs|device|drive) option to
10345         choose which information we want to print.
10347 2006-10-14  Yoshinori K. Okuji  <okuji@enbug.org>
10349         * DISTLIST: Added commands/echo.c, disk/lvm.c, disk/raid.c,
10350         include/grub/bitmap.h, include/grub/lvm.h, include/grub/raid.h,
10351         include/grub/i386/pc/vbeutil.h, include/grub/util/lvm.h,
10352         include/grub/util/raid.h, util/lvm.c, util/raid.c, video/bitmap.c,
10353         video/readers/tga.c and video/i386/pc/vbeutil.c.
10355 2006-10-14  Jeroen Dekkers  <jeroen@dekkers.cx>
10357         Added support for RAID and LVM.
10359         * disk/lvm.c: New file.
10360         * disk/raid.c: Likewise.
10361         * include/grub/lvm.h: Likewise.
10362         * include/grub/raid.h: Likewise.
10363         * include/grub/util/lvm.h: Likewise.
10364         * include/grub/util/raid.h: Likewise.
10365         * util/lvm.c: Likewise.
10366         * util/raid.c: Likewise.
10368         * include/grub/disk.h (grub_disk_dev_id): Add
10369         GRUB_DISK_DEVICE_RAID_ID and GRUB_DISK_DEVICE_LVM_ID.
10370         (grub_disk_get_size): New prototype.
10371         * kern/disk.c (grub_disk_open): Check whether grub_partition_probe()
10372         returns a partition.
10373         (grub_disk_get_size): New function.
10375         * kern/i386/pc/init.c (make_install_device): Copy the prefix
10376         verbatim if grub_install_dos_part is -2.
10378         * util/i386/pc/getroot.c (grub_guess_root_device): Support RAID
10379         and LVM devices.
10381         * util/i386/pc/grub-setup.c (setup): New argument
10382         MUST_EMBED. Force embedding of GRUB when the argument is
10383         true. Close FILE before returning.
10384         (main): Add support for RAID and LVM.
10386         * conf/common.rmk: Add RAID and LVM modules.
10387         * conf/i386-pc.rmk (grub_setup_SOURCES): Add util/raid.c and
10388         util/lvm.c.
10389         (grub_emu_SOURCES): Add disk/raid.c and disk/lvm.c.
10391         * kern/misc.c (grub_strstr): New function.
10392         * include/grub/misc.h (grub_strstr): New prototype.
10394 2006-10-10  Tristan Gingold  <tristan.gingold@bull.net>
10396         * include/grub/efi/api.h (GRUB_EFI_ERROR_CODE): Long constant.
10398 2006-10-05  Tristan Gingold  <tristan.gingold@bull.net>
10400         * kern/misc.c (grub_strtoull): Guess the base only if not
10401         specified.
10403 2006-10-01  Hollis Blanchard  <hollis@penguinppc.org>
10405         * kern/powerpc/ieee1275/cmain.c (cmain): Remove incomplete Old World
10406         PowerMac support.
10408 2006-10-01  Hollis Blanchard  <hollis@penguinppc.org>
10410         * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Cast `size' to long.
10412         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_next_property):
10413         Remove `flags' argument.  All callers changed.
10414         * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_ROOT): Removed.
10415         (IEEE1275_IHANDLE_INVALID): New variable.
10416         (IEEE1275_CELL_INVALID): New variable.
10417         (grub_ieee1275_finddevice, grub_ieee1275_get_property,
10418         grub_ieee1275_get_property_length, grub_ieee1275_instance_to_package,
10419         grub_ieee1275_package_to_path, grub_ieee1275_instance_to_path,
10420         grub_ieee1275_peer, grub_ieee1275_child, grub_ieee1275_open,
10421         grub_ieee1275_claim, grub_ieee1275_set_property): Error-check return
10422         codes from Open Firmware.  All callers updated.
10423         (grub_ieee1275_next_property): Directly return Open Firmware return
10424         code.
10425         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
10426         Standardize error checking from `grub_ieee1275_get_property'.
10427         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Rename
10428         `devalias' to `aliases'.  Correct comments.  Consolidate error paths.
10430 2006-10-01  Hollis Blanchard  <hollis@penguinppc.org>
10432         * kern/ieee1275/ieee1275.c (grub_ieee1275_instance_to_path): Rename
10433         `instance_to_package_args' to `instance_to_path_args'.
10435         * kern/powerpc/ieee1275/init.c (grub_machine_init): Use
10436         `grub_ieee1275_chosen'.
10438         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Call
10439         `grub_ieee1275_interpret'.
10441 2006-09-25  Hollis Blanchard  <hollis@penguinppc.org>
10443         * util/powerpc/ieee1275/grub-mkimage.c: Include config.h.
10445 2006-09-25  Hollis Blanchard  <hollis@penguinppc.org>
10447         * include/grub/powerpc/libgcc.h (__floatdisf): New prototype.
10448         (__cmpdi): Likewise.
10450         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Pass 0 as
10451         `flags' to `grub_ieee1275_next_property'.  Change `pathlen' to type
10452         `grub_ssize_t'.
10454         * kern/powerpc/ieee1275/cmain.c: Include grub/misc.h.
10456         * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Change `actual'
10457         to type `grub_ssize_t'.
10458         (grub_rescue_cmd_linux): Cast -1 to `grub_off_t'.
10460 2006-09-22  Marco Gerards  <marco@gnu.org>
10462         * normal/script.c (grub_script_create_cmdmenu): Skip leading
10463         newlines.
10465 2006-09-22  Marco Gerards  <marco@gnu.org>
10467         * commands/echo.c: New file.
10469         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/echo.c'.
10471         * conf/common.rmk (echo_mod_SOURCES): New variable.
10472         (echo_mod_CFLAGS): Likewise.
10473         (echo_mod_LDFLAGS): Likewise.
10475 2006-09-22  Marco Gerards  <marco@gnu.org>
10477         * normal/main.c (get_line): Malloc memory instead of using
10478         preallocated memory.  Removed the arguments `cmdline' and
10479         `max_len'.  Updated all callers.
10481 2006-09-22  Marco Gerards  <marco@gnu.org>
10483         * conf/i386-efi.rmk (grub_emu_DEPENDENCIES): New variable.
10484         (normal_mod_DEPENDENCIES): Likewise.
10486         * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Likewise.
10487         (normal_mod_DEPENDENCIES): Likewise.
10489         * conf/sparc64-ieee1275.rmk (normal_mod_DEPENDENCIES): Likewise.
10491 2006-09-22  Johan Rydberg  <jrydberg@gnu.org>
10493         * genmk.rb: Add DEPENDENCIES variables to modules, utilities, and
10494         programs.
10495         * conf/i386-pc.rmk (grub_emu_DEPENDENCIES): Declare.
10496         (normal_mod_DEPENDENCIES): Likewise.
10497         * conf/i386-pc.mk: Regenerate.
10498         * conf/i386-efi.mk: Likewise
10499         * conf/common.mk: Likewise.
10500         * conf/powerpc-ieee1275.mk: Likewise.
10501         * conf/sparc64-ieee1275.mk: Likewise.
10503 2006-09-22  Robert Millan  <rmh@aybabtu.com>
10505         Sync with i386 version.
10506         * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Remove grub-emu, add grub-mkimage.
10507         * conf/powerpc-ieee1275.rmk (sbin_UTILITIES): Remove grub-mkimage, add grub-emu.
10509 2006-09-21  Robert Millan  <rmh@aybabtu.com>
10511         Import from GRUB Legacy (lib/device.c):
10512         * util/i386/pc/grub-mkdevicemap.c (get_i2o_disk_name): New function.
10513         (init_device_map) [__linux__]: Add support for I2O devices.
10515 2006-09-14  Marco Gerards  <marco@gnu.org>
10517         * conf/i386-pc.rmk (COMMON_LDFLAGS): Use `-m32' instead of
10518         `-melf_i386'.
10520 2006-09-14  Robert Millan  <rmh@aybabtu.com>
10522         * util/i386/pc/grub-install.in: Skip menu.lst when removing
10523         /boot/grub/*.lst.
10525         * util/i386/pc/getroot.c: Don't recurse into dotdirs (e.g. ".static").
10527         * util/i386/pc/grub-mkdevicemap.c: Make sure the floppy device exists
10528         before adding it to device.map.
10530 2006-08-15  Johan Rydberg  <jrydberg@gnu.org>
10532         * genmk.rb: Let GCC generate dependencies the first time it
10533         compiles a file; using the -MD option.
10534         * conf/common.mk: Regenerate.
10535         * conf/i386-pc.mk: Likewise.
10536         * conf/i386-efi.mk: Likewise.
10537         * conf/powerpc-ieee1275.mk: Likewise.
10538         * conf/sparc64-ieee1275.mk: Likewise.
10540 2006-08-04  Yoshinori K. Okuji  <okuji@enbug.org>
10542         Move the prototypes of grub_setjmp and grub_longjmp to
10543         cpu/setjmp.h, so that each architecture may specify different
10544         attributes.
10546         * include/grub/i386/setjmp.h (grub_setjmp): New prototype.
10547         (grub_longjmp): Likewise.
10548         * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise..
10549         (grub_longjmp): Likewise.
10550         * include/grub/sparc64/setjmp.h (grub_setjmp): Likewise..
10551         (grub_longjmp): Likewise.
10553         * include/grub/setjmp.h [!GRUB_UTIL] (grub_setjmp): Removed.
10554         [!GRUB_UTIL] (grub_longjmp): Removed.
10556 2006-08-01  Pelletier Vincent  <subdino2004@yahoo.fr>
10558         * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): IEEE1275
10559         "color!" method does not return any value.
10561 2006-07-29  Vesa Jaaskelainen  <chaac@nic.fi>
10563         * include/grub/bitmap.h: New file.
10565         * include/grub/i386/pc/vbeutil.h: Likewise.
10567         * video/bitmap.c: Likewise.
10569         * video/readers/tga.c: Likewise.
10571         * video/i386/pc/vbeutil.c: Likewise.
10573         * commands/videotest.c: Code cleanup and updated to reflect to new
10574         video API.
10576         * term/gfxterm.c: Likewise.
10578         * video/video.c: Likewise.
10580         * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod.
10581         (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c.
10582         (bitmap_mod_SOURCES): New entry.
10583         (bitmap_mod_CFLAGS): Likewise.
10584         (bitmap_mod_LDFLAGS): Likewise.
10585         (tga_mod_SOURCES): Likewise.
10586         (tga_mod_CFLAGS): Likewise.
10587         (tga_mod_LDFLAGS): Likewise.
10589         * include/grub/video.h (grub_video_blit_operators): New enum type.
10590         (grub_video_render_target): Changed as forward declaration and moved
10591         actual definition to be video driver specific.
10592         (grub_video_adapter.blit_bitmap): Added blitting operator.
10593         (grub_video_adapter.blit_render_target): Likewise.
10594         (grub_video_blit_bitmap): Likewise.
10595         (grub_video_blit_render_target): Likewise.
10597         * include/grub/i386/pc/vbe.h (grub_video_render_target): Added
10598         driver specific render target definition.
10599         (grub_video_vbe_map_rgba): Added driver internal helper.
10600         (grub_video_vbe_unmap_color): Updated to use
10601         grub_video_i386_vbeblit_info.
10602         (grub_video_vbe_get_video_ptr): Likewise.
10604         * include/grub/i386/pc/vbeblit.h
10605         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use
10606         grub_video_i386_vbeblit_info.
10607         (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
10608         (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
10609         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
10610         (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
10611         (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
10612         (grub_video_i386_vbeblit_index_index): Likewise.
10613         (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function.
10614         (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
10615         (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
10616         (grub_video_i386_vbeblit_blend): Added generic blitter for blend
10617         operator.
10618         (grub_video_i386_vbeblit_replace): Added generic blitter for replace
10619         operator.
10621         * video/i386/pc/vbeblit.c: Updated to reflect changes on
10622         include/grub/i386/pc/vbeblit.h.
10624         * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8):
10625         Updated to use grub_video_i386_vbeblit_info.
10626         (grub_video_i386_vbefill_R8G8B8): Likewise.
10627         (grub_video_i386_vbefill_index): Likewise.
10628         (grub_video_i386_vbefill): Added generic filler.
10630         * video/i386/pc/vbefill.c: Updated to reflect changes on
10631         include/grub/i386/pc/vbefill.h.
10633         * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use
10634         grub_video_i386_vbeblit_info.
10635         (grub_video_vbe_unmap_color): Likewise.
10636         (grub_video_vbe_blit_glyph): Likewise.
10637         (grub_video_vbe_scroll): Likewise.
10638         (grub_video_vbe_draw_pixel): Removed function.
10639         (grub_video_vbe_get_pixel): Likewise.
10640         (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and
10641         updated code to use it.
10642         (common_blitter): Added common blitter for render target and bitmap.
10643         (grub_video_vbe_blit_bitmap): Updated to use common_blitter.
10644         (grub_video_vbe_blit_render_target): Likewise.
10646 2006-07-30  Johan Rydberg  <jrydberg@gnu.org>
10648         * kern/efi/efi.c (grub_efi_set_text_mode): Assume console already
10649         is in text mode if there is no console control protocol instance
10650         available.
10652 2006-07-29  Vesa Jaaskelainen  <chaac@nic.fi>
10654         * include/grub/video.h: Code cleanup.
10656         * include/grub/i386/pc/vbe.h: Likewise.
10658         * video/i386/pc/vbe.c: Likewise.
10660         * video/i386/pc/vbeblit.c: Likewise.
10662         * video/i386/pc/vbefill.c: Likewise.
10664         * video/video.c: Likewise.  Also added more comments.
10666 2006-07-29  Vesa Jaaskelainen  <chaac@nic.fi>
10668         * disk/i386/pc/biosdisk.c (struct grub_biosdisk_drp): Moved to ...
10669         (struct grub_biosdisk_dap): Likewise.
10671         * include/grub/i386/pc/biosdisk.h: ... to here.  Also corrected
10672         linkage settings for all functions.
10674 2006-07-12  Marco Gerards  <marco@gnu.org>
10676         * configure.ac (--enable-mm-debug): Fix typo.
10678         * genkernsyms.sh.in: Use proper quoting for `CC'.
10680 2006-07-02  Jeroen Dekkers  <jeroen@dekkers.cx>
10682         * conf/i386-pc.rmk (COMMON_ASFLAGS): Add "-m32".
10683         (normal_mod_ASFLAGS): Remove "-m32".
10685 2006-06-14  Yoshinori K. Okuji  <okuji@enbug.org>
10687         * util/misc.c: Include config.h.
10688         [!HAVE_MEMALIGN]: Do not include malloc.h.
10689         (grub_memalign): Use posix_memalign, if present. Then, use
10690         memalign, if present. Otherwise, emit an error.
10692         * util/grub-emu.c: Do not include malloc.h.
10694         * include/grub/util/misc.h: Include unistd.h. This is required for
10695         FreeBSD, because off_t is defined in unistd.h. Reported by Harley
10696         D. Eades III <hde@foobar-qux.org>.
10698         * configure.ac (AC_GNU_SOURCE): Added.
10699         (AC_CHECK_FUNCS): Check posix_memalign and memalign for the host
10700         type.
10702 2006-06-09  Yoshinori K. Okuji  <okuji@enbug.org>
10704         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Make sure that
10705         ADDR_MAX does not exceed GRUB_LINUX_INITRD_MAX_ADDRESS.
10707 2006-06-07  Jeroen Dekkers  <jeroen@dekkers.cx>
10709         * include/grub/types.h (grub_host_addr_t): Rename to
10710         grub_target_addr_t.
10711         (grub_host_off_t): Rename to grub_target_off_t.
10712         (grub_host_size_t): Rename to grub_target_size_t.
10713         (grub_host_ssize_t): Rename to grub_target_ssize_t.
10714         Refer to GRUB_TARGET_SIZEOF_VOID_P to define those variables.
10716         * include/grub/kernel.h (struct grub_module_header): Change type
10717         of OFFSET to grub_target_off_t and type of SIZE to grub_target_size_t.
10718         (grub_module_info): Likewise.
10720 2006-06-05  Yoshinori K. Okuji  <okuji@enbug.org>
10722         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): The conditional
10723         of checking LINUX_MEM_SIZE was reverse. Reported by Jesus
10724         Velazquez <jesus.velazquez@gmail.com>.
10726 2006-06-05  Yoshinori K. Okuji  <okuji@enbug.org>
10728         Count partitions from 1 instead of 0 in the string representation
10729         of partitions. Still use 0-based internally.
10731         * partmap/sun.c (grub_sun_is_valid): A cosmetic change.
10732         (sun_partition_map_iterate): Use grub_partition_t instead of
10733         struct grub_partition *. Cast DESC->START_CYLINDER to
10734         grub_uint64_t after converting the endian.
10735         (sun_partition_map_probe): Subtract 1 for PARTNUM.
10736         (sun_partition_map_get_name): Add 1 to P->INDEX.
10738         * partmap/pc.c (grub_partition_parse): Subtract 1 for
10739         PCDATA->DOS_PART.
10740         (pc_partition_map_get_name): Add 1 into PCDATA->DOS_PART.
10742         * partmap/gpt.c (gpt_partition_map_iterate): Initialize PARTNO to
10743         zero instead of one.
10744         (gpt_partition_map_probe): Subtract 1 for PARTNUM.
10745         (gpt_partition_map_get_name): Add 1 into P->INDEX.
10747         * partmap/apple.c (apple_partition_map_iterate): Change the type
10748         of POS to unsigned.
10749         (apple_partition_map_probe): Subtract 1 for PARTNUM.
10750         (apple_partition_map_get_name): Add 1 into P->INDEX.
10752         * partmap/amiga.c (amiga_partition_map_iterate): Change the type
10753         of POS to unsigned.
10754         (amiga_partition_map_iterate): Cast NEXT to grub_off_t to
10755         calculate the offset of a partition.
10756         (amiga_partition_map_probe): Subtract 1 for PARTNUM.
10757         (amiga_partition_map_get_name): Add 1 into P->INDEX.
10759         * partmap/acorn.c (acorn_partition_map_find): Change the type of
10760         SECTOR to grub_disk_addr_t.
10761         (acorn_partition_map_iterate): Likewise.
10762         (acorn_partition_map_probe): Subtract 1 for PARTNUM.
10763         Change the type of SECTOR to grub_disk_addr_t. Declare P on the
10764         top.
10765         (acorn_partition_map_get_name): Add 1 into P->INDEX.
10767         * kern/i386/pc/init.c (make_install_device): Add 1 into
10768         GRUB_INSTALL_DOS_PART.
10770         * fs/iso9660.c (grub_iso9660_mount): Fixed a reversed
10771         conditional.
10773 2006-06-04  Yoshinori K. Okuji  <okuji@enbug.org>
10775         Clean up the code to support 64-bit addressing in disks and
10776         files. This change is not enough for filesystems yet.
10778         * util/i386/pc/grub-setup.c (struct boot_blocklist): Change the
10779         type of "start" to grub_uint64_t.
10780         (setup): Change the types of KERNEL_SECTOR and FIRST_SECTOR to
10781         grub_disk_addr_t * and grub_disk_addr_t. Fix the format string in
10782         save_first_sector and save_blocklists. Use grub_le_to_cpu64 to
10783         convert addresses.
10785         * util/i386/pc/biosdisk.c (open_device): Change the type of SECTOR
10786         to grub_disk_addr_t.
10788         * partmap/gpt.c (gpt_partition_map_iterate): Fix the format
10789         string.
10791         * partmap/pc.c (pc_partition_map_iterate): Likewise.
10793         * partmap/amiga.c (amiga_partition_map_iterate): Cast RDSK.MAGIC
10794         to char *.
10796         * normal/script.c (grub_script_parse): Remove unused MEMFREE.
10798         * normal/parser.y (YYLTYPE_IS_TRIVIAL): New macro.
10800         * normal/lexer.c (grub_script_yyerror): Specify unused to LEX.
10802         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf64): Cast -1
10803         to grub_off_t, to detect an error from grub_file_seek.
10804         (grub_multiboot_load_elf32): Likewise.
10806         * kern/misc.c (grub_strtoul): Use grub_strtoull. Return the
10807         maximum unsigned long value when an overflow is detected.
10808         (grub_strtoull): New function.
10809         (grub_divmod64): Likewise.
10810         (grub_lltoa): use grub_divmod64.
10812         * kern/fs.c (struct grub_fs_block): Change the type of "offset" to
10813         grub_disk_addr_t.
10814         (grub_fs_blocklist_open): Increase P if P is not NULL to advance
10815         the pointer to next character. Use grub_strtoull instead of
10816         grub_strtoul.
10817         (grub_fs_blocklist_read): Change the types of SECTOR, OFFSET and
10818         SIZE to grub_disk_addr_t, grub_off_t and grub_size_t,
10819         respectively.
10821         * kern/file.c (grub_file_read): Prevent an overflow of LEN, as the
10822         return value is signed.
10823         (grub_file_seek): Change the type of OLD to grub_off_t. Do not
10824         test if OFFSET is less than zero, as OFFSET is unsigned now.
10826         * kern/disk.c (struct grub_disk_cache): Change the type of
10827         "sector" to grub_disk_addr_t.
10828         (grub_disk_cache_get_index): Change the type of SECTOR to
10829         grub_disk_addr_t. Calculate the hash with SECTOR casted to
10830         unsigned after shifting.
10831         (grub_disk_cache_invalidate): Change the type of SECTOR to
10832         grub_disk_addr_t.
10833         (grub_disk_cache_unlock): Likewise.
10834         (grub_disk_cache_store): Likewise.
10835         (grub_disk_check_range): Change the types of SECTOR, OFFSET, SIZE,
10836         START and LEN to grub_disk_addr_t *, grub_off_t *, grub_size_t,
10837         grub_disk_addr_t and grub_uint64_t, respectively.
10838         (grub_disk_read): Use an unsigned variable REAL_OFFSET for the
10839         body, as the value of OFFSET is tweaked by
10840         grub_disk_check_range. Change the types of START_SECTOR, LEN and
10841         POS to grub_disk_addr_t, grub_size_t and grub_size_t,
10842         respectively.
10843         (grub_disk_write): Use an unsigned variable REAL_OFFSET for the
10844         body, as the value of OFFSET is tweaked by
10845         grub_disk_check_range. Change the types of LEN and N to
10846         grub_size_t.
10848         * io/gzio.c (struct grub_gzio): Change the types of "data_offset"
10849         and "saved_offset" to grub_off_t.
10850         (test_header): Cast BUF to char *.
10851         (get_byte): Cast GZIO->DATA_OFFSET to grub_off_t. Cast GZIO->INBUF
10852         to char *.
10853         (grub_gzio_read): Change the types of OFFSET and SIZE to
10854         grub_off_t and grub_size_t, respectively.
10856         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_FORCE_LBA):
10857         Removed.
10858         (GRUB_BOOT_MACHINE_BOOT_DRIVE): Changed to 0x4c.
10859         (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Changed to 0x40.
10860         (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Changed to 0x42.
10861         (GRUB_BOOT_MACHINE_DRIVE_CHECK): Changed to 0x4e.
10862         (GRUB_BOOT_MACHINE_LIST_SIZE): Increased to 12.
10864         * include/grub/types.h (grub_off_t): Unconditionally set to
10865         grub_uint64_t.
10866         (grub_disk_addr_t): Changed to grub_uint64_t.
10868         * include/grub/partition.h (struct grub_partition): Change the
10869         types of "start", "len" and "offset" to grub_disk_addr_t,
10870         grub_uint64_t and grub_disk_addr_t, respectively.
10871         (grub_partition_get_start): Return grub_disk_addr_t.
10872         (grub_partition_get_len): Return grub_uint64_t.
10874         * include/grub/misc.h (grub_strtoull): New prototype.
10875         (grub_divmod64): Likewise.
10877         * include/grub/fshelp.h (grub_fshelp_read_file): Change the types
10878         of SECTOR, LEN and FILESIZE to grub_disk_addr_t, grub_size_t and
10879         grub_off_t, respectively.
10880         All callers and references changed.
10882         * include/grub/fs.h (struct grub_fs): Change the type of LEN to
10883         grub_size_t in "read".
10884         All callers and references changed.
10886         * include/grub/file.h (struct grub_file): Change the types of
10887         "offset" and "size" to grub_off_t and grub_off_t,
10888         respectively. Change the type of SECTOR to grub_disk_addr_t in
10889         "read_hook".
10890         (grub_file_read): Change the type of LEN to grub_size_t.
10891         (grub_file_seek): Return grub_off_t. Change the type of OFFSET to
10892         grub_off_t.
10893         (grub_file_size): Return grub_off_t.
10894         (grub_file_tell): Likewise.
10895         All callers and references changed.
10897         * include/grub/disk.h (struct grub_disk_dev): Change the types of
10898         SECTOR and SIZE to grub_disk_addr_t and grub_size_t in "read" and
10899         "write".
10900         (struct grub_disk): Change the type of "total_sectors" to
10901         grub_uint64_t. Change the type of SECTOR to grub_disk_addr_t in
10902         "read_hook".
10903         (grub_disk_read): Change the types of SECTOR, OFFSET and SIZE to
10904         grub_disk_addr_t, grub_off_t and grub_size_t, respectively.
10905         (grub_disk_write): Likewise.
10906         All callers and references changed.
10908         * fs/iso9660.c (grub_iso9660_susp_iterate): Cast parameters to
10909         char * for grub_strncmp to silence gcc.
10910         (grub_iso9660_mount): Likewise.
10911         (grub_iso9660_mount): Likewise.
10912         (grub_iso9660_read_symlink): Likewise. Also, remove the nonsense
10913         return statement.
10914         (grub_iso9660_iterate_dir): Likewise.
10915         (grub_iso9660_label): Cast DATA->VOLDESC.VOLNAME to char *.
10917         * fs/hfs.c (grub_hfs_read_file): Change the types of SECTOR and
10918         LEN to grub_disk_addr_t and grub_size_t, respectively.
10920         * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
10922         * fs/jfs.c (grub_jfs_read_file): Likewise.
10924         * fs/minix.c (grub_jfs_read_file): Likewise.
10926         * fs/sfs.c (grub_jfs_read_file): Likewise.
10928         * fs/ufs.c (grub_jfs_read_file): Likewise.
10930         * fs/xfs.c (grub_jfs_read_file): Likewise.
10932         * fs/fat.c (grub_fat_read_data): Change the types of SECTOR, LEN
10933         and SIZE to grub_disk_addr_t, grub_size_t and grub_size_t,
10934         respectively.
10936         * fs/ext2.c (grub_ext2_read_block): When an error happens, set
10937         BLKNR to -1 instead of returning GRUB_ERRNO.
10938         (grub_ext2_read_file): Change the types of SECTOR and
10939         LEN to grub_disk_addr_t and grub_size_t, respectively.
10941         * fs/affs.c (grub_affs_read_file): Change the types of SECTOR and
10942         LEN to grub_disk_addr_t and grub_size_t, respectively.
10944         * font/manager.c (grub_font_get_glyph): Cast BITMAP to char * for
10945         grub_file_read.
10947         * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Fix the format
10948         string. Do not cast SECTOR explicitly.
10950         * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Change the type of
10951         TOTAL_SECTORS to grub_uint64_t. Do not mask DRP->TOTAL_SECTORS.
10952         (grub_biosdisk_rw): Change the types of SECTOR and SIZE to
10953         grub_disk_addr_t and grub_size_t, respectively. If the sector is
10954         over 2TB and LBA mode is not supported, raise an error.
10955         (get_safe_sectors): New function.
10956         (grub_biosdisk_read): Use get_safe_sectors.
10957         (grub_biosdisk_write): Likewise.
10959         * disk/efi/efidisk.c (grub_efidisk_read): Fix the format string.
10960         (grub_efidisk_write): Likewise.
10962         * disk/loopback.c (delete_loopback): Cosmetic changes.
10963         (grub_cmd_loopback): Likewise. Also, test NEWDEV->FILENAME
10964         correctly.
10965         (grub_loopback_open): Likewise.
10966         (grub_loopback_read): Likewise. Also, change the type of POS to
10967         grub_off_t, and fix the usage of grub_memset.
10969         * commands/i386/pc/play.c: Include grub/machine/time.h.
10971         * commands/ls.c (grub_ls_list_files): Use "llu" instead of "d" to
10972         print FILE->SIZE.
10974         * commands/configfile.c: Include grub/env.h.
10976         * commands/cmp.c (grub_cmd_cmp): Do not use ERR, but use
10977         GRUB_ERRNO directly instead. Change the type of POS to
10978         grub_off_t. Follow the coding standard.
10980         * commands/blocklist.c: Include grub/partition.h.
10981         (grub_cmd_blocklist): Return an error if the underlying device is
10982         not a disk. Take the starting sector of a partition into account,
10983         if a partition is used.
10985         * boot/i386/pc/diskboot.S (bootloop): Adapted to the new offset of
10986         a length field.
10987         (lba_mode): Support 64-bit addresses.
10988         (chs_mode): Likewise.
10989         (copy_buffer): Adapted to the new offsets of a length field and a
10990         segment field.
10991         (blocklist_default_start): Allocate 64-bit space.
10993         * boot/i386/pc/boot.S (force_lba): Removed.
10994         (boot_drive): Moved to under KERNEL_SECTOR.
10995         (kernel_sector): Moved to under KERNEL_SEGMENT. Allocate 64-bit
10996         space.
10997         (real_start): Set %si earlier. Remove code for FORCE_LBA, since it
10998         is useless.
10999         (lba_mode): Refactored to support a 64-bit address. More size
11000         optimization.
11001         (setup_sectors): Likewise.
11003 2006-06-04  Yoshinori K. Okuji  <okuji@enbug.org>
11005         * DISTLIST: Added include/grub/i386/linux.h. Removed
11006         include/grub/i386/pc/linux.h
11008         * configure.ac (AC_INIT): Bumped to 1.94.
11010         * config.guess: Updated from gnulib.
11011         * config.sub: Likewise.
11012         * install-sh: Likewise.
11013         * mkinstalldirs: Likewise.
11015 2006-06-02  Yoshinori K. Okuji  <okuji@enbug.org>
11017         * conf/common.rmk (grub_modules_init.lst): Depended on
11018         grub_emu_SOURCES, excluding grub_emu_init.c, instead of
11019         MODSRCFILES.
11021         * genmk.rb (PModule::rule): Reverted the previous change.
11023 2006-06-02  Yoshinori K. Okuji  <okuji@enbug.org>
11025         * conf/common.rmk (grub_modules_init.lst): Depends on
11026         $(MODSRCFILES). Grep only the files in $(MODSRCFILES). Make sure
11027         that the target does not exist before producing.
11028         (grub_modules_init.h): Remove the target before generating.
11029         (grub_emu_init.c): Likewise.
11031         * genmk.rb (PModule::rule): Add source files into MODSRCFILES.
11033 2006-05-31  Jeroen Dekkers  <jeroen@dekkers.cx>
11035         * configure.ac: Don't set host_m32 for x86_64. Also reset LIBS
11036         for the target-specific tests. Make sure that we also have the
11037         up-to-date target variables for those tests.
11039 2006-05-31  Yoshinori K. Okuji  <okuji@enbug.org>
11041         * genmk.rb (Image::rule): Prefix CFLAGS or ASFLAGS with TARGET_.
11042         (PModule::rule): Likewise.
11044 2006-05-31  Yoshinori K. Okuji  <okuji@enbug.org>
11046         * genmk.rb (Image::rule): Set FLAG to CFLAGS or ASFLAGS instead of
11047         TARGET_CFLAGS or TARGET_ASFLAGS. There is no reason why
11048         target-specific flags should be prefixed.
11049         (PModule::rule): Likewise.
11051 2006-05-30  Yoshinori K. Okuji  <okuji@enbug.org>
11053         * configure.ac (CMP): Check if cmp is available explicitly.
11055 2006-05-29  Yoshinori K. Okuji  <okuji@enbug.org>
11057         * util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
11058         (target_cpu): New variable.
11059         (pkglibdir): Use target_cpu instead of host_cpu.
11061         * util/i386/pc/grub-install.in (host_cpu): Removed.
11062         (target_cpu): New variable.
11063         (pkglibdir): Use target_cpu instead of host_cpu.
11065         * util/genmoddep.c: Removed.
11067         * kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
11068         instead of GRUB_HOST_SIZEOF_VOID_P.
11069         * kern/dl.c: Likewise.
11071         * include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
11072         ...
11073         (GRUB_TARGET_SIZEOF_VOID_P): ... this.
11074         (GRUB_HOST_SIZEOF_LONG): Renamed to ...
11075         (GRUB_TARGET_SIZEOF_LONG): ... this.
11076         (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
11077         (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
11078         * include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
11079         to ...
11080         (GRUB_TARGET_SIZEOF_VOID_P): ... this.
11081         (GRUB_HOST_SIZEOF_LONG): Renamed to ...
11082         (GRUB_TARGET_SIZEOF_LONG): ... this.
11083         (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
11084         (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
11085         * include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
11086         to ...
11087         (GRUB_TARGET_SIZEOF_VOID_P): ... this.
11088         (GRUB_HOST_SIZEOF_LONG): Renamed to ...
11089         (GRUB_TARGET_SIZEOF_LONG): ... this.
11090         (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
11091         (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
11093         * include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
11094         GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
11095         [!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
11096         instead of GRUB_HOST_SIZEOF_LONG.
11097         [!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
11098         GRUB_HOST_WORDS_BIGENDIAN to define or undefine
11099         GRUB_CPU_WORDS_BIGENDIAN.
11100         Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
11101         define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
11102         grub_host_ssize_t.
11104         * conf/i386-efi.rmk (noinst_UTILITIES): Removed.
11105         (genmoddep_SOURCES): Likewise.
11106         * conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
11107         (genmoddep_SOURCES): Likewise.
11108         * conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
11109         (genmoddep_SOURCES): Likewise.
11110         * conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
11111         Likewise.
11112         (genmoddep_SOURCES): Likewise.
11114         * genmoddep.awk: New file.
11116         * genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
11117         TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
11118         CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
11119         (PModule::rule): Likewise.
11120         (Program::rule): Likewise.
11121         (Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
11122         BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
11123         respectively.
11125         * configure.ac: Rewritten intensively to use host and target
11126         instead of build and host, respectively.
11128         * Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
11129         (host_cpu): Removed.
11130         (target_cpu): New variable.
11131         (CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
11132         (BUILD_CC): Removed.
11133         (BUILD_CFLAGS): Likewise.
11134         (BUILD_CPPFLAGS): Likewise.
11135         (TARGET_CC): New variable.
11136         (TARGET_CFLAGS): Likewise.
11137         (TARGET_CPPFLAGS): Likewise.
11138         (TARGET_LDFLAGS): Likewise.
11139         (AWK): Likewise.
11140         (include): Use target_cpu instead of host_cpu.
11141         (moddep.lst:): Use genmoddep.awk instead of genmoddep.
11143         * DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
11145 2006-05-29  Vesa Jaaskelainen  <chaac@nic.fi>
11147         * include/grub/script.h (grub_script_cmdif): Renamed field 'bool' to
11148         'exec_to_evaluate'.  Renamed field 'true' to 'exec_on_true'.  Renamed
11149         field 'false' to 'exec_on_false'.
11150         (grub_script_create_cmdif): Renamed argument names to reflect above
11151         changes.
11153         * normal/execute.c (grub_script_execute_cmdif): Likewise.
11155         * normal/script.c (grub_script_create_cmdif): Likewise.
11157 2006-05-28  Yoshinori K. Okuji  <okuji@enbug.org>
11159         * fs/hfsplus.c (grub_hfsplus_btree_recoffset): Moved to near the
11160         top.
11161         (grub_hfsplus_btree_recptr): Likewise.
11162         (grub_hfsplus_find_block): Do not take RETRY any longer. Use
11163         FILEBLOCK both to pass a block number and store next block
11164         number.
11165         (grub_hfsplus_read_block): Rewritten heavily to support an extent
11166         overflow file correctly. Specify errors appropriately, because
11167         fshelp expects that GRUB_ERRNO is set when fails. Reuse
11168         grub_hfsplus_btree_recptr to get the pointer to a found key.
11169         (grub_hfsplus_btree_search): Return 1 instead of 0 when no match
11170         is found.
11172         * conf/i386-efi.rmk (pkgdata_MODULES): Added _linux.mod and
11173         linux.mod.
11174         (_linux_mod_SOURCES): New variable.
11175         (_linux_mod_CFLAGS): Likewise.
11176         (_linux_mod_LDFLAGS): Likewise.
11177         (linux_mod_SOURCES): Likewise.
11178         (linux_mod_CFLAGS): Likewise.
11179         (linux_mod_LDFLAGS): Likewise.
11181         * DISTLIST: Added loader/i386/efi/linux.c,
11182         loader/i386/efi/linux_normal.c and
11183         include/grub/i386/efi/loader.h.
11185         * loader/i386/efi/linux.c: New file.
11186         * loader/i386/efi/linux_normal.c: Likewise.
11187         * include/grub/i386/efi/loader.h: Likewise.
11189 2006-05-27  Yoshinori K. Okuji  <okuji@enbug.org>
11191         * commands/blocklist.c: New file.
11193         * DISTLIST: Added commands/blocklist.c.
11195         * term/efi/console.c (grub_console_highlight_color): Use a lighter
11196         color for the background, and a darker color for the foreground.
11197         (grub_console_checkkey): Return READ_KEY.
11198         (grub_console_cls): Set the background to
11199         GRUB_EFI_BACKGROUND_BLACK temporarily to clean out the screen.
11201         * kern/efi/efi.c (grub_efi_exit_boot_services): New function.
11203         * include/grub/i386/linux.h (struct linux_kernel_params): Fixed
11204         the size of "padding5", "hd0_drive_info" and "hd1_drive_info".
11206         * include/grub/efi/efi.h (grub_efi_exit_boot_services): New
11207         prototype.
11209         * include/grub/efi/api.h (GRUB_EFI_TEXT_ATTR): Do not shift
11210         BG. The spec is wrong again.
11212         * include/grub/normal.h [GRUB_UTIL] (grub_blocklist_init): New
11213         prototype.
11214         [GRUB_UTIL] (grub_blocklist_fini): Likewise.
11216         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
11217         commands/blocklist.c.
11218         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
11220         * conf/common.rmk (pkgdata_MODULES): Added blocklist.mod.
11221         (blocklist_mod_SOURCES): New variable.
11222         (blocklist_mod_CFLAGS): Likewise.
11223         (blocklist_mod_LDFLAGS): Likewise.
11225 2006-05-20  Yoshinori K. Okuji  <okuji@enbug.org>
11227         * boot/i386/pc/boot.S (real_start): Set %si earlier to eliminate
11228         duplication.
11229         (lba_mode): Use %eax more intensively to reduce the code size.
11231 2006-05-20  Marco Gerards  <marco@gnu.org>
11233         * normal/lexer.c (grub_script_yylex): Don't filter out newlines.
11235         * normal/parser.y (commandblock): Defined as <cmd>.  A subroutine
11236         for `menuentry'.
11237         (script): Accept leading newlines.
11238         (newlines): New rule to describe 0 or more newlines.
11239         (commands): Accept `command' with trailing newline.  Fixed the
11240         order in which arguments were passed to `grub_script_add_cmd'.
11241         Accept commands separated by newlines.
11242         (function): Changed to accept newlines.
11243         (menuentry) Rewritten.
11245         * normal/script.c (grub_script_create_cmdmenu): Add new entries in
11246         front of the list, instead of to the end.
11248 2006-05-19  Yoshinori K. Okuji  <okuji@enbug.org>
11250         * util/i386/pc/grub-install.in (bindir): New variable.
11251         (grub_mkimage): Use BINDIR instead of SBINDIR. Reported by Lee
11252         Shaver <lbgwjl@gmail.com>.
11254 2006-05-14  Yoshinori K. Okuji  <okuji@enbug.org>
11256         * kern/i386/pc/startup.S: Include grub/cpu/linux.h instead of
11257         grub/machine/linux.h
11258         * loader/i386/pc/linux.c: Likewise.
11260         * include/grub/i386/pc/linux.h: Moved to ...
11261         * include/grub/i386/linux.h: ... here.
11263         * include/grub/i386/linux.h (struct linux_kernel_params): New
11264         struct.
11266 2006-05-09  Vesa Jaaskelainen  <chaac@nic.fi>
11268         * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Corrected bounds
11269         checking.
11270         (grub_video_vbe_blit_glyph): Likewise.
11271         (grub_video_vbe_blit_bitmap): Likewise.
11272         (grub_video_vbe_blit_render_target): Likewise.
11274 2006-05-09  Yoshinori K. Okuji  <okuji@enbug.org>
11276         * configure.ac (--with-platform): Properly quote the square
11277         brackets.
11279 2006-05-08  Marco Gerards  <marco@gnu.org>
11281         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Renamed from
11282         this...
11283         (kernel_elf_HEADERS): ...to this.  Updated all users.
11284         (grubof_symlist.c): Renamed from this...
11285         (kernel_elf_symlist.c): ...to this.  Updated all users.
11286         (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
11287         (grubof_SOURCES): Renamed from this...
11288         (kernel_elf_SOURCES): ...to this.
11289         (grubof_HEADERS): Renamed from this...
11290         (kernel_elf_HEADERS): ...to this.
11291         (grubof_CFLAGS): Renamed from this...
11292         (kernel_elf_CFLAGS): ...to this.
11293         (grubof_ASFLAGS): Renamed from this...
11294         (kernel_elf_ASFLAGS): ...to this.
11295         (grubof_LDFLAGS): Renamed from this...
11296         (kernel_elf_LDFLAGS): ...to this.
11298         * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Renamed from
11299         this...
11300         (kernel_elf_HEADERS): ...to this.  Updated all users.
11301         (grubof_symlist.c): Renamed from this...
11302         (kernel_elf_symlist.c): ...to this.  Updated all users.
11303         (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
11304         (grubof_SOURCES): Renamed from this...
11305         (kernel_elf_SOURCES): ...to this.
11306         (grubof_HEADERS): Renamed from this...
11307         (kernel_elf_HEADERS): ...to this.
11308         (grubof_CFLAGS): Renamed from this...
11309         (kernel_elf_CFLAGS): ...to this.
11310         (grubof_ASFLAGS): Renamed from this...
11311         (kernel_elf_ASFLAGS): ...to this.
11312         (grubof_LDFLAGS): Renamed from this...
11313         (kernel_elf_LDFLAGS): ...to this.
11315         * util/powerpc/ieee1275/grub-mkimage.c (add_segments): Use
11316         `kernel.elf' instead of `grubof'.
11318 2006-05-08  Yoshinori K. Okuji  <okuji@enbug.org>
11320         Add --with-platform to configure. Use pkglibdir instead of
11321         pkgdatadir. This is reported by Roger Leigh.
11323         * util/powerpc/ieee1275/grub-install.in (datadir): Removed.
11324         (host_vendor): Likewise.
11325         (host_os): Likewise.
11326         (pkgdatadir): Likewise.
11327         (platform): New variable.
11328         (pkglibdir): Likewise.
11329         Use PKGLIBDIR instead of PKGDATADIR.
11331         * util/i386/pc/grub-install.in (datadir): Removed.
11332         (host_vendor): Likewise.
11333         (host_os): Likewise.
11334         (pkgdatadir): Likewise.
11335         (platform): New variable.
11336         (pkglibdir): Likewise.
11337         Use PKGLIBDIR instead of PKGDATADIR.
11339         * util/powerpc/ieee1275/grub-mkimage.c (usage): Use GRUB_LIBDIR
11340         instead of GRUB_DATADIR.
11341         (main): Likewise.
11342         * util/i386/pc/grub-mkimage.c (usage): Likewise.
11343         (main): Likewise.
11344         * util/i386/efi/grub-mkimage.c (usage): Likewise.
11345         (main): Likewise.
11347         * configure.ac (--with-platform): New option.
11348         Use PLATFORM instead of HOST_VENDOR to specify a platform.
11350         * Makefile.in: Include a makefile based on PLATFORM instead of
11351         HOST_VENDOR.
11352         (pkgdatadir): Not appended by the machine type.
11353         (pkglibdir): Appended by the machine type.
11354         (host_vendor): Removed.
11355         (platform): New variable.
11356         (BUILD_CPPFLAGS): Specify GRUB_LIBDIR instead of GRUB_DATADIR.
11357         (install-local): Use PKGLIBDIR instead of PKGDATADIR.
11358         (uninstall): Likewise.
11360 2006-05-07  Yoshinori K. Okuji  <okuji@enbug.org>
11362         Use the environment context in the menu. Remove the commands
11363         "default" and "timeout", and use variables instead.
11365         * normal/menu.c: Include grub/env.h.
11366         (print_entry): Cast TITLE to silence gcc.
11367         (get_timeout): New function.
11368         (set_timeout): Likewise.
11369         (get_entry_number): Likewise.
11370         (run_menu): Use a default entry, a fallback entry and a timeout
11371         in the environment variables "default", "fallback" and
11372         "timeout". Also, tweak the default entry if it is not within the
11373         current menu entries.
11374         (grub_menu_run): Use a fallback entry in the environment variable
11375         "fallback".
11377         * normal/main.c (read_config_file): Do not initialize
11378         NEWMENU->DEFAULT_ENTRY, NEWMENU->FALLBACK_ENTRY or
11379         NEWMENU->TIMEOUT.
11380         (grub_normal_execute): Use a data slot to store the menu.
11382         * include/grub/normal.h (struct grub_menu): Removed default_entry,
11383         fallback_entry and timeout.
11384         (struct grub_menu_list): Removed.
11385         (grub_menu_list_t): Likewise.
11386         (struct grub_context): Likewise.
11387         (grub_context_t): Likewise.
11388         (grub_context_get): Likewise.
11389         (grub_context_get_current_menu): Likewise.
11390         (grub_context_push_menu): Likewise.
11391         (grub_context_pop_menu): Likewise.
11392         (grub_default_init): Likewise.
11393         (grub_default_fini): Likewise.
11394         (grub_timeout_init): Likewise.
11395         (grub_timeout_fini): Likewise.
11397         * conf/sparc64-ieee1275.rmk (pkgdata_MODULES): Removed default.mod
11398         and timeout.mod.
11399         (normal_mod_SOURCES): Removed normal/context.c.
11401         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Removed
11402         commands/default.c, commands/timeout.c and normal/context.c.
11403         (normal_mod_SOURCES): Removed normal/context.c.
11405         * conf/i386-pc.rmk (grub_emu_SOURCES): Removed commands/default.c,
11406         commands/timeout.c and normal/context.c.
11407         (normal_mod_SOURCES): Removed normal/context.c.
11409         * conf/i386-efi.rmk (grub_emu_SOURCES): Removed
11410         commands/default.c, commands/timeout.c and normal/context.c.
11411         (normal_mod_SOURCES): Removed normal/context.c.
11413         * conf/common.rmk (pkgdata_MODULES): Removed default.mod and
11414         timeout.mod.
11415         (default_mod_SOURCES): Removed.
11416         (default_mod_CFLAGS): Likewise.
11417         (default_mod_LDFLAGS): Likewise.
11418         (timeout_mod_SOURCES): Removed.
11419         (timeout_mod_CFLAGS): Likewise.
11420         (timeout_mod_LDFLAGS): Likewise.
11422         * DISTLIST: Removed commands/default.c, commands/timeout.c and
11423         normal/context.c.
11425         * commands/default.c: Removed.
11426         * commands/timeout.c: Likewise.
11427         * normal/context.c: Likewise.
11429 2006-05-07  Vesa Jaaskelainen  <chaac@nic.fi>
11431         * kern/i386/pc/startup.S (grub_exit): Added missing .code32 tag.
11433 2006-05-02  Yoshinori K. Okuji  <okuji@enbug.org>
11435         * kern/env.c (struct grub_env_context): Removed "sorted". Renamed
11436         "next" to "prev" for readability.
11437         (struct grub_env_sorted_var): New struct.
11438         (grub_env_context): Renamed to ...
11439         (initial_context): ... this.
11440         (grub_env_var_context): Renamed to ...
11441         (current_context): ... this.
11442         (grub_env_find): Look only at CURRENT_CONTEXT.
11443         (grub_env_context_open): Rewritten to copy exported variables from
11444         previous context.
11445         (grub_env_context_close): Rewritten according to the new
11446         scheme. Also, add an assertion to prevent the initial context from
11447         removed.
11448         (grub_env_insert): Removed the code for the sorted list.
11449         (grub_env_remove): Likewise.
11450         (grub_env_export): Simply mark the variable with
11451         GRUB_ENV_VAR_GLOBAL.
11452         (grub_env_set): A cosmetic change for naming consistency.
11453         (grub_env_get): Likewise.
11454         (grub_env_unset): Likewise.
11455         (grub_env_iterate): Rewritten to sort variables within this
11456         function.
11457         (grub_register_variable_hook): Fixed for naming consistency. Call
11458         grub_env_find again, only if NAME is not found at the first time.
11459         (mangle_data_slot_name): New function.
11460         (grub_env_set_data_slot): Likewise.
11461         (grub_env_get_data_slot): Likewise.
11462         (grub_env_unset_data_slot): Likewise.
11464         * include/grub/env.h (grub_env_var_type): New enum.
11465         (GRUB_ENV_VAR_LOCAL): New constant.
11466         (GRUB_ENV_VAR_GLOBAL): Likewise.
11467         (GRUB_ENV_VAR_DATA): Likewise.
11468         (struct grub_env_var): Removed "sort_next" and "sort_prevp". Added
11469         "type".
11470         (grub_env_set): Replace VAR with NAME for consistency.
11471         (grub_register_variable_hook): Likewise.
11472         (grub_env_export): Specify the name of the argument.
11473         (grub_env_set_data_slot): New prototype.
11474         (grub_env_get_data_slot): Likewise.
11475         (grub_env_unset_data_slot): Likewise.
11477 2006-04-30  Yoshinori K. Okuji  <okuji@enbug.org>
11479         Extend the loader so that GRUB can accept a loader which comes
11480         back to GRUB when a loaded image exits. Also, this change adds
11481         support for a chainloader on EFI.
11483         * term/efi/console.c: Include grub/misc.h.
11484         (grub_console_checkkey): Display a scan code on the top for
11485         debugging. This will be removed once the EFI port gets stable.
11486         Correct the scan code mapping.
11488         * kern/efi/mm.c (sort_memory_map): Sort in a descending order to
11489         allocate memory from larger regions, in order to reduce the number
11490         of allocated regions. Otherwise, the MacOSX loader panics.
11491         (filter_memory_map): Avoid less than 1MB for compatibility with
11492         other loaders.
11493         (add_memory_regions): Allocate from the tail of a region, if
11494         possible, to avoid allocating a region near to 1MB, for the MacOSX
11495         loader.
11497         * kern/efi/init.c (grub_efi_set_prefix): Specify
11498         GRUB_EFI_IMAGE_HANDLE to grub_efi_get_loaded_image.
11500         * kern/efi/efi.c (grub_efi_get_loaded_image): Accept a new
11501         argument IMAGE_HANDLE and specify it to get a loaded image.
11502         (grub_arch_modules_addr): Specify GRUB_EFI_IMAGE_HANDLE to
11503         grub_efi_get_loaded_image.
11504         (grub_efi_get_filename): Divide the length by the size of
11505         grub_efi_char16_t.
11506         (grub_efi_get_device_path): New function.
11507         (grub_efi_print_device_path): Print End Device Path nodes. Divide
11508         the length by the size of grub_efi_char16_t for a file path device
11509         path node.
11511         * kern/loader.c (grub_loader_noreturn): New variable.
11512         (grub_loader_set): Accept a new argument NORETURN. Set
11513         GRUB_LOADER_NORETURN to NORETURN.
11514         All callers changed.
11515         (grub_loader_boot): If GRUB_LOADER_NORETURN is false, do not call
11516         grub_machine_fini.
11518         * include/grub/efi/efi.h (grub_efi_get_device_path): New
11519         prototype.
11520         (grub_efi_get_loaded_image): Take an argument to specify an image
11521         handle.
11523         * include/grub/loader.h (grub_loader_set): Added one more argument
11524         NORETURN.
11526         * disk/efi/efidisk.c (make_devices): Use grub_efi_get_device_path
11527         instead of grub_efi_open_protocol.
11528         (grub_efidisk_get_device_name): Likewise.
11529         (grub_efidisk_close): Print a newline.
11530         (grub_efidisk_get_device_handle): Fixed to use
11531         GRUB_EFI_DEVICE_PATH_SUBTYPE instead of
11532         GRUB_EFI_DEVICE_PATH_TYPE.
11534         * disk/efi/efidisk.c (device_path_guid): Moved to ...
11535         * kern/efi/efi.c (device_path_guid): ... here.
11537         * conf/i386-efi.rmk (pkgdata_MODULES): Added _chain.mod and
11538         chain.mod.
11539         (kernel_mod_HEADERS): Added efi/disk.h.
11540         (_chain_mod_SOURCES): New variable.
11541         (_chain_mod_CFLAGS): Likewise.
11542         (_chain_mod_LDFLAGS): Likewise.
11543         (chain_mod_SOURCES): Likewise.
11544         (chain_mod_CFLAGS): Likewise.
11545         (chain_mod_LDFLAGS): Likewise.
11547         * DISTLIST: Added include/grub/efi/chainloader.h,
11548         loader/efi/chainloader.c and loader/efi/chainloader_normal.c.
11550         * include/grub/efi/chainloader.h: New file.
11551         * loader/efi/chainloader.c: Likewise.
11552         * loader/efi/chainloader_normal.c: Likewise.
11554 2006-04-30  Marco Gerards  <marco@gnu.org>
11556         * commands/configfile.c (grub_cmd_source): New function.
11557         (GRUB_MOD_INIT): Register the commands `source' and `.'.
11558         (GRUB_MOD_FINI): De-register the commands `source' and `.'.
11560 2006-04-30  Marco Gerards  <marco@gnu.org>
11562         * normal/execute.c (grub_script_execute_cmd): Change the return
11563         type to `grub_err_t'.  Correctly return the error.
11564         (grub_script_execute_cmdline): In case a command line is not a
11565         command or a function, try to interpret it as an assignment.
11567 2006-04-30  Yoshinori K. Okuji  <okuji@enbug.org>
11569         * fs/hfsplus.c (grub_hfsplus_read_block): Fixed a memory leak.
11570         (grub_hfsplus_iterate_dir): Reordered to skip unknown nodes. Also,
11571         skip a node whose name is obviously invalid as UTF-16,
11572         i.e. contains a NUL character. Stop the iteration when the last
11573         directory entry is found. Instead of using the return value of
11574         grub_hfsplus_btree_iterate_node, store the value in RET and use
11575         it, because the iterator can be stopped by the last directory
11576         entry.
11578 2006-04-30  Marco Gerards  <marco@gnu.org>
11580         * include/grub/env.h (grub_env_export): New prototype.  Reported
11581         by Jan C. Kleinsorge <jan.kleinsorge@udo.edu>.
11583 2006-04-30  Marco Gerards  <marco@gnu.org>
11585         * fs/hfsplus.c (grub_hfsplus_iterate_dir): Correctly calculate the
11586         size of the extents in a catalog file record.
11588 2006-04-29  Marco Gerards  <marco@gnu.org>
11590         * commands/configfile.c (grub_cmd_configfile): Execute the
11591         configfile within its own context.
11593         * include/grub/env.h (grub_env_context_open): New prototype.
11594         (grub_env_context_close): Likewise.
11596         * kern/env.c (grub_env): Removed.
11597         (grub_env_sorted): Likewise.
11598         (grub_env_context): New variable.
11599         (grub_env_var_context): Likewise.
11600         (grub_env_find): Search both the active context and the global
11601         context.
11602         (grub_env_context_open): New function.
11603         (grub_env_context_close): Likewise.
11604         (grub_env_insert): Likewise.
11605         (grub_env_remove): Likewise.
11606         (grub_env_export): Likewise.
11607         (grub_env_set): Changed to use helper functions to avoid code
11608         duplication.
11609         (grub_env_iterate): Rewritten so both the current context and the
11610         global context are being used.
11612         * normal/command.c (export_command): New function.
11613         (grub_command_init): Register the `export' function.
11615 2006-04-26  Yoshinori K. Okuji  <okuji@enbug.org>
11617         * util/i386/pc/grub-mkimage.c (compress_kernel): Cast arguments
11618         explicitly to suppress gcc's warnings.
11619         * fs/fat.c (grub_fat_find_dir): Likewise.
11620         (grub_fat_label): Likewise.
11621         * fs/xfs.c (grub_xfs_read_inode): Likewise.
11622         (grub_xfs_mount): Likewise.
11623         (grub_xfs_label): Likewise.
11624         * fs/affs.c (grub_affs_mount): Likewise.
11625         (grub_affs_label): Likewise.
11626         (grub_affs_iterate_dir): Likewise.
11627         * fs/sfs.c (grub_sfs_mount): Likewise.
11628         (grub_sfs_iterate_dir): Likewise.
11629         * fs/ufs.c (grub_ufs_lookup_symlink): Likewise.
11630         * fs/hfs.c (grub_hfs_mount): Likewise.
11631         (grub_hfs_cmp_catkeys): Likewise.
11632         (grub_hfs_find_dir): Likewise.
11633         (grub_hfs_dir): Likewise.
11634         (grub_hfs_label): Likewise.
11635         * fs/jfs.c (grub_jfs_mount): Likewise.
11636         (grub_jfs_opendir): Likewise.
11637         (grub_jfs_getent): Likewise.
11638         (grub_jfs_lookup_symlink): Likewise.
11639         (grub_jfs_label): Likewise.
11640         * fs/hfsplus.c (grub_hfsplus_cmp_catkey): Likewise.
11641         (grub_hfsplus_iterate_dir): Likewise.
11642         (grub_hfsplus_btree_iterate_node): Made static.
11644         * util/grub-emu.c (prefix): New variable.
11645         (grub_machine_set_prefix): New function.
11646         (main): Do not set the environment variable "prefix" here. Only
11647         set PREFIX, which is used later by grub_machine_set_prefix.
11649         * include/grub/video.h: Do not include grub/symbol.h.
11650         (grub_video_register): Not exported. This symbol is not defined in
11651         the kernel.
11652         (grub_video_unregister): Likewise.
11653         (grub_video_iterate): Likewise.
11654         (grub_video_setup): Likewise.
11655         (grub_video_restore): Likewise.
11656         (grub_video_get_info): Likewise.
11657         (grub_video_get_blit_format): Likewise.
11658         (grub_video_set_palette): Likewise.
11659         (grub_video_get_palette): Likewise.
11660         (grub_video_set_viewport): Likewise.
11661         (grub_video_get_viewport): Likewise.
11662         (grub_video_map_color): Likewise.
11663         (grub_video_map_rgb): Likewise.
11664         (grub_video_map_rgba): Likewise.
11665         (grub_video_fill_rect): Likewise.
11666         (grub_video_blit_glyph): Likewise.
11667         (grub_video_blit_bitmap): Likewise.
11668         (grub_video_blit_render_target): Likewise.
11669         (grub_video_scroll): Likewise.
11670         (grub_video_swap_buffers): Likewise.
11671         (grub_video_create_render_target): Likewise.
11672         (grub_video_delete_render_target): Likewise.
11673         (grub_video_set_active_render_target): Likewise.
11675         * include/grub/symbol.h [GRUB_SYMBOL_GENERATOR] (EXPORT_FUNC):
11676         Undefined.
11677         [GRUB_SYMBOL_GENERATOR] (EXPORT_VAR): Likewise.
11679         * conf/sparc64-ieee1275.rmk (grubof_symlist.c): Depended on
11680         config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
11681         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
11682         instead of $(srcdir)/genkernsyms.sh.
11684         * conf/powerpc-ieee1275.rmk (grubof_symlist.c): Depended on
11685         config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
11686         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
11687         instead of $(srcdir)/genkernsyms.sh.
11689         * conf/i386-pc.rmk (symlist.c): Depended on config.h. Use
11690         gensymlist.sh instead of $(srcdir)/gensymlist.sh.
11691         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
11692         instead of $(srcdir)/genkernsyms.sh.
11694         * conf/i386-efi.rmk (symlist.c): Depended on config.h. Use
11695         gensymlist.sh instead of $(srcdir)/gensymlist.sh.
11696         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
11697         instead of $(srcdir)/genkernsyms.sh.
11699         * configure.ac (AC_CONFIG_FILES): Added gensymlist.sh and
11700         genkernsyms.sh.
11702         * Makefile.in (DISTCLEANFILES): Added gensymlist.sh and
11703         genkernsyms.sh.
11704         (gensymlist.sh): New target.
11705         (genkernsyms.sh): Likewise.
11707         * DISTLIST: Removed genkernsyms.sh and gensymlist.sh. Added
11708         genkernsyms.sh.in and gensymlist.sh.in.
11710         * genkernsyms.sh: Removed.
11711         * gensymlist.sh: Likewise.
11713         * genkernsyms.sh.in: New file.
11714         * gensymlist.sh.in: Likewise.
11716 2006-04-25  Hollis Blanchard  <hollis@penguinppc.org>
11718         * kern/powerpc/ieee1275/init.c (grub_machine_set_prefix): Do not
11719         clobber "prefix", since we may have already set it manually.
11721 2006-04-25  Hollis Blanchard  <hollis@penguinppc.org>
11723         * kern/misc.c (abort): New alias for grub_abort.
11725 2006-04-25  Yoshinori K. Okuji  <okuji@enbug.org>
11727         A new machine-specific function "grub_machine_set_prefix" is
11728         defined. This is called after loading modules, so that a prefix
11729         initialization can use modules. Also, this change adds an
11730         intensive debugging feature for the memory manager via the
11731         configure option "--enable-mm-debug".
11733         * partmap/gpt.c (gpt_partition_map_iterate): Add one more into
11734         PART.LEN.
11736         * kern/sparc64/ieee1275/init.c (abort): Removed.
11737         (grub_stop): Likewise.
11738         (grub_exit): New function.
11739         (grub_set_prefix): Renamed to ...
11740         (grub_machine_set_prefix): ... this.
11741         (grub_machine_init): Do not call grub_set_prefix.
11743         * kern/powerpc/ieee1275/init.c (grub_set_prefix): Renamed to ...
11744         (grub_machine_set_prefix): ... this.
11745         (grub_machine_init): Do not call grub_set_prefix.
11747         * kern/i386/pc/init.c (grub_machine_set_prefix): New function.
11748         (grub_machine_init): Do not set the prefix here.
11750         * kern/i386/efi/init.c (grub_machine_set_prefix): New function.
11752         * kern/efi/init.c: Include grub/mm.h.
11753         (grub_efi_set_prefix): New function.
11755         * kern/efi/efi.c (grub_exit): Call grub_efi_fini.
11756         (grub_efi_get_filename): New function.
11757         (grub_print_device_path): Renamed to ...
11758         (grub_efi_print_device_path): ... this.
11760         * kern/mm.c [MM_DEBUG] (grub_malloc): Undefined.
11761         [MM_DEBUG] (grub_realloc): Likewise.
11762         [MM_DEBUG] (grub_free): Likewise.
11763         [MM_DEBUG] (grub_memalign): Likewise.
11764         [MM_DEBUG] (grub_mm_debug): New variable.
11765         [MM_DEBUG] (grub_debug_malloc): New function.
11766         [MM_DEBUG] (grub_debug_free): New function.
11767         [MM_DEBUG] (grub_debug_realloc): New function.
11768         [MM_DEBUG] (grub_debug_memalign): New function.
11770         * kern/misc.c (grub_abort): Print a newline to distinguish
11771         the message.
11773         * kern/main.c (grub_main): Call grub_machine_set_prefix and
11774         grub_set_root_dev after loading modules. This is necessary when
11775         setting a prefix depends on modules.
11777         * include/grub/efi/efi.h (grub_print_device_path): Renamed to ...
11778         (grub_efi_print_device_path): ... this.
11779         (grub_efi_get_filename): New prototype.
11780         (grub_efi_set_prefix): Likewise.
11782         * include/grub/efi/disk.h: Include grub/efi/api.h, grub/symbol.h
11783         and grub/disk.h.
11784         (grub_efidisk_get_device_handle): New prototype.
11785         (grub_efidisk_get_device_name): Likewise.
11787         * include/grub/mm.h: Include config.h.
11788         (MM_DEBUG): Removed.
11789         [MM_DEBUG && !GRUB_UTIL] (grub_mm_debug): New prototype.
11790         [MM_DEBUG && !GRUB_UTIL] (grub_malloc): New macro.
11791         [MM_DEBUG && !GRUB_UTIL] (grub_realloc): Likewise.
11792         [MM_DEBUG && !GRUB_UTIL] (grub_memalign): Likewise.
11793         [MM_DEBUG && !GRUB_UTIL] (grub_free): Likewise.
11794         [MM_DEBUG && !GRUB_UTIL] (grub_debug_malloc): New prototype.
11795         [MM_DEBUG && !GRUB_UTIL] (grub_debug_realloc): New prototype.
11796         [MM_DEBUG && !GRUB_UTIL] (grub_debug_memalign): New prototype.
11797         [MM_DEBUG && !GRUB_UTIL] (grub_debug_free): New prototype.
11799         * include/grub/kernel.h (grub_machine_set_prefix): New prototype.
11801         * disk/efi/efidisk.c: Include grub/partition.h.
11802         (iterate_child_devices): New function.
11803         (add_device): First, compare only last device path nodes, so that
11804         devices are sorted by the types.
11805         (grub_efidisk_get_device_handle): New function.
11806         (grub_efidisk_get_device_name): Likewise.
11808         * configure.ac (--enable-mm-debug): New option to enable the
11809         memory manager debugging feature. This makes the binary much
11810         bigger, so is disabled by default.
11812 2006-04-23  Yoshinori K. Okuji  <okuji@enbug.org>
11814         Use grub_abort instead of grub_stop, and grub_exit must be
11815         define in each architecture now. Also, this change adds support
11816         for EFI disks.
11818         * util/i386/pc/grub-probefs.c: Include grub/term.h.
11819         (grub_getkey): New function.
11820         (grub_term_get_current): Likewise.
11822         * util/i386/pc/grub-setup.c: Include grub/term.h.
11823         (grub_getkey): New function.
11824         (grub_term_get_current): Likewise.
11826         * util/misc.c (grub_stop): Renamed to ...
11827         (grub_exit): ... this.
11829         * kern/powerpc/ieee1275/init.c (abort): Renamed to ...
11830         (grub_exit): ... this.
11831         (grub_machine_init): Use grub_abort instead of abort.
11832         (grub_stop): Removed.
11834         * kern/powerpc/ieee1275/cmain.c (cmain): Use grub_abort instead of
11835         abort.
11837         * kern/i386/pc/startup.S (grub_exit): New function.
11838         (cold_reboot): New label.
11840         * kern/efi/init.c: Include grub/efi/disk.h and grub/env.h.
11841         (grub_efi_init): Call grub_efidisk_init.
11842         (grub_efi_fini): Call grub_efidisk_fini.
11844         * kern/efi/efi.c: Include grub/mm.h.
11845         (grub_efi_console_control_guid): Renamed to ...
11846         (console_control_guid): ... this.
11847         (grub_efi_loaded_image_guid): Renamed to ...
11848         (loaded_image_guid): ... this.
11849         (grub_efi_locate_handle): New function.
11850         (grub_efi_open_protocol): Likewise.
11851         (grub_efi_set_text_mode): Use CONSOLE_CONTROL_GUID instead of
11852         GRUB_EFI_CONSOLE_CONTROL_GUID.
11853         (grub_efi_exit): Removed.
11854         (grub_stop): Likewise.
11855         (grub_efi_get_loaded_image): Use grub_efi_open_protocol.
11856         (grub_exit): New function.
11857         (grub_print_device_path): Likewise.
11859         * kern/rescue.c (grub_rescue_cmd_exit): New function.
11860         (grub_enter_rescue_mode): Register "exit".
11862         * kern/misc.c (grub_real_dprintf): A cosmetic change.
11863         (grub_abort): New function.
11865         * kern/err.c (grub_fatal): Use grub_abort instead of grub_stop.
11867         * include/grub/sparc64/ieee1275/kernel.h (abort): Removed.
11869         * include/grub/powerpc/ieee1275/kernel.h (abort): Removed.
11871         * include/grub/efi/efi.h (grub_efi_exit): Removed.
11872         (grub_print_device_path): New prototype.
11873         (grub_efi_locate_handle): Likewise.
11874         (grub_efi_open_protocol): Likewise.
11876         * include/grub/efi/disk.h (grub_efidisk_fini): New file.
11877         * disk/efi/efidisk.c: Likewise.
11879         * DISTLIST: Added disk/efi/efidisk.c and include/grub/efi/disk.h.
11881         * include/grub/efi/console_control.h
11882         (GRUB_EFI_CONSOLE_CONTROL_GUID): Use an array for the last 8 bytes.
11884         * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): Specify the
11885         last 8 bytes as an array.
11886         (GRUB_EFI_DISK_IO_GUID): New macro.
11887         (GRUB_EFI_BLOCK_IO_GUID): Likewise.
11888         (GRUB_EFI_DEVICE_PATH_GUID): Likewise.
11889         (grub_efi_ipv6_address_t): Change the type to grub_uint16_t from
11890         grub_uint8_t.
11891         (struct grub_efi_guid): Use an array to specify the last 8 bytes.
11892         (struct grub_efi_device_path): Rename the member "sub_type" to
11893         "subtype".
11894         (GRUB_EFI_DEVICE_PATH_TYPE): New macro.
11895         (GRUB_EFI_DEVICE_PATH_SUBTYPE): Likewise.
11896         (GRUB_EFI_DEVICE_PATH_LENGTH): Likewise.
11897         (GRUB_EFI_END_DEVICE_PATH_TYPE): Likewise.
11898         (GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE): Likewise.
11899         (GRUB_EFI_END_THIS_DEVICE_PATH_SUBTYPE): Likewise.
11900         (GRUB_EFI_END_ENTIRE_DEVICE_PATH): Likewise.
11901         (GRUB_EFI_NEXT_DEVICE_PATH): Likewise.
11902         (GRUB_EFI_HARDWARE_DEVICE_PATH_TYPE): Likewise.
11903         (GRUB_EFI_PCI_DEVICE_PATH_SUBTYPE): Likewise.
11904         (struct grub_efi_pci_device_path): New structure.
11905         (grub_efi_pci_device_path_t): New type.
11906         (GRUB_EFI_PCCARD_DEVICE_PATH_SUBTYPE): New macro.
11907         (struct grub_efi_pccard_device_path): New structure.
11908         (grub_efi_pccard_device_path_t): New type.
11909         (GRUB_EFI_MEMORY_MAPPED_DEVICE_PATH_SUBTYPE): New macro.
11910         (struct grub_efi_memory_mapped_device_path): New structure.
11911         (grub_efi_memory_mapped_device_path_t): New type.
11912         (GRUB_EFI_VENDOR_DEVICE_PATH_SUBTYPE): New macro.
11913         (struct grub_efi_vendor_device_path): New structure.
11914         (grub_efi_vendor_device_path_t): New type.
11915         (GRUB_EFI_CONTROLLER_DEVICE_PATH_SUBTYPE): New macro.
11916         (struct grub_efi_controller_device_path): New structure.
11917         (grub_efi_controller_device_path_t): New type.
11918         (GRUB_EFI_ACPI_DEVICE_PATH_TYPE): New macro.
11919         (GRUB_EFI_ACPI_DEVICE_PATH_SUBTYPE): Likewise.
11920         (struct grub_efi_acpi_device_path): New structure.
11921         (grub_efi_acpi_device_path_t): New type.
11922         (GRUB_EFI_EXPANDED_ACPI_DEVICE_PATH_SUBTYPE): New macro.
11923         (struct grub_efi_expanded_acpi_device_path): New structure.
11924         (grub_efi_expanded_acpi_device_path_t): New type.
11925         (GRUB_EFI_EXPANDED_ACPI_HIDSTR): New macro.
11926         (GRUB_EFI_EXPANDED_ACPI_UIDSTR): Likewise.
11927         (GRUB_EFI_EXPANDED_ACPI_CIDSTR): Likewise.
11928         (GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE): Likewise.
11929         (GRUB_EFI_ATAPI_DEVICE_PATH_SUBTYPE): Likewise.
11930         (struct grub_efi_atapi_device_path): New structure.
11931         (grub_efi_atapi_device_path_t): New type.
11932         (GRUB_EFI_FIBRE_CHANNEL_DEVICE_PATH_SUBTYPE): New macro.
11933         (struct grub_efi_fibre_channel_device_path): New structure.
11934         (grub_efi_fibre_channel_device_path_t): New type.
11935         (GRUB_EFI_1394_DEVICE_PATH_SUBTYPE): New macro.
11936         (struct grub_efi_1394_device_path): New structure.
11937         (grub_efi_1394_device_path_t): New type.
11938         (GRUB_EFI_USB_DEVICE_PATH_SUBTYPE): New macro.
11939         (struct grub_efi_usb_device_path): New structure.
11940         (grub_efi_usb_device_path_t): New type.
11941         (GRUB_EFI_USB_CLASS_DEVICE_PATH_SUBTYPE): New macro.
11942         (struct grub_efi_usb_class_device_path): New structure.
11943         (grub_efi_usb_class_device_path_t): New type.
11944         (GRUB_EFI_I2O_DEVICE_PATH_SUBTYPE): New macro.
11945         (struct grub_efi_i2o_device_path): New structure.
11946         (grub_efi_i2o_device_path_t): New type.
11947         (GRUB_EFI_MAC_ADDRESS_DEVICE_PATH_SUBTYPE): New macro.
11948         (struct grub_efi_mac_address_device_path): New structure.
11949         (grub_efi_mac_address_device_path_t): New type.
11950         (GRUB_EFI_IPV4_DEVICE_PATH_SUBTYPE): New macro.
11951         (struct grub_efi_ipv4_device_path): New structure.
11952         (grub_efi_ipv4_device_path_t): New type.
11953         (GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE): New macro.
11954         (struct grub_efi_ipv6_device_path): New structure.
11955         (grub_efi_ipv6_device_path_t): New type.
11956         (GRUB_EFI_INFINIBAND_DEVICE_PATH_SUBTYPE): New macro.
11957         (struct grub_efi_infiniband_device_path): New structure.
11958         (grub_efi_infiniband_device_path_t): New type.
11959         (GRUB_EFI_UART_DEVICE_PATH_SUBTYPE): New macro.
11960         (struct grub_efi_uart_device_path): New structure.
11961         (grub_efi_uart_device_path_t): New type.
11962         (GRUB_EFI_VENDOR_MESSAGING_DEVICE_PATH_SUBTYPE): New macro.
11963         (struct grub_efi_vendor_messaging_device_path): New structure.
11964         (grub_efi_vendor_messaging_device_path_t): New type.
11965         (GRUB_EFI_MEDIA_DEVICE_PATH_TYPE): New macro.
11966         (GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE): Likewise.
11967         (struct grub_efi_hard_drive_device_path): New structure.
11968         (grub_efi_hard_drive_device_path_t): New type.
11969         (GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE): New macro.
11970         (struct grub_efi_cdrom_device_path): New structure.
11971         (grub_efi_cdrom_device_path_t): New type.
11972         (GRUB_EFI_VENDOR_MEDIA_DEVICE_PATH_SUBTYPE): New macro.
11973         (struct grub_efi_vendor_media_device_path): New structure.
11974         (grub_efi_vendor_media_device_path_t): New type.
11975         (GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE): New macro.
11976         (struct grub_efi_file_path_device_path): New structure.
11977         (grub_efi_file_path_device_path_t): New type.
11978         (GRUB_EFI_PROTOCOL_DEVICE_PATH_SUBTYPE): New macro.
11979         (struct grub_efi_protocol_device_path): New structure.
11980         (grub_efi_protocol_device_path_t): New type.
11981         (GRUB_EFI_BIOS_DEVICE_PATH_TYPE): New macro.
11982         (GRUB_EFI_BIOS_DEVICE_PATH_SUBTYPE): Likewise.
11983         (struct grub_efi_bios_device_path): New structure.
11984         (grub_efi_bios_device_path_t): New type.
11985         (struct grub_efi_disk_io): New structure.
11986         (grub_efi_disk_io_t): New type.
11987         (struct grub_efi_block_io_media): New structure.
11988         (grub_efi_block_io_media_t): New type.
11989         (struct grub_efi_block_io): New structure.
11990         (grub_efi_block_io_t): New type.
11992         * include/grub/misc.h (grub_stop): Removed.
11993         (grub_exit): New prototype.
11994         (grub_abort): Likewise.
11996         * include/grub/disk.h (enum grub_disk_dev_id): Added
11997         GRUB_DISK_DEVICE_EFIDISK_ID.
11999         * conf/i386-efi.rmk (kernel_mod_SOURCES): Added
12000         disk/efi/efidisk.c.
12001         (kernel_syms.lst): Remove the target if an error occurs.
12003 2006-04-22  Yoshinori K. Okuji  <okuji@enbug.org>
12005         * kern/misc.c (grub_lltoa): Rewritten the decimal conversion part,
12006         as it was simply too buggy.
12008 2006-04-21  Yoshinori K. Okuji  <okuji@enbug.org>
12010         * kern/misc.c (grub_lltoa): New function.
12011         (grub_vsprintf): Added support for the long long suffix,
12012         i.e. "ll".
12014 2006-04-20  Hollis Blanchard  <hollis@penguinppc.org>
12016         * Makefile.in (LDFLAGS): Add variable.
12017         (LD): Remove variable.
12018         * configure.ac: Add -m32 to LDFLAGS.
12019         * genmk.rb (PModule#rule): Use $(CC) instead of $(LD).
12020         * conf/powerpc-ieee1275.rmk (COMMON_LDFLAGS): Add variable.
12021         (grubof_LDFLAGS): Use $(COMMON_LDFLAGS).
12022         (_linux_mod_LDFLAGS, linux_mod_LDFLAGS, normal_mod_LDFLAGS,
12023         suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS): New
12024         variables.
12025         * conf/sparc64-ieee1275.rmk (COMMON_LDFLAGS): Add -nostdlib.
12026         * conf/i386-pc.rmk (COMMON_LDFLAGS): Add -nostdlib.
12027         * conf/i386-efi.rmk (COMMON_LDFLAGS): Add -nostdlib.
12029 2006-04-20  Vesa Jaaskelainen  <chaac@nic.fi>
12031         * term/gfxterm.c (grub_gfxterm_getcharwidth): Fixed character
12032         length for unknown glyph.
12034 2006-04-20  Yoshinori K. Okuji  <okuji@enbug.org>
12036         Add support for pre-loaded modules into the EFI port.
12038         * util/i386/efi/grub-mkimage.c (make_mods_section): Rewritten
12039         completely. Accept one more argument DIR. The caller has changed.
12041         * kern/i386/efi/init.c (grub_arch_modules_addr): Removed.
12043         * kern/efi/efi.c: Include grub/efi/pe32.h and grub/kernel.h.
12044         (grub_efi_loaded_image_guid): New variable.
12045         (grub_efi_get_loaded_image): New function.
12046         (grub_arch_modules_addr): Likewise.
12048         * include/grub/efi/efi.h (grub_efi_get_loaded_image): New
12049         prototype.
12051         * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): New macro.
12052         (struct grub_efi_loaded_image): New structure.
12053         (grub_efi_loaded_image_t): New type.
12055 2006-04-20  Yoshinori K. Okuji  <okuji@enbug.org>
12057         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Compare the file
12058         size with GRUB_OS_AREA_SIZE as grub_size_t instead of
12059         grub_ssize_t. Reported by Jeff Chua <jeff84@silk.corp.fedex.com>.
12061 2006-04-19  Roger Leigh  <rleigh@whinlatter.ukfsn.org>
12063         * DISTLIST: Added `util/powerpc/ieee1275/grub-install.in'.
12065 2006-04-19  Yoshinori K. Okuji  <okuji@enbug.org>
12067         * DISTLIST: Added include/grub/efi/console.h,
12068         include/grub/efi/time.h, include/grub/i386/efi/kernel.h,
12069         kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
12071         * include/grub/efi/console.h: New file.
12072         * include/grub/efi/time.h: Likewise.
12073         * include/grub/i386/efi/kernel.h: Likewise.
12074         * kern/efi/init.c: Likewise.
12075         * kern/efi/mm.c: Likewise.
12076         * term/efi/console.c: Likewise.
12078         * kern/i386/efi/init.c: Do not include grub/machine/time.h.
12079         (grub_stop): Removed.
12080         (grub_get_rtc): Likewise.
12081         (grub_machine_init): Simply call grub_efi_init.
12082         (grub_machine_fini): Call grub_efi_fini.
12084         * kern/efi/efi.c: Include grub/machine/time.h and grub/term.h.
12085         (grub_efi_output_string): Removed.
12086         (grub_efi_stall): New function.
12087         (grub_stop): Likewise.
12088         (grub_get_rtc): Likewise.
12090         * include/grub/efi/efi.h (grub_efi_output_string): Removed.
12091         (grub_efi_stall): New prototype.
12092         (grub_efi_allocate_pages): Likewise.
12093         (grub_efi_free_pages): Likewise.
12094         (grub_efi_get_memory_map): Likewise.
12095         (grub_efi_mm_init): Likewise.
12096         (grub_efi_mm_fini): Likewise.
12097         (grub_efi_init): Likewise.
12098         (grub_efi_fini): Likewise.
12100         * include/grub/i386/efi/time.h: Do not include
12101         grub/symbol.h. Include grub/efi/time.h.
12102         (GRUB_TICKS_PER_SECOND): Removed.
12103         (grub_get_rtc): Likewise.
12105         * include/grub/efi/api.h (struct grub_efi_memory_descriptor):
12106         Added padding. The EFI spec is buggy.
12107         (GRUB_EFI_BLACK): New macro.
12108         (GRUB_EFI_BLUE): Likewise.
12109         (GRUB_EFI_GREEN): Likewise.
12110         (GRUB_EFI_CYAN): Likewise.
12111         (GRUB_EFI_RED): Likewise.
12112         (GRUB_EFI_MAGENTA): Likewise.
12113         (GRUB_EFI_BROWN): Likewise.
12114         (GRUB_EFI_LIGHTGRAY): Likewise.
12115         (GRUB_EFI_BRIGHT): Likewise.
12116         (GRUB_EFI_DARKGRAY): Likewise.
12117         (GRUB_EFI_LIGHTBLUE): Likewise.
12118         (GRUB_EFI_LIGHTGREEN): Likewise.
12119         (GRUB_EFI_LIGHTCYAN): Likewise.
12120         (GRUB_EFI_LIGHTRED): Likewise.
12121         (GRUB_EFI_LIGHTMAGENTA): Likewise.
12122         (GRUB_EFI_YELLOW): Likewise.
12123         (GRUB_EFI_WHITE): Likewise.
12124         (GRUB_EFI_BACKGROUND_BLACK): Likewise.
12125         (GRUB_EFI_BACKGROUND_BLUE): Likewise.
12126         (GRUB_EFI_BACKGROUND_GREEN): Likewise.
12127         (GRUB_EFI_BACKGROUND_CYAN): Likewise.
12128         (GRUB_EFI_BACKGROUND_RED): Likewise.
12129         (GRUB_EFI_BACKGROUND_MAGENTA): Likewise.
12130         (GRUB_EFI_BACKGROUND_BROWN): Likewise.
12131         (GRUB_EFI_BACKGROUND_LIGHTGRAY): Likewise.
12132         (GRUB_EFI_TEXT_ATTR): Likewise.
12134         * conf/i386-efi.rmk (kernel_mod_SOURCES): Added kern/efi/efi.c,
12135         kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
12136         (kernel_mod_HEADERS): Added efi/time.h.
12138 2006-04-18  Yoshinori K. Okuji  <okuji@enbug.org>
12140         * DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
12141         include/grub/efi/api.h, include/grub/efi/console_control.h,
12142         include/grub/efi/efi.h, include/grub/efi/pe32.h,
12143         include/grub/i386/efi/time.h, kern/efi/efi.c,
12144         kern/i386/efi/init.c, kern/i386/efi/startup.S,
12145         and util/i386/efi/grub-mkimage.c.
12147         * Makefile.in (RMKFILES): Added i386-efi.rmk.
12149         * genmk.rb (PModule#rule): Do not export symbols if
12150         #{prefix}_EXPORTS is set to "no".
12152         * conf/i386-efi.mk: New file.
12153         * conf/i386-efi.rmk: Likewise.
12154         * include/grub/efi/api.h: Likewise.
12155         * include/grub/efi/console_control.h: Likewise.
12156         * include/grub/efi/efi.h: Likewise.
12157         * include/grub/efi/pe32.h: Likewise.
12158         * include/grub/i386/efi/time.h: Likewise.
12159         * kern/efi/efi.c: Likewise.
12160         * kern/i386/efi/init.c: Likewise.
12161         * kern/i386/efi/startup.S: Likewise.
12162         * util/i386/efi/grub-mkimage.c: Likewise.
12164 2006-04-17  Marco Gerards  <marco@gnu.org>
12166         * include/grub/script.h: Include <grub/parser.h> and
12167         "grub_script.tab.h".
12168         (struct grub_lexer_param): New struct.
12169         (struct grub_parser_param): Likewise.
12170         (grub_script_create_arglist): Pass the state in an argument.
12171         (grub_script_add_arglist): Likewise.
12172         (grub_script_create_cmdline): Likewise.
12173         (grub_script_create_cmdblock): Likewise.
12174         (grub_script_create_cmdif): Likewise.
12175         (grub_script_create_cmdmenu): Likewise.
12176         (grub_script_add_cmd): Likewise.
12177         (grub_script_arg_add): Likewise.
12178         (grub_script_lexer_ref): Likewise.
12179         (grub_script_lexer_deref): Likewise.
12180         (grub_script_lexer_record_start): Likewise.
12181         (grub_script_lexer_record_stop): Likewise.
12182         (grub_script_mem_record): Likewise.
12183         (grub_script_mem_record_stop): Likewise.
12184         (grub_script_malloc): Likewise.
12185         (grub_script_yylex): Likewise.
12186         (grub_script_yyparse): Likewise.
12187         (grub_script_yyerror): Likewise.
12188         (grub_script_yylex): Likewise.
12189         (grub_script_lexer_init): Return the state.
12191         * normal/lexer.c (grub_script_lexer_state): Removed variable.
12192         (grub_script_lexer_done): Likewise.
12193         (grub_script_lexer_getline): Likewise.
12194         (grub_script_lexer_refs): Likewise.
12195         (script): Likewise.
12196         (newscript): Likewise.
12197         (record): Likewise.
12198         (recording): Likewise.
12199         (recordpos): Likewise.
12200         (recordlen): Likewise.
12201         (grub_script_lexer_init): Return the state instead of setting
12202         global variables.
12203         (grub_script_lexer_ref): Use the newly added argument for state
12204         instead of globals.
12205         (grub_script_lexer_deref): Likewise.
12206         (grub_script_lexer_record_start): Likewise.
12207         (grub_script_lexer_record_stop): Likewise.
12208         (recordchar): Likewise.
12209         (nextchar): Likewise.
12210         (grub_script_yylex2): Likewise.
12211         (grub_script_yylex): Likewise.
12212         (grub_script_yyerror): Likewise.
12214         * normal/parser.y (func_mem): Removed variable.
12215         (menu_entry): Likewise.
12216         (err): Likewise.
12217         (%lex-param): New parser option.
12218         (%parse-param): Likewise.
12219         (script): Always return the AST.
12220         (argument): Pass the state around.
12221         (arguments): Likewise.
12222         (grubcmd): Likewise.
12223         (commands): Likewise.
12224         (function): Likewise.
12225         (menuentry): Likewise.
12226         (if_statement): Likewise.
12227         (if): Likewise.
12229         * normal/script.c (grub_script_memused): Removed variable.
12230         (grub_script_parsed): Likewise.
12231         (grub_script_malloc): Added a state argument.  Use that instead of
12232         global variables.
12233         (grub_script_mem_record): Likewise.
12234         (grub_script_mem_record_stop): Likewise.
12235         (grub_script_arg_add): Likewise.
12236         (grub_script_add_arglist): Likewise.
12237         (grub_script_create_cmdline): Likewise.
12238         (grub_script_create_cmdif): Likewise.
12239         (grub_script_create_cmdmenu): Likewise.
12240         (grub_script_add_cmd): Likewise.
12241         (grub_script_parse): Setup the state before calling the parser.
12243 2006-04-16  Marco Gerards  <marco@gnu.org>
12245         * normal/command.c (grub_command_init): Remove the title command.
12247         * normal/lexer.c (grub_script_yylex): Renamed from this...
12248         (grub_script_yylex2): ... to this.
12249         (grub_script_yylex): New function.  Temporary
12250         introduced to filter some tokens.
12251         (grub_script_yyerror): Print a newline.
12253         * normal/main.c (read_config_file): Output information about the
12254         lines that contain errors.  Wait for a key after all lines have
12255         been processed.  Don't return an empty menu.
12257         * normal/parser.y (func_mem): Don't initialize.
12258         (menu_entry): Likewise.
12259         (err): New variable.
12260         (script): Don't return anything when an error was encountered.
12261         (ws, returns): Removed rules.
12262         (argument): Disabled concatenated variable support.
12263         (arguments): Remove explicit separators.
12264         (grubcmd): Likewise.
12265         (function): Likewise.
12266         (menuentry): Likewise.
12267         (if): Likewise.
12268         (commands): Likewise.  Add error handling.
12270         * normal/script.c (grub_script_create_cmdline): If
12271         `grub_script_parsed' is 0, assume the parser encountered an error.
12273 2006-04-02  Yoshinori K. Okuji  <okuji@enbug.org>
12275         * configure.ac: Add support for EFI. Fix the typo
12276         BUILD_LDDFLAGS. Restore the LDFLAGS after testing.
12278 2006-04-01  Vesa Jaaskelainen  <chaac@nic.fi>
12280         * util/unifont2pff.rb: Removed unnecessary byte ordering.  Now
12281         foreign multibyte characters should be shown correctly.
12283 2006-04-01  Vesa Jaaskelainen  <chaac@nic.fi>
12285         * normal/main.c (grub_normal_menu_addentry): Fixed menu size
12286         calculation.
12287         (read_config_file): Made it to close file before returning.
12289 2006-03-31  Vesa Jaaskelainen  <chaac@nic.fi>
12291         * DISTLIST: Added include/grub/i386/pc/vbeblit.h,
12292         include/grub/i386/pc/vbefill.h, video/i386/pc/vbeblit.c,
12293         video/i386/pc/vbefill.c.
12295         * conf/i386-pc.rmk (vbe_mod_SOURCES): Added video/i386/pc/vbeblit.c,
12296         video/i386/pc/vbefill.c.
12298         * include/grub/video.h (grub_video_blit_format): New enum.
12299         (grub_video_mode_info): Added new member blit_format.
12300         (grub_video_get_blit_format): New function prototype.
12302         * include/grub/i386/pc/vbe.h (grub_video_vbe_get_video_ptr): New
12303         function prototype.
12304         (grub_video_vbe_map_rgb): Likewise.
12305         (grub_video_vbe_unmap_color): Likewise.
12307         * include/grub/i386/pc/vbeblit.h: New file.
12309         * include/grub/i386/pc/vbefill.h: New file.
12311         * video/video.c (grub_video_get_blit_format): New function.
12312         (grub_video_vbe_get_video_ptr): Re-declared as non-static.
12313         (grub_video_vbe_map_rgb): Likewise.
12314         (grub_video_vbe_unmap_color): Likewise.
12316         * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Changed to use more
12317         optimized fills.
12318         (grub_video_vbe_blit_render_target): Changed to use more optimized
12319         blits.
12320         (grub_video_vbe_setup): Added detection for optimized settings.
12321         (grub_video_vbe_create_render_target): Likewise.
12323         * video/i386/pc/vbeblit.c: New file.
12325         * video/i386/pc/vbefill.c: New file.
12327 2006-03-30  Vesa Jaaskelainen  <chaac@nic.fi>
12329         * font/manager.c (grub_font_get_glyph): Removed font fixup from
12330         here...
12332         * util/unifont2pff.rb: ... and moved it to here.  Improved argument
12333         parsing to support both hex and dec ranges.  If filename was missing
12334         show usage information.
12336 2006-03-14  Vesa Jaaskelainen  <chaac@nic.fi>
12338         * DISTLIST: Added include/grub/video.h, term/gfxterm.c,
12339         video/video.c, commands/videotest.c.  Removed term/i386/pc/vesafb.c.
12341         * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod,
12342         gfxterm.mod, videotest.mod.  Removed vga.mod, vesafb.mod.
12343         (video_mod_SOURCES): Added.
12344         (video_mod_CFLAGS): Likewise.
12345         (video_mod_LDFLAGS): Likewise.
12346         (gfxterm_mod_SOURCES): Likewise.
12347         (gfxterm_mod_CFLAGS): Likewise.
12348         (gfxterm_mod_LDFLAGS): Likewise.
12349         (videotest_mod_SOURCES): Likewise.
12350         (videotest_mod_CFLAGS): Likewise.
12351         (videotest_mod_LDFLAGS): Likewise.
12352         (vesafb_mod_SOURCES): Removed.
12353         (vesafb_mod_CFLAGS): Likewise.
12354         (vesafb_mod_LDFLAGS): Likewise.
12355         (vga_mod_SOURCES): Likewise.
12356         (vga_mod_CFLAGS): Likewise.
12357         (vga_mod_LDFLAGS): Likewise.
12359         * commands/videotest.c: New file.
12361         * font/manager.c (fill_with_default_glyph): Modified to use
12362         grub_font_glyph.
12363         (grub_font_get_glyph): Likewise.
12364         (fontmanager): Renamed from this...
12365         (font_manager): ... to this.
12367         * include/grub/font.h (grub_font_glyph): Added new structure.
12368         (grub_font_get_glyph): Modified to use grub_font_glyph.
12370         * include/grub/misc.h (grub_abs): Added as inline function.
12372         * include/grub/video.h: New file.
12374         * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro.
12375         (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise.
12376         (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise.
12377         (grub_vbe_get_controller_info): Renamed from this...
12378         (grub_vbe_bios_get_controller_info): ... to this.
12379         (grub_vbe_get_mode_info): Renamed from this...
12380         (grub_vbe_bios_get_mode_info): ... to this.
12381         (grub_vbe_set_mode): Renamed from this...
12382         (grub_vbe_bios_set_mode): ... to this.
12383         (grub_vbe_get_mode): Renamed from this...
12384         (grub_vbe_bios_get_mode): ... to this.
12385         (grub_vbe_set_memory_window): Renamed from this...
12386         (grub_vbe_bios_set_memory_window): ... to this.
12387         (grub_vbe_get_memory_window): Renamed from this...
12388         (grub_vbe_bios_get_memory_window): ... to this.
12389         (grub_vbe_set_scanline_length): Renamed from this...
12390         (grub_vbe_set_scanline_length): ... to this.
12391         (grub_vbe_get_scanline_length): Renamed from this...
12392         (grub_vbe_bios_get_scanline_length): ... to this.
12393         (grub_vbe_set_display_start): Renamed from this...
12394         (grub_vbe_bios_set_display_start): ... to this.
12395         (grub_vbe_get_display_start): Renamed from this...
12396         (grub_vbe_bios_get_display_start): ... to this.
12397         (grub_vbe_set_palette_data): Renamed from this...
12398         (grub_vbe_bios_set_palette_data): ... to this.
12399         (grub_vbe_set_pixel_rgb): Removed.
12400         (grub_vbe_set_pixel_index): Likewise.
12402         * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed
12403         from this...
12404         (grub_vbe_bios_get_controller_info): ... to this.
12405         (grub_vbe_get_mode_info): Renamed from this...
12406         (grub_vbe_bios_get_mode_info): ... to this.
12407         (grub_vbe_set_mode): Renamed from this...
12408         (grub_vbe_bios_set_mode): ... to this.
12409         (grub_vbe_get_mode): Renamed from this...
12410         (grub_vbe_bios_get_mode): ... to this.
12411         (grub_vbe_set_memory_window): Renamed from this...
12412         (grub_vbe_bios_set_memory_window): ... to this.
12413         (grub_vbe_get_memory_window): Renamed from this...
12414         (grub_vbe_bios_get_memory_window): ... to this.
12415         (grub_vbe_set_scanline_length): Renamed from this...
12416         (grub_vbe_set_scanline_length): ... to this.
12417         (grub_vbe_get_scanline_length): Renamed from this...
12418         (grub_vbe_bios_get_scanline_length): ... to this.
12419         (grub_vbe_set_display_start): Renamed from this...
12420         (grub_vbe_bios_set_display_start): ... to this.
12421         (grub_vbe_get_display_start): Renamed from this...
12422         (grub_vbe_bios_get_display_start): ... to this.
12423         (grub_vbe_set_palette_data): Renamed from this...
12424         (grub_vbe_bios_set_palette_data): ... to this.
12425         (grub_vbe_bios_get_controller_info): Fixed problem with registers
12426         getting corrupted after calling it.  Added more pushes and pops.
12427         (grub_vbe_bios_set_mode): Likewise.
12428         (grub_vbe_bios_get_mode): Likewise.
12429         (grub_vbe_bios_get_memory_window): Likewise.
12430         (grub_vbe_bios_set_scanline_length): Likewise.
12431         (grub_vbe_bios_get_scanline_length): Likewise.
12432         (grub_vbe_bios_get_display_start): Likewise.
12433         (grub_vbe_bios_set_palette_data): Likewise.
12435         * normal/cmdline.c (cl_set_pos): Refresh the screen.
12436         (cl_insert): Likewise.
12437         (cl_delete): Likewise.
12439         * term/gfxterm.c: New file.
12441         * term/i386/pc/vesafb.c: Removed file.
12443         * video/video.c: New file.
12445         * video/i386/pc/vbe.c (real2pm): Added new function.
12446         (grub_video_vbe_draw_pixel): Likewise.
12447         (grub_video_vbe_get_video_ptr): Likewise.
12448         (grub_video_vbe_get_pixel): Likewise
12449         (grub_video_vbe_init): Likewise.
12450         (grub_video_vbe_fini): Likewise.
12451         (grub_video_vbe_setup): Likewise.
12452         (grub_video_vbe_get_info): Likewise.
12453         (grub_video_vbe_set_palette): Likewise.
12454         (grub_video_vbe_get_palette): Likewise.
12455         (grub_video_vbe_set_viewport): Likewise.
12456         (grub_video_vbe_get_viewport): Likewise.
12457         (grub_video_vbe_map_color): Likewise.
12458         (grub_video_vbe_map_rgb): Likewise.
12459         (grub_video_vbe_map_rgba): Likewise.
12460         (grub_video_vbe_unmap_color): Likewise.
12461         (grub_video_vbe_fill_rect): Likewise.
12462         (grub_video_vbe_blit_glyph): Likewise.
12463         (grub_video_vbe_blit_bitmap): Likewise.
12464         (grub_video_vbe_blit_render_target): Likewise.
12465         (grub_video_vbe_scroll): Likewise.
12466         (grub_video_vbe_swap_buffers): Likewise.
12467         (grub_video_vbe_create_render_target): Likewise.
12468         (grub_video_vbe_delete_render_target): Likewise.
12469         (grub_video_vbe_set_active_render_target): Likewise.
12470         (grub_vbe_set_pixel_rgb): Remove function.
12471         (grub_vbe_set_pixel_index): Likewise.
12472         (index_color_mode): Remove static variable.
12473         (active_mode): Likewise.
12474         (framebuffer): Likewise.
12475         (bytes_per_scan_line): Likewise.
12476         (grub_video_vbe_adapter): Added new static variable.
12477         (framebuffer): Likewise.
12478         (render_target): Likewise.
12479         (initial_mode): Likewise.
12480         (mode_in_use): Likewise.
12481         (mode_list): Likewise.
12483 2006-03-10  Marco Gerards  <marco@gnu.org>
12485         * configure.ac (AC_INIT): Bumped to 1.93.
12487         * DISTLIST: Added `include/grub/hfs.h'.
12489 2006-02-01  Yoshinori K. Okuji  <okuji@enbug.org>
12491         * boot/i386/pc/boot.S (general_error): Before looping, try INT
12492         18H, which might help the BIOS falling back to next boot media.
12494 2006-01-25  Yoshinori K. Okuji  <okuji@enbug.org>
12496         * util/i386/pc/grub-install.in: Escape a backslash. Reported by
12497         Poe Chen <poe.poechen@gmail.com>.
12499 2006-01-17  Marco Gerards  <marco@gnu.org>
12501         * include/grub/normal.h: Include <grub/script.h>.
12502         (grub_command_list): Removed struct.
12503         (grub_command_list_t): Removed type.
12504         (grub_menu_entry): Remove members `num' and `command_list'.  Add
12505         members `commands' and `sourcecode'.
12506         * include/grub/script.h: Add inclusion guards.
12507         (grub_script_cmd_menuentry): New struct.
12508         (grub_script_execute_menuentry): New prototype.
12509         (grub_script_lexer_record_start): Likewise.
12510         (grub_script_lexer_record_stop): Likewise.
12511         * normal/execute.c (grub_script_execute_menuentry): New function.
12512         * normal/lexer.c (record, recording, recordpos, recordlen): New
12513         variables.
12514         (grub_script_lexer_record_start): New function.
12515         (grub_script_lexer_record_stop): Likewise.
12516         (recordchar): Likewise.
12517         (nextchar): Likewise.
12518         (grub_script_yylex): Use `nextchar' to fetch new characters.  Use
12519         2048 as the buffer size.  Add the tokens `menuentry' and `@'.
12520         * normal/main.c: Include <grub/parser.h> and <grub/script.h>
12521         (current_menu): New variable.
12522         (free_menu): Mainly rewritten.
12523         (grub_normal_menu_addentry): New function.
12524         (read_config_file): Rewritten.
12525         * normal/menu.c (run_menu_entry): Mainly rewritten.
12526         * normal/menu_entry.c (make_screen): Rewritten the code to insert
12527         the menu entry.
12528         (run): Mainly rewritten.
12529         * normal/parser.y (menu_entry): New variable.
12530         (GRUB_PARSER_TOKEN_MENUENTRY): New token.
12531         (menuentry): New rule.
12532         (command): Add `menuentry'.
12533         (if_statement): Allow additional returns before `fi'.
12534         * normal/script.c (grub_script_create_cmdmenu): New function.
12536 2006-01-03  Marco Gerards  <marco@gnu.org>
12538         * INSTALL: GNU Bison is required.
12539         * configure.ac: Rewritten the test to detect Bison.
12540         * Makefile.in (YACC): New variable.  Reported by Xun Sun
12541         <xun.sun.cn@gmail.com>.
12543 2006-01-03  Marco Gerards  <marco@gnu.org>
12545         * fs/hfsplus.c (grub_hfsplus_read_block): Convert the offset of
12546         the HFS+ filesystem to filesystem blocks.
12547         (grub_hfsplus_iterate_dir): Cast the `fileinfo' assignment so a
12548         GCC warning is silenced.
12550 2006-01-03  Marco Gerards  <marco@gnu.org>
12552         * partmap/apple.c (apple_partition_map_iterate): Convert the data
12553         read from disk from big endian to host byte order.
12555 2006-01-03  Hollis Blanchard  <hollis@penguinppc.org>
12557         * fs/hfs.c: Include <grub/hfs.h>.  Added reference to the official
12558         documentation.
12559         (GRUB_HFS_EMBED_HFSPLUS_SIG): New macro.
12560         (grub_hfs_mount): Grammar fix in error. Make sure this is not an
12561         embedded HFS+ filesystem.
12562         (GRUB_HFS_MAGIC, grub_hfs_extent, grub_hfs_datarecord_t)
12563         (grub_hfs_sblock): Move from here...
12564         * include/grub/hfs.h: To here...  New file.
12565         * fs/hfsplus.c: Include <grub/hfs.h>.  Added reference to the official
12566         documentation.
12567         (GRUB_HFSPLUS_MAGIC, GRUB_HFSPLUSX_MAGIC, GRUB_HFSPLUS_SBLOCK):
12568         New macros.
12569         (grub_hfsplus_volheader): Change type of member `magic' to
12570         `grub_uint16_t'.
12571         (grub_hfsplus_data): Add new member `embedded_offset'.
12572         (grub_hfsplus_read_block): Add the HFS+ wrapper offset to the
12573         returned block.
12574         (grub_hfsplus_mount): Read the HFS+ wrapper if it exists.
12575         Calculate the offset.
12577 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
12579         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRP_ADDR):
12580         Removed.
12581         (GRUB_BOOT_MACHINE_DRP_SIZE): Likewise.
12583 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
12585         * kern/env.c (grub_env_set): Check if ENV->VALUE instead of
12586         ENV->NAME is NULL after allocating ENV->VALUE.
12588 2005-12-25  Marco Gerards  <marco@gnu.org>
12590         * kern/env.c (grub_env_set): Rewritten the error handling code.
12592 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
12594         * geninit.sh: Made more robust, and more portable.
12596 2005-12-25  Marco Gerards  <marco@gnu.org>
12598         Add support for Apple HFS+ filesystems.
12600         * fs/hfsplus.c: New file.
12602         * DISTLIST: Added `fs/hfsplus.c'.
12604         * conf/common.rmk (pkgdata_MODULES): Add `hfsplus.mod'.
12605         (hfsplus_mod_SOURCES): New variable.
12606         (hfsplus_mod_CFLAGS): Likewise.
12607         (hfsplus_mod_LDFLAGS): Likewise.
12608         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/hfsplus.c'.
12609         (grub_setup_SOURCES): Likewise.
12610         (grub_mkdevicemap_SOURCES): Likewise.
12611         (grub_emu_SOURCES): Likewise.
12612         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
12614         * fs/fshelp.c (grub_fshelp_log2blksize): New function.
12616         * include/grub/fshelp.h (grub_fshelp_log2blksize): new prototype.
12618 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
12620         * DISTLIST: Added geninitheader.sh, geninit.sh, commands/test.c,
12621         commands/i386/pc/play.c, conf/common.mk, conf/common.rmk,
12622         include/grub/parser.h, include/grub/script.h, kern/parser.c,
12623         kern/sparc64/cache.S, normal/execute.c, normal/function.c,
12624         normal/lexer.c, normal/parser.y, normal/script.c, and
12625         partmap/gpt.c.
12626         Removed kern/sparc64/cache.c.
12628         * conf/common.rmk (DISTCLEANFILES): Added grub_script.tab.c,
12629         grub_script.tab.h, grub_modules_init.lst, grub_modules_init.h,
12630         grub_emu_init.c.
12632         * configure.ac (AC_INIT): Bumped to 1.92.
12634 2005-12-24  Vesa Jaaskelainen  <chaac@nic.fi>
12636         * kern/err.c (grub_error_push): Added new function to support error
12637         stacks.
12638         (grub_error_pop): Likewise.
12639         (grub_error_stack_items): New local variable to support error stacks.
12640         (grub_error_stack_pos): Likewise.
12641         (grub_error_stack_assert): Likewise.
12642         (GRUB_ERROR_STACK_SIZE): Added new define to configure maximum error
12643         stack depth.
12644         (grub_print_error): Added support to print errors from error stack.
12646         * include/grub/err.h (grub_error_push): Added function prototype.
12647         (grub_error_pop): Likewise.
12649 2005-12-09  Hollis Blanchard  <hollis@penguinppc.org>
12651         * configure.ac: Accept `powerpc64' as host_cpu.
12652         (amd64): Rename to `biarch32'.
12654         * kern/powerpc/cache.S (grub_arch_sync_caches): Handle
12655         non-cacheline-aligned addresses.
12657         * kern/dl.c (grub_dl_load_core): Add grub_dprintf messages.
12658         (grub_dl_flush_cache): Likewise.  Only call `grub_arch_sync_caches'
12659         if `size' is non-zero.
12661 2005-12-03  Marco Gerards  <mgerards@xs4all.nl>
12663         * conf/common.rmk (grub_modules_init.lst): Use `-printf "%P\n"'
12664         and `cd' to make sure the filename is not prefixed with a
12665         directory name.
12666         (pkgdata_MODULES): Add `gpt.mod'.
12667         (gpt_mod_SOURCES): New variable.
12668         (gpt_mod_CFLAGS): Likewise.
12669         (gpt_mod_LDFLAGS): Likewise.
12671         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/gpt.c'.
12673         * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_GPT_DISK):
12674         New macro.
12676         * partmap/gpt.c: New file.
12678         * partmap/pc.c (pc_partition_map_iterate): Don't continue when a
12679         GPT partition map is detected.
12681 2005-12-03  Vincent Pelletier  <subdino2004@yahoo.fr>
12683         * commands/i386/pc/play.c: New file.
12684         * conf/i386-pc.rmk (pkgdata_MODULES): Added play.mod.
12685         (play_mod_SOURCES, play_mod_CFLAGS, play_mod_LDFLAGS): New
12686         macros.
12688 2005-11-27  Marco Gerards  <mgerards@xs4all.nl>
12690         * include/grub/dl.h (GRUB_MOD_INIT): Use `__attribute__
12691         ((unused))' to silence gcc warning.
12693 2005-11-26  Hollis Blanchard  <hollis@penguinppc.org>
12695         * configure.ac: Correct `AC_PROG_YACC' test.
12697 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
12699         * util/powerpc/ieee1275/grub-install.in: Run the mount point
12700         check before installing files.
12702 2005-11-22  Mike Small  <smallm@panix.com>
12704         * util/powerpc/ieee1275/grub-install.in (grubdir): Fixed partition
12705         number regex so multidigit numbers are recognized correctly.
12707 2005-11-22  Mike Small  <smallm@panix.com>
12709         * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Add a
12710         debugging message before attempting to claim memory.
12711         (grub_rescue_cmd_initrd): Add a claim debugging message and try
12712         multiple addresses in case of failure.
12714 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
12716         * term/tparm.c (get_space): Remove empty `if' statement.
12718         * fs/ufs.c (grub_ufs_find_file): Remove `grub_le_to_cpu32'.
12720         * kern/parser.c (check_varstate): Rename `state' to 's'.
12722 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
12724         * partmap/acorn.c: Change `unsigned' to `unsigned int'.  Move all
12725         variable definitions to the beginning of each function.  Sort stack
12726         variables by size.
12727         (find): Rename to `acorn_partition_map_find'.  Cast `grub_disk_read'
12728         `buf' argument to `char *'.
12730 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
12732         * conf/powerpc-ieee1275.rmk: Include conf/common.mk.
12733         (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
12734         minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
12735         hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
12736         help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
12737         sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
12738         configfile.mod, search.mod, gzio.mod and test.mod.
12739         (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
12740         (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
12741         (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
12742         (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
12743         (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
12744         (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
12745         (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
12746         (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
12747         (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
12748         (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
12749         (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
12750         (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
12751         (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
12752         (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
12753         (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
12754         (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
12755         (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
12756         (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
12757         (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
12758         (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
12759         (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
12760         (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
12761         (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Removed.
12763         * conf/common.mk (grub_modules_init.lst): Use `find' instead of
12764         `grep --include'.
12765         (pkgdata_MODULES): Add test.mod.
12767 2005-11-18  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
12769         * genmk.rb: Fixed list rules moved to Makefile.in.  Recognise
12770         appending to variables with "+=".
12771         (PModule): Use full pathname to generate *.lst filenames.
12773         * Makefile.in: Fixed list rules moved from genmk.rb.
12774         (.DELETE_ON_ERROR): New special target.
12775         (RMKFILES): Add common.rmk and sparc64-ieee1275.rmk.
12777         * conf/i386-pc.rmk: Include conf/common.mk.
12778         (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
12779         minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
12780         hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
12781         help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
12782         sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
12783         configfile.mod, search.mod, gzio.mod and test.mod.
12784         (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
12785         (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
12786         (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
12787         (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
12788         (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
12789         (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
12790         (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
12791         (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
12792         (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
12793         (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
12794         (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
12795         (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
12796         (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
12797         (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
12798         (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
12799         (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
12800         (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
12801         (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
12802         (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
12803         (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
12804         (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
12805         (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
12806         (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Move from
12807         here...
12808         * conf/common.rmk: ... to here.  New file.
12810         * conf/common.mk: New file.
12812 2005-11-18  Yoshinori K. Okuji  <okuji@enbug.org>
12814         * conf/powerpc-ieee1275.rmk (grub_script.tab.h): Unified to ...
12815         (grub_script.tab.c): ... here.
12817         * conf/sparc64-ieee1275.rmk (grub_script.tab.h): Unified to ...
12818         (grub_script.tab.c): ... here.
12820         * conf/i386-pc.rmk (grub_script.tab.h): Unified to ...
12821         (grub_script.tab.c): ... here.
12823         * normal/command.c (grub_command_find): Fixed a memory leak of
12824         MODULE_NAME. Reported by Mike Small <smallm@panix.com>.
12826 2005-11-13  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
12828         * include/grub/symbol.h: (FUNCTION): Use double quotes instead of
12829         "@" which marks the start of a comment on ARM.
12830         (VARIABLE): Likewise.
12832 2005-11-13  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
12834         Add support for Linux/ADFS partition tables.
12836         * partmap/acorn.c: New file.
12838         * include/grub/acorn_filecore.h: Likewise.
12840         * DISTLIST: Added `partmap/acorn.c' and
12841         `include/grub/acorn_filecore.h'.
12843         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
12844         `partmap/acorn.c'.
12845         (pkgdata_MODULES): Add `acorn.mod'.
12846         (acorn_mod_SOURCES): New variable.
12847         (acorn_mod_CFLAGS): Likewise.
12849         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
12850         `partmap/acorn.c'.
12851         (pkgdata_MODULES): Add `acorn.mod'.
12852         (acorn_mod_SOURCES): New variable.
12853         (acorn_mod_CFLAGS): Likewise.
12855         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/acorn.c'.
12856         (pkgdata_MODULES): Add `acorn.mod'.
12857         (acorn_mod_SOURCES): New variable.
12858         (acorn_mod_CFLAGS): Likewise.
12859         (acorn_mod_LDFLAGS): Likewise.
12861         * include/types.h (grub_disk_addr_t): New typedef.
12863 2005-11-13  Marco Gerards  <mgerards@xs4all.nl>
12865         * geninit.sh: New file.
12867         * geninitheader.sh: Likewise.
12869         * commands/boot.c (grub_boot_init, grub_boot_fini): Removed.
12870         * commands/cat.c (grub_cat_init, grub_cat_fini): Likewise.
12871         * commands/cmp.c (grub_cmp_init, grub_cmp_fini): Likewise.
12872         * commands/configfile.c (grub_configfile_init)
12873         (grub_configfile_fini): Likewise.
12874         * commands/default.c (grub_default_init, grub_default_fini):
12875         Likewise.
12876         * commands/help.c (grub_help_init, grub_help_fini): Likewise.
12877         * commands/ls.c (grub_ls_init, grub_ls_fini): Likewise.
12878         * commands/search.c (grub_search_init, grub_search_fini): Likewise.
12879         * commands/terminal.c (grub_terminal_init, grub_terminal_fini):
12880         Likewise.
12881         * commands/test.c (grub_test_init, grub_test_fini): Likewise.
12882         * commands/timeout.c (grub_timeout_init, grub_timeout_fini):
12883         Likewise.
12884         * commands/i386/pc/halt.c (grub_halt_init, grub_halt_fini): Likewise.
12885         * commands/ieee1275/halt.c (grub_halt_init, grub_halt_fini):
12886         Likewise.
12887         * commands/i386/pc/reboot.c (grub_reboot_init, grub_reboot_fini):
12888         Likewise.
12889         * commands/ieee1275/reboot.c (grub_reboot_init, grub_reboot_fini):
12890         Likewise.
12891         * disk/loopback.c (grub_loop_init, grub_loop_fini): Likewise.
12892         * fs/affs.c (grub_affs_init, grub_affs_fini): Likewise.
12893         * fs/ext2.c (grub_ext2_init, grub_ext2_fini): Likewise.
12894         * fs/fat.c (grub_fat_init, grub_fat_fini): Likewise.
12895         * fs/hfs.c (grub_hfs_init, grub_hfs_fini): Likewise.
12896         * fs/iso9660.c (grub_iso9660_init, grub_iso9660_fini): Likewise.
12897         * fs/jfs.c (grub_jfs_init, grub_jfs_fini): Likewise.
12898         * fs/minix.c (grub_minix_init, grub_minix_fini): Likewise.
12899         * fs/sfs.c (grub_sfs_init, grub_sfs_fini): Likewise.
12900         * fs/ufs.c (grub_ufs_init, grub_ufs_fini): Likewise.
12901         * fs/xfs.c (grub_xfs_init, grub_xfs_fini): Likewise.
12902         * normal/main.c (grub_normal_init, grub_normal_fini): Likewise.
12903         * partmap/amiga.c (grub_amiga_partition_map_init)
12904         (grub_amiga_partition_map_fini): Likewise.
12905         * partmap/apple.c (grub_apple_partition_map_init)
12906         (grub_apple_partition_map_fini): Likewise.
12907         * partmap/pc.c (grub_pc_partition_map_init)
12908         (grub_pc_partition_map_fini): Likewise.
12909         * partmap/sun.c (grub_sun_partition_map_init,
12910         grub_sun_partition_map_fini): Likewise.
12911         * term/terminfo.c (grub_terminal_init, grub_terminal_fini):
12912         Likewise.
12914         * util/grub-emu.c: Include <grub_modules_init.h>.
12915         (main): Don't initialize and de-initialize any modules directly,
12916         use `grub_init_all' and `grub_fini_all' instead.
12918         * term/i386/pc/vesafb.c (grub_vesafb_init): Renamed to
12919         `grub_vesafb_mod_init'.
12920         (grub_vesafb_fini): Renamed to `grub_vesafb_mod_fini'.  Updated
12921         all users.
12922         * term/i386/pc/vga.c (grub_vga_init): Renamed to
12923         `grub_vga_mod_init'.  Updated all users.
12924         (grub_vga_fini): Renamed to `grub_vga_mod_fini'.
12926         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `grub_emu_init.c'.
12927         (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c): New
12928         rules.
12930         * include/grub/dl.h (GRUB_MOD_INIT): Add argument `name'.
12931         Generate a function to initialize the module in utilities.
12932         Updated all callers.
12933         (GRUB_MOD_FINI): Add argument `name'.  Generate a function to
12934         initialize the module in utilities.  Updated all callers.
12936 2005-11-09  Hollis Blanchard  <hollis@penguinppc.org>
12938         * term/ieee1275/ofconsole.c (grub_ofconsole_cls): Use both the ANSI
12939         escape sequence and a literal ^L to clear the screen.
12941         * commands/ieee1275/suspend.c (grub_cmd_suspend): Clear the screen
12942         when returning from Open Firmware.
12944 2005-11-09  Hollis Blanchard  <hollis@penguinppc.org>
12946         * term/ieee1275/ofconsole.c (grub_ofconsole_width): New variable.
12947         (grub_ofconsole_height): Likewise.
12948         (grub_ofconsole_putchar): If `grub_curr_x' exceeds console width,
12949         manually insert a '\n'.
12950         (grub_ofconsole_getwh): Set and return `grub_ofconsole_width' and
12951         `grub_ofconsole_height'.  Return early if these are already set.
12953 2005-11-07  Vincent Pelletier  <subdino2004@yahoo.fr>
12955         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
12956         `commands/test.c', `fs/affs.c', `fs/sfs.c', `fs/xfs.c',
12957         `normal/execute.c', `normal/lexer.c', `io/gzio.c',
12958         `kern/parser.c', `grub_script.tab.c', `normal/function.c'
12959         and `normal/script.c'.
12960         (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
12961         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
12962         (test_mod_SOURCES): New variable.
12963         (test_mod_CFLAGS): Likewise.
12964         (test_mod_LDFLAGS): Likewise.
12965         (pkgdata_MODULES): Add `test.mod'.
12966         (grub_script.tab.c): New rule.
12967         (grub_script.tab.h): Likewise.
12969 2005-11-07  Marco Gerards  <mgerards@xs4all.nl>
12971         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
12972         `commands/test.c', `normal/execute.c', `normal/lexer.c',
12973         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
12974         (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
12975         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
12976         (test_mod_SOURCES): New variable.
12977         (test_mod_CFLAGS): Likewise.
12978         (pkgdata_MODULES): Add `test.mod'.
12979         (grub_script.tab.c): New rule.
12980         (grub_script.tab.h): Likewise.
12982 2005-11-06  Marco Gerards  <mgerards@xs4all.nl>
12984         Add initial scripting support.
12986         * commands/test.c: New file.
12987         * include/grub/script.h: Likewise.
12988         * normal/execute.c: Likewise.
12989         * normal/function.c: Likewise.
12990         * normal/lexer.c: Likewise.
12991         * normal/parser.y: Likewise.
12992         * normal/script.c: Likewise.
12994         * configure.ac: Add `AC_PROG_YACC' test.
12996         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/test.c',
12997         `normal/execute.c', `normal/lexer.c', `grub_script.tab.c',
12998         `normal/function.c' and `normal/script.c'.
12999         (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
13000         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
13001         (test_mod_SOURCES, test_mod_CFLAGS, test_mod_LDFLAGS): New
13002         variables.
13003         (pkgdata_MODULES): Add `test.mod'.
13004         (grub_script.tab.c): New rule.
13005         (grub_script.tab.h): Likewise.
13007         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TEST_FAILURE'.
13009         * include/grub/normal.h (grub_test_init): New prototype.
13010         (grub_test_fini): Likewise.
13012         * normal/command.c: Include <grub/script.h>.
13013         (grub_command_execute): Rewritten.
13015         * util/grub-emu.c (main): Call `grub_test_init' and
13016         `grub_test_fini'.
13018 2005-11-03  Hollis Blanchard  <hollis@penguinppc.org>
13020         * kern/powerpc/ieee1275/init.c (grub_get_rtc): Initialize `msecs'
13021         to 0.
13022         * term/ieee1275/ofconsole.c (grub_ofconsole_checkkey): Return -1 if
13023         there are no pending characters.
13025 2005-11-03  Hollis Blanchard  <hollis@penguinppc.org>
13027         * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_get_devname): Use
13028         `grub_strndup' to drop device arguments. Replace unnecessary
13029         `grub_strndup' with `grub_strdup'.
13031 2005-11-03  Hollis Blanchard  <hollis@penguinppc.org>
13033         * kern/term.c (grub_cls): Do not call grub_cur_term->cls() if the
13034         `debug' environment variable has been set.
13036 2005-11-02  Hollis Blanchard  <hollis@penguinppc.org>
13038         * Makefile.in (install-local): Use $(DATA).
13039         (uninstall): Likewise.
13040         * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Move grub-mkimage...
13041         (sbin_UTILITIES): ... to here.
13042         (sbin_SCRIPTS): New variable.
13043         (grub_install_SOURCES): New variable.
13044         * util/powerpc/ieee1275/grub-install.in: New file.
13045         * util/powerpc/ieee1275/grub-mkimage.c (kernel_path): Remove
13046         variable.
13047         (add_segments): Call `grub_util_get_path'.
13049 2005-10-28  Yoshinori K. Okuji  <okuji@enbug.org>
13051         From Timothy Baldwin:
13052         * commands/ls.c (grub_ls_list_files): Close FILE with
13053         grub_file_close.
13054         * kern/misc.c (grub_vsprintf): Terminate the string S with NUL.
13056 2005-10-24  Marco Gerards  <mgerards@xs4all.nl>
13058         * include/grub/parser.h: New file.
13060         * kern/parser.c: Likewise.
13062         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/parser.c'.
13063         (grub_setup_SOURCES): Likewise.
13064         (grub_probefs_SOURCES): Likewise.
13065         (grub_emu_SOURCES): Likewise.
13066         (kernel_img_HEADERS): Add `parser.h'.
13068         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
13069         (grub_emu_SOURCES): Add `kern/parser.c'.
13070         (grubof_SOURCES): Likewise.
13072         * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
13073         (grubof_SOURCES): Add `kern/parser.c'.
13075         * include/grub/misc.h (grub_split_cmdline): Removed prototype.
13077         * kern/misc.c (grub_split_cmdline): Removed function.
13079         * kern/rescue.c: Include <grub/parser.h>.
13080         (grub_enter_rescue_mode): Use `grub_parser_split_cmdline' instead
13081         of `grub_split_cmdline'.
13083         * normal/command.c: Include <grub/parser.h>.
13084         (grub_command_execute):  Use `grub_parser_split_cmdline' instead
13085         of `grub_split_cmdline'.
13087         * normal/completion.c: Include <grub/parser.h>.
13088         (cmdline_state): New variable.
13089         (iterate_dir): End the filename with a quote depending on the
13090         command line state.
13091         (get_state): new function.
13092         (grub_normal_do_completion): Use `grub_parser_split_cmdline' to
13093         split the arguments and determine the current argument.  When the
13094         argument string is not quoted, escape all spaces.
13096 2005-10-23  Vincent Pelletier  <subdino2004@yahoo.fr>
13098         * normal/sparc64/setjmp.S: New file.
13100 2005-10-23  Vincent Pelletier  <subdino2004@yahoo.fr>
13102         * include/grub/sparc64/libgcc.h: New file.
13103         * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Remove -Av9.
13104         (normal_mod_SOURCES): Use normal/sparc64/setjmp.S instead of
13105         normal/sparc64/setjmp.c.
13107 2005-10-23  Vincent Pelletier  <subdino2004@yahoo.fr>
13109         * kern/sparc64/dl.c: Rewritten for SPARCV9 ELF.
13110         * kern/sparc64/cache.S: New file.
13111         * kern/sparc64/cache.c: Removed.
13112         * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Add -Av9.
13113         (COMMON_CFLAGS): Add -mno-app-regs.  Remove -mcpu=v9 and
13114         -mtune=ultrasparc.
13115         (COMMON_LDFLAGS): Add -melf64_sparc.
13116         (grubof_HEADERS): Add sparc64/libgcc.h and machine/kernel.h.
13117         (grubof_SOURCES): Use cache.S instead of cache.c.
13118         (grubof_LDFLAGS): Add -mno-app-regs.  Replace "-Xlinker
13119         --oformat -Xlinker elf64-sparc" by "-Bstatic,-melf64_sparc".
13120         (pkgdata_MODULES): Uncomment. Leave linux.mod and _linux.mod
13121         commented though.
13122         (normal_mod_SOURCES): Add normal/completion.c and normal/misc.c.
13123         (_linux_mod_SOURCES, _linux_mod_CFLAGS, linux_mod_SOURCES)
13124         (linux_mod_CFLAGS): Commented out.
13125         (_linux_mod_LDFLAGS, linux_mod_LDFLAGS): New macro, commented
13126         out because module isn't built.
13127         (fshelp_mod_LDFLAGS, fat_mod_LDFLAGS, ext2_mod_LDFLAGS)
13128         (ufs_mod_LDFLAGS, minix_mod_LDFLAGS, hfs_mod_LDFLAGS)
13129         (jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS, normal_mod_LDFLAGS)
13130         (hello_mod_LDFLAGS, boot_mod_LDFLAGS, terminal_mod_LDFLAGS)
13131         (ls_mod_LDFLAGS, cmp_mod_LDFLAGS, cat_mod_LDFLAGS)
13132         (font_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
13133         (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
13134         (suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS)
13135         (help_mod_LDFLAGS, default_mod_LDFLAGS, timeout_mod_LDFLAGS)
13136         (configfile_mod_LDFLAGS, search_mod_LDFLAGS, xfs_mod_SOURCES)
13137         (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
13138         (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
13139         (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, gzio_mod_SOURCES)
13140         (gzio_mod_CFLAGS, gzio_mod_LDFLAGS): New macro.
13142 2005-10-20  Yoshinori K. Okuji  <okuji@enbug.org>
13144         * util/i386/pc/grub-probefs.c (main): Call grub_xfs_init and
13145         grub_xfs_fini. Do not call grub_hfs_init or grub_hfs_fini any
13146         longer, because HFS should not be used on PC.
13148 2005-10-20  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
13150         * io/gzio.c (grub_gzio_read): Use OFFSET instead of FILE->OFFSET
13151         consistently within the loop.
13153 2005-10-15  Marco Gerards  <mgerards@xs4all.nl>
13155         * fs/xfs.c (grub_xfs_iterate_dir): Detect an error if part of a
13156         directory can not be read.
13158 2005-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
13160         * configure.ac (AC_INIT): Increase the version number to 1.91.
13162         * DISTLIST: Added include/grub/terminfo.h, include/grub/tparm.h,
13163         include/grub/i386/pc/serial.h, term/terminfo.c, term/tparm.c and
13164         term/i386/pc/serial.c.
13166 2005-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
13168         * kern/file.c (grub_file_seek): Seeking to an offset equal to a
13169         file size must be permitted.
13171         * kern/i386/pc/startup.S (multiboot_trampoline): Fix a mistake
13172         between %ah and %al.
13174 2005-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
13176         * fs/xfs.c (grub_xfs_iterate_dir): Change the type of BLK to
13177         grub_uint64_t.
13178         Call the hook with a NUL-terminated filename.
13179         (grub_xfs_mount): Use grub_be_to_cpu32 instead of
13180         grub_cpu_to_be32.
13182         * kern/term.c (cursor_state): New variable.
13183         (grub_term_set_current): Reset the cursor state on a new
13184         terminal.
13185         (grub_setcursor): Rewritten to use CURSOR_STATE.
13186         (grub_getcursor): New function.
13188         * include/grub/term.h (grub_getcursor): New prototype.
13190         * io/gzio.c (test_header): Align BUF for accessing it as 32-bit
13191         integers on ARM. Reported by Timothy Baldwin
13192         <T.E.Baldwin99@members.leeds.ac.uk>.
13194 2005-10-11  Marco Gerards  <mgerards@xs4all.nl>
13196         * fs/sfs.c (grub_sfs_open): Don't free `data->label' if it is not
13197         allocated.
13198         (grub_sfs_dir): Likewise.
13200 2005-10-09  Marco Gerards  <mgerards@xs4all.nl>
13202         Add support for the SFS filesystem.
13204         * fs/sfs.c: New file.
13206         * DISTLIST: Added `fs/sfs.c'.
13208         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/sfs.c'.
13209         (grub_probefs_SOURCES): Likewise.
13210         (grub_emu_SOURCES): Likewise.
13211         (pkgdata_MODULES): Add `sfs.mod'.
13212         (sfs_mod_SOURCES): New variable.
13213         (sfs_mod_CFLAGS): Likewise.
13214         (sfs_mod_LDFLAGS): Likewise.
13216         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/sfs.c'.
13217         (pkgdata_MODULES): Add `sfs.mod'.
13218         (sfs_mod_SOURCES): New variable.
13219         (sfs_mod_CFLAGS): Likewise.
13221         * util/grub-emu.c (main): Call `grub_sfs_init' and
13222         `grub_sfs_fini'.
13224         * include/grub/fs.h (grub_sfs_init): New prototype.
13225         (grub_sfs_fini): Likewise.
13227 2005-10-07  Marco Gerards  <mgerards@xs4all.nl>
13229         Add support for the AFFS filesystem.
13231         * fs/affs.c: New file.
13233         * DISTLIST: Added `fs/affs.c'.
13235         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/affs.c'.
13236         (grub_probefs_SOURCES): Likewise.
13237         (grub_emu_SOURCES): Likewise.
13238         (pkgdata_MODULES): Add `affs.mod'.
13239         (affs_mod_SOURCES): New variable.
13240         (affs_mod_CFLAGS): Likewise.
13241         (affs_mod_LDFLAGS): Likewise.
13243         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/affs.c'.
13244         (pkgdata_MODULES): Add `affs.mod'.
13245         (affs_mod_SOURCES): New variable.
13246         (affs_mod_CFLAGS): Likewise.
13248         * util/grub-emu.c (main): Call `grub_affs_init' and
13249         `grub_affs_fini'.
13251         * include/grub/fs.h (grub_affs_init): New prototype.
13252         (grub_affs_fini): Likewise.
13254 2005-10-01  Marco Gerards  <mgerards@xs4all.nl>
13256         * fs/xfs.c (grub_xfs_iterate_dir): Add parentheses.
13258 2005-10-01  Marco Gerards  <mgerards@xs4all.nl>
13260         * configure.ac: Accept `x86_64' as host_cpu.  In that case add
13261         `-m32' to CFLAGS.
13263         * genmk.rb (class PModule): Always use `$(#{prefix}_LDFLAGS)' when
13264         linking.
13266         * conf/i386-pc.rmk (COMMON_CFLAGS): Add `-m32'.
13267         (COMMON_LDFLAGS): New variable.
13268         (kernel_img_LDFLAGS): Include `COMMON_FLAGS'.
13269         (_chain_mod_LDFLAGS, fshelp_mod_LDFLAGS, fat_mod_LDFLAGS)
13270         (ext2_mod_LDFLAGS, ufs_mod_LDFLAGS, minix_mod_LDFLAGS)
13271         (hfs_mod_LDFLAGS, jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS)
13272         (xfs_mod_LDFLAGS, _linux_mod_LDFLAGS, linux_mod_LDFLAGS)
13273         (normal_mod_LDFLAGS, hello_mod_LDFLAGS, boot_mod_LDFLAGS)
13274         (terminal_mod_LDFLAGS, ls_mod_LDFLAGS, cmp_mod_LDFLAGS)
13275         (cat_mod_LDFLAGS, help_mod_LDFLAGS, reboot_mod_LDFLAGS)
13276         (halt_mod_LDFLAGS, vga_mod_LDFLAGS, font_mod_LDFLAGS)
13277         (terminfo_mod_LDFLAGS, serial_mod_LDFLAGS, _multiboot_mod_LDFLAGS)
13278         (multiboot_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
13279         (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
13280         (default_mod_LDFLAGS, timeout_mod_LDFLAGS, configfile_mod_LDFLAGS)
13281         (vbe_mod_LDFLAGS, vesafb_mod_LDFLAGS, vbeinfo_mod_LDFLAGS)
13282         (vbetest_mod_LDFLAGS, search_mod_LDFLAGS, gzio_mod_LDFLAGS): New
13283         variables.
13284         (normal_mod_ASFLAGS): Add `-m32'.
13286         * include/grub/types.h (grub_host_addr_t, grub_host_off_t)
13287         (grub_host_size_t, grub_host_ssize_t): New types.
13288         (grub_addr_t, grub_off_t, grub_size_t, grub_ssize_t): Make type
13289         dependent of `GRUB_CPU_SIZEOF_VOID_P' instead on
13290         `GRUB_HOST_SIZEOF_VOID_P'.
13292         * include/grub/kernel.h (struct grub_module_header): Type of
13293         member offset changed to `grub_host_off_t'.  Type of member size
13294         changed to `grub_host_size_t'.
13295         (struct grub_module_info): Type of member offset changed to
13296         `grub_host_off_t'.  Type of member size changed to
13297         `grub_host_size_t'.
13299 2005-09-29  Yoshinori K. Okuji  <okuji@enbug.org>
13301         Make GRUB's kernel compliant to Multiboot Specification.
13303         * kern/i386/pc/startup.S (multiboot_header): New label.
13304         (multiboot_entry): Likewise.
13305         (multiboot_trampoline): Likewise.
13307         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
13308         Increased to 0x4A0.
13310         * fs/xfs.c (grub_xfs_iterate_dir): Fix a syntax error. You may not
13311         put parentheses after a question mark.
13312         [!GRUB_UTIL] (my_mod): New variable.
13314         * util/grub-emu.c (main): Call grub_xfs_init and grub_xfs_fini.
13316 2005-09-28  Marco Gerards  <mgerards@xs4all.nl>
13318         Adds support for the XFS filesystem.  Btrees are not supported
13319         yet.
13321         * fs/xfs.c: New file.
13323         * DISTLIST: Added `fs/xfs.c'.
13325         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/xfs.c'.
13326         (grub_probefs_SOURCES): Likewise.
13327         (grub_emu_SOURCES): Likewise.
13328         (pkgdata_MODULES): Add `xfs.mod'.
13329         (xfs_mod_SOURCES): New variable.
13330         (xfs_mod_CFLAGS): Likewise.
13332         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/xfs.c'.
13333         (pkgdata_MODULES): Add `xfs.mod'.
13334         (xfs_mod_SOURCES): New variable.
13335         (xfs_mod_CFLAGS): Likewise.
13337         * util/grub-emu.c (main): Call `grub_xfs_init' and
13338         `grub_xfs_fini'.
13340         * include/grub/fs.h (grub_xfs_init): New prototype.
13341         (grub_xfs_fini): Likewise.
13344 2005-09-18  Vesa Jaaskelainen  <chaac@nic.fi>
13346         * video/i386/pc/vbe.c (grub_vbe_set_video_mode): In indexed
13347         color modes, allow greater than 16 colors to be configured as
13348         a default palette.
13350 2005-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
13352         * normal/completion.c (complete_arguments): Add the qualifier
13353         const into OPTIONS.
13355         From Omniflux <omniflux+lists@omniflux.com>:
13356         * include/grub/terminfo.h: New file.
13357         * include/grub/tparm.h: Likewise.
13358         * include/grub/i386/pc/serial.h: Likewise.
13359         * term/terminfo.c: Likewise.
13360         * term/tparm.c: Likewise.
13361         * term/i386/pc/serial.c: Likewise.
13362         * conf/i386-pc.rmk (pkgdata_MODULES): Added terminfo.mod and
13363         serial.mod.
13364         (terminfo_mod_SOURCES): New variable.
13365         (terminfo_mod_CFLAGS): Likewise.
13366         (serial_mod_SOURCES): Likewise.
13367         (serial_mod_CFLAGS): Likewise.
13369 2005-08-31  Yoshinori K. Okuji  <okuji@enbug.org>
13371         * DISTLIST: Replaced boot/powerpc/ieee1275/crt0.S and
13372         boot/powerpc/ieee1275/cmain.c with kern/powerpc/ieee1275/crt0.S
13373         and kern/powerpc/ieee1275/cmain.c, respectively.
13375         * boot/powerpc/ieee1275/crt0.S: Moved to ...
13376         * kern/powerpc/ieee1275/crt0.S: ... here.
13378         * boot/powerpc/ieee1275/cmain.c: Moved to ...
13379         * kern/powerpc/ieee1275/cmain.c: ... here.
13381         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Use
13382         kern/powerpc/ieee1275/crt0.S and kern/powerpc/ieee1275/cmain.c
13383         instead of boot/powerpc/ieee1275/crt0.S and
13384         boot/powerpc/ieee1275/cmain.c, respectively.
13386         * boot/i386/pc/boot.S (lba_mode): Do not store the total number of
13387         sectors. It was not used anyway.
13389 2005-08-30  Hollis Blanchard  <hollis@penguinppc.org>
13391         * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): Fix
13392         `unused parameter' warning.
13394 2005-08-30  Hollis Blanchard  <hollis@penguinppc.org>
13396         * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): New
13397         function.
13398         (grub_ofconsole_term): Specify grub_ofconsole_getcharwidth as
13399         getcharwidth.
13401 2005-08-28  Marco Gerards  <metgerards@student.han.nl>
13403         * include/grub/normal.h (enum grub_completion_type): Added
13404         `GRUB_COMPLETION_TYPE_ARGUMENT'.
13406         * normal/cmdline.c (print_completion): Handle
13407         the `GRUB_COMPLETION_TYPE_ARGUMENT' type.
13408         * normal/menu_entry.c (store_completion): Likewise.
13410         * normal/completion.c (complete_arguments): New function.
13411         (grub_normal_do_completion): Call `complete_arguments' when the
13412         current words start with a dash.
13414 2005-08-27  Marco Gerards  <metgerards@student.han.nl>
13416         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Fix typo (use
13417         `gzio.mod' instead of `io.mod').
13419 2005-08-22  Yoshinori K. Okuji  <okuji@enbug.org>
13421         * gendistlist.sh (EXTRA_DISTFILES): Added genfslist.sh.
13422         (DISTDIRS): Added io and video.
13423         Rewrite the search routine to make an output consistently.
13425         * DISTLIST: Added conf/sparc64-ieee1275.mk,
13426         conf/sparc64-ieee1275.rmk, include/grub/gzio.h,
13427         include/grub/ieee1275/ieee1275.h, include/grub/ieee1275/ofdisk.h,
13428         io/gzio.c, kern/sparc64/cache.c, kern/sparc64/dl.c,
13429         kern/sparc64/ieee1275/init.c, kern/sparc64/ieee1275/openfw.c and
13430         util/powerpc/ieee1275/misc.c.
13432         * include/grub/gzio.h: New file.
13433         * io/gzio.c: Likewise.
13435         * kern/file.c (grub_file_close): Call grub_device_close only if
13436         FILE->DEVICE is not NULL.
13438         * include/grub/mm.h [!NULL] (NULL): New macro.
13440         * include/grub/err.h (GRUB_ERR_BAD_GZIP_DATA): New constant.
13442         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added io/gzip.c.
13443         (pkgdata_MODULES): Added gzio.mod.
13444         (gzio_mod_SOURCES): New variable.
13445         (gzio_mod_CFLAGS): Likewise.
13447         * conf/i386-pc.rmk (grub_emu_SOURCES): Added io/gzip.c.
13448         (pkgdata_MODULES): Added gzio.mod.
13449         (gzio_mod_SOURCES): New variable.
13450         (gzio_mod_CFLAGS): Likewise.
13452         * commands/cat.c: Include grub/gzio.h.
13453         (grub_cmd_cat): Use grub_gzfile_open instead of
13454         grub_file_open.
13456         * commands/cmp.c: Include grub/gzio.h.
13457         (grub_cmd_cmp): Use grub_gzfile_open instead of
13458         grub_file_open.
13460         * loader/i386/pc/multiboot.c: Include grub/gzio.h.
13461         (grub_rescue_cmd_multiboot): Use grub_gzfile_open instead of
13462         grub_file_open.
13463         (grub_rescue_cmd_module): Likewise.
13465 2005-08-21  Vincent Pelletier  <subdino2004@yahoo.fr>
13467         * conf/sparc64-ieee1275.rmk (grubof_SOURCES): The first file must be
13468         kern/sparc64/ieee1275/init.c because it contains _start.
13469         * conf/sparc64-ieee1275.mk: Generated from conf/sparc64-ieee1275.rmk.
13471 2005-08-21  Vincent Pelletier  <subdino2004@yahoo.fr>
13473         * configure.ac: Add support for sparc64 host with ieee1275
13474         firmware.
13475         * configure: Generated from configure.ac.
13476         * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Use grub_ssize_t
13477         instead of int.
13478         (grub_ofdisk_read): Likewise.
13479         (grub_ofdisk_open): Use %p to print pointer values, and cast the
13480         pointers as (void *) to remove a warning.
13481         (grub_ofdisk_close): Likewise.
13482         (grub_ofdisk_read): Likewise.
13483         * kern/ieee1275/ieee1275.c (grub_ieee1275_exit): This never
13484         returns, so make it return void to remove a warning.
13485         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_exit):
13486         Corresponding prototype change.
13487         * kern/mm.c (grub_mm_init_region): Use %p to print pointer
13488         values, and cast the pointers as (void *) to remove a warning.
13489         (grub_mm_dump): Likewise.
13490         * conf/sparc64-ieee1275.mk: New file.
13491         * conf/sparc64-ieee1275.rmk: Likewise.
13492         * include/grub/sparc64/setjmp.h: Likewise.
13493         * include/grub/sparc64/types.h: Likewise.
13494         * include/grub/sparc64/ieee1275/console.h: Likewise.
13495         * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
13496         * include/grub/sparc64/ieee1275/kernel.h: Likewise.
13497         * include/grub/sparc64/ieee1275/time.h: Likewise.
13498         * kern/sparc64/cache.c: Likewise.
13499         * kern/sparc64/dl.c: Likewise.
13500         * kern/sparc64/ieee1275/init.c: Likewise.
13501         * kern/sparc64/ieee1275/openfw.c: Likewise.
13503 2005-08-21  Yoshinori K. Okuji  <okuji@enbug.org>
13505         * util/console.c (grub_ncurses_putchar): If C is greater than
13506         0x7f, set C to a question mark.
13507         (grub_ncurses_getcharwidth): New function.
13508         (grub_ncurses_term): Specify grub_ncurses_getcharwidth as
13509         getcharwidth.
13511         * normal/menu.c (print_entry): Made aware of Unicode. First,
13512         convert TITLE to UCS-4, and predict the cursor position by
13513         grub_getcharwidth.
13515         * include/grub/misc.h (grub_utf8_to_ucs4): Specify the qualifier
13516         const to SRC.
13517         * kern/misc.c (grub_utf16_to_utf8): Likewise.
13519 2005-08-20  Yoshinori K. Okuji  <okuji@enbug.org>
13521         * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Specify
13522         the boot file by the option BOOT_IMAGE. Use grub_stpcpy instead of
13523         grub_strcat.
13525         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Specify the boot
13526         file by the option BOOT_IMAGE. Use grub_stpcpy instead of
13527         grub_strcpy and grub_strlen. Take it into account that a space
13528         character is inserted as a delimiter.
13530 2005-08-20  Yoshinori K. Okuji  <okuji@enbug.org>
13532         * partmap/pc.c (pc_partition_map_iterate): Include the value of an
13533         invalid magic in the error.
13535         * commands/search.c: New file.
13537         * util/grub-emu.c (main): Call grub_search_init and
13538         grub_search_fini.
13540         * kern/rescue.c (grub_rescue_print_disks): Removed.
13541         (grub_rescue_print_devices): New function.
13542         (grub_rescue_cmd_ls): Use grub_device_iterate with
13543         grub_rescue_print_devices instead of grub_disk_dev_iterate with
13544         grub_rescue_print_disks.
13546         * kern/partition.c (grub_partition_iterate): Return the result of
13547         PARTMAP->ITERATE instead of GRUB_ERRNO.
13549         * kern/device.c: Include grub/partition.h.
13550         (grub_device_iterate): New function.
13552         * include/grub/partition.h (grub_partition_iterate): Return int
13553         instead of grub_err_t.
13555         * include/grub/normal.h [GRUB_UTIL] (grub_search_init): New
13556         prototype.
13557         [GRUB_UTIL] (grub_search_fini): Likewise.
13559         * include/grub/device.h (grub_device_iterate): New prototype.
13561         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
13562         commands/search.c.
13563         (pkgdata_MODULES): Added search.mod.
13564         (search_mod_SOURCES): New variable.
13565         (search_mod_CFLAGS): Likewise.
13567         * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/search.c.
13568         (pkgdata_MODULES): Added search.mod.
13569         (search_mod_SOURCES): New variable.
13570         (search_mod_CFLAGS): Likewise.
13572         * commands/ls.c (grub_ls_list_disks): Renamed to ...
13573         (grub_ls_list_devices): ... this, and use grub_device_iterate.
13574         All callers changed.
13576         * DISTLIST: Added commands/search.c.
13578 2005-08-20  Yoshinori K. Okuji  <okuji@enbug.org>
13580         * kern/term.c (grub_putchar): Use grub_utf8_to_ucs4 for the
13581         conversion.
13582         (grub_getcharwidth): New function.
13584         * kern/misc.c (grub_utf8_to_ucs4): New function.
13586         * include/grub/term.h (struct grub_term): Added a new member
13587         "getcharwidth".
13588         (grub_getcharwidth): New prototype.
13590         * include/grub/misc.h (grub_utf8_to_ucs4): New prototype.
13592         * term/i386/pc/console.c (map_char): New function. Segregated from
13593         grub_console_putchar.
13594         (grub_console_putchar): Use map_char.
13595         (grub_console_getcharwidth): New function.
13596         (grub_console_term): Specified grub_console_getcharwidth as
13597         getcharwidth.
13599         * term/i386/pc/vga.c (grub_vga_getcharwidth): New function.
13600         (grub_vga_term): Specified grub_vga_getcharwidth as getcharwidth.
13602         * term/i386/pc/vesafb.c (grub_virtual_screen_setup): Return
13603         GRUB_ERRNO.
13604         (grub_vesafb_init): Do not use RC. Instead, use GRUB_ERRNO. Rely
13605         on grub_strtoul completely.
13606         (write_char): Declare local variables in the beginning of the
13607         function.
13608         (grub_vesafb_getcharwidth): New function.
13609         (grub_vesafb_term): Specified grub_vesafb_getcharwidth as
13610         getcharwidth.
13612 2005-08-19  Yoshinori K. Okuji  <okuji@enbug.org>
13614         * DISTLIST: Replace commands/i386/pc/vbe_list_modes.c and
13615         commands/i386/pc/vbe_test.c with commands/i386/pc/vbeinfo.c and
13616         commands/i386/pc/vbetest.c.
13618         * video/i386/pc/vbe.c (grub_vbe_probe): If INFOBLOCK is not NULL,
13619         call grub_vbe_get_controller_info again, because the returned
13620         information is volatile.
13621         (grub_vbe_set_video_mode): Mostly rewritten.
13622         (grub_vbe_get_video_mode): Use grub_vbe_probe and use
13623         grub_vbe_status_t correctly.
13624         (grub_vbe_get_video_mode_info): Likewise.
13625         (grub_vbe_set_pixel_rgb): Use a switch statement rather than
13626         several if statements.
13628         * commands/i386/pc/vbe_list_modes.c: Renamed to ...
13629         * commands/i386/pc/vbeinfo.c: ... this.
13631         * commands/i386/pc/vbe_test.c: Renamed to ...
13632         * commands/i386/pc/vbetest.c: ... this.
13634         * commands/i386/pc/vbeinfo.c (grub_cmd_vbe_list_modes): Renamed to
13635         ...
13636         (grub_cmd_vbeinfo): ... this. Save video modes before
13637         iterating. Skip a video mode, if it is not available, not enough
13638         information is given or it is monochrome. Show the memory
13639         model. Leave the interpretation of MODEVAR to grub_strtoul
13640         completely.
13641         (GRUB_MOD_INIT): Rename vbe_list_modes to vbeinfo.
13642         (GRUB_MOD_FINI): Likewise.
13644         * commands/i386/pc/vbetest.c (grub_cmd_vbe_test): Renamed to ...
13645         (grub_cmd_vbetest): ... this. Don't print unnecessarily. Use
13646         grub_err_t instead of grub_uint32_t. Don't use SPTR. Remove a
13647         duplicated grub_env_get. Leave the interpretation of MODEVAR to
13648         grub_strtoul completely.
13649         (real2pm): Removed.
13650         (GRUB_MOD_INIT): Rename vbe_test to vbetest.
13651         (GRUB_MOD_FINI): Likewise.
13653         * normal/misc.c: Include grub/mm.h.
13655         * conf/i386-pc.rmk (pkgdata_MODULES): Replaced vbe_test.mod and
13656         vbe_list_modes with vbetest.mod and vbeinfo.mod.
13657         (vbe_list_modes_mod_SOURCES): Removed.
13658         (vbe_list_modes_mod_CFLAGS): Likewise.
13659         (vbe_test_mod_SOURCES): Likewise.
13660         (vbe_test_mod_CFLAGS): Likewise.
13661         (vbeinfo_mod_SOURCES): New variable.
13662         (vbeinfo_mod_CFLAGS): Likewise.
13663         (vbetest_mod_SOURCES): Likewise.
13664         (vbetest_mod_CFLAGS): Likewise.
13666 2005-08-18  Yoshinori K. Okuji  <okuji@enbug.org>
13668         * normal/misc.c: New file.
13670         * DISTLIST: Added normal/misc.c.
13672         * partmap/amiga.c (amiga_partition_map_iterate): Add an argument
13673         DISK to HOOK. Call HOOK with DISK.
13674         * partmap/apple.c (apple_partition_map_iterate): Likewise.
13675         * partmap/pc.c (pc_partition_map_iterate): Likewise.
13676         * partmap/sun.c (sun_partition_map_iterate): Likewise.
13678         * normal/menu_entry.c (struct screen): Added a new member
13679         "completion_shown".
13680         (completion_buffer): New global variable.
13681         (make_screen): Set SCREEN->COMPLETION_SHOWN to zero.
13682         (store_completion): New function.
13683         (complete): Likewise.
13684         (clear_completions): Likewise.
13685         (grub_menu_entry_run): If SCREEN->COMPLETION_SHOWN is non-zero,
13686         call clear_completions and reset SCREEN->COMPLETION_SHOWN. If C is
13687         a tab, call complete.
13689         * normal/completion.c (disk_dev): Removed.
13690         (print_simple_completion): Likewise.
13691         (print_partition_completion): Likewise.
13692         (print_func): New global variable.
13693         (add_completion): Do not take the arguments WHAT or PRINT any
13694         longer. Added a new argument TYPE. Instead of printing directly,
13695         call PRINT_FUNC if not NULL.
13696         All callers changed.
13697         (complete_device): Use a local variable DEV instead of
13698         DISK_DEV. Do not move CURRENT_WORD to the end of a device name.
13699         (grub_normal_do_completion): Take a new argument HOOK. Do not
13700         initialize DISK_DEV. Initialize PRINT_FUNC to HOOK. If RET is an
13701         empty string, return NULL instead.
13702         All callers changed.
13704         * normal/cmdline.c (print_completion): New function.
13706         * kern/partition.c (grub_partition_iterate): Add an argument DISK
13707         to HOOK.
13708         All callers changed.
13710         * kern/disk.c (grub_print_partinfo): Removed.
13712         * include/grub/partition.h (struct grub_partition_map): Add a new
13713         argument DISK into HOOK of ITERATE.
13714         (grub_partition_iterate): Add a new argument DISK to HOOK.
13716         * include/grub/normal.h (enum grub_completion_type): New enum.
13717         (grub_completion_type_t): New type.
13718         (GRUB_COMPLETION_TYPE_COMMAND): New constant.
13719         (GRUB_COMPLETION_TYPE_DEVICE): Likewise.
13720         (GRUB_COMPLETION_TYPE_PARTITION): Likewise.
13721         (GRUB_COMPLETION_TYPE_FILE): Likewise.
13722         (grub_normal_do_completion): Added a new argument HOOK.
13723         (grub_normal_print_device_info): New prototype.
13725         * include/grub/disk.h (grub_print_partinfo): Removed.
13727         * conf/i386-pc.rmk (grub_emu_SOURCES): Added normal/misc.c.
13728         (normal_mod_SOURCES): Likewise.
13729         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
13730         (normal_mod_SOURCES): Likewise.
13732         * commands/ls.c (grub_ls_list_disks): Use
13733         grub_normal_print_device_info instead of grub_print_partinfo. Free
13734         PNAME.
13735         (grub_ls_list_files): Use grub_normal_print_device_info instead of
13736         duplicating the code.
13738 2005-08-16  Vesa Jaaskelainen  <chaac@nic.fi>
13740         * commands/i386/pc/vbe_list_modes.c: Update source formatting to
13741         follow GCS more precisely.
13742         * commands/i386/pc/vbe_test.c: Likewise.
13743         * include/grub/i386/pc/vbe.h: Likewise.
13744         * term/i386/pc/vesafb.c: Likewise.
13745         * video/i386/pc/vbe.c: Likewise.
13747 2005-08-16  Vesa Jaaskelainen  <chaac@nic.fi>
13749         * DISTLIST: Added term/i386/pc/vesafb.c
13750         DISTLIST: Added video/i386/pc/vbe.c
13751         DISTLIST: Added commands/i386/pc/vbe_list_modes.c.
13752         DISTLIST: Added commands/i386/pc/vbe_test.c.
13753         * commands/i386/pc/vbe_list_modes.c: New file.
13754         * commands/i386/pc/vbe_test.c: Likewise.
13755         * term/i386/pc/vesafb.c: Likewise.
13756         * video/i386/pc/vbe.c: Likewise.
13757         * include/grub/i386/pc/vbe.h (GRUB_VBE_DEFAULT_VIDEO_MODE): Added define.
13758         (grub_vbe_probe) Added prototype.
13759         (grub_vbe_set_video_mode) Likewise.
13760         (grub_vbe_get_video_mode) Likewise.
13761         (grub_vbe_get_video_mode_info) Likewise.
13762         (grub_vbe_set_pixel_rgb) Likewise.
13763         (grub_vbe_set_pixel_index) Likewise.
13764         * conf/i386-pc.rmk (pkgdata_MODULES): Added vbe.mod.
13765         (pkgdata_MODULES): Added vesafb.mod.
13766         (pkgdata_MODULES): Added vbe_list_modes.mod.
13767         (pkgdata_MODULES): Added vbe_test.mod.
13768         (vbe_mod_SOURCES): Added.
13769         (vbe_mod_CFLAGS): Likewise.
13770         (vesafb_mod_SOURCES): Likewise.
13771         (vesafb_mod_CFLAGS): Likewise.
13772         (vbe_list_modes_mod_SOURCES): Likewise.
13773         (vbe_list_modes_mod_CFLAGS): Likewise.
13774         (vbe_test_mod_SOURCES): Likewise.
13775         (vbe_test_mod_CFLAGS): Likewise.
13777 2005-08-14  Yoshinori K. Okuji  <okuji@enbug.org>
13779         * normal/command.c (grub_command_execute): If INTERACTIVE is
13780         false and GRUB_COMMAND_FLAG_NO_ECHO is not specified, print
13781         CMDLINE. Disable the pager if INTERACTIVE is true.
13782         All callers are changed.
13784         * normal/main.c (grub_normal_execute): Read command.lst and fs.lst
13785         before reading a config file.
13786         * normal/main.c (read_config_file): Even if a command is not
13787         found, register it if it is within an entry.
13789         * util/grub-emu.c: Include sys/types.h and unistd.h.
13790         (options): Added --hold.
13791         (struct arguments): Added a new member "hold".
13792         (parse_opt): If KEY is 'H', set ARGS->HOLD to ARG or -1 if ARG is
13793         missing.
13794         (main): Initialize ARGS.HOLD to zero. Wait until ARGS.HOLD is
13795         cleared by a debugger, if it is not zero.
13797         * include/grub/normal.h (grub_command_execute): Add an argument
13798         INTERACTIVE.
13800 2005-08-14  Vesa Jaaskelainen  <chaac@nic.fi>
13802         * DISTLIST: Added include/grub/i386/pc/vbe.h.
13804 2005-08-13  Yoshinori K. Okuji  <okuji@enbug.org>
13806         * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Replace the test
13807         program with another one, because the old one didn't detect a bug
13808         in gcc-3.4. Always use regparm 2, because the new test is still
13809         not enough for gcc-4.0. Someone must investigate a simple test
13810         case which detects a bug in gcc-4.0.
13812 2005-08-12  Yoshinori K. Okuji  <okuji@enbug.org>
13814         * DISTLIST: Added normal/completion.c.
13816         * normal/completion.c: New file.
13818         * term/i386/pc/console.c (grub_console_getwh): New function.
13819         (grub_console_term): Assign grub_console_getwh to getwh.
13821         * normal/cmdline.c (grub_tab_complete): Removed. Now the same
13822         function is defined in normal/completion.c as
13823         grub_normal_do_completion.
13824         (grub_cmdline_get): Use grub_normal_do_completion instead of
13825         grub_tab_complete.
13827         * kern/partition.c (grub_partition_map_iterate): Return 1 if HOOK
13828         returns non-zero, otherwise return 0.
13829         (grub_partition_iterate): First, probe the partition map. Then,
13830         call ITERATE only for this partition map.
13832         * kern/misc.c (grub_strncmp): Rewritten.
13834         * kern/disk.c (grub_disk_dev_iterate): Return 1 if P->ITERATE
13835         returns non-zero. Otherwise return 0.
13837         * include/grub/partition.h (grub_partition_map_iterate): Return
13838         int instead of void.
13840         * include/grub/normal.h (grub_normal_do_completion): New prototype.
13842         * include/grub/misc.h (grub_strncmp): Change the type of N to
13843         grub_size_t.
13845         * include/grub/disk.h (grub_disk_dev_iterate): Return int instead
13846         of void.
13848         * normal/menu.c (draw_border): Cast GRUB_TERM_BORDER_WIDTH to
13849         unsigned explicitly before comparing it with I.
13851         * kern/main.c (grub_env_write_root): Add the attribute unused into
13852         VAR.
13854         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
13855         normal/completion.c.
13856         (normal_mod_SOURCES): Likewise.
13857         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
13858         (normal_mod_SOURCES): Likewise.
13860         * normal/command.c (grub_iterate_commands): If ITERATE returns
13861         non-zero, return one immediately.
13863 2005-08-09  Vesa Jaaskelainen  <chaac@nic.fi>
13865         * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vbe.h.
13866         * kern/i386/pc/startup.S: Updated Global Descriptor table's
13867         descriptions.
13868         (grub_vbe_get_controller_info): New function.
13869         (grub_vbe_get_mode_info): Likewise.
13870         (grub_vbe_set_mode): Likewise.
13871         (grub_vbe_get_mode): Likewise.
13872         (grub_vbe_set_memory_window): Likewise.
13873         (grub_vbe_get_memory_window): Likewise.
13874         (grub_vbe_set_scanline_length): Likewise.
13875         (grub_vbe_get_scanline_length): Likewise.
13876         (grub_vbe_set_display_start): Likewise.
13877         (grub_vbe_get_display_start): Likewise.
13878         (grub_vbe_set_palette_data): Likewise.
13879         * include/grub/i386/pc/vbe.h: New file.
13881 2005-08-08  Hollis Blanchard  <hollis@penguinppc.org>
13883         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
13884         kern/ieee1275/of.c with kern/ieee1275/ieee1275.c.
13885         * DISTLIST: Likewise.
13886         * kern/ieee1275/of.c: Moved to ...
13887         * kern/ieee1275/ieee1275.c: ... here.
13889 2005-08-08  Hollis Blanchard  <hollis@penguinppc.org>
13891         * term/ieee1275/ofconsole.c: Include <grub/mm.h>.
13892         (grub_ofconsole_getwh): Cast -1 to type grub_ieee1275_ihandle_t.
13893         Pass 0 as `end' parameter to grub_strtoul().
13895 2005-08-08  Hollis Blanchard  <hollis@penguinppc.org>
13897         * include/grub/powerpc/ieee1275/console.h: Do not include
13898         <grub/types.h>.  Do not include <grub/symbol.h>.  Remove ASM_FILE
13899         ifdef.
13900         (grub_console_cur_color): Remove i386-specific prototype.
13901         (grub_console_real_putchar): Likewise.
13902         (grub_console_checkkey): Likewise.
13903         (grub_console_getkey): Likewise.
13904         (grub_console_getxy): Likewise.
13905         (grub_console_gotoxy): Likewise.
13906         (grub_console_cls): Likewise.
13907         (grub_console_setcursor): Likewise.
13908         * kern/powerpc/ieee1275/init.c: Don't include <grub/console.h>.
13909         Include <grub/machine/console.h>.
13910         * term/ieee1275/ofconsole.c: Likewise.
13912 2005-08-08  Yoshinori K. Okuji  <okuji@enbug.org>
13914         * Makefile.in (LIBLZO): New variable.
13916         * configure.ac: Check for LZO version 2.
13918         * util/i386/pc/grub-mkimage.c [HAVE_LZO_LZO1X_H]: Include
13919         lzo/lzo1x.h instead of lzo1x.h.
13921         * conf/i386-pc.rmk (grub_mkimage_LDFLAGS): Use $(LIBLZO) instead
13922         of -llzo.
13924         * util/i386/pc/grub-setup.c (main): Do not free PREFIX
13925         twice. Reported by Vladimir Serbinenko <phcoder@gmail.com>.
13927         * partmap/pc.c (pc_partition_map_probe): Restore P->DATA after
13928         copying the data from PARTITION to P.
13930 2005-08-07  Yoshinori K. Okuji  <okuji@enbug.org>
13932         * kern/rescue.c (grub_rescue_cmd_rmmod): If the reference count is
13933         negative, unload the module.
13935         * util/i386/pc/grub-setup.c (setup): The name of the PC partition
13936         map is "pc_partition_map" but not "pc".
13937         (usage): Fix the description. The options are --boot-image and
13938         --core-image but not --boot-file or --core-file.
13939         (main): If not specified explicitly, make BOOT_FILE and CORE_FILE
13940         based on DEFAULT_BOOT_FILE and DEFAULT_CORE_FILE with DIR or
13941         DEFAULT_DIRECTORY.
13943         * util/i386/pc/grub-install.in: Do not specify --boot-file or
13944         --core-file. Specify INSTALL_DEVICE as an argument.
13946         * util/console.c: Include config.h.
13947         [HAVE_NCURSeS_CURSES_H]: Include ncurses/curses.h.
13948         [HAVE_NCURSES_H]: Include ncurses.h.
13949         [HAVE_CURSES_H]: Include curses.h.
13950         [!A_NORMAL] (A_NORMAL): Defined as zero.
13951         [!A_STANDOUT] (A_STANDOUT): Likewise.
13953         * conf/i386-pc.rmk (grub_emu_LDFLAGS): Use $(LIBCURSES) instead of
13954         -lncurses.
13955         * conf/powerpc-ieee1275.rmk (grub_emu_LDFLAGS): Likewise.
13957         * configure.ac: Check for curses libraries and headers.
13959         * Makefile.in (LIBCURSES): New variable.
13961         * genmk.rb (Script::rule): Set the executable bits.
13963         * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): The
13964         name of the PC partition map is "pc_partition_map" but not "pc".
13966 2005-08-07  Yoshinori K. Okuji  <okuji@enbug.org>
13968         * util/i386/pc/grub-install.in (grub_probefs): New variable.
13969         (modules): Likewise.
13970         (usage): Added descriptions for --modules and --grub-probefs.
13971         Handle --modules and --grub-probefs. Save the arguments in MODULES
13972         and GRUB_PROBEFS, respectively.
13973         Auto-detect a filesystem module against GRUBDIR. If the result is
13974         empty and modules are not specified explicitly, abort the
13975         installation. Add the result to MODULES.
13977         * DISTLIST: Removed boot/powerpc/ieee1275/ieee1275.c,
13978         disk/powerpc/ieee1275/ofdisk.c,
13979         include/grub/powerpc/ieee1275/init.h and
13980         term/powerpc/ieee1275/ofconsole.c.
13981         Added disk/ieee1275/ofdisk.c, kern/ieee1275/of.c and
13982         term/ieee1275/ofconsole.c.
13984         * include/grub/powerpc/ieee1275/console.h: Resurrected.
13986         * COPYING: Upgraded to the latest version. Only the address of the
13987         FSF office has changed.
13989 2005-08-07  Yoshinori K. Okuji  <okuji@enbug.org>
13991         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
13992         kern/ieee1275.c with kern/ieee1275/of.c.
13994         * kern/ieee1275.c: Moved to ...
13995         * kern/ieee1275/of.c: ... here.
13997 2005-08-06  Yoshinori K. Okuji  <okuji@enbug.org>
13999         * conf/i386-pc.rmk (kernel_img_HEADERS): Reordered for
14000         readability.
14002         * config.guess: Updated to the latest version from gnulib.
14003         * config.sub: Likewise.
14004         * install.sh: Likewise.
14005         * mkinstalldirs: Likewise.
14007         * include/grub/console.h: Removed. This file is arch-specific. Do
14008         not put this in include/grub.
14010         * include/grub/i386/pc/console.h: Resurrected.
14012         * util/console.c: Include grub/machine/console.h instead of
14013         grub/console.h.
14014         * util/grub-emu.c: Likewise.
14016 2005-08-04  Marco Gerards  <metgerards@student.han.nl>
14018         * kern/term.c (grub_putcode): Use `grub_getwh' instead of
14019         hardcoded value.
14021         From Vincent Pelletier  <subdino2004@yahoo.fr>
14022         * include/grub/term.h (GRUB_TERM_WIDTH, GRUB_TERM_HEIGHT):
14023         Redefined to use grub_getwh.
14024         (grub_term): New member named getwh.
14025         (grub_getwh): New prototype.
14026         * kern/term.c (grub_getwh): New function.
14027         * term/i386/pc/console.c (grub_console_getwh): New function.
14028         (grub_console_term): New member `getwh'.
14029         * term/i386/pc/vga.c (grub_vga_getwh): New function.
14030         (grub_vga_term): New member `getwh'.
14031         * term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Use
14032         grub_ssize_t.
14033         (grub_ofconsole_getw): New function.
14034         (grub_ofconsole_init): Use grub_ssize_t and unsigned char.
14035         (grub_ofconsole_term): New field named getwh and new initial
14036         value.
14038 2005-08-03  Hollis Blanchard  <hollis@penguinppc.org>
14040         * include/grub/powerpc/ieee1275/ieee1275.h: Move ...
14041         * include/grub/ieee1275/ieee1275.h: ... to here.  All users updated.
14042         Move `abort', `grub_reboot', and `grub_halt' prototypes ...
14043         * include/grub/powerpc/ieee1275/kernel.h: ... to here.
14044         * commands/ieee1275/halt.c: Include <grub/machine/kernel.h> instead
14045         of <grub/machine/ieee1275.h>.
14046         * commands/ieee1275/reboot.c: Likewise.
14047         * boot/powerpc/ieee1275/ieee1275.c: Move ...
14048         * kern/ieee1275.c: ... to here.  All users updated.  Change all
14049         parameter structs to use new type `grub_ieee1275_cell_t'.
14050         * term/powerpc/ieee1275/ofconsole.c: Move ...
14051         * term/ieee1275/ofconsole.c: ... to here.  All users updated.
14052         * disk/powerpc/ieee1275/ofdisk.c: Move ...
14053         * disk/ieee1275/ofdisk.c: ... to here.  All users updated.
14054         * boot/powerpc/ieee1275/cmain.c: Change `grub_ieee1275_entry_fn' type
14055         to return int.
14056         * include/grub/i386/pc/console.h: Move to include/grub/console.h.
14057         Remove unused prototypes.  All users updated.
14058         * include/grub/powerpc/ieee1275/console.h: Removed.
14059         * include/grub/powerpc/ieee1275/ieee1275.h: Define
14060         `grub_ieee1275_cell_t'.
14061         * kern/powerpc/ieee1275/openfw.c: Include <grub/machine/kernel.h>.
14062         Cast comparisons with -1 to the correct type.
14063         * loader/powerpc/ieee1275/linux.c (kernel_entry_t): Change parameter
14064         type to match `grub_ieee1275_entry_fn'.
14066 2005-08-01  Yoshinori K. Okuji  <okuji@enbug.org>
14068         * DISTLIST: Added util/i386/pc/grub-probefs.c.
14070         * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-probefs.
14071         (grub_setup_SOURCES): Removed partmap/amiga.c, partmap/apple.c and
14072         partmap/sun.c.
14073         (grub_probefs_SOURCES): New variable.
14075         * util/i386/pc/grub-probefs.c: New file.
14077         * util/i386/pc/grub-setup.c (main): Call
14078         grub_pc_partition_map_init, grub_ufs_init, grub_minix_init,
14079         grub_hfs_init and grub_jfs_init to initialize the system. Call
14080         grub_ufs_fini, grub_minix_fini, grub_hfs_fini, grub_jfs_init and
14081         grub_pc_partition_map_fini to finish the system.
14083 2005-07-31  Yoshinori K. Okuji  <okuji@enbug.org>
14085         * loader/i386/pc/multiboot.c (grub_multiboot_is_elf32): New
14086         function.
14087         (grub_multiboot_load_elf32): Likewise.
14088         (grub_multiboot_is_elf64): Likewise.
14089         (grub_multiboot_load_elf64): Likewise.
14090         (grub_multiboot_load_elf): Likewise.
14091         (grub_rescue_cmd_multiboot): Call grub_multiboot_load_elf to load
14092         an ELF32 or ELF64 file.
14093         This is based on a patch from Ruslan Nikolaev <nruslan@mail.com>.
14095         From Serbinenko Vladimir <serbinenko.vova@list.ru>:
14096         * kern/disk.c (grub_print_partinfo): Check if FS->LABEL is not
14097         NULL before calling FS->LABEL.
14098         * fs/fat.c (grub_fat_dir): Initialize DIRNAME to NULL.
14099         * commands/ls.c (grub_ls_list_files): Show labels, if possible.
14100         (grub_ls_list_disks): Check if FS and FS->LABEL are not NULL
14101         before calling FS->LABEL.
14103 2005-07-26  Yoshinori K. Okuji  <okuji@enbug.org>
14105         * util/i386/pc/grub-install.in (datadir): New variable.
14106         (libdir): Removed.
14107         (pkgdatadir): New variable.
14108         (pkglibdir): Removed.
14110 2005-07-24  Yoshinori K. Okuji  <okuji@enbug.org>
14112         * DISTLIST: Added util/i386/pc/grub-install.in.
14114         * util/i386/pc/grub-install.in: New file.
14116         * conf/i386-pc.rmk (sbin_SCRIPTS): New variable.
14117         (grub_install_SOURCES): Likewise.
14119         * genmk.rb: Added support for scripts.
14120         (Script): New class.
14121         (scripts): New variable.
14123         * Makefile.in (install-local): Install sbin_SCRIPTS by
14124         INSTALL_SCRIPT.
14125         (uninstall): Remove sbin_SCRIPTS.
14127         * util/i386/pc/grub-setup.c (main): If the argument is not a GRUB
14128         device, try to get a GRUB device by
14129         grub_util_biosdisk_get_grub_dev.
14130         Free DEST_DEV.
14132         * util/i386/pc/grub-mkdevicemap.c (usage): Remove a duplicated
14133         description for --device-map.
14135 2005-07-20  Yoshinori K. Okuji  <okuji@enbug.org>
14137         Change the semantics of variable hooks. They now return strings
14138         instead of error values.
14140         * util/i386/pc/grub-setup.c: Include grub/env.h.
14141         (setup): Use grub_device_set_root instead of grub_env_set.
14143         * kern/rescue.c (grub_rescue_cmd_root): Use grub_env_set and
14144         grub_env_get instead of grub_device_set_root and
14145         grub_device_get_root, respectively.
14147         * kern/main.c (grub_env_write_root): New function.
14148         (grub_set_root_dev): Register grub_env_write_hook for "root". Use
14149         grub_env_set instead of grub_device_set_root.
14151         * kern/env.c (HASHSZ): Reduced to 13, because GRUB does not need
14152         many variables.
14153         (grub_env_set): Set ENV->VALUE to the result of ENV->WRITE_HOOK
14154         rather than calling ENV->WRITE_HOOK afterwards.
14155         (grub_env_get): Return the result of ENV->READ_HOOK rather than
14156         passing a pointer of a pointer.
14157         (grub_register_variable_hook): Change the types of "read_hook" and
14158         "write_hook" to grub_env_read_hook_t and grub_env_write_hook_t,
14159         respectively.
14160         Allocate the default empty string on the heap, because this string
14161         may be freed later.
14163         * kern/device.c: Include grub/env.h.
14164         (grub_device_set_root): Removed.
14165         (grub_device_get_root): Likewise.
14166         (grub_device_open): Use grub_env_get instead of
14167         grub_device_get_root.
14169         * include/grub/env.h (grub_env_read_hook_t): New type.
14170         (grub_env_write_hook_t): Likewise.
14171         (grub_env_var): Change the types of "read_hook" and "write_hook"
14172         to grub_env_read_hook_t and grub_env_write_hook_t, respectively.
14173         (grub_register_variable_hook): Likewise.
14175         * include/grub/device.h (grub_device_set_root): Removed.
14176         (grub_device_set_root): Likewise.
14178         * fs/fat.c (grub_fat_dir): Make a copy of PATH in DIRNAME, and
14179         make sure that DIRNAME terminates with '/', so that
14180         grub_fat_find_dir will fail if PATH is not a directory.
14182         * commands/ls.c (grub_ls_list_files): Remove the qualifier const
14183         from DIRNAME.
14184         Use the qualifier auto for print_files and print_files_long.
14185         If FS->DIR sets GRUB_ERRNO to GRUB_ERR_BAD_FILE_TYPE, try DIRNAME
14186         as a regular file.
14187         Put a newline only if there is no error.
14188         (grub_cmd_ls): Remove grub_ls_print_files, because this is not
14189         used.
14191 2005-07-20  Yoshinori K. Okuji  <okuji@enbug.org>
14193         * kern/partition.c (grub_partition_probe): Initialize PART to
14194         NULL. Otherwise, when no partition map is registered, this returns
14195         a garbage.
14197 2005-07-19  Yoshinori K. Okuji  <okuji@enbug.org>
14199         * partmap/apple.c (apple_partition_map_iterate): Check if POS
14200         equals GRUB_DISK_SECTOR_SIZE to see if the partition table is
14201         valid.
14203 2005-07-18  Yoshinori K. Okuji  <okuji@enbug.org>
14205         * commands/ls.c (grub_ls_list_disks): Print the filesystem
14206         information on each device, if it does not have partitions. Print
14207         "Device" instead of "Disk", because this function is not specific
14208         to disk devices.
14210         * normal/main.c (grub_rescue_cmd_normal): Make the variable CONFIG
14211         static to ensure that it is put on the memory rather than a
14212         register.
14214 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
14216         * commands/cat.c (GRUB_MOD_INIT): Use better documentation.
14217         (grub_cat_init): Likewise.
14218         * loader/i386/pc/chainloader_normal.c (GRUB_MOD_INIT): Likewise.
14219         (options): Likewise.
14220         * commands/configfile.c (GRUB_MOD_INIT): Likewise.
14221         (grub_configfile_init): Likewise.
14222         * font/manager.c (GRUB_MOD_INIT): Likewise.
14223         * commands/help.c (GRUB_MOD_INIT): Likewise.
14224         (grub_help_init): Likewise.
14225         * normal/command.c (grub_command_init): Likewise.
14226         * loader/i386/pc/linux_normal.c (GRUB_MOD_INIT): Likewise.
14227         * disk/loopback.c (grub_loop_init): Likewise.
14228         (GRUB_MOD_INIT): Likewise.
14229         * commands/ls.c (grub_ls_init): Likewise.
14230         (GRUB_MOD_INIT): Likewise.
14231         (options): Likewise.
14232         * commands/boot.c (grub_boot_init): Likewise.
14233         (GRUB_MOD_INIT): Likewise.
14234         * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Likewise.
14235         * commands/i386/pc/reboot.c (grub_reboot_init): Likewise.
14236         (GRUB_MOD_INIT): Likewise.
14237         * commands/cmp.c (grub_cmp_init): Likewise.
14238         (GRUB_MOD_INIT): Likewise.
14240         * normal/arg.c: Use <> instead of "" to include header files.
14241         (SHORT_ARG_HELP): New macro.
14242         (SHORT_ARG_USAGE): Likewise.
14243         (help_options): Specify SHORT_ARG_HELP and SHORT_ARG_USAGE instead
14244         of 'h' and 'u' for help and usage, respectively. Use more GNU-like
14245         descriptions.
14246         (find_short): Check if C is 'h' or 'u' explicitly.
14247         (grub_arg_show_help): Use space characters instead of tabs. Treat
14248         SHORT_ARG_HELP and SHORT_ARG_USAGE exceptionally so that -h and -u
14249         are shown with --help and --usage only if they are not used for
14250         the command itself.
14251         (parse_option): Use SHORT_ARG_HELP and SHORT_ARG_USAGE instead of
14252         'h' and 'u'.
14254         * include/grub/arg.h (struct grub_arg_option): Add the qualifier
14255         const into "longarg". Change the type of "shortarg" to int.
14257 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
14259         * boot/i386/pc/boot.S (boot_drive_check): New label.
14261         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRIVE_CHECK): New
14262         macro.
14264         * util/i386/pc/grub-setup.c (setup): Added a workaround for BIOSes
14265         which do not pass a boot drive correctly. Copied from GRUB Legacy.
14267 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
14269         * kern/i386/pc/startup.S (gate_a20_try_system_control_port_a):
14270         When turning off Gate A20, skip the check and return immediately,
14271         because this is not fatal usually.
14273 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
14275         * conf/i386-pc.rmk (pxeboot_img_LDFLAGS): The text address should
14276         be 0x7C00 instead of 0x8000.
14278         * boot/i386/pc/pxeboot.S: Rewritten.
14280         * kern/i386/pc/startup.S (gate_a20_try_bios): No need to specify
14281         EXT_C.
14282         (gate_a20_check_state): Read a byte from 0x108000. Invert the
14283         result.
14285 2005-07-16  Yoshinori K. Okuji  <okuji@enbug.org>
14287         * kern/i386/pc/startup.S (grub_gate_a20): Rewritten for
14288         robustness. This routine now supports a BIOS call and System
14289         Control Port A to modify the gate A20.
14291         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
14292         Increased to 0x440.
14294 2005-07-12  Hollis Blanchard  <hollis@penguinppc.org>
14296         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): dprintf the
14297         device path and resulting ihandle.
14298         (grub_ofdisk_close): dprintf the ihandle being closed.
14299         (grub_ofdisk_read): dprintf function parameters.
14300         * kern/mm.c (grub_mm_init_region): Likewise.
14301         * loader/powerpc/ieee1275/linux.c: Remove extra whitespace.
14302         (grub_linux_boot): dprintf the Linux entry point, initrd address and
14303         size, and boot arguments.
14304         (grub_rescue_cmd_linux): dprintf each ELF segment's address and size
14305         before loading into memory.
14306         (grub_rescue_cmd_initrd): dprintf the initrd's address and size
14307         before loading into memory.
14309 2005-07-12  Yoshinori K. Okuji  <okuji@enbug.org>
14311         * kern/mm.c: Added much documentation.
14312         (GRUB_MM_ALIGN_LOG2): When GRUB_CPU_SIZEOF_VOID_P is
14313         8, set to 5 instead of 8.
14315 2005-07-10  Yoshinori Okuji  <okuji@enbug.org>
14317         * DISTLIST: Added util/i386/pc/grub-mkimage.c.
14319         * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-mkdevicemap.
14320         (grub_mkdevicemap_SOURCES): New variable.
14322         * util/i386/pc/grub-mkdevicemap.c: New file. Mostly copied from
14323         lib/device.c of GRUB Legacy.
14325 2005-07-10  Yoshinori Okuji  <okuji@enbug.org>
14327         * commands/ls.c (grub_ls_list_files): Check if *PATH is NUL
14328         instead of PATH is NULL.
14330 2005-07-09  Vincent Pelletier  <subdino2004@yahoo.fr>
14332         * commands/cmp.c (BUFFER_SIZE): New macro.
14333         (grub_cmd_cmp): Close the right file at the right time.  Compare
14334         only data just read.  Don't report files of different  size as
14335         identical.  Dynamically allocate buffers.  Move variable
14336         declarations at the beginning of function.
14338 2005-07-09  Yoshinori Okuji  <okuji@enbug.org>
14340         * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): The return value was
14341         reverse.
14343 2004-07-04  Vincent Pelletier  <subdino2004@yahoo.fr>
14345         * normal/cmdline.c (grub_cmdline_get): Don't fallback on ctrl-d
14346         when backspace is pressed at beginning of line.
14348 2005-07-03  Yoshinori Okuji  <okuji@enbug.org>
14350         * DISTLIST: Added genfslist.sh.
14352         * normal/main.c (fs_module_list): New variable.
14353         (autoload_fs_module): New function.
14354         (read_fs_list): Likewise.
14355         (grub_normal_execute): Call read_fs_list.
14357         * kern/fs.c (grub_fs_autoload_hook): New variable.
14358         (grub_fs_probe): Added support for auto-loading.
14360         * include/grub/normal.h (struct grub_fs_module_list): New struct.
14361         (grub_fs_module_list_t): New type.
14363         * include/grub/fs.h (grub_fs_autoload_hook_t): New type.
14364         (grub_fs_autoload_hook): New prototype.
14366         * genfslist.sh: New file.
14368         * genmk.rb: Added a rule to generate a filesystem list.
14370 2005-06-30  Marco Gerards  <metgerards@student.han.nl>
14372         * configure.ac: Fix the test for cross-compiling.
14374         * genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'.  Don't
14375         define GRUB_UTIL anymore.
14377         * util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes
14378         so this function works on other systems than just big endian.
14379         (load_modules): Likewise.
14380         (add_segments): Likewise.
14382 2005-06-23  Hollis Blanchard  <hollis@penguinppc.org>
14384         * kern/misc.c (grub_vsprintf): Add `longfmt'.  If format string
14385         contains `l' modifier, get a long from va_arg().
14387 2005-06-23  Yoshinori K. Okuji  <okuji@enbug.org>
14389         * kern/mm.c (grub_free): If the next free block which is being
14390         merged is the first free block, set the first block to the block
14391         being freed.
14392         Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.
14394 2005-05-08  Hollis Blanchard  <hollis@penguinppc.org>
14396         * boot/powerpc/ieee1275/cmain.c (cmain): Initialize
14397         `grub_ieee1275_chosen'.
14399 2005-05-08  Hollis Blanchard  <hollis@penguinppc.org>
14401         * boot/powerpc/ieee1275/cmain.c (module_info): Remove definition.
14402         (grub_ieee1275_chosen): New variable.
14403         (cmain): Initialize and use `grub_ieee1275_chosen' instead of
14404         `chosen'.
14405         * boot/powerpc/ieee1275/crt0.S (init_stack): Remove stack space.
14406         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
14407         Rename first argument to `phandle' for consistency.
14408         (grub_ieee1275_get_property_length): Likewise.
14409         (grub_ieee1275_next_property): Likewise.  Change type of first argument
14410         to grub_ieee1275_phandle_t.
14411         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn):
14412         Move export next to declaration.
14413         (grub_ieee1275_chosen): New variable.
14414         * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MODULE_BASE):
14415         Correct cosmetic typo.
14416         * kern/powerpc/ieee1275/init.c (grub_set_prefix): Use
14417         `grub_ieee1275_chosen'.
14418         * kern/powerpc/ieee1275/openfw.c (grub_map): Likewise.
14419         * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Likewise.
14420         (grub_rescue_cmd_linux): Set `initrd_addr' to 0.
14421         * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_refresh): Use
14422         `grub_ieee1275_chosen'.
14424 2005-05-10  Hollis Blanchard  <hollis@penguinppc.org>
14426         * boot/powerpc/ieee1275/cmain.c (cmain): Remove code to parse
14427         /chosen/bootargs.
14428         * kern/powerpc/ieee1275/init.c (grub_machine_init): Parse
14429         /chosen/bootargs as "variable=value" pairs.
14431 2005-05-08  Vincent Pelletier  <subdino2004@yahoo.fr>
14433         * include/grub/misc.h (grub_dprintf): New macro.
14434         (grub_real_dprintf): New prototype.
14435         (grub_strword): Likewise.
14436         (grub_iswordseparator): Likewise.
14437         * kern/misc.c (grub_real_dprintf): New function.
14438         (grub_strword): Likewise.
14439         (grub_iswordseparator): Likewise.
14441 2005-04-30  Hollis Blanchard  <hollis@penguinppc.org>
14443         * boot/powerpc/ieee1275/cmain.c: Don't include grub/machine/init.h.
14444         (roundup): Remove macro.
14445         (grub_ieee1275_flags): Make static.
14446         (grub_ieee1275_realmode): Remove.
14447         (grub_ieee1275_test_flag): New function.
14448         (grub_ieee1275_set_flag): Likewise.
14449         (find_options): Rename to `grub_ieee1275_find_options'; update
14450         callers. Set GRUB_IEEE1275_FLAG_REAL_MODE and
14451         GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS.
14452         (cmain): New prototype.
14453         (cmain): Use `grub_ieee1275_set_flag' instead of accessing
14454         `grub_ieee1275_flags' directly.
14455         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Remove
14456         machine/biosdisk.h.
14457         * disk/powerpc/ieee1275/ofdisk.c: Include grub/machine/ofdisk.h.
14458         Don't include grub/machine/init.h.
14459         (grub_ofdisk_open): Call `grub_ieee1275_test_flag'.
14460         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
14461         Remove prototype.
14462         (grub_ieee1275_realmode): Likewise.
14463         (grub_ieee1275_flag): New enum.
14464         (grub_ieee1275_test_flag): New prototype.
14465         (grub_ieee1275_set_flag): New prototype.
14466         * include/grub/powerpc/ieee1275/init.h: Remove file.
14467         * include/grub/powerpc/ieee1275/ofdisk.h: New file.
14468         * kern/powerpc/ieee1275/init.c: Don't include grub/machine/init.h.
14469         Include grub/machine/console.h.  Include grub/machine/ofdisk.h.
14470         (grub_machine_fini): Don't call `grub_ieee1275_release'.  Remove
14471         comment.
14472         * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Call
14473         `grub_ieee1275_test_flag'.
14474         (grub_ieee1275_encode_devname): Likewise.
14476 2005-04-21  Hollis Blanchard  <hollis@penguinppc.org>
14478         * include/grub/powerpc/ieee1275/ieee1275.h
14479         (grub_ieee1275_encode_devname): New prototype.
14480         (grub_ieee1275_get_filename): Likewise.
14481         * kern/powerpc/ieee1275/init.c (grub_translate_ieee175_path): New
14482         function.
14483         (grub_set_prefix): Likewise.
14484         (grub_machine_init): Call grub_set_prefix.
14485         * kern/powerpc/ieee1275/openfw.c: Fix typos.
14486         (grub_parse_type): New enum.
14487         (grub_ieee1275_get_devargs): New function.
14488         (grub_ieee1275_get_devname): Likewise.
14489         (grub_ieee1275_parse_args): Likewise.
14490         (grub_ieee1275_get_filename): Likewise.
14491         (grub_ieee1275_encode_devname): Likewise.
14493 2005-03-30  Marco Gerards  <metgerards@student.han.nl>
14495         * kern/powerpc/ieee1275/init.c (grub_machine_fini): Don't call
14496         `grub_loader_unset'.
14498 2005-03-26  Hollis Blanchard  <hollis@penguinppc.org>
14500         * commands/ieee1275/halt.c (grub_cmd_halt): Call grub_halt
14501         instead of grub_ieee1275_interpret.
14502         (grub_halt_init): New function.
14503         (grub_halt_fini): Likewise.
14504         (GRUB_MOD_INIT): Correct message grammar.
14505         * commands/ieee1275/reboot.c (grub_cmd_reboot): Call grub_reboot
14506         instead of grub_ieee1275_interpret.
14507         (grub_reboot_init): New function.
14508         (grub_reboot_fini): Likewise.
14509         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace
14510         commands/i386/pc/halt.c, commands/i386/pc/reboot.c, and
14511         util/i386/pc/misc.c with commands/ieee1275/halt.c,
14512         commands/ieee1275/reboot.c, and util/powerpc/ieee1275/misc.c.
14513         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_fini): New
14514         function.
14515         * include/grub/powerpc/ieee1275/console.h (grub_console_fini):
14516         Add prototype.
14517         * include/grub/powerpc/ieee1275/ieee1275.h (grub_reboot): Add
14518         prototype.
14519         (grub_halt): Likewise.
14520         * include/grub/powerpc/ieee1275/init.h: Remove inaccurate comment.
14521         (cmain): Remove __attribute__((unused)).
14522         * kern/powerpc/ieee1275/init.c (grub_heap_start): New variable.
14523         (grub_heap_len): Likewise.
14524         (grub_machine_fini): New function.
14525         * kern/powerpc/ieee1275/openfw.c (grub_reboot): New function.
14526         (grub_halt): Likewise.
14527         * term/powerpc/ieee1275/ofconsole.c (grub_console_fini): New
14528         function.
14529         * util/powerpc/ieee1275/misc.c: New file.
14531 2005-03-19  Yoshinori K. Okuji  <okuji@enbug.org>
14533         * DISTLIST: New file.
14534         * gendistlist.sh: Likewise.
14536         * Makefile.in (COMMON_DISTFILES): Removed.
14537         (BOOT_DISTFILES): Likewise.
14538         (CONF_DISTFILES): Likewise.
14539         (DISK_DISTFILES): Likewise.
14540         (FS_DISTFILES): Likewise.
14541         (INCLUDE_DISTFILES): Likewise.
14542         (KERN_DISTFILES): Likewise.
14543         (LOADER_DISTFILES): Likewise.
14544         (TERM_DISTFILES): Likewise.
14545         (UTIL_DISTFILES): Likewise.
14546         (DISTFILES): Likewise.
14547         (uninstall): Uninstall files in $(pkgdata_DATA).
14548         (DISTLIST): New target.
14549         (distdir): Use the contents of the file DISTLIST to get a list of
14550         distributed files.
14552 2005-03-18  Yoshinori K. Okuji  <okuji@enbug.org>
14554         * fs/fat.c (grub_fat_mount): Ignore the 3rd bit of a media
14555         descriptor. This is ported from GRUB Legacy.
14557         * gencmdlist.sh: Added an extra semicolon to make it work with
14558         old sed versions. Reported by Robert Bihlmeyer
14559         <robbe@orcus.priv.at>.
14561 2005-03-08  Yoshinori Okuji  <okuji@enbug.org>
14563         Automatic loading of commands is supported.
14565         * normal/main.c (read_command_list): New function.
14566         (grub_normal_execute): Call read_command_list.
14568         * normal/command.c (grub_register_command): Return zero or CMD.
14569         Allocate CMD->NAME from the heap.
14570         Initialize CMD->MODULE_NAME to zero.
14571         Find the same name as well. If the same command is found and it is
14572         a dummy command, overwrite members. If it is not a dummy command,
14573         return zero.
14574         (grub_unregister_command): Free Q->NAME and Q->MODULE_NAME.
14575         (grub_command_find): If a dummy command is found, load a module
14576         and retry to find a command only once.
14578         * normal/cmdline.c (grub_tab_complete): Call grub_command_find to
14579         make sure that each command is loaded.
14581         * include/grub/normal.h (GRUB_COMMAND_FLAG_NOT_LOADED): New
14582         macro.
14583         (struct grub_command): Remove const from the member `name'.
14584         Add a new member `module_name'.
14585         (grub_register_command): Return grub_command_t.
14587         * commands/help.c (grub_cmd_help): Call grub_command_find to make
14588         sure that each command is loaded.
14590         * genmk.rb (PModule::rule): Specify a module name without the
14591         suffix ".mod" to gencmdlist.sh.
14593 2005-03-02  Yoshinori K. Okuji  <okuji@enbug.org>
14595         * gencmdlist.sh: New file.
14597         * genmk.rb (PModule::rule): Generate a rule for a command list.
14598         Clean command.lst.
14599         Generate command.lst from $(COMMANDFILES).
14601         * Makefile.in (COMMON_DISTFILES): Added gencmdlist.sh.
14602         (DATA): Added $(pkgdata_DATA).
14603         (install-local): Install files in $(pkgdata_DATA).
14605 2005-03-02  Yoshinori K. Okuji  <okuji@enbug.org>
14607         * term/i386/pc/vga.c (debug_command): Removed.
14608         (GRUB_MOD_INIT): Do not register the command "debug".
14610         From Hollis Blanchard:
14611         * commands/configfile.c: New file.
14612         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
14613         commands/configfile.c.
14614         (pkgdata_MODULES): Added configfile.mod.
14615         (configfile_mod_SOURCES): New variable.
14616         (configfile_mod_CFLAGS): Likewise.
14617         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
14618         commands/configfile.c.
14619         (pkgdata_MODULES): Added configfile.mod.
14620         (configfile_mod_SOURCES): New variable.
14621         (configfile_mod_CFLAGS): Likewise.
14622         * util/grub-emu.c (main): Call grub_configfile_init and
14623         grub_configfile_fini.
14624         * include/grub/normal.h [GRUB_UTIL] (grub_configfile_init): New
14625         prototype.
14626         [GRUB_UTIL] (grub_configfile_fini): Likewise.
14628 2005-02-27  Yoshinori K. Okuji  <okuji@enbug.org>
14630         * normal/arg.c (grub_arg_show_help): Do not show the bug report
14631         address.
14633         * commands/help.c (grub_cmd_help): Do not print newlines after
14634         the last command in print_command_help.
14636 2005-02-27  Yoshinori K. Okuji  <okuji@enbug.org>
14638         * commands/default.h: New file.
14639         * commands/timeout.h: Likewise.
14640         * normal/context.c: Likewise.
14642         * util/misc.c: Do not include sys/times.h.
14643         Include sys/time.h and grub/machine/time.h.
14644         (grub_get_rtc): Rewritten with gettimeofday.
14646         * util/grub-emu.c (main): Call grub_default_init and
14647         grub_timeout_init before grub_normal_init, and call
14648         grub_timeout_fini and grub_default_fini after grub_main.
14650         * util/console.c (grub_ncurses_checkkey): Return the read
14651         character or -1.
14653         * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it
14654         timeouts.
14656         * normal/main.c (read_config_file): Push MENU. If this fails,
14657         print an error and wait for a user input.
14658         Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE.
14659         If a menu is empty or an error occurs, pop MENU.
14660         (grub_normal_execute): Pop and free MENU after grub_menu_run
14661         returns.
14663         * kern/loader.c (grub_loader_boot): Call grub_machine_fini.
14665         * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not
14666         include time.h.
14667         [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
14668         without GRUB_UTIL.
14669         * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include
14670         time.h.
14671         [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
14672         without GRUB_UTIL.
14674         * include/grub/normal.h (struct grub_menu_list): New struct.
14675         (grub_menu_list_t): New type.
14676         (struct grub_context): New struct.
14677         (grub_context_t): New type.
14678         (grub_register_command): Got rid of EXPORT_FUNC.
14679         (grub_unregister_command): Likewise.
14680         (grub_context_get): New prototype.
14681         (grub_context_get_current_menu): Likewise.
14682         (grub_context_push_menu): Likewise.
14683         (grub_context_pop_menu): Likewise.
14684         [GRUB_UTIL] (grub_default_init): Likewise.
14685         [GRUB_UTIL] (grub_default_fini): Likewise.
14686         [GRUB_UTIL] (grub_timeout_init): Likewise.
14687         [GRUB_UTIL] (grub_timeout_fini): Likewise.
14689         * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c,
14690         commands/timeout.c and normal/context.c.
14691         (pkgdata_MODULES): Added default.mod and timeout.mod.
14692         (normal_mod_SOURCES): Added normal/context.c.
14693         (default_mod_SOURCES): New variable.
14694         (default_mod_CFLAGS): Likewise.
14695         (timeout_mod_SOURCES): Likewise.
14696         (timeout_mod_CFLAGS): Likewise.
14697         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from
14698         conf/i386-pc.rmk.
14699         (pkgdata_MODULES): Added default.mod and timeout.mod.
14700         (normal_mod_SOURCES): Added normal/context.c.
14701         (default_mod_SOURCES): New variable.
14702         (default_mod_CFLAGS): Likewise.
14703         (timeout_mod_SOURCES): Likewise.
14704         (timeout_mod_CFLAGS): Likewise.
14706         * Makefile.in (all-local): Added $(MKFILES).
14708 2005-02-21  Vincent Pelletier  <subdino2004@yahoo.fr>
14710         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `partmap/sun.c'.
14711         (grub_emu_SOURCES): Likewise.
14712         (pkgdata_MODULES): Add `sun.mod'.
14713         (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
14714         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
14715         `partmap/sun.c'.
14716         (pkgdata_MODULES): Add `sun.mod'.
14717         (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
14718         * include/grub/partition.h (grub_sun_partition_map_init): New
14719         prototype.
14720         (grub_sun_partition_map_fini): Likewise.
14721         * partmap/sun.c: New file.
14722         * util/grub-emu.c (main): Initialize and de-initialize the sun
14723         partitionmap support.
14725 2005-02-19  Yoshinori K. Okuji  <okuji@enbug.org>
14727         This implements an Emacs-like menu entry editor.
14729         * normal/menu_entry.c: New file.
14731         * util/console.c (grub_ncurses_putchar): Translate some Unicode
14732         characters to ASCII.
14733         (saved_char): New variable.
14734         (grub_ncurses_checkkey): Rewritten completely.
14735         (grub_ncurses_getkey): Likewise.
14736         (grub_ncurses_init): Call raw instead of cbreak.
14738         * normal/menu.c (print_entry): Do not put a space.
14739         (init_page): Renamed to ...
14740         (grub_menu_init_page): ... this. All callers changed.
14741         (edit_menu_entry): Removed.
14742         (run_menu): Call grub_menu_entry_run instead of edit_menu_entry.
14744         * normal/cmdline.c (grub_cmdline_run): Call grub_setcursor.
14746         * kern/misc.c (grub_vprintf): Call grub_refresh.
14748         * normal/menu.c (DISP_LEFT): Renamed to ...
14749         * include/grub/term.h (GRUB_TERM_DISP_LEFT): ... this.
14750         * normal/menu.c (DISP_UP): Renamed to ...
14751         * include/grub/term.h (GRUB_TERM_DISP_UP): ... this.
14752         * normal/menu.c (DISP_RIGHT): Renamed to ...
14753         * include/grub/term.h (GRUB_TERM_DISP_RIGHT): ... this.
14754         * normal/menu.c (DISP_DOWN): Renamed to ...
14755         * include/grub/term.h (GRUB_TERM_DISP_DOWN): ... this.
14756         * normal/menu.c (DISP_HLINE): Renamed to ...
14757         * include/grub/term.h (GRUB_TERM_DISP_HLINE): ... this.
14758         * normal/menu.c (DISP_VLINE): Renamed to ...
14759         * include/grub/term.h (GRUB_TERM_DISP_VLINE): ... this.
14760         * normal/menu.c (DISP_UL): Renamed to ...
14761         * include/grub/term.h (GRUB_TERM_DISP_UL): ... this.
14762         * normal/menu.c (DISP_UR): Renamed to ...
14763         * include/grub/term.h (GRUB_TERM_DISP_UR): ... this.
14764         * normal/menu.c (DISP_LL): Renamed to ...
14765         * include/grub/term.h (GRUB_TERM_DISP_LL): ... this.
14766         * normal/menu.c (DISP_LR): Renamed to ...
14767         * include/grub/term.h (GRUB_TERM_DISP_LR): ... this.
14768         * normal/menu.c (TERM_WIDTH): Renamed to ...
14769         * include/grub/term.h (GRUB_TERM_WIDTH): ... this.
14770         * normal/menu.c (TERM_HEIGHT): Renamed to ...
14771         * include/grub/term.h (GRUB_TERM_HEIGHT): ... this.
14772         * normal/menu.c (TERM_INFO_HEIGHT): Renamed to ...
14773         * include/grub/term.h (GRUB_TERM_INFO_HEIGHT): ... this.
14774         * normal/menu.c (TERM_MARGIN): Renamed to ...
14775         * include/grub/term.h (GRUB_TERM_MARGIN): ... this.
14776         * normal/menu.c (TERM_SCROLL_WIDTH): Renamed to ...
14777         * include/grub/term.h (GRUB_TERM_SCROLL_WIDTH): ... this.
14778         * normal/menu.c (TERM_TOP_BORDER_Y): Renamed to ...
14779         * include/grub/term.h (GRUB_TERM_TOP_BORDER_Y): ... this.
14780         * normal/menu.c (TERM_LEFT_BORDER_X): Renamed to ...
14781         * include/grub/term.h (GRUB_TERM_LEFT_BORDER_X): ... this.
14782         * normal/menu.c (TERM_BORDER_WIDTH): Renamed to ...
14783         * include/grub/term.h (GRUB_TERM_BORDER_WIDTH): ... this.
14784         * normal/menu.c (TERM_MESSAGE_HEIGHT): Renamed to ...
14785         * include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): ... this.
14786         * normal/menu.c (TERM_BORDER_HEIGHT): Renamed to ...
14787         * include/grub/term.h (GRUB_TERM_BORDER_HEIGHT): ... this.
14788         * normal/menu.c (TERM_NUM_ENTRIES): Renamed to ...
14789         * include/grub/term.h (GRUB_TERM_NUM_ENTRIES): ... this.
14790         * normal/menu.c (TERM_FIRST_ENTRY_Y): Renamed to ...
14791         * include/grub/term.h (GRUB_TERM_FIRST_ENTRY_Y): ... this.
14792         * normal/menu.c (TERM_ENTRY_WIDTH): Renamed to ...
14793         * include/grub/term.h (GRUB_TERM_ENTRY_WIDTH): ... this.
14794         * normal/menu.c (TERM_CURSOR_X): Renamed to ...
14795         * include/grub/term.h (GRUB_TERM_CURSOR_X): ... this.
14796         All callers changed.
14798         * include/grub/normal.h: New prototype.
14800         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
14801         normal/menu_entry.c.
14802         (normal_mod_SOURCES): Likewise.
14803         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
14804         (normal_mod_SOURCES): Likewise.
14806 2005-02-15  Yoshinori K. Okuji  <okuji@enbug.org>
14808         * include/grub/normal.h (grub_halt_init): New prototype.
14809         (grub_halt_fini): Likewise.
14810         (grub_reboot_init): Likewise.
14811         (grub_reboot_fini): Likewise.
14813         * util/grub-emu.c: Include signal.h.
14814         (main_env): New global variable.
14815         (grub_machine_init): Ignore SIGINT. Otherwise grub-emu cannot
14816         catch C-c.
14817         (grub_machine_fini): New function.
14818         (main): Call grub_halt_init and grub_reboot_init before
14819         grub_main, and grub_reboot_fini and grub_halt_fini after it.
14820         Call setjmp with MAIN_ENV to go back afterwards.
14821         Call grub_machine_fini right before return.
14823         * include/grub/util/misc.h: Include setjmp.h.
14824         (main_env): New prototype.
14826         * include/grub/kernel.h (grub_machine_fini): New prototype.
14827         * include/grub/i386/pc/biosdisk.h (grub_biosdisk_fini): Likewise.
14828         * include/grub/i386/pc/console.h (grub_console_fini): Likewise.
14830         * disk/i386/pc/biosdisk.c (grub_biosdisk_fini): New function.
14831         * kern/i386/pc/init.c (grub_machine_fini): Likewise.
14832         * term/i386/pc/console.c (grub_console_fini): Likewise.
14834         * util/i386/pc/misc.c: New file.
14836         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
14837         util/i386/pc/misc.c, commands/i386/pc/halt.c and
14838         commands/i386/pc/reboot.c.
14840 2005-02-14  Guillem Jover  <guillem@hadrons.org>
14842         * include/grub/dl.h (grub_dl_check_header): New prototype.
14843         (grub_arch_dl_check_header): Change return type to grub_err_t,
14844         remove size parameter and export function.  Update all callers.
14845         * kern/dl.c (grub_dl_check_header): New function.
14846         (grub_dl_load_core): Use `grub_dl_check_header' instead of
14847         `grub_arch_dl_check_header'.  Check ELF type.  Check if sections
14848         are inside the core.
14849         * kern/i386/dl.c (grub_arch_dl_check_header): Remove arch
14850         independent ELF header checks.
14851         * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
14852         * loader/i386/pc/multiboot.c (grub_rescue_cmd_multiboot): Use
14853         `grub_dl_check_header' instead of explicit checks.  Check for the
14854         ELF type.
14855         * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Use
14856         `grub_dl_check_header' instead of explicit checks.  Remove arch
14857         specific ELF header checks.
14859         * util/grub-emu.c (grub_arch_dl_check_header): Remove the
14860         argument SIZE.
14862 2005-02-13  Hollis Blanchard  <hollis@penguinppc.org>
14864         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add ls.mod.
14865         * include/grub/powerpc/libgcc.h (__mulsf3): New prototype.
14867 2005-02-12  Hollis Blanchard  <hollis@penguinppc.org>
14869         * kern/partition.c (grub_partition_probe): Clear `grub_errno' and
14870         return 0 if `grub_errno' is GRUB_ERR_BAD_PART_TABLE.
14871         (part_map_iterate): Clear `grub_errno' and return 0 if
14872         `partmap->iterate' returns GRUB_ERR_BAD_PART_TABLE.
14873         * partmap/amiga.c (amiga_partition_map_iterate): Return
14874         GRUB_ERR_BAD_PART_TABLE if no partition map magic is found.
14875         * partmap/apple.c (apple_partition_map_iterate): Likewise.
14877 2005-02-01  Guillem Jover  <guillem@hadrons.org>
14879         * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Fix module
14880         help info.
14882 2005-01-31  Marco Gerards  <metgerards@student.han.nl>
14884         * include/grub/powerpc/ieee1275/loader.h (grub_load_linux):
14885         Removed prototype.
14886         (grub_rescue_cmd_linux): New prototype.
14887         (grub_rescue_cmd_initrd): Likewise.
14888         * powerpc/ieee1275/linux.c (grub_linux_boot): Remove struct
14889         `bi_rec'.
14890         (grub_linux_release_mem): Release the memory for the initrd.
14891         (grub_load_linux): Renamed from this...
14892         (grub_rescue_cmd_linux): ...To this.  Changed all callers.
14893         Changed `entry' not to be static.  Loop over memory regions to
14894         find another one when the default fails.
14895         (grub_rescue_cmd_initrd): New function.
14896         (grub_linux_init): Remove function.
14897         (grub_linux_fini): Likewise.
14898         (GRUB_MOD_INIT): Register `initrd'.
14899         (GRUB_MOD_FINI): Unregister `initrd'.
14900         * powerpc/ieee1275/linux_normal.c (grub_linux_normal_init):
14901         Function removed.
14902         (grub_linux_normal_fini): Likewise.
14903         (GRUB_MOD_INIT): Register `initrd'.
14904         (GRUB_MOD_FINI): Unregister `initrd'.
14906 2005-01-31  Marco Gerards  <metgerards@student.han.nl>
14908         * commands/help.c: New file.
14909         * normal/arg.c (show_help): Renamed to...
14910         (grub_arg_show_help): ... this.
14911         * commands/i386/pc/halt.c: New file.
14912         * commands/i386/pc/reboot.c: Likewise.
14913         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/help.c'.
14914         (pkgdata_MODULES): Add `reboot.mod', `halt.mod' and `help.mod'.
14915         (help_mod_SOURCES, help_mod_CFLAGS, reboot_mod_SOURCES)
14916         (reboot_mod_CFLAGS, halt_mod_SOURCES, halt_mod_CFLAGS): New
14917         variables.
14918         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
14919         `commands/help.c'.
14920         (pkgdata_MODULES): Add `help.mod'.
14921         (help_mod_SOURCES, help_mod_CFLAGS): New variables.
14922         * grub/i386/pc/init.h (grub_reboot): New prototype.
14923         (grub_halt): Likewise.
14924         * include/grub/normal.h (grub_arg_show_help): New prototype.
14925         (grub_help_init): Likewise.
14926         (grub_help_fini): Likewise.
14927         * util/grub-emu.c (main): Initialize and deinitialize the help
14928         command.
14930         * normal/cmdline.c (grub_cmdline_get): Doc fix.
14932         * normal/command.c (grub_command_init): Fixed the description of
14933         the `set' and `unset' commands.
14935 2005-01-31  Marco Gerards  <metgerards@student.han.nl>
14937         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_interpret): New
14938         function.
14939         * commands/ieee1275/halt.c: New file.
14940         * commands/ieee1275/reboot.c: Likewise.
14941         * commands/ieee1275/suspend.c (grub_cmd_suspend): Use
14942         `__attribute__ ((unused))'.  Some GCS related fixed.
14943         (grub_suspend_init) [GRUB_UTIL]: Function removed.
14944         (grub_suspend_fini): Likewise.
14945         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add `reboot.mod'
14946         and `halt.mod'.
14947         (reboot_mod_SOURCES, reboot_mod_CFLAGS, halt_mod_SOURCES)
14948         (halt_mod_CFLAGS): New variables.
14949         * include/grub/powerpc/ieee1275/ieee1275.h
14950         (grub_ieee1275_interpret): New prototype.
14952 2005-01-29  Yoshinori K. Okuji  <okuji@enbug.org>
14954         * include/grub/misc.h (memmove): New prototype.
14955         (memcpy): Likewise.
14957 2005-01-22  Hollis Blanchard  <hollis@penguinppc.org>
14959         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
14960         `devpath' to 0.  Use `name' instead of `devpath' with `grub_strndup'.
14962 2005-01-22  Marco Gerards  <metgerards@student.han.nl>
14964         * kern/misc.c (grub_strndup): Function rewritten.
14966 2005-01-22  Vincent Pelletier  <subdino2004@yahoo.fr>
14968         * normal/menu.c (TERM_WIDTH): Macro redefined.
14969         (TERM_TOP_BORDER_Y): Likewise.
14970         (draw_border): Replaced while-loop by a for-loop.  Make the number
14971         of lines consistent with the number of lines displayed in
14972         print_entries.  Added a margin below the rectangle.
14973         (print_entry): Make the entry fit in the rectangle.
14974         (print_entries): Display the scroll arrows next to the right
14975         border.
14977 2005-01-21  Marco Gerards  <metgerards@student.han.nl>
14979         * fs/minix.c (grub_minix_find_file): Reserve more space for
14980         `fpath' so the \0 can be stored.  Use `grub_strcpy' instead of
14981         `grub_strncpy' to copy `path' into it.
14983 2005-01-21  Marco Gerards  <metgerards@student.han.nl>
14985         Add the loopback device, a device via which files can be accessed
14986         as devices.
14988         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/loopback.c'.
14989         (pkgdata_MODULES): Add loopback.mod.
14990         (loopback_mod_SOURCES): New variable.
14991         (loopback_mod_CFLAGS): Likewise.
14992         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
14993         `disk/loopback.c'.
14994         (pkgdata_MODULES): Add loopback.mod.
14995         (loopback_mod_SOURCES): New variable.
14996         (loopback_mod_CFLAGS): Likewise.
14997         * disk/loopback.c: new file.
14998         * include/grub/normal.h (grub_loop_init): New prototype.
14999         (grub_loop_fini): New prototype.
15000         * util/grub-emu.c (main): Initialize and de-initialize loopback
15001         support.
15002         * include/grub/disk.h (grub_disk_dev_id): Add
15003         `GRUB_DISK_DEVICE_LOOPBACK_ID'.
15005 2005-01-20  Hollis Blanchard  <hollis@penguinppc.org>
15007         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_enter): New
15008         function.
15009         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add suspend.mod.
15010         (suspend_mod_SOURCES): New variable.
15011         (suspend_mod_CFLAGS): Likewise.
15012         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_enter):
15013         New prototype.
15014         * commands/ieee1275/suspend.c: New file.
15016 2005-01-20  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
15018         * include/grub/dl.h (GRUB_MOD_INIT): Changed `__attribute__
15019         ((unused))' to `__attribute__ ((used))'.
15020         (GRUB_MOD_FINI): Likewise.
15021         * kern/dl.c (grub_dl_load_file): Fix null pointer dereference.
15022         * genmk.rb (PModule): Assign space to common symbols when linking
15023         modules.
15025 2005-01-20  Marco Gerards  <metgerards@student.han.nl>
15027         * include/grub/mm.h (grub_mm_init_region): Change the type of the
15028         `unsigned' arguments to `grub_size_t'.
15029         (grub_malloc): Likewise.
15030         (grub_realloc): Likewise.
15031         (grub_memalign): Likewise.
15032         * kern/i386/dl.c (grub_arch_dl_check_header): Likewise.
15033         * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
15034         * util/misc.c (grub_malloc): Likewise.
15035         (grub_realloc): Likewise.
15036         * kern/mm.c (get_header_from_pointer): Change the casts to
15037         `unsigned' into a cast to `grub_size_t'.
15039         * fs/fshelp.c (grub_fshelp_find_file): The `oldnode' should always
15040         point to `currnode' when `currnode' is changed.
15042         * util/grub-emu.c (main): Initialize `progname'.  Reported by Nico
15043         Schottelius <nico-linux@schottelius.org>.
15045 2005-01-09  Hollis Blanchard  <hollis@penguinppc.org>
15047         * util/powerpc/ieee1275/grub-mkimage.c: Include <string.h>.
15048         (note_path): Remove variable.
15049         (GRUB_IEEE1275_NOTE_NAME): New macro.
15050         (GRUB_IEEE1275_NOTE_TYPE): Likewise.
15051         (grub_ieee1275_note_hdr): New structure.
15052         (grub_ieee1275_note_desc): Likewise.
15053         (grub_ieee1275_note): Likewise.
15054         (load_note): Remove `dir' argument.  All callers updated.  Remove
15055         `note_img' and `path'.  Do not load a file from `note_path'.
15056         Initialize a struct grub_ieee1275_note and write that to `out'.
15057         Use GRUB_IEEE1275_MODULE_BASE instead of MODULE_BASE.
15059 2005-01-05  Marco Gerards  <metgerards@student.han.nl>
15061         * util/misc.c (grub_util_read_image): Revert last change.  It
15062         called `grub_util_read_at', which seeks from the beginning of the
15063         file.
15065 2005-01-04  Hollis Blanchard  <hollis@penguinppc.org>
15067         * TODO: Add note about endianness in grub-mkimage.
15068         * boot/powerpc/ieee1275/crt0.S (note): Remove unused .note
15069         section.
15070         * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Add grub-mkimage.
15071         (grub_mkimage_SOURCES): New target.
15072         * include/grub/kernel.h (grub_start_addr): Remove variable.
15073         (grub_end_addr): Likewise.
15074         (grub_total_module_size): Likewise.
15075         (grub_kernel_image_size): Likewise.
15076         (GRUB_MODULE_MAGIC): New constant.
15077         (grub_module_info): New structure.
15078         (grub_arch_modules_addr): New prototype.
15079         (grub_get_end_addr): Remove prototype.
15080         * include/grub/i386/pc/kernel.h (grub_end_addr): New prototype.
15081         * include/grub/powerpc/ieee1275/kernel.h: New file.
15082         * include/grub/util/misc.h (grub_util_get_fp_size): New
15083         prototype.
15084         (grub_util_read_at): Likewise.
15085         (grub_util_write_image_at): Likewise.
15086         * kern/main.c (grub_get_end_addr): Remove function.
15087         (grub_load_modules): Call grub_arch_modules_addr instead of using
15088         grub_end_addr.  Look for a grub_module_info struct in memory.  Use
15089         the grub_module_info fields instead of calling grub_get_end_addr
15090         as loop conditions.  Move grub_add_unused_region code here.
15091         (grub_add_unused_region): Remove function.
15092         * kern/i386/pc/init.c: Include grub/cache.h.
15093         (grub_machine_init): Remove call to grub_get_end_addr.  Remove
15094         one call to add_mem_region.
15095         (grub_arch_modules_addr): New function.
15096         * kern/powerpc/ieee1275/init.c (grub_end_addr): Remove variable.
15097         (grub_total_module_size): Likewise.
15098         Include grub/machine/kernel.h.
15099         (grub_arch_modules_addr): New function.
15100         * util/grub-emu.c (grub_end_addr): Remove variable.
15101         (grub_total_module_size): Likewise.
15102         (grub_arch_modules_addr): New function.
15103         * util/misc.c: Include unistd.h.
15104         (grub_util_get_fp_size): New function.
15105         (grub_util_read_at): Likewise.
15106         (grub_util_write_image_at): Likewise.
15107         (grub_util_read_image): Call grub_util_read_at.
15108         (grub_util_write_image): Call grub_util_write_image_at.
15109         * util/i386/pc/grub-mkimage.c (generate_image): Allocate
15110         additional memory in kernel_img for a struct grub_module_info.
15111         Fill in that grub_module_info.
15112         * util/powerpc/ieee1275/grub-mkimage.c: New file.
15114 2005-01-03  Hollis Blanchard  <hollis@penguinppc.org>
15116         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_milliseconds):
15117         New function.
15118         * include/grub/powerpc/ieee1275/ieee1275.h
15119         (grub_ieee1275_milliseconds): New prototype.
15120         * include/grub/powerpc/ieee1275/time.h (GRUB_TICKS_PER_SECOND):
15121         Change to 1000.
15122         * kern/powerpc/ieee1275/init.c (grub_get_rtc): Call
15123         grub_ieee1275_milliseconds.
15125 2005-01-03  Hollis Blanchard  <hollis@penguinppc.org>
15127         * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_realmode): New
15128         variable.
15129         (find_options): New function.
15130         (cmain): Call find_options.
15131         * include/grub/powerpc/ieee1275/ieee1275.h
15132         (grub_ieee1275_realmode): New extern variable.
15133         * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Only call
15134         grub_map if grub_ieee1275_realmode is false.
15136 2004-12-29  Marco Gerards  <metgerards@student.han.nl>
15138         * normal/cmdline.c (grub_cmdline_get): Redone logic so no empty
15139         lines are inserted and make it work like readline.  Reported by
15140         Vincent Pelletier <subdino2004@yahoo.fr>.
15142 2004-12-28  Marco Gerards  <metgerards@student.han.nl>
15144         * boot/powerpc/ieee1275/crt0.S (_start): Don't set up the stack.
15146         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCE): Remove
15147         `kern/powerpc/cache.S'.
15149 2004-12-27  Marco Gerards  <metgerards@student.han.nl>
15151         * genmk.rb: Handle the `Program' class in the main loop.  Written
15152         by Johan Rydberg <jrydberg@gnu.org>.
15153         (Program): New class.
15154         (programs): New variable.
15155         * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h>
15156         instead of "grub/machine/ieee1275.h".  Include <grub/kernel.h>
15157         instead of "grub/kernel.h".  Include <grub/machine/init.h>.
15158         (help_arch): Function removed.
15159         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add
15160         `powerpc/libgcc.h' and `loader.h'.
15161         (pkgdata_PROGRAMS): New variable.
15162         (sbin_UTILITIES): Variable removed.
15163         (grub_emu_SOURCES): Added kern/powerpc/cache.S.
15164         (grubof_SOURCES): Variable re-defined so it only includes the
15165         core functionality.
15166         (grubof_CFLAGS): Remove `-DGRUBOF'.
15167         (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS,
15168         (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES)
15169         (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS)
15170         (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES)
15171         (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS)
15172         (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES)
15173         (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS)
15174         (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS)
15175         (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES)
15176         (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS)
15177         (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
15178         (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES)
15179         (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS)
15180         (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES)
15181         (pc_mod_CFLAGS): New variables.
15182         * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>.
15183         (grub_ofdisk_iterate): Add a prototype for `dev_iterate'.
15184         * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype.
15185         * include/grub/loader.h (grub_os_area_addr, grub_os_area_size):
15186         Moved from here...
15187         * include/grub/i386/pc/init.h (grub_os_area_addr)
15188         (rub_os_area_size): ... to here.
15189         * include/grub/powerpc/ieee1275/ieee1275.h
15190         (grub_ieee1275_entry_fn): Export symbol.
15191         * include/grub/powerpc/ieee1275/init.h: New file.
15192         * include/grub/powerpc/libgcc.h: Likewise.
15193         * include/grub/cache.h: Likewise.
15194         * kern/powerpc/cache.S: Likewise.  Written by Hollis Blanchard
15195         <hollis@penguinppc.org>.
15196         * kern/dl.c: Include <grub/cache.h>.
15197         (grub_dl_flush_cache): New function.
15198         (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache
15199         for this module.
15200         * kern/powerpc/ieee1275/init.c (grub_ofdisk_init)
15201         (grub_console_init): Removed prototypes.
15202         (grub_machine_init): Don't initialize the modules anymore.
15203         * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function
15204         static.
15205         * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN):
15206         Macro undef removed.
15207         (GRUB_HOST_WORDS_BIGENDIAN): New macro.
15208         * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add
15209         relocation `R_PPC_REL32'.  Return an error when the relocation is
15210         unknown.
15211         * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'.
15212         * kern/i386/pc/init.c (grub_arch_sync_caches): New function.
15213         * util/misc.c (grub_arch_sync_caches): Likewise.
15215 2004-12-19  Marco Gerards  <metgerards@student.han.nl>
15217         * conf/powerpc-ieee1275.rmk (MOSTLYCLEANFILES): Remove
15218         `symlist.c', add `grubof_symlist.c'.
15219         (symlist.c): Variable removed.
15220         (grubof_HEADERS): Variable added.
15221         (grubof_symlist.c): New target.
15222         (kernel_syms.lst): Use `grubof_HEADERS' instead of
15223         `kernel_img_HEADERS'.
15224         (grubof_SOURCES): Add `kern/powerpc/dl.c' and `grubof_symlist.c'.
15225         * kern/powerpc/dl.c: New file.
15226         * kern/powerpc/ieee1275/init.c (grub_arch_dl_check_header):
15227         Function removed.
15228         (grub_arch_dl_relocate_symbols): Likewise.
15229         (grub_register_exported_symbols): Likewise.
15231 2004-12-13  Marco Gerards  <metgerards@student.han.nl>
15233         * fs/ext2.c (grub_ext2_open): Don't use data after freeing it.
15234         (grub_ext2_dir): Likewise.  Don't return in case of an error, jump
15235         to fail instead.  Reported by Vincent Pelletier
15236         <subdino2004@yahoo.fr>.
15238         * fs/fshelp.c (grub_fshelp_find_file): Don't free `oldnode' when
15239         it is not allocated.  Reported by Vincent Pelletier
15240         <subdino2004@yahoo.fr>.
15242         * normal/cmdline.c (grub_tab_complete): Add a blank line to the
15243         output so the output looks better.
15245 2004-12-04  Marco Gerards  <metgerards@student.han.nl>
15247         Modulize the partition map support and add support for the amiga
15248         partition map.
15250         * commands/ls.c: Include <grub/partition.h> instead of
15251         <grub/machine/partition.h>.
15252         * kern/disk.c: Likewise.
15253         * kern/rescue.c: Likewise.
15254         * loader/i386/pc/chainloader.c: Likewise.
15255         * normal/cmdline.c: Likewise.
15256         * kern/powerpc/ieee1275/init.c: Likewise.
15257         (grub_machine_init): Call `grub_pc_partition_map_init',
15258         `grub_amiga_partition_map_init' and
15259         `grub_apple_partition_map_init'.
15260         * conf/i386-pc.rmk (kernel_img_SOURCES): Remove
15261         `disk/i386/pc/partition.c'.  Add `kern/partition.c'.
15262         (kernel_img_HEADERS): Remove `machine/partition.h'.  Add
15263         `partition.h' and `pc_partition.h'.
15264         (grub_setup_SOURCES): Remove
15265         `disk/i386/pc/partition.c'.  Add `kern/partition.c',
15266         `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
15267         (grub_emu_SOURCES): Likewise.
15268         (pkgdata_MODULES): Add `amiga.mod', `apple.mod' and `pc.mod'.
15269         (amiga_mod_SOURCES, amiga_mod_CFLAGS, apple_mod_SOURCES)
15270         (apple_mod_CFLAGS, pc_mod_SOURCES, pc_mod_CFLAGS): New variables.
15271         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
15272         `disk/powerpc/ieee1275/partition.c'.  Add `kern/partition.c',
15273         `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
15274         (grubof_SOURCES): Likewise.
15275         * disk/i386/pc/partition.c: File removed.
15276         * disk/powerpc/ieee1275/partition.c: Likewise.
15277         * include/grub/powerpc/ieee1275/partition.h: Likewise.
15278         * include/grub/i386/pc/partition.h: Likewise.
15279         * kern/partition.c: New file.
15280         * partmap/amiga.c: Likewise.
15281         * partmap/apple.c: Likewise.
15282         * partmap/pc.c: Likewise.
15283         * include/grub/partition.h: Likewise..
15284         * include/grub/pc_partition.h: Likewise.
15285         * util/grub-emu.c: Include <grub/partition.h> instead of
15286         <grub/machine/partition.h>.
15287         (main): Call `grub_pc_partition_map_init',
15288         `grub_amiga_partition_map_init' and
15289         `grub_apple_partition_map_init' and deinitialize afterwards.
15290         * util/i386/pc/biosdisk.c: Include `#include
15291         <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
15292         `<grub/machine/partition.h>'.
15293         * util/i386/pc/grub-setup.c: Likewise.
15294         * util/i386/pc/biosdisk.c: Likewise.
15295         (grub_util_biosdisk_get_grub_dev): Only access the PC specific
15296         partition information in case of a PC partition.
15297         * util/i386/pc/grub-setup.c: Include `#include
15298         <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
15299         `<grub/machine/partition.h>'.
15300         (setup): Only access the PC specific partition information in case
15301         of a PC partition.
15303 2004-11-17  Hollis Blanchard  <hollis@penguinppc.org>
15305         * kern/powerpc/ieee1275/init.c (grub_setjmp): Remove function.
15306         (grub_longjmp): Likewise.
15307         * include/grub/powerpc/setjmp.h (grub_jmp_buf): Set array size to
15308         20.
15309         * normal/powerpc/setjmp.S: New file.
15310         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
15311         `normal/powerpc/setjmp.S'.
15312         (grubof_CFLAGS): Add `-DGRUBOF'.
15313         * include/grub/setjmp.h [GRUB_UTIL]: Changed condition to
15314         [GRUB_UTIL && !GRUBOF].
15316 2004-11-16  Marco Gerards  <metgerards@student.han.nl>
15318         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Skip any
15319         property named `name'.  Correctly handle the error returned by
15320         `grub_ieee1275_finddevice' if a device can not be opened.
15322 2004-11-02  Hollis Blanchard  <hollis@penguinppc.org>
15324         * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_readkey): Test
15325         `actual' for negativity.
15326         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
15327         kern/fshelp.c.
15329 2004-11-01  Marco Gerards  <metgerards@student.han.nl>
15331         * term/i386/pc/vga.c (VGA_HEIGHT): Changed to 350.
15332         (PAGE_OFFSET): New macro.
15333         (CRTC_ADDR_PORT): Likewise.
15334         (CRTC_DATA_PORT): Likewise.
15335         (START_ADDR_HIGH_REGISTER): Likewise.
15336         (START_ADDR_LOW_REGISTER): Likewise.
15337         (GRAPHICS_ADDR_PORT): Likewise.
15338         (GRAPHICS_DATA_PORT): Likewise.
15339         (READ_MAP_REGISTER): Likewise.
15340         (INPUT_STATUS1_REGISTER): Likewise.
15341         (INPUT_STATUS1_VERTR_BIT): Likewise.
15342         (page): New variable.
15343         (wait_vretrace): New function.
15344         (set_read_map): Likewise.
15345         (set_start_address): Likewise.
15346         (grub_vga_init): Use mode 0x10 instead of mode 0x12.  Switch to
15347         the right page.
15348         (check_vga_mem): Take the page into account.
15349         (write_char): Likewise.
15350         (write_cursor): Likewise.
15351         (scroll_up): Likewise.  Copy the page to the page that is not
15352         shown and switch between both pages.
15353         (grub_vga_putchar): Fix off by one error.
15354         (grub_vga_cls): Wait for the vertical retrace.  Take the page into
15355         account.
15357 2004-11-01  Marco Gerards  <metgerards@student.han.nl>
15359         Add support for iso9660 (including rockridge).
15361         * conf/i386-pc.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
15362         (iso9660_mod_SOURCES): New variable.
15363         (iso9660_mod_CFLAGS): Likewise.
15364         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
15365         * include/grub/fs.h (grub_iso9660_init): New prototype.
15366         * util/grub-emu.c (main): Call `grub_iso9660_init'.
15367         * fs/iso9660.c: New file.
15369         * include/grub/misc.h (grub_strncat): New prototype.
15370         * kern/misc.c (grub_strncat): New function.
15372         * fs/hfs.c (grub_hfs_mount): Translate the error
15373         `GRUB_ERR_OUT_OF_RANGE' to `GRUB_ERR_BAD_FS'.
15374         * fs/jfs.c (grub_jfs_mount): Likewise.
15375         * fs/ufs.c (grub_ufs_mount): Likewise.
15377 2004-10-28  Hollis Blanchard  <hollis@penguinppc.org>
15379         * boot/powerpc/ieee1275/cmain.c (cmain): Remove asm statements
15380         which initialized BAT registers.
15381         * boot/powerpc/ieee1275/ieee1275.c (IEEE1275_CALL_ENTRY_FN,
15382         grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
15383         Move from here...
15384         * include/grub/powerpc/ieee1275/ieee1275.h (IEEE1275_CALL_ENTRY_FN,
15385         grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
15386         ... to here.
15387         * kern/powerpc/ieee1275/openfw.c (grub_map): New function.
15388         (grub_mapclaim): Likewise.
15389         * loader/powerpc/ieee1275/linux.c (grub_load_linux): Use
15390         grub_mapclaim instead of grub_ieee1275_claim.  Assign linux_addr by
15391         hand.
15393 2004-10-19  Hollis Blanchard  <hollis@penguinppc.org>
15395         * conf/powerpc-ieee1275.rmk (COMMON_ASFLAGS): Remove -fno-builtin.
15396         (COMMON_CFLAGS): Remove -fno-builtin and -D__ASSEMBLY__. Add
15397         -ffreestanding and -msoft-float.
15399 2004-10-15  Hollis Blanchard  <hollis@penguinppc.org>
15401         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Do not
15402         append ":0" to devpath if the GRUB_IEEE1275_NO_PARTITION_0 flag is
15403         set in grub_ieee1275_flags.
15405 2004-10-14  Hollis Blanchard  <hollis@penguinppc.org>
15407         * include/grub/powerpc/ieee1275/ieee1275.h (abort): Add function
15408         prototype.
15409         * kern/powerpc/ieee1275/init.c (grub_machine_init): Call
15410         grub_console_init first.
15411         Change the memory range used for grub_ieee1275_claim and
15412         grub_mm_init_region.
15413         Print an error message if the claim fails.
15414         Include <grub/misc.h>.
15416 2004-10-13  Hollis Blanchard  <hollis@penguinppc.org>
15418         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_iterate):
15419         Call grub_children_iterate for device nodes of type `scsi',
15420         `ide', or `ata'.
15421         (grub_ofdisk_open): Remove manual device alias resolution.
15422         Fix memory leak when device cannot be opened.
15423         * include/grub/powerpc/ieee1275/ieee1275.h
15424         (grub_children_iterate): New prototype.
15425         * kern/powerpc/ieee1275/openfw.c (grub_children_iterate):
15426         New function.
15427         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
15428         Return -1 if args.size was -1.
15430 2004-10-11  Hollis Blanchard  <hollis@penguinppc.org>
15432         * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_flags): New global.
15433         (cmain): Accept 3 parameters. Test for 0xdeadbeef, indicating Old
15434         World Macintosh. If Old Wold, set flag in grub_ieee1275_flags; claim
15435         Open Firmware's memory for it; claim memory from _start to _end.
15436         * boot/powerpc/ieee1275/crt0.S (__bss_start): New extern.
15437         (_end): New extern.
15438         (_start): Zero BSS from __bss_start to _end.
15439         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
15440         New extern.
15441         (GRUB_IEEE1275_NO_PARTITION_0): New #define.
15443 2004-10-11  Hollis Blanchard  <hollis@penguinppc.org>
15445         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): Return
15446         -1 if args.base was -1.
15448 2004-10-08  Hollis Blanchard  <hollis@penguinppc.org>
15450         * term/powerpc/ieee1275/ieee1275.c (grub_ofconsole_cls): Use an ANSI
15451         escape sequence instead of a literal ^L. Also call
15452         grub_ofconsole_gotoxy.
15454 2004-10-03  Hollis Blanchard  <hollis@penguinppc.org>
15456         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): change
15457         void *  arguments to grub_addr_t.  All callers updated.  Also make
15458         the `result' argument optional.
15459         (grub_ieee1275_release): change void * arguments to grub_addr_t.
15460         All callers updated.
15462 2004-09-22  Hollis Blanchard  <hollis@penguinppc.org>
15464         * commands/ls.c (grub_ls_list_files): Use the string following the
15465         initial ')', if present, as the filesystem path.
15466         * kern/rescue.c (grub_rescue_cmd_ls): Likewise.
15468         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): List crt0.S first.
15470 2004-09-18  Yoshinori K. Okuji  <okuji@enbug.org>
15472         Make the source code of the menu interface more readable.
15474         * normal/menu.c: Include grub/mm.h.
15475         (TERM_WIDTH): New macro.
15476         (TERM_HEIGHT): Likewise.
15477         (TERM_INFO_HEIGHT): Likewise.
15478         (TERM_MARGIN): Likewise.
15479         (TERM_SCROLL_WIDTH): Likewise.
15480         (TERM_TOP_BORDER_Y): Likewise.
15481         (TERM_LEFT_BORDER_X): Likewise.
15482         (TERM_BORDER_WIDTH): Likewise.
15483         (TERM_MESSAGE_HEIGHT): Likewise.
15484         (TERM_BORDER_HEIGHT): Likewise.
15485         (TERM_NUM_ENTRIES): Likewise.
15486         (TERM_FIRST_ENTRY_Y): Likewise.
15487         (TERM_ENTRY_WIDTH): Likewise.
15488         (TERM_CURSOR_X): Likewise.
15489         (draw_border): Use macros instead of magic numbers.
15490         (print_entry): Likewise.
15491         (print_entries): Likewise.
15492         (run_menu): Likewise. Also, handle the key 'e'.
15493         (run_menu_entry): Ignore empty command lines.
15494         (print_message): Added a new argument EDIT. If EDIT is true,
15495         print a different message.
15496         (init_page): Likewise.
15497         (edit_menu_entry): New function. Not implemented yet.
15499 2004-09-17  Marco Gerards  <metgerards@student.han.nl>
15501         Add `linux.mod' and `multiboot.mod' so linux and multiboot kernels
15502         can be loaded from normal mode.
15504         * conf/i386-pc.rmk (pkgdata_MODULES): Add `linux.mod' and
15505         `multiboot.mod'.
15506         (linux_mod_SOURCES, linux_mod_CFLAGS, multiboot_mod_SOURCES)
15507         (multiboot_mod_CFLAGS): New variables.
15508         * loader/i386/pc/linux_normal.c: New file.
15509         * loader/i386/pc/multiboot_normal.c: Likewise.
15511         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Don't use the
15512         attribute `unused'.
15514         * fs/ext2.c (grub_ext2_iterate_dir): Fix typos in inode type.  Use
15515         `fdiro' to read the mode information from instead of `diro'.
15517         * fs/fshelp.c (grub_fshelp_find_file): Set type to foundtype after
15518         looking up a symlink.
15520         * include/grub/normal.h (GRUB_COMMAND_FLAG_NO_ARG_PARSE): New
15521         macro.
15522         * normal/command.c (grub_command_execute): Don't parse the
15523         arguments when `GRUB_COMMAND_FLAG_NO_ARG_PARSE' is set in the
15524         flags of the command.
15526         * normal/menu.c (grub_menu_run): Fix typo.
15528 2004-09-14  Hollis Blanchard  <hollis@penguinppc.org>
15530         * kern/powerpc/ieee1275/init.c (abort): Trap into Open Firmware.
15532         * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_gotoxy): Use
15533         `y + 1' instead of `y - 1'.
15535         * conf/powerpc-ieee1275.rmk (grubof_LDFLAGS): Add `-N' and `-S'.
15537 2004-09-14  Yoshinori K. Okuji  <okuji@enbug.org>
15539         From Hollis Blanchard <hollis@penguinppc.org>:
15540         * kern/misc.c (memmove): New alias for grub_memmove.
15541         (memcmp): New alias for grub_memcmp.
15542         (memset): New alias for grub_memset.
15543         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
15544         Change "int handle" to "grub_ieee1275_phandle_t handle".
15545         * include/grub/powerpc/ieee1275/ieee1275.h
15546         (grub_ieee1275_get_property): Likewise.
15548 2004-09-12  Tomas Ebenlendr  <ebik@ucw.cz>
15550         Added normal mode command `chainloader' as module chain.mod, which
15551         depends on normal.mod and _chain.mod.
15553         * conf/i386-pc.rmk (pkgdata_MODULES): Add `chain.mod'.
15554         (chain_mod_SOURCES, chain_mod_CFLAGS): Variables added.
15555         * include/grub/i386/pc/loader.h (grub_rescue_cmd_chainloader):
15556         Deleted prototype.
15557         * loader/i386/pc/chainloader.c (grub_rescue_cmd_chainloader): All
15558         but arguments parsing moved to ...
15559         (grub_chainloader_cmd): ... here.  New function.
15560         * include/grub/i386/pc/chainloader.h: New file.
15561         * loader/i386/pc/chainloader_normal.c: Likewise.
15563 2004-09-11  Marco Gerards  <metgerards@student.han.nl>
15565         * conf/i386-pc.rmk (kernel_img_SOURCES): Added kern/fshelp.c.
15566         (grub_mkimage_LDFLAGS): Likewise.
15567         (grub_emu_SOURCES): Likewise.
15568         (kernel_img_HEADERS): Added fshelp.h.
15569         * fs/ext2.c: Include <grub/fshelp.h>.
15570         (FILETYPE_REG): New macro.
15571         (FILETYPE_INO_REG): Likewise.
15572         (grub_ext_sblock): Renamed to `grub_ext2_sblock'.
15573         Changed all users.
15574         (ext2_block_group): Renamed to `grub_ext2_block_group'.  Changed
15575         all users.
15576         (grub_fshelp_node): New struct.
15577         (grub_ext2_data): Added member `diropen'.  Changed member `inode'
15578         to a pointer.
15579         (grub_ext2_get_file_block): Removed function.
15580         (grub_ext2_read_block): New function.
15581         (grub_ext2_read_file): Replaced parameter `data' by `node'.
15582         This function was written.
15583         (grub_ext2_mount): Read the root inode.  Create a diropen struct.
15584         (grub_ext2_find_file): Removed function.
15585         (grub_ext2_read_symlink): New function.
15586         (grub_ext2_iterate_dir): Likewise.
15587         (grub_ext2_open): Rewritten.
15588         (grub_ext2_dir): Rewritten.
15589         * include/grub/fshelp.h: New file.
15590         * fs/fshelp.c: Likewise.
15592 2004-09-10  Yoshinori K. Okuji  <okuji@enbug.org>
15594         * normal/menu.c: Include grub/loader.h and grub/machine/time.h.
15595         (print_message): Add a missing newline.
15596         (run_menu): Added timeout support.
15597         (run_menu_entry): New local function.
15598         (grub_menu_run): Added support for booting.
15600         * kern/loader.c (grub_loader_is_loaded): New function.
15602         * include/grub/powerpc/ieee1275/time.h: Include grub/symbol.h.
15603         (grub_get_rtc): Exported.
15605         * include/grub/i386/pc/time.h: Include grub/symbol.h.
15606         (grub_get_rtc): Exported.
15608         * include/grub/normal.h (struct grub_command_list): Remove
15609         constant from the member `command'.
15611         * include/grub/loader.h (grub_loader_is_loaded): Declared.
15613         * include/grub/err.h (GRUB_ERR_INVALID_COMMAND): New constant.
15615         * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/time.h.
15617 2004-08-28  Marco Gerards  <metgerards@student.han.nl>
15619         Add support for the JFS filesystem.
15621         * fs/jfs.c: New file.
15622         * include/grub/fs.h (grub_jfs_init): New prototype.
15623         (grub_jfs_fini): New prototype.
15624         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/jfs.c.
15625         (grub_emu_SOURCES): Likewise.
15626         (pkgdata_MODULES): Add jfs.mod.
15627         (jfs_mod_SOURCES): New variable.
15628         (jfs_mod_CFLAGS): Likewise.
15629         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs.jfs.c.
15630         (grubof_SOURCES): Likewise.
15631         * util/grub-emu.c (main): Initialize and deinitialize JFS support.
15633         * fs/fat.c (grub_fat_find_dir): Convert the filename little
15634         endian to the host endian.
15635         (grub_fat_utf16_to_utf8): Move function from there...
15636         * kern/misc.c (grub_utf16_to_utf8): ...to here.  Do not convert
15637         the endianness of the source string anymore.
15638         * include/grub/misc.h (grub_utf16_to_utf8): New prototype.
15640 2004-08-24  Marco Gerards  <metgerards@student.han.nl>
15642         * commands/boot.c (grub_boot_init) [GRUB_UTIL]: Make conditional.
15643         (grub_boot_fini) [GRUB_UTIL]: Likewise.
15644         (GRUB_MOD_INIT) [!GRUB_UTIL]: Likewise.
15645         (GRUB_MOD_FINI) [!GRUB_UTIL]: Likewise.
15647         * fs/hfs.c (grub_hfs_find_node): Add a prototype for `node_found'.
15648         (grub_hfs_iterate_dir): Make the function static.  Add prototypes
15649         for `node_found' and `it_dir'.
15650         (grub_hfs_dir): Add prototype for `dir_hook'.
15652         * fs/minix.c (grub_minix_get_file_block): Add prototype for
15653         `grub_get_indir'.  Rename `indir' in two blocks to `indir16'
15654         and `indir32' to silence a gcc warning.
15656         * include/grub/fs.h (grub_hfs_init): New prototype.
15657         (grub_hfs_fini): Likewise.
15660 2004-08-21  Yoshinori K. Okuji  <okuji@enbug.org>
15662         Each disk device has its own id now. This is useful to make use
15663         of multiple disk devices.
15665         * include/grub/disk.h (grub_disk_dev_id): New enum.
15666         (GRUB_DISK_DEVICE_BIOSDISK_ID): New constant.
15667         (GRUB_DISK_DEVICE_OFDISK_ID): Likewise.
15669         * disk/i386/pc/biosdisk.c (grub_biosdisk_dev): Specify
15670         GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
15672         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_dev): Specify
15673         GRUB_DISK_DEVICE_OFDISK_ID as an id.
15675         * util/i386/pc/biosdisk.c (grub_util_biosdisk_dev): Specify
15676         GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
15678         * include/grub/disk.h (struct grub_disk_dev): Added a new member
15679         "id" which is used by the cache manager.
15681         * normal/main.c (grub_normal_init_page): Use "GNU GRUB" instead
15682         of just "GRUB".
15684 2004-08-18  Marco Gerards  <metgerards@student.han.nl>
15686         * fs/hfs.c: New file.
15687         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/hfs.c.
15688         (grub_emu_SOURCES): Likewise.
15689         (pkgdata_MODULES): Add hfs.mod.
15690         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/hfs.c.
15691         (grubof_SOURCES): Likewise.
15692         * util/grub-emu.c (main): Initialize and deinitialize HFS support.
15694         * include/grub/misc.h (grub_strncasecmp): Add prototype.
15695         * kern/misc.c (grub_strncasecmp): Add function.
15697 2004-08-14  Marco Gerards  <metgerards@student.han.nl>
15699         * include/grub/arg.h (GRUB_ARG_OPTION_OPTIONAL): Surround macro
15700         with parentheses.
15702         * fs/ext2.c (FILETYPE_UNKNOWN): New macro.
15703         (grub_ext2_dir): In case the directory entry type is unknown, read
15704         it from the inode.
15706 2004-08-02  Peter Bruin  <pjbruin@dds.nl>
15708         * loader/powerpc/ieee1275/linux.c (grub_linux_init): Pass
15709         grub_load_linux instead of grub_rescue_cmd_linux as second
15710         argument of grub_rescue_register_command.
15712         * Makefile.in (RMKFILES): Add conf/powerpc-ieee1275.rmk.
15714 2004-07-27  Marco Gerards  <metgerards@student.han.nl>
15716         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_release): New
15717         function.
15718         * commands/boot.c: Remove the check for `GRUB_UTIL'.
15719         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
15720         `loader/powerpc/ieee1275/linux.c',
15721         `loader/powerpc/ieee1275/linux_normal.c' and `commands/boot.c'.
15722         * include/grub/powerpc/ieee1275/ieee1275.h
15723         (grub_ieee1275_release): New prototype.
15724         * include/grub/powerpc/ieee1275/loader.h: Rewritten.
15725         * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize
15726         normal, boot, linux and linux_normal.
15727         * loader/powerpc/ieee1275/linux.c: New file.
15728         * loader/powerpc/ieee1275/linux_normal.c: Likewise.
15730 2004-07-12  Marco Gerards  <metgerards@student.han.nl>
15732         * normal/arg.c (grub_arg_parse): Correct error handling after
15733         reallocating the argumentlist (check if `argl' is not null instead
15734         of checking if `args' is not null).
15735         * kern/mm.c (grub_realloc): Return the same pointer when using the
15736         same region, instead of returning the header address.
15738 2004-07-11  Marco Gerards  <metgerards@student.han.nl>
15740         * disk/powerpc/ieee1275/partition.c (grub_partition_iterate): Skip
15741         one block instead of two when looking for the initial partition.
15742         (grub_partition_probe): Initialize the local variable `p' with 0.
15743         Use base 10 for the grub_strtoul call.
15744         * kern/misc.c (grub_strncpy): Fix off by one bug.  Eliminated the
15745         need for one local variable.
15746         (grub_strtoul): Don't add the new value to `num', instead of that
15747         just assign it.
15749 2004-07-11  Marco Gerards  <metgerards@student.han.nl>
15751         * conf/i386-pc.rmk (pkgdata_IMAGE): Add pxeboot.img.
15752         (pxeboot_img_SOURCES): New variable.
15753         (pxeboot_img_ASFLAGS): Likewise.
15754         (pxeboot_img_LDFLAGS): Likewise.
15755         * boot/i386/pc/pxeboot.S: New file.  Based on pxeloader.S from
15756         GRUB Legacy and boot.S.  Adopted for GRUB 2 by lode leroy
15757         <lode_leroy@hotmail.com>.
15759 2004-06-27  Tomas Ebenlendr  <ebik@ucw.cz>
15761         * kern/rescue.c (grub_enter_rescue_mode): Don't continue when
15762         there was no input.
15764 2004-06-27  Tomas Ebenlendr  <ebik@ucw.cz>
15766         * normal/cmdline.c (grub_set_history): Fix off by one bug.  Fixed
15767         the history buffer logic.
15769 2004-06-27  Tomas Ebenlendr  <ebik@ucw.cz>
15771         * fs/ext2.c (FILETYPE_INO_MASK, FILETYPE_INO_DIRECTORY)
15772         (FILETYPE_INO_SYMLINK): New macros.
15773         (grub_ext2_find_file): Check if the node is a directory using the
15774         inode stat information instead of using the filetype in the
15775         dirent.  Exclude the first character of an absolute symlink.
15776         (grub_ext2_dir): Mask out the filetype part of the mode member of
15777         the inode.
15779 2004-05-24  Marco Gerards  <metgerards@student.han.nl>
15781         Add support for UFS version 1 and 2.  Add support for the minix
15782         filesystem version 1 and 2, both the variants with 14 and 30 long
15783         filenames.
15785         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ufs.c and
15786         fs/minix.c.
15787         (grub_emu_SOURCES): Likewise.
15788         (pkgdata_MODULES): Add ufs.mod and minix.mod.
15789         (ufs_mod_SOURCES): New variable.
15790         (ufs_mod_CFLAGS): Likewise.
15791         (minix_mod_SOURCES): Likewise.
15792         (minix_mod_CFLAGS): Likewise.
15793         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/ufs.c and
15794         fs/minix.c.
15795         (grubof_SOURCES): Likewise.
15796         * fs/ufs.c: New file.
15797         * fs/minix.c: New file.
15798         * include/grub/fs.h (grub_ufs_init): New prototype.
15799         (grub_ufs_fini): Likewise.
15800         (grub_minix_init): Likewise.
15801         (grub_minix_fini): Likewise.
15802         * util/grub-emu.c (main): Initialize and deinitialize UFS and
15803         minix fs.
15805 2004-04-30  Jeroen Dekkers  <jeroen@dekkers.cx>
15807         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add normal/arg.c,
15808         commands/ls.c, commands/terminal.c, commands/boot.c,
15809         commands/cmp.c and commands/cat.c.
15810         (grubof_LDFLAGS): Add -nostdlib -static-libgcc -lgcc.
15812         * kern/powerpc/ieee1275/init.c: Include "grub/env.h" instead of
15813         "env.h"
15815 2004-04-04  Yoshinori K. Okuji  <okuji@enbug.org>
15817         All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
15818         and grub_, respectively. Because the conversion is trivial and
15819         mechanical, I omit the details here. Please refer to the CVS
15820         if you need more information.
15822 2004-04-04  Yoshinori K. Okuji  <okuji@enbug.org>
15824         * include/pupa: Renamed to ...
15825         * include/grub: ... this.
15826         * util/i386/pc/pupa-mkimage.c: Renamed to ...
15827         * util/i386/pc/grub-mkimage.c: ... this.
15828         * util/i386/pc/pupa-setup.c: Renamed to ...
15829         * util/i386/pc/grub-setup.c: ... this.
15830         * util/pupa-emu.c: Renamed to ...
15831         * util/grub-emu.c: ... this.
15833 2004-03-29  Marco Gerards  <metgerards@student.han.nl>
15835         Add support for the newworld apple macintosh (PPC).  This has been
15836         tested on the powerbook 2000 only.  It only adds support for
15837         generic ieee1275 functions, console and disk support.  This should
15838         be easy to port to other architectures with support for Open
15839         Firmware.
15841         * configure.ac: Accept the powerpc as host_cpu.  In the case of
15842         the powerpc cpu set the host_vendor to ieee1275.  Make sure the i386
15843         specific tests are only executed while building for the i386.
15844         Inverse test for crosscompile.
15845         * genmk.rb (Utility): Allow assembler files.
15846         * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno.
15847         * conf/powerpc-ieee1275.rmk: New file.
15848         * disk/powerpc/ieee1275/ofdisk.c: Likewise.
15849         * disk/powerpc/ieee1275/partition.c: Likewise.
15850         * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise.
15851         * include/pupa/powerpc/ieee1275/console.h: Likewise.
15852         * include/pupa/powerpc/ieee1275/partition.h: Likewise.
15853         * include/pupa/powerpc/ieee1275/time.h: Likewise.
15854         * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise.
15855         * include/pupa/powerpc/ieee1275/multiboot.h: Likewise.
15856         * include/pupa/powerpc/ieee1275/loader.h
15857         * include/pupa/powerpc/setjmp.h: Likewise.
15858         * include/pupa/powerpc/types.h: Likewise.
15859         * kern/powerpc/ieee1275/init.c: Likewise.
15860         * kern/powerpc/ieee1275/openfw.c: Likewise.
15861         * term/powerpc/ieee1275/ofconsole.c: Likewise.
15863         These files were written by Johan Rydberg
15864         (jrydberg@night.trouble.net) and I only modified them slightly.
15866         * boot/powerpc/ieee1275/cmain.c: New file.
15867         * boot/powerpc/ieee1275/crt0.S: Likewise.
15868         * boot/powerpc/ieee1275/ieee1275.c: Likewise.
15869         * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
15871 2004-03-14  Jeroen Dekkers  <jeroen@dekkers.cx>
15873         * Makefile.in: Update copyright.
15874         * genmodsrc.sh: Likewise.
15875         * gensymlist.sh: Likewise.
15876         * term/i386/pc/vga.c: Indent correctly.
15878         * util/i386/pc/pupa-mkimage.c (usage): Use PACKAGE_BUGREPORT as
15879         bugreporting address.
15880         * util/i386/pc/pupa-setup.c (usage): Likewise,
15881         (main): Call pupa_ext2_init and pupa_ext2_fini.
15883         * fs/fat.c (log2): Renamed to ...
15884         (fat_log2): ... this.
15885         All callers changed.
15886         * kern/misc.c (memcpy): Alias to pupa_memmove.
15887         * loader/i386/pc/multiboot.c (pupa_rescue_cmd_multiboot): Fix
15888         lvalue cast.
15889         * util/console.c (pupa_ncurses_fini): Return 0.
15891         * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open)[__linux__]:
15892         Move fail label here.
15893         [__GNU__]: Don't warn when using stat.
15894         (open_device)[!__linux__]: Check if FD < 0 instead of !FD.
15895         (pupa_util_biosdisk_get_pupa_dev)[__GNU__]: Change type of N to
15896         long int. Use strtol instead of strtoul.
15898 2004-03-14  Marco Gerards  <metgerards@student.han.nl>
15900         * commands/boot.c: New file.
15901         * commands/cat.c: Likewise.
15902         * commands/cmp.c: Likewise.
15903         * commands/ls.c: Likewise.
15904         * commands/terminal.c: Likewise.
15905         * normal/command.c: Include <pupa/env.h> and <pupa/dl.h>.
15906         (pupa_register_command): Changed interface to match the new
15907         argument parser.
15908         (pupa_command_execute): Changed (almost rewritten) so it uses
15909         pupa_split_command.  Added support for setting variables using the
15910         syntax `foo=bar'.
15911         (rescue_command): Changed to work with the new argument parser.
15912         (terminal_command): Moved from here to commands/terminal.c.
15913         (set_command): New function.
15914         (unset_command): New function.
15915         (insmod_command): New function.
15916         (rmmod_command): New function.
15917         (lsmod_command): New function.
15918         (pupa_command_init): Don't initialize the command terminal
15919         anymore.  Initialize the commands set, unset, insmod, rmmod and
15920         lsmod.
15921         * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/env.c.
15922         (kernel_img_HEADERS): Add arg.h and env.h.
15923         (pupa_mkimage_LDFLAGS): Add kern/env.c.
15924         (pupa_emu_SOURCES): Add kern/env.c, commands/ls.c,
15925         commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c,
15926         normal/arg.c.
15927         (pkgdata_MODULES): Add ls.mod, boot.mod, cmp.mod, cat.mod and
15928         terminal.mod.
15929         (normal_mod_SOURCES): Add normal/arg.c and normal/arg.c.
15930         (boot_mod_SOURCES): New variable.
15931         (terminal_mod_SOURCES): Likewise.
15932         (ls_mod_SOURCES): Likewise.
15933         (cmp_mod_SOURCES): Likewise.
15934         (cat_mod_SOURCES): Likewise.
15936         * normal/arg.c: New file.
15937         * kern/env.c: Likewise.
15938         * include/pupa/arg.h: Likewise.
15939         * include/pupa/env.h: Likewise.
15940         * font/manager.c (font_command): Changed to match argument parsing
15941         interface changes.
15942         (PUPA_MOD_INIT): Likewise.
15943         * hello/hello.c (pupa_cmd_hello): Likewise.
15944         (PUPA_MOD_INIT): Likewise.
15945         * include/pupa/disk.h: Include <pupa/device.h>.
15946         (pupa_print_partinfo): New prototype.
15947         * include/pupa/dl.h (pupa_dl_set_prefix): Prototype removed.
15948         (pupa_dl_get_prefix): Likewise.
15949         * include/pupa/misc.h: Include <pupa/err.h>.
15950         (pupa_isgraph): New prototype.
15951         (pupa_isdigit): Likewise.
15952         (pupa_split_cmdline): Likewise.
15953         * include/pupa/normal.h: Include <pupa/arg.h>.
15954         (pupa_command): Changed the prototype of the member `func' to
15955         match the argument parsing interface.  Added member `options'.
15956         (pupa_register_command): Updated to match function.
15957         (pupa_arg_parse): New prototype.
15958         (pupa_hello_init) [PUPA_UTIL]: New prototype.
15959         (pupa_hello_fini) [PUPA_UTIL]: Likewise.
15960         (pupa_ls_init) [PUPA_UTIL]: Likewise.
15961         (pupa_ls_fini) [PUPA_UTIL]: Likewise.
15962         (pupa_cat_init) [PUPA_UTIL]: Likewise.
15963         (pupa_cat_fini) [PUPA_UTIL]: Likewise.
15964         (pupa_boot_init) [PUPA_UTIL]: Likewise.
15965         (pupa_boot_fini) [PUPA_UTIL]: Likewise.
15966         (pupa_cmp_init) [PUPA_UTIL]: Likewise.
15967         (pupa_cmp_fini) [PUPA_UTIL]: Likewise.
15968         (pupa_terminal_init) [PUPA_UTIL]: Likewise.
15969         (pupa_terminal_fini) [PUPA_UTIL]: Likewise.
15970         * kern/disk.c: Include <pupa/file.h>.
15971         (pupa_print_partinfo): New function.
15972         * kern/dl.c: Include <pupa/env.h>.
15973         (pupa_dl_dir): Variable removed.
15974         (pupa_dl_load): Use the environment variable `prefix' instead of
15975         the variable pupa_dl_dir.
15976         (pupa_dl_set_prefix): Function removed.
15977         (pupa_dl_get_prefix): Likewise.
15978         * kern/i386/pc/init.c: Include <pupa/env.h>.
15979         (pupa_machine_init): Use the environment variable `prefix' instead of
15980         using pupa_dl_set_prefix to set the prefix.
15981         * kern/main.c: Include <pupa/env.h>.
15982         (pupa_set_root_dev): Use the environment variable `prefix' instead of
15983         using pupa_dl_get_prefix to get the prefix.
15984         * kern/misc.c: Include <pupa/env.h>.
15985         (pupa_isdigit): New function.
15986         (pupa_isgraph): Likewise.
15987         (pupa_ftoa): Likewise.
15988         (pupa_vsprintf): Added support for printing values of the type
15989         `double'.  Make it possible to format variable output when using
15990         formatting like `%1.2%f'.
15991         (pupa_split_cmdline): New function.
15992         * kern/rescue.c: Include <pupa/env.h>.
15993         (next_word): Removed function.
15994         (pupa_rescue_cmd_prefix): Likewise.
15995         (pupa_rescue_cmd_set): New function.
15996         (pupa_rescue_cmd_unset): New function.
15997         (pupa_enter_rescue_mode): Use the `pupa_split_cmdline' function to
15998         split the command line instead of splitting it here.  Added
15999         support for setting variables using the syntax `foo=bar'.  Don't
16000         initialize the prefix command anymore.  Initialized the set and
16001         unset commands.
16002         * normal/cmdline.c: Include <pupa/env.h>.
16003         (pupa_tab_complete): Added prototypes for print_simple_completion,
16004         print_partition_completion, add_completion, iterate_commands,
16005         iterate_dev, iterate_part and iterate_dir. Moved code to print
16006         partition information from here to kern/disk.c.
16007         (pupa_cmdline_run): Don't check if the function exists anymore.
16008         * normal/main.c: Include <pupa/env.h>.
16009         (pupa_rescue_cmd_normal): Use the environment variable `prefix'
16010         instead of using pupa_dl_get_prefix to get the prefix.
16011         * term/i386/pc/vga.c: Include <pupa/arg.h>.
16012         (check_vga_mem): Cast pointers to `void *' to silence a gcc
16013         warning.
16014         (pupa_vga_putchar) [! DEBUG_VGA]: Removed for this case.
16015         (pupa_vga_setcolor): Declare unused variables with `__attribute__
16016         ((unused))' to silence a gcc warning.
16017         (pupa_vga_setcolor): Likewise.
16018         (debug_command): Changed to match argument parsing
16019         interface changes.
16020         * util/pupa-emu.c: Include <pupa/env.h>.
16021         (options): Added 0's for unused fields to silence a gcc warning.
16022         (argp): Likewise.
16023         (main): Use the environment variable `prefix' instead of using
16024         pupa_dl_set_prefix to set the prefix.  Initialize the commands ls,
16025         boot, cmp, cat and terminal.  Finish the commands boot, cmp, cat
16026         and terminal.
16028         * util/i386/pc/getroot.c: Include <pupa/i386/pc/util/biosdisk.h>.
16029         * util/misc.c: Include <malloc.h>.
16030         (pupa_malloc): Rewritten so errors are correctly reported.
16031         (pupa_realloc): Likewise.
16032         (pupa_memalign): Likewise.
16033         (pupa_mm_init_region): Declare unused variables with
16034         `__attribute__ ((unused))' to silence a gcc warning.
16035         * normal/i386/setjmp.S: Remove tab at the end of the file to
16036         silence a gcc warning.
16037         * loader/i386/pc/linux.c (pupa_rescue_cmd_initrd): Declare unused
16038         variables with `__attribute__ ((unused))' to silence a gcc
16039         warning.
16040         * loader/i386/pc/multiboot.c (pupa_multiboot_unload): Make the
16041         local variable i unsigned to silence a gcc warning.
16043         * kern/term.c: Include <pupa/misc.h>.
16044         (pupa_more_lines): New variable.
16045         (pupa_more): Likewise.
16046         (pupa_putcode): When the pager is active pause at the end of every
16047         screen.
16048         (pupa_set_more): New function.
16049         * include/pupa/term.h (pupa_set_more): New prototype.
16052 2004-03-07  Yoshinori K. Okuji  <okuji@enbug.org>
16054         Now this project is GRUB 2 rather than PUPA. The location of
16055         the CVS repository was moved to GRUB's.
16057         * configure.ac: Use bug-grub as the reporting address.
16058         Use GRUB instead of PUPA.
16059         Change the version number to 1.90.
16061 2004-02-24  Yoshinori K. Okuji  <okuji@enbug.org>
16063         * genkernsyms.sh: Updated copyright information.
16064         * genmk.rb: Likewise.
16065         * genmodsrc.sh: Likewise.
16066         * gensymlist.sh: Likewise.
16067         * boot/i386/pc/boot.S: Likewise.
16068         * boot/i386/pc/diskboot.S: Likewise.
16069         * disk/i386/pc/biosdisk.c: Likewise.
16070         * disk/i386/pc/partition.c: Likewise.
16071         * font/manager.c: Likewise.
16072         * fs/ext2.c: Likewise.
16073         * fs/fat.c: Likewise.
16074         * include/pupa/boot.h: Likewise.
16075         * include/pupa/device.h: Likewise.
16076         * include/pupa/disk.h: Likewise.
16077         * include/pupa/dl.h: Likewise.
16078         * include/pupa/elf.h: Likewise.
16079         * include/pupa/err.h: Likewise.
16080         * include/pupa/file.h: Likewise.
16081         * include/pupa/font.h: Likewise.
16082         * include/pupa/fs.h: Likewise.
16083         * include/pupa/kernel.h: Likewise.
16084         * include/pupa/loader.h: Likewise.
16085         * include/pupa/misc.h: Likewise.
16086         * include/pupa/mm.h: Likewise.
16087         * include/pupa/net.h: Likewise.
16088         * include/pupa/normal.h: Likewise.
16089         * include/pupa/rescue.h: Likewise.
16090         * include/pupa/setjmp.h: Likewise.
16091         * include/pupa/symbol.h: Likewise.
16092         * include/pupa/term.h: Likewise.
16093         * include/pupa/types.h: Likewise.
16094         * include/pupa/i386/setjmp.h: Likewise.
16095         * include/pupa/i386/types.h: Likewise.
16096         * include/pupa/i386/pc/biosdisk.h: Likewise.
16097         * include/pupa/i386/pc/boot.h: Likewise.
16098         * include/pupa/i386/pc/console.h: Likewise.
16099         * include/pupa/i386/pc/init.h: Likewise.
16100         * include/pupa/i386/pc/kernel.h: Likewise.
16101         * include/pupa/i386/pc/linux.h: Likewise.
16102         * include/pupa/i386/pc/loader.h: Likewise.
16103         * include/pupa/i386/pc/memory.h: Likewise.
16104         * include/pupa/i386/pc/multiboot.h: Likewise.
16105         * include/pupa/i386/pc/partition.h: Likewise.
16106         * include/pupa/i386/pc/time.h: Likewise.
16107         * include/pupa/i386/pc/vga.h: Likewise.
16108         * include/pupa/i386/pc/util/biosdisk.h: Likewise.
16109         * include/pupa/util/getroot.h: Likewise.
16110         * include/pupa/util/misc.h: Likewise.
16111         * include/pupa/util/resolve.h: Likewise.
16112         * kern/device.c: Likewise.
16113         * kern/disk.c: Likewise.
16114         * kern/dl.c: Likewise.
16115         * kern/err.c: Likewise.
16116         * kern/file.c: Likewise.
16117         * kern/fs.c: Likewise.
16118         * kern/loader.c: Likewise.
16119         * kern/main.c: Likewise.
16120         * kern/misc.c: Likewise.
16121         * kern/mm.c: Likewise.
16122         * kern/rescue.c: Likewise.
16123         * kern/term.c: Likewise.
16124         * kern/i386/dl.c: Likewise.
16125         * kern/i386/pc/init.c: Likewise.
16126         * kern/i386/pc/lzo1x.S: Likewise.
16127         * kern/i386/pc/startup.S: Likewise.
16128         * loader/i386/pc/chainloader.c: Likewise.
16129         * loader/i386/pc/linux.c: Likewise.
16130         * loader/i386/pc/multiboot.c: Likewise.
16131         * normal/cmdline.c: Likewise.
16132         * normal/command.c: Likewise.
16133         * normal/main.c: Likewise.
16134         * normal/menu.c: Likewise.
16135         * normal/i386/setjmp.S: Likewise.
16136         * term/i386/pc/console.c: Likewise.
16137         * term/i386/pc/vga.c: Likewise.
16138         * util/console.c: Likewise.
16139         * util/genmoddep.c: Likewise.
16140         * util/misc.c: Likewise.
16141         * util/pupa-emu.c: Likewise.
16142         * util/resolve.c: Likewise.
16143         * util/unifont2pff.rb: Likewise.
16144         * util/i386/pc/biosdisk.c: Likewise.
16145         * util/i386/pc/getroot.c: Likewise.
16146         * util/i386/pc/pupa-mkimage.c: Likewise.
16147         * util/i386/pc/pupa-setup.c: Likewise.
16149 2004-02-15  Jeroen Dekkers  <jeroen@dekkers.cx>
16151         * fs/ext2.c (pupa_ext2_read_file): Correct the value of BLOCKEND
16152         when it is EXT2_BLOCK_SIZE (data).  New argument READ_HOOK, all
16153         callers changed.  Set DATA->DISK->READ_HOOK to READ_HOOK before
16154         reading and reset it after reading.
16155         (pupa_ext2_close): Return PUPA_ERR_NONE.
16157         * include/pupa/i386/pc/linux.h (PUPA_LINUX_INITRD_MAX_ADDRESS):
16158         Correct value.
16159         (struct linux_kernel_header): Add kernel_version and
16160         initrd_addr_max.
16161         * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Check whether
16162         pupa_file_read succeeds.
16163         (pupa_rescue_cmd_initrd): Implement.
16165 2003-12-03  Marco Gerards  <metgerards@student.han.nl>
16167         * fs/ext2.c (pupa_ext2_label): New function.
16168         (pupa_ext2_fs): Added label.
16169         * fs/fat.c (pupa_fat_label): New function.
16170         (pupa_fat_fs): Added label.
16171         * include/pupa/fs.h (struct pupa_fs): Added prototype label.
16173         * kern/misc.c (pupa_strndup): New function.
16174         * include/pupa/misc.h (pupa_strndup): New prototype.
16176         * include/pupa/normal.h: Include <pupa/err.h>.
16177         (pupa_set_history): New prototype.
16178         (pupa_iterate_commands): New prototype.
16179         * normal/cmdline.c: Include <pupa/machine/partition.h>,
16180         <pupa/disk.h>, <pupa/file.h>.
16181         (hist_size): New variable.
16182         (hist_lines): Likewise.
16183         (hist_end): Likewise.
16184         (hist_used): Likewise.
16185         (pupa_set_history): New function.
16186         (pupa_history_get): Likewise.
16187         (pupa_history_add): Likewise.
16188         (pupa_history_replace): Likewise.
16189         (pupa_tab_complete): Likewise.
16190         (pupa_cmdline_run): Added tab completion and history buffer.  Tab
16191         completion shows partitionnames while completing partitions, this
16192         feature was suggested by Jeff Bailey.
16193         * normal/command.c (pupa_iterate_commands): New function.
16194         * normal/main.c (PUPA_DEFAULT_HISTORY_SIZE): New macro.
16195         (pupa_normal_init): Initialize history buffer.
16196         (PUPA_MOD_INIT): Likewise.
16197         (pupa_normal_fini): Free the history buffer.
16198         (PUPA_MOD_FINI): Likewise.
16200         * util/console.c (pupa_ncurses_getkey): Accept 127 as backspace
16201         key.
16203         * aclocal.m4 (pupa_I386_CHECK_REGPARM_BUG): New DEFUN.
16204         * configure.ac [i386]: Check for regparam bug.
16205         (NESTED_FUNC_ATTR) [! i386]: Defined.
16207 2003-11-17  Marco Gerards  <metgerards@student.han.nl>
16209         * conf/i386-pc.rmk (sbin_UTILITIES): Added pupa-emu.
16210         (pupa_setup_SOURCES): Added util/i386/pc/getroot.c.
16211         (pupa_emu_SOURCES): New variable.
16212         (pupa_emu_LDFLAGS): Likewise.
16213         * include/pupa/fs.h (pupa_ext2_init) [PUPA_UTIL]: New prototype.
16214         (pupa_ext2_fini) [PUPA_UTIL]: Likewise.
16215         * include/pupa/normal.h (pupa_normal_init) [PUPA_UTIL]: Likewise.
16216         (pupa_normal_fini) [PUPA_UTIL]: Likewise.
16217         * include/pupa/setjmp.h [PUPA_UTIL]: Include <setjmp.h>.
16218         (pupa_jmp_buf): New typedef.
16219         (pupa_setjmp) [PUPA_UTIL]: New macro.
16220         (pupa_longjmp) [PUPA_UTIL]: Likewise.
16221         * include/pupa/term.h (struct pupa_term): New member `refresh'.
16222         (pupa_refresh): New prototype.
16223         * include/pupa/util/getroot.h: New file.
16224         * kern/misc.c (pupa_vsprintf): Refresh the screen after updating
16225         it.
16226         * kern/rescue.c (pupa_rescue_get_command_line): Likewise.
16227         (pupa_rescue_cmd_cat): Likewise.
16228         (pupa_rescue_cmd_ls): Likewise.
16229         (pupa_rescue_cmd_testload): Likewise.
16230         (pupa_rescue_cmd_lsmod): Likewise.
16231         * normal/cmdline.c (pupa_cmdline_get): Likewise.
16232         * normal/menu.c (run_menu): Likewise.
16233         * kern/term.c (pupa_cls): Likewise.
16234         (pupa_refresh): New function.
16235         * normal/normal.c (pupa_normal_init) [PUPA_UTIL]: New function.
16236         (pupa_normal_fini) [PUPA_UTIL]: Likewise.
16237         * util/console.c: New file.
16239         * util/i386/pc/getroot.c: New file.
16240         * util/i386/pc/pupa-setup.c: Include <pupa/util/getroot.h>.
16241         (pupa_putchar): New function.
16242         (pupa_refresh): Likewise.
16243         (xgetcwd): Function moved to ...
16244         (strip_extra_slashes): Likewise.
16245         (get_prefix): Likewise.
16246         * util/i386/pc/getroot.c: ... here.
16247         (find_root_device): Function moved and renamed to...
16248         * util/i386/pc/getroot.c (pupa_find_root_device): ... here.
16249         Changed all callers.
16250         * util/i386/pc/pupa-setup.c (guess_root_device): Function moved
16251         and renamed to...
16252         * util/i386/pc/getroot.c (pupa_guess_root_device): ... here.
16253         Changed all callers.
16254         * util/misc.c (pupa_memalign): New function.
16255         (pupa_mm_init_region): Likewise.
16256         (pupa_register_exported_symbols): Likewise.
16257         (pupa_putchar): Function removed.
16258         * util/pupa-emu.c: New file.
16260 2003-11-16  Jeroen Dekkers  <jeroen@dekkers.cx>
16262         * conf/i386-pc.rmk (pkgdata_MODULES): Add _multiboot.mod.
16263         (_multiboot_mod_SOURCES): New variable.
16264         (_multiboot_mod_CFLAGS): Likewise.
16265         * loader/i386/pc/multiboot.c: New file.
16266         * include/pupa/i386/pc/multiboot.h: Likewise.
16267         * kern/i386/pc/startup.S: Include pupa/machine/multiboot.h.
16268         (pupa_multiboot_real_boot): New function.
16269         * include/pupa/i386/pc/loader.h: Include pupa/machine/multiboot.h.
16270         (pupa_multiboot_real_boot): New prototype.
16271         (pupa_rescue_cmd_multiboot): Likewise
16272         (pupa_rescue_cmd_module): Likewise.
16274         * kern/loader.c (pupa_loader_set): Continue when
16275         pupa_loader_unload_func() fails.
16276         (pupa_loader_unset): New function.
16277         * include/pupa/loader.h (pupa_loader_unset): New prototype.
16279         * kern/misc.c (pupa_stpcpy): New function.
16280         * include/pupa/misc.h (pupa_stpcpy): New prototype.
16282 2003-11-12  Marco Gerards  <metgerards@student.han.nl>
16284         * disk/i386/pc/biosdisk.c (pupa_biosdisk_open): Correctly check
16285         for available extensions.
16287         * include/pupa/i386/pc/time.h: New file.
16288         * kern/disk.c: Include <pupa/machine/time.h>.
16289         (PUPA_CACHE_TIMEOUT): New macro.
16290         (pupa_last_time): New variable.
16291         (pupa_disk_open): Flush the cache when there was a timeout.
16292         (pupa_disk_close): Reset the timer.
16293         * kern/i386/pc/startup.S (pupa_get_rtc): Renamed from
16294         pupa_currticks.
16295         * util/misc.c: Include <sys/times.h>
16296         (pupa_get_rtc): New function.
16298 2003-11-09  Jeroen Dekkers  <jeroen@dekkers.cx>
16300         * fs/ext2.c (struct pupa_ext2_inode): Declare struct datablocks
16301         as blocks.
16302         (pupa_ext2_get_file_block): Use blocks member.
16304         * fs/ext2.c (pupa_ext2_read_file): Only set skipfirst for the
16305         first block. Return -1 instead of pupa_errno on error.
16307 2003-10-27  Marco Gerards  <metgerards@student.han.nl>
16309         * README: In the pupa-mkimage example use _chain instead of chain
16310         and ext2 instead of fat.
16311         * TODO: Replace ext2fs with jfs as an example.  Add an item for
16312         adding journal playback for ext2fs.
16313         * conf/i386-pc.rmk (pupa_setup_SOURCES): Added fs/ext2.c.
16314         (pkgdata_MODULES): Added ext2.mod.
16315         (ext2_mod_SOURCES): New variable.
16316         (ext2_mod_CFLAGS): Likewise.
16317         * include/pupa/err.h (pupa_err_t): Added PUPA_ERR_SYMLINK_LOOP.
16318         * include/pupa/misc.h (pupa_strncpy): New prototype.
16319         (pupa_strcat): Likewise.
16320         (pupa_strncmp): Likewise.
16321         * kern/misc.c (pupa_strcat): Enable function.
16322         (pupa_strncpy): New function.
16323         (pupa_strncmp): Likewise.
16324         * fs/ext2.c: New file.
16326         * kern/disk.c (pupa_disk_read): Set pupa_errno to PUPA_ERR_NONE
16327         when the read failed before retrying.
16328         * util/i386/pc/biosdisk.c (_LARGEFILE_SOURCE): Removed.
16329         (_FILE_OFFSET_BITS): Likewise.
16330         * configure.ac: Added AC_SYS_LARGEFILE.
16332 2003-09-25  Yoshinori K. Okuji  <okuji@enbug.org>
16334         * genmk.rb (PModule#rule): Make sure to get only symbol names
16335         from the output of nm.
16336         Reported by Robert Millan <zeratul2@wanadoo.es>.
16338 2003-09-25  Yoshinori K. Okuji  <okuji@enbug.org>
16340         I forgot to check in these changes for a long time. This adds
16341         incomplete support for VGA console, and this is still very
16342         buggy. Also, a lot of consideration is required for I18N,
16343         UNICODE, and VGA font issues. Therefore, assume that this is
16344         such that "better than nothing".
16346         * font/manager.c: New file.
16347         * include/pupa/font.h: Likewise.
16348         * include/pupa/i386/pc/vga.h: Likewise.
16349         * term/i386/pc/vga.c: Likewise.
16350         * util/unifont2pff.rb: Likewise.
16352         * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vga.h.
16353         (pkgdata_MODULES): Added vga.mod and font.mod.
16354         (vga_mod_SOURCES): New variables.
16355         (vga_mod_CFLAGS): Likewise.
16356         (font_mod_SOURCES): Likewise.
16357         (font_mod_CFLAGS): Likewise.
16359         * include/pupa/err.h (PUPA_ERR_BAD_FONT): New constant.
16361         * include/pupa/term.h: Include pupa/err.h.
16362         (struct pupa_term): Added init and fini.
16363         Changed the argument of putchar to pupa_uint32_t.
16365         * include/pupa/i386/pc/console.h: Include pupa/symbol.h.
16366         (pupa_console_real_putchar): New prototype.
16367         (pupa_console_putchar): Removed.
16368         (pupa_console_checkkey): Exported.
16369         (pupa_console_getkey): Likewise.
16371         * kern/misc.c (pupa_vsprintf): Add support for UNICODE
16372         characters.
16374         * kern/term.c (pupa_term_set_current): Rewritten.
16375         (pupa_putchar): Likewise.
16376         (pupa_putcode): New function.
16378         * kern/i386/pc/startup.S (pupa_console_putchar): Renamed to ...
16379         (pupa_console_real_putchar): ... this.
16380         (pupa_vga_set_mode): New function.
16381         (pupa_vga_get_font): Likewise.
16383         * normal/command.c: Include pupa/term.h.
16384         (terminal_command): New function.
16385         (pupa_command_init): Register the command "terminal".
16387         * normal/menu.c (DISP_LEFT): Changed to a UNICODE value.
16388         (DISP_UP): Likewise.
16389         (DISP_RIGHT): Likewise.
16390         (DISP_DOWN): Likewise.
16391         (DISP_HLINE): Likewise.
16392         (DISP_VLINE): Likewise.
16393         (DISP_UL): Likewise.
16394         (DISP_UR): Likewise.
16395         (DISP_LL): Likewise.
16396         (DISP_LR): Likewise.
16398         * term/i386/pc/console.c (pupa_console_putchar): New function.
16400 2003-02-08  NIIBE Yutaka  <gniibe@m17n.org>
16402         * util/resolve.c (pupa_util_resolve_dependencies): BUG
16403         FIX. Reverse the path_list.
16405         * include/pupa/normal.h: Export pupa_register_command and
16406         pupa_unregister_command.
16408         * hello/hello.c (pupa_cmd_hello): New module.
16409         * conf/i386-pc.rmk: Added hello.mod.
16411 2003-01-31  Yoshinori K. Okuji  <okuji@enbug.org>
16413         * kern/i386/pc/lzo1x.S: New file.
16415         * util/i386/pc/pupa-mkimage.c: Include lzo1x.h.
16416         (compress_kernel): New variable.
16417         (generate_image): Heavily modified to support compressing a
16418         large part of the core image.
16420         * util/misc.c (pupa_util_read_image): Fix a file descriptor
16421         leak.
16422         (pupa_util_load_image): New function.
16424         * kern/i386/pc/startup.S: Include pupa/machine/kernel.h.
16425         (pupa_compressed_size): New variable.
16426         (codestart): Enable Gate A20 here.
16427         Decompress the compressed part of the core image.
16428         Rearrange the code to put functions and variables which are
16429         required for initialization in the non-compressed part.
16430         Include lzo1x.S.
16432         * kern/i386/pc/init.c (pupa_machine_init): Don't enable Gate A20
16433         here.
16435         * include/pupa/util/misc.h (pupa_util_write_image): Declared.
16437         * include/pupa/i386/pc/kernel.h
16438         (PUPA_KERNEL_MACHINE_COMPRESSED_SIZE): New macro.
16439         (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): Increased by 4.
16440         (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
16441         (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
16442         (PUPA_KERNEL_MACHINE_RAW_SIZE): New macro.
16444         * conf/i386-pc.rmk (pupa_mkimage_LDFLAGS): New variable.
16446         * genmk.rb (Image#rule): Put LDFLAGS at the end of a line.
16447         (Utility#rule): Likewise.
16449         * configure.ac: Check if LZO is available.
16451 2003-01-20  Yoshinori K. Okuji  <okuji@enbug.org>
16453         * include/pupa/normal.h: New file.
16454         * include/pupa/setjmp.h: Likewise.
16455         * include/pupa/i386/setjmp.h: Likewise.
16456         * normal/cmdline.c: Likewise.
16457         * normal/command.c: Likewise.
16458         * normal/main.c: Likewise.
16459         * normal/menu.c: Likewise.
16460         * normal/i386/setjmp.S: Likewise.
16462         * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Made global.
16463         (pupa_rescue_cmd_initrd): Likewise.
16465         * loader/i386/pc/chainloader.c (pupa_rescue_cmd_chainloader):
16466         Likewise.
16468         * kern/i386/pc/startup.S (translation_table): New variable.
16469         (translate_keycode): New function.
16470         (pupa_console_getkey): Call translate_keycode.
16472         * kern/rescue.c (attempt_normal_mode): New function.
16473         (pupa_enter_rescue_mode): Attempt to execute the normal mode. If
16474         it failed, print a message.
16476         * kern/mm.c (pupa_real_malloc): Print more information when a
16477         free magic is broken.
16478         (pupa_free): If the first free header is not free actually, set
16479         it to P.
16481         * kern/main.c (pupa_load_normal_mode): Just load the module
16482         "normal".
16483         (pupa_main): Don't print the message
16484         "Entering into rescue mode..." here.
16486         * include/pupa/i386/pc/loader.h (pupa_rescue_cmd_initrd):
16487         Declared.
16488         (pupa_rescue_cmd_initrd): Likewise.
16489         (pupa_rescue_cmd_initrd): Likewise.
16491         * include/pupa/symbol.h (FUNCTION): Specify the type.
16492         (VARIABLE): Likewise.
16494         * include/pupa/err.h (pupa_err_t): Added
16495         PUPA_ERR_UNKNOWN_COMMAND.
16497         * include/pupa/dl.h (pupa_dl_set_prefix): Exported.
16498         (pupa_dl_get_prefix): Likewise.
16500         * conf/i386-pc.rmk (pkgdata_MODULES): Added normal.mod.
16501         Added _chain.mod and _linux.mod instead of chain.mod and
16502         linux.mod.
16503         (chain_mod_SOURCES): Renamed to ...
16504         (_chain_mod_SOURCES): ... this.
16505         (chain_mod_CFLAGS): Renamed to ...
16506         (_chain_mod_CFLAGS): ... this.
16507         (linux_mod_SOURCES): Renamed to ...
16508         (_linux_mod_SOURCES): ... this.
16509         (linux_mod_CFLAGS): Renamed to ...
16510         (_linux_mod_CFLAGS): ... this.
16511         (normal_mod_SOURCES): New variable.
16512         (normal_mod_CFLAGS): Likewise.
16513         (normal_mod_ASFLAGS): Likewise.
16515 2003-01-18  Yoshinori K. Okuji  <okuji@enbug.org>
16517         * kern/rescue.c (pupa_rescue_cmd_rmmod): Call pupa_dl_unload, if
16518         possible.
16520         * kern/dl.c (pupa_dl_ref): Refer depending modules
16521         recursively.
16522         (pupa_dl_unref): Unrefer depending modules recursively.
16523         Don't call pupa_dl_unload implicitly, because PUPA can crash if
16524         a module is unloaded before one depending on that module is
16525         unloaded.
16526         (pupa_dl_unload): Unload depending modules explicitly,
16527         if possible.
16529 2003-01-17  Yoshinori K. Okuji  <okuji@enbug.org>
16531         * include/pupa/i386/pc/linux.h: New file.
16532         * loader/i386/pc/linux.c: Likewise.
16534         * loader/i386/pc/chainloader.c (pupa_chainloader_boot_sector):
16535         Removed.
16536         (pupa_chainloader_unload): Return PUPA_ERR_NONE.
16537         (pupa_rescue_cmd_chainloader): Read the image to 0x7C00 instead
16538         of PUPA_CHAINLOADER_BOOT_SECTOR.
16540         * kern/i386/pc/startup.S: Include pupa/machine/linux.h.
16541         (pupa_linux_prot_size): New variable.
16542         (pupa_linux_tmp_addr): Likewise.
16543         (pupa_linux_real_addr): Likewise.
16544         (pupa_linux_boot_zimage): New function.
16545         (pupa_linux_boot_bzimage): Likewise.
16547         * kern/i386/pc/init.c (struct mem_region): New structure.
16548         (MAX_REGIONS): New macro.
16549         (mem_regions): New variable.
16550         (num_regions): Likewise.
16551         (pupa_os_area_addr): Likewise.
16552         (pupa_os_area_size): Likewise.
16553         (pupa_lower_mem): Likewise.
16554         (pupa_upper_mem): Likewise.
16555         (add_mem_region): New function.
16556         (compact_mem_regions): Likewise.
16557         (pupa_machine_init): Set PUPA_LOWER_MEM and PUPA_UPPER_MEM to
16558         the size of the conventional memory and that of so-called upper
16559         memory (before the first memory hole).
16560         Instead of adding each found region to free memory, use
16561         add_mem_region and add them after removing overlaps.
16562         Also, add only 1/4 of the upper memory to free memory. The rest
16563         is used for loading OS images. Maybe this is ad hoc, but this
16564         makes it much easier to relocate OS images when booting.
16566         * kern/rescue.c (pupa_rescue_cmd_module): Removed.
16567         (pupa_enter_rescue_mode): Don't register initrd and module.
16569         * kern/mm.c: Include pupa/dl.h.
16571         * kern/main.c: Include pupa/file.h and pupa/device.h.
16573         * kern/loader.c (pupa_loader_load_module_func): Removed.
16574         (pupa_loader_load_module): Likewise.
16576         * kern/dl.c (pupa_dl_load): Use the suffix ``.mod'' instead of
16577         ``.o''.
16579         * include/pupa/i386/pc/loader.h (pupa_linux_prot_size): Declared.
16580         (pupa_linux_tmp_addr): Likewise.
16581         (pupa_linux_real_addr): Likewise.
16582         (pupa_linux_boot_zimage): Likewise.
16583         (pupa_linux_boot_bzimage): Likewise.
16585         * include/pupa/i386/pc/init.h (pupa_lower_mem): Declared.
16586         (pupa_upper_mem): Likewise.
16587         (pupa_gate_a20): Don't export, because turning off Gate A20 in a
16588         module is too dangerous.
16590         * include/pupa/loader.h (pupa_os_area_addr): Declared.
16591         (pupa_os_area_size): Likewise.
16592         (pupa_loader_set): Remove the first argument. Loader doesn't
16593         manage modules or initrd any longer.
16594         (pupa_loader_load_module): Removed.
16596         * conf/i386-pc.rmk (pkgdata_MODULES): Added linux.mod.
16597         (linux_mod_SOURCES): New variable.
16598         (linux_mod_CFLAGS): Likewise.
16600 2003-01-07  Yoshinori K. Okuji  <okuji@enbug.org>
16602         * util/i386/pc/pupa-setup.c (setup): Convert the endianness of
16603         the length of a blocklist correctly.
16605         * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open) [__linux__]:
16606         Use ioctl only if the OS file is a block device.
16607         (pupa_util_biosdisk_open): Don't use ST.ST_BLOCKS, because it is
16608         not very useful for normal files.
16610         * kern/main.c (pupa_set_root_dev): New function.
16611         (pupa_load_normal_mode): Likewise.
16612         (pupa_main): Call those above.
16614         * include/pupa/types.h (pupa_swap_bytes16): Cast the result to
16615         pupa_uint16_t.
16617         * include/pupa/kernel.h (pupa_enter_normal_mode): Removed.
16619 2003-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
16621         * util/i386/pc/pupa-setup.c: Include pupa/machine/kernel.h.
16622         (setup): Configure the installed partition information and the
16623         dl prefix.
16625         * loader/i386/pc/chainloader.c (my_mod): New variable.
16626         (pupa_chainloader_unload): New function.
16627         (pupa_rescue_cmd_chainloader): Refer itself.
16628         (PUPA_MOD_INIT): Save its own module in MY_MOD.
16630         * kern/i386/pc/startup.S (install_partition): Removed.
16631         (version_string): Likewise.
16632         (config_file): Likewise.
16633         (pupa_install_dos_part): New variable.
16634         (pupa_install_bsd_part): Likewise.
16635         (pupa_prefix): Likewise.
16636         (pupa_chainloader_real_boot): Call pupa_dl_unload_all.
16638         * kern/i386/pc/init.c: Include pupa/machine/kernel.h, pupa/dl.h
16639         and pupa/misc.h.
16640         (make_install_device): New function.
16641         (pupa_machine_init): Set the dl prefix.
16643         * kern/rescue.c: Include pupa/rescue.h and pupa/dl.h.
16644         (buf): Renamed to ...
16645         (linebuf): ... this.
16646         (pupa_rescue_cmd_prefix): New function.
16647         (pupa_rescue_cmd_insmod): Likewise.
16648         (pupa_rescue_cmd_rmmod): Likewise.
16649         (pupa_rescue_cmd_lsmod): Likewise.
16650         (pupa_enter_rescue_mode): Register new commands: prefix, insmod,
16651         rmmod and lsmod.
16653         * kern/mm.c (pupa_memalign): If failed even after invalidating
16654         disk caches, unload unneeded modules and retry.
16656         * kern/misc.c (pupa_memmove): New function.
16657         (pupa_memcpy): Removed.
16658         (pupa_strcpy): New function.
16659         (pupa_itoa): Made static.
16661         * kern/dl.c (pupa_dl_iterate): New function.
16662         (pupa_dl_ref): Likewise.
16663         (pupa_dl_unref): Likewise.
16664         (pupa_dl_unload): Return if succeeded or not.
16665         (pupa_dl_unload_unneeded): New function.
16666         (pupa_dl_unload_all): Likewise.
16667         (pupa_dl_init): Renamed to ...
16668         (pupa_dl_set_prefix): ... this.
16669         (pupa_dl_get_prefix): New function.
16671         * include/pupa/i386/pc/kernel.h: Include pupa/types.h.
16672         (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): New macro.
16673         (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
16674         (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
16675         (pupa_install_dos_part): Declared.
16676         (pupa_install_bsd_part): Likewise.
16677         (pupa_prefix): Likewise.
16678         (pupa_boot_drive): Likewise.
16680         * include/pupa/types.h: Fix a typo.
16682         * include/pupa/misc.h (pupa_memcpy): New macro. Just an alias to
16683         pupa_memmove.
16684         (pupa_memmove): Declared.
16685         (pupa_strcpy): Likewise.
16687         * include/pupa/dl.h (PUPA_MOD_INIT): Change the prototype. Now
16688         pupa_mod_init takes one argument, its own module.
16689         (pupa_dl_unload_unneeded): Declared.
16690         (pupa_dl_unload_all): Likewise.
16691         (pupa_dl_ref): Likewise.
16692         (pupa_dl_unref): Likewise.
16693         (pupa_dl_iterate): Likewise.
16694         (pupa_dl_init): Renamed to ...
16695         (pupa_dl_set_prefix): ... this.
16696         (pupa_dl_get_prefix): Declared.
16698         * fs/fat.c [!PUPA_UTIL] (my_mod): New variable.
16699         (pupa_fat_dir) [!PUPA_UTIL]: Prevent the fat module from being
16700         unloaded.
16701         (pupa_fat_open) [!PUPA_UTIL]: Refer itself if succeeded.
16702         (pupa_fat_close) [!PUPA_UTIL]: Unrefer itself.
16704         * configure.ac (tmp_CFLAGS): Added -Wshadow, -Wpointer-arith,
16705         -Wmissing-prototypes, -Wundef and -Wstrict-prototypes.
16707 2003-01-03  Yoshinori K. Okuji  <okuji@enbug.org>
16709         * util/i386/pc/pupa-setup.c (setup): Define the internal
16710         function find_first_partition_start at the top level, because GCC
16711         3.0.x cannot compile internal functions in deeper scopes
16712         correctly.
16713         (find_root_device): Use lstat instead of stat.
16714         Don't follow symbolic links.
16715         Fix the path-constructing code.
16717         * util/i386/pc/biosdisk.c [__linux__] (BLKFLSBUF): New macro.
16718         (pupa_util_biosdisk_open) [__linux__]: Get the size of a device
16719         by a BLKGETSIZE ioctl first, because block devices don't fill
16720         the member st_mode of the structure stat on Linux.
16721         [__linux__] (linux_find_partition): Use a temporary buffer
16722         REAL_DEV for the working space. Copy it to DEV before returning.
16723         (open_device) [__linux__]: Call ioctl with BLKFLSBUF to make the
16724         buffer cache consistent.
16725         (get_os_disk) [__linux__]: Use the length 5 instead of 4 for
16726         strncmp. The previous value was merely wrong.
16727         (pupa_util_biosdisk_get_pupa_dev): Use stat instead of lstat.
16729         * fs/fat.c (pupa_fat_read_data): Shift 4 instead of 12 when the
16730         FAT size is 12. The previous value was merely wrong.
16732         * kern/main.c (pupa_main): Don't split the starting message from
16733         newlines.
16735         * kern/term.c (pupa_putchar): Put CR after LF instead of before
16736         LF, because BIOS goes crazy about character attributes in this
16737         case.
16739 2003-01-03  Yoshinori K. Okuji  <okuji@enbug.org>
16741         * include/i386/pc/util/biosdisk.h: New file.
16742         * util/i386/pc/biosdisk.c: Likewise.
16743         * util/i386/pc/pupa-setup.c: Likewise.
16745         * Makefile.in (INCLUDE_DISTFILES): Added
16746         include/pupa/i386/pc/util/biosdisk.h.
16747         (UTIL_DISTFILES): Added biosdisk.c and pupa-setup.c under the
16748         directory util/i386/pc.
16749         (install-local): Added a rule for sbin_UTILITIES.
16750         (uninstall): Likewise.
16752         * util/i386/pc/pupa-mkimage.c (usage): Fix a typo in the doc.
16754         * util/misc.c (xrealloc): New function.
16755         (pupa_malloc): Likewise.
16756         (pupa_free): Likewise.
16757         (pupa_realloc): Likewise.
16758         (pupa_stop): Likewise.
16759         (pupa_putchar): Likewise.
16761         * kern/disk.c (pupa_disk_read): Prevent L from underflowing.
16763         * include/pupa/util/misc.h (xrealloc): Declared.
16765         * include/pupa/i386/pc/boot.h (PUPA_BOOT_MACHINE_BPB_START): New
16766         macro.
16767         (PUPA_BOOT_MACHINE_BPBEND): Renamed to ...
16768         (PUPA_BOOT_MACHINE_BPB_END): ... this.
16770         * include/pupa/fs.h [PUPA_UTIL] (pupa_fat_init): Declared.
16771         [PUPA_UTIL] (pupa_fat_fini): Likewise.
16773         * fs/fat.c [PUPA_UTIL] (pupa_fat_init): Defined. Maybe a better
16774         way should be implemented.
16775         [PUPA_UTIL] (pupa_fat_fini): Likewise.
16777         * disk/i386/pc/biosdisk.c (pupa_biosdisk_call_hook): Increase
16778         the size of NAME for safety.
16779         (pupa_biosdisk_iterate): Search hard disks to 0x90 instead of
16780         0x88.
16782         * conf/i386-pc.rmk (sbin_UTILITIES): New variable.
16783         (pupa_setup_SOURCES): Likewise.
16785         * genmk.rb (Utility#rule): Add $(BUILD_CFLAGS) into the rules.
16787 2002-12-28  Yoshinori K. Okuji  <okuji@enbug.org>
16789         * kern/i386/pc/startup.S (push_get_mmap_entry): Revert to a
16790         bunch of pushl's from pusha, because this destroys the return
16791         value.
16793 2002-12-28  Yoshinori K. Okuji  <okuji@enbug.org>
16795         Use -mrtd and -mregparm=3 to reduce the generated code sizes.
16796         This means that any missing prototypes could be fatal. Also, you
16797         must take care when writing assembly code. See the comments at
16798         the beginning of startup.S, for more details.
16800         * kern/i386/pc/startup.S (pupa_halt): Modified for the new
16801         compilation mechanism.
16802         (pupa_chainloader_real_boot): Likewise.
16803         (pupa_biosdisk_rw_int13_extensions): Likewise.
16804         (pupa_biosdisk_rw_standard): Likewise.
16805         (pupa_biosdisk_check_int13_extensions): Likewise.
16806         (pupa_biosdisk_get_diskinfo_int13_extensions): Likewise.
16807         (pupa_biosdisk_get_diskinfo_standard): Likewise.
16808         (pupa_get_memsize): Likewise.
16809         (pupa_get_mmap_entry): Likewise.
16810         (pupa_console_putchar): Likewise.
16811         (pupa_console_setcursor): Likewise.
16812         (pupa_getrtsecs): Use pushl instead of push.
16814         * kern/i386/pc/init.c (pupa_machine_init): Use the scratch
16815         memory instead of the stack for a mmap entry, because some
16816         BIOSes may ignore the maximum size and overflow.
16818         * conf/i386-pc.rmk (COMMON_CFLAGS): Added -mrtd and -mregparm=3.
16820         * genmk.rb (PModule#rule): Compile automatically generated
16821         sources with module-specific CFLAGS as well as other sources.
16823 2002-12-27  Yoshinori K. Okuji  <okuji@enbug.org>
16825         * configure.ac: Check ld.
16826         Replace CFLAGS and CPPFLAGS with BUILD_CFLAGS and BUILD_CPPFLAGS
16827         respectively, before checking endianness and sizes.
16829         * Makefile.in (LD): New variable.
16831 2002-12-27  Yoshinori K. Okuji  <okuji@enbug.org>
16833         * Makefile.in (BUILD_CC): CC -> BUILD_CC.
16835 2002-12-27  Yoshinori K. Okuji  <okuji@enbug.org>
16837         * Changelog: New file.