2009-05-26 Pavel Roskin <proski@gnu.org>
[grub2/phcoder.git] / ChangeLog
blob893a21c06738f947b0cb0b2d66e8264c4b16bece
1 2009-05-26  Pavel Roskin  <proski@gnu.org>
3         * genmk.rb: Avoid shadowing variable `s', rename the outer `s'
4         to `str'.
6         * util/getroot.c (grub_util_get_dev_abstraction): Mark os_dev as
7         possibly unused.
9 2009-05-25  Christian Franke  <franke@computer.org>
11         * disk/ata.c (grub_ata_wait_not_busy): Add debug output of status
12         register.
13         (grub_atapi_identify): Add wait after drive select.
14         (grub_ata_identify): Do more strict status register check before
15         calling grub_atapi_identify ().  Suppress error message if status
16         register is 0x00 after command failure.  Add status register
17         check after PIO read to avoid bogus identify due to stuck DRQ.
18         Thanks to Pavel Roskin for testing.
19         (grub_device_initialize): Remove unsafe status register check.
20         Thanks to 'phcoder' for problem report and patch.
21         Prevent sign extension in debug message.
23 2009-05-23  Colin D Bennett  <colin@gibibit.com>
25         Cleaned up `include/grub/normal.h'.  Grouped prototypes by
26         definition file, and functions defined in `normal/menu.c' have had
27         their prototypes moved to `include/grub/menu.h' for consistency.
29         * include/grub/menu.h (grub_menu_execute_callback): Added; moved
30         from normal.h.
31         (grub_menu_get_entry): Likewise.
32         (grub_menu_get_timeout): Likewise.
33         (grub_menu_set_timeout): Likewise.
34         (grub_menu_execute_entry): Likewise.
35         (grub_menu_execute_with_fallback): Likewise.
36         (grub_menu_entry_run): Likewise.
38         * include/grub/normal.h: Re-ordered and grouped function
39         prototypes by file that the function is defined in.
40         (grub_menu_execute_callback): Removed; moved to menu.h.
41         (grub_menu_get_entry): Likewise.
42         (grub_menu_get_timeout): Likewise.
43         (grub_menu_set_timeout): Likewise.
44         (grub_menu_execute_entry): Likewise.
45         (grub_menu_execute_with_fallback): Likewise.
46         (grub_menu_entry_run): Likewise.
47         (grub_menu_addentry): Renamed from this ...
48         (grub_normal_add_menu_entry): ... to this.
50         * normal/main.c (grub_menu_addentry): Renamed from this ...
51         (grub_normal_add_menu_entry): ... to this.
53         * script/sh/execute.c (grub_script_execute_menuentry): Update
54         reference to renamed grub_menu_addentry function.
56 2009-05-23  Felix Zielcke  <fzielcke@z-51.de>
58         * commands/i386/pc/drivemap.c (MODNAME): Remove. Update all users.
60 2009-05-22  Pavel Roskin  <proski@gnu.org>
62         * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Remove.
63         * configure.ac: Don't call grub_I386_CHECK_REGPARM_BUG.  Define
64         NESTED_FUNC_ATTR using AH_BOTTOM.  Use regparm(1) only when
65         compiling for the i386 targets, but not for the utilities.
67         * include/grub/i386/pc/kernel.h (grub_boot_drive): Change type
68         to grub_uint8_t.
69         (grub_root_drive): Likewise.
70         * kern/i386/pc/startup.S (grub_boot_drive): Change size to byte,
71         remove alignment.
72         (grub_root_drive): Change size to byte.
73         (grub_start_addr): Remove.
74         (grub_end_addr): Likewise.
75         (grub_apm_bios_info): Likewise.
77 2009-05-21  Felix Zielcke  <fzielcke@z-51.de>
79         * normal/i386: Remove.
80         * normal/powerpc: Likewise.
81         * normal/sparc64: Likewise.
82         * normal/x86_64: Likewise.
84 2009-05-19  Vladimir Serbinenko  <phcoder@gmail.com>
86         * conf/x86_64-efi.rmk (linux_mod_ASFLAGS): Add missing variable
87         * loader/i386/linux_trampoline.S: Fix identation
88         * loader/i386/xnu_helper.S: Likewise
90 2009-05-18  Colin D Bennett  <colin@gibibit.com>
92         Display error messages when parsing a Lua statement fails.
93         Previously, executing a syntactically invalid statement like
94         ")foo" or "bar;" would silently fail.
96         * script/lua/grub_main.c (handle_lua_error): New function.
97         (grub_lua_parse_line): Improved reporting of Lua parser and
98         execution errors.
100 2009-05-17  Vladimir Serbinenko  <phcoder@gmail.com>
102         Remove -Werror which causes build to fail on some systems
104         * conf/i386-pc.rmk (xnu_mod_CFLAGS): Remove -Werror -Wall
105         * conf/i386-efi.rmk (xnu_mod_CFLAGS): Likewise
106         * conf/x86_64-efi.rmk (xnu_mod_CFLAGS): Likewise
108 2009-05-17  Vladimir Serbinenko  <phcoder@gmail.com>
110         trampoline for linux on 64-bit platform
112         * conf/x86_64-efi.rmk (linux_mod_SOURCES): added
113         loader/i386/efi/linux_trampoline.S
114         * include/grub/x86_64/efi/loader.h (grub_linux_real_boot): removed
115         declration
116         * kern/x86_64/efi/startup.S (grub_linux_real_boot): moved from
117         here
118         * loader/i386/linux_trampoline.S: moved here
119         * loader/i386/efi/linux.c (allocate_pages): reserve space for
120         trampoline
121         (jumpvector): removed
122         (grub_linux_trampoline_start): new declaration
123         (grub_linux_trampoline_end): likewise
124         (grub_linux_boot): use trampoline when on 64-bit platform
125         * loader/i386/linux.c: likewise
127 2009-05-16  Pavel Roskin  <proski@gnu.org>
129         * script/lua/grub_lib.c (grub_lua_getenv): Make name and value
130         const to avoid a warning.
131         (grub_lua_setenv): Likewise.
132         * script/lua/grub_main.c (grub_lua_parse_line): Use size_t for
133         lmsg to fix a warning.
135 2009-05-16  Felix Zielcke  <fzielcke@z-51.de>
137         * conf/i386.rmk (setjmp_mod_CFLAGS): Rename to ...
138         (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
139         * conf/x86_64-efi.rmk (setjmp_mod_CFLAGS): Rename to ...
140         (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
141         * conf/powerpc-ieee1275.rmk (setjmp_mod_CFLAGS): Rename to ...
142         (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
143         * conf/sparc64-ieee1275.rmk (setjmp_mod_CFLAGS): Rename to ...
144         (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
146 2009-05-16  Felix Zielcke  <fzielcke@z-51.de>
148         * util/grub-mkconfig.in: Export GRUB_TERMINAL_INPUT.
150 2009-05-16  Bean  <bean123ch@gmail.com>
152         * conf/common.rmk (pkglib_MODULES): Add lua.mod.
153         (lua_mod_SOURCES): New variable.
154         (lua_mod_CFLAGS): Likewise.
155         (lua_mod_LDFLAGS): Likewise.
157         * conf/i386.rmk (pkglib_MODULES): Add setjmp.mod.
158         (setjmp_mod_SOURCES): New variable.
159         (setjmp_mod_CFLAGS): Likewise.
160         (setjmp_LDFLAGS): Likewise.
162         * conf/x86_64-efi.rmk (pkglib_MODULES): Add setjmp.mod.
163         (setjmp_mod_SOURCES): New variable.
164         (setjmp_mod_CFLAGS): Likewise.
165         (setjmp_LDFLAGS): Likewise.
167         * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add setjmp.mod.
168         (setjmp_mod_SOURCES): New variable.
169         (setjmp_mod_CFLAGS): Likewise.
170         (setjmp_LDFLAGS): Likewise.
172         * conf/sparc64-ieee1275.rmk (pkglib_MODULES): Add setjmp.mod.
173         (setjmp_mod_SOURCES): New variable.
174         (setjmp_mod_CFLAGS): Likewise.
175         (setjmp_LDFLAGS): Likewise.
177         * normal/i386/setjmp.S: Moved from here ...
178         * lib/i386/setjmp.S: ... Moved here
179         * normal/x86_64/setjmp.S: Moved from here ...
180         * lib/x86_64/setjmp.S: ... Moved here
181         * normal/powerpc/setjmp.S: Moved from here ...
182         * lib/powerpc/setjmp.S: ... Moved here
183         * normal/sparc64/setjmp.S: Moved from here ...
184         * lib/sparc64/setjmp.S: ... Moved here
186         * include/grub/i386/setjmp.h (grub_setjmp): Don't use attribute
187         returns_twice in mingw.
189         * script/lua/grub_lib.c: New file.
190         * script/lua/grub_lib.h: Likewise.
191         * script/lua/grub_lua.h: Likewise.
192         * script/lua/grub_main.c: Likewise.
193         * script/lua/lapi.c: Likewise.
194         * script/lua/lapi.h: Likewise.
195         * script/lua/lauxlib.c: Likewise.
196         * script/lua/lauxlib.h: Likewise.
197         * script/lua/lbaselib.c: Likewise.
198         * script/lua/lcode.c: Likewise.
199         * script/lua/lcode.h: Likewise.
200         * script/lua/ldblib.c: Likewise.
201         * script/lua/ldebug.c: Likewise.
202         * script/lua/ldebug.h: Likewise.
203         * script/lua/ldo.c: Likewise.
204         * script/lua/ldo.h: Likewise.
205         * script/lua/ldump.c: Likewise.
206         * script/lua/lfunc.c: Likewise.
207         * script/lua/lfunc.h: Likewise.
208         * script/lua/lgc.c: Likewise.
209         * script/lua/lgc.h: Likewise.
210         * script/lua/linit.c: Likewise.
211         * script/lua/liolib.c: Likewise.
212         * script/lua/llex.c: Likewise.
213         * script/lua/llex.h: Likewise.
214         * script/lua/llimits.h: Likewise.
215         * script/lua/lmathlib.c: Likewise.
216         * script/lua/lmem.c: Likewise.
217         * script/lua/lmem.h: Likewise.
218         * script/lua/loadlib.c: Likewise.
219         * script/lua/lobject.c: Likewise.
220         * script/lua/lobject.h: Likewise.
221         * script/lua/lopcodes.c: Likewise.
222         * script/lua/lopcodes.h: Likewise.
223         * script/lua/loslib.c: Likewise.
224         * script/lua/lparser.c: Likewise.
225         * script/lua/lparser.h: Likewise.
226         * script/lua/lstate.c: Likewise.
227         * script/lua/lstate.h: Likewise.
228         * script/lua/lstring.c: Likewise.
229         * script/lua/lstring.h: Likewise.
230         * script/lua/lstrlib.c: Likewise.
231         * script/lua/ltable.c: Likewise.
232         * script/lua/ltable.h: Likewise.
233         * script/lua/ltablib.c: Likewise.
234         * script/lua/ltm.c: Likewise.
235         * script/lua/ltm.h: Likewise.
236         * script/lua/lua.h: Likewise.
237         * script/lua/luaconf.h: Likewise.
238         * script/lua/lualib.h: Likewise.
239         * script/lua/lundump.c: Likewise.
240         * script/lua/lundump.h: Likewise.
241         * script/lua/lvm.c: Likewise.
242         * script/lua/lvm.h: Likewise.
243         * script/lua/lzio.c: Likewise.
244         * script/lua/lzio.h: Likewise.
246 2009-05-16  Bean  <bean123ch@gmail.com>
248         * include/grub/kernel.h (grub_module_header_types): Add type
249         OBJ_TYPE_CONFIG.
251         * kern/main.c (grub_load_config): New function.
252         (grub_main): Call grub_load_config to read boot config.
254         * grub-mkimage (generate_image): New parameter config_path.
255         (options): New option --config.
256         (main): Parse --config option, and pass it to generate_image.
258 2009-05-14  Christian Franke  <franke@computer.org>
260         * commands/i386/pc/drivemap_int13h.S: Add missing EXT_C for symbols.
261         This fixes build on Cygwin.
263 2009-05-14  Pavel Roskin  <proski@gnu.org>
265         * commands/i386/pc/drivemap_int13h.S: Eliminate unconditional
266         jump.  This saves two bytes, so the typical case of 2 swapped
267         drives would fit 32 bytes.
269 2009-05-13  Pavel Roskin  <proski@gnu.org>
271         * loader/i386/multiboot.c (grub_multiboot): Cast mmap_addr to
272         grub_uint32_t to avoid a warning.
274         * loader/i386/linux.c (allocate_pages): When assigning
275         real_mode_mem, cast through grub_size_t to fix a warning.  The
276         code already makes sure that the value would fit a pointer.
277         (grub_linux_setup_video): Cast render_target->data to
278         grub_size_t to fix a warning.
280 2009-05-13  Javier Martín  <lordhabbit@gmail.com>
282         * commands/i386/pc/drivemap.c: New file - implement drivemap
283         command.
284         * commands/i386/pc/drivemap_int13h.S: New file - int13 handler.
285         * conf/i386-pc.rmk: Add drivemap.c and drivemap_int13h.S.
287 2009-05-13  Pavel Roskin  <proski@gnu.org>
289         * util/i386/pc/grub-setup.c (setup): Remove unused variable
290         embedding_area_exists.
292 2009-05-13  Robert Millan  <rmh.grub@aybabtu.com>
294         * util/i386/pc/grub-setup.c (setup): Restructure code flow to make
295         it easier to understand / work with.
296         Improve warning messages for cases where there's no embedding area,
297         or when it is too small (or core.img too large).
299 2009-05-13  Pavel Roskin  <proski@gnu.org>
301         * loader/i386/pc/multiboot2.c: Add necessary includes for
302         grub_multiboot2_real_boot().
304         * fs/iso9660.c (grub_iso9660_iterate_dir): The file mode in the
305         PX record is always little-endian.  We only need the lower 2
306         bytes of the mode.
308         * fs/cpio.c: Use the same name "struct head" for tar and cpio to
309         facilitate code reuse.
310         (grub_cpio_mount): Use "struct head", not a char buffer.  This
311         fixes a warning reported by gcc 4.4.
313         * kernel/disk.c (grub_disk_read): Use void pointer for the
314         buffer.
315         (grub_disk_write): Use const void pointer for the buffer.
316         Adjust all callers.  Remove unnecessary casts.
318 2009-05-10  Robert Millan  <rmh.grub@aybabtu.com>
320         * util/i386/pc/grub-install.in: Update copyright year.
322 2009-05-09  Vladimir Serbinenko  <phcoder@gmail.com>
324         gptsync
326         * commands/gptsync.c: new file
327         * conf/common.rmk (pkglib_MODULES): add gptsync.mod
328         (gptsync_mod_SOURCES): new variable
329         (gptsync_mod_CFLAGS): likewise
330         (gptsync_mod_LDFLAGS): likewise
331         * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_NTFS):
332         new definition
333         (GRUB_PC_PARTITION_TYPE_HFS): likewise
334         * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/gptsync.c
335         * conf/i386-ieee1275.rmk: likewise
336         * conf/i386-pc.rmk: likewise
337         * conf/powerpc-ieee1275.rmk: likewise
339 2009-05-09  Vladimir Serbinenko  <phcoder@gmail.com>
341         Fixed grub-emu
343         * kern/dl.c (grub_dl_ref): omit when compiling grub-emu
344         (grub_dl_ref): likewise
346 2009-05-08  Robert Millan  <rmh.grub@aybabtu.com>
348         * util/i386/pc/grub-setup.c (setup): Factorize find_usable_region(),
349         split in two functions (one for msdos and one for gpt).
351 2009-05-08  Pavel Roskin  <proski@gnu.org>
353         * disk/raid.c (grub_raid_block_xor): Make buf2 constant, it's
354         not modified.
356         * disk/raid6_recover.c (grub_raid6_recover): Fix warnings about
357         uninitialized err[0] and err[1].  Rename them to bad1 and bad2.
358         Initialize them with -1.  Add sanity check for bad1.  Eliminate
359         nerr variable.
361 2009-05-08  David S. Miller  <davem@davemloft.net>
363         * util/sparc64/ieee1275/grub-ofpathname.c (main): Set progname.
365 2009-05-06  Robert Millan  <rmh.grub@aybabtu.com>
367         * util/i386/pc/grub-setup.c (setup): Fix check for embed region
368         existance.
370 2009-05-05  Felix Zielcke  <fzielcke@z-51.de>
372         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
373         `kern/rescue_reader.c', `kern/rescue_parser.c' and `normal/autofs.c'.
375 2009-05-05  David S. Miller  <davem@davemloft.net>
377         * util/sparc64/ieee1275/grub-install.in: Fix sed arg quoting.
379 2009-05-05  Pavel Roskin  <proski@gnu.org>
381         * include/grub/dl.h [GRUB_UTIL]: Provide inline implementations
382         of grub_dl_ref() and grub_dl_unref().
383         * commands/parttool.c: Remove preprocessor conditionals around
384         grub_dl_ref() and grub_dl_unref().
385         * fs/affs.c: Likewise.
386         * fs/afs.c: Likewise.
387         * fs/cpio.c: Likewise.
388         * fs/ext2.c: Likewise.
389         * fs/fat.c: Likewise.
390         * fs/hfs.c: Likewise.
391         * fs/hfsplus.c: Likewise.
392         * fs/iso9660.c: Likewise.
393         * fs/jfs.c: Likewise.
394         * fs/minix.c: Likewise.
395         * fs/ntfs.c: Likewise.
396         * fs/reiserfs.c: Likewise.
397         * fs/sfs.c: Likewise.
398         * fs/udf.c: Likewise.
399         * fs/ufs.c: Likewise.
400         * fs/xfs.c: Likewise.
401         * include/grub/dl.h: Likewise.
402         * loader/xnu.c: Likewise.
404 2009-05-04  Pavel Roskin  <proski@gnu.org>
406         * commands/acpi.c: Remove unused variable my_mod.
407         * partmap/amiga.c: Likewise.
408         * partmap/apple.c: Likewise.
409         * partmap/gpt.c: Likewise.
410         * partmap/pc.c: Likewise.
411         * partmap/sun.c: Likewise.
412         * term/gfxterm.c: Likewise.
413         * term/i386/pc/vesafb.c: Likewise.
414         * term/i386/pc/vga.c: Likewise.
416 2009-05-04  David S. Miller  <davem@davemloft.net>
418         * kern/ieee1275/openfw.c (grub_children_iterate): Fix string
419         pointer args to grub_ieee1275_get_property().
421         * conf/sparc64-ieee1275.rmk: Fix build due to missing '\'.
423         * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Bypass cdrom
424         devices, and do not traverse down under controller nodes.
426         * disk/ieee1275/ofdisk.c (compute_dev_path): New.
427         (grub_ofdisk_open): Use it to un-escape "," characters.
428         * kern/disk.c (find_part_sep): New.
429         (grub_disk_open): Use it to find the first non-escaped ','
430         character in the disk name.
431         * util/ieee1275/devicemap.c (escape_of_path): New.
432         (grub_util_emit_devicemap_entry): Use it.
433         * util/sparc64/ieee1275/grub-install.in: Update script to
434         strip partition specifiers properly by not triggering on
435         '\' escaped ',' characters.
437 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
439         * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START): Set
440         to 0x300.
441         * loader/i386/linux.c (vga_modes, linux_vesafb_res): Add a few
442         resolutions.
443         (linux_vesafb_modes): Add a lot of additional modes to the list (based
444         on documentation from Wikipedia).
446 2009-05-04  Pavel Roskin  <proski@gnu.org>
448         * disk/ata.c: Spelling fixes.
449         * disk/raid.c: Likewise.
450         * disk/usbms.c: Likewise.
451         * disk/dmraid_nvidia.c: Likewise.
452         * kern/ieee1275/openfw.c: Likewise.
453         * kern/ieee1275/init.c: Likewise.
454         * kern/ieee1275/cmain.c: Likewise.
455         * boot/i386/pc/cdboot.S: Likewise.
456         * video/readers/png.c: Likewise.
457         * video/i386/pc/vbe.c: Likewise.
458         * fs/udf.c: Likewise.
459         * fs/hfs.c: Likewise.
460         * fs/reiserfs.c: Likewise.
461         * efiemu/runtime/efiemu.c: Likewise.
462         * efiemu/main.c: Likewise.
463         * efiemu/mm.c: Likewise.
464         * include/grub/elf.h: Likewise.
465         * include/grub/xnu.h: Likewise.
466         * include/grub/usbdesc.h: Likewise.
467         * include/grub/usb.h: Likewise.
468         * include/grub/script_sh.h: Likewise.
469         * include/grub/lib/LzmaEnc.h: Likewise.
470         * include/grub/efiemu/efiemu.h: Likewise.
471         * include/grub/command.h: Likewise.
472         * normal/menu.c: Likewise.
473         * normal/main.c: Likewise.
474         * normal/datetime.c: Likewise.
475         * bus/usb/uhci.c: Likewise.
476         * mmap/i386/uppermem.c: Likewise.
477         * mmap/mmap.c: Likewise.
478         * commands/acpi.c: Likewise.
479         * commands/test.c: Likewise.
480         * partmap/apple.c: Likewise.
481         * font/font.c: Likewise.
482         * loader/sparc64/ieee1275/linux.c: Likewise.
483         * loader/macho.c: Likewise.
484         * loader/i386/bsd_trampoline.S: Likewise.
485         * loader/i386/bsd.c: Likewise.
486         * loader/xnu.c: Likewise.
487         * term/i386/pc/vesafb.c: Likewise.
488         * term/usb_keyboard.c: Likewise.
489         * util/resolve.c: Likewise.
490         * util/getroot.c: Likewise.
492 2009-05-04  Felix Zielcke  <fzielcke@z-51.de>
494         * conf/i386-pc.rmk (libpkg_DATA): Rename to pkglib_DATA.
496 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
498         * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (grub_cmd_linux): Fix
499         build error.
501 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
503         * loader/i386/linux.c (grub_cmd_linux): Make "vga=" compatibility
504         parameter only available on BIOS.
506 2009-05-04  Vladimir Serbinenko  <phcoder@gmail.com>
508         Removed wrong semicolon in declaration
510         * grub/misc.h (grub_dprintf): remove semicolon
512 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
514         * loader/i386/linux.c (GRUB_ASSUME_LINUX_HAS_FB_SUPPORT): New macro.
515         (grub_linux_boot): Don't check for `linux_vesafb_modes' bounds (this
516         is done by grub_cmd_linux() now).
517         [! GRUB_ASSUME_LINUX_HAS_FB_SUPPORT]: If "vga=" parameter wasn't set,
518         restore video to text mode.
519         (grub_cmd_linux): Default `vid_mode' initialization to 0, which
520         indicates lack of "vga=" parameter.  "vga=0" is mapped to
521         `GRUB_LINUX_VID_MODE_NORMAL'.
523 2009-05-04  Felix Zielcke  <fzielcke@z-51.de>
525         * conf/i386-efi.rmk (grub_emu_SOURCES): Remove `normal/execute.c',
526         `normal/lexer.c', `kern/rescue.c', `normal/function.c', `normal/misc.c'
527         and `normal/script.c'.  Add `kern/rescue_reader.c',
528         `kern/rescue_parser.c', `script/sh/main.c', `script/sh/execute.c',
529         `script/sh/function.c', `script/sh/lexer.c', `script/sh/script.c' and
530         `grub_script.tab.c'.
532         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
533         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
534         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
535         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
536         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
538         * Makefile.in: Remove duplicated 2008 in Copyright line.
540 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
542         * util/misc.c (grub_util_warn): New function.  Emmits a warning
543         unconditionally.
544         * include/grub/util/misc.h (grub_util_warn): New declaration.
546         * util/i386/pc/grub-install.in: Understand --force and pass it down
547         to grub-setup.
549         * util/i386/pc/grub-setup.c (main): Understand --force and pass it
550         down to setup().
551         (setup): Improve error messages and add warnings when requested to
552         install in odd layouts.  Refuse to install using blocklists unless
553         --force was set.
555 2009-05-04  martin f. krafft  <madduck@madduck.net>
557         * disk/raid.c (grub_raid_scan_device): Improve debug message.
559 2009-05-04  Vladimir Serbinenko  <phcoder@gmail.com>
561         Updated copyright year
563         * fs/hfsplus.c: updated copyright year
565 2009-05-04  Vladimir Serbinenko  <phcoder@gmail.com>
567         HFS+ UUID
569         * fs/hfsplus.c (grub_hfsplus_volheader): added num_serial field
570         in the space previously used by unused3
571         (grub_hfsplus_uuid): new function
572         (grub_hfsplus_fs): added uuid field
574 2009-05-03  Pavel Roskin  <proski@gnu.org>
576         * disk/ata.c: Don't cast mod to void in GRUB_MOD_INIT to
577         suppress warnings.  It's no longer needed.
578         * disk/host.c: Likewise.
579         * disk/ata_pthru.c: Likewise.
580         * disk/loopback.c: Likewise.
581         * hook/datehook.c: Likewise.
582         * parttool/pcpart.c: Likewise.
583         * fs/i386/pc/pxe.c: Likewise.
584         * fs/ntfscomp.c: Likewise.
585         * efiemu/main.c: Likewise.
586         * mmap/mmap.c: Likewise.
587         * commands/crc.c: Likewise.
588         * commands/hexdump.c: Likewise.
589         * commands/hdparm.c: Likewise.
590         * commands/acpi.c: Likewise.
591         * commands/echo.c: Likewise.
592         * commands/minicmd.c: Likewise.
593         * commands/blocklist.c: Likewise.
594         * commands/memrw.c: Likewise.
595         * commands/loadenv.c: Likewise.
596         * commands/usbtest.c: Likewise.
597         * commands/lsmmap.c: Likewise.
598         * commands/boot.c: Likewise.
599         * commands/parttool.c: Likewise.
600         * commands/configfile.c: Likewise.
601         * commands/search.c: Likewise.
602         * commands/ieee1275/suspend.c: Likewise.
603         * commands/cat.c: Likewise.
604         * commands/i386/pc/pxecmd.c: Likewise.
605         * commands/i386/pc/play.c: Likewise.
606         * commands/i386/pc/halt.c: Likewise.
607         * commands/i386/pc/vbeinfo.c: Likewise.
608         * commands/i386/pc/vbetest.c: Likewise.
609         * commands/lspci.c: Likewise.
610         * commands/date.c: Likewise.
611         * commands/handler.c: Likewise.
612         * commands/ls.c: Likewise.
613         * commands/test.c: Likewise.
614         * commands/cmp.c: Likewise.
615         * commands/efi/loadbios.c: Likewise.
616         * commands/efi/fixvideo.c: Likewise.
617         * commands/halt.c: Likewise.
618         * commands/help.c: Likewise.
619         * commands/reboot.c: Likewise.
620         * hello/hello.c: Likewise.
621         * script/sh/main.c: Likewise.
622         * loader/xnu.c: Likewise.
623         * term/terminfo.c: Likewise.
624         * term/i386/pc/serial.c: Likewise.
625         * term/usb_keyboard.c: Likewise.
627 2009-05-03  David S. Miller  <davem@davemloft.net>
629         * normal/menu.c: Include grub/parser.h
631 2009-05-03  Pavel Roskin  <proski@gnu.org>
633         * mmap/efi/mmap.c (grub_mmap_malign_and_register): Return void*,
634         not char*.
635         * mmap/i386/mmap.c (grub_mmap_malign_and_register): Likewise.
636         Suggested by Javier Martín <lordhabbit@gmail.com>
638         * util/i386/pc/grub-mkrescue.in: Allow for the case when
639         efiemu??.o doesn't exist.
640         * util/i386/pc/grub-install.in: Likewise.  Use "cp -f" for
641         copying.
643 2009-05-03  Bean  <bean123ch@gmail.com> Vladimir Serbinenko  <phcoder@gmail.com>
645         FreeBSD 64-bit support
647         * conf/i386-pc.rmk (bsd_mod_SOURCES): add loader/i386/bsd_helper.S
648         and loader/i386/bsd_trampoline.S
649         (bsd_mod_ASFLAGS): new variable
650         * include/grub/i386/bsd.h (FREEBSD_MODINFOMD_SMAP): new definition
651         (FREEBSD_MODTYPE_KERNEL64): likewise
652         (grub_bsd64_trampoline_start): likewise
653         (grub_bsd64_trampoline_end): likewise
654         (grub_bsd64_trampoline_selfjump): likewise
655         (grub_bsd64_trampoline_gdt): likewise
656         * include/grub/i386/loader.h (grub_unix_real_boot): moved from here ...
657         * include/grub/i386/bsd.h (grub_unix_real_boot): ... moved here
658         * kern/i386/loader.S (grub_unix_real_boot): moved from here ...
659         * loader/i386/bsd_helper.S (grub_unix_real_boot): moved here
660         * include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type
661         of "attrib" member
662         * loader/i386/bsd_pagetable.c: new file
663         * loader/i386/bsd_trampoline.S: likewise
664         * loader/i386/bsd.c (ALIGN_QWORD): new macro
665         (ALIGN_VAR): likewise
666         (entry_hi): new variable
667         (kern_end_mdofs): likewise
668         (is_64bit): likewise
669         (grub_freebsd_add_meta): use ALIGN_VAR
670         (grub_e820_mmap): new declaration
671         (grub_freebsd_add_mmap): new function
672         (grub_freebsd_add_meta_module): support 64 bit kernels
673         (grub_freebsd_list_modules): use ALIGN_VAR
674         (gdt_descriptor): new declaration
675         (grub_freebsd_boot): support 64 bit kernels
676         (grub_bsd_elf64_hook): new function
677         (grub_bsd_load_elf): support elf64
679 2009-05-03  Bean  <bean123ch@gmail.com>
681         * script/sh/execute.c (grub_script_execute_cmdif): Reset grub_errno
682         after we get the result of if statement.
684 2009-05-03  Bean  <bean123ch@gmail.com>
686         * Makefile.in (enable_efiemu): New variable.
688         * conf/i386-pc.rmk: Only compile efiemu runtimes when enable_efiemu is
689         set.
690         (efiemu32.o): Use macro $< for source file, add $(srcdir) to include
691         path.
692         (efi64_c.o): Use macro $< for source file, add $(srcdir) to include
693         path, add -mno-red-zone option.
694         (efiemu64_s.o): Likewise.
695         (efiemu64.o): Use macro $^ for source file.
697         * configure.ac (--enable-efiemu): New option.
699 2009-05-03  Vladimir Serbinenko  <phcoder@gmail.com>
701         xnu support
703         * conf/i386-efi.rmk (kernel_mod_HEADERS): added i386/pit.h
704         (pkglib_MODULES): add xnu.mod
705         (xnu_mod_SOURCES): new variable
706         (xnu_mod_CFLAGS): likewise
707         (xnu_mod_LDFLAGS): likewise
708         (xnu_mod_ASFLAGS): likewise
709         * conf/i386-pc.rmk: likewise
710         * conf/x86_64-efi.rmk: likewise
711         * include/grub/efi/efi.h (grub_efi_finish_boot_services):
712         new declaration
713         * include/grub/i386/macho.h: new file
714         * include/grub/i386/xnu.h: likewise
715         * include/grub/macho.h: likewise
716         * include/grub/machoload.h: likewise
717         * include/grub/x86_64/macho.h: likewise
718         * include/grub/x86_64/xnu.h: likewise
719         * include/grub/xnu.h: likewise
720         * kern/efi/efi.c (grub_efi_finish_boot_services): new function
721         * kern/efi/mm.c (MAX_HEAP_SIZE): increase
722         * loader/i386/efi/xnu.c: new file
723         * loader/i386/pc/xnu.c: likewise
724         * loader/i386/xnu.c: likewise
725         * loader/i386/xnu_helper.S: likewise
726         * loader/macho.c: likewise
727         * loader/xnu.c: likewise
728         * loader/xnu_resume.c: likewise
729         * util/grub-dumpdevtree: likewise
730         * include/grub/i386/pit.h: include grub/err.h
731         (grub_pit_wait): export
732         * util/grub.d/30_os-prober.in: support Darwin/Mac OS X
734 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
736         Efiemu
738         * conf/i386-pc.rmk: new modules efiemu, efiemu_acpi, efiemu_pnvram,
739         _linux_efi, linux_efi.
740         new files in grub-emu
741         new targets efiemu32.o and efiemu64.o
742         * loader/linux_normal_efiemu.c: likewise
743         * loader/i386/efi/linux.c: added preliminary efiemu support
744         * util/i386/pc/grub-install.in: add efiemu??.o to the list of
745         files to copy
746         * include/grub/autoefi.h: new file
747         * include/grub/i386/efiemu.h: likewise
748         * include/grub/i386/pc/efiemu.h: likewise
749         * include/grub/efi/api.h: add LL suffix when necessary
750         new definitions relating to tables
751         * include/grub/efiemu/efiemu.h: new file
752         * include/grub/efiemu/runtime.h: likewise
753         * efiemu/prepare.c: likewise
754         * efiemu/loadcore_common.c: likewise
755         * efiemu/loadcore64.c: likewise
756         * efiemu/runtime/efiemu.sh: likewise
757         * efiemu/runtime/efiemu.S: likewise
758         * efiemu/runtime/efiemu.c: likewise
759         * efiemu/runtime/config.h: likewise
760         * efiemu/prepare32.c: likewise
761         * efiemu/main.c: likewise
762         * efiemu/modules/pnvram.c: likewise
763         * efiemu/modules/i386: likewise
764         * efiemu/modules/i386/pc: likewise
765         * efiemu/modules/acpi.c: likewise
766         * efiemu/i386/pc/cfgtables.c: likewise
767         * efiemu/i386/loadcore64.c: likewise
768         * efiemu/i386/loadcore32.c: likewise
769         * efiemu/prepare64.c: likewise
770         * efiemu/loadcore.c: likewise
771         * efiemu/symbols.c: likewise
772         * efiemu/mm.c: likewise
773         * efiemu/loadcore32.c: likewise
775 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
777         ACPI spoofing
779         * commands/acpi.c: new file
780         * commands/i386/pc/acpi.c: likewise
781         * commands/efi/acpi.c: likewise
782         * include/grub/acpi.h: likewise
783         * conf/i386-pc.rmk (pkglib_MODULES): added acpi.mod
784         (acpi_mod_SOURCES): new variable
785         (acpi_mod_CFLAGS): likewise
786         (acpi_mod_LDFLAGS): likewise
787         * conf/i386-efi.rmk: likewise
788         * conf/x86_64-efi.rmk: likewise
790 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
792         Missing part from mmap patch
794         * mmap/efi/mmap.c (grub_machine_mmap_unregister): renamed to
795         (grub_mmap_unregister)
796         (grub_mmap_free_and_unregister): use grub_mmap_register
798 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
800         Mmap services
802         * loader/i386/efi/linux.c (grub_linux_boot): use grub_mmap_iterate
803         * loader/i386/linux.c (find_mmap_size): likewise
804         (allocate_pages): likewise
805         * loader/i386/multiboot.c (grub_get_multiboot_mmap_len): likewise
806         (grub_fill_multiboot_mmap): likewise
807         (grub_multiboot): use grub_mmap_get_lower and grub_mmap_get_upper
808         * loader/i386/pc/linux.c (grub_cmd_linux): use grub_mmap_get_lower
809         * include/grub/i386/bsd.h (OPENBSD_MMAP_AVAILABLE): new definition
810         (OPENBSD_MMAP_RESERVED): likewise
811         * include/grub/i386/pc/memory.h: include grub/memory.h
812         (grub_lower_mem): removed
813         (grub_upper_mem): likewise
814         (GRUB_MACHINE_MEMORY_ACPI): new definition
815         (GRUB_MACHINE_MEMORY_NVS): likewise
816         (GRUB_MACHINE_MEMORY_MAX_TYPE): likewise
817         (GRUB_MACHINE_MEMORY_HOLE): likewise
818         (grub_machine_mmap_register): likewise
819         (grub_machine_mmap_unregister): likewise
820         (grub_machine_get_upper): likewise
821         (grub_machine_get_lower): likewise
822         (grub_machine_get_post64): likewise
823         * include/grub/i386/efi/memory.h: new file
824         * include/grub/x86_64/efi/memory.h: likewise
825         * include/grub/efi/memory.h: likewise
826         * conf/i386-pc.rmk (pkglib_MODULES): added mmap.mod
827         (mmap_mod_SOURCES): new variable
828         (mmap_mod_LDFLAGS): likewise
829         (mmap_mod_ASFLAGS): likewise
830         * conf/i386-coreboot.rmk: likewise
831         * conf/i386-ieee1275.rmk: likewise
832         * conf/i386-efi.rmk: likewise
833         * conf/x86_64-efi.rmk: likewise
834         * include/grub/types.h (UINT_TO_PTR): new macro
835         (PTR_TO_UINT32): likewise
836         (PTR_TO_UINT64): likewise
837         * include/grub/memory.h: new file
838         * mmap/i386/pc/mmap.c: likewise
839         * mmap/i386/pc/mmap_helper.S: likewise
840         * mmap/i386/uppermem.c: likewise
841         * mmap/mmap.c: likewise
842         * mmap/efi/mmap.c: likewise
843         * kern/i386/coreboot/init.c (grub_machine_init): don't use
844         grub_upper_mem
845         * kern/i386/pc/init.c (grub_lower_mem): removed variable
846         (grub_upper_mem): likewise
847         (grub_machine_init): don't use grub_upper_mem,
848         make grub_lower_mem local
849         * loader/i386/bsd.c (grub_openbsd_boot): use grub_mmap_get_lower,
850         grub_mmap_iterate and grub_mmap_get_upper
851         (grub_netbsd_boot): use grub_mmap_get_lower and grub_mmap_get_upper
853 2009-05-02  Bean  <bean123ch@gmail.com>
855         * conf/common.rmk (grub_script.tab.c): Change normal/parser.y to
856         script/sh/parser.y.
857         (pkglib_MODULES): Add normal.mod and sh.mod.
858         (normal_SOURCES): New variable.
859         (normal_mod_CFLAGS): Likewise.
860         (normal_mod_LDFLAGS): Likewise.
861         (sh_mod_SOURCES): Likewise.
862         (sh_mod_CFLAGS): Likewise.
863         (sh_mod_LDFLAGS): Likewise.
865         * conf/i386-pc.rmk (normal/lexer.c_DEPENDENCIES): Changed to
866         script/sh/lexer.c_DEPENDENCIES.
867         (kernel_img_SOURCES): Remove kern/rescue.c, and kern/reader.c,
868         kern/rescue_reader.c and kern/rescue_parser.c.
869         (kernel_img_HEADERS): Remove rescue.h, add reader.h.
870         (grub_emu_SOURCES): Change source files.
871         (pkglib_MODULES): Remove normal.mod.
872         (normal_SOURCES): Removed.
873         (normal_mod_CFLAGS): Likewise.
874         (normal_mod_LDFLAGS): Likewise.
875         * conf/i386-coreboot.rmk: Likewise.
876         * conf/i386-efi.rmk: Likewise.
877         * conf/i386-ieee1276.rmk: Likewise.
878         * conf/powerpc-ieee1275.rmk: Likewise.
879         * conf/sparc64-ieee1275.rmk: Likewise.
880         * conf/x86_64-efi.rmk: Likewise.
882         * include/grub/command.h (grub_command_execute): New inline function.
884         * include/grub/menu.h (grub_menu_entry): Removed commands field.
886         * include/grub/normal.h: Remove <grub/setjmp.h>.
887         (grub_fs_module_list): Moved to normal/autofs.c.
888         (grub_exit_env): Removed.
889         (grub_command_execute): Likewise.
890         (grub_normal_menu_addentry): Renamed to grub_menu_addentry, removed
891         parameter script.
892         (read_command_list): New function declaration.
893         (read_fs_list): Likewise.
895         * include/parser.h: Include <grub/reader.h>.
896         (grub_parser_split_cmdline): Change type of getline parameter.
897         (grub_parser): New structure.
898         (grub_parser_class): New variable.
899         (grub_parser_execute): New function declaration.
900         (grub_register_rescue_parser): Likewise.
901         (grub_parser_register): New inline function.
902         (grub_parser_unregister): Likewise.
903         (grub_parser_get_current): Likewise.
904         (grub_parser_set_current): Likewise.
906         * include/grub/reader.h: New file.
907         * kern/reader.c: Likewise.
908         * kern/rescue_parser.c: Likewise.
909         * kern/rescue_reader.c: Likewise.
910         * normal/autofs.c: Likewise.
911         * normal/dyncmd.c: Likewise.
913         * include/grub/rescue.h: Removed.
914         * normal/command.h: Likewise.
916         * include/grub/script.h: Moved to ...
917         * include/grub/script_sh.h: ... Moved here.
918         * normal/execute.c: Moved to ...
919         * script/sh/execute.c: ... Moved here.
920         * normal/function.c: Moved to ...
921         * script/sh/function.c: ... Moved here.
922         * normal/lexer.c: Moved to ...
923         * script/sh/lexer.c: ... Moved here.
924         * normal/parser.y: Moved to ...
925         * script/sh/parser.y: ... Moved here.
926         * normal/script.c: Moved to ...
927         * script/sh/script.c: ... Moved here.
929         * normal/main.c: Remove <grub/rescue.h> and <grub/script.h>, include
930         <grub/reader.h>.
931         (grub_exit_env): Removed.
932         (fs_module_list): Moved to normal/autofs.c.
933         (grub_file_getline): Don't handle comment here.
934         (free_menu): Skip removed field entry->commands.
935         (grub_normal_menu_addentry): Removed as grub_menu_entry, removed
936         script parameter.
937         (read_config_file): Removed nested parameter, change getline function.
938         (grub_enter_normal_mode): Removed.
939         (grub_dyncmd_dispatcher): Moved to normal/dyncmd.c.
940         (read_command_list): Likewise.
941         (autoload_fs_module): Moved to normal/autofs.c.
942         (read_fs_list): Likewise.
943         (reader_nested): New variable.
944         (grub_normal_execute): Run parser.sh to switch to sh parser.
945         (grub_cmd_rescue): Removed.
946         (cmd_normal): Removed.
947         (grub_cmd_normal): Unregister itself at the beginning. Don't register
948         rescue command.
949         (grub_cmdline_run): New function.
950         (grub_normal_reader_init): Likewise.
951         (grub_normal_read_line): Likewise.
952         (grub_env_write_pager): Likewise.
953         (cmdline): New variable.
954         (grub_normal_reader): Likewise.
955         (GRUB_MOD_INIT): Register normal reader and set as current, register
956         pager hook, register normal command with grub_register_command_prio,
957         so that it won't show up in command.lst.
958         (GRUB_MOD_FINI): Unregister normal reader, unhook pager, clear
959         grub_fs_autoload_hook.
961         * normal/menu.c: Remove <grub/script.h>, add <grub/command.h>.
962         (grub_menu_execute_entry): Replace grub_script_execute with
963         grub_parser_execute, change parameter to grub_command_execute.
965         * normal/menu_text.c: Remove <grub/script.h>.
967         * normal/menu_entry.c: Remove <grub/script.h>, add <grub/command.h>
968         and <grub/parser.h>.
969         (run): Change editor_getline to use new parser interface. Change
970         parameter to grub_command_execute.
972         * kern/main.c: Remove <grub/rescue.h>, include <grub/command.h>,
973         <grub/reader.h> and <grub/parser.h>.
974         (grub_load_normal_mode): Execute normal command.
975         (grub_main): Call grub_register_core_commands,
976         grub_register_rescue_parser and grub_register_rescue_reader, use
977         grub_reader_loop to enter input loop.
979         * kern/parser.c (grub_parser_split_cmdline): Change type of
980         getline parameter.
981         (grub_parser_class): New variable.
982         (grub_parser_execute): New function.
984         * loader/i386/multiboot.c: Remove <grub/rescue.h>.
985         * loader/multiboot2.c: Likewise.
986         * loader/sparc64/ieee1275/linux.c: Likewise.
988         * util/grub-emu.c (read_command_list): New dummy function.
990 2009-05-02  Robert Millan  <rmh.grub@aybabtu.com>
992         * util/deviceiter.c (grub_util_iterate_devices): Increase max drive
993         count to 16 for CCISS and IDA.
995 2009-05-02  Robert Millan  <rmh.grub@aybabtu.com>
997         * normal/menu_text.c  (grub_wait_after_message): Print a newline
998         after waiting for user input.
1000         * loader/i386/linux.c: Include `<grub/normal.h>'.
1001         (grub_cmd_linux): Improve the error message about `ask' mode, by
1002         waiting for user input so it's not missed (we can do this, since
1003         user requested interaction).
1005 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
1007         Added missing lst to grub-mkrescue
1009         * util/i386/pc/grub-mkrescue.in: added ${input_dir}/handler.lst
1010         and ${input_dir}/parttool.lst
1012 2009-04-30  David S. Miller  <davem@davemloft.net>
1014         * util/hostdisk.c (device_is_wholedisk): New function.
1015         (grub_util_biosdisk_get_grub_dev): Shortcut when hdg.start is
1016         zero only if device_is_wholedisk() returns true.
1018         * util/hostdisk.c (convert_system_partition_to_system_disk):
1019         Handle virtual disk devices named /dev/vdiskX as found on sparc
1020         and powerpc.
1022         * kern/sparc64/ieee1275/init.c (grub_machine_set_prefix): If
1023         lettered partition specifier is found, convert to numbered.
1025 2009-04-29  David S. Miller  <davem@davemloft.net>
1027         * include/grub/powerpc/ieee1275/memory.h: Include ieee1275.h.
1028         * include/grub/sparc64/ieee1275/memory.h: Likewise.
1030         * normal/command.c: Add missing newline at end of file.
1032         * commands/lsmmap.c (grub_cmd_lsmmap): Add casts to avoid printf
1033         warnings.
1034         * kern/ieee1275/openfw.c (grub_claimmap): Likewise.
1035         * disk/ieee1275/ofdisk.c (grub_ofdisk_open, grub_ofdisk_close,
1036         grub_ofdisk_read): Likewise, and deal similarly with the fact that
1037         ihandles have a 32-bit type but need to be stored in a "void *".
1039 2009-04-28  Pavel Roskin  <proski@gnu.org>
1041         * disk/fs_uuid.c (grub_fs_uuid_open): Use parent->data for dev,
1042         not disk.  Adjust all dependencies.
1043         (grub_fs_uuid_close): Use grub_device_close(), not
1044         grub_disk_close().
1046         * disk/fs_uuid.c (grub_fs_uuid_open): Allocate memory to copy
1047         parent's partition, don't copy it by reference, as it gets freed
1048         on close.
1050 2009-04-27  Vladimir Serbinenko  <phcoder@gmail.com>
1052         Preboot hooks support
1054         * commands/boot.c (struct grub_preboot_t): new declaration
1055         (preboots_head): new variable
1056         (preboots_tail): likewise
1057         (grub_loader_register_preboot_hook): new function
1058         (grub_loader_unregister_preboot_hook): likewise
1059         (grub_loader_set): launch preboot hooks
1060         * include/grub/loader.h (grub_loader_preboot_hook_prio_t): new type
1061         (grub_loader_register_preboot_hook): new declaration
1062         (grub_loader_unregister_preboot_hook): likewise
1064 2009-04-27  Vladimir Serbinenko  <phcoder@gmail.com>
1066         Warning fix
1068         * disk/scsi.c (grub_scsi_open): added missing cast when
1069         calling grub_dprintf
1071 2009-04-26  Vladimir Serbinenko  <phcoder@gmail.com>
1073         Bug and warning fixes
1075         * include/grub/i386/pc/init.h (grub_stop_floppy): added missing
1076         declaration
1077         * commands/test.c (test_parse): fixed bug with file tests and corrected
1078         declaration of find_file
1080 2009-04-26  Pavel Roskin  <proski@gnu.org>
1082         * Makefile.in: Don't install empty manual pages if help2man is
1083         missing.  Use help2man option for output, not shell redirection.
1085 2009-04-26  David S. Miller  <davem@davemloft.net>
1087         * util/grub-mkdevicemap.c (make_device_map): Add missing
1088         NESTED_FUNC_ATTR to process_device().
1090 2009-04-25  Vladimir Serbinenko  <phcoder@gmail.com>
1092         Test command
1094         * commands/test.c: rewritten to use bash-like test
1096 2009-04-25  Vladimir Serbinenko  <phcoder@gmail.com>
1098         Parttool autoloading and improvements
1100         * Makefile.in (pkglib_DATA): add parttool.lst
1101         (parttool.lst): new target
1102         * genmk.rb: generate parttool-*
1103         (CLEANFILES): add #{parttool}
1104         (PARTTOOLFILES): new variable
1105         * genparttoollist.sh: new file
1106         * parttool/pcpart.c (grub_pcpart_boot): more feedback
1107         (grub_pcpart_type): likewise
1108         * commands/parttool.c (helpmsg): new variable
1109         (grub_cmd_parttool): output help if not enough arguments are supplied
1110         autoload modules
1111         (GRUB_MOD_INIT(parttool)): use helpmsg
1113 2009-04-24  David S. Miller  <davem@davemloft.net>
1115         Avoiding opening same device multiple times in device iterator.
1117         * kern/device.c: (grub_device_iterate): Define struct part_ent,
1118         and use it to build a list of partitions in iterate_disk() and
1119         iterate_partition().
1121         * disk/fs_uuid.c (grub_fs_uuid_close): Call grub_disk_close()
1122         on disk->data.
1124         * disk/ieee1275/nand.c (grub_nand_iterate): Return
1125         grub_devalias_iterate() result instead of unconditional 0.
1126         * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Likewise.
1127         Also, capture hook return value, either directly or via
1128         grub_children_iterate(), and propagate to caller.
1129         * include/grub/ieee1275/ieee1275.h (grub_devalias_iterate,
1130         grub_children_iterate): Return value is now 'int' instead of
1131         'grub_err_t'.
1132         * kern/ieee1275/openfw.c (grub_children_iterate): Fix to behave
1133         like a proper iterator, stopping when hooks return non-zero.
1134         (grub_devalias_iterate): Likewise.
1136 2009-04-23  David S. Miller  <davem@davemloft.net>
1138         * kern/sparc64/ieee1275/openfw.c: Unused, delete.
1140 2009-04-22  David S. Miller  <davem@davemloft.net>
1142         * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): If size_cells
1143         is larger than address_cells, use that value for address_cells too.
1145         * include/grub/ieee1275/ieee1275.h (IEEE1275_MAX_PROP_LEN,
1146         IEEE1275_MAX_PATH_LEN): Define.
1147         * kern/ieee1275/openfw.c (grub_children_iterate): Dynamically
1148         allocate 'childtype', 'childpath', 'childname', and 'fullname'.
1149         (grub_devalias_iterate): Dynamically allocate 'aliasname' and
1150         'devtype'.  Explicitly NULL terminate devalias expansion.
1152         * util/sparc64/ieee1275/misc.c: New file.
1153         * util/sparc64/ieee1275/grub-setup.c: New file.
1154         * util/sparc64/ieee1275/grub-ofpathname.c: New file.
1155         * util/sparc64/ieee1275/grub-mkimage.c: New file.
1156         * util/sparc64/ieee1275/grub-install.in: New file.
1157         * util/ieee1275/ofpath.c: New file.
1158         * util/ieee1275/devicemap.c: New file.
1159         * util/devicemap.c: New file.
1160         * util/deviceiter.c: New file.
1161         * kern/sparc64/ieee1275/init.c: New file.
1162         * include/grub/util/ofpath.h: New file.
1163         * include/grub/util/deviceiter.h: New file.
1164         * util/grub-mkdevicemap.c: Include deviceiter.h.
1165         Implement using grub_util_emit_devicemap_entry and
1166         grub_util_iterate_devices.
1167         * conf/i386-corebook.rmk: Build util/deviceiter.c and
1168         util/devicemap.c into grub-mkdevicemap
1169         * conf/i386-efi.rmk: Likewise.
1170         * conf/i386-ieee1275.rmk: Likewise.
1171         * conf/i386-pc.rmk: Likewise.
1172         * conf/powerpc-ieee1275.rmk: Likewise.
1173         * conf/sparc64-ieee1275.rmk: Add rules to build boot block
1174         images and installation utilities.  Build kernel as image
1175         instead of as elf binary.  Use common rules as much as possible.
1177 2009-04-19  Vladimir Serbinenko  <phcoder@gmail.com>
1179         Correct GPT definition
1181         * include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type
1182         of "attrib" member
1184 2009-04-19  Felix Zielcke  <fzielcke@z-51.de>
1186         * INSTALL: Replace `autogen.sh' with `./autogen.sh'.
1188 2009-04-19  David S. Miller  <davem@davemloft.net>
1190         * loader/sparc64/ieee1275/linux.c: Include grub/command.h
1191         (grub_rescue_cmd_linux): Rename to...
1192         (grub_cmd_linux): and fix prototype.
1193         (grub_rescue_cmd_initrd): Rename to...
1194         (grub_cmd_initrd): and fix prototype.
1195         (cmd_linux, cmd_initrd): New.
1196         (GRUB_MOD_INIT(linux)): Use grub_register_command().
1197         (GRUB_MOD_FINI(linux): Use grub_unregister_command().
1199 2009-04-17  Pavel Roskin  <proski@gnu.org>
1201         * bus/usb/ohci.c (grub_ohci_transaction): Fix incorrect printf
1202         format.
1203         (grub_ohci_transfer): Likewise.
1205         * bus/usb/usbtrans.c (grub_usb_control_msg): Warning fix.
1207         * loader/multiboot_loader.c (grub_cmd_multiboot_loader): Fix
1208         return without a value.  Fix inconsistent indentation.
1210         * fs/i386/pc/pxe.c (grub_pxefs_dir): Fix function prototype to
1211         match struct grub_fs.
1213         * disk/ata.c (grub_ata_pciinit): Use NESTED_FUNC_ATTR.
1214         * bus/usb/ohci.c (grub_ohci_pci_iter): Likewise.
1215         * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
1216         * commands/lspci.c (grub_lspci_iter): Likewise.
1218 2009-04-16  Bean  <bean123ch@gmail.com>
1220         * commands/efi/loadbios.c (grub_cmd_fakebios): Add missing return
1221         value.
1223 2009-04-15  Pavel Roskin  <proski@gnu.org>
1225         * include/grub/types.h: Rename ULONG_MAX to GRUB_ULONG_MAX and
1226         LONG_MAX to GRUB_LONG_MAX.  Introduce GRUB_LONG_MIN.  Update all
1227         users of ULONG_MAX, LONG_MAX and LONG_MIN to use the new
1228         definitions.
1230 2009-04-15  Felix Zielcke  <fzielcke@z-51.de>
1232         * disk/lvm.c (grub_lvm_scan_device): Add `LVM' to the error messages,
1233         that no multiple data or metadata areas are supported and `Unknown
1234         metadata header'.
1236 2009-04-15  Vladimir Serbinenko  <phcoder@gmail.com>
1238         Move loader out of the kernel
1240         * kern/loader.c: moved to ...
1241         * commands/boot.c: ... moved here
1242         * commands/minicmd.c (grub_mini_cmd_boot): moved to ...
1243         * commands/boot.c (grub_cmd_boot): moved here. All users updated
1244         * include/grub/kernel.h (grub_machine_fini): export
1245         * include/grub/loader.h (grub_loader_is_loaded): update declaration
1246         (grub_loader_set): likewise
1247         (grub_loader_unset): likewise
1248         (grub_loader_boot): likewise
1249         * conf/common.rmk: new module boot.mod
1250         (pkglib_MODULES): add boot.mod
1251         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): remove kern/loader.c
1252         (grub_emu_SOURCES): likewise
1253         * conf/i386-efi.rmk (kernel_elf_SOURCES): likewise
1254         (grub_emu_SOURCES): likewise
1255         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): likewise
1256         (grub_emu_SOURCES): likewise
1257         * conf/i386-pc.rmk (kernel_elf_SOURCES): likewise
1258         (grub_emu_SOURCES): likewise
1259         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): likewise
1260         (grub_emu_SOURCES): likewise
1261         * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): likewise
1262         (grub_emu_SOURCES): likewise
1263         * conf/x86_64-efi.rmk (kernel_elf_SOURCES): likewise
1264         (grub_emu_SOURCES): likewise
1266 2009-04-15  Vladimir Serbinenko  <phcoder@gmail.com>
1268         use grub_lltoa instead of grub_itoa and grub_ltoa for all purposes
1270         * kern/misc.c (grub_itoa): Removed function
1271         (grub_ltoa): likewise
1272         (grub_vsprintf): use grub_lltoa
1274 2009-04-15  Vladimir Serbinenko  <phcoder@gmail.com>
1276         Restore grub-emu
1278         * conf/i386-pc.rmk (grub_emu_SOURCES): add normal/handler.c
1279         * conf/i386-coreboot.rmk: likewise
1280         * conf/i386-ieee1275.rmk: likewise
1281         * conf/powerpc-ieee1275.rmk: likewise
1283 2009-04-15  Felix Zielcke  <fzielcke@z-51.de>
1285         * INSTALL: Add that `./autogen.sh' needs to be run before
1286         `./configure.'.
1288 2009-04-14  Bean  <bean123ch@gmail.com>
1290         * Makefile.in (pkglib_DATA): Add handler.lst.
1291         (handler.lst): New rule.
1293         * conf/i386-pc.rmk (normal_mod_SOURCES): Add normal/handler.c.
1294         * conf/i386-coreboot.rmk: Likewise.
1295         * conf/i386-ieee1275.rmk: Likewise.
1296         * conf/i386-efi.rmk: Likewise.
1297         * conf/x86_64-efi.rmk: Likewise.
1298         * conf/powerpc-ieee1275.rmk: Likewise.
1299         * conf/sparc64-ieee1275.rmk: Likewise.
1301         * genhandlerlist.sh: New file.
1303         * genmk.rb: Add rules to generate handler.lst.
1305         * include/grub/normal.h (grub_file_getline): New function definition.
1306         (read_handler_list): Likewise.
1307         (free_handler_list): Likewise.
1309         * include/grub/term.h (grub_term_register_input): Add name parameter
1310         for auto generation of handler.lst.
1311         (grub_term_register_output): Likewise.
1313         * normal/handler.c: New file.
1315         * normal/main.c (get_line): Renamed to grub_file_getline.
1316         (read_config_file): Use the newly renamed grub_file_getline.
1317         (read_command_list): Likewise.
1318         (read_fs_list): Likewise.
1319         (grub_normal_execute): Call read_handler_list to parse handler.lst.
1320         (GRUB_MOD_FINI): Call free_handler_list to free handler list.
1322         * term/efi/console.c (grub_console_init): Add name parameter for auto
1323         generation of handler.lst.
1324         * term/gfxterm.c: Likewise.
1325         * term/i386/pc/at_keyboard.c: Likewise.
1326         * term/i386/pc/console.c: Likewise.
1327         * term/i386/pc/serial.c: Likewise.
1328         * term/i386/pc/vesafb.c: Likewise.
1329         * term/i386/pc/vga.c: Likewise.
1330         * term/i386/pc/vga_text.c: Likewise.
1331         * term/ieee1275/ofconsole.c: Likewise.
1332         * term/usb_keyboard.c: Likewise.
1334 2009-04-14  Bean  <bean123ch@gmail.com>
1336         * util/grub-pe2elf.c (write_symbol_table): Terminate short name symbol
1337         properly with null character.
1339 2009-04-14  Felix Zielcke  <fzielcke@z-51.de>
1341         * configure: Remove.
1342         * config.h.in: Likewise.
1343         * stamp-h.in: Likewise.
1344         * DISTLIST: Likewise.
1345         * conf/common.mk: Likewise.
1346         * conf/i386-coreboot.mk: Likewise.
1347         * conf/i386-efi.mk: Likewise.
1348         * conf/i386-ieee1275.mk: Likewise.
1349         * conf/i386.mk: Likewise.
1350         * conf/i386-pc.mk: Likewise.
1351         * conf/powerpc-ieee1275.mk: Likewise.
1352         * conf/sparc64-ieee1275.mk: Likewise.
1353         * conf/x86_64-efi.mk: Likewise.
1355         * INSTALL: Remove the sentence that Ruby and autoconf are only required if you
1356         develop on GRUB.
1358 2009-04-14  John Stanley  <jpsinthemix@verizon.net>
1359             David S. Miller  <davem@davemloft.net>
1361         * util/hostdisk.c (make_device_name): Fix buffer length
1362         calculations.
1364 2009-04-14  Felix Zielcke  <fzielcke@z-51.de>
1366         * util/hostdisk.c [__FreeBSD__ || __FreeBSD_kernel__]: Include
1367         <sys/param.h> and <sys/sysctl.h>.
1368         (open_device) [__FreeBSD__ || __FreeBSD_kernel_]: Use sysctlgetbyname()
1369         to add 0x10 to `kern.geom.debugflags' if it's not already set, before
1370         opening the device and reset them afterwards.
1372 2009-04-13  Pavel Roskin  <proski@gnu.org>
1374         * conf/common.rmk (grub_fstest_SOURCES): Add normal/datetime.c.
1375         Reported by John Stanley <jpsinthemix@verizon.net>
1377 2009-04-13  Robert Millan  <rmh@aybabtu.com>
1379         * util/grub.d/10_freebsd.in: Detect Debian GNU/kFreeBSD and use
1380         that name for menuentries when appropriate.
1382 2009-04-13  Felix Zielcke  <fzielcke@z-51.de>
1384         * util/grub.d/10_freebsd.in: Add a missing `fi'.
1386 2009-04-13  Robert Millan  <rmh@aybabtu.com>
1388         * loader/i386/linux.c (grub_cmd_linux): Don't pass `vga=ask' parameter
1389         to Linux, simply abort telling the user it's no longer supported.
1391 2009-04-13  Felix Zielcke  <fzielcke@z-51.de>
1393         * util/grub.d/10_freebsd.in: Don't exit if /boot/devices.hints
1394         doesn't exist.  Check also for /boot/kernel/kernel.gz.  Print
1395         `freebsd_loadenv' only when devices.hints exist.
1397 2009-04-13  Pavel Roskin  <proski@gnu.org>
1399         * term/usb_keyboard.c (grub_usb_keyboard_getkey): Warning fixes.
1401 2009-04-13  Felix Zielcke  <fzielcke@z-51.de>
1403         * util/i386/pc/grub-install.in (install_drive): Remove the BSD
1404         partition number.
1405         (grub_drive): Likewise.
1407 2009-04-13  David S. Miller  <davem@davemloft.net>
1409         * kern/sparc64/ieee1275/ieee1275.c: New file.
1410         * include/grub/sparc64/ieee1275/ieee1275.h (IEEE1275_MAP_WRITE,
1411         IEEE1275_MAP_READ, IEEE1275_MAP_EXEC, IEEE1275_MAP_LOCKED,
1412         IEEE1275_MAP_CACHED, IEEE1275_MAP_SE, IEEE1275_MAP_GLOBAL,
1413         IEEE1275_MAP_IE, IEEE1275_MAP_DEFAULT): Define.
1414         (grub_ieee1275_map_physical, grub_ieee1275_claim_vaddr,
1415         grub_ieee1275_alloc_physmem): Declare new exported functions.
1417         * include/grub/sparc64/ieee1275/loader.h: New file.
1418         * include/grub/sparc64/ieee1275/memory.h: Likewise.
1419         * include/grub/sparc64/kernel.h: Likewise.
1420         * loader/sparc64/ieee1275/linux.c: Likewise.
1422         * conf/common.rmk (grub_probe_SOURCES): Add Sun partition module.
1423         (grub_fstest_SOURCES): Likewise.
1425         * util/hostdisk.c (make_device_name): Do not make any assumptions
1426         about the length of drive names.
1428         * kern/dl.c (grub_dl_load_file): Close file immediately when
1429         we are done using it.
1431 2009-04-12  David S. Miller  <davem@davemloft.net>
1433         * kern/misc.c (grub_ltoa): Fix cast when handling negative
1434         values.  Noticed by Pavel Roskin.
1436         * configure.ac: Check for __bswapsi2 and__bswapdi2 using
1437         target compiler.
1439         * genmk.rb: Add more flexible image type specification, also
1440         pass --strip-unneeded to objcopy.
1441         * conf/i386-pc.rmk: Use *_FORMAT.
1442         * conf/i386-pc.mk: Rebuilt.
1444         * disk/ieee1275/ofdisk.c (struct ofdisk_hash_ent): New struct.
1445         (OFDISK_HASH_SZ): Define.
1446         (ofdisk_hash): New hash table.
1447         (ofdisk_hash_fn, ofdisk_hash_find, ofdisk_hash_add): New functions.
1448         (grub_ofdisk_open): Use ofdisk_hash_ent address as disk->id
1449         instead of device phandle which is not unique.
1451         * kern/sparc64/ieee1275/init.c: Delete, replace with...
1452         * kern/sparc64/ieee1275/crt0.S: assembler implementation.
1453         * include/grub/sparc64/ieee1275/kernel.h: Declare grub_prefix[].
1454         (GRUB_MOD_ALIGN, GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_TOTAL_MODULE_SIZE,
1455         GRUB_KERNEL_MACHINE_KERNEL_IMAGE_SIZE,
1456         GRUB_KERNEL_MACHINE_COMPRESSED_SIZE, GRUB_KERNEL_MACHINE_PREFIX,
1457         GRUB_KERNEL_MACHINE_DATA_END): Define.
1458         (grub_kernel_image_size, grub_total_module_size): Declare.
1460 2009-04-12  Pavel Roskin  <proski@gnu.org>
1462          * configure.ac: Change the logic when we check for target tools.
1463          Do it when the target is specified and it's different from the
1464          specified value of the host.
1466 2009-04-11  Felix Zielcke  <fzielcke@z-51.de>
1468         * util/hostdisk.c [__FreeBSD_kernel__]: Include sys/disk.h.
1469         (grub_util_biosdisk_open) [__FreeBSD_kernel__]: Add support for
1470         GNU/kFreeBSD. Check if a device is a character device. Use
1471         DIOCGMEDIASIZE to get the size.
1472         (convert_system_partition_to_system_disk) [__FreeBSD_kernel__]: Add
1473         support for GNU/kFreeBSD.
1474         (grub_util_biosdisk_get_grub_dev) [__FreeBSD_kernel__]: Check if OS_DEV
1475         is a character device instead of a block device. Add support for
1476         FreeBSD device names.
1478         * util/getroot.c (find_root_device) [__FreeBSD_kernel__]: Check if ENT
1479         is a character device instead of a block device.
1481         * util/grub-probe.c (probe) [__FreeBSD_kernel__]: Check if DEVICE_NAME
1482         is a character device instead of a block device.
1484 2009-04-11  Andrey Shuvikov  <mr_hyro@yahoo.com>
1486         * util/hostdisk.c [__FreeBSD__]: Include sys/disk.h.
1487         (grub_util_biosdisk_open) [__FreeBSD__]: Add support for
1488         FreeBSD. Check if a device is a character device. Use
1489         DIOCGMEDIASIZE to get the size.
1490         (convert_system_partition_to_system_disk) [__FreeBSD__]: Add
1491         support for FreeBSD.
1492         (grub_util_biosdisk_get_grub_dev) [__FreeBSD__]: Check if OS_DEV
1493         is a character device instead of a block device. Add support for
1494         FreeBSD device names.
1496         * util/getroot.c (find_root_device) [__FreeBSD__]: Check if ENT is
1497         a character device instead of a block device.
1498         (grub_util_check_char_device): New function.
1500         * util/grub-probe.c (probe) [__FreeBSD__]: Check if DEVICE_NAME is
1501         a character device instead of a block device.
1503         * include/grub/util/getroot.h (grub_util_check_char_device): New
1504         prototype.
1506 2009-04-11  David S. Miller  <davem@davemloft.net>
1508         * conf/sparc64-ieee1275.rmk (kernel_img_LDFLAGS): Link with
1509         static libgcc.
1510         * configure.ac: Check for __bswapsi2 and __bswapdi2 presence.
1511         * include/grub/sparc64/libgcc.h (__bswapsi2): Export libgcc
1512         function, if present.
1513         (__bswapdi2): Likewise.
1515         * include/grub/sparc64/ieee1275/boot.h: New file.
1516         * boot/sparc64/ieee1275/boot.S: Likewise.
1517         * boot/sparc64/ieee1275/diskboot.S: Likewise.
1519         * kern/misc.c (grub_ltoa): New function.
1520         (grub_vsprintf): Use it to format 'long' integers.
1522 2009-04-10  David S. Miller  <davem@davemloft.net>
1524         * disk/ieee1275/nand.c (grub_nand_open): All ieee1275 call arg
1525         slots are of type grub_ieee1275_cell_t.
1526         (grub_nand_read): Likewise.
1527         * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_INVALID,
1528         IEEE1275_IHANDLE_INVALID): Use grub_ieee1275_cell_t since these
1529         macros are used to compare values in arg/ret block of the call.
1530         (grub_ieee1275_finddevice, grub_ieee1275_get_property,
1531         grub_ieee1275_next_property, grub_ieee1275_get_property_length,
1532         grub_ieee1275_instance_to_package, grub_ieee1275_package_to_path,
1533         grub_ieee1275_instance_to_path, grub_ieee1275_write,
1534         grub_ieee1275_read, grub_ieee1275_seek, grub_ieee1275_peer,
1535         grub_ieee1275_child, grub_ieee1275_parent, grub_ieee1275_open,
1536         grub_ieee1275_close, grub_ieee1275_set_property,
1537         grub_ieee1275_set_color): All ieee1275 call arg slots are of type
1538         grub_ieee1275_cell_t.
1539         * kern/ieee1275/openfw.c (grub_map): Likewise.
1540         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_ihandle_t,
1541         grub_ieee1275_phandle_t): Define as grub_unit32_t type.
1543         * kern/ieee1275/init.c (grub_machine_init): Make 'actual' grub_ssize_t.
1544         * kern/ieee1275/openfw.c (grub_children_iterate): Likewise.
1545         (grub_devalias_iterate): Likewise.
1547 2009-04-10  Vladimir Serbinenko  <phcoder@gmail.com>
1549         UFS improvements
1551         * fs/ufs.c (INODE_NBLOCKS): new definition
1552         (struct grub_ufs_dirent): added fields for non-BSD dirents
1553         (grub_ufs_get_file_block): fixed double indirect handling
1554         (grub_ufs_lookup_symlink): use more robust way to determine whether
1555         symlink is inline
1556         (grub_ufs_find_file): support for non-BSD dirents
1557         (grub_ufs_dir): support for non-BSD dirents
1559 2009-04-10  Bean  <bean123ch@gnail.com>
1561         * include/grub/efi/api.h (grub_efi_configuration_table): Add packed
1562         attribute, otherwise the size would be wrong for i386 platform.
1564         * include/grub/pci.h (grub_pci_read_word): New inline function.
1565         (grub_pci_read_byte): Likewise.
1566         (grub_pci_write): Likewise.
1567         (grub_pci_write_word): Likewise.
1568         (grub_pci_write_byte): Likewise.
1570         * include/grub/pci.h (grub_pci_iteratefunc_t): Add NESTED_FUNC_ATTR.
1572         * loader/i386/efi/linux.c (fake_bios_data): Moved to loadbios module.
1573         (find_framebuf): Scan pci to locate the frame buffer address.
1575         * commands/efi/fixvideo.c: New file.
1577         * commands/efi/loadbios.c: Likewise.
1579         * commands/memrw.c: Likewise.
1581         * util/grub-dumpbios.in: Likewise.
1583         * conf/common.rmk (grub-dumpbios): New utility.
1584         (pkglib_MODULES): New module memrw.mod.
1585         (memrw_mod_SOURCE): New macro.
1586         (memrw_mod_CFLAGS): Likewise.
1587         (memrw_mod_LDFLAGS): Likewise.
1589         * conf/i386-efi.rmk (pkglib_MODULES): New module loadbios.mod and
1590         fixvideo.mod.
1591         (loadbios_mod_SOURCE): New macro.
1592         (loadbios_mod_CFLAGS): Likewise.
1593         (loadbios_mod_LDFLAGS): Likewise.
1594         (fixvideo_mod_SOURCE): Likewise.
1595         (fixvideo_mod_CFLAGS): Likewise.
1596         (fixvideo_mod_LDFLAGS): Likewise.
1598         * conf/x86_64.rmk (pkglib_MODULES): New module loadbios.mod and
1599         fixvideo.mod.
1600         (loadbios_mod_SOURCE): New macro.
1601         (loadbios_mod_CFLAGS): Likewise.
1602         (loadbios_mod_LDFLAGS): Likewise.
1603         (fixvideo_mod_SOURCE): Likewise.
1604         (fixvideo_mod_CFLAGS): Likewise.
1605         (fixvideo_mod_LDFLAGS): Likewise.
1607 2009-04-08  Felix Zielcke  <fzielcke@z-51.de>
1609         * disk/lvm.c (grub_lvm_scan_device): Add a missing NULL check.
1611 2009-04-07  David S. Miller  <davem@davemloft.net>
1613         * kern/sparc64/dl.c (grub_arch_dl_relocate_symbols): Add
1614         support for R_SPARC_OLO10 relocations.  Fix compile warning for
1615         R_SPARC_WDISP30 case.
1616         * kern/sparc64/cache.S: Fix grub_arch_sync_caches implementation.
1618 2009-04-06  Pavel Roskin  <proski@gnu.org>
1620         * include/grub/misc.h (ARRAY_SIZE): New macro.
1621         * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START):
1622         New macro.
1623         * loader/i386/linux.c (allocate_pages): Use free_pages().
1624         (grub_linux_unload): Don't use free_pages().
1625         (grub_linux_boot): Prevent accessing linux_vesafb_modes with a
1626         wrong index.  Treat all other modes as text modes.
1627         (grub_cmd_linux): Initialize vid_mode unconditionally to
1628         GRUB_LINUX_VID_MODE_NORMAL.  Recognize and support "vga=ask".
1630         * commands/help.c (print_command_help): Use cmd->prio, not
1631         cmd->flags to check for GRUB_PRIO_LIST_FLAG_ACTIVE.
1633 2009-04-06  Vladimir Serbinenko  <phcoder@gmail.com>
1635         Parttool
1637         * parttool/pcpart.c: new file
1638         * commands/parttool.c: likewise
1639         * conf/common.rmk (pkglib_MODULES): Added parttool.mod and pcpart.mod
1640         (parttool_mod_SOURCES): new variable
1641         (parttool_mod_CFLAGS): likewise
1642         (parttool_mod_LDFLAGS): likewise
1643         (pcpart_mod_SOURCES): likewise
1644         (pcpart_mod_CFLAGS): likewise
1645         (pcpart_mod_LDFLAGS): likewise
1646         * conf/i386-coreboot.rmk (grub_emu_SOURCES): added commands/parttool.c
1647         and parttool/pcpart.c
1648         * conf/i386-efi.rmk: likewise
1649         * conf/i386-ieee1275.rmk: likewise
1650         * conf/i386-pc.rmk: likewise
1651         * conf/powerpc-ieee1275.rmk: likewise
1652         * conf/sparc64-ieee1275.rmk: likewise
1653         * conf/x86_64-ieee1275.rmk: likewise
1655 2009-04-05  Vladimir Serbinenko  <phcoder@gmail.com>
1657         Support for mtime and further expandability of dir command
1659         * include/grub/lib/datetime.h: moved to ...
1660         * include/grub/datetime.h: ... moved here and added
1661         declaration of grub_unixtime2datetime. All users updated
1662         * include/grub/fs.h: new syntax for dir and mtime functions in
1663         struct grub_fs
1664         * include/grub/fshelp.h: new declarations of GRUB_FSHELP_TYPE_MASK
1665         and GRUB_FSHELP_FLAGS_MASK
1666         * commands/ls.c (grub_ls_list_files): Write mtime in long format
1667         * fs/ext2.c (grub_ext2_dir): use new dir syntax and supply mtime
1668         (grub_ext2_mtime): new function
1669         * fs/hfsplus.c (grub_hfsplus_dir): use new dir syntax and supply mtime
1670         (grub_hfsplus_mtime): new function
1671         * fs/ufs.c (GRUB_UFS_ATTR_TYPE): new definition
1672         (GRUB_UFS_ATTR_FILE): likewise
1673         (GRUB_UFS_ATTR_LNK): likewise
1674         (struct grub_ufs_sblock): new fields mtime
1675         (grub_ufs_read_inode): new parameter to read inode to a separate buffer
1676         all users updated
1677         (grub_ufs_dir): mtime support
1678         (grub_ufs_mtime): new function
1679         * fs/affs.c (grub_affs_dir): use new dir syntax
1680         * fs/afs.c (grub_afs_dir): likewise
1681         * fs/cpio.c (grub_cpio_dir): likewise
1682         * fs/fat.c (grub_fat_find_dir): likewise
1683         * fs/hfs.c (grub_hfs_dir): likewise
1684         * fs/iso9660.c (grub_iso9660_dir): likewise
1685         * fs/jfs.c (grub_jfs_dir): likewise
1686         * fs/minix.c (grub_minix_dir): likewise
1687         * fs/ntfs.c (grub_ntfs_dir): likewise
1688         * fs/reiserfs.c (grub_reiserfs_dir): likewise
1689         * fs/sfs.c (grub_sfs_dir): likewise
1690         * fs/xfs.c (grub_xfs_dir): likewise
1691         * util/hostfs.c (grub_hostfs_dir): likewise
1692         * lib/datetime.c: moved to ...
1693         * normal/datetime.c: ... moved here
1694         (grub_unixtime2datetime): new function
1695         * kern/rescue.c (grub_rescue_print_files): use new dir syntax
1696         * normal/completion.c (iterate_dir): use new dir syntax
1697         * normal/misc.c (grub_normal_print_device_info): tell the
1698         last modification time of a volume
1699         * kern/fs.c (grub_fs_probe): updated dummy function to use new syntax
1700         * conf/common.rmk: added lib/datetime.c to ls.mod
1701         * conf/i386-coreboot.rmk (grub_emu_SOURCES): add normal/datetime.c
1702         (normal_mod_SOURCES): likewise
1703         (datetime_mod_SOURCES): Removed lib/datetime.c
1704         * conf/i386-efi.rmk: likewise
1705         * conf/i386-ieee1275.rmk: likewise
1706         * conf/i386-pc.rmk: likewise
1707         * conf/powerpc-ieee1275.rmk: likewise
1708         * conf/sparc64-ieee1275.rmk: likewise
1709         * conf/x86_64-efi.rmk: likewise
1711 2009-04-05  Vladimir Serbinenko  <phcoder@gmail.com>
1713         Trim trailing spaces in FAT label and support mtools-like labels
1715         * fs/fat.c (grub_fat_iterate_dir): New function based
1716         on grub_fat_find_dir
1717         (grub_fat_find_dir): use grub_fat_iterate_dir
1718         (grub_fat_label): likewise
1720 2009-04-04  Vladimir Serbinenko  <phcoder@gmail.com>
1722         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): add list.h
1723         and command.h
1724         remove extraneous kernel_elf_HEADERS
1726 2009-04-04  Bean  <bean123ch@gnail.com>
1728         * include/grub/util/misc.h: Add dummy function fsync for mingw.
1730         * util/misc.c: Likewise.
1732 2009-04-04  Yoshinori K. Okuji  <okuji@enbug.org>
1734         * loader/i386/efi/linux.c (fake_bios_data): Use grub_dprintf
1735         instead of grub_printf.
1737 2009-04-03  Robert Millan  <rmh@aybabtu.com>
1739         * loader/i386/linux.c (grub_linux_setup_video): Fill
1740         `params->{red,green,blue,reserved}_{mask_size,field_pos}' with
1741         values from `mode info' structure instead of hardcoded
1742         values.
1744 2009-04-01  Pavel Roskin  <proski@gnu.org>
1746         * Makefile.in: Remove all references to MODULE_LDFLAGS, it's
1747         unused now.
1748         * genmk.rb: Likewise.
1749         * configure.ac: Likewise.
1751 2009-04-01  Manoel Abranches  <mrabran@linux.vnet.ibm.com>
1753         * aclocal.m4: Move --build-id=none from MODULE_LDFLAGS to
1754         TARGET_LDFLAGS.  This corrects a problem with grub-mkelfimage.
1756 2009-04-01  David S. Miller  <davem@davemloft.net>
1758         * normal/sparc64/setjmp.S: Fix setjmp implementation.
1759         * include/grub/sparc64/setjmp.h (grub_jmp_buf): Update.
1760         (grub_setjmp): Mark with 'returns_twice' attribute.
1761         * include/grub/i386/setjmp.h (grub_setjmp): Likewise
1762         * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise.
1763         * include/grub/x86_64/setjmp.h (grub_setjmp): Likewise.
1765 2009-04-01  Robert Millan  <rmh@aybabtu.com>
1767         Reapply fix from 2008-07-28 which was accidentally reverted; also
1768         perform the same fix to a similar check in same function.
1770         * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
1771         with the same number are found, just use issue a warning with
1772         grub_dprintf(), as this error has been reported to be non-fatal.
1774 2009-03-31  Pavel Roskin  <proski@gnu.org>
1776         * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Provide safe default
1777         for cross-compilation.
1779 2009-03-30  Robert Millan  <rmh@aybabtu.com>
1781         Fix i386-ieee1275 build.
1783         * include/grub/i386/ieee1275/loader.h (grub_multiboot2_real_boot):
1784         Remove declaration.
1786 2009-03-30  Pavel Roskin  <proski@gnu.org>
1788         * fs/hfs.c (grub_hfs_strncasecmp): Integrate into ...
1789         (grub_hfs_cmp_catkeys): ... this.  Don't assume strings to be
1790         zero-terminated, rely only on the strlen value.  Fix comparison
1791         of strings differing in length.
1793 2009-03-30  Robert Millan  <rmh@aybabtu.com>
1795         * loader/i386/linux.c (grub_cmd_linux): Check for zImage before
1796         checking for abi version.  Improve error messages on BIOS to notify
1797         user about `linux16' command.
1799 2009-03-29  Vladimir Serbinenko  <phcoder@gmail.com>
1801         Leak fixes
1803         * kern/disk.c (grub_disk_cache_store): Invalidate previous cache
1804         in case of collision
1805         * disk/scsi.c (grub_scsi_open): free scsi in case of error
1807 2009-03-29  Robert Millan  <rmh@aybabtu.com>
1809         * loader/i386/linux.c (grub_cmd_linux): Parse "vga=" parameter and
1810         set `vid_mode' accordingly.
1811         (grub_linux_boot): Process `vid_mode' and set video mode.
1813 2009-03-29  Robert Millan  <rmh@aybabtu.com>
1815         * util/grub.d/10_linux.in (linux_entry): New function.
1816         Factorize generation of Linux boot entries.
1818 2009-03-29  Yoshinori K. Okuji  <okuji@enbug.org>
1820         Make the format of Environment Block plain text. The boot loader
1821         part is not tested well yet.
1823         * util/grub-editenv.c (DEFAULT_ENVBLK_SIZE): New macro.
1824         (buffer): Removed.
1825         (envblk): Likewise.
1826         (usage): Remove "info" and "clear". Add "unset". Update the
1827         description of "set", as this does not delete variables any
1828         longer.
1829         (create_envblk_file): Complete rewrite.
1830         (open_envblk_file): Likewise.
1831         (cmd_info): Removed.
1832         (cmd_list): Likewise.
1833         (cmd_set): Likewise.
1834         (cmd_clear): Likewise.
1835         (list_variables): New function.
1836         (write_envblk): Likewise.
1837         (set_variables): Likewise.
1838         (unset_variables): Likewise.
1839         (main): Complete rewrite.
1841         * commands/loadenv.c (buffer): Removed.
1842         (envblk): Likewise.
1843         (open_envblk_file): New function.
1844         (read_envblk_file): Complete rewrite.
1845         (grub_cmd_load_env): Likewise.
1846         (grub_cmd_list_env): Likewise.
1847         (struct blocklist): New struct.
1848         (free_blocklists): New function.
1849         (check_blocklists): Likewise.
1850         (write_blocklists): Likewise.
1851         (grub_cmd_save_env): Complete rewrite.
1853         * include/grub/lib/envblk.h (GRUB_ENVBLK_SIGNATURE): Replaced with
1854         a plain text signature.
1855         (GRUB_ENVBLK_MAXLEN): Removed.
1856         (struct grub_envblk): Complete rewrite.
1857         (grub_envblk_find): Removed.
1858         (grub_envblk_insert): Likewise.
1859         (grub_envblk_open): New prototype.
1860         (grub_envblk_set): Likewise.
1861         (grub_envblk_delete): Put const to VALUE.
1862         (grub_envblk_iterate): Put const to NAME and VALUE.
1863         (grub_envblk_close): New prototype.
1864         (grub_envblk_buffer): New inline function.
1865         (grub_envblk_size): Likewise.
1867         * lib/envblk.c: Include grub/mm.h.
1868         (grub_env_find): Removed.
1869         (grub_envblk_open): New function.
1870         (grub_envblk_close): Likewise.
1871         (escaped_value_len): Likewise.
1872         (find_next_line): Likewise.
1873         (grub_envblk_insert): Removed.
1874         (grub_envblk_set): New function.
1875         (grub_envblk_delete): Complete rewrite.
1876         (grub_envblk_iterate): Likewise.
1878 2009-03-28  Robert Millan  <rmh@aybabtu.com>
1880         * conf/i386-pc.rmk (pkglib_MODULES): Add `linux16.mod'.
1881         (linux16_mod_SOURCES, linux16_mod_CFLAGS, linux16_mod_LDFLAGS): New
1882         variables.  Use 16-bit loader.
1883         (linux_mod_SOURCES, linux_mod_CFLAGS, linux_mod_LDFLAGS): Use 32-bit
1884         loader.
1885         * kern/i386/loader.S (grub_linux_boot): Rename to ...
1886         (grub_linux16_boot): ... this.  Update all users.
1887         * loader/i386/linux.c (grub_linux32_boot): Rename to ...
1888         (grub_linux_boot): ... this.  Update all users.
1890         * loader/i386/pc/linux.c (GRUB_MOD_INIT(linux)): Rename to ...
1891         (GRUB_MOD_INIT(linux16)): ... this.  Rename `linux' and `initrd'
1892         commands to `linux16' and `initrd16'.
1893         (GRUB_MOD_FINI(linux)): Rename to ...
1894         (GRUB_MOD_FINI(linux16)): ... this.
1896 2009-03-24  Pavel Roskin  <proski@gnu.org>
1898         * genmk.rb: Define ASM_FILE for *.S files for *.lst generation,
1899         not just for compilation.
1901 2009-03-22  Vladimir Serbinenko  <phcoder@gmail.com>
1903         Move multiboot helper out of kernel
1905         * conf/i386-pc.rmk (multiboot_mod_SOURCES): Add
1906         `loader/i386/multiboot_helper.S'.
1907         * conf/i386-coreboot.rmk: Likewise
1908         * conf/i386-ieee1275.rmk: Likewise
1910         * kern/i386/loader.S: Move multiboot helpers from here...
1911         * loader/i386/multiboot_helper.S: ...moved here
1912         * include/grub/i386/loader.h: Move declarations of multiboot
1913         helpers from here...
1914         * include/grub/i386/multiboot.h: ...moved here
1915         * loader/i386/multiboot.c: Added include of grub/cpu/multiboot.h
1917 2009-03-22  Yoshinori K. Okuji  <okuji@enbug.org>
1919         * kern/env.c (grub_env_context_open): Added an argument to specify
1920         whether a new context inherits exported variables from current
1921         one. This is useful when making a sandbox to interpret a config
1922         file.
1923         All callers updated.
1925         * include/grub/env.h (grub_env_context_open): Updated the prototype.
1927 2009-03-22  Yoshinori K. Okuji  <okuji@enbug.org>
1929         * kern/env.c (grub_env_context_close): Fix memory leaks.
1931 2009-03-22  Yoshinori K. Okuji  <okuji@enbug.org>
1933         * normal/main.c (grub_normal_execute): Added an argument
1934         BATCH to specify if an interactive interface should be provided
1935         after reading a config file.
1936         All callers updated.
1937         (read_command_list): Prevent being executed twice.
1938         (read_fs_list): Likewise.
1940         * include/grub/normal.h (grub_normal_execute): Updated the
1941         prototype.
1943 2009-03-22  Pavel Roskin  <proski@gno.org>
1945         * kern/powerpc/ieee1275/startup.S: Replace EXT_C(start) with
1946         _start.
1947         * kern/i386/pc/startup.S: Likewise.
1948         * kern/i386/efi/startup.S: Likewise.
1949         * kern/i386/ieee1275/startup.S: Likewise.
1950         * kern/i386/coreboot/startup.S: Likewise.
1951         * kern/x86_64/efi/startup.S: Likewise.
1953         * aclocal.m4 (grub_CHECK_START_SYMBOL): Remove.
1954         * configure.ac: Don't call grub_CHECK_START_SYMBOL.
1955         * kern/i386/pc/startup.S: Use _start instead of START_SYMBOL.
1957 2009-03-21  Vladimir Serbinenko  <phcoder@gmail.com>
1959         Bugfixes in multiboot for bugs uncovered by solaris kernel.
1961         * loader/i386/multiboot_elfxx.c (grub_multiboot_load_elf): Corrected
1962         limit detection.
1963         Use vaddr of correct segment for entry_point.
1965 2009-03-21  Bean  <bean123ch@gmail.com>
1967         * commands/blocklist.c: Add include file <grub/command.h>, remove
1968         <grub/normal.h> and <grub/arg.h>.
1969         (grub_cmd_blocklist): Use the new command interface.
1970         (GRUB_MOD_INIT): Likewise.
1971         (GRUB_MOD_FINI): Likewise.
1972         * commands/boot.c: Likewise.
1973         * commands/cat.c: Likewise.
1974         * commands/cmp.c: Likewise.
1975         * commands/configfile.c: Likewise.
1976         * commands/crc.c: Likewise.
1977         * commands/echo.c: Likewise.
1978         * commands/halt.c: Likewise.
1979         * commands/handler.c: Likewise.
1980         * commands/hdparm.c: Likewise.
1981         * commands/help.c: Likewise.
1982         * commands/hexdump.c: Likewise.
1983         * commands/loadenv.c: Likewise.
1984         * commands/ls.c: Likewise.
1985         * commands/lsmmap.c: Likewise.
1986         * commands/lspci.c: Likewise.
1987         * commands/loadenv.c: Likewise.
1988         * commands/read.c: Likewise.
1989         * commands/reboot.c: Likewise.
1990         * commands/search.c: Likewise.
1991         * commands/sleep.c: Likewise.
1992         * commands/test.c: Likewise.
1993         * commands/usbtest.c: Likewise.
1994         * commands/videotest.c: Likewise.
1995         * commands/i386/cpuid.c: Likewise.
1996         * commands/i386/pc/halt.c: Likewise.
1997         * commands/i386/pc/play.c: Likewise.
1998         * commands/i386/pc/pxecmd.c: Likewise.
1999         * commands/i386/pc/vbeinfo.c: Likewise.
2000         * commands/i386/pc/vbetest.c: Likewise.
2001         * commands/ieee1275/suspend.c: Likewise.
2002         * disk/loopback.c: Likewise.
2003         * font/font_cmd.c: Likewise.
2004         * hello/hello.c: Likewise.
2005         * loader/efi/appleloader.c: Likewise.
2006         * loader/efi/chainloader.c: Likewise.
2007         * loader/i386/bsd.c: Likewise.
2008         * loader/i386/efi/linux.c: Likewise.
2009         * loader/i386/ieee1275/linux.c: Likewise.
2010         * loader/i386/linux.c: Likewise.
2011         * loader/i386/pc/chainloader.c: Likewise.
2012         * loader/i386/pc/linux.c: Likewise.
2013         * loader/powerpc/ieee1275/linux.c: Likewise.
2014         * loader/multiboot_loader.c: Likewise.
2015         * term/gfxterm.c: Likewise.
2016         * term/i386/pc/serial.c: Likewise.
2017         * term/terminfo.c: Likewise.
2019         * term/i386/pc/vesafb.c: Removed <grub/arg.h>.
2020         * term/i386/pc/vga.c: Likewise.
2021         * video/readers/jpeg.c: Likewise.
2022         * video/readers/png.c: Likewise.
2023         * video/readers/tga.c: Likewise.
2025         * util/grub-fstest (cmd_loopback): Removed.
2026         (cmd_blocklist): Likewise.
2027         (cmd_ls): Likewise.
2028         (grub_register_command): Likewise.
2029         (grub_unregister_command): Likewise.
2030         (execute_command): Use grub_command_find to locate command and execute
2031         it.
2033         * include/grub/efi/chainloader.h: Removed.
2034         * loader/efi/chainloader_normal.c: Likewise.
2035         * loader/i386/bsd_normal.c: Likewise.
2036         * loader/i386/pc/chainloader_normal.c: Likewise.
2037         * loader/i386/pc/multiboot_normal.c: Likewise.
2038         * loader/linux_normal.c: Likewise.
2039         * loader/multiboot_loader_normal.c: Likewise.
2040         * loader/powerpc/ieee1275/linux_normal.c: Likewise.
2042         * gencmdlist.sh: Scan new registration command grub_register_extcmd
2043         and grub_register_command_p1.
2045         * conf/common.rmk (grub_fstest_SOURCES): Add kern/list.c,
2046         kern/command.c, lib/arg.c and commands/extcmd.c.
2047         (pkglib_MODULES): Remove boot.mod, and minicmd.mod and extcmd.mod.
2048         (minicmd_mod_SOURCES): New variable.
2049         (minicmd_mod_CFLAGS): Likewise.
2050         (minicmd_mod_LDFLAGS): Likewise.
2051         (extcmd_mod_SOURCES): Likewise.
2052         (extcmd_mod_CFLAGS): Likewise.
2053         (extcmd_mod_LDFLAGS): Likewise.
2054         (boot_mod_SOURCES): Removed.
2055         (boot_mod_CFLAGS): Likewise.
2056         (boot_mod_LDFLAGS): Likewise.
2058         * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/command.c and
2059         kern/corecmd.c.
2060         (kernel_img_HEADERS): Add command.h.
2061         (grub_emu_SOURCES): Remove commands/boot.c and normal/arg.c, add
2062         commands/minicmd.c, kern/command.c, kern/corecmd.c, commands/extcmd.c
2063         and lib/arg.c.
2064         (pkglib_MODULES): Change _linux.mod, _chain.mod, _bsd.mod and
2065         _multiboot.mod as linux.mod, chain.mod, bsd.mod and multiboot.mod,
2066         remove the corresponding normal mode command.
2067         (normal_mod_SOURCES): Remove normal/arg.c.
2068         * conf/i386-coreboot.rmk: Likewise.
2069         * conf/i386-efi.rmk: Likewise.
2070         * conf/i386-ieee1275.rmk: Likewise.
2071         * conf/powerpc-ieee1275.rmk: Likewise.
2072         * conf/x86_64-efi.rmk: Likewise.
2074         * include/grub/arg.h: Move from here ...
2075         * include/grub/lib/arg.h: ... to here.
2077         * normal/arg.c: Move from here ...
2078         * lib/arg.c: ... to here.
2080         * commands/extcmd.c: New file.
2081         * commands/minicmd.c: Likewise.
2082         * include/grub/command.h: Likewise.
2083         * include/grub/extcmd.h: Likewise.
2084         * kern/command.c: Likewise.
2085         * kern/corecmd.c: Likewise.
2087         * kern/list.c (grub_list_iterate): Return int instead of void.
2088         (grub_list_insert): New function.
2089         (grub_prio_list_insert): Likewise.
2091         * kern/rescue.c (grub_rescue_command): Removed.
2092         (grub_rescue_command_list): Likewise.
2093         (grub_rescue_register_command): Likewise.
2094         (grub_rescue_unregister_command): Likewise.
2095         (grub_rescue_cmd_boot): Move to minicmd.c
2096         (grub_rescue_cmd_help): Likewise.
2097         (grub_rescue_cmd_info): Likewise.
2098         (grub_rescue_cmd_boot): Likewise.
2099         (grub_rescue_cmd_testload): Likewise.
2100         (grub_rescue_cmd_dump): Likewise.
2101         (grub_rescue_cmd_rmmod): Likewise.
2102         (grub_rescue_cmd_lsmod): Likewise.
2103         (grub_rescue_cmd_exit): Likewise.
2104         (grub_rescue_print_devices): Moved to corecmd.c.
2105         (grub_rescue_print_files): Likewise.
2106         (grub_rescue_cmd_ls): Likewise.
2107         (grub_rescue_cmd_insmod): Likewise.
2108         (grub_rescue_cmd_set): Likewise.
2109         (grub_rescue_cmd_unset): Likewise.
2110         (attempt_normal_mode): Use grub_command_find to get normal module.
2111         (grub_enter_rescue_mode): Use grub_register_core_commands to register
2112         commands, remove grub_rescue_register_command calls.
2114         * normal/command.c (grub_register_command): Removed.
2115         (grub_unregister_command): Likewise.
2116         (grub_command_find): Likewise.
2117         (grub_iterate_commands): Likewise.
2118         (rescue_command): Likewise.
2119         (export_command): Moved to corecmd.c.
2120         (set_command): Removed.
2121         (unset_command): Likewise.
2122         (insmod_command): Likewise.
2123         (rmmod_command): Likewise.
2124         (lsmod_command): Likewise.
2125         (grub_command_init): Likewise.
2127         * normal/completion.c (iterate_command): Use cmd->prio to check for
2128         active command.
2129         (complete_arguments): Use grub_extcmd_t structure to find options.
2130         (grub_normal_do_completion): Change function grub_iterate_commands to
2131         grub_command_iterate.
2133         * normal/execute.c (grub_script_execute_cmd): No need to parse
2134         argument here.
2136         * normal/main.c (grub_dyncmd_dispatcher): New function.
2137         (read_command_list): Register unload commands as dyncmd.
2138         (grub_cmd_normal): Use new command interface, register rescue,
2139         unregister normal at entry, register normal, unregister rescue at exit.
2141         * include/grub/list.h (grub_list_test_t): New type.
2142         (grub_list_iterate): Return int instead of void.
2143         (grub_list_insert): New function.
2144         (GRUB_AS_NAMED_LIST_P): New macro.
2145         (GRUB_AS_PRIO_LIST): Likewise.
2146         (GRUB_AS_PRIO_LIST_P): Likewise.
2147         (GRUB_PRIO_LIST_PRIO_MASK): New constant.
2148         (GRUB_PRIO_LIST_FLAG_ACTIVE): Likewise.
2149         (grub_prio_list): New structure.
2150         (grub_prio_list_insert): New function.
2151         (grub_prio_list_remove): New inline function.
2153         * include/grub/normal.h: Remove <grub/arg.h>, add <grub/command.h>.
2154         (GRUB_COMMAND_FLAG_CMDLINE): Moved to command.h.
2155         (GRUB_COMMAND_FLAG_MENU): Likewise.
2156         (GRUB_COMMAND_FLAG_BOTH): Likewise.
2157         (GRUB_COMMAND_FLAG_TITLE): Likewise.
2158         (GRUB_COMMAND_FLAG_NO_ECHO): Likewise.
2159         (GRUB_COMMAND_FLAG_NO_ARG_PARSE): Removed.
2160         (GRUB_COMMAND_FLAG_NOT_LOADED): Likewise.
2161         (grub_command): Likewise.
2162         (grub_register_command): Likewise.
2163         (grub_command_find): Likewise.
2164         (grub_iterate_commands): Likewise.
2165         (grub_command_init): Likewise.
2166         (grub_arg_parse): Likewise.
2167         (grub_arg_show_help): Likewise.
2169         * include/grub/rescue.h (grub_rescue_register_command): Removed.
2170         (grub_rescue_unregister_command): Likewise.
2172         * include/grub/i386/bsd.h: Remove grub_rescue_cmd_freebsd,
2173         grub_rescue_cmd_openbsd, grub_rescue_cmd_netbsd,
2174         grub_rescue_cmd_freebsd_loadenv and grub_rescue_cmd_freebsd_module.
2176         * include/grub/i386/efi/loader.h: Remove grub_rescue_cmd_linux and
2177         grub_rescue_cmd_initrd.
2178         * include/grub/i386/loader.h: Likewise.
2179         * include/grub/x86_64/loader.h: Likewise.
2181         * include/grub/i386/pc/chainloader.h: Remove grub_chainloader_cmd.
2183 2009-03-21  Bean  <bean123ch@gmail.com>
2185         * util/hostdisk.c (read_device_map): Use grub_util_get_disk_size
2186         instead of stat in mingw environment.
2188         * util/misc.c (grub_millisleep): Use Sleep in mingw environment.
2190         * aclocal.m4 (grub_CHECK_LINK_DIR): New function.
2192         * configure.ac: Use grub_CHECK_LINK_DIR to determine whether to use
2193         AC_CONFIG_LINKS.
2195 2009-03-21  Bean  <bean123ch@gmail.com>
2197         * fs/ext2.c (grub_ext2_mount): Change errno to GRUB_ERR_BAD_FS for
2198         out of range error.
2200 2009-03-18  Michel Dänzer  <michel@daenzer.net>
2202         * fs/ext2.c (grub_ext2_read_block): Take endianness into account when
2203         checking inode flags for EXT4_EXTENTS_FLAG.
2205 2009-03-18  Robert Millan  <rmh@aybabtu.com>
2207         * loader/i386/linux.c: Include `<grub/video.h>' and
2208         `<grub/i386/pc/vbe.h>'..
2209         (grub_linux_setup_video): New function.  Loosely based on the EFI one.
2210         (grub_linux32_boot): Attempt to configure video settings with
2211         grub_linux_setup_video().
2212         (grub_rescue_cmd_linux): Set noreturn=0 in grub_loader_set, in order
2213         to avoid grub_console_fini() which would step out of graphical mode
2214         unconditionally.
2216 2009-03-14  Robert Millan  <rmh@aybabtu.com>
2218         Fix build on powerpc.
2219         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Add `handler.h'.
2221 2009-03-12  Vladimir Serbinenko  <phcoder@gmail.com>
2223         * term/gfxterm.c (GRUB_MOD_FINI(term_gfxterm)): Correct name of
2224         background image command.
2226 2009-03-12  Colin D Bennett  <colin@gibibit.com>
2228         * term/gfxterm.c (draw_cursor): Ensure character is redrawn.
2229         (grub_gfxterm_putchar): Extract pairs of identical calls to
2230         draw_cursor out of conditional blocks.
2232 2009-03-11  Pavel Roskin  <proski@gnu.org>
2234         * fs/hfs.c (grub_hfs_strncasecmp): New function.
2235         (grub_hfs_cmp_catkeys): Use HFS specific string comparison.
2237 2009-03-11  Robert Millan  <rmh@aybabtu.com>
2239         * loader/i386/multiboot_elfxx.c
2240         (CONCAT(grub_multiboot_load_elf, XX)): Do not reject ET_DYN files.
2242 2009-03-11  Felix Zielcke  <fzielcke@z-51.de>
2244         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add `kern/list.c' and
2245         `kern/handler.c'.
2247 2009-03-11  Robert Millan  <rmh@aybabtu.com>
2249         * loader/i386/multiboot.c (code_size): New variable.
2250         (grub_multiboot): Define offsets by adding to `code_size' rather
2251         than subtracting from `grub_multiboot_payload_size'.  Provide
2252         4-byte alignment to MBI and others by increasing
2253         `boot_loader_name_length' appropriately.
2255         * loader/i386/multiboot_elfxx.c
2256         (CONCAT(grub_multiboot_load_elf, XX)): Initialize `code_size'.
2258 2009-03-09  Felix Zielcke  <fzielcke@z-51.de>
2260         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove duplicated
2261         `fs/ext2.c'.
2263 2009-03-08  Robert Millan  <rmh@aybabtu.com>
2265         Make loader/i386/linux.c usable on i386-pc again.
2267         * kern/i386/pc/init.c (grub_machine_init): Disable addition of low
2268         memory to heap.
2269         * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (allocate_pages): Remove
2270         `#error' stanza.
2272 2009-03-07  Bean  <bean123ch@gmail.com>
2274         * loader/i386/efi/linux.c (grub_rescue_cmd_initrd): Fix a bug in initrd
2275         allocation.
2277 2009-03-06  Robert Millan  <rmh@aybabtu.com>
2279         Fix display issue on terminals with screen size other than 80x25
2280         (e.g. gfxterm with resolution higher than 640x480).
2282         * normal/main.c (grub_normal_init_page): Display title text in a
2283         position relative to the center of the terminal instead of relying
2284         on a hardcoded offset.
2286 2009-03-04  Robert Millan  <rmh@aybabtu.com>
2288         Filter /etc/grub.d/10_* so that only add-ons for native kernels are
2289         installed.
2291         * Makefile.in (host_kernel): New variable.
2292         * conf/common.rmk (grub-mkconfig_SCRIPTS): Conditionalize all 10_*.in
2293         scripts instead of just the windows one.
2294         * configure.ac: Initialize and AC_SUBST `host_kernel'.
2296 2009-03-04  Felix Zielcke  <fzielcke@z-51.de>
2298         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `kern/list.c' and
2299         `kern/handler.c'.
2300         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
2301         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
2302         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
2303         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2304         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2305         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2307 2009-03-04  Felix Zielcke  <fzielcke@z-51.de>
2309         * partmap/pc.c (pc_partition_map_iterate): Skip over invalid BSD partitions
2310         or if there's no space for the disk label and print the partition number on a
2311         invalid magic.
2313 2009-03-04  Felix Zielcke  <fzielcke@z-51.de>
2315         * util/misc.c: Include <time.h>.
2316         (grub_millisleep): New function.
2318 2009-03-04  Bean  <bean123ch@gmail.com>
2320         * configure.ac: Only test -mcmodel=large option in x86_64-efi, also add
2321         another option -mno-red-zone.
2323         * commands/handler.c: Change module description.
2325         * kern/handler.c: Add missing space at the end of description line.
2327         * kern/list.c: Likewise.
2329 2009-03-03  Robert Millan  <rmh@aybabtu.com>
2331         Move more components to the relocation area, and fix mbi pointer
2332         handling to use the destination rather than the origin (thanks to
2333         Vladimir Serbinenko for spotting).
2335         * loader/i386/multiboot.c (mbi_dest): New variable.
2336         (grub_multiboot_boot): Use `mbi_dest' instead of `mbi'.
2337         (grub_multiboot): Put cmdline, boot_loader_name and mbi in the
2338         relocation area.
2340 2009-03-01  Bean  <bean123ch@gmail.com>
2342         * include/grub/efi/api.h (GRUB_EFI_MPS_TABLE_GUID): New constant.
2343         (GRUB_EFI_ACPI_TABLE_GUID): Likewise.
2344         (GRUB_EFI_ACPI_20_TABLE_GUID): Likewise.
2345         (GRUB_EFI_SMBIOS_TABLE_GUID): Likewise.
2347         * loader/i386/efi/linux.c (acpi_guid): New variable.
2348         (acpi_guid): Likewise.
2349         (EBDA_SEG_ADDR): New constant.
2350         (LOW_MEM_ADDR): Likewise.
2351         (FAKE_EBDA_SEG): Likewise.
2352         (fake_bios_data): New function.
2353         (grub_linux_boot): Call fake_bios_data.
2355 2009-03-01  Bean  <bean123ch@gmail.com>
2357         * commands/terminal.c: Removed.
2359         * commands/handler.c: New file.
2361         * include/grub/list.h: Likewise.
2363         * include/grub/handler.h: Likewise.
2365         * kern/list.c: Likewise.
2367         * kern/handler.c: Likewise.
2369         * kern/term.h: Include header file <grub/handler.h>.
2370         (grub_term_input): Move next field to the beginning.
2371         (grub_term_output): Likewise.
2372         (grub_term_input_class): New variable.
2373         (grub_term_output_class): Likewise.
2374         (grub_term_register_input): Changed to inline function.
2375         (grub_term_register_output): Likewise.
2376         (grub_term_unregister_input): Likewise.
2377         (grub_term_unregister_output): Likewise.
2378         (grub_term_set_current_input): Likewise.
2379         (grub_term_set_current_output): Likewise.
2380         (grub_term_get_current_input): Likewise.
2381         (grub_term_get_current_output): Likewise.
2382         (grub_term_iterate_input): Removed.
2383         (grub_term_iterate_output): Likewise.
2385         * kern/term.c (grub_term_list_input): Removed.
2386         (grub_term_list_output): Likewise.
2387         (grub_term_input_class): New variable.
2388         (grub_term_output_class): Likewise.
2389         (grub_cur_term_input): Change variable as macro.
2390         (grub_cur_term_output): Likewise.
2391         (grub_term_register_input): Removed.
2392         (grub_term_register_output): Likewise.
2393         (grub_term_unregister_input): Likewise.
2394         (grub_term_unregister_output): Likewise.
2395         (grub_term_set_current_input): Likewise.
2396         (grub_term_set_current_output): Likewise.
2397         (grub_term_iterate_input): Likewise.
2398         (grub_term_iterate_output): Likewise.
2399         (grub_term_get_current_input): Likewise.
2400         (grub_term_get_current_output): Likewise.
2402         * util/grub-editenv.c: Include header file <grub/handler.h>.
2403         (grub_term_get_current_input): Removed.
2404         (grub_term_get_current_output): Likewise.
2405         (grub_term_input_class): New variable.
2406         (grub_term_output_class): Likewise.
2408         * util/grub-fstest.c (grub_term_get_current_input): Removed.
2409         (grub_term_get_current_output): Likewise.
2410         (grub_term_input_class): New variable.
2411         (grub_term_output_class): Likewise.
2413         * util/grub-probe.c (grub_term_get_current_input): Removed.
2414         (grub_term_get_current_output): Likewise.
2415         (grub_term_input_class): New variable.
2416         (grub_term_output_class): Likewise.
2418         * util/i386/pc/grub-setup.c (grub_term_get_current_input): Removed.
2419         (grub_term_get_current_output): Likewise.
2420         (grub_term_input_class): New variable.
2421         (grub_term_output_class): Likewise.
2423         * conf/common.rmk (pkglib_MODULES): Replace terminal with handler.
2424         (terminal_mod_SOURCES): Likewise.
2425         (terminal_mod_CFLAGS): Likewise.
2426         (terminal_mod_LDFLAGS): Likewise.
2428         * conf/i386-pc.rmk (grub_emu_SOURCES): Replace terminal.c with
2429         handler.c.
2430         (kernel_img_SOURCES): Add list.c and handler.c.
2431         (kernel_img_HEADERS): Add list.h and handler.h.
2433         * conf/i386-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
2434         handler.c.
2435         (kernel_mod_SOURCES): Add list.c and handler.c.
2436         (kernel_mod_HEADERS): Add list.h and handler.h.
2438         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Replace terminal.c with
2439         handler.c.
2440         (kernel_elf_SOURCES): Add list.c and handler.c.
2441         (kernel_elf_HEADERS): Add list.h and handler.h.
2443         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
2444         handler.c.
2445         (kernel_elf_SOURCES): Add list.c and handler.c.
2446         (kernel_elf_HEADERS): Add list.h and handler.h.
2448         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
2449         handler.c.
2450         (kernel_mod_SOURCES): Add list.c and handler.c.
2451         (kernel_mod_HEADERS): Add list.h and handler.h.
2453         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
2454         handler.c.
2455         (kernel_elf_SOURCES): Add list.c and handler.c.
2456         (kernel_elf_HEADERS): Add list.h and handler.h.
2458 2009-02-27  Robert Millan  <rmh@aybabtu.com>
2460         Factorize elf32 / elf64 code in Multiboot loader.  This will
2461         prevent it from getting out of sync again.
2463         * loader/i386/multiboot.c (grub_multiboot_is_elf32,
2464         grub_multiboot_load_elf32, grub_multiboot_is_elf64,
2465         grub_multiboot_load_elf64): Move from here ...
2466         * loader/i386/multiboot_elfxx.c (grub_multiboot_is_elf,
2467         grub_multiboot_load_elf): ... to here (new file).
2469 2009-02-27  Robert Millan  <rmh@aybabtu.com>
2471         * util/grub.d/10_linux.in: Rename "single-user mode" to
2472         "recovery mode".
2474 2009-02-27  Vladimir Serbinenko  <phcoder@gmail.com>
2476         Don't leak in SCSI code.
2477         * disk/scsi.c (grub_scsi_close): free `scsi'.
2479 2009-02-27  Robert Millan  <rmh@aybabtu.com>
2481         * loader/i386/pc/multiboot.c: Move from here ...
2482         * loader/i386/multiboot.c: ... to here.  Update all users.
2484 2009-02-27  Robert Millan  <rmh@aybabtu.com>
2486         Patch from Alexandre Bique <bique.alexandre@gmail.com>
2487         * util/i386/pc/grub-setup.c (setup): Fix directory path.
2489 2009-02-27  Krzysztof Smiechowicz  <deadwood@wp.pl>
2491         * fs/sfs.c (grub_sfs_read_extent): Correction to traversing extent
2492         b-tree.
2494 2009-02-27  Robert Millan  <rmh@aybabtu.com>
2496         * kern/misc.c (grub_strtoull): Fix bug (it mistakenly parsed the
2497         `0x' qualifier as 0 when base is specified as parameter).
2499 2009-02-24  Bean  <bean123ch@gmail.com>
2501         * configure.ac: Check for -mcmodel=large in x86_64 target.
2503         * include/grub/efi/api.h (efi_call_10): New macro.
2504         (efi_wrap_10): New function.
2506         * include/grub/efi/pe32.h (GRUB_PE32_REL_BASE_HIGH): New macro.
2507         (GRUB_PE32_REL_BASED_HIGH): Likewise.
2508         (GRUB_PE32_REL_BASED_LOW): Likewise.
2509         (GRUB_PE32_REL_BASED_HIGHLOW): Likewise.
2510         (GRUB_PE32_REL_BASED_HIGHADJ): Likewise.
2511         (GRUB_PE32_REL_BASED_MIPS_JMPADDR): Likewise.
2512         (GRUB_PE32_REL_BASED_SECTION): Likewise.
2513         (GRUB_PE32_REL_BASED_REL): Likewise.
2514         (GRUB_PE32_REL_BASED_IA64_IMM64): Likewise.
2515         (GRUB_PE32_REL_BASED_DIR64): Likewise.
2516         (GRUB_PE32_REL_BASED_HIGH3ADJ): Likewise.
2518         * kern/x86_64/dl.c (grub_arch_dl_relocate_symbols): Fixed relocation
2519         issue.
2521         * kern/x86_64/efi/callwrap.S (efi_wrap_6): Bug fix.
2522         (efi_wrap_10): New function.
2524         * kern/x86_64/efi/startup.S (codestart): Use relative addressing.
2526         * loader/efi/appleloader.c (devpath_5): Add support for late 2008
2527         MB/MBP model (NV chipset).
2528         (devdata_devs): Add devpath_5 to the list.
2530         * load/i386/efi/linux.c (video_base): Remove variable.
2531         (RGB_MASK): New macro.
2532         (RGB_MAGIC): Likewise.
2533         (LINE_MIN): Likewise.
2534         (LINE_MAX): Likewise.
2535         (FBTEST_STEP): Likewise.
2536         (FBTEST_COUNT): Likewise.
2537         (fb_list): New variable.
2538         (grub_find_video_card): Remove function.
2539         (find_framebuf): New function.
2540         (grub_linux_setup_video): Use find_framebuf to get frame buffer and
2541         line length.
2543         * util/i386/efi/grub-mkimage.c (grub_reloc_section): Fix relocation
2544         problem for x86_64.
2546 2009-02-22  Vesa Jääskeläinen  <chaac@nic.fi>
2548         Patch #25624 by Kevin Lacquement <kevin@lacqui>.
2550         * util/grub-mkconfig.in: Use ${grub_mkdevicemap} instead of hard
2551         coding tool name.
2553 2009-02-22  Robert Millan  <rmh@aybabtu.com>
2555         * include/multiboot.h (MULTIBOOT_INFO_ALIGN): New macro.
2556         * loader/i386/pc/multiboot.c (grub_multiboot): Include the MBI
2557         in our relocation, instead of using it directly from heap.  Also
2558         use `MULTIBOOT_INFO_ALIGN' to ensure it is aligned.
2560 2009-02-21  Robert Millan  <rmh@aybabtu.com>
2562         Implement USB keyboard support (based on patch by Marco Gerards)
2564         * conf/i386-pc.rmk (pkglib_MODULES): Add `usb_keyboard.mod'.
2565         (usb_keyboard_mod_SOURCES, usb_keyboard_mod_CFLAGS)
2566         (usb_keyboard_mod_LDFLAGS): New variables.
2568         * term/usb_keyboard.c: New file.
2570 2009-02-14  Vladimir Serbinenko  <phcoder@gmail.com>
2572         Corrected wrong declaration
2574         * kern/disk.c: corrected declaration of grub_disk_ata_pass_through.
2576 2009-02-14  Christian Franke  <franke@computer.org>
2578         * commands/lspci.c (grub_pci_classes): Add `SATA Controller'.
2579         (grub_lspci_iter): Print class code and programming interface byte.
2581 2009-02-14  Christian Franke  <franke@computer.org>
2583         * gendistlist.sh: Ignore `.svn' directories.
2585 2009-02-14  Felix Zielcke  <fzielcke@z-51.de>
2587         * fs/fat.c: Add 2009 to Copyright line.
2589 2009-02-14  Christian Franke  <franke@computer.org>
2591         * commands/hdparm.c: New file.  Provides `hdparm' command
2592         which sends ATA commands via grub_disk_ata_pass_through ().
2594         * conf/i386-pc.rmk: Add ata_pthru.mod and hdparm.mod.
2596         * disk/ata.c: Include <grub/ata.h>.  Move <grub/misc.h>
2597         and <grub/cpu/io.h> to include/grub/ata.h.
2598         (enum grub_ata_addressing_t): Move to include/grub/ata.h.
2599         (GRUB_CDROM_SECTOR_SIZE): Remove.
2600         (GRUB_ATA_*): Move to include/grub/ata.h.
2601         (GRUB_ATAPI_*): Likewise.
2602         (enum grub_ata_commands): Likewise.
2603         (enum grub_ata_timeout_milliseconds): Likewise.
2604         (struct grub_ata_device): Likewise.
2605         (grub_ata_regset): Likewise.
2606         (grub_ata_regget): Likewise.
2607         (grub_ata_regset2): Likewise.
2608         (grub_ata_regget2): Likewise.
2609         (grub_ata_check_ready): Likewise.
2610         (grub_ata_wait_not_busy): Remove static, exported in
2611         include/grub/ata.h.
2612         (grub_ata_wait_drq): Likewise.
2613         (grub_ata_pio_read): Likewise.
2615         * disk/ata_pthru.c: New file.  Provides grub_ata_pass_through ()
2616         function for hdparm.mod.
2618         * include/grub/ata.h: New file, contains declarations from
2619         disk/ata.c.
2620         (enum grub_ata_commands): Add new commands for commands/hdparm.c.
2622         * include/grub/disk.h (grub_disk_ata_pass_through_parms): New struct.
2623         (grub_disk_ata_pass_through): New exported variable.
2625         * kern/disk.c (grub_disk_ata_pass_through): New variable.
2627 2009-02-13  Colin D Bennett  <colin@gibibit.com>
2629         Support multiple fallback entries, and provide an API to support
2630         executing default+fallback menu entries.  Renamed the `terminal' menu
2631         viewer to `text'.
2633         * include/grub/normal.h (grub_normal_text_menu_viewer): New global
2634         variable declaration.
2635         (grub_menu_execute_callback): New structure declaration.
2636         (grub_menu_execute_callback_t): New typedef.
2637         (grub_menu_execute_with_fallback): New function declaration.
2638         (grub_menu_get_entry): Likewise.
2639         (grub_menu_get_timeout): Likewise.
2640         (grub_menu_set_timeout): Likewise.
2642         * normal/main.c (GRUB_MOD_INIT(normal)): Refer to new variable name.
2644         * normal/menu.c (grub_wait_after_message): Moved to
2645         `normal/menu_text.c'.
2646         (draw_border): Likewise.
2647         (print_message): Likewise.
2648         (print_entry): Likewise.
2649         (print_entries): Likewise.
2650         (grub_menu_init_page): Likewise.
2651         (get_entry_number): Likewise.
2652         (print_timeout): Likewise.
2653         (run_menu): Likewise.
2654         (grub_menu_execute_entry): Likewise.
2655         (show_text_menu): Likewise.
2656         (get_and_remove_first_entry_number): New function.
2657         (grub_menu_execute_with_fallback): Likewise.
2658         (get_entry): Renamed to ...
2659         (grub_menu_get_entry): .. this and made it global.
2660         (get_timeout): Renamed to ...
2661         (grub_menu_get_timeout): ... this and made it global.
2662         (set_timeout): Renamed to ...
2663         (grub_menu_set_timeout): ... this and made it global.
2664         (grub_normal_terminal_menu_viewer): Renamed to ...
2665         (grub_normal_text_menu_viewer): ... this.
2667         * normal/menu_text.c: New file.  Extracted text-menu-specific code
2668         from normal/menu.c.
2670         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add `normal/menu_text.c'.
2671         (normal_mod_SOURCES): Likewise.
2673         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
2674         (normal_mod_SOURCES): Likewise.
2676         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2677         (normal_mod_SOURCES): Likewise.
2679         * conf/i386-pc.rmk, (grub_emu_SOURCES): Likewise.
2680         (normal_mod_SOURCES): Likewise.
2682         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2683         (normal_mod_SOURCES): Likewise.
2685         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2686         (normal_mod_SOURCES): Likewise.
2688         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
2689         (normal_mod_SOURCES): Likewise.
2691 2009-02-11  Robert Millan  <rmh@aybabtu.com>
2693         * util/grub.d/00_header.in: Update old reference to `font' command.
2695 2009-02-10  Felix Zielcke  <fzielcke@z-51.de>
2697         * fs/fat.c (grub_fat_mount): Fix wrong comparison.
2699         Based on patch from Javier Martín.
2701 2009-02-09  Felix Zielcke  <fzielcke@z-51.de>
2703         * conf/common.rmk (grub_probe_SOURCES): Move fs/ext2.c before fs/fat.c
2704         to avoid false positives with FAT.
2705         (grub_fstest_SOURCES): Likewise.
2706         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
2707         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
2708         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2709         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
2710         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2711         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2713 2009-02-09  Felix Zielcke  <fzielcke@z-51.de>
2715         * fs/fat.c (grub_fat_mount): Try to avoid false positives by checking
2716         bpb.version_specific.fat12_or_fat16.fstype and
2717         bpb.version_specific.fat32.fstype.
2719 2009-02-08  Robert Millan  <rmh@aybabtu.com>
2721         * fs/tar.c: Replace "fs/cpio.c" with "cpio.c".
2723 2009-02-08  Robert Millan  <rmh@aybabtu.com>
2725         * Makefile.in (host_os, host_cpu): New variables.
2726         (target_os): Remove.  Update all users.
2728 2009-02-08  Marco Gerards  <marco@gnu.org>
2730         * Makefile.in (enable_grub_emu_usb): New variable.
2731         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/scsi.c'.
2732         (grub_emu_SOURCES) [grub_emu_SOURCES]: Add `disk/usbms.c',
2733         `util/usb.c', `bus/usb/usb.c' and `commands/usbtest.c'.
2734         (grub_emu_LDFLAGS): Add `$(LIBUSB)'.
2735         (pkglib_MODULES): Add `usb.mod', `uhci.mod', `ohci.mod',
2736         `usbtest.mod' and `usbms.mod'.
2737         (usb_mod_SOURCES, usb_mod_CFLAGS, usb_mod_LDFLAGS)
2738         (usbtest_mod_SOURCES, usbtest_mod_CFLAGS, usbtest_mod_LDFLAGS)
2739         (uhci_mod_SOURCES, uhci_mod_CFLAGS, uhci_mod_LDFLAGS,
2740         (ohci_mod_SOURCES, ohci_mod_CFLAGS, ohci_mod_LDFLAGS)
2741         (usbms_mod_SOURCES, usbms_mod_CFLAGS, usbms_mod_LDFLAGS): New
2742         variables.
2744         * disk/usbms.c: New file.
2746         * include/grub/usb.h: Likewise.
2748         * include/grub/usbtrans.h: Likewise.
2750         * include/grub/usbdesc.h: Likewise.
2752         * bus/usb/usbtrans.c: Likewise.
2754         * bus/usb/ohci.c: Likewise.
2756         * bus/usb/uhci.c: Likewise.
2758         * bus/usb/usbhub.c: Likewise.
2760         * bus/usb/usb.c: Likewise.
2762         * commands/usbtest.c: Likewise.
2764         * util/usb.c: Likewise.
2766         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_IO'.
2768         * configure.ac: Test for libusb presence.
2770         * util/grub-emu.c (main) [HAVE_LIBUSB_H]: Call `grub_libusb_init'.
2772 2009-02-08  Vesa Jääskeläinen  <chaac@nic.fi>
2774         * kern/mm.c: Add more comments.
2776 2009-02-08  Robert Millan  <rmh@aybabtu.com>
2778         Patch from Javier Martín.
2779         * fs/ext2.c (EXT2_DRIVER_SUPPORTED_INCOMPAT): Add
2780         `EXT4_FEATURE_INCOMPAT_FLEX_BG'.
2782 2009-02-08  Robert Millan  <rmh@aybabtu.com>
2784         * fs/cpio.c: Split tar functionality to ...
2785         * fs/tar.c: ... here (new file).  Update all users.
2787 2009-02-07  Robert Millan  <rmh@aybabtu.com>
2789         * fs/ext2.c (grub_ext2_mount): Avoid mounting filesystems with
2790         backward-incompatible features.
2792         Based on patch from Javier Martín, with some adjustments.
2794 2009-02-07  Michael Scherer  <misc@mandriva.org>
2796         * fs/hfs.c (grub_hfsplus_iterate_dir): Treat hfs+ as case insensitive.
2798 2009-02-07  Robert Millan  <rmh@aybabtu.com>
2800         * conf/common.rmk (grub_probe_SOURCES, grub_fstest_SOURCES): Move
2801         position of `disk/lvm.c' to ensure grub_init_all() always picks it
2802         after the RAID stuff.
2804 2009-02-05  Vesa Jääskeläinen  <chaac@nic.fi>
2806         Fixes problem when running vbetest command as reported by
2807         Vladimir Serbinenko <phcoder@gmail.com>.
2809         * (grub_vbe_set_video_mode): Fixed problem with text modes.
2811 2009-02-04  Felix Zielcke  <fzielcke@z-51.de>
2813         util/getroot.c (grub_util_get_grub_dev): Add support for /dev/mdNpN and
2814         /dev/md/NpN style mdraid devices.
2816 2009-02-03  Felix Zielcke  <fzielcke@z-51.de>
2818         * util/unifont2pff.rb: Remove.
2820 2009-02-03  Felix Zielcke  <fzielcke@z-51.de>
2822         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add a missing trailing
2823         `#'.
2825 2009-02-03  Felix Zielcke  <fzielcke@z-51.de>
2827         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/menu_viewer.c'.
2828         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
2829         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
2830         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
2831         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2832         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2833         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2835 2009-02-02  Christian Franke  <franke@computer.org>
2837         * lib/hexdump.c (hexdump): Print at most 3 lines if data is identical.
2839 2009-02-01  Felix Zielcke  <fzielcke@z-51.de>
2841         * INSTALL: Note that we now require at least autoconf 2.59 and
2842         that LZO is optional.
2844 2009-02-01  Vesa Jääskeläinen  <chaac@nic.fi>
2846         Base on patch on bug #24154 created by Tomas Tintera
2847         <trosos@seznam.cz>.
2849         * video/i386/pc/vbe.c (grub_video_vbe_scroll): Fix downward scrolling.
2851 2009-02-01  Vesa Jääskeläinen  <chaac@nic.fi>
2853         Based on patch on bug #25318 created by Bernhard Rosenkraenzer
2854         <bero@arklinux.org>.
2856         * normal/parser.y (script_init): Add missing semicolon.
2858 2009-01-31  Colin D Bennett  <colin@gibibit.com>
2860         * normal/main.c: Add include to grub/menu_viewer.h.
2861         (free_menu_entry_classes): Added.
2862         (grub_normal_menu_addentry): Added class property handling.
2863         (grub_normal_execute): Changed to use new menu viewer for menu viewing.
2864         (GRUB_MOD_INIT(normal)): Added register for text based menu viewer.
2866         * normal/menu_viewer.c: New file.
2868         * normal/menu.c (run_menu_entry): Renamed to ...
2869         (grub_menu_execute_entry): ... this and made it as global.
2870         (grub_menu_run): Renamed to ...
2871         (show_text_menu): ... this and made it local.
2872         (show_text_menu): Adapt to new function names.
2873         (grub_normal_terminal_menu_viewer): New global variable.
2875         * include/grub/menu.h: New file.
2877         * include/grub/menu_viewer.h: New file.
2879         * include/grub/normal.h: Added include to grub/menu.h.
2880         (grub_menu_entry): Moved to include/grub/menu.h.
2881         (grub_menu_entry_t): Likewise.
2882         (grub_menu): Likewise.
2883         (grub_menu_t): Likewise.
2884         (grub_normal_terminal_menu_viewer): Added.
2885         (grub_menu_execute_entry): Likewise.
2886         (grub_menu_run): Removed.
2888         * DISTLIST: Added include/grub/menu.h.
2889         Added include/grub/menu_viewer.h.
2890         Added normal/menu_viewer.c.
2892 2009-01-31  Vesa Jääskeläinen  <chaac@nic.fi>
2894         * normal/execute.c (grub_script_execute_menuentry): Changed to use
2895         arglist for menutitle arguments.
2897         * normal/main.c (grub_normal_menu_addentry): Likewise.
2899         * normal/parser.y (menuentry): Likewise.
2901         * normal/script.c (grub_script_create_cmdmenu): Likewise.
2903         * include/grub/script.h (grub_script_cmd_menuentry): Likewise.
2904         (grub_script_create_cmdmenu): Likewise.
2906         * include/grub/normal.h (grub_normal_menu_addentry): Likewise.
2908         * conf/i386-pc.rmk (normal_mod_SOURCES): Adapt Colin D Bennett's
2909         changes.
2911         * conf/x86_64-efi.rmk (normal_mod_SOURCES): Likewise.
2913         * conf/i386-coreboot.rmk (normal_mod_SOURCES): Likewise.
2915         * conf/i386-efi.rmk (normal_mod_SOURCES): Likewise.
2917         * conf/i386-ieee1275.rmk (normal_mod_SOURCES): Likewise.
2919         * conf/powerpc-ieee1275.rmk (normal_mod_SOURCES): Likewise.
2921         * conf/sparc64-ieee1275.rmk (normal_mod_SOURCES): Likewise.
2923 2009-01-30  Christian Franke  <franke@computer.org>
2925         * normal/arg.c (grub_arg_show_help): Add indentation if '\n' appears
2926         in option help text.
2928 2009-01-27  Pavel Roskin  <proski@gnu.org>
2930         * disk/fs_uuid.c (search_fs_uuid): Ignore case of the UUID.
2932 2009-01-27  Vesa Jääskeläinen  <chaac@nic.fi>
2934         * commands/lsmmap.c: Add include to grub/machine/memory.h.
2936         * fs/i386/pc/pxe.c (grub_pxefs_open): Fix sign problem.
2938         * term/i386/pc/at_keyboard.c (GRUB_MOD_FINI(at_keyboard)): Use proper
2939         unregister function.
2941 2009-01-27  Vesa Jääskeläinen  <chaac@nic.fi>
2943         * disk/scsi.c (grub_scsi_read): Fix sign problem.
2945         * term/i386/pc/vga_text.c (grub_vga_text_init_fini). Fix declaration.
2947         * util/grub-mkfont.c (usage): Fix typo.
2949         * util/elf/grub-mkimage.c (load_modules): Fix warning.
2951 2009-01-26  Daniel Mierswa  <impulze@impulze.org>
2953         * fs/fat.c (grub_fat_uuid): Fix shift of the first two bytes.
2955         * commands/search.c (search_fs_uuid): Ignore case of the UUID.
2957         * kern/misc.c (grub_strcasecmp): New function.
2958         (grub_strcasecmp): Use grub_size_t instead of int for length.
2959         Fix return value.
2960         * include/grub/misc.h: Update function prototypes.
2962 2009-01-26  Robert Millan  <rmh@aybabtu.com>
2964         * configure.ac: Fix cross-compilation check.
2966 2009-01-22  Christian Franke  <franke@computer.org>
2968         * kern/misc.c (grub_vsprintf): Fix size and termination of `format2'
2969         (precision) digit string.  Allow `.format2' without `format1' (width).
2970         Limit input chars for `%s' output to `format2' if specified.  This is
2971         compatible with standard printf ().
2973 2009-01-22  Christian Franke  <franke@computer.org>
2975         * disk/ata.c (grub_ata_wait_status): Replace by ...
2976         (grub_ata_wait_not_busy): ... this function.  Checks only BSY bit,
2977         other status bits may be invalid while BSY is asserted.
2978         (grub_ata_check_ready): New function.
2979         (grub_ata_cmd): Removed.
2980         (grub_ata_wait_drq): New function.
2981         (grub_ata_strncpy): Remove inline.
2982         (grub_ata_pio_read): Reduce to actual block transfer.  BSY wait
2983         and error check now done by grub_ata_wait_drq ().
2984         (grub_ata_pio_write): Likewise.
2985         (grub_atapi_identify): Set DEV before check for !BSY.  Use
2986         grub_ata_wait_drq () to wait for data.
2987         (grub_ata_device_initialize): Add status register check to
2988         detect missing SATA slave devices.  Add debug messages.
2989         (grub_atapi_wait_drq): Use grub_ata_wait_not_busy ().
2990         (grub_atapi_packet): Set DEV before check for !BSY.  Replace
2991         transfer loop by grub_ata_pio_write ().
2992         (grub_ata_identify): Set DEV before check for !BSY. Use
2993         grub_ata_wait_drq () to wait for data.
2994         (grub_ata_setaddress): Set DEV before check for !BSY.
2995         (grub_ata_readwrite): Remove duplicate code, handle batch/rest and
2996         read/write in one loop.  Fix invalid command on write.  Fix incomplete
2997         command on (size % batch) == 0.  Add missing error check after write of
2998         last block.  Add debug messages.
2999         (grub_atapi_read):  Replace transfer loop by grub_ata_pio_read ().
3001 2009-01-19  Christian Franke  <franke@computer.org>
3003         * disk/ata.c (GRUB_ATAPI_REG_*): New defines.
3004         (GRUB_ATAPI_IREASON_*): Likewise.
3005         (grub_ata_pio_write): Fix timeout error return.
3006         (grub_atapi_identify): Add grub_ata_wait () after cmd.
3007         (grub_atapi_wait_drq): New function.
3008         (grub_atapi_packet): New parameter `size'.
3009         Use grub_atapi_wait_drq () and direct write instead of
3010         grub_ata_pio_write ().
3011         (grub_atapi_read): Replace grub_ata_pio_read () by a loop which
3012         reads the number of bytes requested by the device for each DRQ
3013         assertion.
3014         (grub_atapi_write): Remove old implementation, return not
3015         implemented instead.
3017 2009-01-19  Christian Franke  <franke@computer.org>
3019         * disk/scsi.c (grub_scsi_read10): Use scsi->blocksize instead
3020         of 512 to calculate data size.
3021         (grub_scsi_read12): Likewise.
3022         (grub_scsi_write10): Likewise.
3023         (grub_scsi_write12): Likewise.
3024         (grub_scsi_read): Adjust size according to blocksize.
3025         Add checks for invalid blocksize and unaligned transfer.
3027 2009-01-19  Vesa Jääskeläinen  <chaac@nic.fi>
3029         * font/font.c (grub_font_loader_init): Re-position unknown glyph.
3031         * term/gfxterm.c (write_char): Fix background rendering for wide
3032         width glyphs.
3034 2009-01-19  Robert Millan  <rmh@aybabtu.com>
3036         * config.guess: Update to latest version from config git.
3037         * config.sub: Likewise.
3039 2009-01-17  Felix Zielcke  <fzielcke@z-51.de>
3041         * Makefile.in: Change font compilation to use new grub-mkfont instead
3042         of java version.
3044         * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: Remove.
3045         * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
3046         * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
3047         * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
3048         * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
3049         * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
3050         * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
3051         * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
3052         * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
3054 2009-01-16  Christian Franke  <franke@computer.org>
3056         * disk/ata.c (enum grub_ata_commands): Remove EXEC_DEV_DIAGNOSTICS.
3057         (enum grub_ata_timeout_milliseconds): New enum.
3058         (grub_ata_wait_status): Add parameter milliseconds.
3059         (grub_ata_cmd): Remove variable `err'.  Remove wait for !DRQ to allow
3060         recovery from timed-out commands.
3061         (grub_ata_pio_read): Add parameter milliseconds.  Fix error return,
3062         return grub_errno instead of REG_ERROR.
3063         (grub_ata_pio_write): Add parameter milliseconds.
3064         (grub_atapi_identify): Fix size of ATAPI IDENTIFY sector.
3065         Pass milliseconds to grub_ata_wait_status () and
3066         grub_ata_pio_read ().
3067         (grub_atapi_packet): Pass milliseconds to grub_ata_pio_write ().
3068         (grub_ata_identify): Remove variable `ataerr'.  Pass milliseconds to
3069         grub_ata_wait_status ().  Fix IDENTIFY timeout check.
3070         (grub_ata_device_initialize): Remove EXECUTE DEVICE DIAGNOSTICS.
3071         It is not suitable for device detection, because DEV bit is ignored,
3072         the command may run too long, and not all devices set the signature
3073         properly.
3074         (grub_ata_pciinit): Clear grub_errno before grub_ata_device_initialize ().
3075         (grub_ata_setaddress): Pass milliseconds to grub_ata_wait_status ().
3076         Fix device selection, DEV bit must be set first to address the registers
3077         of the correct device.
3078         (grub_ata_readwrite): Pass milliseconds to grub_ata_wait_status () and
3079         grub_ata_pio_read/write ().
3080         (grub_atapi_read): Pass milliseconds to grub_ata_pio_read ().
3081         (grub_atapi_write): Pass milliseconds to grub_ata_pio_write ().
3083 2009-01-13  Carles Pina i Estany  <carles@pina.cat>
3085         * util/grub-editenv.c (main): Use fseeko(), not fseek().
3087 2009-01-13  Bean  <bean123ch@gmail.com>
3089         * util/grub-mkfont.c (write_font): forget to remove some debug code.
3091 2009-01-13  Bean  <bean123ch@gmail.com>
3093         * Makefile.in: (enable_grub_mkfont): New variable.
3094         (freetype_cflags): Likewise.
3095         (freetype_libs): Likewise.
3097         * common.rmk (bin_UTILITIES): Add `grub-mkfont' if requested.
3098         (grub_mkfont_SOURCES): New variable.
3099         (grub_mkfont_CFLAGS): Likewise.
3100         (grub_mkfont_LDFLAGS): Likewise.
3102         * configure.ac (--enable-grub-mkfont): New option. Check for freetype2
3103         library if `--enable-grub-mkfont' is requested.
3104         (enable_grub_mkfont): New variable.
3105         (freetype_cflags): Likewise.
3106         (freetype_libs): Likewise.
3108         * util/grub-mkfont.c: New file.
3110 2009-01-12  Christian Franke  <franke@computer.org>
3112         * disk/ata.c (grub_ata_pciinit): Fix bit numbers of compatibility
3113         mode check.  Fix setting of compat_use[].
3115 2009-01-10  Robert Millan  <rmh@aybabtu.com>
3117         Update a few copyright years which we forgot to do in 2008 (only for
3118         files whose changes made in 2008 were copyright-significant)
3120         * Makefile.in: Add 2008 to Copyright line.
3121         * disk/ieee1275/ofdisk.c: Likewise.
3122         * disk/efi/efidisk.c: Likewise.
3123         * kern/dl.c: Likewise.
3124         * kern/sparc64/ieee1275/init.c: Likewise.
3125         * kern/mm.c: Likewise.
3126         * kern/efi/mm.c: Likewise.
3127         * boot/i386/pc/boot.S: Likewise.
3128         * genfslist.sh: Likewise.
3129         * fs/iso9660.c: Likewise.
3130         * fs/hfs.c: Likewise.
3131         * fs/jfs.c: Likewise.
3132         * fs/minix.c: Likewise.
3133         * fs/ufs.c: Likewise.
3134         * gensymlist.sh.in: Likewise.
3135         * genkernsyms.sh.in: Likewise.
3136         * include/grub/misc.h: Likewise.
3137         * include/grub/types.h: Likewise.
3138         * include/grub/symbol.h: Likewise.
3139         * include/grub/elf.h: Likewise.
3140         * include/grub/kernel.h: Likewise.
3141         * include/grub/disk.h: Likewise.
3142         * include/grub/dl.h: Likewise.
3143         * include/grub/i386/linux.h: Likewise.
3144         * include/grub/i386/pc/biosdisk.h: Likewise.
3145         * include/grub/efi/api.h: Likewise.
3146         * include/grub/efi/pe32.h: Likewise.
3147         * include/grub/util/misc.h: Likewise.
3148         * normal/execute.c: Likewise.
3149         * normal/arg.c: Likewise.
3150         * normal/completion.c: Likewise.
3151         * normal/lexer.c: Likewise.
3152         * normal/parser.y: Likewise.
3153         * normal/misc.c: Likewise.
3154         * commands/i386/pc/vbeinfo.c: Likewise.
3155         * commands/hexdump.c: Likewise.
3156         * commands/terminal.c: Likewise.
3157         * commands/ls.c: Likewise.
3158         * commands/help.c: Likewise.
3159         * partmap/pc.c: Likewise.
3160         * loader/efi/chainloader.c: Likewise.
3161         * loader/multiboot_loader.c: Likewise.
3162         * loader/i386/pc/multiboot2.c: Likewise.
3163         * term/efi/console.c: Likewise.
3164         * term/i386/pc/serial.c: Likewise.
3165         * util/lvm.c: Likewise.
3166         * util/console.c: Likewise.
3167         * util/i386/efi/grub-mkimage.c: Likewise.
3168         * util/raid.c: Likewise.
3170 2009-01-06  Vesa Jääskeläinen  <chaac@nic.fi>
3172         * commands/videotest.c: Removed include to grub/machine/memory.h.
3174         * conf/i386-pc.rmk (pkglib_MODULES): Removed video.mod, gfxterm.mod,
3175         videotest.mod, bitmap.mod, tga.mod, jpeg.mod, png.mod.
3176         (video_mod_SOURCES): Removed.
3177         (video_mod_CFLAGS): Likewise.
3178         (video_mod_LDFLAGS): Likewise.
3179         (gfxterm_mod_SOURCES): Likewise.
3180         (gfxterm_mod_CFLAGS): Likewise.
3181         (gfxterm_mod_LDFLAGS): Likewise.
3182         (videotest_mod_SOURCES): Likewise.
3183         (videotest_mod_CFLAGS): Likewise.
3184         (videotest_mod_LDFLAGS): Likewise.
3185         (bitmap_mod_SOURCES): Likewise.
3186         (bitmap_mod_CFLAGS): Likewise.
3187         (bitmap_mod_LDFLAGS): Likewise.
3188         (tga_mod_SOURCES): Likewise.
3189         (tga_mod_CFLAGS): Likewise.
3190         (tga_mod_LDFLAGS): Likewise.
3191         (jpeg_mod_SOURCES): Likewise.
3192         (jpeg_mod_CFLAGS): Likewise.
3193         (jpeg_mod_LDFLAGS): Likewise.
3194         (png_mod_SOURCES): Likewise.
3195         (png_mod_CFLAGS): Likewise.
3196         (png_mod_LDFLAGS): Likewise.
3198         * conf/common.rmk (pkglib_MODULES): Added video.mod, videotest.mod,
3199         bitmap.mod, tga.mod, jpeg.mod, png.mod, font.mod, gfxterm.mod
3200         (video_mod_SOURCES): Added.
3201         (video_mod_CFLAGS): Likewise.
3202         (video_mod_LDFLAGS): Likewise.
3203         (videotest_mod_SOURCES): Likewise.
3204         (videotest_mod_CFLAGS): Likewise.
3205         (videotest_mod_LDFLAGS): Likewise.
3206         (bitmap_mod_SOURCES): Likewise.
3207         (bitmap_mod_CFLAGS): Likewise.
3208         (bitmap_mod_LDFLAGS): Likewise.
3209         (tga_mod_SOURCES): Likewise.
3210         (tga_mod_CFLAGS): Likewise.
3211         (tga_mod_LDFLAGS): Likewise.
3212         (jpeg_mod_SOURCES): Likewise.
3213         (jpeg_mod_CFLAGS): Likewise.
3214         (jpeg_mod_LDFLAGS): Likewise.
3215         (png_mod_SOURCES): Likewise.
3216         (png_mod_CFLAGS): Likewise.
3217         (png_mod_LDFLAGS): Likewise.
3218         (gfxterm_mod_SOURCES): Likewise.
3219         (gfxterm_mod_CFLAGS): Likewise.
3220         (gfxterm_mod_LDFLAGS): Likewise.
3222         * term/gfxterm.c: Removed include to grub/machine/memory.h,
3223         grub/machine/console.h.
3225 2009-01-04  Jerone Young  <jerone@gmail.com>
3227         Make on screen instructions clearer
3229         Based on patch created by Jidanni <jidanni@jidanni.org>
3231         * normal/menu.c: print clearer instructions on the screen
3233 2009-01-02  Colin D Bennett  <colin@gibibit.com>
3235         New font engine.
3237         Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to
3238         build system and fixed gfxterm.c to work with different sized fonts.
3240         * configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF.
3242         * configure: Re-generated.
3244         * DISTLIST: Removed font/manager.c.
3245         Added font/font.c.
3246         Added font/font_cmd.c.
3248         * Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF.  Added Font tool
3249         compilation.
3251         * include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype.  Changed users.
3253         * kern/misc.c (grub_utf8_to_ucs4): Changed prototype.
3255         * kern/term.c: Changed users of grub_utf8_to_ucs4.
3257         * normal/menu.c: Likewise.
3259         * conf/common.rmk (font_mod_SOURCES): Removed font/manager.c.
3260         (font_mod_SOURCES): Added font/font_cmd.c, font/font.c.
3262         * include/grub/font.h: Replaced with new file.
3264         * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value.
3265         (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise.
3266         (GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise.
3267         (GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added.
3268         (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED.
3269         (grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha,
3270         fg_red, fg_green, fg_blue, fg_alpha.
3271         (grub_video_adapter): Removed blit_glyph.
3272         (grub_video_blit_glyph): Removed.
3274         * font/manager.c: Removed file.
3276         * font/font.c: New file.
3278         * font/font_cmd.c: Likewise.
3280         * video/video.c (grub_video_blit_glyph): Removed.
3282         * video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support.
3283         (grub_video_vbe_map_rgba): Likewise.
3284         (grub_video_vbe_unmap_color_int): Likewise.
3285         (grub_video_vbe_blit_glyph): Removed.
3286         (grub_video_vbe_adapter): Removed blit_glyph.
3288         * video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support.
3289         (get_pixel): Likewise.
3290         (set_pixel): Likewise.
3292         * commands/videotest.c (grub_cmd_videotest): Added more tests for fonts.
3294         * term/gfxterm.c: Adapted to new font engine.
3296         * term/i386/pc/vesafb.c: Marked as deprecated.  Made it compile.
3298         * term/i386/pc/vga.c: Likewise.
3300         * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file.
3302         * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
3304         * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
3306         * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
3308         * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
3310         * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
3312         * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
3314         * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
3316         * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
3318         * util/grub.d/00_header.in: Changed to use new loadfont command.
3320         * util/grub-mkconfig_lib.in: Changed font extension.
3322 2008-12-28  Felix Zielcke  <fzielcke@z-51.de>
3324         * util/getroot.c (grub_util_get_grub_dev): Add support for
3325         /dev/md/dNNpNN style partitionable mdraid devices.
3327 2008-12-12  Alex Smith  <alex@alex-smith.me.uk>
3329         * fs/i386/pc/pxe.c (grub_pxefs_open): Handle the one open connection
3330         at a time limit of the PXE TFTP API correctly.
3331         (grub_pxefs_close): Likewise.
3333 2008-11-29  Robert Millan  <rmh@aybabtu.com>
3335         * disk/ata.c (grub_ata_pciinit): Handle errors raised by
3336         grub_ata_device_initialize() calls.
3338 2008-11-28  Krzysztof Smiechowicz  <deadwood@wp.pl>
3340         * fs/affs.c (grub_affs_iterate_dir): Return failure when directory
3341         iteration failed.
3342         * fs/sfs.c (grub_sfs_iterate_dir): Likewise.
3344 2008-11-28  Robert Millan  <rmh@aybabtu.com>
3346         Fix build on powerpc-ieee1275.  Based on patch created by
3347         Manoel Abranches <mrabran@linux.vnet.ibm.com>.
3348         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
3349         `kern/ieee1275/mmap.c'.
3350         * include/grub/powerpc/ieee1275/memory.h: New file.
3352         Provide grub-install on coreboot.
3353         * conf/i386-coreboot.rmk (sbin_SCRIPTS): Add `grub-install'.
3354         (grub_install_SOURCES): New variable.
3355         * util/i386/pc/grub-install.in: Add a few condition checks to make it
3356         usable on coreboot.
3358 2008-11-25  Felix Zielcke  <fzielcke@z-51.de>
3360         * util/grub-fstest.c (grub_term_get_current_input): Change return type
3361         to `grub_term_input_t'.
3362         (grub_term_get_current_output): Change return type to
3363         `grub_term_output_t'.
3365 2008-11-22  Robert Millan  <rmh@aybabtu.com>
3367         Fix breakage on coreboot due to declaration mismatch.
3368         * term/i386/pc/vga_text.c (grub_vga_text_init_fini): New function.
3369         (grub_vga_text_term): Use grub_vga_text_init_fini() instead of
3370         grub_vga_text_cls().
3372         * kern/i386/loader.S (grub_multiboot_backward_relocator): Improve
3373         comments.  Avoid copying one more byte than necessary (just in case).
3375         * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Change link address
3376         to 0x200000 (avoids trouble with some OFW implementations, and matches
3377         with the one in Yaboot).
3378         Reported by Manoel Abranches
3380 2008-11-20  Robert Millan  <rmh@aybabtu.com>
3382         * kern/i386/coreboot/init.c (grub_time_tics): Remove variable.
3383         (grub_get_rtc, grub_exit): Abort with grub_fatal() if called.
3385         * util/grub-mkconfig_lib.in (grub_warn): New function.
3386         (convert_system_path_to_grub_path): Use grub_warn() when issuing
3387         warnings, to obtain consistent formatting.
3388         * util/grub.d/00_header.in: Likewise.
3389         * util/update-grub_lib.in: Likewise.
3391         * loader/i386/linux.c (allocate_pages): Fix a warning.
3392         Move comment text to `#error' stanza.
3394         Harmonize ieee1275's grub_available_iterate() with the generic
3395         grub_machine_mmap_iterate() interface (fixes a recently-introduced
3396         build problem on i386-ieee1275):
3397         * kern/ieee1275/openfw.c (grub_available_iterate): Moved from here ...
3398         * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): ... here.  Add third
3399         parameter `type'.  Update all users of this function.
3400         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
3401         `kern/ieee1275/mmap.c'.
3402         * kern/ieee1275/init.c
3403         * include/grub/ieee1275/ieee1275.h (grub_available_iterate): Replace
3404         with ...
3405         (grub_machine_mmap_iterate): ... this.
3406         * include/grub/i386/pc/memory.h (grub_machine_mmap_iterate): Change
3407         return type to `grub_err_t'.  Update all implementations of this
3408         function prototype.
3409         * include/grub/i386/coreboot/memory.h (grub_machine_mmap_iterate):
3410         Likewise.
3412         Add `lsmmap' command (lists firmware-provided memory map):
3413         * commands/lsmmap.c: New file.
3414         * conf/i386-pc.rmk (pkglib_MODULES): Add `lsmmap.mod'.
3415         (lsmmap_mod_SOURCES, lsmmap_mod_CFLAGS, lsmmap_mod_LDFLAGS): New
3416         variables.
3417         * conf/powerpc-ieee1275.rmk: Likewise.
3418         * conf/i386-coreboot.rmk: Likewise.
3419         * conf/i386-ieee1275.rmk: Likewise.
3421 2008-11-19  Robert Millan  <rmh@aybabtu.com>
3423         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Fix a typo.
3424         * loader/i386/linux.c (grub_rescue_cmd_initrd): Implement a few needed
3425         constraints to initrd allocation (based on code from
3426         loader/i386/pc/linux.c).  Without them, initrd was allocated too high
3427         for Linux to find it.
3429 2008-11-14  Robert Millan  <rmh@aybabtu.com>
3431         * fs/cpio.c (grub_cpio_open): Compare `name' and `fn' by hand in
3432         order to cope with duplicate slashes.
3434 2008-11-14  Robert Millan  <rmh@aybabtu.com>
3436         * include/grub/i386/coreboot/memory.h (GRUB_MEMORY_MACHINE_LOWER_SIZE):
3437         Redefine to match with GRUB_MEMORY_MACHINE_UPPER_START (0x100000).  We
3438         don't want to mess with lower memory, because it is used in the Linux
3439         loader.
3441         * loader/i386/linux.c (allocate_pages): Allocate `real_mode_mem' in
3442         an appropriate place in lower memory, between 0x10000 and 0x90000,
3443         like loader/i386/efi/linux.c does.  Linux often panics if real_mode_mem
3444         is in our heap (probably as a result of it being corrupted during
3445         decompression).  Add #error instance with comment to explain why this
3446         loader isn't currently usable on PC/BIOS.
3448 2008-11-14  Robert Millan  <rmh@aybabtu.com>
3450         * term/i386/pc/serial.c [! GRUB_MACHINE_PCBIOS]
3451         (GRUB_SERIAL_PORT_NUM): Fix miscalculation.
3453 2008-11-12  Robert Millan  <rmh@aybabtu.com>
3455         Make loader/i386/linux.c buildable on i386-pc (although disabled).
3457         * include/grub/i386/pc/init.h: Include `<grub/machine/memory.h>'.
3458         (struct grub_machine_mmap_entry, grub_machine_mmap_iterate): Move
3459         from here ...
3460         * include/grub/i386/pc/memory.h: ... to here.
3462 2008-11-12  Robert Millan  <rmh@aybabtu.com>
3464         Fix build problems on i386-ieee1275 and *-efi (introduced by vga_text
3465         split).
3467         * include/grub/i386/pc/console.h: Include `<grub/i386/vga_common.h>'.
3468         (grub_console_cur_color, grub_console_real_putchar)
3469         (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
3470         (grub_console_setcolorstate, grub_console_setcolor)
3471         (grub_console_getcolor): Move from here ...
3472         * include/grub/i386/vga_common.h: ... to here (new file).
3474         * term/i386/pc/vga_text.c: Replace `<grub/machine/console.h>' with
3475         `<grub/i386/vga_common.h>' and `<grub/cpu/io.h>' with
3476         `<grub/i386/io.h>'.
3477         * term/i386/vga_common.c: Replace `<grub/machine/console.h>' with
3478         `<grub/i386/vga_common.h>'.
3480 2008-11-12  Robert Millan  <rmh@aybabtu.com>
3482         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `term/i386/vga_common.c'.
3483         * conf/i386.rmk (pkglib_MODULES): Add `vga_text.mod'.
3484         (vga_text_mod_SOURCES, vga_text_mod_CFLAGS, vga_text_mod_LDFLAGS): New
3485         variables.
3486         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
3487         `term/i386/pc/console.c' with `term/i386/vga_common.c'.
3489         * kern/i386/coreboot/init.c (grub_machine_init): Replace call to
3490         grub_console_init() with call to grub_vga_text_init().
3491         (grub_machine_fini): Replace call to
3492         grub_console_fini() with call to grub_vga_text_fini() and
3493         grub_at_keyboard_fini().
3495         * include/grub/i386/pc/console.h: Include `<grub/term.h>'.
3496         (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
3497         (grub_console_setcolorstate, grub_console_setcolor)
3498         (grub_console_getcolor): New function prototypes.
3500         * term/i386/pc/vga_text.c: Include `<grub/dl.h>'.
3501         (grub_vga_text_getxy, grub_vga_text_gotoxy, grub_vga_text_cls)
3502         (grub_vga_text_setcursor): Static-ize.
3503         (grub_vga_text_term): New structure.
3504         (GRUB_MOD_INIT(vga_text), GRUB_MOD_FINI(vga_text)): New functions.
3506         * term/i386/pc/console.c: Remove `<grub/machine/machine.h>'.
3507         (grub_console_cur_color, grub_console_standard_color)
3508         (grub_console_normal_color, grub_console_highlight_color)
3509         (map_char, grub_console_putchar, grub_console_getcharwidth)
3510         (grub_console_getwh, grub_console_setcolorstate, grub_console_setcolor)
3511         (grub_console_getcolor): Move from here ...
3512         * term/i386/vga_common.c: ... to here (same function names).
3514 2008-11-12  Robert Millan  <rmh@aybabtu.com>
3516         Use newly-added Multiboot support in coreboot.
3518         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
3519         `kern/i386/coreboot/mmap.c' with `kern/i386/multiboot_mmap.c'.
3521         * kern/i386/coreboot/startup.S: Enable Multiboot header, fix its
3522         alignment, set `MULTIBOOT_MEMORY_INFO' flag.
3523         (codestart): Store the MBI in `startup_multiboot_info' when we're
3524         being loaded using Multiboot.
3526         * kern/i386/coreboot/init.c (grub_machine_init): Move
3527         grub_at_keyboard_init() call to beginning of function (useful for
3528         debugging).  Call grub_machine_mmap_init() before attempting to use
3529         grub_machine_mmap_iterate().
3530         (grub_lower_mem, grub_upper_mem): Move from here ...
3531         * kern/i386/multiboot_mmap.c (grub_lower_mem, grub_upper_mem): ... to
3532         here (new file).
3534         * include/grub/i386/coreboot/memory.h (grub_machine_mmap_init): New
3535         function prototype.
3537 2008-11-12  Robert Millan  <rmh@aybabtu.com>
3539         Fix a regression introduced by the at_keyboard.mod split.  Because
3540         some terminals are default on some platforms and non-default on
3541         others, the first terminal being registered determines which is
3542         going to be default.
3544         * kern/term.c (grub_term_register_input): If this is the first
3545         terminal being registered, set it as the current one.
3546         (grub_term_register_output): Likewise.
3548         * term/efi/console.c (grub_console_init): Do not call
3549         grub_term_set_current_output() or grub_term_set_current_input().
3550         * term/ieee1275/ofconsole.c (grub_console_init): Likewise.
3551         * term/i386/pc/console.c (grub_console_init): Likewise.
3552         (grub_console_fini): Do not call grub_term_set_current_input()
3553         (but leave grub_term_set_current_output() to restore text mode).
3555 2008-11-10  Robert Millan  <rmh@aybabtu.com>
3557         * util/grub.d/00_header.in: Add backward compatibility check for
3558         versions of terminal.mod that don't understand `terminal_input' or
3559         `terminal_output'.
3561 2008-11-09  Robert Millan  <rmh@aybabtu.com>
3563         * commands/terminal.c (GRUB_MOD_FINI(terminal)): Unregister
3564         `terminal_input' / `terminal_output', not `terminal'.
3566 2008-11-08  Robert Millan  <rmh@aybabtu.com>
3568         * Makefile.in (include_DATA): Fix srcdir=. assumption.
3569         (DISTCLEANFILES): Add `build_env.mk'.
3571 2008-11-08  Robert Millan  <rmh@aybabtu.com>
3573         * term/i386/pc/vesafb.c (grub_vesafb_term): Change type to
3574         `struct grub_term_output'.  Remove `.checkkey' and `.getkey'
3575         members.  Update all users.
3576         * util/console.c (grub_ncurses_term): Split in ...
3577         (grub_ncurses_term_input): ... this, and ...
3578         (grub_ncurses_term_output): ... this.  Update all users.
3579         * term/ieee1275/ofconsole.c: Remove stale `#endif'.
3581 2008-11-08  Robert Millan  <rmh@aybabtu.com>
3583         * Makefile.in (PKGLIB): Add $(pkglib_BUILDDIR).
3584         (PKGDATA): Add $(pkgdata_SRCDIR).
3585         (pkglib_BUILDDIR): New variable.
3586         (pkgdata_SRCDIR): New variable.
3587         (build_env.mk): New target.
3588         (include_DATA): New variable.
3589         (install-local): Install $(include_DATA) files in $(includedir).
3591 2008-11-07  Pavel Roskin  <proski@gnu.org>
3593         * gendistlist.sh: Use C locale for sorting to ensure consistent
3594         output on all systems.
3596         * util/grub.d/00_header.in: Remove incorrect space before
3597         "serial".
3599 2008-11-07  Robert Millan  <rmh@aybabtu.com>
3601         * include/multiboot2.h (struct multiboot_header): Add `flags' member as
3602         per specification.
3603         * loader/multiboot2.c (grub_multiboot2): Fix Multiboot2 header check.
3604         * loader/multiboot_loader.c (find_multi_boot2_header): New function
3605         (based on find_multi_boot1_header).
3606         (grub_rescue_cmd_multiboot_loader): Check for Multiboot2 header,
3607         using find_multi_boot2_header(), and abort if neither Multiboot or
3608         Multiboot headers were found.
3610 2008-11-07  Robert Millan  <rmh@aybabtu.com>
3612         Modularize at_keyboard.mod:
3614         * conf/i386.rmk (pkglib_MODULES): Add `at_keyboard.mod'.
3615         (at_keyboard_mod_SOURCES, at_keyboard_mod_CFLAGS)
3616         (at_keyboard_mod_LDFLAGS): New variables.
3618         Actual terminal split:
3620         * include/grub/term.h (struct grub_term): Split in ...
3621         (struct grub_term_input): ... this, and ...
3622         (struct grub_term_output): ... this.  Update all users.
3623         (grub_term_set_current): Split in ...
3624         (grub_term_set_current_input): ... this, and ...
3625         (grub_term_set_current_output): ... this.
3626         (grub_term_get_current): Split in ...
3627         (grub_term_get_current_input): ... this, and ...
3628         (grub_term_get_current_output): ... this.
3629         (grub_term_register): Split in ...
3630         (grub_term_register_input): ... this, and ...
3631         (grub_term_register_output): ... this.
3632         (grub_term_unregister): Split in ...
3633         (grub_term_unregister_input): ... this, and ...
3634         (grub_term_unregister_output): ... this.
3635         (grub_term_iterate): Split in ...
3636         (grub_term_iterate_input): ... this, and ...
3637         (grub_term_iterate_output): ... this.
3639         * kern/term.c (grub_term_list): Split in ...
3640         (grub_term_list_input): ... this, and ...
3641         (grub_term_list_output): ... this.  Update all users.
3642         (grub_cur_term): Split in ...
3643         (grub_cur_term_input): ... this, and ...
3644         (grub_cur_term_output): ... this.  Update all users.
3645         (grub_term_set_current): Split in ...
3646         (grub_term_set_current_input): ... this, and ...
3647         (grub_term_set_current_output): ... this.
3648         (grub_term_get_current): Split in ...
3649         (grub_term_get_current_input): ... this, and ...
3650         (grub_term_get_current_output): ... this.
3651         (grub_term_register): Split in ...
3652         (grub_term_register_input): ... this, and ...
3653         (grub_term_register_output): ... this.
3654         (grub_term_unregister): Split in ...
3655         (grub_term_unregister_input): ... this, and ...
3656         (grub_term_unregister_output): ... this.
3657         (grub_term_iterate): Split in ...
3658         (grub_term_iterate_input): ... this, and ...
3659         (grub_term_iterate_output): ... this.
3661         * kern/misc.c (grub_abort): Split use of grub_term_get_current() into
3662         a check for input and one for output (and only attempt to get keys
3663         from user when input works).
3665         * util/grub-probe.c (grub_term_get_current): Split in ...
3666         (grub_term_get_current_input): ... this, and ...
3667         (grub_term_get_current_output): ... this.
3668         * util/grub-fstest.c: Likewise.
3669         * util/i386/pc/grub-setup.c: Likewise.
3670         * util/grub-editenv.c: Likewise.
3672         Portability adjustments:
3674         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Remove
3675         `term/i386/pc/at_keyboard.c'.
3676         * kern/ieee1275/init.c [__i386__] (grub_machine_init): Remove call to
3677         grub_keyboard_controller_init() (now handled by terminal .init).
3678         * kern/i386/coreboot/init.c (grub_machine_init): Add call to
3679         grub_at_keyboard_init().
3680         * include/grub/i386/ieee1275/console.h (grub_keyboard_controller_init)
3681         (grub_console_checkkey, grub_console_getkey): Remove (now provided by
3682         at_keyboard.mod via input terminal interface).
3683         * include/grub/i386/coreboot/console.h: Convert into a stub for
3684         `<grub/i386/pc/console.h>'.
3686         Migrate full terminals to new API:
3688         * term/efi/console.c (grub_console_term): Split into ...
3689         (grub_console_term_input): ... this, and ...
3690         (grub_console_term_output): ... this.  Update all users.
3691         * term/ieee1275/ofconsole.c: Remove __i386__ hack.
3692         (grub_ofconsole_init): Split into ...
3693         (grub_ofconsole_init_input): ... this, and ...
3694         (grub_ofconsole_init_output): ... this.
3695         (grub_ofconsole_term): Split into ...
3696         (grub_ofconsole_term_input): ... this, and ...
3697         (grub_ofconsole_term_output): ... this.  Update all users.
3698         * term/i386/pc/serial.c (grub_serial_term): Split into ...
3699         (grub_serial_term_input): ... this, and ...
3700         (grub_serial_term_output): ... this.  Update all users.
3701         * term/i386/pc/console.c (grub_console_term): Split into ...
3702         (grub_console_term_input): ... this, and ...
3703         (grub_console_term_output): ... this.  Update all users.
3704         (grub_console_term_input): Only enable it on PC/BIOS platform.
3705         (grub_console_init): Remove grub_keyboard_controller_init() call.
3707         Migrate input terminals to new API:
3709         * term/i386/pc/at_keyboard.c: Replace `cpu' and `machine' with
3710         `i386' and `i386/pc' to enable build on x86_64 (this driver is
3711         i386-specific anyway).
3712         (grub_console_checkkey): Rename to ...
3713         (grub_at_keyboard_checkkey): ... this.  Static-ize.  Update all
3714         users.
3715         (grub_keyboard_controller_orig): New variable.
3716         (grub_console_getkey): Rename to ...
3717         (grub_at_keyboard_getkey): ... this.  Static-ize.  Update all
3718         users.
3719         (grub_keyboard_controller_init): Static-ize.  Save original
3720         controller value so that it can be restored ...
3721         (grub_keyboard_controller_fini): ... here (new function).
3722         (grub_at_keyboard_term): New structure.
3723         (GRUB_MOD_INIT(at_keyboard), GRUB_MOD_FINI(at_keyboard)): New
3724         functions.
3726         Migrate output terminals to new API:
3728         * term/i386/pc/vga.c (grub_vga_term): Change type to
3729         `struct  grub_term_output'.  Remove `.checkkey' and `.getkey'
3730         members.  Update all users.
3731         * term/gfxterm.c (grub_video_term): Change type to
3732         `struct  grub_term_output'.  Remove `.checkkey' and `.getkey'
3733         members.  Update all users.
3734         * include/grub/i386/pc/console.h (grub_console_checkkey)
3735         (grub_console_getkey): Do not export (no longer needed by gfxterm,
3736         etc).
3738         Migrate `terminal' command and userland tools to new API:
3740         * commands/terminal.c (grub_cmd_terminal): Split into ...
3741         (grub_cmd_terminal_input): ... this, and ...
3742         (grub_cmd_terminal_output): ... this.
3743         (GRUB_MOD_INIT(terminal)): Split `terminal' command in two commands:
3744         `terminal_input' and `terminal_output'.
3745         * util/grub.d/00_header.in: Adjust `terminal' calls to new
3746         `terminal_input' / `terminal_output' API.
3747         * util/grub-mkconfig.in: Export ${GRUB_TERMINAL_INPUT} and
3748         ${GRUB_TERMINAL_OUTPUT} instead of ${GRUB_TERMINAL} (and if user
3749         provided ${GRUB_TERMINAL}, convert it).
3751 2008-11-04  Robert Millan  <rmh@aybabtu.com>
3753         * util/grub.d/10_freebsd.in: New file.  Generate grub configuration
3754         for FreeBSD.
3755         * conf/common.rmk (grub-mkconfig_SCRIPTS): Add 10_freebsd.
3757 2008-11-03  Bean  <bean123ch@gmail.com>
3759         * kern/elf.c (grub_elf32_load): Revert to previous code.
3760         (grub_elf64_load): Likewise.
3762         * loader/i386/bsd.c (grub_bsd_elf32_hook): Change return address.
3764 2008-11-01  Robert Millan  <rmh@aybabtu.com>
3766         * Makefile.in (CPPFLAGS): Fix builddir=. assumption.
3767         (TARGET_CPPFLAGS): Likewise.
3768         * genmk.rb (mod_src): Fix builddir=. and srcdir=. assumptions.
3770 2008-11-01  Carles Pina i Estany  <carles@pina.cat>
3772         * normal/menu.c (run_menu): Add Previous and Next Page keys in menu.
3774 2008-10-29  Guillem Jover  <guillem.jover@nokia.com>
3776         * disk/lvm.c (grub_lvm_scan_device): Fix error recovery by delaying the
3777         addition of objects until the code is not going to be able to fail.
3779 2008-10-29  Guillem Jover  <guillem.jover@nokia.com>
3781         * disk/lvm.c (grub_lvm_scan_device): Fix possible NULL value handling
3782         (add a missing NULL check, and correct them by moving the pointer
3783         operations after the actual check).
3785 2008-10-29  Robert Millan  <rmh@aybabtu.com>
3787         * util/i386/pc/grub-install.in: Handle empty string as output from
3788         make_system_path_relative_to_its_root().
3790 2008-10-05  Hans Lambermont  <hans@lambermont.dyndns.org>
3792         * disk/lvm.c (grub_lvm_scan_device): Allocate buffer space for the
3793         circular metadata worst case scenario. If the metadata is circular
3794         then copy the wrap in place.
3795         * include/grub/lvm.h: Add GRUB_LVM_MDA_HEADER_SIZE, from the LVM2
3796         project lib/format_text/layout.h
3797         Circular metadata bug found and patch debugged by Jan Derk Gerlings.
3799 2008-10-03  Felix Zielcke  <fzielcke@z-51.de>
3801         * util/i386/pc/grub-install.in: Source grub-mkconfig_lib instead of update-grub_lib.
3803 2008-10-03  Felix Zielcke  <fzielcke@z-51.de>
3805         * util/update-grub_lib.in: Mention filename in warning message.
3807 2008-09-29  Felix Zielcke  <fzielcke@z-51.de>
3809         * NEWS: Update for rename of update-grub to grub-mkconfig.
3811 2008-09-29  Felix Zielcke  <fzielcke@z-51.de>
3813         * util/update-grub_lib.in: Copy to ...
3814         * util/grub-mkconfig_lib.in: ... this.  Update all users.
3815         * util/update-grub_lib.in: Make it a stub to `grub-mkconfig_lib.in'.
3816         * util/update-grub.in: Rename to ...
3817         * util/grub-mkconfig.in: ... this.  Update all users.  Remove `-y'
3818         option. Add `--output' option to allow users to specify the generated
3819         configuration file.  Default to stdout.
3820         (update_grub_dir): Rename to ...
3821         (grub_mkconfig_dir): ... this.
3822         (grub_cfg): Default to an empty string.
3823         * conf/common.rmk (update-grub): Rename to ...
3824         (grub-mkconfig): ... this.
3825         (update-grub_lib): Copy to ...
3826         (grub-mkconfig_lib): ... this.
3827         (update-grub_SCRIPTS): Copy to ...
3828         (grub-mkconfig_SCRIPTS): ... this. Update all users.
3829         (update-grub_DATA): Rename to ...
3830         (grub-mkconfig_DATA): ... this.
3832 2008-09-28  Robert Millan  <rmh@aybabtu.com>
3834         * fs/iso9660.c (struct grub_iso9660_primary_voldesc): Rename `created'
3835         to `modified'.  Add the real `created' field.
3836         (grub_iso9660_uuid): Use `modified' rather than `created' for
3837         constructing the UUID.
3839 2008-09-28  Felix Zielcke  <fzielcke@z-51.de>
3841         fs/jfs.c (grub_jfs_find_file): Treat multiple slashes like one.
3842         Based on code from Tomas Ebenlendr <ebik@ucw.cz>.
3844 2008-09-28  Bean  <bean123ch@gmail.com>
3846         * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a bug in the previous patch.
3847         Thanks to Christian Franke for finding this bug.
3849 2008-09-25  Robert Millan  <rmh@aybabtu.com>
3851         * util/grub-mkdevicemap.c (make_device_map): Actually replace all
3852         instances of grub_util_get_disk_name() (see previous commit).
3854 2008-09-25  Robert Millan  <rmh@aybabtu.com>
3856         * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Remove
3857         `util/i386/get_disk_name.c'.
3858         * conf/i386-efi.rmk: Likewise.
3859         * conf/x86_64-efi.rmk: Likewise.
3860         * conf/i386-coreboot.rmk: Likewise.
3861         * conf/i386-ieee1275.rmk: Likewise.
3862         * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Remove
3863         `util/ieee1275/get_disk_name.c'.
3864         * include/grub/util/misc.h (grub_util_get_disk_name): Remove.
3865         * util/ieee1275/get_disk_name.c: Remove file.
3866         * util/i386/get_disk_name.c: Remove file.
3867         * util/grub-mkdevicemap.c (make_device_map): Back to hardcoding
3868         "hd%d" for device.map entries, rather than using
3869         grub_util_get_disk_name().
3871 2008-09-24  Carles Pina i Estany  <carles@pina.cat>
3873         * disk/dmraid_nvidia.c (grub_dmraid_nv_detect): Fix `unused parameter'
3874         warning.
3875         * commands/i386/pc/pxecmd.c (dmraid_nvidia): Likewise.
3877 2008-09-24  Carles Pina i Estany  <carles@pina.cat>
3879         * include/grub/i386/pc/console.h (GRUB_TERM_NPAGE):
3880         Changed to 0x5100.
3881         (GRUB_TERM_PPAGE): Changed to 0x4900.
3883 2008-09-24  Robert Millan  <rmh@aybabtu.com>
3885         * include/grub/powerpc/ieee1275/console.h (GRUB_CONSOLE_KEY_*): Remove
3886         macros (they were i386-pc specific).
3887         * include/grub/sparc64/ieee1275/console.h: Likewise.
3888         * include/grub/efi/console.h: Likewise.
3890 2008-09-22  Bean  <bean123ch@gmail.com>
3892         * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a rare case where $BITMAP is
3893         resident and in attribute list.
3895         * include/grub/ntfs.h (BMP_LEN): Removed.
3897 2008-09-22  Bean  <bean123ch@gmail.com>
3899         * disk/ata.c (grub_atapi_open): Initialize devfnd, no need to set
3900         scsi->name and scsi->luns, as they will be set in grub_scsi_open.
3902         * disk/scsi.c (grub_scsi_open): Don't call p->close (scsi) here when
3903         error occurs, as grub_disk_open will call grub_disk_close, which will
3904         call p->close (scsi).
3906 2008-09-21  Felix Zielcke  <fzielcke@z-51.de>
3908         * configure.ac (AC_INIT): Quote `GRUB' string and version number.
3909         (AC_PREREQ): Bumped to 2.59.
3910         (AC_TRY_COMPILE): Replace obsolete macro with ...
3911         (AC_COMPILE_IFELSE): ... this.
3912         * aclocal.m4 (AC_TRY_LINK): Replace obsolete macro with ...
3913         (AC_LINK_IFELSE): ... this.
3915 2008-09-21  Felix Zielcke  <fzielcke@z-51.de>
3917         * autogen.sh: Add a call to `gendistlist.sh'.
3919 2008-09-19  Christian Franke  <franke@computer.org>
3921         * aclocal.m4 (grub_CHECK_ENABLE_EXECUTE_STACK): New function.
3922         * configure.ac: Call grub_CHECK_ENABLE_EXECUTE_STACK.
3923         * include/grub/misc.h [NEED_ENABLE_EXECUTE_STACK]:
3924         Export __enable_execute_stack() to modules.
3925         * kern/misc.c [NEED_ENABLE_EXECUTE_STACK] (__enable_execute_stack):
3926         New function.
3928 2008-09-09  Felix Zielcke  <fzielcke@z-51.de>
3930         * Makefile.in (RMKFILES): Add `i386.rmk' and `x86_64-efi.rmk'.
3931         Sort the list.
3933 2008-09-09  Felix Zielcke  <fzielcke@z-51.de>
3935         * util/hostdisk.c: Replace #include <grub/util/biosdisk.h> with
3936         #include <grub/util/hostdisk.h>.
3938 2008-09-08  Robert Millan  <rmh@aybabtu.com>
3940         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Skip
3941         segments when their filesz is zero (grub_file_read() interprets
3942         zero-size as "read until EOF", which results in memory corruption).
3943         Use `lowest_segment' rather than 0 for calculating the current
3944         segment load address.
3946 2008-09-08  Robert Millan  <rmh@aybabtu.com>
3948         * util/hostdisk.c (open_device): Replace a grub_util_info() call
3949         with grub_dprintf("hostdisk", ...), as it was so verbose that it
3950         clobbered useful information.
3952 2008-09-08  Robert Millan  <rmh@aybabtu.com>
3954         * include/grub/util/biosdisk.h: Move to ...
3955         * include/grub/util/hostdisk.h: ... here.  Update all users.
3956         * util/biosdisk.c: Move to ...
3957         * util/hostdisk.c: ... here.  Update all users.
3959 2008-09-07  Robert Millan  <rmh@aybabtu.com>
3961         * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): Remove
3962         variables.
3963         (grub_multiboot): Move `mbi' allocation upwards, so that mmap address
3964         and length can be stored directly in the `mbi->mmap_addr' and
3965         `mbi->mmap_length' struct fields.
3967 2008-09-07  Robert Millan  <rmh@aybabtu.com>
3969         * conf/i386.rmk: New file.  Provides declaration for building
3970         `cpuid.mod'.
3971         * conf/i386-pc.rmk (pkglib_MODULES): Remove `cpuid.mod'.
3972         (cpuid_mod_SOURCES, cpuid_mod_CFLAGS, cpuid_mod_LDFLAGS): Remove
3973         variables.
3974         Include `conf/i386.mk'.
3975         * conf/i386-efi.rmk: Likewise.
3976         * conf/x86_64-efi.rmk: Likewise.
3977         * conf/i386-coreboot.rmk: Likewise.
3978         * conf/i386-ieee1275.rmk: Likewise.
3980 2008-09-07  Vesa Jääskeläinen  <chaac@nic.fi>
3982         Based on patch created by Colin D Bennett <colin@gibibit.com>.
3983         Adds optimization support for BGR based modes.
3985         * include/grub/i386/pc/vbeblit.h (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8) Removed.
3986         (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
3987         (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
3988         (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
3989         (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
3990         (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
3991         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
3992         (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
3993         (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
3994         (grub_video_i386_vbeblit_index_index): Likewise.
3995         (grub_video_i386_vbeblit_replace_directN): Added.
3996         (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
3997         (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
3998         (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
3999         (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
4000         (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
4001         (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
4002         (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
4003         (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
4004         (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
4005         (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
4006         (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
4007         (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
4008         (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
4010         * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8) Removed.
4011         (grub_video_i386_vbefill_R8G8B8): Likewise.
4012         (grub_video_i386_vbefill_index): Likewise.
4013         (grub_video_i386_vbefill_direct32): Added.
4014         (grub_video_i386_vbefill_direct24): Likewise.
4015         (grub_video_i386_vbefill_direct16): Likewise.
4016         (grub_video_i386_vbefill_direct8): Likewise.
4018         * include/grub/video.h (grub_video_blit_format): Removed
4019         GRUB_VIDEO_BLIT_FORMAT_R8G8B8A8, GRUB_VIDEO_BLIT_FORMAT_R8G8B8.
4020         (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_RGBA_8888,
4021         GRUB_VIDEO_BLIT_FORMAT_BGRA_8888, GRUB_VIDEO_BLIT_FORMAT_RGB_888,
4022         GRUB_VIDEO_BLIT_FORMAT_BGR_888, GRUB_VIDEO_BLIT_FORMAT_RGB_565,
4023         GRUB_VIDEO_BLIT_FORMAT_BGR_565.
4025         * video/video.c (grub_video_get_blit_format): Updated to use new
4026         blit formats.  Added handling for 16 bit color modes.
4028         * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Updated to use new
4029         fillers.
4030         (common_blitter): Updated to use new blitters.
4032         * video/i386/pc/vbeblit.c (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8):
4033         Removed.
4034         (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
4035         (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
4036         (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
4037         (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
4038         (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
4039         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
4040         (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
4041         (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
4042         (grub_video_i386_vbeblit_index_index): Likewise.
4043         (grub_video_i386_vbeblit_replace_directN): Added.
4044         (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
4045         (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
4046         (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
4047         (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
4048         (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
4049         (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
4050         (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
4051         (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
4052         (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
4053         (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
4054         (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
4055         (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
4056         (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
4058         * video/i386/pc/vbefill.c (grub_video_i386_vbefill_R8G8B8A8): Removed.
4059         (grub_video_i386_vbefill_R8G8B8): Likewise.
4060         (grub_video_i386_vbefill_index): Likewise.
4061         (grub_video_i386_vbefill_direct32): Added.
4062         (grub_video_i386_vbefill_direct24): Likewise.
4063         (grub_video_i386_vbefill_direct16): Likewise.
4064         (grub_video_i386_vbefill_direct8): Likewise.
4066         * video/readers/jpeg.c (grub_jpeg_decode_sos): Adapt to new blitter
4067         types.
4069         * video/readers/tga.c (grub_video_reader_tga): Adapt to new blitter
4070         types.
4072         * video/readers/png.c (grub_png_decode_image_header): Adapt to new
4073         blitter types.
4075         * video/bitmap.c (grub_video_bitmap_create): Adapt to new blitter
4076         types.
4078 2008-09-06  Felix Zielcke  <fzielcke@z-51.de>
4080         * disk/raid.c (insert_array): Set `array->chunk_size' to 64 for
4081         RAID level 1.
4083 2008-09-06  Felix Zielcke  <fzielcke@z-51.de>
4085         * fs/iso9660.c (grub_iso9660_date): New structure.
4086         (grub_iso9660_primary_voldesc): Add `grub_iso9660_date' member.
4087         (grub_iso9660_uuid): New function.
4089 2008-09-05  Bean  <bean123ch@gmail.com>
4091         * fs/fshelp.c (grub_fshelp_find_file): Handle case insensitive names.
4093         * fs/ntfs.c (list_file): Ignore names in DOS namespace, set the case
4094         insensitive bit for names in Win32 and Win32 & DOS namespace.
4096         * include/grub/fshelp.h (GRUB_FSHELP_CASE_INSENSITIVE): New macro.
4098         * include/grub/types.h (LONG_MAX): Likewise.
4100 2008-09-04  Felix Zielcke  <fzielcke@z-51.de>
4102         * util/getroot.c: Include <config.h>.
4103         (grub_util_get_grub_dev): Rewrite to use asprintf for mdraid devices,
4104         add support for /dev/md/N devices and handle LVM double dash escaping.
4106 2008-09-04  Felix Zielcke  <fzielcke@z-51.de>
4108         * config.guess: Update to latest version from config git.
4109         * config.sub: Likewise.
4111 2008-09-03  Robert Millan  <rmh@aybabtu.com>
4113         * disk/scsi.c (grub_scsi_open): Remove size limit when printing
4114         `disk->total_sectors'.
4116 2008-09-01  Colin D Bennett  <colin@gibibit.com>
4118         * include/grub/normal.h: Fixed incorrect comment for
4119         GRUB_COMMAND_FLAG_NO_ARG_PARSE.
4121 2008-09-01  Colin D Bennett  <colin@gibibit.com>
4123         * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Replaced constant
4124         values with defines.
4126         * include/grub/i386/pc/vbe.h (GRUB_VBE_MODEATTR_SUPPORTED): Added.
4127         (GRUB_VBE_MODEATTR_RESERVED_1): Likewise.
4128         (GRUB_VBE_MODEATTR_BIOS_TTY_OUTPUT_SUPPORT): Likewise.
4129         (GRUB_VBE_MODEATTR_COLOR): Likewise.
4130         (GRUB_VBE_MODEATTR_GRAPHICS): Likewise.
4131         (GRUB_VBE_MODEATTR_VGA_COMPATIBLE): Likewise.
4132         (GRUB_VBE_MODEATTR_VGA_WINDOWED_AVAIL): Likewise.
4133         (GRUB_VBE_MODEATTR_LFB_AVAIL): Likewise.
4134         (GRUB_VBE_MODEATTR_DOUBLE_SCAN_AVAIL): Likewise.
4135         (GRUB_VBE_MODEATTR_INTERLACED_AVAIL): Likewise.
4136         (GRUB_VBE_MODEATTR_TRIPLE_BUF_AVAIL): Likewise.
4137         (GRUB_VBE_MODEATTR_STEREO_AVAIL): Likewise.
4138         (GRUB_VBE_MODEATTR_DUAL_DISPLAY_START): Likewise.
4139         (GRUB_VBE_MEMORY_MODEL_TEXT): Likewise.
4140         (GRUB_VBE_MEMORY_MODEL_CGA): Likewise.
4141         (GRUB_VBE_MEMORY_MODEL_HERCULES): Likewise.
4142         (GRUB_VBE_MEMORY_MODEL_PLANAR): Likewise.
4143         (GRUB_VBE_MEMORY_MODEL_NONCHAIN4_256): Likewise.
4144         (GRUB_VBE_MEMORY_MODEL_YUV): Likewise.
4146 2008-08-31  Robert Millan  <rmh@aybabtu.com>
4148         * loader/i386/pc/multiboot.c (grub_get_multiboot_mmap_len): Fix
4149         declaration.
4150         (grub_multiboot): Fix a few warnings.
4152 2008-08-31  Robert Millan  <rmh@aybabtu.com>
4154         * loader/i386/pc/multiboot.c: Update comment not to say that
4155         boot_device support is unimplemented.
4157 2008-08-31  Robert Millan  <rmh@aybabtu.com>
4159         * loader/i386/pc/multiboot.c: Update comment not to say that a.out
4160         or memory map support are unimplemented.
4162 2008-08-31  Colin D Bennett  <colin@gibibit.com>
4164         * util/i386/pc/grub-mkrescue.in: Support multiple overlay directories.
4166 2008-08-31  Colin D Bennett  <colin@gibibit.com>
4168         * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Show VBE version and
4169         total video memory in 'vbeinfo' output; show color format details for
4170         each video mode.
4172 2008-08-30  Pavel Roskin  <proski@gnu.org>
4174         * util/genmoddep.c: Remove for real this time.
4175         * DISTLIST: Remove util/genmoddep.c.
4177 2008-08-30  Robert Millan  <rmh@aybabtu.com>
4179         * kern/i386/pc/startup.S (multiboot_header): Force 4-byte alignment
4180         as required by Multiboot spec (it was already 4-byte aligned, but
4181         only by chance).
4183 2008-08-29  Pavel Roskin  <proski@gnu.org>
4185         * kern/powerpc/ieee1275/crt0.S: Rename to ...
4186         * kern/powerpc/ieee1275/startup.S: ... this.
4187         * conf/powerpc-ieee1275.rmk: Adjust for the above.
4188         * DISTLIST: Likewise.
4190         * kern/powerpc/ieee1275/crt0.S: Include grub/symbol.h and
4191         grub/cpu/kernel.h.  Add start label for consistency with other
4192         platforms.  Add grub_prefix immediately after start.  Add jump
4193         to the code after grub_prefix.
4194         * include/grub/powerpc/kernel.h: Provide valid values for
4195         GRUB_KERNEL_CPU_PREFIX and GRUB_KERNEL_CPU_DATA_END.
4197 2008-08-29  Bean  <bean123ch@gmail.com>
4199         * configure.ac: Change host_os to cygwin for mingw.
4200         (asprintf): New check for function.
4202         * include/grub/symbol.h: Replace #ifndef __CYGWIN__ with
4203         #if ! defined (__CYGWIN__) && ! defined (__MINGW32__).
4205         * include/grub/util/misc.h: #include <config.h> and <grub/types.h>,
4206         declare asprintf if HAVE_ASPRINTF is not set, declare fseeko, ftello,
4207         sync, sleep and grub_util_get_disk_size for mingw.
4209         * util/biosdisk.c (grub_util_biosdisk_open): Use grub_util_get_disk_size
4210         to get size in mingw.
4211         (open_device): Use flag O_BINARY if it's defined.
4212         (find_root_device): Add dummy code for mingw.
4214         * util/grub-mkdevicemap.c (get_floppy_disk_name): Return 0 for mingw.
4215         (get_ide_disk_name): Return //./PHYSICALDRIVE%d for mingw.
4216         (get_scsi_disk_name): Return 0 for mingw.
4218         * util/hostfs.c: #include <grub/util/misc.h>.
4219         (grub_hostfs_open): Use "rb" flag to open file, use
4220         grub_util_get_disk_size to get disk size for mingw.
4222         * util/misc.c: #include <windows.h> and <winioctl.h> in mingw.
4223         (asprintf): New function if HAVE_ASPRINTF is not set.
4224         (sync): New function for mingw.
4225         (sleep): Likewise.
4226         (grub_util_get_disk_size): Likewise.
4228 2008-08-28  Pavel Roskin  <proski@gnu.org>
4230         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
4231         kern/time.c.
4233 2008-08-28  Robert Millan  <rmh@aybabtu.com>
4235         * util/biosdisk.c (find_grub_drive): Declare missing `i' variable.
4237 2008-08-28  Robert Millan  <rmh@aybabtu.com>
4239         Change find_grub_drive() syntax so it doesn't prevent it from
4240         detecting NULL names as errors.
4242         * util/biosdisk.c (find_grub_drive): Move free slot search code
4243         from here ...
4244         (find_free_slot): ... to here.
4245         (read_device_map): Use find_free_slot() to search for free slots.
4247 2008-08-27  Marco Gerards  <marco@gnu.org>
4249         * conf/common.rmk (pkglib_MODULES): Add scsi.mod.
4250         (scsi_mod_SOURCES): New variable.
4251         (scsi_mod_CFLAGS): Likewise
4252         (scsi_mod_LDFLAGS): Likewise.
4254         * disk/scsi.c: New file.
4256         * include/grub/scsi.h: Likewise.
4258         * include/grub/scsicmd.h: Likewise.
4260         * disk/ata.c: Include <grub/scsi.h>.
4261         (grub_atapi_packet): Do not use grub_ata_cmd, use registers
4262         instead.
4263         (grub_ata_iterate): Skip ATAPI devices.
4264         (grub_ata_open): Only handle ATAPI devices.
4265         (struct grub_atapi_read): Removed.
4266         (grub_atapi_readsector): Likewise.
4267         (grub_ata_read): No longer handle ATAPI devices.
4268         (grub_ata_write): Likewise.
4269         (grub_atapi_iterate): New function.
4270         (grub_atapi_read): Likewise.
4271         (grub_atapi_write): Likewise.
4272         (grub_atapi_open): Likewise.
4273         (grub_atapi_close): Likewise.
4274         (grub_atapi_dev): New variable.
4275         (GRUB_MOD_INIT(ata)): Register ATAPI as SCSI device.
4276         (GRUB_MOD_FINI(ata)): Unregister ATAPI.
4278         * include/grub/disk.h (enum grub_disk_dev_id): Add
4279         `GRUB_DISK_DEVICE_SCSI_ID'.
4281 2008-08-26  Robert Millan  <rmh@aybabtu.com>
4283         * util/biosdisk.c (grub_util_biosdisk_open, open_device)
4284         (grub_util_biosdisk_get_grub_dev): Make error messages a bit more
4285         descriptive.
4287 2008-08-23  Bean  <bean123ch@gmail.com>
4289         * conf/common.rmk (grub_probe_SOURCES): Add disk/mdraid_linux.c.
4290         (grub_fstest_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
4291         disk/mdraid_linux.c and disk/dmraid_nvidia.c and lib/crc.c.
4292         (pkglib_MODULES): Add raid5rec.mod, raid6rec.mod, mdraid.mod and
4293         dm_nv.mod.
4294         (raid5rec_mod_SOURCES): New macro.
4295         (raid5rec_mod_CFLAGS): Likewise.
4296         (raid5rec_mod_LDFLAGS): Likewise.
4297         (raid6rec_mod_SOURCES): Likewise.
4298         (raid6rec_mod_CFLAGS): Likewise.
4299         (raid6rec_mod_LDFLAGS): Likewise.
4300         (mdraid_mod_SOURCES): Likewise.
4301         (mdraid_mod_CFLAGS): Likewise.
4302         (mdraid_mod_LDFLAGS): Likewise.
4303         (dm_nv_mod_SOURCES): Likewise.
4304         (dm_nv_mod_CFLAGS): Likewise.
4305         (dm_nv_mod_LDFLAGS): Likewise.
4307         * conf/i386-pc.rmk (grub_setup_SOURCES): Add disk/mdraid_linux.c.
4308         (grub_emu_SOURCES):  Add disk/raid5_recover.c, disk/raid6_recover.c,
4309         disk/mdraid_linux.c and disk/dmraid_nvidia.c.
4311         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add disk/raid5_recover.c,
4312         disk/raid6_recover.c, disk/mdraid_linux.c and disk/dmraid_nvidia.c.
4314         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
4316         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
4318         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4320         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4322         * disk/raid5_recover.c: New file.
4324         * disk/raid6_recover.c: Likewise.
4326         * disk/mdraid_linux.c: Likewise.
4328         * disk/dmraid_nvidia.c: Likewise.
4330         * disk/i386/pc/biosdisk.c: Set total_sectors of cdrom device to
4331         ULONG_MAX.
4333         * disk/raid.c (grub_raid_open): Use the size of the smallest disk to
4334         calculate the size of raid device.
4335         (grub_raid_read): Simplify raid0 code. Support raid4, raid6 and four
4336         different layout of raid5.
4337         (grub_raid_scan_device): Remove code specific to mdraid.
4338         (grub_raid_list): New variable.
4339         (free_array): New function.
4340         (grub_raid_register): Likewise.
4341         (grub_raid_unregister): Likewise.
4342         (grub_raid_rescan): Likewise.
4343         (GRUB_MOD_INIT): Don't iterate device here.
4344         (GRUB_MOD_FINI): Use free_array to release resource.
4346         * include/grub/raid.h: Remove macro and structure specific to mdraid.
4347         (grub_raid5_recover_func_t): New function variable type.
4348         (grub_raid6_recover_func_t): Likewise.
4349         (grub_raid5_recover_func): New variable.
4350         (grub_raid6_recover_func): Likewise.
4351         (grub_raid_register): New function.
4352         (grub_raid_unregister): Likewise.
4353         (grub_raid_rescan): Likewise.
4354         (grub_raid_block_xor): Likewise.
4356         * util/grub-fstest.c: Add #include <grub/raid.h> and <grub/lib/crc.h>.
4357         (CMD_CRC): New macro.
4358         (part): Removed.
4359         (read_file): Handle device as well as file.
4360         (cmd_crc): New function.
4361         (fstest): Handle multiple disks.
4362         (options): Remove part, raw and long, add root and diskcount.
4363         (usage): Add crc, remove -p, -r, -l, add -r and -c.
4364         (main): Find the first non option entry and ignore subsequent options,
4365         add handling for the new options, support multiple disks.
4367         * util/grub-probe.c (probe): Add mdraid to abstraction_name.
4369 2008-08-23  Bean  <bean123ch@gmail.com>
4371         * normal/x86_64/setjmp.S (grub_longjmp): Return 1 when val = 0.
4373         * genfslist.sh: Ignore kernel.mod.
4375         * genpartmaplist.sh: Likewise.
4377 2008-08-23  Robert Millan  <rmh@aybabtu.com>
4379         * util/getroot.c (find_root_device): Skip anything that starts with
4380         a dot, not just directories.  This avoids things like /dev/.tmp.md0.
4382 2008-08-22  Felix Zielcke  <fzielcke@z-51.de>
4384         * util/update-grub.in (GRUB_GFXMODE): Export variable.
4385         * util/grub.d/00_header.in: Allow the administrator to change default
4386         gfxmode via ${GRUB_GFXMODE}.
4388 2008-08-21  Felix Zielcke  <fzielcke@z-51.de>
4390         * fs/ntfs.c (grub_ntfs_mount): Fix a memory leak.
4392 2008-08-21  Robert Millan  <rmh@aybabtu.com>
4394         * loader/i386/linux.c: New file.  Implements generic 32-bit Linux
4395         loader.
4396         * conf/i386-coreboot.rmk (_linux_mod_SOURCES): Replace
4397         `loader/i386/pc/linux.c' with `loader/i386/linux.c'.
4399 2008-08-20  Carles Pina i Estany  <carles@pina.cat>
4401         * menu/normal.c (run_menu): Replace hardcoded numbers with macros
4402         (16 for GRUB_TERM_UP and 14 for GRUB_TERM_DOWN)
4404 2008-08-19  Robert Millan  <rmh@aybabtu.com>
4406         * term/gfxterm.c (DEFAULT_CURSOR_COLOR): Remove.
4407         (struct grub_virtual_screen): Remove `cursor_color'.
4408         (grub_virtual_screen_setup): Remove `virtual_screen.cursor_color'
4409         initialization.
4410         (write_cursor): Use `virtual_screen.fg_color' to draw cursor.
4412 2008-08-18  Robert Millan  <rmh@aybabtu.com>
4414         Unify (identical) linux_normal.c files.
4415         * loader/i386/efi/linux_normal.c: Move from here ...
4416         * loader/linux_normal.c: ... to here.  Update all users.
4417         * loader/i386/pc/linux_normal.c: Delete.  Update all users.
4418         * loader/i386/ieee1275/linux_normal.c: Likewise.
4420 2008-08-18  Robert Millan  <rmh@aybabtu.com>
4422         * include/grub/i386/linux.h (LINUX_LOADER_ID_LILO)
4423         (LINUX_LOADER_ID_LOADLIN, LINUX_LOADER_ID_BOOTSECT)
4424         (LINUX_LOADER_ID_SYSLINUX, LINUX_LOADER_ID_ETHERBOOT)
4425         (LINUX_LOADER_ID_ELILO, LINUX_LOADER_ID_GRUB, LINUX_LOADER_ID_UBOOT)
4426         (LINUX_LOADER_ID_XEN, LINUX_LOADER_ID_GUJIN, LINUX_LOADER_ID_QEMU):
4427         New macros.
4428         (GRUB_LINUX_CL_OFFSET, GRUB_LINUX_CL_END_OFFSET): Move from here ...
4429         * loader/i386/pc/linux.c (GRUB_LINUX_CL_OFFSET)
4430         (GRUB_LINUX_CL_END_OFFSET): ... to here.
4431         * loader/i386/efi/linux.c (GRUB_EFI_CL_OFFSET): Rename to ...
4432         (GRUB_LINUX_CL_OFFSET): ... this.  Update all users.
4433         (GRUB_EFI_CL_END_OFFSET): Rename to ...
4434         (GRUB_LINUX_CL_END_OFFSET): ... this.  Update all users.
4435         (grub_rescue_cmd_linux): Macroify `type_of_loader' initialization.
4436         Initialize `params->video_cursor_x' and `params->video_cursor_y'
4437         portably using grub_getxy().
4438         Replace `-EFI' with `-bzImage' in boot message.
4440 2008-08-17  Robert Millan  <rmh@aybabtu.com>
4442         * include/grub/x86_64/kernel.h: New file (<grub/i386/kernel.h> stub).
4444 2008-08-17  Robert Millan  <rmh@aybabtu.com>
4446         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pc/mmap.c'.
4448         * include/grub/i386/pc/init.h (GRUB_MACHINE_MEMORY_AVAILABLE)
4449         (GRUB_MACHINE_MEMORY_RESERVED): New macros.
4450         (grub_machine_mmap_iterate): New function declaration.
4451         * include/grub/multiboot.h (struct grub_multiboot_mmap_entry): New
4452         structure.
4453         (GRUB_MMAP_MEMORY_AVAILABLE, GRUB_MMAP_MEMORY_RESERVED): New
4454         macros.
4456         * kern/i386/pc/init.c (grub_machine_init): Replace hardcoded region
4457         type check value with `GRUB_MACHINE_MEMORY_AVAILABLE'.
4458         Move e820 parsing from here ...
4459         * kern/i386/pc/mmap.c: New file.
4460         (grub_machine_mmap_iterate): ... to here.
4462         * include/grub/i386/coreboot/memory.h: Remove `<grub/err.h>'.
4463         (GRUB_LINUXBIOS_MEMORY_AVAILABLE): Rename (for consistency) to ...
4464         (GRUB_MACHINE_MEMORY_AVAILABLE): ... this.  Update all users.
4465         (grub_available_iterate): Redeclare to return `void', and redeclare
4466         its hook to use grub_uint64_t as addr and size parameters, and rename
4467         to ...
4468         (grub_machine_mmap_iterate): ... this.  Update all users.
4470         * kern/i386/coreboot/mmap.c (grub_mmap_iterate): Simplify parser loop
4471         to make it more readable.  Rename to ...
4472         (grub_machine_mmap_iterate): ... this.
4474         * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): New variables.
4475         (grub_get_multiboot_mmap_len, grub_fill_multiboot_mmap): New functions.
4476         (grub_multiboot): Allocate an extra region after the payload, and fill
4477         it with a Multiboot memory map.  Adjust a.out loader to calculate size
4478         with the extra space.
4479         (grub_multiboot_load_elf32): Adjust elf32 loader to calculate size
4480         with the extra space.
4482 2008-08-17  Carles Pina i Estany  <carles@pina.cat>
4484         * menu/normal.c (run_menu): Add Home and End keys in grub-menu.
4486 2008-08-17  Felix Zielcke  <fzielcke@z-51.de>
4488         * gendistlist.sh: Add *.y, *.tex, *.texi, grub.cfg, README, *.sc,
4489         mdate-sh to the list `find' searches for.
4490         * DISTLIST: Regenerated.
4492 2008-08-16  Felix Zielcke  <fzielcke@z-51.de>
4494         * gendistlist.sh (EXTRA_DISTFILES): Remove gensymlist.sh,
4495         genkernsyms.sh.  Add geninit.sh, geninitheader.sh, genkernsyms.sh.in,
4496         genmoddep.awk, gensymlist.sh.in.
4497         (DISTDIRS): Add bus, docs, hook, lib.
4498         * DISTLIST: Regenerated.
4499         * NEWS: Add cygwin support and change the `os-prober' entry a bit.
4501 2008-08-16  Robert Millan  <rmh@aybabtu.com>
4503         * disk/raid.c (grub_raid_init): Handle/report errors set by
4504         grub_device_iterate().
4505         * disk/lvm.c (grub_lvm_init): Likewise.
4507 2008-08-15  Bean  <bean123ch@gmail.com>
4509         * conf/i386-pc.rmk (pkglib_MODULES): Add datetime.mod, date.mod
4510         and datehook.mod.
4511         (datetime_mod_SOURCES): New macro.
4512         (datetime_mod_CFLAGS): Likewise.
4513         (datetime_mod_LDFLAGS): Likewise.
4514         (date_mod_SOURCES): Likewise.
4515         (date_mod_CFLAGS): Likewise.
4516         (date_mod_LDFLAGS): Likewise.
4517         (datehook_mod_SOURCES): Likewise.
4518         (datehook_mod_CFLAGS): Likewise.
4519         (datehook_mod_LDFLAGS): Likewise.
4521         * conf/i386-coreboot.rmk (pkglib_MODULES): Add datetime.mod, date.mod
4522         and datehook.mod.
4523         (datetime_mod_SOURCES): New macro.
4524         (datetime_mod_CFLAGS): Likewise.
4525         (datetime_mod_LDFLAGS): Likewise.
4526         (date_mod_SOURCES): Likewise.
4527         (date_mod_CFLAGS): Likewise.
4528         (date_mod_LDFLAGS): Likewise.
4529         (datehook_mod_SOURCES): Likewise.
4530         (datehook_mod_CFLAGS): Likewise.
4531         (datehook_mod_LDFLAGS): Likewise.
4533         * conf/i386-ieee1275.rmk (pkglib_MODULES): Add datetime.mod, date.mod
4534         and datehook.mod.
4535         (datetime_mod_SOURCES): New macro.
4536         (datetime_mod_CFLAGS): Likewise.
4537         (datetime_mod_LDFLAGS): Likewise.
4538         (date_mod_SOURCES): Likewise.
4539         (date_mod_CFLAGS): Likewise.
4540         (date_mod_LDFLAGS): Likewise.
4541         (datehook_mod_SOURCES): Likewise.
4542         (datehook_mod_CFLAGS): Likewise.
4543         (datehook_mod_LDFLAGS): Likewise.
4545         * conf/i386-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
4546         and datehook.mod.
4547         (datetime_mod_SOURCES): New macro.
4548         (datetime_mod_CFLAGS): Likewise.
4549         (datetime_mod_LDFLAGS): Likewise.
4550         (date_mod_SOURCES): Likewise.
4551         (date_mod_CFLAGS): Likewise.
4552         (date_mod_LDFLAGS): Likewise.
4553         (datehook_mod_SOURCES): Likewise.
4554         (datehook_mod_CFLAGS): Likewise.
4555         (datehook_mod_LDFLAGS): Likewise.
4557         * conf/x86_64-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
4558         and datehook.mod.
4559         (datetime_mod_SOURCES): New macro.
4560         (datetime_mod_CFLAGS): Likewise.
4561         (datetime_mod_LDFLAGS): Likewise.
4562         (date_mod_SOURCES): Likewise.
4563         (date_mod_CFLAGS): Likewise.
4564         (date_mod_LDFLAGS): Likewise.
4565         (datehook_mod_SOURCES): Likewise.
4566         (datehook_mod_CFLAGS): Likewise.
4567         (datehook_mod_LDFLAGS): Likewise.
4569         * kern/env.c (grub_env_insert): Fix a bug in prevp pointer.
4571         * commands/date.c: New file.
4573         * hook/datehook.c: Likewise.
4575         * include/grub/lib/datetime.h: Likewise.
4577         * include/grub/i386/cmos.h: Likewise.
4579         * lib/datetime.c: Likewise.
4581         * lib/i386/datetime.c: Likewise.
4583         * lib/efi/datetime.c: Likewise.
4585 2008-08-14  Robert Millan  <rmh@aybabtu.com>
4587         * conf/common.rmk (bin_UTILITIES): Add `grub-mkelfimage'.
4588         (grub_mkelfimage_SOURCES): New variable.
4589         (util/elf/grub-mkimage.c_DEPENDENCIES): Likewise.
4591         * conf/i386-coreboot.rmk (bin_UTILITIES, grub_mkimage_SOURCES)
4592         (grub_mkimage_LDFLAGS, util/elf/grub-mkimage.c_DEPENDENCIES): Remove.
4593         * conf/powerpc-ieee1275.rmk: Likewise.
4594         * conf/i386-ieee1275.rmk: Likewise.
4596         * kern/ieee1275/init.c: Include `<grub/cpu/kernel.h>'.
4597         * kern/i386/coreboot/init.c: Likewise.
4599         * kern/i386/ieee1275/startup.S: Replace `<grub/machine/kernel.h>'
4600         with `<grub/cpu/kernel.h>'.
4601         (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Renamed
4602         to ...
4603         (GRUB_KERNEL_CPU_PREFIX, GRUB_KERNEL_CPU_DATA_END): ... this.
4604         * kern/i386/coreboot/startup.S: Likewise.
4606         * include/grub/powerpc/ieee1275/kernel.h (GRUB_MOD_ALIGN)
4607         (GRUB_MOD_GAP): Remove.
4608         * include/grub/powerpc/kernel.h: New file.
4609         * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX)
4610         (GRUB_KERNEL_MACHINE_DATA_END): Remove.
4611         * include/grub/i386/kernel.h: New file.
4612         * include/grub/i386/coreboot/kernel.h (GRUB_MOD_ALIGN)
4613         (GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_PREFIX)
4614         (GRUB_KERNEL_MACHINE_DATA_END): Remove.
4616         * util/ieee1275/grub-install.in (grub_mkimage): Initialize to use
4617         `grub-mkelfimage'.
4618         Use --directory when invoking grub_mkimage.
4620         * util/elf/grub-mkimage.c: Include `<grub/cpu/kernel.h>'.
4621         (add_segments): Replace GRUB_KERNEL_MACHINE_DATA_END and
4622         GRUB_KERNEL_MACHINE_PREFIX with GRUB_KERNEL_CPU_DATA_END
4623         and GRUB_KERNEL_CPU_PREFIX.
4625 2008-08-14  Felix Zielcke  <fzielcke@z-51.de>
4627         * include/grub/err.h (grub_err_printf): New function prototype.
4628         * util/misc.c (grub_err_printf): New function.
4629         * kern/misc.c [! GRUB_UTIL] (grub_err_printf): New alias for
4630         grub_printf.
4631         * kern/err.c (grub_print_error): Use grub_err_printf.
4633 2008-08-13  Robert Millan  <rmh@aybabtu.com>
4635         * docs/grub.cfg: Remove `/dev/' prefix in GNU/Hurd boot entry.
4637 2008-08-13  Robert Millan  <rmh@aybabtu.com>
4639         * docs/grub.cfg: Use the native device name for the example GNU/Hurd
4640         boot entry.
4642 2008-08-12  Robert Millan  <rmh@aybabtu.com>
4644         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Move part
4645         of the relocation code from here ...
4646         (grub_multiboot): ... to here.
4647         (forward_relocator, backward_relocator): Move from here ...
4648         * kern/i386/loader.S (grub_multiboot_forward_relocator)
4649         (grub_multiboot_backward_relocator): ... to here.
4650         (grub_multiboot_real_boot): Use %edx for entry offset.  Put Multiboot
4651         magic in %eax.  Use %ebp for jumping (so %edx is not trashed).
4652         * include/grub/i386/loader.h (grub_multiboot_forward_relocator)
4653         (grub_multiboot_forward_relocator_end)
4654         (grub_multiboot_backward_relocator)
4655         (grub_multiboot_backward_relocator_end): New variables.
4657 2008-08-12  Bean  <bean123ch@gmail.com>
4659         * disk/raid.c (grub_raid_read): Fix a bug in raid0 code.
4661 2008-08-11  Robert Millan  <rmh@aybabtu.com>
4663         * kern/i386/linuxbios/startup.S: Move from here ...
4664         * kern/i386/coreboot/startup.S: ... to here.
4666         * kern/i386/linuxbios/init.c: Move from here ...
4667         * kern/i386/coreboot/init.c: ... to here.
4669         * kern/i386/linuxbios/table.c: Move from here ...
4670         * kern/i386/coreboot/mmap.c: ... to here.
4672         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Update moved files.
4674 2008-08-11  Robert Millan  <rmh@aybabtu.com>
4676         * kern/device.c (grub_device_open): Do not handle grub_disk_open()
4677         errors.  Leave it to the upper layer to handle them.
4679 2008-08-09  Christian Franke  <franke@computer.org>
4681         * Makefile.in: Add `target_os' and `enable_grub_pe2elf'.
4682         * conf/common.rmk: Install `grub-pe2elf' only if requested.
4683         Install `grub.d/10_windows' only on Cygwin.
4684         * configure.ac: Add subst of `target_os'.
4685         Check `target_os' also before setting TARGET_OBJ2ELF.
4686         Add `--enable-grub-pe2elf'.
4688 2008-08-08  Robert Millan  <rmh@aybabtu.com>
4690         * kern/disk.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
4691         (grub_last_time): Change type to grub_uint64_t.
4692         (grub_disk_open): Migrate code from to using grub_get_time_ms().
4693         (grub_disk_close): Likewise.
4695         * normal/menu.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
4696         (run_menu): Migrate code from to using grub_get_time_ms().
4698         * util/misc.c (grub_get_time_ms): New function.
4700 2008-08-08  Marco Gerards  <marco@gnu.org>
4702         * disk/ata.c (grub_ata_regget): Change return type to
4703         `grub_uint8_t'.
4704         (grub_ata_regget2): Likewise.
4705         (grub_ata_wait_status): New function.
4706         (grub_ata_wait_busy): Removed function, updated all users to use
4707         `grub_ata_wait_status'.
4708         (grub_ata_wait_drq): Likewise.
4709         (grub_ata_cmd): New function.
4710         (grub_ata_pio_read): Change return type to `grub_uint8_t'.  Add
4711         error handling.
4712         (grub_ata_pio_write): Add error handling.
4713         (grub_atapi_identify): Likewise.
4714         (grub_atapi_packet): Use `grub_ata_cmd' and improve error
4715         handling.
4716         (grub_ata_identify): Use `grub_ata_cmd' and improve error
4717         handling.  Actually use the detected registers.  Reorder the
4718         detection logic such that it is easier to read.
4719         (grub_ata_pciinit): Do not assign the same ID to each controller.
4720         (grub_ata_setaddress): Use `grub_ata_cmd' and improve error
4721         handling.
4722         (grub_atapi_readsector): Check the result of `grub_ata_pio_read'.
4724         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TIMEOUT'.
4726 2008-08-08  Marco Gerards  <marco@gnu.org>
4728         * NEWS: Update.
4730 2008-08-07  Bean  <bean123ch@gmail.com>
4732         * include/grub/x86_64/pci.h: New file.
4734 2008-08-07  Christian Franke  <franke@computer.org>
4736         * kern/i386/pit.c (TIMER2_SPEAKER): New define.
4737         (TIMER2_GATE): Likewise.
4738         (grub_pit_wait): Add enable/disable of the timer2 gate
4739         bit of port 0x61.  This fixes a possible infinite loop.
4741 2008-08-07  Bean  <bean123ch@gmail.com>
4743         * conf/x86_64-efi.rmk (kernel_mod_SOURCES): Add kern/time.c,
4744         kern/i386/tsc.c and kern/i386/pit.c.
4746         * include/grub/i386/tsc.h (grub_cpu_is_cpuid_supported): Handle
4747         x86_64 platform.
4749         * kern/i386/efi/init.c: Replace <grub/cpu/tsc.h> with
4750         <grub/i386/tsc.h>.
4752         * kern/i386/pit.c: Replace <grub/cpu/io.h> with <grub/i386/io.h>.
4754 2008-08-07  Bean  <bean123ch@gmail.com>
4756         * conf/i386-efi.rmk (kernel_mod_SOURCES): Add kern/time.c.
4758         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add kern/time.c,
4760         * include/grub/i386/pit.h: Use macro KERNEL_CPU_PIT_HEADER to avoid
4761         multiple inclusion. Add #include <grub/types.h>.
4763 2008-08-06  Christian Franke  <franke@computer.org>
4765         * conf/common.rmk: Build and install `10_windows'.
4766         * util/grub.d/10_windows.in: New script.
4768 2008-08-06  Pavel Roskin  <proski@gnu.org>
4770         * kern/i386/pit.c: Include `<grub/i386/pit.h>'.
4772 2008-08-06  Robert Millan  <rmh@aybabtu.com>
4774         * conf/i386-coreboot.rmk (kernel_elf_ASFLAGS): New variable.
4775         * kern/i386/tsc.c: Include `<grub/i386/pit.h>'.
4777 2008-08-06  Bean  <bean123ch@gmail.com>
4779         * fs/i386/pc/pxe.c (grub_pxe_data): New member block_size.
4780         (grub_pxefs_fs_int): Remove dummy definition.
4781         (grub_pxefs_open): Use data->block_size to store the current block
4782         size setting.
4783         (grub_pxefs_read): Use block size stored in data->block_size. As the
4784         value of grub_pxe_blksize can be changed after the file is opened.
4786 2008-08-06  Bean  <bean123ch@gmail.com>
4788         * fs/i386/pc/pxe.c (curr_file): new variable.
4789         (grub_pxefs_open): Simply the handling of pxe file system. Don't
4790         require the dummy internal file system anymore.
4791         (grub_pxefs_read): Removed.
4792         (grub_pxefs_close): Likewise.
4793         (grub_pxefs_fs_int): Likewise.
4794         (grub_pxefs_read_int): Renamed to grub_pxefs_read. Reinitialize tftp
4795         connection when we switch file.
4796         (grub_pxefs_close_int): Renamed to grub_pxefs_close.
4798 2008-08-06  Robert Millan  <rmh@aybabtu.com>
4800         * conf/i386-coreboot.rmk (pkglib_MODULES): Add `reboot.mod' and
4801         `halt.mod'.
4802         (reboot_mod_SOURCES, reboot_mod_CFLAGS, reboot_mod_LDFLAGS)
4803         (halt_mod_SOURCES, halt_mod_CFLAGS, halt_mod_LDFLAGS): New variables.
4805         * kern/i386/halt.c: New file.
4806         * kern/i386/reboot.c: Likewise.
4807         * include/grub/i386/reboot.h: Likewise.
4808         * include/grub/i386/halt.h: Likewise.
4810         * commands/halt.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]:
4811         Include `<grub/cpu/halt.h>'.
4812         * commands/reboot.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]
4813         [! GRUB_MACHINE_PCBIOS]: Include `<grub/cpu/reboot.h>'.
4815         * term/i386/pc/at_keyboard.c: Include `<grub/cpu/at_keyboard.h>'.
4816         (SHIFT_L, SHIFT_R, CTRL, ALT, CAPS_LOCK, KEYBOARD_REG_DATA)
4817         (KEYBOARD_REG_STATUS, KEYBOARD_COMMAND_ISREADY, KEYBOARD_COMMAND_READ)
4818         (KEYBOARD_COMMAND_WRITE, KEYBOARD_COMMAND_REBOOT)
4819         (KEYBOARD_SCANCODE_SET1, KEYBOARD_ISMAKE, KEYBOARD_ISREADY)
4820         (KEYBOARD_SCANCODE, OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): Move
4821         from here ...
4822         * include/grub/i386/at_keyboard.h: ... to here.
4824 2008-08-05  Robert Millan  <rmh@aybabtu.com>
4826         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pit.c'.
4827         * conf/i386-efi.rmk (kernel_mod_SOURCES): Likewise.
4828         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Likewise. Also add
4829         `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
4830         `kern/generic/millisleep.c'.
4832         * kern/i386/tsc.c (calibrate_tsc): Rewrite using grub_pit_wait()
4833         instead of grub_get_rtc().
4834         (grub_tsc_init): Initialize `tsc_boot_time'.
4836         * kern/i386/linuxbios/init.c (grub_millisleep): Remove stub.
4837         (grub_machine_init): Use grub_tsc_init() rather than
4838         installing an RTC-based handler via grub_install_get_time_ms().
4840         * kern/i386/pit.c: New file.
4841         * include/grub/i386/pit.h: Likewise.
4843 2008-08-05  Bean  <bean123ch@gmail.com>
4845         * boot/i386/pc/pxeboot.S (_start): Use drive number 0x7F for pxe.
4847         * conf/i386-pc.rmk (kernel_img_HEADERS): Add machine/pxe.h.
4848         (pkglib_MODULES): Add pxe.mod and pxecmd.mod.
4849         (pxe_mod_SOURCES): New macro.
4850         (pxe_mod_CFLAGS): Likewise.
4851         (pxe_mod_LDFLAGS): Likewise.
4852         (pxecmd_mod_SOURCES): Likewise.
4853         (pxecmd_mod_CFLAGS): Likewise.
4854         (pxecmd_mod_LDFLAGS): Likewise.
4856         * kern/i386/pc/startup.S (grub_pxe_scan): New function.
4857         (grub_pxe_call): Likewise.
4859         * include/grub/disk.h (grub_disk_dev_id): Add GRUB_DISK_DEVICE_PXE_ID.
4861         * commands/i386/pc/pxecmd.c: New file.
4863         * fs/i386/pc/pxe.c: Likewise.
4865         * include/grub/i386/pc/pxe.h: Likewise.
4867 2008-08-05  Bean  <bean123ch@gmail.com>
4869         * util/console.c (grub_console_cur_color): New variable.
4870         (grub_console_standard_color): Likewise.
4871         (grub_console_normal_color): Likewise.
4872         (grub_console_highlight_color): Likewise.
4873         (color_map): Likewise.
4874         (use_color): Likewise.
4875         (NUM_COLORS): New macro.
4876         (grub_ncurses_setcolorstate): Handle color properly.
4877         (grub_ncurses_setcolor): Don't change color here, just remember the
4878         settings, color will be set in grub_ncurses_setcolorstate.
4879         (grub_ncurses_getcolor): New function.
4880         (grub_ncurses_init): Initialize color pairs.
4881         (grub_ncurses_term): New member grub_ncurses_getcolor.
4883 2008-08-05  Colin D Bennett  <colin@gibibit.com>
4885         High resolution timer support.  Implemented for x86 CPUs using TSC.
4886         Extracted generic grub_millisleep() so it's linked in only as needed.
4887         This requires a Pentium compatible CPU; if the RDTSC instruction is
4888         not supported, then it falls back on the generic grub_get_time_ms()
4889         implementation that uses the machine's RTC.
4891         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/time.c',
4892         `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
4893         `kern/generic/millisleep.c'.
4895         * conf/i386-efi.rmk (kernel_mod_SOURCES): Add `kern/i386/tsc.c',
4896         `kern/generic/rtc_get_time_ms.c' and `kern/generic/millisleep.c'.
4898         * conf/x86_64-efi.rml (kernel_mod_SOURCES): Add
4899         `kern/generic/millisleep.c' and `kern/generic/rtc_get_time_ms.c'.
4901         * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
4903         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
4904         `kern/generic/millisleep.c'.
4906         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
4908         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Add `kern/time.c'.
4910         * kern/generic/rtc_get_time_ms.c: New file.
4912         * kern/generic/millisleep.c: New file.
4914         * kern/misc.c: Don't include
4915         <kern/time.h> anymore.
4916         (grub_millisleep_generic): Removed.
4918         * commands/sleep.c (grub_interruptible_millisleep): Uses
4919         grub_get_time_ms() instead of grub_get_rtc().
4921         * include/grub/i386/tsc.h (grub_get_tsc): New file.  New inline
4922         function.
4923         (grub_cpu_is_cpuid_supported): New inline function.
4924         (grub_cpu_is_tsc_supported): New inline function.
4925         (grub_tsc_init): New function prototype.
4926         (grub_tsc_get_time_ms): New function prototype.
4928         * kern/i386/tsc.c (grub_get_time_ms): New file.
4930         * include/grub/time.h: Include <grub/types.h.
4931         (grub_millisleep_generic): Removed.
4932         (grub_get_time_ms): New prototype.
4933         (grub_install_get_time_ms): New prototype.
4934         (grub_rtc_get_time_ms): New prototype.
4936         * kern/time.c (grub_get_time_ms): New function.
4937         (grub_install_get_time_ms): New function.
4939         * kern/i386/efi/init.c: Include <grub/cpu/tsc.h>.  Don't include
4940         <grub/time.h> anymore.
4941         (grub_millisleep): Removed.
4942         (grub_machine_init): Call grub_tsc_init.
4944         * kern/i386/linuxbios/init.c (grub_machine_init): Install the RTC
4945         get_time_ms() implementation.
4947         * kern/sparc64/ieee1275/init.c (grub_millisleep): Removed.
4948         (ieee1275_get_time_ms): New function.
4949         (grub_machine_init): Install get_time_ms() implementation.
4951         * kern/i386/pc/init.c: Include <grub/cpu/tsc.h>.
4952         (grub_machine_init): Call grub_tsc_init().
4953         (grub_millisleep): Removed.
4955         * kern/ieee1275/init.c (grub_millisleep): Removed.
4956         (grub_machine_init): Install ieee1275_get_time_ms()
4957         implementation.
4958         (ieee1275_get_time_ms): New function.
4959         (grub_get_rtc): Now calls ieee1275_get_time_ms(), which does the
4960         real work.
4962 2008-08-05  Marco Gerards  <marco@gnu.org>
4964         * disk/ata.c: Include <grub/pci.h>.
4965         (enum grub_ata_commands): Add `GRUB_ATA_CMD_EXEC_DEV_DIAGNOSTICS'.
4966         (grub_ata_initialize): Rewritten.
4967         (grub_ata_device_initialize): New function.
4969 2008-08-04  Pavel Roskin  <proski@gnu.org>
4971         * kern/main.c: Include grub/mm.h.
4973 2008-08-04  Robert Millan  <rmh@aybabtu.com>
4975         * conf/i386-coreboot.rmk (COMMON_ASFLAGS, COMMON_CFLAGS)
4976         (COMMON_LDFLAGS): Harmonize with i386-pc version (fixes a code
4977         corruption problem).
4979 2008-08-04  Robert Millan  <rmh@aybabtu.com>
4981         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Fix misc
4982         warnings introduced in my last commit.
4984 2008-08-03  Robert Millan  <rmh@aybabtu.com>
4986         Make PCI available on all i386 architectures.
4988         * include/grub/i386/pc/pci.h: Move from here ...
4989         * include/grub/i386/pci.h: ... to here.
4991         * include/grub/i386/pc/pci.h: Remove.
4992         * include/grub/i386/efi/pci.h: Remove.
4993         * include/grub/x86_64/efi/pci.h: Remove.
4995         * include/grub/pci.h: Replace `<grub/machine/pci.h>' with
4996         `<grub/cpu/pci.h>'.
4998         * conf/i386-coreboot.rmk (pkglib_MODULES): Add `pci' and `lspci'.
4999         (pci_mod_SOURCES, pci_mod_CFLAGS, pci_mod_LDFLAGS, lspci_mod_SOURCES)
5000         (lspci_mod_CFLAGS, lspci_mod_LDFLAGS): New variables.
5002         * conf/i386-ieee1275.rmk: Likewise.
5004 2008-08-03  Robert Millan  <rmh@aybabtu.com>
5006         * term/i386/pc/vga_text.c (CRTC_CURSOR_DISABLE): New macro.
5007         (grub_console_setcursor): Make it possible to set cursor off.
5009 2008-08-03  Robert Millan  <rmh@aybabtu.com>
5011         * util/grub.d/00_header.in: Be platform-agnostic.  Probe for existence
5012         of modules instead of assuming which platform provides what.
5013         * util/update-grub.in: Likewise.
5015 2008-08-03  Robert Millan  <rmh@aybabtu.com>
5017         * kern/i386/pc/init.c (make_install_device): Check for `grub_prefix'
5018         instead of `grub_install_dos_part' to determine whether a drive needs
5019         to be prepended to prefix (`grub_install_dos_part' is not reliable,
5020         because it can be overridden when loading GRUB via Multiboot).
5022 2008-08-02  Robert Millan  <rmh@aybabtu.com>
5024         * util/i386/pc/grub-install.in: Remove trailing slash from prefix.
5026 2008-08-02  Robert Millan  <rmh@aybabtu.com>
5028         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Add a pair
5029         of informational grub_dprintf() calls.
5031 2008-08-02  Robert Millan  <rmh@aybabtu.com>
5033         * disk/memdisk.c (memdisk_size): Don't initialize.
5034         (GRUB_MOD_INIT(memdisk)): Find memdisk using grub_module_iterate().
5036         * include/grub/i386/pc/kernel.h
5037         (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): Remove macro.
5038         (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Shift.
5039         (grub_memdisk_image_size, grub_arch_memdisk_addr)
5040         (grub_arch_memdisk_size): Remove.
5042         * include/grub/kernel.h (struct grub_module_header): Remove `offset'
5043         field (was only used to transfer a constant).  Add `type' field to
5044         support multiple module types.
5045         (grub_module_iterate): New function.
5047         * kern/device.c (grub_device_open): Do not hide error messages
5048         when grub_disk_open() fails.  Use grub_print_error() instead.
5050         * kern/i386/pc/init.c (grub_arch_modules_addr)
5051         (grub_arch_memdisk_size): Remove functions.
5052         (grub_arch_modules_addr): Return the module address in high memory
5053         (now that it isn't copied anymore).
5055         * kern/i386/pc/startup.S (grub_memdisk_image_size): Remove variable.
5056         (codestart): Don't add grub_memdisk_image_size to %ecx in LZMA
5057         decompression routine (grub_total_module_size already includes that
5058         now).  Don't copy modules back to low memory.
5060         * kern/main.c: Include `<grub/mm.h>'.
5061         (grub_load_modules): Split out (and use) ...
5062         (grub_module_iterate): ... this function, which iterates through
5063         module objects and runs a hook.
5064         Comment out grub_mm_init_region() call, as it would cause non-ELF
5065         modules to be overwritten.
5067         * util/i386/pc/grub-mkimage.c (generate_image): Instead of appending
5068         the memdisk image in its own region, make it part of the module list.
5069         * util/elf/grub-mkimage.c (options): Add "memdisk"|'m' option.
5070         (main): Parse --memdisk|-m option, and pass user-provided path as
5071         parameter to generate_image().
5072         (add_segments): Pass `memdisk_path' down to load_modules().
5073         (load_modules): Embed memdisk image in module section when requested.
5074         * util/i386/efi/grub-mkimage.c (make_mods_section): Initialize
5075         `header.type' instead of `header.offset'.
5077         * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add `memdisk.mod'.
5078         (memdisk_mod_SOURCES, memdisk_mod_CFLAGS)
5079         (memdisk_mod_LDFLAGS): New variables.
5080         * conf/i386-coreboot.rmk: Likewise.
5081         * conf/i386-ieee1275.rmk: Likewise.
5083 2008-08-02  Robert Millan  <rmh@aybabtu.com>
5085         * loader/i386/pc/multiboot.c (playground, forward_relocator)
5086         (backward_relocator): New variables.  Used to allocate and relocate
5087         the payload, respectively.
5088         (grub_multiboot_load_elf32): Load into heap instead of requested
5089         address, install the appropriate relocator code in each bound of
5090         the payload, and set the entry point such that
5091         grub_multiboot_real_boot() will jump to one of them.
5093         * kern/i386/loader.S (grub_multiboot_payload_size)
5094         (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
5095         (grub_multiboot_payload_entry_offset): New variables.
5096         (grub_multiboot_real_boot): Set cpu context to what the relocator
5097         expects, and jump to the relocator instead of the payload.
5099         * include/grub/i386/loader.h (grub_multiboot_payload_size)
5100         (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
5101         (grub_multiboot_payload_entry_offset): Export.
5103 2008-08-01  Bean  <bean123ch@gmail.com>
5105         * normal/menu_entry.c (editor_getline): Don't return the original
5106         string as result, as it will be released by lexer once it has done
5107         using it.
5109 2008-08-01  Robert Millan  <rmh@aybabtu.com>
5111         * util/grub.d/10_linux.in: Use prepare_grub_to_access_device() from
5112         within menuentries, not before them.
5113         util/grub.d/10_hurd.in: Likewise.
5115 2008-08-01  Bean  <bean123ch@gmail.com>
5117         * conf/common.rmk (pkglib_MODULES): Add bufio.mod.
5118         (bufio_mod_SOURCES): New macro.
5119         (bufio_mod_CFLAGS): Likewise.
5120         (bufio_mod_LDFLAGS): Likewise.
5122         * include/grub/bufio.h: New file.
5124         * io/bufio.c: Likewise.
5126         * video/png.c: Replace <grub/file.h> with <grub/bufio.h>.
5127         (grub_video_reader_png): Use grub_buffile_open to open file.
5129         * video/jpeg.c: Replace <grub/file.h> with <grub/bufio.h>.
5130         (grub_video_reader_jpeg): Use grub_buffile_open to open file.
5132         * video/tga.c: Replace <grub/file.h> with <grub/bufio.h>.
5133         (grub_video_reader_tga): Use grub_buffile_open to open file.
5135         * font/manager.c: Include <grub/bufio.h>.
5136         (add_font): Use grub_buffile_open to open file.
5138 2008-07-31  Robert Millan  <rmh@aybabtu.com>
5140         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): When loading
5141         ELF segments, use a macro for arbitrarily accessing any of them instead
5142         of preparing a pointer that allows access to one at a time.
5143         (grub_multiboot_load_elf64): Likewise.
5145 2008-07-31  Bean  <bean123ch@gmail.com>
5147         * boot/i386/pc/lnxboot.S (real_code_2): Replace 0x50 with
5148         GRUB_KERNEL_MACHINE_DATA_END.
5150 2008-07-30  Robert Millan  <rmh@aybabtu.com>
5152         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_DATA_END):
5153         Increase from 0x50 to 0x60.
5154         * util/i386/pc/grub-install.in: Detect cross-disk installs, and
5155         use UUIDs to identify the root drive for them.  If that's not
5156         possible, abort.
5157         * util/i386/pc/grub-setup.c (setup): Do not special-case, or even
5158         check, for cross-disk installs.
5160 2008-07-30  Robert Millan  <rmh@aybabtu.com>
5162         * kern/ieee1275/init.c (grub_machine_set_prefix): If `grub_prefix'
5163         is non-empty, use it to set the `prefix' environment variable instead
5164         of the usual approach.
5165         * kern/i386/linuxbios/init.c (make_install_device): Remove function.
5166         (grub_machine_set_prefix): Use `grub_prefix' to set the `prefix'
5167         environment variable instead of dummy make_install_device().
5169         * kern/i386/ieee1275/startup.S: Include `<grub/machine/kernel.h>'.
5170         (start): Insert a data section, with `grub_prefix' variable.
5171         * kern/i386/linuxbios/startup.S: Likewise.
5173         * include/grub/powerpc/ieee1275/kernel.h [!ASM_FILE] (grub_prefix):
5174         New variable reference.
5175         * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX):
5176         New macro.  Defines offset of `grub_prefix' within startup.S (relative
5177         to `start').
5178         (GRUB_KERNEL_MACHINE_DATA_END): New macro.  Defines the end of data
5179         section within startup.S (relative to `start').
5180         * include/grub/i386/coreboot/kernel.h: Likewise.
5182         * util/elf/grub-mkimage.c (add_segments): Receive `prefix' parameter.
5183         Overwrite grub_prefix with its contents, at the beginning of the
5184         first segment.
5185         (main): Understand -p|--prefix.
5187 2008-07-30  Robert Millan  <rmh@aybabtu.com>
5189         * util/grub.d/10_hurd.in: Source ${libdir}/grub/update-grub_lib.
5191 2008-07-30  Robert Millan  <rmh@aybabtu.com>
5193         * term/i386/pc/vga_text.c (grub_console_cls): Use
5194         grub_console_gotoxy() to go back to beginning of the screen.
5195         Found by Patrick Georgi <patrick.georgi@coresystems.de>
5197 2008-07-29  Christian Franke  <franke@computer.org>
5199         * util/update-grub_lib.in (make_system_path_relative_to_its_root):
5200         Add conversion of emulated mount points on Cygwin.
5202 2008-07-29  Christian Franke  <franke@computer.org>
5204         * util/update-grub.in: Add a check for admin
5205         group on Cygwin.
5206         Remove old `grub.cfg.new' before creation.
5207         Add `-f' to `mv' to handle the different filesystem
5208         semantics of Windows.
5210 2008-07-29  Bean  <bean123ch@gmail.com>
5212         * normal/main.c (get_line): Fix buffer overflow bug.
5214 2008-07-28  Robert Millan  <rmh@aybabtu.com>
5216         * partmap/apple.c (GRUB_APPLE_HEADER_MAGIC): New macro.
5217         (struct grub_apple_header): New struct.  Describes the layout of
5218         the partmap header.
5219         (apple_partition_map_iterate): Check the header magic as well as the
5220         partition magic (which was already being checked).
5222 2008-07-28  Pavel Roskin  <proski@gnu.org>
5224         * genmk.rb: Add a warning to the beginning of the output that
5225         it's a generated file and should not be edited.
5227 2008-07-28  Robert Millan  <rmh@aybabtu.com>
5229         * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
5230         with the same number are found, just use issue a warning with
5231         grub_dprintf(), as this error has been reported to be non-fatal.
5233 2008-07-27  Robert Millan  <rmh@aybabtu.com>
5235         * disk/ata.c (grub_ata_dumpinfo): Use grub_dprintf() for debugging
5236         information.
5238 2008-07-27  Bean  <bean123ch@gmail.com>
5240         * fs/fat.c (GRUB_FAT_MAXFILE): New constant.
5241         (grub_fat_find_dir): Ignore case when comparing filename.
5243 2008-07-27  Bean  <bean123ch@gmail.com>
5245         * fs/xfs.c (grub_xfs_dir_header): Change field i8count back to
5246         smallino, as it's more descriptive, and i8count can be confused with
5247         the other field count.
5248         (grub_xfs_iterate_dir): Adjust grub_xfs_dir_entry pointer for small
5249         inode type.
5251 2008-07-27  Bean  <bean123ch@gmail.com>
5253         * commands/crc.c: New file.
5255         * lib/crc.c: Likewise.
5257         * include/grub/lib/crc.h: Likewise.
5259         * util/grub-fstest.c: grub/hexdump.h => grub/lib/hexdump.h.
5261         * commands/hexdump.c: grub/hexdump.h => grub/lib/hexdump.h.
5262         (hexdump): Move this function to ...
5264         * lib/hexdump.c: ... here.
5266         * include/grub/hexdump.h: Renamed to ...
5268         * include/grub/lib/hexdump.h: ... this.
5270         * commands/loadenv.c: grub/envblk.h => grub/lib/envblk.h
5272         * util/grub-editenv.c: Likewise.
5274         * include/envblk.h: Renamed to ...
5276         * include/lib/envblk.h: ... this.
5278         * util/envblk.c: Renamed to ...
5280         * lib/envblk.c: ... this.
5282         * conf/common.rmk (grub_fstest_SOURCES): commands/hexdump.c =>
5283         lib/hexdump.c.
5284         (grub_editenv_SOURCES): util/envblk.c => lib/envblk.c
5285         (pkglib_MODULES): Add crc.mod.
5286         (hexdump_mod_SOURCES): Add lib/hexdump.c.
5287         (loadenv_mod_SOURCES): util/envblk.c => lib/envblk.c.
5288         (crc_mod_SOURCES): New macro.
5289         (crc_mod_CFLAGS): Likewise.
5290         (crc_mod_LDFLAGS): Likewise.
5292         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add lib/hexdump.c.
5294         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
5296         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
5298         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5300         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
5302 2008-07-27  Felix Zielcke  <fzielcke@z-51.de>
5304         * commands/help.c: Include <grub/term.h>.
5305         (TERM_WIDTH): Removed.  Updated all users.
5307 2008-07-27  Pavel Roskin  <proski@gnu.org>
5309         * util/getroot.c (find_root_device): Rephrase a comment to avoid
5310         spurious warnings about a comment within a comment.
5312 2008-07-25  Robert Millan  <rmh@aybabtu.com>
5314         * util/getroot.c (find_root_device): Skip devices that match
5315         /dev/dm-[0-9].  This lets the real device be found for any type of
5316         abstraction (LVM, EVMS, RAID..).
5317         (grub_guess_root_device): Do not traverse /dev/mapper (for LVM)
5318         and /dev/evms (for EVMS) before traversing /dev.  If a /dev/dm-[0-9]
5319         device is found first, find_root_device() will now skip it.
5321 2008-07-24  Pavel Roskin  <proski@gnu.org>
5323         * include/grub/types.h: Use __builtin_bswap32() and
5324         __builtin_bswap64() with gcc 4.3 and newer.
5326 2008-07-24  Christian Franke  <franke@computer.org>
5328         * util/i386/pc/grub-install.in: If `--debug' is specified,
5329         pass `--verbose' to grub-setup.
5330         Abort script if make_system_path_relative_to_its_root() fails.
5332 2008-07-24  Bean  <bean123ch@gmail.com>
5334         * configure.ac: Fixed a bug caused by the previous cygwin patch,
5335         variable `target_platform' should be `platform'.
5337 2008-07-24  Bean  <bean123ch@gmail.com>
5339         * video/reader/png.c (DEFLATE_HLIT_MAX): Change value.
5340         (grub_png_init_fixed_block): New function.
5341         (grub_png_decode_image_data): Handle fixed huffman code compression.
5343 2008-07-24  Bean  <bean123ch@gmail.com>
5345         * common.rmk (bin_UTILITIES): Add grub-pe2elf.
5346         (grub_pe2elf_SOURCES): New macro.
5347         (CLEANFILES): Add grub-pe2elf.
5349         * include/grub/efi/pe32.h (GRUB_PE32_SCN_ALIGN_1BYTES): New constant.
5350         (GRUB_PE32_SCN_ALIGN_2BYTES): Likewise.
5351         (GRUB_PE32_SCN_ALIGN_4BYTES): Likewise.
5352         (GRUB_PE32_SCN_ALIGN_8BYTES): Likewise.
5353         (GRUB_PE32_SCN_ALIGN_16BYTES): Likewise.
5354         (GRUB_PE32_SCN_ALIGN_32BYTES): Likewise.
5355         (GRUB_PE32_SCN_ALIGN_64BYTES): Likewise.
5356         (GRUB_PE32_SCN_ALIGN_SHIFT): Likewise.
5357         (GRUB_PE32_SCN_ALIGN_MASK): Likewise.
5358         (GRUB_PE32_SYM_CLASS_EXTERNAL): Likewise.
5359         (GRUB_PE32_SYM_CLASS_STATIC): Likewise.
5360         (GRUB_PE32_SYM_CLASS_FILE): Likewise.
5361         (GRUB_PE32_DT_FUNCTION): Likewise.
5362         (GRUB_PE32_REL_I386_DIR32): Likewise.
5363         (GRUB_PE32_REL_I386_REL32): Likewise.
5364         (grub_pe32_symbol): New structure.
5365         (grub_pe32_reloc): Likewise.
5367         * util/grub-pe2elf.c: New file.
5369         * configure.ac: Set TARGET_OBJ2ELF if host os is cygwin. Don't test for
5370         start symbol in non pc platform.
5372         * genmk.rb: Use TARGET_OBJ2ELF to convert native object format to elf.
5374         The following patches are from Christian Franke.
5376         * include/grub/dl.h: Remove .previous, gas supports this only
5377         for ELF format.
5379         * include/grub/symbol.h [__CYGWIN__] (#define FUNCTION/VARIABLE):
5380         Remove .type, gas supports this only for ELF format.
5382         * kern/dl.c (grub_dl_resolve_dependencies): Add check for trailing
5383         nullbytes in symbol table. This fixes an infinite loop if table is
5384         zero filled.
5386         * Makefile.in: Add autoconf replacements TARGET_IMG_LDSCRIPT,
5387         TARGET_IMG_LDFLAGS and EXEEXT.
5389         * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Replace -Wl,-N by
5390         TARGET_IMG_LDFLAGS_AC.
5391         (grub_CHECK_STACK_ARG_PROBE): New function.
5393         * conf/i386-pc.rmk: Replace -Wl,-N by TARGET_IMG_LDFLAGS.
5395         * conf/i386-pc-cygwin-ld-img.sc: New linker script.
5397         * configure.ac: Add check for linker script "conf/${target}-img-ld.c"
5398         to set TARGET_IMG_LD* accordingly.
5399         Add check for Cygwin to set TARGET_MOD_OBJCOPY accordingly.
5400         Add call to grub_CHECK_STACK_ARG_PROBE.
5401         Use TARGET_IMG_LDFLAGS to check start, bss_start, end symbols.
5403         * genkernsyms.sh.in: Handle HAVE_ASM_USCORE case.
5405         * genmk.rb: Add EXEEXT to CLEANFILES.
5407 2008-07-23  Robert Millan  <rmh@aybabtu.com>
5409         * Makefile.in (UNICODE_ARROWS, UNICODE_LINES): New variables (they
5410         define the codes for arrows and lines used for the menu).
5411         (ascii.pff): Generate fonts for $(UNICODE_ARROWS) and $(UNICODE_LINES)
5412         as well.
5414         * util/update-grub_lib.in (font_path): Prefer ascii.pff over complete
5415         fonts, because the latter are too slow.
5417 2008-07-21  Bean  <bean123ch@gmail.com>
5419         * kern/i386/pc/startup.S (gate_a20_try_bios): Change test order for
5420         a20. Run keyboard test last, as it will cause macbook to halt.
5422 2008-07-18  Pavel Roskin  <proski@gnu.org>
5424         * kern/dl.c: Go back to using GRUB_CPU_SIZEOF_VOID_P.  We cannot
5425         load foreign architecture modules correctly anyway.  Keep
5426         support for loading host architecture modules, whether we
5427         compile them or not.
5429 2008-07-17  Pavel Roskin  <proski@gnu.org>
5431         * configure.ac: Use -m32 or -m64 regardless of whether we had to
5432         change target_cpu.  The compiler default can mismatch target_cpu
5433         in any case.
5435         * disk/efi/efidisk.c: Fix format warnings on x86_64.
5436         * kern/efi/efi.c: Likewise.
5438         * aclocal.m4 (grub_PROG_TARGET_CC): New macro.  Check if the
5439         target compiler is functional.
5440         * configure.ac: Call grub_PROG_TARGET_CC once all target flags
5441         are set up.
5443         * configure.ac: Default to efi platform for x86_64-apple.  Allow
5444         powerpc64 CPU, default to ieee1275 platform for it.  Split CPU
5445         adjustments from the rest, only do them if target is not
5446         explicitly given.  Merge other adjustments with the final sanity
5447         check.  Remove an extraneous check for supported CPU.  Be
5448         specific which CPU and which platform is not supported.
5450         * configure.ac: Default to pc platform for x86_64.
5452 2008-07-17  Robert Millan  <rmh@aybabtu.com>
5454         Partial LinuxBIOS -> Coreboot rename.
5456         * conf/i386-linuxbios.rmk: Renamed to ...
5457         * conf/i386-coreboot.rmk: ... this.
5458         * Makefile.in (RMKFILES): s/i386-linuxbios.rmk/i386-coreboot.rmk/g.
5459         * configure.ac: Accept "coreboot" as input platform (but maintain
5460         compatibility with "linuxbios").
5461         * include/grub/i386/linuxbios: Renamed to ...
5462         * include/grub/i386/coreboot: ... this.
5464 2008-07-17  Bean  <bean123ch@gmail.com>
5466         * conf/i386/efi.rmk (pkglib_MODULES): add pci.mod and lspci.mod.
5467         (appleldr_mod_SOURCE): New variable.
5468         (appleldr_mod_CFLAGS): Likewise.
5469         (appleldr_mod_LDFLAGS): Likewise.
5470         (pci_mod_SOURCES): Likewise.
5471         (pci_mod_CFLAGS): Likewise.
5472         (pci_mod_LDFLAGS): Likewise.
5473         (lspci_mod_SOURCES): Likewise.
5474         (lspci_mod_CFLAGS): Likewise.
5475         (lspci_mod_LDFLAGS): Likewise.
5477         * conf/x86_64-efi.rmk: New file.
5479         * disk/efi/efidisk.c (grub_efidisk_read): Wrap efi calls with efi_call_N
5480         macro.
5481         (grub_efidisk_write): Likewise.
5483         * include/efi/api.h (efi_call_0): New macro.
5484         (efi_call_1): Likewise.
5485         (efi_call_2): Likewise.
5486         (efi_call_3): Likewise.
5487         (efi_call_4): Likewise.
5488         (efi_call_5): Likewise.
5489         (efi_call_6): Likewise.
5491         * include/grub/efi/chainloader.h (grub_chainloader_cmd): Rename to
5492         grub_rescue_cmd_chainloader.
5494         * include/grub/efi/pe32.h (GRUB_PE32_MACHINE_X86_64): New macro.
5495         (grub_pe32_optional_header): Change some fields based on i386 or
5496         x86_64 platform.
5497         (GRUB_PE32_PE32_MAGIC): Likewise.
5499         * include/grub/efi/uga_draw.h: New file.
5501         * include/grub/elf.h (STN_ABS): New constant.
5502         (R_X86_64_NONE): Relocation constant for x86_64.
5503         (R_X86_64_64): Likewise.
5504         (R_X86_64_PC32): Likewise.
5505         (R_X86_64_GOT32): Likewise.
5506         (R_X86_64_PLT32): Likewise.
5507         (R_X86_64_COPY): Likewise.
5508         (R_X86_64_GLOB_DAT): Likewise.
5509         (R_X86_64_JUMP_SLOT): Likewise.
5510         (R_X86_64_RELATIVE): Likewise.
5511         (R_X86_64_GOTPCREL): Likewise.
5512         (R_X86_64_32): Likewise.
5513         (R_X86_64_32S): Likewise.
5514         (R_X86_64_16): Likewise.
5515         (R_X86_64_PC16): Likewise.
5516         (R_X86_64_8): Likewise.
5517         (R_X86_64_PC8): Likewise.
5519         * include/grub/i386/efi/pci.h: New file.
5521         * include/grub/i386/linux.h (GRUB_LINUX_EFI_SIGNATURE):
5522         Change it value based on platform.
5523         (GRUB_LINUX_EFI_SIGNATURE_0204): New constant.
5524         (GRUB_E820_RAM): Likewise.
5525         (GRUB_E820_RESERVED): Likewise.
5526         (GRUB_E820_ACPI): Likewise.
5527         (GRUB_E820_NVS): Likewise.
5528         (GRUB_E820_EXEC_CODE): Likewise.
5529         (GRUB_E820_MAX_ENTRY): Likewise.
5530         (grub_e820_mmap): New structure.
5531         (linux_kernel_header): Change the efi field according to different
5532         kernel version, also field from linux_kernel_header.
5534         * include/grub/kernel.h (grub_module_info): Add padding for x86_64.
5536         * include/grub/pci.h (GRUB_PCI_ADDR_SPACE_MASK): New constant.
5537         (GRUB_PCI_ADDR_SPACE_MEMORY): Likewise.
5538         (GRUB_PCI_ADDR_SPACE_IO): Likewise.
5539         (GRUB_PCI_ADDR_MEM_TYPE_MASK): Likewise.
5540         (GRUB_PCI_ADDR_MEM_TYPE_32): Likewise.
5541         (GRUB_PCI_ADDR_MEM_TYPE_1M): Likewise.
5542         (GRUB_PCI_ADDR_MEM_TYPE_64): Likewise.
5543         (GRUB_PCI_ADDR_MEM_PREFETCH): Likewise.
5544         (GRUB_PCI_ADDR_MEM_MASK): Likewise.
5545         (GRUB_PCI_ADDR_IO_MASK): Likewise.
5547         * include/grub/x86_64/efi/kernel.h: New file.
5549         * include/grub/x86_64/efi/loader.h: Likewise.
5551         * include/grub/x86_64/efi/machine.h: Likewise.
5553         * include/grub/x86_64/efi/pci.h: Likewise.
5555         * include/grub/x86_64/efi/time.h: Likewise.
5557         * include/grub/x86_64/linux.h: Likewise.
5559         * include/grub/x86_64/setjmp.h: Likewise.
5561         * include/grub/x86_64/time.h: Likewise.
5563         * include/grub/x86_64/types.h: Likewise.
5565         * kern/dl.c (GRUB_CPU_SIZEOF_VOID_P): Changed to
5566          GRUB_TARGET_SIZEOF_VOID_P.
5568         * kern/efi/efi.c (grub_efi_locate_protocol): Wrap efi calls.
5569         (grub_efi_locate_handle): Likewise.
5570         (grub_efi_open_protocol): Likewise.
5571         (grub_efi_set_text_mode): Likewise.
5572         (grub_efi_stall): Likewise.
5573         (grub_exit): Likewise.
5574         (grub_reboot): Likewise.
5575         (grub_halt): Likewise.
5576         (grub_efi_exit_boot_services): Likewise.
5577         (grub_get_rtc): Likewise.
5579         * kern/efi/mm.c (MEMORY_MAP_SIZE): Change to 0x3000 for new models.
5580         (GRUB_CPU_SIZEOF_VOID_P): Changed to GRUB_TARGET_SIZEOF_VOID_P.
5581         (grub_efi_allocate_pages): Wrap efi calls.
5582         (grub_efi_free_pages): Wrap efi calls.
5583         (grub_efi_get_memory_map): Wrap efi calls.
5585         * kern/x86_64/dl.c: New file.
5587         * kern/x86_64/efi/callwrap.S: Likewise.
5589         * kern/x86_64/efi/startup.S: Likewise.
5591         * loader/efi/appleloader.c: Likewise.
5593         * loader/efi/chainloader.c (cmdline): New variable.
5594         (grub_chainloader_unload): Wrap efi calls.
5595         (grub_chainloader_boot): Likewise.
5596         (grub_rescue_cmd_chainloader): Wrap efi calls, handle
5597         command line.
5599         * loader/efi/chainloader_normal.c (chainloader_command):
5600         Change grub_chainloader_cmd to grub_rescue_cmd_chainloader, pass
5601         command line.
5603         * loader/i386/efi/linux.c (allocate_pages): Change allocation
5604         method.
5605         (grub_e820_add_region): New function.
5606         (grub_linux_boot): Construct e820 map from efi map, handle x86_64
5607         booting.
5608         (grub_find_video_card): New function.
5609         (grub_linux_setup_video): New function.
5610         (grub_rescue_cmd_linux): Probe for video information.
5612         * normal/x86_64/setjmp.S: New file.
5614         * term/efi/console.c (map_char): New function.
5615         (grub_console_putchar): Map unicode char.
5616         (grub_console_checkkey): Wrap efi calls.
5617         (grub_console_getkey): Likewise.
5618         (grub_console_getwh): Likewise.
5619         (grub_console_gotoxy): Likewise.
5620         (grub_console_cls): Likewise.
5621         (grub_console_setcolorstate): Likewise.
5622         (grub_console_setcursor): Likewise.
5624         * util/i386/efi/grub-mkimage.c: Add support for x86_64.
5626 2008-07-16  Pavel Roskin  <proski@gnu.org>
5628         * loader/i386/efi/linux.c (allocate_pages): Fix warnings in
5629         format strings.
5631         * util/i386/efi/grub-mkimage.c (get_target_address): Return a
5632         pointer, not an integer.  This fixes a warning and prevents
5633         precision loss on 64-bit systems.
5634         (relocate_addresses): Remove unneeded cast.
5636 2008-07-15  Pavel Roskin  <proski@gnu.org>
5638         * kern/i386/ieee1275/init.c: Include grub/cache.h.
5640         * term/ieee1275/ofconsole.c: Disable code unused on i386.
5642         * kern/ieee1275/ieee1275.c (grub_ieee1275_get_integer_property):
5643         Fix comparison between signed and unsigned.
5645         * include/grub/i386/ieee1275/console.h: Declare
5646         grub_console_init() and grub_console_fini().
5648         * loader/i386/ieee1275/linux.c (grub_set_bootpath): Remove.
5649         It's empty and unused.
5651         * fs/ext2.c (grub_ext2_read_block): Initialize blknr in the
5652         beginning to avoid warnings with some compilers.
5654         * loader/ieee1275/multiboot2.c: Include grub/machine/loader.h.
5655         [__i386__] (grub_mb2_arch_boot): Avoid unnecessary cast.
5657 2008-07-14  Pavel Roskin  <proski@gnu.org>
5659         * kern/env.c (grub_register_variable_hook): Don't copy empty
5660         string, it leaks memory.  Pass "" to grub_env_set(), it should
5661         handle constant strings.
5663         * commands/blocklist.c (grub_cmd_blocklist): Fix format warning.
5664         * commands/cmp.c (grub_cmd_cmp): Likewise.
5665         * kern/dl.c (grub_dl_flush_cache): Likewise.
5666         (grub_dl_load_core): Likewise.
5667         * kern/elf.c (grub_elf32_load_phdrs): Likewise.
5668         (grub_elf64_load_phdrs): Likewise.
5670 2008-07-13  Pavel Roskin  <proski@gnu.org>
5672         * lib/LzmaEnc.c (LzmaEnc_SetProps): Fix warning about comparison
5673         between signed and unsigned.
5674         (LzmaEnc_Finish): Fix warning about an unused parameter.
5676 2008-07-13  Bean  <bean123ch@gmail.com>
5678         * Makefile.in (enable_lzo): New rule.
5680         * conf/i386-pc.rmk (grub_mkimage_SOURCES): New test with enable_lzo.
5682         * configure.ac (ENABLE_LZO): New option --enable-lzo.
5684         * boot/i386/pc/lnxboot.S: #include <config.h>.
5686         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE): Change
5687         its value according to the compression algorithm used, lzo or lzma.
5689         * util/i386/pc/grub-mkimage.c (compress_kernel): Use different
5690         compression algorithm according to configure macro.
5692         * kern/i386/pc/startup.S (codestart): Likewise.
5694         * kern/i386/pc/lzma_decode.S: New file.
5696         * include/grub/lib/LzFind.h: Likewise.
5698         * include/grub/lib/LzHash.h: Likewise.
5700         * include/grub/lib/LzmaDec.h: Likewise.
5702         * include/grub/lib/LzmaEnc.h: Likewise.
5704         * include/grub/lib/LzmaTypes.h: Likewise.
5706         * lib/LzFind.c: Likewise.
5708         * lib/LzmaDec.c: Likewise.
5710         * lib/LzmaEnc.c: Likewise.
5712 2008-07-13  Bean  <bean123ch@gmail.com>
5714         * fs/ext2.c (EXT4_EXTENTS_FLAG): New macro.
5715         (grub_ext4_extent_header): New structure.
5716         (grub_ext4_extent): Likewise.
5717         (grub_ext4_extent_idx): Likewise.
5718         (grub_ext4_find_leaf): New function.
5719         (grub_ext2_read_block): Handle extents.
5721 2008-07-12  Robert Millan  <rmh@aybabtu.com>
5723         * util/i386/pc/grub-mkrescue.in: s/grub-install/grub-mkrescue/g.
5725 2008-07-11  Robert Millan  <rmh@aybabtu.com>
5727         * util/grub.d/40_custom.in: New file. Example on how to add custom
5728         entries to /etc/grub.d.
5729         * conf/common.rmk (%, update-grub_SCRIPTS, CLEANFILES): Install
5730         40_custom (implicitly, by merging all the grub.d rules).
5732 2008-07-11  Pavel Roskin  <proski@gnu.org>
5734         * commands/read.c (grub_getline): Fix invalid memory access.
5735         Don't add newline to the variable value.
5737         * term/i386/pc/serial.c (GRUB_SERIAL_PORT_NUM): New constant.
5738         [!GRUB_MACHINE_PCBIOS] (serial_hw_io_addr): Add COM2 and COM3.
5739         (serial_hw_get_port): Check validity of the port number.
5740         (grub_cmd_serial): Check return value of serial_hw_get_port().
5742 2008-07-07  Pavel Roskin  <proski@gnu.org>
5744         * boot/i386/pc/diskboot.S (notification_string): Replace
5745         "Loading kernel" with just "loading".  This is shorter, less
5746         confusing and saves a few bytes for possible future changes.
5748 2008-07-05  Pavel Roskin  <proski@gnu.org>
5750         * disk/ata.c (grub_ata_dumpinfo): Don't output addressing and
5751         size for ATAPI devices, they are undefined.  Output sector
5752         number in decimal form.
5754         * disk/ata.c: Use named constants for status bits.
5756 2008-07-04  Pavel Roskin  <proski@gnu.org>
5758         * kern/i386/linuxbios/init.c (grub_machine_init): Cast addr to
5759         grub_addr_t before casting it to the void pointer to fix a
5760         warning.  Non-addressable regions are discarded earlier.
5761         (grub_arch_modules_addr): Cast _end to grub_addr_t.
5762         * kern/i386/linuxbios/table.c: Include grub/misc.h.
5763         (check_signature): Don't shadow table_header.
5764         (grub_linuxbios_table_iterate): Cast numeric constants to
5765         grub_linuxbios_table_header_t.
5766         * include/grub/i386/linuxbios/init.h: Add noreturn attribute to
5767         grub_stop().
5769         * kern/ieee1275/init.c: Cast _start and _end to grub_addr_t to
5770         prevent warnings.
5772         * include/grub/misc.h (ALIGN_UP): Avoid unnecessary cast to a
5773         pointer, which can cause warnings.  Support 64-bit addresses.
5775         * util/elf/grub-mkimage.c: Use GRUB_TARGET_SIZEOF_LONG instead
5776         of sizeof(long).  This fixes PowerPC image generation on x86_64.
5778 2008-07-04  Robert Millan  <rmh@aybabtu.com>
5780         This fixes a performance issue when pc & gpt partmap iterators
5781         didn't abort iteration even after our hook found what it was
5782         looking for (often causing expensive probes of non-existent drives).
5784         Some callers relied on previous buggy behaviour, since they would
5785         raise an error when their own hooks caused early abortion of its
5786         iteration.
5788         * kern/device.c (grub_device_open): Improve error message.
5789         * disk/lvm.c (grub_lvm_open): Likewise.
5790         * disk/raid.c (grub_raid_open): Likewise.
5792         * partmap/pc.c (pc_partition_map_iterate): Abort parent iteration
5793         when hook requests it, independently of grub_errno.
5794         (pc_partition_map_probe): Do not fail when find_func() caused
5795         early abortion of pc_partition_map_iterate().
5797         * partmap/gpt.c (gpt_partition_map_iterate): Abort parent iteration
5798         when hook requests it, independently of grub_errno.
5799         (gpt_partition_map_probe): Do not fail when find_func() caused
5800         early abortion of gpt_partition_map_iterate().
5802         * kern/partition.c (grub_partition_iterate): Abort parent iteration
5803         when hook requests it, independently of grub_errno.  Do not fail when
5804         part_map_iterate_hook() caused early abortion of p->iterate().
5806         * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Do not fail
5807         when grub_partition_iterate() returned with non-zero.
5809 2008-07-03  Pavel Roskin  <proski@gnu.org>
5811         * disk/ata.c (grub_ata_pio_write): Check status before writing,
5812         like we do in grub_ata_pio_read().
5813         (grub_ata_readwrite): Always write individual sectors.  Fix the
5814         sector count for the remainder.
5815         (grub_ata_write): Enable writing to ATA devices.  Correctly
5816         report error for ATAPI devices.
5818 2008-07-02  Pavel Roskin  <proski@gnu.org>
5820         * boot/i386/pc/cdboot.S: Add _start entry to fix a linker
5821         warning.
5823         * disk/ata.c (grub_ata_readwrite): Don't increment sector number
5824         for every read sector, we already increment it for the whole
5825         batch.  This fixes reading more than 256 sectors at once.
5827         * util/grub-editenv.c (cmd_info): Cast argument to long
5828         explicitly.  ptrdiff_t reduces to int on i386.
5830         * util/grub-editenv.c (main): Be specific which parameter is
5831         missing.
5833         * disk/memdisk.c (memdisk_addr): Make a pointer to fix warnings.
5834         (memdisk): Make memdisk_orig_addr a pointer.
5836         * fs/reiserfs.c (grub_reiserfs_read): Fix misuse of grub_size_t
5837         for file offsets, use grub_off_t instead.  Fix printf format
5838         warnings.
5840         * fs/reiserfs.c: Remove #warning, TODO list items don't belong
5841         there.  Real unexpected warnings should not drown in the noise
5842         about known problems.
5844         * commands/hexdump.c (grub_cmd_hexdump): Fix misuse of
5845         grub_disk_addr_t for memory addresses.
5847         * loader/aout.c (grub_aout_load): Cast load_addr to pointer
5848         explicitly to fix a warning.
5850         * util/grub-editenv.c (cmd_info): Fix warning in printf format.
5852         * Makefile.in (MODULE_LDFLAGS): New variable.
5853         * aclocal.m4 (grub_PROG_LD_BUILD_ID_NONE): New macro.  Check if
5854         the linker accepts --build-id=none.
5855         * configure.ac: Call grub_PROG_LD_BUILD_ID_NONE.  Substitute
5856         MODULE_LDFLAGS.
5857         * genmk.rb: Use MODULE_LDFLAGS when linking modules.
5859         * fs/xfs.c (struct grub_xfs_dir_header): Use names similar to
5860         those in Linux XFS code.  Provide a way to access 64-bit parent
5861         inode.
5862         (grub_xfs_iterate_dir): Use the new names.  Avoid reading past
5863         the end of struct grub_xfs_dir_header.
5865 2008-07-02  Bean  <bean123ch@gmail.com>
5867         * include/grub/ieee1275.h (grub_ieee1275_flag): New constant
5868         GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
5869         and GRUB_IEEE1275_FLAG_NO_ANSI.
5871         * kern/ieee1275/cmain.c (grub_ieee1275_find_options): Set flag
5872         GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
5873         and GRUB_IEEE1275_FLAG_NO_ANSI for Open Hackware.
5875         * kern/ieee1275/ieee1275.c (grub_ieee1275_interpret): Return
5876         immediately if GRUB_IEEE1275_FLAG_CANNOT_INTERPRET is set.
5878         * kern/ieee1275/init.c (grub_claim_heap): Claim memory directly if
5879         GRUB_IEEE1275_FLAG_FORCE_CLAIM is set.
5881         * term/ieee1275/ofconsole.c (grub_ofconsole_writeesc): Don't output
5882         esc sequence on non ANSI terminal.
5883         (grub_ofconsole_gotoxy): Emulate backspace key on non ANSI terminal.
5885         * util/elf/grub-mkimage.c (add_segments): Move ELF header to the
5886         beginning of file.
5888 2008-07-02  Bean  <bean123ch@gmail.com>
5890         * conf/common.rmk (bin_UTILITIES): Add grub-editenv.
5891         (grub_editenv_SOURCES): New variable.
5892         (pkglib_MODULES): Add loadenv.mod.
5893         (loadenv_mod_SOURCES): New variable.
5894         (loadenv_mod_CFLAGS): Likewise.
5895         (loadenv_mod_LDFLAGS): Likewise.
5897         * include/grub/envblk.h: New file.
5899         * util/envblk.c: New file.
5901         * util/grub-editenv.c: New file.
5903         * commands/loadenv.c: New file.
5905 2008-07-01  Pavel Roskin  <proski@gnu.org>
5907         * include/multiboot2.h (struct multiboot_tag_module): Use char,
5908         not unsigned char.  This fixes warnings and is consistent with
5909         other tags.
5911         * disk/fs_uuid.c (search_fs_uuid): Correctly increment count.
5913         * normal/parser.y: Define YYENABLE_NLS as 0 to fix warnings.
5915         * term/tparm.c (analyze): Always set *popcount.
5917         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Remove useless
5918         cast to fix a warning.
5920         * loader/i386/pc/multiboot2.c (grub_mb2_arch_module_alloc): Use
5921         cast to suppress a warning.
5923         * fs/afs.c (grub_afs_read_block): Return grub_disk_addr_t, as
5924         grub_fshelp_read_file() expects.
5926         * fs/fat.c: Fix UUID calculation on big-endian systems.  We
5927         write uuid as a 32-bit value in CPU byte order, so declare and
5928         use it as such.
5930         * disk/raid.c: Cast grub_dprintf() arguments to unsigned long
5931         long if the format specifier expects it.
5932         * partmap/gpt.c (gpt_partition_map_iterate): Likewise.
5933         * partmap/pc.c (pc_partition_map_iterate): Likewise.
5934         * fs/ntfs.c (grub_ntfs_uuid): Cast data->uuid to unsigned long
5935         long to fix a warning.
5936         * fs/reiserfs.c (grub_reiserfs_read): Change casts in
5937         grub_dprintf() arguments to fix warnings.
5939 2008-06-30  Pavel Roskin  <proski@gnu.org>
5941         * util/i386/pc/grub-setup.c (setup): Write install_dos_part and
5942         install_bsd_part immediately before core.img is embedded or
5943         modified on disk.  This fixes core.img verification if core.img
5944         cannot be embedded.
5946         * util/i386/pc/grub-setup.c (setup): Use core_path_dev, not
5947         core_path to calculate the blocklist.
5948         Patch from Javier Martín <lordhabbit@gmail.com>
5950 2008-06-29  Robert Millan  <rmh@aybabtu.com>
5952         * fs/xfs.c (GRUB_XFS_FSB_TO_BLOCK): New macro.  Maps filesystem
5953         block to disk block.
5954         (grub_xfs_read_block): Use GRUB_XFS_FSB_TO_BLOCK() on result.
5955         Patch from Niels Böhm <bitbucket@arcor.de>
5957 2008-06-29  Robert Millan  <rmh@aybabtu.com>
5959         * util/update-grub_lib.in (font_path): Search for fonts in
5960         /boot/grub first, which is more likely to be readable (we aren't
5961         deciding where fonts live, just looking for them).
5963 2008-06-26  Pavel Roskin  <proski@gnu.org>
5965         * util/biosdisk.c (read_device_map): Don't leave dead map
5966         entries for devices failing stat() check.
5968         * util/i386/pc/grub-setup.c (setup): Don't reuse core_path, use
5969         core_path_dev for the core.img path on the target device.
5971 2008-06-26  Robert Millan  <rmh@aybabtu.com>
5973         * disk/fs_uuid.c: New file.
5974         * conf/common.rmk (pkglib_MODULES): Add `fs_uuid.mod'.
5975         (fs_uuid_mod_SOURCES, fs_uuid_mod_CFLAGS)
5976         (fs_uuid_mod_LDFLAGS): New variables.
5977         * include/grub/disk.h (grub_disk_dev_id): Add
5978         `GRUB_DISK_DEVICE_UUID_ID'.
5979         * kern/disk.c (grub_disk_dev_iterate): Allow disk devices not to
5980         implement iterate().
5982 2008-06-26  Robert Millan  <rmh@aybabtu.com>
5984         * util/grub.d/10_linux.in: Avoid passing UUIDs to Linux when either
5985         "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" does not exist, or when a
5986         Linux image includes no initrd.
5988 2008-06-21  Javier Martín  <lordhabbit@gmail.com>
5990         * util/i386/pc/grub-setup.c (setup): Remove literal "core.img" in a
5991         call to resolve the core image location that effectively appended the
5992         name twice.
5994 2008-06-21  Robert Millan  <rmh@aybabtu.com>
5996         * util/grub.d/00_header.in: Move last prepare_grub_to_access_device()
5997         call from here ...
5999         * util/grub.d/10_hurd.in: ... to here ...
6000         * util/grub.d/10_linux.in: ... and here.
6002 2008-06-19  Robert Millan  <rmh@aybabtu.com>
6004         * kern/main.c (grub_main): Export `prefix' variable immediately
6005         after it has been set by grub_machine_set_prefix().
6007 2008-06-19  Robert Millan  <rmh@aybabtu.com>
6009         * commands/search.c (search_label, search_fs_uuid, search_file): Print
6010         search result when not saving to variable, not the other way around.
6011         When saving to variable, abort iteration as soon as a match is found.
6013 2008-06-19  Robert Millan  <rmh@aybabtu.com>
6015         * util/update-grub_lib.in (prepare_grub_to_access_device): Remove
6016         check for partition that provides /boot/grub.  Its logic is flawed,
6017         as it prevents prepare_grub_to_access_device() from being called
6018         multiple times.
6020 2008-06-19  Robert Millan  <rmh@aybabtu.com>
6022         * util/update-grub_lib.in (prepare_grub_to_access_device): Issue
6023         "insmod" command directly when abstraction modules are needed,
6024         instead of relying on GRUB_PRELOAD_MODULES (which had no effect
6025         since it had already been processed).
6027 2008-06-19  Pavel Roskin  <proski@gnu.org>
6029         * conf/i386-efi.rmk: Recompile grub-mkimage.c if Makefile has
6030         changed.  This is needed in case GRUB_LIBDIR changes.
6031         * conf/i386-ieee1275.rmk: Likewise.
6032         * conf/i386-linuxbios.rmk: Likewise.
6033         * conf/i386-pc.rmk: Likewise.
6034         * conf/powerpc-ieee1275.rmk: Likewise.
6036 2008-06-18  Pavel Roskin  <proski@gnu.org>
6038         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Rename
6039         kernel_elf_symlist.c to symlist.c for consistency with other
6040         architectures.  Update all users.
6041         * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
6043 2008-06-18  Robert Millan  <rmh@aybabtu.com>
6045         * util/i386/pc/grub-install.in: If the drive is LVM or RAID, prepend
6046         it in prefix.
6048         * util/i386/pc/grub-setup.c (main): Don't handle prefix at all.  Set
6049         `must_embed' to 1 when root_dev is a RAID device.  When dest_dev is
6050         a RAID device, run setup() for all members independently on whether
6051         LVM abstraction is being used.
6052         (setup): Don't handle prefix at all; let grub-mkimage take care of it.
6053         If grub-mkimage has set `*install_dos_part == -2', don't override this
6054         value.
6055         Perform *install_dos_part adjustments independently on whether
6056         we're embedding or not.
6057         Clarify error message when image is too big for embedding.
6058         Remove duplicate *install_dos_part stanza.
6060 2008-06-17  Robert Millan  <rmh@aybabtu.com>
6062         * term/ieee1275/ofconsole.c (fgcolor, bgcolor): Remove variables.
6063         (grub_ofconsole_normal_color, grub_ofconsole_highlight_color): New
6064         variables.
6065         (grub_ofconsole_setcolor, grub_ofconsole_getcolor): Load/store
6066         values in grub_ofconsole_normal_color and
6067         grub_ofconsole_highlight_color (they're not directly related to
6068         background and foreground).
6069         (grub_ofconsole_setcolorstate): Extract background and foreground
6070         from grub_ofconsole_normal_color and grub_ofconsole_highlight_color.
6072 2008-06-17  Robert Millan  <rmh@aybabtu.com>
6074         * util/update-grub_lib.in (prepare_grub_to_access_device): Use
6075         /boot/grub for the check in last commit, not /boot (they could be
6076         different partitions).
6078 2008-06-16  Robert Millan  <rmh@aybabtu.com>
6080         * util/update-grub_lib.in (prepare_grub_to_access_device): If we were
6081         asked to setup access for the same partition that provides /boot,
6082         don't bother using UUIDs since our root already has the value we
6083         want.
6085 2008-06-16  Robert Millan  <rmh@aybabtu.com>
6087         * util/biosdisk.c (convert_system_partition_to_system_disk): Detect
6088         I2O devices.
6089         Patch from Sven Mueller <sven@debian.org>.
6091 2008-06-16  Robert Millan  <rmh@aybabtu.com>
6093         * util/update-grub.in: Check for $EUID instead of $UID.
6094         Reported by Vincent Zweije.
6096 2008-06-16  Bean  <bean123ch@gmail.com>
6098         * fs/ext2.c (grub_ext2_blockgroup): Revert to pre-journal state.
6099         (grub_ext2_read_block): Likewise.
6100         (grub_ext2_read_inode): Likewise.
6101         (grub_ext2_mount): Likewise.
6102         (grub_ext2_close): Likewise.
6103         (grub_ext3_get_journal): Removed.
6105         * fs/reiserfs.c (grub_reiserfs_get_item): Revert to pre-journal state.
6106         (grub_reiserfs_read_symlink): Likewise.
6107         (grub_reiserfs_mount): Likewise.
6108         (grub_reiserfs_open): Likewise.
6109         (grub_reiserfs_read): Likewise.
6110         (grub_reiserfs_close): Likewise.
6111         (grub_reiserfs_get_journal): Removed.
6113         * fs/fshelp.c (grub_fshelp_read): Removed.
6114         (grub_fshelp_map_block): Likewise.
6116         * include/grub/fshelp.h (grub_fshelp_journal_type): Removed.
6117         (grub_fshelp_journal): Likewise.
6118         (grub_fshelp_read): Likewise.
6119         (grub_fshelp_map_block): Likewise.
6121 2008-06-16  Pavel Roskin  <proski@gnu.org>
6123         * conf/powerpc-ieee1275.rmk: Remove -msoft-float, we don't use
6124         floating point anymore.
6125         * include/grub/powerpc/libgcc.h: Leave only necessary exports.
6127 2008-06-15  Pavel Roskin  <proski@gnu.org>
6129         * commands/ls.c (grub_ls_list_files): Use integer calculations
6130         for human readable format, avoid floating point use.
6131         * kern/misc.c (grub_ftoa): Remove.
6132         (grub_vsprintf): Remove floating point support.
6134 2008-06-15  Robert Millan  <rmh@aybabtu.com>
6136         * util/grub.d/10_linux.in: Use the underlying device for loop-AES
6137         devices.
6138         Reported by Max Vozeler.
6140 2008-06-15  Robert Millan  <rmh@aybabtu.com>
6142         * util/i386/pc/grub-mkimage.c (generate_image): If we included a drive
6143         in our prefix, set install_{dos,bsd}_part = -2 to indicate this can be
6144         skipped later.
6145         (main): If a memdisk was requested, add "(memdisk)" drive explicitly to
6146         the beginning of the prefix.
6148         * kern/i386/pc/init.c (make_install_device): Remove memdisk check.
6149         It is assumed that if we have a memdisk, grub-mkimage has set
6150         grub_prefix to include the "(memdisk)" drive in it.
6152 2008-06-15  Robert Millan  <rmh@aybabtu.com>
6154         * term/i386/pc/console.c [GRUB_MACHINE_LINUXBIOS] (grub_console_init):
6155         Initialize keyboard controller after registering the terminal, so that
6156         grub_printf() can be called from grub_keyboard_controller_init().
6158 2008-06-15  Robert Millan  <rmh@aybabtu.com>
6160         * fs/sfs.c (grub_sfs_read_extent): Fix the count of nodes in
6161         extent-btree which is written as big endian on disk.
6162         Reported by Alain Greppin  <al@chilibi.org>.
6164 2008-06-14  Robert Millan  <rmh@aybabtu.com>
6166         * util/i386/efi/grub-install.in (modules): Remove `_chain'.
6167         * util/i386/pc/grub-install.in (modules): Likewise.
6169 2008-06-13  Pavel Roskin  <proski@gnu.org>
6171         * commands/ls.c (grub_ls_list_files): Fix format warnings.
6173 2008-06-13  Bean  <bean123ch@gmail.com>
6175         * commands/hexdump.c (grub_cmd_hexdump): Adjust offset for partition.
6177         * fs/ext2.c (grub_ext3_get_journal): Fix revoke block handling.
6179         * fs/fshelp.c (grub_fshelp_map_block): Don't map block 0 as it's used
6180         to indicate sparse block.
6182 2008-06-12  Pavel Roskin  <proski@gnu.org>
6184         * fs/ext2.c (grub_ext2_read_inode): Don't normalize block
6185         number, grub_fshelp_read() does it for us.
6187         * fs/fshelp.c (grub_fshelp_read): New function.  Implement
6188         linear disk read with journal translation.
6189         * fs/ext2.c: Use grub_fshelp_read() instead of grub_disk_read().
6190         * include/grub/fshelp.h: Declare grub_fshelp_read().
6192 2008-06-09  Pavel Roskin  <proski@gnu.org>
6194         * fs/minix.c (grub_minix_mount): Handle error reading
6195         superblock.
6197 2008-06-08  Robert Millan  <rmh@aybabtu.com>
6199         * util/i386/pc/grub-setup.c (main): If install drive is an LVM,
6200         don't append the RAID prefix afterwards.
6201         Reported by Clint Adams.
6203 2008-06-08  Robert Millan  <rmh@aybabtu.com>
6205         Based on description from Pavel:
6206         * kern/disk.c (grub_disk_check_range): Rename to ...
6207         (grub_disk_adjust_range): ... this.  Add a comment explaining the
6208         tasks performed by this function.
6210 2008-06-08  Robert Millan  <rmh@aybabtu.com>
6212         * include/grub/ntfs.h (struct grub_ntfs_bpb): Rename `serial_number' to
6213         `num_serial' (for consistency with other variables).
6214         (struct grub_ntfs_data): Add `uuid' member.
6215         * fs/ntfs.c (grub_ntfs_mount): Initialize `data->uuid'.
6216         (grub_ntfs_uuid): New function.
6217         (grub_ntfs_fs): Reference grub_ntfs_uuid() in `uuid' struct member.
6219 2008-06-07  Pavel Roskin  <proski@gnu.org>
6221         * util/biosdisk.c (open_device): Revert last change to the
6222         function, it broke installation.  The sector needs to be
6223         different dependent on which device is opened.
6225 2008-06-06  Robert Millan  <rmh@aybabtu.com>
6227         Ensure GRUB_KERNEL_MACHINE_DATA_END is always consistent with the
6228         rest of GRUB, and breakage doesn't happen if its value were modified.
6230         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
6231         Redefine as an offset from `GRUB_KERNEL_MACHINE_DATA_END' instead of
6232         a constant (same value).
6233         * kern/i386/pc/startup.S: Replace hardcoded `0x50' with
6234         `GRUB_KERNEL_MACHINE_DATA_END' (same value).
6236 2008-06-06  Robert Millan  <rmh@aybabtu.com>
6238         * util/biosdisk.c (open_device): Do not modify sector offset when
6239         accessing a partition.  kern/disk.c already handles this for us.
6241 2008-06-06  Robert Millan  <rmh@aybabtu.com>
6243         * util/grub-emu.c (grub_machine_init): Move code in this function from
6244         here ...
6245         (main): ... to here (before grub_util_biosdisk_init() call, to prevent
6246         segfault in case grub_printf() is called).
6248         * util/i386/pc/grub-install.in: Append `--device-map=${device_map}' to
6249         grub_probe.  Update all users not to explicitly add it again.
6250         (grub_device): New variable; contains corresponding device for grubdir.
6251         (fs_module, partmap_module, devabstraction_module): Pass
6252         `--device ${grub_device}' to grub_probe to avoid traversing /dev
6253         every time.
6255 2008-06-05  Robert Millan  <rmh@aybabtu.com>
6257         * normal/misc.c (grub_normal_print_device_info): When a filesystem UUID
6258         is found, print it (same layout as with labels).
6260 2008-06-04  Robert Millan  <rmh@aybabtu.com>
6262         * util/biosdisk.c (get_drive): Rename to ...
6263         (find_grub_drive): ... this.  Update all users.
6265         (get_os_disk): Rename to ...
6266         (convert_system_partition_to_system_disk): ... this.  Update all users.
6268         (find_drive): Rename to ...
6269         (find_system_device): ... this.  Update all users.
6271 2008-06-04  Robert Millan  <rmh@aybabtu.com>
6273         * util/biosdisk.c (get_os_disk): Handle IDA devices.
6274         * util/grub-mkdevicemap.c (get_mmc_disk_name)
6275         (make_device_map): Likewise.
6277 2008-06-01  Robert Millan  <rmh@aybabtu.com>
6279         *  util/biosdisk.c (get_drive): Verify that `map[i].drive' is non-NULL
6280         before dereferencing it.
6282         * fs/fat.c (struct grub_fat_bpb): Move fat32-specific fields into a
6283         union with fat12/fat16-specific ones.  Add some new fields, including
6284         `num_serial' for both versions.
6285         (struct grub_fat_data): Add `uuid' member.
6286         (grub_fat_mount): Refer to fat32-specific fields in `bpb' by their new
6287         names.  Initialize `data->uuid' using `num_serial'.
6288         (grub_fat_uuid): New function.
6289         (grub_fat_fs): Reference grub_fat_uuid() in `uuid' struct member.
6291         * fs/reiserfs.c (grub_reiserfs_superblock): Add `uuid' field.
6292         (grub_reiserfs_uuid): New function.
6293         (grub_reiserfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct
6294         member.
6296         * fs/xfs.c (grub_xfs_sblock): Add `uuid' field.
6297         (grub_xfs_uuid): New function.
6298         (grub_xfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct member.
6300 2008-06-01  Robert Millan  <rmh@aybabtu.com>
6302         * util/update-grub_lib.in (prepare_grub_to_access_device): Generate
6303         code that is backward compatible with pre-uuid search command.
6305 2008-05-31  Robert Millan  <rmh@aybabtu.com>
6307         * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Iterate through
6308         floppies after everything else, to ensure floppy drive isn't accessed
6309         unnecessarily (patch from Bean).
6311 2008-05-31  Robert Millan  <rmh@aybabtu.com>
6313         * commands/search.c (search_label, search_fs_uuid, search_file): Do
6314         not print device names when we were asked to set a variable.
6316 2008-05-31  Robert Millan  <rmh@aybabtu.com>
6318         * term/ieee1275/ofconsole.c (grub_ofconsole_setcursor): Implement
6319         using "cursor-on" and "cursor-off" commands (understood at least by
6320         the Open Firmware flavour on OLPC).
6322 2008-05-31  Michael Gorven  <michael@gorven.za.net>
6324         * term/terminfo.c (grub_terminfo_set_current): Correct vt100 cursor
6325         on and off sequences.
6327 2008-05-31  Robert Millan  <rmh@aybabtu.com>
6329         * util/update-grub_lib.in: Replace `grub-probe' with `${grub_probe}'.
6330         * util/update-grub.in: Likewise.
6332 2008-05-30  Pavel Roskin  <proski@gnu.org>
6334         * util/biosdisk.c (linux_find_partition): Simplify logic and
6335         make the code more universal.  Keep special processing for
6336         devfs, but use a simple rule for all other devices.  If the
6337         device ends with a number, append 'p' and the partition number.
6338         Otherwise, append only the partition number.
6340 2008-05-30  Robert Millan  <rmh@aybabtu.com>
6342         * util/update-grub.in (GRUB_DISABLE_LINUX_UUID): Export variable.
6343         * util/grub.d/10_linux.in: If GRUB_DEVICE_UUID is set, and
6344         GRUB_DISABLE_LINUX_UUID isn't true, use the filesystem UUIDs as
6345         the `root' parameter to Linux.
6347 2008-05-30  Robert Millan  <rmh@aybabtu.com>
6349         * commands/search.c (options): Rename --fs_uuid to --fs-uuid.
6350         * util/update-grub_lib.in (prepare_grub_to_access_device): Replace
6351         --fs_uuid with --fs-uuid.
6352         * util/update-grub.in: Allow filesystem UUID probes to fail (since not
6353         all filesystems support them).
6355 2008-05-30  Robert Millan  <rmh@aybabtu.com>
6357         * fs/ext2.c (grub_ext2_uuid): Use `04x' instead of '02x' as
6358         grub_printf() flags, since we're printing in units of 2 bytes.
6360 2008-05-30  Robert Millan  <rmh@aybabtu.com>
6362         * util/grub.d/00_header.in: Remove obsolete comment referencing
6363         convert_system_path_to_grub_path().
6364         * util/update-grub.in: Likewise.
6365         * util/update-grub_lib.in (is_path_readable_by_grub): New function.
6366         (convert_system_path_to_grub_path): Add a warning message explaining
6367         that this function is deprecated.  Rely on is_path_readable_by_grub()
6368         for the readability checks.
6369         (font_path): Use is_path_readable_by_grub() for the readability
6370         check rather than convert_system_path_to_grub_path().
6372 2008-05-30  Robert Millan  <rmh@aybabtu.com>
6374         * util/update-grub_lib.in (prepare_grub_to_access_device): New function.
6375         * util/update-grub.in: Set `GRUB_FONT_PATH' to the system path, without
6376         converting it first.
6377         * util/grub.d/00_header.in: Use prepare_grub_to_access_device() to setup
6378         grub.cfg for access to font file, and afterwards call it again to set
6379         the root device.
6381 2008-05-30  Robert Millan  <rmh@aybabtu.com>
6383         * commands/search.c (options): Add --fs_uuid option.
6384         (search_fs_uuid): New function.
6385         (grub_cmd_search): Fix --set argument passing.
6386         Use search_fs_uuid() when requested via --fs_uuid.
6387         (grub_search_init): Update help message.
6388         * fs/ext2.c (struct grub_ext2_sblock): Rename `unique_id' to `uuid'
6389         and redeclare it as an array of 16-bit words.
6390         (grub_ext2_uuid): New function.
6391         (grub_ext2_fs): Reference grub_ext2_uuid() in `uuid' struct member.
6392         * include/grub/fs.h (struct grub_fs): Add `uuid' struct member.
6393         * util/update-grub.in (GRUB_DEVICE_UUID, GRUB_DEVICE_BOOT)
6394         (GRUB_DEVICE_BOOT_UUID): New variables.
6395         (GRUB_DRIVE. GRUB_DRIVE_BOOT. GRUB_DRIVE_BOOT_GRUB): Remove.
6396         * util/grub.d/00_header.in: Set root using `search --fs_uuid' command
6397         whenever possible.
6398         * util/grub.d/10_hurd.in: Avoid explicit use of root drive.  Instead,
6399         just assume `root' variable has the right value.
6400         * util/grub.d/10_linux.in: Likewise.
6401         * util/grub-probe.c (probe): Probe for filesystem UUID when requested
6402         via PRINT_FS_UUID.
6403         (main): Recognise `-t fs_uuid' argument.
6405 2008-05-30  Robert Millan  <rmh@aybabtu.com>
6407         * util/biosdisk.c (map): Redefine structure to hold information
6408         about GRUB drive name.
6409         (get_drive): Reimplement without assuming (and verifying) BIOS-like
6410         drive names.
6411         (call_hook): Remove.
6412         (grub_util_biosdisk_iterate): Access drive names via `.drive' struct
6413         member.  Assume drive has partitions.
6414         (grub_util_biosdisk_open): Access device names via `.device' struct
6415         member.
6416         (open_device): Likewise.
6417         (find_drive): Likewise.
6418         (read_device_map): Adjust map[] usage to match the new struct
6419         definition.  Don't check for duplicates (still possible, but not cheap
6420         anymore).
6421         (grub_util_biosdisk_fini): Free malloced buffers referenced by map[].
6422         (make_device_name): Remove assumption of BIOS-like drive names.
6424 2008-05-30  Pavel Roskin  <proski@gnu.org>
6426         * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Remove, as
6427         compiling execute.c doesn't need grub_script.tab.h anymore.
6428         (normal/command.c_DEPENDENCIES): Likewise.
6429         (normal/function.c_DEPENDENCIES): Likewise.
6430         * conf/i386-ieee1275.rmk: Likewise.
6431         * conf/i386-linuxbios.rmk: Likewise.
6432         * conf/i386-pc.rmk: Likewise.
6433         * conf/powerpc-ieee1275.rmk: Likewise.
6434         * conf/sparc64-ieee1275.rmk: Likewise.
6436 2008-05-29  Pavel Roskin  <proski@gnu.org>
6438         * disk/lvm.c (grub_lvm_scan_device): Check for the buffer end
6439         when scanning metadata for volume group name.
6441         * include/grub/script.h: Don't include grub_script.tab.h.  It's
6442         a generated file, which may only be included from the files with
6443         DEPENDENCIES rules in the makefile.  Don't use typedef YYSTYPE,
6444         use union YYSTYPE, as the later allows forward declaration.
6445         * normal/lexer.c: Don't use typedef YYSTYPE, use union YYSTYPE.
6447 2008-05-29  Robert Millan  <rmh@aybabtu.com>
6449         * term/i386/pc/at_keyboard.c: Include `grub/machine/machine.h'.
6450         (OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): New macros.
6451         [GRUB_MACHINE_IEEE1275] (keyboard_map): Add OLPC scan codes
6452         (grub_console_checkkey): Add grub_dprintf() call to report unknown
6453         scan codes.
6455 2008-05-29  Robert Millan  <rmh@aybabtu.com>
6457         * term/i386/pc/at_keyboard.c (grub_console_checkkey): Add support for
6458         control key combinations.
6460 2008-05-29  Robert Millan  <rmh@aybabtu.com>
6462         * util/powerpc/ieee1275/grub-install.in: Move from here ...
6463         * util/ieee1275/grub-install.in: ... to here.
6464         * powerpc-ieee1275.rmk (grub_install_SOURCES): Update location.
6465         * i386-ieee1275.rmk (sbin_SCRIPTS): New variable.
6466         (grub_install_SOURCES): Likewise.
6468 2008-05-29  Robert Millan  <rmh@aybabtu.com>
6470         * fs/affs.c: Update copyright year.
6471         * fs/ext2.c: Likewise.
6472         * fs/fshelp.c: Likewise.
6473         * fs/hfsplus.c: Likewise.
6474         * fs/ntfs.c: Likewise.
6475         * fs/xfs.c: Likewise.
6476         * include/grub/fshelp.h: Likewise.
6477         * util/grub-mkdevicemap.c: Likewise.
6479 2008-05-28  Robert Millan  <rmh@aybabtu.com>
6481         * util/update-grub.in: Allow chmod call to fail, since /boot/grub/
6482         might need to be fatfs to support some firmware implementations
6483         (e.g. OFW or EFI).
6485 2008-05-28  Robert Millan  <rmh@aybabtu.com>
6487         * util/biosdisk.c (linux_find_partition, get_os_disk): Handle MMC
6488         devices.
6489         * util/grub-mkdevicemap.c (get_mmc_disk_name)
6490         (make_device_map): Likewise.
6492 2008-05-20  Bean  <bean123ch@gmail.com>
6494         * fs/fshelp.c (grub_fshelp_map_block): New function.
6495         (grub_fshelp_find_file): Use 64-bit type for pos and block address.
6496         Use `>>' and `&' operator to avoid 64-bit divide and modulo.
6498         * include/grub/fshelp.h (grub_fshelp_journal_type): New enum.
6499         (GRUB_FSHELP_JOURNAL_UNUSED_MAPPING): New macro.
6500         (grub_fshelp_journal): New structure.
6501         (grub_fshelp_map_block): New function prototype.
6502         (grub_fshelp_read_file): Use grub_disk_addr_t as block type.
6503         (grub_fshelp_map_block): Likewise.
6505         * fs/ext2.c (EXT3_FEATURE_COMPAT_HAS_JOURNAL): New macro.
6506         (EXT3_JOURNAL_MAGIC_NUMBER): Likewise.
6507         (EXT3_JOURNAL_DESCRIPTOR_BLOCK): Likewise.
6508         (EXT3_JOURNAL_COMMIT_BLOCK): Likewise.
6509         (EXT3_JOURNAL_SUPERBLOCK_V1): Likewise.
6510         (EXT3_JOURNAL_SUPERBLOCK_V2): Likewise.
6511         (EXT3_JOURNAL_REVOKE_BLOCK): Likewise.
6512         (EXT3_JOURNAL_FLAG_ESCAPE): Likewise.
6513         (EXT3_JOURNAL_FLAG_SAME_UUID): Likewise.
6514         (EXT3_JOURNAL_FLAG_DELETED): Likewise.
6515         (EXT3_JOURNAL_FLAG_LAST_TAG): Likewise.
6516         (grub_ext2_sblock): New members for journal support.
6517         (grub_ext3_journal_header): New structure.
6518         (grub_ext3_journal_revoke_header): Likewise.
6519         (grub_ext3_journal_block_tag): Likewise.
6520         (grub_ext3_journal_sblock): Likewise.
6521         (grub_fshelp_node): New members logfile and journal.
6522         (grub_ext2_read_block): Change block type to grub_disk_addr_t. Use
6523         grub_fshelp_map_block to get real block number.
6524         (grub_ext2_blockgroup): Use grub_fshelp_map_block to get real block
6525         number.
6526         (grub_ext2_read_inode): Likewise.
6527         (grub_ext3_get_journal): New function.
6528         (grub_read_inode): Initialize journal using grub_ext3_get_journal.
6529         (grub_ext2_close): Release memory used by journal.
6531         * fs/reiserfs.c (REISERFS_MAGIC_STRING): Changed to "ReIsEr".
6532         (REISERFS_MAGIC_DESC_BLOCK): New macro.
6533         (grub_reiserfs_transaction_header): Renamed to
6534         grub_reiserfs_description_block, replace field data with real_blocks.
6535         (grub_reiserfs_commit_block): New structure.
6536         (grub_reiserfs_data): New member journal.
6537         (grub_reiserfs_get_item): Use grub_fshelp_map_block to get real block
6538         number.
6539         (grub_reiserfs_read_symlink): Likewise.
6540         (grub_reiserfs_iterate_dir): Likewise.
6541         (grub_reiserfs_open): Likewise.
6542         (grub_reiserfs_read): Likewise.
6543         (grub_reiserfs_get_journal): New function.
6544         (grub_reiserfs_mount): Use "ReIsEr" as super block magic, as there are
6545         three varieties ReIsErFs, ReIsEr2Fs and ReIsEr3Fs. Initialize journal
6546         using grub_reiserfs_get_journal.
6547         (grub_reiserfs_close): Release memory used by journal.
6549         * fs/affs.c (grub_affs_read_block): Change block type to
6550         grub_disk_addr_t. Use grub_divmod64 to do 64-bit division.
6552         * fs/afs.c (grub_afs_read_block): Change block type to grub_disk_addr_t.
6554         * fs/hfsplus.c (grub_hfsplus_read_block): Likewise.
6556         * fs/ntfs.c (grub_ntfs_read_block): Likewise.
6558         * fs/udf.c (grub_udf_read_block): Change block type to
6559         grub_disk_addr_t. Use type cast to avoid warning.
6561         * fs/xfs.c (grub_xfs_read_block): Likewise.
6563 2008-05-16  Christian Franke  <franke@computer.org>
6565         * commands/cat.c (grub_cmd_cat): Remove non-ESC keys from keyboard queue
6566         to ensure that break with ESC will always work.
6567         * commands/sleep.c (grub_interruptible_millisleep): Likewise.
6568         Remove ESC from keyboard queue.
6570 2008-05-16  Christian Franke  <franke@computer.org>
6572         * util/biosdisk.c: [__CYGWIN__] Add includes.
6573         (grub_util_biosdisk_open): Use Linux code also for Cygwin.
6574         (get_os_disk): Move variable declarations to OS specific
6575         parts to avoid warning.
6576         [__GNU__] (get_os_disk): Fix /dev/sdXsN case.
6577         [__CYGWIN__] (get_os_disk): Add Cygwin /dev/sdXN device names.
6578         (grub_util_biosdisk_get_grub_dev): Use Linux code also for
6579         Cygwin.
6580         * util/getroot.c: [__CYGWIN__] Add includes.
6581         (strip_extra_slashes): Fix "/" case.
6582         [__CYGWIN__] (get_win32_path): New function.
6583         [__CYGWIN__] (grub_get_prefix): Add conversion to win32 path.
6584         [__CYGWIN__] (find_root_device): Disable.
6585         [__CYGWIN__] (get_bootsec_serial): New function.
6586         [__CYGWIN__] (find_cygwin_root_device): Likewise.
6587         [__linux__] (grub_guess_root_device): Add early returns to simplify
6588         structure.
6589         [__CYGWIN__] (grub_guess_root_device): Call find_cygwin_root_device.
6590         [__linux__] (grub_util_get_dev_abstraction): Enable LVM and RAID
6591         check for Linux only.
6593 2008-05-15  Bean  <bean123ch@gmail.com>
6595         * kern/i386/pc/startup.S (grub_console_getkey): Workaround for the
6596         keyboard hang problem in apple's intel mac.
6598 2008-05-09  Robert Millan  <rmh@aybabtu.com>
6600         * util/biosdisk.c (linux_find_partition, get_os_disk): Handle Virtio
6601         devices.
6602         * util/grub-mkdevicemap.c (get_virtio_disk_name)
6603         (make_device_map): Likewise.
6604         Reported by Aurelien Jarno <aurel32@debian.org>
6606 2008-05-07  Ian Campbell  <ijc@hellion.org.uk>
6608         * util/biosdisk.c (get_os_disk): Recognise xvd type disks.
6609         * util/grub-mkdevicemap.c (get_xvd_disk_name): New function.
6610         (make_device_map): Output entries for xvd type disks.
6612 2008-05-07  Robert Millan  <rmh@aybabtu.com>
6614         * util/biosdisk.c (linux_find_partition, get_os_disk): Handle CCISS
6615         devices.
6616         * util/grub-mkdevicemap.c (get_cciss_disk_name)
6617         (make_device_map): Likewise.
6618         Reported by Roland Dreier <rdreier@cisco.com>
6620 2008-05-07  Robert Millan  <rmh@aybabtu.com>
6622         * disk/lvm.c (grub_lvm_scan_device): Detect errors in an additional
6623         grub_strstr() call.  Correct a few mistakes in failure path handling.
6625 2008-05-06  Robert Millan  <rmh@aybabtu.com>
6627         * util/update-grub_lib.in (make_system_path_relative_to_its_root):
6628         Do not print a trailing slash (therefore, the root directory is an
6629         empty string).
6630         (convert_system_path_to_grub_path): Do not remove trailing slash
6631         from make_system_path_relative_to_its_root() output.
6633         * util/i386/pc/grub-install.in: Add trailing slash to output from
6634         make_system_path_relative_to_its_root().
6636 2008-05-06  Robert Millan  <rmh@aybabtu.com>
6638         * util/grub-fstest.c (grub_refresh): Call `fflush (stdout)'.  This
6639         ensures that output lines aren't intermangled with those sent to
6640         stderr (via grub_util_info()).
6641         * util/grub-probe.c (grub_refresh): Likewise.
6642         * util/i386/pc/grub-setup.c (grub_refresh): Likewise.
6644 2008-05-05  Christian Franke  <franke@computer.org>
6646         * util/grub-mkdevicemap.c (get_floppy_disk_name) [__CYGWIN__]:
6647         Add Cygwin device names.
6648         (get_ide_disk_name) [__CYGWIN__]: Likewise.
6649         (get_scsi_disk_name) [__CYGWIN__]: Likewise.
6650         (check_device): Return error instead of success on empty name.
6651         (make_device_map): Move label inside linux specific code to
6652         prevent compiler warning.
6654 2008-04-30  Robert Millan  <rmh@aybabtu.com>
6656         Based on patch from Fabian Greffrath <greffrath@leat.rub.de>
6657         * util/grub.d/10_linux.in: Add ${GRUB_CMDLINE_LINUX_DEFAULT} to the
6658         first boot option.
6659         * util/update-grub.in: Export GRUB_CMDLINE_LINUX_DEFAULT.
6661 2008-04-29  Robert Millan  <rmh@aybabtu.com>
6663         * docs/grub.cfg: New file (example GRUB configuration).
6665 2008-04-26  Robert Millan  <rmh@aybabtu.com>
6667         * DISTLIST: Sort (sort -u < DISTLIST | sponge DISTLIST).  Add
6668         `loader/i386/ieee1275/linux.c', `loader/i386/ieee1275/linux_normal.c'
6669         and `disk/ieee1275/nand.c'.
6671 2008-04-25  Bean  <bean123ch@gmail.com>
6673         * Makefile.in (RMKFILES): Add missing arch i386-ieee1275 and
6674         i386-linuxbios.
6676         * commands/hexdump.c (grub_cmd_hexdump): Support dumping of device,
6677         change the buffer size to 4096 for cdrom device.
6679         * conf/i386-ieee1275.rmk (pkglib_MODULES): Add _linux.mod, linux.mod
6680         and nand.mod.
6681         (_linux_mod_SOURCES): New variable.
6682         (_linux_mod_CFLAGS): Likewise.
6683         (_linux_mod_LDFLAGS): Likewise.
6684         (linux_mod_SOURCES): Likewise.
6685         (linux_mod_CFLAGS): Likewise.
6686         (linux_mod_LDFLAGS): Likewise.
6687         (nand_mod_SOURCES): Likewise.
6688         (nand_mod_CFLAGS): Likewise.
6689         (nand_mod_LDFLAGS): Likewise.
6691         * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Return
6692         GRUB_ERR_UNKNOWN_DEVICE instead of GRUB_ERR_BAD_DEVICE if no device
6693         type property. (nand device in olpc don't have this property)
6695         * include/grub/disk.h (grub_disk_dev_id): New macro
6696         GRUB_DISK_DEVICE_NAND_ID.
6698         * include/grub/i386/ieee1275/loader.h (grub_rescue_cmd_linux): New
6699         function prototype.
6700         (grub_rescue_cmd_initrd): Likewise.
6702         * include/grub/i386/linux.h (GRUB_LINUX_OFW_SIGNATURE): New macro.
6703         (linux_kernel_params): Add new member ofw_signature, ofw_num_items,
6704         ofw_cif_handler and ofw_idt, adjust padding number.
6706         * include/grub/i386/pc/memory.h (grub_upper_mem): Export it if
6707         GRUB_MACHINE_IEEE1275 is defined.
6709         * include/grub/ieee1275/ieee1275.h (grub_available_iterate):
6710         Use NESTED_FUNC_ATTR attribute on the hook parameter.
6712         * kern/powerpc/ieee1275/init.c (grub_claim_heap): Use NESTED_FUNC_ATTR
6713         on nested function heap_init.
6714         (grub_upper_mem): New variable for i386-ieee1275.
6715         (grub_get_extended_memory): New function for i386-ieee1275.
6716         (grub_machine_init): Call grub_get_extended_memory for i386-ieee1275.
6718         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Use
6719         NESTED_FUNC_ATTR on the hook parameter. Don't quit if no device type
6720         property.
6722         * loader/i386/ieee1275/linux.c: New file.
6724         * loader/i386/ieee1275/linux_normal.c: New file.
6726         * disk/ieee1275/nand.c: New file.
6728 2008-04-18  Thomas Schwinge  <tschwinge@gnu.org>
6730         * util/i386/pc/grub-mkrescue.in (grub_mkimage): Don't overwrite correct
6731         value.
6732         * util/powerpc/ieee1275/grub-mkrescue.in (grub_mkimage): Likewise.
6734 2008-04-18  Robert Millan  <rmh@aybabtu.com>
6736         Restructures early code path on ieee1275 to unify grub_main() as
6737         the first C function that is executed in every platform.
6739         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_init): New prototype.
6740         * kern/i386/ieee1275/startup.S (_start): Jump to grub_main() instead of
6741         cmain().
6742         * kern/powerpc/ieee1275/crt0.S (_start): Likewise.
6743         * kern/ieee1275/cmain.c (cmain): Rename to ...
6744         * kern/ieee1275/cmain.c (grub_ieee1275_init): ... this.
6745         * kern/ieee1275/init.c (grub_machine_init): Call grub_ieee1275_init()
6746         at the beginning.
6748 2008-04-18  Robert Millan  <rmh@aybabtu.com>
6750         * util/update-grub.in: Fix syntax error when setting
6751         `GRUB_PRELOAD_MODULES'.
6752         Reported by Stephane Chazelas <stephane@artesyncp.com>
6754 2008-04-17  Lubomir Kundrak  <lkundrak@redhat.com>
6756         * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): take only .text
6757         section into account, newer toolchains generate unique build ids
6758         * configure.ac: remove the test for --build-id=none acceptance,
6759         we want build ids to be preserved
6760         * genmk.rb: add -R .note.gnu.build-id to objcopy, so build id
6761         far from other sections don't cause the raw binary images grow
6762         size
6764 2008-04-15  Robert Millan  <rmh@aybabtu.com>
6766         * disk/lvm.c: Update copyright year.
6767         * kern/misc.c: Likewise.
6769 2008-04-14  Vesa Jaaskelainen  <chaac@nic.fi>
6771         * disk/lvm.c (grub_lvm_scan_device): Add forgotten failure path when
6772         there is no memory left for physical volume name.
6774 2008-04-14  Vesa Jaaskelainen  <chaac@nic.fi>
6776         * disk/lvm.c (grub_lvm_scan_device): Fix logical volume's physical
6777         volume name mapping to support bigger than 9 character names properly.
6779 2008-04-13  Robert Millan  <rmh@aybabtu.com>
6781         * disk/i386/pc/biosdisk.c (grub_biosdisk_rw): Fix CHS limit check,
6782         as per http://www.allensmith.net/Storage/HDDlimit/Int13h.htm
6784 2008-04-13  Christian Franke  <franke@computer.org>
6786         * util/i386/pc/grub-mkrescue.in: Add --emulation=floppy
6787         to create a floppy emulation boot CD when non emulation mode
6788         does not work.
6789         Enable Joliet CD filesystem extension.
6791 2008-04-13  Robert Millan  <rmh@aybabtu.com>
6793         * kern/misc.c (grub_strncat): Fix off-by-one error.
6794         Reported by Zhang Huan <zhanghuan@nrchpc.ac.cn>
6796         * kern/env.c (grub_env_context_close): Clear current context, not
6797         previous one.
6798         Patch from Zhang Huan <zhanghuan@nrchpc.ac.cn>
6800         * kern/misc.c (grub_strcat): Minor speed optimization (same code size).
6802 2008-04-13  Robert Millan  <rmh@aybabtu.com>
6804         Improve robustness when handling LVM.
6806         * disk/lvm.c (grub_lvm_getvalue): Return 0 when `*p' is NULL
6807         (and leave `*p' unmodified).
6808         (grub_lvm_iterate): Don't assume `vg->lvs != NULL' when iterating
6809         through it.
6810         (grub_lvm_memberlist): Don't assume `lv->vg->pvs != NULL' when
6811         iterating through it.
6812         (grub_lvm_open): Don't assume `vg->lvs != NULL' when iterating
6813         through it.
6814         (grub_lvm_scan_device): Check the return value (and fail gracefully
6815         when due) on each grub_lvm_getvalue() or grub_strstr() call.
6816         Don't assume `vg->pvs != NULL' when iterating through it.
6818 2008-04-13  Robert Millan  <rmh@aybabtu.com>
6820         * gendistlist.sh (EXTRA_DISTFILES): Add `genpartmaplist.sh'.
6821         * genmk.rb (partmap): New variable.
6822         (CLEANFILES, PARTMAPFILES): Add #{partmap}.
6823         (#{partmap}): New target rule.
6824         * genpartmaplist.sh: New file.
6825         * Makefile.in (pkglib_DATA): Add partmap.lst.
6826         (partmap.lst): New target rule.
6827         * util/i386/pc/grub-mkrescue.in: Generate grub.cfg that loads needed
6828         modules (including all partition maps), instead of preloading them.
6830 2007-04-13  Fabian Greffrath  <fabian.greffrath@web.de>
6832         * util/grub.d/30_os-prober.in: New script. Use `os-prober' and
6833         `linux-boot-prober' (if installed) to detect other operating
6834         systems which are installed on the computer and add them to
6835         the boot menu.
6836         * conf/common.rmk: Build and install 30_os-prober.
6838 2008-04-12  Robert Millan  <rmh@aybabtu.com>
6840         * kern/powerpc/ieee1275/init.c: Move from here ...
6841         * kern/ieee1275/init.c: ... to here.  Update all users.
6843         * kern/powerpc/ieee1275/cmain.c: Move from here ...
6844         * kern/ieee1275/cmain.c: ... to here.  Update all users.
6846         * kern/powerpc/ieee1275/openfw.c: Move from here ...
6847         * kern/ieee1275/openfw.c: ... to here.  Update all users.
6849         * loader/powerpc/ieee1275/multiboot2.c: Move from here ...
6850         * loader/ieee1275/multiboot2.c: ... to here.  Update all users.
6852 2008-04-10  Pavel Roskin  <proski@gnu.org>
6854         * configure.ac: Always use "_cv_" in cache variables for
6855         compatibility with Autoconf 2.62.
6857 2008-04-07  Robert Millan  <rmh@aybabtu.com>
6859         Revert grub/machine/init.h addition by Pavel (since it breaks on
6860         i386-ieee1275 and others):
6861         * util/i386/pc/misc.c: Remove grub/machine/init.h.
6862         * util/powerpc/ieee1275/misc.c: Likewise.
6864 2008-04-07  Robert Millan  <rmh@aybabtu.com>
6866         * util/grub-probe.c (probe): Improve error message.
6868 2008-04-07  Robert Millan  <rmh@aybabtu.com>
6870         * util/biosdisk.c (read_device_map): Skip devices that don't exist
6871         (this prevents the presence of a bogus entry from ruining the whole
6872         thing).
6874 2008-04-06  Pavel Roskin  <proski@gnu.org>
6876         * util/biosdisk.c: Include grub/util/biosdisk.h.
6877         * util/grub-fstest.c (execute_command): Make static.
6878         * util/grub-mkdevicemap.c (check_device): Likewise.
6879         * util/i386/pc/misc.c: Include grub/machine/init.h.
6880         * util/powerpc/ieee1275/misc.c: Likewise.
6881         * util/lvm.c: Include grub/util/lvm.h.
6882         * util/misc.c: Include grub/kernel.h, grub/misc.h and
6883         grub/cache.h.
6884         * util/raid.c: Include grub/util/raid.h.
6885         (grub_util_getdiskname): Make static.
6887         * util/grub-emu.c (main): Remove calls to grub_hostfs_init() and
6888         grub_hostfs_fini(), as they are called from grub_init_all() and
6889         grub_fini_all() respectively.  This fixes an infinite loop in
6890         grub-fstest due to double registration of hostfs.
6891         Reported by Christian Franke <Christian.Franke@t-online.de>
6893 2008-04-05  Pavel Roskin  <proski@gnu.org>
6895         * bus/pci.c (grub_pci_iterate): For multifunction devices, probe
6896         all 8 functions.  Otherwise, probe function 0 only.
6898 2008-04-04  Pavel Roskin  <proski@gnu.org>
6900         * commands/lspci.c (grub_lspci_iter): Print the bus number
6901         correctly.
6903         * commands/lspci.c (grub_pci_classes): Fix typos.
6904         (grub_lspci_iter): Don't print func twice.  Print vendor ID
6905         before device ID, as it's normally done.
6907         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
6908         Fix signedness warnings.
6909         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate):
6910         Likewise.
6911         * util/ieee1275/get_disk_name.c: Include config.h so that
6912         _GNU_SOURCE is defined and getline() is declared.  Mark an
6913         unused argument as such.  Fix a signedness warning.
6915 2008-04-02  Pavel Roskin  <proski@gnu.org>
6917         * genkernsyms.sh.in: Use more robust assignments for CC and
6918         srcdir.  Quote srcdir.
6919         * gensymlist.sh.in: Likewise.  Assert at the compile time that
6920         the symbol table is not empty.
6922         * disk/raid.c (grub_raid_memberlist): Fix a signedness warning.
6923         * fs/cpio.c (grub_cpio_read): Likewise.
6925 2008-04-01  Pavel Roskin  <proski@gnu.org>
6927         * disk/ata.c (grub_ata_open): Don't lose precision in disk->id.
6928         * disk/host.c (grub_host_open): Likewise.
6929         * disk/loopback.c (grub_loopback_open): Likewise.
6930         * disk/memdisk.c (grub_memdisk_open): Use a string pointer for
6931         disk->id as in disk/host.c, not a multi-character constant.
6933         * util/grub-fstest.c (cmd_cmp): Use fseeko(), not fseek().  The
6934         later is obsolete, potentially dangerous and sets a bad example.
6935         * util/i386/efi/grub-mkimage.c (make_header): Likewise.
6936         * util/misc.c (grub_util_get_image_size): Likewise.
6938         * disk/loopback.c (options): Improve help for "--partitions".
6940         * normal/arg.c (grub_arg_show_help): Fix spacing of the long
6941         options to align them with the short options, e.g. "echo -e".
6943 2008-03-31  Bean  <bean123ch@gmail.com>
6945         * video/reader/png.c (grub_png_data): New member is_16bit and
6946         image_data.
6947         (grub_png_decode_image_header): Detect 16 bit png image.
6948         (grub_png_convert_image): New function to convert 16 bit image to 8 bit.
6949         (grub_png_decode_png): Call grub_png_convert_image for 16 bit image.
6950         (grub_video_reader_png): Release memory occupied by image_data.
6952         * fs/ntfs.c (find_attr): Handle non-resident attribute list larger than
6953         4096 bytes.
6954         (grub_nfs_mount): Skip the test for sector per cluster.
6956         * include/grub/ntfs.h (MAX_SPC): Removed.
6958 2008-03-31  Bean  <bean123ch@gmail.com>
6960         * conf/common.rmk (pkgdata_MODULES): Add afs.mod.
6961         (grub_probe_SOURCES): Add fs/afs.c.
6962         (grub_fstest_SOURCES): Likewise.
6963         (afs_mod_SOURCES): New variable.
6964         (afs_mod_CFLAGS): Likewise.
6965         (afs_mod_LDFLAGS): Likewise.
6967         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/afs.c.
6968         (grub_emu_SOURCES): Likewise.
6970         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
6972         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6974         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
6976         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6978         * fs/afs.c: New file.
6980 2008-03-30  Pavel Roskin  <proski@gnu.org>
6982         * disk/host.c: Include grub/misc.h to fix a warning.
6983         * util/hostfs.c: Use GRUB_MOD_INIT and GRUB_MOD_FINI to fix
6984         warnings about implicit declarations.
6986         * fs/udf.c (grub_udf_mount): Fix warning about a shadowing a
6987         variable.
6988         * include/grub/i386/loader.h: Change declaration of
6989         grub_linux_boot() to match what grub_loader_set() expects.
6990         * util/getroot.c (grub_guess_root_device): Return const char* to
6991         fix a warning.
6992         * util/grub-probe.c (probe): Fix a warning about uninitialized
6993         abstraction_name variable.
6994         * util/i386/get_disk_name.c (grub_util_get_disk_name): Mark
6995         second argument as unused to fix a warning.
6997         * loader/i386/pc/multiboot2.c (grub_mb2_arch_elf64_hook): Add
6998         missing grub_error() call.
7000         * util/update-grub_lib.in: Define datarootdir, since Autoconf
7001         2.60 and newer uses it to define datadir.
7003         * commands/sleep.c: Fix warning about implicit declaration.
7004         * disk/memdisk.c: Likewise.
7005         * loader/aout.c: Likewise.
7006         * loader/i386/bsd_normal.c: Likewise.
7007         * util/grub-probe.c: Likewise.
7009         * commands/i386/cpuid.c (has_longmode): Make static.
7010         * disk/i386/pc/biosdisk.c (cd_drive): Likewise.
7011         * include/grub/i386/bsd.h (bios_memmap_t): Remove, it's unused.
7013         * kern/i386/pc/startup.S (real_to_prot): Use %cs prefix to load
7014         GDT.  This is more robust, as %ds can change.
7015         (grub_biosdisk_rw_int13_extensions): Don't clear %ds before
7016         calling real_to_prot().
7017         (grub_biosdisk_get_diskinfo_int13_extensions): Likewise.
7019 2008-03-28  Pavel Roskin  <proski@gnu.org>
7021         * kern/i386/pc/startup.S: Assert that uncompressed functions
7022         don't spill beyond GRUB_KERNEL_MACHINE_RAW_SIZE.
7023         * kern/i386/pc/lzo1x.S: Remove all .align directives in the
7024         code, as they push parts of the code (error handlers) beyond
7025         GRUB_KERNEL_MACHINE_RAW_SIZE.  Speed is not as important in this
7026         code as correctness and size.
7028 2008-03-28  Pavel Roskin  <proski@gnu.org>
7030         * kern/i386/pc/startup.S
7031         (grub_biosdisk_get_diskinfo_int13_extensions): When converting
7032         data block address to the real mode, keep offset minimal.  This
7033         works around a bug in AWARD BIOS on old Athlon systems, which
7034         makes CD detection hang.
7036 2008-03-26  Pavel Roskin  <proski@gnu.org>
7038         * normal/color.c (grub_parse_color_name_pair): Make `name' a
7039         const.
7040         * include/grub/normal.h: Add grub_parse_color_name_pair()
7041         declaration.
7043 2008-03-24  Bean  <bean123ch@gmail.com>
7045         * disk/i386/pc/biosdisk.c (cd_start): Removed.
7046         (cd_count): Removed.
7047         (cd_drive): New variable.
7048         (grub_biosdisk_get_drive): Don't check for (cdN) device.
7049         (grub_biosdisk_call_hook): Likewise.
7050         (grub_biosdisk_iterate): Change cdrom detection method.
7051         (grub_biosdisk_open): Replace cd_start with cd_drive.
7052         (GRUB_MOD_INIT): Use grub_biosdisk_get_cdinfo_int13_extension to
7053         detect cdrom device.
7055         * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_MACHINE_CDROM_START):
7056         Removed.
7057         (GRUB_BIOSDISK_MACHINE_CDROM_END): Removed.
7058         (GRUB_BIOSDISK_CDTYPE_NO_EMUL): New macro.
7059         (GRUB_BIOSDISK_CDTYPE_1_2_M): Likewise.
7060         (GRUB_BIOSDISK_CDTYPE_1_44_M): Likewise.
7061         (GRUB_BIOSDISK_CDTYPE_2_88_M): Likewise.
7062         (GRUB_BIOSDISK_CDTYPE_HARDDISK): Likewise.
7063         (GRUB_BIOSDISK_CDTYPE_MASK): Likewise.
7064         (grub_biosdisk_cdrp): New structure.
7065         (grub_biosdisk_get_cdinfo_int13_extensions): New function.
7067         * include/grub/i386/pc/kernel.h (grub_boot_drive): Export this variable.
7069         * kern/i386/pc/init.c (make_install_device): Don't use (cdN) as root
7070         device.
7072         * kern/i386/pc/startup.S (grub_biosdisk_get_cdinfo_int13_extensions):
7073         New function.
7075 2008-03-20  Robert Millan  <rmh@aybabtu.com>
7077         Remove 2 TiB limit in ata.mod.
7078         * disk/ata.c (grub_ata_device): Promote `size' to grub_uint64_t.
7079         (grub_ata_dumpinfo): Print sector count with 0x%llx.
7080         (grub_ata_identify): Interpret `&info16[100]' as a pointer to
7081         grub_uint64_t instead of grub_uint32_t.
7083 2008-03-05  Bean  <bean123ch@gmail.com>
7085         * loader/i386/pc/multiboot.c (grub_multiboot_get_bootdev): New function.
7086         (grub_multiboot): Set boot device.
7088         * boot/i386/pc/lnxboot.S (real_code_2): Set %dh to 0xFF.
7090 2008-03-02  Bean  <bean123ch@gmail.com>
7092         * fs/reiserfs.c (grub_reiserfs_read_symlink): Add 0 at the end of
7093         symlink_buffer.
7095 2008-03-01  Yoshinori K. Okuji  <okuji@enbug.org>
7097         * DISTLIST: Added docs/fdl.texi, docs/grub.texi, docs/mdate-sh and
7098         texinfo.tex.
7100         * docs/grub.texi: New file. Copied from GRUB Legacy, and slightly
7101         modified.
7103         * docs/fdl.texi: New file.
7105         * docs/mdate-sh: New file. Copied from gnulib.
7106         * docs/texinfo.tex: Likewise.
7108         * config.guess: Updated from gnulib.
7109         * install-sh: Likewise.
7111 2008-02-28  Robert Millan  <rmh@aybabtu.com>
7113         * conf/i386-linuxbios.rmk (pkglib_MODULES): Add aout.mod.
7114         (aout_mod_SOURCES): New variable.
7115         (aout_mod_CFLAGS): Likewise.
7116         (aout_mod_LDFLAGS): Likewise.
7118         * conf/i386-ieee1275.rmk: Likewise.
7120 2008-02-28  Robert Millan  <rmh@aybabtu.com>
7122         * util/update-grub.in: Reorganise terminal validity check.  Accept
7123         `ieee1275:console' (OLPC) and `*:gfxterm' as valid too.
7124         Based on suggestion by Franklin PIAT.
7126 2008-02-28  Fabian Greffrath  <greffrath@leat.rub.de>
7128         * include/grub/util/getroot.h (grub_util_check_block_device): Export new
7129         function.
7130         * util/getroot.c (grub_util_check_block_device): New function that
7131         returns the given argument if it is a block device and returns NULL else.
7132         * util/grub-probe.c (argument_is_device): New variable.
7133         (probe): Promote device_name from a variable to an argument. Receive
7134         device_name from grub_util_check_block_device() if path is NULL and from
7135         grub_guess_root_device() else. Do not free() device_name anymore.
7136         (options): Introduce new parameter '-d, --device'.
7137         (main): Add description of the new parameter to the help screen.
7138         Rename path variable to argument. Set argument_is_device if the '-d'
7139         option is given. Pass argument to probe() depending on
7140         argument_is_device.
7142 2008-02-24  Bean  <bean123ch@gmail.com>
7144         * fs/iso9660.c (GRUB_ISO9660_VOLDESC_BOOT): New macro.
7145         (GRUB_ISO9660_VOLDESC_PRIMARY): Likewise.
7146         (GRUB_ISO9660_VOLDESC_SUPP): Likewise.
7147         (GRUB_ISO9660_VOLDESC_PART): Likewise.
7148         (GRUB_ISO9660_VOLDESC_END): Likewise.
7149         (grub_iso9660_primary_voldesc): New member escape.
7150         (grub_iso9660_data): New member joliet.
7151         (grub_iso9660_convert_string): New function.
7152         (grub_iso9660_mount): Detect joliet extension.
7153         (grub_iso9660_iterate_dir): Convert filename when joliet is detected.
7154         (grub_iso9660_iso9660_label): Likewise.
7156         * conf/common.rmk (pkgdata_MODULES): Add udf.mod.
7157         (grub_setup_SOURCES): Add fs/udf.c.
7158         (grub_fstest_SOURCES): Likewise.
7159         (udf_mod_SOURCES): New variable.
7160         (udf_mod_CFLAGS): Likewise.
7161         (udf_mod_LDFLAGS): Likewise.
7163         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/udf.c.
7164         (grub_emu_SOURCES): Likewise.
7166         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
7168         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7170         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
7172         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7174         * fs/udf.c: New file.
7176 2008-02-24  Robert Millan  <rmh@aybabtu.com>
7178         * conf/i386-efi.rmk (normal/function.c_DEPENDENCIES)
7179         (normal/lexer.c_DEPENDENCIES): New variables.
7180         * conf/i386-ieee1275.rmk (normal/function.c_DEPENDENCIES)
7181         (normal/lexer.c_DEPENDENCIES): Likewise.
7182         * conf/i386-linuxbios.rmk (normal/function.c_DEPENDENCIES)
7183         (normal/lexer.c_DEPENDENCIES): Likewise.
7184         * conf/i386-pc.rmk (normal/function.c_DEPENDENCIES)
7185         (normal/lexer.c_DEPENDENCIES): Likewise.
7186         * conf/powerpc-ieee1275.rmk (normal/function.c_DEPENDENCIES)
7187         (normal/lexer.c_DEPENDENCIES): Likewise.
7188         * conf/sparc64-ieee1275.rmk (normal/function.c_DEPENDENCIES)
7189         (normal/lexer.c_DEPENDENCIES): Likewise.
7191 2008-02-23  Robert Millan  <rmh@aybabtu.com>
7193         * partmap/gpt.c (grub_gpt_magic): Add `0x' qualifier to each member,
7194         since they were intended to be in hex.  This didn't break previously
7195         because of a bug in gpt_partition_map_iterate() (see below).
7197         (gpt_partition_map_iterate): Replace `grub_memcmp' with `! grub_memcmp'
7198         when checking the validity of GPT header.
7199         Remove `partno', since it always provides the same information as `i'.
7201 2008-02-21  Yoshinori K. Okuji  <okuji@enbug.org>
7203         * include/grub/efi/time.h: Fix a wrong comment.
7205 2008-02-19  Pavel Roskin  <proski@gnu.org>
7207         * kern/rescue.c (grub_enter_rescue_mode): Improve initial
7208         message.
7210 2008-02-19  Bean  <bean123ch@gmail.com>
7212         * conf/i386-pc.rmk (pkglib_MODULES): Add aout.mod _bsd.mod and bsd.mod.
7213         (aout_mod_SOURCES): New variable.
7214         (aout_mod_CFLAGS): Likewise.
7215         (aout_mod_LDFLAGS): Likewise.
7216         (_bsd_mod_SOURCES): New variable.
7217         (_bsd_mod_CFLAGS): Likewise.
7218         (_bsd_mod_LDFLAGS): Likewise.
7219         (bsd_mod_SOURCES): New variable.
7220         (bsd_mod_CFLAGS): Likewise.
7221         (bsd_mod_LDFLAGS): Likewise.
7223         * include/grub/aout.h: New file.
7225         * include/grub/i386/loader.h (grub_unix_real_boot): New function.
7227         * include/grub/i386/bsd.h: New file.
7229         * include/grub/i386/pc/init.h (grub_get_mmap_entry): Use EXPORT_FUNC
7230         to make it public.
7232         * kern/elf.c (grub_elf32_load): Get the physical address after the hook
7233         function is called, so that it's possible to change it inside the hook.
7234         (grub_elf64_load): Likewise.
7235         (grub_elf_file): Don't close the file if elf header is not found.
7236         (grub_elf_close): Close the file if grub_elf_file fails (The new
7237         grub_elf_file won't close it).
7238         (grub_elf32_size): Use NESTED_FUNC_ATTR for nested function calcsize.
7239         (grub_elf64_size): Likewise.
7241         * kern/i386/loader.S (grub_unix_real_boot): New function.
7243         * loader/aout.c: New file.
7245         * loader/i386/bsd.c: New file.
7247         * loader/i386/bsd_normal.c: New file.
7249         * loader/i386/pc/multiboot.c (grub_multiboot): Handle a.out format.
7251         * loader/multiboot2.c (grub_multiboot2): Reset grub_errno so that it
7252         can test other formats.
7254 2008-02-19  Robert Millan  <rmh@aybabtu.com>
7256         * partmap/gpt.c: Include `<grub/gpt_partition.h>'.
7257         (grub_gpt_partition_type_empty): Redefine with macro from
7258         `<grub/gpt_partition.h>'.
7259         (gpt_partition_map_iterate): Adjust partition type comparison.
7261         Export `entry' as partmap-specific `part.data' struct.
7262         (grub_gpt_header, grub_gpt_partentry): Move from here ...
7264         * include/grub/gpt_partition.h (grub_gpt_header)
7265         (grub_gpt_partentry): ... to here (new file).
7267         * util/i386/pc/grub-setup.c: Include `<grub/gpt_partition.h>'.
7269         (grub_gpt_partition_type_bios_boot): New const variable, defined
7270         with macro from `<grub/gpt_partition.h>'.
7272         (setup): Replace `first_start' with `embed_region', which keeps
7273         track of the embed region (and is partmap-agnostic).
7275         Replace find_first_partition_start() with find_usable_region(),
7276         which finds a usable region for embedding using partmap-specific
7277         knowledge (supports PC/MSDOS and GPT).
7279         Fix all assumptions that the embed region start at sector 1, using
7280         `embed_region.start' from now on.  Similarly, use `embed_region.end'
7281         rather than `first_start' to calculate available size.
7283         In grub_util_info() message, replace "into after the MBR" with an
7284         indication of the specific sector our embed region starts at.
7286 2008-02-19  Robert Millan  <rmh@aybabtu.com>
7288         * DISTLIST: Replace `commands/ieee1275/halt.c' and
7289         `commands/ieee1275/reboot.c' with `commands/halt.c' and
7290         `commands/reboot.c'.
7291         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
7292         (halt_mod_SOURCES): Likewise.
7293         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
7294         (halt_mod_SOURCES): Likewise.
7296 2008-02-17  Christian Franke  <franke@computer.org>
7298         * commands/cat.c (grub_cmd_cat): Add break on GRUB_TERM_ESC key.
7300 2008-02-17  Robert Millan  <rmh@aybabtu.com>
7302         * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
7303         set `first_start' to 0 for non-PC/MSDOS partition maps.
7305 2008-02-16  Robert Millan  <rmh@aybabtu.com>
7307         * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
7308         do not assume partition map is PC/MSDOS before performing checks that
7309         are specific to that layout.
7311 2008-02-13  Robert Millan  <rmh@aybabtu.com>
7313         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Remove
7314         `commands/i386/pc/halt.c' and `commands/i386/pc/reboot.c'.
7315         * kern/i386/linuxbios/init.c (grub_halt, grub_reboot): Remove stubs.
7317 2008-02-13  Yoshinori K. Okuji  <okuji@enbug.org>
7319         * configure.ac: Only a cosmetic change on the handling of
7320         -fno-stack-protector.
7322 2008-02-12  Alexandre Boeglin  <alex@boeglin.org>
7324         * conf/i386-efi.rmk (grub_emu_SOURCES): Replace
7325         commands/i386/pc/halt.c and reboot.c by commands/halt.c and
7326         reboot.c.
7327         (grub_install_SOURCES): Add halt.mod and reboot.mod.
7328         (halt_mod_SOURCES): New variable.
7329         (halt_mod_CFLAGS): Likewise.
7330         (halt_mod_LDFLAGS): Likewise.
7331         (reboot_mod_SOURCES): Likewise.
7332         (reboot_mod_CFLAGS): Likewise.
7333         (reboot_mod_LDFLAGS): Likewise.
7335         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace
7336         commands/ieee1275/halt.c and reboot.c by commands/halt.c and
7337         reboot.c.
7338         (halt_mod_SOURCES): Likewise.
7339         (reboot_mod_SOURCES): Likewise.
7341         * conf/i386-pc.rmk (grub_emu_SOURCES): Replace
7342         commands/i386/pc/reboot.c by commands/reboot.c.
7343         (reboot_mod_SOURCES): Likewise.
7345         * commands/i386/pc/reboot.c: merge this file ...
7347         * commands/ieee1275/reboot.c: ... and this file ...
7349         * commands/reboot.c: ... to this file.
7350         Add some precompiler directive to include the correct header for
7351         each machine.
7353         * commands/ieee1275/halt.c: move this file ...
7355         * commands/halt.c: ... to here.
7356         Add some precompiler directive to include the correct header for
7357         each machine.
7359         * include/grub/efi/efi.h (grub_reboot): New function declaration.
7360         (grub_halt): Likewise.
7362         * kern/efi/efi.c (grub_reboot): New function.
7363         (grub_halt): Likewise.
7365 2008-02-12  Robert Millan  <rmh@aybabtu.com>
7367         * util/getroot.c (grub_guess_root_device): Inspect /dev/evms before
7368         /dev (like it is done for /dev/mapper).  This doesn't provide support
7369         for EVMS, but at least it is now easy to identify the problem when it
7370         arises.
7372 2008-02-11  Robert Millan  <rmh@aybabtu.com>
7374         * util/biosdisk.c (grub_util_biosdisk_open, linux_find_partition)
7375         (grub_util_biosdisk_get_grub_dev): Check open() exit status by
7376         comparing it with -1, not 0.
7378 2008-02-10  Robert Millan  <rmh@aybabtu.com>
7380         * conf/i386-efi.rmk (grub_emu_SOURCES): Add `disk/raid.c' and
7381         `disk/lvm.c'.
7382         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7383         * conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
7385         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Move `disk/raid.c' and
7386         `disk/lvm.c' to the end of the list.
7387         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
7388         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
7390 2008-02-10  Robert Millan  <rmh@aybabtu.com>
7392         * kern/main.c (grub_load_normal_mode): Do not reset `grub_errno'.  Call
7393         grub_print_error() instead.  This will let user know why we're entering
7394         rescue mode.
7395         Based on suggestions from Sam Morris.
7397 2008-02-10  Alexandre Boeglin  <alex@boeglin.org>
7399         * normal/arg.c (grub_arg_parse): If one of the args is "--", call add_arg()
7400         on remaining N args, instead of "--" arg N times.
7402 2008-02-09  Vesa Jaaskelainen  <chaac@nic.fi>
7404         * font/manager.c (unknown_glyph): Added variable for unknown glyph.
7405         (fill_with_default_glyph): Changed to use unknown_glyph for fill
7406         pattern for unknown glyphs.
7408 2008-02-09  Robert Millan  <rmh@aybabtu.com>
7410         * configure.ac: Probe for `help2man'.
7411         * Makefile.in (builddir): New variable.
7412         (HELP2MAN): Likewise.  Set to `true' when @HELP2MAN@ doesn't provide it,
7413         or otherwise add a few flags/options to it.
7414         (install-local): For every executable utility or script that is
7415         installed, invoke $(HELP2MAN) to install a manpage based on --help
7416         output.
7418         * util/i386/pc/grub-install.in: Move down `update-grub_lib' sourcing, so
7419         that it doesn't prevent --help from working in build tree.
7421         * util/i386/pc/grub-mkrescue.in (usage): Replace `grub-devel@gnu.org'
7422         with `bug-grub@gnu.org'.
7423         * util/powerpc/ieee1275/grub-mkrescue.in (usage): Likewise.
7424         * util/update-grub.in (usage): New function.
7425         Implement proper argument check, with support for --help and --version
7426         (as well as existing -y).
7428 2008-02-09  Christian Franke  <franke@computer.org>
7430         * commands/cat.c (grub_cmd_cat): Print '\r' as hex to
7431         avoid overwriting previous output.
7432         * kern/rescue.c (grub_rescue_cmd_cat): Likewise.
7434 2008-02-09  Robert Millan  <rmh@aybabtu.com>
7436         * normal/menu.c (run_menu): If timeout is set to zero, don't bother
7437         drawing the menu.
7439 2008-02-09  Robert Millan  <rmh@aybabtu.com>
7441         * commands/sleep.c: New file.
7442         * conf/common.rmk (pkglib_MODULES): Add `commands/sleep.c'.
7443         (sleep_mod_SOURCES): New variable.
7444         (sleep_mod_CFLAGS): Likewise.
7445         (sleep_mod_LDFLAGS): Likewise.
7447 2008-02-09  Robert Millan  <rmh@aybabtu.com>
7449         * disk/raid.c (grub_raid_scan_device): Add a pair of sanity checks for
7450         situations in which we can deduce the RAID size and the superblock
7451         doesn't match it.
7453 2008-02-09  Robert Millan  <rmh@aybabtu.com>
7455         * disk/lvm.c [GRUB_UTIL] (grub_lvm_memberlist): New function.  Construct
7456         and return a grub_diskmemberlist_t composed of LVM physical volumes.
7457         [GRUB_UTIL] (grub_lvm_dev): Add `memberlist' member.
7459         * disk/raid.c [GRUB_UTIL] (grub_raid_memberlist): New function.  Construct
7460         and return a grub_diskmemberlist_t composed of physical array members.
7461         [GRUB_UTIL] (grub_raid_dev): Add `memberlist' member.
7463         * include/grub/disk.h [GRUB_UTIL] (grub_disk_memberlist): New struct
7464         prototype.
7465         [GRUB_UTIL] (struct grub_disk_dev): Add `memberlist' function pointer.
7466         [GRUB_UTIL] (struct grub_disk_memberlist): New struct declaration.
7467         [GRUB_UTIL] (grub_disk_memberlist_t): New typedef.
7469         * util/grub-probe.c (probe): Move partmap probing code from here ...
7470         (probe_partmap): ... to here.
7471         (probe): Use probe_partmap() once for the disk we're probing, and
7472         additionally, when such disk contains a memberlist() struct member,
7473         once for each disk that is contained in the structure returned by
7474         memberlist().
7476 2008-02-09  Robert Millan  <rmh@aybabtu.com>
7478         * util/grub-probe.c (main): When `verbosity > 1', set `debug'
7479         environment variable to 'all' in order to obtain debug output from
7480         non-util/ code.
7481         * util/i386/pc/grub-setup.c (main): Likewise.
7483 2008-02-08  Robert Millan  <rmh@aybabtu.com>
7485         * disk/raid.c (grub_raid_scan_device): Check for
7486         `array->device[sb.this_disk.number]' rather than for
7487         `array->device[sb.this_disk.number]->name', since the latter is not
7488         guaranteed to be accessible.
7490 2008-02-08  Robert Millan  <rmh@aybabtu.com>
7492         * disk/raid.c: Update copyright.
7493         * fs/cpio.c: Likewise.
7494         * include/grub/raid.h: Likewise.
7495         * loader/i386/pc/multiboot.c: Likewise.
7496         * util/hostfs.c: Likewise.
7498 2008-02-08  Robert Millan  <rmh@aybabtu.com>
7500         * include/grub/raid.h (struct grub_raid_array): Change type of `device'
7501         to a grub_disk_t array.
7502         * disk/raid.c (grub_raid_read): Replace `device[x].disk' accesses with
7503         `device[x]'.
7504         (grub_raid_scan_device): Replace `device[x].name' accesses with
7505         `device[x]->name'.  Simplify initialization of `array->device[x]'.
7507 2008-02-08  Robert Millan  <rmh@aybabtu.com>
7509         * disk/raid.c (grub_raid_open, grub_raid_scan_device): Add a few
7510         grub_dprintf() calls.
7511         * kern/disk.c (grub_disk_read): Include grub_errmsg in out of range
7512         error message.
7514 2008-02-07  Christian Franke  <franke@computer.org>
7516         * util/hostfs.c (grub_hostfs_open): Use fseeko and ftello
7517         instead of fseek and ftell to support large files.
7518         (grub_hostfs_read): Likewise.
7520 2008-02-07  Robert Millan  <rmh@aybabtu.com>
7522         Patch from Jeroen Dekkers.
7523         * disk/raid.c (grub_raid_scan_device): Reset `grub_errno' on disk
7524         failure, since successfully reading all array members might not be
7525         required.
7527 2008-02-06  Robert Millan  <rmh@aybabtu.com>
7529         * util/grub-probe.c (probe): Simplify partmap probing (with the
7530         assumption that the first word up to the underscore equals to
7531         the module name).
7533 2008-02-06  Christian Franke  <franke@computer.org>
7535         * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_NONE
7536         (and set *ofs = 0) instead of GRUB_ERR_FILE_NOT_FOUND on
7537         last block of a cpio or tar stream.
7538         Check for "TRAILER!!!" instead of any empty data
7539         block to detect last block of a cpio stream.
7540         (grub_cpio_dir): Fix constness of variable np.
7541         (grub_cpio_open): Return GRUB_ERR_FILE_NOT_FOUND if
7542         cpio or tar trailer is detected.  This fixes a crash
7543         on open of a non existing file.
7545 2008-02-05  Bean  <bean123ch@gmail.com>
7547         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Get physical
7548         address of entry.
7549         (grub_multiboot_load_elf64): Likewise.
7550         (grub_multiboot): Initialize mbi structure.
7552         * util/grub-fstest.c: Don't include unused header file script.h.
7554         * conf/common.rmk (grub-fstest.c_DEPENDENCIES): Move to the beginning
7555         of file.
7556         (grub_fstest_SOURCES): Likewise.
7558 2008-02-05  Robert Millan  <rmh@aybabtu.com>
7560         * include/grub/term.h (GRUB_TERM_LEFT, GRUB_TERM_RIGHT)
7561         (GRUB_TERM_UP, GRUB_TERM_DOWN, GRUB_TERM_HOME, GRUB_TERM_END)
7562         (GRUB_TERM_DC, GRUB_TERM_PPAGE, GRUB_TERM_NPAGE, GRUB_TERM_ESC)
7563         (GRUB_TERM_TAB, GRUB_TERM_BACKSPACE): New macros.
7565         * kern/i386/pc/startup.S: Include `<grub/term.h>'.
7566         (translation_table): Replace hardcoded values with macros
7567         provided by `<grub/term.h>'.
7569         * term/i386/pc/at_keyboard.c: Include `<grub/term.h>'.
7570         (keyboard_map): Correct/add a few values, with macros provided
7571         by `<grub/term.h>'.
7572         (keyboard_map_shift): Zero values that don't differ from their
7573         `keyboard_map' equivalents.
7574         (grub_console_checkkey): Optimize KEYBOARD_STATUS_CAPS_LOCK toggling.
7575         Discard the second scan code that is always sent by Caps lock.
7576         Only use `keyboard_map_shift' when it provides a non-zero value,
7577         otherwise fallback to `keyboard_map'.
7579 2008-02-04  Bean  <bean123ch@gmail.com>
7581         * Makefile.in (enable_grub_fstest): New variable.
7583         * conf/common.rmk (grub_fstest_init.lst): New rule.
7584         (grub_fstest_init.h): Likewise.
7585         (grub_fstest_init.c): Likewise.
7586         (util/grub-fstest.c_DEPENDENCIES): New variable.
7587         (grub_fstest_SOURCES): Likewise.
7589         * configure.ac (enable_grub_fstest): Check for --enable-grub-fstest.
7591         * util/grub-fstest.c: New file.
7593 2008-02-03  Yoshinori K. Okuji  <okuji@enbug.org>
7595         Make grub-setup handle a separate root device.
7597         * util/i386/pc/grub-setup.c (setup): Always open the root device,
7598         so that the root device can be compared with the destination
7599         device.
7600         When embedding the core image, if the root and destination devices
7601         are different, set ROOT_DRIVE to ROOT_DEV->DISK->ID. Otherwise, to
7602         0xFF.
7603         When not embedding, set ROOT_DRIVE to 0xFF.
7605 2008-02-03  Yoshinori K. Okuji  <okuji@enbug.org>
7607         Add support for having a grub directory in a different drive. This
7608         is still only the data handling part.
7610         * kern/i386/pc/startup.S (multiboot_trampoline): Set %dh to 0xFF.
7611         (codestart): Save %dh in GRUB_ROOT_DRIVE.
7612         (grub_root_drive): New variable.
7614         * kern/i386/pc/init.c (make_install_device): Use GRUB_ROOT_DRIVE
7615         instead of GRUB_BOOT_DRIVE to construct a device name. Set
7616         GRUB_ROOT_DRIVE to GRUB_BOOT_DRIVE if it is 0xFF, otherwise use it
7617         as it was.
7619         * include/grub/i386/pc/kernel.h (grub_root_drive): New prototype.
7621         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_ROOT_DRIVE): New
7622         macro.
7623         (GRUB_BOOT_MACHINE_DRIVE_CHECK): Set to 0x4f.
7625         * boot/i386/pc/pxeboot.S (_start): Set %dh to 0xFF. For now, this
7626         is bogus, because PXE booting does not specify any drive
7627         correctly.
7629         * boot/i386/pc/lnxboot.S (reg_edx): Set the second byte to 0xFF. I
7630         am not sure if this is really correct.
7632         * boot/i386/pc/cdboot.S: Set %dh to 0xFF, because the root drive
7633         is always identical to the boot drive when booting from a CD.
7635         * boot/i386/pc/boot.S (MOV_MEM_TO_AL): Removed. Not needed any
7636         longer.
7637         (root_drive): New variable.
7638         (real_start): Unconditionally set %dh to ROOT_DRIVE.
7639         (setup_sectors): Push %dx right after popping it, because %dh will
7640         be modified later.
7641         (copy_buffer): Restore %dx.
7643 2008-02-03  Robert Millan  <rmh@aybabtu.com>
7645         * util/i386/pc/grub-mkrescue.in: Rewrite most of image generation to
7646         use `cdboot.img' for cdrom images.
7648 2008-02-03  Robert Millan  <rmh@aybabtu.com>
7650         * util/grub.d/00_header.in: Issue scripting commands for GRUB to
7651         only setup gfxterm when `font' command has succeeded.
7653 2008-02-03  Robert Millan  <rmh@aybabtu.com>
7655         * loader/multiboot_loader.c [GRUB_MACHINE_LINUXBIOS]
7656         (grub_rescue_cmd_multiboot_loader)
7657         (grub_rescue_cmd_module_loader): Enable multiboot1 calls.
7659 2008-02-03  Pavel Roskin  <proski@gnu.org>
7661         * kern/i386/pc/startup.S (grub_chainloader_real_boot): Pop
7662         %edx and %esi from stack only after grub_gate_a20() is called.
7663         grub_gate_a20() clobbers %edx.
7665 2008-02-03  Yoshinori K. Okuji  <okuji@enbug.org>
7667         * configure.ac (AC_INIT): Bumped to 1.96.
7669         * DISTLIST: Added boot/i386/pc/cdboot.S, bus/pci.c,
7670         commands/lspci.c,disk/memdisk.c, include/grub/pci.h,
7671         include/grub/i386/pc/pci.h, video/readers/jpeg.c, and
7672         video/readers/png.c.
7674 2008-02-03  Bean  <bean123ch@gmail.com>
7676         * conf/i386-pc.rmk (pkglib_IMAGES): Add cdboot.img.
7677         (cdboot_img_SOURCES): New variable.
7678         (cdboot_img_ASFLAGS): New variable.
7679         (cdboot_img_LDFLAGS): New variable.
7681         * boot/i386/pc/cdboot.S: New file.
7683         * disk/i386/pc/biosdisk.c (cd_start): New variable.
7684         (cd_count): Likewise.
7685         (grub_biosdisk_get_drive): Add support for cd device.
7686         (grub_biosdisk_call_hook): Likewise.
7687         (grub_biosdisk_iterate): Likewise.
7688         (grub_biosdisk_open): Likewise.
7689         (GRUB_BIOSDISK_CDROM_RETRY_COUNT): New macro.
7690         (grub_biosdisk_rw): Support reading from cd device.
7691         (GRUB_MOD_INIT): Iterate cd devices.
7693         * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_FLAG_CDROM): New macro.
7694         (GRUB_BIOSDISK_MACHINE_CDROM_START): Likewise.
7695         (GRUB_BIOSDISK_MACHINE_CDROM_END): Likewise.
7697         * kern/i386/pc/init.c (make_install_device): Check for cd device.
7699 2008-02-02  Robert Millan  <rmh@aybabtu.com>
7701         * commands/read.c: New file.
7702         * conf/common.rmk (pkglib_MODULES): Add `commands/read.c'.
7703         (read_mod_SOURCES): New variable.
7704         (read_mod_CFLAGS): Likewise.
7705         (read_mod_LDFLAGS): Likewise.
7707 2008-02-02  Robert Millan  <rmh@aybabtu.com>
7709         * normal/main.c (grub_normal_execute): Check for `menu->size' when
7710         determining whether menu has to be displayed.
7712 2008-02-02  Marco Gerards  <marco@gnu.org>
7714         * bus/pci.c: New file.
7716         * include/grub/pci.h: Likewise.
7718         * include/grub/i386/pc/pci.h: Likewise.
7720         * commands/lspci.c: Likewise.
7722         * conf/i386-pc.rmk (pkglib_MODULES): Add `pci.mod' and
7723         `lspci.mod'.
7724         (pci_mod_SOURCES): New variable.
7725         (pci_mod_CFLAGS): Likewise.
7726         (pci_mod_LDFLAGS): Likewise.
7727         (lspci_mod_SOURCES): Likewise.
7728         (lspci_mod_CFLAGS): Likewise.
7729         (lspci_mod_LDFLAGS): Likewise.
7731 2008-02-02  Bean  <bean123ch@gmail.com>
7733         * fs/ufs.c (INODE_BLKSZ): Fix incorrect value.
7734         (grub_ufs_get_file_block): Fix indirect block calculation problem.
7736         * fs/xfs.c (grub_xfs_sblock): New member log2_dirblk.
7737         (grub_xfs_btree_node): New structure.
7738         (grub_xfs_btree_root): New structure.
7739         (grub_xfs_inode): New members nblocks, extsize, nextents and btree.
7740         (GRUB_XFS_EXTENT_OFFSET): Use exts instead of inode->data.extents.
7741         (GRUB_XFS_EXTENT_BLOCK): Likewise.
7742         (GRUB_XFS_EXTENT_SIZE): Likewise.
7743         (grub_xfs_read_block): Support btree format type.
7744         (grub_xfs_iterate_dir): Use NESTED_FUNC_ATTR in call_hook.
7745         Use directory block as basic unit.
7747         * fs/fshelp.c (grub_fshelp_read_file): Bug fix for sparse block.
7749         * aclocal.m4 (grub_i386_CHECK_REGPARM_BUG): Define NESTED_FUNC_ATTR as
7750         __attribute__ ((__regparm__ (1))).
7752 2008-02-01  Robert Millan  <rmh@aybabtu.com>
7754         Correct a mistake in previous commit.
7756         * conf/i386-pc.rmk (normal/execute.c_DEPENDENCIES): Move to the
7757         top.
7758         (normal/command.c_DEPENDENCIES): New variable.
7760 2008-02-01  Robert Millan  <rmh@aybabtu.com>
7762         * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Move to the
7763         top.
7764         (normal/command.c_DEPENDENCIES): New variable.
7765         (grub-emu_DEPENDENCIES, normal_mod_DEPENDENCIES): Remove variables.
7766         * conf/i386-ieee1275.rmk: Likewise.
7767         * conf/i386-linuxbios.rmk: Likewise.
7768         * conf/i386-pc.rmk: Likewise.
7769         * conf/sparc64-ieee1275.rmk: Likewise.
7770         * conf/powerpc-ieee1275.rmk: Likewise.
7771         (grub_emu_SOURCES): Add `fs/fshelp.c'.
7773         * genmk.rb: Add `$(#{src}_DEPENDENCIES)' in targets that require it.
7775 2008-02-01  Robert Millan  <rmh@aybabtu.com>
7777         * kern/disk.c (grub_disk_read, grub_disk_write): Add grub_dprintf()
7778         call at beginning of function.
7780 2008-01-31  Pavel Roskin  <proski@gnu.org>
7782         * util/powerpc/ieee1275/grub-mkrescue.in: New file.
7783         * conf/powerpc-ieee1275.rmk (bin_SCRIPTS): New variable.
7784         (grub_mkrescue_SOURCES): Likewise.
7785         * DISTLIST: Add util/powerpc/ieee1275/grub-mkrescue.in.
7787 2008-01-30  Robert Millan  <rmh@aybabtu.com>
7789         * conf/i386-pc.rmk (sbin_UTILITIES): Remove `grub-probe'.
7790         (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Moved from here ...
7791         * conf/common.rmk (util/grub-probe.c_DEPENDENCIES)
7792         (grub_probe_SOURCES): ... to here.
7794         * conf/i386-efi.rmk (sbin_UTILITIES): Remove `grub-probe'.
7795         (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Remove.
7796         * conf/i386-ieee1275.rmk: Likewise.
7797         * conf/i386-linuxbios.rmk: Likewise.
7798         * conf/powerpc-ieee1275.rmk: Likewise.
7800 2008-01-30  Tristan Gingold  <gingold@free.fr>
7802         * kern/rescue.c: Silently accept empty lines.
7804 2008-01-29  Bean  <bean123ch@gmail.com>
7806         * boot/i386/pc/lnxboot.S (data_start): Code cleanup.
7807         (real_code_2): Code cleanup and change comment style.
7808         (move_memory): Avoid using 32-bit address mode.
7810 2008-01-29  Bean  <bean123ch@gmail.com>
7812         * conf/i386-pc.rmk (pkglib_MODULES): Add `png.mod'.
7813         (png_mod_SOURCES): New variable.
7814         (png_mod_CFLAGS): Likewise.
7815         (png_mod_LDFLAGS): Likewise.
7817         * video/readers/png.c: New file.
7819 2008-01-28  Robert Millan  <rmh@aybabtu.com>
7821         * include/grub/i386/linuxbios/kernel.h (GRUB_MOD_GAP): New macro.
7822         * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Remove
7823         `ifndef GRUB_MOD_GAP' hack.
7824         * util/elf/grub-mkimage.c (add_segments): Likewise.
7826 2008-01-27  Robert Millan  <rmh@aybabtu.com>
7828         * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Skip
7829         `GRUB_MOD_GAP' for platforms in which it's not defined.
7830         * util/elf/grub-mkimage.c (add_segments): Likewise.
7832 2008-01-27  Robert Millan  <rmh@aybabtu.com>
7834         Get grub-emu to build again (including parallel builds).
7836         * conf/i386-pc.rmk (util/grub-emu.c_DEPENDENCIES): Remove variable.
7837         Split into ...
7838         (util/grub-emu.c_DEPENDENCIES): ... this, ...
7839         (normal/execute.c_DEPENDENCIES): ... this, ...
7840         (grub-emu_DEPENDENCIES): ... and this.
7842         * conf/i386-efi.rmk: Likewise.
7843         * conf/i386-linuxbios.rmk: Likewise.
7844         * conf/i386-ieee1275.rmk: Likewise.
7845         * conf/powerpc-ieee1275.rmk: Likewise.
7846         (grub_emu_SOURCES): Remove duplicated `kern/file.c'.
7848 2008-01-27  Robert Millan  <rmh@aybabtu.com>
7850         * NEWS: Add a few items.
7852 2008-01-27  Robert Millan  <rmh@aybabtu.com>
7854         Fix parallel builds with grub-emu.  Based on earlier commit for
7855         grub-probe and grub-setup.
7857         * conf/i386-pc.rmk (grub-emu_DEPENDENCIES): Renamed to ...
7858         (util/grub-emu.c_DEPENDENCIES): ... this.
7859         * conf/i386-efi.rmk (grub-emu_DEPENDENCIES): Renamed to ...
7860         (util/grub-emu.c_DEPENDENCIES): ... this.
7861         * conf/i386-linuxbios.rmk (grub-emu_DEPENDENCIES): Renamed to ...
7862         (util/grub-emu.c_DEPENDENCIES): ... this.
7863         * conf/i386-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
7864         (util/grub-emu.c_DEPENDENCIES): ... this.
7865         * conf/powerpc-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
7866         (util/grub-emu.c_DEPENDENCIES): ... this.
7868 2008-01-27  Pavel Roskin  <proski@gnu.org>
7870         * include/grub/powerpc/ieee1275/kernel.h: Introduce GRUB_MOD_GAP
7871         to create a gap between _end and the modules added to the image
7872         with grub-mkrescue.  That fixes "CLAIM failed" on PowerMAC.
7873         * kern/powerpc/ieee1275/init.c: Use GRUB_MOD_GAP.
7874         * util/elf/grub-mkimage.c (add_segments): Likewise.
7876 2008-01-26  Pavel Roskin  <proski@gnu.org>
7878         * kern/dl.c (grub_dl_load): Don't abort if prefix is not set,
7879         just return an error.
7881 2008-01-26  Bean  <bean123ch@gmail.com>
7883         * fs/reiserfs.c (grub_fshelp_node): New member next_offset.
7884         (grub_reiserfs_get_item): Save offset of the next item.
7885         (grub_reiserfs_iterate_dir): Use next_offset to find next item.
7887 2008-01-25  Robert Millan  <rmh@aybabtu.com>
7889         * conf/i386-pc.rmk (grub_setup_SOURCES, grub_emu_SOURCES): Regroup to
7890         make all filesystem sources appear together (possibly fixing omissions
7891         while at it).
7892         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
7893         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7894         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
7895         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7897         * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.  Additionally,
7898         add `kern/file.c'.
7899         * conf/i386-efi.rmk (grub_probe_SOURCES): Likewise.
7900         * conf/i386-ieee1275.rmk (grub_probe_SOURCES): Likewise.
7901         * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Likewise.
7902         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Likewise.
7904         * util/grub-probe.c: Include `<grub/file.h>' and `<sys/stat.h>'.
7905         (probe): Add a sanity check to make sure of our ability to read
7906         requested files when probing for filesystem type.
7908         * genmk.rb: Update copyright year (2007).
7910         * include/grub/fs.h (grub_fat_init, grub_fat_fini, grub_ext2_init)
7911         (grub_ext2_fini, grub_ufs_init, grub_ufs_fini, grub_minix_init)
7912         (grub_minix_fini, grub_hfs_init, grub_hfs_fini, grub_jfs_init)
7913         (grub_jfs_fini, grub_xfs_init, grub_xfs_fini, grub_affs_init)
7914         (grub_affs_fini, grub_sfs_init, grub_sfs_fini, grub_iso9660_init)
7915         : Remove function prototypes.
7917 2008-01-25  Robert Millan  <rmh@aybabtu.com>
7919         Revert my previous commits (based on wrong assumption of how grub_errno
7920         works).
7922         * kern/disk.c (grub_disk_open): Stop resetting grub_errno.
7923         * kern/file.c (grub_file_open): Likewise.
7925 2008-01-24  Pavel Roskin  <proski@gnu.org>
7927         * include/grub/ieee1275/ieee1275.h: Introduce flag for firmwares
7928         that hang if GRUB tries to setup colors.
7929         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Don't set
7930         colors for firmwares that don't support it.
7931         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag):
7932         Recognize Open Hack'Ware, set flags to work around its
7933         limitations.
7935 2008-01-24  Robert Millan  <rmh@aybabtu.com>
7937         * kern/file.c (grub_file_open): Do not account previous failures of
7938         unrelated functions when grub_errno is checked for.
7939         Reported by Oleg Strikov.
7941 2008-01-24  Bean  <bean123ch@gmail.com>
7943         * fs/ufs.c (GRUB_UFS_VOLNAME_LEN): New macro.
7944         (grub_ufs_sblock): New member volume name.
7945         (grub_ufs_find_file): Fix string copy bug.
7946         (grub_ufs_label): Implement this function properly.
7948         * fs/hfs.c (grub_hfs_cnid_type): New enum.
7949         (grub_hfs_iterate_records): Use the correct file number for extents
7950         and catalog file. Fix problem in next index calculation.
7951         (grub_hfs_find_node): Replace recursive function call with loop.
7952         (grub_hfs_iterate_dir): Replace recursive function call with loop.
7954 2008-01-23  Robert Millan  <rmh@aybabtu.com>
7956         * include/grub/i386/ieee1275/loader.h: Include `<grub/types.h>',
7957         `<grub/symbol.h>' and `<grub/multiboot.h>'.
7958         (grub_multiboot2_real_boot): New function prototype.
7960         * include/grub/i386/pc/memory.h: Include `<grub/machine/machine.h>'.
7961         [!GRUB_MACHINE_IEEE1275] (grub_lower_mem, grub_upper_mem): Disable.
7963         * kern/i386/ieee1275/init.c (grub_os_area_addr)
7964         (grub_os_area_size, grub_lower_mem, grub_upper_mem): Remove variables.
7966 2008-01-23  Robert Millan  <rmh@aybabtu.com>
7968         * kern/mm.c (grub_mm_init_region): Replace grub_dprintf() call with
7969         #ifdef'ed out grub_printf().
7971 2008-01-23  Robert Millan  <rmh@aybabtu.com>
7973         * term/i386/pc/at_keyboard.c (grub_keyboard_isr): #ifdef out
7974         grub_dprintf calls, since they make "debug=all" mode unusable.
7975         (grub_console_checkkey): Likewise.
7977 2008-01-23  Robert Millan  <rmh@aybabtu.com>
7979         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
7980         `term/i386/pc/at_keyboard.c'.
7981         (pkglib_MODULES): Add `serial.mod'.
7982         (serial_mod_SOURCES): New variable.
7983         (serial_mod_CFLAGS): Likewise.
7984         (serial_mod_LDFLAGS): Likewise.
7986         * include/grub/i386/ieee1275/console.h: Add `<grub/symbol.h>'.  Remove
7987         `<grub/powerpc/ieee1275/console.h>'.
7988         (grub_keyboard_controller_init): New function prototype.
7989         (grub_console_checkkey): Likewise.
7990         (grub_console_getkey): Likewise.
7992         * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize AT
7993         keyboard on i386.
7995         * term/ieee1275/ofconsole.c (grub_ofconsole_term): On i386, use
7996         grub_ofconsole_checkkey() and grub_ofconsole_getkey() for input.
7998 2008-01-23  Robert Millan  <rmh@aybabtu.com>
8000         * kern/i386/pc/init.c (make_install_device): When memdisk image is
8001         present, "(memdisk)/boot/grub" becomes the default prefix.
8003         * util/i386/pc/grub-mkrescue.in: Switch to a minimal core.img plus
8004         a memdisk tarball with all the modules.  Add --overlay=DIR option that
8005         allows users to overlay additional files into the image.
8007 2008-01-23  Robert Millan  <rmh@aybabtu.com>
8009         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add `machine/loader.h'
8010         and `machine/memory.h'.
8011         (pkglib_MODULES): Add `multiboot.mod' and `_multiboot.mod'.
8012         (_multiboot_mod_SOURCES): New variable.
8013         (_multiboot_mod_CFLAGS): Likewise.
8014         (_multiboot_mod_LDFLAGS): Likewise.
8015         (multiboot_mod_SOURCES): Likewise.
8016         (multiboot_mod_CFLAGS): Likewise.
8017         (multiboot_mod_LDFLAGS): Likewise.
8019         * include/grub/i386/ieee1275/loader.h: New file.
8021         * include/grub/i386/ieee1275/machine.h: Likewise.
8023         * include/grub/i386/ieee1275/memory.h: Likewise.
8025         * include/grub/i386/pc/init.h (grub_os_area_addr): Remove (redundant)
8026         variable declaration.
8027         (grub_os_area_size): Likewise.
8029         * kern/i386/ieee1275/init.c (grub_os_area_addr, grub_os_area_size)
8030         (grub_lower_mem, grub_upper_mem): New variables.
8031         (grub_stop_floppy): New function (just to make
8032         grub_multiboot2_real_boot() happy).
8034         * kern/i386/ieee1275/startup.S: Include `<grub/machine/memory.h>',
8035         `<grub/cpu/linux.h>', `<multiboot.h>' and `<multiboot2.h>'.
8036         (grub_stop): New function.
8037         Include `"../realmode.S"' and `"../loader.S"'.
8039         * loader/multiboot_loader.c: Include `<grub/machine/machine.h>'.
8040         Replace `__i386__' #ifdefs with `GRUB_MACHINE_PCBIOS'.
8042         * loader/powerpc/ieee1275/multiboot2.c (grub_mb2_arch_boot): On i386,
8043         rely on grub_multiboot2_real_boot() for final boot.
8045 2008-01-22  Robert Millan  <rmh@aybabtu.com>
8047         * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): When
8048         `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag is set, skip any
8049         device that doesn't look like an SD card.
8050         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
8051         `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag.
8052         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag): Detect
8053         OLPC laptop, and set `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' when
8054         found.
8056 2008-01-22  Robert Millan  <rmh@aybabtu.com>
8058         * kern/powerpc/ieee1275/init.c (grub_claim_heap): Add sanity check to
8059         avoid claiming over our own code.
8061 2008-01-22  Bean  <bean123ch@gmail.com>
8063         * conf/i386-pc.rmk (pkglib_MODULES): Add `jpeg.mod'.
8064         (jpeg_mod_SOURCES): New variable.
8065         (jpeg_mod_CFLAGS): Likewise.
8066         (jpeg_mod_LDFLAGS): Likewise.
8068         * video/readers/jpeg.c : New file.
8070 2008-01-22  Bean  <bean123ch@gmail.com>
8072         * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_FILE_NOT_FOUND when
8073         there are no more items.
8075 2008-01-21  Robert Millan  <rmh@aybabtu.com>
8077         * kern/mm.c (grub_mm_init_region): Improve debug message.
8079 2008-01-21  Robert Millan  <rmh@aybabtu.com>
8081         * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): New variable.
8082         (kernel_img_LDFLAGS): Use `GRUB_MEMORY_MACHINE_LINK_ADDR' as link
8083         address.
8084         (grub_mkimage_CFLAGS): Propagate `GRUB_MEMORY_MACHINE_LINK_ADDR' as
8085         a C macro.
8086         * include/grub/i386/pc/memory.h (GRUB_MEMORY_MACHINE_UPPER): New macro.
8087         Indicates start of upper memory.
8088         * util/i386/pc/grub-mkimage.c: Include `<grub/machine/memory.h>'.
8089         (generate_image): Abort when image size is big enough to corrupt
8090         upper memory.
8092         * include/grub/i386/pc/vga.h: Include `<grub/machine/memory.h>'.
8093         (GRUB_MEMORY_MACHINE_VGA_ADDR): Alias for `GRUB_MEMORY_MACHINE_UPPER'.
8094         * term/i386/pc/vga.c (VGA_MEM): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
8095         instead of hardcoding 0xA0000.
8096         * video/i386/pc/vbe.c: Include `<grub/machine/vga.h>'.
8097         (grub_vbe_set_video_mode): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
8098         instead of hardcoding 0xA0000.
8100 2008-01-21  Robert Millan  <rmh@aybabtu.com>
8102         * disk/memdisk.c (memdisk_size): New variable.
8103         (grub_memdisk_open): Replace grub_arch_memdisk_size() call with
8104         `memdisk_size'.
8105         (grub_memdisk_init): Initialize `memdisk_size'.  Reallocate memdisk
8106         image to dynamic memory.
8107         (grub_memdisk_fini): Replace grub_arch_memdisk_size() call with
8108         `memdisk_size'.  Free memdisk block.
8110 2008-01-21  Robert Millan  <rmh@aybabtu.com>
8112         Fix detection of very small filesystems (like tar).
8114         * fs/reiserfs.c (grub_reiserfs_mount): When disk is too small to
8115         contain a ReiserFS, abort with GRUB_ERR_BAD_FS rather than
8116         GRUB_ERR_OUT_OF_RANGE (which made the upper layer think there's
8117         a problem with this disk).
8119 2008-01-21  Robert Millan  <rmh@aybabtu.com>
8121         * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Add debug message
8122         on grub_biosdisk_rw_standard() error.
8124 2008-01-21  Robert Millan  <rmh@aybabtu.com>
8126         * include/grub/ieee1275/ieee1275.h: Add 2008 to Copyright line for
8127         recent changes.
8128         * kern/elf.c: Likewise.
8129         * kern/ieee1275/ieee1275.c: Likewise.
8130         * kern/powerpc/ieee1275/openfw.c: Likewise.
8131         * term/ieee1275/ofconsole.c: Likewise.
8133 2008-01-21  Robert Millan  <rmh@aybabtu.com>
8135         * include/grub/i386/pc/kernel.h: Include `<grub/symbol.h>'.
8137         * include/grub/kernel.h (grub_arch_memdisk_addr)
8138         (grub_arch_memdisk_size): Moved from here ...
8140         * include/grub/i386/pc/kernel.h (grub_arch_memdisk_addr)
8141         (grub_arch_memdisk_size): ... to here.
8143 2008-01-21  Robert Millan  <rmh@aybabtu.com>
8145         Mostly based on bugfix from Bean.
8147         * kern/elf.c (grub_elf32_phdr_iterate): Use `NESTED_FUNC_ATTR'
8148         attribute with hook() parameter.
8149         (grub_elf32_load): Use `NESTED_FUNC_ATTR' with grub_elf32_load_segment()
8150         declaration.
8151         (grub_elf64_phdr_iterate): Use `NESTED_FUNC_ATTR'
8152         attribute with hook() parameter.
8153         (grub_elf64_load): Use `NESTED_FUNC_ATTR' with grub_elf64_load_segment()
8154         declaration.
8156 2008-01-21  Robert Millan  <rmh@aybabtu.com>
8158         * conf/i386-pc.rmk (kernel_img_HEADERS): Add `machine/kernel.h'.
8159         (pkglib_MODULES): Add `memdisk.mod'.
8160         (memdisk_mod_SOURCES): New variable.
8161         (memdisk_mod_CFLAGS): Likewise.
8162         (memdisk_mod_LDFLAGS): Likewise.
8164         * disk/memdisk.c: New file.
8166         * include/grub/disk.h (grub_disk_dev_id): Add
8167         `GRUB_DISK_DEVICE_MEMDISK_ID'.
8169         * include/grub/i386/pc/kernel.h
8170         (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): New macro.
8171         (GRUB_KERNEL_MACHINE_PREFIX): Increment by 4.
8172         (grub_kernel_image_size): New variable declaration.
8173         (grub_total_module_size): Likewise.
8174         (grub_memdisk_image_size): Likewise.
8176         * include/grub/i386/pc/memory.h
8177         (GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR): New macro.
8179         * include/grub/kernel.h: Include `<grub/symbol.h>'.
8180         (grub_arch_memdisk_addr): New variable declaration.
8181         (grub_arch_memdisk_size): Likewise.
8183         * kern/i386/pc/init.c (grub_arch_memdisk_addr): New function.
8184         (grub_arch_memdisk_size): Likewise.
8186         * kern/i386/pc/startup.S (grub_memdisk_image_size): New variable.
8187         (codestart): Replace hardcoded `0x100000' with
8188         `GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR' macro.
8190         * util/i386/pc/grub-mkimage.c: Include `<grub/misc.h>'.
8191         (generate_image): Add `memdisk_path' parameter.  When `memdisk_path' is
8192         not NULL, append the contents of the file it refers to, at the end of
8193         the compressed kernel image.  Initialize `grub_memdisk_image_size'
8194         variable (at `GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE' offset).
8195         (options): Add "memdisk"|'m' option.
8196         (main): Parse --memdisk|-m option, and pass user-provided path as
8197         parameter to generate_image().
8199 2008-01-20  Robert Millan  <rmh@aybabtu.com>
8201         * kern/sparc64/ieee1275/openfw.c (grub_devalias_iterate): Copy debug
8202         grub_dprintf() calls from here ...
8203         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): ... to here.
8205 2008-01-20  Robert Millan  <rmh@aybabtu.com>
8207         Fix detection of "real mode" when /options/real-mode? doesn't exist.
8209         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_mmu): New variable
8210         declaration.
8211         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_mmu): New variable.
8212         (grub_ieee1275_find_options): If `grub_ieee1275_mmu' is 0, set
8213         `GRUB_IEEE1275_FLAG_REAL_MODE'.
8214         (cmain): Initialize `grub_ieee1275_mmu' (using /chosen/mmu integer
8215         property).
8216         * kern/powerpc/ieee1275/openfw.c (grub_map): Rely on pre-initialized
8217         `grub_ieee1275_mmu' rather than obtaining a handler on every call.
8219 2008-01-19  Robert Millan  <rmh@aybabtu.com>
8221         Get rid of confusing function (superseded by
8222         `grub_ieee1275_get_integer_property')
8223         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_decode_int_4): Remove
8224         prototype.
8225         * kern/ieee1275/ieee1275.c (grub_ieee1275_decode_int_4): Remove
8226         function.
8227         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid use of
8228         grub_ieee1275_decode_int_4(), by obtaining integer properties directly
8229         in native endianness from grub_ieee1275_get_integer_property().
8231 2008-01-19  Robert Millan  <rmh@aybabtu.com>
8233         * kern/powerpc/ieee1275/openfw.c (grub_halt): Issue "power-off"
8234         command after "shut-down", since implementations differ on which
8235         the command for halt is.
8237 2008-01-19  Robert Millan  <rmh@aybabtu.com>
8239         * include/grub/i386/linuxbios/console.h: Add header protection.
8240         (grub_keyboard_controller_init): New function prototype.
8241         * term/i386/pc/at_keyboard.c (KEYBOARD_COMMAND_ISREADY): New macro.
8242         (KEYBOARD_COMMAND_READ): Likewise.
8243         (KEYBOARD_COMMAND_WRITE): Likewise.
8244         (KEYBOARD_SCANCODE_SET1): Likewise.
8245         (grub_keyboard_controller_write): New function.
8246         (grub_keyboard_controller_read): Likewise.
8247         (grub_keyboard_controller_init): Likewise.
8249         * term/i386/pc/console.c: Include `<grub/machine/machine.h>'.
8250         (grub_console_init): On coreboot/LinuxBIOS, call
8251         grub_keyboard_controller_init().
8253 2008-01-19  Robert Millan  <rmh@aybabtu.com>
8255         PowerPC changes provided by Pavel Roskin.
8257         * kern/powerpc/ieee1275/cmain.c (cmain): Don't take any arguments.
8258         * kern/powerpc/ieee1275/crt0.S: Store r5 in grub_ieee1275_entry_fn,
8259         don't rely on cmain() doing it.
8260         * kern/i386/ieee1275/startup.S (_start): Store %eax in
8261         grub_ieee1275_entry_fn, don't rely on cmain() doing it.
8263 2008-01-16  Robert Millan  <rmh@aybabtu.com>
8265         * include/grub/i386/linuxbios/memory.h
8266         (GRUB_MEMORY_MACHINE_LINUXBIOS_TABLE_ADDR): Remove macro.
8267         * kern/i386/linuxbios/table.c (grub_linuxbios_table_iterate): Do not
8268         receive `table_header' as argument.  Instead, probe for it in the
8269         known memory ranges where it can be present.
8270         (grub_available_iterate): Do not pass a fixed `table_header' address
8271         to grub_linuxbios_table_iterate().
8273 2008-01-15  Robert Millan  <rmh@aybabtu.com>
8275         * configure.ac: Add `i386-ieee1275' to the list of supported targets.
8276         * conf/i386-ieee1275.rmk: New file.
8277         * include/grub/i386/ieee1275/console.h: Likewise.
8278         * include/grub/i386/ieee1275/ieee1275.h: Likewise.
8279         * include/grub/i386/ieee1275/kernel.h: Likewise.
8280         * include/grub/i386/ieee1275/time.h: Likewise.
8281         * kern/i386/ieee1275/init.c: Likewise.
8282         * kern/i386/ieee1275/startup.S: Likewise.
8284 2008-01-15  Robert Millan  <rmh@aybabtu.com>
8286         * kern/misc.c (grub_vsprintf): Do not reset `longlongfmt' to zero
8287         when pointers are 32-bit (but still do set it to one when they are
8288         64-bit).
8290 2008-01-15  Robert Millan  <rmh@aybabtu.com>
8292         * include/grub/ieee1275/ieee1275.h
8293         (grub_ieee1275_get_integer_property): New function prototype.
8295         * kern/ieee1275/ieee1275.c: Include `<grub/types.h>'.
8296         (grub_ieee1275_get_integer_property): New function.  Wraps around
8297         grub_ieee1275_get_property() to handle endianness.
8299         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Replace
8300         grub_ieee1275_get_property() with grub_ieee1275_get_integer_property()
8301         where appropriate.
8302         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Likewise.
8303         (grub_map): Likewise.
8304         * kern/sparc64/ieee1275/openfw.c (grub_map): Likewise.
8306 2008-01-15  Bean  <bean123ch@gmail.com>
8308         * normal/execute.c (grub_script_exec_argument_to_string): Check for undefined variable.
8309         (grub_script_execute_cmdline): Reset grub_errno.
8311         * normal/main.c (read_config_file): Reset grub_errno.
8313         * normal/parse.y (script_init): New.
8314         (script): Move function and menuentry here.
8315         (delimiter): New.
8316         (command): Add delimiter at the end of command.
8317         (commands): Adjust to match the new command.
8318         (commandblock): Remove grub_script_lexer_record_start.
8319         (menuentry): Add grub_script_lexer_record_start, use the new commands.
8320         (if): Use the new commands.
8322         * conf/common.rmk (pkgdata_MODULES): Add echo.mod.
8324 2008-01-15  Robert Millan  <rmh@aybabtu.com>
8326         * normal/menu.c (run_menu): Move timeout message from here ...
8327         (print_timeout): ... to here.
8328         (run_menu): Use print_timeout() once during initial draw to print
8329         the whole message, and again in every clock tick to update only
8330         the number of seconds.
8332 2008-01-15  Robert Millan  <rmh@aybabtu.com>
8334         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Obtain
8335         actual size of `available' from grub_ieee1275_get_property(), and
8336         restrict parsing to that bound.
8338 2008-01-15  Christian Franke  <franke@computer.org>
8340         * util/grub-emu.c: Replace <argp.h> by <getopt.h>.
8341         (argp_program_version): Remove variable.
8342         (argp_program_bug_address): Likewise.
8343         (options): Convert from struct argp_option to struct option.
8344         (struct arguments): Remove.
8345         (parse_opt): Remove.
8346         (usage): New function.
8347         (main): Replace struct args members by simple variables.
8348         Replace argp_parse() by getopt_long().
8349         Add switch to evaluate options.
8350         Add missing "(...)" around root_dev in prefix string.
8352 2008-01-14  Robert Millan  <rmh@aybabtu.com>
8354         * kern/powerpc/ieee1275/init.c (grub_exit): Reimplement as a wrapper
8355         for grub_ieee1275_exit(), in order to improve portability.
8357 2008-01-14  Robert Millan  <rmh@aybabtu.com>
8359         * util/grub.d/10_linux.in (prefix): Define.
8360         (exec_prefix): Likewise.  Both definitions are later used by `libdir'.
8362 2008-01-13  Pavel Roskin  <proski@gnu.org>
8364         * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Don't use
8365         grub_errno if no errors have been detected.
8367 2008-01-12  Robert Millan  <rmh@aybabtu.com>
8369         * include/grub/util/getroot.h (grub_dev_abstraction_types): New enum.
8370         (grub_util_get_dev_abstraction): New function prototype.
8372         * util/getroot.c: Include `<grub/util/getroot.h>'
8373         (grub_util_get_grub_dev): Move detection of abstraction type to ...
8374         (grub_util_get_dev_abstraction): ... here (new function).
8376         * util/grub-probe.c: Convert PRINT_* to an enum.  Add
8377         `PRINT_ABSTRACTION'.
8378         (probe): Probe for abstraction type when requested.
8379         (main): Understand `--target=abstraction'.
8381         * util/i386/efi/grub-install.in: Add abstraction module to core
8382         image when it is found to be necessary.
8383         * util/i386/pc/grub-install.in: Likewise.
8384         * util/powerpc/ieee1275/grub-install.in: Likewise.
8386         * util/update-grub_lib.in (font_path): Return system path without
8387         converting to GRUB path.
8388         * util/update-grub.in: Convert system path returned by font_path()
8389         to a GRUB path.  Use `grub-probe -t abstraction' to determine what
8390         abstraction module is needed for loading fonts (if any).  Export
8391         that as `GRUB_PRELOAD_MODULES'.
8392         * util/grub.d/00_header.in: Process `GRUB_PRELOAD_MODULES' (print
8393         insmod commands).
8395 2008-01-12  Yoshinori K. Okuji  <okuji@enbug.org>
8397         Remove some unused code from reiserfs.
8399         * fs/reiserfs.c (struct grub_reiserfs_key)
8400         [GRUB_REISERFS_KEYV2_BITFIELD]: Removed offset and type.
8401         (struct grub_reiserfs_node_body): Removed.
8402         (grub_reiserfs_get_key_v2_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
8403         Likewise.
8404         (grub_reiserfs_get_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
8405         Likewise.
8406         (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
8407         Likewise.
8408         (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
8409         Likewise.
8410         (grub_reiserfs_set_key_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
8411         Likewise.
8412         (grub_reiserfs_iterate_dir) [GRUB_REISERFS_KEYV2_BITFIELD]:
8413         Likewise.
8414         (grub_reiserfs_open) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
8415         (grub_reiserfs_read) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
8416         (grub_reiserfs_dir) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
8418 2008-01-10  Robert Millan  <rmh@aybabtu.com>
8420         * util/update-grub_lib.in (grub_file_is_not_garbage): New function.
8421         Determines if a file is garbage left by packaging systems, etc.
8422         * util/update-grub.in: Use grub_file_is_not_garbage() as a condition
8423         for processing /etc/grub.d scripts.
8424         * util/grub.d/10_hurd.in: Fix `GRUB_DISTRIBUTOR' comparison.
8425         * util/grub.d/10_linux.in: Likewise.  Use grub_file_is_not_garbage()
8426         as a condition for processing Linux images.
8428 2008-01-10  Pavel Roskin  <proski@gnu.org>
8430         * include/grub/powerpc/libgcc.h (__ucmpdi2): New export.  Needed
8431         to compile reiserfs.c on PowerPC.
8433 2008-01-10  Robert Millan  <rmh@aybabtu.com>
8435         * kern/device.c (grub_device_iterate): Do not abort device iteration
8436         when one of the devices cannot be opened.
8437         * kern/disk.c (grub_disk_open): Do not account previous failures of
8438         unrelated functions when grub_errno is checked for.
8440 2008-01-08  Robert Millan  <rmh@aybabtu.com>
8442         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): For
8443         `! grub_linux_is_bzimage', change order of address comparison to make
8444         it more intuitive, and improve "too big zImage" error message.
8446 2008-01-08  Robert Millan  <rmh@aybabtu.com>
8448         * Makefile.in (uninstall): Handle `$(update-grub_SCRIPTS)' and
8449         `$(update-grub_DATA)'.
8450         (distcheck): Fix race condition when invoking `$(MAKE)' on multiple
8451         targets.
8453 2008-01-07  Robert Millan  <rmh@aybabtu.com>
8455         * boot/i386/pc/boot.S (boot_drive_check): Add a comment indicating
8456         which instruction is modified by grub-setup during installation
8457         (since it wasn't obvious by only looking at this file).
8459 2008-01-07  Robert Millan  <rmh@aybabtu.com>
8461         * TODO: Rewrite.  Just refer to the wiki and the BTS instead of
8462         listing actual TODO items.
8464 2008-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
8466         * fs/reiserfs.c (grub_reiserfs_get_key_v2_type): Handle endianness
8467         correctly.
8468         (grub_reiserfs_get_key_offset): Likewise.
8469         (grub_reiserfs_set_key_offset): Likewise.
8470         (grub_reiserfs_set_key_type): Likewise.
8471         (grub_reiserfs_iterate_dir): Return 1 if found, otherwise 0.
8473         (GRUB_REISERFS_KEYV2_BITFIELD): Undefined. Probably it would be
8474         better to remove the bitfield version completely.
8476 2008-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
8478         * fs/reiserfs.c (grub_reiserfs_iterate_dir): ENTRY_ITEM must be
8479         allocated from the heap, due to the fshelp implementation.
8480         (grub_reiserfs_dir): Free NODE, due to the same reason.
8482 2008-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
8484         Mostly from Vincent Pelletier:
8486         * fs/reiserfs.c: New file.
8488         * conf/common.rmk (pkglib_MODULES): Added reiserfs.mod.
8489         (reiserfs_mod_SOURCES): New variable.
8490         (reiserfs_mod_CFLAGS): Likewise.
8491         (reiserfs_mod_LDFLAGS): Likewise.
8493         * DISTLIST: Added boot/i386/pc/lnxboot.S, commands/hexdump.c,
8494         disk/ata.c, fs/cpio.c, fs/ntfscomp.c, fs/reiserfs.c,
8495         include/grub/ntfs.h, include/grub/i386/pc/machine.h, and
8496         normal/color.c.
8498 2008-01-06  Robert Millan  <rmh@aybabtu.com>
8500         * normal/color.c: Remove `<grub/env.h>'.
8502 2008-01-05  Jeroen Dekkers  <jeroen@dekkers.cx>
8504         * include/grub/normal.h: Include <grub/env.h>.
8506 2008-01-05  Robert Millan  <rmh@aybabtu.com>
8508         * util/i386/pc/grub-setup.c (usage): Replace obsolete `(hd0,0)' in
8509         usage example with `(hd0,1)'.
8510         Reported by Samuel Thibault.
8512 2008-01-05  Robert Millan  <rmh@aybabtu.com>
8514         * kern/i386/loader.S (grub_linux_is_bzimage): New variable.
8515         (grub_linux_boot_zimage): Rename to ...
8516         (grub_linux_boot): ... this.
8517         (grub_linux_boot_bzimage): Merge with `grub_linux_boot_zimage'.
8518         (grub_linux_boot_zimage): Conditionalize zImage copy.
8520         * include/grub/i386/loader.h (grub_linux_is_bzimage): Add prototype.
8521         (grub_linux_boot_bzimage): Remove prototype.
8522         (grub_linux_boot_zimage): Rename to ...
8523         (grub_linux_boot): ... this.
8525         * loader/i386/pc/linux.c (big_linux): Replace with `grub_linux_is_bzimage'.
8526         (grub_linux_boot): Remove function.
8528 2008-01-05  Robert Millan  <rmh@aybabtu.com>
8530         * include/grub/normal.h (grub_env_write_color_normal): New prototype.
8531         (grub_env_write_color_highlight): Likewise.
8532         (grub_wait_after_message): Likewise.
8534         * normal/color.c: New file.
8536         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/color.c'.
8537         (normal_mod_DEPENDENCIES): Likewise.
8539         * conf/i386-efi.rmk (grub_emu_SOURCES): Add `normal/color.c'.
8540         (normal_mod_DEPENDENCIES): Likewise.
8542         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add `normal/color.c'.
8543         (normal_mod_DEPENDENCIES): Likewise.
8545         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `normal/color.c'.
8546         (normal_mod_DEPENDENCIES): Likewise.
8548         * normal/menu_entry.c (run): Rely on grub_wait_after_message()
8549         for waiting after a message is printed.
8550         * normal/main.c (read_config_file): Likewise.
8551         (grub_normal_init): Register grub_env_write_color_normal() and
8552         grub_env_write_color_highlight() hooks.  Mark `color_normal' and
8553         `color_highlight' variables as global.
8555         * normal/menu.c (grub_wait_after_message): New function.
8556         (grub_color_menu_normal): New variable.  Replaces ...
8557         (GRUB_COLOR_MENU_NORMAL): ... this macro.
8558         (grub_color_menu_highlight): New variable.  Replaces ...
8559         (GRUB_COLOR_MENU_HIGHLIGHT): ... this macro.
8560         (draw_border): Set color state to `GRUB_TERM_COLOR_NORMAL' instead of
8561         `GRUB_TERM_COLOR_STANDARD'.
8562         (print_message): Use `grub_setcolorstate' to reload colors.  Rename
8563         `normal_code' and `highlight_code' to `old_color_normal' and
8564         `old_color_highlight', respectively.
8565         (grub_menu_init_page): Update colors when drawing the menu, based on
8566         `menu_color_normal' and `menu_color_highlight' variables.
8567         (grub_menu_run): Rely on grub_wait_after_message() for waiting after
8568         a message is printed.
8570 2008-01-05  Robert Millan  <rmh@aybabtu.com>
8572         * kern/env.c (grub_env_context_open): Propagate hooks for global
8573         variables to new context.
8575         * kern/main.c (grub_set_root_dev): Export `root' variable.
8577 2008-01-05  Robert Millan  <rmh@aybabtu.com>
8579         * util/biosdisk.c (get_os_disk): Check for devfs-style IDE and SCSI
8580         discs unconditionally, since udev and others have options to provide
8581         them.
8583 2008-01-05  Robert Millan  <rmh@aybabtu.com>
8585         * normal/completion.c (iterate_dir): Skip `.' and `..' directories.
8587 2008-01-04  Christian Franke  <franke@computer.org>
8589         * kern/i386/pc/init.c (grub_machine_init): Fix evaluation
8590         of eisa_mmap.
8592 2008-01-03  Pavel Roskin  <proski@gnu.org>
8594         * kern/i386/linuxbios/init.c: Put "void" to all function
8595         declarations with no arguments.
8596         * kern/powerpc/ieee1275/init.c: Likewise.
8597         * term/i386/pc/at_keyboard.c: Likewise.
8598         * term/i386/pc/vga_text.c: Likewise.
8599         * util/grub-mkdevicemap.c: Likewise.
8601 2008-01-02  Robert Millan  <rmh@aybabtu.com>
8603         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Improve error
8604         message when loaded image is out of bounds.
8605         (grub_multiboot_load_elf64): Likewise.
8607 2008-01-02  Pavel Roskin  <proski@gnu.org>
8609         * util/grub.d/10_linux.in: Try version without ".old" when
8610         looking for initrd.  It's better to use initrd from the newer
8611         kernel of the same version than no initrd at all.
8613 2008-01-01  Robert Millan  <rmh@aybabtu.com>
8615         * util/biosdisk.c (get_os_disk): Fix check for IDE or SCSI discs.
8617 2008-01-01  Vesa Jaaskelainen  <chaac@nic.fi>
8619         * include/grub/video.h: Added grub_video_unmap_color and
8620         grub_video_get_active_render_target.
8621         (grub_video_adapter): Added unmap_color and get_active_render_target.
8623         * video/video.c: Added grub_video_unmap_color and
8624         grub_video_get_active_render_target.
8625         (grub_video_get_info): Changed method to accept NULL pointer as an
8626         argument to allow detection of active video adapter.
8628         * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as
8629         grub_video_vbe_unmap_color_int.
8630         Added grub_video_vbe_unmap_color and
8631         grub_video_vbe_get_active_render_target.
8632         (grub_video_vbe_adapter): Added unmap_color and
8633         get_active_render_target.
8635         * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage
8636         with grub_video_vbe_unmap_color_int.
8638         * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added.
8639         (DEFAULT_NORMAL_COLOR): Likewise.
8640         (DEFAULT_HIGHLIGHT_COLOR) Likewise.
8641         (DEFAULT_FG_COLOR): Removed.
8642         (DEFAULT_BG_COLOR): Likewise.
8643         (DEFAULT_CURSOR_COLOR): Changed value.
8644         (grub_virtual_screen): Added standard_color_setting,
8645         normal_color_setting, highlight_color_setting and term_color.
8646         (grub_virtual_screen): Removed fg_color_setting and bg_color_setting.
8647         (bitmap_width): Added.
8648         (bitmap_height): Likewise.
8649         (bitmap): Likewise.
8650         (set_term_color): Likewise.
8651         (grub_virtual_screen_setup): Changed to use new terminal coloring
8652         settings.
8653         (grub_gfxterm_init): Added init for bitmap.
8654         (grub_gfxterm_fini): Added destroy for bitmap.
8655         (redraw_screen_rect): Updated to use background bitmap and new
8656         terminal coloring.
8657         (scroll_up): Added optimization for case when there is no bitmap.
8658         (grub_gfxterm_cls): Fixed to use correct background color.
8659         (grub_virtual_screen_setcolorstate): Changed to use new terminal
8660         coloring.
8661         (grub_virtual_screen_setcolor): Likewise.
8662         (grub_virtual_screen_getcolor): Added.
8663         (grub_gfxterm_background_image_cmd): Likewise.
8664         (grub_video_term): Added setcolor and getcolor.
8665         (MOD_INIT): Added registration of background_image command.
8666         (MOD_TERM): Added unregistration for background_image command.
8668 2007-12-30  Pavel Roskin  <proski@gnu.org>
8670         * loader/multiboot_loader.c: Fix multiboot command
8671         unregistration.  Fix all typos in the word "multiboot".
8673 2007-12-29  Pavel Roskin  <proski@gnu.org>
8675         * util/grub.d/10_linux.in: Refactor search for initrd.  Add
8676         support for initrd names used in Fedora.
8678 2007-12-26  Bean  <bean123ch@gmail.com>
8680         * conf/common.rmk (pkgdata_MODULES): Add cpio.mod.
8681         (cpio_mod_SOURCES): New variable.
8682         (cpio_mod_CFLAGS): Likewise.
8683         (cpio_mod_LDFLAGS): Likewise.
8685         * fs/cpio.c: New file.
8687         * conf/i386-pc.rmk (grub_emu_SOURCES): Add cpio.c.
8689         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
8691         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
8693         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8695 2007-12-25  Robert Millan  <rmh@aybabtu.com>
8697         * include/grub/term.h (struct grub_term): Add `getcolor' function.
8698         (grub_getcolor): New function.
8700         * kern/term.c (grub_getcolor): New function.
8701         * normal/menu.c (GRUB_COLOR_MENU_NORMAL): New macro.
8702         (GRUB_COLOR_MENU_HIGHLIGHT): New macro.
8703         (print_entry): Set normal and highlight colors to
8704         `GRUB_COLOR_MENU_NORMAL' and `GRUB_COLOR_MENU_HIGHLIGHT',
8705         respectively, before printing and restore them to old
8706         values afterwards.
8707         (grub_menu_init_page): Likewise.  Fill an additional colored space
8708         that would otherwise be left blank.
8710         * term/efi/console.c (grub_console_getcolor): New function.
8711         (struct grub_console_term.getcolor): New variable.
8712         * term/i386/pc/console.c (grub_console_getcolor): New function.
8713         (struct grub_console_term.getcolor): New variable.
8714         * term/ieee1275/ofconsole.c (grub_ofconsole_getcolor): New function.
8715         (struct grub_console_term.getcolor): New variable.
8717         * term/i386/pc/serial.c (grub_serial_setcolor): Remove function.
8718         (struct grub_console_term.setcolor): Remove variable.
8719         * term/i386/pc/vesafb.c (grub_virtual_screen_setcolor): Remove function.
8720         (struct grub_console_term.setcolor): Remove variable.
8721         * term/i386/pc/vga.c (grub_vga_setcolor): Remove function.
8722         (struct grub_console_term.setcolor): Remove variable.
8723         * term/gfxterm.c (grub_virtual_screen_setcolor): Remove function.
8724         (struct grub_console_term.setcolor): Remove variable.
8726 2007-12-25  Robert Millan  <rmh@aybabtu.com>
8728         * configure.ac: Search for possible unifont.hex locations, and
8729         define UNIFONT_HEX if found.
8731         * Makefile.in (UNIFONT_HEX): Define variable.
8732         (DATA): Rename to ...
8733         (PKGLIB): ... this.  Update all users.
8734         (PKGDATA): New variable.
8735         (pkgdata_IMAGES): Rename to ...
8736         (pkglib_IMAGES): ... this. Update all users.
8737         (pkgdata_MODULES): Rename to ...
8738         (pkglib_MODULES): ... this. Update all users.
8739         (pkgdata_PROGRAMS): Rename to ...
8740         (pkglib_PROGRAMS): ... this. Update all users.
8741         (pkgdata_DATA): Rename to ...
8742         (pkglib_DATA): ... this. Update all users.
8743         (CLEANFILES): Redefine to `$(pkglib_DATA) $(pkgdata_DATA)'.
8744         (unicode.pff, ascii.pff): New rules.
8745         (all-local): Add `$(PKGDATA)' dependency.
8746         (install-local): Process `$(PKGDATA)'.
8748         * util/update-grub_lib.in (font_path): Search for *.pff files in
8749         a few more locations, including `${pkgdata}'.
8751 2007-12-23  Robert Millan  <rmh@aybabtu.com>
8753         Patch from Bean  <bean123ch@gmail.com>:
8754         * disk/loopback.c (grub_loopback_read): Add missing bit shift to
8755         `size'.
8757 2007-12-21  Bean  <bean123ch@gmail.com>
8759         * conf/common.rmk (pkgdata_MODULES): Add ntfscomp.mod.
8760         (ntfscomp_mod_SOURCES): New variable.
8761         (ntfscomp_mod_CFLAGS): Likewise.
8762         (ntfscomp_mod_LDFLAGS): Likewise.
8764         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfscomp.c.
8765         (grub_probe_SOURCES): Likewise.
8766         (grub_emu_SOURCES): Likewise.
8768         * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
8769         (grub_emu_SOURCES): Likewise.
8771         * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
8772         (grub_emu_SOURCES): Likewise.
8774         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
8775         (grub_emu_SOURCES): Likewise.
8777         * fs/ntfs.c (grub_ntfscomp_func): New variable.
8778         (read_run_list): Renamed to grub_ntfs_read_run_list.
8779         (decomp_nextvcn): Moved to ntfscomp.c.
8780         (decomp_getch): Likewise.
8781         (decomp_get16): Likewise.
8782         (decomp_block): Likewise.
8783         (read_block): Likewise.
8784         (read_data): Partially moved to ntfscomp.c.
8785         (fixup): Change unsigned to grub_uint16_t.
8786         (read_mft): Change unsigned long to grub_uint32_t.
8787         (read_attr): Likewise.
8788         (read_data): Likewise.
8789         (read_run_data): Likewise.
8790         (read_run_list): Likewise.
8791         (read_mft): Likewise.
8793         * fs/ntfscomp.c: New file.
8795         * include/grub/ntfs.h: New file.
8797 2007-12-16  Robert Millan  <rmh@aybabtu.com>
8799         * util/grub-mkdevicemap.c (make_device_map): Iterate up to 20 for
8800         IDE disk check, since Linux is known to support 20 IDE disks.
8801         Reported by Colin Watson.
8803 2007-12-15  Bean  <bean123ch@gmail.com>
8805         * conf/i386-pc.rmk (pkgdata_IMAGES): Add lnxboot.img.
8806         (lnxboot_img_SOURCES): New variable.
8807         (lnxboot_img_ASFLAGS): Likewise.
8808         (lnxboot_img_LDFLAGS): Likewise.
8810         * boot/i386/pc/lnxboot.S: New file.
8812 2007-11-24  Pavel Roskin  <proski@gnu.org>
8814         * configure.ac: Test if '--build-id=none' is supported by the
8815         linker.  If yes, add it to TARGET_LDFLAGS.  Build ID causes
8816         objcopy to generate incorrect binary files (binutils
8817         2.17.50.0.18-1 as shipped by Fedora 8).
8818         * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Use LDFLAGS when
8819         linking, so that build ID doesn't break the test.
8821 2007-11-24  Pavel Roskin  <proski@gnu.org>
8823         * include/grub/i386/time.h: use "void" in the argument list
8824         of grub_cpu_idle().
8825         * include/grub/powerpc/time.h: Likewise.
8826         * include/grub/sparc64/time.h: Likewise.
8828 2007-11-18  Christian Franke  <franke@computer.org>
8830         * util/console.c (grub_ncurses_getkey): Change curses KEY_* mapping,
8831         now return control chars instead of GRUB_CONSOLE_KEY_* constants.
8832         This fixes the problem that function keys did not work in grub-emu.
8834 2007-11-18  Christian Franke  <franke@computer.org>
8836         * disk/host.c (grub_host_open): Remove attribute unused from
8837         name parameter. Add check for "host". This fixes the problem
8838         that grub-emu does not find partitions.
8840 2007-11-18  Christian Franke  <franke@computer.org>
8842         * util/hostfs.c (is_dir): New function.
8843         (grub_hostfs_dir):  Handle missing dirent.d_type case.
8844         (grub_hostfs_read): Add missing fseek().
8845         (grub_hostfs_label): Clear label pointer.  This fixes a crash
8846         of grub-emu on "ls (host)".
8848 2007-11-18  Christian Franke  <franke@computer.org>
8850         * include/grub/i386/pc/init.h (struct grub_machine_mmap_entry):
8851         Add attribute packed, gcc 3.4.4 on Cygwin aligns this
8852         to 64 bit boundary by default.
8854 2007-11-18  Bean  <bean123ch@gmail.com>
8856         * conf/common.rmk (pkgdata_MODULES): Add hexdump.mod.
8857         (hexdump_mod_SOURCES): New variable.
8858         (hexdump_mod_CFLAGS): Likewise.
8859         (hexdump_mod_LDFLAGS): Likewise.
8861         * conf/i386-pc.rmk (grub_emu_SOURCES): Add command/hexdump.c.
8863         * conf/i386-efi.rmk (grub_emu_SOURCES): Add command/hexdump.c.
8865         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add command/hexdump.c.
8867         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add command/hexdump.c.
8869         * include/grub/hexdump.h: New file.
8871         * commands/hexdump.c: New file.
8873 2007-11-10  Robert Millan  <rmh@aybabtu.com>
8875         * commands/i386/pc/play.c (beep_off): Switch order of arguments
8876         in grub_outb() calls.
8877         (beep_on): Likewise.
8879 2007-11-10  Christian Franke  <franke@computer.org>
8881         * normal/menu.c (run_menu): Check for empty menu to avoid crash.
8882         (grub_menu_run): Likewise.
8884 2007-11-10  Robert Millan  <rmh@aybabtu.com>
8886         * include/grub/i386/efi/machine.h: New file.
8887         * include/grub/i386/linuxbios/machine.h: Likewise.
8888         * include/grub/i386/pc/machine.h: Likewise.
8889         * include/grub/powerpc/ieee1275/machine.h: Likewise.
8890         * include/grub/sparc64/ieee1275/machine.h: Likewise.
8892         * term/i386/pc/serial.c: Include <grub/machine/machine.h>.
8893         (serial_hw_io_addr): New variable.
8894         (serial_hw_get_port): Obtain port address from `serial_hw_io_addr'
8895         instead of `(unsigned short *) 0x400'.
8897 2007-11-10  Bean  <bean123ch@gmail.com>
8899         * fs/ntfs.c (read_block): Fix a bug caused by adjacent blocks.
8901 2007-11-10  Vesa Jaaskelainen  <chaac@nic.fi>
8903         * conf/i386-pc.rmk (pkgdata_MODULES): Added vga.mod.
8904         (vga_mod_SOURCES): Added.
8905         (vga_mod_CFLAGS): Likewise.
8906         (vga_mod_LDFLAGS): Likewise.
8908         * term/i386/pc/vga.c (get_map_mask): Switch order of arguments in
8909         grub_outb() calls.
8910         (set_map_mask): Likewise.
8911         (set_read_map): Likewise.
8912         (set_read_address): Likewise.
8913         (vga_font): Removed variable.
8914         (get_vga_glyph): Removed function.
8915         (invalidate_char): Likewise.
8916         (write_char): Changed to use grub_font_get_glyph() for font
8917         information.
8918         (grub_vga_putchar): Likewise.
8919         (grub_vga_getcharwidth): Likewise.
8921 2007-11-10  Vesa Jaaskelainen  <chaac@nic.fi>
8923         * conf/i386-pc.rmk (boot_img_LDFLAGS): Use COMMON_LDFLAGS for target
8924         flags.
8925         (pxeboot_img_LDFLAGS): Likewise.
8926         (diskboot_img_LDFLAGS): Likewise.
8927         (kernel_img_LDFLAGS): Likewise.
8929 2007-11-06  Robert Millan  <rmh@aybabtu.com>
8931         * term/i386/pc/serial.c (serial_hw_put): Switch order of arguments
8932         in grub_outb() calls.
8933         (serial_hw_init): Likewise.
8935 2007-11-05  Robert Millan  <rmh@aybabtu.com>
8937         * util/update-grub.in: Allow files in ${update_grub_dir} to contain
8938         spaces.  Skip non-regular files.
8940 2007-11-05  Robert Millan  <rmh@aybabtu.com>
8942         * kern/disk.c (grub_disk_firmware_fini)
8943         (grub_disk_firmware_is_tainted): New variables.
8945         * include/grub/disk.h (grub_disk_firmware_fini)
8946         (grub_disk_firmware_is_tainted): Likewise.
8948         * disk/i386/pc/biosdisk.c (GRUB_MOD_FINI(biosdisk)): Moved from here ...
8949         (grub_disk_biosdisk_fini): ... to here.
8950         (GRUB_MOD_FINI(biosdisk)): Implement using grub_disk_biosdisk_fini().
8951         (GRUB_MOD_INIT(biosdisk)): Abort when `grub_disk_firmware_is_tainted'
8952         is set.  Register grub_disk_biosdisk_fini() in
8953         `grub_disk_firmware_fini'.
8955         * disk/ata.c: Remove `<grub/machine/biosdisk.h>'.
8956         (GRUB_MOD_INIT(ata)): Remove grub_biosdisk_fini() call.
8957         Use `grub_disk_firmware_is_tainted' and `grub_disk_firmware_fini'
8958         to finish existing firmware disk interface.
8960         * conf/i386-linuxbios.rmk (pkgdata_MODULES): Add `ata.mod'.
8961         (ata_mod_SOURCES): New variable.
8962         (ata_mod_CFLAGS): Likewise.
8963         (ata_mod_LDFLAGS): Likewise.
8965 2007-11-05  Robert Millan  <rmh@aybabtu.com>
8967         * disk/ata.c: Remove `<grub/machine/time.h>'.  Include `<grub/time.h>'.
8968         (grub_ata_wait): Reimplement using grub_millisleep().
8970         * include/grub/misc.h (grub_div_roundup): Fix parenthesization.
8971         * include/grub/i386/time.h (grub_cpu_idle): Disable `hlt' instruction.
8973 2007-11-03  Marco Gerards  <marco@gnu.org>
8975         * term/i386/pc/vga_text.c: Include <grub/cpu/io.h>.
8976         (CRTC_ADDR_PORT): New macro.
8977         (CRTC_DATA_PORT): Likewise.
8978         (CRTC_CURSOR): Likewise.
8979         (CRTC_CURSOR_ADDR_HIGH): Likewise.
8980         (CRTC_CURSOR_ADDR_LOW): Likewise.
8981         (update_cursor): New function.
8982         (grub_console_real_putchar): Call `update_cursor'.
8983         (grub_console_gotoxy): Likewise.
8984         (grub_console_cls): Set the default color when clearing the
8985         screen.
8986         (grub_console_setcursor): Implemented.
8988 2007-11-03  Marco Gerards  <marco@gnu.org>
8990         * disk/ata.c (grub_ata_pio_read): Don't wait for the command to
8991         become activate.
8992         (grub_ata_pio_write): Likewise.
8994         (grub_atapi_identify): Wait after issuing an ATA command.
8995         (grub_atapi_packet): Likewise.
8996         (grub_ata_identify): Likewise.
8997         (grub_ata_readwrite): Likewise.
8999 2007-11-03  Marco Gerards  <marco@gnu.org>
9001         * disk/ata.c (grub_ata_pio_read): Detect and return the error code.
9002         (grub_ata_pio_write): Likewise.
9003         (grub_ata_readwrite): Use `grub_error', instead of
9004         returning `grub_errno'.
9006 2007-11-03  Marco Gerards  <marco@gnu.org>
9008         * disk/ata.c (grub_ata_readwrite): Call grub_ata_pio_read and
9009         grub_ata_pio_write once for every single sector, instead of for
9010         multiple sectors.
9012 2007-10-31  Robert Millan  <rmh@aybabtu.com>
9014         * configure.ac: Add `i386-linuxbios' to the list of supported targets.
9016         * conf/i386-linuxbios.rmk: New file.
9018         * kern/i386/pc/hardware.c: Likewise.
9019         * term/i386/pc/at_keyboard.c: Likewise.
9020         * term/i386/pc/vga_text.c: Likewise.
9022         * include/grub/i386/linuxbios/boot.h: Likewise.
9023         * include/grub/i386/linuxbios/console.h: Likewise.
9024         * include/grub/i386/linuxbios/init.h: Likewise.
9025         * include/grub/i386/linuxbios/kernel.h: Likewise.
9026         * include/grub/i386/linuxbios/loader.h: Likewise.
9027         * include/grub/i386/linuxbios/memory.h: Likewise.
9028         * include/grub/i386/linuxbios/serial.h: Likewise.
9029         * include/grub/i386/linuxbios/time.h: Likewise.
9031         * kern/i386/linuxbios/init.c: Likewise.
9032         * kern/i386/linuxbios/startup.S: Likewise.
9033         * kern/i386/linuxbios/table.c: Likewise.
9035 2007-10-31  Marco Gerards  <marco@gnu.org>
9037         * conf/i386-pc.rmk (pkgdata_MODULES): Add `ata.mod'.
9038         (ata_mod_SOURCES): New variable.
9039         (ata_mod_CFLAGS): Likewise.
9040         (ata_mod_LDFLAGS): Likewise.
9042         * disk/ata.c: New file.
9044         * include/grub/disk.h (grub_disk_dev_id): Add
9045         `GRUB_DISK_DEV_ATA_ID'.
9047 2007-10-31  Robert Millan  <rmh@aybabtu.com>
9049         * include/grub/i386/pc/init.h (grub_lower_mem): Moved from here ...
9050         * include/grub/i386/pc/memory.h (grub_lower_mem): ... to here.
9052         * include/grub/i386/pc/init.h (grub_upper_mem): Moved from here ...
9053         * include/grub/i386/pc/memory.h (grub_upper_mem): ... to here.
9055         * include/grub/i386/pc/memory.h: Include `<grub/symbol.h>' and
9056         `<grub/types.h>'.
9058         * loader/i386/pc/multiboot.c: Include `<grub/machine/memory.h>'.
9060 2007-10-27  Robert Millan  <rmh@aybabtu.com>
9062         * include/grub/types.h (ULONG_MAX): Define macro.
9064 2007-10-22  Robert Millan  <rmh@aybabtu.com>
9066         * kern/i386/pc/startup.S: Remove `"kern/i386/realmode.S"'.  Include
9067         `"../realmode.S"'.
9068         Remove `"kern/i386/loader.S"'.  Include `"../loader.S"'.
9070 2007-10-22  Robert Millan  <rmh@aybabtu.com>
9072         * conf/i386-pc.rmk (kernel_img_SOURCES): Remove `disk/i386/pc/biosdisk.c'.
9073         (pkgdata_MODULES): Add `biosdisk.mod'.
9074         (biosdisk_mod_SOURCES, biosdisk_mod_CFLAGS, biosdisk_mod_LDFLAGS): New
9075         variables.
9077         * disk/i386/pc/biosdisk.c: Include `<grub/dl.h>'.
9078         (grub_biosdisk_init): Replace with ...
9079         (GRUB_MOD_INIT(biosdisk)): ... this.
9080         (grub_biosdisk_fini): Replace with ...
9081         (GRUB_MOD_FINI(biosdisk)): ... this.
9083         * kern/i386/pc/init.c: Remove `<grub/machine/biosdisk.h>'.
9084         (grub_machine_init): Remove call to grub_biosdisk_init().
9085         (grub_machine_fini): Remove call to grub_machine_fini().
9087         * util/i386/pc/grub-install.in (modules): Add `biosdisk'.
9089 2007-10-22  Robert Millan  <rmh@aybabtu.com>
9091         * include/grub/time.h: New file.
9092         * include/grub/i386/time.h: Likewise.
9093         * include/grub/powerpc/time.h: Likewise.
9094         * include/grub/sparc64/time.h: Likewise.
9096         * include/grub/i386/pc/time.h (KERNEL_TIME_HEADER): Rename all
9097         instances to ...
9098         (KERNEL_MACHINE_TIME_HEADER): ... this.
9099         * include/grub/powerpc/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
9100         instances to ...
9101         (KERNEL_MACHINE_TIME_HEADER): ... this.
9102         * include/grub/sparc64/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
9103         instances to ...
9104         (KERNEL_MACHINE_TIME_HEADER): ... this.
9106         * kern/i386/efi/init.c: Include `<grub/time.h>'.
9107         (grub_millisleep): New function.
9108         * kern/i386/pc/init.c: Include `<grub/time.h>'.
9109         (grub_millisleep): New function.
9110         * kern/powerpc/ieee1275/init.c: Include `<grub/time.h>'.
9111         Remove `grub/machine/time.h' include.
9112         (grub_millisleep): New function.
9113         * kern/sparc64/ieee1275/init.c: Include `<grub/time.h>'.
9114         Remove `grub/machine/time.h' include.
9115         (grub_millisleep): New function.
9117         * include/grub/misc.h (grub_div_roundup): New function.
9119         * kern/misc.c: Include `<grub/time.h>'.
9120         (grub_millisleep_generic): New function.
9122         * conf/i386-efi.rmk (kernel_mod_HEADERS): Remove `i386/efi/time.h'.
9123         Add `time.h'.
9124         * conf/i386-pc.rmk (kernel_img_HEADERS): Remove `machine/time.h'.
9125         Add `time.h'.
9126         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Remove
9127         `machine/time.h'.  Add `time.h'.
9128         * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
9130 2007-10-21  Robert Millan  <rmh@aybabtu.com>
9132         * include/grub/misc.h (grub_max): New function.
9134 2007-10-21  Robert Millan  <rmh@aybabtu.com>
9136         * util/misc.c (grub_util_info): Call fflush() before returning.
9138 2007-10-20  Robert Millan  <rmh@aybabtu.com>
9140         * genmk.rb (Image): Copy `extra_flags' from here ...
9141         (PModule): ... to here.  Use it in `#{obj}: #{src}' rule.
9143         * commands/i386/cpuid.c (grub_cmd_cpuid): Add __attribute__ ((unused))
9144         to `argc' and `args' arguments.
9146 2007-10-17  Robert Millan  <rmh@aybabtu.com>
9148         * kern/i386/loader.S: New file.
9150         * kern/i386/pc/startup.S (grub_linux_prot_size): Moved from here ...
9151         * kern/i386/loader.S (grub_linux_prot_size)... to here.
9152         * kern/i386/pc/startup.S (grub_linux_tmp_addr): Moved from here ...
9153         * kern/i386/loader.S (grub_linux_tmp_addr)... to here.
9154         * kern/i386/pc/startup.S (grub_linux_real_addr): Moved from here ...
9155         * kern/i386/loader.S (grub_linux_real_addr)... to here.
9156         * kern/i386/pc/startup.S (grub_linux_boot_zimage): Moved from here ...
9157         * kern/i386/loader.S (grub_linux_boot_zimage)... to here.
9158         * kern/i386/pc/startup.S (grub_linux_boot_bzimage): Moved from here ...
9159         * kern/i386/loader.S (grub_linux_boot_bzimage)... to here.
9160         * kern/i386/pc/startup.S (grub_multiboot_real_boot): Moved from here ...
9161         * kern/i386/loader.S (grub_multiboot_real_boot)... to here.
9162         * kern/i386/pc/startup.S (grub_multiboot2_real_boot): Moved from here ...
9163         * kern/i386/loader.S (grub_multiboot2_real_boot)... to here.
9165         * kern/i386/realmode.S: New file.
9167         * kern/i386/pc/startup.S (protstack): Moved from here ...
9168         * kern/i386/realmode.S (protstack)... to here.
9169         * kern/i386/pc/startup.S (gdt): Moved from here ...
9170         * kern/i386/realmode.S (gdt)... to here.
9171         * kern/i386/pc/startup.S (prot_to_real): Moved from here ...
9172         * kern/i386/realmode.S (prot_to_real)... to here.
9174         * kern/i386/pc/startup.S: Include `kern/i386/loader.S' and
9175         `kern/i386/realmode.S'.
9177 2007-10-17  Robert Millan  <rmh@aybabtu.com>
9179         * include/grub/i386/loader.h: New file.
9181         * include/grub/i386/pc/loader.h (grub_linux_prot_size)
9182         (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
9183         (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
9184         (grub_multiboot_real_boot, grub_multiboot2_real_boot)
9185         (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): Moved from here ...
9186         * include/grub/i386/loader.h (grub_linux_prot_size)
9187         (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
9188         (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
9189         (grub_multiboot_real_boot, grub_multiboot2_real_boot)
9190         (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): ... to here.
9192         * include/grub/i386/pc/loader.h: Include `grub/cpu/loader.h'.
9194 2007-10-15  Robert Millan  <rmh@aybabtu.com>
9196         * normal/misc.c (grub_normal_print_device_info): Do not probe for
9197         filesystem when dev->disk is unset.
9198         Do probe for filesystem even when dev->disk->has_partitions is set.
9199         In case a filesystem is found, always report it.
9200         In case it isn't, if dev->disk->has_partitions is set, report that
9201         a partition table was found instead of reporting that no filesystem
9202         could be identified.
9204 2007-10-12  Robert Millan  <rmh@aybabtu.com>
9206         * conf/powerpc-ieee1275.rmk (grub_mkimage_SOURCES): Replace reference
9207         to util/powerpc/ieee1275/grub-mkimage.c with util/elf/grub-mkimage.c.
9209         * include/grub/types.h (grub_host_to_target16): New macro.
9210         (grub_host_to_target32): Likewise.
9211         (grub_host_to_target64): Likewise.
9212         (grub_target_to_host16): Likewise.
9213         (grub_target_to_host32): Likewise.
9214         (grub_target_to_host64): Likewise.
9216         * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
9217         Renamed from to ...
9218         (GRUB_MOD_ALIGN): ...this.  Update all users.
9220         * util/elf/grub-mkimage.c (load_note): Replace grub_cpu_to_be32 with
9221         grub_host_to_target32.
9222         Replace grub_be_to_cpu32 with grub_target_to_host32.
9223         (load_modules): Likewise.
9224         (add_segments): Replace grub_be_to_cpu16 with grub_target_to_host16.
9225         Replace grub_be_to_cpu32 with grub_target_to_host32.
9226         Replace grub_cpu_to_be16 with grub_host_to_target16.
9227         Replace grub_cpu_to_be32 grub_host_to_target32.
9229 2007-10-12  Robert Millan  <rmh@aybabtu.com>
9231         * util/powerpc/ieee1275/grub-mkimage.c: Moved to ...
9232         * util/elf/grub-mkimage.c: ... here.
9234         * DISTLIST: Add `util/elf/grub-mkimage.c'.  Remove
9235         `util/powerpc/ieee1275/grub-mkimage.c'.
9237 2007-10-07  Robert Millan  <rmh@aybabtu.com>
9239         * kern/powerpc/ieee1275/init.c: Rename HEAP_LIMIT to HEAP_MAX_ADDR,
9240         and make it easier to figure out.
9241         Add HEAP_MIN_SIZE and HEAP_MAX_ADDR definitions.
9242         (grub_claim_heap): Use HEAP_MAX_ADDR rather than taking a parameter.
9243         Do not avoid claiming a region above HEAP_MAX_ADDR if that would
9244         leave us with less than HEAP_MIN_SIZE total heap.
9245         Avoid our total amount of heap to surpass HEAP_MAX_SIZE.
9247 2007-10-03  Robert Millan  <rmh@aybabtu.com>
9249         * include/grub/i386/io.h: New file.
9250         * commands/i386/pc/play.c (inb): Removed.
9251         (outb): Removed.
9252         Include grub/cpu/io.h.  Replace inb() with grub_inb() and outb()
9253         with grub_outb().
9254         * term/i386/pc/serial.c  (inb): Removed.
9255         (outb): Removed.
9256         Include grub/cpu/io.h.  Replace inb() with grub_inb() and outb()
9257         with grub_outb().
9258         * term/i386/pc/vga.c  (inb): Removed.
9259         (outb): Removed.
9260         Include grub/cpu/io.h.  Replace inb() with grub_inb() and outb()
9261         with grub_outb().
9263 2007-10-02  Robert Millan  <rmh@aybabtu.com>
9265         * conf/i386-efi.rmk (grub_emu_SOURCES): Add util/hostfs.c.
9266         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9267         Reported by Marcin Kurek.
9269 2007-09-07  Robert Millan  <rmh@aybabtu.com>
9271         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_test_flag): Detect
9272         SmartFirmware version updates (as released by Sven Luther), and avoid
9273         setting GRUB_IEEE1275_FLAG_NO_PARTITION_0 or
9274         GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS unless the running version is
9275         known broken.
9277 2007-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
9279         From Hitoshi Ozeki:
9280         * kern/i386/pc/init.c (compact_mem_regions): Decrease NUM_REGIONS
9281         when merging two regions.
9283 2007-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
9285         * kern/rescue.c (grub_enter_rescue_mode): Free ARGS.
9286         * normal/completion.c (grub_normal_do_completion): Likewise.
9287         Reported by Hitoshi Ozeki.
9289 2007-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
9291         Do not use devices at boot in chainloading.
9293         * loader/i386/pc/chainloader.c (boot_drive): New variable.
9294         (boot_part_addr): Likewise.
9295         (grub_chainloader_boot): Simply call grub_chainloader_real_boot
9296         with BOOT_DRIVE and BOOT_PART_ADDR.
9297         (grub_chainloader_cmd): Set BOOT_DRIVE and BOOT_PART_ADDR.
9298         Reported by Hitoshi Ozeki <h-ozeki@ck2.so-net.ne.jp>.
9300 2007-08-29  Robert Millan  <rmh@aybabtu.com>
9302         Patch from Simon Peter <dn.tlp@gmx.net>:
9303         * genmk.rb (Utility): Append $(#{src}_DEPENDENCIES) to #{obj} targets.
9304         * conf/i386-pc.rmk: Replace grub-probe_DEPENDENCIES with
9305         util/grub-probe.c_DEPENDENCIES.  Replace grub-setup_DEPENDENCIES with
9306         util/i386/pc/grub-setup.c_DEPENDENCIES.
9307         * conf/i386-efi.rmk: Replace grub-probe_DEPENDENCIES with
9308         util/grub-probe.c_DEPENDENCIES.
9309         * conf/powerpc-ieee1275.rmk: Likewise.
9311 2007-08-28  Robert Millan  <rmh@aybabtu.com>
9313         * util/i386/get_disk_name.c: New.  Implement grub_util_get_disk_name()
9314         to tell grub-mkdevicemap how to name devices.
9315         * util/ieee1275/get_disk_name.c: Likewise (using "ofpathname -a"
9316         feature).
9318         * conf/i386-efi.rmk (grub_mkdevicemap_SOURCES): Add
9319         util/i386/get_disk_name.c.
9320         * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Likewise.
9321         * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Add
9322         util/ieee1275/get_disk_name.c.
9324         * include/grub/util/misc.h: grub_util_get_disk_name() declaration.
9326         * DISTLIST: Add util/i386/get_disk_name.c and
9327         util/ieee1275/get_disk_name.c.
9329         * util/grub-mkdevicemap.c: Replace device naming logic with
9330         grub_util_get_disk_name() calls.
9332 2007-08-20  Robert Millan  <rmh@aybabtu.com>
9334         * normal/menu.c (run_menu): Refer to seconds as "s" not "seconds"
9335         (so that it works for both plural and singular quantities).
9337 2007-08-05  Robert Millan  <rmh@aybabtu.com>
9339         * util/grub.d/10_linux.in (test_gt): Strip out vmlinu[xz]- prefix
9340         so that [xz] isn't taken into account when determining order.
9342 2007-08-02  Marco Gerards  <marco@gnu.org>
9344         * DISTLIST: Add `disk/host.c', `fs/ntfs.c', `include/multiboot.h',
9345         `include/multiboot2.h', `include/grub/elfload.h',
9346         `include/multiboot.h', `include/grub/multiboot.h',
9347         `include/grub/multiboot_loader.h', `include/grub/multiboot2.h',
9348         `include/grub/i386/pc/biosdisk.h', `include/grub/util/biosdisk.h',
9349         `kern/elf.c', `loader/multiboot_loader.c',
9350         `loader/multiboot_loader_normal.c', `loader/multiboot2.c',
9351         `loader/i386/pc/multiboot2.c',
9352         `loader/powerpc/ieee1275/multiboot2.c', `util/hostfs.c' and
9353         `util/i386/pc/grub-mkrescue.in'.  Remove
9354         `include/grub/biosdisk.h', `include/grub/i386/pc/multiboot.h',
9355         `include/grub/i386/pc/util/biosdisk.h' and
9356         `include/grub/powerpc/ieee1275/multiboot.h'.
9358 2007-08-02  Bean  <bean123ch@gmail.com>
9360         * conf/common.rmk (pkgdata_MODULES): Add ntfs.mod.
9361         (ntfs_mod_SOURCES): New variable.
9362         (ntfs_mod_CFLAGS): Likewise.
9363         (ntfs_mod_LDFLAGS): Likewise.
9365         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfs.c.
9366         (grub_probe_SOURCES): Likewise.
9367         (grub_emu_SOURCES): Likewise.
9369         * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
9370         (grub_emu_SOURCES): Likewise.
9372         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
9373         (grub_emu_SOURCES): Likewise.
9375         * conf/misc.c (grub_utf16_to_utf8): Fix unicode conversion bug.
9377         * fs/ntfs.c: New file.
9379 2007-08-02  Bean  <bean123ch@gmail.com>
9381         * disk.h (grub_disk): Use NESTED_FUNC_ATTR.
9383         * file.h (grub_file): Likewise.
9385         * fshelp.h (grub_fshelp_read_file): Likewise.
9387         * util/i386/pc/grub-setup.c (setup): Likewise.
9388         (save_first_sector): Likewise.
9389         (save_blocklists): Likewise.
9391         * fs/affs.c (grub_affs_read_file): Likewise.
9393         * fs/ext2.c (grub_ext2_read_file): Likewise.
9395         * fs/fat.c (grub_fat_read_data): Likewise.
9397         * fs/fshelp.c (grub_fshelp_read_file): Likewise.
9399         * fs/hfs.c (grub_hfs_read_file): Likewise.
9401         * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
9403         * fs/jfs.c (grub_jfs_read_file): Likewise.
9405         * fs/minix.c (grub_minix_read_file): Likewise.
9407         * fs/sfs.c (grub_sfs_read_file): Likewise.
9409         * fs/ufs.c (grub_ufs_read_file): Likewise.
9411         * fs/xfs.c (grub_xfs_read_file): Likewise.
9413         * command/blocklist.c (read_blocklist): Likewise.
9414         (print_blocklist): Likewise.
9416 2007-08-02  Marco Gerards  <marco@gnu.org>
9418         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/host.c' and
9419         `util/hostfs.c'.
9421         * disk/host.c: New file.
9423         * util/hostfs.c: Likewise.
9425         * fs/hfsplus.c (grub_hfsplus_mount): When reading out of disk,
9426         return `GRUB_ERR_BAD_FS'.
9427         * fs/sfs.c (grub_sfs_mount): Likewise.
9428         * fs/xfs.c (grub_xfs_mount): Likewise.
9430         * include/grub/disk.h (enum grub_disk_dev_id): Add
9431         `GRUB_DISK_DEVICE_HOST_ID'.
9433         * util/grub-emu.c (main): Initialize and de-initialize hostfs.
9435 2007-07-24  Jerone Young  <jerone@gmail.com>
9437         * conf/i386-pc.rmk: Add Multiboot loader and multiboot 2 to multiboot
9438         modules for compilation.
9439         * conf/powerpc-ieee1275.rmk: Likewise.
9441         * include/multiboot.h: Move multiboot definitions to one file. Rename
9442         many definitions to not get grub specific.
9443         * include/multiboot2.h: Create header with multiboot 2 definitions.
9444         * include/grub/multiboot.h: Header for grub specific function
9445         prototypes and definitions.
9446         * include/grub/multiboot2.h: Likewise.
9447         * include/grub/multiboot_loader.h: Likewise.
9448         * include/grub/i386/pc/multiboot.h: Removed.
9449         * include/grub/powerpc/ieee1275/multiboot.h: Removed.
9451         * loader/multiboot_loader.c: Created to act as a proxy for multiboot 1
9452         and 2 to allow for one multiboot and module commands.
9453         * loader/multiboot2.c: Add multiboot2 functionality.
9454         * loader/i386/pc/multiboot.c: Modify for new multiboot header location
9455         and definition names.
9456         * loader/i386/pc/multiboot2.c: Created to add i386 specific multiboot
9457         2 functions.
9458         * loader/powerpc/ieee1275/multiboot2.c: Created to add powerpc
9459         ieee1275 specific multiboot2 code.
9461         * kern/i386/pc/startup.S: Change headers and definition names for
9462         multiboot. Add function grub_multiboot2_real_boot for multiboot 2.
9464 2007-07-22  Robert Millan  <rmh@aybabtu.com>
9466         * geninitheader.sh: Process file specified in first parameter rather
9467         than hardcoding grub_modules_init.lst.
9468         * geninit.sh: Likewise.  Also, construct header name dynamically rather
9469         than hardcoding grub_modules_init.h.
9471         * conf/common.rmk: Rename grub_modules_init.[ch] files associated with
9472         grub-emu to grub_emu_init.[ch].  Add rules to build analogous
9473         grub_probe_init.[ch] and grub_setup_init.[ch].
9475         * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Replace
9476         grub_modules_init.h with grub_emu_init.h.
9477         (grub_probe_DEPENDENCIES, grub_probe_SOURCES): Add new
9478         grub_probe_init.[ch] files.
9479         * conf/i386-efi.rmk: Likewise.
9480         * conf/i386-pc.rmk: Likewise.
9481         (grub_setup_DEPENDENCIES, grub_setup_SOURCES): Add new
9482         grub_setup_init.[ch] files.
9484         * util/grub-emu.c: Replace grub_modules_init.h with grub_emu_init.h.
9485         * util/grub-probe.c: Include grub_probe_init.h.  Use grub_init_all()
9486         to initialize modules rather than a list of hardcoded functions.
9487         * util/i386/pc/grub-setup.c: Include grub_setup_init.h.  Use
9488         grub_init_all() to initialize modules rather than a list of hardcoded
9489         functions.
9491 2007-07-22  Robert Millan  <rmh@aybabtu.com>
9493         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set
9494         GRUB_IEEE1275_FLAG_NO_PARTITION_0 flag when running on SmartFirmware.
9496 2007-07-22  Robert Millan  <rmh@aybabtu.com>
9498         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
9499         GRUB_IEEE1275_FLAG_BROKEN_OUTPUT flag.
9500         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set this
9501         flag when running on SmartFirmware.
9502         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid running
9503         "output-device output" command when GRUB_IEEE1275_FLAG_BROKEN_OUTPUT
9504         was set.
9506         * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
9507         Increase partno when GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS flag is set,
9508         rather than decreasing it.
9510         * util/i386/pc/grub-setup.c (setup): When embedding is required, but
9511         there's not enough space to do it, fail in the same way as when it
9512         can't be done because there are no partitions.
9514         * util/powerpc/ieee1275/grub-install.in: Improve error message shown
9515         when nvsetenv failed.
9517 2007-07-22  Yoshinori K. Okuji  <okuji@enbug.org>
9519         * conf/i386-pc.rmk (CLEANFILES): Removed for grub-mkrescue,
9520         because this rule is automatically generated.
9521         (grub-mkrescue): Removed for the same reason as above.
9523 2007-07-22  Yoshinori K. Okuji  <okuji@enbug.org>
9525         Migrate to GNU General Public License Version 3.
9527         * COPYING: Replaced with the plain text version of GPLv3.
9529         * config.guess: Updated from gnulib.
9530         * config.sub: Likewise.
9532         * geninit.sh: Output a GPLv3 copyright notice.
9533         * geninitheader.sh: Likewise.
9534         * genmodsrc.sh: Likewise.
9535         * gensymlist.sh.in: Likewise.
9537         * boot/i386/pc/boot.S: Upgraded to GPLv3.
9538         * boot/i386/pc/diskboot.S: Likewise.
9539         * boot/i386/pc/pxeboot.S: Likewise.
9540         * commands/blocklist.c: Likewise.
9541         * commands/boot.c: Likewise.
9542         * commands/cat.c: Likewise.
9543         * commands/cmp.c: Likewise.
9544         * commands/configfile.c: Likewise.
9545         * commands/echo.c: Likewise.
9546         * commands/help.c: Likewise.
9547         * commands/ls.c: Likewise.
9548         * commands/search.c: Likewise.
9549         * commands/terminal.c: Likewise.
9550         * commands/test.c: Likewise.
9551         * commands/videotest.c: Likewise.
9552         * commands/i386/cpuid.c: Likewise.
9553         * commands/i386/pc/halt.c: Likewise.
9554         * commands/i386/pc/play.c: Likewise.
9555         * commands/i386/pc/reboot.c: Likewise.
9556         * commands/i386/pc/vbeinfo.c: Likewise.
9557         * commands/i386/pc/vbetest.c: Likewise.
9558         * commands/ieee1275/halt.c: Likewise.
9559         * commands/ieee1275/reboot.c: Likewise.
9560         * commands/ieee1275/suspend.c: Likewise.
9561         * disk/loopback.c: Likewise.
9562         * disk/lvm.c: Likewise.
9563         * disk/raid.c: Likewise.
9564         * disk/efi/efidisk.c: Likewise.
9565         * disk/i386/pc/biosdisk.c: Likewise.
9566         * disk/ieee1275/ofdisk.c: Likewise.
9567         * font/manager.c: Likewise.
9568         * fs/affs.c: Likewise.
9569         * fs/ext2.c: Likewise.
9570         * fs/fat.c: Likewise.
9571         * fs/fshelp.c: Likewise.
9572         * fs/hfs.c: Likewise.
9573         * fs/hfsplus.c: Likewise.
9574         * fs/iso9660.c: Likewise.
9575         * fs/jfs.c: Likewise.
9576         * fs/minix.c: Likewise.
9577         * fs/sfs.c: Likewise.
9578         * fs/ufs.c: Likewise.
9579         * fs/xfs.c: Likewise.
9580         * hello/hello.c: Likewise.
9581         * include/grub/acorn_filecore.h: Likewise.
9582         * include/grub/arg.h: Likewise.
9583         * include/grub/bitmap.h: Likewise.
9584         * include/grub/boot.h: Likewise.
9585         * include/grub/cache.h: Likewise.
9586         * include/grub/device.h: Likewise.
9587         * include/grub/disk.h: Likewise.
9588         * include/grub/dl.h: Likewise.
9589         * include/grub/elfload.h: Likewise.
9590         * include/grub/env.h: Likewise.
9591         * include/grub/err.h: Likewise.
9592         * include/grub/file.h: Likewise.
9593         * include/grub/font.h: Likewise.
9594         * include/grub/fs.h: Likewise.
9595         * include/grub/fshelp.h: Likewise.
9596         * include/grub/gzio.h: Likewise.
9597         * include/grub/hfs.h: Likewise.
9598         * include/grub/kernel.h: Likewise.
9599         * include/grub/loader.h: Likewise.
9600         * include/grub/lvm.h: Likewise.
9601         * include/grub/misc.h: Likewise.
9602         * include/grub/mm.h: Likewise.
9603         * include/grub/net.h: Likewise.
9604         * include/grub/normal.h: Likewise.
9605         * include/grub/parser.h: Likewise.
9606         * include/grub/partition.h: Likewise.
9607         * include/grub/pc_partition.h: Likewise.
9608         * include/grub/raid.h: Likewise.
9609         * include/grub/rescue.h: Likewise.
9610         * include/grub/script.h: Likewise.
9611         * include/grub/setjmp.h: Likewise.
9612         * include/grub/symbol.h: Likewise.
9613         * include/grub/term.h: Likewise.
9614         * include/grub/terminfo.h: Likewise.
9615         * include/grub/tparm.h: Likewise.
9616         * include/grub/types.h: Likewise.
9617         * include/grub/video.h: Likewise.
9618         * include/grub/efi/api.h: Likewise.
9619         * include/grub/efi/chainloader.h: Likewise.
9620         * include/grub/efi/console.h: Likewise.
9621         * include/grub/efi/console_control.h: Likewise.
9622         * include/grub/efi/disk.h: Likewise.
9623         * include/grub/efi/efi.h: Likewise.
9624         * include/grub/efi/pe32.h: Likewise.
9625         * include/grub/efi/time.h: Likewise.
9626         * include/grub/i386/linux.h: Likewise.
9627         * include/grub/i386/setjmp.h: Likewise.
9628         * include/grub/i386/types.h: Likewise.
9629         * include/grub/i386/efi/kernel.h: Likewise.
9630         * include/grub/i386/efi/loader.h: Likewise.
9631         * include/grub/i386/efi/time.h: Likewise.
9632         * include/grub/i386/pc/biosdisk.h: Likewise.
9633         * include/grub/i386/pc/boot.h: Likewise.
9634         * include/grub/i386/pc/chainloader.h: Likewise.
9635         * include/grub/i386/pc/console.h: Likewise.
9636         * include/grub/i386/pc/init.h: Likewise.
9637         * include/grub/i386/pc/kernel.h: Likewise.
9638         * include/grub/i386/pc/loader.h: Likewise.
9639         * include/grub/i386/pc/memory.h: Likewise.
9640         * include/grub/i386/pc/multiboot.h: Likewise.
9641         * include/grub/i386/pc/serial.h: Likewise.
9642         * include/grub/i386/pc/time.h: Likewise.
9643         * include/grub/i386/pc/vbe.h: Likewise.
9644         * include/grub/i386/pc/vbeblit.h: Likewise.
9645         * include/grub/i386/pc/vbefill.h: Likewise.
9646         * include/grub/i386/pc/vbeutil.h: Likewise.
9647         * include/grub/i386/pc/vga.h: Likewise.
9648         * include/grub/ieee1275/ieee1275.h: Likewise.
9649         * include/grub/ieee1275/ofdisk.h: Likewise.
9650         * include/grub/powerpc/libgcc.h: Likewise.
9651         * include/grub/powerpc/setjmp.h: Likewise.
9652         * include/grub/powerpc/types.h: Likewise.
9653         * include/grub/powerpc/ieee1275/biosdisk.h: Likewise.
9654         * include/grub/powerpc/ieee1275/console.h: Likewise.
9655         * include/grub/powerpc/ieee1275/ieee1275.h: Likewise.
9656         * include/grub/powerpc/ieee1275/kernel.h: Likewise.
9657         * include/grub/powerpc/ieee1275/loader.h: Likewise.
9658         * include/grub/powerpc/ieee1275/multiboot.h: Likewise.
9659         * include/grub/powerpc/ieee1275/time.h: Likewise.
9660         * include/grub/powerpc/ieee1275/util/biosdisk.h: Likewise.
9661         * include/grub/sparc64/libgcc.h: Likewise.
9662         * include/grub/sparc64/setjmp.h: Likewise.
9663         * include/grub/sparc64/types.h: Likewise.
9664         * include/grub/sparc64/ieee1275/console.h: Likewise.
9665         * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
9666         * include/grub/sparc64/ieee1275/kernel.h: Likewise.
9667         * include/grub/sparc64/ieee1275/time.h: Likewise.
9668         * include/grub/util/biosdisk.h: Likewise.
9669         * include/grub/util/getroot.h: Likewise.
9670         * include/grub/util/lvm.h: Likewise.
9671         * include/grub/util/misc.h: Likewise.
9672         * include/grub/util/raid.h: Likewise.
9673         * include/grub/util/resolve.h: Likewise.
9674         * io/gzio.c: Likewise.
9675         * kern/device.c: Likewise.
9676         * kern/disk.c: Likewise.
9677         * kern/dl.c: Likewise.
9678         * kern/elf.c: Likewise.
9679         * kern/env.c: Likewise.
9680         * kern/err.c: Likewise.
9681         * kern/file.c: Likewise.
9682         * kern/fs.c: Likewise.
9683         * kern/loader.c: Likewise.
9684         * kern/main.c: Likewise.
9685         * kern/misc.c: Likewise.
9686         * kern/mm.c: Likewise.
9687         * kern/parser.c: Likewise.
9688         * kern/partition.c: Likewise.
9689         * kern/rescue.c: Likewise.
9690         * kern/term.c: Likewise.
9691         * kern/efi/efi.c: Likewise.
9692         * kern/efi/init.c: Likewise.
9693         * kern/efi/mm.c: Likewise.
9694         * kern/i386/dl.c: Likewise.
9695         * kern/i386/efi/init.c: Likewise.
9696         * kern/i386/efi/startup.S: Likewise.
9697         * kern/i386/pc/init.c: Likewise.
9698         * kern/i386/pc/lzo1x.S: Likewise.
9699         * kern/i386/pc/startup.S: Likewise.
9700         * kern/ieee1275/ieee1275.c: Likewise.
9701         * kern/powerpc/cache.S: Likewise.
9702         * kern/powerpc/dl.c: Likewise.
9703         * kern/powerpc/ieee1275/cmain.c: Likewise.
9704         * kern/powerpc/ieee1275/crt0.S: Likewise.
9705         * kern/powerpc/ieee1275/init.c: Likewise.
9706         * kern/powerpc/ieee1275/openfw.c: Likewise.
9707         * kern/sparc64/cache.S: Likewise.
9708         * kern/sparc64/dl.c: Likewise.
9709         * kern/sparc64/ieee1275/init.c: Likewise.
9710         * kern/sparc64/ieee1275/openfw.c: Likewise.
9711         * loader/efi/chainloader.c: Likewise.
9712         * loader/efi/chainloader_normal.c: Likewise.
9713         * loader/i386/efi/linux.c: Likewise.
9714         * loader/i386/efi/linux_normal.c: Likewise.
9715         * loader/i386/pc/chainloader.c: Likewise.
9716         * loader/i386/pc/chainloader_normal.c: Likewise.
9717         * loader/i386/pc/linux.c: Likewise.
9718         * loader/i386/pc/linux_normal.c: Likewise.
9719         * loader/i386/pc/multiboot.c: Likewise.
9720         * loader/i386/pc/multiboot_normal.c: Likewise.
9721         * loader/powerpc/ieee1275/linux.c: Likewise.
9722         * loader/powerpc/ieee1275/linux_normal.c: Likewise.
9723         * normal/arg.c: Likewise.
9724         * normal/cmdline.c: Likewise.
9725         * normal/command.c: Likewise.
9726         * normal/completion.c: Likewise.
9727         * normal/execute.c: Likewise.
9728         * normal/function.c: Likewise.
9729         * normal/lexer.c: Likewise.
9730         * normal/main.c: Likewise.
9731         * normal/menu.c: Likewise.
9732         * normal/menu_entry.c: Likewise.
9733         * normal/misc.c: Likewise.
9734         * normal/parser.y: Likewise.
9735         * normal/script.c: Likewise.
9736         * normal/i386/setjmp.S: Likewise.
9737         * normal/powerpc/setjmp.S: Likewise.
9738         * normal/sparc64/setjmp.S: Likewise.
9739         * partmap/acorn.c: Likewise.
9740         * partmap/amiga.c: Likewise.
9741         * partmap/apple.c: Likewise.
9742         * partmap/gpt.c: Likewise.
9743         * partmap/pc.c: Likewise.
9744         * partmap/sun.c: Likewise.
9745         * term/gfxterm.c: Likewise.
9746         * term/terminfo.c: Likewise.
9747         * term/efi/console.c: Likewise.
9748         * term/i386/pc/console.c: Likewise.
9749         * term/i386/pc/serial.c: Likewise.
9750         * term/i386/pc/vesafb.c: Likewise.
9751         * term/i386/pc/vga.c: Likewise.
9752         * term/ieee1275/ofconsole.c: Likewise.
9753         * util/biosdisk.c: Likewise.
9754         * util/console.c: Likewise.
9755         * util/genmoddep.c: Likewise.
9756         * util/getroot.c: Likewise.
9757         * util/grub-emu.c: Likewise.
9758         * util/grub-mkdevicemap.c: Likewise.
9759         * util/grub-probe.c: Likewise.
9760         * util/lvm.c: Likewise.
9761         * util/misc.c: Likewise.
9762         * util/raid.c: Likewise.
9763         * util/resolve.c: Likewise.
9764         * util/update-grub.in: Likewise.
9765         * util/update-grub_lib.in: Likewise.
9766         * util/grub.d/00_header.in: Likewise.
9767         * util/grub.d/10_hurd.in: Likewise.
9768         * util/grub.d/10_linux.in: Likewise.
9769         * util/i386/efi/grub-install.in: Likewise.
9770         * util/i386/efi/grub-mkimage.c: Likewise.
9771         * util/i386/pc/grub-install.in: Likewise.
9772         * util/i386/pc/grub-mkimage.c: Likewise.
9773         * util/i386/pc/grub-mkrescue.in: Likewise.
9774         * util/i386/pc/grub-setup.c: Likewise.
9775         * util/i386/pc/misc.c: Likewise.
9776         * util/powerpc/ieee1275/grub-install.in: Likewise.
9777         * util/powerpc/ieee1275/grub-mkimage.c: Likewise.
9778         * util/powerpc/ieee1275/misc.c: Likewise.
9779         * video/bitmap.c: Likewise.
9780         * video/video.c: Likewise.
9781         * video/i386/pc/vbe.c: Likewise.
9782         * video/i386/pc/vbeblit.c: Likewise.
9783         * video/i386/pc/vbefill.c: Likewise.
9784         * video/i386/pc/vbeutil.c: Likewise.
9785         * video/readers/tga.c: Likewise.
9787 2007-07-02  Robert Millan  <rmh@aybabtu.com>
9789         * conf/i386-efi.rmk: Replace obsolete reference to
9790         util/i386/pc/biosdisk.c with util/biosdisk.c, and util/i386/pc/getroot.c
9791         with util/getroot.c.
9792         * conf/powerpc-ieee1275.rmk: Likewise.
9793         * conf/sparc64-ieee1275.rmk: Likewise.
9795         * util/grub-emu.c (main): Fix unchecked pointer handling.
9797 2007-07-02  Robert Millan  <rmh@aybabtu.com>
9799         * util/i386/efi/grub-install.in: Allow `grub_probe --target=partmap'
9800         invocation to fail, in order to support partition-less media.
9802         * util/i386/pc/grub-install.in: Likewise.
9804         * util/powerpc/ieee1275/grub-install.in: Use grub-probe to determine
9805         which fs or partmap modules are needed (akin to its sister scripts).
9807         Also use grub-probe to get rid of unportable /proc/mounts check.
9809         Print the same informational message that the other scripts do, before
9810         exiting.
9812 2007-06-23  Robert Millan  <rmh@aybabtu.com>
9814         * util/update-grub_lib.in (font_path): New function.  Determine whether
9815         a font file can be found and, if so, echo the GRUB path to it.
9817         * util/update-grub.in: Handle multiple terminals depending on user
9818         input, platform availability and font file presence.  Propagate
9819         variables of our findings to /etc/grub.d/ children.
9821         * util/grub.d/00_header.in: Handle multiple terminals, based on
9822         environment setup by update-grub.
9824 2007-06-23  Robert Millan  <rmh@aybabtu.com>
9826         * conf/i386-pc.rmk (pkgdata_MODULES): Add serial.mod.
9828 2007-06-21  Robert Millan  <rmh@aybabtu.com>
9830         * include/grub/i386/pc/kernel.h: Define GRUB_KERNEL_MACHINE_DATA_END to
9831         indicate end of data section in kernel image.
9832         * include/grub/i386/efi/kernel.h: Define GRUB_KERNEL_MACHINE_PREFIX and
9833         GRUB_KERNEL_MACHINE_DATA_END.
9835         * kern/i386/pc/startup.S: Do not initialize grub_prefix, only reserve
9836         space for it.
9837         * kern/i386/efi/startup.S: Likewise.
9839         * util/i386/pc/grub-mkimage.c: Initialize grub_prefix to /boot/grub
9840         during image generation.  Implement --prefix option to override this
9841         patch.
9842         * util/i386/efi/grub-mkimage.c: Likewise.
9844         * util/update-grub_lib.in (convert_system_path_to_grub_path): Split
9845         code to make path relative to its root into a separate function.
9847         * util/i386/pc/grub-install.in: Use newly provided
9848         make_system_path_relative_to_its_root() to convert ${grubdir}, then
9849         pass the result to grub-install --prefix.
9851 2007-06-13  Robert Millan  <rmh@aybabtu.com>
9853         * include/grub/util/misc.h: Define DEFAULT_DIRECTORY and
9854         DEFAULT_DEVICE_MAP.
9855         * util/grub-emu.c: Use above definitions from misc.h instead of
9856         defining them.
9857         * util/grub-mkdevicemap.c: Likewise.
9858         * util/i386/pc/grub-setup.c: Likewise.
9859         * util/grub-probe.c: Likewise.
9860         (probe): Abort with grub_util_error() when either
9861         grub_guess_root_device or grub_util_get_grub_dev fails.
9863 2007-06-12  Robert Millan  <rmh@aybabtu.com>
9865         * normal/command.c (grub_command_execute): Use NULL rather than 0 for
9866         "pager" assignment.
9867         * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Likewise for
9868         "pcdata".
9869         * util/grub-probe.c (probe): Likewise for "drive_name".
9871 2007-06-11  Robert Millan  <rmh@aybabtu.com>
9873         * util/i386/pc/grub-mkrescue.in: Pad both floppy images with zeroes,
9874         not just the cdrom one.
9876 2007-06-11  Robert Millan  <rmh@aybabtu.com>
9878         * util/i386/pc/grub-mkrescue.in: Add "set -e".
9879         Add --pkglibdir=DIR option to override pkglibdir.
9880         Mention --image-type=TYPE in help output.
9881         Fix --grub-mkimage (it was a no-op).
9882         Abort gracefully when no parameter is given.
9884 2007-06-11  Robert Millan  <rmh@aybabtu.com>
9886         * util/i386/pc/grub-mkrescue.in: New file.
9887         * conf/i386-pc.rmk: Add its build declarations.  Put it in bin_SCRIPTS.
9888         * Makefile.in: Handle bin_SCRIPTS.
9890 2007-06-10  Vesa Jaaskelainen  <chaac@nic.fi>
9892         * term/gfxterm.c (grub_gfxterm_init): Added support for specifying
9893         list of video modes.
9895 2007-06-06  Robert Millan  <rmh@aybabtu.com>
9897         * util/update-grub_lib.in (convert_system_path_to_grub_path): Abort if
9898         file doesn't exist, or if it is in a filesystem grub can't read.
9900         * util/update-grub.in: Set fallback for GRUB_FS check to "unknown".  Do
9901         not abort if GRUB_DRIVE could not be defined.  Rearrange generated
9902         header comment to fit in 80 columns when the variables are resolved.
9904         * util/grub.d/00_header.in: Only set root variable when GRUB_DRIVE
9905         could be identified by update-grub.  Remove redundant check for
9906         unifont.pff existence (since convert_system_path_to_grub_path now
9907         handles that).
9909 2007-06-04  Robert Millan  <rmh@aybabtu.com>
9911         * conf/i386-efi.rmk (grub_probe_SOURCES): Add partmap/apple.c.
9913         * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.
9915         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add partmap/pc.c.
9917 2007-06-04  Robert Millan  <rmh@aybabtu.com>
9919         * conf/powerpc-ieee1275.rmk: Enable grub-mkdevicemap and grub-probe.
9921         * include/grub/partition.h: Declare grub_apple_partition_map_init and
9922         grub_apple_partition_map_fini.
9924         * util/biosdisk.c
9925         (grub_util_biosdisk_open): Replace BLKGETSIZE with BLKGETSIZE64 (needed
9926         to access >2 TiB disks).
9928         Print disk->total_sectors with %llu instead of %lu, since this
9929         variable is always 64-bit (prevents wrong disk size from being displayed
9930         on either >2 TiB disk or big-endian CPU).
9932         (grub_util_biosdisk_get_grub_dev): Convert gpt_partition_map handling
9933         into a generic case that supports all (sane) partition maps.
9935         Stop using grub_cpu_to_le32() on dos_part / bsd_part since it actually
9936         breaks big-endian.
9938         * util/grub-probe.c: Call grub_apple_partition_map_init() before probe()
9939         and grub_apple_partition_map_fini() after that.
9941 2007-06-01  Robert Millan  <rmh@aybabtu.com>
9943         * util/update-grub.in: Export GRUB_CMDLINE_LINUX.
9945         * util/grub.d/00_header.in: Only enable gfxterm when
9946         convert_system_path_to_grub_path() succeeds.
9948 2007-05-20  Robert Millan  <rmh@aybabtu.com>
9950         * util/update-grub_lib.in: New file.
9951         * DISTLIST: Add update-grub_lib.in.
9952         * conf/common.rmk: Generate update-grub_lib and install it in
9953         $(lib_DATA).
9954         * Makefile.in: Add install routine for $(lib_DATA).
9956         * util/grub.d/00_header.in: Use convert_system_path_to_grub_path()
9957         function provided by update-grub_lib to support arbitrary paths of
9958         unifont.pff.
9959         * util/update-grub.in: Use convert_system_path_to_grub_path() to
9960         initialize GRUB_DRIVE_BOOT and GRUB_DRIVE_BOOT_GRUB variables.
9962 2007-05-19  Robert Millan  <rmh@aybabtu.com>
9964         * commands/i386/cpuid.c: New module.
9965         * DISTLIST: Add it.
9966         * conf/i386-efi.rmk: Enable cpuid.mod.
9967         * conf/i386-pc.rmk: Likewise.
9969 2007-05-18  Jeroen Dekkers  <jeroen@dekkers.cx>
9971         * kern/disk.c (grub_disk_read): Check return value of
9972         grub_realloc().
9974 2007-05-18  Jeroen Dekkers  <jeroen@dekkers.cx>
9976         * util/getroot.c (grub_util_get_grub_dev): Support partitionable
9977         arrays.
9978         * disk/raid.c (grub_raid_open): Likewise.
9980 2007-05-17  Jeroen Dekkers  <jeroen@dekkers.cx>
9982         * util/biosdisk.c (linux_find_partition): Allocate real_dev on the
9983         stack instead of on the heap.
9985         * kern/disk.c (grub_disk_read): Make sure tmp_buf is big enough
9986         before doing a read on it.
9988         * configure.ac: Only use -fno-stack-protector for the target
9989         environment.
9991 2007-05-17  Jeroen Dekkers  <jeroen@dekkers.cx>
9993         * video/i386/pc/vbe.c (grub_video_vbe_create_render_target): Add
9994         __attribute_ ((unused)) to mode_type argument.
9996         * util/getroot.c (grub_guess_root_device): Fix #endif.
9998         * kern/misc.c (memcmp): Fix prototype.
10000         * include/grub/partition.h [GRUB_UTIL]
10001         (grub_gpt_partition_map_init): Add prototype.
10002         (grub_gpt_partition_map_fini): Likewise.
10004         * fs/jfs.c (struct grub_jfs_inode): Put __attribute__ ((packed)
10005         at the right place.
10007         * fs/fat.c (grub_fat_mount): Replace ~0UL with ~0U.
10008         (grub_fat_read_data): Likewise.
10009         (grub_fat_find_dir): Likewise.
10011         * font/manager.c (find_glyph): Make table a const.
10012         (grub_font_get_glyph): Remove bitmap from if statement.
10014 2007-05-16  Jeroen Dekkers  <jeroen@dekkers.cx>
10016         * util/getroot.c (grub_guess_root_device): Remove RAID and LVM
10017         code, first search for device in /dev/mapper, then in /dev.
10018         (grub_util_get_grub_dev): New function.
10019         * include/grub/util/getroot.h (grub_util_get_grub_dev): Add
10020         prototype.
10021         * util/grub-probe.c (probe): Remove check for RAID, call
10022         grub_util_get_grub_dev() instead of
10023         grub_util_biosdisk_get_grub_dev().
10024         * util/grub-emu.c (main): Call grub_util_get_grub_dev() instead of
10025         grub_util_biosdisk_get_grub_dev().
10026         * util/i386/pc/grub-setup.c (main): Likewise.
10028 2007-05-16  Robert Millan  <rmh@aybabtu.com>
10030         * DISTLIST: Update for the latest changes.
10031         * conf/i386-pc.rmk: Use the new paths for util/getroot.c,
10032         util/grub-mkdevicemap.c, util/grub-probe.c and util/biosdisk.c.
10033         * util/grub-emu.c: Replace grub/i386/pc/util/biosdisk.h with
10034         grub/util/biosdisk.h.
10035         * util/i386/pc/grub-setup.c: Replace grub/machine/util/biosdisk.h with
10036         grub/util/biosdisk.h.
10038 2007-05-16  Robert Millan  <rmh@aybabtu.com>
10040         * util/grub.d/00_header.in: Set default gfxmode to `640x480'.
10042 2007-05-16  Robert Millan  <rmh@aybabtu.com>
10044         * util/i386/efi/grub-install.in: New.
10045         * conf/i386-efi.rmk: Enable grub-mkdevicemap, grub-probe and the
10046         newly added grub-install.
10047         * util/biosdisk.c: Remove unnecessary grub/machine/biosdisk.h
10048         include.
10049         * util/getroot.c: Replace grub/i386/pc/util/biosdisk.h with
10050         grub/util/biosdisk.h.
10051         * util/grub-probe.c: Replace grub/machine/util/biosdisk.h with
10052         grub/util/biosdisk.h.
10054 2007-05-16  Robert Millan  <rmh@aybabtu.com>
10056         * include/grub/i386/pc/util/biosdisk.h: Moved to ...
10057         * include/grub/util/biosdisk.h: ... here.
10058         * util/i386/pc/biosdisk.c: Moved to ...
10059         * util/biosdisk.c: ... here.
10060         * util/i386/pc/getroot.c: Moved to ...
10061         * util/getroot.c: ... here.
10062         * util/i386/pc/grub-mkdevicemap.c: Moved to ...
10063         * util/grub-mkdevicemap.c: ... here.
10064         * util/i386/pc/grub-probe.c: Moved to ...
10065         * util/grub-probe.c: ... here.
10067 2007-05-15  Robert Millan  <rmh@aybabtu.com>
10069         * util/update-grub.in: Remove duplicated line in grub.cfg header
10070         message.
10072 2007-05-13  Robert Millan  <rmh@aybabtu.com>
10074         * util/update-grub.in: Fix a few assumptions about the devices holding
10075         /, /boot and /boot/grub being the same.
10076         * util/grub.d/00_header.in: Likewise.
10077         * util/grub.d/10_hurd.in: Likewise.
10078         * util/grub.d/10_linux.in: Likewise.
10080         * util/grub.d/10_linux.in: Implement Linux image sorting with arbitrary
10081         patterns.  Use that to define the `.old' suffix as older than `'.
10083         * util/grub.d/00_header.in: Set default gfxmode to `800x600x16'.
10085         * util/update-grub.in: Add a reference to ${sysconfdir}/default/grub in
10086         the grub.cfg header message.
10088 2007-05-11  Robert Millan  <rmh@aybabtu.com>
10090         * util/update-grub.in: Create device.map if it doesn't already exist,
10091         before attempting to run grub-probe.
10092         Check for grub-probe and grub-mkdevicemap with the same code
10093         grub-install is using.
10094         Remove test mode.
10096 2007-05-09  Jeroen Dekkers  <jeroen@dekkers.cx>
10098         * Makefile.in: Add the datarootdir autoconf variable.
10100 2007-05-09  Robert Millan  <rmh@aybabtu.com>
10102         * util/i386/pc/grub-probe.c (probe): When detecting partition map,
10103         fail gracefully if dev->disk->partition == NULL.
10105 2007-05-07  Robert Millan  <rmh@aybabtu.com>
10107         * util/i386/pc/grub-probe.c: Add `grub-probe -t partmap' parameter to
10108         determine partition map module.
10109         * util/i386/pc/grub-install.in: Use this feature to decide which
10110         partition module to load, instead of hardcoding pc and gpt.
10112 2007-05-07  Robert Millan  <rmh@aybabtu.com>
10114         * Makefile.in: Fix assumption that $(srcdir) has a trailing slash when
10115         source directory differs from build directory.
10117 2007-05-05  Robert Millan  <rmh@aybabtu.com>
10119         * util/powerpc/ieee1275/grub-install.in: Fix syntax error in pkglibdir
10120         initialisation.
10122 2007-05-05  Robert Millan  <rmh@aybabtu.com>
10124         * util/update-grub.in: Create ${grub_prefix} if it doesn't exist.
10126 2007-05-05  Robert Millan  <rmh@aybabtu.com>
10128         * util/grub.d/10_linux.in: Allow the administrator to insert Linux
10129         command-line arguments via ${GRUB_CMDLINE_LINUX}.
10131 2007-05-05  Robert Millan  <rmh@aybabtu.com>
10133         * conf/i386-pc.rmk (grub_setup_SOURCES): Add partmap/gpt.c.
10134         (grub_probe_SOURCES): Likewise.
10135         * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): Detect
10136         GPT and initialize dos_part and bsd_part accordingly.
10137         * util/i386/pc/grub-setup.c (setup): Ditto for install_dos_part and
10138         install_bsd_part.
10139         (main): Activate gpt module for use during partition identification,
10140         and deactivate it afterwards.
10141         * util/i386/pc/grub-install.in: Add gpt module to core.img.
10142         * util/i386/pc/grub-probe.c (main): Activate gpt module for use during
10143         partition identification, and deactivate it afterwards.
10145 2007-05-05  Robert Millan  <rmh@aybabtu.com>
10147         * term/i386/pc/console.c (grub_console_fini): Call
10148         grub_term_set_current() before grub_term_unregister().
10150 2007-05-04  Robert Millan  <rmh@aybabtu.com>
10152         * DISTLIST: Add util/update-grub.in, util/grub.d/00_header.in,
10153         util/grub.d/10_hurd.in, util/grub.d/10_linux.in and util/grub.d/README.
10154         * Makefile.in: Build update-grub_SCRIPTS.  Install update-grub_SCRIPTS
10155         and update-grub_DATA.
10156         * conf/common.rmk: Build and install update-grub components.
10157         * conf/common.mk: Regenerate.
10158         * util/update-grub.in: New.  Core of update-grub.
10159         * util/grub.d/00_header.in: New.  Generates grub.cfg header.
10160         * util/grub.d/10_hurd.in: New.  Generates boot entries for the Hurd.
10161         * util/grub.d/10_linux.in: New.  Generates boot entries for Linux.
10162         * util/grub.d/README: New.  Document grub.d directory layout.
10164 2007-05-01  Robert Millan  <rmh@aybabtu.com>
10166         * util/grub-emu.c: Move initialization functions
10167         grub_util_biosdisk_init() and grub_init_all() before
10168         grub_util_biosdisk_get_grub_dev(), which relies on them.
10170 2007-04-19  Robert Millan  <rmh@aybabtu.com>
10172         * util/powerpc/ieee1275/grub-install.in: Initialize ${bindir}, since
10173         it is used later.
10175 2007-04-18  Jerone Young  <jerone@gmail.com>
10177         * kernel/elf.c: Add missing parenthesis for conditional statement
10178         stanza.
10180 2007-04-10  Jerone Young  <jerone@gmail.com>
10182         * util/i386/pc/getroot.c: Update so that if root device is /dev/root ,
10183         continue on and look for device node with real device name.
10185 2007-04-10  Jerone Young  <jerone@gmail.com>
10187         * configure.ac: Add argument for autoconf to use transformation
10188         ability.
10189         * Makefile.in: Add autoconf package transformation code.
10190         * util/i386/pc/grub-install.in: Likewise.
10191         * util/powerpc/ieee1275/grub-install.in: Likewise.
10193 2007-03-19  Yoshinori K. Okuji  <okuji@enbug.org>
10195         * fs/ext2.c (EXT2_GOOD_OLD_REVISION): New macro.
10196         (EXT2_GOOD_OLD_INODE_SIZE): Likewise.
10197         (EXT2_REVISION): Likewise.
10198         (EXT2_INODE_SIZE): Likewise.
10199         (struct grub_ext2_block_group): Added a missing member
10200         "used_dirs".
10201         (grub_ext2_read_inode): Divide by the inode size in a superblock
10202         instead of 128 to obtain INODES_PER_BLOCK.
10203         Use the macro EXT2_INODE_SIZE instead of directly using
10204         SBLOCK->INODE_SIZE.
10206 2007-03-18  Yoshinori K. Okuji  <okuji@enbug.org>
10208         * fs/ext2.c (grub_ext2_read_inode): Use the inode size in a
10209         superblock instead of the structure size to compute an
10210         offset. This fixes the problem that GRUB could not read a
10211         filesystem when inode size is different from 128-byte.
10213 2007-03-05  Marco Gerards  <marco@gnu.org>
10215         * normal/main.c (read_config_file): When "menu" is not set, create
10216         an initial context.
10218 2007-02-21  Hollis Blanchard  <hollis@penguinppc.org>
10220         * kern/powerpc/ieee1275/init.c (HEAP_SIZE): Removed.
10221         (HEAP_LIMIT): New macro.
10222         (grub_claim_heap): Claim memory up to `heaplimit'.
10224 2007-02-21  Hollis Blanchard  <hollis@penguinppc.org>
10226         * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Link at 64KB.
10227         * kern/powerpc/ieee1275/init.c (_end): Add declaration.
10228         (_start): Likewise.
10229         (grub_arch_modules_addr): Return address after `_end'.
10230         * util/powerpc/ieee1275/grub-mkimage.c: Include grub/misc.h.
10231         (load_modules): Use new parameter as `p_paddr' and `p_vaddr'.
10232         (add_segments): Calculate `_end' from phdr size and location.
10233         (ALIGN_UP): Moved to ...
10234         * include/grub/misc.h: here.
10235         * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
10236         New macro.
10237         (GRUB_IEEE1275_MODULE_BASE): Removed.
10239 2007-02-20  Hollis Blanchard  <hollis@penguinppc.org>
10241         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Correct
10242         loop boundary.
10244 2007-02-20  Hollis Blanchard  <hollis@penguinppc.org>
10246         * include/grub/elfload.h (grub_elf32_load_hook_t): Return grub_err_t.
10247         All users updated.
10248         (grub_elf64_load_hook_t): Likewise.
10249         * kern/elf.c: Call `grub_error_push' before `grub_error'. Improve
10250         debug output.
10252 2007-02-20  Hollis Blanchard  <hollis@penguinppc.org>
10254         * kern/mm.c: Update copyright.
10255         (grub_mm_debug): Correct syntax error.
10256         (grub_mm_dump_free): New function.
10257         (grub_debug_free): Call `grub_free'.
10258         * include/grub/mm.h: Update copyright.
10259         (grub_mm_dump_free): Add declaration.
10261 2007-02-12  Hollis Blanchard  <hollis@penguinppc.org>
10263         * include/grub/ieee1275/ieee1275.h: Update copyright.
10264         * kern/powerpc/ieee1275/init.c: Likewise.
10265         * kern/powerpc/ieee1275/openfw.c: Likewise.
10267         * loader/powerpc/ieee1275/linux.c: Likewise.
10268         * include/grub/elfload.h: Likewise.
10269         * kern/elf.c: Likewise.
10270         (grub_elf32_load): Pass `base' and `size' parameters.  Update all
10271         callers.
10272         (grub_elf64_load): Likewise.
10273         (grub_elf32_load_segment): Move to a nested function.
10274         (grub_elf64_load_segment): Likewise.
10276 2007-02-12  Hollis Blanchard  <hollis@penguinppc.org>
10278         * include/grub/ieee1275/ieee1275.h (grub_available_iterate): New
10279         prototype.
10280         * kern/powerpc/ieee1275/init.c (grub_heap_start): Removed.
10281         (grub_heap_len): Likewise.
10282         (HEAP_SIZE): New macro.
10283         (grub_claim_heap): New function.
10284         (grub_machine_init): Don't claim heap directly.  Call
10285         `grub_claim_heap'.
10286         * kern/powerpc/ieee1275/openfw.c: Include alloca.h.
10287         (grub_available_iterate): New function.
10289 2007-02-03  Thomas Schwinge  <tschwinge@gnu.org>
10291         * aclocal.m4 (grub_CHECK_STACK_PROTECTOR): New definition.
10292         * configure.ac: Use it for testing the HOST and TARGET compilers.
10294 2006-12-13  Thomas Schwinge  <tschwinge@gnu.org>
10296         * Makefile.in (enable_grub_emu): New variable.
10297         * configure.ac (--enable-grub-emu): New option.
10298         Do the checks for (n)curses only if `--enable-grub-emu' is requested.
10299         * conf/i386-efi.rmk (sbin_UTILITIES): Add `grub-emu' only if requested.
10300         * conf/i386-pc.rmk: Likewise.
10301         * conf/powerpc-ieee1275.rmk: Likewise.
10302         * conf/sparc64-ieee1275.rmk (bin_UTILITIES): Likewise.
10304 2006-12-12  Marco Gerards  <marco@gnu.org>
10306         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_MENU'.
10308         * kern/env.c (grub_env_unset): Don't free the member `value' when
10309         the type is GRUB_ENV_VAR_DATA, in this case it's a user defined
10310         pointer.
10312         * normal/main.c (current_menu): Removed.
10313         (free_menu): Unset the `menu' environment variable.
10314         (grub_normal_menu_addentry): Make use of the environment variable
10315         `menu', instead of using the global `current_menu'.  Allocate
10316         memory for the sourcecode of this entry.
10317         (read_config_file): New argument `nested', changed all callers.
10318         Only in the case of a new context, initialize a new menu.  Set the
10319         `menu' environment variable.
10320         (grub_normal_execute): Don't set and unset the environment
10321         variable `menu' here anymore.  Only free the menu when leaving the
10322         context.
10324         * util/i386/pc/biosdisk.c (linux_find_partition): Fixed a memory
10325         leak.
10327 2006-12-11  Marco Gerards  <marco@gnu.org>
10329         * normal/menu_entry.c (run): Fix off by one bug so the last line
10330         is executed.  Move the loader check to outside the loop.
10332 2006-12-08  Hollis Blanchard  <hollis@penguinppc.org>
10334         * kern/powerpc/ieee1275/cmain.c (cmain): Mark r3 and r4 as `UNUSED'.
10336 2006-11-25  Yoshinori K. Okuji  <okuji@enbug.org>
10338         * util/i386/pc/grub-mkimage.c (generate_image): Fix the offset of
10339         the number of sectors.  Reported by Andrey Shuvikov
10340         <mr_hyro@yahoo.com>.
10342 2006-11-11  Jeroen Dekkers  <jeroen@dekkers.cx>
10344         * kern/disk.c (grub_disk_read): When there is a read error, always
10345         try to read only the necessary data.
10347         * conf/i386-pc.rmk (grub_probe_SOURCES): Add disk/lvm.c and
10348         disk/raid.c.
10349         * include/grub/disk.h [GRUB_UTIL] (grub_raid_init): New
10350         prototype.
10351         [GRUB_UTIL] (grub_raid_fini): Likewise.
10352         [GRUB_UTIL] (grub_lvm_init): Likewise.
10353         [GRUB_UTIL] (grub_lvm_fini): Likewise.
10354         * util/i386/pc/grub-probe.c (probe): Check whether DEVICE_NAME is
10355         RAID device and copy DEVICE_NAME to DRIVE_NAME in that case.
10356         (main): Call grub_raid_init(), grub_lvm_init(), grub_lvm_fini()
10357         and grub_raid_fini().
10359 2006-11-09  Jeroen Dekkers  <jeroen@dekkers.cx>
10361         * include/grub/types.h (__unused): Rename to UNUSED.
10362         * kern/elf.c (grub_elf32_size): Use UNUSED instead of __unused.
10363         (grub_elf64_size): Likewise.
10365 2006-11-03  Hollis Blanchard  <hollis@penguinppc.org>
10367         * kern/elf.c (grub_elf_file): Call grub_file_seek. Call
10368         grub_error_push and grub_error_pop in the error-handling path.
10369         (grub_elf32_load_segment): Only call grub_file_read with non-zero
10370         length.
10372 2006-11-03  Hollis Blanchard  <hollis@penguinppc.org>
10374         * conf/i386-efi.rmk (grub_emu_SOURCES): Add kern/elf.c.
10375         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
10376         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10377         (kernel_elf_SOURCES): Likewise.
10378         * conf/i386-efi.rmk (kernel_mod_HEADERS): Add elfload.h and cache.h.
10379         * conf/i386-pc.rmk (kernel_mod_HEADERS): Likewise.
10380         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
10381         * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
10382         * conf/common.rmk (pkgdata_MODULES): Add elf.mod.
10383         (elf_mod_SOURCES): New variable.
10384         (elf_mod_CFLAGS): Likewise.
10385         (elf_mod_LDFLAGS): Likewise.
10386         * include/grub/types.h (__unused): New macro.
10387         * include/grub/elfload.h: New file.
10388         * kern/elf.c: Likewise.
10389         * loader/powerpc/ieee1275/linux.c: Include elfload.h.
10390         (ELF32_LOADMASK): New macro.
10391         (ELF64_LOADMASK): Likewise.
10392         (vmlinux): Removed.
10393         (grub_linux_load32): New function.
10394         (grub_linux_load64): Likewise.
10395         (grub_rescue_cmd_linux): Call grub_linux_load32 or grub_linux_load64.
10396         Use grub_elf_t instead of grub_file_t.
10398 2006-11-02  Hollis Blanchard  <hollis@penguinppc.org>
10400         * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): Add
10401         `catch_result' to struct set_color_args.
10403 2006-10-28  Yoshinori K. Okuji  <okuji@enbug.org>
10405         * normal/menu.c: Include grub/script.h.
10406         * normal/menu_entry.c: Likewise.
10407         * include/grub/normal.h: Do not include grub/script.h.
10409 2006-10-27  Hollis Blanchard  <hollis@penguinppc.org>
10411         * kern/disk.c (grub_disk_read): Correct debug printf formatting.
10413 2006-10-27  Hollis Blanchard  <hollis@penguinppc.org>
10415         * kern/disk.c (grub_disk_open): Print debug messages when opening a
10416         disk.
10417         (grub_disk_close): Print debug messages when closing a disk.
10418         (grub_disk_read): Print debug messages when disk read fails.
10419         * kern/fs.c (grub_fs_probe): Print debug messages when detecting
10420         filesystem type.
10421         * kern/partition.c: Include misc.h.
10422         (grub_partition_iterate): Print debug messages when detecting
10423         partition type.
10425 2006-10-27  Hollis Blanchard  <hollis@penguinppc.org>
10427         * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Return error if `status'
10428         is negative.
10429         * kern/ieee1275/ieee1275.c (IEEE1275_IHANDLE_INVALID): Change to 0.
10431 2006-10-26  Hollis Blanchard  <hollis@penguinppc.org>
10433         * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
10434         Reverse GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS test.
10436 2006-10-25  Jeroen Dekkers  <jeroen@dekkers.cx>
10438         * disk/lvm.c (grub_lvm_scan_device): Malloc sizeof(*lv) bytes
10439         instead of sizeof(lv). Patch by Michael Guntsche.
10441 2006-10-18  Jeroen Dekkers  <jeroen@dekkers.cx>
10443         * disk/lvm.c: Rename VGS to VG_LIST.
10444         (grub_lvm_iterate): Change VGS->LV to VG-LV.
10445         (grub_lvm_open): Likewise.
10446         Thanks to Michael Guntsche for finding this bug.
10448 2006-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
10450         * configure.ac (AC_INIT): Bumped to 1.95.
10452 2006-10-14  Robert Millan  <rmh@aybabtu.com>
10454         * util/i386/pc/getroot.c (grub_guess_root_device): Don't compare os_dev
10455         with "/dev/.static/dev/md".
10457 2006-10-14  Yoshinori K. Okuji  <okuji@enbug.org>
10459         * util/i386/pc/grub-probe.c (probe): Print DEVICE_NAME instead of
10460         DRIVE_NAME when grub_util_biosdisk_get_grub_dev fails. Open
10461         DRIVE_NAME instead of DEVICE_NAME. Make sure that DEVICE_NAME and
10462         DRIVE_NAME are always freed.
10464         * util/i386/pc/biosdisk.c (make_device_name): Add one into
10465         DOS_PART, as a DOS partition is counted from one instead of zero
10466         now. Reported by Robert Millan.
10468 2006-10-14  Robert Millan  <rmh@aybabtu.com>
10470         * util/i386/pc/getroot.c (grub_guess_root_device): Stop using
10471         grub_util_biosdisk_get_grub_dev to convert system device to GRUB device.
10472         * util/grub-emu.c (main): Use grub_util_biosdisk_get_grub_dev with the
10473         string returned by grub_guess_root_device.
10474         * util/i386/pc/grub-setup.c: Likewise.
10475         * util/i386/pc/grub-probefs.c: Likewise.
10477         * util/i386/pc/grub-probefs.c: Rename to ...
10478         * util/i386/pc/grub-probe.c: ... this.
10479         * DISTLIST: Remove grub-probefs, add grub-probe.
10480         * conf/i386-efi.rmk: Likewise.
10481         * conf/i386-pc.rmk: Likewise.
10482         * util/i386/pc/grub-install.in: Likewise.
10484         * util/i386/pc/grub-probe.c: Add --target=(fs|device|drive) option to
10485         choose which information we want to print.
10487 2006-10-14  Yoshinori K. Okuji  <okuji@enbug.org>
10489         * DISTLIST: Added commands/echo.c, disk/lvm.c, disk/raid.c,
10490         include/grub/bitmap.h, include/grub/lvm.h, include/grub/raid.h,
10491         include/grub/i386/pc/vbeutil.h, include/grub/util/lvm.h,
10492         include/grub/util/raid.h, util/lvm.c, util/raid.c, video/bitmap.c,
10493         video/readers/tga.c and video/i386/pc/vbeutil.c.
10495 2006-10-14  Jeroen Dekkers  <jeroen@dekkers.cx>
10497         Added support for RAID and LVM.
10499         * disk/lvm.c: New file.
10500         * disk/raid.c: Likewise.
10501         * include/grub/lvm.h: Likewise.
10502         * include/grub/raid.h: Likewise.
10503         * include/grub/util/lvm.h: Likewise.
10504         * include/grub/util/raid.h: Likewise.
10505         * util/lvm.c: Likewise.
10506         * util/raid.c: Likewise.
10508         * include/grub/disk.h (grub_disk_dev_id): Add
10509         GRUB_DISK_DEVICE_RAID_ID and GRUB_DISK_DEVICE_LVM_ID.
10510         (grub_disk_get_size): New prototype.
10511         * kern/disk.c (grub_disk_open): Check whether grub_partition_probe()
10512         returns a partition.
10513         (grub_disk_get_size): New function.
10515         * kern/i386/pc/init.c (make_install_device): Copy the prefix
10516         verbatim if grub_install_dos_part is -2.
10518         * util/i386/pc/getroot.c (grub_guess_root_device): Support RAID
10519         and LVM devices.
10521         * util/i386/pc/grub-setup.c (setup): New argument
10522         MUST_EMBED. Force embedding of GRUB when the argument is
10523         true. Close FILE before returning.
10524         (main): Add support for RAID and LVM.
10526         * conf/common.rmk: Add RAID and LVM modules.
10527         * conf/i386-pc.rmk (grub_setup_SOURCES): Add util/raid.c and
10528         util/lvm.c.
10529         (grub_emu_SOURCES): Add disk/raid.c and disk/lvm.c.
10531         * kern/misc.c (grub_strstr): New function.
10532         * include/grub/misc.h (grub_strstr): New prototype.
10534 2006-10-10  Tristan Gingold  <tristan.gingold@bull.net>
10536         * include/grub/efi/api.h (GRUB_EFI_ERROR_CODE): Long constant.
10538 2006-10-05  Tristan Gingold  <tristan.gingold@bull.net>
10540         * kern/misc.c (grub_strtoull): Guess the base only if not
10541         specified.
10543 2006-10-01  Hollis Blanchard  <hollis@penguinppc.org>
10545         * kern/powerpc/ieee1275/cmain.c (cmain): Remove incomplete Old World
10546         PowerMac support.
10548 2006-10-01  Hollis Blanchard  <hollis@penguinppc.org>
10550         * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Cast `size' to long.
10552         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_next_property):
10553         Remove `flags' argument.  All callers changed.
10554         * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_ROOT): Removed.
10555         (IEEE1275_IHANDLE_INVALID): New variable.
10556         (IEEE1275_CELL_INVALID): New variable.
10557         (grub_ieee1275_finddevice, grub_ieee1275_get_property,
10558         grub_ieee1275_get_property_length, grub_ieee1275_instance_to_package,
10559         grub_ieee1275_package_to_path, grub_ieee1275_instance_to_path,
10560         grub_ieee1275_peer, grub_ieee1275_child, grub_ieee1275_open,
10561         grub_ieee1275_claim, grub_ieee1275_set_property): Error-check return
10562         codes from Open Firmware.  All callers updated.
10563         (grub_ieee1275_next_property): Directly return Open Firmware return
10564         code.
10565         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
10566         Standardize error checking from `grub_ieee1275_get_property'.
10567         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Rename
10568         `devalias' to `aliases'.  Correct comments.  Consolidate error paths.
10570 2006-10-01  Hollis Blanchard  <hollis@penguinppc.org>
10572         * kern/ieee1275/ieee1275.c (grub_ieee1275_instance_to_path): Rename
10573         `instance_to_package_args' to `instance_to_path_args'.
10575         * kern/powerpc/ieee1275/init.c (grub_machine_init): Use
10576         `grub_ieee1275_chosen'.
10578         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Call
10579         `grub_ieee1275_interpret'.
10581 2006-09-25  Hollis Blanchard  <hollis@penguinppc.org>
10583         * util/powerpc/ieee1275/grub-mkimage.c: Include config.h.
10585 2006-09-25  Hollis Blanchard  <hollis@penguinppc.org>
10587         * include/grub/powerpc/libgcc.h (__floatdisf): New prototype.
10588         (__cmpdi): Likewise.
10590         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Pass 0 as
10591         `flags' to `grub_ieee1275_next_property'.  Change `pathlen' to type
10592         `grub_ssize_t'.
10594         * kern/powerpc/ieee1275/cmain.c: Include grub/misc.h.
10596         * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Change `actual'
10597         to type `grub_ssize_t'.
10598         (grub_rescue_cmd_linux): Cast -1 to `grub_off_t'.
10600 2006-09-22  Marco Gerards  <marco@gnu.org>
10602         * normal/script.c (grub_script_create_cmdmenu): Skip leading
10603         newlines.
10605 2006-09-22  Marco Gerards  <marco@gnu.org>
10607         * commands/echo.c: New file.
10609         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/echo.c'.
10611         * conf/common.rmk (echo_mod_SOURCES): New variable.
10612         (echo_mod_CFLAGS): Likewise.
10613         (echo_mod_LDFLAGS): Likewise.
10615 2006-09-22  Marco Gerards  <marco@gnu.org>
10617         * normal/main.c (get_line): Malloc memory instead of using
10618         preallocated memory.  Removed the arguments `cmdline' and
10619         `max_len'.  Updated all callers.
10621 2006-09-22  Marco Gerards  <marco@gnu.org>
10623         * conf/i386-efi.rmk (grub_emu_DEPENDENCIES): New variable.
10624         (normal_mod_DEPENDENCIES): Likewise.
10626         * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Likewise.
10627         (normal_mod_DEPENDENCIES): Likewise.
10629         * conf/sparc64-ieee1275.rmk (normal_mod_DEPENDENCIES): Likewise.
10631 2006-09-22  Johan Rydberg  <jrydberg@gnu.org>
10633         * genmk.rb: Add DEPENDENCIES variables to modules, utilities, and
10634         programs.
10635         * conf/i386-pc.rmk (grub_emu_DEPENDENCIES): Declare.
10636         (normal_mod_DEPENDENCIES): Likewise.
10637         * conf/i386-pc.mk: Regenerate.
10638         * conf/i386-efi.mk: Likewise
10639         * conf/common.mk: Likewise.
10640         * conf/powerpc-ieee1275.mk: Likewise.
10641         * conf/sparc64-ieee1275.mk: Likewise.
10643 2006-09-22  Robert Millan  <rmh@aybabtu.com>
10645         Sync with i386 version.
10646         * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Remove grub-emu, add grub-mkimage.
10647         * conf/powerpc-ieee1275.rmk (sbin_UTILITIES): Remove grub-mkimage, add grub-emu.
10649 2006-09-21  Robert Millan  <rmh@aybabtu.com>
10651         Import from GRUB Legacy (lib/device.c):
10652         * util/i386/pc/grub-mkdevicemap.c (get_i2o_disk_name): New function.
10653         (init_device_map) [__linux__]: Add support for I2O devices.
10655 2006-09-14  Marco Gerards  <marco@gnu.org>
10657         * conf/i386-pc.rmk (COMMON_LDFLAGS): Use `-m32' instead of
10658         `-melf_i386'.
10660 2006-09-14  Robert Millan  <rmh@aybabtu.com>
10662         * util/i386/pc/grub-install.in: Skip menu.lst when removing
10663         /boot/grub/*.lst.
10665         * util/i386/pc/getroot.c: Don't recurse into dotdirs (e.g. ".static").
10667         * util/i386/pc/grub-mkdevicemap.c: Make sure the floppy device exists
10668         before adding it to device.map.
10670 2006-08-15  Johan Rydberg  <jrydberg@gnu.org>
10672         * genmk.rb: Let GCC generate dependencies the first time it
10673         compiles a file; using the -MD option.
10674         * conf/common.mk: Regenerate.
10675         * conf/i386-pc.mk: Likewise.
10676         * conf/i386-efi.mk: Likewise.
10677         * conf/powerpc-ieee1275.mk: Likewise.
10678         * conf/sparc64-ieee1275.mk: Likewise.
10680 2006-08-04  Yoshinori K. Okuji  <okuji@enbug.org>
10682         Move the prototypes of grub_setjmp and grub_longjmp to
10683         cpu/setjmp.h, so that each architecture may specify different
10684         attributes.
10686         * include/grub/i386/setjmp.h (grub_setjmp): New prototype.
10687         (grub_longjmp): Likewise.
10688         * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise..
10689         (grub_longjmp): Likewise.
10690         * include/grub/sparc64/setjmp.h (grub_setjmp): Likewise..
10691         (grub_longjmp): Likewise.
10693         * include/grub/setjmp.h [!GRUB_UTIL] (grub_setjmp): Removed.
10694         [!GRUB_UTIL] (grub_longjmp): Removed.
10696 2006-08-01  Pelletier Vincent  <subdino2004@yahoo.fr>
10698         * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): IEEE1275
10699         "color!" method does not return any value.
10701 2006-07-29  Vesa Jaaskelainen  <chaac@nic.fi>
10703         * include/grub/bitmap.h: New file.
10705         * include/grub/i386/pc/vbeutil.h: Likewise.
10707         * video/bitmap.c: Likewise.
10709         * video/readers/tga.c: Likewise.
10711         * video/i386/pc/vbeutil.c: Likewise.
10713         * commands/videotest.c: Code cleanup and updated to reflect to new
10714         video API.
10716         * term/gfxterm.c: Likewise.
10718         * video/video.c: Likewise.
10720         * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod.
10721         (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c.
10722         (bitmap_mod_SOURCES): New entry.
10723         (bitmap_mod_CFLAGS): Likewise.
10724         (bitmap_mod_LDFLAGS): Likewise.
10725         (tga_mod_SOURCES): Likewise.
10726         (tga_mod_CFLAGS): Likewise.
10727         (tga_mod_LDFLAGS): Likewise.
10729         * include/grub/video.h (grub_video_blit_operators): New enum type.
10730         (grub_video_render_target): Changed as forward declaration and moved
10731         actual definition to be video driver specific.
10732         (grub_video_adapter.blit_bitmap): Added blitting operator.
10733         (grub_video_adapter.blit_render_target): Likewise.
10734         (grub_video_blit_bitmap): Likewise.
10735         (grub_video_blit_render_target): Likewise.
10737         * include/grub/i386/pc/vbe.h (grub_video_render_target): Added
10738         driver specific render target definition.
10739         (grub_video_vbe_map_rgba): Added driver internal helper.
10740         (grub_video_vbe_unmap_color): Updated to use
10741         grub_video_i386_vbeblit_info.
10742         (grub_video_vbe_get_video_ptr): Likewise.
10744         * include/grub/i386/pc/vbeblit.h
10745         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use
10746         grub_video_i386_vbeblit_info.
10747         (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
10748         (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
10749         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
10750         (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
10751         (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
10752         (grub_video_i386_vbeblit_index_index): Likewise.
10753         (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function.
10754         (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
10755         (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
10756         (grub_video_i386_vbeblit_blend): Added generic blitter for blend
10757         operator.
10758         (grub_video_i386_vbeblit_replace): Added generic blitter for replace
10759         operator.
10761         * video/i386/pc/vbeblit.c: Updated to reflect changes on
10762         include/grub/i386/pc/vbeblit.h.
10764         * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8):
10765         Updated to use grub_video_i386_vbeblit_info.
10766         (grub_video_i386_vbefill_R8G8B8): Likewise.
10767         (grub_video_i386_vbefill_index): Likewise.
10768         (grub_video_i386_vbefill): Added generic filler.
10770         * video/i386/pc/vbefill.c: Updated to reflect changes on
10771         include/grub/i386/pc/vbefill.h.
10773         * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use
10774         grub_video_i386_vbeblit_info.
10775         (grub_video_vbe_unmap_color): Likewise.
10776         (grub_video_vbe_blit_glyph): Likewise.
10777         (grub_video_vbe_scroll): Likewise.
10778         (grub_video_vbe_draw_pixel): Removed function.
10779         (grub_video_vbe_get_pixel): Likewise.
10780         (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and
10781         updated code to use it.
10782         (common_blitter): Added common blitter for render target and bitmap.
10783         (grub_video_vbe_blit_bitmap): Updated to use common_blitter.
10784         (grub_video_vbe_blit_render_target): Likewise.
10786 2006-07-30  Johan Rydberg  <jrydberg@gnu.org>
10788         * kern/efi/efi.c (grub_efi_set_text_mode): Assume console already
10789         is in text mode if there is no console control protocol instance
10790         available.
10792 2006-07-29  Vesa Jaaskelainen  <chaac@nic.fi>
10794         * include/grub/video.h: Code cleanup.
10796         * include/grub/i386/pc/vbe.h: Likewise.
10798         * video/i386/pc/vbe.c: Likewise.
10800         * video/i386/pc/vbeblit.c: Likewise.
10802         * video/i386/pc/vbefill.c: Likewise.
10804         * video/video.c: Likewise.  Also added more comments.
10806 2006-07-29  Vesa Jaaskelainen  <chaac@nic.fi>
10808         * disk/i386/pc/biosdisk.c (struct grub_biosdisk_drp): Moved to ...
10809         (struct grub_biosdisk_dap): Likewise.
10811         * include/grub/i386/pc/biosdisk.h: ... to here.  Also corrected
10812         linkage settings for all functions.
10814 2006-07-12  Marco Gerards  <marco@gnu.org>
10816         * configure.ac (--enable-mm-debug): Fix typo.
10818         * genkernsyms.sh.in: Use proper quoting for `CC'.
10820 2006-07-02  Jeroen Dekkers  <jeroen@dekkers.cx>
10822         * conf/i386-pc.rmk (COMMON_ASFLAGS): Add "-m32".
10823         (normal_mod_ASFLAGS): Remove "-m32".
10825 2006-06-14  Yoshinori K. Okuji  <okuji@enbug.org>
10827         * util/misc.c: Include config.h.
10828         [!HAVE_MEMALIGN]: Do not include malloc.h.
10829         (grub_memalign): Use posix_memalign, if present. Then, use
10830         memalign, if present. Otherwise, emit an error.
10832         * util/grub-emu.c: Do not include malloc.h.
10834         * include/grub/util/misc.h: Include unistd.h. This is required for
10835         FreeBSD, because off_t is defined in unistd.h. Reported by Harley
10836         D. Eades III <hde@foobar-qux.org>.
10838         * configure.ac (AC_GNU_SOURCE): Added.
10839         (AC_CHECK_FUNCS): Check posix_memalign and memalign for the host
10840         type.
10842 2006-06-09  Yoshinori K. Okuji  <okuji@enbug.org>
10844         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Make sure that
10845         ADDR_MAX does not exceed GRUB_LINUX_INITRD_MAX_ADDRESS.
10847 2006-06-07  Jeroen Dekkers  <jeroen@dekkers.cx>
10849         * include/grub/types.h (grub_host_addr_t): Rename to
10850         grub_target_addr_t.
10851         (grub_host_off_t): Rename to grub_target_off_t.
10852         (grub_host_size_t): Rename to grub_target_size_t.
10853         (grub_host_ssize_t): Rename to grub_target_ssize_t.
10854         Refer to GRUB_TARGET_SIZEOF_VOID_P to define those variables.
10856         * include/grub/kernel.h (struct grub_module_header): Change type
10857         of OFFSET to grub_target_off_t and type of SIZE to grub_target_size_t.
10858         (grub_module_info): Likewise.
10860 2006-06-05  Yoshinori K. Okuji  <okuji@enbug.org>
10862         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): The conditional
10863         of checking LINUX_MEM_SIZE was reverse. Reported by Jesus
10864         Velazquez <jesus.velazquez@gmail.com>.
10866 2006-06-05  Yoshinori K. Okuji  <okuji@enbug.org>
10868         Count partitions from 1 instead of 0 in the string representation
10869         of partitions. Still use 0-based internally.
10871         * partmap/sun.c (grub_sun_is_valid): A cosmetic change.
10872         (sun_partition_map_iterate): Use grub_partition_t instead of
10873         struct grub_partition *. Cast DESC->START_CYLINDER to
10874         grub_uint64_t after converting the endian.
10875         (sun_partition_map_probe): Subtract 1 for PARTNUM.
10876         (sun_partition_map_get_name): Add 1 to P->INDEX.
10878         * partmap/pc.c (grub_partition_parse): Subtract 1 for
10879         PCDATA->DOS_PART.
10880         (pc_partition_map_get_name): Add 1 into PCDATA->DOS_PART.
10882         * partmap/gpt.c (gpt_partition_map_iterate): Initialize PARTNO to
10883         zero instead of one.
10884         (gpt_partition_map_probe): Subtract 1 for PARTNUM.
10885         (gpt_partition_map_get_name): Add 1 into P->INDEX.
10887         * partmap/apple.c (apple_partition_map_iterate): Change the type
10888         of POS to unsigned.
10889         (apple_partition_map_probe): Subtract 1 for PARTNUM.
10890         (apple_partition_map_get_name): Add 1 into P->INDEX.
10892         * partmap/amiga.c (amiga_partition_map_iterate): Change the type
10893         of POS to unsigned.
10894         (amiga_partition_map_iterate): Cast NEXT to grub_off_t to
10895         calculate the offset of a partition.
10896         (amiga_partition_map_probe): Subtract 1 for PARTNUM.
10897         (amiga_partition_map_get_name): Add 1 into P->INDEX.
10899         * partmap/acorn.c (acorn_partition_map_find): Change the type of
10900         SECTOR to grub_disk_addr_t.
10901         (acorn_partition_map_iterate): Likewise.
10902         (acorn_partition_map_probe): Subtract 1 for PARTNUM.
10903         Change the type of SECTOR to grub_disk_addr_t. Declare P on the
10904         top.
10905         (acorn_partition_map_get_name): Add 1 into P->INDEX.
10907         * kern/i386/pc/init.c (make_install_device): Add 1 into
10908         GRUB_INSTALL_DOS_PART.
10910         * fs/iso9660.c (grub_iso9660_mount): Fixed a reversed
10911         conditional.
10913 2006-06-04  Yoshinori K. Okuji  <okuji@enbug.org>
10915         Clean up the code to support 64-bit addressing in disks and
10916         files. This change is not enough for filesystems yet.
10918         * util/i386/pc/grub-setup.c (struct boot_blocklist): Change the
10919         type of "start" to grub_uint64_t.
10920         (setup): Change the types of KERNEL_SECTOR and FIRST_SECTOR to
10921         grub_disk_addr_t * and grub_disk_addr_t. Fix the format string in
10922         save_first_sector and save_blocklists. Use grub_le_to_cpu64 to
10923         convert addresses.
10925         * util/i386/pc/biosdisk.c (open_device): Change the type of SECTOR
10926         to grub_disk_addr_t.
10928         * partmap/gpt.c (gpt_partition_map_iterate): Fix the format
10929         string.
10931         * partmap/pc.c (pc_partition_map_iterate): Likewise.
10933         * partmap/amiga.c (amiga_partition_map_iterate): Cast RDSK.MAGIC
10934         to char *.
10936         * normal/script.c (grub_script_parse): Remove unused MEMFREE.
10938         * normal/parser.y (YYLTYPE_IS_TRIVIAL): New macro.
10940         * normal/lexer.c (grub_script_yyerror): Specify unused to LEX.
10942         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf64): Cast -1
10943         to grub_off_t, to detect an error from grub_file_seek.
10944         (grub_multiboot_load_elf32): Likewise.
10946         * kern/misc.c (grub_strtoul): Use grub_strtoull. Return the
10947         maximum unsigned long value when an overflow is detected.
10948         (grub_strtoull): New function.
10949         (grub_divmod64): Likewise.
10950         (grub_lltoa): use grub_divmod64.
10952         * kern/fs.c (struct grub_fs_block): Change the type of "offset" to
10953         grub_disk_addr_t.
10954         (grub_fs_blocklist_open): Increase P if P is not NULL to advance
10955         the pointer to next character. Use grub_strtoull instead of
10956         grub_strtoul.
10957         (grub_fs_blocklist_read): Change the types of SECTOR, OFFSET and
10958         SIZE to grub_disk_addr_t, grub_off_t and grub_size_t,
10959         respectively.
10961         * kern/file.c (grub_file_read): Prevent an overflow of LEN, as the
10962         return value is signed.
10963         (grub_file_seek): Change the type of OLD to grub_off_t. Do not
10964         test if OFFSET is less than zero, as OFFSET is unsigned now.
10966         * kern/disk.c (struct grub_disk_cache): Change the type of
10967         "sector" to grub_disk_addr_t.
10968         (grub_disk_cache_get_index): Change the type of SECTOR to
10969         grub_disk_addr_t. Calculate the hash with SECTOR casted to
10970         unsigned after shifting.
10971         (grub_disk_cache_invalidate): Change the type of SECTOR to
10972         grub_disk_addr_t.
10973         (grub_disk_cache_unlock): Likewise.
10974         (grub_disk_cache_store): Likewise.
10975         (grub_disk_check_range): Change the types of SECTOR, OFFSET, SIZE,
10976         START and LEN to grub_disk_addr_t *, grub_off_t *, grub_size_t,
10977         grub_disk_addr_t and grub_uint64_t, respectively.
10978         (grub_disk_read): Use an unsigned variable REAL_OFFSET for the
10979         body, as the value of OFFSET is tweaked by
10980         grub_disk_check_range. Change the types of START_SECTOR, LEN and
10981         POS to grub_disk_addr_t, grub_size_t and grub_size_t,
10982         respectively.
10983         (grub_disk_write): Use an unsigned variable REAL_OFFSET for the
10984         body, as the value of OFFSET is tweaked by
10985         grub_disk_check_range. Change the types of LEN and N to
10986         grub_size_t.
10988         * io/gzio.c (struct grub_gzio): Change the types of "data_offset"
10989         and "saved_offset" to grub_off_t.
10990         (test_header): Cast BUF to char *.
10991         (get_byte): Cast GZIO->DATA_OFFSET to grub_off_t. Cast GZIO->INBUF
10992         to char *.
10993         (grub_gzio_read): Change the types of OFFSET and SIZE to
10994         grub_off_t and grub_size_t, respectively.
10996         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_FORCE_LBA):
10997         Removed.
10998         (GRUB_BOOT_MACHINE_BOOT_DRIVE): Changed to 0x4c.
10999         (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Changed to 0x40.
11000         (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Changed to 0x42.
11001         (GRUB_BOOT_MACHINE_DRIVE_CHECK): Changed to 0x4e.
11002         (GRUB_BOOT_MACHINE_LIST_SIZE): Increased to 12.
11004         * include/grub/types.h (grub_off_t): Unconditionally set to
11005         grub_uint64_t.
11006         (grub_disk_addr_t): Changed to grub_uint64_t.
11008         * include/grub/partition.h (struct grub_partition): Change the
11009         types of "start", "len" and "offset" to grub_disk_addr_t,
11010         grub_uint64_t and grub_disk_addr_t, respectively.
11011         (grub_partition_get_start): Return grub_disk_addr_t.
11012         (grub_partition_get_len): Return grub_uint64_t.
11014         * include/grub/misc.h (grub_strtoull): New prototype.
11015         (grub_divmod64): Likewise.
11017         * include/grub/fshelp.h (grub_fshelp_read_file): Change the types
11018         of SECTOR, LEN and FILESIZE to grub_disk_addr_t, grub_size_t and
11019         grub_off_t, respectively.
11020         All callers and references changed.
11022         * include/grub/fs.h (struct grub_fs): Change the type of LEN to
11023         grub_size_t in "read".
11024         All callers and references changed.
11026         * include/grub/file.h (struct grub_file): Change the types of
11027         "offset" and "size" to grub_off_t and grub_off_t,
11028         respectively. Change the type of SECTOR to grub_disk_addr_t in
11029         "read_hook".
11030         (grub_file_read): Change the type of LEN to grub_size_t.
11031         (grub_file_seek): Return grub_off_t. Change the type of OFFSET to
11032         grub_off_t.
11033         (grub_file_size): Return grub_off_t.
11034         (grub_file_tell): Likewise.
11035         All callers and references changed.
11037         * include/grub/disk.h (struct grub_disk_dev): Change the types of
11038         SECTOR and SIZE to grub_disk_addr_t and grub_size_t in "read" and
11039         "write".
11040         (struct grub_disk): Change the type of "total_sectors" to
11041         grub_uint64_t. Change the type of SECTOR to grub_disk_addr_t in
11042         "read_hook".
11043         (grub_disk_read): Change the types of SECTOR, OFFSET and SIZE to
11044         grub_disk_addr_t, grub_off_t and grub_size_t, respectively.
11045         (grub_disk_write): Likewise.
11046         All callers and references changed.
11048         * fs/iso9660.c (grub_iso9660_susp_iterate): Cast parameters to
11049         char * for grub_strncmp to silence gcc.
11050         (grub_iso9660_mount): Likewise.
11051         (grub_iso9660_mount): Likewise.
11052         (grub_iso9660_read_symlink): Likewise. Also, remove the nonsense
11053         return statement.
11054         (grub_iso9660_iterate_dir): Likewise.
11055         (grub_iso9660_label): Cast DATA->VOLDESC.VOLNAME to char *.
11057         * fs/hfs.c (grub_hfs_read_file): Change the types of SECTOR and
11058         LEN to grub_disk_addr_t and grub_size_t, respectively.
11060         * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
11062         * fs/jfs.c (grub_jfs_read_file): Likewise.
11064         * fs/minix.c (grub_jfs_read_file): Likewise.
11066         * fs/sfs.c (grub_jfs_read_file): Likewise.
11068         * fs/ufs.c (grub_jfs_read_file): Likewise.
11070         * fs/xfs.c (grub_jfs_read_file): Likewise.
11072         * fs/fat.c (grub_fat_read_data): Change the types of SECTOR, LEN
11073         and SIZE to grub_disk_addr_t, grub_size_t and grub_size_t,
11074         respectively.
11076         * fs/ext2.c (grub_ext2_read_block): When an error happens, set
11077         BLKNR to -1 instead of returning GRUB_ERRNO.
11078         (grub_ext2_read_file): Change the types of SECTOR and
11079         LEN to grub_disk_addr_t and grub_size_t, respectively.
11081         * fs/affs.c (grub_affs_read_file): Change the types of SECTOR and
11082         LEN to grub_disk_addr_t and grub_size_t, respectively.
11084         * font/manager.c (grub_font_get_glyph): Cast BITMAP to char * for
11085         grub_file_read.
11087         * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Fix the format
11088         string. Do not cast SECTOR explicitly.
11090         * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Change the type of
11091         TOTAL_SECTORS to grub_uint64_t. Do not mask DRP->TOTAL_SECTORS.
11092         (grub_biosdisk_rw): Change the types of SECTOR and SIZE to
11093         grub_disk_addr_t and grub_size_t, respectively. If the sector is
11094         over 2TB and LBA mode is not supported, raise an error.
11095         (get_safe_sectors): New function.
11096         (grub_biosdisk_read): Use get_safe_sectors.
11097         (grub_biosdisk_write): Likewise.
11099         * disk/efi/efidisk.c (grub_efidisk_read): Fix the format string.
11100         (grub_efidisk_write): Likewise.
11102         * disk/loopback.c (delete_loopback): Cosmetic changes.
11103         (grub_cmd_loopback): Likewise. Also, test NEWDEV->FILENAME
11104         correctly.
11105         (grub_loopback_open): Likewise.
11106         (grub_loopback_read): Likewise. Also, change the type of POS to
11107         grub_off_t, and fix the usage of grub_memset.
11109         * commands/i386/pc/play.c: Include grub/machine/time.h.
11111         * commands/ls.c (grub_ls_list_files): Use "llu" instead of "d" to
11112         print FILE->SIZE.
11114         * commands/configfile.c: Include grub/env.h.
11116         * commands/cmp.c (grub_cmd_cmp): Do not use ERR, but use
11117         GRUB_ERRNO directly instead. Change the type of POS to
11118         grub_off_t. Follow the coding standard.
11120         * commands/blocklist.c: Include grub/partition.h.
11121         (grub_cmd_blocklist): Return an error if the underlying device is
11122         not a disk. Take the starting sector of a partition into account,
11123         if a partition is used.
11125         * boot/i386/pc/diskboot.S (bootloop): Adapted to the new offset of
11126         a length field.
11127         (lba_mode): Support 64-bit addresses.
11128         (chs_mode): Likewise.
11129         (copy_buffer): Adapted to the new offsets of a length field and a
11130         segment field.
11131         (blocklist_default_start): Allocate 64-bit space.
11133         * boot/i386/pc/boot.S (force_lba): Removed.
11134         (boot_drive): Moved to under KERNEL_SECTOR.
11135         (kernel_sector): Moved to under KERNEL_SEGMENT. Allocate 64-bit
11136         space.
11137         (real_start): Set %si earlier. Remove code for FORCE_LBA, since it
11138         is useless.
11139         (lba_mode): Refactored to support a 64-bit address. More size
11140         optimization.
11141         (setup_sectors): Likewise.
11143 2006-06-04  Yoshinori K. Okuji  <okuji@enbug.org>
11145         * DISTLIST: Added include/grub/i386/linux.h. Removed
11146         include/grub/i386/pc/linux.h
11148         * configure.ac (AC_INIT): Bumped to 1.94.
11150         * config.guess: Updated from gnulib.
11151         * config.sub: Likewise.
11152         * install-sh: Likewise.
11153         * mkinstalldirs: Likewise.
11155 2006-06-02  Yoshinori K. Okuji  <okuji@enbug.org>
11157         * conf/common.rmk (grub_modules_init.lst): Depended on
11158         grub_emu_SOURCES, excluding grub_emu_init.c, instead of
11159         MODSRCFILES.
11161         * genmk.rb (PModule::rule): Reverted the previous change.
11163 2006-06-02  Yoshinori K. Okuji  <okuji@enbug.org>
11165         * conf/common.rmk (grub_modules_init.lst): Depends on
11166         $(MODSRCFILES). Grep only the files in $(MODSRCFILES). Make sure
11167         that the target does not exist before producing.
11168         (grub_modules_init.h): Remove the target before generating.
11169         (grub_emu_init.c): Likewise.
11171         * genmk.rb (PModule::rule): Add source files into MODSRCFILES.
11173 2006-05-31  Jeroen Dekkers  <jeroen@dekkers.cx>
11175         * configure.ac: Don't set host_m32 for x86_64. Also reset LIBS
11176         for the target-specific tests. Make sure that we also have the
11177         up-to-date target variables for those tests.
11179 2006-05-31  Yoshinori K. Okuji  <okuji@enbug.org>
11181         * genmk.rb (Image::rule): Prefix CFLAGS or ASFLAGS with TARGET_.
11182         (PModule::rule): Likewise.
11184 2006-05-31  Yoshinori K. Okuji  <okuji@enbug.org>
11186         * genmk.rb (Image::rule): Set FLAG to CFLAGS or ASFLAGS instead of
11187         TARGET_CFLAGS or TARGET_ASFLAGS. There is no reason why
11188         target-specific flags should be prefixed.
11189         (PModule::rule): Likewise.
11191 2006-05-30  Yoshinori K. Okuji  <okuji@enbug.org>
11193         * configure.ac (CMP): Check if cmp is available explicitly.
11195 2006-05-29  Yoshinori K. Okuji  <okuji@enbug.org>
11197         * util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
11198         (target_cpu): New variable.
11199         (pkglibdir): Use target_cpu instead of host_cpu.
11201         * util/i386/pc/grub-install.in (host_cpu): Removed.
11202         (target_cpu): New variable.
11203         (pkglibdir): Use target_cpu instead of host_cpu.
11205         * util/genmoddep.c: Removed.
11207         * kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
11208         instead of GRUB_HOST_SIZEOF_VOID_P.
11209         * kern/dl.c: Likewise.
11211         * include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
11212         ...
11213         (GRUB_TARGET_SIZEOF_VOID_P): ... this.
11214         (GRUB_HOST_SIZEOF_LONG): Renamed to ...
11215         (GRUB_TARGET_SIZEOF_LONG): ... this.
11216         (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
11217         (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
11218         * include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
11219         to ...
11220         (GRUB_TARGET_SIZEOF_VOID_P): ... this.
11221         (GRUB_HOST_SIZEOF_LONG): Renamed to ...
11222         (GRUB_TARGET_SIZEOF_LONG): ... this.
11223         (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
11224         (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
11225         * include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
11226         to ...
11227         (GRUB_TARGET_SIZEOF_VOID_P): ... this.
11228         (GRUB_HOST_SIZEOF_LONG): Renamed to ...
11229         (GRUB_TARGET_SIZEOF_LONG): ... this.
11230         (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
11231         (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
11233         * include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
11234         GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
11235         [!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
11236         instead of GRUB_HOST_SIZEOF_LONG.
11237         [!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
11238         GRUB_HOST_WORDS_BIGENDIAN to define or undefine
11239         GRUB_CPU_WORDS_BIGENDIAN.
11240         Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
11241         define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
11242         grub_host_ssize_t.
11244         * conf/i386-efi.rmk (noinst_UTILITIES): Removed.
11245         (genmoddep_SOURCES): Likewise.
11246         * conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
11247         (genmoddep_SOURCES): Likewise.
11248         * conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
11249         (genmoddep_SOURCES): Likewise.
11250         * conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
11251         Likewise.
11252         (genmoddep_SOURCES): Likewise.
11254         * genmoddep.awk: New file.
11256         * genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
11257         TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
11258         CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
11259         (PModule::rule): Likewise.
11260         (Program::rule): Likewise.
11261         (Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
11262         BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
11263         respectively.
11265         * configure.ac: Rewritten intensively to use host and target
11266         instead of build and host, respectively.
11268         * Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
11269         (host_cpu): Removed.
11270         (target_cpu): New variable.
11271         (CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
11272         (BUILD_CC): Removed.
11273         (BUILD_CFLAGS): Likewise.
11274         (BUILD_CPPFLAGS): Likewise.
11275         (TARGET_CC): New variable.
11276         (TARGET_CFLAGS): Likewise.
11277         (TARGET_CPPFLAGS): Likewise.
11278         (TARGET_LDFLAGS): Likewise.
11279         (AWK): Likewise.
11280         (include): Use target_cpu instead of host_cpu.
11281         (moddep.lst:): Use genmoddep.awk instead of genmoddep.
11283         * DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
11285 2006-05-29  Vesa Jaaskelainen  <chaac@nic.fi>
11287         * include/grub/script.h (grub_script_cmdif): Renamed field 'bool' to
11288         'exec_to_evaluate'.  Renamed field 'true' to 'exec_on_true'.  Renamed
11289         field 'false' to 'exec_on_false'.
11290         (grub_script_create_cmdif): Renamed argument names to reflect above
11291         changes.
11293         * normal/execute.c (grub_script_execute_cmdif): Likewise.
11295         * normal/script.c (grub_script_create_cmdif): Likewise.
11297 2006-05-28  Yoshinori K. Okuji  <okuji@enbug.org>
11299         * fs/hfsplus.c (grub_hfsplus_btree_recoffset): Moved to near the
11300         top.
11301         (grub_hfsplus_btree_recptr): Likewise.
11302         (grub_hfsplus_find_block): Do not take RETRY any longer. Use
11303         FILEBLOCK both to pass a block number and store next block
11304         number.
11305         (grub_hfsplus_read_block): Rewritten heavily to support an extent
11306         overflow file correctly. Specify errors appropriately, because
11307         fshelp expects that GRUB_ERRNO is set when fails. Reuse
11308         grub_hfsplus_btree_recptr to get the pointer to a found key.
11309         (grub_hfsplus_btree_search): Return 1 instead of 0 when no match
11310         is found.
11312         * conf/i386-efi.rmk (pkgdata_MODULES): Added _linux.mod and
11313         linux.mod.
11314         (_linux_mod_SOURCES): New variable.
11315         (_linux_mod_CFLAGS): Likewise.
11316         (_linux_mod_LDFLAGS): Likewise.
11317         (linux_mod_SOURCES): Likewise.
11318         (linux_mod_CFLAGS): Likewise.
11319         (linux_mod_LDFLAGS): Likewise.
11321         * DISTLIST: Added loader/i386/efi/linux.c,
11322         loader/i386/efi/linux_normal.c and
11323         include/grub/i386/efi/loader.h.
11325         * loader/i386/efi/linux.c: New file.
11326         * loader/i386/efi/linux_normal.c: Likewise.
11327         * include/grub/i386/efi/loader.h: Likewise.
11329 2006-05-27  Yoshinori K. Okuji  <okuji@enbug.org>
11331         * commands/blocklist.c: New file.
11333         * DISTLIST: Added commands/blocklist.c.
11335         * term/efi/console.c (grub_console_highlight_color): Use a lighter
11336         color for the background, and a darker color for the foreground.
11337         (grub_console_checkkey): Return READ_KEY.
11338         (grub_console_cls): Set the background to
11339         GRUB_EFI_BACKGROUND_BLACK temporarily to clean out the screen.
11341         * kern/efi/efi.c (grub_efi_exit_boot_services): New function.
11343         * include/grub/i386/linux.h (struct linux_kernel_params): Fixed
11344         the size of "padding5", "hd0_drive_info" and "hd1_drive_info".
11346         * include/grub/efi/efi.h (grub_efi_exit_boot_services): New
11347         prototype.
11349         * include/grub/efi/api.h (GRUB_EFI_TEXT_ATTR): Do not shift
11350         BG. The spec is wrong again.
11352         * include/grub/normal.h [GRUB_UTIL] (grub_blocklist_init): New
11353         prototype.
11354         [GRUB_UTIL] (grub_blocklist_fini): Likewise.
11356         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
11357         commands/blocklist.c.
11358         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
11360         * conf/common.rmk (pkgdata_MODULES): Added blocklist.mod.
11361         (blocklist_mod_SOURCES): New variable.
11362         (blocklist_mod_CFLAGS): Likewise.
11363         (blocklist_mod_LDFLAGS): Likewise.
11365 2006-05-20  Yoshinori K. Okuji  <okuji@enbug.org>
11367         * boot/i386/pc/boot.S (real_start): Set %si earlier to eliminate
11368         duplication.
11369         (lba_mode): Use %eax more intensively to reduce the code size.
11371 2006-05-20  Marco Gerards  <marco@gnu.org>
11373         * normal/lexer.c (grub_script_yylex): Don't filter out newlines.
11375         * normal/parser.y (commandblock): Defined as <cmd>.  A subroutine
11376         for `menuentry'.
11377         (script): Accept leading newlines.
11378         (newlines): New rule to describe 0 or more newlines.
11379         (commands): Accept `command' with trailing newline.  Fixed the
11380         order in which arguments were passed to `grub_script_add_cmd'.
11381         Accept commands separated by newlines.
11382         (function): Changed to accept newlines.
11383         (menuentry) Rewritten.
11385         * normal/script.c (grub_script_create_cmdmenu): Add new entries in
11386         front of the list, instead of to the end.
11388 2006-05-19  Yoshinori K. Okuji  <okuji@enbug.org>
11390         * util/i386/pc/grub-install.in (bindir): New variable.
11391         (grub_mkimage): Use BINDIR instead of SBINDIR. Reported by Lee
11392         Shaver <lbgwjl@gmail.com>.
11394 2006-05-14  Yoshinori K. Okuji  <okuji@enbug.org>
11396         * kern/i386/pc/startup.S: Include grub/cpu/linux.h instead of
11397         grub/machine/linux.h
11398         * loader/i386/pc/linux.c: Likewise.
11400         * include/grub/i386/pc/linux.h: Moved to ...
11401         * include/grub/i386/linux.h: ... here.
11403         * include/grub/i386/linux.h (struct linux_kernel_params): New
11404         struct.
11406 2006-05-09  Vesa Jaaskelainen  <chaac@nic.fi>
11408         * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Corrected bounds
11409         checking.
11410         (grub_video_vbe_blit_glyph): Likewise.
11411         (grub_video_vbe_blit_bitmap): Likewise.
11412         (grub_video_vbe_blit_render_target): Likewise.
11414 2006-05-09  Yoshinori K. Okuji  <okuji@enbug.org>
11416         * configure.ac (--with-platform): Properly quote the square
11417         brackets.
11419 2006-05-08  Marco Gerards  <marco@gnu.org>
11421         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Renamed from
11422         this...
11423         (kernel_elf_HEADERS): ...to this.  Updated all users.
11424         (grubof_symlist.c): Renamed from this...
11425         (kernel_elf_symlist.c): ...to this.  Updated all users.
11426         (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
11427         (grubof_SOURCES): Renamed from this...
11428         (kernel_elf_SOURCES): ...to this.
11429         (grubof_HEADERS): Renamed from this...
11430         (kernel_elf_HEADERS): ...to this.
11431         (grubof_CFLAGS): Renamed from this...
11432         (kernel_elf_CFLAGS): ...to this.
11433         (grubof_ASFLAGS): Renamed from this...
11434         (kernel_elf_ASFLAGS): ...to this.
11435         (grubof_LDFLAGS): Renamed from this...
11436         (kernel_elf_LDFLAGS): ...to this.
11438         * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Renamed from
11439         this...
11440         (kernel_elf_HEADERS): ...to this.  Updated all users.
11441         (grubof_symlist.c): Renamed from this...
11442         (kernel_elf_symlist.c): ...to this.  Updated all users.
11443         (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
11444         (grubof_SOURCES): Renamed from this...
11445         (kernel_elf_SOURCES): ...to this.
11446         (grubof_HEADERS): Renamed from this...
11447         (kernel_elf_HEADERS): ...to this.
11448         (grubof_CFLAGS): Renamed from this...
11449         (kernel_elf_CFLAGS): ...to this.
11450         (grubof_ASFLAGS): Renamed from this...
11451         (kernel_elf_ASFLAGS): ...to this.
11452         (grubof_LDFLAGS): Renamed from this...
11453         (kernel_elf_LDFLAGS): ...to this.
11455         * util/powerpc/ieee1275/grub-mkimage.c (add_segments): Use
11456         `kernel.elf' instead of `grubof'.
11458 2006-05-08  Yoshinori K. Okuji  <okuji@enbug.org>
11460         Add --with-platform to configure. Use pkglibdir instead of
11461         pkgdatadir. This is reported by Roger Leigh.
11463         * util/powerpc/ieee1275/grub-install.in (datadir): Removed.
11464         (host_vendor): Likewise.
11465         (host_os): Likewise.
11466         (pkgdatadir): Likewise.
11467         (platform): New variable.
11468         (pkglibdir): Likewise.
11469         Use PKGLIBDIR instead of PKGDATADIR.
11471         * util/i386/pc/grub-install.in (datadir): Removed.
11472         (host_vendor): Likewise.
11473         (host_os): Likewise.
11474         (pkgdatadir): Likewise.
11475         (platform): New variable.
11476         (pkglibdir): Likewise.
11477         Use PKGLIBDIR instead of PKGDATADIR.
11479         * util/powerpc/ieee1275/grub-mkimage.c (usage): Use GRUB_LIBDIR
11480         instead of GRUB_DATADIR.
11481         (main): Likewise.
11482         * util/i386/pc/grub-mkimage.c (usage): Likewise.
11483         (main): Likewise.
11484         * util/i386/efi/grub-mkimage.c (usage): Likewise.
11485         (main): Likewise.
11487         * configure.ac (--with-platform): New option.
11488         Use PLATFORM instead of HOST_VENDOR to specify a platform.
11490         * Makefile.in: Include a makefile based on PLATFORM instead of
11491         HOST_VENDOR.
11492         (pkgdatadir): Not appended by the machine type.
11493         (pkglibdir): Appended by the machine type.
11494         (host_vendor): Removed.
11495         (platform): New variable.
11496         (BUILD_CPPFLAGS): Specify GRUB_LIBDIR instead of GRUB_DATADIR.
11497         (install-local): Use PKGLIBDIR instead of PKGDATADIR.
11498         (uninstall): Likewise.
11500 2006-05-07  Yoshinori K. Okuji  <okuji@enbug.org>
11502         Use the environment context in the menu. Remove the commands
11503         "default" and "timeout", and use variables instead.
11505         * normal/menu.c: Include grub/env.h.
11506         (print_entry): Cast TITLE to silence gcc.
11507         (get_timeout): New function.
11508         (set_timeout): Likewise.
11509         (get_entry_number): Likewise.
11510         (run_menu): Use a default entry, a fallback entry and a timeout
11511         in the environment variables "default", "fallback" and
11512         "timeout". Also, tweak the default entry if it is not within the
11513         current menu entries.
11514         (grub_menu_run): Use a fallback entry in the environment variable
11515         "fallback".
11517         * normal/main.c (read_config_file): Do not initialize
11518         NEWMENU->DEFAULT_ENTRY, NEWMENU->FALLBACK_ENTRY or
11519         NEWMENU->TIMEOUT.
11520         (grub_normal_execute): Use a data slot to store the menu.
11522         * include/grub/normal.h (struct grub_menu): Removed default_entry,
11523         fallback_entry and timeout.
11524         (struct grub_menu_list): Removed.
11525         (grub_menu_list_t): Likewise.
11526         (struct grub_context): Likewise.
11527         (grub_context_t): Likewise.
11528         (grub_context_get): Likewise.
11529         (grub_context_get_current_menu): Likewise.
11530         (grub_context_push_menu): Likewise.
11531         (grub_context_pop_menu): Likewise.
11532         (grub_default_init): Likewise.
11533         (grub_default_fini): Likewise.
11534         (grub_timeout_init): Likewise.
11535         (grub_timeout_fini): Likewise.
11537         * conf/sparc64-ieee1275.rmk (pkgdata_MODULES): Removed default.mod
11538         and timeout.mod.
11539         (normal_mod_SOURCES): Removed normal/context.c.
11541         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Removed
11542         commands/default.c, commands/timeout.c and normal/context.c.
11543         (normal_mod_SOURCES): Removed normal/context.c.
11545         * conf/i386-pc.rmk (grub_emu_SOURCES): Removed commands/default.c,
11546         commands/timeout.c and normal/context.c.
11547         (normal_mod_SOURCES): Removed normal/context.c.
11549         * conf/i386-efi.rmk (grub_emu_SOURCES): Removed
11550         commands/default.c, commands/timeout.c and normal/context.c.
11551         (normal_mod_SOURCES): Removed normal/context.c.
11553         * conf/common.rmk (pkgdata_MODULES): Removed default.mod and
11554         timeout.mod.
11555         (default_mod_SOURCES): Removed.
11556         (default_mod_CFLAGS): Likewise.
11557         (default_mod_LDFLAGS): Likewise.
11558         (timeout_mod_SOURCES): Removed.
11559         (timeout_mod_CFLAGS): Likewise.
11560         (timeout_mod_LDFLAGS): Likewise.
11562         * DISTLIST: Removed commands/default.c, commands/timeout.c and
11563         normal/context.c.
11565         * commands/default.c: Removed.
11566         * commands/timeout.c: Likewise.
11567         * normal/context.c: Likewise.
11569 2006-05-07  Vesa Jaaskelainen  <chaac@nic.fi>
11571         * kern/i386/pc/startup.S (grub_exit): Added missing .code32 tag.
11573 2006-05-02  Yoshinori K. Okuji  <okuji@enbug.org>
11575         * kern/env.c (struct grub_env_context): Removed "sorted". Renamed
11576         "next" to "prev" for readability.
11577         (struct grub_env_sorted_var): New struct.
11578         (grub_env_context): Renamed to ...
11579         (initial_context): ... this.
11580         (grub_env_var_context): Renamed to ...
11581         (current_context): ... this.
11582         (grub_env_find): Look only at CURRENT_CONTEXT.
11583         (grub_env_context_open): Rewritten to copy exported variables from
11584         previous context.
11585         (grub_env_context_close): Rewritten according to the new
11586         scheme. Also, add an assertion to prevent the initial context from
11587         removed.
11588         (grub_env_insert): Removed the code for the sorted list.
11589         (grub_env_remove): Likewise.
11590         (grub_env_export): Simply mark the variable with
11591         GRUB_ENV_VAR_GLOBAL.
11592         (grub_env_set): A cosmetic change for naming consistency.
11593         (grub_env_get): Likewise.
11594         (grub_env_unset): Likewise.
11595         (grub_env_iterate): Rewritten to sort variables within this
11596         function.
11597         (grub_register_variable_hook): Fixed for naming consistency. Call
11598         grub_env_find again, only if NAME is not found at the first time.
11599         (mangle_data_slot_name): New function.
11600         (grub_env_set_data_slot): Likewise.
11601         (grub_env_get_data_slot): Likewise.
11602         (grub_env_unset_data_slot): Likewise.
11604         * include/grub/env.h (grub_env_var_type): New enum.
11605         (GRUB_ENV_VAR_LOCAL): New constant.
11606         (GRUB_ENV_VAR_GLOBAL): Likewise.
11607         (GRUB_ENV_VAR_DATA): Likewise.
11608         (struct grub_env_var): Removed "sort_next" and "sort_prevp". Added
11609         "type".
11610         (grub_env_set): Replace VAR with NAME for consistency.
11611         (grub_register_variable_hook): Likewise.
11612         (grub_env_export): Specify the name of the argument.
11613         (grub_env_set_data_slot): New prototype.
11614         (grub_env_get_data_slot): Likewise.
11615         (grub_env_unset_data_slot): Likewise.
11617 2006-04-30  Yoshinori K. Okuji  <okuji@enbug.org>
11619         Extend the loader so that GRUB can accept a loader which comes
11620         back to GRUB when a loaded image exits. Also, this change adds
11621         support for a chainloader on EFI.
11623         * term/efi/console.c: Include grub/misc.h.
11624         (grub_console_checkkey): Display a scan code on the top for
11625         debugging. This will be removed once the EFI port gets stable.
11626         Correct the scan code mapping.
11628         * kern/efi/mm.c (sort_memory_map): Sort in a descending order to
11629         allocate memory from larger regions, in order to reduce the number
11630         of allocated regions. Otherwise, the MacOSX loader panics.
11631         (filter_memory_map): Avoid less than 1MB for compatibility with
11632         other loaders.
11633         (add_memory_regions): Allocate from the tail of a region, if
11634         possible, to avoid allocating a region near to 1MB, for the MacOSX
11635         loader.
11637         * kern/efi/init.c (grub_efi_set_prefix): Specify
11638         GRUB_EFI_IMAGE_HANDLE to grub_efi_get_loaded_image.
11640         * kern/efi/efi.c (grub_efi_get_loaded_image): Accept a new
11641         argument IMAGE_HANDLE and specify it to get a loaded image.
11642         (grub_arch_modules_addr): Specify GRUB_EFI_IMAGE_HANDLE to
11643         grub_efi_get_loaded_image.
11644         (grub_efi_get_filename): Divide the length by the size of
11645         grub_efi_char16_t.
11646         (grub_efi_get_device_path): New function.
11647         (grub_efi_print_device_path): Print End Device Path nodes. Divide
11648         the length by the size of grub_efi_char16_t for a file path device
11649         path node.
11651         * kern/loader.c (grub_loader_noreturn): New variable.
11652         (grub_loader_set): Accept a new argument NORETURN. Set
11653         GRUB_LOADER_NORETURN to NORETURN.
11654         All callers changed.
11655         (grub_loader_boot): If GRUB_LOADER_NORETURN is false, do not call
11656         grub_machine_fini.
11658         * include/grub/efi/efi.h (grub_efi_get_device_path): New
11659         prototype.
11660         (grub_efi_get_loaded_image): Take an argument to specify an image
11661         handle.
11663         * include/grub/loader.h (grub_loader_set): Added one more argument
11664         NORETURN.
11666         * disk/efi/efidisk.c (make_devices): Use grub_efi_get_device_path
11667         instead of grub_efi_open_protocol.
11668         (grub_efidisk_get_device_name): Likewise.
11669         (grub_efidisk_close): Print a newline.
11670         (grub_efidisk_get_device_handle): Fixed to use
11671         GRUB_EFI_DEVICE_PATH_SUBTYPE instead of
11672         GRUB_EFI_DEVICE_PATH_TYPE.
11674         * disk/efi/efidisk.c (device_path_guid): Moved to ...
11675         * kern/efi/efi.c (device_path_guid): ... here.
11677         * conf/i386-efi.rmk (pkgdata_MODULES): Added _chain.mod and
11678         chain.mod.
11679         (kernel_mod_HEADERS): Added efi/disk.h.
11680         (_chain_mod_SOURCES): New variable.
11681         (_chain_mod_CFLAGS): Likewise.
11682         (_chain_mod_LDFLAGS): Likewise.
11683         (chain_mod_SOURCES): Likewise.
11684         (chain_mod_CFLAGS): Likewise.
11685         (chain_mod_LDFLAGS): Likewise.
11687         * DISTLIST: Added include/grub/efi/chainloader.h,
11688         loader/efi/chainloader.c and loader/efi/chainloader_normal.c.
11690         * include/grub/efi/chainloader.h: New file.
11691         * loader/efi/chainloader.c: Likewise.
11692         * loader/efi/chainloader_normal.c: Likewise.
11694 2006-04-30  Marco Gerards  <marco@gnu.org>
11696         * commands/configfile.c (grub_cmd_source): New function.
11697         (GRUB_MOD_INIT): Register the commands `source' and `.'.
11698         (GRUB_MOD_FINI): De-register the commands `source' and `.'.
11700 2006-04-30  Marco Gerards  <marco@gnu.org>
11702         * normal/execute.c (grub_script_execute_cmd): Change the return
11703         type to `grub_err_t'.  Correctly return the error.
11704         (grub_script_execute_cmdline): In case a command line is not a
11705         command or a function, try to interpret it as an assignment.
11707 2006-04-30  Yoshinori K. Okuji  <okuji@enbug.org>
11709         * fs/hfsplus.c (grub_hfsplus_read_block): Fixed a memory leak.
11710         (grub_hfsplus_iterate_dir): Reordered to skip unknown nodes. Also,
11711         skip a node whose name is obviously invalid as UTF-16,
11712         i.e. contains a NUL character. Stop the iteration when the last
11713         directory entry is found. Instead of using the return value of
11714         grub_hfsplus_btree_iterate_node, store the value in RET and use
11715         it, because the iterator can be stopped by the last directory
11716         entry.
11718 2006-04-30  Marco Gerards  <marco@gnu.org>
11720         * include/grub/env.h (grub_env_export): New prototype.  Reported
11721         by Jan C. Kleinsorge <jan.kleinsorge@udo.edu>.
11723 2006-04-30  Marco Gerards  <marco@gnu.org>
11725         * fs/hfsplus.c (grub_hfsplus_iterate_dir): Correctly calculate the
11726         size of the extents in a catalog file record.
11728 2006-04-29  Marco Gerards  <marco@gnu.org>
11730         * commands/configfile.c (grub_cmd_configfile): Execute the
11731         configfile within its own context.
11733         * include/grub/env.h (grub_env_context_open): New prototype.
11734         (grub_env_context_close): Likewise.
11736         * kern/env.c (grub_env): Removed.
11737         (grub_env_sorted): Likewise.
11738         (grub_env_context): New variable.
11739         (grub_env_var_context): Likewise.
11740         (grub_env_find): Search both the active context and the global
11741         context.
11742         (grub_env_context_open): New function.
11743         (grub_env_context_close): Likewise.
11744         (grub_env_insert): Likewise.
11745         (grub_env_remove): Likewise.
11746         (grub_env_export): Likewise.
11747         (grub_env_set): Changed to use helper functions to avoid code
11748         duplication.
11749         (grub_env_iterate): Rewritten so both the current context and the
11750         global context are being used.
11752         * normal/command.c (export_command): New function.
11753         (grub_command_init): Register the `export' function.
11755 2006-04-26  Yoshinori K. Okuji  <okuji@enbug.org>
11757         * util/i386/pc/grub-mkimage.c (compress_kernel): Cast arguments
11758         explicitly to suppress gcc's warnings.
11759         * fs/fat.c (grub_fat_find_dir): Likewise.
11760         (grub_fat_label): Likewise.
11761         * fs/xfs.c (grub_xfs_read_inode): Likewise.
11762         (grub_xfs_mount): Likewise.
11763         (grub_xfs_label): Likewise.
11764         * fs/affs.c (grub_affs_mount): Likewise.
11765         (grub_affs_label): Likewise.
11766         (grub_affs_iterate_dir): Likewise.
11767         * fs/sfs.c (grub_sfs_mount): Likewise.
11768         (grub_sfs_iterate_dir): Likewise.
11769         * fs/ufs.c (grub_ufs_lookup_symlink): Likewise.
11770         * fs/hfs.c (grub_hfs_mount): Likewise.
11771         (grub_hfs_cmp_catkeys): Likewise.
11772         (grub_hfs_find_dir): Likewise.
11773         (grub_hfs_dir): Likewise.
11774         (grub_hfs_label): Likewise.
11775         * fs/jfs.c (grub_jfs_mount): Likewise.
11776         (grub_jfs_opendir): Likewise.
11777         (grub_jfs_getent): Likewise.
11778         (grub_jfs_lookup_symlink): Likewise.
11779         (grub_jfs_label): Likewise.
11780         * fs/hfsplus.c (grub_hfsplus_cmp_catkey): Likewise.
11781         (grub_hfsplus_iterate_dir): Likewise.
11782         (grub_hfsplus_btree_iterate_node): Made static.
11784         * util/grub-emu.c (prefix): New variable.
11785         (grub_machine_set_prefix): New function.
11786         (main): Do not set the environment variable "prefix" here. Only
11787         set PREFIX, which is used later by grub_machine_set_prefix.
11789         * include/grub/video.h: Do not include grub/symbol.h.
11790         (grub_video_register): Not exported. This symbol is not defined in
11791         the kernel.
11792         (grub_video_unregister): Likewise.
11793         (grub_video_iterate): Likewise.
11794         (grub_video_setup): Likewise.
11795         (grub_video_restore): Likewise.
11796         (grub_video_get_info): Likewise.
11797         (grub_video_get_blit_format): Likewise.
11798         (grub_video_set_palette): Likewise.
11799         (grub_video_get_palette): Likewise.
11800         (grub_video_set_viewport): Likewise.
11801         (grub_video_get_viewport): Likewise.
11802         (grub_video_map_color): Likewise.
11803         (grub_video_map_rgb): Likewise.
11804         (grub_video_map_rgba): Likewise.
11805         (grub_video_fill_rect): Likewise.
11806         (grub_video_blit_glyph): Likewise.
11807         (grub_video_blit_bitmap): Likewise.
11808         (grub_video_blit_render_target): Likewise.
11809         (grub_video_scroll): Likewise.
11810         (grub_video_swap_buffers): Likewise.
11811         (grub_video_create_render_target): Likewise.
11812         (grub_video_delete_render_target): Likewise.
11813         (grub_video_set_active_render_target): Likewise.
11815         * include/grub/symbol.h [GRUB_SYMBOL_GENERATOR] (EXPORT_FUNC):
11816         Undefined.
11817         [GRUB_SYMBOL_GENERATOR] (EXPORT_VAR): Likewise.
11819         * conf/sparc64-ieee1275.rmk (grubof_symlist.c): Depended on
11820         config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
11821         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
11822         instead of $(srcdir)/genkernsyms.sh.
11824         * conf/powerpc-ieee1275.rmk (grubof_symlist.c): Depended on
11825         config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
11826         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
11827         instead of $(srcdir)/genkernsyms.sh.
11829         * conf/i386-pc.rmk (symlist.c): Depended on config.h. Use
11830         gensymlist.sh instead of $(srcdir)/gensymlist.sh.
11831         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
11832         instead of $(srcdir)/genkernsyms.sh.
11834         * conf/i386-efi.rmk (symlist.c): Depended on config.h. Use
11835         gensymlist.sh instead of $(srcdir)/gensymlist.sh.
11836         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
11837         instead of $(srcdir)/genkernsyms.sh.
11839         * configure.ac (AC_CONFIG_FILES): Added gensymlist.sh and
11840         genkernsyms.sh.
11842         * Makefile.in (DISTCLEANFILES): Added gensymlist.sh and
11843         genkernsyms.sh.
11844         (gensymlist.sh): New target.
11845         (genkernsyms.sh): Likewise.
11847         * DISTLIST: Removed genkernsyms.sh and gensymlist.sh. Added
11848         genkernsyms.sh.in and gensymlist.sh.in.
11850         * genkernsyms.sh: Removed.
11851         * gensymlist.sh: Likewise.
11853         * genkernsyms.sh.in: New file.
11854         * gensymlist.sh.in: Likewise.
11856 2006-04-25  Hollis Blanchard  <hollis@penguinppc.org>
11858         * kern/powerpc/ieee1275/init.c (grub_machine_set_prefix): Do not
11859         clobber "prefix", since we may have already set it manually.
11861 2006-04-25  Hollis Blanchard  <hollis@penguinppc.org>
11863         * kern/misc.c (abort): New alias for grub_abort.
11865 2006-04-25  Yoshinori K. Okuji  <okuji@enbug.org>
11867         A new machine-specific function "grub_machine_set_prefix" is
11868         defined. This is called after loading modules, so that a prefix
11869         initialization can use modules. Also, this change adds an
11870         intensive debugging feature for the memory manager via the
11871         configure option "--enable-mm-debug".
11873         * partmap/gpt.c (gpt_partition_map_iterate): Add one more into
11874         PART.LEN.
11876         * kern/sparc64/ieee1275/init.c (abort): Removed.
11877         (grub_stop): Likewise.
11878         (grub_exit): New function.
11879         (grub_set_prefix): Renamed to ...
11880         (grub_machine_set_prefix): ... this.
11881         (grub_machine_init): Do not call grub_set_prefix.
11883         * kern/powerpc/ieee1275/init.c (grub_set_prefix): Renamed to ...
11884         (grub_machine_set_prefix): ... this.
11885         (grub_machine_init): Do not call grub_set_prefix.
11887         * kern/i386/pc/init.c (grub_machine_set_prefix): New function.
11888         (grub_machine_init): Do not set the prefix here.
11890         * kern/i386/efi/init.c (grub_machine_set_prefix): New function.
11892         * kern/efi/init.c: Include grub/mm.h.
11893         (grub_efi_set_prefix): New function.
11895         * kern/efi/efi.c (grub_exit): Call grub_efi_fini.
11896         (grub_efi_get_filename): New function.
11897         (grub_print_device_path): Renamed to ...
11898         (grub_efi_print_device_path): ... this.
11900         * kern/mm.c [MM_DEBUG] (grub_malloc): Undefined.
11901         [MM_DEBUG] (grub_realloc): Likewise.
11902         [MM_DEBUG] (grub_free): Likewise.
11903         [MM_DEBUG] (grub_memalign): Likewise.
11904         [MM_DEBUG] (grub_mm_debug): New variable.
11905         [MM_DEBUG] (grub_debug_malloc): New function.
11906         [MM_DEBUG] (grub_debug_free): New function.
11907         [MM_DEBUG] (grub_debug_realloc): New function.
11908         [MM_DEBUG] (grub_debug_memalign): New function.
11910         * kern/misc.c (grub_abort): Print a newline to distinguish
11911         the message.
11913         * kern/main.c (grub_main): Call grub_machine_set_prefix and
11914         grub_set_root_dev after loading modules. This is necessary when
11915         setting a prefix depends on modules.
11917         * include/grub/efi/efi.h (grub_print_device_path): Renamed to ...
11918         (grub_efi_print_device_path): ... this.
11919         (grub_efi_get_filename): New prototype.
11920         (grub_efi_set_prefix): Likewise.
11922         * include/grub/efi/disk.h: Include grub/efi/api.h, grub/symbol.h
11923         and grub/disk.h.
11924         (grub_efidisk_get_device_handle): New prototype.
11925         (grub_efidisk_get_device_name): Likewise.
11927         * include/grub/mm.h: Include config.h.
11928         (MM_DEBUG): Removed.
11929         [MM_DEBUG && !GRUB_UTIL] (grub_mm_debug): New prototype.
11930         [MM_DEBUG && !GRUB_UTIL] (grub_malloc): New macro.
11931         [MM_DEBUG && !GRUB_UTIL] (grub_realloc): Likewise.
11932         [MM_DEBUG && !GRUB_UTIL] (grub_memalign): Likewise.
11933         [MM_DEBUG && !GRUB_UTIL] (grub_free): Likewise.
11934         [MM_DEBUG && !GRUB_UTIL] (grub_debug_malloc): New prototype.
11935         [MM_DEBUG && !GRUB_UTIL] (grub_debug_realloc): New prototype.
11936         [MM_DEBUG && !GRUB_UTIL] (grub_debug_memalign): New prototype.
11937         [MM_DEBUG && !GRUB_UTIL] (grub_debug_free): New prototype.
11939         * include/grub/kernel.h (grub_machine_set_prefix): New prototype.
11941         * disk/efi/efidisk.c: Include grub/partition.h.
11942         (iterate_child_devices): New function.
11943         (add_device): First, compare only last device path nodes, so that
11944         devices are sorted by the types.
11945         (grub_efidisk_get_device_handle): New function.
11946         (grub_efidisk_get_device_name): Likewise.
11948         * configure.ac (--enable-mm-debug): New option to enable the
11949         memory manager debugging feature. This makes the binary much
11950         bigger, so is disabled by default.
11952 2006-04-23  Yoshinori K. Okuji  <okuji@enbug.org>
11954         Use grub_abort instead of grub_stop, and grub_exit must be
11955         define in each architecture now. Also, this change adds support
11956         for EFI disks.
11958         * util/i386/pc/grub-probefs.c: Include grub/term.h.
11959         (grub_getkey): New function.
11960         (grub_term_get_current): Likewise.
11962         * util/i386/pc/grub-setup.c: Include grub/term.h.
11963         (grub_getkey): New function.
11964         (grub_term_get_current): Likewise.
11966         * util/misc.c (grub_stop): Renamed to ...
11967         (grub_exit): ... this.
11969         * kern/powerpc/ieee1275/init.c (abort): Renamed to ...
11970         (grub_exit): ... this.
11971         (grub_machine_init): Use grub_abort instead of abort.
11972         (grub_stop): Removed.
11974         * kern/powerpc/ieee1275/cmain.c (cmain): Use grub_abort instead of
11975         abort.
11977         * kern/i386/pc/startup.S (grub_exit): New function.
11978         (cold_reboot): New label.
11980         * kern/efi/init.c: Include grub/efi/disk.h and grub/env.h.
11981         (grub_efi_init): Call grub_efidisk_init.
11982         (grub_efi_fini): Call grub_efidisk_fini.
11984         * kern/efi/efi.c: Include grub/mm.h.
11985         (grub_efi_console_control_guid): Renamed to ...
11986         (console_control_guid): ... this.
11987         (grub_efi_loaded_image_guid): Renamed to ...
11988         (loaded_image_guid): ... this.
11989         (grub_efi_locate_handle): New function.
11990         (grub_efi_open_protocol): Likewise.
11991         (grub_efi_set_text_mode): Use CONSOLE_CONTROL_GUID instead of
11992         GRUB_EFI_CONSOLE_CONTROL_GUID.
11993         (grub_efi_exit): Removed.
11994         (grub_stop): Likewise.
11995         (grub_efi_get_loaded_image): Use grub_efi_open_protocol.
11996         (grub_exit): New function.
11997         (grub_print_device_path): Likewise.
11999         * kern/rescue.c (grub_rescue_cmd_exit): New function.
12000         (grub_enter_rescue_mode): Register "exit".
12002         * kern/misc.c (grub_real_dprintf): A cosmetic change.
12003         (grub_abort): New function.
12005         * kern/err.c (grub_fatal): Use grub_abort instead of grub_stop.
12007         * include/grub/sparc64/ieee1275/kernel.h (abort): Removed.
12009         * include/grub/powerpc/ieee1275/kernel.h (abort): Removed.
12011         * include/grub/efi/efi.h (grub_efi_exit): Removed.
12012         (grub_print_device_path): New prototype.
12013         (grub_efi_locate_handle): Likewise.
12014         (grub_efi_open_protocol): Likewise.
12016         * include/grub/efi/disk.h (grub_efidisk_fini): New file.
12017         * disk/efi/efidisk.c: Likewise.
12019         * DISTLIST: Added disk/efi/efidisk.c and include/grub/efi/disk.h.
12021         * include/grub/efi/console_control.h
12022         (GRUB_EFI_CONSOLE_CONTROL_GUID): Use an array for the last 8 bytes.
12024         * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): Specify the
12025         last 8 bytes as an array.
12026         (GRUB_EFI_DISK_IO_GUID): New macro.
12027         (GRUB_EFI_BLOCK_IO_GUID): Likewise.
12028         (GRUB_EFI_DEVICE_PATH_GUID): Likewise.
12029         (grub_efi_ipv6_address_t): Change the type to grub_uint16_t from
12030         grub_uint8_t.
12031         (struct grub_efi_guid): Use an array to specify the last 8 bytes.
12032         (struct grub_efi_device_path): Rename the member "sub_type" to
12033         "subtype".
12034         (GRUB_EFI_DEVICE_PATH_TYPE): New macro.
12035         (GRUB_EFI_DEVICE_PATH_SUBTYPE): Likewise.
12036         (GRUB_EFI_DEVICE_PATH_LENGTH): Likewise.
12037         (GRUB_EFI_END_DEVICE_PATH_TYPE): Likewise.
12038         (GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE): Likewise.
12039         (GRUB_EFI_END_THIS_DEVICE_PATH_SUBTYPE): Likewise.
12040         (GRUB_EFI_END_ENTIRE_DEVICE_PATH): Likewise.
12041         (GRUB_EFI_NEXT_DEVICE_PATH): Likewise.
12042         (GRUB_EFI_HARDWARE_DEVICE_PATH_TYPE): Likewise.
12043         (GRUB_EFI_PCI_DEVICE_PATH_SUBTYPE): Likewise.
12044         (struct grub_efi_pci_device_path): New structure.
12045         (grub_efi_pci_device_path_t): New type.
12046         (GRUB_EFI_PCCARD_DEVICE_PATH_SUBTYPE): New macro.
12047         (struct grub_efi_pccard_device_path): New structure.
12048         (grub_efi_pccard_device_path_t): New type.
12049         (GRUB_EFI_MEMORY_MAPPED_DEVICE_PATH_SUBTYPE): New macro.
12050         (struct grub_efi_memory_mapped_device_path): New structure.
12051         (grub_efi_memory_mapped_device_path_t): New type.
12052         (GRUB_EFI_VENDOR_DEVICE_PATH_SUBTYPE): New macro.
12053         (struct grub_efi_vendor_device_path): New structure.
12054         (grub_efi_vendor_device_path_t): New type.
12055         (GRUB_EFI_CONTROLLER_DEVICE_PATH_SUBTYPE): New macro.
12056         (struct grub_efi_controller_device_path): New structure.
12057         (grub_efi_controller_device_path_t): New type.
12058         (GRUB_EFI_ACPI_DEVICE_PATH_TYPE): New macro.
12059         (GRUB_EFI_ACPI_DEVICE_PATH_SUBTYPE): Likewise.
12060         (struct grub_efi_acpi_device_path): New structure.
12061         (grub_efi_acpi_device_path_t): New type.
12062         (GRUB_EFI_EXPANDED_ACPI_DEVICE_PATH_SUBTYPE): New macro.
12063         (struct grub_efi_expanded_acpi_device_path): New structure.
12064         (grub_efi_expanded_acpi_device_path_t): New type.
12065         (GRUB_EFI_EXPANDED_ACPI_HIDSTR): New macro.
12066         (GRUB_EFI_EXPANDED_ACPI_UIDSTR): Likewise.
12067         (GRUB_EFI_EXPANDED_ACPI_CIDSTR): Likewise.
12068         (GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE): Likewise.
12069         (GRUB_EFI_ATAPI_DEVICE_PATH_SUBTYPE): Likewise.
12070         (struct grub_efi_atapi_device_path): New structure.
12071         (grub_efi_atapi_device_path_t): New type.
12072         (GRUB_EFI_FIBRE_CHANNEL_DEVICE_PATH_SUBTYPE): New macro.
12073         (struct grub_efi_fibre_channel_device_path): New structure.
12074         (grub_efi_fibre_channel_device_path_t): New type.
12075         (GRUB_EFI_1394_DEVICE_PATH_SUBTYPE): New macro.
12076         (struct grub_efi_1394_device_path): New structure.
12077         (grub_efi_1394_device_path_t): New type.
12078         (GRUB_EFI_USB_DEVICE_PATH_SUBTYPE): New macro.
12079         (struct grub_efi_usb_device_path): New structure.
12080         (grub_efi_usb_device_path_t): New type.
12081         (GRUB_EFI_USB_CLASS_DEVICE_PATH_SUBTYPE): New macro.
12082         (struct grub_efi_usb_class_device_path): New structure.
12083         (grub_efi_usb_class_device_path_t): New type.
12084         (GRUB_EFI_I2O_DEVICE_PATH_SUBTYPE): New macro.
12085         (struct grub_efi_i2o_device_path): New structure.
12086         (grub_efi_i2o_device_path_t): New type.
12087         (GRUB_EFI_MAC_ADDRESS_DEVICE_PATH_SUBTYPE): New macro.
12088         (struct grub_efi_mac_address_device_path): New structure.
12089         (grub_efi_mac_address_device_path_t): New type.
12090         (GRUB_EFI_IPV4_DEVICE_PATH_SUBTYPE): New macro.
12091         (struct grub_efi_ipv4_device_path): New structure.
12092         (grub_efi_ipv4_device_path_t): New type.
12093         (GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE): New macro.
12094         (struct grub_efi_ipv6_device_path): New structure.
12095         (grub_efi_ipv6_device_path_t): New type.
12096         (GRUB_EFI_INFINIBAND_DEVICE_PATH_SUBTYPE): New macro.
12097         (struct grub_efi_infiniband_device_path): New structure.
12098         (grub_efi_infiniband_device_path_t): New type.
12099         (GRUB_EFI_UART_DEVICE_PATH_SUBTYPE): New macro.
12100         (struct grub_efi_uart_device_path): New structure.
12101         (grub_efi_uart_device_path_t): New type.
12102         (GRUB_EFI_VENDOR_MESSAGING_DEVICE_PATH_SUBTYPE): New macro.
12103         (struct grub_efi_vendor_messaging_device_path): New structure.
12104         (grub_efi_vendor_messaging_device_path_t): New type.
12105         (GRUB_EFI_MEDIA_DEVICE_PATH_TYPE): New macro.
12106         (GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE): Likewise.
12107         (struct grub_efi_hard_drive_device_path): New structure.
12108         (grub_efi_hard_drive_device_path_t): New type.
12109         (GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE): New macro.
12110         (struct grub_efi_cdrom_device_path): New structure.
12111         (grub_efi_cdrom_device_path_t): New type.
12112         (GRUB_EFI_VENDOR_MEDIA_DEVICE_PATH_SUBTYPE): New macro.
12113         (struct grub_efi_vendor_media_device_path): New structure.
12114         (grub_efi_vendor_media_device_path_t): New type.
12115         (GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE): New macro.
12116         (struct grub_efi_file_path_device_path): New structure.
12117         (grub_efi_file_path_device_path_t): New type.
12118         (GRUB_EFI_PROTOCOL_DEVICE_PATH_SUBTYPE): New macro.
12119         (struct grub_efi_protocol_device_path): New structure.
12120         (grub_efi_protocol_device_path_t): New type.
12121         (GRUB_EFI_BIOS_DEVICE_PATH_TYPE): New macro.
12122         (GRUB_EFI_BIOS_DEVICE_PATH_SUBTYPE): Likewise.
12123         (struct grub_efi_bios_device_path): New structure.
12124         (grub_efi_bios_device_path_t): New type.
12125         (struct grub_efi_disk_io): New structure.
12126         (grub_efi_disk_io_t): New type.
12127         (struct grub_efi_block_io_media): New structure.
12128         (grub_efi_block_io_media_t): New type.
12129         (struct grub_efi_block_io): New structure.
12130         (grub_efi_block_io_t): New type.
12132         * include/grub/misc.h (grub_stop): Removed.
12133         (grub_exit): New prototype.
12134         (grub_abort): Likewise.
12136         * include/grub/disk.h (enum grub_disk_dev_id): Added
12137         GRUB_DISK_DEVICE_EFIDISK_ID.
12139         * conf/i386-efi.rmk (kernel_mod_SOURCES): Added
12140         disk/efi/efidisk.c.
12141         (kernel_syms.lst): Remove the target if an error occurs.
12143 2006-04-22  Yoshinori K. Okuji  <okuji@enbug.org>
12145         * kern/misc.c (grub_lltoa): Rewritten the decimal conversion part,
12146         as it was simply too buggy.
12148 2006-04-21  Yoshinori K. Okuji  <okuji@enbug.org>
12150         * kern/misc.c (grub_lltoa): New function.
12151         (grub_vsprintf): Added support for the long long suffix,
12152         i.e. "ll".
12154 2006-04-20  Hollis Blanchard  <hollis@penguinppc.org>
12156         * Makefile.in (LDFLAGS): Add variable.
12157         (LD): Remove variable.
12158         * configure.ac: Add -m32 to LDFLAGS.
12159         * genmk.rb (PModule#rule): Use $(CC) instead of $(LD).
12160         * conf/powerpc-ieee1275.rmk (COMMON_LDFLAGS): Add variable.
12161         (grubof_LDFLAGS): Use $(COMMON_LDFLAGS).
12162         (_linux_mod_LDFLAGS, linux_mod_LDFLAGS, normal_mod_LDFLAGS,
12163         suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS): New
12164         variables.
12165         * conf/sparc64-ieee1275.rmk (COMMON_LDFLAGS): Add -nostdlib.
12166         * conf/i386-pc.rmk (COMMON_LDFLAGS): Add -nostdlib.
12167         * conf/i386-efi.rmk (COMMON_LDFLAGS): Add -nostdlib.
12169 2006-04-20  Vesa Jaaskelainen  <chaac@nic.fi>
12171         * term/gfxterm.c (grub_gfxterm_getcharwidth): Fixed character
12172         length for unknown glyph.
12174 2006-04-20  Yoshinori K. Okuji  <okuji@enbug.org>
12176         Add support for pre-loaded modules into the EFI port.
12178         * util/i386/efi/grub-mkimage.c (make_mods_section): Rewritten
12179         completely. Accept one more argument DIR. The caller has changed.
12181         * kern/i386/efi/init.c (grub_arch_modules_addr): Removed.
12183         * kern/efi/efi.c: Include grub/efi/pe32.h and grub/kernel.h.
12184         (grub_efi_loaded_image_guid): New variable.
12185         (grub_efi_get_loaded_image): New function.
12186         (grub_arch_modules_addr): Likewise.
12188         * include/grub/efi/efi.h (grub_efi_get_loaded_image): New
12189         prototype.
12191         * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): New macro.
12192         (struct grub_efi_loaded_image): New structure.
12193         (grub_efi_loaded_image_t): New type.
12195 2006-04-20  Yoshinori K. Okuji  <okuji@enbug.org>
12197         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Compare the file
12198         size with GRUB_OS_AREA_SIZE as grub_size_t instead of
12199         grub_ssize_t. Reported by Jeff Chua <jeff84@silk.corp.fedex.com>.
12201 2006-04-19  Roger Leigh  <rleigh@whinlatter.ukfsn.org>
12203         * DISTLIST: Added `util/powerpc/ieee1275/grub-install.in'.
12205 2006-04-19  Yoshinori K. Okuji  <okuji@enbug.org>
12207         * DISTLIST: Added include/grub/efi/console.h,
12208         include/grub/efi/time.h, include/grub/i386/efi/kernel.h,
12209         kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
12211         * include/grub/efi/console.h: New file.
12212         * include/grub/efi/time.h: Likewise.
12213         * include/grub/i386/efi/kernel.h: Likewise.
12214         * kern/efi/init.c: Likewise.
12215         * kern/efi/mm.c: Likewise.
12216         * term/efi/console.c: Likewise.
12218         * kern/i386/efi/init.c: Do not include grub/machine/time.h.
12219         (grub_stop): Removed.
12220         (grub_get_rtc): Likewise.
12221         (grub_machine_init): Simply call grub_efi_init.
12222         (grub_machine_fini): Call grub_efi_fini.
12224         * kern/efi/efi.c: Include grub/machine/time.h and grub/term.h.
12225         (grub_efi_output_string): Removed.
12226         (grub_efi_stall): New function.
12227         (grub_stop): Likewise.
12228         (grub_get_rtc): Likewise.
12230         * include/grub/efi/efi.h (grub_efi_output_string): Removed.
12231         (grub_efi_stall): New prototype.
12232         (grub_efi_allocate_pages): Likewise.
12233         (grub_efi_free_pages): Likewise.
12234         (grub_efi_get_memory_map): Likewise.
12235         (grub_efi_mm_init): Likewise.
12236         (grub_efi_mm_fini): Likewise.
12237         (grub_efi_init): Likewise.
12238         (grub_efi_fini): Likewise.
12240         * include/grub/i386/efi/time.h: Do not include
12241         grub/symbol.h. Include grub/efi/time.h.
12242         (GRUB_TICKS_PER_SECOND): Removed.
12243         (grub_get_rtc): Likewise.
12245         * include/grub/efi/api.h (struct grub_efi_memory_descriptor):
12246         Added padding. The EFI spec is buggy.
12247         (GRUB_EFI_BLACK): New macro.
12248         (GRUB_EFI_BLUE): Likewise.
12249         (GRUB_EFI_GREEN): Likewise.
12250         (GRUB_EFI_CYAN): Likewise.
12251         (GRUB_EFI_RED): Likewise.
12252         (GRUB_EFI_MAGENTA): Likewise.
12253         (GRUB_EFI_BROWN): Likewise.
12254         (GRUB_EFI_LIGHTGRAY): Likewise.
12255         (GRUB_EFI_BRIGHT): Likewise.
12256         (GRUB_EFI_DARKGRAY): Likewise.
12257         (GRUB_EFI_LIGHTBLUE): Likewise.
12258         (GRUB_EFI_LIGHTGREEN): Likewise.
12259         (GRUB_EFI_LIGHTCYAN): Likewise.
12260         (GRUB_EFI_LIGHTRED): Likewise.
12261         (GRUB_EFI_LIGHTMAGENTA): Likewise.
12262         (GRUB_EFI_YELLOW): Likewise.
12263         (GRUB_EFI_WHITE): Likewise.
12264         (GRUB_EFI_BACKGROUND_BLACK): Likewise.
12265         (GRUB_EFI_BACKGROUND_BLUE): Likewise.
12266         (GRUB_EFI_BACKGROUND_GREEN): Likewise.
12267         (GRUB_EFI_BACKGROUND_CYAN): Likewise.
12268         (GRUB_EFI_BACKGROUND_RED): Likewise.
12269         (GRUB_EFI_BACKGROUND_MAGENTA): Likewise.
12270         (GRUB_EFI_BACKGROUND_BROWN): Likewise.
12271         (GRUB_EFI_BACKGROUND_LIGHTGRAY): Likewise.
12272         (GRUB_EFI_TEXT_ATTR): Likewise.
12274         * conf/i386-efi.rmk (kernel_mod_SOURCES): Added kern/efi/efi.c,
12275         kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
12276         (kernel_mod_HEADERS): Added efi/time.h.
12278 2006-04-18  Yoshinori K. Okuji  <okuji@enbug.org>
12280         * DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
12281         include/grub/efi/api.h, include/grub/efi/console_control.h,
12282         include/grub/efi/efi.h, include/grub/efi/pe32.h,
12283         include/grub/i386/efi/time.h, kern/efi/efi.c,
12284         kern/i386/efi/init.c, kern/i386/efi/startup.S,
12285         and util/i386/efi/grub-mkimage.c.
12287         * Makefile.in (RMKFILES): Added i386-efi.rmk.
12289         * genmk.rb (PModule#rule): Do not export symbols if
12290         #{prefix}_EXPORTS is set to "no".
12292         * conf/i386-efi.mk: New file.
12293         * conf/i386-efi.rmk: Likewise.
12294         * include/grub/efi/api.h: Likewise.
12295         * include/grub/efi/console_control.h: Likewise.
12296         * include/grub/efi/efi.h: Likewise.
12297         * include/grub/efi/pe32.h: Likewise.
12298         * include/grub/i386/efi/time.h: Likewise.
12299         * kern/efi/efi.c: Likewise.
12300         * kern/i386/efi/init.c: Likewise.
12301         * kern/i386/efi/startup.S: Likewise.
12302         * util/i386/efi/grub-mkimage.c: Likewise.
12304 2006-04-17  Marco Gerards  <marco@gnu.org>
12306         * include/grub/script.h: Include <grub/parser.h> and
12307         "grub_script.tab.h".
12308         (struct grub_lexer_param): New struct.
12309         (struct grub_parser_param): Likewise.
12310         (grub_script_create_arglist): Pass the state in an argument.
12311         (grub_script_add_arglist): Likewise.
12312         (grub_script_create_cmdline): Likewise.
12313         (grub_script_create_cmdblock): Likewise.
12314         (grub_script_create_cmdif): Likewise.
12315         (grub_script_create_cmdmenu): Likewise.
12316         (grub_script_add_cmd): Likewise.
12317         (grub_script_arg_add): Likewise.
12318         (grub_script_lexer_ref): Likewise.
12319         (grub_script_lexer_deref): Likewise.
12320         (grub_script_lexer_record_start): Likewise.
12321         (grub_script_lexer_record_stop): Likewise.
12322         (grub_script_mem_record): Likewise.
12323         (grub_script_mem_record_stop): Likewise.
12324         (grub_script_malloc): Likewise.
12325         (grub_script_yylex): Likewise.
12326         (grub_script_yyparse): Likewise.
12327         (grub_script_yyerror): Likewise.
12328         (grub_script_yylex): Likewise.
12329         (grub_script_lexer_init): Return the state.
12331         * normal/lexer.c (grub_script_lexer_state): Removed variable.
12332         (grub_script_lexer_done): Likewise.
12333         (grub_script_lexer_getline): Likewise.
12334         (grub_script_lexer_refs): Likewise.
12335         (script): Likewise.
12336         (newscript): Likewise.
12337         (record): Likewise.
12338         (recording): Likewise.
12339         (recordpos): Likewise.
12340         (recordlen): Likewise.
12341         (grub_script_lexer_init): Return the state instead of setting
12342         global variables.
12343         (grub_script_lexer_ref): Use the newly added argument for state
12344         instead of globals.
12345         (grub_script_lexer_deref): Likewise.
12346         (grub_script_lexer_record_start): Likewise.
12347         (grub_script_lexer_record_stop): Likewise.
12348         (recordchar): Likewise.
12349         (nextchar): Likewise.
12350         (grub_script_yylex2): Likewise.
12351         (grub_script_yylex): Likewise.
12352         (grub_script_yyerror): Likewise.
12354         * normal/parser.y (func_mem): Removed variable.
12355         (menu_entry): Likewise.
12356         (err): Likewise.
12357         (%lex-param): New parser option.
12358         (%parse-param): Likewise.
12359         (script): Always return the AST.
12360         (argument): Pass the state around.
12361         (arguments): Likewise.
12362         (grubcmd): Likewise.
12363         (commands): Likewise.
12364         (function): Likewise.
12365         (menuentry): Likewise.
12366         (if_statement): Likewise.
12367         (if): Likewise.
12369         * normal/script.c (grub_script_memused): Removed variable.
12370         (grub_script_parsed): Likewise.
12371         (grub_script_malloc): Added a state argument.  Use that instead of
12372         global variables.
12373         (grub_script_mem_record): Likewise.
12374         (grub_script_mem_record_stop): Likewise.
12375         (grub_script_arg_add): Likewise.
12376         (grub_script_add_arglist): Likewise.
12377         (grub_script_create_cmdline): Likewise.
12378         (grub_script_create_cmdif): Likewise.
12379         (grub_script_create_cmdmenu): Likewise.
12380         (grub_script_add_cmd): Likewise.
12381         (grub_script_parse): Setup the state before calling the parser.
12383 2006-04-16  Marco Gerards  <marco@gnu.org>
12385         * normal/command.c (grub_command_init): Remove the title command.
12387         * normal/lexer.c (grub_script_yylex): Renamed from this...
12388         (grub_script_yylex2): ... to this.
12389         (grub_script_yylex): New function.  Temporary
12390         introduced to filter some tokens.
12391         (grub_script_yyerror): Print a newline.
12393         * normal/main.c (read_config_file): Output information about the
12394         lines that contain errors.  Wait for a key after all lines have
12395         been processed.  Don't return an empty menu.
12397         * normal/parser.y (func_mem): Don't initialize.
12398         (menu_entry): Likewise.
12399         (err): New variable.
12400         (script): Don't return anything when an error was encountered.
12401         (ws, returns): Removed rules.
12402         (argument): Disabled concatenated variable support.
12403         (arguments): Remove explicit separators.
12404         (grubcmd): Likewise.
12405         (function): Likewise.
12406         (menuentry): Likewise.
12407         (if): Likewise.
12408         (commands): Likewise.  Add error handling.
12410         * normal/script.c (grub_script_create_cmdline): If
12411         `grub_script_parsed' is 0, assume the parser encountered an error.
12413 2006-04-02  Yoshinori K. Okuji  <okuji@enbug.org>
12415         * configure.ac: Add support for EFI. Fix the typo
12416         BUILD_LDDFLAGS. Restore the LDFLAGS after testing.
12418 2006-04-01  Vesa Jaaskelainen  <chaac@nic.fi>
12420         * util/unifont2pff.rb: Removed unnecessary byte ordering.  Now
12421         foreign multibyte characters should be shown correctly.
12423 2006-04-01  Vesa Jaaskelainen  <chaac@nic.fi>
12425         * normal/main.c (grub_normal_menu_addentry): Fixed menu size
12426         calculation.
12427         (read_config_file): Made it to close file before returning.
12429 2006-03-31  Vesa Jaaskelainen  <chaac@nic.fi>
12431         * DISTLIST: Added include/grub/i386/pc/vbeblit.h,
12432         include/grub/i386/pc/vbefill.h, video/i386/pc/vbeblit.c,
12433         video/i386/pc/vbefill.c.
12435         * conf/i386-pc.rmk (vbe_mod_SOURCES): Added video/i386/pc/vbeblit.c,
12436         video/i386/pc/vbefill.c.
12438         * include/grub/video.h (grub_video_blit_format): New enum.
12439         (grub_video_mode_info): Added new member blit_format.
12440         (grub_video_get_blit_format): New function prototype.
12442         * include/grub/i386/pc/vbe.h (grub_video_vbe_get_video_ptr): New
12443         function prototype.
12444         (grub_video_vbe_map_rgb): Likewise.
12445         (grub_video_vbe_unmap_color): Likewise.
12447         * include/grub/i386/pc/vbeblit.h: New file.
12449         * include/grub/i386/pc/vbefill.h: New file.
12451         * video/video.c (grub_video_get_blit_format): New function.
12452         (grub_video_vbe_get_video_ptr): Re-declared as non-static.
12453         (grub_video_vbe_map_rgb): Likewise.
12454         (grub_video_vbe_unmap_color): Likewise.
12456         * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Changed to use more
12457         optimized fills.
12458         (grub_video_vbe_blit_render_target): Changed to use more optimized
12459         blits.
12460         (grub_video_vbe_setup): Added detection for optimized settings.
12461         (grub_video_vbe_create_render_target): Likewise.
12463         * video/i386/pc/vbeblit.c: New file.
12465         * video/i386/pc/vbefill.c: New file.
12467 2006-03-30  Vesa Jaaskelainen  <chaac@nic.fi>
12469         * font/manager.c (grub_font_get_glyph): Removed font fixup from
12470         here...
12472         * util/unifont2pff.rb: ... and moved it to here.  Improved argument
12473         parsing to support both hex and dec ranges.  If filename was missing
12474         show usage information.
12476 2006-03-14  Vesa Jaaskelainen  <chaac@nic.fi>
12478         * DISTLIST: Added include/grub/video.h, term/gfxterm.c,
12479         video/video.c, commands/videotest.c.  Removed term/i386/pc/vesafb.c.
12481         * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod,
12482         gfxterm.mod, videotest.mod.  Removed vga.mod, vesafb.mod.
12483         (video_mod_SOURCES): Added.
12484         (video_mod_CFLAGS): Likewise.
12485         (video_mod_LDFLAGS): Likewise.
12486         (gfxterm_mod_SOURCES): Likewise.
12487         (gfxterm_mod_CFLAGS): Likewise.
12488         (gfxterm_mod_LDFLAGS): Likewise.
12489         (videotest_mod_SOURCES): Likewise.
12490         (videotest_mod_CFLAGS): Likewise.
12491         (videotest_mod_LDFLAGS): Likewise.
12492         (vesafb_mod_SOURCES): Removed.
12493         (vesafb_mod_CFLAGS): Likewise.
12494         (vesafb_mod_LDFLAGS): Likewise.
12495         (vga_mod_SOURCES): Likewise.
12496         (vga_mod_CFLAGS): Likewise.
12497         (vga_mod_LDFLAGS): Likewise.
12499         * commands/videotest.c: New file.
12501         * font/manager.c (fill_with_default_glyph): Modified to use
12502         grub_font_glyph.
12503         (grub_font_get_glyph): Likewise.
12504         (fontmanager): Renamed from this...
12505         (font_manager): ... to this.
12507         * include/grub/font.h (grub_font_glyph): Added new structure.
12508         (grub_font_get_glyph): Modified to use grub_font_glyph.
12510         * include/grub/misc.h (grub_abs): Added as inline function.
12512         * include/grub/video.h: New file.
12514         * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro.
12515         (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise.
12516         (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise.
12517         (grub_vbe_get_controller_info): Renamed from this...
12518         (grub_vbe_bios_get_controller_info): ... to this.
12519         (grub_vbe_get_mode_info): Renamed from this...
12520         (grub_vbe_bios_get_mode_info): ... to this.
12521         (grub_vbe_set_mode): Renamed from this...
12522         (grub_vbe_bios_set_mode): ... to this.
12523         (grub_vbe_get_mode): Renamed from this...
12524         (grub_vbe_bios_get_mode): ... to this.
12525         (grub_vbe_set_memory_window): Renamed from this...
12526         (grub_vbe_bios_set_memory_window): ... to this.
12527         (grub_vbe_get_memory_window): Renamed from this...
12528         (grub_vbe_bios_get_memory_window): ... to this.
12529         (grub_vbe_set_scanline_length): Renamed from this...
12530         (grub_vbe_set_scanline_length): ... to this.
12531         (grub_vbe_get_scanline_length): Renamed from this...
12532         (grub_vbe_bios_get_scanline_length): ... to this.
12533         (grub_vbe_set_display_start): Renamed from this...
12534         (grub_vbe_bios_set_display_start): ... to this.
12535         (grub_vbe_get_display_start): Renamed from this...
12536         (grub_vbe_bios_get_display_start): ... to this.
12537         (grub_vbe_set_palette_data): Renamed from this...
12538         (grub_vbe_bios_set_palette_data): ... to this.
12539         (grub_vbe_set_pixel_rgb): Removed.
12540         (grub_vbe_set_pixel_index): Likewise.
12542         * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed
12543         from this...
12544         (grub_vbe_bios_get_controller_info): ... to this.
12545         (grub_vbe_get_mode_info): Renamed from this...
12546         (grub_vbe_bios_get_mode_info): ... to this.
12547         (grub_vbe_set_mode): Renamed from this...
12548         (grub_vbe_bios_set_mode): ... to this.
12549         (grub_vbe_get_mode): Renamed from this...
12550         (grub_vbe_bios_get_mode): ... to this.
12551         (grub_vbe_set_memory_window): Renamed from this...
12552         (grub_vbe_bios_set_memory_window): ... to this.
12553         (grub_vbe_get_memory_window): Renamed from this...
12554         (grub_vbe_bios_get_memory_window): ... to this.
12555         (grub_vbe_set_scanline_length): Renamed from this...
12556         (grub_vbe_set_scanline_length): ... to this.
12557         (grub_vbe_get_scanline_length): Renamed from this...
12558         (grub_vbe_bios_get_scanline_length): ... to this.
12559         (grub_vbe_set_display_start): Renamed from this...
12560         (grub_vbe_bios_set_display_start): ... to this.
12561         (grub_vbe_get_display_start): Renamed from this...
12562         (grub_vbe_bios_get_display_start): ... to this.
12563         (grub_vbe_set_palette_data): Renamed from this...
12564         (grub_vbe_bios_set_palette_data): ... to this.
12565         (grub_vbe_bios_get_controller_info): Fixed problem with registers
12566         getting corrupted after calling it.  Added more pushes and pops.
12567         (grub_vbe_bios_set_mode): Likewise.
12568         (grub_vbe_bios_get_mode): Likewise.
12569         (grub_vbe_bios_get_memory_window): Likewise.
12570         (grub_vbe_bios_set_scanline_length): Likewise.
12571         (grub_vbe_bios_get_scanline_length): Likewise.
12572         (grub_vbe_bios_get_display_start): Likewise.
12573         (grub_vbe_bios_set_palette_data): Likewise.
12575         * normal/cmdline.c (cl_set_pos): Refresh the screen.
12576         (cl_insert): Likewise.
12577         (cl_delete): Likewise.
12579         * term/gfxterm.c: New file.
12581         * term/i386/pc/vesafb.c: Removed file.
12583         * video/video.c: New file.
12585         * video/i386/pc/vbe.c (real2pm): Added new function.
12586         (grub_video_vbe_draw_pixel): Likewise.
12587         (grub_video_vbe_get_video_ptr): Likewise.
12588         (grub_video_vbe_get_pixel): Likewise
12589         (grub_video_vbe_init): Likewise.
12590         (grub_video_vbe_fini): Likewise.
12591         (grub_video_vbe_setup): Likewise.
12592         (grub_video_vbe_get_info): Likewise.
12593         (grub_video_vbe_set_palette): Likewise.
12594         (grub_video_vbe_get_palette): Likewise.
12595         (grub_video_vbe_set_viewport): Likewise.
12596         (grub_video_vbe_get_viewport): Likewise.
12597         (grub_video_vbe_map_color): Likewise.
12598         (grub_video_vbe_map_rgb): Likewise.
12599         (grub_video_vbe_map_rgba): Likewise.
12600         (grub_video_vbe_unmap_color): Likewise.
12601         (grub_video_vbe_fill_rect): Likewise.
12602         (grub_video_vbe_blit_glyph): Likewise.
12603         (grub_video_vbe_blit_bitmap): Likewise.
12604         (grub_video_vbe_blit_render_target): Likewise.
12605         (grub_video_vbe_scroll): Likewise.
12606         (grub_video_vbe_swap_buffers): Likewise.
12607         (grub_video_vbe_create_render_target): Likewise.
12608         (grub_video_vbe_delete_render_target): Likewise.
12609         (grub_video_vbe_set_active_render_target): Likewise.
12610         (grub_vbe_set_pixel_rgb): Remove function.
12611         (grub_vbe_set_pixel_index): Likewise.
12612         (index_color_mode): Remove static variable.
12613         (active_mode): Likewise.
12614         (framebuffer): Likewise.
12615         (bytes_per_scan_line): Likewise.
12616         (grub_video_vbe_adapter): Added new static variable.
12617         (framebuffer): Likewise.
12618         (render_target): Likewise.
12619         (initial_mode): Likewise.
12620         (mode_in_use): Likewise.
12621         (mode_list): Likewise.
12623 2006-03-10  Marco Gerards  <marco@gnu.org>
12625         * configure.ac (AC_INIT): Bumped to 1.93.
12627         * DISTLIST: Added `include/grub/hfs.h'.
12629 2006-02-01  Yoshinori K. Okuji  <okuji@enbug.org>
12631         * boot/i386/pc/boot.S (general_error): Before looping, try INT
12632         18H, which might help the BIOS falling back to next boot media.
12634 2006-01-25  Yoshinori K. Okuji  <okuji@enbug.org>
12636         * util/i386/pc/grub-install.in: Escape a backslash. Reported by
12637         Poe Chen <poe.poechen@gmail.com>.
12639 2006-01-17  Marco Gerards  <marco@gnu.org>
12641         * include/grub/normal.h: Include <grub/script.h>.
12642         (grub_command_list): Removed struct.
12643         (grub_command_list_t): Removed type.
12644         (grub_menu_entry): Remove members `num' and `command_list'.  Add
12645         members `commands' and `sourcecode'.
12646         * include/grub/script.h: Add inclusion guards.
12647         (grub_script_cmd_menuentry): New struct.
12648         (grub_script_execute_menuentry): New prototype.
12649         (grub_script_lexer_record_start): Likewise.
12650         (grub_script_lexer_record_stop): Likewise.
12651         * normal/execute.c (grub_script_execute_menuentry): New function.
12652         * normal/lexer.c (record, recording, recordpos, recordlen): New
12653         variables.
12654         (grub_script_lexer_record_start): New function.
12655         (grub_script_lexer_record_stop): Likewise.
12656         (recordchar): Likewise.
12657         (nextchar): Likewise.
12658         (grub_script_yylex): Use `nextchar' to fetch new characters.  Use
12659         2048 as the buffer size.  Add the tokens `menuentry' and `@'.
12660         * normal/main.c: Include <grub/parser.h> and <grub/script.h>
12661         (current_menu): New variable.
12662         (free_menu): Mainly rewritten.
12663         (grub_normal_menu_addentry): New function.
12664         (read_config_file): Rewritten.
12665         * normal/menu.c (run_menu_entry): Mainly rewritten.
12666         * normal/menu_entry.c (make_screen): Rewritten the code to insert
12667         the menu entry.
12668         (run): Mainly rewritten.
12669         * normal/parser.y (menu_entry): New variable.
12670         (GRUB_PARSER_TOKEN_MENUENTRY): New token.
12671         (menuentry): New rule.
12672         (command): Add `menuentry'.
12673         (if_statement): Allow additional returns before `fi'.
12674         * normal/script.c (grub_script_create_cmdmenu): New function.
12676 2006-01-03  Marco Gerards  <marco@gnu.org>
12678         * INSTALL: GNU Bison is required.
12679         * configure.ac: Rewritten the test to detect Bison.
12680         * Makefile.in (YACC): New variable.  Reported by Xun Sun
12681         <xun.sun.cn@gmail.com>.
12683 2006-01-03  Marco Gerards  <marco@gnu.org>
12685         * fs/hfsplus.c (grub_hfsplus_read_block): Convert the offset of
12686         the HFS+ filesystem to filesystem blocks.
12687         (grub_hfsplus_iterate_dir): Cast the `fileinfo' assignment so a
12688         GCC warning is silenced.
12690 2006-01-03  Marco Gerards  <marco@gnu.org>
12692         * partmap/apple.c (apple_partition_map_iterate): Convert the data
12693         read from disk from big endian to host byte order.
12695 2006-01-03  Hollis Blanchard  <hollis@penguinppc.org>
12697         * fs/hfs.c: Include <grub/hfs.h>.  Added reference to the official
12698         documentation.
12699         (GRUB_HFS_EMBED_HFSPLUS_SIG): New macro.
12700         (grub_hfs_mount): Grammar fix in error. Make sure this is not an
12701         embedded HFS+ filesystem.
12702         (GRUB_HFS_MAGIC, grub_hfs_extent, grub_hfs_datarecord_t)
12703         (grub_hfs_sblock): Move from here...
12704         * include/grub/hfs.h: To here...  New file.
12705         * fs/hfsplus.c: Include <grub/hfs.h>.  Added reference to the official
12706         documentation.
12707         (GRUB_HFSPLUS_MAGIC, GRUB_HFSPLUSX_MAGIC, GRUB_HFSPLUS_SBLOCK):
12708         New macros.
12709         (grub_hfsplus_volheader): Change type of member `magic' to
12710         `grub_uint16_t'.
12711         (grub_hfsplus_data): Add new member `embedded_offset'.
12712         (grub_hfsplus_read_block): Add the HFS+ wrapper offset to the
12713         returned block.
12714         (grub_hfsplus_mount): Read the HFS+ wrapper if it exists.
12715         Calculate the offset.
12717 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
12719         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRP_ADDR):
12720         Removed.
12721         (GRUB_BOOT_MACHINE_DRP_SIZE): Likewise.
12723 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
12725         * kern/env.c (grub_env_set): Check if ENV->VALUE instead of
12726         ENV->NAME is NULL after allocating ENV->VALUE.
12728 2005-12-25  Marco Gerards  <marco@gnu.org>
12730         * kern/env.c (grub_env_set): Rewritten the error handling code.
12732 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
12734         * geninit.sh: Made more robust, and more portable.
12736 2005-12-25  Marco Gerards  <marco@gnu.org>
12738         Add support for Apple HFS+ filesystems.
12740         * fs/hfsplus.c: New file.
12742         * DISTLIST: Added `fs/hfsplus.c'.
12744         * conf/common.rmk (pkgdata_MODULES): Add `hfsplus.mod'.
12745         (hfsplus_mod_SOURCES): New variable.
12746         (hfsplus_mod_CFLAGS): Likewise.
12747         (hfsplus_mod_LDFLAGS): Likewise.
12748         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/hfsplus.c'.
12749         (grub_setup_SOURCES): Likewise.
12750         (grub_mkdevicemap_SOURCES): Likewise.
12751         (grub_emu_SOURCES): Likewise.
12752         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
12754         * fs/fshelp.c (grub_fshelp_log2blksize): New function.
12756         * include/grub/fshelp.h (grub_fshelp_log2blksize): new prototype.
12758 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
12760         * DISTLIST: Added geninitheader.sh, geninit.sh, commands/test.c,
12761         commands/i386/pc/play.c, conf/common.mk, conf/common.rmk,
12762         include/grub/parser.h, include/grub/script.h, kern/parser.c,
12763         kern/sparc64/cache.S, normal/execute.c, normal/function.c,
12764         normal/lexer.c, normal/parser.y, normal/script.c, and
12765         partmap/gpt.c.
12766         Removed kern/sparc64/cache.c.
12768         * conf/common.rmk (DISTCLEANFILES): Added grub_script.tab.c,
12769         grub_script.tab.h, grub_modules_init.lst, grub_modules_init.h,
12770         grub_emu_init.c.
12772         * configure.ac (AC_INIT): Bumped to 1.92.
12774 2005-12-24  Vesa Jaaskelainen  <chaac@nic.fi>
12776         * kern/err.c (grub_error_push): Added new function to support error
12777         stacks.
12778         (grub_error_pop): Likewise.
12779         (grub_error_stack_items): New local variable to support error stacks.
12780         (grub_error_stack_pos): Likewise.
12781         (grub_error_stack_assert): Likewise.
12782         (GRUB_ERROR_STACK_SIZE): Added new define to configure maximum error
12783         stack depth.
12784         (grub_print_error): Added support to print errors from error stack.
12786         * include/grub/err.h (grub_error_push): Added function prototype.
12787         (grub_error_pop): Likewise.
12789 2005-12-09  Hollis Blanchard  <hollis@penguinppc.org>
12791         * configure.ac: Accept `powerpc64' as host_cpu.
12792         (amd64): Rename to `biarch32'.
12794         * kern/powerpc/cache.S (grub_arch_sync_caches): Handle
12795         non-cacheline-aligned addresses.
12797         * kern/dl.c (grub_dl_load_core): Add grub_dprintf messages.
12798         (grub_dl_flush_cache): Likewise.  Only call `grub_arch_sync_caches'
12799         if `size' is non-zero.
12801 2005-12-03  Marco Gerards  <mgerards@xs4all.nl>
12803         * conf/common.rmk (grub_modules_init.lst): Use `-printf "%P\n"'
12804         and `cd' to make sure the filename is not prefixed with a
12805         directory name.
12806         (pkgdata_MODULES): Add `gpt.mod'.
12807         (gpt_mod_SOURCES): New variable.
12808         (gpt_mod_CFLAGS): Likewise.
12809         (gpt_mod_LDFLAGS): Likewise.
12811         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/gpt.c'.
12813         * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_GPT_DISK):
12814         New macro.
12816         * partmap/gpt.c: New file.
12818         * partmap/pc.c (pc_partition_map_iterate): Don't continue when a
12819         GPT partition map is detected.
12821 2005-12-03  Vincent Pelletier  <subdino2004@yahoo.fr>
12823         * commands/i386/pc/play.c: New file.
12824         * conf/i386-pc.rmk (pkgdata_MODULES): Added play.mod.
12825         (play_mod_SOURCES, play_mod_CFLAGS, play_mod_LDFLAGS): New
12826         macros.
12828 2005-11-27  Marco Gerards  <mgerards@xs4all.nl>
12830         * include/grub/dl.h (GRUB_MOD_INIT): Use `__attribute__
12831         ((unused))' to silence gcc warning.
12833 2005-11-26  Hollis Blanchard  <hollis@penguinppc.org>
12835         * configure.ac: Correct `AC_PROG_YACC' test.
12837 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
12839         * util/powerpc/ieee1275/grub-install.in: Run the mount point
12840         check before installing files.
12842 2005-11-22  Mike Small  <smallm@panix.com>
12844         * util/powerpc/ieee1275/grub-install.in (grubdir): Fixed partition
12845         number regex so multidigit numbers are recognized correctly.
12847 2005-11-22  Mike Small  <smallm@panix.com>
12849         * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Add a
12850         debugging message before attempting to claim memory.
12851         (grub_rescue_cmd_initrd): Add a claim debugging message and try
12852         multiple addresses in case of failure.
12854 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
12856         * term/tparm.c (get_space): Remove empty `if' statement.
12858         * fs/ufs.c (grub_ufs_find_file): Remove `grub_le_to_cpu32'.
12860         * kern/parser.c (check_varstate): Rename `state' to 's'.
12862 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
12864         * partmap/acorn.c: Change `unsigned' to `unsigned int'.  Move all
12865         variable definitions to the beginning of each function.  Sort stack
12866         variables by size.
12867         (find): Rename to `acorn_partition_map_find'.  Cast `grub_disk_read'
12868         `buf' argument to `char *'.
12870 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
12872         * conf/powerpc-ieee1275.rmk: Include conf/common.mk.
12873         (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
12874         minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
12875         hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
12876         help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
12877         sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
12878         configfile.mod, search.mod, gzio.mod and test.mod.
12879         (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
12880         (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
12881         (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
12882         (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
12883         (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
12884         (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
12885         (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
12886         (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
12887         (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
12888         (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
12889         (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
12890         (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
12891         (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
12892         (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
12893         (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
12894         (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
12895         (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
12896         (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
12897         (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
12898         (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
12899         (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
12900         (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
12901         (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Removed.
12903         * conf/common.mk (grub_modules_init.lst): Use `find' instead of
12904         `grep --include'.
12905         (pkgdata_MODULES): Add test.mod.
12907 2005-11-18  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
12909         * genmk.rb: Fixed list rules moved to Makefile.in.  Recognise
12910         appending to variables with "+=".
12911         (PModule): Use full pathname to generate *.lst filenames.
12913         * Makefile.in: Fixed list rules moved from genmk.rb.
12914         (.DELETE_ON_ERROR): New special target.
12915         (RMKFILES): Add common.rmk and sparc64-ieee1275.rmk.
12917         * conf/i386-pc.rmk: Include conf/common.mk.
12918         (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
12919         minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
12920         hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
12921         help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
12922         sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
12923         configfile.mod, search.mod, gzio.mod and test.mod.
12924         (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
12925         (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
12926         (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
12927         (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
12928         (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
12929         (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
12930         (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
12931         (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
12932         (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
12933         (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
12934         (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
12935         (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
12936         (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
12937         (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
12938         (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
12939         (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
12940         (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
12941         (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
12942         (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
12943         (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
12944         (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
12945         (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
12946         (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Move from
12947         here...
12948         * conf/common.rmk: ... to here.  New file.
12950         * conf/common.mk: New file.
12952 2005-11-18  Yoshinori K. Okuji  <okuji@enbug.org>
12954         * conf/powerpc-ieee1275.rmk (grub_script.tab.h): Unified to ...
12955         (grub_script.tab.c): ... here.
12957         * conf/sparc64-ieee1275.rmk (grub_script.tab.h): Unified to ...
12958         (grub_script.tab.c): ... here.
12960         * conf/i386-pc.rmk (grub_script.tab.h): Unified to ...
12961         (grub_script.tab.c): ... here.
12963         * normal/command.c (grub_command_find): Fixed a memory leak of
12964         MODULE_NAME. Reported by Mike Small <smallm@panix.com>.
12966 2005-11-13  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
12968         * include/grub/symbol.h: (FUNCTION): Use double quotes instead of
12969         "@" which marks the start of a comment on ARM.
12970         (VARIABLE): Likewise.
12972 2005-11-13  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
12974         Add support for Linux/ADFS partition tables.
12976         * partmap/acorn.c: New file.
12978         * include/grub/acorn_filecore.h: Likewise.
12980         * DISTLIST: Added `partmap/acorn.c' and
12981         `include/grub/acorn_filecore.h'.
12983         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
12984         `partmap/acorn.c'.
12985         (pkgdata_MODULES): Add `acorn.mod'.
12986         (acorn_mod_SOURCES): New variable.
12987         (acorn_mod_CFLAGS): Likewise.
12989         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
12990         `partmap/acorn.c'.
12991         (pkgdata_MODULES): Add `acorn.mod'.
12992         (acorn_mod_SOURCES): New variable.
12993         (acorn_mod_CFLAGS): Likewise.
12995         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/acorn.c'.
12996         (pkgdata_MODULES): Add `acorn.mod'.
12997         (acorn_mod_SOURCES): New variable.
12998         (acorn_mod_CFLAGS): Likewise.
12999         (acorn_mod_LDFLAGS): Likewise.
13001         * include/types.h (grub_disk_addr_t): New typedef.
13003 2005-11-13  Marco Gerards  <mgerards@xs4all.nl>
13005         * geninit.sh: New file.
13007         * geninitheader.sh: Likewise.
13009         * commands/boot.c (grub_boot_init, grub_boot_fini): Removed.
13010         * commands/cat.c (grub_cat_init, grub_cat_fini): Likewise.
13011         * commands/cmp.c (grub_cmp_init, grub_cmp_fini): Likewise.
13012         * commands/configfile.c (grub_configfile_init)
13013         (grub_configfile_fini): Likewise.
13014         * commands/default.c (grub_default_init, grub_default_fini):
13015         Likewise.
13016         * commands/help.c (grub_help_init, grub_help_fini): Likewise.
13017         * commands/ls.c (grub_ls_init, grub_ls_fini): Likewise.
13018         * commands/search.c (grub_search_init, grub_search_fini): Likewise.
13019         * commands/terminal.c (grub_terminal_init, grub_terminal_fini):
13020         Likewise.
13021         * commands/test.c (grub_test_init, grub_test_fini): Likewise.
13022         * commands/timeout.c (grub_timeout_init, grub_timeout_fini):
13023         Likewise.
13024         * commands/i386/pc/halt.c (grub_halt_init, grub_halt_fini): Likewise.
13025         * commands/ieee1275/halt.c (grub_halt_init, grub_halt_fini):
13026         Likewise.
13027         * commands/i386/pc/reboot.c (grub_reboot_init, grub_reboot_fini):
13028         Likewise.
13029         * commands/ieee1275/reboot.c (grub_reboot_init, grub_reboot_fini):
13030         Likewise.
13031         * disk/loopback.c (grub_loop_init, grub_loop_fini): Likewise.
13032         * fs/affs.c (grub_affs_init, grub_affs_fini): Likewise.
13033         * fs/ext2.c (grub_ext2_init, grub_ext2_fini): Likewise.
13034         * fs/fat.c (grub_fat_init, grub_fat_fini): Likewise.
13035         * fs/hfs.c (grub_hfs_init, grub_hfs_fini): Likewise.
13036         * fs/iso9660.c (grub_iso9660_init, grub_iso9660_fini): Likewise.
13037         * fs/jfs.c (grub_jfs_init, grub_jfs_fini): Likewise.
13038         * fs/minix.c (grub_minix_init, grub_minix_fini): Likewise.
13039         * fs/sfs.c (grub_sfs_init, grub_sfs_fini): Likewise.
13040         * fs/ufs.c (grub_ufs_init, grub_ufs_fini): Likewise.
13041         * fs/xfs.c (grub_xfs_init, grub_xfs_fini): Likewise.
13042         * normal/main.c (grub_normal_init, grub_normal_fini): Likewise.
13043         * partmap/amiga.c (grub_amiga_partition_map_init)
13044         (grub_amiga_partition_map_fini): Likewise.
13045         * partmap/apple.c (grub_apple_partition_map_init)
13046         (grub_apple_partition_map_fini): Likewise.
13047         * partmap/pc.c (grub_pc_partition_map_init)
13048         (grub_pc_partition_map_fini): Likewise.
13049         * partmap/sun.c (grub_sun_partition_map_init,
13050         grub_sun_partition_map_fini): Likewise.
13051         * term/terminfo.c (grub_terminal_init, grub_terminal_fini):
13052         Likewise.
13054         * util/grub-emu.c: Include <grub_modules_init.h>.
13055         (main): Don't initialize and de-initialize any modules directly,
13056         use `grub_init_all' and `grub_fini_all' instead.
13058         * term/i386/pc/vesafb.c (grub_vesafb_init): Renamed to
13059         `grub_vesafb_mod_init'.
13060         (grub_vesafb_fini): Renamed to `grub_vesafb_mod_fini'.  Updated
13061         all users.
13062         * term/i386/pc/vga.c (grub_vga_init): Renamed to
13063         `grub_vga_mod_init'.  Updated all users.
13064         (grub_vga_fini): Renamed to `grub_vga_mod_fini'.
13066         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `grub_emu_init.c'.
13067         (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c): New
13068         rules.
13070         * include/grub/dl.h (GRUB_MOD_INIT): Add argument `name'.
13071         Generate a function to initialize the module in utilities.
13072         Updated all callers.
13073         (GRUB_MOD_FINI): Add argument `name'.  Generate a function to
13074         initialize the module in utilities.  Updated all callers.
13076 2005-11-09  Hollis Blanchard  <hollis@penguinppc.org>
13078         * term/ieee1275/ofconsole.c (grub_ofconsole_cls): Use both the ANSI
13079         escape sequence and a literal ^L to clear the screen.
13081         * commands/ieee1275/suspend.c (grub_cmd_suspend): Clear the screen
13082         when returning from Open Firmware.
13084 2005-11-09  Hollis Blanchard  <hollis@penguinppc.org>
13086         * term/ieee1275/ofconsole.c (grub_ofconsole_width): New variable.
13087         (grub_ofconsole_height): Likewise.
13088         (grub_ofconsole_putchar): If `grub_curr_x' exceeds console width,
13089         manually insert a '\n'.
13090         (grub_ofconsole_getwh): Set and return `grub_ofconsole_width' and
13091         `grub_ofconsole_height'.  Return early if these are already set.
13093 2005-11-07  Vincent Pelletier  <subdino2004@yahoo.fr>
13095         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
13096         `commands/test.c', `fs/affs.c', `fs/sfs.c', `fs/xfs.c',
13097         `normal/execute.c', `normal/lexer.c', `io/gzio.c',
13098         `kern/parser.c', `grub_script.tab.c', `normal/function.c'
13099         and `normal/script.c'.
13100         (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
13101         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
13102         (test_mod_SOURCES): New variable.
13103         (test_mod_CFLAGS): Likewise.
13104         (test_mod_LDFLAGS): Likewise.
13105         (pkgdata_MODULES): Add `test.mod'.
13106         (grub_script.tab.c): New rule.
13107         (grub_script.tab.h): Likewise.
13109 2005-11-07  Marco Gerards  <mgerards@xs4all.nl>
13111         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
13112         `commands/test.c', `normal/execute.c', `normal/lexer.c',
13113         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
13114         (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
13115         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
13116         (test_mod_SOURCES): New variable.
13117         (test_mod_CFLAGS): Likewise.
13118         (pkgdata_MODULES): Add `test.mod'.
13119         (grub_script.tab.c): New rule.
13120         (grub_script.tab.h): Likewise.
13122 2005-11-06  Marco Gerards  <mgerards@xs4all.nl>
13124         Add initial scripting support.
13126         * commands/test.c: New file.
13127         * include/grub/script.h: Likewise.
13128         * normal/execute.c: Likewise.
13129         * normal/function.c: Likewise.
13130         * normal/lexer.c: Likewise.
13131         * normal/parser.y: Likewise.
13132         * normal/script.c: Likewise.
13134         * configure.ac: Add `AC_PROG_YACC' test.
13136         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/test.c',
13137         `normal/execute.c', `normal/lexer.c', `grub_script.tab.c',
13138         `normal/function.c' and `normal/script.c'.
13139         (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
13140         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
13141         (test_mod_SOURCES, test_mod_CFLAGS, test_mod_LDFLAGS): New
13142         variables.
13143         (pkgdata_MODULES): Add `test.mod'.
13144         (grub_script.tab.c): New rule.
13145         (grub_script.tab.h): Likewise.
13147         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TEST_FAILURE'.
13149         * include/grub/normal.h (grub_test_init): New prototype.
13150         (grub_test_fini): Likewise.
13152         * normal/command.c: Include <grub/script.h>.
13153         (grub_command_execute): Rewritten.
13155         * util/grub-emu.c (main): Call `grub_test_init' and
13156         `grub_test_fini'.
13158 2005-11-03  Hollis Blanchard  <hollis@penguinppc.org>
13160         * kern/powerpc/ieee1275/init.c (grub_get_rtc): Initialize `msecs'
13161         to 0.
13162         * term/ieee1275/ofconsole.c (grub_ofconsole_checkkey): Return -1 if
13163         there are no pending characters.
13165 2005-11-03  Hollis Blanchard  <hollis@penguinppc.org>
13167         * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_get_devname): Use
13168         `grub_strndup' to drop device arguments. Replace unnecessary
13169         `grub_strndup' with `grub_strdup'.
13171 2005-11-03  Hollis Blanchard  <hollis@penguinppc.org>
13173         * kern/term.c (grub_cls): Do not call grub_cur_term->cls() if the
13174         `debug' environment variable has been set.
13176 2005-11-02  Hollis Blanchard  <hollis@penguinppc.org>
13178         * Makefile.in (install-local): Use $(DATA).
13179         (uninstall): Likewise.
13180         * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Move grub-mkimage...
13181         (sbin_UTILITIES): ... to here.
13182         (sbin_SCRIPTS): New variable.
13183         (grub_install_SOURCES): New variable.
13184         * util/powerpc/ieee1275/grub-install.in: New file.
13185         * util/powerpc/ieee1275/grub-mkimage.c (kernel_path): Remove
13186         variable.
13187         (add_segments): Call `grub_util_get_path'.
13189 2005-10-28  Yoshinori K. Okuji  <okuji@enbug.org>
13191         From Timothy Baldwin:
13192         * commands/ls.c (grub_ls_list_files): Close FILE with
13193         grub_file_close.
13194         * kern/misc.c (grub_vsprintf): Terminate the string S with NUL.
13196 2005-10-24  Marco Gerards  <mgerards@xs4all.nl>
13198         * include/grub/parser.h: New file.
13200         * kern/parser.c: Likewise.
13202         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/parser.c'.
13203         (grub_setup_SOURCES): Likewise.
13204         (grub_probefs_SOURCES): Likewise.
13205         (grub_emu_SOURCES): Likewise.
13206         (kernel_img_HEADERS): Add `parser.h'.
13208         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
13209         (grub_emu_SOURCES): Add `kern/parser.c'.
13210         (grubof_SOURCES): Likewise.
13212         * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
13213         (grubof_SOURCES): Add `kern/parser.c'.
13215         * include/grub/misc.h (grub_split_cmdline): Removed prototype.
13217         * kern/misc.c (grub_split_cmdline): Removed function.
13219         * kern/rescue.c: Include <grub/parser.h>.
13220         (grub_enter_rescue_mode): Use `grub_parser_split_cmdline' instead
13221         of `grub_split_cmdline'.
13223         * normal/command.c: Include <grub/parser.h>.
13224         (grub_command_execute):  Use `grub_parser_split_cmdline' instead
13225         of `grub_split_cmdline'.
13227         * normal/completion.c: Include <grub/parser.h>.
13228         (cmdline_state): New variable.
13229         (iterate_dir): End the filename with a quote depending on the
13230         command line state.
13231         (get_state): new function.
13232         (grub_normal_do_completion): Use `grub_parser_split_cmdline' to
13233         split the arguments and determine the current argument.  When the
13234         argument string is not quoted, escape all spaces.
13236 2005-10-23  Vincent Pelletier  <subdino2004@yahoo.fr>
13238         * normal/sparc64/setjmp.S: New file.
13240 2005-10-23  Vincent Pelletier  <subdino2004@yahoo.fr>
13242         * include/grub/sparc64/libgcc.h: New file.
13243         * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Remove -Av9.
13244         (normal_mod_SOURCES): Use normal/sparc64/setjmp.S instead of
13245         normal/sparc64/setjmp.c.
13247 2005-10-23  Vincent Pelletier  <subdino2004@yahoo.fr>
13249         * kern/sparc64/dl.c: Rewritten for SPARCV9 ELF.
13250         * kern/sparc64/cache.S: New file.
13251         * kern/sparc64/cache.c: Removed.
13252         * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Add -Av9.
13253         (COMMON_CFLAGS): Add -mno-app-regs.  Remove -mcpu=v9 and
13254         -mtune=ultrasparc.
13255         (COMMON_LDFLAGS): Add -melf64_sparc.
13256         (grubof_HEADERS): Add sparc64/libgcc.h and machine/kernel.h.
13257         (grubof_SOURCES): Use cache.S instead of cache.c.
13258         (grubof_LDFLAGS): Add -mno-app-regs.  Replace "-Xlinker
13259         --oformat -Xlinker elf64-sparc" by "-Bstatic,-melf64_sparc".
13260         (pkgdata_MODULES): Uncomment. Leave linux.mod and _linux.mod
13261         commented though.
13262         (normal_mod_SOURCES): Add normal/completion.c and normal/misc.c.
13263         (_linux_mod_SOURCES, _linux_mod_CFLAGS, linux_mod_SOURCES)
13264         (linux_mod_CFLAGS): Commented out.
13265         (_linux_mod_LDFLAGS, linux_mod_LDFLAGS): New macro, commented
13266         out because module isn't built.
13267         (fshelp_mod_LDFLAGS, fat_mod_LDFLAGS, ext2_mod_LDFLAGS)
13268         (ufs_mod_LDFLAGS, minix_mod_LDFLAGS, hfs_mod_LDFLAGS)
13269         (jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS, normal_mod_LDFLAGS)
13270         (hello_mod_LDFLAGS, boot_mod_LDFLAGS, terminal_mod_LDFLAGS)
13271         (ls_mod_LDFLAGS, cmp_mod_LDFLAGS, cat_mod_LDFLAGS)
13272         (font_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
13273         (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
13274         (suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS)
13275         (help_mod_LDFLAGS, default_mod_LDFLAGS, timeout_mod_LDFLAGS)
13276         (configfile_mod_LDFLAGS, search_mod_LDFLAGS, xfs_mod_SOURCES)
13277         (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
13278         (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
13279         (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, gzio_mod_SOURCES)
13280         (gzio_mod_CFLAGS, gzio_mod_LDFLAGS): New macro.
13282 2005-10-20  Yoshinori K. Okuji  <okuji@enbug.org>
13284         * util/i386/pc/grub-probefs.c (main): Call grub_xfs_init and
13285         grub_xfs_fini. Do not call grub_hfs_init or grub_hfs_fini any
13286         longer, because HFS should not be used on PC.
13288 2005-10-20  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
13290         * io/gzio.c (grub_gzio_read): Use OFFSET instead of FILE->OFFSET
13291         consistently within the loop.
13293 2005-10-15  Marco Gerards  <mgerards@xs4all.nl>
13295         * fs/xfs.c (grub_xfs_iterate_dir): Detect an error if part of a
13296         directory can not be read.
13298 2005-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
13300         * configure.ac (AC_INIT): Increase the version number to 1.91.
13302         * DISTLIST: Added include/grub/terminfo.h, include/grub/tparm.h,
13303         include/grub/i386/pc/serial.h, term/terminfo.c, term/tparm.c and
13304         term/i386/pc/serial.c.
13306 2005-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
13308         * kern/file.c (grub_file_seek): Seeking to an offset equal to a
13309         file size must be permitted.
13311         * kern/i386/pc/startup.S (multiboot_trampoline): Fix a mistake
13312         between %ah and %al.
13314 2005-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
13316         * fs/xfs.c (grub_xfs_iterate_dir): Change the type of BLK to
13317         grub_uint64_t.
13318         Call the hook with a NUL-terminated filename.
13319         (grub_xfs_mount): Use grub_be_to_cpu32 instead of
13320         grub_cpu_to_be32.
13322         * kern/term.c (cursor_state): New variable.
13323         (grub_term_set_current): Reset the cursor state on a new
13324         terminal.
13325         (grub_setcursor): Rewritten to use CURSOR_STATE.
13326         (grub_getcursor): New function.
13328         * include/grub/term.h (grub_getcursor): New prototype.
13330         * io/gzio.c (test_header): Align BUF for accessing it as 32-bit
13331         integers on ARM. Reported by Timothy Baldwin
13332         <T.E.Baldwin99@members.leeds.ac.uk>.
13334 2005-10-11  Marco Gerards  <mgerards@xs4all.nl>
13336         * fs/sfs.c (grub_sfs_open): Don't free `data->label' if it is not
13337         allocated.
13338         (grub_sfs_dir): Likewise.
13340 2005-10-09  Marco Gerards  <mgerards@xs4all.nl>
13342         Add support for the SFS filesystem.
13344         * fs/sfs.c: New file.
13346         * DISTLIST: Added `fs/sfs.c'.
13348         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/sfs.c'.
13349         (grub_probefs_SOURCES): Likewise.
13350         (grub_emu_SOURCES): Likewise.
13351         (pkgdata_MODULES): Add `sfs.mod'.
13352         (sfs_mod_SOURCES): New variable.
13353         (sfs_mod_CFLAGS): Likewise.
13354         (sfs_mod_LDFLAGS): Likewise.
13356         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/sfs.c'.
13357         (pkgdata_MODULES): Add `sfs.mod'.
13358         (sfs_mod_SOURCES): New variable.
13359         (sfs_mod_CFLAGS): Likewise.
13361         * util/grub-emu.c (main): Call `grub_sfs_init' and
13362         `grub_sfs_fini'.
13364         * include/grub/fs.h (grub_sfs_init): New prototype.
13365         (grub_sfs_fini): Likewise.
13367 2005-10-07  Marco Gerards  <mgerards@xs4all.nl>
13369         Add support for the AFFS filesystem.
13371         * fs/affs.c: New file.
13373         * DISTLIST: Added `fs/affs.c'.
13375         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/affs.c'.
13376         (grub_probefs_SOURCES): Likewise.
13377         (grub_emu_SOURCES): Likewise.
13378         (pkgdata_MODULES): Add `affs.mod'.
13379         (affs_mod_SOURCES): New variable.
13380         (affs_mod_CFLAGS): Likewise.
13381         (affs_mod_LDFLAGS): Likewise.
13383         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/affs.c'.
13384         (pkgdata_MODULES): Add `affs.mod'.
13385         (affs_mod_SOURCES): New variable.
13386         (affs_mod_CFLAGS): Likewise.
13388         * util/grub-emu.c (main): Call `grub_affs_init' and
13389         `grub_affs_fini'.
13391         * include/grub/fs.h (grub_affs_init): New prototype.
13392         (grub_affs_fini): Likewise.
13394 2005-10-01  Marco Gerards  <mgerards@xs4all.nl>
13396         * fs/xfs.c (grub_xfs_iterate_dir): Add parentheses.
13398 2005-10-01  Marco Gerards  <mgerards@xs4all.nl>
13400         * configure.ac: Accept `x86_64' as host_cpu.  In that case add
13401         `-m32' to CFLAGS.
13403         * genmk.rb (class PModule): Always use `$(#{prefix}_LDFLAGS)' when
13404         linking.
13406         * conf/i386-pc.rmk (COMMON_CFLAGS): Add `-m32'.
13407         (COMMON_LDFLAGS): New variable.
13408         (kernel_img_LDFLAGS): Include `COMMON_FLAGS'.
13409         (_chain_mod_LDFLAGS, fshelp_mod_LDFLAGS, fat_mod_LDFLAGS)
13410         (ext2_mod_LDFLAGS, ufs_mod_LDFLAGS, minix_mod_LDFLAGS)
13411         (hfs_mod_LDFLAGS, jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS)
13412         (xfs_mod_LDFLAGS, _linux_mod_LDFLAGS, linux_mod_LDFLAGS)
13413         (normal_mod_LDFLAGS, hello_mod_LDFLAGS, boot_mod_LDFLAGS)
13414         (terminal_mod_LDFLAGS, ls_mod_LDFLAGS, cmp_mod_LDFLAGS)
13415         (cat_mod_LDFLAGS, help_mod_LDFLAGS, reboot_mod_LDFLAGS)
13416         (halt_mod_LDFLAGS, vga_mod_LDFLAGS, font_mod_LDFLAGS)
13417         (terminfo_mod_LDFLAGS, serial_mod_LDFLAGS, _multiboot_mod_LDFLAGS)
13418         (multiboot_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
13419         (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
13420         (default_mod_LDFLAGS, timeout_mod_LDFLAGS, configfile_mod_LDFLAGS)
13421         (vbe_mod_LDFLAGS, vesafb_mod_LDFLAGS, vbeinfo_mod_LDFLAGS)
13422         (vbetest_mod_LDFLAGS, search_mod_LDFLAGS, gzio_mod_LDFLAGS): New
13423         variables.
13424         (normal_mod_ASFLAGS): Add `-m32'.
13426         * include/grub/types.h (grub_host_addr_t, grub_host_off_t)
13427         (grub_host_size_t, grub_host_ssize_t): New types.
13428         (grub_addr_t, grub_off_t, grub_size_t, grub_ssize_t): Make type
13429         dependent of `GRUB_CPU_SIZEOF_VOID_P' instead on
13430         `GRUB_HOST_SIZEOF_VOID_P'.
13432         * include/grub/kernel.h (struct grub_module_header): Type of
13433         member offset changed to `grub_host_off_t'.  Type of member size
13434         changed to `grub_host_size_t'.
13435         (struct grub_module_info): Type of member offset changed to
13436         `grub_host_off_t'.  Type of member size changed to
13437         `grub_host_size_t'.
13439 2005-09-29  Yoshinori K. Okuji  <okuji@enbug.org>
13441         Make GRUB's kernel compliant to Multiboot Specification.
13443         * kern/i386/pc/startup.S (multiboot_header): New label.
13444         (multiboot_entry): Likewise.
13445         (multiboot_trampoline): Likewise.
13447         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
13448         Increased to 0x4A0.
13450         * fs/xfs.c (grub_xfs_iterate_dir): Fix a syntax error. You may not
13451         put parentheses after a question mark.
13452         [!GRUB_UTIL] (my_mod): New variable.
13454         * util/grub-emu.c (main): Call grub_xfs_init and grub_xfs_fini.
13456 2005-09-28  Marco Gerards  <mgerards@xs4all.nl>
13458         Adds support for the XFS filesystem.  Btrees are not supported
13459         yet.
13461         * fs/xfs.c: New file.
13463         * DISTLIST: Added `fs/xfs.c'.
13465         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/xfs.c'.
13466         (grub_probefs_SOURCES): Likewise.
13467         (grub_emu_SOURCES): Likewise.
13468         (pkgdata_MODULES): Add `xfs.mod'.
13469         (xfs_mod_SOURCES): New variable.
13470         (xfs_mod_CFLAGS): Likewise.
13472         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/xfs.c'.
13473         (pkgdata_MODULES): Add `xfs.mod'.
13474         (xfs_mod_SOURCES): New variable.
13475         (xfs_mod_CFLAGS): Likewise.
13477         * util/grub-emu.c (main): Call `grub_xfs_init' and
13478         `grub_xfs_fini'.
13480         * include/grub/fs.h (grub_xfs_init): New prototype.
13481         (grub_xfs_fini): Likewise.
13484 2005-09-18  Vesa Jaaskelainen  <chaac@nic.fi>
13486         * video/i386/pc/vbe.c (grub_vbe_set_video_mode): In indexed
13487         color modes, allow greater than 16 colors to be configured as
13488         a default palette.
13490 2005-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
13492         * normal/completion.c (complete_arguments): Add the qualifier
13493         const into OPTIONS.
13495         From Omniflux <omniflux+lists@omniflux.com>:
13496         * include/grub/terminfo.h: New file.
13497         * include/grub/tparm.h: Likewise.
13498         * include/grub/i386/pc/serial.h: Likewise.
13499         * term/terminfo.c: Likewise.
13500         * term/tparm.c: Likewise.
13501         * term/i386/pc/serial.c: Likewise.
13502         * conf/i386-pc.rmk (pkgdata_MODULES): Added terminfo.mod and
13503         serial.mod.
13504         (terminfo_mod_SOURCES): New variable.
13505         (terminfo_mod_CFLAGS): Likewise.
13506         (serial_mod_SOURCES): Likewise.
13507         (serial_mod_CFLAGS): Likewise.
13509 2005-08-31  Yoshinori K. Okuji  <okuji@enbug.org>
13511         * DISTLIST: Replaced boot/powerpc/ieee1275/crt0.S and
13512         boot/powerpc/ieee1275/cmain.c with kern/powerpc/ieee1275/crt0.S
13513         and kern/powerpc/ieee1275/cmain.c, respectively.
13515         * boot/powerpc/ieee1275/crt0.S: Moved to ...
13516         * kern/powerpc/ieee1275/crt0.S: ... here.
13518         * boot/powerpc/ieee1275/cmain.c: Moved to ...
13519         * kern/powerpc/ieee1275/cmain.c: ... here.
13521         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Use
13522         kern/powerpc/ieee1275/crt0.S and kern/powerpc/ieee1275/cmain.c
13523         instead of boot/powerpc/ieee1275/crt0.S and
13524         boot/powerpc/ieee1275/cmain.c, respectively.
13526         * boot/i386/pc/boot.S (lba_mode): Do not store the total number of
13527         sectors. It was not used anyway.
13529 2005-08-30  Hollis Blanchard  <hollis@penguinppc.org>
13531         * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): Fix
13532         `unused parameter' warning.
13534 2005-08-30  Hollis Blanchard  <hollis@penguinppc.org>
13536         * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): New
13537         function.
13538         (grub_ofconsole_term): Specify grub_ofconsole_getcharwidth as
13539         getcharwidth.
13541 2005-08-28  Marco Gerards  <metgerards@student.han.nl>
13543         * include/grub/normal.h (enum grub_completion_type): Added
13544         `GRUB_COMPLETION_TYPE_ARGUMENT'.
13546         * normal/cmdline.c (print_completion): Handle
13547         the `GRUB_COMPLETION_TYPE_ARGUMENT' type.
13548         * normal/menu_entry.c (store_completion): Likewise.
13550         * normal/completion.c (complete_arguments): New function.
13551         (grub_normal_do_completion): Call `complete_arguments' when the
13552         current words start with a dash.
13554 2005-08-27  Marco Gerards  <metgerards@student.han.nl>
13556         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Fix typo (use
13557         `gzio.mod' instead of `io.mod').
13559 2005-08-22  Yoshinori K. Okuji  <okuji@enbug.org>
13561         * gendistlist.sh (EXTRA_DISTFILES): Added genfslist.sh.
13562         (DISTDIRS): Added io and video.
13563         Rewrite the search routine to make an output consistently.
13565         * DISTLIST: Added conf/sparc64-ieee1275.mk,
13566         conf/sparc64-ieee1275.rmk, include/grub/gzio.h,
13567         include/grub/ieee1275/ieee1275.h, include/grub/ieee1275/ofdisk.h,
13568         io/gzio.c, kern/sparc64/cache.c, kern/sparc64/dl.c,
13569         kern/sparc64/ieee1275/init.c, kern/sparc64/ieee1275/openfw.c and
13570         util/powerpc/ieee1275/misc.c.
13572         * include/grub/gzio.h: New file.
13573         * io/gzio.c: Likewise.
13575         * kern/file.c (grub_file_close): Call grub_device_close only if
13576         FILE->DEVICE is not NULL.
13578         * include/grub/mm.h [!NULL] (NULL): New macro.
13580         * include/grub/err.h (GRUB_ERR_BAD_GZIP_DATA): New constant.
13582         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added io/gzip.c.
13583         (pkgdata_MODULES): Added gzio.mod.
13584         (gzio_mod_SOURCES): New variable.
13585         (gzio_mod_CFLAGS): Likewise.
13587         * conf/i386-pc.rmk (grub_emu_SOURCES): Added io/gzip.c.
13588         (pkgdata_MODULES): Added gzio.mod.
13589         (gzio_mod_SOURCES): New variable.
13590         (gzio_mod_CFLAGS): Likewise.
13592         * commands/cat.c: Include grub/gzio.h.
13593         (grub_cmd_cat): Use grub_gzfile_open instead of
13594         grub_file_open.
13596         * commands/cmp.c: Include grub/gzio.h.
13597         (grub_cmd_cmp): Use grub_gzfile_open instead of
13598         grub_file_open.
13600         * loader/i386/pc/multiboot.c: Include grub/gzio.h.
13601         (grub_rescue_cmd_multiboot): Use grub_gzfile_open instead of
13602         grub_file_open.
13603         (grub_rescue_cmd_module): Likewise.
13605 2005-08-21  Vincent Pelletier  <subdino2004@yahoo.fr>
13607         * conf/sparc64-ieee1275.rmk (grubof_SOURCES): The first file must be
13608         kern/sparc64/ieee1275/init.c because it contains _start.
13609         * conf/sparc64-ieee1275.mk: Generated from conf/sparc64-ieee1275.rmk.
13611 2005-08-21  Vincent Pelletier  <subdino2004@yahoo.fr>
13613         * configure.ac: Add support for sparc64 host with ieee1275
13614         firmware.
13615         * configure: Generated from configure.ac.
13616         * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Use grub_ssize_t
13617         instead of int.
13618         (grub_ofdisk_read): Likewise.
13619         (grub_ofdisk_open): Use %p to print pointer values, and cast the
13620         pointers as (void *) to remove a warning.
13621         (grub_ofdisk_close): Likewise.
13622         (grub_ofdisk_read): Likewise.
13623         * kern/ieee1275/ieee1275.c (grub_ieee1275_exit): This never
13624         returns, so make it return void to remove a warning.
13625         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_exit):
13626         Corresponding prototype change.
13627         * kern/mm.c (grub_mm_init_region): Use %p to print pointer
13628         values, and cast the pointers as (void *) to remove a warning.
13629         (grub_mm_dump): Likewise.
13630         * conf/sparc64-ieee1275.mk: New file.
13631         * conf/sparc64-ieee1275.rmk: Likewise.
13632         * include/grub/sparc64/setjmp.h: Likewise.
13633         * include/grub/sparc64/types.h: Likewise.
13634         * include/grub/sparc64/ieee1275/console.h: Likewise.
13635         * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
13636         * include/grub/sparc64/ieee1275/kernel.h: Likewise.
13637         * include/grub/sparc64/ieee1275/time.h: Likewise.
13638         * kern/sparc64/cache.c: Likewise.
13639         * kern/sparc64/dl.c: Likewise.
13640         * kern/sparc64/ieee1275/init.c: Likewise.
13641         * kern/sparc64/ieee1275/openfw.c: Likewise.
13643 2005-08-21  Yoshinori K. Okuji  <okuji@enbug.org>
13645         * util/console.c (grub_ncurses_putchar): If C is greater than
13646         0x7f, set C to a question mark.
13647         (grub_ncurses_getcharwidth): New function.
13648         (grub_ncurses_term): Specify grub_ncurses_getcharwidth as
13649         getcharwidth.
13651         * normal/menu.c (print_entry): Made aware of Unicode. First,
13652         convert TITLE to UCS-4, and predict the cursor position by
13653         grub_getcharwidth.
13655         * include/grub/misc.h (grub_utf8_to_ucs4): Specify the qualifier
13656         const to SRC.
13657         * kern/misc.c (grub_utf16_to_utf8): Likewise.
13659 2005-08-20  Yoshinori K. Okuji  <okuji@enbug.org>
13661         * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Specify
13662         the boot file by the option BOOT_IMAGE. Use grub_stpcpy instead of
13663         grub_strcat.
13665         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Specify the boot
13666         file by the option BOOT_IMAGE. Use grub_stpcpy instead of
13667         grub_strcpy and grub_strlen. Take it into account that a space
13668         character is inserted as a delimiter.
13670 2005-08-20  Yoshinori K. Okuji  <okuji@enbug.org>
13672         * partmap/pc.c (pc_partition_map_iterate): Include the value of an
13673         invalid magic in the error.
13675         * commands/search.c: New file.
13677         * util/grub-emu.c (main): Call grub_search_init and
13678         grub_search_fini.
13680         * kern/rescue.c (grub_rescue_print_disks): Removed.
13681         (grub_rescue_print_devices): New function.
13682         (grub_rescue_cmd_ls): Use grub_device_iterate with
13683         grub_rescue_print_devices instead of grub_disk_dev_iterate with
13684         grub_rescue_print_disks.
13686         * kern/partition.c (grub_partition_iterate): Return the result of
13687         PARTMAP->ITERATE instead of GRUB_ERRNO.
13689         * kern/device.c: Include grub/partition.h.
13690         (grub_device_iterate): New function.
13692         * include/grub/partition.h (grub_partition_iterate): Return int
13693         instead of grub_err_t.
13695         * include/grub/normal.h [GRUB_UTIL] (grub_search_init): New
13696         prototype.
13697         [GRUB_UTIL] (grub_search_fini): Likewise.
13699         * include/grub/device.h (grub_device_iterate): New prototype.
13701         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
13702         commands/search.c.
13703         (pkgdata_MODULES): Added search.mod.
13704         (search_mod_SOURCES): New variable.
13705         (search_mod_CFLAGS): Likewise.
13707         * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/search.c.
13708         (pkgdata_MODULES): Added search.mod.
13709         (search_mod_SOURCES): New variable.
13710         (search_mod_CFLAGS): Likewise.
13712         * commands/ls.c (grub_ls_list_disks): Renamed to ...
13713         (grub_ls_list_devices): ... this, and use grub_device_iterate.
13714         All callers changed.
13716         * DISTLIST: Added commands/search.c.
13718 2005-08-20  Yoshinori K. Okuji  <okuji@enbug.org>
13720         * kern/term.c (grub_putchar): Use grub_utf8_to_ucs4 for the
13721         conversion.
13722         (grub_getcharwidth): New function.
13724         * kern/misc.c (grub_utf8_to_ucs4): New function.
13726         * include/grub/term.h (struct grub_term): Added a new member
13727         "getcharwidth".
13728         (grub_getcharwidth): New prototype.
13730         * include/grub/misc.h (grub_utf8_to_ucs4): New prototype.
13732         * term/i386/pc/console.c (map_char): New function. Segregated from
13733         grub_console_putchar.
13734         (grub_console_putchar): Use map_char.
13735         (grub_console_getcharwidth): New function.
13736         (grub_console_term): Specified grub_console_getcharwidth as
13737         getcharwidth.
13739         * term/i386/pc/vga.c (grub_vga_getcharwidth): New function.
13740         (grub_vga_term): Specified grub_vga_getcharwidth as getcharwidth.
13742         * term/i386/pc/vesafb.c (grub_virtual_screen_setup): Return
13743         GRUB_ERRNO.
13744         (grub_vesafb_init): Do not use RC. Instead, use GRUB_ERRNO. Rely
13745         on grub_strtoul completely.
13746         (write_char): Declare local variables in the beginning of the
13747         function.
13748         (grub_vesafb_getcharwidth): New function.
13749         (grub_vesafb_term): Specified grub_vesafb_getcharwidth as
13750         getcharwidth.
13752 2005-08-19  Yoshinori K. Okuji  <okuji@enbug.org>
13754         * DISTLIST: Replace commands/i386/pc/vbe_list_modes.c and
13755         commands/i386/pc/vbe_test.c with commands/i386/pc/vbeinfo.c and
13756         commands/i386/pc/vbetest.c.
13758         * video/i386/pc/vbe.c (grub_vbe_probe): If INFOBLOCK is not NULL,
13759         call grub_vbe_get_controller_info again, because the returned
13760         information is volatile.
13761         (grub_vbe_set_video_mode): Mostly rewritten.
13762         (grub_vbe_get_video_mode): Use grub_vbe_probe and use
13763         grub_vbe_status_t correctly.
13764         (grub_vbe_get_video_mode_info): Likewise.
13765         (grub_vbe_set_pixel_rgb): Use a switch statement rather than
13766         several if statements.
13768         * commands/i386/pc/vbe_list_modes.c: Renamed to ...
13769         * commands/i386/pc/vbeinfo.c: ... this.
13771         * commands/i386/pc/vbe_test.c: Renamed to ...
13772         * commands/i386/pc/vbetest.c: ... this.
13774         * commands/i386/pc/vbeinfo.c (grub_cmd_vbe_list_modes): Renamed to
13775         ...
13776         (grub_cmd_vbeinfo): ... this. Save video modes before
13777         iterating. Skip a video mode, if it is not available, not enough
13778         information is given or it is monochrome. Show the memory
13779         model. Leave the interpretation of MODEVAR to grub_strtoul
13780         completely.
13781         (GRUB_MOD_INIT): Rename vbe_list_modes to vbeinfo.
13782         (GRUB_MOD_FINI): Likewise.
13784         * commands/i386/pc/vbetest.c (grub_cmd_vbe_test): Renamed to ...
13785         (grub_cmd_vbetest): ... this. Don't print unnecessarily. Use
13786         grub_err_t instead of grub_uint32_t. Don't use SPTR. Remove a
13787         duplicated grub_env_get. Leave the interpretation of MODEVAR to
13788         grub_strtoul completely.
13789         (real2pm): Removed.
13790         (GRUB_MOD_INIT): Rename vbe_test to vbetest.
13791         (GRUB_MOD_FINI): Likewise.
13793         * normal/misc.c: Include grub/mm.h.
13795         * conf/i386-pc.rmk (pkgdata_MODULES): Replaced vbe_test.mod and
13796         vbe_list_modes with vbetest.mod and vbeinfo.mod.
13797         (vbe_list_modes_mod_SOURCES): Removed.
13798         (vbe_list_modes_mod_CFLAGS): Likewise.
13799         (vbe_test_mod_SOURCES): Likewise.
13800         (vbe_test_mod_CFLAGS): Likewise.
13801         (vbeinfo_mod_SOURCES): New variable.
13802         (vbeinfo_mod_CFLAGS): Likewise.
13803         (vbetest_mod_SOURCES): Likewise.
13804         (vbetest_mod_CFLAGS): Likewise.
13806 2005-08-18  Yoshinori K. Okuji  <okuji@enbug.org>
13808         * normal/misc.c: New file.
13810         * DISTLIST: Added normal/misc.c.
13812         * partmap/amiga.c (amiga_partition_map_iterate): Add an argument
13813         DISK to HOOK. Call HOOK with DISK.
13814         * partmap/apple.c (apple_partition_map_iterate): Likewise.
13815         * partmap/pc.c (pc_partition_map_iterate): Likewise.
13816         * partmap/sun.c (sun_partition_map_iterate): Likewise.
13818         * normal/menu_entry.c (struct screen): Added a new member
13819         "completion_shown".
13820         (completion_buffer): New global variable.
13821         (make_screen): Set SCREEN->COMPLETION_SHOWN to zero.
13822         (store_completion): New function.
13823         (complete): Likewise.
13824         (clear_completions): Likewise.
13825         (grub_menu_entry_run): If SCREEN->COMPLETION_SHOWN is non-zero,
13826         call clear_completions and reset SCREEN->COMPLETION_SHOWN. If C is
13827         a tab, call complete.
13829         * normal/completion.c (disk_dev): Removed.
13830         (print_simple_completion): Likewise.
13831         (print_partition_completion): Likewise.
13832         (print_func): New global variable.
13833         (add_completion): Do not take the arguments WHAT or PRINT any
13834         longer. Added a new argument TYPE. Instead of printing directly,
13835         call PRINT_FUNC if not NULL.
13836         All callers changed.
13837         (complete_device): Use a local variable DEV instead of
13838         DISK_DEV. Do not move CURRENT_WORD to the end of a device name.
13839         (grub_normal_do_completion): Take a new argument HOOK. Do not
13840         initialize DISK_DEV. Initialize PRINT_FUNC to HOOK. If RET is an
13841         empty string, return NULL instead.
13842         All callers changed.
13844         * normal/cmdline.c (print_completion): New function.
13846         * kern/partition.c (grub_partition_iterate): Add an argument DISK
13847         to HOOK.
13848         All callers changed.
13850         * kern/disk.c (grub_print_partinfo): Removed.
13852         * include/grub/partition.h (struct grub_partition_map): Add a new
13853         argument DISK into HOOK of ITERATE.
13854         (grub_partition_iterate): Add a new argument DISK to HOOK.
13856         * include/grub/normal.h (enum grub_completion_type): New enum.
13857         (grub_completion_type_t): New type.
13858         (GRUB_COMPLETION_TYPE_COMMAND): New constant.
13859         (GRUB_COMPLETION_TYPE_DEVICE): Likewise.
13860         (GRUB_COMPLETION_TYPE_PARTITION): Likewise.
13861         (GRUB_COMPLETION_TYPE_FILE): Likewise.
13862         (grub_normal_do_completion): Added a new argument HOOK.
13863         (grub_normal_print_device_info): New prototype.
13865         * include/grub/disk.h (grub_print_partinfo): Removed.
13867         * conf/i386-pc.rmk (grub_emu_SOURCES): Added normal/misc.c.
13868         (normal_mod_SOURCES): Likewise.
13869         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
13870         (normal_mod_SOURCES): Likewise.
13872         * commands/ls.c (grub_ls_list_disks): Use
13873         grub_normal_print_device_info instead of grub_print_partinfo. Free
13874         PNAME.
13875         (grub_ls_list_files): Use grub_normal_print_device_info instead of
13876         duplicating the code.
13878 2005-08-16  Vesa Jaaskelainen  <chaac@nic.fi>
13880         * commands/i386/pc/vbe_list_modes.c: Update source formatting to
13881         follow GCS more precisely.
13882         * commands/i386/pc/vbe_test.c: Likewise.
13883         * include/grub/i386/pc/vbe.h: Likewise.
13884         * term/i386/pc/vesafb.c: Likewise.
13885         * video/i386/pc/vbe.c: Likewise.
13887 2005-08-16  Vesa Jaaskelainen  <chaac@nic.fi>
13889         * DISTLIST: Added term/i386/pc/vesafb.c
13890         DISTLIST: Added video/i386/pc/vbe.c
13891         DISTLIST: Added commands/i386/pc/vbe_list_modes.c.
13892         DISTLIST: Added commands/i386/pc/vbe_test.c.
13893         * commands/i386/pc/vbe_list_modes.c: New file.
13894         * commands/i386/pc/vbe_test.c: Likewise.
13895         * term/i386/pc/vesafb.c: Likewise.
13896         * video/i386/pc/vbe.c: Likewise.
13897         * include/grub/i386/pc/vbe.h (GRUB_VBE_DEFAULT_VIDEO_MODE): Added define.
13898         (grub_vbe_probe) Added prototype.
13899         (grub_vbe_set_video_mode) Likewise.
13900         (grub_vbe_get_video_mode) Likewise.
13901         (grub_vbe_get_video_mode_info) Likewise.
13902         (grub_vbe_set_pixel_rgb) Likewise.
13903         (grub_vbe_set_pixel_index) Likewise.
13904         * conf/i386-pc.rmk (pkgdata_MODULES): Added vbe.mod.
13905         (pkgdata_MODULES): Added vesafb.mod.
13906         (pkgdata_MODULES): Added vbe_list_modes.mod.
13907         (pkgdata_MODULES): Added vbe_test.mod.
13908         (vbe_mod_SOURCES): Added.
13909         (vbe_mod_CFLAGS): Likewise.
13910         (vesafb_mod_SOURCES): Likewise.
13911         (vesafb_mod_CFLAGS): Likewise.
13912         (vbe_list_modes_mod_SOURCES): Likewise.
13913         (vbe_list_modes_mod_CFLAGS): Likewise.
13914         (vbe_test_mod_SOURCES): Likewise.
13915         (vbe_test_mod_CFLAGS): Likewise.
13917 2005-08-14  Yoshinori K. Okuji  <okuji@enbug.org>
13919         * normal/command.c (grub_command_execute): If INTERACTIVE is
13920         false and GRUB_COMMAND_FLAG_NO_ECHO is not specified, print
13921         CMDLINE. Disable the pager if INTERACTIVE is true.
13922         All callers are changed.
13924         * normal/main.c (grub_normal_execute): Read command.lst and fs.lst
13925         before reading a config file.
13926         * normal/main.c (read_config_file): Even if a command is not
13927         found, register it if it is within an entry.
13929         * util/grub-emu.c: Include sys/types.h and unistd.h.
13930         (options): Added --hold.
13931         (struct arguments): Added a new member "hold".
13932         (parse_opt): If KEY is 'H', set ARGS->HOLD to ARG or -1 if ARG is
13933         missing.
13934         (main): Initialize ARGS.HOLD to zero. Wait until ARGS.HOLD is
13935         cleared by a debugger, if it is not zero.
13937         * include/grub/normal.h (grub_command_execute): Add an argument
13938         INTERACTIVE.
13940 2005-08-14  Vesa Jaaskelainen  <chaac@nic.fi>
13942         * DISTLIST: Added include/grub/i386/pc/vbe.h.
13944 2005-08-13  Yoshinori K. Okuji  <okuji@enbug.org>
13946         * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Replace the test
13947         program with another one, because the old one didn't detect a bug
13948         in gcc-3.4. Always use regparm 2, because the new test is still
13949         not enough for gcc-4.0. Someone must investigate a simple test
13950         case which detects a bug in gcc-4.0.
13952 2005-08-12  Yoshinori K. Okuji  <okuji@enbug.org>
13954         * DISTLIST: Added normal/completion.c.
13956         * normal/completion.c: New file.
13958         * term/i386/pc/console.c (grub_console_getwh): New function.
13959         (grub_console_term): Assign grub_console_getwh to getwh.
13961         * normal/cmdline.c (grub_tab_complete): Removed. Now the same
13962         function is defined in normal/completion.c as
13963         grub_normal_do_completion.
13964         (grub_cmdline_get): Use grub_normal_do_completion instead of
13965         grub_tab_complete.
13967         * kern/partition.c (grub_partition_map_iterate): Return 1 if HOOK
13968         returns non-zero, otherwise return 0.
13969         (grub_partition_iterate): First, probe the partition map. Then,
13970         call ITERATE only for this partition map.
13972         * kern/misc.c (grub_strncmp): Rewritten.
13974         * kern/disk.c (grub_disk_dev_iterate): Return 1 if P->ITERATE
13975         returns non-zero. Otherwise return 0.
13977         * include/grub/partition.h (grub_partition_map_iterate): Return
13978         int instead of void.
13980         * include/grub/normal.h (grub_normal_do_completion): New prototype.
13982         * include/grub/misc.h (grub_strncmp): Change the type of N to
13983         grub_size_t.
13985         * include/grub/disk.h (grub_disk_dev_iterate): Return int instead
13986         of void.
13988         * normal/menu.c (draw_border): Cast GRUB_TERM_BORDER_WIDTH to
13989         unsigned explicitly before comparing it with I.
13991         * kern/main.c (grub_env_write_root): Add the attribute unused into
13992         VAR.
13994         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
13995         normal/completion.c.
13996         (normal_mod_SOURCES): Likewise.
13997         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
13998         (normal_mod_SOURCES): Likewise.
14000         * normal/command.c (grub_iterate_commands): If ITERATE returns
14001         non-zero, return one immediately.
14003 2005-08-09  Vesa Jaaskelainen  <chaac@nic.fi>
14005         * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vbe.h.
14006         * kern/i386/pc/startup.S: Updated Global Descriptor table's
14007         descriptions.
14008         (grub_vbe_get_controller_info): New function.
14009         (grub_vbe_get_mode_info): Likewise.
14010         (grub_vbe_set_mode): Likewise.
14011         (grub_vbe_get_mode): Likewise.
14012         (grub_vbe_set_memory_window): Likewise.
14013         (grub_vbe_get_memory_window): Likewise.
14014         (grub_vbe_set_scanline_length): Likewise.
14015         (grub_vbe_get_scanline_length): Likewise.
14016         (grub_vbe_set_display_start): Likewise.
14017         (grub_vbe_get_display_start): Likewise.
14018         (grub_vbe_set_palette_data): Likewise.
14019         * include/grub/i386/pc/vbe.h: New file.
14021 2005-08-08  Hollis Blanchard  <hollis@penguinppc.org>
14023         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
14024         kern/ieee1275/of.c with kern/ieee1275/ieee1275.c.
14025         * DISTLIST: Likewise.
14026         * kern/ieee1275/of.c: Moved to ...
14027         * kern/ieee1275/ieee1275.c: ... here.
14029 2005-08-08  Hollis Blanchard  <hollis@penguinppc.org>
14031         * term/ieee1275/ofconsole.c: Include <grub/mm.h>.
14032         (grub_ofconsole_getwh): Cast -1 to type grub_ieee1275_ihandle_t.
14033         Pass 0 as `end' parameter to grub_strtoul().
14035 2005-08-08  Hollis Blanchard  <hollis@penguinppc.org>
14037         * include/grub/powerpc/ieee1275/console.h: Do not include
14038         <grub/types.h>.  Do not include <grub/symbol.h>.  Remove ASM_FILE
14039         ifdef.
14040         (grub_console_cur_color): Remove i386-specific prototype.
14041         (grub_console_real_putchar): Likewise.
14042         (grub_console_checkkey): Likewise.
14043         (grub_console_getkey): Likewise.
14044         (grub_console_getxy): Likewise.
14045         (grub_console_gotoxy): Likewise.
14046         (grub_console_cls): Likewise.
14047         (grub_console_setcursor): Likewise.
14048         * kern/powerpc/ieee1275/init.c: Don't include <grub/console.h>.
14049         Include <grub/machine/console.h>.
14050         * term/ieee1275/ofconsole.c: Likewise.
14052 2005-08-08  Yoshinori K. Okuji  <okuji@enbug.org>
14054         * Makefile.in (LIBLZO): New variable.
14056         * configure.ac: Check for LZO version 2.
14058         * util/i386/pc/grub-mkimage.c [HAVE_LZO_LZO1X_H]: Include
14059         lzo/lzo1x.h instead of lzo1x.h.
14061         * conf/i386-pc.rmk (grub_mkimage_LDFLAGS): Use $(LIBLZO) instead
14062         of -llzo.
14064         * util/i386/pc/grub-setup.c (main): Do not free PREFIX
14065         twice. Reported by Vladimir Serbinenko <phcoder@gmail.com>.
14067         * partmap/pc.c (pc_partition_map_probe): Restore P->DATA after
14068         copying the data from PARTITION to P.
14070 2005-08-07  Yoshinori K. Okuji  <okuji@enbug.org>
14072         * kern/rescue.c (grub_rescue_cmd_rmmod): If the reference count is
14073         negative, unload the module.
14075         * util/i386/pc/grub-setup.c (setup): The name of the PC partition
14076         map is "pc_partition_map" but not "pc".
14077         (usage): Fix the description. The options are --boot-image and
14078         --core-image but not --boot-file or --core-file.
14079         (main): If not specified explicitly, make BOOT_FILE and CORE_FILE
14080         based on DEFAULT_BOOT_FILE and DEFAULT_CORE_FILE with DIR or
14081         DEFAULT_DIRECTORY.
14083         * util/i386/pc/grub-install.in: Do not specify --boot-file or
14084         --core-file. Specify INSTALL_DEVICE as an argument.
14086         * util/console.c: Include config.h.
14087         [HAVE_NCURSeS_CURSES_H]: Include ncurses/curses.h.
14088         [HAVE_NCURSES_H]: Include ncurses.h.
14089         [HAVE_CURSES_H]: Include curses.h.
14090         [!A_NORMAL] (A_NORMAL): Defined as zero.
14091         [!A_STANDOUT] (A_STANDOUT): Likewise.
14093         * conf/i386-pc.rmk (grub_emu_LDFLAGS): Use $(LIBCURSES) instead of
14094         -lncurses.
14095         * conf/powerpc-ieee1275.rmk (grub_emu_LDFLAGS): Likewise.
14097         * configure.ac: Check for curses libraries and headers.
14099         * Makefile.in (LIBCURSES): New variable.
14101         * genmk.rb (Script::rule): Set the executable bits.
14103         * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): The
14104         name of the PC partition map is "pc_partition_map" but not "pc".
14106 2005-08-07  Yoshinori K. Okuji  <okuji@enbug.org>
14108         * util/i386/pc/grub-install.in (grub_probefs): New variable.
14109         (modules): Likewise.
14110         (usage): Added descriptions for --modules and --grub-probefs.
14111         Handle --modules and --grub-probefs. Save the arguments in MODULES
14112         and GRUB_PROBEFS, respectively.
14113         Auto-detect a filesystem module against GRUBDIR. If the result is
14114         empty and modules are not specified explicitly, abort the
14115         installation. Add the result to MODULES.
14117         * DISTLIST: Removed boot/powerpc/ieee1275/ieee1275.c,
14118         disk/powerpc/ieee1275/ofdisk.c,
14119         include/grub/powerpc/ieee1275/init.h and
14120         term/powerpc/ieee1275/ofconsole.c.
14121         Added disk/ieee1275/ofdisk.c, kern/ieee1275/of.c and
14122         term/ieee1275/ofconsole.c.
14124         * include/grub/powerpc/ieee1275/console.h: Resurrected.
14126         * COPYING: Upgraded to the latest version. Only the address of the
14127         FSF office has changed.
14129 2005-08-07  Yoshinori K. Okuji  <okuji@enbug.org>
14131         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
14132         kern/ieee1275.c with kern/ieee1275/of.c.
14134         * kern/ieee1275.c: Moved to ...
14135         * kern/ieee1275/of.c: ... here.
14137 2005-08-06  Yoshinori K. Okuji  <okuji@enbug.org>
14139         * conf/i386-pc.rmk (kernel_img_HEADERS): Reordered for
14140         readability.
14142         * config.guess: Updated to the latest version from gnulib.
14143         * config.sub: Likewise.
14144         * install.sh: Likewise.
14145         * mkinstalldirs: Likewise.
14147         * include/grub/console.h: Removed. This file is arch-specific. Do
14148         not put this in include/grub.
14150         * include/grub/i386/pc/console.h: Resurrected.
14152         * util/console.c: Include grub/machine/console.h instead of
14153         grub/console.h.
14154         * util/grub-emu.c: Likewise.
14156 2005-08-04  Marco Gerards  <metgerards@student.han.nl>
14158         * kern/term.c (grub_putcode): Use `grub_getwh' instead of
14159         hardcoded value.
14161         From Vincent Pelletier  <subdino2004@yahoo.fr>
14162         * include/grub/term.h (GRUB_TERM_WIDTH, GRUB_TERM_HEIGHT):
14163         Redefined to use grub_getwh.
14164         (grub_term): New member named getwh.
14165         (grub_getwh): New prototype.
14166         * kern/term.c (grub_getwh): New function.
14167         * term/i386/pc/console.c (grub_console_getwh): New function.
14168         (grub_console_term): New member `getwh'.
14169         * term/i386/pc/vga.c (grub_vga_getwh): New function.
14170         (grub_vga_term): New member `getwh'.
14171         * term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Use
14172         grub_ssize_t.
14173         (grub_ofconsole_getw): New function.
14174         (grub_ofconsole_init): Use grub_ssize_t and unsigned char.
14175         (grub_ofconsole_term): New field named getwh and new initial
14176         value.
14178 2005-08-03  Hollis Blanchard  <hollis@penguinppc.org>
14180         * include/grub/powerpc/ieee1275/ieee1275.h: Move ...
14181         * include/grub/ieee1275/ieee1275.h: ... to here.  All users updated.
14182         Move `abort', `grub_reboot', and `grub_halt' prototypes ...
14183         * include/grub/powerpc/ieee1275/kernel.h: ... to here.
14184         * commands/ieee1275/halt.c: Include <grub/machine/kernel.h> instead
14185         of <grub/machine/ieee1275.h>.
14186         * commands/ieee1275/reboot.c: Likewise.
14187         * boot/powerpc/ieee1275/ieee1275.c: Move ...
14188         * kern/ieee1275.c: ... to here.  All users updated.  Change all
14189         parameter structs to use new type `grub_ieee1275_cell_t'.
14190         * term/powerpc/ieee1275/ofconsole.c: Move ...
14191         * term/ieee1275/ofconsole.c: ... to here.  All users updated.
14192         * disk/powerpc/ieee1275/ofdisk.c: Move ...
14193         * disk/ieee1275/ofdisk.c: ... to here.  All users updated.
14194         * boot/powerpc/ieee1275/cmain.c: Change `grub_ieee1275_entry_fn' type
14195         to return int.
14196         * include/grub/i386/pc/console.h: Move to include/grub/console.h.
14197         Remove unused prototypes.  All users updated.
14198         * include/grub/powerpc/ieee1275/console.h: Removed.
14199         * include/grub/powerpc/ieee1275/ieee1275.h: Define
14200         `grub_ieee1275_cell_t'.
14201         * kern/powerpc/ieee1275/openfw.c: Include <grub/machine/kernel.h>.
14202         Cast comparisons with -1 to the correct type.
14203         * loader/powerpc/ieee1275/linux.c (kernel_entry_t): Change parameter
14204         type to match `grub_ieee1275_entry_fn'.
14206 2005-08-01  Yoshinori K. Okuji  <okuji@enbug.org>
14208         * DISTLIST: Added util/i386/pc/grub-probefs.c.
14210         * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-probefs.
14211         (grub_setup_SOURCES): Removed partmap/amiga.c, partmap/apple.c and
14212         partmap/sun.c.
14213         (grub_probefs_SOURCES): New variable.
14215         * util/i386/pc/grub-probefs.c: New file.
14217         * util/i386/pc/grub-setup.c (main): Call
14218         grub_pc_partition_map_init, grub_ufs_init, grub_minix_init,
14219         grub_hfs_init and grub_jfs_init to initialize the system. Call
14220         grub_ufs_fini, grub_minix_fini, grub_hfs_fini, grub_jfs_init and
14221         grub_pc_partition_map_fini to finish the system.
14223 2005-07-31  Yoshinori K. Okuji  <okuji@enbug.org>
14225         * loader/i386/pc/multiboot.c (grub_multiboot_is_elf32): New
14226         function.
14227         (grub_multiboot_load_elf32): Likewise.
14228         (grub_multiboot_is_elf64): Likewise.
14229         (grub_multiboot_load_elf64): Likewise.
14230         (grub_multiboot_load_elf): Likewise.
14231         (grub_rescue_cmd_multiboot): Call grub_multiboot_load_elf to load
14232         an ELF32 or ELF64 file.
14233         This is based on a patch from Ruslan Nikolaev <nruslan@mail.com>.
14235         From Serbinenko Vladimir <serbinenko.vova@list.ru>:
14236         * kern/disk.c (grub_print_partinfo): Check if FS->LABEL is not
14237         NULL before calling FS->LABEL.
14238         * fs/fat.c (grub_fat_dir): Initialize DIRNAME to NULL.
14239         * commands/ls.c (grub_ls_list_files): Show labels, if possible.
14240         (grub_ls_list_disks): Check if FS and FS->LABEL are not NULL
14241         before calling FS->LABEL.
14243 2005-07-26  Yoshinori K. Okuji  <okuji@enbug.org>
14245         * util/i386/pc/grub-install.in (datadir): New variable.
14246         (libdir): Removed.
14247         (pkgdatadir): New variable.
14248         (pkglibdir): Removed.
14250 2005-07-24  Yoshinori K. Okuji  <okuji@enbug.org>
14252         * DISTLIST: Added util/i386/pc/grub-install.in.
14254         * util/i386/pc/grub-install.in: New file.
14256         * conf/i386-pc.rmk (sbin_SCRIPTS): New variable.
14257         (grub_install_SOURCES): Likewise.
14259         * genmk.rb: Added support for scripts.
14260         (Script): New class.
14261         (scripts): New variable.
14263         * Makefile.in (install-local): Install sbin_SCRIPTS by
14264         INSTALL_SCRIPT.
14265         (uninstall): Remove sbin_SCRIPTS.
14267         * util/i386/pc/grub-setup.c (main): If the argument is not a GRUB
14268         device, try to get a GRUB device by
14269         grub_util_biosdisk_get_grub_dev.
14270         Free DEST_DEV.
14272         * util/i386/pc/grub-mkdevicemap.c (usage): Remove a duplicated
14273         description for --device-map.
14275 2005-07-20  Yoshinori K. Okuji  <okuji@enbug.org>
14277         Change the semantics of variable hooks. They now return strings
14278         instead of error values.
14280         * util/i386/pc/grub-setup.c: Include grub/env.h.
14281         (setup): Use grub_device_set_root instead of grub_env_set.
14283         * kern/rescue.c (grub_rescue_cmd_root): Use grub_env_set and
14284         grub_env_get instead of grub_device_set_root and
14285         grub_device_get_root, respectively.
14287         * kern/main.c (grub_env_write_root): New function.
14288         (grub_set_root_dev): Register grub_env_write_hook for "root". Use
14289         grub_env_set instead of grub_device_set_root.
14291         * kern/env.c (HASHSZ): Reduced to 13, because GRUB does not need
14292         many variables.
14293         (grub_env_set): Set ENV->VALUE to the result of ENV->WRITE_HOOK
14294         rather than calling ENV->WRITE_HOOK afterwards.
14295         (grub_env_get): Return the result of ENV->READ_HOOK rather than
14296         passing a pointer of a pointer.
14297         (grub_register_variable_hook): Change the types of "read_hook" and
14298         "write_hook" to grub_env_read_hook_t and grub_env_write_hook_t,
14299         respectively.
14300         Allocate the default empty string on the heap, because this string
14301         may be freed later.
14303         * kern/device.c: Include grub/env.h.
14304         (grub_device_set_root): Removed.
14305         (grub_device_get_root): Likewise.
14306         (grub_device_open): Use grub_env_get instead of
14307         grub_device_get_root.
14309         * include/grub/env.h (grub_env_read_hook_t): New type.
14310         (grub_env_write_hook_t): Likewise.
14311         (grub_env_var): Change the types of "read_hook" and "write_hook"
14312         to grub_env_read_hook_t and grub_env_write_hook_t, respectively.
14313         (grub_register_variable_hook): Likewise.
14315         * include/grub/device.h (grub_device_set_root): Removed.
14316         (grub_device_set_root): Likewise.
14318         * fs/fat.c (grub_fat_dir): Make a copy of PATH in DIRNAME, and
14319         make sure that DIRNAME terminates with '/', so that
14320         grub_fat_find_dir will fail if PATH is not a directory.
14322         * commands/ls.c (grub_ls_list_files): Remove the qualifier const
14323         from DIRNAME.
14324         Use the qualifier auto for print_files and print_files_long.
14325         If FS->DIR sets GRUB_ERRNO to GRUB_ERR_BAD_FILE_TYPE, try DIRNAME
14326         as a regular file.
14327         Put a newline only if there is no error.
14328         (grub_cmd_ls): Remove grub_ls_print_files, because this is not
14329         used.
14331 2005-07-20  Yoshinori K. Okuji  <okuji@enbug.org>
14333         * kern/partition.c (grub_partition_probe): Initialize PART to
14334         NULL. Otherwise, when no partition map is registered, this returns
14335         a garbage.
14337 2005-07-19  Yoshinori K. Okuji  <okuji@enbug.org>
14339         * partmap/apple.c (apple_partition_map_iterate): Check if POS
14340         equals GRUB_DISK_SECTOR_SIZE to see if the partition table is
14341         valid.
14343 2005-07-18  Yoshinori K. Okuji  <okuji@enbug.org>
14345         * commands/ls.c (grub_ls_list_disks): Print the filesystem
14346         information on each device, if it does not have partitions. Print
14347         "Device" instead of "Disk", because this function is not specific
14348         to disk devices.
14350         * normal/main.c (grub_rescue_cmd_normal): Make the variable CONFIG
14351         static to ensure that it is put on the memory rather than a
14352         register.
14354 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
14356         * commands/cat.c (GRUB_MOD_INIT): Use better documentation.
14357         (grub_cat_init): Likewise.
14358         * loader/i386/pc/chainloader_normal.c (GRUB_MOD_INIT): Likewise.
14359         (options): Likewise.
14360         * commands/configfile.c (GRUB_MOD_INIT): Likewise.
14361         (grub_configfile_init): Likewise.
14362         * font/manager.c (GRUB_MOD_INIT): Likewise.
14363         * commands/help.c (GRUB_MOD_INIT): Likewise.
14364         (grub_help_init): Likewise.
14365         * normal/command.c (grub_command_init): Likewise.
14366         * loader/i386/pc/linux_normal.c (GRUB_MOD_INIT): Likewise.
14367         * disk/loopback.c (grub_loop_init): Likewise.
14368         (GRUB_MOD_INIT): Likewise.
14369         * commands/ls.c (grub_ls_init): Likewise.
14370         (GRUB_MOD_INIT): Likewise.
14371         (options): Likewise.
14372         * commands/boot.c (grub_boot_init): Likewise.
14373         (GRUB_MOD_INIT): Likewise.
14374         * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Likewise.
14375         * commands/i386/pc/reboot.c (grub_reboot_init): Likewise.
14376         (GRUB_MOD_INIT): Likewise.
14377         * commands/cmp.c (grub_cmp_init): Likewise.
14378         (GRUB_MOD_INIT): Likewise.
14380         * normal/arg.c: Use <> instead of "" to include header files.
14381         (SHORT_ARG_HELP): New macro.
14382         (SHORT_ARG_USAGE): Likewise.
14383         (help_options): Specify SHORT_ARG_HELP and SHORT_ARG_USAGE instead
14384         of 'h' and 'u' for help and usage, respectively. Use more GNU-like
14385         descriptions.
14386         (find_short): Check if C is 'h' or 'u' explicitly.
14387         (grub_arg_show_help): Use space characters instead of tabs. Treat
14388         SHORT_ARG_HELP and SHORT_ARG_USAGE exceptionally so that -h and -u
14389         are shown with --help and --usage only if they are not used for
14390         the command itself.
14391         (parse_option): Use SHORT_ARG_HELP and SHORT_ARG_USAGE instead of
14392         'h' and 'u'.
14394         * include/grub/arg.h (struct grub_arg_option): Add the qualifier
14395         const into "longarg". Change the type of "shortarg" to int.
14397 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
14399         * boot/i386/pc/boot.S (boot_drive_check): New label.
14401         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRIVE_CHECK): New
14402         macro.
14404         * util/i386/pc/grub-setup.c (setup): Added a workaround for BIOSes
14405         which do not pass a boot drive correctly. Copied from GRUB Legacy.
14407 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
14409         * kern/i386/pc/startup.S (gate_a20_try_system_control_port_a):
14410         When turning off Gate A20, skip the check and return immediately,
14411         because this is not fatal usually.
14413 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
14415         * conf/i386-pc.rmk (pxeboot_img_LDFLAGS): The text address should
14416         be 0x7C00 instead of 0x8000.
14418         * boot/i386/pc/pxeboot.S: Rewritten.
14420         * kern/i386/pc/startup.S (gate_a20_try_bios): No need to specify
14421         EXT_C.
14422         (gate_a20_check_state): Read a byte from 0x108000. Invert the
14423         result.
14425 2005-07-16  Yoshinori K. Okuji  <okuji@enbug.org>
14427         * kern/i386/pc/startup.S (grub_gate_a20): Rewritten for
14428         robustness. This routine now supports a BIOS call and System
14429         Control Port A to modify the gate A20.
14431         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
14432         Increased to 0x440.
14434 2005-07-12  Hollis Blanchard  <hollis@penguinppc.org>
14436         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): dprintf the
14437         device path and resulting ihandle.
14438         (grub_ofdisk_close): dprintf the ihandle being closed.
14439         (grub_ofdisk_read): dprintf function parameters.
14440         * kern/mm.c (grub_mm_init_region): Likewise.
14441         * loader/powerpc/ieee1275/linux.c: Remove extra whitespace.
14442         (grub_linux_boot): dprintf the Linux entry point, initrd address and
14443         size, and boot arguments.
14444         (grub_rescue_cmd_linux): dprintf each ELF segment's address and size
14445         before loading into memory.
14446         (grub_rescue_cmd_initrd): dprintf the initrd's address and size
14447         before loading into memory.
14449 2005-07-12  Yoshinori K. Okuji  <okuji@enbug.org>
14451         * kern/mm.c: Added much documentation.
14452         (GRUB_MM_ALIGN_LOG2): When GRUB_CPU_SIZEOF_VOID_P is
14453         8, set to 5 instead of 8.
14455 2005-07-10  Yoshinori Okuji  <okuji@enbug.org>
14457         * DISTLIST: Added util/i386/pc/grub-mkimage.c.
14459         * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-mkdevicemap.
14460         (grub_mkdevicemap_SOURCES): New variable.
14462         * util/i386/pc/grub-mkdevicemap.c: New file. Mostly copied from
14463         lib/device.c of GRUB Legacy.
14465 2005-07-10  Yoshinori Okuji  <okuji@enbug.org>
14467         * commands/ls.c (grub_ls_list_files): Check if *PATH is NUL
14468         instead of PATH is NULL.
14470 2005-07-09  Vincent Pelletier  <subdino2004@yahoo.fr>
14472         * commands/cmp.c (BUFFER_SIZE): New macro.
14473         (grub_cmd_cmp): Close the right file at the right time.  Compare
14474         only data just read.  Don't report files of different  size as
14475         identical.  Dynamically allocate buffers.  Move variable
14476         declarations at the beginning of function.
14478 2005-07-09  Yoshinori Okuji  <okuji@enbug.org>
14480         * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): The return value was
14481         reverse.
14483 2004-07-04  Vincent Pelletier  <subdino2004@yahoo.fr>
14485         * normal/cmdline.c (grub_cmdline_get): Don't fallback on ctrl-d
14486         when backspace is pressed at beginning of line.
14488 2005-07-03  Yoshinori Okuji  <okuji@enbug.org>
14490         * DISTLIST: Added genfslist.sh.
14492         * normal/main.c (fs_module_list): New variable.
14493         (autoload_fs_module): New function.
14494         (read_fs_list): Likewise.
14495         (grub_normal_execute): Call read_fs_list.
14497         * kern/fs.c (grub_fs_autoload_hook): New variable.
14498         (grub_fs_probe): Added support for auto-loading.
14500         * include/grub/normal.h (struct grub_fs_module_list): New struct.
14501         (grub_fs_module_list_t): New type.
14503         * include/grub/fs.h (grub_fs_autoload_hook_t): New type.
14504         (grub_fs_autoload_hook): New prototype.
14506         * genfslist.sh: New file.
14508         * genmk.rb: Added a rule to generate a filesystem list.
14510 2005-06-30  Marco Gerards  <metgerards@student.han.nl>
14512         * configure.ac: Fix the test for cross-compiling.
14514         * genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'.  Don't
14515         define GRUB_UTIL anymore.
14517         * util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes
14518         so this function works on other systems than just big endian.
14519         (load_modules): Likewise.
14520         (add_segments): Likewise.
14522 2005-06-23  Hollis Blanchard  <hollis@penguinppc.org>
14524         * kern/misc.c (grub_vsprintf): Add `longfmt'.  If format string
14525         contains `l' modifier, get a long from va_arg().
14527 2005-06-23  Yoshinori K. Okuji  <okuji@enbug.org>
14529         * kern/mm.c (grub_free): If the next free block which is being
14530         merged is the first free block, set the first block to the block
14531         being freed.
14532         Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.
14534 2005-05-08  Hollis Blanchard  <hollis@penguinppc.org>
14536         * boot/powerpc/ieee1275/cmain.c (cmain): Initialize
14537         `grub_ieee1275_chosen'.
14539 2005-05-08  Hollis Blanchard  <hollis@penguinppc.org>
14541         * boot/powerpc/ieee1275/cmain.c (module_info): Remove definition.
14542         (grub_ieee1275_chosen): New variable.
14543         (cmain): Initialize and use `grub_ieee1275_chosen' instead of
14544         `chosen'.
14545         * boot/powerpc/ieee1275/crt0.S (init_stack): Remove stack space.
14546         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
14547         Rename first argument to `phandle' for consistency.
14548         (grub_ieee1275_get_property_length): Likewise.
14549         (grub_ieee1275_next_property): Likewise.  Change type of first argument
14550         to grub_ieee1275_phandle_t.
14551         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn):
14552         Move export next to declaration.
14553         (grub_ieee1275_chosen): New variable.
14554         * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MODULE_BASE):
14555         Correct cosmetic typo.
14556         * kern/powerpc/ieee1275/init.c (grub_set_prefix): Use
14557         `grub_ieee1275_chosen'.
14558         * kern/powerpc/ieee1275/openfw.c (grub_map): Likewise.
14559         * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Likewise.
14560         (grub_rescue_cmd_linux): Set `initrd_addr' to 0.
14561         * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_refresh): Use
14562         `grub_ieee1275_chosen'.
14564 2005-05-10  Hollis Blanchard  <hollis@penguinppc.org>
14566         * boot/powerpc/ieee1275/cmain.c (cmain): Remove code to parse
14567         /chosen/bootargs.
14568         * kern/powerpc/ieee1275/init.c (grub_machine_init): Parse
14569         /chosen/bootargs as "variable=value" pairs.
14571 2005-05-08  Vincent Pelletier  <subdino2004@yahoo.fr>
14573         * include/grub/misc.h (grub_dprintf): New macro.
14574         (grub_real_dprintf): New prototype.
14575         (grub_strword): Likewise.
14576         (grub_iswordseparator): Likewise.
14577         * kern/misc.c (grub_real_dprintf): New function.
14578         (grub_strword): Likewise.
14579         (grub_iswordseparator): Likewise.
14581 2005-04-30  Hollis Blanchard  <hollis@penguinppc.org>
14583         * boot/powerpc/ieee1275/cmain.c: Don't include grub/machine/init.h.
14584         (roundup): Remove macro.
14585         (grub_ieee1275_flags): Make static.
14586         (grub_ieee1275_realmode): Remove.
14587         (grub_ieee1275_test_flag): New function.
14588         (grub_ieee1275_set_flag): Likewise.
14589         (find_options): Rename to `grub_ieee1275_find_options'; update
14590         callers. Set GRUB_IEEE1275_FLAG_REAL_MODE and
14591         GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS.
14592         (cmain): New prototype.
14593         (cmain): Use `grub_ieee1275_set_flag' instead of accessing
14594         `grub_ieee1275_flags' directly.
14595         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Remove
14596         machine/biosdisk.h.
14597         * disk/powerpc/ieee1275/ofdisk.c: Include grub/machine/ofdisk.h.
14598         Don't include grub/machine/init.h.
14599         (grub_ofdisk_open): Call `grub_ieee1275_test_flag'.
14600         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
14601         Remove prototype.
14602         (grub_ieee1275_realmode): Likewise.
14603         (grub_ieee1275_flag): New enum.
14604         (grub_ieee1275_test_flag): New prototype.
14605         (grub_ieee1275_set_flag): New prototype.
14606         * include/grub/powerpc/ieee1275/init.h: Remove file.
14607         * include/grub/powerpc/ieee1275/ofdisk.h: New file.
14608         * kern/powerpc/ieee1275/init.c: Don't include grub/machine/init.h.
14609         Include grub/machine/console.h.  Include grub/machine/ofdisk.h.
14610         (grub_machine_fini): Don't call `grub_ieee1275_release'.  Remove
14611         comment.
14612         * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Call
14613         `grub_ieee1275_test_flag'.
14614         (grub_ieee1275_encode_devname): Likewise.
14616 2005-04-21  Hollis Blanchard  <hollis@penguinppc.org>
14618         * include/grub/powerpc/ieee1275/ieee1275.h
14619         (grub_ieee1275_encode_devname): New prototype.
14620         (grub_ieee1275_get_filename): Likewise.
14621         * kern/powerpc/ieee1275/init.c (grub_translate_ieee175_path): New
14622         function.
14623         (grub_set_prefix): Likewise.
14624         (grub_machine_init): Call grub_set_prefix.
14625         * kern/powerpc/ieee1275/openfw.c: Fix typos.
14626         (grub_parse_type): New enum.
14627         (grub_ieee1275_get_devargs): New function.
14628         (grub_ieee1275_get_devname): Likewise.
14629         (grub_ieee1275_parse_args): Likewise.
14630         (grub_ieee1275_get_filename): Likewise.
14631         (grub_ieee1275_encode_devname): Likewise.
14633 2005-03-30  Marco Gerards  <metgerards@student.han.nl>
14635         * kern/powerpc/ieee1275/init.c (grub_machine_fini): Don't call
14636         `grub_loader_unset'.
14638 2005-03-26  Hollis Blanchard  <hollis@penguinppc.org>
14640         * commands/ieee1275/halt.c (grub_cmd_halt): Call grub_halt
14641         instead of grub_ieee1275_interpret.
14642         (grub_halt_init): New function.
14643         (grub_halt_fini): Likewise.
14644         (GRUB_MOD_INIT): Correct message grammar.
14645         * commands/ieee1275/reboot.c (grub_cmd_reboot): Call grub_reboot
14646         instead of grub_ieee1275_interpret.
14647         (grub_reboot_init): New function.
14648         (grub_reboot_fini): Likewise.
14649         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace
14650         commands/i386/pc/halt.c, commands/i386/pc/reboot.c, and
14651         util/i386/pc/misc.c with commands/ieee1275/halt.c,
14652         commands/ieee1275/reboot.c, and util/powerpc/ieee1275/misc.c.
14653         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_fini): New
14654         function.
14655         * include/grub/powerpc/ieee1275/console.h (grub_console_fini):
14656         Add prototype.
14657         * include/grub/powerpc/ieee1275/ieee1275.h (grub_reboot): Add
14658         prototype.
14659         (grub_halt): Likewise.
14660         * include/grub/powerpc/ieee1275/init.h: Remove inaccurate comment.
14661         (cmain): Remove __attribute__((unused)).
14662         * kern/powerpc/ieee1275/init.c (grub_heap_start): New variable.
14663         (grub_heap_len): Likewise.
14664         (grub_machine_fini): New function.
14665         * kern/powerpc/ieee1275/openfw.c (grub_reboot): New function.
14666         (grub_halt): Likewise.
14667         * term/powerpc/ieee1275/ofconsole.c (grub_console_fini): New
14668         function.
14669         * util/powerpc/ieee1275/misc.c: New file.
14671 2005-03-19  Yoshinori K. Okuji  <okuji@enbug.org>
14673         * DISTLIST: New file.
14674         * gendistlist.sh: Likewise.
14676         * Makefile.in (COMMON_DISTFILES): Removed.
14677         (BOOT_DISTFILES): Likewise.
14678         (CONF_DISTFILES): Likewise.
14679         (DISK_DISTFILES): Likewise.
14680         (FS_DISTFILES): Likewise.
14681         (INCLUDE_DISTFILES): Likewise.
14682         (KERN_DISTFILES): Likewise.
14683         (LOADER_DISTFILES): Likewise.
14684         (TERM_DISTFILES): Likewise.
14685         (UTIL_DISTFILES): Likewise.
14686         (DISTFILES): Likewise.
14687         (uninstall): Uninstall files in $(pkgdata_DATA).
14688         (DISTLIST): New target.
14689         (distdir): Use the contents of the file DISTLIST to get a list of
14690         distributed files.
14692 2005-03-18  Yoshinori K. Okuji  <okuji@enbug.org>
14694         * fs/fat.c (grub_fat_mount): Ignore the 3rd bit of a media
14695         descriptor. This is ported from GRUB Legacy.
14697         * gencmdlist.sh: Added an extra semicolon to make it work with
14698         old sed versions. Reported by Robert Bihlmeyer
14699         <robbe@orcus.priv.at>.
14701 2005-03-08  Yoshinori Okuji  <okuji@enbug.org>
14703         Automatic loading of commands is supported.
14705         * normal/main.c (read_command_list): New function.
14706         (grub_normal_execute): Call read_command_list.
14708         * normal/command.c (grub_register_command): Return zero or CMD.
14709         Allocate CMD->NAME from the heap.
14710         Initialize CMD->MODULE_NAME to zero.
14711         Find the same name as well. If the same command is found and it is
14712         a dummy command, overwrite members. If it is not a dummy command,
14713         return zero.
14714         (grub_unregister_command): Free Q->NAME and Q->MODULE_NAME.
14715         (grub_command_find): If a dummy command is found, load a module
14716         and retry to find a command only once.
14718         * normal/cmdline.c (grub_tab_complete): Call grub_command_find to
14719         make sure that each command is loaded.
14721         * include/grub/normal.h (GRUB_COMMAND_FLAG_NOT_LOADED): New
14722         macro.
14723         (struct grub_command): Remove const from the member `name'.
14724         Add a new member `module_name'.
14725         (grub_register_command): Return grub_command_t.
14727         * commands/help.c (grub_cmd_help): Call grub_command_find to make
14728         sure that each command is loaded.
14730         * genmk.rb (PModule::rule): Specify a module name without the
14731         suffix ".mod" to gencmdlist.sh.
14733 2005-03-02  Yoshinori K. Okuji  <okuji@enbug.org>
14735         * gencmdlist.sh: New file.
14737         * genmk.rb (PModule::rule): Generate a rule for a command list.
14738         Clean command.lst.
14739         Generate command.lst from $(COMMANDFILES).
14741         * Makefile.in (COMMON_DISTFILES): Added gencmdlist.sh.
14742         (DATA): Added $(pkgdata_DATA).
14743         (install-local): Install files in $(pkgdata_DATA).
14745 2005-03-02  Yoshinori K. Okuji  <okuji@enbug.org>
14747         * term/i386/pc/vga.c (debug_command): Removed.
14748         (GRUB_MOD_INIT): Do not register the command "debug".
14750         From Hollis Blanchard:
14751         * commands/configfile.c: New file.
14752         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
14753         commands/configfile.c.
14754         (pkgdata_MODULES): Added configfile.mod.
14755         (configfile_mod_SOURCES): New variable.
14756         (configfile_mod_CFLAGS): Likewise.
14757         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
14758         commands/configfile.c.
14759         (pkgdata_MODULES): Added configfile.mod.
14760         (configfile_mod_SOURCES): New variable.
14761         (configfile_mod_CFLAGS): Likewise.
14762         * util/grub-emu.c (main): Call grub_configfile_init and
14763         grub_configfile_fini.
14764         * include/grub/normal.h [GRUB_UTIL] (grub_configfile_init): New
14765         prototype.
14766         [GRUB_UTIL] (grub_configfile_fini): Likewise.
14768 2005-02-27  Yoshinori K. Okuji  <okuji@enbug.org>
14770         * normal/arg.c (grub_arg_show_help): Do not show the bug report
14771         address.
14773         * commands/help.c (grub_cmd_help): Do not print newlines after
14774         the last command in print_command_help.
14776 2005-02-27  Yoshinori K. Okuji  <okuji@enbug.org>
14778         * commands/default.h: New file.
14779         * commands/timeout.h: Likewise.
14780         * normal/context.c: Likewise.
14782         * util/misc.c: Do not include sys/times.h.
14783         Include sys/time.h and grub/machine/time.h.
14784         (grub_get_rtc): Rewritten with gettimeofday.
14786         * util/grub-emu.c (main): Call grub_default_init and
14787         grub_timeout_init before grub_normal_init, and call
14788         grub_timeout_fini and grub_default_fini after grub_main.
14790         * util/console.c (grub_ncurses_checkkey): Return the read
14791         character or -1.
14793         * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it
14794         timeouts.
14796         * normal/main.c (read_config_file): Push MENU. If this fails,
14797         print an error and wait for a user input.
14798         Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE.
14799         If a menu is empty or an error occurs, pop MENU.
14800         (grub_normal_execute): Pop and free MENU after grub_menu_run
14801         returns.
14803         * kern/loader.c (grub_loader_boot): Call grub_machine_fini.
14805         * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not
14806         include time.h.
14807         [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
14808         without GRUB_UTIL.
14809         * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include
14810         time.h.
14811         [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
14812         without GRUB_UTIL.
14814         * include/grub/normal.h (struct grub_menu_list): New struct.
14815         (grub_menu_list_t): New type.
14816         (struct grub_context): New struct.
14817         (grub_context_t): New type.
14818         (grub_register_command): Got rid of EXPORT_FUNC.
14819         (grub_unregister_command): Likewise.
14820         (grub_context_get): New prototype.
14821         (grub_context_get_current_menu): Likewise.
14822         (grub_context_push_menu): Likewise.
14823         (grub_context_pop_menu): Likewise.
14824         [GRUB_UTIL] (grub_default_init): Likewise.
14825         [GRUB_UTIL] (grub_default_fini): Likewise.
14826         [GRUB_UTIL] (grub_timeout_init): Likewise.
14827         [GRUB_UTIL] (grub_timeout_fini): Likewise.
14829         * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c,
14830         commands/timeout.c and normal/context.c.
14831         (pkgdata_MODULES): Added default.mod and timeout.mod.
14832         (normal_mod_SOURCES): Added normal/context.c.
14833         (default_mod_SOURCES): New variable.
14834         (default_mod_CFLAGS): Likewise.
14835         (timeout_mod_SOURCES): Likewise.
14836         (timeout_mod_CFLAGS): Likewise.
14837         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from
14838         conf/i386-pc.rmk.
14839         (pkgdata_MODULES): Added default.mod and timeout.mod.
14840         (normal_mod_SOURCES): Added normal/context.c.
14841         (default_mod_SOURCES): New variable.
14842         (default_mod_CFLAGS): Likewise.
14843         (timeout_mod_SOURCES): Likewise.
14844         (timeout_mod_CFLAGS): Likewise.
14846         * Makefile.in (all-local): Added $(MKFILES).
14848 2005-02-21  Vincent Pelletier  <subdino2004@yahoo.fr>
14850         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `partmap/sun.c'.
14851         (grub_emu_SOURCES): Likewise.
14852         (pkgdata_MODULES): Add `sun.mod'.
14853         (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
14854         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
14855         `partmap/sun.c'.
14856         (pkgdata_MODULES): Add `sun.mod'.
14857         (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
14858         * include/grub/partition.h (grub_sun_partition_map_init): New
14859         prototype.
14860         (grub_sun_partition_map_fini): Likewise.
14861         * partmap/sun.c: New file.
14862         * util/grub-emu.c (main): Initialize and de-initialize the sun
14863         partitionmap support.
14865 2005-02-19  Yoshinori K. Okuji  <okuji@enbug.org>
14867         This implements an Emacs-like menu entry editor.
14869         * normal/menu_entry.c: New file.
14871         * util/console.c (grub_ncurses_putchar): Translate some Unicode
14872         characters to ASCII.
14873         (saved_char): New variable.
14874         (grub_ncurses_checkkey): Rewritten completely.
14875         (grub_ncurses_getkey): Likewise.
14876         (grub_ncurses_init): Call raw instead of cbreak.
14878         * normal/menu.c (print_entry): Do not put a space.
14879         (init_page): Renamed to ...
14880         (grub_menu_init_page): ... this. All callers changed.
14881         (edit_menu_entry): Removed.
14882         (run_menu): Call grub_menu_entry_run instead of edit_menu_entry.
14884         * normal/cmdline.c (grub_cmdline_run): Call grub_setcursor.
14886         * kern/misc.c (grub_vprintf): Call grub_refresh.
14888         * normal/menu.c (DISP_LEFT): Renamed to ...
14889         * include/grub/term.h (GRUB_TERM_DISP_LEFT): ... this.
14890         * normal/menu.c (DISP_UP): Renamed to ...
14891         * include/grub/term.h (GRUB_TERM_DISP_UP): ... this.
14892         * normal/menu.c (DISP_RIGHT): Renamed to ...
14893         * include/grub/term.h (GRUB_TERM_DISP_RIGHT): ... this.
14894         * normal/menu.c (DISP_DOWN): Renamed to ...
14895         * include/grub/term.h (GRUB_TERM_DISP_DOWN): ... this.
14896         * normal/menu.c (DISP_HLINE): Renamed to ...
14897         * include/grub/term.h (GRUB_TERM_DISP_HLINE): ... this.
14898         * normal/menu.c (DISP_VLINE): Renamed to ...
14899         * include/grub/term.h (GRUB_TERM_DISP_VLINE): ... this.
14900         * normal/menu.c (DISP_UL): Renamed to ...
14901         * include/grub/term.h (GRUB_TERM_DISP_UL): ... this.
14902         * normal/menu.c (DISP_UR): Renamed to ...
14903         * include/grub/term.h (GRUB_TERM_DISP_UR): ... this.
14904         * normal/menu.c (DISP_LL): Renamed to ...
14905         * include/grub/term.h (GRUB_TERM_DISP_LL): ... this.
14906         * normal/menu.c (DISP_LR): Renamed to ...
14907         * include/grub/term.h (GRUB_TERM_DISP_LR): ... this.
14908         * normal/menu.c (TERM_WIDTH): Renamed to ...
14909         * include/grub/term.h (GRUB_TERM_WIDTH): ... this.
14910         * normal/menu.c (TERM_HEIGHT): Renamed to ...
14911         * include/grub/term.h (GRUB_TERM_HEIGHT): ... this.
14912         * normal/menu.c (TERM_INFO_HEIGHT): Renamed to ...
14913         * include/grub/term.h (GRUB_TERM_INFO_HEIGHT): ... this.
14914         * normal/menu.c (TERM_MARGIN): Renamed to ...
14915         * include/grub/term.h (GRUB_TERM_MARGIN): ... this.
14916         * normal/menu.c (TERM_SCROLL_WIDTH): Renamed to ...
14917         * include/grub/term.h (GRUB_TERM_SCROLL_WIDTH): ... this.
14918         * normal/menu.c (TERM_TOP_BORDER_Y): Renamed to ...
14919         * include/grub/term.h (GRUB_TERM_TOP_BORDER_Y): ... this.
14920         * normal/menu.c (TERM_LEFT_BORDER_X): Renamed to ...
14921         * include/grub/term.h (GRUB_TERM_LEFT_BORDER_X): ... this.
14922         * normal/menu.c (TERM_BORDER_WIDTH): Renamed to ...
14923         * include/grub/term.h (GRUB_TERM_BORDER_WIDTH): ... this.
14924         * normal/menu.c (TERM_MESSAGE_HEIGHT): Renamed to ...
14925         * include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): ... this.
14926         * normal/menu.c (TERM_BORDER_HEIGHT): Renamed to ...
14927         * include/grub/term.h (GRUB_TERM_BORDER_HEIGHT): ... this.
14928         * normal/menu.c (TERM_NUM_ENTRIES): Renamed to ...
14929         * include/grub/term.h (GRUB_TERM_NUM_ENTRIES): ... this.
14930         * normal/menu.c (TERM_FIRST_ENTRY_Y): Renamed to ...
14931         * include/grub/term.h (GRUB_TERM_FIRST_ENTRY_Y): ... this.
14932         * normal/menu.c (TERM_ENTRY_WIDTH): Renamed to ...
14933         * include/grub/term.h (GRUB_TERM_ENTRY_WIDTH): ... this.
14934         * normal/menu.c (TERM_CURSOR_X): Renamed to ...
14935         * include/grub/term.h (GRUB_TERM_CURSOR_X): ... this.
14936         All callers changed.
14938         * include/grub/normal.h: New prototype.
14940         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
14941         normal/menu_entry.c.
14942         (normal_mod_SOURCES): Likewise.
14943         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
14944         (normal_mod_SOURCES): Likewise.
14946 2005-02-15  Yoshinori K. Okuji  <okuji@enbug.org>
14948         * include/grub/normal.h (grub_halt_init): New prototype.
14949         (grub_halt_fini): Likewise.
14950         (grub_reboot_init): Likewise.
14951         (grub_reboot_fini): Likewise.
14953         * util/grub-emu.c: Include signal.h.
14954         (main_env): New global variable.
14955         (grub_machine_init): Ignore SIGINT. Otherwise grub-emu cannot
14956         catch C-c.
14957         (grub_machine_fini): New function.
14958         (main): Call grub_halt_init and grub_reboot_init before
14959         grub_main, and grub_reboot_fini and grub_halt_fini after it.
14960         Call setjmp with MAIN_ENV to go back afterwards.
14961         Call grub_machine_fini right before return.
14963         * include/grub/util/misc.h: Include setjmp.h.
14964         (main_env): New prototype.
14966         * include/grub/kernel.h (grub_machine_fini): New prototype.
14967         * include/grub/i386/pc/biosdisk.h (grub_biosdisk_fini): Likewise.
14968         * include/grub/i386/pc/console.h (grub_console_fini): Likewise.
14970         * disk/i386/pc/biosdisk.c (grub_biosdisk_fini): New function.
14971         * kern/i386/pc/init.c (grub_machine_fini): Likewise.
14972         * term/i386/pc/console.c (grub_console_fini): Likewise.
14974         * util/i386/pc/misc.c: New file.
14976         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
14977         util/i386/pc/misc.c, commands/i386/pc/halt.c and
14978         commands/i386/pc/reboot.c.
14980 2005-02-14  Guillem Jover  <guillem@hadrons.org>
14982         * include/grub/dl.h (grub_dl_check_header): New prototype.
14983         (grub_arch_dl_check_header): Change return type to grub_err_t,
14984         remove size parameter and export function.  Update all callers.
14985         * kern/dl.c (grub_dl_check_header): New function.
14986         (grub_dl_load_core): Use `grub_dl_check_header' instead of
14987         `grub_arch_dl_check_header'.  Check ELF type.  Check if sections
14988         are inside the core.
14989         * kern/i386/dl.c (grub_arch_dl_check_header): Remove arch
14990         independent ELF header checks.
14991         * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
14992         * loader/i386/pc/multiboot.c (grub_rescue_cmd_multiboot): Use
14993         `grub_dl_check_header' instead of explicit checks.  Check for the
14994         ELF type.
14995         * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Use
14996         `grub_dl_check_header' instead of explicit checks.  Remove arch
14997         specific ELF header checks.
14999         * util/grub-emu.c (grub_arch_dl_check_header): Remove the
15000         argument SIZE.
15002 2005-02-13  Hollis Blanchard  <hollis@penguinppc.org>
15004         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add ls.mod.
15005         * include/grub/powerpc/libgcc.h (__mulsf3): New prototype.
15007 2005-02-12  Hollis Blanchard  <hollis@penguinppc.org>
15009         * kern/partition.c (grub_partition_probe): Clear `grub_errno' and
15010         return 0 if `grub_errno' is GRUB_ERR_BAD_PART_TABLE.
15011         (part_map_iterate): Clear `grub_errno' and return 0 if
15012         `partmap->iterate' returns GRUB_ERR_BAD_PART_TABLE.
15013         * partmap/amiga.c (amiga_partition_map_iterate): Return
15014         GRUB_ERR_BAD_PART_TABLE if no partition map magic is found.
15015         * partmap/apple.c (apple_partition_map_iterate): Likewise.
15017 2005-02-01  Guillem Jover  <guillem@hadrons.org>
15019         * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Fix module
15020         help info.
15022 2005-01-31  Marco Gerards  <metgerards@student.han.nl>
15024         * include/grub/powerpc/ieee1275/loader.h (grub_load_linux):
15025         Removed prototype.
15026         (grub_rescue_cmd_linux): New prototype.
15027         (grub_rescue_cmd_initrd): Likewise.
15028         * powerpc/ieee1275/linux.c (grub_linux_boot): Remove struct
15029         `bi_rec'.
15030         (grub_linux_release_mem): Release the memory for the initrd.
15031         (grub_load_linux): Renamed from this...
15032         (grub_rescue_cmd_linux): ...To this.  Changed all callers.
15033         Changed `entry' not to be static.  Loop over memory regions to
15034         find another one when the default fails.
15035         (grub_rescue_cmd_initrd): New function.
15036         (grub_linux_init): Remove function.
15037         (grub_linux_fini): Likewise.
15038         (GRUB_MOD_INIT): Register `initrd'.
15039         (GRUB_MOD_FINI): Unregister `initrd'.
15040         * powerpc/ieee1275/linux_normal.c (grub_linux_normal_init):
15041         Function removed.
15042         (grub_linux_normal_fini): Likewise.
15043         (GRUB_MOD_INIT): Register `initrd'.
15044         (GRUB_MOD_FINI): Unregister `initrd'.
15046 2005-01-31  Marco Gerards  <metgerards@student.han.nl>
15048         * commands/help.c: New file.
15049         * normal/arg.c (show_help): Renamed to...
15050         (grub_arg_show_help): ... this.
15051         * commands/i386/pc/halt.c: New file.
15052         * commands/i386/pc/reboot.c: Likewise.
15053         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/help.c'.
15054         (pkgdata_MODULES): Add `reboot.mod', `halt.mod' and `help.mod'.
15055         (help_mod_SOURCES, help_mod_CFLAGS, reboot_mod_SOURCES)
15056         (reboot_mod_CFLAGS, halt_mod_SOURCES, halt_mod_CFLAGS): New
15057         variables.
15058         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
15059         `commands/help.c'.
15060         (pkgdata_MODULES): Add `help.mod'.
15061         (help_mod_SOURCES, help_mod_CFLAGS): New variables.
15062         * grub/i386/pc/init.h (grub_reboot): New prototype.
15063         (grub_halt): Likewise.
15064         * include/grub/normal.h (grub_arg_show_help): New prototype.
15065         (grub_help_init): Likewise.
15066         (grub_help_fini): Likewise.
15067         * util/grub-emu.c (main): Initialize and deinitialize the help
15068         command.
15070         * normal/cmdline.c (grub_cmdline_get): Doc fix.
15072         * normal/command.c (grub_command_init): Fixed the description of
15073         the `set' and `unset' commands.
15075 2005-01-31  Marco Gerards  <metgerards@student.han.nl>
15077         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_interpret): New
15078         function.
15079         * commands/ieee1275/halt.c: New file.
15080         * commands/ieee1275/reboot.c: Likewise.
15081         * commands/ieee1275/suspend.c (grub_cmd_suspend): Use
15082         `__attribute__ ((unused))'.  Some GCS related fixed.
15083         (grub_suspend_init) [GRUB_UTIL]: Function removed.
15084         (grub_suspend_fini): Likewise.
15085         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add `reboot.mod'
15086         and `halt.mod'.
15087         (reboot_mod_SOURCES, reboot_mod_CFLAGS, halt_mod_SOURCES)
15088         (halt_mod_CFLAGS): New variables.
15089         * include/grub/powerpc/ieee1275/ieee1275.h
15090         (grub_ieee1275_interpret): New prototype.
15092 2005-01-29  Yoshinori K. Okuji  <okuji@enbug.org>
15094         * include/grub/misc.h (memmove): New prototype.
15095         (memcpy): Likewise.
15097 2005-01-22  Hollis Blanchard  <hollis@penguinppc.org>
15099         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
15100         `devpath' to 0.  Use `name' instead of `devpath' with `grub_strndup'.
15102 2005-01-22  Marco Gerards  <metgerards@student.han.nl>
15104         * kern/misc.c (grub_strndup): Function rewritten.
15106 2005-01-22  Vincent Pelletier  <subdino2004@yahoo.fr>
15108         * normal/menu.c (TERM_WIDTH): Macro redefined.
15109         (TERM_TOP_BORDER_Y): Likewise.
15110         (draw_border): Replaced while-loop by a for-loop.  Make the number
15111         of lines consistent with the number of lines displayed in
15112         print_entries.  Added a margin below the rectangle.
15113         (print_entry): Make the entry fit in the rectangle.
15114         (print_entries): Display the scroll arrows next to the right
15115         border.
15117 2005-01-21  Marco Gerards  <metgerards@student.han.nl>
15119         * fs/minix.c (grub_minix_find_file): Reserve more space for
15120         `fpath' so the \0 can be stored.  Use `grub_strcpy' instead of
15121         `grub_strncpy' to copy `path' into it.
15123 2005-01-21  Marco Gerards  <metgerards@student.han.nl>
15125         Add the loopback device, a device via which files can be accessed
15126         as devices.
15128         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/loopback.c'.
15129         (pkgdata_MODULES): Add loopback.mod.
15130         (loopback_mod_SOURCES): New variable.
15131         (loopback_mod_CFLAGS): Likewise.
15132         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
15133         `disk/loopback.c'.
15134         (pkgdata_MODULES): Add loopback.mod.
15135         (loopback_mod_SOURCES): New variable.
15136         (loopback_mod_CFLAGS): Likewise.
15137         * disk/loopback.c: new file.
15138         * include/grub/normal.h (grub_loop_init): New prototype.
15139         (grub_loop_fini): New prototype.
15140         * util/grub-emu.c (main): Initialize and de-initialize loopback
15141         support.
15142         * include/grub/disk.h (grub_disk_dev_id): Add
15143         `GRUB_DISK_DEVICE_LOOPBACK_ID'.
15145 2005-01-20  Hollis Blanchard  <hollis@penguinppc.org>
15147         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_enter): New
15148         function.
15149         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add suspend.mod.
15150         (suspend_mod_SOURCES): New variable.
15151         (suspend_mod_CFLAGS): Likewise.
15152         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_enter):
15153         New prototype.
15154         * commands/ieee1275/suspend.c: New file.
15156 2005-01-20  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
15158         * include/grub/dl.h (GRUB_MOD_INIT): Changed `__attribute__
15159         ((unused))' to `__attribute__ ((used))'.
15160         (GRUB_MOD_FINI): Likewise.
15161         * kern/dl.c (grub_dl_load_file): Fix null pointer dereference.
15162         * genmk.rb (PModule): Assign space to common symbols when linking
15163         modules.
15165 2005-01-20  Marco Gerards  <metgerards@student.han.nl>
15167         * include/grub/mm.h (grub_mm_init_region): Change the type of the
15168         `unsigned' arguments to `grub_size_t'.
15169         (grub_malloc): Likewise.
15170         (grub_realloc): Likewise.
15171         (grub_memalign): Likewise.
15172         * kern/i386/dl.c (grub_arch_dl_check_header): Likewise.
15173         * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
15174         * util/misc.c (grub_malloc): Likewise.
15175         (grub_realloc): Likewise.
15176         * kern/mm.c (get_header_from_pointer): Change the casts to
15177         `unsigned' into a cast to `grub_size_t'.
15179         * fs/fshelp.c (grub_fshelp_find_file): The `oldnode' should always
15180         point to `currnode' when `currnode' is changed.
15182         * util/grub-emu.c (main): Initialize `progname'.  Reported by Nico
15183         Schottelius <nico-linux@schottelius.org>.
15185 2005-01-09  Hollis Blanchard  <hollis@penguinppc.org>
15187         * util/powerpc/ieee1275/grub-mkimage.c: Include <string.h>.
15188         (note_path): Remove variable.
15189         (GRUB_IEEE1275_NOTE_NAME): New macro.
15190         (GRUB_IEEE1275_NOTE_TYPE): Likewise.
15191         (grub_ieee1275_note_hdr): New structure.
15192         (grub_ieee1275_note_desc): Likewise.
15193         (grub_ieee1275_note): Likewise.
15194         (load_note): Remove `dir' argument.  All callers updated.  Remove
15195         `note_img' and `path'.  Do not load a file from `note_path'.
15196         Initialize a struct grub_ieee1275_note and write that to `out'.
15197         Use GRUB_IEEE1275_MODULE_BASE instead of MODULE_BASE.
15199 2005-01-05  Marco Gerards  <metgerards@student.han.nl>
15201         * util/misc.c (grub_util_read_image): Revert last change.  It
15202         called `grub_util_read_at', which seeks from the beginning of the
15203         file.
15205 2005-01-04  Hollis Blanchard  <hollis@penguinppc.org>
15207         * TODO: Add note about endianness in grub-mkimage.
15208         * boot/powerpc/ieee1275/crt0.S (note): Remove unused .note
15209         section.
15210         * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Add grub-mkimage.
15211         (grub_mkimage_SOURCES): New target.
15212         * include/grub/kernel.h (grub_start_addr): Remove variable.
15213         (grub_end_addr): Likewise.
15214         (grub_total_module_size): Likewise.
15215         (grub_kernel_image_size): Likewise.
15216         (GRUB_MODULE_MAGIC): New constant.
15217         (grub_module_info): New structure.
15218         (grub_arch_modules_addr): New prototype.
15219         (grub_get_end_addr): Remove prototype.
15220         * include/grub/i386/pc/kernel.h (grub_end_addr): New prototype.
15221         * include/grub/powerpc/ieee1275/kernel.h: New file.
15222         * include/grub/util/misc.h (grub_util_get_fp_size): New
15223         prototype.
15224         (grub_util_read_at): Likewise.
15225         (grub_util_write_image_at): Likewise.
15226         * kern/main.c (grub_get_end_addr): Remove function.
15227         (grub_load_modules): Call grub_arch_modules_addr instead of using
15228         grub_end_addr.  Look for a grub_module_info struct in memory.  Use
15229         the grub_module_info fields instead of calling grub_get_end_addr
15230         as loop conditions.  Move grub_add_unused_region code here.
15231         (grub_add_unused_region): Remove function.
15232         * kern/i386/pc/init.c: Include grub/cache.h.
15233         (grub_machine_init): Remove call to grub_get_end_addr.  Remove
15234         one call to add_mem_region.
15235         (grub_arch_modules_addr): New function.
15236         * kern/powerpc/ieee1275/init.c (grub_end_addr): Remove variable.
15237         (grub_total_module_size): Likewise.
15238         Include grub/machine/kernel.h.
15239         (grub_arch_modules_addr): New function.
15240         * util/grub-emu.c (grub_end_addr): Remove variable.
15241         (grub_total_module_size): Likewise.
15242         (grub_arch_modules_addr): New function.
15243         * util/misc.c: Include unistd.h.
15244         (grub_util_get_fp_size): New function.
15245         (grub_util_read_at): Likewise.
15246         (grub_util_write_image_at): Likewise.
15247         (grub_util_read_image): Call grub_util_read_at.
15248         (grub_util_write_image): Call grub_util_write_image_at.
15249         * util/i386/pc/grub-mkimage.c (generate_image): Allocate
15250         additional memory in kernel_img for a struct grub_module_info.
15251         Fill in that grub_module_info.
15252         * util/powerpc/ieee1275/grub-mkimage.c: New file.
15254 2005-01-03  Hollis Blanchard  <hollis@penguinppc.org>
15256         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_milliseconds):
15257         New function.
15258         * include/grub/powerpc/ieee1275/ieee1275.h
15259         (grub_ieee1275_milliseconds): New prototype.
15260         * include/grub/powerpc/ieee1275/time.h (GRUB_TICKS_PER_SECOND):
15261         Change to 1000.
15262         * kern/powerpc/ieee1275/init.c (grub_get_rtc): Call
15263         grub_ieee1275_milliseconds.
15265 2005-01-03  Hollis Blanchard  <hollis@penguinppc.org>
15267         * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_realmode): New
15268         variable.
15269         (find_options): New function.
15270         (cmain): Call find_options.
15271         * include/grub/powerpc/ieee1275/ieee1275.h
15272         (grub_ieee1275_realmode): New extern variable.
15273         * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Only call
15274         grub_map if grub_ieee1275_realmode is false.
15276 2004-12-29  Marco Gerards  <metgerards@student.han.nl>
15278         * normal/cmdline.c (grub_cmdline_get): Redone logic so no empty
15279         lines are inserted and make it work like readline.  Reported by
15280         Vincent Pelletier <subdino2004@yahoo.fr>.
15282 2004-12-28  Marco Gerards  <metgerards@student.han.nl>
15284         * boot/powerpc/ieee1275/crt0.S (_start): Don't set up the stack.
15286         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCE): Remove
15287         `kern/powerpc/cache.S'.
15289 2004-12-27  Marco Gerards  <metgerards@student.han.nl>
15291         * genmk.rb: Handle the `Program' class in the main loop.  Written
15292         by Johan Rydberg <jrydberg@gnu.org>.
15293         (Program): New class.
15294         (programs): New variable.
15295         * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h>
15296         instead of "grub/machine/ieee1275.h".  Include <grub/kernel.h>
15297         instead of "grub/kernel.h".  Include <grub/machine/init.h>.
15298         (help_arch): Function removed.
15299         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add
15300         `powerpc/libgcc.h' and `loader.h'.
15301         (pkgdata_PROGRAMS): New variable.
15302         (sbin_UTILITIES): Variable removed.
15303         (grub_emu_SOURCES): Added kern/powerpc/cache.S.
15304         (grubof_SOURCES): Variable re-defined so it only includes the
15305         core functionality.
15306         (grubof_CFLAGS): Remove `-DGRUBOF'.
15307         (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS,
15308         (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES)
15309         (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS)
15310         (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES)
15311         (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS)
15312         (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES)
15313         (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS)
15314         (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS)
15315         (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES)
15316         (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS)
15317         (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
15318         (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES)
15319         (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS)
15320         (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES)
15321         (pc_mod_CFLAGS): New variables.
15322         * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>.
15323         (grub_ofdisk_iterate): Add a prototype for `dev_iterate'.
15324         * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype.
15325         * include/grub/loader.h (grub_os_area_addr, grub_os_area_size):
15326         Moved from here...
15327         * include/grub/i386/pc/init.h (grub_os_area_addr)
15328         (rub_os_area_size): ... to here.
15329         * include/grub/powerpc/ieee1275/ieee1275.h
15330         (grub_ieee1275_entry_fn): Export symbol.
15331         * include/grub/powerpc/ieee1275/init.h: New file.
15332         * include/grub/powerpc/libgcc.h: Likewise.
15333         * include/grub/cache.h: Likewise.
15334         * kern/powerpc/cache.S: Likewise.  Written by Hollis Blanchard
15335         <hollis@penguinppc.org>.
15336         * kern/dl.c: Include <grub/cache.h>.
15337         (grub_dl_flush_cache): New function.
15338         (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache
15339         for this module.
15340         * kern/powerpc/ieee1275/init.c (grub_ofdisk_init)
15341         (grub_console_init): Removed prototypes.
15342         (grub_machine_init): Don't initialize the modules anymore.
15343         * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function
15344         static.
15345         * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN):
15346         Macro undef removed.
15347         (GRUB_HOST_WORDS_BIGENDIAN): New macro.
15348         * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add
15349         relocation `R_PPC_REL32'.  Return an error when the relocation is
15350         unknown.
15351         * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'.
15352         * kern/i386/pc/init.c (grub_arch_sync_caches): New function.
15353         * util/misc.c (grub_arch_sync_caches): Likewise.
15355 2004-12-19  Marco Gerards  <metgerards@student.han.nl>
15357         * conf/powerpc-ieee1275.rmk (MOSTLYCLEANFILES): Remove
15358         `symlist.c', add `grubof_symlist.c'.
15359         (symlist.c): Variable removed.
15360         (grubof_HEADERS): Variable added.
15361         (grubof_symlist.c): New target.
15362         (kernel_syms.lst): Use `grubof_HEADERS' instead of
15363         `kernel_img_HEADERS'.
15364         (grubof_SOURCES): Add `kern/powerpc/dl.c' and `grubof_symlist.c'.
15365         * kern/powerpc/dl.c: New file.
15366         * kern/powerpc/ieee1275/init.c (grub_arch_dl_check_header):
15367         Function removed.
15368         (grub_arch_dl_relocate_symbols): Likewise.
15369         (grub_register_exported_symbols): Likewise.
15371 2004-12-13  Marco Gerards  <metgerards@student.han.nl>
15373         * fs/ext2.c (grub_ext2_open): Don't use data after freeing it.
15374         (grub_ext2_dir): Likewise.  Don't return in case of an error, jump
15375         to fail instead.  Reported by Vincent Pelletier
15376         <subdino2004@yahoo.fr>.
15378         * fs/fshelp.c (grub_fshelp_find_file): Don't free `oldnode' when
15379         it is not allocated.  Reported by Vincent Pelletier
15380         <subdino2004@yahoo.fr>.
15382         * normal/cmdline.c (grub_tab_complete): Add a blank line to the
15383         output so the output looks better.
15385 2004-12-04  Marco Gerards  <metgerards@student.han.nl>
15387         Modulize the partition map support and add support for the amiga
15388         partition map.
15390         * commands/ls.c: Include <grub/partition.h> instead of
15391         <grub/machine/partition.h>.
15392         * kern/disk.c: Likewise.
15393         * kern/rescue.c: Likewise.
15394         * loader/i386/pc/chainloader.c: Likewise.
15395         * normal/cmdline.c: Likewise.
15396         * kern/powerpc/ieee1275/init.c: Likewise.
15397         (grub_machine_init): Call `grub_pc_partition_map_init',
15398         `grub_amiga_partition_map_init' and
15399         `grub_apple_partition_map_init'.
15400         * conf/i386-pc.rmk (kernel_img_SOURCES): Remove
15401         `disk/i386/pc/partition.c'.  Add `kern/partition.c'.
15402         (kernel_img_HEADERS): Remove `machine/partition.h'.  Add
15403         `partition.h' and `pc_partition.h'.
15404         (grub_setup_SOURCES): Remove
15405         `disk/i386/pc/partition.c'.  Add `kern/partition.c',
15406         `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
15407         (grub_emu_SOURCES): Likewise.
15408         (pkgdata_MODULES): Add `amiga.mod', `apple.mod' and `pc.mod'.
15409         (amiga_mod_SOURCES, amiga_mod_CFLAGS, apple_mod_SOURCES)
15410         (apple_mod_CFLAGS, pc_mod_SOURCES, pc_mod_CFLAGS): New variables.
15411         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
15412         `disk/powerpc/ieee1275/partition.c'.  Add `kern/partition.c',
15413         `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
15414         (grubof_SOURCES): Likewise.
15415         * disk/i386/pc/partition.c: File removed.
15416         * disk/powerpc/ieee1275/partition.c: Likewise.
15417         * include/grub/powerpc/ieee1275/partition.h: Likewise.
15418         * include/grub/i386/pc/partition.h: Likewise.
15419         * kern/partition.c: New file.
15420         * partmap/amiga.c: Likewise.
15421         * partmap/apple.c: Likewise.
15422         * partmap/pc.c: Likewise.
15423         * include/grub/partition.h: Likewise..
15424         * include/grub/pc_partition.h: Likewise.
15425         * util/grub-emu.c: Include <grub/partition.h> instead of
15426         <grub/machine/partition.h>.
15427         (main): Call `grub_pc_partition_map_init',
15428         `grub_amiga_partition_map_init' and
15429         `grub_apple_partition_map_init' and deinitialize afterwards.
15430         * util/i386/pc/biosdisk.c: Include `#include
15431         <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
15432         `<grub/machine/partition.h>'.
15433         * util/i386/pc/grub-setup.c: Likewise.
15434         * util/i386/pc/biosdisk.c: Likewise.
15435         (grub_util_biosdisk_get_grub_dev): Only access the PC specific
15436         partition information in case of a PC partition.
15437         * util/i386/pc/grub-setup.c: Include `#include
15438         <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
15439         `<grub/machine/partition.h>'.
15440         (setup): Only access the PC specific partition information in case
15441         of a PC partition.
15443 2004-11-17  Hollis Blanchard  <hollis@penguinppc.org>
15445         * kern/powerpc/ieee1275/init.c (grub_setjmp): Remove function.
15446         (grub_longjmp): Likewise.
15447         * include/grub/powerpc/setjmp.h (grub_jmp_buf): Set array size to
15448         20.
15449         * normal/powerpc/setjmp.S: New file.
15450         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
15451         `normal/powerpc/setjmp.S'.
15452         (grubof_CFLAGS): Add `-DGRUBOF'.
15453         * include/grub/setjmp.h [GRUB_UTIL]: Changed condition to
15454         [GRUB_UTIL && !GRUBOF].
15456 2004-11-16  Marco Gerards  <metgerards@student.han.nl>
15458         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Skip any
15459         property named `name'.  Correctly handle the error returned by
15460         `grub_ieee1275_finddevice' if a device can not be opened.
15462 2004-11-02  Hollis Blanchard  <hollis@penguinppc.org>
15464         * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_readkey): Test
15465         `actual' for negativity.
15466         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
15467         kern/fshelp.c.
15469 2004-11-01  Marco Gerards  <metgerards@student.han.nl>
15471         * term/i386/pc/vga.c (VGA_HEIGHT): Changed to 350.
15472         (PAGE_OFFSET): New macro.
15473         (CRTC_ADDR_PORT): Likewise.
15474         (CRTC_DATA_PORT): Likewise.
15475         (START_ADDR_HIGH_REGISTER): Likewise.
15476         (START_ADDR_LOW_REGISTER): Likewise.
15477         (GRAPHICS_ADDR_PORT): Likewise.
15478         (GRAPHICS_DATA_PORT): Likewise.
15479         (READ_MAP_REGISTER): Likewise.
15480         (INPUT_STATUS1_REGISTER): Likewise.
15481         (INPUT_STATUS1_VERTR_BIT): Likewise.
15482         (page): New variable.
15483         (wait_vretrace): New function.
15484         (set_read_map): Likewise.
15485         (set_start_address): Likewise.
15486         (grub_vga_init): Use mode 0x10 instead of mode 0x12.  Switch to
15487         the right page.
15488         (check_vga_mem): Take the page into account.
15489         (write_char): Likewise.
15490         (write_cursor): Likewise.
15491         (scroll_up): Likewise.  Copy the page to the page that is not
15492         shown and switch between both pages.
15493         (grub_vga_putchar): Fix off by one error.
15494         (grub_vga_cls): Wait for the vertical retrace.  Take the page into
15495         account.
15497 2004-11-01  Marco Gerards  <metgerards@student.han.nl>
15499         Add support for iso9660 (including rockridge).
15501         * conf/i386-pc.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
15502         (iso9660_mod_SOURCES): New variable.
15503         (iso9660_mod_CFLAGS): Likewise.
15504         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
15505         * include/grub/fs.h (grub_iso9660_init): New prototype.
15506         * util/grub-emu.c (main): Call `grub_iso9660_init'.
15507         * fs/iso9660.c: New file.
15509         * include/grub/misc.h (grub_strncat): New prototype.
15510         * kern/misc.c (grub_strncat): New function.
15512         * fs/hfs.c (grub_hfs_mount): Translate the error
15513         `GRUB_ERR_OUT_OF_RANGE' to `GRUB_ERR_BAD_FS'.
15514         * fs/jfs.c (grub_jfs_mount): Likewise.
15515         * fs/ufs.c (grub_ufs_mount): Likewise.
15517 2004-10-28  Hollis Blanchard  <hollis@penguinppc.org>
15519         * boot/powerpc/ieee1275/cmain.c (cmain): Remove asm statements
15520         which initialized BAT registers.
15521         * boot/powerpc/ieee1275/ieee1275.c (IEEE1275_CALL_ENTRY_FN,
15522         grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
15523         Move from here...
15524         * include/grub/powerpc/ieee1275/ieee1275.h (IEEE1275_CALL_ENTRY_FN,
15525         grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
15526         ... to here.
15527         * kern/powerpc/ieee1275/openfw.c (grub_map): New function.
15528         (grub_mapclaim): Likewise.
15529         * loader/powerpc/ieee1275/linux.c (grub_load_linux): Use
15530         grub_mapclaim instead of grub_ieee1275_claim.  Assign linux_addr by
15531         hand.
15533 2004-10-19  Hollis Blanchard  <hollis@penguinppc.org>
15535         * conf/powerpc-ieee1275.rmk (COMMON_ASFLAGS): Remove -fno-builtin.
15536         (COMMON_CFLAGS): Remove -fno-builtin and -D__ASSEMBLY__. Add
15537         -ffreestanding and -msoft-float.
15539 2004-10-15  Hollis Blanchard  <hollis@penguinppc.org>
15541         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Do not
15542         append ":0" to devpath if the GRUB_IEEE1275_NO_PARTITION_0 flag is
15543         set in grub_ieee1275_flags.
15545 2004-10-14  Hollis Blanchard  <hollis@penguinppc.org>
15547         * include/grub/powerpc/ieee1275/ieee1275.h (abort): Add function
15548         prototype.
15549         * kern/powerpc/ieee1275/init.c (grub_machine_init): Call
15550         grub_console_init first.
15551         Change the memory range used for grub_ieee1275_claim and
15552         grub_mm_init_region.
15553         Print an error message if the claim fails.
15554         Include <grub/misc.h>.
15556 2004-10-13  Hollis Blanchard  <hollis@penguinppc.org>
15558         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_iterate):
15559         Call grub_children_iterate for device nodes of type `scsi',
15560         `ide', or `ata'.
15561         (grub_ofdisk_open): Remove manual device alias resolution.
15562         Fix memory leak when device cannot be opened.
15563         * include/grub/powerpc/ieee1275/ieee1275.h
15564         (grub_children_iterate): New prototype.
15565         * kern/powerpc/ieee1275/openfw.c (grub_children_iterate):
15566         New function.
15567         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
15568         Return -1 if args.size was -1.
15570 2004-10-11  Hollis Blanchard  <hollis@penguinppc.org>
15572         * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_flags): New global.
15573         (cmain): Accept 3 parameters. Test for 0xdeadbeef, indicating Old
15574         World Macintosh. If Old Wold, set flag in grub_ieee1275_flags; claim
15575         Open Firmware's memory for it; claim memory from _start to _end.
15576         * boot/powerpc/ieee1275/crt0.S (__bss_start): New extern.
15577         (_end): New extern.
15578         (_start): Zero BSS from __bss_start to _end.
15579         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
15580         New extern.
15581         (GRUB_IEEE1275_NO_PARTITION_0): New #define.
15583 2004-10-11  Hollis Blanchard  <hollis@penguinppc.org>
15585         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): Return
15586         -1 if args.base was -1.
15588 2004-10-08  Hollis Blanchard  <hollis@penguinppc.org>
15590         * term/powerpc/ieee1275/ieee1275.c (grub_ofconsole_cls): Use an ANSI
15591         escape sequence instead of a literal ^L. Also call
15592         grub_ofconsole_gotoxy.
15594 2004-10-03  Hollis Blanchard  <hollis@penguinppc.org>
15596         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): change
15597         void *  arguments to grub_addr_t.  All callers updated.  Also make
15598         the `result' argument optional.
15599         (grub_ieee1275_release): change void * arguments to grub_addr_t.
15600         All callers updated.
15602 2004-09-22  Hollis Blanchard  <hollis@penguinppc.org>
15604         * commands/ls.c (grub_ls_list_files): Use the string following the
15605         initial ')', if present, as the filesystem path.
15606         * kern/rescue.c (grub_rescue_cmd_ls): Likewise.
15608         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): List crt0.S first.
15610 2004-09-18  Yoshinori K. Okuji  <okuji@enbug.org>
15612         Make the source code of the menu interface more readable.
15614         * normal/menu.c: Include grub/mm.h.
15615         (TERM_WIDTH): New macro.
15616         (TERM_HEIGHT): Likewise.
15617         (TERM_INFO_HEIGHT): Likewise.
15618         (TERM_MARGIN): Likewise.
15619         (TERM_SCROLL_WIDTH): Likewise.
15620         (TERM_TOP_BORDER_Y): Likewise.
15621         (TERM_LEFT_BORDER_X): Likewise.
15622         (TERM_BORDER_WIDTH): Likewise.
15623         (TERM_MESSAGE_HEIGHT): Likewise.
15624         (TERM_BORDER_HEIGHT): Likewise.
15625         (TERM_NUM_ENTRIES): Likewise.
15626         (TERM_FIRST_ENTRY_Y): Likewise.
15627         (TERM_ENTRY_WIDTH): Likewise.
15628         (TERM_CURSOR_X): Likewise.
15629         (draw_border): Use macros instead of magic numbers.
15630         (print_entry): Likewise.
15631         (print_entries): Likewise.
15632         (run_menu): Likewise. Also, handle the key 'e'.
15633         (run_menu_entry): Ignore empty command lines.
15634         (print_message): Added a new argument EDIT. If EDIT is true,
15635         print a different message.
15636         (init_page): Likewise.
15637         (edit_menu_entry): New function. Not implemented yet.
15639 2004-09-17  Marco Gerards  <metgerards@student.han.nl>
15641         Add `linux.mod' and `multiboot.mod' so linux and multiboot kernels
15642         can be loaded from normal mode.
15644         * conf/i386-pc.rmk (pkgdata_MODULES): Add `linux.mod' and
15645         `multiboot.mod'.
15646         (linux_mod_SOURCES, linux_mod_CFLAGS, multiboot_mod_SOURCES)
15647         (multiboot_mod_CFLAGS): New variables.
15648         * loader/i386/pc/linux_normal.c: New file.
15649         * loader/i386/pc/multiboot_normal.c: Likewise.
15651         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Don't use the
15652         attribute `unused'.
15654         * fs/ext2.c (grub_ext2_iterate_dir): Fix typos in inode type.  Use
15655         `fdiro' to read the mode information from instead of `diro'.
15657         * fs/fshelp.c (grub_fshelp_find_file): Set type to foundtype after
15658         looking up a symlink.
15660         * include/grub/normal.h (GRUB_COMMAND_FLAG_NO_ARG_PARSE): New
15661         macro.
15662         * normal/command.c (grub_command_execute): Don't parse the
15663         arguments when `GRUB_COMMAND_FLAG_NO_ARG_PARSE' is set in the
15664         flags of the command.
15666         * normal/menu.c (grub_menu_run): Fix typo.
15668 2004-09-14  Hollis Blanchard  <hollis@penguinppc.org>
15670         * kern/powerpc/ieee1275/init.c (abort): Trap into Open Firmware.
15672         * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_gotoxy): Use
15673         `y + 1' instead of `y - 1'.
15675         * conf/powerpc-ieee1275.rmk (grubof_LDFLAGS): Add `-N' and `-S'.
15677 2004-09-14  Yoshinori K. Okuji  <okuji@enbug.org>
15679         From Hollis Blanchard <hollis@penguinppc.org>:
15680         * kern/misc.c (memmove): New alias for grub_memmove.
15681         (memcmp): New alias for grub_memcmp.
15682         (memset): New alias for grub_memset.
15683         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
15684         Change "int handle" to "grub_ieee1275_phandle_t handle".
15685         * include/grub/powerpc/ieee1275/ieee1275.h
15686         (grub_ieee1275_get_property): Likewise.
15688 2004-09-12  Tomas Ebenlendr  <ebik@ucw.cz>
15690         Added normal mode command `chainloader' as module chain.mod, which
15691         depends on normal.mod and _chain.mod.
15693         * conf/i386-pc.rmk (pkgdata_MODULES): Add `chain.mod'.
15694         (chain_mod_SOURCES, chain_mod_CFLAGS): Variables added.
15695         * include/grub/i386/pc/loader.h (grub_rescue_cmd_chainloader):
15696         Deleted prototype.
15697         * loader/i386/pc/chainloader.c (grub_rescue_cmd_chainloader): All
15698         but arguments parsing moved to ...
15699         (grub_chainloader_cmd): ... here.  New function.
15700         * include/grub/i386/pc/chainloader.h: New file.
15701         * loader/i386/pc/chainloader_normal.c: Likewise.
15703 2004-09-11  Marco Gerards  <metgerards@student.han.nl>
15705         * conf/i386-pc.rmk (kernel_img_SOURCES): Added kern/fshelp.c.
15706         (grub_mkimage_LDFLAGS): Likewise.
15707         (grub_emu_SOURCES): Likewise.
15708         (kernel_img_HEADERS): Added fshelp.h.
15709         * fs/ext2.c: Include <grub/fshelp.h>.
15710         (FILETYPE_REG): New macro.
15711         (FILETYPE_INO_REG): Likewise.
15712         (grub_ext_sblock): Renamed to `grub_ext2_sblock'.
15713         Changed all users.
15714         (ext2_block_group): Renamed to `grub_ext2_block_group'.  Changed
15715         all users.
15716         (grub_fshelp_node): New struct.
15717         (grub_ext2_data): Added member `diropen'.  Changed member `inode'
15718         to a pointer.
15719         (grub_ext2_get_file_block): Removed function.
15720         (grub_ext2_read_block): New function.
15721         (grub_ext2_read_file): Replaced parameter `data' by `node'.
15722         This function was written.
15723         (grub_ext2_mount): Read the root inode.  Create a diropen struct.
15724         (grub_ext2_find_file): Removed function.
15725         (grub_ext2_read_symlink): New function.
15726         (grub_ext2_iterate_dir): Likewise.
15727         (grub_ext2_open): Rewritten.
15728         (grub_ext2_dir): Rewritten.
15729         * include/grub/fshelp.h: New file.
15730         * fs/fshelp.c: Likewise.
15732 2004-09-10  Yoshinori K. Okuji  <okuji@enbug.org>
15734         * normal/menu.c: Include grub/loader.h and grub/machine/time.h.
15735         (print_message): Add a missing newline.
15736         (run_menu): Added timeout support.
15737         (run_menu_entry): New local function.
15738         (grub_menu_run): Added support for booting.
15740         * kern/loader.c (grub_loader_is_loaded): New function.
15742         * include/grub/powerpc/ieee1275/time.h: Include grub/symbol.h.
15743         (grub_get_rtc): Exported.
15745         * include/grub/i386/pc/time.h: Include grub/symbol.h.
15746         (grub_get_rtc): Exported.
15748         * include/grub/normal.h (struct grub_command_list): Remove
15749         constant from the member `command'.
15751         * include/grub/loader.h (grub_loader_is_loaded): Declared.
15753         * include/grub/err.h (GRUB_ERR_INVALID_COMMAND): New constant.
15755         * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/time.h.
15757 2004-08-28  Marco Gerards  <metgerards@student.han.nl>
15759         Add support for the JFS filesystem.
15761         * fs/jfs.c: New file.
15762         * include/grub/fs.h (grub_jfs_init): New prototype.
15763         (grub_jfs_fini): New prototype.
15764         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/jfs.c.
15765         (grub_emu_SOURCES): Likewise.
15766         (pkgdata_MODULES): Add jfs.mod.
15767         (jfs_mod_SOURCES): New variable.
15768         (jfs_mod_CFLAGS): Likewise.
15769         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs.jfs.c.
15770         (grubof_SOURCES): Likewise.
15771         * util/grub-emu.c (main): Initialize and deinitialize JFS support.
15773         * fs/fat.c (grub_fat_find_dir): Convert the filename little
15774         endian to the host endian.
15775         (grub_fat_utf16_to_utf8): Move function from there...
15776         * kern/misc.c (grub_utf16_to_utf8): ...to here.  Do not convert
15777         the endianness of the source string anymore.
15778         * include/grub/misc.h (grub_utf16_to_utf8): New prototype.
15780 2004-08-24  Marco Gerards  <metgerards@student.han.nl>
15782         * commands/boot.c (grub_boot_init) [GRUB_UTIL]: Make conditional.
15783         (grub_boot_fini) [GRUB_UTIL]: Likewise.
15784         (GRUB_MOD_INIT) [!GRUB_UTIL]: Likewise.
15785         (GRUB_MOD_FINI) [!GRUB_UTIL]: Likewise.
15787         * fs/hfs.c (grub_hfs_find_node): Add a prototype for `node_found'.
15788         (grub_hfs_iterate_dir): Make the function static.  Add prototypes
15789         for `node_found' and `it_dir'.
15790         (grub_hfs_dir): Add prototype for `dir_hook'.
15792         * fs/minix.c (grub_minix_get_file_block): Add prototype for
15793         `grub_get_indir'.  Rename `indir' in two blocks to `indir16'
15794         and `indir32' to silence a gcc warning.
15796         * include/grub/fs.h (grub_hfs_init): New prototype.
15797         (grub_hfs_fini): Likewise.
15800 2004-08-21  Yoshinori K. Okuji  <okuji@enbug.org>
15802         Each disk device has its own id now. This is useful to make use
15803         of multiple disk devices.
15805         * include/grub/disk.h (grub_disk_dev_id): New enum.
15806         (GRUB_DISK_DEVICE_BIOSDISK_ID): New constant.
15807         (GRUB_DISK_DEVICE_OFDISK_ID): Likewise.
15809         * disk/i386/pc/biosdisk.c (grub_biosdisk_dev): Specify
15810         GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
15812         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_dev): Specify
15813         GRUB_DISK_DEVICE_OFDISK_ID as an id.
15815         * util/i386/pc/biosdisk.c (grub_util_biosdisk_dev): Specify
15816         GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
15818         * include/grub/disk.h (struct grub_disk_dev): Added a new member
15819         "id" which is used by the cache manager.
15821         * normal/main.c (grub_normal_init_page): Use "GNU GRUB" instead
15822         of just "GRUB".
15824 2004-08-18  Marco Gerards  <metgerards@student.han.nl>
15826         * fs/hfs.c: New file.
15827         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/hfs.c.
15828         (grub_emu_SOURCES): Likewise.
15829         (pkgdata_MODULES): Add hfs.mod.
15830         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/hfs.c.
15831         (grubof_SOURCES): Likewise.
15832         * util/grub-emu.c (main): Initialize and deinitialize HFS support.
15834         * include/grub/misc.h (grub_strncasecmp): Add prototype.
15835         * kern/misc.c (grub_strncasecmp): Add function.
15837 2004-08-14  Marco Gerards  <metgerards@student.han.nl>
15839         * include/grub/arg.h (GRUB_ARG_OPTION_OPTIONAL): Surround macro
15840         with parentheses.
15842         * fs/ext2.c (FILETYPE_UNKNOWN): New macro.
15843         (grub_ext2_dir): In case the directory entry type is unknown, read
15844         it from the inode.
15846 2004-08-02  Peter Bruin  <pjbruin@dds.nl>
15848         * loader/powerpc/ieee1275/linux.c (grub_linux_init): Pass
15849         grub_load_linux instead of grub_rescue_cmd_linux as second
15850         argument of grub_rescue_register_command.
15852         * Makefile.in (RMKFILES): Add conf/powerpc-ieee1275.rmk.
15854 2004-07-27  Marco Gerards  <metgerards@student.han.nl>
15856         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_release): New
15857         function.
15858         * commands/boot.c: Remove the check for `GRUB_UTIL'.
15859         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
15860         `loader/powerpc/ieee1275/linux.c',
15861         `loader/powerpc/ieee1275/linux_normal.c' and `commands/boot.c'.
15862         * include/grub/powerpc/ieee1275/ieee1275.h
15863         (grub_ieee1275_release): New prototype.
15864         * include/grub/powerpc/ieee1275/loader.h: Rewritten.
15865         * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize
15866         normal, boot, linux and linux_normal.
15867         * loader/powerpc/ieee1275/linux.c: New file.
15868         * loader/powerpc/ieee1275/linux_normal.c: Likewise.
15870 2004-07-12  Marco Gerards  <metgerards@student.han.nl>
15872         * normal/arg.c (grub_arg_parse): Correct error handling after
15873         reallocating the argumentlist (check if `argl' is not null instead
15874         of checking if `args' is not null).
15875         * kern/mm.c (grub_realloc): Return the same pointer when using the
15876         same region, instead of returning the header address.
15878 2004-07-11  Marco Gerards  <metgerards@student.han.nl>
15880         * disk/powerpc/ieee1275/partition.c (grub_partition_iterate): Skip
15881         one block instead of two when looking for the initial partition.
15882         (grub_partition_probe): Initialize the local variable `p' with 0.
15883         Use base 10 for the grub_strtoul call.
15884         * kern/misc.c (grub_strncpy): Fix off by one bug.  Eliminated the
15885         need for one local variable.
15886         (grub_strtoul): Don't add the new value to `num', instead of that
15887         just assign it.
15889 2004-07-11  Marco Gerards  <metgerards@student.han.nl>
15891         * conf/i386-pc.rmk (pkgdata_IMAGE): Add pxeboot.img.
15892         (pxeboot_img_SOURCES): New variable.
15893         (pxeboot_img_ASFLAGS): Likewise.
15894         (pxeboot_img_LDFLAGS): Likewise.
15895         * boot/i386/pc/pxeboot.S: New file.  Based on pxeloader.S from
15896         GRUB Legacy and boot.S.  Adopted for GRUB 2 by lode leroy
15897         <lode_leroy@hotmail.com>.
15899 2004-06-27  Tomas Ebenlendr  <ebik@ucw.cz>
15901         * kern/rescue.c (grub_enter_rescue_mode): Don't continue when
15902         there was no input.
15904 2004-06-27  Tomas Ebenlendr  <ebik@ucw.cz>
15906         * normal/cmdline.c (grub_set_history): Fix off by one bug.  Fixed
15907         the history buffer logic.
15909 2004-06-27  Tomas Ebenlendr  <ebik@ucw.cz>
15911         * fs/ext2.c (FILETYPE_INO_MASK, FILETYPE_INO_DIRECTORY)
15912         (FILETYPE_INO_SYMLINK): New macros.
15913         (grub_ext2_find_file): Check if the node is a directory using the
15914         inode stat information instead of using the filetype in the
15915         dirent.  Exclude the first character of an absolute symlink.
15916         (grub_ext2_dir): Mask out the filetype part of the mode member of
15917         the inode.
15919 2004-05-24  Marco Gerards  <metgerards@student.han.nl>
15921         Add support for UFS version 1 and 2.  Add support for the minix
15922         filesystem version 1 and 2, both the variants with 14 and 30 long
15923         filenames.
15925         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ufs.c and
15926         fs/minix.c.
15927         (grub_emu_SOURCES): Likewise.
15928         (pkgdata_MODULES): Add ufs.mod and minix.mod.
15929         (ufs_mod_SOURCES): New variable.
15930         (ufs_mod_CFLAGS): Likewise.
15931         (minix_mod_SOURCES): Likewise.
15932         (minix_mod_CFLAGS): Likewise.
15933         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/ufs.c and
15934         fs/minix.c.
15935         (grubof_SOURCES): Likewise.
15936         * fs/ufs.c: New file.
15937         * fs/minix.c: New file.
15938         * include/grub/fs.h (grub_ufs_init): New prototype.
15939         (grub_ufs_fini): Likewise.
15940         (grub_minix_init): Likewise.
15941         (grub_minix_fini): Likewise.
15942         * util/grub-emu.c (main): Initialize and deinitialize UFS and
15943         minix fs.
15945 2004-04-30  Jeroen Dekkers  <jeroen@dekkers.cx>
15947         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add normal/arg.c,
15948         commands/ls.c, commands/terminal.c, commands/boot.c,
15949         commands/cmp.c and commands/cat.c.
15950         (grubof_LDFLAGS): Add -nostdlib -static-libgcc -lgcc.
15952         * kern/powerpc/ieee1275/init.c: Include "grub/env.h" instead of
15953         "env.h"
15955 2004-04-04  Yoshinori K. Okuji  <okuji@enbug.org>
15957         All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
15958         and grub_, respectively. Because the conversion is trivial and
15959         mechanical, I omit the details here. Please refer to the CVS
15960         if you need more information.
15962 2004-04-04  Yoshinori K. Okuji  <okuji@enbug.org>
15964         * include/pupa: Renamed to ...
15965         * include/grub: ... this.
15966         * util/i386/pc/pupa-mkimage.c: Renamed to ...
15967         * util/i386/pc/grub-mkimage.c: ... this.
15968         * util/i386/pc/pupa-setup.c: Renamed to ...
15969         * util/i386/pc/grub-setup.c: ... this.
15970         * util/pupa-emu.c: Renamed to ...
15971         * util/grub-emu.c: ... this.
15973 2004-03-29  Marco Gerards  <metgerards@student.han.nl>
15975         Add support for the newworld apple macintosh (PPC).  This has been
15976         tested on the powerbook 2000 only.  It only adds support for
15977         generic ieee1275 functions, console and disk support.  This should
15978         be easy to port to other architectures with support for Open
15979         Firmware.
15981         * configure.ac: Accept the powerpc as host_cpu.  In the case of
15982         the powerpc cpu set the host_vendor to ieee1275.  Make sure the i386
15983         specific tests are only executed while building for the i386.
15984         Inverse test for crosscompile.
15985         * genmk.rb (Utility): Allow assembler files.
15986         * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno.
15987         * conf/powerpc-ieee1275.rmk: New file.
15988         * disk/powerpc/ieee1275/ofdisk.c: Likewise.
15989         * disk/powerpc/ieee1275/partition.c: Likewise.
15990         * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise.
15991         * include/pupa/powerpc/ieee1275/console.h: Likewise.
15992         * include/pupa/powerpc/ieee1275/partition.h: Likewise.
15993         * include/pupa/powerpc/ieee1275/time.h: Likewise.
15994         * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise.
15995         * include/pupa/powerpc/ieee1275/multiboot.h: Likewise.
15996         * include/pupa/powerpc/ieee1275/loader.h
15997         * include/pupa/powerpc/setjmp.h: Likewise.
15998         * include/pupa/powerpc/types.h: Likewise.
15999         * kern/powerpc/ieee1275/init.c: Likewise.
16000         * kern/powerpc/ieee1275/openfw.c: Likewise.
16001         * term/powerpc/ieee1275/ofconsole.c: Likewise.
16003         These files were written by Johan Rydberg
16004         (jrydberg@night.trouble.net) and I only modified them slightly.
16006         * boot/powerpc/ieee1275/cmain.c: New file.
16007         * boot/powerpc/ieee1275/crt0.S: Likewise.
16008         * boot/powerpc/ieee1275/ieee1275.c: Likewise.
16009         * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
16011 2004-03-14  Jeroen Dekkers  <jeroen@dekkers.cx>
16013         * Makefile.in: Update copyright.
16014         * genmodsrc.sh: Likewise.
16015         * gensymlist.sh: Likewise.
16016         * term/i386/pc/vga.c: Indent correctly.
16018         * util/i386/pc/pupa-mkimage.c (usage): Use PACKAGE_BUGREPORT as
16019         bugreporting address.
16020         * util/i386/pc/pupa-setup.c (usage): Likewise,
16021         (main): Call pupa_ext2_init and pupa_ext2_fini.
16023         * fs/fat.c (log2): Renamed to ...
16024         (fat_log2): ... this.
16025         All callers changed.
16026         * kern/misc.c (memcpy): Alias to pupa_memmove.
16027         * loader/i386/pc/multiboot.c (pupa_rescue_cmd_multiboot): Fix
16028         lvalue cast.
16029         * util/console.c (pupa_ncurses_fini): Return 0.
16031         * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open)[__linux__]:
16032         Move fail label here.
16033         [__GNU__]: Don't warn when using stat.
16034         (open_device)[!__linux__]: Check if FD < 0 instead of !FD.
16035         (pupa_util_biosdisk_get_pupa_dev)[__GNU__]: Change type of N to
16036         long int. Use strtol instead of strtoul.
16038 2004-03-14  Marco Gerards  <metgerards@student.han.nl>
16040         * commands/boot.c: New file.
16041         * commands/cat.c: Likewise.
16042         * commands/cmp.c: Likewise.
16043         * commands/ls.c: Likewise.
16044         * commands/terminal.c: Likewise.
16045         * normal/command.c: Include <pupa/env.h> and <pupa/dl.h>.
16046         (pupa_register_command): Changed interface to match the new
16047         argument parser.
16048         (pupa_command_execute): Changed (almost rewritten) so it uses
16049         pupa_split_command.  Added support for setting variables using the
16050         syntax `foo=bar'.
16051         (rescue_command): Changed to work with the new argument parser.
16052         (terminal_command): Moved from here to commands/terminal.c.
16053         (set_command): New function.
16054         (unset_command): New function.
16055         (insmod_command): New function.
16056         (rmmod_command): New function.
16057         (lsmod_command): New function.
16058         (pupa_command_init): Don't initialize the command terminal
16059         anymore.  Initialize the commands set, unset, insmod, rmmod and
16060         lsmod.
16061         * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/env.c.
16062         (kernel_img_HEADERS): Add arg.h and env.h.
16063         (pupa_mkimage_LDFLAGS): Add kern/env.c.
16064         (pupa_emu_SOURCES): Add kern/env.c, commands/ls.c,
16065         commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c,
16066         normal/arg.c.
16067         (pkgdata_MODULES): Add ls.mod, boot.mod, cmp.mod, cat.mod and
16068         terminal.mod.
16069         (normal_mod_SOURCES): Add normal/arg.c and normal/arg.c.
16070         (boot_mod_SOURCES): New variable.
16071         (terminal_mod_SOURCES): Likewise.
16072         (ls_mod_SOURCES): Likewise.
16073         (cmp_mod_SOURCES): Likewise.
16074         (cat_mod_SOURCES): Likewise.
16076         * normal/arg.c: New file.
16077         * kern/env.c: Likewise.
16078         * include/pupa/arg.h: Likewise.
16079         * include/pupa/env.h: Likewise.
16080         * font/manager.c (font_command): Changed to match argument parsing
16081         interface changes.
16082         (PUPA_MOD_INIT): Likewise.
16083         * hello/hello.c (pupa_cmd_hello): Likewise.
16084         (PUPA_MOD_INIT): Likewise.
16085         * include/pupa/disk.h: Include <pupa/device.h>.
16086         (pupa_print_partinfo): New prototype.
16087         * include/pupa/dl.h (pupa_dl_set_prefix): Prototype removed.
16088         (pupa_dl_get_prefix): Likewise.
16089         * include/pupa/misc.h: Include <pupa/err.h>.
16090         (pupa_isgraph): New prototype.
16091         (pupa_isdigit): Likewise.
16092         (pupa_split_cmdline): Likewise.
16093         * include/pupa/normal.h: Include <pupa/arg.h>.
16094         (pupa_command): Changed the prototype of the member `func' to
16095         match the argument parsing interface.  Added member `options'.
16096         (pupa_register_command): Updated to match function.
16097         (pupa_arg_parse): New prototype.
16098         (pupa_hello_init) [PUPA_UTIL]: New prototype.
16099         (pupa_hello_fini) [PUPA_UTIL]: Likewise.
16100         (pupa_ls_init) [PUPA_UTIL]: Likewise.
16101         (pupa_ls_fini) [PUPA_UTIL]: Likewise.
16102         (pupa_cat_init) [PUPA_UTIL]: Likewise.
16103         (pupa_cat_fini) [PUPA_UTIL]: Likewise.
16104         (pupa_boot_init) [PUPA_UTIL]: Likewise.
16105         (pupa_boot_fini) [PUPA_UTIL]: Likewise.
16106         (pupa_cmp_init) [PUPA_UTIL]: Likewise.
16107         (pupa_cmp_fini) [PUPA_UTIL]: Likewise.
16108         (pupa_terminal_init) [PUPA_UTIL]: Likewise.
16109         (pupa_terminal_fini) [PUPA_UTIL]: Likewise.
16110         * kern/disk.c: Include <pupa/file.h>.
16111         (pupa_print_partinfo): New function.
16112         * kern/dl.c: Include <pupa/env.h>.
16113         (pupa_dl_dir): Variable removed.
16114         (pupa_dl_load): Use the environment variable `prefix' instead of
16115         the variable pupa_dl_dir.
16116         (pupa_dl_set_prefix): Function removed.
16117         (pupa_dl_get_prefix): Likewise.
16118         * kern/i386/pc/init.c: Include <pupa/env.h>.
16119         (pupa_machine_init): Use the environment variable `prefix' instead of
16120         using pupa_dl_set_prefix to set the prefix.
16121         * kern/main.c: Include <pupa/env.h>.
16122         (pupa_set_root_dev): Use the environment variable `prefix' instead of
16123         using pupa_dl_get_prefix to get the prefix.
16124         * kern/misc.c: Include <pupa/env.h>.
16125         (pupa_isdigit): New function.
16126         (pupa_isgraph): Likewise.
16127         (pupa_ftoa): Likewise.
16128         (pupa_vsprintf): Added support for printing values of the type
16129         `double'.  Make it possible to format variable output when using
16130         formatting like `%1.2%f'.
16131         (pupa_split_cmdline): New function.
16132         * kern/rescue.c: Include <pupa/env.h>.
16133         (next_word): Removed function.
16134         (pupa_rescue_cmd_prefix): Likewise.
16135         (pupa_rescue_cmd_set): New function.
16136         (pupa_rescue_cmd_unset): New function.
16137         (pupa_enter_rescue_mode): Use the `pupa_split_cmdline' function to
16138         split the command line instead of splitting it here.  Added
16139         support for setting variables using the syntax `foo=bar'.  Don't
16140         initialize the prefix command anymore.  Initialized the set and
16141         unset commands.
16142         * normal/cmdline.c: Include <pupa/env.h>.
16143         (pupa_tab_complete): Added prototypes for print_simple_completion,
16144         print_partition_completion, add_completion, iterate_commands,
16145         iterate_dev, iterate_part and iterate_dir. Moved code to print
16146         partition information from here to kern/disk.c.
16147         (pupa_cmdline_run): Don't check if the function exists anymore.
16148         * normal/main.c: Include <pupa/env.h>.
16149         (pupa_rescue_cmd_normal): Use the environment variable `prefix'
16150         instead of using pupa_dl_get_prefix to get the prefix.
16151         * term/i386/pc/vga.c: Include <pupa/arg.h>.
16152         (check_vga_mem): Cast pointers to `void *' to silence a gcc
16153         warning.
16154         (pupa_vga_putchar) [! DEBUG_VGA]: Removed for this case.
16155         (pupa_vga_setcolor): Declare unused variables with `__attribute__
16156         ((unused))' to silence a gcc warning.
16157         (pupa_vga_setcolor): Likewise.
16158         (debug_command): Changed to match argument parsing
16159         interface changes.
16160         * util/pupa-emu.c: Include <pupa/env.h>.
16161         (options): Added 0's for unused fields to silence a gcc warning.
16162         (argp): Likewise.
16163         (main): Use the environment variable `prefix' instead of using
16164         pupa_dl_set_prefix to set the prefix.  Initialize the commands ls,
16165         boot, cmp, cat and terminal.  Finish the commands boot, cmp, cat
16166         and terminal.
16168         * util/i386/pc/getroot.c: Include <pupa/i386/pc/util/biosdisk.h>.
16169         * util/misc.c: Include <malloc.h>.
16170         (pupa_malloc): Rewritten so errors are correctly reported.
16171         (pupa_realloc): Likewise.
16172         (pupa_memalign): Likewise.
16173         (pupa_mm_init_region): Declare unused variables with
16174         `__attribute__ ((unused))' to silence a gcc warning.
16175         * normal/i386/setjmp.S: Remove tab at the end of the file to
16176         silence a gcc warning.
16177         * loader/i386/pc/linux.c (pupa_rescue_cmd_initrd): Declare unused
16178         variables with `__attribute__ ((unused))' to silence a gcc
16179         warning.
16180         * loader/i386/pc/multiboot.c (pupa_multiboot_unload): Make the
16181         local variable i unsigned to silence a gcc warning.
16183         * kern/term.c: Include <pupa/misc.h>.
16184         (pupa_more_lines): New variable.
16185         (pupa_more): Likewise.
16186         (pupa_putcode): When the pager is active pause at the end of every
16187         screen.
16188         (pupa_set_more): New function.
16189         * include/pupa/term.h (pupa_set_more): New prototype.
16192 2004-03-07  Yoshinori K. Okuji  <okuji@enbug.org>
16194         Now this project is GRUB 2 rather than PUPA. The location of
16195         the CVS repository was moved to GRUB's.
16197         * configure.ac: Use bug-grub as the reporting address.
16198         Use GRUB instead of PUPA.
16199         Change the version number to 1.90.
16201 2004-02-24  Yoshinori K. Okuji  <okuji@enbug.org>
16203         * genkernsyms.sh: Updated copyright information.
16204         * genmk.rb: Likewise.
16205         * genmodsrc.sh: Likewise.
16206         * gensymlist.sh: Likewise.
16207         * boot/i386/pc/boot.S: Likewise.
16208         * boot/i386/pc/diskboot.S: Likewise.
16209         * disk/i386/pc/biosdisk.c: Likewise.
16210         * disk/i386/pc/partition.c: Likewise.
16211         * font/manager.c: Likewise.
16212         * fs/ext2.c: Likewise.
16213         * fs/fat.c: Likewise.
16214         * include/pupa/boot.h: Likewise.
16215         * include/pupa/device.h: Likewise.
16216         * include/pupa/disk.h: Likewise.
16217         * include/pupa/dl.h: Likewise.
16218         * include/pupa/elf.h: Likewise.
16219         * include/pupa/err.h: Likewise.
16220         * include/pupa/file.h: Likewise.
16221         * include/pupa/font.h: Likewise.
16222         * include/pupa/fs.h: Likewise.
16223         * include/pupa/kernel.h: Likewise.
16224         * include/pupa/loader.h: Likewise.
16225         * include/pupa/misc.h: Likewise.
16226         * include/pupa/mm.h: Likewise.
16227         * include/pupa/net.h: Likewise.
16228         * include/pupa/normal.h: Likewise.
16229         * include/pupa/rescue.h: Likewise.
16230         * include/pupa/setjmp.h: Likewise.
16231         * include/pupa/symbol.h: Likewise.
16232         * include/pupa/term.h: Likewise.
16233         * include/pupa/types.h: Likewise.
16234         * include/pupa/i386/setjmp.h: Likewise.
16235         * include/pupa/i386/types.h: Likewise.
16236         * include/pupa/i386/pc/biosdisk.h: Likewise.
16237         * include/pupa/i386/pc/boot.h: Likewise.
16238         * include/pupa/i386/pc/console.h: Likewise.
16239         * include/pupa/i386/pc/init.h: Likewise.
16240         * include/pupa/i386/pc/kernel.h: Likewise.
16241         * include/pupa/i386/pc/linux.h: Likewise.
16242         * include/pupa/i386/pc/loader.h: Likewise.
16243         * include/pupa/i386/pc/memory.h: Likewise.
16244         * include/pupa/i386/pc/multiboot.h: Likewise.
16245         * include/pupa/i386/pc/partition.h: Likewise.
16246         * include/pupa/i386/pc/time.h: Likewise.
16247         * include/pupa/i386/pc/vga.h: Likewise.
16248         * include/pupa/i386/pc/util/biosdisk.h: Likewise.
16249         * include/pupa/util/getroot.h: Likewise.
16250         * include/pupa/util/misc.h: Likewise.
16251         * include/pupa/util/resolve.h: Likewise.
16252         * kern/device.c: Likewise.
16253         * kern/disk.c: Likewise.
16254         * kern/dl.c: Likewise.
16255         * kern/err.c: Likewise.
16256         * kern/file.c: Likewise.
16257         * kern/fs.c: Likewise.
16258         * kern/loader.c: Likewise.
16259         * kern/main.c: Likewise.
16260         * kern/misc.c: Likewise.
16261         * kern/mm.c: Likewise.
16262         * kern/rescue.c: Likewise.
16263         * kern/term.c: Likewise.
16264         * kern/i386/dl.c: Likewise.
16265         * kern/i386/pc/init.c: Likewise.
16266         * kern/i386/pc/lzo1x.S: Likewise.
16267         * kern/i386/pc/startup.S: Likewise.
16268         * loader/i386/pc/chainloader.c: Likewise.
16269         * loader/i386/pc/linux.c: Likewise.
16270         * loader/i386/pc/multiboot.c: Likewise.
16271         * normal/cmdline.c: Likewise.
16272         * normal/command.c: Likewise.
16273         * normal/main.c: Likewise.
16274         * normal/menu.c: Likewise.
16275         * normal/i386/setjmp.S: Likewise.
16276         * term/i386/pc/console.c: Likewise.
16277         * term/i386/pc/vga.c: Likewise.
16278         * util/console.c: Likewise.
16279         * util/genmoddep.c: Likewise.
16280         * util/misc.c: Likewise.
16281         * util/pupa-emu.c: Likewise.
16282         * util/resolve.c: Likewise.
16283         * util/unifont2pff.rb: Likewise.
16284         * util/i386/pc/biosdisk.c: Likewise.
16285         * util/i386/pc/getroot.c: Likewise.
16286         * util/i386/pc/pupa-mkimage.c: Likewise.
16287         * util/i386/pc/pupa-setup.c: Likewise.
16289 2004-02-15  Jeroen Dekkers  <jeroen@dekkers.cx>
16291         * fs/ext2.c (pupa_ext2_read_file): Correct the value of BLOCKEND
16292         when it is EXT2_BLOCK_SIZE (data).  New argument READ_HOOK, all
16293         callers changed.  Set DATA->DISK->READ_HOOK to READ_HOOK before
16294         reading and reset it after reading.
16295         (pupa_ext2_close): Return PUPA_ERR_NONE.
16297         * include/pupa/i386/pc/linux.h (PUPA_LINUX_INITRD_MAX_ADDRESS):
16298         Correct value.
16299         (struct linux_kernel_header): Add kernel_version and
16300         initrd_addr_max.
16301         * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Check whether
16302         pupa_file_read succeeds.
16303         (pupa_rescue_cmd_initrd): Implement.
16305 2003-12-03  Marco Gerards  <metgerards@student.han.nl>
16307         * fs/ext2.c (pupa_ext2_label): New function.
16308         (pupa_ext2_fs): Added label.
16309         * fs/fat.c (pupa_fat_label): New function.
16310         (pupa_fat_fs): Added label.
16311         * include/pupa/fs.h (struct pupa_fs): Added prototype label.
16313         * kern/misc.c (pupa_strndup): New function.
16314         * include/pupa/misc.h (pupa_strndup): New prototype.
16316         * include/pupa/normal.h: Include <pupa/err.h>.
16317         (pupa_set_history): New prototype.
16318         (pupa_iterate_commands): New prototype.
16319         * normal/cmdline.c: Include <pupa/machine/partition.h>,
16320         <pupa/disk.h>, <pupa/file.h>.
16321         (hist_size): New variable.
16322         (hist_lines): Likewise.
16323         (hist_end): Likewise.
16324         (hist_used): Likewise.
16325         (pupa_set_history): New function.
16326         (pupa_history_get): Likewise.
16327         (pupa_history_add): Likewise.
16328         (pupa_history_replace): Likewise.
16329         (pupa_tab_complete): Likewise.
16330         (pupa_cmdline_run): Added tab completion and history buffer.  Tab
16331         completion shows partitionnames while completing partitions, this
16332         feature was suggested by Jeff Bailey.
16333         * normal/command.c (pupa_iterate_commands): New function.
16334         * normal/main.c (PUPA_DEFAULT_HISTORY_SIZE): New macro.
16335         (pupa_normal_init): Initialize history buffer.
16336         (PUPA_MOD_INIT): Likewise.
16337         (pupa_normal_fini): Free the history buffer.
16338         (PUPA_MOD_FINI): Likewise.
16340         * util/console.c (pupa_ncurses_getkey): Accept 127 as backspace
16341         key.
16343         * aclocal.m4 (pupa_I386_CHECK_REGPARM_BUG): New DEFUN.
16344         * configure.ac [i386]: Check for regparam bug.
16345         (NESTED_FUNC_ATTR) [! i386]: Defined.
16347 2003-11-17  Marco Gerards  <metgerards@student.han.nl>
16349         * conf/i386-pc.rmk (sbin_UTILITIES): Added pupa-emu.
16350         (pupa_setup_SOURCES): Added util/i386/pc/getroot.c.
16351         (pupa_emu_SOURCES): New variable.
16352         (pupa_emu_LDFLAGS): Likewise.
16353         * include/pupa/fs.h (pupa_ext2_init) [PUPA_UTIL]: New prototype.
16354         (pupa_ext2_fini) [PUPA_UTIL]: Likewise.
16355         * include/pupa/normal.h (pupa_normal_init) [PUPA_UTIL]: Likewise.
16356         (pupa_normal_fini) [PUPA_UTIL]: Likewise.
16357         * include/pupa/setjmp.h [PUPA_UTIL]: Include <setjmp.h>.
16358         (pupa_jmp_buf): New typedef.
16359         (pupa_setjmp) [PUPA_UTIL]: New macro.
16360         (pupa_longjmp) [PUPA_UTIL]: Likewise.
16361         * include/pupa/term.h (struct pupa_term): New member `refresh'.
16362         (pupa_refresh): New prototype.
16363         * include/pupa/util/getroot.h: New file.
16364         * kern/misc.c (pupa_vsprintf): Refresh the screen after updating
16365         it.
16366         * kern/rescue.c (pupa_rescue_get_command_line): Likewise.
16367         (pupa_rescue_cmd_cat): Likewise.
16368         (pupa_rescue_cmd_ls): Likewise.
16369         (pupa_rescue_cmd_testload): Likewise.
16370         (pupa_rescue_cmd_lsmod): Likewise.
16371         * normal/cmdline.c (pupa_cmdline_get): Likewise.
16372         * normal/menu.c (run_menu): Likewise.
16373         * kern/term.c (pupa_cls): Likewise.
16374         (pupa_refresh): New function.
16375         * normal/normal.c (pupa_normal_init) [PUPA_UTIL]: New function.
16376         (pupa_normal_fini) [PUPA_UTIL]: Likewise.
16377         * util/console.c: New file.
16379         * util/i386/pc/getroot.c: New file.
16380         * util/i386/pc/pupa-setup.c: Include <pupa/util/getroot.h>.
16381         (pupa_putchar): New function.
16382         (pupa_refresh): Likewise.
16383         (xgetcwd): Function moved to ...
16384         (strip_extra_slashes): Likewise.
16385         (get_prefix): Likewise.
16386         * util/i386/pc/getroot.c: ... here.
16387         (find_root_device): Function moved and renamed to...
16388         * util/i386/pc/getroot.c (pupa_find_root_device): ... here.
16389         Changed all callers.
16390         * util/i386/pc/pupa-setup.c (guess_root_device): Function moved
16391         and renamed to...
16392         * util/i386/pc/getroot.c (pupa_guess_root_device): ... here.
16393         Changed all callers.
16394         * util/misc.c (pupa_memalign): New function.
16395         (pupa_mm_init_region): Likewise.
16396         (pupa_register_exported_symbols): Likewise.
16397         (pupa_putchar): Function removed.
16398         * util/pupa-emu.c: New file.
16400 2003-11-16  Jeroen Dekkers  <jeroen@dekkers.cx>
16402         * conf/i386-pc.rmk (pkgdata_MODULES): Add _multiboot.mod.
16403         (_multiboot_mod_SOURCES): New variable.
16404         (_multiboot_mod_CFLAGS): Likewise.
16405         * loader/i386/pc/multiboot.c: New file.
16406         * include/pupa/i386/pc/multiboot.h: Likewise.
16407         * kern/i386/pc/startup.S: Include pupa/machine/multiboot.h.
16408         (pupa_multiboot_real_boot): New function.
16409         * include/pupa/i386/pc/loader.h: Include pupa/machine/multiboot.h.
16410         (pupa_multiboot_real_boot): New prototype.
16411         (pupa_rescue_cmd_multiboot): Likewise
16412         (pupa_rescue_cmd_module): Likewise.
16414         * kern/loader.c (pupa_loader_set): Continue when
16415         pupa_loader_unload_func() fails.
16416         (pupa_loader_unset): New function.
16417         * include/pupa/loader.h (pupa_loader_unset): New prototype.
16419         * kern/misc.c (pupa_stpcpy): New function.
16420         * include/pupa/misc.h (pupa_stpcpy): New prototype.
16422 2003-11-12  Marco Gerards  <metgerards@student.han.nl>
16424         * disk/i386/pc/biosdisk.c (pupa_biosdisk_open): Correctly check
16425         for available extensions.
16427         * include/pupa/i386/pc/time.h: New file.
16428         * kern/disk.c: Include <pupa/machine/time.h>.
16429         (PUPA_CACHE_TIMEOUT): New macro.
16430         (pupa_last_time): New variable.
16431         (pupa_disk_open): Flush the cache when there was a timeout.
16432         (pupa_disk_close): Reset the timer.
16433         * kern/i386/pc/startup.S (pupa_get_rtc): Renamed from
16434         pupa_currticks.
16435         * util/misc.c: Include <sys/times.h>
16436         (pupa_get_rtc): New function.
16438 2003-11-09  Jeroen Dekkers  <jeroen@dekkers.cx>
16440         * fs/ext2.c (struct pupa_ext2_inode): Declare struct datablocks
16441         as blocks.
16442         (pupa_ext2_get_file_block): Use blocks member.
16444         * fs/ext2.c (pupa_ext2_read_file): Only set skipfirst for the
16445         first block. Return -1 instead of pupa_errno on error.
16447 2003-10-27  Marco Gerards  <metgerards@student.han.nl>
16449         * README: In the pupa-mkimage example use _chain instead of chain
16450         and ext2 instead of fat.
16451         * TODO: Replace ext2fs with jfs as an example.  Add an item for
16452         adding journal playback for ext2fs.
16453         * conf/i386-pc.rmk (pupa_setup_SOURCES): Added fs/ext2.c.
16454         (pkgdata_MODULES): Added ext2.mod.
16455         (ext2_mod_SOURCES): New variable.
16456         (ext2_mod_CFLAGS): Likewise.
16457         * include/pupa/err.h (pupa_err_t): Added PUPA_ERR_SYMLINK_LOOP.
16458         * include/pupa/misc.h (pupa_strncpy): New prototype.
16459         (pupa_strcat): Likewise.
16460         (pupa_strncmp): Likewise.
16461         * kern/misc.c (pupa_strcat): Enable function.
16462         (pupa_strncpy): New function.
16463         (pupa_strncmp): Likewise.
16464         * fs/ext2.c: New file.
16466         * kern/disk.c (pupa_disk_read): Set pupa_errno to PUPA_ERR_NONE
16467         when the read failed before retrying.
16468         * util/i386/pc/biosdisk.c (_LARGEFILE_SOURCE): Removed.
16469         (_FILE_OFFSET_BITS): Likewise.
16470         * configure.ac: Added AC_SYS_LARGEFILE.
16472 2003-09-25  Yoshinori K. Okuji  <okuji@enbug.org>
16474         * genmk.rb (PModule#rule): Make sure to get only symbol names
16475         from the output of nm.
16476         Reported by Robert Millan <zeratul2@wanadoo.es>.
16478 2003-09-25  Yoshinori K. Okuji  <okuji@enbug.org>
16480         I forgot to check in these changes for a long time. This adds
16481         incomplete support for VGA console, and this is still very
16482         buggy. Also, a lot of consideration is required for I18N,
16483         UNICODE, and VGA font issues. Therefore, assume that this is
16484         such that "better than nothing".
16486         * font/manager.c: New file.
16487         * include/pupa/font.h: Likewise.
16488         * include/pupa/i386/pc/vga.h: Likewise.
16489         * term/i386/pc/vga.c: Likewise.
16490         * util/unifont2pff.rb: Likewise.
16492         * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vga.h.
16493         (pkgdata_MODULES): Added vga.mod and font.mod.
16494         (vga_mod_SOURCES): New variables.
16495         (vga_mod_CFLAGS): Likewise.
16496         (font_mod_SOURCES): Likewise.
16497         (font_mod_CFLAGS): Likewise.
16499         * include/pupa/err.h (PUPA_ERR_BAD_FONT): New constant.
16501         * include/pupa/term.h: Include pupa/err.h.
16502         (struct pupa_term): Added init and fini.
16503         Changed the argument of putchar to pupa_uint32_t.
16505         * include/pupa/i386/pc/console.h: Include pupa/symbol.h.
16506         (pupa_console_real_putchar): New prototype.
16507         (pupa_console_putchar): Removed.
16508         (pupa_console_checkkey): Exported.
16509         (pupa_console_getkey): Likewise.
16511         * kern/misc.c (pupa_vsprintf): Add support for UNICODE
16512         characters.
16514         * kern/term.c (pupa_term_set_current): Rewritten.
16515         (pupa_putchar): Likewise.
16516         (pupa_putcode): New function.
16518         * kern/i386/pc/startup.S (pupa_console_putchar): Renamed to ...
16519         (pupa_console_real_putchar): ... this.
16520         (pupa_vga_set_mode): New function.
16521         (pupa_vga_get_font): Likewise.
16523         * normal/command.c: Include pupa/term.h.
16524         (terminal_command): New function.
16525         (pupa_command_init): Register the command "terminal".
16527         * normal/menu.c (DISP_LEFT): Changed to a UNICODE value.
16528         (DISP_UP): Likewise.
16529         (DISP_RIGHT): Likewise.
16530         (DISP_DOWN): Likewise.
16531         (DISP_HLINE): Likewise.
16532         (DISP_VLINE): Likewise.
16533         (DISP_UL): Likewise.
16534         (DISP_UR): Likewise.
16535         (DISP_LL): Likewise.
16536         (DISP_LR): Likewise.
16538         * term/i386/pc/console.c (pupa_console_putchar): New function.
16540 2003-02-08  NIIBE Yutaka  <gniibe@m17n.org>
16542         * util/resolve.c (pupa_util_resolve_dependencies): BUG
16543         FIX. Reverse the path_list.
16545         * include/pupa/normal.h: Export pupa_register_command and
16546         pupa_unregister_command.
16548         * hello/hello.c (pupa_cmd_hello): New module.
16549         * conf/i386-pc.rmk: Added hello.mod.
16551 2003-01-31  Yoshinori K. Okuji  <okuji@enbug.org>
16553         * kern/i386/pc/lzo1x.S: New file.
16555         * util/i386/pc/pupa-mkimage.c: Include lzo1x.h.
16556         (compress_kernel): New variable.
16557         (generate_image): Heavily modified to support compressing a
16558         large part of the core image.
16560         * util/misc.c (pupa_util_read_image): Fix a file descriptor
16561         leak.
16562         (pupa_util_load_image): New function.
16564         * kern/i386/pc/startup.S: Include pupa/machine/kernel.h.
16565         (pupa_compressed_size): New variable.
16566         (codestart): Enable Gate A20 here.
16567         Decompress the compressed part of the core image.
16568         Rearrange the code to put functions and variables which are
16569         required for initialization in the non-compressed part.
16570         Include lzo1x.S.
16572         * kern/i386/pc/init.c (pupa_machine_init): Don't enable Gate A20
16573         here.
16575         * include/pupa/util/misc.h (pupa_util_write_image): Declared.
16577         * include/pupa/i386/pc/kernel.h
16578         (PUPA_KERNEL_MACHINE_COMPRESSED_SIZE): New macro.
16579         (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): Increased by 4.
16580         (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
16581         (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
16582         (PUPA_KERNEL_MACHINE_RAW_SIZE): New macro.
16584         * conf/i386-pc.rmk (pupa_mkimage_LDFLAGS): New variable.
16586         * genmk.rb (Image#rule): Put LDFLAGS at the end of a line.
16587         (Utility#rule): Likewise.
16589         * configure.ac: Check if LZO is available.
16591 2003-01-20  Yoshinori K. Okuji  <okuji@enbug.org>
16593         * include/pupa/normal.h: New file.
16594         * include/pupa/setjmp.h: Likewise.
16595         * include/pupa/i386/setjmp.h: Likewise.
16596         * normal/cmdline.c: Likewise.
16597         * normal/command.c: Likewise.
16598         * normal/main.c: Likewise.
16599         * normal/menu.c: Likewise.
16600         * normal/i386/setjmp.S: Likewise.
16602         * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Made global.
16603         (pupa_rescue_cmd_initrd): Likewise.
16605         * loader/i386/pc/chainloader.c (pupa_rescue_cmd_chainloader):
16606         Likewise.
16608         * kern/i386/pc/startup.S (translation_table): New variable.
16609         (translate_keycode): New function.
16610         (pupa_console_getkey): Call translate_keycode.
16612         * kern/rescue.c (attempt_normal_mode): New function.
16613         (pupa_enter_rescue_mode): Attempt to execute the normal mode. If
16614         it failed, print a message.
16616         * kern/mm.c (pupa_real_malloc): Print more information when a
16617         free magic is broken.
16618         (pupa_free): If the first free header is not free actually, set
16619         it to P.
16621         * kern/main.c (pupa_load_normal_mode): Just load the module
16622         "normal".
16623         (pupa_main): Don't print the message
16624         "Entering into rescue mode..." here.
16626         * include/pupa/i386/pc/loader.h (pupa_rescue_cmd_initrd):
16627         Declared.
16628         (pupa_rescue_cmd_initrd): Likewise.
16629         (pupa_rescue_cmd_initrd): Likewise.
16631         * include/pupa/symbol.h (FUNCTION): Specify the type.
16632         (VARIABLE): Likewise.
16634         * include/pupa/err.h (pupa_err_t): Added
16635         PUPA_ERR_UNKNOWN_COMMAND.
16637         * include/pupa/dl.h (pupa_dl_set_prefix): Exported.
16638         (pupa_dl_get_prefix): Likewise.
16640         * conf/i386-pc.rmk (pkgdata_MODULES): Added normal.mod.
16641         Added _chain.mod and _linux.mod instead of chain.mod and
16642         linux.mod.
16643         (chain_mod_SOURCES): Renamed to ...
16644         (_chain_mod_SOURCES): ... this.
16645         (chain_mod_CFLAGS): Renamed to ...
16646         (_chain_mod_CFLAGS): ... this.
16647         (linux_mod_SOURCES): Renamed to ...
16648         (_linux_mod_SOURCES): ... this.
16649         (linux_mod_CFLAGS): Renamed to ...
16650         (_linux_mod_CFLAGS): ... this.
16651         (normal_mod_SOURCES): New variable.
16652         (normal_mod_CFLAGS): Likewise.
16653         (normal_mod_ASFLAGS): Likewise.
16655 2003-01-18  Yoshinori K. Okuji  <okuji@enbug.org>
16657         * kern/rescue.c (pupa_rescue_cmd_rmmod): Call pupa_dl_unload, if
16658         possible.
16660         * kern/dl.c (pupa_dl_ref): Refer depending modules
16661         recursively.
16662         (pupa_dl_unref): Unrefer depending modules recursively.
16663         Don't call pupa_dl_unload implicitly, because PUPA can crash if
16664         a module is unloaded before one depending on that module is
16665         unloaded.
16666         (pupa_dl_unload): Unload depending modules explicitly,
16667         if possible.
16669 2003-01-17  Yoshinori K. Okuji  <okuji@enbug.org>
16671         * include/pupa/i386/pc/linux.h: New file.
16672         * loader/i386/pc/linux.c: Likewise.
16674         * loader/i386/pc/chainloader.c (pupa_chainloader_boot_sector):
16675         Removed.
16676         (pupa_chainloader_unload): Return PUPA_ERR_NONE.
16677         (pupa_rescue_cmd_chainloader): Read the image to 0x7C00 instead
16678         of PUPA_CHAINLOADER_BOOT_SECTOR.
16680         * kern/i386/pc/startup.S: Include pupa/machine/linux.h.
16681         (pupa_linux_prot_size): New variable.
16682         (pupa_linux_tmp_addr): Likewise.
16683         (pupa_linux_real_addr): Likewise.
16684         (pupa_linux_boot_zimage): New function.
16685         (pupa_linux_boot_bzimage): Likewise.
16687         * kern/i386/pc/init.c (struct mem_region): New structure.
16688         (MAX_REGIONS): New macro.
16689         (mem_regions): New variable.
16690         (num_regions): Likewise.
16691         (pupa_os_area_addr): Likewise.
16692         (pupa_os_area_size): Likewise.
16693         (pupa_lower_mem): Likewise.
16694         (pupa_upper_mem): Likewise.
16695         (add_mem_region): New function.
16696         (compact_mem_regions): Likewise.
16697         (pupa_machine_init): Set PUPA_LOWER_MEM and PUPA_UPPER_MEM to
16698         the size of the conventional memory and that of so-called upper
16699         memory (before the first memory hole).
16700         Instead of adding each found region to free memory, use
16701         add_mem_region and add them after removing overlaps.
16702         Also, add only 1/4 of the upper memory to free memory. The rest
16703         is used for loading OS images. Maybe this is ad hoc, but this
16704         makes it much easier to relocate OS images when booting.
16706         * kern/rescue.c (pupa_rescue_cmd_module): Removed.
16707         (pupa_enter_rescue_mode): Don't register initrd and module.
16709         * kern/mm.c: Include pupa/dl.h.
16711         * kern/main.c: Include pupa/file.h and pupa/device.h.
16713         * kern/loader.c (pupa_loader_load_module_func): Removed.
16714         (pupa_loader_load_module): Likewise.
16716         * kern/dl.c (pupa_dl_load): Use the suffix ``.mod'' instead of
16717         ``.o''.
16719         * include/pupa/i386/pc/loader.h (pupa_linux_prot_size): Declared.
16720         (pupa_linux_tmp_addr): Likewise.
16721         (pupa_linux_real_addr): Likewise.
16722         (pupa_linux_boot_zimage): Likewise.
16723         (pupa_linux_boot_bzimage): Likewise.
16725         * include/pupa/i386/pc/init.h (pupa_lower_mem): Declared.
16726         (pupa_upper_mem): Likewise.
16727         (pupa_gate_a20): Don't export, because turning off Gate A20 in a
16728         module is too dangerous.
16730         * include/pupa/loader.h (pupa_os_area_addr): Declared.
16731         (pupa_os_area_size): Likewise.
16732         (pupa_loader_set): Remove the first argument. Loader doesn't
16733         manage modules or initrd any longer.
16734         (pupa_loader_load_module): Removed.
16736         * conf/i386-pc.rmk (pkgdata_MODULES): Added linux.mod.
16737         (linux_mod_SOURCES): New variable.
16738         (linux_mod_CFLAGS): Likewise.
16740 2003-01-07  Yoshinori K. Okuji  <okuji@enbug.org>
16742         * util/i386/pc/pupa-setup.c (setup): Convert the endianness of
16743         the length of a blocklist correctly.
16745         * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open) [__linux__]:
16746         Use ioctl only if the OS file is a block device.
16747         (pupa_util_biosdisk_open): Don't use ST.ST_BLOCKS, because it is
16748         not very useful for normal files.
16750         * kern/main.c (pupa_set_root_dev): New function.
16751         (pupa_load_normal_mode): Likewise.
16752         (pupa_main): Call those above.
16754         * include/pupa/types.h (pupa_swap_bytes16): Cast the result to
16755         pupa_uint16_t.
16757         * include/pupa/kernel.h (pupa_enter_normal_mode): Removed.
16759 2003-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
16761         * util/i386/pc/pupa-setup.c: Include pupa/machine/kernel.h.
16762         (setup): Configure the installed partition information and the
16763         dl prefix.
16765         * loader/i386/pc/chainloader.c (my_mod): New variable.
16766         (pupa_chainloader_unload): New function.
16767         (pupa_rescue_cmd_chainloader): Refer itself.
16768         (PUPA_MOD_INIT): Save its own module in MY_MOD.
16770         * kern/i386/pc/startup.S (install_partition): Removed.
16771         (version_string): Likewise.
16772         (config_file): Likewise.
16773         (pupa_install_dos_part): New variable.
16774         (pupa_install_bsd_part): Likewise.
16775         (pupa_prefix): Likewise.
16776         (pupa_chainloader_real_boot): Call pupa_dl_unload_all.
16778         * kern/i386/pc/init.c: Include pupa/machine/kernel.h, pupa/dl.h
16779         and pupa/misc.h.
16780         (make_install_device): New function.
16781         (pupa_machine_init): Set the dl prefix.
16783         * kern/rescue.c: Include pupa/rescue.h and pupa/dl.h.
16784         (buf): Renamed to ...
16785         (linebuf): ... this.
16786         (pupa_rescue_cmd_prefix): New function.
16787         (pupa_rescue_cmd_insmod): Likewise.
16788         (pupa_rescue_cmd_rmmod): Likewise.
16789         (pupa_rescue_cmd_lsmod): Likewise.
16790         (pupa_enter_rescue_mode): Register new commands: prefix, insmod,
16791         rmmod and lsmod.
16793         * kern/mm.c (pupa_memalign): If failed even after invalidating
16794         disk caches, unload unneeded modules and retry.
16796         * kern/misc.c (pupa_memmove): New function.
16797         (pupa_memcpy): Removed.
16798         (pupa_strcpy): New function.
16799         (pupa_itoa): Made static.
16801         * kern/dl.c (pupa_dl_iterate): New function.
16802         (pupa_dl_ref): Likewise.
16803         (pupa_dl_unref): Likewise.
16804         (pupa_dl_unload): Return if succeeded or not.
16805         (pupa_dl_unload_unneeded): New function.
16806         (pupa_dl_unload_all): Likewise.
16807         (pupa_dl_init): Renamed to ...
16808         (pupa_dl_set_prefix): ... this.
16809         (pupa_dl_get_prefix): New function.
16811         * include/pupa/i386/pc/kernel.h: Include pupa/types.h.
16812         (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): New macro.
16813         (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
16814         (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
16815         (pupa_install_dos_part): Declared.
16816         (pupa_install_bsd_part): Likewise.
16817         (pupa_prefix): Likewise.
16818         (pupa_boot_drive): Likewise.
16820         * include/pupa/types.h: Fix a typo.
16822         * include/pupa/misc.h (pupa_memcpy): New macro. Just an alias to
16823         pupa_memmove.
16824         (pupa_memmove): Declared.
16825         (pupa_strcpy): Likewise.
16827         * include/pupa/dl.h (PUPA_MOD_INIT): Change the prototype. Now
16828         pupa_mod_init takes one argument, its own module.
16829         (pupa_dl_unload_unneeded): Declared.
16830         (pupa_dl_unload_all): Likewise.
16831         (pupa_dl_ref): Likewise.
16832         (pupa_dl_unref): Likewise.
16833         (pupa_dl_iterate): Likewise.
16834         (pupa_dl_init): Renamed to ...
16835         (pupa_dl_set_prefix): ... this.
16836         (pupa_dl_get_prefix): Declared.
16838         * fs/fat.c [!PUPA_UTIL] (my_mod): New variable.
16839         (pupa_fat_dir) [!PUPA_UTIL]: Prevent the fat module from being
16840         unloaded.
16841         (pupa_fat_open) [!PUPA_UTIL]: Refer itself if succeeded.
16842         (pupa_fat_close) [!PUPA_UTIL]: Unrefer itself.
16844         * configure.ac (tmp_CFLAGS): Added -Wshadow, -Wpointer-arith,
16845         -Wmissing-prototypes, -Wundef and -Wstrict-prototypes.
16847 2003-01-03  Yoshinori K. Okuji  <okuji@enbug.org>
16849         * util/i386/pc/pupa-setup.c (setup): Define the internal
16850         function find_first_partition_start at the top level, because GCC
16851         3.0.x cannot compile internal functions in deeper scopes
16852         correctly.
16853         (find_root_device): Use lstat instead of stat.
16854         Don't follow symbolic links.
16855         Fix the path-constructing code.
16857         * util/i386/pc/biosdisk.c [__linux__] (BLKFLSBUF): New macro.
16858         (pupa_util_biosdisk_open) [__linux__]: Get the size of a device
16859         by a BLKGETSIZE ioctl first, because block devices don't fill
16860         the member st_mode of the structure stat on Linux.
16861         [__linux__] (linux_find_partition): Use a temporary buffer
16862         REAL_DEV for the working space. Copy it to DEV before returning.
16863         (open_device) [__linux__]: Call ioctl with BLKFLSBUF to make the
16864         buffer cache consistent.
16865         (get_os_disk) [__linux__]: Use the length 5 instead of 4 for
16866         strncmp. The previous value was merely wrong.
16867         (pupa_util_biosdisk_get_pupa_dev): Use stat instead of lstat.
16869         * fs/fat.c (pupa_fat_read_data): Shift 4 instead of 12 when the
16870         FAT size is 12. The previous value was merely wrong.
16872         * kern/main.c (pupa_main): Don't split the starting message from
16873         newlines.
16875         * kern/term.c (pupa_putchar): Put CR after LF instead of before
16876         LF, because BIOS goes crazy about character attributes in this
16877         case.
16879 2003-01-03  Yoshinori K. Okuji  <okuji@enbug.org>
16881         * include/i386/pc/util/biosdisk.h: New file.
16882         * util/i386/pc/biosdisk.c: Likewise.
16883         * util/i386/pc/pupa-setup.c: Likewise.
16885         * Makefile.in (INCLUDE_DISTFILES): Added
16886         include/pupa/i386/pc/util/biosdisk.h.
16887         (UTIL_DISTFILES): Added biosdisk.c and pupa-setup.c under the
16888         directory util/i386/pc.
16889         (install-local): Added a rule for sbin_UTILITIES.
16890         (uninstall): Likewise.
16892         * util/i386/pc/pupa-mkimage.c (usage): Fix a typo in the doc.
16894         * util/misc.c (xrealloc): New function.
16895         (pupa_malloc): Likewise.
16896         (pupa_free): Likewise.
16897         (pupa_realloc): Likewise.
16898         (pupa_stop): Likewise.
16899         (pupa_putchar): Likewise.
16901         * kern/disk.c (pupa_disk_read): Prevent L from underflowing.
16903         * include/pupa/util/misc.h (xrealloc): Declared.
16905         * include/pupa/i386/pc/boot.h (PUPA_BOOT_MACHINE_BPB_START): New
16906         macro.
16907         (PUPA_BOOT_MACHINE_BPBEND): Renamed to ...
16908         (PUPA_BOOT_MACHINE_BPB_END): ... this.
16910         * include/pupa/fs.h [PUPA_UTIL] (pupa_fat_init): Declared.
16911         [PUPA_UTIL] (pupa_fat_fini): Likewise.
16913         * fs/fat.c [PUPA_UTIL] (pupa_fat_init): Defined. Maybe a better
16914         way should be implemented.
16915         [PUPA_UTIL] (pupa_fat_fini): Likewise.
16917         * disk/i386/pc/biosdisk.c (pupa_biosdisk_call_hook): Increase
16918         the size of NAME for safety.
16919         (pupa_biosdisk_iterate): Search hard disks to 0x90 instead of
16920         0x88.
16922         * conf/i386-pc.rmk (sbin_UTILITIES): New variable.
16923         (pupa_setup_SOURCES): Likewise.
16925         * genmk.rb (Utility#rule): Add $(BUILD_CFLAGS) into the rules.
16927 2002-12-28  Yoshinori K. Okuji  <okuji@enbug.org>
16929         * kern/i386/pc/startup.S (push_get_mmap_entry): Revert to a
16930         bunch of pushl's from pusha, because this destroys the return
16931         value.
16933 2002-12-28  Yoshinori K. Okuji  <okuji@enbug.org>
16935         Use -mrtd and -mregparm=3 to reduce the generated code sizes.
16936         This means that any missing prototypes could be fatal. Also, you
16937         must take care when writing assembly code. See the comments at
16938         the beginning of startup.S, for more details.
16940         * kern/i386/pc/startup.S (pupa_halt): Modified for the new
16941         compilation mechanism.
16942         (pupa_chainloader_real_boot): Likewise.
16943         (pupa_biosdisk_rw_int13_extensions): Likewise.
16944         (pupa_biosdisk_rw_standard): Likewise.
16945         (pupa_biosdisk_check_int13_extensions): Likewise.
16946         (pupa_biosdisk_get_diskinfo_int13_extensions): Likewise.
16947         (pupa_biosdisk_get_diskinfo_standard): Likewise.
16948         (pupa_get_memsize): Likewise.
16949         (pupa_get_mmap_entry): Likewise.
16950         (pupa_console_putchar): Likewise.
16951         (pupa_console_setcursor): Likewise.
16952         (pupa_getrtsecs): Use pushl instead of push.
16954         * kern/i386/pc/init.c (pupa_machine_init): Use the scratch
16955         memory instead of the stack for a mmap entry, because some
16956         BIOSes may ignore the maximum size and overflow.
16958         * conf/i386-pc.rmk (COMMON_CFLAGS): Added -mrtd and -mregparm=3.
16960         * genmk.rb (PModule#rule): Compile automatically generated
16961         sources with module-specific CFLAGS as well as other sources.
16963 2002-12-27  Yoshinori K. Okuji  <okuji@enbug.org>
16965         * configure.ac: Check ld.
16966         Replace CFLAGS and CPPFLAGS with BUILD_CFLAGS and BUILD_CPPFLAGS
16967         respectively, before checking endianness and sizes.
16969         * Makefile.in (LD): New variable.
16971 2002-12-27  Yoshinori K. Okuji  <okuji@enbug.org>
16973         * Makefile.in (BUILD_CC): CC -> BUILD_CC.
16975 2002-12-27  Yoshinori K. Okuji  <okuji@enbug.org>
16977         * Changelog: New file.