2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
[grub2/phcoder/solaris.git] / ChangeLog
blob45e92c8cc5f4a708b4a6c959d0162bd519f52704
1 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
3         Avoid calling biosdisk in drivemap
5         * commands/i386/pc/drivemap.c (parse_biosdisk): remove
6         (revparse_biosdisk): likewise
7         (list_mappings): derive name from id directly
8         (grub_cmd_drivemap): use tryparse_diskstring
9         
10 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
12         Script fixes
14         * include/grub/script_sh.h (grub_script_cmdline): remove cmdline
15         (grub_lexer_param): add tokenonhold
16         (grub_script_create_cmdline): remove cmdline. All callers updated
17         (grub_script_function_create): make functionname
18         grub_script_arg. All callers updated
19         (grub_script_execute_argument_to_string): new prototype
20         * kern/parser.c (state_transitions): reorder
21         (grub_parser_cmdline_state): fix a bug and make more compact
22         * script/sh/execute.c (grub_script_execute_argument_to_string): 
23         make global
24         (grub_script_execute_cmdline): use new format
25         * script/sh/function.c (grub_script_function_create): make functionname
26         grub_script_arg. All callers updated
27         * script/sh/lexer.c (grub_script_lexer_init): initilaize tokenonhold
28         (grub_script_yylex): remove
29         (grub_script_yylex2): renamed to ...
30         (grub_script_yylex): ...renamed
31         parse the expressions like a${b}c
32         * script/sh/parser.y (GRUB_PARSER_TOKEN_ARG): new typed terminal
33         (GRUB_PARSER_TOKEN_VAR): remove
34         (GRUB_PARSER_TOKEN_NAME): likewise
35         ("if"): declare as typeless
36         ("while"): likewise
37         ("function"): likewise
38         ("else"): likewise
39         ("then"): likewise
40         ("fi"): likewise
41         (text): remove
42         (argument): likewise
43         (script): accept empty scripts and make exit on error
44         (arguments): use GRUB_PARSER_TOKEN_ARG
45         (function): likewise
46         (command): move error handling to script
47         (menuentry): move grub_script_lexer_ref before
48         * script/sh/script.c (grub_script_create_cmdline): remove cmdline 
49         argument. All callers updated
51 2009-06-04  Robert Millan  <rmh.grub@aybabtu.com>
53         Prevent GRUB from probing floppies during boot.
55         * conf/common.rmk (search_mod_CFLAGS): Use `-Werror -Wall'.
56         * commands/search.c (options): Add --no-floppy.
57         (search_fs, search_file, grub_cmd_search): Support --no-floppy.
58         * util/grub-mkconfig_lib.in (prepare_grub_to_access_device): Use
59         --no-floppy when searching for UUIDs.
61 2009-06-04  Robert Millan  <rmh.grub@aybabtu.com>
63         Simplify the code duplication in commands/search.c.
65         * commands/search.c (search_label, search_fs_uuid): Merge into ...
66         (search_fs): ... this.  Update all users.
68 2009-06-03  Felix Zielcke  <fzielcke@z-51.de>
70         * util/grub-mkconfig.in (update_grub_dir): Rename to grub_mkconfig_dir.
72 2009-05-28  Pavel Roskin  <proski@gnu.org>
74         * Makefile.in: Don't use "cp -d", it doesn't work on FreeBSD.
75         Remove the original symlink explicitly.
77         * fs/hfs.c (grub_hfs_find_dir): Skip sequences of slashes, not
78         just one slash.  That's how grub_fshelp_find_file() does it.
80 2009-05-26  Pavel Roskin  <proski@gnu.org>
82         * genmk.rb: Avoid shadowing variable `s', rename the outer `s'
83         to `str'.
85         * util/getroot.c (grub_util_get_dev_abstraction): Mark os_dev as
86         possibly unused.
88 2009-05-25  Christian Franke  <franke@computer.org>
90         * disk/ata.c (grub_ata_wait_not_busy): Add debug output of status
91         register.
92         (grub_atapi_identify): Add wait after drive select.
93         (grub_ata_identify): Do more strict status register check before
94         calling grub_atapi_identify ().  Suppress error message if status
95         register is 0x00 after command failure.  Add status register
96         check after PIO read to avoid bogus identify due to stuck DRQ.
97         Thanks to Pavel Roskin for testing.
98         (grub_device_initialize): Remove unsafe status register check.
99         Thanks to 'phcoder' for problem report and patch.
100         Prevent sign extension in debug message.
102 2009-05-23  Colin D Bennett  <colin@gibibit.com>
104         Cleaned up `include/grub/normal.h'.  Grouped prototypes by
105         definition file, and functions defined in `normal/menu.c' have had
106         their prototypes moved to `include/grub/menu.h' for consistency.
108         * include/grub/menu.h (grub_menu_execute_callback): Added; moved
109         from normal.h.
110         (grub_menu_get_entry): Likewise.
111         (grub_menu_get_timeout): Likewise.
112         (grub_menu_set_timeout): Likewise.
113         (grub_menu_execute_entry): Likewise.
114         (grub_menu_execute_with_fallback): Likewise.
115         (grub_menu_entry_run): Likewise.
117         * include/grub/normal.h: Re-ordered and grouped function
118         prototypes by file that the function is defined in.
119         (grub_menu_execute_callback): Removed; moved to menu.h.
120         (grub_menu_get_entry): Likewise.
121         (grub_menu_get_timeout): Likewise.
122         (grub_menu_set_timeout): Likewise.
123         (grub_menu_execute_entry): Likewise.
124         (grub_menu_execute_with_fallback): Likewise.
125         (grub_menu_entry_run): Likewise.
126         (grub_menu_addentry): Renamed from this ...
127         (grub_normal_add_menu_entry): ... to this.
129         * normal/main.c (grub_menu_addentry): Renamed from this ...
130         (grub_normal_add_menu_entry): ... to this.
132         * script/sh/execute.c (grub_script_execute_menuentry): Update
133         reference to renamed grub_menu_addentry function.
135 2009-05-23  Felix Zielcke  <fzielcke@z-51.de>
137         * commands/i386/pc/drivemap.c (MODNAME): Remove. Update all users.
139 2009-05-22  Pavel Roskin  <proski@gnu.org>
141         * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Remove.
142         * configure.ac: Don't call grub_I386_CHECK_REGPARM_BUG.  Define
143         NESTED_FUNC_ATTR using AH_BOTTOM.  Use regparm(1) only when
144         compiling for the i386 targets, but not for the utilities.
146         * include/grub/i386/pc/kernel.h (grub_boot_drive): Change type
147         to grub_uint8_t.
148         (grub_root_drive): Likewise.
149         * kern/i386/pc/startup.S (grub_boot_drive): Change size to byte,
150         remove alignment.
151         (grub_root_drive): Change size to byte.
152         (grub_start_addr): Remove.
153         (grub_end_addr): Likewise.
154         (grub_apm_bios_info): Likewise.
156 2009-05-21  Felix Zielcke  <fzielcke@z-51.de>
158         * normal/i386: Remove.
159         * normal/powerpc: Likewise.
160         * normal/sparc64: Likewise.
161         * normal/x86_64: Likewise.
163 2009-05-19  Vladimir Serbinenko  <phcoder@gmail.com>
165         * conf/x86_64-efi.rmk (linux_mod_ASFLAGS): Add missing variable
166         * loader/i386/linux_trampoline.S: Fix identation
167         * loader/i386/xnu_helper.S: Likewise
169 2009-05-18  Colin D Bennett  <colin@gibibit.com>
171         Display error messages when parsing a Lua statement fails.
172         Previously, executing a syntactically invalid statement like
173         ")foo" or "bar;" would silently fail.
175         * script/lua/grub_main.c (handle_lua_error): New function.
176         (grub_lua_parse_line): Improved reporting of Lua parser and
177         execution errors.
179 2009-05-17  Vladimir Serbinenko  <phcoder@gmail.com>
181         Remove -Werror which causes build to fail on some systems
183         * conf/i386-pc.rmk (xnu_mod_CFLAGS): Remove -Werror -Wall
184         * conf/i386-efi.rmk (xnu_mod_CFLAGS): Likewise
185         * conf/x86_64-efi.rmk (xnu_mod_CFLAGS): Likewise
187 2009-05-17  Vladimir Serbinenko  <phcoder@gmail.com>
189         trampoline for linux on 64-bit platform
191         * conf/x86_64-efi.rmk (linux_mod_SOURCES): added
192         loader/i386/efi/linux_trampoline.S
193         * include/grub/x86_64/efi/loader.h (grub_linux_real_boot): removed
194         declration
195         * kern/x86_64/efi/startup.S (grub_linux_real_boot): moved from
196         here
197         * loader/i386/linux_trampoline.S: moved here
198         * loader/i386/efi/linux.c (allocate_pages): reserve space for
199         trampoline
200         (jumpvector): removed
201         (grub_linux_trampoline_start): new declaration
202         (grub_linux_trampoline_end): likewise
203         (grub_linux_boot): use trampoline when on 64-bit platform
204         * loader/i386/linux.c: likewise
206 2009-05-16  Pavel Roskin  <proski@gnu.org>
208         * script/lua/grub_lib.c (grub_lua_getenv): Make name and value
209         const to avoid a warning.
210         (grub_lua_setenv): Likewise.
211         * script/lua/grub_main.c (grub_lua_parse_line): Use size_t for
212         lmsg to fix a warning.
214 2009-05-16  Felix Zielcke  <fzielcke@z-51.de>
216         * conf/i386.rmk (setjmp_mod_CFLAGS): Rename to ...
217         (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
218         * conf/x86_64-efi.rmk (setjmp_mod_CFLAGS): Rename to ...
219         (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
220         * conf/powerpc-ieee1275.rmk (setjmp_mod_CFLAGS): Rename to ...
221         (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
222         * conf/sparc64-ieee1275.rmk (setjmp_mod_CFLAGS): Rename to ...
223         (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
225 2009-05-16  Felix Zielcke  <fzielcke@z-51.de>
227         * util/grub-mkconfig.in: Export GRUB_TERMINAL_INPUT.
229 2009-05-16  Bean  <bean123ch@gmail.com>
231         * conf/common.rmk (pkglib_MODULES): Add lua.mod.
232         (lua_mod_SOURCES): New variable.
233         (lua_mod_CFLAGS): Likewise.
234         (lua_mod_LDFLAGS): Likewise.
236         * conf/i386.rmk (pkglib_MODULES): Add setjmp.mod.
237         (setjmp_mod_SOURCES): New variable.
238         (setjmp_mod_CFLAGS): Likewise.
239         (setjmp_LDFLAGS): Likewise.
241         * conf/x86_64-efi.rmk (pkglib_MODULES): Add setjmp.mod.
242         (setjmp_mod_SOURCES): New variable.
243         (setjmp_mod_CFLAGS): Likewise.
244         (setjmp_LDFLAGS): Likewise.
246         * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add setjmp.mod.
247         (setjmp_mod_SOURCES): New variable.
248         (setjmp_mod_CFLAGS): Likewise.
249         (setjmp_LDFLAGS): Likewise.
251         * conf/sparc64-ieee1275.rmk (pkglib_MODULES): Add setjmp.mod.
252         (setjmp_mod_SOURCES): New variable.
253         (setjmp_mod_CFLAGS): Likewise.
254         (setjmp_LDFLAGS): Likewise.
256         * normal/i386/setjmp.S: Moved from here ...
257         * lib/i386/setjmp.S: ... Moved here
258         * normal/x86_64/setjmp.S: Moved from here ...
259         * lib/x86_64/setjmp.S: ... Moved here
260         * normal/powerpc/setjmp.S: Moved from here ...
261         * lib/powerpc/setjmp.S: ... Moved here
262         * normal/sparc64/setjmp.S: Moved from here ...
263         * lib/sparc64/setjmp.S: ... Moved here
265         * include/grub/i386/setjmp.h (grub_setjmp): Don't use attribute
266         returns_twice in mingw.
268         * script/lua/grub_lib.c: New file.
269         * script/lua/grub_lib.h: Likewise.
270         * script/lua/grub_lua.h: Likewise.
271         * script/lua/grub_main.c: Likewise.
272         * script/lua/lapi.c: Likewise.
273         * script/lua/lapi.h: Likewise.
274         * script/lua/lauxlib.c: Likewise.
275         * script/lua/lauxlib.h: Likewise.
276         * script/lua/lbaselib.c: Likewise.
277         * script/lua/lcode.c: Likewise.
278         * script/lua/lcode.h: Likewise.
279         * script/lua/ldblib.c: Likewise.
280         * script/lua/ldebug.c: Likewise.
281         * script/lua/ldebug.h: Likewise.
282         * script/lua/ldo.c: Likewise.
283         * script/lua/ldo.h: Likewise.
284         * script/lua/ldump.c: Likewise.
285         * script/lua/lfunc.c: Likewise.
286         * script/lua/lfunc.h: Likewise.
287         * script/lua/lgc.c: Likewise.
288         * script/lua/lgc.h: Likewise.
289         * script/lua/linit.c: Likewise.
290         * script/lua/liolib.c: Likewise.
291         * script/lua/llex.c: Likewise.
292         * script/lua/llex.h: Likewise.
293         * script/lua/llimits.h: Likewise.
294         * script/lua/lmathlib.c: Likewise.
295         * script/lua/lmem.c: Likewise.
296         * script/lua/lmem.h: Likewise.
297         * script/lua/loadlib.c: Likewise.
298         * script/lua/lobject.c: Likewise.
299         * script/lua/lobject.h: Likewise.
300         * script/lua/lopcodes.c: Likewise.
301         * script/lua/lopcodes.h: Likewise.
302         * script/lua/loslib.c: Likewise.
303         * script/lua/lparser.c: Likewise.
304         * script/lua/lparser.h: Likewise.
305         * script/lua/lstate.c: Likewise.
306         * script/lua/lstate.h: Likewise.
307         * script/lua/lstring.c: Likewise.
308         * script/lua/lstring.h: Likewise.
309         * script/lua/lstrlib.c: Likewise.
310         * script/lua/ltable.c: Likewise.
311         * script/lua/ltable.h: Likewise.
312         * script/lua/ltablib.c: Likewise.
313         * script/lua/ltm.c: Likewise.
314         * script/lua/ltm.h: Likewise.
315         * script/lua/lua.h: Likewise.
316         * script/lua/luaconf.h: Likewise.
317         * script/lua/lualib.h: Likewise.
318         * script/lua/lundump.c: Likewise.
319         * script/lua/lundump.h: Likewise.
320         * script/lua/lvm.c: Likewise.
321         * script/lua/lvm.h: Likewise.
322         * script/lua/lzio.c: Likewise.
323         * script/lua/lzio.h: Likewise.
325 2009-05-16  Bean  <bean123ch@gmail.com>
327         * include/grub/kernel.h (grub_module_header_types): Add type
328         OBJ_TYPE_CONFIG.
330         * kern/main.c (grub_load_config): New function.
331         (grub_main): Call grub_load_config to read boot config.
333         * grub-mkimage (generate_image): New parameter config_path.
334         (options): New option --config.
335         (main): Parse --config option, and pass it to generate_image.
337 2009-05-14  Christian Franke  <franke@computer.org>
339         * commands/i386/pc/drivemap_int13h.S: Add missing EXT_C for symbols.
340         This fixes build on Cygwin.
342 2009-05-14  Pavel Roskin  <proski@gnu.org>
344         * commands/i386/pc/drivemap_int13h.S: Eliminate unconditional
345         jump.  This saves two bytes, so the typical case of 2 swapped
346         drives would fit 32 bytes.
348 2009-05-13  Pavel Roskin  <proski@gnu.org>
350         * loader/i386/multiboot.c (grub_multiboot): Cast mmap_addr to
351         grub_uint32_t to avoid a warning.
353         * loader/i386/linux.c (allocate_pages): When assigning
354         real_mode_mem, cast through grub_size_t to fix a warning.  The
355         code already makes sure that the value would fit a pointer.
356         (grub_linux_setup_video): Cast render_target->data to
357         grub_size_t to fix a warning.
359 2009-05-13  Javier Martín  <lordhabbit@gmail.com>
361         * commands/i386/pc/drivemap.c: New file - implement drivemap
362         command.
363         * commands/i386/pc/drivemap_int13h.S: New file - int13 handler.
364         * conf/i386-pc.rmk: Add drivemap.c and drivemap_int13h.S.
366 2009-05-13  Pavel Roskin  <proski@gnu.org>
368         * util/i386/pc/grub-setup.c (setup): Remove unused variable
369         embedding_area_exists.
371 2009-05-13  Robert Millan  <rmh.grub@aybabtu.com>
373         * util/i386/pc/grub-setup.c (setup): Restructure code flow to make
374         it easier to understand / work with.
375         Improve warning messages for cases where there's no embedding area,
376         or when it is too small (or core.img too large).
378 2009-05-13  Pavel Roskin  <proski@gnu.org>
380         * loader/i386/pc/multiboot2.c: Add necessary includes for
381         grub_multiboot2_real_boot().
383         * fs/iso9660.c (grub_iso9660_iterate_dir): The file mode in the
384         PX record is always little-endian.  We only need the lower 2
385         bytes of the mode.
387         * fs/cpio.c: Use the same name "struct head" for tar and cpio to
388         facilitate code reuse.
389         (grub_cpio_mount): Use "struct head", not a char buffer.  This
390         fixes a warning reported by gcc 4.4.
392         * kernel/disk.c (grub_disk_read): Use void pointer for the
393         buffer.
394         (grub_disk_write): Use const void pointer for the buffer.
395         Adjust all callers.  Remove unnecessary casts.
397 2009-05-10  Robert Millan  <rmh.grub@aybabtu.com>
399         * util/i386/pc/grub-install.in: Update copyright year.
401 2009-05-09  Vladimir Serbinenko  <phcoder@gmail.com>
403         gptsync
405         * commands/gptsync.c: new file
406         * conf/common.rmk (pkglib_MODULES): add gptsync.mod
407         (gptsync_mod_SOURCES): new variable
408         (gptsync_mod_CFLAGS): likewise
409         (gptsync_mod_LDFLAGS): likewise
410         * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_NTFS):
411         new definition
412         (GRUB_PC_PARTITION_TYPE_HFS): likewise
413         * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/gptsync.c
414         * conf/i386-ieee1275.rmk: likewise
415         * conf/i386-pc.rmk: likewise
416         * conf/powerpc-ieee1275.rmk: likewise
418 2009-05-09  Vladimir Serbinenko  <phcoder@gmail.com>
420         Fixed grub-emu
422         * kern/dl.c (grub_dl_ref): omit when compiling grub-emu
423         (grub_dl_ref): likewise
425 2009-05-08  Robert Millan  <rmh.grub@aybabtu.com>
427         * util/i386/pc/grub-setup.c (setup): Factorize find_usable_region(),
428         split in two functions (one for msdos and one for gpt).
430 2009-05-08  Pavel Roskin  <proski@gnu.org>
432         * disk/raid.c (grub_raid_block_xor): Make buf2 constant, it's
433         not modified.
435         * disk/raid6_recover.c (grub_raid6_recover): Fix warnings about
436         uninitialized err[0] and err[1].  Rename them to bad1 and bad2.
437         Initialize them with -1.  Add sanity check for bad1.  Eliminate
438         nerr variable.
440 2009-05-08  David S. Miller  <davem@davemloft.net>
442         * util/sparc64/ieee1275/grub-ofpathname.c (main): Set progname.
444 2009-05-06  Robert Millan  <rmh.grub@aybabtu.com>
446         * util/i386/pc/grub-setup.c (setup): Fix check for embed region
447         existance.
449 2009-05-05  Felix Zielcke  <fzielcke@z-51.de>
451         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
452         `kern/rescue_reader.c', `kern/rescue_parser.c' and `normal/autofs.c'.
454 2009-05-05  David S. Miller  <davem@davemloft.net>
456         * util/sparc64/ieee1275/grub-install.in: Fix sed arg quoting.
458 2009-05-05  Pavel Roskin  <proski@gnu.org>
460         * include/grub/dl.h [GRUB_UTIL]: Provide inline implementations
461         of grub_dl_ref() and grub_dl_unref().
462         * commands/parttool.c: Remove preprocessor conditionals around
463         grub_dl_ref() and grub_dl_unref().
464         * fs/affs.c: Likewise.
465         * fs/afs.c: Likewise.
466         * fs/cpio.c: Likewise.
467         * fs/ext2.c: Likewise.
468         * fs/fat.c: Likewise.
469         * fs/hfs.c: Likewise.
470         * fs/hfsplus.c: Likewise.
471         * fs/iso9660.c: Likewise.
472         * fs/jfs.c: Likewise.
473         * fs/minix.c: Likewise.
474         * fs/ntfs.c: Likewise.
475         * fs/reiserfs.c: Likewise.
476         * fs/sfs.c: Likewise.
477         * fs/udf.c: Likewise.
478         * fs/ufs.c: Likewise.
479         * fs/xfs.c: Likewise.
480         * include/grub/dl.h: Likewise.
481         * loader/xnu.c: Likewise.
483 2009-05-04  Pavel Roskin  <proski@gnu.org>
485         * commands/acpi.c: Remove unused variable my_mod.
486         * partmap/amiga.c: Likewise.
487         * partmap/apple.c: Likewise.
488         * partmap/gpt.c: Likewise.
489         * partmap/pc.c: Likewise.
490         * partmap/sun.c: Likewise.
491         * term/gfxterm.c: Likewise.
492         * term/i386/pc/vesafb.c: Likewise.
493         * term/i386/pc/vga.c: Likewise.
495 2009-05-04  David S. Miller  <davem@davemloft.net>
497         * kern/ieee1275/openfw.c (grub_children_iterate): Fix string
498         pointer args to grub_ieee1275_get_property().
500         * conf/sparc64-ieee1275.rmk: Fix build due to missing '\'.
502         * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Bypass cdrom
503         devices, and do not traverse down under controller nodes.
505         * disk/ieee1275/ofdisk.c (compute_dev_path): New.
506         (grub_ofdisk_open): Use it to un-escape "," characters.
507         * kern/disk.c (find_part_sep): New.
508         (grub_disk_open): Use it to find the first non-escaped ','
509         character in the disk name.
510         * util/ieee1275/devicemap.c (escape_of_path): New.
511         (grub_util_emit_devicemap_entry): Use it.
512         * util/sparc64/ieee1275/grub-install.in: Update script to
513         strip partition specifiers properly by not triggering on
514         '\' escaped ',' characters.
516 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
518         * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START): Set
519         to 0x300.
520         * loader/i386/linux.c (vga_modes, linux_vesafb_res): Add a few
521         resolutions.
522         (linux_vesafb_modes): Add a lot of additional modes to the list (based
523         on documentation from Wikipedia).
525 2009-05-04  Pavel Roskin  <proski@gnu.org>
527         * disk/ata.c: Spelling fixes.
528         * disk/raid.c: Likewise.
529         * disk/usbms.c: Likewise.
530         * disk/dmraid_nvidia.c: Likewise.
531         * kern/ieee1275/openfw.c: Likewise.
532         * kern/ieee1275/init.c: Likewise.
533         * kern/ieee1275/cmain.c: Likewise.
534         * boot/i386/pc/cdboot.S: Likewise.
535         * video/readers/png.c: Likewise.
536         * video/i386/pc/vbe.c: Likewise.
537         * fs/udf.c: Likewise.
538         * fs/hfs.c: Likewise.
539         * fs/reiserfs.c: Likewise.
540         * efiemu/runtime/efiemu.c: Likewise.
541         * efiemu/main.c: Likewise.
542         * efiemu/mm.c: Likewise.
543         * include/grub/elf.h: Likewise.
544         * include/grub/xnu.h: Likewise.
545         * include/grub/usbdesc.h: Likewise.
546         * include/grub/usb.h: Likewise.
547         * include/grub/script_sh.h: Likewise.
548         * include/grub/lib/LzmaEnc.h: Likewise.
549         * include/grub/efiemu/efiemu.h: Likewise.
550         * include/grub/command.h: Likewise.
551         * normal/menu.c: Likewise.
552         * normal/main.c: Likewise.
553         * normal/datetime.c: Likewise.
554         * bus/usb/uhci.c: Likewise.
555         * mmap/i386/uppermem.c: Likewise.
556         * mmap/mmap.c: Likewise.
557         * commands/acpi.c: Likewise.
558         * commands/test.c: Likewise.
559         * partmap/apple.c: Likewise.
560         * font/font.c: Likewise.
561         * loader/sparc64/ieee1275/linux.c: Likewise.
562         * loader/macho.c: Likewise.
563         * loader/i386/bsd_trampoline.S: Likewise.
564         * loader/i386/bsd.c: Likewise.
565         * loader/xnu.c: Likewise.
566         * term/i386/pc/vesafb.c: Likewise.
567         * term/usb_keyboard.c: Likewise.
568         * util/resolve.c: Likewise.
569         * util/getroot.c: Likewise.
571 2009-05-04  Felix Zielcke  <fzielcke@z-51.de>
573         * conf/i386-pc.rmk (libpkg_DATA): Rename to pkglib_DATA.
575 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
577         * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (grub_cmd_linux): Fix
578         build error.
580 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
582         * loader/i386/linux.c (grub_cmd_linux): Make "vga=" compatibility
583         parameter only available on BIOS.
585 2009-05-04  Vladimir Serbinenko  <phcoder@gmail.com>
587         Removed wrong semicolon in declaration
589         * grub/misc.h (grub_dprintf): remove semicolon
591 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
593         * loader/i386/linux.c (GRUB_ASSUME_LINUX_HAS_FB_SUPPORT): New macro.
594         (grub_linux_boot): Don't check for `linux_vesafb_modes' bounds (this
595         is done by grub_cmd_linux() now).
596         [! GRUB_ASSUME_LINUX_HAS_FB_SUPPORT]: If "vga=" parameter wasn't set,
597         restore video to text mode.
598         (grub_cmd_linux): Default `vid_mode' initialization to 0, which
599         indicates lack of "vga=" parameter.  "vga=0" is mapped to
600         `GRUB_LINUX_VID_MODE_NORMAL'.
602 2009-05-04  Felix Zielcke  <fzielcke@z-51.de>
604         * conf/i386-efi.rmk (grub_emu_SOURCES): Remove `normal/execute.c',
605         `normal/lexer.c', `kern/rescue.c', `normal/function.c', `normal/misc.c'
606         and `normal/script.c'.  Add `kern/rescue_reader.c',
607         `kern/rescue_parser.c', `script/sh/main.c', `script/sh/execute.c',
608         `script/sh/function.c', `script/sh/lexer.c', `script/sh/script.c' and
609         `grub_script.tab.c'.
611         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
612         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
613         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
614         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
615         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
617         * Makefile.in: Remove duplicated 2008 in Copyright line.
619 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
621         * util/misc.c (grub_util_warn): New function.  Emmits a warning
622         unconditionally.
623         * include/grub/util/misc.h (grub_util_warn): New declaration.
625         * util/i386/pc/grub-install.in: Understand --force and pass it down
626         to grub-setup.
628         * util/i386/pc/grub-setup.c (main): Understand --force and pass it
629         down to setup().
630         (setup): Improve error messages and add warnings when requested to
631         install in odd layouts.  Refuse to install using blocklists unless
632         --force was set.
634 2009-05-04  martin f. krafft  <madduck@madduck.net>
636         * disk/raid.c (grub_raid_scan_device): Improve debug message.
638 2009-05-04  Vladimir Serbinenko  <phcoder@gmail.com>
640         Updated copyright year
642         * fs/hfsplus.c: updated copyright year
644 2009-05-04  Vladimir Serbinenko  <phcoder@gmail.com>
646         HFS+ UUID
648         * fs/hfsplus.c (grub_hfsplus_volheader): added num_serial field
649         in the space previously used by unused3
650         (grub_hfsplus_uuid): new function
651         (grub_hfsplus_fs): added uuid field
653 2009-05-03  Pavel Roskin  <proski@gnu.org>
655         * disk/ata.c: Don't cast mod to void in GRUB_MOD_INIT to
656         suppress warnings.  It's no longer needed.
657         * disk/host.c: Likewise.
658         * disk/ata_pthru.c: Likewise.
659         * disk/loopback.c: Likewise.
660         * hook/datehook.c: Likewise.
661         * parttool/pcpart.c: Likewise.
662         * fs/i386/pc/pxe.c: Likewise.
663         * fs/ntfscomp.c: Likewise.
664         * efiemu/main.c: Likewise.
665         * mmap/mmap.c: Likewise.
666         * commands/crc.c: Likewise.
667         * commands/hexdump.c: Likewise.
668         * commands/hdparm.c: Likewise.
669         * commands/acpi.c: Likewise.
670         * commands/echo.c: Likewise.
671         * commands/minicmd.c: Likewise.
672         * commands/blocklist.c: Likewise.
673         * commands/memrw.c: Likewise.
674         * commands/loadenv.c: Likewise.
675         * commands/usbtest.c: Likewise.
676         * commands/lsmmap.c: Likewise.
677         * commands/boot.c: Likewise.
678         * commands/parttool.c: Likewise.
679         * commands/configfile.c: Likewise.
680         * commands/search.c: Likewise.
681         * commands/ieee1275/suspend.c: Likewise.
682         * commands/cat.c: Likewise.
683         * commands/i386/pc/pxecmd.c: Likewise.
684         * commands/i386/pc/play.c: Likewise.
685         * commands/i386/pc/halt.c: Likewise.
686         * commands/i386/pc/vbeinfo.c: Likewise.
687         * commands/i386/pc/vbetest.c: Likewise.
688         * commands/lspci.c: Likewise.
689         * commands/date.c: Likewise.
690         * commands/handler.c: Likewise.
691         * commands/ls.c: Likewise.
692         * commands/test.c: Likewise.
693         * commands/cmp.c: Likewise.
694         * commands/efi/loadbios.c: Likewise.
695         * commands/efi/fixvideo.c: Likewise.
696         * commands/halt.c: Likewise.
697         * commands/help.c: Likewise.
698         * commands/reboot.c: Likewise.
699         * hello/hello.c: Likewise.
700         * script/sh/main.c: Likewise.
701         * loader/xnu.c: Likewise.
702         * term/terminfo.c: Likewise.
703         * term/i386/pc/serial.c: Likewise.
704         * term/usb_keyboard.c: Likewise.
706 2009-05-03  David S. Miller  <davem@davemloft.net>
708         * normal/menu.c: Include grub/parser.h
710 2009-05-03  Pavel Roskin  <proski@gnu.org>
712         * mmap/efi/mmap.c (grub_mmap_malign_and_register): Return void*,
713         not char*.
714         * mmap/i386/mmap.c (grub_mmap_malign_and_register): Likewise.
715         Suggested by Javier Martín <lordhabbit@gmail.com>
717         * util/i386/pc/grub-mkrescue.in: Allow for the case when
718         efiemu??.o doesn't exist.
719         * util/i386/pc/grub-install.in: Likewise.  Use "cp -f" for
720         copying.
722 2009-05-03  Bean  <bean123ch@gmail.com> Vladimir Serbinenko  <phcoder@gmail.com>
724         FreeBSD 64-bit support
726         * conf/i386-pc.rmk (bsd_mod_SOURCES): add loader/i386/bsd_helper.S
727         and loader/i386/bsd_trampoline.S
728         (bsd_mod_ASFLAGS): new variable
729         * include/grub/i386/bsd.h (FREEBSD_MODINFOMD_SMAP): new definition
730         (FREEBSD_MODTYPE_KERNEL64): likewise
731         (grub_bsd64_trampoline_start): likewise
732         (grub_bsd64_trampoline_end): likewise
733         (grub_bsd64_trampoline_selfjump): likewise
734         (grub_bsd64_trampoline_gdt): likewise
735         * include/grub/i386/loader.h (grub_unix_real_boot): moved from here ...
736         * include/grub/i386/bsd.h (grub_unix_real_boot): ... moved here
737         * kern/i386/loader.S (grub_unix_real_boot): moved from here ...
738         * loader/i386/bsd_helper.S (grub_unix_real_boot): moved here
739         * include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type
740         of "attrib" member
741         * loader/i386/bsd_pagetable.c: new file
742         * loader/i386/bsd_trampoline.S: likewise
743         * loader/i386/bsd.c (ALIGN_QWORD): new macro
744         (ALIGN_VAR): likewise
745         (entry_hi): new variable
746         (kern_end_mdofs): likewise
747         (is_64bit): likewise
748         (grub_freebsd_add_meta): use ALIGN_VAR
749         (grub_e820_mmap): new declaration
750         (grub_freebsd_add_mmap): new function
751         (grub_freebsd_add_meta_module): support 64 bit kernels
752         (grub_freebsd_list_modules): use ALIGN_VAR
753         (gdt_descriptor): new declaration
754         (grub_freebsd_boot): support 64 bit kernels
755         (grub_bsd_elf64_hook): new function
756         (grub_bsd_load_elf): support elf64
758 2009-05-03  Bean  <bean123ch@gmail.com>
760         * script/sh/execute.c (grub_script_execute_cmdif): Reset grub_errno
761         after we get the result of if statement.
763 2009-05-03  Bean  <bean123ch@gmail.com>
765         * Makefile.in (enable_efiemu): New variable.
767         * conf/i386-pc.rmk: Only compile efiemu runtimes when enable_efiemu is
768         set.
769         (efiemu32.o): Use macro $< for source file, add $(srcdir) to include
770         path.
771         (efi64_c.o): Use macro $< for source file, add $(srcdir) to include
772         path, add -mno-red-zone option.
773         (efiemu64_s.o): Likewise.
774         (efiemu64.o): Use macro $^ for source file.
776         * configure.ac (--enable-efiemu): New option.
778 2009-05-03  Vladimir Serbinenko  <phcoder@gmail.com>
780         xnu support
782         * conf/i386-efi.rmk (kernel_mod_HEADERS): added i386/pit.h
783         (pkglib_MODULES): add xnu.mod
784         (xnu_mod_SOURCES): new variable
785         (xnu_mod_CFLAGS): likewise
786         (xnu_mod_LDFLAGS): likewise
787         (xnu_mod_ASFLAGS): likewise
788         * conf/i386-pc.rmk: likewise
789         * conf/x86_64-efi.rmk: likewise
790         * include/grub/efi/efi.h (grub_efi_finish_boot_services):
791         new declaration
792         * include/grub/i386/macho.h: new file
793         * include/grub/i386/xnu.h: likewise
794         * include/grub/macho.h: likewise
795         * include/grub/machoload.h: likewise
796         * include/grub/x86_64/macho.h: likewise
797         * include/grub/x86_64/xnu.h: likewise
798         * include/grub/xnu.h: likewise
799         * kern/efi/efi.c (grub_efi_finish_boot_services): new function
800         * kern/efi/mm.c (MAX_HEAP_SIZE): increase
801         * loader/i386/efi/xnu.c: new file
802         * loader/i386/pc/xnu.c: likewise
803         * loader/i386/xnu.c: likewise
804         * loader/i386/xnu_helper.S: likewise
805         * loader/macho.c: likewise
806         * loader/xnu.c: likewise
807         * loader/xnu_resume.c: likewise
808         * util/grub-dumpdevtree: likewise
809         * include/grub/i386/pit.h: include grub/err.h
810         (grub_pit_wait): export
811         * util/grub.d/30_os-prober.in: support Darwin/Mac OS X
813 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
815         Efiemu
817         * conf/i386-pc.rmk: new modules efiemu, efiemu_acpi, efiemu_pnvram,
818         _linux_efi, linux_efi.
819         new files in grub-emu
820         new targets efiemu32.o and efiemu64.o
821         * loader/linux_normal_efiemu.c: likewise
822         * loader/i386/efi/linux.c: added preliminary efiemu support
823         * util/i386/pc/grub-install.in: add efiemu??.o to the list of
824         files to copy
825         * include/grub/autoefi.h: new file
826         * include/grub/i386/efiemu.h: likewise
827         * include/grub/i386/pc/efiemu.h: likewise
828         * include/grub/efi/api.h: add LL suffix when necessary
829         new definitions relating to tables
830         * include/grub/efiemu/efiemu.h: new file
831         * include/grub/efiemu/runtime.h: likewise
832         * efiemu/prepare.c: likewise
833         * efiemu/loadcore_common.c: likewise
834         * efiemu/loadcore64.c: likewise
835         * efiemu/runtime/efiemu.sh: likewise
836         * efiemu/runtime/efiemu.S: likewise
837         * efiemu/runtime/efiemu.c: likewise
838         * efiemu/runtime/config.h: likewise
839         * efiemu/prepare32.c: likewise
840         * efiemu/main.c: likewise
841         * efiemu/modules/pnvram.c: likewise
842         * efiemu/modules/i386: likewise
843         * efiemu/modules/i386/pc: likewise
844         * efiemu/modules/acpi.c: likewise
845         * efiemu/i386/pc/cfgtables.c: likewise
846         * efiemu/i386/loadcore64.c: likewise
847         * efiemu/i386/loadcore32.c: likewise
848         * efiemu/prepare64.c: likewise
849         * efiemu/loadcore.c: likewise
850         * efiemu/symbols.c: likewise
851         * efiemu/mm.c: likewise
852         * efiemu/loadcore32.c: likewise
854 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
856         ACPI spoofing
858         * commands/acpi.c: new file
859         * commands/i386/pc/acpi.c: likewise
860         * commands/efi/acpi.c: likewise
861         * include/grub/acpi.h: likewise
862         * conf/i386-pc.rmk (pkglib_MODULES): added acpi.mod
863         (acpi_mod_SOURCES): new variable
864         (acpi_mod_CFLAGS): likewise
865         (acpi_mod_LDFLAGS): likewise
866         * conf/i386-efi.rmk: likewise
867         * conf/x86_64-efi.rmk: likewise
869 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
871         Missing part from mmap patch
873         * mmap/efi/mmap.c (grub_machine_mmap_unregister): renamed to
874         (grub_mmap_unregister)
875         (grub_mmap_free_and_unregister): use grub_mmap_register
877 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
879         Mmap services
881         * loader/i386/efi/linux.c (grub_linux_boot): use grub_mmap_iterate
882         * loader/i386/linux.c (find_mmap_size): likewise
883         (allocate_pages): likewise
884         * loader/i386/multiboot.c (grub_get_multiboot_mmap_len): likewise
885         (grub_fill_multiboot_mmap): likewise
886         (grub_multiboot): use grub_mmap_get_lower and grub_mmap_get_upper
887         * loader/i386/pc/linux.c (grub_cmd_linux): use grub_mmap_get_lower
888         * include/grub/i386/bsd.h (OPENBSD_MMAP_AVAILABLE): new definition
889         (OPENBSD_MMAP_RESERVED): likewise
890         * include/grub/i386/pc/memory.h: include grub/memory.h
891         (grub_lower_mem): removed
892         (grub_upper_mem): likewise
893         (GRUB_MACHINE_MEMORY_ACPI): new definition
894         (GRUB_MACHINE_MEMORY_NVS): likewise
895         (GRUB_MACHINE_MEMORY_MAX_TYPE): likewise
896         (GRUB_MACHINE_MEMORY_HOLE): likewise
897         (grub_machine_mmap_register): likewise
898         (grub_machine_mmap_unregister): likewise
899         (grub_machine_get_upper): likewise
900         (grub_machine_get_lower): likewise
901         (grub_machine_get_post64): likewise
902         * include/grub/i386/efi/memory.h: new file
903         * include/grub/x86_64/efi/memory.h: likewise
904         * include/grub/efi/memory.h: likewise
905         * conf/i386-pc.rmk (pkglib_MODULES): added mmap.mod
906         (mmap_mod_SOURCES): new variable
907         (mmap_mod_LDFLAGS): likewise
908         (mmap_mod_ASFLAGS): likewise
909         * conf/i386-coreboot.rmk: likewise
910         * conf/i386-ieee1275.rmk: likewise
911         * conf/i386-efi.rmk: likewise
912         * conf/x86_64-efi.rmk: likewise
913         * include/grub/types.h (UINT_TO_PTR): new macro
914         (PTR_TO_UINT32): likewise
915         (PTR_TO_UINT64): likewise
916         * include/grub/memory.h: new file
917         * mmap/i386/pc/mmap.c: likewise
918         * mmap/i386/pc/mmap_helper.S: likewise
919         * mmap/i386/uppermem.c: likewise
920         * mmap/mmap.c: likewise
921         * mmap/efi/mmap.c: likewise
922         * kern/i386/coreboot/init.c (grub_machine_init): don't use
923         grub_upper_mem
924         * kern/i386/pc/init.c (grub_lower_mem): removed variable
925         (grub_upper_mem): likewise
926         (grub_machine_init): don't use grub_upper_mem,
927         make grub_lower_mem local
928         * loader/i386/bsd.c (grub_openbsd_boot): use grub_mmap_get_lower,
929         grub_mmap_iterate and grub_mmap_get_upper
930         (grub_netbsd_boot): use grub_mmap_get_lower and grub_mmap_get_upper
932 2009-05-02  Bean  <bean123ch@gmail.com>
934         * conf/common.rmk (grub_script.tab.c): Change normal/parser.y to
935         script/sh/parser.y.
936         (pkglib_MODULES): Add normal.mod and sh.mod.
937         (normal_SOURCES): New variable.
938         (normal_mod_CFLAGS): Likewise.
939         (normal_mod_LDFLAGS): Likewise.
940         (sh_mod_SOURCES): Likewise.
941         (sh_mod_CFLAGS): Likewise.
942         (sh_mod_LDFLAGS): Likewise.
944         * conf/i386-pc.rmk (normal/lexer.c_DEPENDENCIES): Changed to
945         script/sh/lexer.c_DEPENDENCIES.
946         (kernel_img_SOURCES): Remove kern/rescue.c, and kern/reader.c,
947         kern/rescue_reader.c and kern/rescue_parser.c.
948         (kernel_img_HEADERS): Remove rescue.h, add reader.h.
949         (grub_emu_SOURCES): Change source files.
950         (pkglib_MODULES): Remove normal.mod.
951         (normal_SOURCES): Removed.
952         (normal_mod_CFLAGS): Likewise.
953         (normal_mod_LDFLAGS): Likewise.
954         * conf/i386-coreboot.rmk: Likewise.
955         * conf/i386-efi.rmk: Likewise.
956         * conf/i386-ieee1276.rmk: Likewise.
957         * conf/powerpc-ieee1275.rmk: Likewise.
958         * conf/sparc64-ieee1275.rmk: Likewise.
959         * conf/x86_64-efi.rmk: Likewise.
961         * include/grub/command.h (grub_command_execute): New inline function.
963         * include/grub/menu.h (grub_menu_entry): Removed commands field.
965         * include/grub/normal.h: Remove <grub/setjmp.h>.
966         (grub_fs_module_list): Moved to normal/autofs.c.
967         (grub_exit_env): Removed.
968         (grub_command_execute): Likewise.
969         (grub_normal_menu_addentry): Renamed to grub_menu_addentry, removed
970         parameter script.
971         (read_command_list): New function declaration.
972         (read_fs_list): Likewise.
974         * include/parser.h: Include <grub/reader.h>.
975         (grub_parser_split_cmdline): Change type of getline parameter.
976         (grub_parser): New structure.
977         (grub_parser_class): New variable.
978         (grub_parser_execute): New function declaration.
979         (grub_register_rescue_parser): Likewise.
980         (grub_parser_register): New inline function.
981         (grub_parser_unregister): Likewise.
982         (grub_parser_get_current): Likewise.
983         (grub_parser_set_current): Likewise.
985         * include/grub/reader.h: New file.
986         * kern/reader.c: Likewise.
987         * kern/rescue_parser.c: Likewise.
988         * kern/rescue_reader.c: Likewise.
989         * normal/autofs.c: Likewise.
990         * normal/dyncmd.c: Likewise.
992         * include/grub/rescue.h: Removed.
993         * normal/command.h: Likewise.
995         * include/grub/script.h: Moved to ...
996         * include/grub/script_sh.h: ... Moved here.
997         * normal/execute.c: Moved to ...
998         * script/sh/execute.c: ... Moved here.
999         * normal/function.c: Moved to ...
1000         * script/sh/function.c: ... Moved here.
1001         * normal/lexer.c: Moved to ...
1002         * script/sh/lexer.c: ... Moved here.
1003         * normal/parser.y: Moved to ...
1004         * script/sh/parser.y: ... Moved here.
1005         * normal/script.c: Moved to ...
1006         * script/sh/script.c: ... Moved here.
1008         * normal/main.c: Remove <grub/rescue.h> and <grub/script.h>, include
1009         <grub/reader.h>.
1010         (grub_exit_env): Removed.
1011         (fs_module_list): Moved to normal/autofs.c.
1012         (grub_file_getline): Don't handle comment here.
1013         (free_menu): Skip removed field entry->commands.
1014         (grub_normal_menu_addentry): Removed as grub_menu_entry, removed
1015         script parameter.
1016         (read_config_file): Removed nested parameter, change getline function.
1017         (grub_enter_normal_mode): Removed.
1018         (grub_dyncmd_dispatcher): Moved to normal/dyncmd.c.
1019         (read_command_list): Likewise.
1020         (autoload_fs_module): Moved to normal/autofs.c.
1021         (read_fs_list): Likewise.
1022         (reader_nested): New variable.
1023         (grub_normal_execute): Run parser.sh to switch to sh parser.
1024         (grub_cmd_rescue): Removed.
1025         (cmd_normal): Removed.
1026         (grub_cmd_normal): Unregister itself at the beginning. Don't register
1027         rescue command.
1028         (grub_cmdline_run): New function.
1029         (grub_normal_reader_init): Likewise.
1030         (grub_normal_read_line): Likewise.
1031         (grub_env_write_pager): Likewise.
1032         (cmdline): New variable.
1033         (grub_normal_reader): Likewise.
1034         (GRUB_MOD_INIT): Register normal reader and set as current, register
1035         pager hook, register normal command with grub_register_command_prio,
1036         so that it won't show up in command.lst.
1037         (GRUB_MOD_FINI): Unregister normal reader, unhook pager, clear
1038         grub_fs_autoload_hook.
1040         * normal/menu.c: Remove <grub/script.h>, add <grub/command.h>.
1041         (grub_menu_execute_entry): Replace grub_script_execute with
1042         grub_parser_execute, change parameter to grub_command_execute.
1044         * normal/menu_text.c: Remove <grub/script.h>.
1046         * normal/menu_entry.c: Remove <grub/script.h>, add <grub/command.h>
1047         and <grub/parser.h>.
1048         (run): Change editor_getline to use new parser interface. Change
1049         parameter to grub_command_execute.
1051         * kern/main.c: Remove <grub/rescue.h>, include <grub/command.h>,
1052         <grub/reader.h> and <grub/parser.h>.
1053         (grub_load_normal_mode): Execute normal command.
1054         (grub_main): Call grub_register_core_commands,
1055         grub_register_rescue_parser and grub_register_rescue_reader, use
1056         grub_reader_loop to enter input loop.
1058         * kern/parser.c (grub_parser_split_cmdline): Change type of
1059         getline parameter.
1060         (grub_parser_class): New variable.
1061         (grub_parser_execute): New function.
1063         * loader/i386/multiboot.c: Remove <grub/rescue.h>.
1064         * loader/multiboot2.c: Likewise.
1065         * loader/sparc64/ieee1275/linux.c: Likewise.
1067         * util/grub-emu.c (read_command_list): New dummy function.
1069 2009-05-02  Robert Millan  <rmh.grub@aybabtu.com>
1071         * util/deviceiter.c (grub_util_iterate_devices): Increase max drive
1072         count to 16 for CCISS and IDA.
1074 2009-05-02  Robert Millan  <rmh.grub@aybabtu.com>
1076         * normal/menu_text.c  (grub_wait_after_message): Print a newline
1077         after waiting for user input.
1079         * loader/i386/linux.c: Include `<grub/normal.h>'.
1080         (grub_cmd_linux): Improve the error message about `ask' mode, by
1081         waiting for user input so it's not missed (we can do this, since
1082         user requested interaction).
1084 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
1086         Added missing lst to grub-mkrescue
1088         * util/i386/pc/grub-mkrescue.in: added ${input_dir}/handler.lst
1089         and ${input_dir}/parttool.lst
1091 2009-04-30  David S. Miller  <davem@davemloft.net>
1093         * util/hostdisk.c (device_is_wholedisk): New function.
1094         (grub_util_biosdisk_get_grub_dev): Shortcut when hdg.start is
1095         zero only if device_is_wholedisk() returns true.
1097         * util/hostdisk.c (convert_system_partition_to_system_disk):
1098         Handle virtual disk devices named /dev/vdiskX as found on sparc
1099         and powerpc.
1101         * kern/sparc64/ieee1275/init.c (grub_machine_set_prefix): If
1102         lettered partition specifier is found, convert to numbered.
1104 2009-04-29  David S. Miller  <davem@davemloft.net>
1106         * include/grub/powerpc/ieee1275/memory.h: Include ieee1275.h.
1107         * include/grub/sparc64/ieee1275/memory.h: Likewise.
1109         * normal/command.c: Add missing newline at end of file.
1111         * commands/lsmmap.c (grub_cmd_lsmmap): Add casts to avoid printf
1112         warnings.
1113         * kern/ieee1275/openfw.c (grub_claimmap): Likewise.
1114         * disk/ieee1275/ofdisk.c (grub_ofdisk_open, grub_ofdisk_close,
1115         grub_ofdisk_read): Likewise, and deal similarly with the fact that
1116         ihandles have a 32-bit type but need to be stored in a "void *".
1118 2009-04-28  Pavel Roskin  <proski@gnu.org>
1120         * disk/fs_uuid.c (grub_fs_uuid_open): Use parent->data for dev,
1121         not disk.  Adjust all dependencies.
1122         (grub_fs_uuid_close): Use grub_device_close(), not
1123         grub_disk_close().
1125         * disk/fs_uuid.c (grub_fs_uuid_open): Allocate memory to copy
1126         parent's partition, don't copy it by reference, as it gets freed
1127         on close.
1129 2009-04-27  Vladimir Serbinenko  <phcoder@gmail.com>
1131         Preboot hooks support
1133         * commands/boot.c (struct grub_preboot_t): new declaration
1134         (preboots_head): new variable
1135         (preboots_tail): likewise
1136         (grub_loader_register_preboot_hook): new function
1137         (grub_loader_unregister_preboot_hook): likewise
1138         (grub_loader_set): launch preboot hooks
1139         * include/grub/loader.h (grub_loader_preboot_hook_prio_t): new type
1140         (grub_loader_register_preboot_hook): new declaration
1141         (grub_loader_unregister_preboot_hook): likewise
1143 2009-04-27  Vladimir Serbinenko  <phcoder@gmail.com>
1145         Warning fix
1147         * disk/scsi.c (grub_scsi_open): added missing cast when
1148         calling grub_dprintf
1150 2009-04-26  Vladimir Serbinenko  <phcoder@gmail.com>
1152         Bug and warning fixes
1154         * include/grub/i386/pc/init.h (grub_stop_floppy): added missing
1155         declaration
1156         * commands/test.c (test_parse): fixed bug with file tests and corrected
1157         declaration of find_file
1159 2009-04-26  Pavel Roskin  <proski@gnu.org>
1161         * Makefile.in: Don't install empty manual pages if help2man is
1162         missing.  Use help2man option for output, not shell redirection.
1164 2009-04-26  David S. Miller  <davem@davemloft.net>
1166         * util/grub-mkdevicemap.c (make_device_map): Add missing
1167         NESTED_FUNC_ATTR to process_device().
1169 2009-04-25  Vladimir Serbinenko  <phcoder@gmail.com>
1171         Test command
1173         * commands/test.c: rewritten to use bash-like test
1175 2009-04-25  Vladimir Serbinenko  <phcoder@gmail.com>
1177         Parttool autoloading and improvements
1179         * Makefile.in (pkglib_DATA): add parttool.lst
1180         (parttool.lst): new target
1181         * genmk.rb: generate parttool-*
1182         (CLEANFILES): add #{parttool}
1183         (PARTTOOLFILES): new variable
1184         * genparttoollist.sh: new file
1185         * parttool/pcpart.c (grub_pcpart_boot): more feedback
1186         (grub_pcpart_type): likewise
1187         * commands/parttool.c (helpmsg): new variable
1188         (grub_cmd_parttool): output help if not enough arguments are supplied
1189         autoload modules
1190         (GRUB_MOD_INIT(parttool)): use helpmsg
1192 2009-04-24  David S. Miller  <davem@davemloft.net>
1194         Avoiding opening same device multiple times in device iterator.
1196         * kern/device.c: (grub_device_iterate): Define struct part_ent,
1197         and use it to build a list of partitions in iterate_disk() and
1198         iterate_partition().
1200         * disk/fs_uuid.c (grub_fs_uuid_close): Call grub_disk_close()
1201         on disk->data.
1203         * disk/ieee1275/nand.c (grub_nand_iterate): Return
1204         grub_devalias_iterate() result instead of unconditional 0.
1205         * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Likewise.
1206         Also, capture hook return value, either directly or via
1207         grub_children_iterate(), and propagate to caller.
1208         * include/grub/ieee1275/ieee1275.h (grub_devalias_iterate,
1209         grub_children_iterate): Return value is now 'int' instead of
1210         'grub_err_t'.
1211         * kern/ieee1275/openfw.c (grub_children_iterate): Fix to behave
1212         like a proper iterator, stopping when hooks return non-zero.
1213         (grub_devalias_iterate): Likewise.
1215 2009-04-23  David S. Miller  <davem@davemloft.net>
1217         * kern/sparc64/ieee1275/openfw.c: Unused, delete.
1219 2009-04-22  David S. Miller  <davem@davemloft.net>
1221         * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): If size_cells
1222         is larger than address_cells, use that value for address_cells too.
1224         * include/grub/ieee1275/ieee1275.h (IEEE1275_MAX_PROP_LEN,
1225         IEEE1275_MAX_PATH_LEN): Define.
1226         * kern/ieee1275/openfw.c (grub_children_iterate): Dynamically
1227         allocate 'childtype', 'childpath', 'childname', and 'fullname'.
1228         (grub_devalias_iterate): Dynamically allocate 'aliasname' and
1229         'devtype'.  Explicitly NULL terminate devalias expansion.
1231         * util/sparc64/ieee1275/misc.c: New file.
1232         * util/sparc64/ieee1275/grub-setup.c: New file.
1233         * util/sparc64/ieee1275/grub-ofpathname.c: New file.
1234         * util/sparc64/ieee1275/grub-mkimage.c: New file.
1235         * util/sparc64/ieee1275/grub-install.in: New file.
1236         * util/ieee1275/ofpath.c: New file.
1237         * util/ieee1275/devicemap.c: New file.
1238         * util/devicemap.c: New file.
1239         * util/deviceiter.c: New file.
1240         * kern/sparc64/ieee1275/init.c: New file.
1241         * include/grub/util/ofpath.h: New file.
1242         * include/grub/util/deviceiter.h: New file.
1243         * util/grub-mkdevicemap.c: Include deviceiter.h.
1244         Implement using grub_util_emit_devicemap_entry and
1245         grub_util_iterate_devices.
1246         * conf/i386-corebook.rmk: Build util/deviceiter.c and
1247         util/devicemap.c into grub-mkdevicemap
1248         * conf/i386-efi.rmk: Likewise.
1249         * conf/i386-ieee1275.rmk: Likewise.
1250         * conf/i386-pc.rmk: Likewise.
1251         * conf/powerpc-ieee1275.rmk: Likewise.
1252         * conf/sparc64-ieee1275.rmk: Add rules to build boot block
1253         images and installation utilities.  Build kernel as image
1254         instead of as elf binary.  Use common rules as much as possible.
1256 2009-04-19  Vladimir Serbinenko  <phcoder@gmail.com>
1258         Correct GPT definition
1260         * include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type
1261         of "attrib" member
1263 2009-04-19  Felix Zielcke  <fzielcke@z-51.de>
1265         * INSTALL: Replace `autogen.sh' with `./autogen.sh'.
1267 2009-04-19  David S. Miller  <davem@davemloft.net>
1269         * loader/sparc64/ieee1275/linux.c: Include grub/command.h
1270         (grub_rescue_cmd_linux): Rename to...
1271         (grub_cmd_linux): and fix prototype.
1272         (grub_rescue_cmd_initrd): Rename to...
1273         (grub_cmd_initrd): and fix prototype.
1274         (cmd_linux, cmd_initrd): New.
1275         (GRUB_MOD_INIT(linux)): Use grub_register_command().
1276         (GRUB_MOD_FINI(linux): Use grub_unregister_command().
1278 2009-04-17  Pavel Roskin  <proski@gnu.org>
1280         * bus/usb/ohci.c (grub_ohci_transaction): Fix incorrect printf
1281         format.
1282         (grub_ohci_transfer): Likewise.
1284         * bus/usb/usbtrans.c (grub_usb_control_msg): Warning fix.
1286         * loader/multiboot_loader.c (grub_cmd_multiboot_loader): Fix
1287         return without a value.  Fix inconsistent indentation.
1289         * fs/i386/pc/pxe.c (grub_pxefs_dir): Fix function prototype to
1290         match struct grub_fs.
1292         * disk/ata.c (grub_ata_pciinit): Use NESTED_FUNC_ATTR.
1293         * bus/usb/ohci.c (grub_ohci_pci_iter): Likewise.
1294         * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
1295         * commands/lspci.c (grub_lspci_iter): Likewise.
1297 2009-04-16  Bean  <bean123ch@gmail.com>
1299         * commands/efi/loadbios.c (grub_cmd_fakebios): Add missing return
1300         value.
1302 2009-04-15  Pavel Roskin  <proski@gnu.org>
1304         * include/grub/types.h: Rename ULONG_MAX to GRUB_ULONG_MAX and
1305         LONG_MAX to GRUB_LONG_MAX.  Introduce GRUB_LONG_MIN.  Update all
1306         users of ULONG_MAX, LONG_MAX and LONG_MIN to use the new
1307         definitions.
1309 2009-04-15  Felix Zielcke  <fzielcke@z-51.de>
1311         * disk/lvm.c (grub_lvm_scan_device): Add `LVM' to the error messages,
1312         that no multiple data or metadata areas are supported and `Unknown
1313         metadata header'.
1315 2009-04-15  Vladimir Serbinenko  <phcoder@gmail.com>
1317         Move loader out of the kernel
1319         * kern/loader.c: moved to ...
1320         * commands/boot.c: ... moved here
1321         * commands/minicmd.c (grub_mini_cmd_boot): moved to ...
1322         * commands/boot.c (grub_cmd_boot): moved here. All users updated
1323         * include/grub/kernel.h (grub_machine_fini): export
1324         * include/grub/loader.h (grub_loader_is_loaded): update declaration
1325         (grub_loader_set): likewise
1326         (grub_loader_unset): likewise
1327         (grub_loader_boot): likewise
1328         * conf/common.rmk: new module boot.mod
1329         (pkglib_MODULES): add boot.mod
1330         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): remove kern/loader.c
1331         (grub_emu_SOURCES): likewise
1332         * conf/i386-efi.rmk (kernel_elf_SOURCES): likewise
1333         (grub_emu_SOURCES): likewise
1334         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): likewise
1335         (grub_emu_SOURCES): likewise
1336         * conf/i386-pc.rmk (kernel_elf_SOURCES): likewise
1337         (grub_emu_SOURCES): likewise
1338         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): likewise
1339         (grub_emu_SOURCES): likewise
1340         * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): likewise
1341         (grub_emu_SOURCES): likewise
1342         * conf/x86_64-efi.rmk (kernel_elf_SOURCES): likewise
1343         (grub_emu_SOURCES): likewise
1345 2009-04-15  Vladimir Serbinenko  <phcoder@gmail.com>
1347         use grub_lltoa instead of grub_itoa and grub_ltoa for all purposes
1349         * kern/misc.c (grub_itoa): Removed function
1350         (grub_ltoa): likewise
1351         (grub_vsprintf): use grub_lltoa
1353 2009-04-15  Vladimir Serbinenko  <phcoder@gmail.com>
1355         Restore grub-emu
1357         * conf/i386-pc.rmk (grub_emu_SOURCES): add normal/handler.c
1358         * conf/i386-coreboot.rmk: likewise
1359         * conf/i386-ieee1275.rmk: likewise
1360         * conf/powerpc-ieee1275.rmk: likewise
1362 2009-04-15  Felix Zielcke  <fzielcke@z-51.de>
1364         * INSTALL: Add that `./autogen.sh' needs to be run before
1365         `./configure.'.
1367 2009-04-14  Bean  <bean123ch@gmail.com>
1369         * Makefile.in (pkglib_DATA): Add handler.lst.
1370         (handler.lst): New rule.
1372         * conf/i386-pc.rmk (normal_mod_SOURCES): Add normal/handler.c.
1373         * conf/i386-coreboot.rmk: Likewise.
1374         * conf/i386-ieee1275.rmk: Likewise.
1375         * conf/i386-efi.rmk: Likewise.
1376         * conf/x86_64-efi.rmk: Likewise.
1377         * conf/powerpc-ieee1275.rmk: Likewise.
1378         * conf/sparc64-ieee1275.rmk: Likewise.
1380         * genhandlerlist.sh: New file.
1382         * genmk.rb: Add rules to generate handler.lst.
1384         * include/grub/normal.h (grub_file_getline): New function definition.
1385         (read_handler_list): Likewise.
1386         (free_handler_list): Likewise.
1388         * include/grub/term.h (grub_term_register_input): Add name parameter
1389         for auto generation of handler.lst.
1390         (grub_term_register_output): Likewise.
1392         * normal/handler.c: New file.
1394         * normal/main.c (get_line): Renamed to grub_file_getline.
1395         (read_config_file): Use the newly renamed grub_file_getline.
1396         (read_command_list): Likewise.
1397         (read_fs_list): Likewise.
1398         (grub_normal_execute): Call read_handler_list to parse handler.lst.
1399         (GRUB_MOD_FINI): Call free_handler_list to free handler list.
1401         * term/efi/console.c (grub_console_init): Add name parameter for auto
1402         generation of handler.lst.
1403         * term/gfxterm.c: Likewise.
1404         * term/i386/pc/at_keyboard.c: Likewise.
1405         * term/i386/pc/console.c: Likewise.
1406         * term/i386/pc/serial.c: Likewise.
1407         * term/i386/pc/vesafb.c: Likewise.
1408         * term/i386/pc/vga.c: Likewise.
1409         * term/i386/pc/vga_text.c: Likewise.
1410         * term/ieee1275/ofconsole.c: Likewise.
1411         * term/usb_keyboard.c: Likewise.
1413 2009-04-14  Bean  <bean123ch@gmail.com>
1415         * util/grub-pe2elf.c (write_symbol_table): Terminate short name symbol
1416         properly with null character.
1418 2009-04-14  Felix Zielcke  <fzielcke@z-51.de>
1420         * configure: Remove.
1421         * config.h.in: Likewise.
1422         * stamp-h.in: Likewise.
1423         * DISTLIST: Likewise.
1424         * conf/common.mk: Likewise.
1425         * conf/i386-coreboot.mk: Likewise.
1426         * conf/i386-efi.mk: Likewise.
1427         * conf/i386-ieee1275.mk: Likewise.
1428         * conf/i386.mk: Likewise.
1429         * conf/i386-pc.mk: Likewise.
1430         * conf/powerpc-ieee1275.mk: Likewise.
1431         * conf/sparc64-ieee1275.mk: Likewise.
1432         * conf/x86_64-efi.mk: Likewise.
1434         * INSTALL: Remove the sentence that Ruby and autoconf are only required if you
1435         develop on GRUB.
1437 2009-04-14  John Stanley  <jpsinthemix@verizon.net>
1438             David S. Miller  <davem@davemloft.net>
1440         * util/hostdisk.c (make_device_name): Fix buffer length
1441         calculations.
1443 2009-04-14  Felix Zielcke  <fzielcke@z-51.de>
1445         * util/hostdisk.c [__FreeBSD__ || __FreeBSD_kernel__]: Include
1446         <sys/param.h> and <sys/sysctl.h>.
1447         (open_device) [__FreeBSD__ || __FreeBSD_kernel_]: Use sysctlgetbyname()
1448         to add 0x10 to `kern.geom.debugflags' if it's not already set, before
1449         opening the device and reset them afterwards.
1451 2009-04-13  Pavel Roskin  <proski@gnu.org>
1453         * conf/common.rmk (grub_fstest_SOURCES): Add normal/datetime.c.
1454         Reported by John Stanley <jpsinthemix@verizon.net>
1456 2009-04-13  Robert Millan  <rmh@aybabtu.com>
1458         * util/grub.d/10_freebsd.in: Detect Debian GNU/kFreeBSD and use
1459         that name for menuentries when appropriate.
1461 2009-04-13  Felix Zielcke  <fzielcke@z-51.de>
1463         * util/grub.d/10_freebsd.in: Add a missing `fi'.
1465 2009-04-13  Robert Millan  <rmh@aybabtu.com>
1467         * loader/i386/linux.c (grub_cmd_linux): Don't pass `vga=ask' parameter
1468         to Linux, simply abort telling the user it's no longer supported.
1470 2009-04-13  Felix Zielcke  <fzielcke@z-51.de>
1472         * util/grub.d/10_freebsd.in: Don't exit if /boot/devices.hints
1473         doesn't exist.  Check also for /boot/kernel/kernel.gz.  Print
1474         `freebsd_loadenv' only when devices.hints exist.
1476 2009-04-13  Pavel Roskin  <proski@gnu.org>
1478         * term/usb_keyboard.c (grub_usb_keyboard_getkey): Warning fixes.
1480 2009-04-13  Felix Zielcke  <fzielcke@z-51.de>
1482         * util/i386/pc/grub-install.in (install_drive): Remove the BSD
1483         partition number.
1484         (grub_drive): Likewise.
1486 2009-04-13  David S. Miller  <davem@davemloft.net>
1488         * kern/sparc64/ieee1275/ieee1275.c: New file.
1489         * include/grub/sparc64/ieee1275/ieee1275.h (IEEE1275_MAP_WRITE,
1490         IEEE1275_MAP_READ, IEEE1275_MAP_EXEC, IEEE1275_MAP_LOCKED,
1491         IEEE1275_MAP_CACHED, IEEE1275_MAP_SE, IEEE1275_MAP_GLOBAL,
1492         IEEE1275_MAP_IE, IEEE1275_MAP_DEFAULT): Define.
1493         (grub_ieee1275_map_physical, grub_ieee1275_claim_vaddr,
1494         grub_ieee1275_alloc_physmem): Declare new exported functions.
1496         * include/grub/sparc64/ieee1275/loader.h: New file.
1497         * include/grub/sparc64/ieee1275/memory.h: Likewise.
1498         * include/grub/sparc64/kernel.h: Likewise.
1499         * loader/sparc64/ieee1275/linux.c: Likewise.
1501         * conf/common.rmk (grub_probe_SOURCES): Add Sun partition module.
1502         (grub_fstest_SOURCES): Likewise.
1504         * util/hostdisk.c (make_device_name): Do not make any assumptions
1505         about the length of drive names.
1507         * kern/dl.c (grub_dl_load_file): Close file immediately when
1508         we are done using it.
1510 2009-04-12  David S. Miller  <davem@davemloft.net>
1512         * kern/misc.c (grub_ltoa): Fix cast when handling negative
1513         values.  Noticed by Pavel Roskin.
1515         * configure.ac: Check for __bswapsi2 and__bswapdi2 using
1516         target compiler.
1518         * genmk.rb: Add more flexible image type specification, also
1519         pass --strip-unneeded to objcopy.
1520         * conf/i386-pc.rmk: Use *_FORMAT.
1521         * conf/i386-pc.mk: Rebuilt.
1523         * disk/ieee1275/ofdisk.c (struct ofdisk_hash_ent): New struct.
1524         (OFDISK_HASH_SZ): Define.
1525         (ofdisk_hash): New hash table.
1526         (ofdisk_hash_fn, ofdisk_hash_find, ofdisk_hash_add): New functions.
1527         (grub_ofdisk_open): Use ofdisk_hash_ent address as disk->id
1528         instead of device phandle which is not unique.
1530         * kern/sparc64/ieee1275/init.c: Delete, replace with...
1531         * kern/sparc64/ieee1275/crt0.S: assembler implementation.
1532         * include/grub/sparc64/ieee1275/kernel.h: Declare grub_prefix[].
1533         (GRUB_MOD_ALIGN, GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_TOTAL_MODULE_SIZE,
1534         GRUB_KERNEL_MACHINE_KERNEL_IMAGE_SIZE,
1535         GRUB_KERNEL_MACHINE_COMPRESSED_SIZE, GRUB_KERNEL_MACHINE_PREFIX,
1536         GRUB_KERNEL_MACHINE_DATA_END): Define.
1537         (grub_kernel_image_size, grub_total_module_size): Declare.
1539 2009-04-12  Pavel Roskin  <proski@gnu.org>
1541          * configure.ac: Change the logic when we check for target tools.
1542          Do it when the target is specified and it's different from the
1543          specified value of the host.
1545 2009-04-11  Felix Zielcke  <fzielcke@z-51.de>
1547         * util/hostdisk.c [__FreeBSD_kernel__]: Include sys/disk.h.
1548         (grub_util_biosdisk_open) [__FreeBSD_kernel__]: Add support for
1549         GNU/kFreeBSD. Check if a device is a character device. Use
1550         DIOCGMEDIASIZE to get the size.
1551         (convert_system_partition_to_system_disk) [__FreeBSD_kernel__]: Add
1552         support for GNU/kFreeBSD.
1553         (grub_util_biosdisk_get_grub_dev) [__FreeBSD_kernel__]: Check if OS_DEV
1554         is a character device instead of a block device. Add support for
1555         FreeBSD device names.
1557         * util/getroot.c (find_root_device) [__FreeBSD_kernel__]: Check if ENT
1558         is a character device instead of a block device.
1560         * util/grub-probe.c (probe) [__FreeBSD_kernel__]: Check if DEVICE_NAME
1561         is a character device instead of a block device.
1563 2009-04-11  Andrey Shuvikov  <mr_hyro@yahoo.com>
1565         * util/hostdisk.c [__FreeBSD__]: Include sys/disk.h.
1566         (grub_util_biosdisk_open) [__FreeBSD__]: Add support for
1567         FreeBSD. Check if a device is a character device. Use
1568         DIOCGMEDIASIZE to get the size.
1569         (convert_system_partition_to_system_disk) [__FreeBSD__]: Add
1570         support for FreeBSD.
1571         (grub_util_biosdisk_get_grub_dev) [__FreeBSD__]: Check if OS_DEV
1572         is a character device instead of a block device. Add support for
1573         FreeBSD device names.
1575         * util/getroot.c (find_root_device) [__FreeBSD__]: Check if ENT is
1576         a character device instead of a block device.
1577         (grub_util_check_char_device): New function.
1579         * util/grub-probe.c (probe) [__FreeBSD__]: Check if DEVICE_NAME is
1580         a character device instead of a block device.
1582         * include/grub/util/getroot.h (grub_util_check_char_device): New
1583         prototype.
1585 2009-04-11  David S. Miller  <davem@davemloft.net>
1587         * conf/sparc64-ieee1275.rmk (kernel_img_LDFLAGS): Link with
1588         static libgcc.
1589         * configure.ac: Check for __bswapsi2 and __bswapdi2 presence.
1590         * include/grub/sparc64/libgcc.h (__bswapsi2): Export libgcc
1591         function, if present.
1592         (__bswapdi2): Likewise.
1594         * include/grub/sparc64/ieee1275/boot.h: New file.
1595         * boot/sparc64/ieee1275/boot.S: Likewise.
1596         * boot/sparc64/ieee1275/diskboot.S: Likewise.
1598         * kern/misc.c (grub_ltoa): New function.
1599         (grub_vsprintf): Use it to format 'long' integers.
1601 2009-04-10  David S. Miller  <davem@davemloft.net>
1603         * disk/ieee1275/nand.c (grub_nand_open): All ieee1275 call arg
1604         slots are of type grub_ieee1275_cell_t.
1605         (grub_nand_read): Likewise.
1606         * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_INVALID,
1607         IEEE1275_IHANDLE_INVALID): Use grub_ieee1275_cell_t since these
1608         macros are used to compare values in arg/ret block of the call.
1609         (grub_ieee1275_finddevice, grub_ieee1275_get_property,
1610         grub_ieee1275_next_property, grub_ieee1275_get_property_length,
1611         grub_ieee1275_instance_to_package, grub_ieee1275_package_to_path,
1612         grub_ieee1275_instance_to_path, grub_ieee1275_write,
1613         grub_ieee1275_read, grub_ieee1275_seek, grub_ieee1275_peer,
1614         grub_ieee1275_child, grub_ieee1275_parent, grub_ieee1275_open,
1615         grub_ieee1275_close, grub_ieee1275_set_property,
1616         grub_ieee1275_set_color): All ieee1275 call arg slots are of type
1617         grub_ieee1275_cell_t.
1618         * kern/ieee1275/openfw.c (grub_map): Likewise.
1619         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_ihandle_t,
1620         grub_ieee1275_phandle_t): Define as grub_unit32_t type.
1622         * kern/ieee1275/init.c (grub_machine_init): Make 'actual' grub_ssize_t.
1623         * kern/ieee1275/openfw.c (grub_children_iterate): Likewise.
1624         (grub_devalias_iterate): Likewise.
1626 2009-04-10  Vladimir Serbinenko  <phcoder@gmail.com>
1628         UFS improvements
1630         * fs/ufs.c (INODE_NBLOCKS): new definition
1631         (struct grub_ufs_dirent): added fields for non-BSD dirents
1632         (grub_ufs_get_file_block): fixed double indirect handling
1633         (grub_ufs_lookup_symlink): use more robust way to determine whether
1634         symlink is inline
1635         (grub_ufs_find_file): support for non-BSD dirents
1636         (grub_ufs_dir): support for non-BSD dirents
1638 2009-04-10  Bean  <bean123ch@gnail.com>
1640         * include/grub/efi/api.h (grub_efi_configuration_table): Add packed
1641         attribute, otherwise the size would be wrong for i386 platform.
1643         * include/grub/pci.h (grub_pci_read_word): New inline function.
1644         (grub_pci_read_byte): Likewise.
1645         (grub_pci_write): Likewise.
1646         (grub_pci_write_word): Likewise.
1647         (grub_pci_write_byte): Likewise.
1649         * include/grub/pci.h (grub_pci_iteratefunc_t): Add NESTED_FUNC_ATTR.
1651         * loader/i386/efi/linux.c (fake_bios_data): Moved to loadbios module.
1652         (find_framebuf): Scan pci to locate the frame buffer address.
1654         * commands/efi/fixvideo.c: New file.
1656         * commands/efi/loadbios.c: Likewise.
1658         * commands/memrw.c: Likewise.
1660         * util/grub-dumpbios.in: Likewise.
1662         * conf/common.rmk (grub-dumpbios): New utility.
1663         (pkglib_MODULES): New module memrw.mod.
1664         (memrw_mod_SOURCE): New macro.
1665         (memrw_mod_CFLAGS): Likewise.
1666         (memrw_mod_LDFLAGS): Likewise.
1668         * conf/i386-efi.rmk (pkglib_MODULES): New module loadbios.mod and
1669         fixvideo.mod.
1670         (loadbios_mod_SOURCE): New macro.
1671         (loadbios_mod_CFLAGS): Likewise.
1672         (loadbios_mod_LDFLAGS): Likewise.
1673         (fixvideo_mod_SOURCE): Likewise.
1674         (fixvideo_mod_CFLAGS): Likewise.
1675         (fixvideo_mod_LDFLAGS): Likewise.
1677         * conf/x86_64.rmk (pkglib_MODULES): New module loadbios.mod and
1678         fixvideo.mod.
1679         (loadbios_mod_SOURCE): New macro.
1680         (loadbios_mod_CFLAGS): Likewise.
1681         (loadbios_mod_LDFLAGS): Likewise.
1682         (fixvideo_mod_SOURCE): Likewise.
1683         (fixvideo_mod_CFLAGS): Likewise.
1684         (fixvideo_mod_LDFLAGS): Likewise.
1686 2009-04-08  Felix Zielcke  <fzielcke@z-51.de>
1688         * disk/lvm.c (grub_lvm_scan_device): Add a missing NULL check.
1690 2009-04-07  David S. Miller  <davem@davemloft.net>
1692         * kern/sparc64/dl.c (grub_arch_dl_relocate_symbols): Add
1693         support for R_SPARC_OLO10 relocations.  Fix compile warning for
1694         R_SPARC_WDISP30 case.
1695         * kern/sparc64/cache.S: Fix grub_arch_sync_caches implementation.
1697 2009-04-06  Pavel Roskin  <proski@gnu.org>
1699         * include/grub/misc.h (ARRAY_SIZE): New macro.
1700         * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START):
1701         New macro.
1702         * loader/i386/linux.c (allocate_pages): Use free_pages().
1703         (grub_linux_unload): Don't use free_pages().
1704         (grub_linux_boot): Prevent accessing linux_vesafb_modes with a
1705         wrong index.  Treat all other modes as text modes.
1706         (grub_cmd_linux): Initialize vid_mode unconditionally to
1707         GRUB_LINUX_VID_MODE_NORMAL.  Recognize and support "vga=ask".
1709         * commands/help.c (print_command_help): Use cmd->prio, not
1710         cmd->flags to check for GRUB_PRIO_LIST_FLAG_ACTIVE.
1712 2009-04-06  Vladimir Serbinenko  <phcoder@gmail.com>
1714         Parttool
1716         * parttool/pcpart.c: new file
1717         * commands/parttool.c: likewise
1718         * conf/common.rmk (pkglib_MODULES): Added parttool.mod and pcpart.mod
1719         (parttool_mod_SOURCES): new variable
1720         (parttool_mod_CFLAGS): likewise
1721         (parttool_mod_LDFLAGS): likewise
1722         (pcpart_mod_SOURCES): likewise
1723         (pcpart_mod_CFLAGS): likewise
1724         (pcpart_mod_LDFLAGS): likewise
1725         * conf/i386-coreboot.rmk (grub_emu_SOURCES): added commands/parttool.c
1726         and parttool/pcpart.c
1727         * conf/i386-efi.rmk: likewise
1728         * conf/i386-ieee1275.rmk: likewise
1729         * conf/i386-pc.rmk: likewise
1730         * conf/powerpc-ieee1275.rmk: likewise
1731         * conf/sparc64-ieee1275.rmk: likewise
1732         * conf/x86_64-ieee1275.rmk: likewise
1734 2009-04-05  Vladimir Serbinenko  <phcoder@gmail.com>
1736         Support for mtime and further expandability of dir command
1738         * include/grub/lib/datetime.h: moved to ...
1739         * include/grub/datetime.h: ... moved here and added
1740         declaration of grub_unixtime2datetime. All users updated
1741         * include/grub/fs.h: new syntax for dir and mtime functions in
1742         struct grub_fs
1743         * include/grub/fshelp.h: new declarations of GRUB_FSHELP_TYPE_MASK
1744         and GRUB_FSHELP_FLAGS_MASK
1745         * commands/ls.c (grub_ls_list_files): Write mtime in long format
1746         * fs/ext2.c (grub_ext2_dir): use new dir syntax and supply mtime
1747         (grub_ext2_mtime): new function
1748         * fs/hfsplus.c (grub_hfsplus_dir): use new dir syntax and supply mtime
1749         (grub_hfsplus_mtime): new function
1750         * fs/ufs.c (GRUB_UFS_ATTR_TYPE): new definition
1751         (GRUB_UFS_ATTR_FILE): likewise
1752         (GRUB_UFS_ATTR_LNK): likewise
1753         (struct grub_ufs_sblock): new fields mtime
1754         (grub_ufs_read_inode): new parameter to read inode to a separate buffer
1755         all users updated
1756         (grub_ufs_dir): mtime support
1757         (grub_ufs_mtime): new function
1758         * fs/affs.c (grub_affs_dir): use new dir syntax
1759         * fs/afs.c (grub_afs_dir): likewise
1760         * fs/cpio.c (grub_cpio_dir): likewise
1761         * fs/fat.c (grub_fat_find_dir): likewise
1762         * fs/hfs.c (grub_hfs_dir): likewise
1763         * fs/iso9660.c (grub_iso9660_dir): likewise
1764         * fs/jfs.c (grub_jfs_dir): likewise
1765         * fs/minix.c (grub_minix_dir): likewise
1766         * fs/ntfs.c (grub_ntfs_dir): likewise
1767         * fs/reiserfs.c (grub_reiserfs_dir): likewise
1768         * fs/sfs.c (grub_sfs_dir): likewise
1769         * fs/xfs.c (grub_xfs_dir): likewise
1770         * util/hostfs.c (grub_hostfs_dir): likewise
1771         * lib/datetime.c: moved to ...
1772         * normal/datetime.c: ... moved here
1773         (grub_unixtime2datetime): new function
1774         * kern/rescue.c (grub_rescue_print_files): use new dir syntax
1775         * normal/completion.c (iterate_dir): use new dir syntax
1776         * normal/misc.c (grub_normal_print_device_info): tell the
1777         last modification time of a volume
1778         * kern/fs.c (grub_fs_probe): updated dummy function to use new syntax
1779         * conf/common.rmk: added lib/datetime.c to ls.mod
1780         * conf/i386-coreboot.rmk (grub_emu_SOURCES): add normal/datetime.c
1781         (normal_mod_SOURCES): likewise
1782         (datetime_mod_SOURCES): Removed lib/datetime.c
1783         * conf/i386-efi.rmk: likewise
1784         * conf/i386-ieee1275.rmk: likewise
1785         * conf/i386-pc.rmk: likewise
1786         * conf/powerpc-ieee1275.rmk: likewise
1787         * conf/sparc64-ieee1275.rmk: likewise
1788         * conf/x86_64-efi.rmk: likewise
1790 2009-04-05  Vladimir Serbinenko  <phcoder@gmail.com>
1792         Trim trailing spaces in FAT label and support mtools-like labels
1794         * fs/fat.c (grub_fat_iterate_dir): New function based
1795         on grub_fat_find_dir
1796         (grub_fat_find_dir): use grub_fat_iterate_dir
1797         (grub_fat_label): likewise
1799 2009-04-04  Vladimir Serbinenko  <phcoder@gmail.com>
1801         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): add list.h
1802         and command.h
1803         remove extraneous kernel_elf_HEADERS
1805 2009-04-04  Bean  <bean123ch@gnail.com>
1807         * include/grub/util/misc.h: Add dummy function fsync for mingw.
1809         * util/misc.c: Likewise.
1811 2009-04-04  Yoshinori K. Okuji  <okuji@enbug.org>
1813         * loader/i386/efi/linux.c (fake_bios_data): Use grub_dprintf
1814         instead of grub_printf.
1816 2009-04-03  Robert Millan  <rmh@aybabtu.com>
1818         * loader/i386/linux.c (grub_linux_setup_video): Fill
1819         `params->{red,green,blue,reserved}_{mask_size,field_pos}' with
1820         values from `mode info' structure instead of hardcoded
1821         values.
1823 2009-04-01  Pavel Roskin  <proski@gnu.org>
1825         * Makefile.in: Remove all references to MODULE_LDFLAGS, it's
1826         unused now.
1827         * genmk.rb: Likewise.
1828         * configure.ac: Likewise.
1830 2009-04-01  Manoel Abranches  <mrabran@linux.vnet.ibm.com>
1832         * aclocal.m4: Move --build-id=none from MODULE_LDFLAGS to
1833         TARGET_LDFLAGS.  This corrects a problem with grub-mkelfimage.
1835 2009-04-01  David S. Miller  <davem@davemloft.net>
1837         * normal/sparc64/setjmp.S: Fix setjmp implementation.
1838         * include/grub/sparc64/setjmp.h (grub_jmp_buf): Update.
1839         (grub_setjmp): Mark with 'returns_twice' attribute.
1840         * include/grub/i386/setjmp.h (grub_setjmp): Likewise
1841         * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise.
1842         * include/grub/x86_64/setjmp.h (grub_setjmp): Likewise.
1844 2009-04-01  Robert Millan  <rmh@aybabtu.com>
1846         Reapply fix from 2008-07-28 which was accidentally reverted; also
1847         perform the same fix to a similar check in same function.
1849         * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
1850         with the same number are found, just use issue a warning with
1851         grub_dprintf(), as this error has been reported to be non-fatal.
1853 2009-03-31  Pavel Roskin  <proski@gnu.org>
1855         * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Provide safe default
1856         for cross-compilation.
1858 2009-03-30  Robert Millan  <rmh@aybabtu.com>
1860         Fix i386-ieee1275 build.
1862         * include/grub/i386/ieee1275/loader.h (grub_multiboot2_real_boot):
1863         Remove declaration.
1865 2009-03-30  Pavel Roskin  <proski@gnu.org>
1867         * fs/hfs.c (grub_hfs_strncasecmp): Integrate into ...
1868         (grub_hfs_cmp_catkeys): ... this.  Don't assume strings to be
1869         zero-terminated, rely only on the strlen value.  Fix comparison
1870         of strings differing in length.
1872 2009-03-30  Robert Millan  <rmh@aybabtu.com>
1874         * loader/i386/linux.c (grub_cmd_linux): Check for zImage before
1875         checking for abi version.  Improve error messages on BIOS to notify
1876         user about `linux16' command.
1878 2009-03-29  Vladimir Serbinenko  <phcoder@gmail.com>
1880         Leak fixes
1882         * kern/disk.c (grub_disk_cache_store): Invalidate previous cache
1883         in case of collision
1884         * disk/scsi.c (grub_scsi_open): free scsi in case of error
1886 2009-03-29  Robert Millan  <rmh@aybabtu.com>
1888         * loader/i386/linux.c (grub_cmd_linux): Parse "vga=" parameter and
1889         set `vid_mode' accordingly.
1890         (grub_linux_boot): Process `vid_mode' and set video mode.
1892 2009-03-29  Robert Millan  <rmh@aybabtu.com>
1894         * util/grub.d/10_linux.in (linux_entry): New function.
1895         Factorize generation of Linux boot entries.
1897 2009-03-29  Yoshinori K. Okuji  <okuji@enbug.org>
1899         Make the format of Environment Block plain text. The boot loader
1900         part is not tested well yet.
1902         * util/grub-editenv.c (DEFAULT_ENVBLK_SIZE): New macro.
1903         (buffer): Removed.
1904         (envblk): Likewise.
1905         (usage): Remove "info" and "clear". Add "unset". Update the
1906         description of "set", as this does not delete variables any
1907         longer.
1908         (create_envblk_file): Complete rewrite.
1909         (open_envblk_file): Likewise.
1910         (cmd_info): Removed.
1911         (cmd_list): Likewise.
1912         (cmd_set): Likewise.
1913         (cmd_clear): Likewise.
1914         (list_variables): New function.
1915         (write_envblk): Likewise.
1916         (set_variables): Likewise.
1917         (unset_variables): Likewise.
1918         (main): Complete rewrite.
1920         * commands/loadenv.c (buffer): Removed.
1921         (envblk): Likewise.
1922         (open_envblk_file): New function.
1923         (read_envblk_file): Complete rewrite.
1924         (grub_cmd_load_env): Likewise.
1925         (grub_cmd_list_env): Likewise.
1926         (struct blocklist): New struct.
1927         (free_blocklists): New function.
1928         (check_blocklists): Likewise.
1929         (write_blocklists): Likewise.
1930         (grub_cmd_save_env): Complete rewrite.
1932         * include/grub/lib/envblk.h (GRUB_ENVBLK_SIGNATURE): Replaced with
1933         a plain text signature.
1934         (GRUB_ENVBLK_MAXLEN): Removed.
1935         (struct grub_envblk): Complete rewrite.
1936         (grub_envblk_find): Removed.
1937         (grub_envblk_insert): Likewise.
1938         (grub_envblk_open): New prototype.
1939         (grub_envblk_set): Likewise.
1940         (grub_envblk_delete): Put const to VALUE.
1941         (grub_envblk_iterate): Put const to NAME and VALUE.
1942         (grub_envblk_close): New prototype.
1943         (grub_envblk_buffer): New inline function.
1944         (grub_envblk_size): Likewise.
1946         * lib/envblk.c: Include grub/mm.h.
1947         (grub_env_find): Removed.
1948         (grub_envblk_open): New function.
1949         (grub_envblk_close): Likewise.
1950         (escaped_value_len): Likewise.
1951         (find_next_line): Likewise.
1952         (grub_envblk_insert): Removed.
1953         (grub_envblk_set): New function.
1954         (grub_envblk_delete): Complete rewrite.
1955         (grub_envblk_iterate): Likewise.
1957 2009-03-28  Robert Millan  <rmh@aybabtu.com>
1959         * conf/i386-pc.rmk (pkglib_MODULES): Add `linux16.mod'.
1960         (linux16_mod_SOURCES, linux16_mod_CFLAGS, linux16_mod_LDFLAGS): New
1961         variables.  Use 16-bit loader.
1962         (linux_mod_SOURCES, linux_mod_CFLAGS, linux_mod_LDFLAGS): Use 32-bit
1963         loader.
1964         * kern/i386/loader.S (grub_linux_boot): Rename to ...
1965         (grub_linux16_boot): ... this.  Update all users.
1966         * loader/i386/linux.c (grub_linux32_boot): Rename to ...
1967         (grub_linux_boot): ... this.  Update all users.
1969         * loader/i386/pc/linux.c (GRUB_MOD_INIT(linux)): Rename to ...
1970         (GRUB_MOD_INIT(linux16)): ... this.  Rename `linux' and `initrd'
1971         commands to `linux16' and `initrd16'.
1972         (GRUB_MOD_FINI(linux)): Rename to ...
1973         (GRUB_MOD_FINI(linux16)): ... this.
1975 2009-03-24  Pavel Roskin  <proski@gnu.org>
1977         * genmk.rb: Define ASM_FILE for *.S files for *.lst generation,
1978         not just for compilation.
1980 2009-03-22  Vladimir Serbinenko  <phcoder@gmail.com>
1982         Move multiboot helper out of kernel
1984         * conf/i386-pc.rmk (multiboot_mod_SOURCES): Add
1985         `loader/i386/multiboot_helper.S'.
1986         * conf/i386-coreboot.rmk: Likewise
1987         * conf/i386-ieee1275.rmk: Likewise
1989         * kern/i386/loader.S: Move multiboot helpers from here...
1990         * loader/i386/multiboot_helper.S: ...moved here
1991         * include/grub/i386/loader.h: Move declarations of multiboot
1992         helpers from here...
1993         * include/grub/i386/multiboot.h: ...moved here
1994         * loader/i386/multiboot.c: Added include of grub/cpu/multiboot.h
1996 2009-03-22  Yoshinori K. Okuji  <okuji@enbug.org>
1998         * kern/env.c (grub_env_context_open): Added an argument to specify
1999         whether a new context inherits exported variables from current
2000         one. This is useful when making a sandbox to interpret a config
2001         file.
2002         All callers updated.
2004         * include/grub/env.h (grub_env_context_open): Updated the prototype.
2006 2009-03-22  Yoshinori K. Okuji  <okuji@enbug.org>
2008         * kern/env.c (grub_env_context_close): Fix memory leaks.
2010 2009-03-22  Yoshinori K. Okuji  <okuji@enbug.org>
2012         * normal/main.c (grub_normal_execute): Added an argument
2013         BATCH to specify if an interactive interface should be provided
2014         after reading a config file.
2015         All callers updated.
2016         (read_command_list): Prevent being executed twice.
2017         (read_fs_list): Likewise.
2019         * include/grub/normal.h (grub_normal_execute): Updated the
2020         prototype.
2022 2009-03-22  Pavel Roskin  <proski@gno.org>
2024         * kern/powerpc/ieee1275/startup.S: Replace EXT_C(start) with
2025         _start.
2026         * kern/i386/pc/startup.S: Likewise.
2027         * kern/i386/efi/startup.S: Likewise.
2028         * kern/i386/ieee1275/startup.S: Likewise.
2029         * kern/i386/coreboot/startup.S: Likewise.
2030         * kern/x86_64/efi/startup.S: Likewise.
2032         * aclocal.m4 (grub_CHECK_START_SYMBOL): Remove.
2033         * configure.ac: Don't call grub_CHECK_START_SYMBOL.
2034         * kern/i386/pc/startup.S: Use _start instead of START_SYMBOL.
2036 2009-03-21  Vladimir Serbinenko  <phcoder@gmail.com>
2038         Bugfixes in multiboot for bugs uncovered by solaris kernel.
2040         * loader/i386/multiboot_elfxx.c (grub_multiboot_load_elf): Corrected
2041         limit detection.
2042         Use vaddr of correct segment for entry_point.
2044 2009-03-21  Bean  <bean123ch@gmail.com>
2046         * commands/blocklist.c: Add include file <grub/command.h>, remove
2047         <grub/normal.h> and <grub/arg.h>.
2048         (grub_cmd_blocklist): Use the new command interface.
2049         (GRUB_MOD_INIT): Likewise.
2050         (GRUB_MOD_FINI): Likewise.
2051         * commands/boot.c: Likewise.
2052         * commands/cat.c: Likewise.
2053         * commands/cmp.c: Likewise.
2054         * commands/configfile.c: Likewise.
2055         * commands/crc.c: Likewise.
2056         * commands/echo.c: Likewise.
2057         * commands/halt.c: Likewise.
2058         * commands/handler.c: Likewise.
2059         * commands/hdparm.c: Likewise.
2060         * commands/help.c: Likewise.
2061         * commands/hexdump.c: Likewise.
2062         * commands/loadenv.c: Likewise.
2063         * commands/ls.c: Likewise.
2064         * commands/lsmmap.c: Likewise.
2065         * commands/lspci.c: Likewise.
2066         * commands/loadenv.c: Likewise.
2067         * commands/read.c: Likewise.
2068         * commands/reboot.c: Likewise.
2069         * commands/search.c: Likewise.
2070         * commands/sleep.c: Likewise.
2071         * commands/test.c: Likewise.
2072         * commands/usbtest.c: Likewise.
2073         * commands/videotest.c: Likewise.
2074         * commands/i386/cpuid.c: Likewise.
2075         * commands/i386/pc/halt.c: Likewise.
2076         * commands/i386/pc/play.c: Likewise.
2077         * commands/i386/pc/pxecmd.c: Likewise.
2078         * commands/i386/pc/vbeinfo.c: Likewise.
2079         * commands/i386/pc/vbetest.c: Likewise.
2080         * commands/ieee1275/suspend.c: Likewise.
2081         * disk/loopback.c: Likewise.
2082         * font/font_cmd.c: Likewise.
2083         * hello/hello.c: Likewise.
2084         * loader/efi/appleloader.c: Likewise.
2085         * loader/efi/chainloader.c: Likewise.
2086         * loader/i386/bsd.c: Likewise.
2087         * loader/i386/efi/linux.c: Likewise.
2088         * loader/i386/ieee1275/linux.c: Likewise.
2089         * loader/i386/linux.c: Likewise.
2090         * loader/i386/pc/chainloader.c: Likewise.
2091         * loader/i386/pc/linux.c: Likewise.
2092         * loader/powerpc/ieee1275/linux.c: Likewise.
2093         * loader/multiboot_loader.c: Likewise.
2094         * term/gfxterm.c: Likewise.
2095         * term/i386/pc/serial.c: Likewise.
2096         * term/terminfo.c: Likewise.
2098         * term/i386/pc/vesafb.c: Removed <grub/arg.h>.
2099         * term/i386/pc/vga.c: Likewise.
2100         * video/readers/jpeg.c: Likewise.
2101         * video/readers/png.c: Likewise.
2102         * video/readers/tga.c: Likewise.
2104         * util/grub-fstest (cmd_loopback): Removed.
2105         (cmd_blocklist): Likewise.
2106         (cmd_ls): Likewise.
2107         (grub_register_command): Likewise.
2108         (grub_unregister_command): Likewise.
2109         (execute_command): Use grub_command_find to locate command and execute
2110         it.
2112         * include/grub/efi/chainloader.h: Removed.
2113         * loader/efi/chainloader_normal.c: Likewise.
2114         * loader/i386/bsd_normal.c: Likewise.
2115         * loader/i386/pc/chainloader_normal.c: Likewise.
2116         * loader/i386/pc/multiboot_normal.c: Likewise.
2117         * loader/linux_normal.c: Likewise.
2118         * loader/multiboot_loader_normal.c: Likewise.
2119         * loader/powerpc/ieee1275/linux_normal.c: Likewise.
2121         * gencmdlist.sh: Scan new registration command grub_register_extcmd
2122         and grub_register_command_p1.
2124         * conf/common.rmk (grub_fstest_SOURCES): Add kern/list.c,
2125         kern/command.c, lib/arg.c and commands/extcmd.c.
2126         (pkglib_MODULES): Remove boot.mod, and minicmd.mod and extcmd.mod.
2127         (minicmd_mod_SOURCES): New variable.
2128         (minicmd_mod_CFLAGS): Likewise.
2129         (minicmd_mod_LDFLAGS): Likewise.
2130         (extcmd_mod_SOURCES): Likewise.
2131         (extcmd_mod_CFLAGS): Likewise.
2132         (extcmd_mod_LDFLAGS): Likewise.
2133         (boot_mod_SOURCES): Removed.
2134         (boot_mod_CFLAGS): Likewise.
2135         (boot_mod_LDFLAGS): Likewise.
2137         * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/command.c and
2138         kern/corecmd.c.
2139         (kernel_img_HEADERS): Add command.h.
2140         (grub_emu_SOURCES): Remove commands/boot.c and normal/arg.c, add
2141         commands/minicmd.c, kern/command.c, kern/corecmd.c, commands/extcmd.c
2142         and lib/arg.c.
2143         (pkglib_MODULES): Change _linux.mod, _chain.mod, _bsd.mod and
2144         _multiboot.mod as linux.mod, chain.mod, bsd.mod and multiboot.mod,
2145         remove the corresponding normal mode command.
2146         (normal_mod_SOURCES): Remove normal/arg.c.
2147         * conf/i386-coreboot.rmk: Likewise.
2148         * conf/i386-efi.rmk: Likewise.
2149         * conf/i386-ieee1275.rmk: Likewise.
2150         * conf/powerpc-ieee1275.rmk: Likewise.
2151         * conf/x86_64-efi.rmk: Likewise.
2153         * include/grub/arg.h: Move from here ...
2154         * include/grub/lib/arg.h: ... to here.
2156         * normal/arg.c: Move from here ...
2157         * lib/arg.c: ... to here.
2159         * commands/extcmd.c: New file.
2160         * commands/minicmd.c: Likewise.
2161         * include/grub/command.h: Likewise.
2162         * include/grub/extcmd.h: Likewise.
2163         * kern/command.c: Likewise.
2164         * kern/corecmd.c: Likewise.
2166         * kern/list.c (grub_list_iterate): Return int instead of void.
2167         (grub_list_insert): New function.
2168         (grub_prio_list_insert): Likewise.
2170         * kern/rescue.c (grub_rescue_command): Removed.
2171         (grub_rescue_command_list): Likewise.
2172         (grub_rescue_register_command): Likewise.
2173         (grub_rescue_unregister_command): Likewise.
2174         (grub_rescue_cmd_boot): Move to minicmd.c
2175         (grub_rescue_cmd_help): Likewise.
2176         (grub_rescue_cmd_info): Likewise.
2177         (grub_rescue_cmd_boot): Likewise.
2178         (grub_rescue_cmd_testload): Likewise.
2179         (grub_rescue_cmd_dump): Likewise.
2180         (grub_rescue_cmd_rmmod): Likewise.
2181         (grub_rescue_cmd_lsmod): Likewise.
2182         (grub_rescue_cmd_exit): Likewise.
2183         (grub_rescue_print_devices): Moved to corecmd.c.
2184         (grub_rescue_print_files): Likewise.
2185         (grub_rescue_cmd_ls): Likewise.
2186         (grub_rescue_cmd_insmod): Likewise.
2187         (grub_rescue_cmd_set): Likewise.
2188         (grub_rescue_cmd_unset): Likewise.
2189         (attempt_normal_mode): Use grub_command_find to get normal module.
2190         (grub_enter_rescue_mode): Use grub_register_core_commands to register
2191         commands, remove grub_rescue_register_command calls.
2193         * normal/command.c (grub_register_command): Removed.
2194         (grub_unregister_command): Likewise.
2195         (grub_command_find): Likewise.
2196         (grub_iterate_commands): Likewise.
2197         (rescue_command): Likewise.
2198         (export_command): Moved to corecmd.c.
2199         (set_command): Removed.
2200         (unset_command): Likewise.
2201         (insmod_command): Likewise.
2202         (rmmod_command): Likewise.
2203         (lsmod_command): Likewise.
2204         (grub_command_init): Likewise.
2206         * normal/completion.c (iterate_command): Use cmd->prio to check for
2207         active command.
2208         (complete_arguments): Use grub_extcmd_t structure to find options.
2209         (grub_normal_do_completion): Change function grub_iterate_commands to
2210         grub_command_iterate.
2212         * normal/execute.c (grub_script_execute_cmd): No need to parse
2213         argument here.
2215         * normal/main.c (grub_dyncmd_dispatcher): New function.
2216         (read_command_list): Register unload commands as dyncmd.
2217         (grub_cmd_normal): Use new command interface, register rescue,
2218         unregister normal at entry, register normal, unregister rescue at exit.
2220         * include/grub/list.h (grub_list_test_t): New type.
2221         (grub_list_iterate): Return int instead of void.
2222         (grub_list_insert): New function.
2223         (GRUB_AS_NAMED_LIST_P): New macro.
2224         (GRUB_AS_PRIO_LIST): Likewise.
2225         (GRUB_AS_PRIO_LIST_P): Likewise.
2226         (GRUB_PRIO_LIST_PRIO_MASK): New constant.
2227         (GRUB_PRIO_LIST_FLAG_ACTIVE): Likewise.
2228         (grub_prio_list): New structure.
2229         (grub_prio_list_insert): New function.
2230         (grub_prio_list_remove): New inline function.
2232         * include/grub/normal.h: Remove <grub/arg.h>, add <grub/command.h>.
2233         (GRUB_COMMAND_FLAG_CMDLINE): Moved to command.h.
2234         (GRUB_COMMAND_FLAG_MENU): Likewise.
2235         (GRUB_COMMAND_FLAG_BOTH): Likewise.
2236         (GRUB_COMMAND_FLAG_TITLE): Likewise.
2237         (GRUB_COMMAND_FLAG_NO_ECHO): Likewise.
2238         (GRUB_COMMAND_FLAG_NO_ARG_PARSE): Removed.
2239         (GRUB_COMMAND_FLAG_NOT_LOADED): Likewise.
2240         (grub_command): Likewise.
2241         (grub_register_command): Likewise.
2242         (grub_command_find): Likewise.
2243         (grub_iterate_commands): Likewise.
2244         (grub_command_init): Likewise.
2245         (grub_arg_parse): Likewise.
2246         (grub_arg_show_help): Likewise.
2248         * include/grub/rescue.h (grub_rescue_register_command): Removed.
2249         (grub_rescue_unregister_command): Likewise.
2251         * include/grub/i386/bsd.h: Remove grub_rescue_cmd_freebsd,
2252         grub_rescue_cmd_openbsd, grub_rescue_cmd_netbsd,
2253         grub_rescue_cmd_freebsd_loadenv and grub_rescue_cmd_freebsd_module.
2255         * include/grub/i386/efi/loader.h: Remove grub_rescue_cmd_linux and
2256         grub_rescue_cmd_initrd.
2257         * include/grub/i386/loader.h: Likewise.
2258         * include/grub/x86_64/loader.h: Likewise.
2260         * include/grub/i386/pc/chainloader.h: Remove grub_chainloader_cmd.
2262 2009-03-21  Bean  <bean123ch@gmail.com>
2264         * util/hostdisk.c (read_device_map): Use grub_util_get_disk_size
2265         instead of stat in mingw environment.
2267         * util/misc.c (grub_millisleep): Use Sleep in mingw environment.
2269         * aclocal.m4 (grub_CHECK_LINK_DIR): New function.
2271         * configure.ac: Use grub_CHECK_LINK_DIR to determine whether to use
2272         AC_CONFIG_LINKS.
2274 2009-03-21  Bean  <bean123ch@gmail.com>
2276         * fs/ext2.c (grub_ext2_mount): Change errno to GRUB_ERR_BAD_FS for
2277         out of range error.
2279 2009-03-18  Michel Dänzer  <michel@daenzer.net>
2281         * fs/ext2.c (grub_ext2_read_block): Take endianness into account when
2282         checking inode flags for EXT4_EXTENTS_FLAG.
2284 2009-03-18  Robert Millan  <rmh@aybabtu.com>
2286         * loader/i386/linux.c: Include `<grub/video.h>' and
2287         `<grub/i386/pc/vbe.h>'..
2288         (grub_linux_setup_video): New function.  Loosely based on the EFI one.
2289         (grub_linux32_boot): Attempt to configure video settings with
2290         grub_linux_setup_video().
2291         (grub_rescue_cmd_linux): Set noreturn=0 in grub_loader_set, in order
2292         to avoid grub_console_fini() which would step out of graphical mode
2293         unconditionally.
2295 2009-03-14  Robert Millan  <rmh@aybabtu.com>
2297         Fix build on powerpc.
2298         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Add `handler.h'.
2300 2009-03-12  Vladimir Serbinenko  <phcoder@gmail.com>
2302         * term/gfxterm.c (GRUB_MOD_FINI(term_gfxterm)): Correct name of
2303         background image command.
2305 2009-03-12  Colin D Bennett  <colin@gibibit.com>
2307         * term/gfxterm.c (draw_cursor): Ensure character is redrawn.
2308         (grub_gfxterm_putchar): Extract pairs of identical calls to
2309         draw_cursor out of conditional blocks.
2311 2009-03-11  Pavel Roskin  <proski@gnu.org>
2313         * fs/hfs.c (grub_hfs_strncasecmp): New function.
2314         (grub_hfs_cmp_catkeys): Use HFS specific string comparison.
2316 2009-03-11  Robert Millan  <rmh@aybabtu.com>
2318         * loader/i386/multiboot_elfxx.c
2319         (CONCAT(grub_multiboot_load_elf, XX)): Do not reject ET_DYN files.
2321 2009-03-11  Felix Zielcke  <fzielcke@z-51.de>
2323         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add `kern/list.c' and
2324         `kern/handler.c'.
2326 2009-03-11  Robert Millan  <rmh@aybabtu.com>
2328         * loader/i386/multiboot.c (code_size): New variable.
2329         (grub_multiboot): Define offsets by adding to `code_size' rather
2330         than subtracting from `grub_multiboot_payload_size'.  Provide
2331         4-byte alignment to MBI and others by increasing
2332         `boot_loader_name_length' appropriately.
2334         * loader/i386/multiboot_elfxx.c
2335         (CONCAT(grub_multiboot_load_elf, XX)): Initialize `code_size'.
2337 2009-03-09  Felix Zielcke  <fzielcke@z-51.de>
2339         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove duplicated
2340         `fs/ext2.c'.
2342 2009-03-08  Robert Millan  <rmh@aybabtu.com>
2344         Make loader/i386/linux.c usable on i386-pc again.
2346         * kern/i386/pc/init.c (grub_machine_init): Disable addition of low
2347         memory to heap.
2348         * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (allocate_pages): Remove
2349         `#error' stanza.
2351 2009-03-07  Bean  <bean123ch@gmail.com>
2353         * loader/i386/efi/linux.c (grub_rescue_cmd_initrd): Fix a bug in initrd
2354         allocation.
2356 2009-03-06  Robert Millan  <rmh@aybabtu.com>
2358         Fix display issue on terminals with screen size other than 80x25
2359         (e.g. gfxterm with resolution higher than 640x480).
2361         * normal/main.c (grub_normal_init_page): Display title text in a
2362         position relative to the center of the terminal instead of relying
2363         on a hardcoded offset.
2365 2009-03-04  Robert Millan  <rmh@aybabtu.com>
2367         Filter /etc/grub.d/10_* so that only add-ons for native kernels are
2368         installed.
2370         * Makefile.in (host_kernel): New variable.
2371         * conf/common.rmk (grub-mkconfig_SCRIPTS): Conditionalize all 10_*.in
2372         scripts instead of just the windows one.
2373         * configure.ac: Initialize and AC_SUBST `host_kernel'.
2375 2009-03-04  Felix Zielcke  <fzielcke@z-51.de>
2377         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `kern/list.c' and
2378         `kern/handler.c'.
2379         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
2380         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
2381         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
2382         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2383         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2384         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2386 2009-03-04  Felix Zielcke  <fzielcke@z-51.de>
2388         * partmap/pc.c (pc_partition_map_iterate): Skip over invalid BSD partitions
2389         or if there's no space for the disk label and print the partition number on a
2390         invalid magic.
2392 2009-03-04  Felix Zielcke  <fzielcke@z-51.de>
2394         * util/misc.c: Include <time.h>.
2395         (grub_millisleep): New function.
2397 2009-03-04  Bean  <bean123ch@gmail.com>
2399         * configure.ac: Only test -mcmodel=large option in x86_64-efi, also add
2400         another option -mno-red-zone.
2402         * commands/handler.c: Change module description.
2404         * kern/handler.c: Add missing space at the end of description line.
2406         * kern/list.c: Likewise.
2408 2009-03-03  Robert Millan  <rmh@aybabtu.com>
2410         Move more components to the relocation area, and fix mbi pointer
2411         handling to use the destination rather than the origin (thanks to
2412         Vladimir Serbinenko for spotting).
2414         * loader/i386/multiboot.c (mbi_dest): New variable.
2415         (grub_multiboot_boot): Use `mbi_dest' instead of `mbi'.
2416         (grub_multiboot): Put cmdline, boot_loader_name and mbi in the
2417         relocation area.
2419 2009-03-01  Bean  <bean123ch@gmail.com>
2421         * include/grub/efi/api.h (GRUB_EFI_MPS_TABLE_GUID): New constant.
2422         (GRUB_EFI_ACPI_TABLE_GUID): Likewise.
2423         (GRUB_EFI_ACPI_20_TABLE_GUID): Likewise.
2424         (GRUB_EFI_SMBIOS_TABLE_GUID): Likewise.
2426         * loader/i386/efi/linux.c (acpi_guid): New variable.
2427         (acpi_guid): Likewise.
2428         (EBDA_SEG_ADDR): New constant.
2429         (LOW_MEM_ADDR): Likewise.
2430         (FAKE_EBDA_SEG): Likewise.
2431         (fake_bios_data): New function.
2432         (grub_linux_boot): Call fake_bios_data.
2434 2009-03-01  Bean  <bean123ch@gmail.com>
2436         * commands/terminal.c: Removed.
2438         * commands/handler.c: New file.
2440         * include/grub/list.h: Likewise.
2442         * include/grub/handler.h: Likewise.
2444         * kern/list.c: Likewise.
2446         * kern/handler.c: Likewise.
2448         * kern/term.h: Include header file <grub/handler.h>.
2449         (grub_term_input): Move next field to the beginning.
2450         (grub_term_output): Likewise.
2451         (grub_term_input_class): New variable.
2452         (grub_term_output_class): Likewise.
2453         (grub_term_register_input): Changed to inline function.
2454         (grub_term_register_output): Likewise.
2455         (grub_term_unregister_input): Likewise.
2456         (grub_term_unregister_output): Likewise.
2457         (grub_term_set_current_input): Likewise.
2458         (grub_term_set_current_output): Likewise.
2459         (grub_term_get_current_input): Likewise.
2460         (grub_term_get_current_output): Likewise.
2461         (grub_term_iterate_input): Removed.
2462         (grub_term_iterate_output): Likewise.
2464         * kern/term.c (grub_term_list_input): Removed.
2465         (grub_term_list_output): Likewise.
2466         (grub_term_input_class): New variable.
2467         (grub_term_output_class): Likewise.
2468         (grub_cur_term_input): Change variable as macro.
2469         (grub_cur_term_output): Likewise.
2470         (grub_term_register_input): Removed.
2471         (grub_term_register_output): Likewise.
2472         (grub_term_unregister_input): Likewise.
2473         (grub_term_unregister_output): Likewise.
2474         (grub_term_set_current_input): Likewise.
2475         (grub_term_set_current_output): Likewise.
2476         (grub_term_iterate_input): Likewise.
2477         (grub_term_iterate_output): Likewise.
2478         (grub_term_get_current_input): Likewise.
2479         (grub_term_get_current_output): Likewise.
2481         * util/grub-editenv.c: Include header file <grub/handler.h>.
2482         (grub_term_get_current_input): Removed.
2483         (grub_term_get_current_output): Likewise.
2484         (grub_term_input_class): New variable.
2485         (grub_term_output_class): Likewise.
2487         * util/grub-fstest.c (grub_term_get_current_input): Removed.
2488         (grub_term_get_current_output): Likewise.
2489         (grub_term_input_class): New variable.
2490         (grub_term_output_class): Likewise.
2492         * util/grub-probe.c (grub_term_get_current_input): Removed.
2493         (grub_term_get_current_output): Likewise.
2494         (grub_term_input_class): New variable.
2495         (grub_term_output_class): Likewise.
2497         * util/i386/pc/grub-setup.c (grub_term_get_current_input): Removed.
2498         (grub_term_get_current_output): Likewise.
2499         (grub_term_input_class): New variable.
2500         (grub_term_output_class): Likewise.
2502         * conf/common.rmk (pkglib_MODULES): Replace terminal with handler.
2503         (terminal_mod_SOURCES): Likewise.
2504         (terminal_mod_CFLAGS): Likewise.
2505         (terminal_mod_LDFLAGS): Likewise.
2507         * conf/i386-pc.rmk (grub_emu_SOURCES): Replace terminal.c with
2508         handler.c.
2509         (kernel_img_SOURCES): Add list.c and handler.c.
2510         (kernel_img_HEADERS): Add list.h and handler.h.
2512         * conf/i386-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
2513         handler.c.
2514         (kernel_mod_SOURCES): Add list.c and handler.c.
2515         (kernel_mod_HEADERS): Add list.h and handler.h.
2517         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Replace terminal.c with
2518         handler.c.
2519         (kernel_elf_SOURCES): Add list.c and handler.c.
2520         (kernel_elf_HEADERS): Add list.h and handler.h.
2522         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
2523         handler.c.
2524         (kernel_elf_SOURCES): Add list.c and handler.c.
2525         (kernel_elf_HEADERS): Add list.h and handler.h.
2527         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
2528         handler.c.
2529         (kernel_mod_SOURCES): Add list.c and handler.c.
2530         (kernel_mod_HEADERS): Add list.h and handler.h.
2532         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
2533         handler.c.
2534         (kernel_elf_SOURCES): Add list.c and handler.c.
2535         (kernel_elf_HEADERS): Add list.h and handler.h.
2537 2009-02-27  Robert Millan  <rmh@aybabtu.com>
2539         Factorize elf32 / elf64 code in Multiboot loader.  This will
2540         prevent it from getting out of sync again.
2542         * loader/i386/multiboot.c (grub_multiboot_is_elf32,
2543         grub_multiboot_load_elf32, grub_multiboot_is_elf64,
2544         grub_multiboot_load_elf64): Move from here ...
2545         * loader/i386/multiboot_elfxx.c (grub_multiboot_is_elf,
2546         grub_multiboot_load_elf): ... to here (new file).
2548 2009-02-27  Robert Millan  <rmh@aybabtu.com>
2550         * util/grub.d/10_linux.in: Rename "single-user mode" to
2551         "recovery mode".
2553 2009-02-27  Vladimir Serbinenko  <phcoder@gmail.com>
2555         Don't leak in SCSI code.
2556         * disk/scsi.c (grub_scsi_close): free `scsi'.
2558 2009-02-27  Robert Millan  <rmh@aybabtu.com>
2560         * loader/i386/pc/multiboot.c: Move from here ...
2561         * loader/i386/multiboot.c: ... to here.  Update all users.
2563 2009-02-27  Robert Millan  <rmh@aybabtu.com>
2565         Patch from Alexandre Bique <bique.alexandre@gmail.com>
2566         * util/i386/pc/grub-setup.c (setup): Fix directory path.
2568 2009-02-27  Krzysztof Smiechowicz  <deadwood@wp.pl>
2570         * fs/sfs.c (grub_sfs_read_extent): Correction to traversing extent
2571         b-tree.
2573 2009-02-27  Robert Millan  <rmh@aybabtu.com>
2575         * kern/misc.c (grub_strtoull): Fix bug (it mistakenly parsed the
2576         `0x' qualifier as 0 when base is specified as parameter).
2578 2009-02-24  Bean  <bean123ch@gmail.com>
2580         * configure.ac: Check for -mcmodel=large in x86_64 target.
2582         * include/grub/efi/api.h (efi_call_10): New macro.
2583         (efi_wrap_10): New function.
2585         * include/grub/efi/pe32.h (GRUB_PE32_REL_BASE_HIGH): New macro.
2586         (GRUB_PE32_REL_BASED_HIGH): Likewise.
2587         (GRUB_PE32_REL_BASED_LOW): Likewise.
2588         (GRUB_PE32_REL_BASED_HIGHLOW): Likewise.
2589         (GRUB_PE32_REL_BASED_HIGHADJ): Likewise.
2590         (GRUB_PE32_REL_BASED_MIPS_JMPADDR): Likewise.
2591         (GRUB_PE32_REL_BASED_SECTION): Likewise.
2592         (GRUB_PE32_REL_BASED_REL): Likewise.
2593         (GRUB_PE32_REL_BASED_IA64_IMM64): Likewise.
2594         (GRUB_PE32_REL_BASED_DIR64): Likewise.
2595         (GRUB_PE32_REL_BASED_HIGH3ADJ): Likewise.
2597         * kern/x86_64/dl.c (grub_arch_dl_relocate_symbols): Fixed relocation
2598         issue.
2600         * kern/x86_64/efi/callwrap.S (efi_wrap_6): Bug fix.
2601         (efi_wrap_10): New function.
2603         * kern/x86_64/efi/startup.S (codestart): Use relative addressing.
2605         * loader/efi/appleloader.c (devpath_5): Add support for late 2008
2606         MB/MBP model (NV chipset).
2607         (devdata_devs): Add devpath_5 to the list.
2609         * load/i386/efi/linux.c (video_base): Remove variable.
2610         (RGB_MASK): New macro.
2611         (RGB_MAGIC): Likewise.
2612         (LINE_MIN): Likewise.
2613         (LINE_MAX): Likewise.
2614         (FBTEST_STEP): Likewise.
2615         (FBTEST_COUNT): Likewise.
2616         (fb_list): New variable.
2617         (grub_find_video_card): Remove function.
2618         (find_framebuf): New function.
2619         (grub_linux_setup_video): Use find_framebuf to get frame buffer and
2620         line length.
2622         * util/i386/efi/grub-mkimage.c (grub_reloc_section): Fix relocation
2623         problem for x86_64.
2625 2009-02-22  Vesa Jääskeläinen  <chaac@nic.fi>
2627         Patch #25624 by Kevin Lacquement <kevin@lacqui>.
2629         * util/grub-mkconfig.in: Use ${grub_mkdevicemap} instead of hard
2630         coding tool name.
2632 2009-02-22  Robert Millan  <rmh@aybabtu.com>
2634         * include/multiboot.h (MULTIBOOT_INFO_ALIGN): New macro.
2635         * loader/i386/pc/multiboot.c (grub_multiboot): Include the MBI
2636         in our relocation, instead of using it directly from heap.  Also
2637         use `MULTIBOOT_INFO_ALIGN' to ensure it is aligned.
2639 2009-02-21  Robert Millan  <rmh@aybabtu.com>
2641         Implement USB keyboard support (based on patch by Marco Gerards)
2643         * conf/i386-pc.rmk (pkglib_MODULES): Add `usb_keyboard.mod'.
2644         (usb_keyboard_mod_SOURCES, usb_keyboard_mod_CFLAGS)
2645         (usb_keyboard_mod_LDFLAGS): New variables.
2647         * term/usb_keyboard.c: New file.
2649 2009-02-14  Vladimir Serbinenko  <phcoder@gmail.com>
2651         Corrected wrong declaration
2653         * kern/disk.c: corrected declaration of grub_disk_ata_pass_through.
2655 2009-02-14  Christian Franke  <franke@computer.org>
2657         * commands/lspci.c (grub_pci_classes): Add `SATA Controller'.
2658         (grub_lspci_iter): Print class code and programming interface byte.
2660 2009-02-14  Christian Franke  <franke@computer.org>
2662         * gendistlist.sh: Ignore `.svn' directories.
2664 2009-02-14  Felix Zielcke  <fzielcke@z-51.de>
2666         * fs/fat.c: Add 2009 to Copyright line.
2668 2009-02-14  Christian Franke  <franke@computer.org>
2670         * commands/hdparm.c: New file.  Provides `hdparm' command
2671         which sends ATA commands via grub_disk_ata_pass_through ().
2673         * conf/i386-pc.rmk: Add ata_pthru.mod and hdparm.mod.
2675         * disk/ata.c: Include <grub/ata.h>.  Move <grub/misc.h>
2676         and <grub/cpu/io.h> to include/grub/ata.h.
2677         (enum grub_ata_addressing_t): Move to include/grub/ata.h.
2678         (GRUB_CDROM_SECTOR_SIZE): Remove.
2679         (GRUB_ATA_*): Move to include/grub/ata.h.
2680         (GRUB_ATAPI_*): Likewise.
2681         (enum grub_ata_commands): Likewise.
2682         (enum grub_ata_timeout_milliseconds): Likewise.
2683         (struct grub_ata_device): Likewise.
2684         (grub_ata_regset): Likewise.
2685         (grub_ata_regget): Likewise.
2686         (grub_ata_regset2): Likewise.
2687         (grub_ata_regget2): Likewise.
2688         (grub_ata_check_ready): Likewise.
2689         (grub_ata_wait_not_busy): Remove static, exported in
2690         include/grub/ata.h.
2691         (grub_ata_wait_drq): Likewise.
2692         (grub_ata_pio_read): Likewise.
2694         * disk/ata_pthru.c: New file.  Provides grub_ata_pass_through ()
2695         function for hdparm.mod.
2697         * include/grub/ata.h: New file, contains declarations from
2698         disk/ata.c.
2699         (enum grub_ata_commands): Add new commands for commands/hdparm.c.
2701         * include/grub/disk.h (grub_disk_ata_pass_through_parms): New struct.
2702         (grub_disk_ata_pass_through): New exported variable.
2704         * kern/disk.c (grub_disk_ata_pass_through): New variable.
2706 2009-02-13  Colin D Bennett  <colin@gibibit.com>
2708         Support multiple fallback entries, and provide an API to support
2709         executing default+fallback menu entries.  Renamed the `terminal' menu
2710         viewer to `text'.
2712         * include/grub/normal.h (grub_normal_text_menu_viewer): New global
2713         variable declaration.
2714         (grub_menu_execute_callback): New structure declaration.
2715         (grub_menu_execute_callback_t): New typedef.
2716         (grub_menu_execute_with_fallback): New function declaration.
2717         (grub_menu_get_entry): Likewise.
2718         (grub_menu_get_timeout): Likewise.
2719         (grub_menu_set_timeout): Likewise.
2721         * normal/main.c (GRUB_MOD_INIT(normal)): Refer to new variable name.
2723         * normal/menu.c (grub_wait_after_message): Moved to
2724         `normal/menu_text.c'.
2725         (draw_border): Likewise.
2726         (print_message): Likewise.
2727         (print_entry): Likewise.
2728         (print_entries): Likewise.
2729         (grub_menu_init_page): Likewise.
2730         (get_entry_number): Likewise.
2731         (print_timeout): Likewise.
2732         (run_menu): Likewise.
2733         (grub_menu_execute_entry): Likewise.
2734         (show_text_menu): Likewise.
2735         (get_and_remove_first_entry_number): New function.
2736         (grub_menu_execute_with_fallback): Likewise.
2737         (get_entry): Renamed to ...
2738         (grub_menu_get_entry): .. this and made it global.
2739         (get_timeout): Renamed to ...
2740         (grub_menu_get_timeout): ... this and made it global.
2741         (set_timeout): Renamed to ...
2742         (grub_menu_set_timeout): ... this and made it global.
2743         (grub_normal_terminal_menu_viewer): Renamed to ...
2744         (grub_normal_text_menu_viewer): ... this.
2746         * normal/menu_text.c: New file.  Extracted text-menu-specific code
2747         from normal/menu.c.
2749         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add `normal/menu_text.c'.
2750         (normal_mod_SOURCES): Likewise.
2752         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
2753         (normal_mod_SOURCES): Likewise.
2755         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2756         (normal_mod_SOURCES): Likewise.
2758         * conf/i386-pc.rmk, (grub_emu_SOURCES): Likewise.
2759         (normal_mod_SOURCES): Likewise.
2761         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2762         (normal_mod_SOURCES): Likewise.
2764         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2765         (normal_mod_SOURCES): Likewise.
2767         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
2768         (normal_mod_SOURCES): Likewise.
2770 2009-02-11  Robert Millan  <rmh@aybabtu.com>
2772         * util/grub.d/00_header.in: Update old reference to `font' command.
2774 2009-02-10  Felix Zielcke  <fzielcke@z-51.de>
2776         * fs/fat.c (grub_fat_mount): Fix wrong comparison.
2778         Based on patch from Javier Martín.
2780 2009-02-09  Felix Zielcke  <fzielcke@z-51.de>
2782         * conf/common.rmk (grub_probe_SOURCES): Move fs/ext2.c before fs/fat.c
2783         to avoid false positives with FAT.
2784         (grub_fstest_SOURCES): Likewise.
2785         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
2786         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
2787         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2788         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
2789         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2790         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2792 2009-02-09  Felix Zielcke  <fzielcke@z-51.de>
2794         * fs/fat.c (grub_fat_mount): Try to avoid false positives by checking
2795         bpb.version_specific.fat12_or_fat16.fstype and
2796         bpb.version_specific.fat32.fstype.
2798 2009-02-08  Robert Millan  <rmh@aybabtu.com>
2800         * fs/tar.c: Replace "fs/cpio.c" with "cpio.c".
2802 2009-02-08  Robert Millan  <rmh@aybabtu.com>
2804         * Makefile.in (host_os, host_cpu): New variables.
2805         (target_os): Remove.  Update all users.
2807 2009-02-08  Marco Gerards  <marco@gnu.org>
2809         * Makefile.in (enable_grub_emu_usb): New variable.
2810         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/scsi.c'.
2811         (grub_emu_SOURCES) [grub_emu_SOURCES]: Add `disk/usbms.c',
2812         `util/usb.c', `bus/usb/usb.c' and `commands/usbtest.c'.
2813         (grub_emu_LDFLAGS): Add `$(LIBUSB)'.
2814         (pkglib_MODULES): Add `usb.mod', `uhci.mod', `ohci.mod',
2815         `usbtest.mod' and `usbms.mod'.
2816         (usb_mod_SOURCES, usb_mod_CFLAGS, usb_mod_LDFLAGS)
2817         (usbtest_mod_SOURCES, usbtest_mod_CFLAGS, usbtest_mod_LDFLAGS)
2818         (uhci_mod_SOURCES, uhci_mod_CFLAGS, uhci_mod_LDFLAGS,
2819         (ohci_mod_SOURCES, ohci_mod_CFLAGS, ohci_mod_LDFLAGS)
2820         (usbms_mod_SOURCES, usbms_mod_CFLAGS, usbms_mod_LDFLAGS): New
2821         variables.
2823         * disk/usbms.c: New file.
2825         * include/grub/usb.h: Likewise.
2827         * include/grub/usbtrans.h: Likewise.
2829         * include/grub/usbdesc.h: Likewise.
2831         * bus/usb/usbtrans.c: Likewise.
2833         * bus/usb/ohci.c: Likewise.
2835         * bus/usb/uhci.c: Likewise.
2837         * bus/usb/usbhub.c: Likewise.
2839         * bus/usb/usb.c: Likewise.
2841         * commands/usbtest.c: Likewise.
2843         * util/usb.c: Likewise.
2845         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_IO'.
2847         * configure.ac: Test for libusb presence.
2849         * util/grub-emu.c (main) [HAVE_LIBUSB_H]: Call `grub_libusb_init'.
2851 2009-02-08  Vesa Jääskeläinen  <chaac@nic.fi>
2853         * kern/mm.c: Add more comments.
2855 2009-02-08  Robert Millan  <rmh@aybabtu.com>
2857         Patch from Javier Martín.
2858         * fs/ext2.c (EXT2_DRIVER_SUPPORTED_INCOMPAT): Add
2859         `EXT4_FEATURE_INCOMPAT_FLEX_BG'.
2861 2009-02-08  Robert Millan  <rmh@aybabtu.com>
2863         * fs/cpio.c: Split tar functionality to ...
2864         * fs/tar.c: ... here (new file).  Update all users.
2866 2009-02-07  Robert Millan  <rmh@aybabtu.com>
2868         * fs/ext2.c (grub_ext2_mount): Avoid mounting filesystems with
2869         backward-incompatible features.
2871         Based on patch from Javier Martín, with some adjustments.
2873 2009-02-07  Michael Scherer  <misc@mandriva.org>
2875         * fs/hfs.c (grub_hfsplus_iterate_dir): Treat hfs+ as case insensitive.
2877 2009-02-07  Robert Millan  <rmh@aybabtu.com>
2879         * conf/common.rmk (grub_probe_SOURCES, grub_fstest_SOURCES): Move
2880         position of `disk/lvm.c' to ensure grub_init_all() always picks it
2881         after the RAID stuff.
2883 2009-02-05  Vesa Jääskeläinen  <chaac@nic.fi>
2885         Fixes problem when running vbetest command as reported by
2886         Vladimir Serbinenko <phcoder@gmail.com>.
2888         * (grub_vbe_set_video_mode): Fixed problem with text modes.
2890 2009-02-04  Felix Zielcke  <fzielcke@z-51.de>
2892         util/getroot.c (grub_util_get_grub_dev): Add support for /dev/mdNpN and
2893         /dev/md/NpN style mdraid devices.
2895 2009-02-03  Felix Zielcke  <fzielcke@z-51.de>
2897         * util/unifont2pff.rb: Remove.
2899 2009-02-03  Felix Zielcke  <fzielcke@z-51.de>
2901         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add a missing trailing
2902         `#'.
2904 2009-02-03  Felix Zielcke  <fzielcke@z-51.de>
2906         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/menu_viewer.c'.
2907         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
2908         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
2909         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
2910         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2911         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2912         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2914 2009-02-02  Christian Franke  <franke@computer.org>
2916         * lib/hexdump.c (hexdump): Print at most 3 lines if data is identical.
2918 2009-02-01  Felix Zielcke  <fzielcke@z-51.de>
2920         * INSTALL: Note that we now require at least autoconf 2.59 and
2921         that LZO is optional.
2923 2009-02-01  Vesa Jääskeläinen  <chaac@nic.fi>
2925         Base on patch on bug #24154 created by Tomas Tintera
2926         <trosos@seznam.cz>.
2928         * video/i386/pc/vbe.c (grub_video_vbe_scroll): Fix downward scrolling.
2930 2009-02-01  Vesa Jääskeläinen  <chaac@nic.fi>
2932         Based on patch on bug #25318 created by Bernhard Rosenkraenzer
2933         <bero@arklinux.org>.
2935         * normal/parser.y (script_init): Add missing semicolon.
2937 2009-01-31  Colin D Bennett  <colin@gibibit.com>
2939         * normal/main.c: Add include to grub/menu_viewer.h.
2940         (free_menu_entry_classes): Added.
2941         (grub_normal_menu_addentry): Added class property handling.
2942         (grub_normal_execute): Changed to use new menu viewer for menu viewing.
2943         (GRUB_MOD_INIT(normal)): Added register for text based menu viewer.
2945         * normal/menu_viewer.c: New file.
2947         * normal/menu.c (run_menu_entry): Renamed to ...
2948         (grub_menu_execute_entry): ... this and made it as global.
2949         (grub_menu_run): Renamed to ...
2950         (show_text_menu): ... this and made it local.
2951         (show_text_menu): Adapt to new function names.
2952         (grub_normal_terminal_menu_viewer): New global variable.
2954         * include/grub/menu.h: New file.
2956         * include/grub/menu_viewer.h: New file.
2958         * include/grub/normal.h: Added include to grub/menu.h.
2959         (grub_menu_entry): Moved to include/grub/menu.h.
2960         (grub_menu_entry_t): Likewise.
2961         (grub_menu): Likewise.
2962         (grub_menu_t): Likewise.
2963         (grub_normal_terminal_menu_viewer): Added.
2964         (grub_menu_execute_entry): Likewise.
2965         (grub_menu_run): Removed.
2967         * DISTLIST: Added include/grub/menu.h.
2968         Added include/grub/menu_viewer.h.
2969         Added normal/menu_viewer.c.
2971 2009-01-31  Vesa Jääskeläinen  <chaac@nic.fi>
2973         * normal/execute.c (grub_script_execute_menuentry): Changed to use
2974         arglist for menutitle arguments.
2976         * normal/main.c (grub_normal_menu_addentry): Likewise.
2978         * normal/parser.y (menuentry): Likewise.
2980         * normal/script.c (grub_script_create_cmdmenu): Likewise.
2982         * include/grub/script.h (grub_script_cmd_menuentry): Likewise.
2983         (grub_script_create_cmdmenu): Likewise.
2985         * include/grub/normal.h (grub_normal_menu_addentry): Likewise.
2987         * conf/i386-pc.rmk (normal_mod_SOURCES): Adapt Colin D Bennett's
2988         changes.
2990         * conf/x86_64-efi.rmk (normal_mod_SOURCES): Likewise.
2992         * conf/i386-coreboot.rmk (normal_mod_SOURCES): Likewise.
2994         * conf/i386-efi.rmk (normal_mod_SOURCES): Likewise.
2996         * conf/i386-ieee1275.rmk (normal_mod_SOURCES): Likewise.
2998         * conf/powerpc-ieee1275.rmk (normal_mod_SOURCES): Likewise.
3000         * conf/sparc64-ieee1275.rmk (normal_mod_SOURCES): Likewise.
3002 2009-01-30  Christian Franke  <franke@computer.org>
3004         * normal/arg.c (grub_arg_show_help): Add indentation if '\n' appears
3005         in option help text.
3007 2009-01-27  Pavel Roskin  <proski@gnu.org>
3009         * disk/fs_uuid.c (search_fs_uuid): Ignore case of the UUID.
3011 2009-01-27  Vesa Jääskeläinen  <chaac@nic.fi>
3013         * commands/lsmmap.c: Add include to grub/machine/memory.h.
3015         * fs/i386/pc/pxe.c (grub_pxefs_open): Fix sign problem.
3017         * term/i386/pc/at_keyboard.c (GRUB_MOD_FINI(at_keyboard)): Use proper
3018         unregister function.
3020 2009-01-27  Vesa Jääskeläinen  <chaac@nic.fi>
3022         * disk/scsi.c (grub_scsi_read): Fix sign problem.
3024         * term/i386/pc/vga_text.c (grub_vga_text_init_fini). Fix declaration.
3026         * util/grub-mkfont.c (usage): Fix typo.
3028         * util/elf/grub-mkimage.c (load_modules): Fix warning.
3030 2009-01-26  Daniel Mierswa  <impulze@impulze.org>
3032         * fs/fat.c (grub_fat_uuid): Fix shift of the first two bytes.
3034         * commands/search.c (search_fs_uuid): Ignore case of the UUID.
3036         * kern/misc.c (grub_strcasecmp): New function.
3037         (grub_strcasecmp): Use grub_size_t instead of int for length.
3038         Fix return value.
3039         * include/grub/misc.h: Update function prototypes.
3041 2009-01-26  Robert Millan  <rmh@aybabtu.com>
3043         * configure.ac: Fix cross-compilation check.
3045 2009-01-22  Christian Franke  <franke@computer.org>
3047         * kern/misc.c (grub_vsprintf): Fix size and termination of `format2'
3048         (precision) digit string.  Allow `.format2' without `format1' (width).
3049         Limit input chars for `%s' output to `format2' if specified.  This is
3050         compatible with standard printf ().
3052 2009-01-22  Christian Franke  <franke@computer.org>
3054         * disk/ata.c (grub_ata_wait_status): Replace by ...
3055         (grub_ata_wait_not_busy): ... this function.  Checks only BSY bit,
3056         other status bits may be invalid while BSY is asserted.
3057         (grub_ata_check_ready): New function.
3058         (grub_ata_cmd): Removed.
3059         (grub_ata_wait_drq): New function.
3060         (grub_ata_strncpy): Remove inline.
3061         (grub_ata_pio_read): Reduce to actual block transfer.  BSY wait
3062         and error check now done by grub_ata_wait_drq ().
3063         (grub_ata_pio_write): Likewise.
3064         (grub_atapi_identify): Set DEV before check for !BSY.  Use
3065         grub_ata_wait_drq () to wait for data.
3066         (grub_ata_device_initialize): Add status register check to
3067         detect missing SATA slave devices.  Add debug messages.
3068         (grub_atapi_wait_drq): Use grub_ata_wait_not_busy ().
3069         (grub_atapi_packet): Set DEV before check for !BSY.  Replace
3070         transfer loop by grub_ata_pio_write ().
3071         (grub_ata_identify): Set DEV before check for !BSY. Use
3072         grub_ata_wait_drq () to wait for data.
3073         (grub_ata_setaddress): Set DEV before check for !BSY.
3074         (grub_ata_readwrite): Remove duplicate code, handle batch/rest and
3075         read/write in one loop.  Fix invalid command on write.  Fix incomplete
3076         command on (size % batch) == 0.  Add missing error check after write of
3077         last block.  Add debug messages.
3078         (grub_atapi_read):  Replace transfer loop by grub_ata_pio_read ().
3080 2009-01-19  Christian Franke  <franke@computer.org>
3082         * disk/ata.c (GRUB_ATAPI_REG_*): New defines.
3083         (GRUB_ATAPI_IREASON_*): Likewise.
3084         (grub_ata_pio_write): Fix timeout error return.
3085         (grub_atapi_identify): Add grub_ata_wait () after cmd.
3086         (grub_atapi_wait_drq): New function.
3087         (grub_atapi_packet): New parameter `size'.
3088         Use grub_atapi_wait_drq () and direct write instead of
3089         grub_ata_pio_write ().
3090         (grub_atapi_read): Replace grub_ata_pio_read () by a loop which
3091         reads the number of bytes requested by the device for each DRQ
3092         assertion.
3093         (grub_atapi_write): Remove old implementation, return not
3094         implemented instead.
3096 2009-01-19  Christian Franke  <franke@computer.org>
3098         * disk/scsi.c (grub_scsi_read10): Use scsi->blocksize instead
3099         of 512 to calculate data size.
3100         (grub_scsi_read12): Likewise.
3101         (grub_scsi_write10): Likewise.
3102         (grub_scsi_write12): Likewise.
3103         (grub_scsi_read): Adjust size according to blocksize.
3104         Add checks for invalid blocksize and unaligned transfer.
3106 2009-01-19  Vesa Jääskeläinen  <chaac@nic.fi>
3108         * font/font.c (grub_font_loader_init): Re-position unknown glyph.
3110         * term/gfxterm.c (write_char): Fix background rendering for wide
3111         width glyphs.
3113 2009-01-19  Robert Millan  <rmh@aybabtu.com>
3115         * config.guess: Update to latest version from config git.
3116         * config.sub: Likewise.
3118 2009-01-17  Felix Zielcke  <fzielcke@z-51.de>
3120         * Makefile.in: Change font compilation to use new grub-mkfont instead
3121         of java version.
3123         * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: Remove.
3124         * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
3125         * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
3126         * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
3127         * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
3128         * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
3129         * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
3130         * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
3131         * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
3133 2009-01-16  Christian Franke  <franke@computer.org>
3135         * disk/ata.c (enum grub_ata_commands): Remove EXEC_DEV_DIAGNOSTICS.
3136         (enum grub_ata_timeout_milliseconds): New enum.
3137         (grub_ata_wait_status): Add parameter milliseconds.
3138         (grub_ata_cmd): Remove variable `err'.  Remove wait for !DRQ to allow
3139         recovery from timed-out commands.
3140         (grub_ata_pio_read): Add parameter milliseconds.  Fix error return,
3141         return grub_errno instead of REG_ERROR.
3142         (grub_ata_pio_write): Add parameter milliseconds.
3143         (grub_atapi_identify): Fix size of ATAPI IDENTIFY sector.
3144         Pass milliseconds to grub_ata_wait_status () and
3145         grub_ata_pio_read ().
3146         (grub_atapi_packet): Pass milliseconds to grub_ata_pio_write ().
3147         (grub_ata_identify): Remove variable `ataerr'.  Pass milliseconds to
3148         grub_ata_wait_status ().  Fix IDENTIFY timeout check.
3149         (grub_ata_device_initialize): Remove EXECUTE DEVICE DIAGNOSTICS.
3150         It is not suitable for device detection, because DEV bit is ignored,
3151         the command may run too long, and not all devices set the signature
3152         properly.
3153         (grub_ata_pciinit): Clear grub_errno before grub_ata_device_initialize ().
3154         (grub_ata_setaddress): Pass milliseconds to grub_ata_wait_status ().
3155         Fix device selection, DEV bit must be set first to address the registers
3156         of the correct device.
3157         (grub_ata_readwrite): Pass milliseconds to grub_ata_wait_status () and
3158         grub_ata_pio_read/write ().
3159         (grub_atapi_read): Pass milliseconds to grub_ata_pio_read ().
3160         (grub_atapi_write): Pass milliseconds to grub_ata_pio_write ().
3162 2009-01-13  Carles Pina i Estany  <carles@pina.cat>
3164         * util/grub-editenv.c (main): Use fseeko(), not fseek().
3166 2009-01-13  Bean  <bean123ch@gmail.com>
3168         * util/grub-mkfont.c (write_font): forget to remove some debug code.
3170 2009-01-13  Bean  <bean123ch@gmail.com>
3172         * Makefile.in: (enable_grub_mkfont): New variable.
3173         (freetype_cflags): Likewise.
3174         (freetype_libs): Likewise.
3176         * common.rmk (bin_UTILITIES): Add `grub-mkfont' if requested.
3177         (grub_mkfont_SOURCES): New variable.
3178         (grub_mkfont_CFLAGS): Likewise.
3179         (grub_mkfont_LDFLAGS): Likewise.
3181         * configure.ac (--enable-grub-mkfont): New option. Check for freetype2
3182         library if `--enable-grub-mkfont' is requested.
3183         (enable_grub_mkfont): New variable.
3184         (freetype_cflags): Likewise.
3185         (freetype_libs): Likewise.
3187         * util/grub-mkfont.c: New file.
3189 2009-01-12  Christian Franke  <franke@computer.org>
3191         * disk/ata.c (grub_ata_pciinit): Fix bit numbers of compatibility
3192         mode check.  Fix setting of compat_use[].
3194 2009-01-10  Robert Millan  <rmh@aybabtu.com>
3196         Update a few copyright years which we forgot to do in 2008 (only for
3197         files whose changes made in 2008 were copyright-significant)
3199         * Makefile.in: Add 2008 to Copyright line.
3200         * disk/ieee1275/ofdisk.c: Likewise.
3201         * disk/efi/efidisk.c: Likewise.
3202         * kern/dl.c: Likewise.
3203         * kern/sparc64/ieee1275/init.c: Likewise.
3204         * kern/mm.c: Likewise.
3205         * kern/efi/mm.c: Likewise.
3206         * boot/i386/pc/boot.S: Likewise.
3207         * genfslist.sh: Likewise.
3208         * fs/iso9660.c: Likewise.
3209         * fs/hfs.c: Likewise.
3210         * fs/jfs.c: Likewise.
3211         * fs/minix.c: Likewise.
3212         * fs/ufs.c: Likewise.
3213         * gensymlist.sh.in: Likewise.
3214         * genkernsyms.sh.in: Likewise.
3215         * include/grub/misc.h: Likewise.
3216         * include/grub/types.h: Likewise.
3217         * include/grub/symbol.h: Likewise.
3218         * include/grub/elf.h: Likewise.
3219         * include/grub/kernel.h: Likewise.
3220         * include/grub/disk.h: Likewise.
3221         * include/grub/dl.h: Likewise.
3222         * include/grub/i386/linux.h: Likewise.
3223         * include/grub/i386/pc/biosdisk.h: Likewise.
3224         * include/grub/efi/api.h: Likewise.
3225         * include/grub/efi/pe32.h: Likewise.
3226         * include/grub/util/misc.h: Likewise.
3227         * normal/execute.c: Likewise.
3228         * normal/arg.c: Likewise.
3229         * normal/completion.c: Likewise.
3230         * normal/lexer.c: Likewise.
3231         * normal/parser.y: Likewise.
3232         * normal/misc.c: Likewise.
3233         * commands/i386/pc/vbeinfo.c: Likewise.
3234         * commands/hexdump.c: Likewise.
3235         * commands/terminal.c: Likewise.
3236         * commands/ls.c: Likewise.
3237         * commands/help.c: Likewise.
3238         * partmap/pc.c: Likewise.
3239         * loader/efi/chainloader.c: Likewise.
3240         * loader/multiboot_loader.c: Likewise.
3241         * loader/i386/pc/multiboot2.c: Likewise.
3242         * term/efi/console.c: Likewise.
3243         * term/i386/pc/serial.c: Likewise.
3244         * util/lvm.c: Likewise.
3245         * util/console.c: Likewise.
3246         * util/i386/efi/grub-mkimage.c: Likewise.
3247         * util/raid.c: Likewise.
3249 2009-01-06  Vesa Jääskeläinen  <chaac@nic.fi>
3251         * commands/videotest.c: Removed include to grub/machine/memory.h.
3253         * conf/i386-pc.rmk (pkglib_MODULES): Removed video.mod, gfxterm.mod,
3254         videotest.mod, bitmap.mod, tga.mod, jpeg.mod, png.mod.
3255         (video_mod_SOURCES): Removed.
3256         (video_mod_CFLAGS): Likewise.
3257         (video_mod_LDFLAGS): Likewise.
3258         (gfxterm_mod_SOURCES): Likewise.
3259         (gfxterm_mod_CFLAGS): Likewise.
3260         (gfxterm_mod_LDFLAGS): Likewise.
3261         (videotest_mod_SOURCES): Likewise.
3262         (videotest_mod_CFLAGS): Likewise.
3263         (videotest_mod_LDFLAGS): Likewise.
3264         (bitmap_mod_SOURCES): Likewise.
3265         (bitmap_mod_CFLAGS): Likewise.
3266         (bitmap_mod_LDFLAGS): Likewise.
3267         (tga_mod_SOURCES): Likewise.
3268         (tga_mod_CFLAGS): Likewise.
3269         (tga_mod_LDFLAGS): Likewise.
3270         (jpeg_mod_SOURCES): Likewise.
3271         (jpeg_mod_CFLAGS): Likewise.
3272         (jpeg_mod_LDFLAGS): Likewise.
3273         (png_mod_SOURCES): Likewise.
3274         (png_mod_CFLAGS): Likewise.
3275         (png_mod_LDFLAGS): Likewise.
3277         * conf/common.rmk (pkglib_MODULES): Added video.mod, videotest.mod,
3278         bitmap.mod, tga.mod, jpeg.mod, png.mod, font.mod, gfxterm.mod
3279         (video_mod_SOURCES): Added.
3280         (video_mod_CFLAGS): Likewise.
3281         (video_mod_LDFLAGS): Likewise.
3282         (videotest_mod_SOURCES): Likewise.
3283         (videotest_mod_CFLAGS): Likewise.
3284         (videotest_mod_LDFLAGS): Likewise.
3285         (bitmap_mod_SOURCES): Likewise.
3286         (bitmap_mod_CFLAGS): Likewise.
3287         (bitmap_mod_LDFLAGS): Likewise.
3288         (tga_mod_SOURCES): Likewise.
3289         (tga_mod_CFLAGS): Likewise.
3290         (tga_mod_LDFLAGS): Likewise.
3291         (jpeg_mod_SOURCES): Likewise.
3292         (jpeg_mod_CFLAGS): Likewise.
3293         (jpeg_mod_LDFLAGS): Likewise.
3294         (png_mod_SOURCES): Likewise.
3295         (png_mod_CFLAGS): Likewise.
3296         (png_mod_LDFLAGS): Likewise.
3297         (gfxterm_mod_SOURCES): Likewise.
3298         (gfxterm_mod_CFLAGS): Likewise.
3299         (gfxterm_mod_LDFLAGS): Likewise.
3301         * term/gfxterm.c: Removed include to grub/machine/memory.h,
3302         grub/machine/console.h.
3304 2009-01-04  Jerone Young  <jerone@gmail.com>
3306         Make on screen instructions clearer
3308         Based on patch created by Jidanni <jidanni@jidanni.org>
3310         * normal/menu.c: print clearer instructions on the screen
3312 2009-01-02  Colin D Bennett  <colin@gibibit.com>
3314         New font engine.
3316         Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to
3317         build system and fixed gfxterm.c to work with different sized fonts.
3319         * configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF.
3321         * configure: Re-generated.
3323         * DISTLIST: Removed font/manager.c.
3324         Added font/font.c.
3325         Added font/font_cmd.c.
3327         * Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF.  Added Font tool
3328         compilation.
3330         * include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype.  Changed users.
3332         * kern/misc.c (grub_utf8_to_ucs4): Changed prototype.
3334         * kern/term.c: Changed users of grub_utf8_to_ucs4.
3336         * normal/menu.c: Likewise.
3338         * conf/common.rmk (font_mod_SOURCES): Removed font/manager.c.
3339         (font_mod_SOURCES): Added font/font_cmd.c, font/font.c.
3341         * include/grub/font.h: Replaced with new file.
3343         * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value.
3344         (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise.
3345         (GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise.
3346         (GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added.
3347         (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED.
3348         (grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha,
3349         fg_red, fg_green, fg_blue, fg_alpha.
3350         (grub_video_adapter): Removed blit_glyph.
3351         (grub_video_blit_glyph): Removed.
3353         * font/manager.c: Removed file.
3355         * font/font.c: New file.
3357         * font/font_cmd.c: Likewise.
3359         * video/video.c (grub_video_blit_glyph): Removed.
3361         * video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support.
3362         (grub_video_vbe_map_rgba): Likewise.
3363         (grub_video_vbe_unmap_color_int): Likewise.
3364         (grub_video_vbe_blit_glyph): Removed.
3365         (grub_video_vbe_adapter): Removed blit_glyph.
3367         * video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support.
3368         (get_pixel): Likewise.
3369         (set_pixel): Likewise.
3371         * commands/videotest.c (grub_cmd_videotest): Added more tests for fonts.
3373         * term/gfxterm.c: Adapted to new font engine.
3375         * term/i386/pc/vesafb.c: Marked as deprecated.  Made it compile.
3377         * term/i386/pc/vga.c: Likewise.
3379         * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file.
3381         * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
3383         * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
3385         * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
3387         * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
3389         * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
3391         * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
3393         * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
3395         * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
3397         * util/grub.d/00_header.in: Changed to use new loadfont command.
3399         * util/grub-mkconfig_lib.in: Changed font extension.
3401 2008-12-28  Felix Zielcke  <fzielcke@z-51.de>
3403         * util/getroot.c (grub_util_get_grub_dev): Add support for
3404         /dev/md/dNNpNN style partitionable mdraid devices.
3406 2008-12-12  Alex Smith  <alex@alex-smith.me.uk>
3408         * fs/i386/pc/pxe.c (grub_pxefs_open): Handle the one open connection
3409         at a time limit of the PXE TFTP API correctly.
3410         (grub_pxefs_close): Likewise.
3412 2008-11-29  Robert Millan  <rmh@aybabtu.com>
3414         * disk/ata.c (grub_ata_pciinit): Handle errors raised by
3415         grub_ata_device_initialize() calls.
3417 2008-11-28  Krzysztof Smiechowicz  <deadwood@wp.pl>
3419         * fs/affs.c (grub_affs_iterate_dir): Return failure when directory
3420         iteration failed.
3421         * fs/sfs.c (grub_sfs_iterate_dir): Likewise.
3423 2008-11-28  Robert Millan  <rmh@aybabtu.com>
3425         Fix build on powerpc-ieee1275.  Based on patch created by
3426         Manoel Abranches <mrabran@linux.vnet.ibm.com>.
3427         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
3428         `kern/ieee1275/mmap.c'.
3429         * include/grub/powerpc/ieee1275/memory.h: New file.
3431         Provide grub-install on coreboot.
3432         * conf/i386-coreboot.rmk (sbin_SCRIPTS): Add `grub-install'.
3433         (grub_install_SOURCES): New variable.
3434         * util/i386/pc/grub-install.in: Add a few condition checks to make it
3435         usable on coreboot.
3437 2008-11-25  Felix Zielcke  <fzielcke@z-51.de>
3439         * util/grub-fstest.c (grub_term_get_current_input): Change return type
3440         to `grub_term_input_t'.
3441         (grub_term_get_current_output): Change return type to
3442         `grub_term_output_t'.
3444 2008-11-22  Robert Millan  <rmh@aybabtu.com>
3446         Fix breakage on coreboot due to declaration mismatch.
3447         * term/i386/pc/vga_text.c (grub_vga_text_init_fini): New function.
3448         (grub_vga_text_term): Use grub_vga_text_init_fini() instead of
3449         grub_vga_text_cls().
3451         * kern/i386/loader.S (grub_multiboot_backward_relocator): Improve
3452         comments.  Avoid copying one more byte than necessary (just in case).
3454         * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Change link address
3455         to 0x200000 (avoids trouble with some OFW implementations, and matches
3456         with the one in Yaboot).
3457         Reported by Manoel Abranches
3459 2008-11-20  Robert Millan  <rmh@aybabtu.com>
3461         * kern/i386/coreboot/init.c (grub_time_tics): Remove variable.
3462         (grub_get_rtc, grub_exit): Abort with grub_fatal() if called.
3464         * util/grub-mkconfig_lib.in (grub_warn): New function.
3465         (convert_system_path_to_grub_path): Use grub_warn() when issuing
3466         warnings, to obtain consistent formatting.
3467         * util/grub.d/00_header.in: Likewise.
3468         * util/update-grub_lib.in: Likewise.
3470         * loader/i386/linux.c (allocate_pages): Fix a warning.
3471         Move comment text to `#error' stanza.
3473         Harmonize ieee1275's grub_available_iterate() with the generic
3474         grub_machine_mmap_iterate() interface (fixes a recently-introduced
3475         build problem on i386-ieee1275):
3476         * kern/ieee1275/openfw.c (grub_available_iterate): Moved from here ...
3477         * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): ... here.  Add third
3478         parameter `type'.  Update all users of this function.
3479         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
3480         `kern/ieee1275/mmap.c'.
3481         * kern/ieee1275/init.c
3482         * include/grub/ieee1275/ieee1275.h (grub_available_iterate): Replace
3483         with ...
3484         (grub_machine_mmap_iterate): ... this.
3485         * include/grub/i386/pc/memory.h (grub_machine_mmap_iterate): Change
3486         return type to `grub_err_t'.  Update all implementations of this
3487         function prototype.
3488         * include/grub/i386/coreboot/memory.h (grub_machine_mmap_iterate):
3489         Likewise.
3491         Add `lsmmap' command (lists firmware-provided memory map):
3492         * commands/lsmmap.c: New file.
3493         * conf/i386-pc.rmk (pkglib_MODULES): Add `lsmmap.mod'.
3494         (lsmmap_mod_SOURCES, lsmmap_mod_CFLAGS, lsmmap_mod_LDFLAGS): New
3495         variables.
3496         * conf/powerpc-ieee1275.rmk: Likewise.
3497         * conf/i386-coreboot.rmk: Likewise.
3498         * conf/i386-ieee1275.rmk: Likewise.
3500 2008-11-19  Robert Millan  <rmh@aybabtu.com>
3502         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Fix a typo.
3503         * loader/i386/linux.c (grub_rescue_cmd_initrd): Implement a few needed
3504         constraints to initrd allocation (based on code from
3505         loader/i386/pc/linux.c).  Without them, initrd was allocated too high
3506         for Linux to find it.
3508 2008-11-14  Robert Millan  <rmh@aybabtu.com>
3510         * fs/cpio.c (grub_cpio_open): Compare `name' and `fn' by hand in
3511         order to cope with duplicate slashes.
3513 2008-11-14  Robert Millan  <rmh@aybabtu.com>
3515         * include/grub/i386/coreboot/memory.h (GRUB_MEMORY_MACHINE_LOWER_SIZE):
3516         Redefine to match with GRUB_MEMORY_MACHINE_UPPER_START (0x100000).  We
3517         don't want to mess with lower memory, because it is used in the Linux
3518         loader.
3520         * loader/i386/linux.c (allocate_pages): Allocate `real_mode_mem' in
3521         an appropriate place in lower memory, between 0x10000 and 0x90000,
3522         like loader/i386/efi/linux.c does.  Linux often panics if real_mode_mem
3523         is in our heap (probably as a result of it being corrupted during
3524         decompression).  Add #error instance with comment to explain why this
3525         loader isn't currently usable on PC/BIOS.
3527 2008-11-14  Robert Millan  <rmh@aybabtu.com>
3529         * term/i386/pc/serial.c [! GRUB_MACHINE_PCBIOS]
3530         (GRUB_SERIAL_PORT_NUM): Fix miscalculation.
3532 2008-11-12  Robert Millan  <rmh@aybabtu.com>
3534         Make loader/i386/linux.c buildable on i386-pc (although disabled).
3536         * include/grub/i386/pc/init.h: Include `<grub/machine/memory.h>'.
3537         (struct grub_machine_mmap_entry, grub_machine_mmap_iterate): Move
3538         from here ...
3539         * include/grub/i386/pc/memory.h: ... to here.
3541 2008-11-12  Robert Millan  <rmh@aybabtu.com>
3543         Fix build problems on i386-ieee1275 and *-efi (introduced by vga_text
3544         split).
3546         * include/grub/i386/pc/console.h: Include `<grub/i386/vga_common.h>'.
3547         (grub_console_cur_color, grub_console_real_putchar)
3548         (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
3549         (grub_console_setcolorstate, grub_console_setcolor)
3550         (grub_console_getcolor): Move from here ...
3551         * include/grub/i386/vga_common.h: ... to here (new file).
3553         * term/i386/pc/vga_text.c: Replace `<grub/machine/console.h>' with
3554         `<grub/i386/vga_common.h>' and `<grub/cpu/io.h>' with
3555         `<grub/i386/io.h>'.
3556         * term/i386/vga_common.c: Replace `<grub/machine/console.h>' with
3557         `<grub/i386/vga_common.h>'.
3559 2008-11-12  Robert Millan  <rmh@aybabtu.com>
3561         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `term/i386/vga_common.c'.
3562         * conf/i386.rmk (pkglib_MODULES): Add `vga_text.mod'.
3563         (vga_text_mod_SOURCES, vga_text_mod_CFLAGS, vga_text_mod_LDFLAGS): New
3564         variables.
3565         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
3566         `term/i386/pc/console.c' with `term/i386/vga_common.c'.
3568         * kern/i386/coreboot/init.c (grub_machine_init): Replace call to
3569         grub_console_init() with call to grub_vga_text_init().
3570         (grub_machine_fini): Replace call to
3571         grub_console_fini() with call to grub_vga_text_fini() and
3572         grub_at_keyboard_fini().
3574         * include/grub/i386/pc/console.h: Include `<grub/term.h>'.
3575         (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
3576         (grub_console_setcolorstate, grub_console_setcolor)
3577         (grub_console_getcolor): New function prototypes.
3579         * term/i386/pc/vga_text.c: Include `<grub/dl.h>'.
3580         (grub_vga_text_getxy, grub_vga_text_gotoxy, grub_vga_text_cls)
3581         (grub_vga_text_setcursor): Static-ize.
3582         (grub_vga_text_term): New structure.
3583         (GRUB_MOD_INIT(vga_text), GRUB_MOD_FINI(vga_text)): New functions.
3585         * term/i386/pc/console.c: Remove `<grub/machine/machine.h>'.
3586         (grub_console_cur_color, grub_console_standard_color)
3587         (grub_console_normal_color, grub_console_highlight_color)
3588         (map_char, grub_console_putchar, grub_console_getcharwidth)
3589         (grub_console_getwh, grub_console_setcolorstate, grub_console_setcolor)
3590         (grub_console_getcolor): Move from here ...
3591         * term/i386/vga_common.c: ... to here (same function names).
3593 2008-11-12  Robert Millan  <rmh@aybabtu.com>
3595         Use newly-added Multiboot support in coreboot.
3597         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
3598         `kern/i386/coreboot/mmap.c' with `kern/i386/multiboot_mmap.c'.
3600         * kern/i386/coreboot/startup.S: Enable Multiboot header, fix its
3601         alignment, set `MULTIBOOT_MEMORY_INFO' flag.
3602         (codestart): Store the MBI in `startup_multiboot_info' when we're
3603         being loaded using Multiboot.
3605         * kern/i386/coreboot/init.c (grub_machine_init): Move
3606         grub_at_keyboard_init() call to beginning of function (useful for
3607         debugging).  Call grub_machine_mmap_init() before attempting to use
3608         grub_machine_mmap_iterate().
3609         (grub_lower_mem, grub_upper_mem): Move from here ...
3610         * kern/i386/multiboot_mmap.c (grub_lower_mem, grub_upper_mem): ... to
3611         here (new file).
3613         * include/grub/i386/coreboot/memory.h (grub_machine_mmap_init): New
3614         function prototype.
3616 2008-11-12  Robert Millan  <rmh@aybabtu.com>
3618         Fix a regression introduced by the at_keyboard.mod split.  Because
3619         some terminals are default on some platforms and non-default on
3620         others, the first terminal being registered determines which is
3621         going to be default.
3623         * kern/term.c (grub_term_register_input): If this is the first
3624         terminal being registered, set it as the current one.
3625         (grub_term_register_output): Likewise.
3627         * term/efi/console.c (grub_console_init): Do not call
3628         grub_term_set_current_output() or grub_term_set_current_input().
3629         * term/ieee1275/ofconsole.c (grub_console_init): Likewise.
3630         * term/i386/pc/console.c (grub_console_init): Likewise.
3631         (grub_console_fini): Do not call grub_term_set_current_input()
3632         (but leave grub_term_set_current_output() to restore text mode).
3634 2008-11-10  Robert Millan  <rmh@aybabtu.com>
3636         * util/grub.d/00_header.in: Add backward compatibility check for
3637         versions of terminal.mod that don't understand `terminal_input' or
3638         `terminal_output'.
3640 2008-11-09  Robert Millan  <rmh@aybabtu.com>
3642         * commands/terminal.c (GRUB_MOD_FINI(terminal)): Unregister
3643         `terminal_input' / `terminal_output', not `terminal'.
3645 2008-11-08  Robert Millan  <rmh@aybabtu.com>
3647         * Makefile.in (include_DATA): Fix srcdir=. assumption.
3648         (DISTCLEANFILES): Add `build_env.mk'.
3650 2008-11-08  Robert Millan  <rmh@aybabtu.com>
3652         * term/i386/pc/vesafb.c (grub_vesafb_term): Change type to
3653         `struct grub_term_output'.  Remove `.checkkey' and `.getkey'
3654         members.  Update all users.
3655         * util/console.c (grub_ncurses_term): Split in ...
3656         (grub_ncurses_term_input): ... this, and ...
3657         (grub_ncurses_term_output): ... this.  Update all users.
3658         * term/ieee1275/ofconsole.c: Remove stale `#endif'.
3660 2008-11-08  Robert Millan  <rmh@aybabtu.com>
3662         * Makefile.in (PKGLIB): Add $(pkglib_BUILDDIR).
3663         (PKGDATA): Add $(pkgdata_SRCDIR).
3664         (pkglib_BUILDDIR): New variable.
3665         (pkgdata_SRCDIR): New variable.
3666         (build_env.mk): New target.
3667         (include_DATA): New variable.
3668         (install-local): Install $(include_DATA) files in $(includedir).
3670 2008-11-07  Pavel Roskin  <proski@gnu.org>
3672         * gendistlist.sh: Use C locale for sorting to ensure consistent
3673         output on all systems.
3675         * util/grub.d/00_header.in: Remove incorrect space before
3676         "serial".
3678 2008-11-07  Robert Millan  <rmh@aybabtu.com>
3680         * include/multiboot2.h (struct multiboot_header): Add `flags' member as
3681         per specification.
3682         * loader/multiboot2.c (grub_multiboot2): Fix Multiboot2 header check.
3683         * loader/multiboot_loader.c (find_multi_boot2_header): New function
3684         (based on find_multi_boot1_header).
3685         (grub_rescue_cmd_multiboot_loader): Check for Multiboot2 header,
3686         using find_multi_boot2_header(), and abort if neither Multiboot or
3687         Multiboot headers were found.
3689 2008-11-07  Robert Millan  <rmh@aybabtu.com>
3691         Modularize at_keyboard.mod:
3693         * conf/i386.rmk (pkglib_MODULES): Add `at_keyboard.mod'.
3694         (at_keyboard_mod_SOURCES, at_keyboard_mod_CFLAGS)
3695         (at_keyboard_mod_LDFLAGS): New variables.
3697         Actual terminal split:
3699         * include/grub/term.h (struct grub_term): Split in ...
3700         (struct grub_term_input): ... this, and ...
3701         (struct grub_term_output): ... this.  Update all users.
3702         (grub_term_set_current): Split in ...
3703         (grub_term_set_current_input): ... this, and ...
3704         (grub_term_set_current_output): ... this.
3705         (grub_term_get_current): Split in ...
3706         (grub_term_get_current_input): ... this, and ...
3707         (grub_term_get_current_output): ... this.
3708         (grub_term_register): Split in ...
3709         (grub_term_register_input): ... this, and ...
3710         (grub_term_register_output): ... this.
3711         (grub_term_unregister): Split in ...
3712         (grub_term_unregister_input): ... this, and ...
3713         (grub_term_unregister_output): ... this.
3714         (grub_term_iterate): Split in ...
3715         (grub_term_iterate_input): ... this, and ...
3716         (grub_term_iterate_output): ... this.
3718         * kern/term.c (grub_term_list): Split in ...
3719         (grub_term_list_input): ... this, and ...
3720         (grub_term_list_output): ... this.  Update all users.
3721         (grub_cur_term): Split in ...
3722         (grub_cur_term_input): ... this, and ...
3723         (grub_cur_term_output): ... this.  Update all users.
3724         (grub_term_set_current): Split in ...
3725         (grub_term_set_current_input): ... this, and ...
3726         (grub_term_set_current_output): ... this.
3727         (grub_term_get_current): Split in ...
3728         (grub_term_get_current_input): ... this, and ...
3729         (grub_term_get_current_output): ... this.
3730         (grub_term_register): Split in ...
3731         (grub_term_register_input): ... this, and ...
3732         (grub_term_register_output): ... this.
3733         (grub_term_unregister): Split in ...
3734         (grub_term_unregister_input): ... this, and ...
3735         (grub_term_unregister_output): ... this.
3736         (grub_term_iterate): Split in ...
3737         (grub_term_iterate_input): ... this, and ...
3738         (grub_term_iterate_output): ... this.
3740         * kern/misc.c (grub_abort): Split use of grub_term_get_current() into
3741         a check for input and one for output (and only attempt to get keys
3742         from user when input works).
3744         * util/grub-probe.c (grub_term_get_current): Split in ...
3745         (grub_term_get_current_input): ... this, and ...
3746         (grub_term_get_current_output): ... this.
3747         * util/grub-fstest.c: Likewise.
3748         * util/i386/pc/grub-setup.c: Likewise.
3749         * util/grub-editenv.c: Likewise.
3751         Portability adjustments:
3753         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Remove
3754         `term/i386/pc/at_keyboard.c'.
3755         * kern/ieee1275/init.c [__i386__] (grub_machine_init): Remove call to
3756         grub_keyboard_controller_init() (now handled by terminal .init).
3757         * kern/i386/coreboot/init.c (grub_machine_init): Add call to
3758         grub_at_keyboard_init().
3759         * include/grub/i386/ieee1275/console.h (grub_keyboard_controller_init)
3760         (grub_console_checkkey, grub_console_getkey): Remove (now provided by
3761         at_keyboard.mod via input terminal interface).
3762         * include/grub/i386/coreboot/console.h: Convert into a stub for
3763         `<grub/i386/pc/console.h>'.
3765         Migrate full terminals to new API:
3767         * term/efi/console.c (grub_console_term): Split into ...
3768         (grub_console_term_input): ... this, and ...
3769         (grub_console_term_output): ... this.  Update all users.
3770         * term/ieee1275/ofconsole.c: Remove __i386__ hack.
3771         (grub_ofconsole_init): Split into ...
3772         (grub_ofconsole_init_input): ... this, and ...
3773         (grub_ofconsole_init_output): ... this.
3774         (grub_ofconsole_term): Split into ...
3775         (grub_ofconsole_term_input): ... this, and ...
3776         (grub_ofconsole_term_output): ... this.  Update all users.
3777         * term/i386/pc/serial.c (grub_serial_term): Split into ...
3778         (grub_serial_term_input): ... this, and ...
3779         (grub_serial_term_output): ... this.  Update all users.
3780         * term/i386/pc/console.c (grub_console_term): Split into ...
3781         (grub_console_term_input): ... this, and ...
3782         (grub_console_term_output): ... this.  Update all users.
3783         (grub_console_term_input): Only enable it on PC/BIOS platform.
3784         (grub_console_init): Remove grub_keyboard_controller_init() call.
3786         Migrate input terminals to new API:
3788         * term/i386/pc/at_keyboard.c: Replace `cpu' and `machine' with
3789         `i386' and `i386/pc' to enable build on x86_64 (this driver is
3790         i386-specific anyway).
3791         (grub_console_checkkey): Rename to ...
3792         (grub_at_keyboard_checkkey): ... this.  Static-ize.  Update all
3793         users.
3794         (grub_keyboard_controller_orig): New variable.
3795         (grub_console_getkey): Rename to ...
3796         (grub_at_keyboard_getkey): ... this.  Static-ize.  Update all
3797         users.
3798         (grub_keyboard_controller_init): Static-ize.  Save original
3799         controller value so that it can be restored ...
3800         (grub_keyboard_controller_fini): ... here (new function).
3801         (grub_at_keyboard_term): New structure.
3802         (GRUB_MOD_INIT(at_keyboard), GRUB_MOD_FINI(at_keyboard)): New
3803         functions.
3805         Migrate output terminals to new API:
3807         * term/i386/pc/vga.c (grub_vga_term): Change type to
3808         `struct  grub_term_output'.  Remove `.checkkey' and `.getkey'
3809         members.  Update all users.
3810         * term/gfxterm.c (grub_video_term): Change type to
3811         `struct  grub_term_output'.  Remove `.checkkey' and `.getkey'
3812         members.  Update all users.
3813         * include/grub/i386/pc/console.h (grub_console_checkkey)
3814         (grub_console_getkey): Do not export (no longer needed by gfxterm,
3815         etc).
3817         Migrate `terminal' command and userland tools to new API:
3819         * commands/terminal.c (grub_cmd_terminal): Split into ...
3820         (grub_cmd_terminal_input): ... this, and ...
3821         (grub_cmd_terminal_output): ... this.
3822         (GRUB_MOD_INIT(terminal)): Split `terminal' command in two commands:
3823         `terminal_input' and `terminal_output'.
3824         * util/grub.d/00_header.in: Adjust `terminal' calls to new
3825         `terminal_input' / `terminal_output' API.
3826         * util/grub-mkconfig.in: Export ${GRUB_TERMINAL_INPUT} and
3827         ${GRUB_TERMINAL_OUTPUT} instead of ${GRUB_TERMINAL} (and if user
3828         provided ${GRUB_TERMINAL}, convert it).
3830 2008-11-04  Robert Millan  <rmh@aybabtu.com>
3832         * util/grub.d/10_freebsd.in: New file.  Generate grub configuration
3833         for FreeBSD.
3834         * conf/common.rmk (grub-mkconfig_SCRIPTS): Add 10_freebsd.
3836 2008-11-03  Bean  <bean123ch@gmail.com>
3838         * kern/elf.c (grub_elf32_load): Revert to previous code.
3839         (grub_elf64_load): Likewise.
3841         * loader/i386/bsd.c (grub_bsd_elf32_hook): Change return address.
3843 2008-11-01  Robert Millan  <rmh@aybabtu.com>
3845         * Makefile.in (CPPFLAGS): Fix builddir=. assumption.
3846         (TARGET_CPPFLAGS): Likewise.
3847         * genmk.rb (mod_src): Fix builddir=. and srcdir=. assumptions.
3849 2008-11-01  Carles Pina i Estany  <carles@pina.cat>
3851         * normal/menu.c (run_menu): Add Previous and Next Page keys in menu.
3853 2008-10-29  Guillem Jover  <guillem.jover@nokia.com>
3855         * disk/lvm.c (grub_lvm_scan_device): Fix error recovery by delaying the
3856         addition of objects until the code is not going to be able to fail.
3858 2008-10-29  Guillem Jover  <guillem.jover@nokia.com>
3860         * disk/lvm.c (grub_lvm_scan_device): Fix possible NULL value handling
3861         (add a missing NULL check, and correct them by moving the pointer
3862         operations after the actual check).
3864 2008-10-29  Robert Millan  <rmh@aybabtu.com>
3866         * util/i386/pc/grub-install.in: Handle empty string as output from
3867         make_system_path_relative_to_its_root().
3869 2008-10-05  Hans Lambermont  <hans@lambermont.dyndns.org>
3871         * disk/lvm.c (grub_lvm_scan_device): Allocate buffer space for the
3872         circular metadata worst case scenario. If the metadata is circular
3873         then copy the wrap in place.
3874         * include/grub/lvm.h: Add GRUB_LVM_MDA_HEADER_SIZE, from the LVM2
3875         project lib/format_text/layout.h
3876         Circular metadata bug found and patch debugged by Jan Derk Gerlings.
3878 2008-10-03  Felix Zielcke  <fzielcke@z-51.de>
3880         * util/i386/pc/grub-install.in: Source grub-mkconfig_lib instead of update-grub_lib.
3882 2008-10-03  Felix Zielcke  <fzielcke@z-51.de>
3884         * util/update-grub_lib.in: Mention filename in warning message.
3886 2008-09-29  Felix Zielcke  <fzielcke@z-51.de>
3888         * NEWS: Update for rename of update-grub to grub-mkconfig.
3890 2008-09-29  Felix Zielcke  <fzielcke@z-51.de>
3892         * util/update-grub_lib.in: Copy to ...
3893         * util/grub-mkconfig_lib.in: ... this.  Update all users.
3894         * util/update-grub_lib.in: Make it a stub to `grub-mkconfig_lib.in'.
3895         * util/update-grub.in: Rename to ...
3896         * util/grub-mkconfig.in: ... this.  Update all users.  Remove `-y'
3897         option. Add `--output' option to allow users to specify the generated
3898         configuration file.  Default to stdout.
3899         (update_grub_dir): Rename to ...
3900         (grub_mkconfig_dir): ... this.
3901         (grub_cfg): Default to an empty string.
3902         * conf/common.rmk (update-grub): Rename to ...
3903         (grub-mkconfig): ... this.
3904         (update-grub_lib): Copy to ...
3905         (grub-mkconfig_lib): ... this.
3906         (update-grub_SCRIPTS): Copy to ...
3907         (grub-mkconfig_SCRIPTS): ... this. Update all users.
3908         (update-grub_DATA): Rename to ...
3909         (grub-mkconfig_DATA): ... this.
3911 2008-09-28  Robert Millan  <rmh@aybabtu.com>
3913         * fs/iso9660.c (struct grub_iso9660_primary_voldesc): Rename `created'
3914         to `modified'.  Add the real `created' field.
3915         (grub_iso9660_uuid): Use `modified' rather than `created' for
3916         constructing the UUID.
3918 2008-09-28  Felix Zielcke  <fzielcke@z-51.de>
3920         fs/jfs.c (grub_jfs_find_file): Treat multiple slashes like one.
3921         Based on code from Tomas Ebenlendr <ebik@ucw.cz>.
3923 2008-09-28  Bean  <bean123ch@gmail.com>
3925         * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a bug in the previous patch.
3926         Thanks to Christian Franke for finding this bug.
3928 2008-09-25  Robert Millan  <rmh@aybabtu.com>
3930         * util/grub-mkdevicemap.c (make_device_map): Actually replace all
3931         instances of grub_util_get_disk_name() (see previous commit).
3933 2008-09-25  Robert Millan  <rmh@aybabtu.com>
3935         * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Remove
3936         `util/i386/get_disk_name.c'.
3937         * conf/i386-efi.rmk: Likewise.
3938         * conf/x86_64-efi.rmk: Likewise.
3939         * conf/i386-coreboot.rmk: Likewise.
3940         * conf/i386-ieee1275.rmk: Likewise.
3941         * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Remove
3942         `util/ieee1275/get_disk_name.c'.
3943         * include/grub/util/misc.h (grub_util_get_disk_name): Remove.
3944         * util/ieee1275/get_disk_name.c: Remove file.
3945         * util/i386/get_disk_name.c: Remove file.
3946         * util/grub-mkdevicemap.c (make_device_map): Back to hardcoding
3947         "hd%d" for device.map entries, rather than using
3948         grub_util_get_disk_name().
3950 2008-09-24  Carles Pina i Estany  <carles@pina.cat>
3952         * disk/dmraid_nvidia.c (grub_dmraid_nv_detect): Fix `unused parameter'
3953         warning.
3954         * commands/i386/pc/pxecmd.c (dmraid_nvidia): Likewise.
3956 2008-09-24  Carles Pina i Estany  <carles@pina.cat>
3958         * include/grub/i386/pc/console.h (GRUB_TERM_NPAGE):
3959         Changed to 0x5100.
3960         (GRUB_TERM_PPAGE): Changed to 0x4900.
3962 2008-09-24  Robert Millan  <rmh@aybabtu.com>
3964         * include/grub/powerpc/ieee1275/console.h (GRUB_CONSOLE_KEY_*): Remove
3965         macros (they were i386-pc specific).
3966         * include/grub/sparc64/ieee1275/console.h: Likewise.
3967         * include/grub/efi/console.h: Likewise.
3969 2008-09-22  Bean  <bean123ch@gmail.com>
3971         * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a rare case where $BITMAP is
3972         resident and in attribute list.
3974         * include/grub/ntfs.h (BMP_LEN): Removed.
3976 2008-09-22  Bean  <bean123ch@gmail.com>
3978         * disk/ata.c (grub_atapi_open): Initialize devfnd, no need to set
3979         scsi->name and scsi->luns, as they will be set in grub_scsi_open.
3981         * disk/scsi.c (grub_scsi_open): Don't call p->close (scsi) here when
3982         error occurs, as grub_disk_open will call grub_disk_close, which will
3983         call p->close (scsi).
3985 2008-09-21  Felix Zielcke  <fzielcke@z-51.de>
3987         * configure.ac (AC_INIT): Quote `GRUB' string and version number.
3988         (AC_PREREQ): Bumped to 2.59.
3989         (AC_TRY_COMPILE): Replace obsolete macro with ...
3990         (AC_COMPILE_IFELSE): ... this.
3991         * aclocal.m4 (AC_TRY_LINK): Replace obsolete macro with ...
3992         (AC_LINK_IFELSE): ... this.
3994 2008-09-21  Felix Zielcke  <fzielcke@z-51.de>
3996         * autogen.sh: Add a call to `gendistlist.sh'.
3998 2008-09-19  Christian Franke  <franke@computer.org>
4000         * aclocal.m4 (grub_CHECK_ENABLE_EXECUTE_STACK): New function.
4001         * configure.ac: Call grub_CHECK_ENABLE_EXECUTE_STACK.
4002         * include/grub/misc.h [NEED_ENABLE_EXECUTE_STACK]:
4003         Export __enable_execute_stack() to modules.
4004         * kern/misc.c [NEED_ENABLE_EXECUTE_STACK] (__enable_execute_stack):
4005         New function.
4007 2008-09-09  Felix Zielcke  <fzielcke@z-51.de>
4009         * Makefile.in (RMKFILES): Add `i386.rmk' and `x86_64-efi.rmk'.
4010         Sort the list.
4012 2008-09-09  Felix Zielcke  <fzielcke@z-51.de>
4014         * util/hostdisk.c: Replace #include <grub/util/biosdisk.h> with
4015         #include <grub/util/hostdisk.h>.
4017 2008-09-08  Robert Millan  <rmh@aybabtu.com>
4019         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Skip
4020         segments when their filesz is zero (grub_file_read() interprets
4021         zero-size as "read until EOF", which results in memory corruption).
4022         Use `lowest_segment' rather than 0 for calculating the current
4023         segment load address.
4025 2008-09-08  Robert Millan  <rmh@aybabtu.com>
4027         * util/hostdisk.c (open_device): Replace a grub_util_info() call
4028         with grub_dprintf("hostdisk", ...), as it was so verbose that it
4029         clobbered useful information.
4031 2008-09-08  Robert Millan  <rmh@aybabtu.com>
4033         * include/grub/util/biosdisk.h: Move to ...
4034         * include/grub/util/hostdisk.h: ... here.  Update all users.
4035         * util/biosdisk.c: Move to ...
4036         * util/hostdisk.c: ... here.  Update all users.
4038 2008-09-07  Robert Millan  <rmh@aybabtu.com>
4040         * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): Remove
4041         variables.
4042         (grub_multiboot): Move `mbi' allocation upwards, so that mmap address
4043         and length can be stored directly in the `mbi->mmap_addr' and
4044         `mbi->mmap_length' struct fields.
4046 2008-09-07  Robert Millan  <rmh@aybabtu.com>
4048         * conf/i386.rmk: New file.  Provides declaration for building
4049         `cpuid.mod'.
4050         * conf/i386-pc.rmk (pkglib_MODULES): Remove `cpuid.mod'.
4051         (cpuid_mod_SOURCES, cpuid_mod_CFLAGS, cpuid_mod_LDFLAGS): Remove
4052         variables.
4053         Include `conf/i386.mk'.
4054         * conf/i386-efi.rmk: Likewise.
4055         * conf/x86_64-efi.rmk: Likewise.
4056         * conf/i386-coreboot.rmk: Likewise.
4057         * conf/i386-ieee1275.rmk: Likewise.
4059 2008-09-07  Vesa Jääskeläinen  <chaac@nic.fi>
4061         Based on patch created by Colin D Bennett <colin@gibibit.com>.
4062         Adds optimization support for BGR based modes.
4064         * include/grub/i386/pc/vbeblit.h (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8) Removed.
4065         (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
4066         (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
4067         (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
4068         (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
4069         (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
4070         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
4071         (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
4072         (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
4073         (grub_video_i386_vbeblit_index_index): Likewise.
4074         (grub_video_i386_vbeblit_replace_directN): Added.
4075         (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
4076         (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
4077         (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
4078         (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
4079         (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
4080         (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
4081         (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
4082         (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
4083         (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
4084         (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
4085         (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
4086         (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
4087         (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
4089         * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8) Removed.
4090         (grub_video_i386_vbefill_R8G8B8): Likewise.
4091         (grub_video_i386_vbefill_index): Likewise.
4092         (grub_video_i386_vbefill_direct32): Added.
4093         (grub_video_i386_vbefill_direct24): Likewise.
4094         (grub_video_i386_vbefill_direct16): Likewise.
4095         (grub_video_i386_vbefill_direct8): Likewise.
4097         * include/grub/video.h (grub_video_blit_format): Removed
4098         GRUB_VIDEO_BLIT_FORMAT_R8G8B8A8, GRUB_VIDEO_BLIT_FORMAT_R8G8B8.
4099         (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_RGBA_8888,
4100         GRUB_VIDEO_BLIT_FORMAT_BGRA_8888, GRUB_VIDEO_BLIT_FORMAT_RGB_888,
4101         GRUB_VIDEO_BLIT_FORMAT_BGR_888, GRUB_VIDEO_BLIT_FORMAT_RGB_565,
4102         GRUB_VIDEO_BLIT_FORMAT_BGR_565.
4104         * video/video.c (grub_video_get_blit_format): Updated to use new
4105         blit formats.  Added handling for 16 bit color modes.
4107         * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Updated to use new
4108         fillers.
4109         (common_blitter): Updated to use new blitters.
4111         * video/i386/pc/vbeblit.c (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8):
4112         Removed.
4113         (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
4114         (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
4115         (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
4116         (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
4117         (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
4118         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
4119         (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
4120         (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
4121         (grub_video_i386_vbeblit_index_index): Likewise.
4122         (grub_video_i386_vbeblit_replace_directN): Added.
4123         (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
4124         (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
4125         (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
4126         (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
4127         (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
4128         (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
4129         (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
4130         (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
4131         (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
4132         (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
4133         (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
4134         (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
4135         (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
4137         * video/i386/pc/vbefill.c (grub_video_i386_vbefill_R8G8B8A8): Removed.
4138         (grub_video_i386_vbefill_R8G8B8): Likewise.
4139         (grub_video_i386_vbefill_index): Likewise.
4140         (grub_video_i386_vbefill_direct32): Added.
4141         (grub_video_i386_vbefill_direct24): Likewise.
4142         (grub_video_i386_vbefill_direct16): Likewise.
4143         (grub_video_i386_vbefill_direct8): Likewise.
4145         * video/readers/jpeg.c (grub_jpeg_decode_sos): Adapt to new blitter
4146         types.
4148         * video/readers/tga.c (grub_video_reader_tga): Adapt to new blitter
4149         types.
4151         * video/readers/png.c (grub_png_decode_image_header): Adapt to new
4152         blitter types.
4154         * video/bitmap.c (grub_video_bitmap_create): Adapt to new blitter
4155         types.
4157 2008-09-06  Felix Zielcke  <fzielcke@z-51.de>
4159         * disk/raid.c (insert_array): Set `array->chunk_size' to 64 for
4160         RAID level 1.
4162 2008-09-06  Felix Zielcke  <fzielcke@z-51.de>
4164         * fs/iso9660.c (grub_iso9660_date): New structure.
4165         (grub_iso9660_primary_voldesc): Add `grub_iso9660_date' member.
4166         (grub_iso9660_uuid): New function.
4168 2008-09-05  Bean  <bean123ch@gmail.com>
4170         * fs/fshelp.c (grub_fshelp_find_file): Handle case insensitive names.
4172         * fs/ntfs.c (list_file): Ignore names in DOS namespace, set the case
4173         insensitive bit for names in Win32 and Win32 & DOS namespace.
4175         * include/grub/fshelp.h (GRUB_FSHELP_CASE_INSENSITIVE): New macro.
4177         * include/grub/types.h (LONG_MAX): Likewise.
4179 2008-09-04  Felix Zielcke  <fzielcke@z-51.de>
4181         * util/getroot.c: Include <config.h>.
4182         (grub_util_get_grub_dev): Rewrite to use asprintf for mdraid devices,
4183         add support for /dev/md/N devices and handle LVM double dash escaping.
4185 2008-09-04  Felix Zielcke  <fzielcke@z-51.de>
4187         * config.guess: Update to latest version from config git.
4188         * config.sub: Likewise.
4190 2008-09-03  Robert Millan  <rmh@aybabtu.com>
4192         * disk/scsi.c (grub_scsi_open): Remove size limit when printing
4193         `disk->total_sectors'.
4195 2008-09-01  Colin D Bennett  <colin@gibibit.com>
4197         * include/grub/normal.h: Fixed incorrect comment for
4198         GRUB_COMMAND_FLAG_NO_ARG_PARSE.
4200 2008-09-01  Colin D Bennett  <colin@gibibit.com>
4202         * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Replaced constant
4203         values with defines.
4205         * include/grub/i386/pc/vbe.h (GRUB_VBE_MODEATTR_SUPPORTED): Added.
4206         (GRUB_VBE_MODEATTR_RESERVED_1): Likewise.
4207         (GRUB_VBE_MODEATTR_BIOS_TTY_OUTPUT_SUPPORT): Likewise.
4208         (GRUB_VBE_MODEATTR_COLOR): Likewise.
4209         (GRUB_VBE_MODEATTR_GRAPHICS): Likewise.
4210         (GRUB_VBE_MODEATTR_VGA_COMPATIBLE): Likewise.
4211         (GRUB_VBE_MODEATTR_VGA_WINDOWED_AVAIL): Likewise.
4212         (GRUB_VBE_MODEATTR_LFB_AVAIL): Likewise.
4213         (GRUB_VBE_MODEATTR_DOUBLE_SCAN_AVAIL): Likewise.
4214         (GRUB_VBE_MODEATTR_INTERLACED_AVAIL): Likewise.
4215         (GRUB_VBE_MODEATTR_TRIPLE_BUF_AVAIL): Likewise.
4216         (GRUB_VBE_MODEATTR_STEREO_AVAIL): Likewise.
4217         (GRUB_VBE_MODEATTR_DUAL_DISPLAY_START): Likewise.
4218         (GRUB_VBE_MEMORY_MODEL_TEXT): Likewise.
4219         (GRUB_VBE_MEMORY_MODEL_CGA): Likewise.
4220         (GRUB_VBE_MEMORY_MODEL_HERCULES): Likewise.
4221         (GRUB_VBE_MEMORY_MODEL_PLANAR): Likewise.
4222         (GRUB_VBE_MEMORY_MODEL_NONCHAIN4_256): Likewise.
4223         (GRUB_VBE_MEMORY_MODEL_YUV): Likewise.
4225 2008-08-31  Robert Millan  <rmh@aybabtu.com>
4227         * loader/i386/pc/multiboot.c (grub_get_multiboot_mmap_len): Fix
4228         declaration.
4229         (grub_multiboot): Fix a few warnings.
4231 2008-08-31  Robert Millan  <rmh@aybabtu.com>
4233         * loader/i386/pc/multiboot.c: Update comment not to say that
4234         boot_device support is unimplemented.
4236 2008-08-31  Robert Millan  <rmh@aybabtu.com>
4238         * loader/i386/pc/multiboot.c: Update comment not to say that a.out
4239         or memory map support are unimplemented.
4241 2008-08-31  Colin D Bennett  <colin@gibibit.com>
4243         * util/i386/pc/grub-mkrescue.in: Support multiple overlay directories.
4245 2008-08-31  Colin D Bennett  <colin@gibibit.com>
4247         * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Show VBE version and
4248         total video memory in 'vbeinfo' output; show color format details for
4249         each video mode.
4251 2008-08-30  Pavel Roskin  <proski@gnu.org>
4253         * util/genmoddep.c: Remove for real this time.
4254         * DISTLIST: Remove util/genmoddep.c.
4256 2008-08-30  Robert Millan  <rmh@aybabtu.com>
4258         * kern/i386/pc/startup.S (multiboot_header): Force 4-byte alignment
4259         as required by Multiboot spec (it was already 4-byte aligned, but
4260         only by chance).
4262 2008-08-29  Pavel Roskin  <proski@gnu.org>
4264         * kern/powerpc/ieee1275/crt0.S: Rename to ...
4265         * kern/powerpc/ieee1275/startup.S: ... this.
4266         * conf/powerpc-ieee1275.rmk: Adjust for the above.
4267         * DISTLIST: Likewise.
4269         * kern/powerpc/ieee1275/crt0.S: Include grub/symbol.h and
4270         grub/cpu/kernel.h.  Add start label for consistency with other
4271         platforms.  Add grub_prefix immediately after start.  Add jump
4272         to the code after grub_prefix.
4273         * include/grub/powerpc/kernel.h: Provide valid values for
4274         GRUB_KERNEL_CPU_PREFIX and GRUB_KERNEL_CPU_DATA_END.
4276 2008-08-29  Bean  <bean123ch@gmail.com>
4278         * configure.ac: Change host_os to cygwin for mingw.
4279         (asprintf): New check for function.
4281         * include/grub/symbol.h: Replace #ifndef __CYGWIN__ with
4282         #if ! defined (__CYGWIN__) && ! defined (__MINGW32__).
4284         * include/grub/util/misc.h: #include <config.h> and <grub/types.h>,
4285         declare asprintf if HAVE_ASPRINTF is not set, declare fseeko, ftello,
4286         sync, sleep and grub_util_get_disk_size for mingw.
4288         * util/biosdisk.c (grub_util_biosdisk_open): Use grub_util_get_disk_size
4289         to get size in mingw.
4290         (open_device): Use flag O_BINARY if it's defined.
4291         (find_root_device): Add dummy code for mingw.
4293         * util/grub-mkdevicemap.c (get_floppy_disk_name): Return 0 for mingw.
4294         (get_ide_disk_name): Return //./PHYSICALDRIVE%d for mingw.
4295         (get_scsi_disk_name): Return 0 for mingw.
4297         * util/hostfs.c: #include <grub/util/misc.h>.
4298         (grub_hostfs_open): Use "rb" flag to open file, use
4299         grub_util_get_disk_size to get disk size for mingw.
4301         * util/misc.c: #include <windows.h> and <winioctl.h> in mingw.
4302         (asprintf): New function if HAVE_ASPRINTF is not set.
4303         (sync): New function for mingw.
4304         (sleep): Likewise.
4305         (grub_util_get_disk_size): Likewise.
4307 2008-08-28  Pavel Roskin  <proski@gnu.org>
4309         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
4310         kern/time.c.
4312 2008-08-28  Robert Millan  <rmh@aybabtu.com>
4314         * util/biosdisk.c (find_grub_drive): Declare missing `i' variable.
4316 2008-08-28  Robert Millan  <rmh@aybabtu.com>
4318         Change find_grub_drive() syntax so it doesn't prevent it from
4319         detecting NULL names as errors.
4321         * util/biosdisk.c (find_grub_drive): Move free slot search code
4322         from here ...
4323         (find_free_slot): ... to here.
4324         (read_device_map): Use find_free_slot() to search for free slots.
4326 2008-08-27  Marco Gerards  <marco@gnu.org>
4328         * conf/common.rmk (pkglib_MODULES): Add scsi.mod.
4329         (scsi_mod_SOURCES): New variable.
4330         (scsi_mod_CFLAGS): Likewise
4331         (scsi_mod_LDFLAGS): Likewise.
4333         * disk/scsi.c: New file.
4335         * include/grub/scsi.h: Likewise.
4337         * include/grub/scsicmd.h: Likewise.
4339         * disk/ata.c: Include <grub/scsi.h>.
4340         (grub_atapi_packet): Do not use grub_ata_cmd, use registers
4341         instead.
4342         (grub_ata_iterate): Skip ATAPI devices.
4343         (grub_ata_open): Only handle ATAPI devices.
4344         (struct grub_atapi_read): Removed.
4345         (grub_atapi_readsector): Likewise.
4346         (grub_ata_read): No longer handle ATAPI devices.
4347         (grub_ata_write): Likewise.
4348         (grub_atapi_iterate): New function.
4349         (grub_atapi_read): Likewise.
4350         (grub_atapi_write): Likewise.
4351         (grub_atapi_open): Likewise.
4352         (grub_atapi_close): Likewise.
4353         (grub_atapi_dev): New variable.
4354         (GRUB_MOD_INIT(ata)): Register ATAPI as SCSI device.
4355         (GRUB_MOD_FINI(ata)): Unregister ATAPI.
4357         * include/grub/disk.h (enum grub_disk_dev_id): Add
4358         `GRUB_DISK_DEVICE_SCSI_ID'.
4360 2008-08-26  Robert Millan  <rmh@aybabtu.com>
4362         * util/biosdisk.c (grub_util_biosdisk_open, open_device)
4363         (grub_util_biosdisk_get_grub_dev): Make error messages a bit more
4364         descriptive.
4366 2008-08-23  Bean  <bean123ch@gmail.com>
4368         * conf/common.rmk (grub_probe_SOURCES): Add disk/mdraid_linux.c.
4369         (grub_fstest_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
4370         disk/mdraid_linux.c and disk/dmraid_nvidia.c and lib/crc.c.
4371         (pkglib_MODULES): Add raid5rec.mod, raid6rec.mod, mdraid.mod and
4372         dm_nv.mod.
4373         (raid5rec_mod_SOURCES): New macro.
4374         (raid5rec_mod_CFLAGS): Likewise.
4375         (raid5rec_mod_LDFLAGS): Likewise.
4376         (raid6rec_mod_SOURCES): Likewise.
4377         (raid6rec_mod_CFLAGS): Likewise.
4378         (raid6rec_mod_LDFLAGS): Likewise.
4379         (mdraid_mod_SOURCES): Likewise.
4380         (mdraid_mod_CFLAGS): Likewise.
4381         (mdraid_mod_LDFLAGS): Likewise.
4382         (dm_nv_mod_SOURCES): Likewise.
4383         (dm_nv_mod_CFLAGS): Likewise.
4384         (dm_nv_mod_LDFLAGS): Likewise.
4386         * conf/i386-pc.rmk (grub_setup_SOURCES): Add disk/mdraid_linux.c.
4387         (grub_emu_SOURCES):  Add disk/raid5_recover.c, disk/raid6_recover.c,
4388         disk/mdraid_linux.c and disk/dmraid_nvidia.c.
4390         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add disk/raid5_recover.c,
4391         disk/raid6_recover.c, disk/mdraid_linux.c and disk/dmraid_nvidia.c.
4393         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
4395         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
4397         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4399         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4401         * disk/raid5_recover.c: New file.
4403         * disk/raid6_recover.c: Likewise.
4405         * disk/mdraid_linux.c: Likewise.
4407         * disk/dmraid_nvidia.c: Likewise.
4409         * disk/i386/pc/biosdisk.c: Set total_sectors of cdrom device to
4410         ULONG_MAX.
4412         * disk/raid.c (grub_raid_open): Use the size of the smallest disk to
4413         calculate the size of raid device.
4414         (grub_raid_read): Simplify raid0 code. Support raid4, raid6 and four
4415         different layout of raid5.
4416         (grub_raid_scan_device): Remove code specific to mdraid.
4417         (grub_raid_list): New variable.
4418         (free_array): New function.
4419         (grub_raid_register): Likewise.
4420         (grub_raid_unregister): Likewise.
4421         (grub_raid_rescan): Likewise.
4422         (GRUB_MOD_INIT): Don't iterate device here.
4423         (GRUB_MOD_FINI): Use free_array to release resource.
4425         * include/grub/raid.h: Remove macro and structure specific to mdraid.
4426         (grub_raid5_recover_func_t): New function variable type.
4427         (grub_raid6_recover_func_t): Likewise.
4428         (grub_raid5_recover_func): New variable.
4429         (grub_raid6_recover_func): Likewise.
4430         (grub_raid_register): New function.
4431         (grub_raid_unregister): Likewise.
4432         (grub_raid_rescan): Likewise.
4433         (grub_raid_block_xor): Likewise.
4435         * util/grub-fstest.c: Add #include <grub/raid.h> and <grub/lib/crc.h>.
4436         (CMD_CRC): New macro.
4437         (part): Removed.
4438         (read_file): Handle device as well as file.
4439         (cmd_crc): New function.
4440         (fstest): Handle multiple disks.
4441         (options): Remove part, raw and long, add root and diskcount.
4442         (usage): Add crc, remove -p, -r, -l, add -r and -c.
4443         (main): Find the first non option entry and ignore subsequent options,
4444         add handling for the new options, support multiple disks.
4446         * util/grub-probe.c (probe): Add mdraid to abstraction_name.
4448 2008-08-23  Bean  <bean123ch@gmail.com>
4450         * normal/x86_64/setjmp.S (grub_longjmp): Return 1 when val = 0.
4452         * genfslist.sh: Ignore kernel.mod.
4454         * genpartmaplist.sh: Likewise.
4456 2008-08-23  Robert Millan  <rmh@aybabtu.com>
4458         * util/getroot.c (find_root_device): Skip anything that starts with
4459         a dot, not just directories.  This avoids things like /dev/.tmp.md0.
4461 2008-08-22  Felix Zielcke  <fzielcke@z-51.de>
4463         * util/update-grub.in (GRUB_GFXMODE): Export variable.
4464         * util/grub.d/00_header.in: Allow the administrator to change default
4465         gfxmode via ${GRUB_GFXMODE}.
4467 2008-08-21  Felix Zielcke  <fzielcke@z-51.de>
4469         * fs/ntfs.c (grub_ntfs_mount): Fix a memory leak.
4471 2008-08-21  Robert Millan  <rmh@aybabtu.com>
4473         * loader/i386/linux.c: New file.  Implements generic 32-bit Linux
4474         loader.
4475         * conf/i386-coreboot.rmk (_linux_mod_SOURCES): Replace
4476         `loader/i386/pc/linux.c' with `loader/i386/linux.c'.
4478 2008-08-20  Carles Pina i Estany  <carles@pina.cat>
4480         * menu/normal.c (run_menu): Replace hardcoded numbers with macros
4481         (16 for GRUB_TERM_UP and 14 for GRUB_TERM_DOWN)
4483 2008-08-19  Robert Millan  <rmh@aybabtu.com>
4485         * term/gfxterm.c (DEFAULT_CURSOR_COLOR): Remove.
4486         (struct grub_virtual_screen): Remove `cursor_color'.
4487         (grub_virtual_screen_setup): Remove `virtual_screen.cursor_color'
4488         initialization.
4489         (write_cursor): Use `virtual_screen.fg_color' to draw cursor.
4491 2008-08-18  Robert Millan  <rmh@aybabtu.com>
4493         Unify (identical) linux_normal.c files.
4494         * loader/i386/efi/linux_normal.c: Move from here ...
4495         * loader/linux_normal.c: ... to here.  Update all users.
4496         * loader/i386/pc/linux_normal.c: Delete.  Update all users.
4497         * loader/i386/ieee1275/linux_normal.c: Likewise.
4499 2008-08-18  Robert Millan  <rmh@aybabtu.com>
4501         * include/grub/i386/linux.h (LINUX_LOADER_ID_LILO)
4502         (LINUX_LOADER_ID_LOADLIN, LINUX_LOADER_ID_BOOTSECT)
4503         (LINUX_LOADER_ID_SYSLINUX, LINUX_LOADER_ID_ETHERBOOT)
4504         (LINUX_LOADER_ID_ELILO, LINUX_LOADER_ID_GRUB, LINUX_LOADER_ID_UBOOT)
4505         (LINUX_LOADER_ID_XEN, LINUX_LOADER_ID_GUJIN, LINUX_LOADER_ID_QEMU):
4506         New macros.
4507         (GRUB_LINUX_CL_OFFSET, GRUB_LINUX_CL_END_OFFSET): Move from here ...
4508         * loader/i386/pc/linux.c (GRUB_LINUX_CL_OFFSET)
4509         (GRUB_LINUX_CL_END_OFFSET): ... to here.
4510         * loader/i386/efi/linux.c (GRUB_EFI_CL_OFFSET): Rename to ...
4511         (GRUB_LINUX_CL_OFFSET): ... this.  Update all users.
4512         (GRUB_EFI_CL_END_OFFSET): Rename to ...
4513         (GRUB_LINUX_CL_END_OFFSET): ... this.  Update all users.
4514         (grub_rescue_cmd_linux): Macroify `type_of_loader' initialization.
4515         Initialize `params->video_cursor_x' and `params->video_cursor_y'
4516         portably using grub_getxy().
4517         Replace `-EFI' with `-bzImage' in boot message.
4519 2008-08-17  Robert Millan  <rmh@aybabtu.com>
4521         * include/grub/x86_64/kernel.h: New file (<grub/i386/kernel.h> stub).
4523 2008-08-17  Robert Millan  <rmh@aybabtu.com>
4525         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pc/mmap.c'.
4527         * include/grub/i386/pc/init.h (GRUB_MACHINE_MEMORY_AVAILABLE)
4528         (GRUB_MACHINE_MEMORY_RESERVED): New macros.
4529         (grub_machine_mmap_iterate): New function declaration.
4530         * include/grub/multiboot.h (struct grub_multiboot_mmap_entry): New
4531         structure.
4532         (GRUB_MMAP_MEMORY_AVAILABLE, GRUB_MMAP_MEMORY_RESERVED): New
4533         macros.
4535         * kern/i386/pc/init.c (grub_machine_init): Replace hardcoded region
4536         type check value with `GRUB_MACHINE_MEMORY_AVAILABLE'.
4537         Move e820 parsing from here ...
4538         * kern/i386/pc/mmap.c: New file.
4539         (grub_machine_mmap_iterate): ... to here.
4541         * include/grub/i386/coreboot/memory.h: Remove `<grub/err.h>'.
4542         (GRUB_LINUXBIOS_MEMORY_AVAILABLE): Rename (for consistency) to ...
4543         (GRUB_MACHINE_MEMORY_AVAILABLE): ... this.  Update all users.
4544         (grub_available_iterate): Redeclare to return `void', and redeclare
4545         its hook to use grub_uint64_t as addr and size parameters, and rename
4546         to ...
4547         (grub_machine_mmap_iterate): ... this.  Update all users.
4549         * kern/i386/coreboot/mmap.c (grub_mmap_iterate): Simplify parser loop
4550         to make it more readable.  Rename to ...
4551         (grub_machine_mmap_iterate): ... this.
4553         * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): New variables.
4554         (grub_get_multiboot_mmap_len, grub_fill_multiboot_mmap): New functions.
4555         (grub_multiboot): Allocate an extra region after the payload, and fill
4556         it with a Multiboot memory map.  Adjust a.out loader to calculate size
4557         with the extra space.
4558         (grub_multiboot_load_elf32): Adjust elf32 loader to calculate size
4559         with the extra space.
4561 2008-08-17  Carles Pina i Estany  <carles@pina.cat>
4563         * menu/normal.c (run_menu): Add Home and End keys in grub-menu.
4565 2008-08-17  Felix Zielcke  <fzielcke@z-51.de>
4567         * gendistlist.sh: Add *.y, *.tex, *.texi, grub.cfg, README, *.sc,
4568         mdate-sh to the list `find' searches for.
4569         * DISTLIST: Regenerated.
4571 2008-08-16  Felix Zielcke  <fzielcke@z-51.de>
4573         * gendistlist.sh (EXTRA_DISTFILES): Remove gensymlist.sh,
4574         genkernsyms.sh.  Add geninit.sh, geninitheader.sh, genkernsyms.sh.in,
4575         genmoddep.awk, gensymlist.sh.in.
4576         (DISTDIRS): Add bus, docs, hook, lib.
4577         * DISTLIST: Regenerated.
4578         * NEWS: Add cygwin support and change the `os-prober' entry a bit.
4580 2008-08-16  Robert Millan  <rmh@aybabtu.com>
4582         * disk/raid.c (grub_raid_init): Handle/report errors set by
4583         grub_device_iterate().
4584         * disk/lvm.c (grub_lvm_init): Likewise.
4586 2008-08-15  Bean  <bean123ch@gmail.com>
4588         * conf/i386-pc.rmk (pkglib_MODULES): Add datetime.mod, date.mod
4589         and datehook.mod.
4590         (datetime_mod_SOURCES): New macro.
4591         (datetime_mod_CFLAGS): Likewise.
4592         (datetime_mod_LDFLAGS): Likewise.
4593         (date_mod_SOURCES): Likewise.
4594         (date_mod_CFLAGS): Likewise.
4595         (date_mod_LDFLAGS): Likewise.
4596         (datehook_mod_SOURCES): Likewise.
4597         (datehook_mod_CFLAGS): Likewise.
4598         (datehook_mod_LDFLAGS): Likewise.
4600         * conf/i386-coreboot.rmk (pkglib_MODULES): Add datetime.mod, date.mod
4601         and datehook.mod.
4602         (datetime_mod_SOURCES): New macro.
4603         (datetime_mod_CFLAGS): Likewise.
4604         (datetime_mod_LDFLAGS): Likewise.
4605         (date_mod_SOURCES): Likewise.
4606         (date_mod_CFLAGS): Likewise.
4607         (date_mod_LDFLAGS): Likewise.
4608         (datehook_mod_SOURCES): Likewise.
4609         (datehook_mod_CFLAGS): Likewise.
4610         (datehook_mod_LDFLAGS): Likewise.
4612         * conf/i386-ieee1275.rmk (pkglib_MODULES): Add datetime.mod, date.mod
4613         and datehook.mod.
4614         (datetime_mod_SOURCES): New macro.
4615         (datetime_mod_CFLAGS): Likewise.
4616         (datetime_mod_LDFLAGS): Likewise.
4617         (date_mod_SOURCES): Likewise.
4618         (date_mod_CFLAGS): Likewise.
4619         (date_mod_LDFLAGS): Likewise.
4620         (datehook_mod_SOURCES): Likewise.
4621         (datehook_mod_CFLAGS): Likewise.
4622         (datehook_mod_LDFLAGS): Likewise.
4624         * conf/i386-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
4625         and datehook.mod.
4626         (datetime_mod_SOURCES): New macro.
4627         (datetime_mod_CFLAGS): Likewise.
4628         (datetime_mod_LDFLAGS): Likewise.
4629         (date_mod_SOURCES): Likewise.
4630         (date_mod_CFLAGS): Likewise.
4631         (date_mod_LDFLAGS): Likewise.
4632         (datehook_mod_SOURCES): Likewise.
4633         (datehook_mod_CFLAGS): Likewise.
4634         (datehook_mod_LDFLAGS): Likewise.
4636         * conf/x86_64-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
4637         and datehook.mod.
4638         (datetime_mod_SOURCES): New macro.
4639         (datetime_mod_CFLAGS): Likewise.
4640         (datetime_mod_LDFLAGS): Likewise.
4641         (date_mod_SOURCES): Likewise.
4642         (date_mod_CFLAGS): Likewise.
4643         (date_mod_LDFLAGS): Likewise.
4644         (datehook_mod_SOURCES): Likewise.
4645         (datehook_mod_CFLAGS): Likewise.
4646         (datehook_mod_LDFLAGS): Likewise.
4648         * kern/env.c (grub_env_insert): Fix a bug in prevp pointer.
4650         * commands/date.c: New file.
4652         * hook/datehook.c: Likewise.
4654         * include/grub/lib/datetime.h: Likewise.
4656         * include/grub/i386/cmos.h: Likewise.
4658         * lib/datetime.c: Likewise.
4660         * lib/i386/datetime.c: Likewise.
4662         * lib/efi/datetime.c: Likewise.
4664 2008-08-14  Robert Millan  <rmh@aybabtu.com>
4666         * conf/common.rmk (bin_UTILITIES): Add `grub-mkelfimage'.
4667         (grub_mkelfimage_SOURCES): New variable.
4668         (util/elf/grub-mkimage.c_DEPENDENCIES): Likewise.
4670         * conf/i386-coreboot.rmk (bin_UTILITIES, grub_mkimage_SOURCES)
4671         (grub_mkimage_LDFLAGS, util/elf/grub-mkimage.c_DEPENDENCIES): Remove.
4672         * conf/powerpc-ieee1275.rmk: Likewise.
4673         * conf/i386-ieee1275.rmk: Likewise.
4675         * kern/ieee1275/init.c: Include `<grub/cpu/kernel.h>'.
4676         * kern/i386/coreboot/init.c: Likewise.
4678         * kern/i386/ieee1275/startup.S: Replace `<grub/machine/kernel.h>'
4679         with `<grub/cpu/kernel.h>'.
4680         (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Renamed
4681         to ...
4682         (GRUB_KERNEL_CPU_PREFIX, GRUB_KERNEL_CPU_DATA_END): ... this.
4683         * kern/i386/coreboot/startup.S: Likewise.
4685         * include/grub/powerpc/ieee1275/kernel.h (GRUB_MOD_ALIGN)
4686         (GRUB_MOD_GAP): Remove.
4687         * include/grub/powerpc/kernel.h: New file.
4688         * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX)
4689         (GRUB_KERNEL_MACHINE_DATA_END): Remove.
4690         * include/grub/i386/kernel.h: New file.
4691         * include/grub/i386/coreboot/kernel.h (GRUB_MOD_ALIGN)
4692         (GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_PREFIX)
4693         (GRUB_KERNEL_MACHINE_DATA_END): Remove.
4695         * util/ieee1275/grub-install.in (grub_mkimage): Initialize to use
4696         `grub-mkelfimage'.
4697         Use --directory when invoking grub_mkimage.
4699         * util/elf/grub-mkimage.c: Include `<grub/cpu/kernel.h>'.
4700         (add_segments): Replace GRUB_KERNEL_MACHINE_DATA_END and
4701         GRUB_KERNEL_MACHINE_PREFIX with GRUB_KERNEL_CPU_DATA_END
4702         and GRUB_KERNEL_CPU_PREFIX.
4704 2008-08-14  Felix Zielcke  <fzielcke@z-51.de>
4706         * include/grub/err.h (grub_err_printf): New function prototype.
4707         * util/misc.c (grub_err_printf): New function.
4708         * kern/misc.c [! GRUB_UTIL] (grub_err_printf): New alias for
4709         grub_printf.
4710         * kern/err.c (grub_print_error): Use grub_err_printf.
4712 2008-08-13  Robert Millan  <rmh@aybabtu.com>
4714         * docs/grub.cfg: Remove `/dev/' prefix in GNU/Hurd boot entry.
4716 2008-08-13  Robert Millan  <rmh@aybabtu.com>
4718         * docs/grub.cfg: Use the native device name for the example GNU/Hurd
4719         boot entry.
4721 2008-08-12  Robert Millan  <rmh@aybabtu.com>
4723         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Move part
4724         of the relocation code from here ...
4725         (grub_multiboot): ... to here.
4726         (forward_relocator, backward_relocator): Move from here ...
4727         * kern/i386/loader.S (grub_multiboot_forward_relocator)
4728         (grub_multiboot_backward_relocator): ... to here.
4729         (grub_multiboot_real_boot): Use %edx for entry offset.  Put Multiboot
4730         magic in %eax.  Use %ebp for jumping (so %edx is not trashed).
4731         * include/grub/i386/loader.h (grub_multiboot_forward_relocator)
4732         (grub_multiboot_forward_relocator_end)
4733         (grub_multiboot_backward_relocator)
4734         (grub_multiboot_backward_relocator_end): New variables.
4736 2008-08-12  Bean  <bean123ch@gmail.com>
4738         * disk/raid.c (grub_raid_read): Fix a bug in raid0 code.
4740 2008-08-11  Robert Millan  <rmh@aybabtu.com>
4742         * kern/i386/linuxbios/startup.S: Move from here ...
4743         * kern/i386/coreboot/startup.S: ... to here.
4745         * kern/i386/linuxbios/init.c: Move from here ...
4746         * kern/i386/coreboot/init.c: ... to here.
4748         * kern/i386/linuxbios/table.c: Move from here ...
4749         * kern/i386/coreboot/mmap.c: ... to here.
4751         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Update moved files.
4753 2008-08-11  Robert Millan  <rmh@aybabtu.com>
4755         * kern/device.c (grub_device_open): Do not handle grub_disk_open()
4756         errors.  Leave it to the upper layer to handle them.
4758 2008-08-09  Christian Franke  <franke@computer.org>
4760         * Makefile.in: Add `target_os' and `enable_grub_pe2elf'.
4761         * conf/common.rmk: Install `grub-pe2elf' only if requested.
4762         Install `grub.d/10_windows' only on Cygwin.
4763         * configure.ac: Add subst of `target_os'.
4764         Check `target_os' also before setting TARGET_OBJ2ELF.
4765         Add `--enable-grub-pe2elf'.
4767 2008-08-08  Robert Millan  <rmh@aybabtu.com>
4769         * kern/disk.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
4770         (grub_last_time): Change type to grub_uint64_t.
4771         (grub_disk_open): Migrate code from to using grub_get_time_ms().
4772         (grub_disk_close): Likewise.
4774         * normal/menu.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
4775         (run_menu): Migrate code from to using grub_get_time_ms().
4777         * util/misc.c (grub_get_time_ms): New function.
4779 2008-08-08  Marco Gerards  <marco@gnu.org>
4781         * disk/ata.c (grub_ata_regget): Change return type to
4782         `grub_uint8_t'.
4783         (grub_ata_regget2): Likewise.
4784         (grub_ata_wait_status): New function.
4785         (grub_ata_wait_busy): Removed function, updated all users to use
4786         `grub_ata_wait_status'.
4787         (grub_ata_wait_drq): Likewise.
4788         (grub_ata_cmd): New function.
4789         (grub_ata_pio_read): Change return type to `grub_uint8_t'.  Add
4790         error handling.
4791         (grub_ata_pio_write): Add error handling.
4792         (grub_atapi_identify): Likewise.
4793         (grub_atapi_packet): Use `grub_ata_cmd' and improve error
4794         handling.
4795         (grub_ata_identify): Use `grub_ata_cmd' and improve error
4796         handling.  Actually use the detected registers.  Reorder the
4797         detection logic such that it is easier to read.
4798         (grub_ata_pciinit): Do not assign the same ID to each controller.
4799         (grub_ata_setaddress): Use `grub_ata_cmd' and improve error
4800         handling.
4801         (grub_atapi_readsector): Check the result of `grub_ata_pio_read'.
4803         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TIMEOUT'.
4805 2008-08-08  Marco Gerards  <marco@gnu.org>
4807         * NEWS: Update.
4809 2008-08-07  Bean  <bean123ch@gmail.com>
4811         * include/grub/x86_64/pci.h: New file.
4813 2008-08-07  Christian Franke  <franke@computer.org>
4815         * kern/i386/pit.c (TIMER2_SPEAKER): New define.
4816         (TIMER2_GATE): Likewise.
4817         (grub_pit_wait): Add enable/disable of the timer2 gate
4818         bit of port 0x61.  This fixes a possible infinite loop.
4820 2008-08-07  Bean  <bean123ch@gmail.com>
4822         * conf/x86_64-efi.rmk (kernel_mod_SOURCES): Add kern/time.c,
4823         kern/i386/tsc.c and kern/i386/pit.c.
4825         * include/grub/i386/tsc.h (grub_cpu_is_cpuid_supported): Handle
4826         x86_64 platform.
4828         * kern/i386/efi/init.c: Replace <grub/cpu/tsc.h> with
4829         <grub/i386/tsc.h>.
4831         * kern/i386/pit.c: Replace <grub/cpu/io.h> with <grub/i386/io.h>.
4833 2008-08-07  Bean  <bean123ch@gmail.com>
4835         * conf/i386-efi.rmk (kernel_mod_SOURCES): Add kern/time.c.
4837         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add kern/time.c,
4839         * include/grub/i386/pit.h: Use macro KERNEL_CPU_PIT_HEADER to avoid
4840         multiple inclusion. Add #include <grub/types.h>.
4842 2008-08-06  Christian Franke  <franke@computer.org>
4844         * conf/common.rmk: Build and install `10_windows'.
4845         * util/grub.d/10_windows.in: New script.
4847 2008-08-06  Pavel Roskin  <proski@gnu.org>
4849         * kern/i386/pit.c: Include `<grub/i386/pit.h>'.
4851 2008-08-06  Robert Millan  <rmh@aybabtu.com>
4853         * conf/i386-coreboot.rmk (kernel_elf_ASFLAGS): New variable.
4854         * kern/i386/tsc.c: Include `<grub/i386/pit.h>'.
4856 2008-08-06  Bean  <bean123ch@gmail.com>
4858         * fs/i386/pc/pxe.c (grub_pxe_data): New member block_size.
4859         (grub_pxefs_fs_int): Remove dummy definition.
4860         (grub_pxefs_open): Use data->block_size to store the current block
4861         size setting.
4862         (grub_pxefs_read): Use block size stored in data->block_size. As the
4863         value of grub_pxe_blksize can be changed after the file is opened.
4865 2008-08-06  Bean  <bean123ch@gmail.com>
4867         * fs/i386/pc/pxe.c (curr_file): new variable.
4868         (grub_pxefs_open): Simply the handling of pxe file system. Don't
4869         require the dummy internal file system anymore.
4870         (grub_pxefs_read): Removed.
4871         (grub_pxefs_close): Likewise.
4872         (grub_pxefs_fs_int): Likewise.
4873         (grub_pxefs_read_int): Renamed to grub_pxefs_read. Reinitialize tftp
4874         connection when we switch file.
4875         (grub_pxefs_close_int): Renamed to grub_pxefs_close.
4877 2008-08-06  Robert Millan  <rmh@aybabtu.com>
4879         * conf/i386-coreboot.rmk (pkglib_MODULES): Add `reboot.mod' and
4880         `halt.mod'.
4881         (reboot_mod_SOURCES, reboot_mod_CFLAGS, reboot_mod_LDFLAGS)
4882         (halt_mod_SOURCES, halt_mod_CFLAGS, halt_mod_LDFLAGS): New variables.
4884         * kern/i386/halt.c: New file.
4885         * kern/i386/reboot.c: Likewise.
4886         * include/grub/i386/reboot.h: Likewise.
4887         * include/grub/i386/halt.h: Likewise.
4889         * commands/halt.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]:
4890         Include `<grub/cpu/halt.h>'.
4891         * commands/reboot.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]
4892         [! GRUB_MACHINE_PCBIOS]: Include `<grub/cpu/reboot.h>'.
4894         * term/i386/pc/at_keyboard.c: Include `<grub/cpu/at_keyboard.h>'.
4895         (SHIFT_L, SHIFT_R, CTRL, ALT, CAPS_LOCK, KEYBOARD_REG_DATA)
4896         (KEYBOARD_REG_STATUS, KEYBOARD_COMMAND_ISREADY, KEYBOARD_COMMAND_READ)
4897         (KEYBOARD_COMMAND_WRITE, KEYBOARD_COMMAND_REBOOT)
4898         (KEYBOARD_SCANCODE_SET1, KEYBOARD_ISMAKE, KEYBOARD_ISREADY)
4899         (KEYBOARD_SCANCODE, OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): Move
4900         from here ...
4901         * include/grub/i386/at_keyboard.h: ... to here.
4903 2008-08-05  Robert Millan  <rmh@aybabtu.com>
4905         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pit.c'.
4906         * conf/i386-efi.rmk (kernel_mod_SOURCES): Likewise.
4907         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Likewise. Also add
4908         `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
4909         `kern/generic/millisleep.c'.
4911         * kern/i386/tsc.c (calibrate_tsc): Rewrite using grub_pit_wait()
4912         instead of grub_get_rtc().
4913         (grub_tsc_init): Initialize `tsc_boot_time'.
4915         * kern/i386/linuxbios/init.c (grub_millisleep): Remove stub.
4916         (grub_machine_init): Use grub_tsc_init() rather than
4917         installing an RTC-based handler via grub_install_get_time_ms().
4919         * kern/i386/pit.c: New file.
4920         * include/grub/i386/pit.h: Likewise.
4922 2008-08-05  Bean  <bean123ch@gmail.com>
4924         * boot/i386/pc/pxeboot.S (_start): Use drive number 0x7F for pxe.
4926         * conf/i386-pc.rmk (kernel_img_HEADERS): Add machine/pxe.h.
4927         (pkglib_MODULES): Add pxe.mod and pxecmd.mod.
4928         (pxe_mod_SOURCES): New macro.
4929         (pxe_mod_CFLAGS): Likewise.
4930         (pxe_mod_LDFLAGS): Likewise.
4931         (pxecmd_mod_SOURCES): Likewise.
4932         (pxecmd_mod_CFLAGS): Likewise.
4933         (pxecmd_mod_LDFLAGS): Likewise.
4935         * kern/i386/pc/startup.S (grub_pxe_scan): New function.
4936         (grub_pxe_call): Likewise.
4938         * include/grub/disk.h (grub_disk_dev_id): Add GRUB_DISK_DEVICE_PXE_ID.
4940         * commands/i386/pc/pxecmd.c: New file.
4942         * fs/i386/pc/pxe.c: Likewise.
4944         * include/grub/i386/pc/pxe.h: Likewise.
4946 2008-08-05  Bean  <bean123ch@gmail.com>
4948         * util/console.c (grub_console_cur_color): New variable.
4949         (grub_console_standard_color): Likewise.
4950         (grub_console_normal_color): Likewise.
4951         (grub_console_highlight_color): Likewise.
4952         (color_map): Likewise.
4953         (use_color): Likewise.
4954         (NUM_COLORS): New macro.
4955         (grub_ncurses_setcolorstate): Handle color properly.
4956         (grub_ncurses_setcolor): Don't change color here, just remember the
4957         settings, color will be set in grub_ncurses_setcolorstate.
4958         (grub_ncurses_getcolor): New function.
4959         (grub_ncurses_init): Initialize color pairs.
4960         (grub_ncurses_term): New member grub_ncurses_getcolor.
4962 2008-08-05  Colin D Bennett  <colin@gibibit.com>
4964         High resolution timer support.  Implemented for x86 CPUs using TSC.
4965         Extracted generic grub_millisleep() so it's linked in only as needed.
4966         This requires a Pentium compatible CPU; if the RDTSC instruction is
4967         not supported, then it falls back on the generic grub_get_time_ms()
4968         implementation that uses the machine's RTC.
4970         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/time.c',
4971         `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
4972         `kern/generic/millisleep.c'.
4974         * conf/i386-efi.rmk (kernel_mod_SOURCES): Add `kern/i386/tsc.c',
4975         `kern/generic/rtc_get_time_ms.c' and `kern/generic/millisleep.c'.
4977         * conf/x86_64-efi.rml (kernel_mod_SOURCES): Add
4978         `kern/generic/millisleep.c' and `kern/generic/rtc_get_time_ms.c'.
4980         * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
4982         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
4983         `kern/generic/millisleep.c'.
4985         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
4987         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Add `kern/time.c'.
4989         * kern/generic/rtc_get_time_ms.c: New file.
4991         * kern/generic/millisleep.c: New file.
4993         * kern/misc.c: Don't include
4994         <kern/time.h> anymore.
4995         (grub_millisleep_generic): Removed.
4997         * commands/sleep.c (grub_interruptible_millisleep): Uses
4998         grub_get_time_ms() instead of grub_get_rtc().
5000         * include/grub/i386/tsc.h (grub_get_tsc): New file.  New inline
5001         function.
5002         (grub_cpu_is_cpuid_supported): New inline function.
5003         (grub_cpu_is_tsc_supported): New inline function.
5004         (grub_tsc_init): New function prototype.
5005         (grub_tsc_get_time_ms): New function prototype.
5007         * kern/i386/tsc.c (grub_get_time_ms): New file.
5009         * include/grub/time.h: Include <grub/types.h.
5010         (grub_millisleep_generic): Removed.
5011         (grub_get_time_ms): New prototype.
5012         (grub_install_get_time_ms): New prototype.
5013         (grub_rtc_get_time_ms): New prototype.
5015         * kern/time.c (grub_get_time_ms): New function.
5016         (grub_install_get_time_ms): New function.
5018         * kern/i386/efi/init.c: Include <grub/cpu/tsc.h>.  Don't include
5019         <grub/time.h> anymore.
5020         (grub_millisleep): Removed.
5021         (grub_machine_init): Call grub_tsc_init.
5023         * kern/i386/linuxbios/init.c (grub_machine_init): Install the RTC
5024         get_time_ms() implementation.
5026         * kern/sparc64/ieee1275/init.c (grub_millisleep): Removed.
5027         (ieee1275_get_time_ms): New function.
5028         (grub_machine_init): Install get_time_ms() implementation.
5030         * kern/i386/pc/init.c: Include <grub/cpu/tsc.h>.
5031         (grub_machine_init): Call grub_tsc_init().
5032         (grub_millisleep): Removed.
5034         * kern/ieee1275/init.c (grub_millisleep): Removed.
5035         (grub_machine_init): Install ieee1275_get_time_ms()
5036         implementation.
5037         (ieee1275_get_time_ms): New function.
5038         (grub_get_rtc): Now calls ieee1275_get_time_ms(), which does the
5039         real work.
5041 2008-08-05  Marco Gerards  <marco@gnu.org>
5043         * disk/ata.c: Include <grub/pci.h>.
5044         (enum grub_ata_commands): Add `GRUB_ATA_CMD_EXEC_DEV_DIAGNOSTICS'.
5045         (grub_ata_initialize): Rewritten.
5046         (grub_ata_device_initialize): New function.
5048 2008-08-04  Pavel Roskin  <proski@gnu.org>
5050         * kern/main.c: Include grub/mm.h.
5052 2008-08-04  Robert Millan  <rmh@aybabtu.com>
5054         * conf/i386-coreboot.rmk (COMMON_ASFLAGS, COMMON_CFLAGS)
5055         (COMMON_LDFLAGS): Harmonize with i386-pc version (fixes a code
5056         corruption problem).
5058 2008-08-04  Robert Millan  <rmh@aybabtu.com>
5060         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Fix misc
5061         warnings introduced in my last commit.
5063 2008-08-03  Robert Millan  <rmh@aybabtu.com>
5065         Make PCI available on all i386 architectures.
5067         * include/grub/i386/pc/pci.h: Move from here ...
5068         * include/grub/i386/pci.h: ... to here.
5070         * include/grub/i386/pc/pci.h: Remove.
5071         * include/grub/i386/efi/pci.h: Remove.
5072         * include/grub/x86_64/efi/pci.h: Remove.
5074         * include/grub/pci.h: Replace `<grub/machine/pci.h>' with
5075         `<grub/cpu/pci.h>'.
5077         * conf/i386-coreboot.rmk (pkglib_MODULES): Add `pci' and `lspci'.
5078         (pci_mod_SOURCES, pci_mod_CFLAGS, pci_mod_LDFLAGS, lspci_mod_SOURCES)
5079         (lspci_mod_CFLAGS, lspci_mod_LDFLAGS): New variables.
5081         * conf/i386-ieee1275.rmk: Likewise.
5083 2008-08-03  Robert Millan  <rmh@aybabtu.com>
5085         * term/i386/pc/vga_text.c (CRTC_CURSOR_DISABLE): New macro.
5086         (grub_console_setcursor): Make it possible to set cursor off.
5088 2008-08-03  Robert Millan  <rmh@aybabtu.com>
5090         * util/grub.d/00_header.in: Be platform-agnostic.  Probe for existence
5091         of modules instead of assuming which platform provides what.
5092         * util/update-grub.in: Likewise.
5094 2008-08-03  Robert Millan  <rmh@aybabtu.com>
5096         * kern/i386/pc/init.c (make_install_device): Check for `grub_prefix'
5097         instead of `grub_install_dos_part' to determine whether a drive needs
5098         to be prepended to prefix (`grub_install_dos_part' is not reliable,
5099         because it can be overridden when loading GRUB via Multiboot).
5101 2008-08-02  Robert Millan  <rmh@aybabtu.com>
5103         * util/i386/pc/grub-install.in: Remove trailing slash from prefix.
5105 2008-08-02  Robert Millan  <rmh@aybabtu.com>
5107         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Add a pair
5108         of informational grub_dprintf() calls.
5110 2008-08-02  Robert Millan  <rmh@aybabtu.com>
5112         * disk/memdisk.c (memdisk_size): Don't initialize.
5113         (GRUB_MOD_INIT(memdisk)): Find memdisk using grub_module_iterate().
5115         * include/grub/i386/pc/kernel.h
5116         (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): Remove macro.
5117         (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Shift.
5118         (grub_memdisk_image_size, grub_arch_memdisk_addr)
5119         (grub_arch_memdisk_size): Remove.
5121         * include/grub/kernel.h (struct grub_module_header): Remove `offset'
5122         field (was only used to transfer a constant).  Add `type' field to
5123         support multiple module types.
5124         (grub_module_iterate): New function.
5126         * kern/device.c (grub_device_open): Do not hide error messages
5127         when grub_disk_open() fails.  Use grub_print_error() instead.
5129         * kern/i386/pc/init.c (grub_arch_modules_addr)
5130         (grub_arch_memdisk_size): Remove functions.
5131         (grub_arch_modules_addr): Return the module address in high memory
5132         (now that it isn't copied anymore).
5134         * kern/i386/pc/startup.S (grub_memdisk_image_size): Remove variable.
5135         (codestart): Don't add grub_memdisk_image_size to %ecx in LZMA
5136         decompression routine (grub_total_module_size already includes that
5137         now).  Don't copy modules back to low memory.
5139         * kern/main.c: Include `<grub/mm.h>'.
5140         (grub_load_modules): Split out (and use) ...
5141         (grub_module_iterate): ... this function, which iterates through
5142         module objects and runs a hook.
5143         Comment out grub_mm_init_region() call, as it would cause non-ELF
5144         modules to be overwritten.
5146         * util/i386/pc/grub-mkimage.c (generate_image): Instead of appending
5147         the memdisk image in its own region, make it part of the module list.
5148         * util/elf/grub-mkimage.c (options): Add "memdisk"|'m' option.
5149         (main): Parse --memdisk|-m option, and pass user-provided path as
5150         parameter to generate_image().
5151         (add_segments): Pass `memdisk_path' down to load_modules().
5152         (load_modules): Embed memdisk image in module section when requested.
5153         * util/i386/efi/grub-mkimage.c (make_mods_section): Initialize
5154         `header.type' instead of `header.offset'.
5156         * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add `memdisk.mod'.
5157         (memdisk_mod_SOURCES, memdisk_mod_CFLAGS)
5158         (memdisk_mod_LDFLAGS): New variables.
5159         * conf/i386-coreboot.rmk: Likewise.
5160         * conf/i386-ieee1275.rmk: Likewise.
5162 2008-08-02  Robert Millan  <rmh@aybabtu.com>
5164         * loader/i386/pc/multiboot.c (playground, forward_relocator)
5165         (backward_relocator): New variables.  Used to allocate and relocate
5166         the payload, respectively.
5167         (grub_multiboot_load_elf32): Load into heap instead of requested
5168         address, install the appropriate relocator code in each bound of
5169         the payload, and set the entry point such that
5170         grub_multiboot_real_boot() will jump to one of them.
5172         * kern/i386/loader.S (grub_multiboot_payload_size)
5173         (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
5174         (grub_multiboot_payload_entry_offset): New variables.
5175         (grub_multiboot_real_boot): Set cpu context to what the relocator
5176         expects, and jump to the relocator instead of the payload.
5178         * include/grub/i386/loader.h (grub_multiboot_payload_size)
5179         (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
5180         (grub_multiboot_payload_entry_offset): Export.
5182 2008-08-01  Bean  <bean123ch@gmail.com>
5184         * normal/menu_entry.c (editor_getline): Don't return the original
5185         string as result, as it will be released by lexer once it has done
5186         using it.
5188 2008-08-01  Robert Millan  <rmh@aybabtu.com>
5190         * util/grub.d/10_linux.in: Use prepare_grub_to_access_device() from
5191         within menuentries, not before them.
5192         util/grub.d/10_hurd.in: Likewise.
5194 2008-08-01  Bean  <bean123ch@gmail.com>
5196         * conf/common.rmk (pkglib_MODULES): Add bufio.mod.
5197         (bufio_mod_SOURCES): New macro.
5198         (bufio_mod_CFLAGS): Likewise.
5199         (bufio_mod_LDFLAGS): Likewise.
5201         * include/grub/bufio.h: New file.
5203         * io/bufio.c: Likewise.
5205         * video/png.c: Replace <grub/file.h> with <grub/bufio.h>.
5206         (grub_video_reader_png): Use grub_buffile_open to open file.
5208         * video/jpeg.c: Replace <grub/file.h> with <grub/bufio.h>.
5209         (grub_video_reader_jpeg): Use grub_buffile_open to open file.
5211         * video/tga.c: Replace <grub/file.h> with <grub/bufio.h>.
5212         (grub_video_reader_tga): Use grub_buffile_open to open file.
5214         * font/manager.c: Include <grub/bufio.h>.
5215         (add_font): Use grub_buffile_open to open file.
5217 2008-07-31  Robert Millan  <rmh@aybabtu.com>
5219         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): When loading
5220         ELF segments, use a macro for arbitrarily accessing any of them instead
5221         of preparing a pointer that allows access to one at a time.
5222         (grub_multiboot_load_elf64): Likewise.
5224 2008-07-31  Bean  <bean123ch@gmail.com>
5226         * boot/i386/pc/lnxboot.S (real_code_2): Replace 0x50 with
5227         GRUB_KERNEL_MACHINE_DATA_END.
5229 2008-07-30  Robert Millan  <rmh@aybabtu.com>
5231         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_DATA_END):
5232         Increase from 0x50 to 0x60.
5233         * util/i386/pc/grub-install.in: Detect cross-disk installs, and
5234         use UUIDs to identify the root drive for them.  If that's not
5235         possible, abort.
5236         * util/i386/pc/grub-setup.c (setup): Do not special-case, or even
5237         check, for cross-disk installs.
5239 2008-07-30  Robert Millan  <rmh@aybabtu.com>
5241         * kern/ieee1275/init.c (grub_machine_set_prefix): If `grub_prefix'
5242         is non-empty, use it to set the `prefix' environment variable instead
5243         of the usual approach.
5244         * kern/i386/linuxbios/init.c (make_install_device): Remove function.
5245         (grub_machine_set_prefix): Use `grub_prefix' to set the `prefix'
5246         environment variable instead of dummy make_install_device().
5248         * kern/i386/ieee1275/startup.S: Include `<grub/machine/kernel.h>'.
5249         (start): Insert a data section, with `grub_prefix' variable.
5250         * kern/i386/linuxbios/startup.S: Likewise.
5252         * include/grub/powerpc/ieee1275/kernel.h [!ASM_FILE] (grub_prefix):
5253         New variable reference.
5254         * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX):
5255         New macro.  Defines offset of `grub_prefix' within startup.S (relative
5256         to `start').
5257         (GRUB_KERNEL_MACHINE_DATA_END): New macro.  Defines the end of data
5258         section within startup.S (relative to `start').
5259         * include/grub/i386/coreboot/kernel.h: Likewise.
5261         * util/elf/grub-mkimage.c (add_segments): Receive `prefix' parameter.
5262         Overwrite grub_prefix with its contents, at the beginning of the
5263         first segment.
5264         (main): Understand -p|--prefix.
5266 2008-07-30  Robert Millan  <rmh@aybabtu.com>
5268         * util/grub.d/10_hurd.in: Source ${libdir}/grub/update-grub_lib.
5270 2008-07-30  Robert Millan  <rmh@aybabtu.com>
5272         * term/i386/pc/vga_text.c (grub_console_cls): Use
5273         grub_console_gotoxy() to go back to beginning of the screen.
5274         Found by Patrick Georgi <patrick.georgi@coresystems.de>
5276 2008-07-29  Christian Franke  <franke@computer.org>
5278         * util/update-grub_lib.in (make_system_path_relative_to_its_root):
5279         Add conversion of emulated mount points on Cygwin.
5281 2008-07-29  Christian Franke  <franke@computer.org>
5283         * util/update-grub.in: Add a check for admin
5284         group on Cygwin.
5285         Remove old `grub.cfg.new' before creation.
5286         Add `-f' to `mv' to handle the different filesystem
5287         semantics of Windows.
5289 2008-07-29  Bean  <bean123ch@gmail.com>
5291         * normal/main.c (get_line): Fix buffer overflow bug.
5293 2008-07-28  Robert Millan  <rmh@aybabtu.com>
5295         * partmap/apple.c (GRUB_APPLE_HEADER_MAGIC): New macro.
5296         (struct grub_apple_header): New struct.  Describes the layout of
5297         the partmap header.
5298         (apple_partition_map_iterate): Check the header magic as well as the
5299         partition magic (which was already being checked).
5301 2008-07-28  Pavel Roskin  <proski@gnu.org>
5303         * genmk.rb: Add a warning to the beginning of the output that
5304         it's a generated file and should not be edited.
5306 2008-07-28  Robert Millan  <rmh@aybabtu.com>
5308         * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
5309         with the same number are found, just use issue a warning with
5310         grub_dprintf(), as this error has been reported to be non-fatal.
5312 2008-07-27  Robert Millan  <rmh@aybabtu.com>
5314         * disk/ata.c (grub_ata_dumpinfo): Use grub_dprintf() for debugging
5315         information.
5317 2008-07-27  Bean  <bean123ch@gmail.com>
5319         * fs/fat.c (GRUB_FAT_MAXFILE): New constant.
5320         (grub_fat_find_dir): Ignore case when comparing filename.
5322 2008-07-27  Bean  <bean123ch@gmail.com>
5324         * fs/xfs.c (grub_xfs_dir_header): Change field i8count back to
5325         smallino, as it's more descriptive, and i8count can be confused with
5326         the other field count.
5327         (grub_xfs_iterate_dir): Adjust grub_xfs_dir_entry pointer for small
5328         inode type.
5330 2008-07-27  Bean  <bean123ch@gmail.com>
5332         * commands/crc.c: New file.
5334         * lib/crc.c: Likewise.
5336         * include/grub/lib/crc.h: Likewise.
5338         * util/grub-fstest.c: grub/hexdump.h => grub/lib/hexdump.h.
5340         * commands/hexdump.c: grub/hexdump.h => grub/lib/hexdump.h.
5341         (hexdump): Move this function to ...
5343         * lib/hexdump.c: ... here.
5345         * include/grub/hexdump.h: Renamed to ...
5347         * include/grub/lib/hexdump.h: ... this.
5349         * commands/loadenv.c: grub/envblk.h => grub/lib/envblk.h
5351         * util/grub-editenv.c: Likewise.
5353         * include/envblk.h: Renamed to ...
5355         * include/lib/envblk.h: ... this.
5357         * util/envblk.c: Renamed to ...
5359         * lib/envblk.c: ... this.
5361         * conf/common.rmk (grub_fstest_SOURCES): commands/hexdump.c =>
5362         lib/hexdump.c.
5363         (grub_editenv_SOURCES): util/envblk.c => lib/envblk.c
5364         (pkglib_MODULES): Add crc.mod.
5365         (hexdump_mod_SOURCES): Add lib/hexdump.c.
5366         (loadenv_mod_SOURCES): util/envblk.c => lib/envblk.c.
5367         (crc_mod_SOURCES): New macro.
5368         (crc_mod_CFLAGS): Likewise.
5369         (crc_mod_LDFLAGS): Likewise.
5371         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add lib/hexdump.c.
5373         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
5375         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
5377         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5379         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
5381 2008-07-27  Felix Zielcke  <fzielcke@z-51.de>
5383         * commands/help.c: Include <grub/term.h>.
5384         (TERM_WIDTH): Removed.  Updated all users.
5386 2008-07-27  Pavel Roskin  <proski@gnu.org>
5388         * util/getroot.c (find_root_device): Rephrase a comment to avoid
5389         spurious warnings about a comment within a comment.
5391 2008-07-25  Robert Millan  <rmh@aybabtu.com>
5393         * util/getroot.c (find_root_device): Skip devices that match
5394         /dev/dm-[0-9].  This lets the real device be found for any type of
5395         abstraction (LVM, EVMS, RAID..).
5396         (grub_guess_root_device): Do not traverse /dev/mapper (for LVM)
5397         and /dev/evms (for EVMS) before traversing /dev.  If a /dev/dm-[0-9]
5398         device is found first, find_root_device() will now skip it.
5400 2008-07-24  Pavel Roskin  <proski@gnu.org>
5402         * include/grub/types.h: Use __builtin_bswap32() and
5403         __builtin_bswap64() with gcc 4.3 and newer.
5405 2008-07-24  Christian Franke  <franke@computer.org>
5407         * util/i386/pc/grub-install.in: If `--debug' is specified,
5408         pass `--verbose' to grub-setup.
5409         Abort script if make_system_path_relative_to_its_root() fails.
5411 2008-07-24  Bean  <bean123ch@gmail.com>
5413         * configure.ac: Fixed a bug caused by the previous cygwin patch,
5414         variable `target_platform' should be `platform'.
5416 2008-07-24  Bean  <bean123ch@gmail.com>
5418         * video/reader/png.c (DEFLATE_HLIT_MAX): Change value.
5419         (grub_png_init_fixed_block): New function.
5420         (grub_png_decode_image_data): Handle fixed huffman code compression.
5422 2008-07-24  Bean  <bean123ch@gmail.com>
5424         * common.rmk (bin_UTILITIES): Add grub-pe2elf.
5425         (grub_pe2elf_SOURCES): New macro.
5426         (CLEANFILES): Add grub-pe2elf.
5428         * include/grub/efi/pe32.h (GRUB_PE32_SCN_ALIGN_1BYTES): New constant.
5429         (GRUB_PE32_SCN_ALIGN_2BYTES): Likewise.
5430         (GRUB_PE32_SCN_ALIGN_4BYTES): Likewise.
5431         (GRUB_PE32_SCN_ALIGN_8BYTES): Likewise.
5432         (GRUB_PE32_SCN_ALIGN_16BYTES): Likewise.
5433         (GRUB_PE32_SCN_ALIGN_32BYTES): Likewise.
5434         (GRUB_PE32_SCN_ALIGN_64BYTES): Likewise.
5435         (GRUB_PE32_SCN_ALIGN_SHIFT): Likewise.
5436         (GRUB_PE32_SCN_ALIGN_MASK): Likewise.
5437         (GRUB_PE32_SYM_CLASS_EXTERNAL): Likewise.
5438         (GRUB_PE32_SYM_CLASS_STATIC): Likewise.
5439         (GRUB_PE32_SYM_CLASS_FILE): Likewise.
5440         (GRUB_PE32_DT_FUNCTION): Likewise.
5441         (GRUB_PE32_REL_I386_DIR32): Likewise.
5442         (GRUB_PE32_REL_I386_REL32): Likewise.
5443         (grub_pe32_symbol): New structure.
5444         (grub_pe32_reloc): Likewise.
5446         * util/grub-pe2elf.c: New file.
5448         * configure.ac: Set TARGET_OBJ2ELF if host os is cygwin. Don't test for
5449         start symbol in non pc platform.
5451         * genmk.rb: Use TARGET_OBJ2ELF to convert native object format to elf.
5453         The following patches are from Christian Franke.
5455         * include/grub/dl.h: Remove .previous, gas supports this only
5456         for ELF format.
5458         * include/grub/symbol.h [__CYGWIN__] (#define FUNCTION/VARIABLE):
5459         Remove .type, gas supports this only for ELF format.
5461         * kern/dl.c (grub_dl_resolve_dependencies): Add check for trailing
5462         nullbytes in symbol table. This fixes an infinite loop if table is
5463         zero filled.
5465         * Makefile.in: Add autoconf replacements TARGET_IMG_LDSCRIPT,
5466         TARGET_IMG_LDFLAGS and EXEEXT.
5468         * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Replace -Wl,-N by
5469         TARGET_IMG_LDFLAGS_AC.
5470         (grub_CHECK_STACK_ARG_PROBE): New function.
5472         * conf/i386-pc.rmk: Replace -Wl,-N by TARGET_IMG_LDFLAGS.
5474         * conf/i386-pc-cygwin-ld-img.sc: New linker script.
5476         * configure.ac: Add check for linker script "conf/${target}-img-ld.c"
5477         to set TARGET_IMG_LD* accordingly.
5478         Add check for Cygwin to set TARGET_MOD_OBJCOPY accordingly.
5479         Add call to grub_CHECK_STACK_ARG_PROBE.
5480         Use TARGET_IMG_LDFLAGS to check start, bss_start, end symbols.
5482         * genkernsyms.sh.in: Handle HAVE_ASM_USCORE case.
5484         * genmk.rb: Add EXEEXT to CLEANFILES.
5486 2008-07-23  Robert Millan  <rmh@aybabtu.com>
5488         * Makefile.in (UNICODE_ARROWS, UNICODE_LINES): New variables (they
5489         define the codes for arrows and lines used for the menu).
5490         (ascii.pff): Generate fonts for $(UNICODE_ARROWS) and $(UNICODE_LINES)
5491         as well.
5493         * util/update-grub_lib.in (font_path): Prefer ascii.pff over complete
5494         fonts, because the latter are too slow.
5496 2008-07-21  Bean  <bean123ch@gmail.com>
5498         * kern/i386/pc/startup.S (gate_a20_try_bios): Change test order for
5499         a20. Run keyboard test last, as it will cause macbook to halt.
5501 2008-07-18  Pavel Roskin  <proski@gnu.org>
5503         * kern/dl.c: Go back to using GRUB_CPU_SIZEOF_VOID_P.  We cannot
5504         load foreign architecture modules correctly anyway.  Keep
5505         support for loading host architecture modules, whether we
5506         compile them or not.
5508 2008-07-17  Pavel Roskin  <proski@gnu.org>
5510         * configure.ac: Use -m32 or -m64 regardless of whether we had to
5511         change target_cpu.  The compiler default can mismatch target_cpu
5512         in any case.
5514         * disk/efi/efidisk.c: Fix format warnings on x86_64.
5515         * kern/efi/efi.c: Likewise.
5517         * aclocal.m4 (grub_PROG_TARGET_CC): New macro.  Check if the
5518         target compiler is functional.
5519         * configure.ac: Call grub_PROG_TARGET_CC once all target flags
5520         are set up.
5522         * configure.ac: Default to efi platform for x86_64-apple.  Allow
5523         powerpc64 CPU, default to ieee1275 platform for it.  Split CPU
5524         adjustments from the rest, only do them if target is not
5525         explicitly given.  Merge other adjustments with the final sanity
5526         check.  Remove an extraneous check for supported CPU.  Be
5527         specific which CPU and which platform is not supported.
5529         * configure.ac: Default to pc platform for x86_64.
5531 2008-07-17  Robert Millan  <rmh@aybabtu.com>
5533         Partial LinuxBIOS -> Coreboot rename.
5535         * conf/i386-linuxbios.rmk: Renamed to ...
5536         * conf/i386-coreboot.rmk: ... this.
5537         * Makefile.in (RMKFILES): s/i386-linuxbios.rmk/i386-coreboot.rmk/g.
5538         * configure.ac: Accept "coreboot" as input platform (but maintain
5539         compatibility with "linuxbios").
5540         * include/grub/i386/linuxbios: Renamed to ...
5541         * include/grub/i386/coreboot: ... this.
5543 2008-07-17  Bean  <bean123ch@gmail.com>
5545         * conf/i386/efi.rmk (pkglib_MODULES): add pci.mod and lspci.mod.
5546         (appleldr_mod_SOURCE): New variable.
5547         (appleldr_mod_CFLAGS): Likewise.
5548         (appleldr_mod_LDFLAGS): Likewise.
5549         (pci_mod_SOURCES): Likewise.
5550         (pci_mod_CFLAGS): Likewise.
5551         (pci_mod_LDFLAGS): Likewise.
5552         (lspci_mod_SOURCES): Likewise.
5553         (lspci_mod_CFLAGS): Likewise.
5554         (lspci_mod_LDFLAGS): Likewise.
5556         * conf/x86_64-efi.rmk: New file.
5558         * disk/efi/efidisk.c (grub_efidisk_read): Wrap efi calls with efi_call_N
5559         macro.
5560         (grub_efidisk_write): Likewise.
5562         * include/efi/api.h (efi_call_0): New macro.
5563         (efi_call_1): Likewise.
5564         (efi_call_2): Likewise.
5565         (efi_call_3): Likewise.
5566         (efi_call_4): Likewise.
5567         (efi_call_5): Likewise.
5568         (efi_call_6): Likewise.
5570         * include/grub/efi/chainloader.h (grub_chainloader_cmd): Rename to
5571         grub_rescue_cmd_chainloader.
5573         * include/grub/efi/pe32.h (GRUB_PE32_MACHINE_X86_64): New macro.
5574         (grub_pe32_optional_header): Change some fields based on i386 or
5575         x86_64 platform.
5576         (GRUB_PE32_PE32_MAGIC): Likewise.
5578         * include/grub/efi/uga_draw.h: New file.
5580         * include/grub/elf.h (STN_ABS): New constant.
5581         (R_X86_64_NONE): Relocation constant for x86_64.
5582         (R_X86_64_64): Likewise.
5583         (R_X86_64_PC32): Likewise.
5584         (R_X86_64_GOT32): Likewise.
5585         (R_X86_64_PLT32): Likewise.
5586         (R_X86_64_COPY): Likewise.
5587         (R_X86_64_GLOB_DAT): Likewise.
5588         (R_X86_64_JUMP_SLOT): Likewise.
5589         (R_X86_64_RELATIVE): Likewise.
5590         (R_X86_64_GOTPCREL): Likewise.
5591         (R_X86_64_32): Likewise.
5592         (R_X86_64_32S): Likewise.
5593         (R_X86_64_16): Likewise.
5594         (R_X86_64_PC16): Likewise.
5595         (R_X86_64_8): Likewise.
5596         (R_X86_64_PC8): Likewise.
5598         * include/grub/i386/efi/pci.h: New file.
5600         * include/grub/i386/linux.h (GRUB_LINUX_EFI_SIGNATURE):
5601         Change it value based on platform.
5602         (GRUB_LINUX_EFI_SIGNATURE_0204): New constant.
5603         (GRUB_E820_RAM): Likewise.
5604         (GRUB_E820_RESERVED): Likewise.
5605         (GRUB_E820_ACPI): Likewise.
5606         (GRUB_E820_NVS): Likewise.
5607         (GRUB_E820_EXEC_CODE): Likewise.
5608         (GRUB_E820_MAX_ENTRY): Likewise.
5609         (grub_e820_mmap): New structure.
5610         (linux_kernel_header): Change the efi field according to different
5611         kernel version, also field from linux_kernel_header.
5613         * include/grub/kernel.h (grub_module_info): Add padding for x86_64.
5615         * include/grub/pci.h (GRUB_PCI_ADDR_SPACE_MASK): New constant.
5616         (GRUB_PCI_ADDR_SPACE_MEMORY): Likewise.
5617         (GRUB_PCI_ADDR_SPACE_IO): Likewise.
5618         (GRUB_PCI_ADDR_MEM_TYPE_MASK): Likewise.
5619         (GRUB_PCI_ADDR_MEM_TYPE_32): Likewise.
5620         (GRUB_PCI_ADDR_MEM_TYPE_1M): Likewise.
5621         (GRUB_PCI_ADDR_MEM_TYPE_64): Likewise.
5622         (GRUB_PCI_ADDR_MEM_PREFETCH): Likewise.
5623         (GRUB_PCI_ADDR_MEM_MASK): Likewise.
5624         (GRUB_PCI_ADDR_IO_MASK): Likewise.
5626         * include/grub/x86_64/efi/kernel.h: New file.
5628         * include/grub/x86_64/efi/loader.h: Likewise.
5630         * include/grub/x86_64/efi/machine.h: Likewise.
5632         * include/grub/x86_64/efi/pci.h: Likewise.
5634         * include/grub/x86_64/efi/time.h: Likewise.
5636         * include/grub/x86_64/linux.h: Likewise.
5638         * include/grub/x86_64/setjmp.h: Likewise.
5640         * include/grub/x86_64/time.h: Likewise.
5642         * include/grub/x86_64/types.h: Likewise.
5644         * kern/dl.c (GRUB_CPU_SIZEOF_VOID_P): Changed to
5645          GRUB_TARGET_SIZEOF_VOID_P.
5647         * kern/efi/efi.c (grub_efi_locate_protocol): Wrap efi calls.
5648         (grub_efi_locate_handle): Likewise.
5649         (grub_efi_open_protocol): Likewise.
5650         (grub_efi_set_text_mode): Likewise.
5651         (grub_efi_stall): Likewise.
5652         (grub_exit): Likewise.
5653         (grub_reboot): Likewise.
5654         (grub_halt): Likewise.
5655         (grub_efi_exit_boot_services): Likewise.
5656         (grub_get_rtc): Likewise.
5658         * kern/efi/mm.c (MEMORY_MAP_SIZE): Change to 0x3000 for new models.
5659         (GRUB_CPU_SIZEOF_VOID_P): Changed to GRUB_TARGET_SIZEOF_VOID_P.
5660         (grub_efi_allocate_pages): Wrap efi calls.
5661         (grub_efi_free_pages): Wrap efi calls.
5662         (grub_efi_get_memory_map): Wrap efi calls.
5664         * kern/x86_64/dl.c: New file.
5666         * kern/x86_64/efi/callwrap.S: Likewise.
5668         * kern/x86_64/efi/startup.S: Likewise.
5670         * loader/efi/appleloader.c: Likewise.
5672         * loader/efi/chainloader.c (cmdline): New variable.
5673         (grub_chainloader_unload): Wrap efi calls.
5674         (grub_chainloader_boot): Likewise.
5675         (grub_rescue_cmd_chainloader): Wrap efi calls, handle
5676         command line.
5678         * loader/efi/chainloader_normal.c (chainloader_command):
5679         Change grub_chainloader_cmd to grub_rescue_cmd_chainloader, pass
5680         command line.
5682         * loader/i386/efi/linux.c (allocate_pages): Change allocation
5683         method.
5684         (grub_e820_add_region): New function.
5685         (grub_linux_boot): Construct e820 map from efi map, handle x86_64
5686         booting.
5687         (grub_find_video_card): New function.
5688         (grub_linux_setup_video): New function.
5689         (grub_rescue_cmd_linux): Probe for video information.
5691         * normal/x86_64/setjmp.S: New file.
5693         * term/efi/console.c (map_char): New function.
5694         (grub_console_putchar): Map unicode char.
5695         (grub_console_checkkey): Wrap efi calls.
5696         (grub_console_getkey): Likewise.
5697         (grub_console_getwh): Likewise.
5698         (grub_console_gotoxy): Likewise.
5699         (grub_console_cls): Likewise.
5700         (grub_console_setcolorstate): Likewise.
5701         (grub_console_setcursor): Likewise.
5703         * util/i386/efi/grub-mkimage.c: Add support for x86_64.
5705 2008-07-16  Pavel Roskin  <proski@gnu.org>
5707         * loader/i386/efi/linux.c (allocate_pages): Fix warnings in
5708         format strings.
5710         * util/i386/efi/grub-mkimage.c (get_target_address): Return a
5711         pointer, not an integer.  This fixes a warning and prevents
5712         precision loss on 64-bit systems.
5713         (relocate_addresses): Remove unneeded cast.
5715 2008-07-15  Pavel Roskin  <proski@gnu.org>
5717         * kern/i386/ieee1275/init.c: Include grub/cache.h.
5719         * term/ieee1275/ofconsole.c: Disable code unused on i386.
5721         * kern/ieee1275/ieee1275.c (grub_ieee1275_get_integer_property):
5722         Fix comparison between signed and unsigned.
5724         * include/grub/i386/ieee1275/console.h: Declare
5725         grub_console_init() and grub_console_fini().
5727         * loader/i386/ieee1275/linux.c (grub_set_bootpath): Remove.
5728         It's empty and unused.
5730         * fs/ext2.c (grub_ext2_read_block): Initialize blknr in the
5731         beginning to avoid warnings with some compilers.
5733         * loader/ieee1275/multiboot2.c: Include grub/machine/loader.h.
5734         [__i386__] (grub_mb2_arch_boot): Avoid unnecessary cast.
5736 2008-07-14  Pavel Roskin  <proski@gnu.org>
5738         * kern/env.c (grub_register_variable_hook): Don't copy empty
5739         string, it leaks memory.  Pass "" to grub_env_set(), it should
5740         handle constant strings.
5742         * commands/blocklist.c (grub_cmd_blocklist): Fix format warning.
5743         * commands/cmp.c (grub_cmd_cmp): Likewise.
5744         * kern/dl.c (grub_dl_flush_cache): Likewise.
5745         (grub_dl_load_core): Likewise.
5746         * kern/elf.c (grub_elf32_load_phdrs): Likewise.
5747         (grub_elf64_load_phdrs): Likewise.
5749 2008-07-13  Pavel Roskin  <proski@gnu.org>
5751         * lib/LzmaEnc.c (LzmaEnc_SetProps): Fix warning about comparison
5752         between signed and unsigned.
5753         (LzmaEnc_Finish): Fix warning about an unused parameter.
5755 2008-07-13  Bean  <bean123ch@gmail.com>
5757         * Makefile.in (enable_lzo): New rule.
5759         * conf/i386-pc.rmk (grub_mkimage_SOURCES): New test with enable_lzo.
5761         * configure.ac (ENABLE_LZO): New option --enable-lzo.
5763         * boot/i386/pc/lnxboot.S: #include <config.h>.
5765         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE): Change
5766         its value according to the compression algorithm used, lzo or lzma.
5768         * util/i386/pc/grub-mkimage.c (compress_kernel): Use different
5769         compression algorithm according to configure macro.
5771         * kern/i386/pc/startup.S (codestart): Likewise.
5773         * kern/i386/pc/lzma_decode.S: New file.
5775         * include/grub/lib/LzFind.h: Likewise.
5777         * include/grub/lib/LzHash.h: Likewise.
5779         * include/grub/lib/LzmaDec.h: Likewise.
5781         * include/grub/lib/LzmaEnc.h: Likewise.
5783         * include/grub/lib/LzmaTypes.h: Likewise.
5785         * lib/LzFind.c: Likewise.
5787         * lib/LzmaDec.c: Likewise.
5789         * lib/LzmaEnc.c: Likewise.
5791 2008-07-13  Bean  <bean123ch@gmail.com>
5793         * fs/ext2.c (EXT4_EXTENTS_FLAG): New macro.
5794         (grub_ext4_extent_header): New structure.
5795         (grub_ext4_extent): Likewise.
5796         (grub_ext4_extent_idx): Likewise.
5797         (grub_ext4_find_leaf): New function.
5798         (grub_ext2_read_block): Handle extents.
5800 2008-07-12  Robert Millan  <rmh@aybabtu.com>
5802         * util/i386/pc/grub-mkrescue.in: s/grub-install/grub-mkrescue/g.
5804 2008-07-11  Robert Millan  <rmh@aybabtu.com>
5806         * util/grub.d/40_custom.in: New file. Example on how to add custom
5807         entries to /etc/grub.d.
5808         * conf/common.rmk (%, update-grub_SCRIPTS, CLEANFILES): Install
5809         40_custom (implicitly, by merging all the grub.d rules).
5811 2008-07-11  Pavel Roskin  <proski@gnu.org>
5813         * commands/read.c (grub_getline): Fix invalid memory access.
5814         Don't add newline to the variable value.
5816         * term/i386/pc/serial.c (GRUB_SERIAL_PORT_NUM): New constant.
5817         [!GRUB_MACHINE_PCBIOS] (serial_hw_io_addr): Add COM2 and COM3.
5818         (serial_hw_get_port): Check validity of the port number.
5819         (grub_cmd_serial): Check return value of serial_hw_get_port().
5821 2008-07-07  Pavel Roskin  <proski@gnu.org>
5823         * boot/i386/pc/diskboot.S (notification_string): Replace
5824         "Loading kernel" with just "loading".  This is shorter, less
5825         confusing and saves a few bytes for possible future changes.
5827 2008-07-05  Pavel Roskin  <proski@gnu.org>
5829         * disk/ata.c (grub_ata_dumpinfo): Don't output addressing and
5830         size for ATAPI devices, they are undefined.  Output sector
5831         number in decimal form.
5833         * disk/ata.c: Use named constants for status bits.
5835 2008-07-04  Pavel Roskin  <proski@gnu.org>
5837         * kern/i386/linuxbios/init.c (grub_machine_init): Cast addr to
5838         grub_addr_t before casting it to the void pointer to fix a
5839         warning.  Non-addressable regions are discarded earlier.
5840         (grub_arch_modules_addr): Cast _end to grub_addr_t.
5841         * kern/i386/linuxbios/table.c: Include grub/misc.h.
5842         (check_signature): Don't shadow table_header.
5843         (grub_linuxbios_table_iterate): Cast numeric constants to
5844         grub_linuxbios_table_header_t.
5845         * include/grub/i386/linuxbios/init.h: Add noreturn attribute to
5846         grub_stop().
5848         * kern/ieee1275/init.c: Cast _start and _end to grub_addr_t to
5849         prevent warnings.
5851         * include/grub/misc.h (ALIGN_UP): Avoid unnecessary cast to a
5852         pointer, which can cause warnings.  Support 64-bit addresses.
5854         * util/elf/grub-mkimage.c: Use GRUB_TARGET_SIZEOF_LONG instead
5855         of sizeof(long).  This fixes PowerPC image generation on x86_64.
5857 2008-07-04  Robert Millan  <rmh@aybabtu.com>
5859         This fixes a performance issue when pc & gpt partmap iterators
5860         didn't abort iteration even after our hook found what it was
5861         looking for (often causing expensive probes of non-existent drives).
5863         Some callers relied on previous buggy behaviour, since they would
5864         raise an error when their own hooks caused early abortion of its
5865         iteration.
5867         * kern/device.c (grub_device_open): Improve error message.
5868         * disk/lvm.c (grub_lvm_open): Likewise.
5869         * disk/raid.c (grub_raid_open): Likewise.
5871         * partmap/pc.c (pc_partition_map_iterate): Abort parent iteration
5872         when hook requests it, independently of grub_errno.
5873         (pc_partition_map_probe): Do not fail when find_func() caused
5874         early abortion of pc_partition_map_iterate().
5876         * partmap/gpt.c (gpt_partition_map_iterate): Abort parent iteration
5877         when hook requests it, independently of grub_errno.
5878         (gpt_partition_map_probe): Do not fail when find_func() caused
5879         early abortion of gpt_partition_map_iterate().
5881         * kern/partition.c (grub_partition_iterate): Abort parent iteration
5882         when hook requests it, independently of grub_errno.  Do not fail when
5883         part_map_iterate_hook() caused early abortion of p->iterate().
5885         * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Do not fail
5886         when grub_partition_iterate() returned with non-zero.
5888 2008-07-03  Pavel Roskin  <proski@gnu.org>
5890         * disk/ata.c (grub_ata_pio_write): Check status before writing,
5891         like we do in grub_ata_pio_read().
5892         (grub_ata_readwrite): Always write individual sectors.  Fix the
5893         sector count for the remainder.
5894         (grub_ata_write): Enable writing to ATA devices.  Correctly
5895         report error for ATAPI devices.
5897 2008-07-02  Pavel Roskin  <proski@gnu.org>
5899         * boot/i386/pc/cdboot.S: Add _start entry to fix a linker
5900         warning.
5902         * disk/ata.c (grub_ata_readwrite): Don't increment sector number
5903         for every read sector, we already increment it for the whole
5904         batch.  This fixes reading more than 256 sectors at once.
5906         * util/grub-editenv.c (cmd_info): Cast argument to long
5907         explicitly.  ptrdiff_t reduces to int on i386.
5909         * util/grub-editenv.c (main): Be specific which parameter is
5910         missing.
5912         * disk/memdisk.c (memdisk_addr): Make a pointer to fix warnings.
5913         (memdisk): Make memdisk_orig_addr a pointer.
5915         * fs/reiserfs.c (grub_reiserfs_read): Fix misuse of grub_size_t
5916         for file offsets, use grub_off_t instead.  Fix printf format
5917         warnings.
5919         * fs/reiserfs.c: Remove #warning, TODO list items don't belong
5920         there.  Real unexpected warnings should not drown in the noise
5921         about known problems.
5923         * commands/hexdump.c (grub_cmd_hexdump): Fix misuse of
5924         grub_disk_addr_t for memory addresses.
5926         * loader/aout.c (grub_aout_load): Cast load_addr to pointer
5927         explicitly to fix a warning.
5929         * util/grub-editenv.c (cmd_info): Fix warning in printf format.
5931         * Makefile.in (MODULE_LDFLAGS): New variable.
5932         * aclocal.m4 (grub_PROG_LD_BUILD_ID_NONE): New macro.  Check if
5933         the linker accepts --build-id=none.
5934         * configure.ac: Call grub_PROG_LD_BUILD_ID_NONE.  Substitute
5935         MODULE_LDFLAGS.
5936         * genmk.rb: Use MODULE_LDFLAGS when linking modules.
5938         * fs/xfs.c (struct grub_xfs_dir_header): Use names similar to
5939         those in Linux XFS code.  Provide a way to access 64-bit parent
5940         inode.
5941         (grub_xfs_iterate_dir): Use the new names.  Avoid reading past
5942         the end of struct grub_xfs_dir_header.
5944 2008-07-02  Bean  <bean123ch@gmail.com>
5946         * include/grub/ieee1275.h (grub_ieee1275_flag): New constant
5947         GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
5948         and GRUB_IEEE1275_FLAG_NO_ANSI.
5950         * kern/ieee1275/cmain.c (grub_ieee1275_find_options): Set flag
5951         GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
5952         and GRUB_IEEE1275_FLAG_NO_ANSI for Open Hackware.
5954         * kern/ieee1275/ieee1275.c (grub_ieee1275_interpret): Return
5955         immediately if GRUB_IEEE1275_FLAG_CANNOT_INTERPRET is set.
5957         * kern/ieee1275/init.c (grub_claim_heap): Claim memory directly if
5958         GRUB_IEEE1275_FLAG_FORCE_CLAIM is set.
5960         * term/ieee1275/ofconsole.c (grub_ofconsole_writeesc): Don't output
5961         esc sequence on non ANSI terminal.
5962         (grub_ofconsole_gotoxy): Emulate backspace key on non ANSI terminal.
5964         * util/elf/grub-mkimage.c (add_segments): Move ELF header to the
5965         beginning of file.
5967 2008-07-02  Bean  <bean123ch@gmail.com>
5969         * conf/common.rmk (bin_UTILITIES): Add grub-editenv.
5970         (grub_editenv_SOURCES): New variable.
5971         (pkglib_MODULES): Add loadenv.mod.
5972         (loadenv_mod_SOURCES): New variable.
5973         (loadenv_mod_CFLAGS): Likewise.
5974         (loadenv_mod_LDFLAGS): Likewise.
5976         * include/grub/envblk.h: New file.
5978         * util/envblk.c: New file.
5980         * util/grub-editenv.c: New file.
5982         * commands/loadenv.c: New file.
5984 2008-07-01  Pavel Roskin  <proski@gnu.org>
5986         * include/multiboot2.h (struct multiboot_tag_module): Use char,
5987         not unsigned char.  This fixes warnings and is consistent with
5988         other tags.
5990         * disk/fs_uuid.c (search_fs_uuid): Correctly increment count.
5992         * normal/parser.y: Define YYENABLE_NLS as 0 to fix warnings.
5994         * term/tparm.c (analyze): Always set *popcount.
5996         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Remove useless
5997         cast to fix a warning.
5999         * loader/i386/pc/multiboot2.c (grub_mb2_arch_module_alloc): Use
6000         cast to suppress a warning.
6002         * fs/afs.c (grub_afs_read_block): Return grub_disk_addr_t, as
6003         grub_fshelp_read_file() expects.
6005         * fs/fat.c: Fix UUID calculation on big-endian systems.  We
6006         write uuid as a 32-bit value in CPU byte order, so declare and
6007         use it as such.
6009         * disk/raid.c: Cast grub_dprintf() arguments to unsigned long
6010         long if the format specifier expects it.
6011         * partmap/gpt.c (gpt_partition_map_iterate): Likewise.
6012         * partmap/pc.c (pc_partition_map_iterate): Likewise.
6013         * fs/ntfs.c (grub_ntfs_uuid): Cast data->uuid to unsigned long
6014         long to fix a warning.
6015         * fs/reiserfs.c (grub_reiserfs_read): Change casts in
6016         grub_dprintf() arguments to fix warnings.
6018 2008-06-30  Pavel Roskin  <proski@gnu.org>
6020         * util/i386/pc/grub-setup.c (setup): Write install_dos_part and
6021         install_bsd_part immediately before core.img is embedded or
6022         modified on disk.  This fixes core.img verification if core.img
6023         cannot be embedded.
6025         * util/i386/pc/grub-setup.c (setup): Use core_path_dev, not
6026         core_path to calculate the blocklist.
6027         Patch from Javier Martín <lordhabbit@gmail.com>
6029 2008-06-29  Robert Millan  <rmh@aybabtu.com>
6031         * fs/xfs.c (GRUB_XFS_FSB_TO_BLOCK): New macro.  Maps filesystem
6032         block to disk block.
6033         (grub_xfs_read_block): Use GRUB_XFS_FSB_TO_BLOCK() on result.
6034         Patch from Niels Böhm <bitbucket@arcor.de>
6036 2008-06-29  Robert Millan  <rmh@aybabtu.com>
6038         * util/update-grub_lib.in (font_path): Search for fonts in
6039         /boot/grub first, which is more likely to be readable (we aren't
6040         deciding where fonts live, just looking for them).
6042 2008-06-26  Pavel Roskin  <proski@gnu.org>
6044         * util/biosdisk.c (read_device_map): Don't leave dead map
6045         entries for devices failing stat() check.
6047         * util/i386/pc/grub-setup.c (setup): Don't reuse core_path, use
6048         core_path_dev for the core.img path on the target device.
6050 2008-06-26  Robert Millan  <rmh@aybabtu.com>
6052         * disk/fs_uuid.c: New file.
6053         * conf/common.rmk (pkglib_MODULES): Add `fs_uuid.mod'.
6054         (fs_uuid_mod_SOURCES, fs_uuid_mod_CFLAGS)
6055         (fs_uuid_mod_LDFLAGS): New variables.
6056         * include/grub/disk.h (grub_disk_dev_id): Add
6057         `GRUB_DISK_DEVICE_UUID_ID'.
6058         * kern/disk.c (grub_disk_dev_iterate): Allow disk devices not to
6059         implement iterate().
6061 2008-06-26  Robert Millan  <rmh@aybabtu.com>
6063         * util/grub.d/10_linux.in: Avoid passing UUIDs to Linux when either
6064         "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" does not exist, or when a
6065         Linux image includes no initrd.
6067 2008-06-21  Javier Martín  <lordhabbit@gmail.com>
6069         * util/i386/pc/grub-setup.c (setup): Remove literal "core.img" in a
6070         call to resolve the core image location that effectively appended the
6071         name twice.
6073 2008-06-21  Robert Millan  <rmh@aybabtu.com>
6075         * util/grub.d/00_header.in: Move last prepare_grub_to_access_device()
6076         call from here ...
6078         * util/grub.d/10_hurd.in: ... to here ...
6079         * util/grub.d/10_linux.in: ... and here.
6081 2008-06-19  Robert Millan  <rmh@aybabtu.com>
6083         * kern/main.c (grub_main): Export `prefix' variable immediately
6084         after it has been set by grub_machine_set_prefix().
6086 2008-06-19  Robert Millan  <rmh@aybabtu.com>
6088         * commands/search.c (search_label, search_fs_uuid, search_file): Print
6089         search result when not saving to variable, not the other way around.
6090         When saving to variable, abort iteration as soon as a match is found.
6092 2008-06-19  Robert Millan  <rmh@aybabtu.com>
6094         * util/update-grub_lib.in (prepare_grub_to_access_device): Remove
6095         check for partition that provides /boot/grub.  Its logic is flawed,
6096         as it prevents prepare_grub_to_access_device() from being called
6097         multiple times.
6099 2008-06-19  Robert Millan  <rmh@aybabtu.com>
6101         * util/update-grub_lib.in (prepare_grub_to_access_device): Issue
6102         "insmod" command directly when abstraction modules are needed,
6103         instead of relying on GRUB_PRELOAD_MODULES (which had no effect
6104         since it had already been processed).
6106 2008-06-19  Pavel Roskin  <proski@gnu.org>
6108         * conf/i386-efi.rmk: Recompile grub-mkimage.c if Makefile has
6109         changed.  This is needed in case GRUB_LIBDIR changes.
6110         * conf/i386-ieee1275.rmk: Likewise.
6111         * conf/i386-linuxbios.rmk: Likewise.
6112         * conf/i386-pc.rmk: Likewise.
6113         * conf/powerpc-ieee1275.rmk: Likewise.
6115 2008-06-18  Pavel Roskin  <proski@gnu.org>
6117         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Rename
6118         kernel_elf_symlist.c to symlist.c for consistency with other
6119         architectures.  Update all users.
6120         * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
6122 2008-06-18  Robert Millan  <rmh@aybabtu.com>
6124         * util/i386/pc/grub-install.in: If the drive is LVM or RAID, prepend
6125         it in prefix.
6127         * util/i386/pc/grub-setup.c (main): Don't handle prefix at all.  Set
6128         `must_embed' to 1 when root_dev is a RAID device.  When dest_dev is
6129         a RAID device, run setup() for all members independently on whether
6130         LVM abstraction is being used.
6131         (setup): Don't handle prefix at all; let grub-mkimage take care of it.
6132         If grub-mkimage has set `*install_dos_part == -2', don't override this
6133         value.
6134         Perform *install_dos_part adjustments independently on whether
6135         we're embedding or not.
6136         Clarify error message when image is too big for embedding.
6137         Remove duplicate *install_dos_part stanza.
6139 2008-06-17  Robert Millan  <rmh@aybabtu.com>
6141         * term/ieee1275/ofconsole.c (fgcolor, bgcolor): Remove variables.
6142         (grub_ofconsole_normal_color, grub_ofconsole_highlight_color): New
6143         variables.
6144         (grub_ofconsole_setcolor, grub_ofconsole_getcolor): Load/store
6145         values in grub_ofconsole_normal_color and
6146         grub_ofconsole_highlight_color (they're not directly related to
6147         background and foreground).
6148         (grub_ofconsole_setcolorstate): Extract background and foreground
6149         from grub_ofconsole_normal_color and grub_ofconsole_highlight_color.
6151 2008-06-17  Robert Millan  <rmh@aybabtu.com>
6153         * util/update-grub_lib.in (prepare_grub_to_access_device): Use
6154         /boot/grub for the check in last commit, not /boot (they could be
6155         different partitions).
6157 2008-06-16  Robert Millan  <rmh@aybabtu.com>
6159         * util/update-grub_lib.in (prepare_grub_to_access_device): If we were
6160         asked to setup access for the same partition that provides /boot,
6161         don't bother using UUIDs since our root already has the value we
6162         want.
6164 2008-06-16  Robert Millan  <rmh@aybabtu.com>
6166         * util/biosdisk.c (convert_system_partition_to_system_disk): Detect
6167         I2O devices.
6168         Patch from Sven Mueller <sven@debian.org>.
6170 2008-06-16  Robert Millan  <rmh@aybabtu.com>
6172         * util/update-grub.in: Check for $EUID instead of $UID.
6173         Reported by Vincent Zweije.
6175 2008-06-16  Bean  <bean123ch@gmail.com>
6177         * fs/ext2.c (grub_ext2_blockgroup): Revert to pre-journal state.
6178         (grub_ext2_read_block): Likewise.
6179         (grub_ext2_read_inode): Likewise.
6180         (grub_ext2_mount): Likewise.
6181         (grub_ext2_close): Likewise.
6182         (grub_ext3_get_journal): Removed.
6184         * fs/reiserfs.c (grub_reiserfs_get_item): Revert to pre-journal state.
6185         (grub_reiserfs_read_symlink): Likewise.
6186         (grub_reiserfs_mount): Likewise.
6187         (grub_reiserfs_open): Likewise.
6188         (grub_reiserfs_read): Likewise.
6189         (grub_reiserfs_close): Likewise.
6190         (grub_reiserfs_get_journal): Removed.
6192         * fs/fshelp.c (grub_fshelp_read): Removed.
6193         (grub_fshelp_map_block): Likewise.
6195         * include/grub/fshelp.h (grub_fshelp_journal_type): Removed.
6196         (grub_fshelp_journal): Likewise.
6197         (grub_fshelp_read): Likewise.
6198         (grub_fshelp_map_block): Likewise.
6200 2008-06-16  Pavel Roskin  <proski@gnu.org>
6202         * conf/powerpc-ieee1275.rmk: Remove -msoft-float, we don't use
6203         floating point anymore.
6204         * include/grub/powerpc/libgcc.h: Leave only necessary exports.
6206 2008-06-15  Pavel Roskin  <proski@gnu.org>
6208         * commands/ls.c (grub_ls_list_files): Use integer calculations
6209         for human readable format, avoid floating point use.
6210         * kern/misc.c (grub_ftoa): Remove.
6211         (grub_vsprintf): Remove floating point support.
6213 2008-06-15  Robert Millan  <rmh@aybabtu.com>
6215         * util/grub.d/10_linux.in: Use the underlying device for loop-AES
6216         devices.
6217         Reported by Max Vozeler.
6219 2008-06-15  Robert Millan  <rmh@aybabtu.com>
6221         * util/i386/pc/grub-mkimage.c (generate_image): If we included a drive
6222         in our prefix, set install_{dos,bsd}_part = -2 to indicate this can be
6223         skipped later.
6224         (main): If a memdisk was requested, add "(memdisk)" drive explicitly to
6225         the beginning of the prefix.
6227         * kern/i386/pc/init.c (make_install_device): Remove memdisk check.
6228         It is assumed that if we have a memdisk, grub-mkimage has set
6229         grub_prefix to include the "(memdisk)" drive in it.
6231 2008-06-15  Robert Millan  <rmh@aybabtu.com>
6233         * term/i386/pc/console.c [GRUB_MACHINE_LINUXBIOS] (grub_console_init):
6234         Initialize keyboard controller after registering the terminal, so that
6235         grub_printf() can be called from grub_keyboard_controller_init().
6237 2008-06-15  Robert Millan  <rmh@aybabtu.com>
6239         * fs/sfs.c (grub_sfs_read_extent): Fix the count of nodes in
6240         extent-btree which is written as big endian on disk.
6241         Reported by Alain Greppin  <al@chilibi.org>.
6243 2008-06-14  Robert Millan  <rmh@aybabtu.com>
6245         * util/i386/efi/grub-install.in (modules): Remove `_chain'.
6246         * util/i386/pc/grub-install.in (modules): Likewise.
6248 2008-06-13  Pavel Roskin  <proski@gnu.org>
6250         * commands/ls.c (grub_ls_list_files): Fix format warnings.
6252 2008-06-13  Bean  <bean123ch@gmail.com>
6254         * commands/hexdump.c (grub_cmd_hexdump): Adjust offset for partition.
6256         * fs/ext2.c (grub_ext3_get_journal): Fix revoke block handling.
6258         * fs/fshelp.c (grub_fshelp_map_block): Don't map block 0 as it's used
6259         to indicate sparse block.
6261 2008-06-12  Pavel Roskin  <proski@gnu.org>
6263         * fs/ext2.c (grub_ext2_read_inode): Don't normalize block
6264         number, grub_fshelp_read() does it for us.
6266         * fs/fshelp.c (grub_fshelp_read): New function.  Implement
6267         linear disk read with journal translation.
6268         * fs/ext2.c: Use grub_fshelp_read() instead of grub_disk_read().
6269         * include/grub/fshelp.h: Declare grub_fshelp_read().
6271 2008-06-09  Pavel Roskin  <proski@gnu.org>
6273         * fs/minix.c (grub_minix_mount): Handle error reading
6274         superblock.
6276 2008-06-08  Robert Millan  <rmh@aybabtu.com>
6278         * util/i386/pc/grub-setup.c (main): If install drive is an LVM,
6279         don't append the RAID prefix afterwards.
6280         Reported by Clint Adams.
6282 2008-06-08  Robert Millan  <rmh@aybabtu.com>
6284         Based on description from Pavel:
6285         * kern/disk.c (grub_disk_check_range): Rename to ...
6286         (grub_disk_adjust_range): ... this.  Add a comment explaining the
6287         tasks performed by this function.
6289 2008-06-08  Robert Millan  <rmh@aybabtu.com>
6291         * include/grub/ntfs.h (struct grub_ntfs_bpb): Rename `serial_number' to
6292         `num_serial' (for consistency with other variables).
6293         (struct grub_ntfs_data): Add `uuid' member.
6294         * fs/ntfs.c (grub_ntfs_mount): Initialize `data->uuid'.
6295         (grub_ntfs_uuid): New function.
6296         (grub_ntfs_fs): Reference grub_ntfs_uuid() in `uuid' struct member.
6298 2008-06-07  Pavel Roskin  <proski@gnu.org>
6300         * util/biosdisk.c (open_device): Revert last change to the
6301         function, it broke installation.  The sector needs to be
6302         different dependent on which device is opened.
6304 2008-06-06  Robert Millan  <rmh@aybabtu.com>
6306         Ensure GRUB_KERNEL_MACHINE_DATA_END is always consistent with the
6307         rest of GRUB, and breakage doesn't happen if its value were modified.
6309         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
6310         Redefine as an offset from `GRUB_KERNEL_MACHINE_DATA_END' instead of
6311         a constant (same value).
6312         * kern/i386/pc/startup.S: Replace hardcoded `0x50' with
6313         `GRUB_KERNEL_MACHINE_DATA_END' (same value).
6315 2008-06-06  Robert Millan  <rmh@aybabtu.com>
6317         * util/biosdisk.c (open_device): Do not modify sector offset when
6318         accessing a partition.  kern/disk.c already handles this for us.
6320 2008-06-06  Robert Millan  <rmh@aybabtu.com>
6322         * util/grub-emu.c (grub_machine_init): Move code in this function from
6323         here ...
6324         (main): ... to here (before grub_util_biosdisk_init() call, to prevent
6325         segfault in case grub_printf() is called).
6327         * util/i386/pc/grub-install.in: Append `--device-map=${device_map}' to
6328         grub_probe.  Update all users not to explicitly add it again.
6329         (grub_device): New variable; contains corresponding device for grubdir.
6330         (fs_module, partmap_module, devabstraction_module): Pass
6331         `--device ${grub_device}' to grub_probe to avoid traversing /dev
6332         every time.
6334 2008-06-05  Robert Millan  <rmh@aybabtu.com>
6336         * normal/misc.c (grub_normal_print_device_info): When a filesystem UUID
6337         is found, print it (same layout as with labels).
6339 2008-06-04  Robert Millan  <rmh@aybabtu.com>
6341         * util/biosdisk.c (get_drive): Rename to ...
6342         (find_grub_drive): ... this.  Update all users.
6344         (get_os_disk): Rename to ...
6345         (convert_system_partition_to_system_disk): ... this.  Update all users.
6347         (find_drive): Rename to ...
6348         (find_system_device): ... this.  Update all users.
6350 2008-06-04  Robert Millan  <rmh@aybabtu.com>
6352         * util/biosdisk.c (get_os_disk): Handle IDA devices.
6353         * util/grub-mkdevicemap.c (get_mmc_disk_name)
6354         (make_device_map): Likewise.
6356 2008-06-01  Robert Millan  <rmh@aybabtu.com>
6358         *  util/biosdisk.c (get_drive): Verify that `map[i].drive' is non-NULL
6359         before dereferencing it.
6361         * fs/fat.c (struct grub_fat_bpb): Move fat32-specific fields into a
6362         union with fat12/fat16-specific ones.  Add some new fields, including
6363         `num_serial' for both versions.
6364         (struct grub_fat_data): Add `uuid' member.
6365         (grub_fat_mount): Refer to fat32-specific fields in `bpb' by their new
6366         names.  Initialize `data->uuid' using `num_serial'.
6367         (grub_fat_uuid): New function.
6368         (grub_fat_fs): Reference grub_fat_uuid() in `uuid' struct member.
6370         * fs/reiserfs.c (grub_reiserfs_superblock): Add `uuid' field.
6371         (grub_reiserfs_uuid): New function.
6372         (grub_reiserfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct
6373         member.
6375         * fs/xfs.c (grub_xfs_sblock): Add `uuid' field.
6376         (grub_xfs_uuid): New function.
6377         (grub_xfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct member.
6379 2008-06-01  Robert Millan  <rmh@aybabtu.com>
6381         * util/update-grub_lib.in (prepare_grub_to_access_device): Generate
6382         code that is backward compatible with pre-uuid search command.
6384 2008-05-31  Robert Millan  <rmh@aybabtu.com>
6386         * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Iterate through
6387         floppies after everything else, to ensure floppy drive isn't accessed
6388         unnecessarily (patch from Bean).
6390 2008-05-31  Robert Millan  <rmh@aybabtu.com>
6392         * commands/search.c (search_label, search_fs_uuid, search_file): Do
6393         not print device names when we were asked to set a variable.
6395 2008-05-31  Robert Millan  <rmh@aybabtu.com>
6397         * term/ieee1275/ofconsole.c (grub_ofconsole_setcursor): Implement
6398         using "cursor-on" and "cursor-off" commands (understood at least by
6399         the Open Firmware flavour on OLPC).
6401 2008-05-31  Michael Gorven  <michael@gorven.za.net>
6403         * term/terminfo.c (grub_terminfo_set_current): Correct vt100 cursor
6404         on and off sequences.
6406 2008-05-31  Robert Millan  <rmh@aybabtu.com>
6408         * util/update-grub_lib.in: Replace `grub-probe' with `${grub_probe}'.
6409         * util/update-grub.in: Likewise.
6411 2008-05-30  Pavel Roskin  <proski@gnu.org>
6413         * util/biosdisk.c (linux_find_partition): Simplify logic and
6414         make the code more universal.  Keep special processing for
6415         devfs, but use a simple rule for all other devices.  If the
6416         device ends with a number, append 'p' and the partition number.
6417         Otherwise, append only the partition number.
6419 2008-05-30  Robert Millan  <rmh@aybabtu.com>
6421         * util/update-grub.in (GRUB_DISABLE_LINUX_UUID): Export variable.
6422         * util/grub.d/10_linux.in: If GRUB_DEVICE_UUID is set, and
6423         GRUB_DISABLE_LINUX_UUID isn't true, use the filesystem UUIDs as
6424         the `root' parameter to Linux.
6426 2008-05-30  Robert Millan  <rmh@aybabtu.com>
6428         * commands/search.c (options): Rename --fs_uuid to --fs-uuid.
6429         * util/update-grub_lib.in (prepare_grub_to_access_device): Replace
6430         --fs_uuid with --fs-uuid.
6431         * util/update-grub.in: Allow filesystem UUID probes to fail (since not
6432         all filesystems support them).
6434 2008-05-30  Robert Millan  <rmh@aybabtu.com>
6436         * fs/ext2.c (grub_ext2_uuid): Use `04x' instead of '02x' as
6437         grub_printf() flags, since we're printing in units of 2 bytes.
6439 2008-05-30  Robert Millan  <rmh@aybabtu.com>
6441         * util/grub.d/00_header.in: Remove obsolete comment referencing
6442         convert_system_path_to_grub_path().
6443         * util/update-grub.in: Likewise.
6444         * util/update-grub_lib.in (is_path_readable_by_grub): New function.
6445         (convert_system_path_to_grub_path): Add a warning message explaining
6446         that this function is deprecated.  Rely on is_path_readable_by_grub()
6447         for the readability checks.
6448         (font_path): Use is_path_readable_by_grub() for the readability
6449         check rather than convert_system_path_to_grub_path().
6451 2008-05-30  Robert Millan  <rmh@aybabtu.com>
6453         * util/update-grub_lib.in (prepare_grub_to_access_device): New function.
6454         * util/update-grub.in: Set `GRUB_FONT_PATH' to the system path, without
6455         converting it first.
6456         * util/grub.d/00_header.in: Use prepare_grub_to_access_device() to setup
6457         grub.cfg for access to font file, and afterwards call it again to set
6458         the root device.
6460 2008-05-30  Robert Millan  <rmh@aybabtu.com>
6462         * commands/search.c (options): Add --fs_uuid option.
6463         (search_fs_uuid): New function.
6464         (grub_cmd_search): Fix --set argument passing.
6465         Use search_fs_uuid() when requested via --fs_uuid.
6466         (grub_search_init): Update help message.
6467         * fs/ext2.c (struct grub_ext2_sblock): Rename `unique_id' to `uuid'
6468         and redeclare it as an array of 16-bit words.
6469         (grub_ext2_uuid): New function.
6470         (grub_ext2_fs): Reference grub_ext2_uuid() in `uuid' struct member.
6471         * include/grub/fs.h (struct grub_fs): Add `uuid' struct member.
6472         * util/update-grub.in (GRUB_DEVICE_UUID, GRUB_DEVICE_BOOT)
6473         (GRUB_DEVICE_BOOT_UUID): New variables.
6474         (GRUB_DRIVE. GRUB_DRIVE_BOOT. GRUB_DRIVE_BOOT_GRUB): Remove.
6475         * util/grub.d/00_header.in: Set root using `search --fs_uuid' command
6476         whenever possible.
6477         * util/grub.d/10_hurd.in: Avoid explicit use of root drive.  Instead,
6478         just assume `root' variable has the right value.
6479         * util/grub.d/10_linux.in: Likewise.
6480         * util/grub-probe.c (probe): Probe for filesystem UUID when requested
6481         via PRINT_FS_UUID.
6482         (main): Recognise `-t fs_uuid' argument.
6484 2008-05-30  Robert Millan  <rmh@aybabtu.com>
6486         * util/biosdisk.c (map): Redefine structure to hold information
6487         about GRUB drive name.
6488         (get_drive): Reimplement without assuming (and verifying) BIOS-like
6489         drive names.
6490         (call_hook): Remove.
6491         (grub_util_biosdisk_iterate): Access drive names via `.drive' struct
6492         member.  Assume drive has partitions.
6493         (grub_util_biosdisk_open): Access device names via `.device' struct
6494         member.
6495         (open_device): Likewise.
6496         (find_drive): Likewise.
6497         (read_device_map): Adjust map[] usage to match the new struct
6498         definition.  Don't check for duplicates (still possible, but not cheap
6499         anymore).
6500         (grub_util_biosdisk_fini): Free malloced buffers referenced by map[].
6501         (make_device_name): Remove assumption of BIOS-like drive names.
6503 2008-05-30  Pavel Roskin  <proski@gnu.org>
6505         * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Remove, as
6506         compiling execute.c doesn't need grub_script.tab.h anymore.
6507         (normal/command.c_DEPENDENCIES): Likewise.
6508         (normal/function.c_DEPENDENCIES): Likewise.
6509         * conf/i386-ieee1275.rmk: Likewise.
6510         * conf/i386-linuxbios.rmk: Likewise.
6511         * conf/i386-pc.rmk: Likewise.
6512         * conf/powerpc-ieee1275.rmk: Likewise.
6513         * conf/sparc64-ieee1275.rmk: Likewise.
6515 2008-05-29  Pavel Roskin  <proski@gnu.org>
6517         * disk/lvm.c (grub_lvm_scan_device): Check for the buffer end
6518         when scanning metadata for volume group name.
6520         * include/grub/script.h: Don't include grub_script.tab.h.  It's
6521         a generated file, which may only be included from the files with
6522         DEPENDENCIES rules in the makefile.  Don't use typedef YYSTYPE,
6523         use union YYSTYPE, as the later allows forward declaration.
6524         * normal/lexer.c: Don't use typedef YYSTYPE, use union YYSTYPE.
6526 2008-05-29  Robert Millan  <rmh@aybabtu.com>
6528         * term/i386/pc/at_keyboard.c: Include `grub/machine/machine.h'.
6529         (OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): New macros.
6530         [GRUB_MACHINE_IEEE1275] (keyboard_map): Add OLPC scan codes
6531         (grub_console_checkkey): Add grub_dprintf() call to report unknown
6532         scan codes.
6534 2008-05-29  Robert Millan  <rmh@aybabtu.com>
6536         * term/i386/pc/at_keyboard.c (grub_console_checkkey): Add support for
6537         control key combinations.
6539 2008-05-29  Robert Millan  <rmh@aybabtu.com>
6541         * util/powerpc/ieee1275/grub-install.in: Move from here ...
6542         * util/ieee1275/grub-install.in: ... to here.
6543         * powerpc-ieee1275.rmk (grub_install_SOURCES): Update location.
6544         * i386-ieee1275.rmk (sbin_SCRIPTS): New variable.
6545         (grub_install_SOURCES): Likewise.
6547 2008-05-29  Robert Millan  <rmh@aybabtu.com>
6549         * fs/affs.c: Update copyright year.
6550         * fs/ext2.c: Likewise.
6551         * fs/fshelp.c: Likewise.
6552         * fs/hfsplus.c: Likewise.
6553         * fs/ntfs.c: Likewise.
6554         * fs/xfs.c: Likewise.
6555         * include/grub/fshelp.h: Likewise.
6556         * util/grub-mkdevicemap.c: Likewise.
6558 2008-05-28  Robert Millan  <rmh@aybabtu.com>
6560         * util/update-grub.in: Allow chmod call to fail, since /boot/grub/
6561         might need to be fatfs to support some firmware implementations
6562         (e.g. OFW or EFI).
6564 2008-05-28  Robert Millan  <rmh@aybabtu.com>
6566         * util/biosdisk.c (linux_find_partition, get_os_disk): Handle MMC
6567         devices.
6568         * util/grub-mkdevicemap.c (get_mmc_disk_name)
6569         (make_device_map): Likewise.
6571 2008-05-20  Bean  <bean123ch@gmail.com>
6573         * fs/fshelp.c (grub_fshelp_map_block): New function.
6574         (grub_fshelp_find_file): Use 64-bit type for pos and block address.
6575         Use `>>' and `&' operator to avoid 64-bit divide and modulo.
6577         * include/grub/fshelp.h (grub_fshelp_journal_type): New enum.
6578         (GRUB_FSHELP_JOURNAL_UNUSED_MAPPING): New macro.
6579         (grub_fshelp_journal): New structure.
6580         (grub_fshelp_map_block): New function prototype.
6581         (grub_fshelp_read_file): Use grub_disk_addr_t as block type.
6582         (grub_fshelp_map_block): Likewise.
6584         * fs/ext2.c (EXT3_FEATURE_COMPAT_HAS_JOURNAL): New macro.
6585         (EXT3_JOURNAL_MAGIC_NUMBER): Likewise.
6586         (EXT3_JOURNAL_DESCRIPTOR_BLOCK): Likewise.
6587         (EXT3_JOURNAL_COMMIT_BLOCK): Likewise.
6588         (EXT3_JOURNAL_SUPERBLOCK_V1): Likewise.
6589         (EXT3_JOURNAL_SUPERBLOCK_V2): Likewise.
6590         (EXT3_JOURNAL_REVOKE_BLOCK): Likewise.
6591         (EXT3_JOURNAL_FLAG_ESCAPE): Likewise.
6592         (EXT3_JOURNAL_FLAG_SAME_UUID): Likewise.
6593         (EXT3_JOURNAL_FLAG_DELETED): Likewise.
6594         (EXT3_JOURNAL_FLAG_LAST_TAG): Likewise.
6595         (grub_ext2_sblock): New members for journal support.
6596         (grub_ext3_journal_header): New structure.
6597         (grub_ext3_journal_revoke_header): Likewise.
6598         (grub_ext3_journal_block_tag): Likewise.
6599         (grub_ext3_journal_sblock): Likewise.
6600         (grub_fshelp_node): New members logfile and journal.
6601         (grub_ext2_read_block): Change block type to grub_disk_addr_t. Use
6602         grub_fshelp_map_block to get real block number.
6603         (grub_ext2_blockgroup): Use grub_fshelp_map_block to get real block
6604         number.
6605         (grub_ext2_read_inode): Likewise.
6606         (grub_ext3_get_journal): New function.
6607         (grub_read_inode): Initialize journal using grub_ext3_get_journal.
6608         (grub_ext2_close): Release memory used by journal.
6610         * fs/reiserfs.c (REISERFS_MAGIC_STRING): Changed to "ReIsEr".
6611         (REISERFS_MAGIC_DESC_BLOCK): New macro.
6612         (grub_reiserfs_transaction_header): Renamed to
6613         grub_reiserfs_description_block, replace field data with real_blocks.
6614         (grub_reiserfs_commit_block): New structure.
6615         (grub_reiserfs_data): New member journal.
6616         (grub_reiserfs_get_item): Use grub_fshelp_map_block to get real block
6617         number.
6618         (grub_reiserfs_read_symlink): Likewise.
6619         (grub_reiserfs_iterate_dir): Likewise.
6620         (grub_reiserfs_open): Likewise.
6621         (grub_reiserfs_read): Likewise.
6622         (grub_reiserfs_get_journal): New function.
6623         (grub_reiserfs_mount): Use "ReIsEr" as super block magic, as there are
6624         three varieties ReIsErFs, ReIsEr2Fs and ReIsEr3Fs. Initialize journal
6625         using grub_reiserfs_get_journal.
6626         (grub_reiserfs_close): Release memory used by journal.
6628         * fs/affs.c (grub_affs_read_block): Change block type to
6629         grub_disk_addr_t. Use grub_divmod64 to do 64-bit division.
6631         * fs/afs.c (grub_afs_read_block): Change block type to grub_disk_addr_t.
6633         * fs/hfsplus.c (grub_hfsplus_read_block): Likewise.
6635         * fs/ntfs.c (grub_ntfs_read_block): Likewise.
6637         * fs/udf.c (grub_udf_read_block): Change block type to
6638         grub_disk_addr_t. Use type cast to avoid warning.
6640         * fs/xfs.c (grub_xfs_read_block): Likewise.
6642 2008-05-16  Christian Franke  <franke@computer.org>
6644         * commands/cat.c (grub_cmd_cat): Remove non-ESC keys from keyboard queue
6645         to ensure that break with ESC will always work.
6646         * commands/sleep.c (grub_interruptible_millisleep): Likewise.
6647         Remove ESC from keyboard queue.
6649 2008-05-16  Christian Franke  <franke@computer.org>
6651         * util/biosdisk.c: [__CYGWIN__] Add includes.
6652         (grub_util_biosdisk_open): Use Linux code also for Cygwin.
6653         (get_os_disk): Move variable declarations to OS specific
6654         parts to avoid warning.
6655         [__GNU__] (get_os_disk): Fix /dev/sdXsN case.
6656         [__CYGWIN__] (get_os_disk): Add Cygwin /dev/sdXN device names.
6657         (grub_util_biosdisk_get_grub_dev): Use Linux code also for
6658         Cygwin.
6659         * util/getroot.c: [__CYGWIN__] Add includes.
6660         (strip_extra_slashes): Fix "/" case.
6661         [__CYGWIN__] (get_win32_path): New function.
6662         [__CYGWIN__] (grub_get_prefix): Add conversion to win32 path.
6663         [__CYGWIN__] (find_root_device): Disable.
6664         [__CYGWIN__] (get_bootsec_serial): New function.
6665         [__CYGWIN__] (find_cygwin_root_device): Likewise.
6666         [__linux__] (grub_guess_root_device): Add early returns to simplify
6667         structure.
6668         [__CYGWIN__] (grub_guess_root_device): Call find_cygwin_root_device.
6669         [__linux__] (grub_util_get_dev_abstraction): Enable LVM and RAID
6670         check for Linux only.
6672 2008-05-15  Bean  <bean123ch@gmail.com>
6674         * kern/i386/pc/startup.S (grub_console_getkey): Workaround for the
6675         keyboard hang problem in apple's intel mac.
6677 2008-05-09  Robert Millan  <rmh@aybabtu.com>
6679         * util/biosdisk.c (linux_find_partition, get_os_disk): Handle Virtio
6680         devices.
6681         * util/grub-mkdevicemap.c (get_virtio_disk_name)
6682         (make_device_map): Likewise.
6683         Reported by Aurelien Jarno <aurel32@debian.org>
6685 2008-05-07  Ian Campbell  <ijc@hellion.org.uk>
6687         * util/biosdisk.c (get_os_disk): Recognise xvd type disks.
6688         * util/grub-mkdevicemap.c (get_xvd_disk_name): New function.
6689         (make_device_map): Output entries for xvd type disks.
6691 2008-05-07  Robert Millan  <rmh@aybabtu.com>
6693         * util/biosdisk.c (linux_find_partition, get_os_disk): Handle CCISS
6694         devices.
6695         * util/grub-mkdevicemap.c (get_cciss_disk_name)
6696         (make_device_map): Likewise.
6697         Reported by Roland Dreier <rdreier@cisco.com>
6699 2008-05-07  Robert Millan  <rmh@aybabtu.com>
6701         * disk/lvm.c (grub_lvm_scan_device): Detect errors in an additional
6702         grub_strstr() call.  Correct a few mistakes in failure path handling.
6704 2008-05-06  Robert Millan  <rmh@aybabtu.com>
6706         * util/update-grub_lib.in (make_system_path_relative_to_its_root):
6707         Do not print a trailing slash (therefore, the root directory is an
6708         empty string).
6709         (convert_system_path_to_grub_path): Do not remove trailing slash
6710         from make_system_path_relative_to_its_root() output.
6712         * util/i386/pc/grub-install.in: Add trailing slash to output from
6713         make_system_path_relative_to_its_root().
6715 2008-05-06  Robert Millan  <rmh@aybabtu.com>
6717         * util/grub-fstest.c (grub_refresh): Call `fflush (stdout)'.  This
6718         ensures that output lines aren't intermangled with those sent to
6719         stderr (via grub_util_info()).
6720         * util/grub-probe.c (grub_refresh): Likewise.
6721         * util/i386/pc/grub-setup.c (grub_refresh): Likewise.
6723 2008-05-05  Christian Franke  <franke@computer.org>
6725         * util/grub-mkdevicemap.c (get_floppy_disk_name) [__CYGWIN__]:
6726         Add Cygwin device names.
6727         (get_ide_disk_name) [__CYGWIN__]: Likewise.
6728         (get_scsi_disk_name) [__CYGWIN__]: Likewise.
6729         (check_device): Return error instead of success on empty name.
6730         (make_device_map): Move label inside linux specific code to
6731         prevent compiler warning.
6733 2008-04-30  Robert Millan  <rmh@aybabtu.com>
6735         Based on patch from Fabian Greffrath <greffrath@leat.rub.de>
6736         * util/grub.d/10_linux.in: Add ${GRUB_CMDLINE_LINUX_DEFAULT} to the
6737         first boot option.
6738         * util/update-grub.in: Export GRUB_CMDLINE_LINUX_DEFAULT.
6740 2008-04-29  Robert Millan  <rmh@aybabtu.com>
6742         * docs/grub.cfg: New file (example GRUB configuration).
6744 2008-04-26  Robert Millan  <rmh@aybabtu.com>
6746         * DISTLIST: Sort (sort -u < DISTLIST | sponge DISTLIST).  Add
6747         `loader/i386/ieee1275/linux.c', `loader/i386/ieee1275/linux_normal.c'
6748         and `disk/ieee1275/nand.c'.
6750 2008-04-25  Bean  <bean123ch@gmail.com>
6752         * Makefile.in (RMKFILES): Add missing arch i386-ieee1275 and
6753         i386-linuxbios.
6755         * commands/hexdump.c (grub_cmd_hexdump): Support dumping of device,
6756         change the buffer size to 4096 for cdrom device.
6758         * conf/i386-ieee1275.rmk (pkglib_MODULES): Add _linux.mod, linux.mod
6759         and nand.mod.
6760         (_linux_mod_SOURCES): New variable.
6761         (_linux_mod_CFLAGS): Likewise.
6762         (_linux_mod_LDFLAGS): Likewise.
6763         (linux_mod_SOURCES): Likewise.
6764         (linux_mod_CFLAGS): Likewise.
6765         (linux_mod_LDFLAGS): Likewise.
6766         (nand_mod_SOURCES): Likewise.
6767         (nand_mod_CFLAGS): Likewise.
6768         (nand_mod_LDFLAGS): Likewise.
6770         * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Return
6771         GRUB_ERR_UNKNOWN_DEVICE instead of GRUB_ERR_BAD_DEVICE if no device
6772         type property. (nand device in olpc don't have this property)
6774         * include/grub/disk.h (grub_disk_dev_id): New macro
6775         GRUB_DISK_DEVICE_NAND_ID.
6777         * include/grub/i386/ieee1275/loader.h (grub_rescue_cmd_linux): New
6778         function prototype.
6779         (grub_rescue_cmd_initrd): Likewise.
6781         * include/grub/i386/linux.h (GRUB_LINUX_OFW_SIGNATURE): New macro.
6782         (linux_kernel_params): Add new member ofw_signature, ofw_num_items,
6783         ofw_cif_handler and ofw_idt, adjust padding number.
6785         * include/grub/i386/pc/memory.h (grub_upper_mem): Export it if
6786         GRUB_MACHINE_IEEE1275 is defined.
6788         * include/grub/ieee1275/ieee1275.h (grub_available_iterate):
6789         Use NESTED_FUNC_ATTR attribute on the hook parameter.
6791         * kern/powerpc/ieee1275/init.c (grub_claim_heap): Use NESTED_FUNC_ATTR
6792         on nested function heap_init.
6793         (grub_upper_mem): New variable for i386-ieee1275.
6794         (grub_get_extended_memory): New function for i386-ieee1275.
6795         (grub_machine_init): Call grub_get_extended_memory for i386-ieee1275.
6797         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Use
6798         NESTED_FUNC_ATTR on the hook parameter. Don't quit if no device type
6799         property.
6801         * loader/i386/ieee1275/linux.c: New file.
6803         * loader/i386/ieee1275/linux_normal.c: New file.
6805         * disk/ieee1275/nand.c: New file.
6807 2008-04-18  Thomas Schwinge  <tschwinge@gnu.org>
6809         * util/i386/pc/grub-mkrescue.in (grub_mkimage): Don't overwrite correct
6810         value.
6811         * util/powerpc/ieee1275/grub-mkrescue.in (grub_mkimage): Likewise.
6813 2008-04-18  Robert Millan  <rmh@aybabtu.com>
6815         Restructures early code path on ieee1275 to unify grub_main() as
6816         the first C function that is executed in every platform.
6818         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_init): New prototype.
6819         * kern/i386/ieee1275/startup.S (_start): Jump to grub_main() instead of
6820         cmain().
6821         * kern/powerpc/ieee1275/crt0.S (_start): Likewise.
6822         * kern/ieee1275/cmain.c (cmain): Rename to ...
6823         * kern/ieee1275/cmain.c (grub_ieee1275_init): ... this.
6824         * kern/ieee1275/init.c (grub_machine_init): Call grub_ieee1275_init()
6825         at the beginning.
6827 2008-04-18  Robert Millan  <rmh@aybabtu.com>
6829         * util/update-grub.in: Fix syntax error when setting
6830         `GRUB_PRELOAD_MODULES'.
6831         Reported by Stephane Chazelas <stephane@artesyncp.com>
6833 2008-04-17  Lubomir Kundrak  <lkundrak@redhat.com>
6835         * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): take only .text
6836         section into account, newer toolchains generate unique build ids
6837         * configure.ac: remove the test for --build-id=none acceptance,
6838         we want build ids to be preserved
6839         * genmk.rb: add -R .note.gnu.build-id to objcopy, so build id
6840         far from other sections don't cause the raw binary images grow
6841         size
6843 2008-04-15  Robert Millan  <rmh@aybabtu.com>
6845         * disk/lvm.c: Update copyright year.
6846         * kern/misc.c: Likewise.
6848 2008-04-14  Vesa Jaaskelainen  <chaac@nic.fi>
6850         * disk/lvm.c (grub_lvm_scan_device): Add forgotten failure path when
6851         there is no memory left for physical volume name.
6853 2008-04-14  Vesa Jaaskelainen  <chaac@nic.fi>
6855         * disk/lvm.c (grub_lvm_scan_device): Fix logical volume's physical
6856         volume name mapping to support bigger than 9 character names properly.
6858 2008-04-13  Robert Millan  <rmh@aybabtu.com>
6860         * disk/i386/pc/biosdisk.c (grub_biosdisk_rw): Fix CHS limit check,
6861         as per http://www.allensmith.net/Storage/HDDlimit/Int13h.htm
6863 2008-04-13  Christian Franke  <franke@computer.org>
6865         * util/i386/pc/grub-mkrescue.in: Add --emulation=floppy
6866         to create a floppy emulation boot CD when non emulation mode
6867         does not work.
6868         Enable Joliet CD filesystem extension.
6870 2008-04-13  Robert Millan  <rmh@aybabtu.com>
6872         * kern/misc.c (grub_strncat): Fix off-by-one error.
6873         Reported by Zhang Huan <zhanghuan@nrchpc.ac.cn>
6875         * kern/env.c (grub_env_context_close): Clear current context, not
6876         previous one.
6877         Patch from Zhang Huan <zhanghuan@nrchpc.ac.cn>
6879         * kern/misc.c (grub_strcat): Minor speed optimization (same code size).
6881 2008-04-13  Robert Millan  <rmh@aybabtu.com>
6883         Improve robustness when handling LVM.
6885         * disk/lvm.c (grub_lvm_getvalue): Return 0 when `*p' is NULL
6886         (and leave `*p' unmodified).
6887         (grub_lvm_iterate): Don't assume `vg->lvs != NULL' when iterating
6888         through it.
6889         (grub_lvm_memberlist): Don't assume `lv->vg->pvs != NULL' when
6890         iterating through it.
6891         (grub_lvm_open): Don't assume `vg->lvs != NULL' when iterating
6892         through it.
6893         (grub_lvm_scan_device): Check the return value (and fail gracefully
6894         when due) on each grub_lvm_getvalue() or grub_strstr() call.
6895         Don't assume `vg->pvs != NULL' when iterating through it.
6897 2008-04-13  Robert Millan  <rmh@aybabtu.com>
6899         * gendistlist.sh (EXTRA_DISTFILES): Add `genpartmaplist.sh'.
6900         * genmk.rb (partmap): New variable.
6901         (CLEANFILES, PARTMAPFILES): Add #{partmap}.
6902         (#{partmap}): New target rule.
6903         * genpartmaplist.sh: New file.
6904         * Makefile.in (pkglib_DATA): Add partmap.lst.
6905         (partmap.lst): New target rule.
6906         * util/i386/pc/grub-mkrescue.in: Generate grub.cfg that loads needed
6907         modules (including all partition maps), instead of preloading them.
6909 2007-04-13  Fabian Greffrath  <fabian.greffrath@web.de>
6911         * util/grub.d/30_os-prober.in: New script. Use `os-prober' and
6912         `linux-boot-prober' (if installed) to detect other operating
6913         systems which are installed on the computer and add them to
6914         the boot menu.
6915         * conf/common.rmk: Build and install 30_os-prober.
6917 2008-04-12  Robert Millan  <rmh@aybabtu.com>
6919         * kern/powerpc/ieee1275/init.c: Move from here ...
6920         * kern/ieee1275/init.c: ... to here.  Update all users.
6922         * kern/powerpc/ieee1275/cmain.c: Move from here ...
6923         * kern/ieee1275/cmain.c: ... to here.  Update all users.
6925         * kern/powerpc/ieee1275/openfw.c: Move from here ...
6926         * kern/ieee1275/openfw.c: ... to here.  Update all users.
6928         * loader/powerpc/ieee1275/multiboot2.c: Move from here ...
6929         * loader/ieee1275/multiboot2.c: ... to here.  Update all users.
6931 2008-04-10  Pavel Roskin  <proski@gnu.org>
6933         * configure.ac: Always use "_cv_" in cache variables for
6934         compatibility with Autoconf 2.62.
6936 2008-04-07  Robert Millan  <rmh@aybabtu.com>
6938         Revert grub/machine/init.h addition by Pavel (since it breaks on
6939         i386-ieee1275 and others):
6940         * util/i386/pc/misc.c: Remove grub/machine/init.h.
6941         * util/powerpc/ieee1275/misc.c: Likewise.
6943 2008-04-07  Robert Millan  <rmh@aybabtu.com>
6945         * util/grub-probe.c (probe): Improve error message.
6947 2008-04-07  Robert Millan  <rmh@aybabtu.com>
6949         * util/biosdisk.c (read_device_map): Skip devices that don't exist
6950         (this prevents the presence of a bogus entry from ruining the whole
6951         thing).
6953 2008-04-06  Pavel Roskin  <proski@gnu.org>
6955         * util/biosdisk.c: Include grub/util/biosdisk.h.
6956         * util/grub-fstest.c (execute_command): Make static.
6957         * util/grub-mkdevicemap.c (check_device): Likewise.
6958         * util/i386/pc/misc.c: Include grub/machine/init.h.
6959         * util/powerpc/ieee1275/misc.c: Likewise.
6960         * util/lvm.c: Include grub/util/lvm.h.
6961         * util/misc.c: Include grub/kernel.h, grub/misc.h and
6962         grub/cache.h.
6963         * util/raid.c: Include grub/util/raid.h.
6964         (grub_util_getdiskname): Make static.
6966         * util/grub-emu.c (main): Remove calls to grub_hostfs_init() and
6967         grub_hostfs_fini(), as they are called from grub_init_all() and
6968         grub_fini_all() respectively.  This fixes an infinite loop in
6969         grub-fstest due to double registration of hostfs.
6970         Reported by Christian Franke <Christian.Franke@t-online.de>
6972 2008-04-05  Pavel Roskin  <proski@gnu.org>
6974         * bus/pci.c (grub_pci_iterate): For multifunction devices, probe
6975         all 8 functions.  Otherwise, probe function 0 only.
6977 2008-04-04  Pavel Roskin  <proski@gnu.org>
6979         * commands/lspci.c (grub_lspci_iter): Print the bus number
6980         correctly.
6982         * commands/lspci.c (grub_pci_classes): Fix typos.
6983         (grub_lspci_iter): Don't print func twice.  Print vendor ID
6984         before device ID, as it's normally done.
6986         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
6987         Fix signedness warnings.
6988         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate):
6989         Likewise.
6990         * util/ieee1275/get_disk_name.c: Include config.h so that
6991         _GNU_SOURCE is defined and getline() is declared.  Mark an
6992         unused argument as such.  Fix a signedness warning.
6994 2008-04-02  Pavel Roskin  <proski@gnu.org>
6996         * genkernsyms.sh.in: Use more robust assignments for CC and
6997         srcdir.  Quote srcdir.
6998         * gensymlist.sh.in: Likewise.  Assert at the compile time that
6999         the symbol table is not empty.
7001         * disk/raid.c (grub_raid_memberlist): Fix a signedness warning.
7002         * fs/cpio.c (grub_cpio_read): Likewise.
7004 2008-04-01  Pavel Roskin  <proski@gnu.org>
7006         * disk/ata.c (grub_ata_open): Don't lose precision in disk->id.
7007         * disk/host.c (grub_host_open): Likewise.
7008         * disk/loopback.c (grub_loopback_open): Likewise.
7009         * disk/memdisk.c (grub_memdisk_open): Use a string pointer for
7010         disk->id as in disk/host.c, not a multi-character constant.
7012         * util/grub-fstest.c (cmd_cmp): Use fseeko(), not fseek().  The
7013         later is obsolete, potentially dangerous and sets a bad example.
7014         * util/i386/efi/grub-mkimage.c (make_header): Likewise.
7015         * util/misc.c (grub_util_get_image_size): Likewise.
7017         * disk/loopback.c (options): Improve help for "--partitions".
7019         * normal/arg.c (grub_arg_show_help): Fix spacing of the long
7020         options to align them with the short options, e.g. "echo -e".
7022 2008-03-31  Bean  <bean123ch@gmail.com>
7024         * video/reader/png.c (grub_png_data): New member is_16bit and
7025         image_data.
7026         (grub_png_decode_image_header): Detect 16 bit png image.
7027         (grub_png_convert_image): New function to convert 16 bit image to 8 bit.
7028         (grub_png_decode_png): Call grub_png_convert_image for 16 bit image.
7029         (grub_video_reader_png): Release memory occupied by image_data.
7031         * fs/ntfs.c (find_attr): Handle non-resident attribute list larger than
7032         4096 bytes.
7033         (grub_nfs_mount): Skip the test for sector per cluster.
7035         * include/grub/ntfs.h (MAX_SPC): Removed.
7037 2008-03-31  Bean  <bean123ch@gmail.com>
7039         * conf/common.rmk (pkgdata_MODULES): Add afs.mod.
7040         (grub_probe_SOURCES): Add fs/afs.c.
7041         (grub_fstest_SOURCES): Likewise.
7042         (afs_mod_SOURCES): New variable.
7043         (afs_mod_CFLAGS): Likewise.
7044         (afs_mod_LDFLAGS): Likewise.
7046         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/afs.c.
7047         (grub_emu_SOURCES): Likewise.
7049         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
7051         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7053         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
7055         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7057         * fs/afs.c: New file.
7059 2008-03-30  Pavel Roskin  <proski@gnu.org>
7061         * disk/host.c: Include grub/misc.h to fix a warning.
7062         * util/hostfs.c: Use GRUB_MOD_INIT and GRUB_MOD_FINI to fix
7063         warnings about implicit declarations.
7065         * fs/udf.c (grub_udf_mount): Fix warning about a shadowing a
7066         variable.
7067         * include/grub/i386/loader.h: Change declaration of
7068         grub_linux_boot() to match what grub_loader_set() expects.
7069         * util/getroot.c (grub_guess_root_device): Return const char* to
7070         fix a warning.
7071         * util/grub-probe.c (probe): Fix a warning about uninitialized
7072         abstraction_name variable.
7073         * util/i386/get_disk_name.c (grub_util_get_disk_name): Mark
7074         second argument as unused to fix a warning.
7076         * loader/i386/pc/multiboot2.c (grub_mb2_arch_elf64_hook): Add
7077         missing grub_error() call.
7079         * util/update-grub_lib.in: Define datarootdir, since Autoconf
7080         2.60 and newer uses it to define datadir.
7082         * commands/sleep.c: Fix warning about implicit declaration.
7083         * disk/memdisk.c: Likewise.
7084         * loader/aout.c: Likewise.
7085         * loader/i386/bsd_normal.c: Likewise.
7086         * util/grub-probe.c: Likewise.
7088         * commands/i386/cpuid.c (has_longmode): Make static.
7089         * disk/i386/pc/biosdisk.c (cd_drive): Likewise.
7090         * include/grub/i386/bsd.h (bios_memmap_t): Remove, it's unused.
7092         * kern/i386/pc/startup.S (real_to_prot): Use %cs prefix to load
7093         GDT.  This is more robust, as %ds can change.
7094         (grub_biosdisk_rw_int13_extensions): Don't clear %ds before
7095         calling real_to_prot().
7096         (grub_biosdisk_get_diskinfo_int13_extensions): Likewise.
7098 2008-03-28  Pavel Roskin  <proski@gnu.org>
7100         * kern/i386/pc/startup.S: Assert that uncompressed functions
7101         don't spill beyond GRUB_KERNEL_MACHINE_RAW_SIZE.
7102         * kern/i386/pc/lzo1x.S: Remove all .align directives in the
7103         code, as they push parts of the code (error handlers) beyond
7104         GRUB_KERNEL_MACHINE_RAW_SIZE.  Speed is not as important in this
7105         code as correctness and size.
7107 2008-03-28  Pavel Roskin  <proski@gnu.org>
7109         * kern/i386/pc/startup.S
7110         (grub_biosdisk_get_diskinfo_int13_extensions): When converting
7111         data block address to the real mode, keep offset minimal.  This
7112         works around a bug in AWARD BIOS on old Athlon systems, which
7113         makes CD detection hang.
7115 2008-03-26  Pavel Roskin  <proski@gnu.org>
7117         * normal/color.c (grub_parse_color_name_pair): Make `name' a
7118         const.
7119         * include/grub/normal.h: Add grub_parse_color_name_pair()
7120         declaration.
7122 2008-03-24  Bean  <bean123ch@gmail.com>
7124         * disk/i386/pc/biosdisk.c (cd_start): Removed.
7125         (cd_count): Removed.
7126         (cd_drive): New variable.
7127         (grub_biosdisk_get_drive): Don't check for (cdN) device.
7128         (grub_biosdisk_call_hook): Likewise.
7129         (grub_biosdisk_iterate): Change cdrom detection method.
7130         (grub_biosdisk_open): Replace cd_start with cd_drive.
7131         (GRUB_MOD_INIT): Use grub_biosdisk_get_cdinfo_int13_extension to
7132         detect cdrom device.
7134         * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_MACHINE_CDROM_START):
7135         Removed.
7136         (GRUB_BIOSDISK_MACHINE_CDROM_END): Removed.
7137         (GRUB_BIOSDISK_CDTYPE_NO_EMUL): New macro.
7138         (GRUB_BIOSDISK_CDTYPE_1_2_M): Likewise.
7139         (GRUB_BIOSDISK_CDTYPE_1_44_M): Likewise.
7140         (GRUB_BIOSDISK_CDTYPE_2_88_M): Likewise.
7141         (GRUB_BIOSDISK_CDTYPE_HARDDISK): Likewise.
7142         (GRUB_BIOSDISK_CDTYPE_MASK): Likewise.
7143         (grub_biosdisk_cdrp): New structure.
7144         (grub_biosdisk_get_cdinfo_int13_extensions): New function.
7146         * include/grub/i386/pc/kernel.h (grub_boot_drive): Export this variable.
7148         * kern/i386/pc/init.c (make_install_device): Don't use (cdN) as root
7149         device.
7151         * kern/i386/pc/startup.S (grub_biosdisk_get_cdinfo_int13_extensions):
7152         New function.
7154 2008-03-20  Robert Millan  <rmh@aybabtu.com>
7156         Remove 2 TiB limit in ata.mod.
7157         * disk/ata.c (grub_ata_device): Promote `size' to grub_uint64_t.
7158         (grub_ata_dumpinfo): Print sector count with 0x%llx.
7159         (grub_ata_identify): Interpret `&info16[100]' as a pointer to
7160         grub_uint64_t instead of grub_uint32_t.
7162 2008-03-05  Bean  <bean123ch@gmail.com>
7164         * loader/i386/pc/multiboot.c (grub_multiboot_get_bootdev): New function.
7165         (grub_multiboot): Set boot device.
7167         * boot/i386/pc/lnxboot.S (real_code_2): Set %dh to 0xFF.
7169 2008-03-02  Bean  <bean123ch@gmail.com>
7171         * fs/reiserfs.c (grub_reiserfs_read_symlink): Add 0 at the end of
7172         symlink_buffer.
7174 2008-03-01  Yoshinori K. Okuji  <okuji@enbug.org>
7176         * DISTLIST: Added docs/fdl.texi, docs/grub.texi, docs/mdate-sh and
7177         texinfo.tex.
7179         * docs/grub.texi: New file. Copied from GRUB Legacy, and slightly
7180         modified.
7182         * docs/fdl.texi: New file.
7184         * docs/mdate-sh: New file. Copied from gnulib.
7185         * docs/texinfo.tex: Likewise.
7187         * config.guess: Updated from gnulib.
7188         * install-sh: Likewise.
7190 2008-02-28  Robert Millan  <rmh@aybabtu.com>
7192         * conf/i386-linuxbios.rmk (pkglib_MODULES): Add aout.mod.
7193         (aout_mod_SOURCES): New variable.
7194         (aout_mod_CFLAGS): Likewise.
7195         (aout_mod_LDFLAGS): Likewise.
7197         * conf/i386-ieee1275.rmk: Likewise.
7199 2008-02-28  Robert Millan  <rmh@aybabtu.com>
7201         * util/update-grub.in: Reorganise terminal validity check.  Accept
7202         `ieee1275:console' (OLPC) and `*:gfxterm' as valid too.
7203         Based on suggestion by Franklin PIAT.
7205 2008-02-28  Fabian Greffrath  <greffrath@leat.rub.de>
7207         * include/grub/util/getroot.h (grub_util_check_block_device): Export new
7208         function.
7209         * util/getroot.c (grub_util_check_block_device): New function that
7210         returns the given argument if it is a block device and returns NULL else.
7211         * util/grub-probe.c (argument_is_device): New variable.
7212         (probe): Promote device_name from a variable to an argument. Receive
7213         device_name from grub_util_check_block_device() if path is NULL and from
7214         grub_guess_root_device() else. Do not free() device_name anymore.
7215         (options): Introduce new parameter '-d, --device'.
7216         (main): Add description of the new parameter to the help screen.
7217         Rename path variable to argument. Set argument_is_device if the '-d'
7218         option is given. Pass argument to probe() depending on
7219         argument_is_device.
7221 2008-02-24  Bean  <bean123ch@gmail.com>
7223         * fs/iso9660.c (GRUB_ISO9660_VOLDESC_BOOT): New macro.
7224         (GRUB_ISO9660_VOLDESC_PRIMARY): Likewise.
7225         (GRUB_ISO9660_VOLDESC_SUPP): Likewise.
7226         (GRUB_ISO9660_VOLDESC_PART): Likewise.
7227         (GRUB_ISO9660_VOLDESC_END): Likewise.
7228         (grub_iso9660_primary_voldesc): New member escape.
7229         (grub_iso9660_data): New member joliet.
7230         (grub_iso9660_convert_string): New function.
7231         (grub_iso9660_mount): Detect joliet extension.
7232         (grub_iso9660_iterate_dir): Convert filename when joliet is detected.
7233         (grub_iso9660_iso9660_label): Likewise.
7235         * conf/common.rmk (pkgdata_MODULES): Add udf.mod.
7236         (grub_setup_SOURCES): Add fs/udf.c.
7237         (grub_fstest_SOURCES): Likewise.
7238         (udf_mod_SOURCES): New variable.
7239         (udf_mod_CFLAGS): Likewise.
7240         (udf_mod_LDFLAGS): Likewise.
7242         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/udf.c.
7243         (grub_emu_SOURCES): Likewise.
7245         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
7247         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7249         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
7251         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7253         * fs/udf.c: New file.
7255 2008-02-24  Robert Millan  <rmh@aybabtu.com>
7257         * conf/i386-efi.rmk (normal/function.c_DEPENDENCIES)
7258         (normal/lexer.c_DEPENDENCIES): New variables.
7259         * conf/i386-ieee1275.rmk (normal/function.c_DEPENDENCIES)
7260         (normal/lexer.c_DEPENDENCIES): Likewise.
7261         * conf/i386-linuxbios.rmk (normal/function.c_DEPENDENCIES)
7262         (normal/lexer.c_DEPENDENCIES): Likewise.
7263         * conf/i386-pc.rmk (normal/function.c_DEPENDENCIES)
7264         (normal/lexer.c_DEPENDENCIES): Likewise.
7265         * conf/powerpc-ieee1275.rmk (normal/function.c_DEPENDENCIES)
7266         (normal/lexer.c_DEPENDENCIES): Likewise.
7267         * conf/sparc64-ieee1275.rmk (normal/function.c_DEPENDENCIES)
7268         (normal/lexer.c_DEPENDENCIES): Likewise.
7270 2008-02-23  Robert Millan  <rmh@aybabtu.com>
7272         * partmap/gpt.c (grub_gpt_magic): Add `0x' qualifier to each member,
7273         since they were intended to be in hex.  This didn't break previously
7274         because of a bug in gpt_partition_map_iterate() (see below).
7276         (gpt_partition_map_iterate): Replace `grub_memcmp' with `! grub_memcmp'
7277         when checking the validity of GPT header.
7278         Remove `partno', since it always provides the same information as `i'.
7280 2008-02-21  Yoshinori K. Okuji  <okuji@enbug.org>
7282         * include/grub/efi/time.h: Fix a wrong comment.
7284 2008-02-19  Pavel Roskin  <proski@gnu.org>
7286         * kern/rescue.c (grub_enter_rescue_mode): Improve initial
7287         message.
7289 2008-02-19  Bean  <bean123ch@gmail.com>
7291         * conf/i386-pc.rmk (pkglib_MODULES): Add aout.mod _bsd.mod and bsd.mod.
7292         (aout_mod_SOURCES): New variable.
7293         (aout_mod_CFLAGS): Likewise.
7294         (aout_mod_LDFLAGS): Likewise.
7295         (_bsd_mod_SOURCES): New variable.
7296         (_bsd_mod_CFLAGS): Likewise.
7297         (_bsd_mod_LDFLAGS): Likewise.
7298         (bsd_mod_SOURCES): New variable.
7299         (bsd_mod_CFLAGS): Likewise.
7300         (bsd_mod_LDFLAGS): Likewise.
7302         * include/grub/aout.h: New file.
7304         * include/grub/i386/loader.h (grub_unix_real_boot): New function.
7306         * include/grub/i386/bsd.h: New file.
7308         * include/grub/i386/pc/init.h (grub_get_mmap_entry): Use EXPORT_FUNC
7309         to make it public.
7311         * kern/elf.c (grub_elf32_load): Get the physical address after the hook
7312         function is called, so that it's possible to change it inside the hook.
7313         (grub_elf64_load): Likewise.
7314         (grub_elf_file): Don't close the file if elf header is not found.
7315         (grub_elf_close): Close the file if grub_elf_file fails (The new
7316         grub_elf_file won't close it).
7317         (grub_elf32_size): Use NESTED_FUNC_ATTR for nested function calcsize.
7318         (grub_elf64_size): Likewise.
7320         * kern/i386/loader.S (grub_unix_real_boot): New function.
7322         * loader/aout.c: New file.
7324         * loader/i386/bsd.c: New file.
7326         * loader/i386/bsd_normal.c: New file.
7328         * loader/i386/pc/multiboot.c (grub_multiboot): Handle a.out format.
7330         * loader/multiboot2.c (grub_multiboot2): Reset grub_errno so that it
7331         can test other formats.
7333 2008-02-19  Robert Millan  <rmh@aybabtu.com>
7335         * partmap/gpt.c: Include `<grub/gpt_partition.h>'.
7336         (grub_gpt_partition_type_empty): Redefine with macro from
7337         `<grub/gpt_partition.h>'.
7338         (gpt_partition_map_iterate): Adjust partition type comparison.
7340         Export `entry' as partmap-specific `part.data' struct.
7341         (grub_gpt_header, grub_gpt_partentry): Move from here ...
7343         * include/grub/gpt_partition.h (grub_gpt_header)
7344         (grub_gpt_partentry): ... to here (new file).
7346         * util/i386/pc/grub-setup.c: Include `<grub/gpt_partition.h>'.
7348         (grub_gpt_partition_type_bios_boot): New const variable, defined
7349         with macro from `<grub/gpt_partition.h>'.
7351         (setup): Replace `first_start' with `embed_region', which keeps
7352         track of the embed region (and is partmap-agnostic).
7354         Replace find_first_partition_start() with find_usable_region(),
7355         which finds a usable region for embedding using partmap-specific
7356         knowledge (supports PC/MSDOS and GPT).
7358         Fix all assumptions that the embed region start at sector 1, using
7359         `embed_region.start' from now on.  Similarly, use `embed_region.end'
7360         rather than `first_start' to calculate available size.
7362         In grub_util_info() message, replace "into after the MBR" with an
7363         indication of the specific sector our embed region starts at.
7365 2008-02-19  Robert Millan  <rmh@aybabtu.com>
7367         * DISTLIST: Replace `commands/ieee1275/halt.c' and
7368         `commands/ieee1275/reboot.c' with `commands/halt.c' and
7369         `commands/reboot.c'.
7370         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
7371         (halt_mod_SOURCES): Likewise.
7372         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
7373         (halt_mod_SOURCES): Likewise.
7375 2008-02-17  Christian Franke  <franke@computer.org>
7377         * commands/cat.c (grub_cmd_cat): Add break on GRUB_TERM_ESC key.
7379 2008-02-17  Robert Millan  <rmh@aybabtu.com>
7381         * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
7382         set `first_start' to 0 for non-PC/MSDOS partition maps.
7384 2008-02-16  Robert Millan  <rmh@aybabtu.com>
7386         * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
7387         do not assume partition map is PC/MSDOS before performing checks that
7388         are specific to that layout.
7390 2008-02-13  Robert Millan  <rmh@aybabtu.com>
7392         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Remove
7393         `commands/i386/pc/halt.c' and `commands/i386/pc/reboot.c'.
7394         * kern/i386/linuxbios/init.c (grub_halt, grub_reboot): Remove stubs.
7396 2008-02-13  Yoshinori K. Okuji  <okuji@enbug.org>
7398         * configure.ac: Only a cosmetic change on the handling of
7399         -fno-stack-protector.
7401 2008-02-12  Alexandre Boeglin  <alex@boeglin.org>
7403         * conf/i386-efi.rmk (grub_emu_SOURCES): Replace
7404         commands/i386/pc/halt.c and reboot.c by commands/halt.c and
7405         reboot.c.
7406         (grub_install_SOURCES): Add halt.mod and reboot.mod.
7407         (halt_mod_SOURCES): New variable.
7408         (halt_mod_CFLAGS): Likewise.
7409         (halt_mod_LDFLAGS): Likewise.
7410         (reboot_mod_SOURCES): Likewise.
7411         (reboot_mod_CFLAGS): Likewise.
7412         (reboot_mod_LDFLAGS): Likewise.
7414         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace
7415         commands/ieee1275/halt.c and reboot.c by commands/halt.c and
7416         reboot.c.
7417         (halt_mod_SOURCES): Likewise.
7418         (reboot_mod_SOURCES): Likewise.
7420         * conf/i386-pc.rmk (grub_emu_SOURCES): Replace
7421         commands/i386/pc/reboot.c by commands/reboot.c.
7422         (reboot_mod_SOURCES): Likewise.
7424         * commands/i386/pc/reboot.c: merge this file ...
7426         * commands/ieee1275/reboot.c: ... and this file ...
7428         * commands/reboot.c: ... to this file.
7429         Add some precompiler directive to include the correct header for
7430         each machine.
7432         * commands/ieee1275/halt.c: move this file ...
7434         * commands/halt.c: ... to here.
7435         Add some precompiler directive to include the correct header for
7436         each machine.
7438         * include/grub/efi/efi.h (grub_reboot): New function declaration.
7439         (grub_halt): Likewise.
7441         * kern/efi/efi.c (grub_reboot): New function.
7442         (grub_halt): Likewise.
7444 2008-02-12  Robert Millan  <rmh@aybabtu.com>
7446         * util/getroot.c (grub_guess_root_device): Inspect /dev/evms before
7447         /dev (like it is done for /dev/mapper).  This doesn't provide support
7448         for EVMS, but at least it is now easy to identify the problem when it
7449         arises.
7451 2008-02-11  Robert Millan  <rmh@aybabtu.com>
7453         * util/biosdisk.c (grub_util_biosdisk_open, linux_find_partition)
7454         (grub_util_biosdisk_get_grub_dev): Check open() exit status by
7455         comparing it with -1, not 0.
7457 2008-02-10  Robert Millan  <rmh@aybabtu.com>
7459         * conf/i386-efi.rmk (grub_emu_SOURCES): Add `disk/raid.c' and
7460         `disk/lvm.c'.
7461         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7462         * conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
7464         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Move `disk/raid.c' and
7465         `disk/lvm.c' to the end of the list.
7466         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
7467         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
7469 2008-02-10  Robert Millan  <rmh@aybabtu.com>
7471         * kern/main.c (grub_load_normal_mode): Do not reset `grub_errno'.  Call
7472         grub_print_error() instead.  This will let user know why we're entering
7473         rescue mode.
7474         Based on suggestions from Sam Morris.
7476 2008-02-10  Alexandre Boeglin  <alex@boeglin.org>
7478         * normal/arg.c (grub_arg_parse): If one of the args is "--", call add_arg()
7479         on remaining N args, instead of "--" arg N times.
7481 2008-02-09  Vesa Jaaskelainen  <chaac@nic.fi>
7483         * font/manager.c (unknown_glyph): Added variable for unknown glyph.
7484         (fill_with_default_glyph): Changed to use unknown_glyph for fill
7485         pattern for unknown glyphs.
7487 2008-02-09  Robert Millan  <rmh@aybabtu.com>
7489         * configure.ac: Probe for `help2man'.
7490         * Makefile.in (builddir): New variable.
7491         (HELP2MAN): Likewise.  Set to `true' when @HELP2MAN@ doesn't provide it,
7492         or otherwise add a few flags/options to it.
7493         (install-local): For every executable utility or script that is
7494         installed, invoke $(HELP2MAN) to install a manpage based on --help
7495         output.
7497         * util/i386/pc/grub-install.in: Move down `update-grub_lib' sourcing, so
7498         that it doesn't prevent --help from working in build tree.
7500         * util/i386/pc/grub-mkrescue.in (usage): Replace `grub-devel@gnu.org'
7501         with `bug-grub@gnu.org'.
7502         * util/powerpc/ieee1275/grub-mkrescue.in (usage): Likewise.
7503         * util/update-grub.in (usage): New function.
7504         Implement proper argument check, with support for --help and --version
7505         (as well as existing -y).
7507 2008-02-09  Christian Franke  <franke@computer.org>
7509         * commands/cat.c (grub_cmd_cat): Print '\r' as hex to
7510         avoid overwriting previous output.
7511         * kern/rescue.c (grub_rescue_cmd_cat): Likewise.
7513 2008-02-09  Robert Millan  <rmh@aybabtu.com>
7515         * normal/menu.c (run_menu): If timeout is set to zero, don't bother
7516         drawing the menu.
7518 2008-02-09  Robert Millan  <rmh@aybabtu.com>
7520         * commands/sleep.c: New file.
7521         * conf/common.rmk (pkglib_MODULES): Add `commands/sleep.c'.
7522         (sleep_mod_SOURCES): New variable.
7523         (sleep_mod_CFLAGS): Likewise.
7524         (sleep_mod_LDFLAGS): Likewise.
7526 2008-02-09  Robert Millan  <rmh@aybabtu.com>
7528         * disk/raid.c (grub_raid_scan_device): Add a pair of sanity checks for
7529         situations in which we can deduce the RAID size and the superblock
7530         doesn't match it.
7532 2008-02-09  Robert Millan  <rmh@aybabtu.com>
7534         * disk/lvm.c [GRUB_UTIL] (grub_lvm_memberlist): New function.  Construct
7535         and return a grub_diskmemberlist_t composed of LVM physical volumes.
7536         [GRUB_UTIL] (grub_lvm_dev): Add `memberlist' member.
7538         * disk/raid.c [GRUB_UTIL] (grub_raid_memberlist): New function.  Construct
7539         and return a grub_diskmemberlist_t composed of physical array members.
7540         [GRUB_UTIL] (grub_raid_dev): Add `memberlist' member.
7542         * include/grub/disk.h [GRUB_UTIL] (grub_disk_memberlist): New struct
7543         prototype.
7544         [GRUB_UTIL] (struct grub_disk_dev): Add `memberlist' function pointer.
7545         [GRUB_UTIL] (struct grub_disk_memberlist): New struct declaration.
7546         [GRUB_UTIL] (grub_disk_memberlist_t): New typedef.
7548         * util/grub-probe.c (probe): Move partmap probing code from here ...
7549         (probe_partmap): ... to here.
7550         (probe): Use probe_partmap() once for the disk we're probing, and
7551         additionally, when such disk contains a memberlist() struct member,
7552         once for each disk that is contained in the structure returned by
7553         memberlist().
7555 2008-02-09  Robert Millan  <rmh@aybabtu.com>
7557         * util/grub-probe.c (main): When `verbosity > 1', set `debug'
7558         environment variable to 'all' in order to obtain debug output from
7559         non-util/ code.
7560         * util/i386/pc/grub-setup.c (main): Likewise.
7562 2008-02-08  Robert Millan  <rmh@aybabtu.com>
7564         * disk/raid.c (grub_raid_scan_device): Check for
7565         `array->device[sb.this_disk.number]' rather than for
7566         `array->device[sb.this_disk.number]->name', since the latter is not
7567         guaranteed to be accessible.
7569 2008-02-08  Robert Millan  <rmh@aybabtu.com>
7571         * disk/raid.c: Update copyright.
7572         * fs/cpio.c: Likewise.
7573         * include/grub/raid.h: Likewise.
7574         * loader/i386/pc/multiboot.c: Likewise.
7575         * util/hostfs.c: Likewise.
7577 2008-02-08  Robert Millan  <rmh@aybabtu.com>
7579         * include/grub/raid.h (struct grub_raid_array): Change type of `device'
7580         to a grub_disk_t array.
7581         * disk/raid.c (grub_raid_read): Replace `device[x].disk' accesses with
7582         `device[x]'.
7583         (grub_raid_scan_device): Replace `device[x].name' accesses with
7584         `device[x]->name'.  Simplify initialization of `array->device[x]'.
7586 2008-02-08  Robert Millan  <rmh@aybabtu.com>
7588         * disk/raid.c (grub_raid_open, grub_raid_scan_device): Add a few
7589         grub_dprintf() calls.
7590         * kern/disk.c (grub_disk_read): Include grub_errmsg in out of range
7591         error message.
7593 2008-02-07  Christian Franke  <franke@computer.org>
7595         * util/hostfs.c (grub_hostfs_open): Use fseeko and ftello
7596         instead of fseek and ftell to support large files.
7597         (grub_hostfs_read): Likewise.
7599 2008-02-07  Robert Millan  <rmh@aybabtu.com>
7601         Patch from Jeroen Dekkers.
7602         * disk/raid.c (grub_raid_scan_device): Reset `grub_errno' on disk
7603         failure, since successfully reading all array members might not be
7604         required.
7606 2008-02-06  Robert Millan  <rmh@aybabtu.com>
7608         * util/grub-probe.c (probe): Simplify partmap probing (with the
7609         assumption that the first word up to the underscore equals to
7610         the module name).
7612 2008-02-06  Christian Franke  <franke@computer.org>
7614         * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_NONE
7615         (and set *ofs = 0) instead of GRUB_ERR_FILE_NOT_FOUND on
7616         last block of a cpio or tar stream.
7617         Check for "TRAILER!!!" instead of any empty data
7618         block to detect last block of a cpio stream.
7619         (grub_cpio_dir): Fix constness of variable np.
7620         (grub_cpio_open): Return GRUB_ERR_FILE_NOT_FOUND if
7621         cpio or tar trailer is detected.  This fixes a crash
7622         on open of a non existing file.
7624 2008-02-05  Bean  <bean123ch@gmail.com>
7626         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Get physical
7627         address of entry.
7628         (grub_multiboot_load_elf64): Likewise.
7629         (grub_multiboot): Initialize mbi structure.
7631         * util/grub-fstest.c: Don't include unused header file script.h.
7633         * conf/common.rmk (grub-fstest.c_DEPENDENCIES): Move to the beginning
7634         of file.
7635         (grub_fstest_SOURCES): Likewise.
7637 2008-02-05  Robert Millan  <rmh@aybabtu.com>
7639         * include/grub/term.h (GRUB_TERM_LEFT, GRUB_TERM_RIGHT)
7640         (GRUB_TERM_UP, GRUB_TERM_DOWN, GRUB_TERM_HOME, GRUB_TERM_END)
7641         (GRUB_TERM_DC, GRUB_TERM_PPAGE, GRUB_TERM_NPAGE, GRUB_TERM_ESC)
7642         (GRUB_TERM_TAB, GRUB_TERM_BACKSPACE): New macros.
7644         * kern/i386/pc/startup.S: Include `<grub/term.h>'.
7645         (translation_table): Replace hardcoded values with macros
7646         provided by `<grub/term.h>'.
7648         * term/i386/pc/at_keyboard.c: Include `<grub/term.h>'.
7649         (keyboard_map): Correct/add a few values, with macros provided
7650         by `<grub/term.h>'.
7651         (keyboard_map_shift): Zero values that don't differ from their
7652         `keyboard_map' equivalents.
7653         (grub_console_checkkey): Optimize KEYBOARD_STATUS_CAPS_LOCK toggling.
7654         Discard the second scan code that is always sent by Caps lock.
7655         Only use `keyboard_map_shift' when it provides a non-zero value,
7656         otherwise fallback to `keyboard_map'.
7658 2008-02-04  Bean  <bean123ch@gmail.com>
7660         * Makefile.in (enable_grub_fstest): New variable.
7662         * conf/common.rmk (grub_fstest_init.lst): New rule.
7663         (grub_fstest_init.h): Likewise.
7664         (grub_fstest_init.c): Likewise.
7665         (util/grub-fstest.c_DEPENDENCIES): New variable.
7666         (grub_fstest_SOURCES): Likewise.
7668         * configure.ac (enable_grub_fstest): Check for --enable-grub-fstest.
7670         * util/grub-fstest.c: New file.
7672 2008-02-03  Yoshinori K. Okuji  <okuji@enbug.org>
7674         Make grub-setup handle a separate root device.
7676         * util/i386/pc/grub-setup.c (setup): Always open the root device,
7677         so that the root device can be compared with the destination
7678         device.
7679         When embedding the core image, if the root and destination devices
7680         are different, set ROOT_DRIVE to ROOT_DEV->DISK->ID. Otherwise, to
7681         0xFF.
7682         When not embedding, set ROOT_DRIVE to 0xFF.
7684 2008-02-03  Yoshinori K. Okuji  <okuji@enbug.org>
7686         Add support for having a grub directory in a different drive. This
7687         is still only the data handling part.
7689         * kern/i386/pc/startup.S (multiboot_trampoline): Set %dh to 0xFF.
7690         (codestart): Save %dh in GRUB_ROOT_DRIVE.
7691         (grub_root_drive): New variable.
7693         * kern/i386/pc/init.c (make_install_device): Use GRUB_ROOT_DRIVE
7694         instead of GRUB_BOOT_DRIVE to construct a device name. Set
7695         GRUB_ROOT_DRIVE to GRUB_BOOT_DRIVE if it is 0xFF, otherwise use it
7696         as it was.
7698         * include/grub/i386/pc/kernel.h (grub_root_drive): New prototype.
7700         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_ROOT_DRIVE): New
7701         macro.
7702         (GRUB_BOOT_MACHINE_DRIVE_CHECK): Set to 0x4f.
7704         * boot/i386/pc/pxeboot.S (_start): Set %dh to 0xFF. For now, this
7705         is bogus, because PXE booting does not specify any drive
7706         correctly.
7708         * boot/i386/pc/lnxboot.S (reg_edx): Set the second byte to 0xFF. I
7709         am not sure if this is really correct.
7711         * boot/i386/pc/cdboot.S: Set %dh to 0xFF, because the root drive
7712         is always identical to the boot drive when booting from a CD.
7714         * boot/i386/pc/boot.S (MOV_MEM_TO_AL): Removed. Not needed any
7715         longer.
7716         (root_drive): New variable.
7717         (real_start): Unconditionally set %dh to ROOT_DRIVE.
7718         (setup_sectors): Push %dx right after popping it, because %dh will
7719         be modified later.
7720         (copy_buffer): Restore %dx.
7722 2008-02-03  Robert Millan  <rmh@aybabtu.com>
7724         * util/i386/pc/grub-mkrescue.in: Rewrite most of image generation to
7725         use `cdboot.img' for cdrom images.
7727 2008-02-03  Robert Millan  <rmh@aybabtu.com>
7729         * util/grub.d/00_header.in: Issue scripting commands for GRUB to
7730         only setup gfxterm when `font' command has succeeded.
7732 2008-02-03  Robert Millan  <rmh@aybabtu.com>
7734         * loader/multiboot_loader.c [GRUB_MACHINE_LINUXBIOS]
7735         (grub_rescue_cmd_multiboot_loader)
7736         (grub_rescue_cmd_module_loader): Enable multiboot1 calls.
7738 2008-02-03  Pavel Roskin  <proski@gnu.org>
7740         * kern/i386/pc/startup.S (grub_chainloader_real_boot): Pop
7741         %edx and %esi from stack only after grub_gate_a20() is called.
7742         grub_gate_a20() clobbers %edx.
7744 2008-02-03  Yoshinori K. Okuji  <okuji@enbug.org>
7746         * configure.ac (AC_INIT): Bumped to 1.96.
7748         * DISTLIST: Added boot/i386/pc/cdboot.S, bus/pci.c,
7749         commands/lspci.c,disk/memdisk.c, include/grub/pci.h,
7750         include/grub/i386/pc/pci.h, video/readers/jpeg.c, and
7751         video/readers/png.c.
7753 2008-02-03  Bean  <bean123ch@gmail.com>
7755         * conf/i386-pc.rmk (pkglib_IMAGES): Add cdboot.img.
7756         (cdboot_img_SOURCES): New variable.
7757         (cdboot_img_ASFLAGS): New variable.
7758         (cdboot_img_LDFLAGS): New variable.
7760         * boot/i386/pc/cdboot.S: New file.
7762         * disk/i386/pc/biosdisk.c (cd_start): New variable.
7763         (cd_count): Likewise.
7764         (grub_biosdisk_get_drive): Add support for cd device.
7765         (grub_biosdisk_call_hook): Likewise.
7766         (grub_biosdisk_iterate): Likewise.
7767         (grub_biosdisk_open): Likewise.
7768         (GRUB_BIOSDISK_CDROM_RETRY_COUNT): New macro.
7769         (grub_biosdisk_rw): Support reading from cd device.
7770         (GRUB_MOD_INIT): Iterate cd devices.
7772         * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_FLAG_CDROM): New macro.
7773         (GRUB_BIOSDISK_MACHINE_CDROM_START): Likewise.
7774         (GRUB_BIOSDISK_MACHINE_CDROM_END): Likewise.
7776         * kern/i386/pc/init.c (make_install_device): Check for cd device.
7778 2008-02-02  Robert Millan  <rmh@aybabtu.com>
7780         * commands/read.c: New file.
7781         * conf/common.rmk (pkglib_MODULES): Add `commands/read.c'.
7782         (read_mod_SOURCES): New variable.
7783         (read_mod_CFLAGS): Likewise.
7784         (read_mod_LDFLAGS): Likewise.
7786 2008-02-02  Robert Millan  <rmh@aybabtu.com>
7788         * normal/main.c (grub_normal_execute): Check for `menu->size' when
7789         determining whether menu has to be displayed.
7791 2008-02-02  Marco Gerards  <marco@gnu.org>
7793         * bus/pci.c: New file.
7795         * include/grub/pci.h: Likewise.
7797         * include/grub/i386/pc/pci.h: Likewise.
7799         * commands/lspci.c: Likewise.
7801         * conf/i386-pc.rmk (pkglib_MODULES): Add `pci.mod' and
7802         `lspci.mod'.
7803         (pci_mod_SOURCES): New variable.
7804         (pci_mod_CFLAGS): Likewise.
7805         (pci_mod_LDFLAGS): Likewise.
7806         (lspci_mod_SOURCES): Likewise.
7807         (lspci_mod_CFLAGS): Likewise.
7808         (lspci_mod_LDFLAGS): Likewise.
7810 2008-02-02  Bean  <bean123ch@gmail.com>
7812         * fs/ufs.c (INODE_BLKSZ): Fix incorrect value.
7813         (grub_ufs_get_file_block): Fix indirect block calculation problem.
7815         * fs/xfs.c (grub_xfs_sblock): New member log2_dirblk.
7816         (grub_xfs_btree_node): New structure.
7817         (grub_xfs_btree_root): New structure.
7818         (grub_xfs_inode): New members nblocks, extsize, nextents and btree.
7819         (GRUB_XFS_EXTENT_OFFSET): Use exts instead of inode->data.extents.
7820         (GRUB_XFS_EXTENT_BLOCK): Likewise.
7821         (GRUB_XFS_EXTENT_SIZE): Likewise.
7822         (grub_xfs_read_block): Support btree format type.
7823         (grub_xfs_iterate_dir): Use NESTED_FUNC_ATTR in call_hook.
7824         Use directory block as basic unit.
7826         * fs/fshelp.c (grub_fshelp_read_file): Bug fix for sparse block.
7828         * aclocal.m4 (grub_i386_CHECK_REGPARM_BUG): Define NESTED_FUNC_ATTR as
7829         __attribute__ ((__regparm__ (1))).
7831 2008-02-01  Robert Millan  <rmh@aybabtu.com>
7833         Correct a mistake in previous commit.
7835         * conf/i386-pc.rmk (normal/execute.c_DEPENDENCIES): Move to the
7836         top.
7837         (normal/command.c_DEPENDENCIES): New variable.
7839 2008-02-01  Robert Millan  <rmh@aybabtu.com>
7841         * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Move to the
7842         top.
7843         (normal/command.c_DEPENDENCIES): New variable.
7844         (grub-emu_DEPENDENCIES, normal_mod_DEPENDENCIES): Remove variables.
7845         * conf/i386-ieee1275.rmk: Likewise.
7846         * conf/i386-linuxbios.rmk: Likewise.
7847         * conf/i386-pc.rmk: Likewise.
7848         * conf/sparc64-ieee1275.rmk: Likewise.
7849         * conf/powerpc-ieee1275.rmk: Likewise.
7850         (grub_emu_SOURCES): Add `fs/fshelp.c'.
7852         * genmk.rb: Add `$(#{src}_DEPENDENCIES)' in targets that require it.
7854 2008-02-01  Robert Millan  <rmh@aybabtu.com>
7856         * kern/disk.c (grub_disk_read, grub_disk_write): Add grub_dprintf()
7857         call at beginning of function.
7859 2008-01-31  Pavel Roskin  <proski@gnu.org>
7861         * util/powerpc/ieee1275/grub-mkrescue.in: New file.
7862         * conf/powerpc-ieee1275.rmk (bin_SCRIPTS): New variable.
7863         (grub_mkrescue_SOURCES): Likewise.
7864         * DISTLIST: Add util/powerpc/ieee1275/grub-mkrescue.in.
7866 2008-01-30  Robert Millan  <rmh@aybabtu.com>
7868         * conf/i386-pc.rmk (sbin_UTILITIES): Remove `grub-probe'.
7869         (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Moved from here ...
7870         * conf/common.rmk (util/grub-probe.c_DEPENDENCIES)
7871         (grub_probe_SOURCES): ... to here.
7873         * conf/i386-efi.rmk (sbin_UTILITIES): Remove `grub-probe'.
7874         (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Remove.
7875         * conf/i386-ieee1275.rmk: Likewise.
7876         * conf/i386-linuxbios.rmk: Likewise.
7877         * conf/powerpc-ieee1275.rmk: Likewise.
7879 2008-01-30  Tristan Gingold  <gingold@free.fr>
7881         * kern/rescue.c: Silently accept empty lines.
7883 2008-01-29  Bean  <bean123ch@gmail.com>
7885         * boot/i386/pc/lnxboot.S (data_start): Code cleanup.
7886         (real_code_2): Code cleanup and change comment style.
7887         (move_memory): Avoid using 32-bit address mode.
7889 2008-01-29  Bean  <bean123ch@gmail.com>
7891         * conf/i386-pc.rmk (pkglib_MODULES): Add `png.mod'.
7892         (png_mod_SOURCES): New variable.
7893         (png_mod_CFLAGS): Likewise.
7894         (png_mod_LDFLAGS): Likewise.
7896         * video/readers/png.c: New file.
7898 2008-01-28  Robert Millan  <rmh@aybabtu.com>
7900         * include/grub/i386/linuxbios/kernel.h (GRUB_MOD_GAP): New macro.
7901         * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Remove
7902         `ifndef GRUB_MOD_GAP' hack.
7903         * util/elf/grub-mkimage.c (add_segments): Likewise.
7905 2008-01-27  Robert Millan  <rmh@aybabtu.com>
7907         * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Skip
7908         `GRUB_MOD_GAP' for platforms in which it's not defined.
7909         * util/elf/grub-mkimage.c (add_segments): Likewise.
7911 2008-01-27  Robert Millan  <rmh@aybabtu.com>
7913         Get grub-emu to build again (including parallel builds).
7915         * conf/i386-pc.rmk (util/grub-emu.c_DEPENDENCIES): Remove variable.
7916         Split into ...
7917         (util/grub-emu.c_DEPENDENCIES): ... this, ...
7918         (normal/execute.c_DEPENDENCIES): ... this, ...
7919         (grub-emu_DEPENDENCIES): ... and this.
7921         * conf/i386-efi.rmk: Likewise.
7922         * conf/i386-linuxbios.rmk: Likewise.
7923         * conf/i386-ieee1275.rmk: Likewise.
7924         * conf/powerpc-ieee1275.rmk: Likewise.
7925         (grub_emu_SOURCES): Remove duplicated `kern/file.c'.
7927 2008-01-27  Robert Millan  <rmh@aybabtu.com>
7929         * NEWS: Add a few items.
7931 2008-01-27  Robert Millan  <rmh@aybabtu.com>
7933         Fix parallel builds with grub-emu.  Based on earlier commit for
7934         grub-probe and grub-setup.
7936         * conf/i386-pc.rmk (grub-emu_DEPENDENCIES): Renamed to ...
7937         (util/grub-emu.c_DEPENDENCIES): ... this.
7938         * conf/i386-efi.rmk (grub-emu_DEPENDENCIES): Renamed to ...
7939         (util/grub-emu.c_DEPENDENCIES): ... this.
7940         * conf/i386-linuxbios.rmk (grub-emu_DEPENDENCIES): Renamed to ...
7941         (util/grub-emu.c_DEPENDENCIES): ... this.
7942         * conf/i386-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
7943         (util/grub-emu.c_DEPENDENCIES): ... this.
7944         * conf/powerpc-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
7945         (util/grub-emu.c_DEPENDENCIES): ... this.
7947 2008-01-27  Pavel Roskin  <proski@gnu.org>
7949         * include/grub/powerpc/ieee1275/kernel.h: Introduce GRUB_MOD_GAP
7950         to create a gap between _end and the modules added to the image
7951         with grub-mkrescue.  That fixes "CLAIM failed" on PowerMAC.
7952         * kern/powerpc/ieee1275/init.c: Use GRUB_MOD_GAP.
7953         * util/elf/grub-mkimage.c (add_segments): Likewise.
7955 2008-01-26  Pavel Roskin  <proski@gnu.org>
7957         * kern/dl.c (grub_dl_load): Don't abort if prefix is not set,
7958         just return an error.
7960 2008-01-26  Bean  <bean123ch@gmail.com>
7962         * fs/reiserfs.c (grub_fshelp_node): New member next_offset.
7963         (grub_reiserfs_get_item): Save offset of the next item.
7964         (grub_reiserfs_iterate_dir): Use next_offset to find next item.
7966 2008-01-25  Robert Millan  <rmh@aybabtu.com>
7968         * conf/i386-pc.rmk (grub_setup_SOURCES, grub_emu_SOURCES): Regroup to
7969         make all filesystem sources appear together (possibly fixing omissions
7970         while at it).
7971         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
7972         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7973         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
7974         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7976         * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.  Additionally,
7977         add `kern/file.c'.
7978         * conf/i386-efi.rmk (grub_probe_SOURCES): Likewise.
7979         * conf/i386-ieee1275.rmk (grub_probe_SOURCES): Likewise.
7980         * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Likewise.
7981         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Likewise.
7983         * util/grub-probe.c: Include `<grub/file.h>' and `<sys/stat.h>'.
7984         (probe): Add a sanity check to make sure of our ability to read
7985         requested files when probing for filesystem type.
7987         * genmk.rb: Update copyright year (2007).
7989         * include/grub/fs.h (grub_fat_init, grub_fat_fini, grub_ext2_init)
7990         (grub_ext2_fini, grub_ufs_init, grub_ufs_fini, grub_minix_init)
7991         (grub_minix_fini, grub_hfs_init, grub_hfs_fini, grub_jfs_init)
7992         (grub_jfs_fini, grub_xfs_init, grub_xfs_fini, grub_affs_init)
7993         (grub_affs_fini, grub_sfs_init, grub_sfs_fini, grub_iso9660_init)
7994         : Remove function prototypes.
7996 2008-01-25  Robert Millan  <rmh@aybabtu.com>
7998         Revert my previous commits (based on wrong assumption of how grub_errno
7999         works).
8001         * kern/disk.c (grub_disk_open): Stop resetting grub_errno.
8002         * kern/file.c (grub_file_open): Likewise.
8004 2008-01-24  Pavel Roskin  <proski@gnu.org>
8006         * include/grub/ieee1275/ieee1275.h: Introduce flag for firmwares
8007         that hang if GRUB tries to setup colors.
8008         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Don't set
8009         colors for firmwares that don't support it.
8010         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag):
8011         Recognize Open Hack'Ware, set flags to work around its
8012         limitations.
8014 2008-01-24  Robert Millan  <rmh@aybabtu.com>
8016         * kern/file.c (grub_file_open): Do not account previous failures of
8017         unrelated functions when grub_errno is checked for.
8018         Reported by Oleg Strikov.
8020 2008-01-24  Bean  <bean123ch@gmail.com>
8022         * fs/ufs.c (GRUB_UFS_VOLNAME_LEN): New macro.
8023         (grub_ufs_sblock): New member volume name.
8024         (grub_ufs_find_file): Fix string copy bug.
8025         (grub_ufs_label): Implement this function properly.
8027         * fs/hfs.c (grub_hfs_cnid_type): New enum.
8028         (grub_hfs_iterate_records): Use the correct file number for extents
8029         and catalog file. Fix problem in next index calculation.
8030         (grub_hfs_find_node): Replace recursive function call with loop.
8031         (grub_hfs_iterate_dir): Replace recursive function call with loop.
8033 2008-01-23  Robert Millan  <rmh@aybabtu.com>
8035         * include/grub/i386/ieee1275/loader.h: Include `<grub/types.h>',
8036         `<grub/symbol.h>' and `<grub/multiboot.h>'.
8037         (grub_multiboot2_real_boot): New function prototype.
8039         * include/grub/i386/pc/memory.h: Include `<grub/machine/machine.h>'.
8040         [!GRUB_MACHINE_IEEE1275] (grub_lower_mem, grub_upper_mem): Disable.
8042         * kern/i386/ieee1275/init.c (grub_os_area_addr)
8043         (grub_os_area_size, grub_lower_mem, grub_upper_mem): Remove variables.
8045 2008-01-23  Robert Millan  <rmh@aybabtu.com>
8047         * kern/mm.c (grub_mm_init_region): Replace grub_dprintf() call with
8048         #ifdef'ed out grub_printf().
8050 2008-01-23  Robert Millan  <rmh@aybabtu.com>
8052         * term/i386/pc/at_keyboard.c (grub_keyboard_isr): #ifdef out
8053         grub_dprintf calls, since they make "debug=all" mode unusable.
8054         (grub_console_checkkey): Likewise.
8056 2008-01-23  Robert Millan  <rmh@aybabtu.com>
8058         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
8059         `term/i386/pc/at_keyboard.c'.
8060         (pkglib_MODULES): Add `serial.mod'.
8061         (serial_mod_SOURCES): New variable.
8062         (serial_mod_CFLAGS): Likewise.
8063         (serial_mod_LDFLAGS): Likewise.
8065         * include/grub/i386/ieee1275/console.h: Add `<grub/symbol.h>'.  Remove
8066         `<grub/powerpc/ieee1275/console.h>'.
8067         (grub_keyboard_controller_init): New function prototype.
8068         (grub_console_checkkey): Likewise.
8069         (grub_console_getkey): Likewise.
8071         * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize AT
8072         keyboard on i386.
8074         * term/ieee1275/ofconsole.c (grub_ofconsole_term): On i386, use
8075         grub_ofconsole_checkkey() and grub_ofconsole_getkey() for input.
8077 2008-01-23  Robert Millan  <rmh@aybabtu.com>
8079         * kern/i386/pc/init.c (make_install_device): When memdisk image is
8080         present, "(memdisk)/boot/grub" becomes the default prefix.
8082         * util/i386/pc/grub-mkrescue.in: Switch to a minimal core.img plus
8083         a memdisk tarball with all the modules.  Add --overlay=DIR option that
8084         allows users to overlay additional files into the image.
8086 2008-01-23  Robert Millan  <rmh@aybabtu.com>
8088         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add `machine/loader.h'
8089         and `machine/memory.h'.
8090         (pkglib_MODULES): Add `multiboot.mod' and `_multiboot.mod'.
8091         (_multiboot_mod_SOURCES): New variable.
8092         (_multiboot_mod_CFLAGS): Likewise.
8093         (_multiboot_mod_LDFLAGS): Likewise.
8094         (multiboot_mod_SOURCES): Likewise.
8095         (multiboot_mod_CFLAGS): Likewise.
8096         (multiboot_mod_LDFLAGS): Likewise.
8098         * include/grub/i386/ieee1275/loader.h: New file.
8100         * include/grub/i386/ieee1275/machine.h: Likewise.
8102         * include/grub/i386/ieee1275/memory.h: Likewise.
8104         * include/grub/i386/pc/init.h (grub_os_area_addr): Remove (redundant)
8105         variable declaration.
8106         (grub_os_area_size): Likewise.
8108         * kern/i386/ieee1275/init.c (grub_os_area_addr, grub_os_area_size)
8109         (grub_lower_mem, grub_upper_mem): New variables.
8110         (grub_stop_floppy): New function (just to make
8111         grub_multiboot2_real_boot() happy).
8113         * kern/i386/ieee1275/startup.S: Include `<grub/machine/memory.h>',
8114         `<grub/cpu/linux.h>', `<multiboot.h>' and `<multiboot2.h>'.
8115         (grub_stop): New function.
8116         Include `"../realmode.S"' and `"../loader.S"'.
8118         * loader/multiboot_loader.c: Include `<grub/machine/machine.h>'.
8119         Replace `__i386__' #ifdefs with `GRUB_MACHINE_PCBIOS'.
8121         * loader/powerpc/ieee1275/multiboot2.c (grub_mb2_arch_boot): On i386,
8122         rely on grub_multiboot2_real_boot() for final boot.
8124 2008-01-22  Robert Millan  <rmh@aybabtu.com>
8126         * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): When
8127         `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag is set, skip any
8128         device that doesn't look like an SD card.
8129         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
8130         `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag.
8131         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag): Detect
8132         OLPC laptop, and set `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' when
8133         found.
8135 2008-01-22  Robert Millan  <rmh@aybabtu.com>
8137         * kern/powerpc/ieee1275/init.c (grub_claim_heap): Add sanity check to
8138         avoid claiming over our own code.
8140 2008-01-22  Bean  <bean123ch@gmail.com>
8142         * conf/i386-pc.rmk (pkglib_MODULES): Add `jpeg.mod'.
8143         (jpeg_mod_SOURCES): New variable.
8144         (jpeg_mod_CFLAGS): Likewise.
8145         (jpeg_mod_LDFLAGS): Likewise.
8147         * video/readers/jpeg.c : New file.
8149 2008-01-22  Bean  <bean123ch@gmail.com>
8151         * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_FILE_NOT_FOUND when
8152         there are no more items.
8154 2008-01-21  Robert Millan  <rmh@aybabtu.com>
8156         * kern/mm.c (grub_mm_init_region): Improve debug message.
8158 2008-01-21  Robert Millan  <rmh@aybabtu.com>
8160         * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): New variable.
8161         (kernel_img_LDFLAGS): Use `GRUB_MEMORY_MACHINE_LINK_ADDR' as link
8162         address.
8163         (grub_mkimage_CFLAGS): Propagate `GRUB_MEMORY_MACHINE_LINK_ADDR' as
8164         a C macro.
8165         * include/grub/i386/pc/memory.h (GRUB_MEMORY_MACHINE_UPPER): New macro.
8166         Indicates start of upper memory.
8167         * util/i386/pc/grub-mkimage.c: Include `<grub/machine/memory.h>'.
8168         (generate_image): Abort when image size is big enough to corrupt
8169         upper memory.
8171         * include/grub/i386/pc/vga.h: Include `<grub/machine/memory.h>'.
8172         (GRUB_MEMORY_MACHINE_VGA_ADDR): Alias for `GRUB_MEMORY_MACHINE_UPPER'.
8173         * term/i386/pc/vga.c (VGA_MEM): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
8174         instead of hardcoding 0xA0000.
8175         * video/i386/pc/vbe.c: Include `<grub/machine/vga.h>'.
8176         (grub_vbe_set_video_mode): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
8177         instead of hardcoding 0xA0000.
8179 2008-01-21  Robert Millan  <rmh@aybabtu.com>
8181         * disk/memdisk.c (memdisk_size): New variable.
8182         (grub_memdisk_open): Replace grub_arch_memdisk_size() call with
8183         `memdisk_size'.
8184         (grub_memdisk_init): Initialize `memdisk_size'.  Reallocate memdisk
8185         image to dynamic memory.
8186         (grub_memdisk_fini): Replace grub_arch_memdisk_size() call with
8187         `memdisk_size'.  Free memdisk block.
8189 2008-01-21  Robert Millan  <rmh@aybabtu.com>
8191         Fix detection of very small filesystems (like tar).
8193         * fs/reiserfs.c (grub_reiserfs_mount): When disk is too small to
8194         contain a ReiserFS, abort with GRUB_ERR_BAD_FS rather than
8195         GRUB_ERR_OUT_OF_RANGE (which made the upper layer think there's
8196         a problem with this disk).
8198 2008-01-21  Robert Millan  <rmh@aybabtu.com>
8200         * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Add debug message
8201         on grub_biosdisk_rw_standard() error.
8203 2008-01-21  Robert Millan  <rmh@aybabtu.com>
8205         * include/grub/ieee1275/ieee1275.h: Add 2008 to Copyright line for
8206         recent changes.
8207         * kern/elf.c: Likewise.
8208         * kern/ieee1275/ieee1275.c: Likewise.
8209         * kern/powerpc/ieee1275/openfw.c: Likewise.
8210         * term/ieee1275/ofconsole.c: Likewise.
8212 2008-01-21  Robert Millan  <rmh@aybabtu.com>
8214         * include/grub/i386/pc/kernel.h: Include `<grub/symbol.h>'.
8216         * include/grub/kernel.h (grub_arch_memdisk_addr)
8217         (grub_arch_memdisk_size): Moved from here ...
8219         * include/grub/i386/pc/kernel.h (grub_arch_memdisk_addr)
8220         (grub_arch_memdisk_size): ... to here.
8222 2008-01-21  Robert Millan  <rmh@aybabtu.com>
8224         Mostly based on bugfix from Bean.
8226         * kern/elf.c (grub_elf32_phdr_iterate): Use `NESTED_FUNC_ATTR'
8227         attribute with hook() parameter.
8228         (grub_elf32_load): Use `NESTED_FUNC_ATTR' with grub_elf32_load_segment()
8229         declaration.
8230         (grub_elf64_phdr_iterate): Use `NESTED_FUNC_ATTR'
8231         attribute with hook() parameter.
8232         (grub_elf64_load): Use `NESTED_FUNC_ATTR' with grub_elf64_load_segment()
8233         declaration.
8235 2008-01-21  Robert Millan  <rmh@aybabtu.com>
8237         * conf/i386-pc.rmk (kernel_img_HEADERS): Add `machine/kernel.h'.
8238         (pkglib_MODULES): Add `memdisk.mod'.
8239         (memdisk_mod_SOURCES): New variable.
8240         (memdisk_mod_CFLAGS): Likewise.
8241         (memdisk_mod_LDFLAGS): Likewise.
8243         * disk/memdisk.c: New file.
8245         * include/grub/disk.h (grub_disk_dev_id): Add
8246         `GRUB_DISK_DEVICE_MEMDISK_ID'.
8248         * include/grub/i386/pc/kernel.h
8249         (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): New macro.
8250         (GRUB_KERNEL_MACHINE_PREFIX): Increment by 4.
8251         (grub_kernel_image_size): New variable declaration.
8252         (grub_total_module_size): Likewise.
8253         (grub_memdisk_image_size): Likewise.
8255         * include/grub/i386/pc/memory.h
8256         (GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR): New macro.
8258         * include/grub/kernel.h: Include `<grub/symbol.h>'.
8259         (grub_arch_memdisk_addr): New variable declaration.
8260         (grub_arch_memdisk_size): Likewise.
8262         * kern/i386/pc/init.c (grub_arch_memdisk_addr): New function.
8263         (grub_arch_memdisk_size): Likewise.
8265         * kern/i386/pc/startup.S (grub_memdisk_image_size): New variable.
8266         (codestart): Replace hardcoded `0x100000' with
8267         `GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR' macro.
8269         * util/i386/pc/grub-mkimage.c: Include `<grub/misc.h>'.
8270         (generate_image): Add `memdisk_path' parameter.  When `memdisk_path' is
8271         not NULL, append the contents of the file it refers to, at the end of
8272         the compressed kernel image.  Initialize `grub_memdisk_image_size'
8273         variable (at `GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE' offset).
8274         (options): Add "memdisk"|'m' option.
8275         (main): Parse --memdisk|-m option, and pass user-provided path as
8276         parameter to generate_image().
8278 2008-01-20  Robert Millan  <rmh@aybabtu.com>
8280         * kern/sparc64/ieee1275/openfw.c (grub_devalias_iterate): Copy debug
8281         grub_dprintf() calls from here ...
8282         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): ... to here.
8284 2008-01-20  Robert Millan  <rmh@aybabtu.com>
8286         Fix detection of "real mode" when /options/real-mode? doesn't exist.
8288         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_mmu): New variable
8289         declaration.
8290         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_mmu): New variable.
8291         (grub_ieee1275_find_options): If `grub_ieee1275_mmu' is 0, set
8292         `GRUB_IEEE1275_FLAG_REAL_MODE'.
8293         (cmain): Initialize `grub_ieee1275_mmu' (using /chosen/mmu integer
8294         property).
8295         * kern/powerpc/ieee1275/openfw.c (grub_map): Rely on pre-initialized
8296         `grub_ieee1275_mmu' rather than obtaining a handler on every call.
8298 2008-01-19  Robert Millan  <rmh@aybabtu.com>
8300         Get rid of confusing function (superseded by
8301         `grub_ieee1275_get_integer_property')
8302         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_decode_int_4): Remove
8303         prototype.
8304         * kern/ieee1275/ieee1275.c (grub_ieee1275_decode_int_4): Remove
8305         function.
8306         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid use of
8307         grub_ieee1275_decode_int_4(), by obtaining integer properties directly
8308         in native endianness from grub_ieee1275_get_integer_property().
8310 2008-01-19  Robert Millan  <rmh@aybabtu.com>
8312         * kern/powerpc/ieee1275/openfw.c (grub_halt): Issue "power-off"
8313         command after "shut-down", since implementations differ on which
8314         the command for halt is.
8316 2008-01-19  Robert Millan  <rmh@aybabtu.com>
8318         * include/grub/i386/linuxbios/console.h: Add header protection.
8319         (grub_keyboard_controller_init): New function prototype.
8320         * term/i386/pc/at_keyboard.c (KEYBOARD_COMMAND_ISREADY): New macro.
8321         (KEYBOARD_COMMAND_READ): Likewise.
8322         (KEYBOARD_COMMAND_WRITE): Likewise.
8323         (KEYBOARD_SCANCODE_SET1): Likewise.
8324         (grub_keyboard_controller_write): New function.
8325         (grub_keyboard_controller_read): Likewise.
8326         (grub_keyboard_controller_init): Likewise.
8328         * term/i386/pc/console.c: Include `<grub/machine/machine.h>'.
8329         (grub_console_init): On coreboot/LinuxBIOS, call
8330         grub_keyboard_controller_init().
8332 2008-01-19  Robert Millan  <rmh@aybabtu.com>
8334         PowerPC changes provided by Pavel Roskin.
8336         * kern/powerpc/ieee1275/cmain.c (cmain): Don't take any arguments.
8337         * kern/powerpc/ieee1275/crt0.S: Store r5 in grub_ieee1275_entry_fn,
8338         don't rely on cmain() doing it.
8339         * kern/i386/ieee1275/startup.S (_start): Store %eax in
8340         grub_ieee1275_entry_fn, don't rely on cmain() doing it.
8342 2008-01-16  Robert Millan  <rmh@aybabtu.com>
8344         * include/grub/i386/linuxbios/memory.h
8345         (GRUB_MEMORY_MACHINE_LINUXBIOS_TABLE_ADDR): Remove macro.
8346         * kern/i386/linuxbios/table.c (grub_linuxbios_table_iterate): Do not
8347         receive `table_header' as argument.  Instead, probe for it in the
8348         known memory ranges where it can be present.
8349         (grub_available_iterate): Do not pass a fixed `table_header' address
8350         to grub_linuxbios_table_iterate().
8352 2008-01-15  Robert Millan  <rmh@aybabtu.com>
8354         * configure.ac: Add `i386-ieee1275' to the list of supported targets.
8355         * conf/i386-ieee1275.rmk: New file.
8356         * include/grub/i386/ieee1275/console.h: Likewise.
8357         * include/grub/i386/ieee1275/ieee1275.h: Likewise.
8358         * include/grub/i386/ieee1275/kernel.h: Likewise.
8359         * include/grub/i386/ieee1275/time.h: Likewise.
8360         * kern/i386/ieee1275/init.c: Likewise.
8361         * kern/i386/ieee1275/startup.S: Likewise.
8363 2008-01-15  Robert Millan  <rmh@aybabtu.com>
8365         * kern/misc.c (grub_vsprintf): Do not reset `longlongfmt' to zero
8366         when pointers are 32-bit (but still do set it to one when they are
8367         64-bit).
8369 2008-01-15  Robert Millan  <rmh@aybabtu.com>
8371         * include/grub/ieee1275/ieee1275.h
8372         (grub_ieee1275_get_integer_property): New function prototype.
8374         * kern/ieee1275/ieee1275.c: Include `<grub/types.h>'.
8375         (grub_ieee1275_get_integer_property): New function.  Wraps around
8376         grub_ieee1275_get_property() to handle endianness.
8378         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Replace
8379         grub_ieee1275_get_property() with grub_ieee1275_get_integer_property()
8380         where appropriate.
8381         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Likewise.
8382         (grub_map): Likewise.
8383         * kern/sparc64/ieee1275/openfw.c (grub_map): Likewise.
8385 2008-01-15  Bean  <bean123ch@gmail.com>
8387         * normal/execute.c (grub_script_exec_argument_to_string): Check for undefined variable.
8388         (grub_script_execute_cmdline): Reset grub_errno.
8390         * normal/main.c (read_config_file): Reset grub_errno.
8392         * normal/parse.y (script_init): New.
8393         (script): Move function and menuentry here.
8394         (delimiter): New.
8395         (command): Add delimiter at the end of command.
8396         (commands): Adjust to match the new command.
8397         (commandblock): Remove grub_script_lexer_record_start.
8398         (menuentry): Add grub_script_lexer_record_start, use the new commands.
8399         (if): Use the new commands.
8401         * conf/common.rmk (pkgdata_MODULES): Add echo.mod.
8403 2008-01-15  Robert Millan  <rmh@aybabtu.com>
8405         * normal/menu.c (run_menu): Move timeout message from here ...
8406         (print_timeout): ... to here.
8407         (run_menu): Use print_timeout() once during initial draw to print
8408         the whole message, and again in every clock tick to update only
8409         the number of seconds.
8411 2008-01-15  Robert Millan  <rmh@aybabtu.com>
8413         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Obtain
8414         actual size of `available' from grub_ieee1275_get_property(), and
8415         restrict parsing to that bound.
8417 2008-01-15  Christian Franke  <franke@computer.org>
8419         * util/grub-emu.c: Replace <argp.h> by <getopt.h>.
8420         (argp_program_version): Remove variable.
8421         (argp_program_bug_address): Likewise.
8422         (options): Convert from struct argp_option to struct option.
8423         (struct arguments): Remove.
8424         (parse_opt): Remove.
8425         (usage): New function.
8426         (main): Replace struct args members by simple variables.
8427         Replace argp_parse() by getopt_long().
8428         Add switch to evaluate options.
8429         Add missing "(...)" around root_dev in prefix string.
8431 2008-01-14  Robert Millan  <rmh@aybabtu.com>
8433         * kern/powerpc/ieee1275/init.c (grub_exit): Reimplement as a wrapper
8434         for grub_ieee1275_exit(), in order to improve portability.
8436 2008-01-14  Robert Millan  <rmh@aybabtu.com>
8438         * util/grub.d/10_linux.in (prefix): Define.
8439         (exec_prefix): Likewise.  Both definitions are later used by `libdir'.
8441 2008-01-13  Pavel Roskin  <proski@gnu.org>
8443         * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Don't use
8444         grub_errno if no errors have been detected.
8446 2008-01-12  Robert Millan  <rmh@aybabtu.com>
8448         * include/grub/util/getroot.h (grub_dev_abstraction_types): New enum.
8449         (grub_util_get_dev_abstraction): New function prototype.
8451         * util/getroot.c: Include `<grub/util/getroot.h>'
8452         (grub_util_get_grub_dev): Move detection of abstraction type to ...
8453         (grub_util_get_dev_abstraction): ... here (new function).
8455         * util/grub-probe.c: Convert PRINT_* to an enum.  Add
8456         `PRINT_ABSTRACTION'.
8457         (probe): Probe for abstraction type when requested.
8458         (main): Understand `--target=abstraction'.
8460         * util/i386/efi/grub-install.in: Add abstraction module to core
8461         image when it is found to be necessary.
8462         * util/i386/pc/grub-install.in: Likewise.
8463         * util/powerpc/ieee1275/grub-install.in: Likewise.
8465         * util/update-grub_lib.in (font_path): Return system path without
8466         converting to GRUB path.
8467         * util/update-grub.in: Convert system path returned by font_path()
8468         to a GRUB path.  Use `grub-probe -t abstraction' to determine what
8469         abstraction module is needed for loading fonts (if any).  Export
8470         that as `GRUB_PRELOAD_MODULES'.
8471         * util/grub.d/00_header.in: Process `GRUB_PRELOAD_MODULES' (print
8472         insmod commands).
8474 2008-01-12  Yoshinori K. Okuji  <okuji@enbug.org>
8476         Remove some unused code from reiserfs.
8478         * fs/reiserfs.c (struct grub_reiserfs_key)
8479         [GRUB_REISERFS_KEYV2_BITFIELD]: Removed offset and type.
8480         (struct grub_reiserfs_node_body): Removed.
8481         (grub_reiserfs_get_key_v2_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
8482         Likewise.
8483         (grub_reiserfs_get_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
8484         Likewise.
8485         (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
8486         Likewise.
8487         (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
8488         Likewise.
8489         (grub_reiserfs_set_key_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
8490         Likewise.
8491         (grub_reiserfs_iterate_dir) [GRUB_REISERFS_KEYV2_BITFIELD]:
8492         Likewise.
8493         (grub_reiserfs_open) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
8494         (grub_reiserfs_read) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
8495         (grub_reiserfs_dir) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
8497 2008-01-10  Robert Millan  <rmh@aybabtu.com>
8499         * util/update-grub_lib.in (grub_file_is_not_garbage): New function.
8500         Determines if a file is garbage left by packaging systems, etc.
8501         * util/update-grub.in: Use grub_file_is_not_garbage() as a condition
8502         for processing /etc/grub.d scripts.
8503         * util/grub.d/10_hurd.in: Fix `GRUB_DISTRIBUTOR' comparison.
8504         * util/grub.d/10_linux.in: Likewise.  Use grub_file_is_not_garbage()
8505         as a condition for processing Linux images.
8507 2008-01-10  Pavel Roskin  <proski@gnu.org>
8509         * include/grub/powerpc/libgcc.h (__ucmpdi2): New export.  Needed
8510         to compile reiserfs.c on PowerPC.
8512 2008-01-10  Robert Millan  <rmh@aybabtu.com>
8514         * kern/device.c (grub_device_iterate): Do not abort device iteration
8515         when one of the devices cannot be opened.
8516         * kern/disk.c (grub_disk_open): Do not account previous failures of
8517         unrelated functions when grub_errno is checked for.
8519 2008-01-08  Robert Millan  <rmh@aybabtu.com>
8521         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): For
8522         `! grub_linux_is_bzimage', change order of address comparison to make
8523         it more intuitive, and improve "too big zImage" error message.
8525 2008-01-08  Robert Millan  <rmh@aybabtu.com>
8527         * Makefile.in (uninstall): Handle `$(update-grub_SCRIPTS)' and
8528         `$(update-grub_DATA)'.
8529         (distcheck): Fix race condition when invoking `$(MAKE)' on multiple
8530         targets.
8532 2008-01-07  Robert Millan  <rmh@aybabtu.com>
8534         * boot/i386/pc/boot.S (boot_drive_check): Add a comment indicating
8535         which instruction is modified by grub-setup during installation
8536         (since it wasn't obvious by only looking at this file).
8538 2008-01-07  Robert Millan  <rmh@aybabtu.com>
8540         * TODO: Rewrite.  Just refer to the wiki and the BTS instead of
8541         listing actual TODO items.
8543 2008-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
8545         * fs/reiserfs.c (grub_reiserfs_get_key_v2_type): Handle endianness
8546         correctly.
8547         (grub_reiserfs_get_key_offset): Likewise.
8548         (grub_reiserfs_set_key_offset): Likewise.
8549         (grub_reiserfs_set_key_type): Likewise.
8550         (grub_reiserfs_iterate_dir): Return 1 if found, otherwise 0.
8552         (GRUB_REISERFS_KEYV2_BITFIELD): Undefined. Probably it would be
8553         better to remove the bitfield version completely.
8555 2008-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
8557         * fs/reiserfs.c (grub_reiserfs_iterate_dir): ENTRY_ITEM must be
8558         allocated from the heap, due to the fshelp implementation.
8559         (grub_reiserfs_dir): Free NODE, due to the same reason.
8561 2008-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
8563         Mostly from Vincent Pelletier:
8565         * fs/reiserfs.c: New file.
8567         * conf/common.rmk (pkglib_MODULES): Added reiserfs.mod.
8568         (reiserfs_mod_SOURCES): New variable.
8569         (reiserfs_mod_CFLAGS): Likewise.
8570         (reiserfs_mod_LDFLAGS): Likewise.
8572         * DISTLIST: Added boot/i386/pc/lnxboot.S, commands/hexdump.c,
8573         disk/ata.c, fs/cpio.c, fs/ntfscomp.c, fs/reiserfs.c,
8574         include/grub/ntfs.h, include/grub/i386/pc/machine.h, and
8575         normal/color.c.
8577 2008-01-06  Robert Millan  <rmh@aybabtu.com>
8579         * normal/color.c: Remove `<grub/env.h>'.
8581 2008-01-05  Jeroen Dekkers  <jeroen@dekkers.cx>
8583         * include/grub/normal.h: Include <grub/env.h>.
8585 2008-01-05  Robert Millan  <rmh@aybabtu.com>
8587         * util/i386/pc/grub-setup.c (usage): Replace obsolete `(hd0,0)' in
8588         usage example with `(hd0,1)'.
8589         Reported by Samuel Thibault.
8591 2008-01-05  Robert Millan  <rmh@aybabtu.com>
8593         * kern/i386/loader.S (grub_linux_is_bzimage): New variable.
8594         (grub_linux_boot_zimage): Rename to ...
8595         (grub_linux_boot): ... this.
8596         (grub_linux_boot_bzimage): Merge with `grub_linux_boot_zimage'.
8597         (grub_linux_boot_zimage): Conditionalize zImage copy.
8599         * include/grub/i386/loader.h (grub_linux_is_bzimage): Add prototype.
8600         (grub_linux_boot_bzimage): Remove prototype.
8601         (grub_linux_boot_zimage): Rename to ...
8602         (grub_linux_boot): ... this.
8604         * loader/i386/pc/linux.c (big_linux): Replace with `grub_linux_is_bzimage'.
8605         (grub_linux_boot): Remove function.
8607 2008-01-05  Robert Millan  <rmh@aybabtu.com>
8609         * include/grub/normal.h (grub_env_write_color_normal): New prototype.
8610         (grub_env_write_color_highlight): Likewise.
8611         (grub_wait_after_message): Likewise.
8613         * normal/color.c: New file.
8615         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/color.c'.
8616         (normal_mod_DEPENDENCIES): Likewise.
8618         * conf/i386-efi.rmk (grub_emu_SOURCES): Add `normal/color.c'.
8619         (normal_mod_DEPENDENCIES): Likewise.
8621         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add `normal/color.c'.
8622         (normal_mod_DEPENDENCIES): Likewise.
8624         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `normal/color.c'.
8625         (normal_mod_DEPENDENCIES): Likewise.
8627         * normal/menu_entry.c (run): Rely on grub_wait_after_message()
8628         for waiting after a message is printed.
8629         * normal/main.c (read_config_file): Likewise.
8630         (grub_normal_init): Register grub_env_write_color_normal() and
8631         grub_env_write_color_highlight() hooks.  Mark `color_normal' and
8632         `color_highlight' variables as global.
8634         * normal/menu.c (grub_wait_after_message): New function.
8635         (grub_color_menu_normal): New variable.  Replaces ...
8636         (GRUB_COLOR_MENU_NORMAL): ... this macro.
8637         (grub_color_menu_highlight): New variable.  Replaces ...
8638         (GRUB_COLOR_MENU_HIGHLIGHT): ... this macro.
8639         (draw_border): Set color state to `GRUB_TERM_COLOR_NORMAL' instead of
8640         `GRUB_TERM_COLOR_STANDARD'.
8641         (print_message): Use `grub_setcolorstate' to reload colors.  Rename
8642         `normal_code' and `highlight_code' to `old_color_normal' and
8643         `old_color_highlight', respectively.
8644         (grub_menu_init_page): Update colors when drawing the menu, based on
8645         `menu_color_normal' and `menu_color_highlight' variables.
8646         (grub_menu_run): Rely on grub_wait_after_message() for waiting after
8647         a message is printed.
8649 2008-01-05  Robert Millan  <rmh@aybabtu.com>
8651         * kern/env.c (grub_env_context_open): Propagate hooks for global
8652         variables to new context.
8654         * kern/main.c (grub_set_root_dev): Export `root' variable.
8656 2008-01-05  Robert Millan  <rmh@aybabtu.com>
8658         * util/biosdisk.c (get_os_disk): Check for devfs-style IDE and SCSI
8659         discs unconditionally, since udev and others have options to provide
8660         them.
8662 2008-01-05  Robert Millan  <rmh@aybabtu.com>
8664         * normal/completion.c (iterate_dir): Skip `.' and `..' directories.
8666 2008-01-04  Christian Franke  <franke@computer.org>
8668         * kern/i386/pc/init.c (grub_machine_init): Fix evaluation
8669         of eisa_mmap.
8671 2008-01-03  Pavel Roskin  <proski@gnu.org>
8673         * kern/i386/linuxbios/init.c: Put "void" to all function
8674         declarations with no arguments.
8675         * kern/powerpc/ieee1275/init.c: Likewise.
8676         * term/i386/pc/at_keyboard.c: Likewise.
8677         * term/i386/pc/vga_text.c: Likewise.
8678         * util/grub-mkdevicemap.c: Likewise.
8680 2008-01-02  Robert Millan  <rmh@aybabtu.com>
8682         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Improve error
8683         message when loaded image is out of bounds.
8684         (grub_multiboot_load_elf64): Likewise.
8686 2008-01-02  Pavel Roskin  <proski@gnu.org>
8688         * util/grub.d/10_linux.in: Try version without ".old" when
8689         looking for initrd.  It's better to use initrd from the newer
8690         kernel of the same version than no initrd at all.
8692 2008-01-01  Robert Millan  <rmh@aybabtu.com>
8694         * util/biosdisk.c (get_os_disk): Fix check for IDE or SCSI discs.
8696 2008-01-01  Vesa Jaaskelainen  <chaac@nic.fi>
8698         * include/grub/video.h: Added grub_video_unmap_color and
8699         grub_video_get_active_render_target.
8700         (grub_video_adapter): Added unmap_color and get_active_render_target.
8702         * video/video.c: Added grub_video_unmap_color and
8703         grub_video_get_active_render_target.
8704         (grub_video_get_info): Changed method to accept NULL pointer as an
8705         argument to allow detection of active video adapter.
8707         * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as
8708         grub_video_vbe_unmap_color_int.
8709         Added grub_video_vbe_unmap_color and
8710         grub_video_vbe_get_active_render_target.
8711         (grub_video_vbe_adapter): Added unmap_color and
8712         get_active_render_target.
8714         * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage
8715         with grub_video_vbe_unmap_color_int.
8717         * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added.
8718         (DEFAULT_NORMAL_COLOR): Likewise.
8719         (DEFAULT_HIGHLIGHT_COLOR) Likewise.
8720         (DEFAULT_FG_COLOR): Removed.
8721         (DEFAULT_BG_COLOR): Likewise.
8722         (DEFAULT_CURSOR_COLOR): Changed value.
8723         (grub_virtual_screen): Added standard_color_setting,
8724         normal_color_setting, highlight_color_setting and term_color.
8725         (grub_virtual_screen): Removed fg_color_setting and bg_color_setting.
8726         (bitmap_width): Added.
8727         (bitmap_height): Likewise.
8728         (bitmap): Likewise.
8729         (set_term_color): Likewise.
8730         (grub_virtual_screen_setup): Changed to use new terminal coloring
8731         settings.
8732         (grub_gfxterm_init): Added init for bitmap.
8733         (grub_gfxterm_fini): Added destroy for bitmap.
8734         (redraw_screen_rect): Updated to use background bitmap and new
8735         terminal coloring.
8736         (scroll_up): Added optimization for case when there is no bitmap.
8737         (grub_gfxterm_cls): Fixed to use correct background color.
8738         (grub_virtual_screen_setcolorstate): Changed to use new terminal
8739         coloring.
8740         (grub_virtual_screen_setcolor): Likewise.
8741         (grub_virtual_screen_getcolor): Added.
8742         (grub_gfxterm_background_image_cmd): Likewise.
8743         (grub_video_term): Added setcolor and getcolor.
8744         (MOD_INIT): Added registration of background_image command.
8745         (MOD_TERM): Added unregistration for background_image command.
8747 2007-12-30  Pavel Roskin  <proski@gnu.org>
8749         * loader/multiboot_loader.c: Fix multiboot command
8750         unregistration.  Fix all typos in the word "multiboot".
8752 2007-12-29  Pavel Roskin  <proski@gnu.org>
8754         * util/grub.d/10_linux.in: Refactor search for initrd.  Add
8755         support for initrd names used in Fedora.
8757 2007-12-26  Bean  <bean123ch@gmail.com>
8759         * conf/common.rmk (pkgdata_MODULES): Add cpio.mod.
8760         (cpio_mod_SOURCES): New variable.
8761         (cpio_mod_CFLAGS): Likewise.
8762         (cpio_mod_LDFLAGS): Likewise.
8764         * fs/cpio.c: New file.
8766         * conf/i386-pc.rmk (grub_emu_SOURCES): Add cpio.c.
8768         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
8770         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
8772         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8774 2007-12-25  Robert Millan  <rmh@aybabtu.com>
8776         * include/grub/term.h (struct grub_term): Add `getcolor' function.
8777         (grub_getcolor): New function.
8779         * kern/term.c (grub_getcolor): New function.
8780         * normal/menu.c (GRUB_COLOR_MENU_NORMAL): New macro.
8781         (GRUB_COLOR_MENU_HIGHLIGHT): New macro.
8782         (print_entry): Set normal and highlight colors to
8783         `GRUB_COLOR_MENU_NORMAL' and `GRUB_COLOR_MENU_HIGHLIGHT',
8784         respectively, before printing and restore them to old
8785         values afterwards.
8786         (grub_menu_init_page): Likewise.  Fill an additional colored space
8787         that would otherwise be left blank.
8789         * term/efi/console.c (grub_console_getcolor): New function.
8790         (struct grub_console_term.getcolor): New variable.
8791         * term/i386/pc/console.c (grub_console_getcolor): New function.
8792         (struct grub_console_term.getcolor): New variable.
8793         * term/ieee1275/ofconsole.c (grub_ofconsole_getcolor): New function.
8794         (struct grub_console_term.getcolor): New variable.
8796         * term/i386/pc/serial.c (grub_serial_setcolor): Remove function.
8797         (struct grub_console_term.setcolor): Remove variable.
8798         * term/i386/pc/vesafb.c (grub_virtual_screen_setcolor): Remove function.
8799         (struct grub_console_term.setcolor): Remove variable.
8800         * term/i386/pc/vga.c (grub_vga_setcolor): Remove function.
8801         (struct grub_console_term.setcolor): Remove variable.
8802         * term/gfxterm.c (grub_virtual_screen_setcolor): Remove function.
8803         (struct grub_console_term.setcolor): Remove variable.
8805 2007-12-25  Robert Millan  <rmh@aybabtu.com>
8807         * configure.ac: Search for possible unifont.hex locations, and
8808         define UNIFONT_HEX if found.
8810         * Makefile.in (UNIFONT_HEX): Define variable.
8811         (DATA): Rename to ...
8812         (PKGLIB): ... this.  Update all users.
8813         (PKGDATA): New variable.
8814         (pkgdata_IMAGES): Rename to ...
8815         (pkglib_IMAGES): ... this. Update all users.
8816         (pkgdata_MODULES): Rename to ...
8817         (pkglib_MODULES): ... this. Update all users.
8818         (pkgdata_PROGRAMS): Rename to ...
8819         (pkglib_PROGRAMS): ... this. Update all users.
8820         (pkgdata_DATA): Rename to ...
8821         (pkglib_DATA): ... this. Update all users.
8822         (CLEANFILES): Redefine to `$(pkglib_DATA) $(pkgdata_DATA)'.
8823         (unicode.pff, ascii.pff): New rules.
8824         (all-local): Add `$(PKGDATA)' dependency.
8825         (install-local): Process `$(PKGDATA)'.
8827         * util/update-grub_lib.in (font_path): Search for *.pff files in
8828         a few more locations, including `${pkgdata}'.
8830 2007-12-23  Robert Millan  <rmh@aybabtu.com>
8832         Patch from Bean  <bean123ch@gmail.com>:
8833         * disk/loopback.c (grub_loopback_read): Add missing bit shift to
8834         `size'.
8836 2007-12-21  Bean  <bean123ch@gmail.com>
8838         * conf/common.rmk (pkgdata_MODULES): Add ntfscomp.mod.
8839         (ntfscomp_mod_SOURCES): New variable.
8840         (ntfscomp_mod_CFLAGS): Likewise.
8841         (ntfscomp_mod_LDFLAGS): Likewise.
8843         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfscomp.c.
8844         (grub_probe_SOURCES): Likewise.
8845         (grub_emu_SOURCES): Likewise.
8847         * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
8848         (grub_emu_SOURCES): Likewise.
8850         * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
8851         (grub_emu_SOURCES): Likewise.
8853         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
8854         (grub_emu_SOURCES): Likewise.
8856         * fs/ntfs.c (grub_ntfscomp_func): New variable.
8857         (read_run_list): Renamed to grub_ntfs_read_run_list.
8858         (decomp_nextvcn): Moved to ntfscomp.c.
8859         (decomp_getch): Likewise.
8860         (decomp_get16): Likewise.
8861         (decomp_block): Likewise.
8862         (read_block): Likewise.
8863         (read_data): Partially moved to ntfscomp.c.
8864         (fixup): Change unsigned to grub_uint16_t.
8865         (read_mft): Change unsigned long to grub_uint32_t.
8866         (read_attr): Likewise.
8867         (read_data): Likewise.
8868         (read_run_data): Likewise.
8869         (read_run_list): Likewise.
8870         (read_mft): Likewise.
8872         * fs/ntfscomp.c: New file.
8874         * include/grub/ntfs.h: New file.
8876 2007-12-16  Robert Millan  <rmh@aybabtu.com>
8878         * util/grub-mkdevicemap.c (make_device_map): Iterate up to 20 for
8879         IDE disk check, since Linux is known to support 20 IDE disks.
8880         Reported by Colin Watson.
8882 2007-12-15  Bean  <bean123ch@gmail.com>
8884         * conf/i386-pc.rmk (pkgdata_IMAGES): Add lnxboot.img.
8885         (lnxboot_img_SOURCES): New variable.
8886         (lnxboot_img_ASFLAGS): Likewise.
8887         (lnxboot_img_LDFLAGS): Likewise.
8889         * boot/i386/pc/lnxboot.S: New file.
8891 2007-11-24  Pavel Roskin  <proski@gnu.org>
8893         * configure.ac: Test if '--build-id=none' is supported by the
8894         linker.  If yes, add it to TARGET_LDFLAGS.  Build ID causes
8895         objcopy to generate incorrect binary files (binutils
8896         2.17.50.0.18-1 as shipped by Fedora 8).
8897         * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Use LDFLAGS when
8898         linking, so that build ID doesn't break the test.
8900 2007-11-24  Pavel Roskin  <proski@gnu.org>
8902         * include/grub/i386/time.h: use "void" in the argument list
8903         of grub_cpu_idle().
8904         * include/grub/powerpc/time.h: Likewise.
8905         * include/grub/sparc64/time.h: Likewise.
8907 2007-11-18  Christian Franke  <franke@computer.org>
8909         * util/console.c (grub_ncurses_getkey): Change curses KEY_* mapping,
8910         now return control chars instead of GRUB_CONSOLE_KEY_* constants.
8911         This fixes the problem that function keys did not work in grub-emu.
8913 2007-11-18  Christian Franke  <franke@computer.org>
8915         * disk/host.c (grub_host_open): Remove attribute unused from
8916         name parameter. Add check for "host". This fixes the problem
8917         that grub-emu does not find partitions.
8919 2007-11-18  Christian Franke  <franke@computer.org>
8921         * util/hostfs.c (is_dir): New function.
8922         (grub_hostfs_dir):  Handle missing dirent.d_type case.
8923         (grub_hostfs_read): Add missing fseek().
8924         (grub_hostfs_label): Clear label pointer.  This fixes a crash
8925         of grub-emu on "ls (host)".
8927 2007-11-18  Christian Franke  <franke@computer.org>
8929         * include/grub/i386/pc/init.h (struct grub_machine_mmap_entry):
8930         Add attribute packed, gcc 3.4.4 on Cygwin aligns this
8931         to 64 bit boundary by default.
8933 2007-11-18  Bean  <bean123ch@gmail.com>
8935         * conf/common.rmk (pkgdata_MODULES): Add hexdump.mod.
8936         (hexdump_mod_SOURCES): New variable.
8937         (hexdump_mod_CFLAGS): Likewise.
8938         (hexdump_mod_LDFLAGS): Likewise.
8940         * conf/i386-pc.rmk (grub_emu_SOURCES): Add command/hexdump.c.
8942         * conf/i386-efi.rmk (grub_emu_SOURCES): Add command/hexdump.c.
8944         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add command/hexdump.c.
8946         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add command/hexdump.c.
8948         * include/grub/hexdump.h: New file.
8950         * commands/hexdump.c: New file.
8952 2007-11-10  Robert Millan  <rmh@aybabtu.com>
8954         * commands/i386/pc/play.c (beep_off): Switch order of arguments
8955         in grub_outb() calls.
8956         (beep_on): Likewise.
8958 2007-11-10  Christian Franke  <franke@computer.org>
8960         * normal/menu.c (run_menu): Check for empty menu to avoid crash.
8961         (grub_menu_run): Likewise.
8963 2007-11-10  Robert Millan  <rmh@aybabtu.com>
8965         * include/grub/i386/efi/machine.h: New file.
8966         * include/grub/i386/linuxbios/machine.h: Likewise.
8967         * include/grub/i386/pc/machine.h: Likewise.
8968         * include/grub/powerpc/ieee1275/machine.h: Likewise.
8969         * include/grub/sparc64/ieee1275/machine.h: Likewise.
8971         * term/i386/pc/serial.c: Include <grub/machine/machine.h>.
8972         (serial_hw_io_addr): New variable.
8973         (serial_hw_get_port): Obtain port address from `serial_hw_io_addr'
8974         instead of `(unsigned short *) 0x400'.
8976 2007-11-10  Bean  <bean123ch@gmail.com>
8978         * fs/ntfs.c (read_block): Fix a bug caused by adjacent blocks.
8980 2007-11-10  Vesa Jaaskelainen  <chaac@nic.fi>
8982         * conf/i386-pc.rmk (pkgdata_MODULES): Added vga.mod.
8983         (vga_mod_SOURCES): Added.
8984         (vga_mod_CFLAGS): Likewise.
8985         (vga_mod_LDFLAGS): Likewise.
8987         * term/i386/pc/vga.c (get_map_mask): Switch order of arguments in
8988         grub_outb() calls.
8989         (set_map_mask): Likewise.
8990         (set_read_map): Likewise.
8991         (set_read_address): Likewise.
8992         (vga_font): Removed variable.
8993         (get_vga_glyph): Removed function.
8994         (invalidate_char): Likewise.
8995         (write_char): Changed to use grub_font_get_glyph() for font
8996         information.
8997         (grub_vga_putchar): Likewise.
8998         (grub_vga_getcharwidth): Likewise.
9000 2007-11-10  Vesa Jaaskelainen  <chaac@nic.fi>
9002         * conf/i386-pc.rmk (boot_img_LDFLAGS): Use COMMON_LDFLAGS for target
9003         flags.
9004         (pxeboot_img_LDFLAGS): Likewise.
9005         (diskboot_img_LDFLAGS): Likewise.
9006         (kernel_img_LDFLAGS): Likewise.
9008 2007-11-06  Robert Millan  <rmh@aybabtu.com>
9010         * term/i386/pc/serial.c (serial_hw_put): Switch order of arguments
9011         in grub_outb() calls.
9012         (serial_hw_init): Likewise.
9014 2007-11-05  Robert Millan  <rmh@aybabtu.com>
9016         * util/update-grub.in: Allow files in ${update_grub_dir} to contain
9017         spaces.  Skip non-regular files.
9019 2007-11-05  Robert Millan  <rmh@aybabtu.com>
9021         * kern/disk.c (grub_disk_firmware_fini)
9022         (grub_disk_firmware_is_tainted): New variables.
9024         * include/grub/disk.h (grub_disk_firmware_fini)
9025         (grub_disk_firmware_is_tainted): Likewise.
9027         * disk/i386/pc/biosdisk.c (GRUB_MOD_FINI(biosdisk)): Moved from here ...
9028         (grub_disk_biosdisk_fini): ... to here.
9029         (GRUB_MOD_FINI(biosdisk)): Implement using grub_disk_biosdisk_fini().
9030         (GRUB_MOD_INIT(biosdisk)): Abort when `grub_disk_firmware_is_tainted'
9031         is set.  Register grub_disk_biosdisk_fini() in
9032         `grub_disk_firmware_fini'.
9034         * disk/ata.c: Remove `<grub/machine/biosdisk.h>'.
9035         (GRUB_MOD_INIT(ata)): Remove grub_biosdisk_fini() call.
9036         Use `grub_disk_firmware_is_tainted' and `grub_disk_firmware_fini'
9037         to finish existing firmware disk interface.
9039         * conf/i386-linuxbios.rmk (pkgdata_MODULES): Add `ata.mod'.
9040         (ata_mod_SOURCES): New variable.
9041         (ata_mod_CFLAGS): Likewise.
9042         (ata_mod_LDFLAGS): Likewise.
9044 2007-11-05  Robert Millan  <rmh@aybabtu.com>
9046         * disk/ata.c: Remove `<grub/machine/time.h>'.  Include `<grub/time.h>'.
9047         (grub_ata_wait): Reimplement using grub_millisleep().
9049         * include/grub/misc.h (grub_div_roundup): Fix parenthesization.
9050         * include/grub/i386/time.h (grub_cpu_idle): Disable `hlt' instruction.
9052 2007-11-03  Marco Gerards  <marco@gnu.org>
9054         * term/i386/pc/vga_text.c: Include <grub/cpu/io.h>.
9055         (CRTC_ADDR_PORT): New macro.
9056         (CRTC_DATA_PORT): Likewise.
9057         (CRTC_CURSOR): Likewise.
9058         (CRTC_CURSOR_ADDR_HIGH): Likewise.
9059         (CRTC_CURSOR_ADDR_LOW): Likewise.
9060         (update_cursor): New function.
9061         (grub_console_real_putchar): Call `update_cursor'.
9062         (grub_console_gotoxy): Likewise.
9063         (grub_console_cls): Set the default color when clearing the
9064         screen.
9065         (grub_console_setcursor): Implemented.
9067 2007-11-03  Marco Gerards  <marco@gnu.org>
9069         * disk/ata.c (grub_ata_pio_read): Don't wait for the command to
9070         become activate.
9071         (grub_ata_pio_write): Likewise.
9073         (grub_atapi_identify): Wait after issuing an ATA command.
9074         (grub_atapi_packet): Likewise.
9075         (grub_ata_identify): Likewise.
9076         (grub_ata_readwrite): Likewise.
9078 2007-11-03  Marco Gerards  <marco@gnu.org>
9080         * disk/ata.c (grub_ata_pio_read): Detect and return the error code.
9081         (grub_ata_pio_write): Likewise.
9082         (grub_ata_readwrite): Use `grub_error', instead of
9083         returning `grub_errno'.
9085 2007-11-03  Marco Gerards  <marco@gnu.org>
9087         * disk/ata.c (grub_ata_readwrite): Call grub_ata_pio_read and
9088         grub_ata_pio_write once for every single sector, instead of for
9089         multiple sectors.
9091 2007-10-31  Robert Millan  <rmh@aybabtu.com>
9093         * configure.ac: Add `i386-linuxbios' to the list of supported targets.
9095         * conf/i386-linuxbios.rmk: New file.
9097         * kern/i386/pc/hardware.c: Likewise.
9098         * term/i386/pc/at_keyboard.c: Likewise.
9099         * term/i386/pc/vga_text.c: Likewise.
9101         * include/grub/i386/linuxbios/boot.h: Likewise.
9102         * include/grub/i386/linuxbios/console.h: Likewise.
9103         * include/grub/i386/linuxbios/init.h: Likewise.
9104         * include/grub/i386/linuxbios/kernel.h: Likewise.
9105         * include/grub/i386/linuxbios/loader.h: Likewise.
9106         * include/grub/i386/linuxbios/memory.h: Likewise.
9107         * include/grub/i386/linuxbios/serial.h: Likewise.
9108         * include/grub/i386/linuxbios/time.h: Likewise.
9110         * kern/i386/linuxbios/init.c: Likewise.
9111         * kern/i386/linuxbios/startup.S: Likewise.
9112         * kern/i386/linuxbios/table.c: Likewise.
9114 2007-10-31  Marco Gerards  <marco@gnu.org>
9116         * conf/i386-pc.rmk (pkgdata_MODULES): Add `ata.mod'.
9117         (ata_mod_SOURCES): New variable.
9118         (ata_mod_CFLAGS): Likewise.
9119         (ata_mod_LDFLAGS): Likewise.
9121         * disk/ata.c: New file.
9123         * include/grub/disk.h (grub_disk_dev_id): Add
9124         `GRUB_DISK_DEV_ATA_ID'.
9126 2007-10-31  Robert Millan  <rmh@aybabtu.com>
9128         * include/grub/i386/pc/init.h (grub_lower_mem): Moved from here ...
9129         * include/grub/i386/pc/memory.h (grub_lower_mem): ... to here.
9131         * include/grub/i386/pc/init.h (grub_upper_mem): Moved from here ...
9132         * include/grub/i386/pc/memory.h (grub_upper_mem): ... to here.
9134         * include/grub/i386/pc/memory.h: Include `<grub/symbol.h>' and
9135         `<grub/types.h>'.
9137         * loader/i386/pc/multiboot.c: Include `<grub/machine/memory.h>'.
9139 2007-10-27  Robert Millan  <rmh@aybabtu.com>
9141         * include/grub/types.h (ULONG_MAX): Define macro.
9143 2007-10-22  Robert Millan  <rmh@aybabtu.com>
9145         * kern/i386/pc/startup.S: Remove `"kern/i386/realmode.S"'.  Include
9146         `"../realmode.S"'.
9147         Remove `"kern/i386/loader.S"'.  Include `"../loader.S"'.
9149 2007-10-22  Robert Millan  <rmh@aybabtu.com>
9151         * conf/i386-pc.rmk (kernel_img_SOURCES): Remove `disk/i386/pc/biosdisk.c'.
9152         (pkgdata_MODULES): Add `biosdisk.mod'.
9153         (biosdisk_mod_SOURCES, biosdisk_mod_CFLAGS, biosdisk_mod_LDFLAGS): New
9154         variables.
9156         * disk/i386/pc/biosdisk.c: Include `<grub/dl.h>'.
9157         (grub_biosdisk_init): Replace with ...
9158         (GRUB_MOD_INIT(biosdisk)): ... this.
9159         (grub_biosdisk_fini): Replace with ...
9160         (GRUB_MOD_FINI(biosdisk)): ... this.
9162         * kern/i386/pc/init.c: Remove `<grub/machine/biosdisk.h>'.
9163         (grub_machine_init): Remove call to grub_biosdisk_init().
9164         (grub_machine_fini): Remove call to grub_machine_fini().
9166         * util/i386/pc/grub-install.in (modules): Add `biosdisk'.
9168 2007-10-22  Robert Millan  <rmh@aybabtu.com>
9170         * include/grub/time.h: New file.
9171         * include/grub/i386/time.h: Likewise.
9172         * include/grub/powerpc/time.h: Likewise.
9173         * include/grub/sparc64/time.h: Likewise.
9175         * include/grub/i386/pc/time.h (KERNEL_TIME_HEADER): Rename all
9176         instances to ...
9177         (KERNEL_MACHINE_TIME_HEADER): ... this.
9178         * include/grub/powerpc/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
9179         instances to ...
9180         (KERNEL_MACHINE_TIME_HEADER): ... this.
9181         * include/grub/sparc64/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
9182         instances to ...
9183         (KERNEL_MACHINE_TIME_HEADER): ... this.
9185         * kern/i386/efi/init.c: Include `<grub/time.h>'.
9186         (grub_millisleep): New function.
9187         * kern/i386/pc/init.c: Include `<grub/time.h>'.
9188         (grub_millisleep): New function.
9189         * kern/powerpc/ieee1275/init.c: Include `<grub/time.h>'.
9190         Remove `grub/machine/time.h' include.
9191         (grub_millisleep): New function.
9192         * kern/sparc64/ieee1275/init.c: Include `<grub/time.h>'.
9193         Remove `grub/machine/time.h' include.
9194         (grub_millisleep): New function.
9196         * include/grub/misc.h (grub_div_roundup): New function.
9198         * kern/misc.c: Include `<grub/time.h>'.
9199         (grub_millisleep_generic): New function.
9201         * conf/i386-efi.rmk (kernel_mod_HEADERS): Remove `i386/efi/time.h'.
9202         Add `time.h'.
9203         * conf/i386-pc.rmk (kernel_img_HEADERS): Remove `machine/time.h'.
9204         Add `time.h'.
9205         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Remove
9206         `machine/time.h'.  Add `time.h'.
9207         * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
9209 2007-10-21  Robert Millan  <rmh@aybabtu.com>
9211         * include/grub/misc.h (grub_max): New function.
9213 2007-10-21  Robert Millan  <rmh@aybabtu.com>
9215         * util/misc.c (grub_util_info): Call fflush() before returning.
9217 2007-10-20  Robert Millan  <rmh@aybabtu.com>
9219         * genmk.rb (Image): Copy `extra_flags' from here ...
9220         (PModule): ... to here.  Use it in `#{obj}: #{src}' rule.
9222         * commands/i386/cpuid.c (grub_cmd_cpuid): Add __attribute__ ((unused))
9223         to `argc' and `args' arguments.
9225 2007-10-17  Robert Millan  <rmh@aybabtu.com>
9227         * kern/i386/loader.S: New file.
9229         * kern/i386/pc/startup.S (grub_linux_prot_size): Moved from here ...
9230         * kern/i386/loader.S (grub_linux_prot_size)... to here.
9231         * kern/i386/pc/startup.S (grub_linux_tmp_addr): Moved from here ...
9232         * kern/i386/loader.S (grub_linux_tmp_addr)... to here.
9233         * kern/i386/pc/startup.S (grub_linux_real_addr): Moved from here ...
9234         * kern/i386/loader.S (grub_linux_real_addr)... to here.
9235         * kern/i386/pc/startup.S (grub_linux_boot_zimage): Moved from here ...
9236         * kern/i386/loader.S (grub_linux_boot_zimage)... to here.
9237         * kern/i386/pc/startup.S (grub_linux_boot_bzimage): Moved from here ...
9238         * kern/i386/loader.S (grub_linux_boot_bzimage)... to here.
9239         * kern/i386/pc/startup.S (grub_multiboot_real_boot): Moved from here ...
9240         * kern/i386/loader.S (grub_multiboot_real_boot)... to here.
9241         * kern/i386/pc/startup.S (grub_multiboot2_real_boot): Moved from here ...
9242         * kern/i386/loader.S (grub_multiboot2_real_boot)... to here.
9244         * kern/i386/realmode.S: New file.
9246         * kern/i386/pc/startup.S (protstack): Moved from here ...
9247         * kern/i386/realmode.S (protstack)... to here.
9248         * kern/i386/pc/startup.S (gdt): Moved from here ...
9249         * kern/i386/realmode.S (gdt)... to here.
9250         * kern/i386/pc/startup.S (prot_to_real): Moved from here ...
9251         * kern/i386/realmode.S (prot_to_real)... to here.
9253         * kern/i386/pc/startup.S: Include `kern/i386/loader.S' and
9254         `kern/i386/realmode.S'.
9256 2007-10-17  Robert Millan  <rmh@aybabtu.com>
9258         * include/grub/i386/loader.h: New file.
9260         * include/grub/i386/pc/loader.h (grub_linux_prot_size)
9261         (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
9262         (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
9263         (grub_multiboot_real_boot, grub_multiboot2_real_boot)
9264         (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): Moved from here ...
9265         * include/grub/i386/loader.h (grub_linux_prot_size)
9266         (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
9267         (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
9268         (grub_multiboot_real_boot, grub_multiboot2_real_boot)
9269         (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): ... to here.
9271         * include/grub/i386/pc/loader.h: Include `grub/cpu/loader.h'.
9273 2007-10-15  Robert Millan  <rmh@aybabtu.com>
9275         * normal/misc.c (grub_normal_print_device_info): Do not probe for
9276         filesystem when dev->disk is unset.
9277         Do probe for filesystem even when dev->disk->has_partitions is set.
9278         In case a filesystem is found, always report it.
9279         In case it isn't, if dev->disk->has_partitions is set, report that
9280         a partition table was found instead of reporting that no filesystem
9281         could be identified.
9283 2007-10-12  Robert Millan  <rmh@aybabtu.com>
9285         * conf/powerpc-ieee1275.rmk (grub_mkimage_SOURCES): Replace reference
9286         to util/powerpc/ieee1275/grub-mkimage.c with util/elf/grub-mkimage.c.
9288         * include/grub/types.h (grub_host_to_target16): New macro.
9289         (grub_host_to_target32): Likewise.
9290         (grub_host_to_target64): Likewise.
9291         (grub_target_to_host16): Likewise.
9292         (grub_target_to_host32): Likewise.
9293         (grub_target_to_host64): Likewise.
9295         * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
9296         Renamed from to ...
9297         (GRUB_MOD_ALIGN): ...this.  Update all users.
9299         * util/elf/grub-mkimage.c (load_note): Replace grub_cpu_to_be32 with
9300         grub_host_to_target32.
9301         Replace grub_be_to_cpu32 with grub_target_to_host32.
9302         (load_modules): Likewise.
9303         (add_segments): Replace grub_be_to_cpu16 with grub_target_to_host16.
9304         Replace grub_be_to_cpu32 with grub_target_to_host32.
9305         Replace grub_cpu_to_be16 with grub_host_to_target16.
9306         Replace grub_cpu_to_be32 grub_host_to_target32.
9308 2007-10-12  Robert Millan  <rmh@aybabtu.com>
9310         * util/powerpc/ieee1275/grub-mkimage.c: Moved to ...
9311         * util/elf/grub-mkimage.c: ... here.
9313         * DISTLIST: Add `util/elf/grub-mkimage.c'.  Remove
9314         `util/powerpc/ieee1275/grub-mkimage.c'.
9316 2007-10-07  Robert Millan  <rmh@aybabtu.com>
9318         * kern/powerpc/ieee1275/init.c: Rename HEAP_LIMIT to HEAP_MAX_ADDR,
9319         and make it easier to figure out.
9320         Add HEAP_MIN_SIZE and HEAP_MAX_ADDR definitions.
9321         (grub_claim_heap): Use HEAP_MAX_ADDR rather than taking a parameter.
9322         Do not avoid claiming a region above HEAP_MAX_ADDR if that would
9323         leave us with less than HEAP_MIN_SIZE total heap.
9324         Avoid our total amount of heap to surpass HEAP_MAX_SIZE.
9326 2007-10-03  Robert Millan  <rmh@aybabtu.com>
9328         * include/grub/i386/io.h: New file.
9329         * commands/i386/pc/play.c (inb): Removed.
9330         (outb): Removed.
9331         Include grub/cpu/io.h.  Replace inb() with grub_inb() and outb()
9332         with grub_outb().
9333         * term/i386/pc/serial.c  (inb): Removed.
9334         (outb): Removed.
9335         Include grub/cpu/io.h.  Replace inb() with grub_inb() and outb()
9336         with grub_outb().
9337         * term/i386/pc/vga.c  (inb): Removed.
9338         (outb): Removed.
9339         Include grub/cpu/io.h.  Replace inb() with grub_inb() and outb()
9340         with grub_outb().
9342 2007-10-02  Robert Millan  <rmh@aybabtu.com>
9344         * conf/i386-efi.rmk (grub_emu_SOURCES): Add util/hostfs.c.
9345         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9346         Reported by Marcin Kurek.
9348 2007-09-07  Robert Millan  <rmh@aybabtu.com>
9350         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_test_flag): Detect
9351         SmartFirmware version updates (as released by Sven Luther), and avoid
9352         setting GRUB_IEEE1275_FLAG_NO_PARTITION_0 or
9353         GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS unless the running version is
9354         known broken.
9356 2007-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
9358         From Hitoshi Ozeki:
9359         * kern/i386/pc/init.c (compact_mem_regions): Decrease NUM_REGIONS
9360         when merging two regions.
9362 2007-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
9364         * kern/rescue.c (grub_enter_rescue_mode): Free ARGS.
9365         * normal/completion.c (grub_normal_do_completion): Likewise.
9366         Reported by Hitoshi Ozeki.
9368 2007-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
9370         Do not use devices at boot in chainloading.
9372         * loader/i386/pc/chainloader.c (boot_drive): New variable.
9373         (boot_part_addr): Likewise.
9374         (grub_chainloader_boot): Simply call grub_chainloader_real_boot
9375         with BOOT_DRIVE and BOOT_PART_ADDR.
9376         (grub_chainloader_cmd): Set BOOT_DRIVE and BOOT_PART_ADDR.
9377         Reported by Hitoshi Ozeki <h-ozeki@ck2.so-net.ne.jp>.
9379 2007-08-29  Robert Millan  <rmh@aybabtu.com>
9381         Patch from Simon Peter <dn.tlp@gmx.net>:
9382         * genmk.rb (Utility): Append $(#{src}_DEPENDENCIES) to #{obj} targets.
9383         * conf/i386-pc.rmk: Replace grub-probe_DEPENDENCIES with
9384         util/grub-probe.c_DEPENDENCIES.  Replace grub-setup_DEPENDENCIES with
9385         util/i386/pc/grub-setup.c_DEPENDENCIES.
9386         * conf/i386-efi.rmk: Replace grub-probe_DEPENDENCIES with
9387         util/grub-probe.c_DEPENDENCIES.
9388         * conf/powerpc-ieee1275.rmk: Likewise.
9390 2007-08-28  Robert Millan  <rmh@aybabtu.com>
9392         * util/i386/get_disk_name.c: New.  Implement grub_util_get_disk_name()
9393         to tell grub-mkdevicemap how to name devices.
9394         * util/ieee1275/get_disk_name.c: Likewise (using "ofpathname -a"
9395         feature).
9397         * conf/i386-efi.rmk (grub_mkdevicemap_SOURCES): Add
9398         util/i386/get_disk_name.c.
9399         * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Likewise.
9400         * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Add
9401         util/ieee1275/get_disk_name.c.
9403         * include/grub/util/misc.h: grub_util_get_disk_name() declaration.
9405         * DISTLIST: Add util/i386/get_disk_name.c and
9406         util/ieee1275/get_disk_name.c.
9408         * util/grub-mkdevicemap.c: Replace device naming logic with
9409         grub_util_get_disk_name() calls.
9411 2007-08-20  Robert Millan  <rmh@aybabtu.com>
9413         * normal/menu.c (run_menu): Refer to seconds as "s" not "seconds"
9414         (so that it works for both plural and singular quantities).
9416 2007-08-05  Robert Millan  <rmh@aybabtu.com>
9418         * util/grub.d/10_linux.in (test_gt): Strip out vmlinu[xz]- prefix
9419         so that [xz] isn't taken into account when determining order.
9421 2007-08-02  Marco Gerards  <marco@gnu.org>
9423         * DISTLIST: Add `disk/host.c', `fs/ntfs.c', `include/multiboot.h',
9424         `include/multiboot2.h', `include/grub/elfload.h',
9425         `include/multiboot.h', `include/grub/multiboot.h',
9426         `include/grub/multiboot_loader.h', `include/grub/multiboot2.h',
9427         `include/grub/i386/pc/biosdisk.h', `include/grub/util/biosdisk.h',
9428         `kern/elf.c', `loader/multiboot_loader.c',
9429         `loader/multiboot_loader_normal.c', `loader/multiboot2.c',
9430         `loader/i386/pc/multiboot2.c',
9431         `loader/powerpc/ieee1275/multiboot2.c', `util/hostfs.c' and
9432         `util/i386/pc/grub-mkrescue.in'.  Remove
9433         `include/grub/biosdisk.h', `include/grub/i386/pc/multiboot.h',
9434         `include/grub/i386/pc/util/biosdisk.h' and
9435         `include/grub/powerpc/ieee1275/multiboot.h'.
9437 2007-08-02  Bean  <bean123ch@gmail.com>
9439         * conf/common.rmk (pkgdata_MODULES): Add ntfs.mod.
9440         (ntfs_mod_SOURCES): New variable.
9441         (ntfs_mod_CFLAGS): Likewise.
9442         (ntfs_mod_LDFLAGS): Likewise.
9444         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfs.c.
9445         (grub_probe_SOURCES): Likewise.
9446         (grub_emu_SOURCES): Likewise.
9448         * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
9449         (grub_emu_SOURCES): Likewise.
9451         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
9452         (grub_emu_SOURCES): Likewise.
9454         * conf/misc.c (grub_utf16_to_utf8): Fix unicode conversion bug.
9456         * fs/ntfs.c: New file.
9458 2007-08-02  Bean  <bean123ch@gmail.com>
9460         * disk.h (grub_disk): Use NESTED_FUNC_ATTR.
9462         * file.h (grub_file): Likewise.
9464         * fshelp.h (grub_fshelp_read_file): Likewise.
9466         * util/i386/pc/grub-setup.c (setup): Likewise.
9467         (save_first_sector): Likewise.
9468         (save_blocklists): Likewise.
9470         * fs/affs.c (grub_affs_read_file): Likewise.
9472         * fs/ext2.c (grub_ext2_read_file): Likewise.
9474         * fs/fat.c (grub_fat_read_data): Likewise.
9476         * fs/fshelp.c (grub_fshelp_read_file): Likewise.
9478         * fs/hfs.c (grub_hfs_read_file): Likewise.
9480         * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
9482         * fs/jfs.c (grub_jfs_read_file): Likewise.
9484         * fs/minix.c (grub_minix_read_file): Likewise.
9486         * fs/sfs.c (grub_sfs_read_file): Likewise.
9488         * fs/ufs.c (grub_ufs_read_file): Likewise.
9490         * fs/xfs.c (grub_xfs_read_file): Likewise.
9492         * command/blocklist.c (read_blocklist): Likewise.
9493         (print_blocklist): Likewise.
9495 2007-08-02  Marco Gerards  <marco@gnu.org>
9497         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/host.c' and
9498         `util/hostfs.c'.
9500         * disk/host.c: New file.
9502         * util/hostfs.c: Likewise.
9504         * fs/hfsplus.c (grub_hfsplus_mount): When reading out of disk,
9505         return `GRUB_ERR_BAD_FS'.
9506         * fs/sfs.c (grub_sfs_mount): Likewise.
9507         * fs/xfs.c (grub_xfs_mount): Likewise.
9509         * include/grub/disk.h (enum grub_disk_dev_id): Add
9510         `GRUB_DISK_DEVICE_HOST_ID'.
9512         * util/grub-emu.c (main): Initialize and de-initialize hostfs.
9514 2007-07-24  Jerone Young  <jerone@gmail.com>
9516         * conf/i386-pc.rmk: Add Multiboot loader and multiboot 2 to multiboot
9517         modules for compilation.
9518         * conf/powerpc-ieee1275.rmk: Likewise.
9520         * include/multiboot.h: Move multiboot definitions to one file. Rename
9521         many definitions to not get grub specific.
9522         * include/multiboot2.h: Create header with multiboot 2 definitions.
9523         * include/grub/multiboot.h: Header for grub specific function
9524         prototypes and definitions.
9525         * include/grub/multiboot2.h: Likewise.
9526         * include/grub/multiboot_loader.h: Likewise.
9527         * include/grub/i386/pc/multiboot.h: Removed.
9528         * include/grub/powerpc/ieee1275/multiboot.h: Removed.
9530         * loader/multiboot_loader.c: Created to act as a proxy for multiboot 1
9531         and 2 to allow for one multiboot and module commands.
9532         * loader/multiboot2.c: Add multiboot2 functionality.
9533         * loader/i386/pc/multiboot.c: Modify for new multiboot header location
9534         and definition names.
9535         * loader/i386/pc/multiboot2.c: Created to add i386 specific multiboot
9536         2 functions.
9537         * loader/powerpc/ieee1275/multiboot2.c: Created to add powerpc
9538         ieee1275 specific multiboot2 code.
9540         * kern/i386/pc/startup.S: Change headers and definition names for
9541         multiboot. Add function grub_multiboot2_real_boot for multiboot 2.
9543 2007-07-22  Robert Millan  <rmh@aybabtu.com>
9545         * geninitheader.sh: Process file specified in first parameter rather
9546         than hardcoding grub_modules_init.lst.
9547         * geninit.sh: Likewise.  Also, construct header name dynamically rather
9548         than hardcoding grub_modules_init.h.
9550         * conf/common.rmk: Rename grub_modules_init.[ch] files associated with
9551         grub-emu to grub_emu_init.[ch].  Add rules to build analogous
9552         grub_probe_init.[ch] and grub_setup_init.[ch].
9554         * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Replace
9555         grub_modules_init.h with grub_emu_init.h.
9556         (grub_probe_DEPENDENCIES, grub_probe_SOURCES): Add new
9557         grub_probe_init.[ch] files.
9558         * conf/i386-efi.rmk: Likewise.
9559         * conf/i386-pc.rmk: Likewise.
9560         (grub_setup_DEPENDENCIES, grub_setup_SOURCES): Add new
9561         grub_setup_init.[ch] files.
9563         * util/grub-emu.c: Replace grub_modules_init.h with grub_emu_init.h.
9564         * util/grub-probe.c: Include grub_probe_init.h.  Use grub_init_all()
9565         to initialize modules rather than a list of hardcoded functions.
9566         * util/i386/pc/grub-setup.c: Include grub_setup_init.h.  Use
9567         grub_init_all() to initialize modules rather than a list of hardcoded
9568         functions.
9570 2007-07-22  Robert Millan  <rmh@aybabtu.com>
9572         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set
9573         GRUB_IEEE1275_FLAG_NO_PARTITION_0 flag when running on SmartFirmware.
9575 2007-07-22  Robert Millan  <rmh@aybabtu.com>
9577         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
9578         GRUB_IEEE1275_FLAG_BROKEN_OUTPUT flag.
9579         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set this
9580         flag when running on SmartFirmware.
9581         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid running
9582         "output-device output" command when GRUB_IEEE1275_FLAG_BROKEN_OUTPUT
9583         was set.
9585         * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
9586         Increase partno when GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS flag is set,
9587         rather than decreasing it.
9589         * util/i386/pc/grub-setup.c (setup): When embedding is required, but
9590         there's not enough space to do it, fail in the same way as when it
9591         can't be done because there are no partitions.
9593         * util/powerpc/ieee1275/grub-install.in: Improve error message shown
9594         when nvsetenv failed.
9596 2007-07-22  Yoshinori K. Okuji  <okuji@enbug.org>
9598         * conf/i386-pc.rmk (CLEANFILES): Removed for grub-mkrescue,
9599         because this rule is automatically generated.
9600         (grub-mkrescue): Removed for the same reason as above.
9602 2007-07-22  Yoshinori K. Okuji  <okuji@enbug.org>
9604         Migrate to GNU General Public License Version 3.
9606         * COPYING: Replaced with the plain text version of GPLv3.
9608         * config.guess: Updated from gnulib.
9609         * config.sub: Likewise.
9611         * geninit.sh: Output a GPLv3 copyright notice.
9612         * geninitheader.sh: Likewise.
9613         * genmodsrc.sh: Likewise.
9614         * gensymlist.sh.in: Likewise.
9616         * boot/i386/pc/boot.S: Upgraded to GPLv3.
9617         * boot/i386/pc/diskboot.S: Likewise.
9618         * boot/i386/pc/pxeboot.S: Likewise.
9619         * commands/blocklist.c: Likewise.
9620         * commands/boot.c: Likewise.
9621         * commands/cat.c: Likewise.
9622         * commands/cmp.c: Likewise.
9623         * commands/configfile.c: Likewise.
9624         * commands/echo.c: Likewise.
9625         * commands/help.c: Likewise.
9626         * commands/ls.c: Likewise.
9627         * commands/search.c: Likewise.
9628         * commands/terminal.c: Likewise.
9629         * commands/test.c: Likewise.
9630         * commands/videotest.c: Likewise.
9631         * commands/i386/cpuid.c: Likewise.
9632         * commands/i386/pc/halt.c: Likewise.
9633         * commands/i386/pc/play.c: Likewise.
9634         * commands/i386/pc/reboot.c: Likewise.
9635         * commands/i386/pc/vbeinfo.c: Likewise.
9636         * commands/i386/pc/vbetest.c: Likewise.
9637         * commands/ieee1275/halt.c: Likewise.
9638         * commands/ieee1275/reboot.c: Likewise.
9639         * commands/ieee1275/suspend.c: Likewise.
9640         * disk/loopback.c: Likewise.
9641         * disk/lvm.c: Likewise.
9642         * disk/raid.c: Likewise.
9643         * disk/efi/efidisk.c: Likewise.
9644         * disk/i386/pc/biosdisk.c: Likewise.
9645         * disk/ieee1275/ofdisk.c: Likewise.
9646         * font/manager.c: Likewise.
9647         * fs/affs.c: Likewise.
9648         * fs/ext2.c: Likewise.
9649         * fs/fat.c: Likewise.
9650         * fs/fshelp.c: Likewise.
9651         * fs/hfs.c: Likewise.
9652         * fs/hfsplus.c: Likewise.
9653         * fs/iso9660.c: Likewise.
9654         * fs/jfs.c: Likewise.
9655         * fs/minix.c: Likewise.
9656         * fs/sfs.c: Likewise.
9657         * fs/ufs.c: Likewise.
9658         * fs/xfs.c: Likewise.
9659         * hello/hello.c: Likewise.
9660         * include/grub/acorn_filecore.h: Likewise.
9661         * include/grub/arg.h: Likewise.
9662         * include/grub/bitmap.h: Likewise.
9663         * include/grub/boot.h: Likewise.
9664         * include/grub/cache.h: Likewise.
9665         * include/grub/device.h: Likewise.
9666         * include/grub/disk.h: Likewise.
9667         * include/grub/dl.h: Likewise.
9668         * include/grub/elfload.h: Likewise.
9669         * include/grub/env.h: Likewise.
9670         * include/grub/err.h: Likewise.
9671         * include/grub/file.h: Likewise.
9672         * include/grub/font.h: Likewise.
9673         * include/grub/fs.h: Likewise.
9674         * include/grub/fshelp.h: Likewise.
9675         * include/grub/gzio.h: Likewise.
9676         * include/grub/hfs.h: Likewise.
9677         * include/grub/kernel.h: Likewise.
9678         * include/grub/loader.h: Likewise.
9679         * include/grub/lvm.h: Likewise.
9680         * include/grub/misc.h: Likewise.
9681         * include/grub/mm.h: Likewise.
9682         * include/grub/net.h: Likewise.
9683         * include/grub/normal.h: Likewise.
9684         * include/grub/parser.h: Likewise.
9685         * include/grub/partition.h: Likewise.
9686         * include/grub/pc_partition.h: Likewise.
9687         * include/grub/raid.h: Likewise.
9688         * include/grub/rescue.h: Likewise.
9689         * include/grub/script.h: Likewise.
9690         * include/grub/setjmp.h: Likewise.
9691         * include/grub/symbol.h: Likewise.
9692         * include/grub/term.h: Likewise.
9693         * include/grub/terminfo.h: Likewise.
9694         * include/grub/tparm.h: Likewise.
9695         * include/grub/types.h: Likewise.
9696         * include/grub/video.h: Likewise.
9697         * include/grub/efi/api.h: Likewise.
9698         * include/grub/efi/chainloader.h: Likewise.
9699         * include/grub/efi/console.h: Likewise.
9700         * include/grub/efi/console_control.h: Likewise.
9701         * include/grub/efi/disk.h: Likewise.
9702         * include/grub/efi/efi.h: Likewise.
9703         * include/grub/efi/pe32.h: Likewise.
9704         * include/grub/efi/time.h: Likewise.
9705         * include/grub/i386/linux.h: Likewise.
9706         * include/grub/i386/setjmp.h: Likewise.
9707         * include/grub/i386/types.h: Likewise.
9708         * include/grub/i386/efi/kernel.h: Likewise.
9709         * include/grub/i386/efi/loader.h: Likewise.
9710         * include/grub/i386/efi/time.h: Likewise.
9711         * include/grub/i386/pc/biosdisk.h: Likewise.
9712         * include/grub/i386/pc/boot.h: Likewise.
9713         * include/grub/i386/pc/chainloader.h: Likewise.
9714         * include/grub/i386/pc/console.h: Likewise.
9715         * include/grub/i386/pc/init.h: Likewise.
9716         * include/grub/i386/pc/kernel.h: Likewise.
9717         * include/grub/i386/pc/loader.h: Likewise.
9718         * include/grub/i386/pc/memory.h: Likewise.
9719         * include/grub/i386/pc/multiboot.h: Likewise.
9720         * include/grub/i386/pc/serial.h: Likewise.
9721         * include/grub/i386/pc/time.h: Likewise.
9722         * include/grub/i386/pc/vbe.h: Likewise.
9723         * include/grub/i386/pc/vbeblit.h: Likewise.
9724         * include/grub/i386/pc/vbefill.h: Likewise.
9725         * include/grub/i386/pc/vbeutil.h: Likewise.
9726         * include/grub/i386/pc/vga.h: Likewise.
9727         * include/grub/ieee1275/ieee1275.h: Likewise.
9728         * include/grub/ieee1275/ofdisk.h: Likewise.
9729         * include/grub/powerpc/libgcc.h: Likewise.
9730         * include/grub/powerpc/setjmp.h: Likewise.
9731         * include/grub/powerpc/types.h: Likewise.
9732         * include/grub/powerpc/ieee1275/biosdisk.h: Likewise.
9733         * include/grub/powerpc/ieee1275/console.h: Likewise.
9734         * include/grub/powerpc/ieee1275/ieee1275.h: Likewise.
9735         * include/grub/powerpc/ieee1275/kernel.h: Likewise.
9736         * include/grub/powerpc/ieee1275/loader.h: Likewise.
9737         * include/grub/powerpc/ieee1275/multiboot.h: Likewise.
9738         * include/grub/powerpc/ieee1275/time.h: Likewise.
9739         * include/grub/powerpc/ieee1275/util/biosdisk.h: Likewise.
9740         * include/grub/sparc64/libgcc.h: Likewise.
9741         * include/grub/sparc64/setjmp.h: Likewise.
9742         * include/grub/sparc64/types.h: Likewise.
9743         * include/grub/sparc64/ieee1275/console.h: Likewise.
9744         * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
9745         * include/grub/sparc64/ieee1275/kernel.h: Likewise.
9746         * include/grub/sparc64/ieee1275/time.h: Likewise.
9747         * include/grub/util/biosdisk.h: Likewise.
9748         * include/grub/util/getroot.h: Likewise.
9749         * include/grub/util/lvm.h: Likewise.
9750         * include/grub/util/misc.h: Likewise.
9751         * include/grub/util/raid.h: Likewise.
9752         * include/grub/util/resolve.h: Likewise.
9753         * io/gzio.c: Likewise.
9754         * kern/device.c: Likewise.
9755         * kern/disk.c: Likewise.
9756         * kern/dl.c: Likewise.
9757         * kern/elf.c: Likewise.
9758         * kern/env.c: Likewise.
9759         * kern/err.c: Likewise.
9760         * kern/file.c: Likewise.
9761         * kern/fs.c: Likewise.
9762         * kern/loader.c: Likewise.
9763         * kern/main.c: Likewise.
9764         * kern/misc.c: Likewise.
9765         * kern/mm.c: Likewise.
9766         * kern/parser.c: Likewise.
9767         * kern/partition.c: Likewise.
9768         * kern/rescue.c: Likewise.
9769         * kern/term.c: Likewise.
9770         * kern/efi/efi.c: Likewise.
9771         * kern/efi/init.c: Likewise.
9772         * kern/efi/mm.c: Likewise.
9773         * kern/i386/dl.c: Likewise.
9774         * kern/i386/efi/init.c: Likewise.
9775         * kern/i386/efi/startup.S: Likewise.
9776         * kern/i386/pc/init.c: Likewise.
9777         * kern/i386/pc/lzo1x.S: Likewise.
9778         * kern/i386/pc/startup.S: Likewise.
9779         * kern/ieee1275/ieee1275.c: Likewise.
9780         * kern/powerpc/cache.S: Likewise.
9781         * kern/powerpc/dl.c: Likewise.
9782         * kern/powerpc/ieee1275/cmain.c: Likewise.
9783         * kern/powerpc/ieee1275/crt0.S: Likewise.
9784         * kern/powerpc/ieee1275/init.c: Likewise.
9785         * kern/powerpc/ieee1275/openfw.c: Likewise.
9786         * kern/sparc64/cache.S: Likewise.
9787         * kern/sparc64/dl.c: Likewise.
9788         * kern/sparc64/ieee1275/init.c: Likewise.
9789         * kern/sparc64/ieee1275/openfw.c: Likewise.
9790         * loader/efi/chainloader.c: Likewise.
9791         * loader/efi/chainloader_normal.c: Likewise.
9792         * loader/i386/efi/linux.c: Likewise.
9793         * loader/i386/efi/linux_normal.c: Likewise.
9794         * loader/i386/pc/chainloader.c: Likewise.
9795         * loader/i386/pc/chainloader_normal.c: Likewise.
9796         * loader/i386/pc/linux.c: Likewise.
9797         * loader/i386/pc/linux_normal.c: Likewise.
9798         * loader/i386/pc/multiboot.c: Likewise.
9799         * loader/i386/pc/multiboot_normal.c: Likewise.
9800         * loader/powerpc/ieee1275/linux.c: Likewise.
9801         * loader/powerpc/ieee1275/linux_normal.c: Likewise.
9802         * normal/arg.c: Likewise.
9803         * normal/cmdline.c: Likewise.
9804         * normal/command.c: Likewise.
9805         * normal/completion.c: Likewise.
9806         * normal/execute.c: Likewise.
9807         * normal/function.c: Likewise.
9808         * normal/lexer.c: Likewise.
9809         * normal/main.c: Likewise.
9810         * normal/menu.c: Likewise.
9811         * normal/menu_entry.c: Likewise.
9812         * normal/misc.c: Likewise.
9813         * normal/parser.y: Likewise.
9814         * normal/script.c: Likewise.
9815         * normal/i386/setjmp.S: Likewise.
9816         * normal/powerpc/setjmp.S: Likewise.
9817         * normal/sparc64/setjmp.S: Likewise.
9818         * partmap/acorn.c: Likewise.
9819         * partmap/amiga.c: Likewise.
9820         * partmap/apple.c: Likewise.
9821         * partmap/gpt.c: Likewise.
9822         * partmap/pc.c: Likewise.
9823         * partmap/sun.c: Likewise.
9824         * term/gfxterm.c: Likewise.
9825         * term/terminfo.c: Likewise.
9826         * term/efi/console.c: Likewise.
9827         * term/i386/pc/console.c: Likewise.
9828         * term/i386/pc/serial.c: Likewise.
9829         * term/i386/pc/vesafb.c: Likewise.
9830         * term/i386/pc/vga.c: Likewise.
9831         * term/ieee1275/ofconsole.c: Likewise.
9832         * util/biosdisk.c: Likewise.
9833         * util/console.c: Likewise.
9834         * util/genmoddep.c: Likewise.
9835         * util/getroot.c: Likewise.
9836         * util/grub-emu.c: Likewise.
9837         * util/grub-mkdevicemap.c: Likewise.
9838         * util/grub-probe.c: Likewise.
9839         * util/lvm.c: Likewise.
9840         * util/misc.c: Likewise.
9841         * util/raid.c: Likewise.
9842         * util/resolve.c: Likewise.
9843         * util/update-grub.in: Likewise.
9844         * util/update-grub_lib.in: Likewise.
9845         * util/grub.d/00_header.in: Likewise.
9846         * util/grub.d/10_hurd.in: Likewise.
9847         * util/grub.d/10_linux.in: Likewise.
9848         * util/i386/efi/grub-install.in: Likewise.
9849         * util/i386/efi/grub-mkimage.c: Likewise.
9850         * util/i386/pc/grub-install.in: Likewise.
9851         * util/i386/pc/grub-mkimage.c: Likewise.
9852         * util/i386/pc/grub-mkrescue.in: Likewise.
9853         * util/i386/pc/grub-setup.c: Likewise.
9854         * util/i386/pc/misc.c: Likewise.
9855         * util/powerpc/ieee1275/grub-install.in: Likewise.
9856         * util/powerpc/ieee1275/grub-mkimage.c: Likewise.
9857         * util/powerpc/ieee1275/misc.c: Likewise.
9858         * video/bitmap.c: Likewise.
9859         * video/video.c: Likewise.
9860         * video/i386/pc/vbe.c: Likewise.
9861         * video/i386/pc/vbeblit.c: Likewise.
9862         * video/i386/pc/vbefill.c: Likewise.
9863         * video/i386/pc/vbeutil.c: Likewise.
9864         * video/readers/tga.c: Likewise.
9866 2007-07-02  Robert Millan  <rmh@aybabtu.com>
9868         * conf/i386-efi.rmk: Replace obsolete reference to
9869         util/i386/pc/biosdisk.c with util/biosdisk.c, and util/i386/pc/getroot.c
9870         with util/getroot.c.
9871         * conf/powerpc-ieee1275.rmk: Likewise.
9872         * conf/sparc64-ieee1275.rmk: Likewise.
9874         * util/grub-emu.c (main): Fix unchecked pointer handling.
9876 2007-07-02  Robert Millan  <rmh@aybabtu.com>
9878         * util/i386/efi/grub-install.in: Allow `grub_probe --target=partmap'
9879         invocation to fail, in order to support partition-less media.
9881         * util/i386/pc/grub-install.in: Likewise.
9883         * util/powerpc/ieee1275/grub-install.in: Use grub-probe to determine
9884         which fs or partmap modules are needed (akin to its sister scripts).
9886         Also use grub-probe to get rid of unportable /proc/mounts check.
9888         Print the same informational message that the other scripts do, before
9889         exiting.
9891 2007-06-23  Robert Millan  <rmh@aybabtu.com>
9893         * util/update-grub_lib.in (font_path): New function.  Determine whether
9894         a font file can be found and, if so, echo the GRUB path to it.
9896         * util/update-grub.in: Handle multiple terminals depending on user
9897         input, platform availability and font file presence.  Propagate
9898         variables of our findings to /etc/grub.d/ children.
9900         * util/grub.d/00_header.in: Handle multiple terminals, based on
9901         environment setup by update-grub.
9903 2007-06-23  Robert Millan  <rmh@aybabtu.com>
9905         * conf/i386-pc.rmk (pkgdata_MODULES): Add serial.mod.
9907 2007-06-21  Robert Millan  <rmh@aybabtu.com>
9909         * include/grub/i386/pc/kernel.h: Define GRUB_KERNEL_MACHINE_DATA_END to
9910         indicate end of data section in kernel image.
9911         * include/grub/i386/efi/kernel.h: Define GRUB_KERNEL_MACHINE_PREFIX and
9912         GRUB_KERNEL_MACHINE_DATA_END.
9914         * kern/i386/pc/startup.S: Do not initialize grub_prefix, only reserve
9915         space for it.
9916         * kern/i386/efi/startup.S: Likewise.
9918         * util/i386/pc/grub-mkimage.c: Initialize grub_prefix to /boot/grub
9919         during image generation.  Implement --prefix option to override this
9920         patch.
9921         * util/i386/efi/grub-mkimage.c: Likewise.
9923         * util/update-grub_lib.in (convert_system_path_to_grub_path): Split
9924         code to make path relative to its root into a separate function.
9926         * util/i386/pc/grub-install.in: Use newly provided
9927         make_system_path_relative_to_its_root() to convert ${grubdir}, then
9928         pass the result to grub-install --prefix.
9930 2007-06-13  Robert Millan  <rmh@aybabtu.com>
9932         * include/grub/util/misc.h: Define DEFAULT_DIRECTORY and
9933         DEFAULT_DEVICE_MAP.
9934         * util/grub-emu.c: Use above definitions from misc.h instead of
9935         defining them.
9936         * util/grub-mkdevicemap.c: Likewise.
9937         * util/i386/pc/grub-setup.c: Likewise.
9938         * util/grub-probe.c: Likewise.
9939         (probe): Abort with grub_util_error() when either
9940         grub_guess_root_device or grub_util_get_grub_dev fails.
9942 2007-06-12  Robert Millan  <rmh@aybabtu.com>
9944         * normal/command.c (grub_command_execute): Use NULL rather than 0 for
9945         "pager" assignment.
9946         * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Likewise for
9947         "pcdata".
9948         * util/grub-probe.c (probe): Likewise for "drive_name".
9950 2007-06-11  Robert Millan  <rmh@aybabtu.com>
9952         * util/i386/pc/grub-mkrescue.in: Pad both floppy images with zeroes,
9953         not just the cdrom one.
9955 2007-06-11  Robert Millan  <rmh@aybabtu.com>
9957         * util/i386/pc/grub-mkrescue.in: Add "set -e".
9958         Add --pkglibdir=DIR option to override pkglibdir.
9959         Mention --image-type=TYPE in help output.
9960         Fix --grub-mkimage (it was a no-op).
9961         Abort gracefully when no parameter is given.
9963 2007-06-11  Robert Millan  <rmh@aybabtu.com>
9965         * util/i386/pc/grub-mkrescue.in: New file.
9966         * conf/i386-pc.rmk: Add its build declarations.  Put it in bin_SCRIPTS.
9967         * Makefile.in: Handle bin_SCRIPTS.
9969 2007-06-10  Vesa Jaaskelainen  <chaac@nic.fi>
9971         * term/gfxterm.c (grub_gfxterm_init): Added support for specifying
9972         list of video modes.
9974 2007-06-06  Robert Millan  <rmh@aybabtu.com>
9976         * util/update-grub_lib.in (convert_system_path_to_grub_path): Abort if
9977         file doesn't exist, or if it is in a filesystem grub can't read.
9979         * util/update-grub.in: Set fallback for GRUB_FS check to "unknown".  Do
9980         not abort if GRUB_DRIVE could not be defined.  Rearrange generated
9981         header comment to fit in 80 columns when the variables are resolved.
9983         * util/grub.d/00_header.in: Only set root variable when GRUB_DRIVE
9984         could be identified by update-grub.  Remove redundant check for
9985         unifont.pff existence (since convert_system_path_to_grub_path now
9986         handles that).
9988 2007-06-04  Robert Millan  <rmh@aybabtu.com>
9990         * conf/i386-efi.rmk (grub_probe_SOURCES): Add partmap/apple.c.
9992         * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.
9994         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add partmap/pc.c.
9996 2007-06-04  Robert Millan  <rmh@aybabtu.com>
9998         * conf/powerpc-ieee1275.rmk: Enable grub-mkdevicemap and grub-probe.
10000         * include/grub/partition.h: Declare grub_apple_partition_map_init and
10001         grub_apple_partition_map_fini.
10003         * util/biosdisk.c
10004         (grub_util_biosdisk_open): Replace BLKGETSIZE with BLKGETSIZE64 (needed
10005         to access >2 TiB disks).
10007         Print disk->total_sectors with %llu instead of %lu, since this
10008         variable is always 64-bit (prevents wrong disk size from being displayed
10009         on either >2 TiB disk or big-endian CPU).
10011         (grub_util_biosdisk_get_grub_dev): Convert gpt_partition_map handling
10012         into a generic case that supports all (sane) partition maps.
10014         Stop using grub_cpu_to_le32() on dos_part / bsd_part since it actually
10015         breaks big-endian.
10017         * util/grub-probe.c: Call grub_apple_partition_map_init() before probe()
10018         and grub_apple_partition_map_fini() after that.
10020 2007-06-01  Robert Millan  <rmh@aybabtu.com>
10022         * util/update-grub.in: Export GRUB_CMDLINE_LINUX.
10024         * util/grub.d/00_header.in: Only enable gfxterm when
10025         convert_system_path_to_grub_path() succeeds.
10027 2007-05-20  Robert Millan  <rmh@aybabtu.com>
10029         * util/update-grub_lib.in: New file.
10030         * DISTLIST: Add update-grub_lib.in.
10031         * conf/common.rmk: Generate update-grub_lib and install it in
10032         $(lib_DATA).
10033         * Makefile.in: Add install routine for $(lib_DATA).
10035         * util/grub.d/00_header.in: Use convert_system_path_to_grub_path()
10036         function provided by update-grub_lib to support arbitrary paths of
10037         unifont.pff.
10038         * util/update-grub.in: Use convert_system_path_to_grub_path() to
10039         initialize GRUB_DRIVE_BOOT and GRUB_DRIVE_BOOT_GRUB variables.
10041 2007-05-19  Robert Millan  <rmh@aybabtu.com>
10043         * commands/i386/cpuid.c: New module.
10044         * DISTLIST: Add it.
10045         * conf/i386-efi.rmk: Enable cpuid.mod.
10046         * conf/i386-pc.rmk: Likewise.
10048 2007-05-18  Jeroen Dekkers  <jeroen@dekkers.cx>
10050         * kern/disk.c (grub_disk_read): Check return value of
10051         grub_realloc().
10053 2007-05-18  Jeroen Dekkers  <jeroen@dekkers.cx>
10055         * util/getroot.c (grub_util_get_grub_dev): Support partitionable
10056         arrays.
10057         * disk/raid.c (grub_raid_open): Likewise.
10059 2007-05-17  Jeroen Dekkers  <jeroen@dekkers.cx>
10061         * util/biosdisk.c (linux_find_partition): Allocate real_dev on the
10062         stack instead of on the heap.
10064         * kern/disk.c (grub_disk_read): Make sure tmp_buf is big enough
10065         before doing a read on it.
10067         * configure.ac: Only use -fno-stack-protector for the target
10068         environment.
10070 2007-05-17  Jeroen Dekkers  <jeroen@dekkers.cx>
10072         * video/i386/pc/vbe.c (grub_video_vbe_create_render_target): Add
10073         __attribute_ ((unused)) to mode_type argument.
10075         * util/getroot.c (grub_guess_root_device): Fix #endif.
10077         * kern/misc.c (memcmp): Fix prototype.
10079         * include/grub/partition.h [GRUB_UTIL]
10080         (grub_gpt_partition_map_init): Add prototype.
10081         (grub_gpt_partition_map_fini): Likewise.
10083         * fs/jfs.c (struct grub_jfs_inode): Put __attribute__ ((packed)
10084         at the right place.
10086         * fs/fat.c (grub_fat_mount): Replace ~0UL with ~0U.
10087         (grub_fat_read_data): Likewise.
10088         (grub_fat_find_dir): Likewise.
10090         * font/manager.c (find_glyph): Make table a const.
10091         (grub_font_get_glyph): Remove bitmap from if statement.
10093 2007-05-16  Jeroen Dekkers  <jeroen@dekkers.cx>
10095         * util/getroot.c (grub_guess_root_device): Remove RAID and LVM
10096         code, first search for device in /dev/mapper, then in /dev.
10097         (grub_util_get_grub_dev): New function.
10098         * include/grub/util/getroot.h (grub_util_get_grub_dev): Add
10099         prototype.
10100         * util/grub-probe.c (probe): Remove check for RAID, call
10101         grub_util_get_grub_dev() instead of
10102         grub_util_biosdisk_get_grub_dev().
10103         * util/grub-emu.c (main): Call grub_util_get_grub_dev() instead of
10104         grub_util_biosdisk_get_grub_dev().
10105         * util/i386/pc/grub-setup.c (main): Likewise.
10107 2007-05-16  Robert Millan  <rmh@aybabtu.com>
10109         * DISTLIST: Update for the latest changes.
10110         * conf/i386-pc.rmk: Use the new paths for util/getroot.c,
10111         util/grub-mkdevicemap.c, util/grub-probe.c and util/biosdisk.c.
10112         * util/grub-emu.c: Replace grub/i386/pc/util/biosdisk.h with
10113         grub/util/biosdisk.h.
10114         * util/i386/pc/grub-setup.c: Replace grub/machine/util/biosdisk.h with
10115         grub/util/biosdisk.h.
10117 2007-05-16  Robert Millan  <rmh@aybabtu.com>
10119         * util/grub.d/00_header.in: Set default gfxmode to `640x480'.
10121 2007-05-16  Robert Millan  <rmh@aybabtu.com>
10123         * util/i386/efi/grub-install.in: New.
10124         * conf/i386-efi.rmk: Enable grub-mkdevicemap, grub-probe and the
10125         newly added grub-install.
10126         * util/biosdisk.c: Remove unnecessary grub/machine/biosdisk.h
10127         include.
10128         * util/getroot.c: Replace grub/i386/pc/util/biosdisk.h with
10129         grub/util/biosdisk.h.
10130         * util/grub-probe.c: Replace grub/machine/util/biosdisk.h with
10131         grub/util/biosdisk.h.
10133 2007-05-16  Robert Millan  <rmh@aybabtu.com>
10135         * include/grub/i386/pc/util/biosdisk.h: Moved to ...
10136         * include/grub/util/biosdisk.h: ... here.
10137         * util/i386/pc/biosdisk.c: Moved to ...
10138         * util/biosdisk.c: ... here.
10139         * util/i386/pc/getroot.c: Moved to ...
10140         * util/getroot.c: ... here.
10141         * util/i386/pc/grub-mkdevicemap.c: Moved to ...
10142         * util/grub-mkdevicemap.c: ... here.
10143         * util/i386/pc/grub-probe.c: Moved to ...
10144         * util/grub-probe.c: ... here.
10146 2007-05-15  Robert Millan  <rmh@aybabtu.com>
10148         * util/update-grub.in: Remove duplicated line in grub.cfg header
10149         message.
10151 2007-05-13  Robert Millan  <rmh@aybabtu.com>
10153         * util/update-grub.in: Fix a few assumptions about the devices holding
10154         /, /boot and /boot/grub being the same.
10155         * util/grub.d/00_header.in: Likewise.
10156         * util/grub.d/10_hurd.in: Likewise.
10157         * util/grub.d/10_linux.in: Likewise.
10159         * util/grub.d/10_linux.in: Implement Linux image sorting with arbitrary
10160         patterns.  Use that to define the `.old' suffix as older than `'.
10162         * util/grub.d/00_header.in: Set default gfxmode to `800x600x16'.
10164         * util/update-grub.in: Add a reference to ${sysconfdir}/default/grub in
10165         the grub.cfg header message.
10167 2007-05-11  Robert Millan  <rmh@aybabtu.com>
10169         * util/update-grub.in: Create device.map if it doesn't already exist,
10170         before attempting to run grub-probe.
10171         Check for grub-probe and grub-mkdevicemap with the same code
10172         grub-install is using.
10173         Remove test mode.
10175 2007-05-09  Jeroen Dekkers  <jeroen@dekkers.cx>
10177         * Makefile.in: Add the datarootdir autoconf variable.
10179 2007-05-09  Robert Millan  <rmh@aybabtu.com>
10181         * util/i386/pc/grub-probe.c (probe): When detecting partition map,
10182         fail gracefully if dev->disk->partition == NULL.
10184 2007-05-07  Robert Millan  <rmh@aybabtu.com>
10186         * util/i386/pc/grub-probe.c: Add `grub-probe -t partmap' parameter to
10187         determine partition map module.
10188         * util/i386/pc/grub-install.in: Use this feature to decide which
10189         partition module to load, instead of hardcoding pc and gpt.
10191 2007-05-07  Robert Millan  <rmh@aybabtu.com>
10193         * Makefile.in: Fix assumption that $(srcdir) has a trailing slash when
10194         source directory differs from build directory.
10196 2007-05-05  Robert Millan  <rmh@aybabtu.com>
10198         * util/powerpc/ieee1275/grub-install.in: Fix syntax error in pkglibdir
10199         initialisation.
10201 2007-05-05  Robert Millan  <rmh@aybabtu.com>
10203         * util/update-grub.in: Create ${grub_prefix} if it doesn't exist.
10205 2007-05-05  Robert Millan  <rmh@aybabtu.com>
10207         * util/grub.d/10_linux.in: Allow the administrator to insert Linux
10208         command-line arguments via ${GRUB_CMDLINE_LINUX}.
10210 2007-05-05  Robert Millan  <rmh@aybabtu.com>
10212         * conf/i386-pc.rmk (grub_setup_SOURCES): Add partmap/gpt.c.
10213         (grub_probe_SOURCES): Likewise.
10214         * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): Detect
10215         GPT and initialize dos_part and bsd_part accordingly.
10216         * util/i386/pc/grub-setup.c (setup): Ditto for install_dos_part and
10217         install_bsd_part.
10218         (main): Activate gpt module for use during partition identification,
10219         and deactivate it afterwards.
10220         * util/i386/pc/grub-install.in: Add gpt module to core.img.
10221         * util/i386/pc/grub-probe.c (main): Activate gpt module for use during
10222         partition identification, and deactivate it afterwards.
10224 2007-05-05  Robert Millan  <rmh@aybabtu.com>
10226         * term/i386/pc/console.c (grub_console_fini): Call
10227         grub_term_set_current() before grub_term_unregister().
10229 2007-05-04  Robert Millan  <rmh@aybabtu.com>
10231         * DISTLIST: Add util/update-grub.in, util/grub.d/00_header.in,
10232         util/grub.d/10_hurd.in, util/grub.d/10_linux.in and util/grub.d/README.
10233         * Makefile.in: Build update-grub_SCRIPTS.  Install update-grub_SCRIPTS
10234         and update-grub_DATA.
10235         * conf/common.rmk: Build and install update-grub components.
10236         * conf/common.mk: Regenerate.
10237         * util/update-grub.in: New.  Core of update-grub.
10238         * util/grub.d/00_header.in: New.  Generates grub.cfg header.
10239         * util/grub.d/10_hurd.in: New.  Generates boot entries for the Hurd.
10240         * util/grub.d/10_linux.in: New.  Generates boot entries for Linux.
10241         * util/grub.d/README: New.  Document grub.d directory layout.
10243 2007-05-01  Robert Millan  <rmh@aybabtu.com>
10245         * util/grub-emu.c: Move initialization functions
10246         grub_util_biosdisk_init() and grub_init_all() before
10247         grub_util_biosdisk_get_grub_dev(), which relies on them.
10249 2007-04-19  Robert Millan  <rmh@aybabtu.com>
10251         * util/powerpc/ieee1275/grub-install.in: Initialize ${bindir}, since
10252         it is used later.
10254 2007-04-18  Jerone Young  <jerone@gmail.com>
10256         * kernel/elf.c: Add missing parenthesis for conditional statement
10257         stanza.
10259 2007-04-10  Jerone Young  <jerone@gmail.com>
10261         * util/i386/pc/getroot.c: Update so that if root device is /dev/root ,
10262         continue on and look for device node with real device name.
10264 2007-04-10  Jerone Young  <jerone@gmail.com>
10266         * configure.ac: Add argument for autoconf to use transformation
10267         ability.
10268         * Makefile.in: Add autoconf package transformation code.
10269         * util/i386/pc/grub-install.in: Likewise.
10270         * util/powerpc/ieee1275/grub-install.in: Likewise.
10272 2007-03-19  Yoshinori K. Okuji  <okuji@enbug.org>
10274         * fs/ext2.c (EXT2_GOOD_OLD_REVISION): New macro.
10275         (EXT2_GOOD_OLD_INODE_SIZE): Likewise.
10276         (EXT2_REVISION): Likewise.
10277         (EXT2_INODE_SIZE): Likewise.
10278         (struct grub_ext2_block_group): Added a missing member
10279         "used_dirs".
10280         (grub_ext2_read_inode): Divide by the inode size in a superblock
10281         instead of 128 to obtain INODES_PER_BLOCK.
10282         Use the macro EXT2_INODE_SIZE instead of directly using
10283         SBLOCK->INODE_SIZE.
10285 2007-03-18  Yoshinori K. Okuji  <okuji@enbug.org>
10287         * fs/ext2.c (grub_ext2_read_inode): Use the inode size in a
10288         superblock instead of the structure size to compute an
10289         offset. This fixes the problem that GRUB could not read a
10290         filesystem when inode size is different from 128-byte.
10292 2007-03-05  Marco Gerards  <marco@gnu.org>
10294         * normal/main.c (read_config_file): When "menu" is not set, create
10295         an initial context.
10297 2007-02-21  Hollis Blanchard  <hollis@penguinppc.org>
10299         * kern/powerpc/ieee1275/init.c (HEAP_SIZE): Removed.
10300         (HEAP_LIMIT): New macro.
10301         (grub_claim_heap): Claim memory up to `heaplimit'.
10303 2007-02-21  Hollis Blanchard  <hollis@penguinppc.org>
10305         * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Link at 64KB.
10306         * kern/powerpc/ieee1275/init.c (_end): Add declaration.
10307         (_start): Likewise.
10308         (grub_arch_modules_addr): Return address after `_end'.
10309         * util/powerpc/ieee1275/grub-mkimage.c: Include grub/misc.h.
10310         (load_modules): Use new parameter as `p_paddr' and `p_vaddr'.
10311         (add_segments): Calculate `_end' from phdr size and location.
10312         (ALIGN_UP): Moved to ...
10313         * include/grub/misc.h: here.
10314         * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
10315         New macro.
10316         (GRUB_IEEE1275_MODULE_BASE): Removed.
10318 2007-02-20  Hollis Blanchard  <hollis@penguinppc.org>
10320         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Correct
10321         loop boundary.
10323 2007-02-20  Hollis Blanchard  <hollis@penguinppc.org>
10325         * include/grub/elfload.h (grub_elf32_load_hook_t): Return grub_err_t.
10326         All users updated.
10327         (grub_elf64_load_hook_t): Likewise.
10328         * kern/elf.c: Call `grub_error_push' before `grub_error'. Improve
10329         debug output.
10331 2007-02-20  Hollis Blanchard  <hollis@penguinppc.org>
10333         * kern/mm.c: Update copyright.
10334         (grub_mm_debug): Correct syntax error.
10335         (grub_mm_dump_free): New function.
10336         (grub_debug_free): Call `grub_free'.
10337         * include/grub/mm.h: Update copyright.
10338         (grub_mm_dump_free): Add declaration.
10340 2007-02-12  Hollis Blanchard  <hollis@penguinppc.org>
10342         * include/grub/ieee1275/ieee1275.h: Update copyright.
10343         * kern/powerpc/ieee1275/init.c: Likewise.
10344         * kern/powerpc/ieee1275/openfw.c: Likewise.
10346         * loader/powerpc/ieee1275/linux.c: Likewise.
10347         * include/grub/elfload.h: Likewise.
10348         * kern/elf.c: Likewise.
10349         (grub_elf32_load): Pass `base' and `size' parameters.  Update all
10350         callers.
10351         (grub_elf64_load): Likewise.
10352         (grub_elf32_load_segment): Move to a nested function.
10353         (grub_elf64_load_segment): Likewise.
10355 2007-02-12  Hollis Blanchard  <hollis@penguinppc.org>
10357         * include/grub/ieee1275/ieee1275.h (grub_available_iterate): New
10358         prototype.
10359         * kern/powerpc/ieee1275/init.c (grub_heap_start): Removed.
10360         (grub_heap_len): Likewise.
10361         (HEAP_SIZE): New macro.
10362         (grub_claim_heap): New function.
10363         (grub_machine_init): Don't claim heap directly.  Call
10364         `grub_claim_heap'.
10365         * kern/powerpc/ieee1275/openfw.c: Include alloca.h.
10366         (grub_available_iterate): New function.
10368 2007-02-03  Thomas Schwinge  <tschwinge@gnu.org>
10370         * aclocal.m4 (grub_CHECK_STACK_PROTECTOR): New definition.
10371         * configure.ac: Use it for testing the HOST and TARGET compilers.
10373 2006-12-13  Thomas Schwinge  <tschwinge@gnu.org>
10375         * Makefile.in (enable_grub_emu): New variable.
10376         * configure.ac (--enable-grub-emu): New option.
10377         Do the checks for (n)curses only if `--enable-grub-emu' is requested.
10378         * conf/i386-efi.rmk (sbin_UTILITIES): Add `grub-emu' only if requested.
10379         * conf/i386-pc.rmk: Likewise.
10380         * conf/powerpc-ieee1275.rmk: Likewise.
10381         * conf/sparc64-ieee1275.rmk (bin_UTILITIES): Likewise.
10383 2006-12-12  Marco Gerards  <marco@gnu.org>
10385         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_MENU'.
10387         * kern/env.c (grub_env_unset): Don't free the member `value' when
10388         the type is GRUB_ENV_VAR_DATA, in this case it's a user defined
10389         pointer.
10391         * normal/main.c (current_menu): Removed.
10392         (free_menu): Unset the `menu' environment variable.
10393         (grub_normal_menu_addentry): Make use of the environment variable
10394         `menu', instead of using the global `current_menu'.  Allocate
10395         memory for the sourcecode of this entry.
10396         (read_config_file): New argument `nested', changed all callers.
10397         Only in the case of a new context, initialize a new menu.  Set the
10398         `menu' environment variable.
10399         (grub_normal_execute): Don't set and unset the environment
10400         variable `menu' here anymore.  Only free the menu when leaving the
10401         context.
10403         * util/i386/pc/biosdisk.c (linux_find_partition): Fixed a memory
10404         leak.
10406 2006-12-11  Marco Gerards  <marco@gnu.org>
10408         * normal/menu_entry.c (run): Fix off by one bug so the last line
10409         is executed.  Move the loader check to outside the loop.
10411 2006-12-08  Hollis Blanchard  <hollis@penguinppc.org>
10413         * kern/powerpc/ieee1275/cmain.c (cmain): Mark r3 and r4 as `UNUSED'.
10415 2006-11-25  Yoshinori K. Okuji  <okuji@enbug.org>
10417         * util/i386/pc/grub-mkimage.c (generate_image): Fix the offset of
10418         the number of sectors.  Reported by Andrey Shuvikov
10419         <mr_hyro@yahoo.com>.
10421 2006-11-11  Jeroen Dekkers  <jeroen@dekkers.cx>
10423         * kern/disk.c (grub_disk_read): When there is a read error, always
10424         try to read only the necessary data.
10426         * conf/i386-pc.rmk (grub_probe_SOURCES): Add disk/lvm.c and
10427         disk/raid.c.
10428         * include/grub/disk.h [GRUB_UTIL] (grub_raid_init): New
10429         prototype.
10430         [GRUB_UTIL] (grub_raid_fini): Likewise.
10431         [GRUB_UTIL] (grub_lvm_init): Likewise.
10432         [GRUB_UTIL] (grub_lvm_fini): Likewise.
10433         * util/i386/pc/grub-probe.c (probe): Check whether DEVICE_NAME is
10434         RAID device and copy DEVICE_NAME to DRIVE_NAME in that case.
10435         (main): Call grub_raid_init(), grub_lvm_init(), grub_lvm_fini()
10436         and grub_raid_fini().
10438 2006-11-09  Jeroen Dekkers  <jeroen@dekkers.cx>
10440         * include/grub/types.h (__unused): Rename to UNUSED.
10441         * kern/elf.c (grub_elf32_size): Use UNUSED instead of __unused.
10442         (grub_elf64_size): Likewise.
10444 2006-11-03  Hollis Blanchard  <hollis@penguinppc.org>
10446         * kern/elf.c (grub_elf_file): Call grub_file_seek. Call
10447         grub_error_push and grub_error_pop in the error-handling path.
10448         (grub_elf32_load_segment): Only call grub_file_read with non-zero
10449         length.
10451 2006-11-03  Hollis Blanchard  <hollis@penguinppc.org>
10453         * conf/i386-efi.rmk (grub_emu_SOURCES): Add kern/elf.c.
10454         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
10455         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10456         (kernel_elf_SOURCES): Likewise.
10457         * conf/i386-efi.rmk (kernel_mod_HEADERS): Add elfload.h and cache.h.
10458         * conf/i386-pc.rmk (kernel_mod_HEADERS): Likewise.
10459         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
10460         * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
10461         * conf/common.rmk (pkgdata_MODULES): Add elf.mod.
10462         (elf_mod_SOURCES): New variable.
10463         (elf_mod_CFLAGS): Likewise.
10464         (elf_mod_LDFLAGS): Likewise.
10465         * include/grub/types.h (__unused): New macro.
10466         * include/grub/elfload.h: New file.
10467         * kern/elf.c: Likewise.
10468         * loader/powerpc/ieee1275/linux.c: Include elfload.h.
10469         (ELF32_LOADMASK): New macro.
10470         (ELF64_LOADMASK): Likewise.
10471         (vmlinux): Removed.
10472         (grub_linux_load32): New function.
10473         (grub_linux_load64): Likewise.
10474         (grub_rescue_cmd_linux): Call grub_linux_load32 or grub_linux_load64.
10475         Use grub_elf_t instead of grub_file_t.
10477 2006-11-02  Hollis Blanchard  <hollis@penguinppc.org>
10479         * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): Add
10480         `catch_result' to struct set_color_args.
10482 2006-10-28  Yoshinori K. Okuji  <okuji@enbug.org>
10484         * normal/menu.c: Include grub/script.h.
10485         * normal/menu_entry.c: Likewise.
10486         * include/grub/normal.h: Do not include grub/script.h.
10488 2006-10-27  Hollis Blanchard  <hollis@penguinppc.org>
10490         * kern/disk.c (grub_disk_read): Correct debug printf formatting.
10492 2006-10-27  Hollis Blanchard  <hollis@penguinppc.org>
10494         * kern/disk.c (grub_disk_open): Print debug messages when opening a
10495         disk.
10496         (grub_disk_close): Print debug messages when closing a disk.
10497         (grub_disk_read): Print debug messages when disk read fails.
10498         * kern/fs.c (grub_fs_probe): Print debug messages when detecting
10499         filesystem type.
10500         * kern/partition.c: Include misc.h.
10501         (grub_partition_iterate): Print debug messages when detecting
10502         partition type.
10504 2006-10-27  Hollis Blanchard  <hollis@penguinppc.org>
10506         * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Return error if `status'
10507         is negative.
10508         * kern/ieee1275/ieee1275.c (IEEE1275_IHANDLE_INVALID): Change to 0.
10510 2006-10-26  Hollis Blanchard  <hollis@penguinppc.org>
10512         * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
10513         Reverse GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS test.
10515 2006-10-25  Jeroen Dekkers  <jeroen@dekkers.cx>
10517         * disk/lvm.c (grub_lvm_scan_device): Malloc sizeof(*lv) bytes
10518         instead of sizeof(lv). Patch by Michael Guntsche.
10520 2006-10-18  Jeroen Dekkers  <jeroen@dekkers.cx>
10522         * disk/lvm.c: Rename VGS to VG_LIST.
10523         (grub_lvm_iterate): Change VGS->LV to VG-LV.
10524         (grub_lvm_open): Likewise.
10525         Thanks to Michael Guntsche for finding this bug.
10527 2006-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
10529         * configure.ac (AC_INIT): Bumped to 1.95.
10531 2006-10-14  Robert Millan  <rmh@aybabtu.com>
10533         * util/i386/pc/getroot.c (grub_guess_root_device): Don't compare os_dev
10534         with "/dev/.static/dev/md".
10536 2006-10-14  Yoshinori K. Okuji  <okuji@enbug.org>
10538         * util/i386/pc/grub-probe.c (probe): Print DEVICE_NAME instead of
10539         DRIVE_NAME when grub_util_biosdisk_get_grub_dev fails. Open
10540         DRIVE_NAME instead of DEVICE_NAME. Make sure that DEVICE_NAME and
10541         DRIVE_NAME are always freed.
10543         * util/i386/pc/biosdisk.c (make_device_name): Add one into
10544         DOS_PART, as a DOS partition is counted from one instead of zero
10545         now. Reported by Robert Millan.
10547 2006-10-14  Robert Millan  <rmh@aybabtu.com>
10549         * util/i386/pc/getroot.c (grub_guess_root_device): Stop using
10550         grub_util_biosdisk_get_grub_dev to convert system device to GRUB device.
10551         * util/grub-emu.c (main): Use grub_util_biosdisk_get_grub_dev with the
10552         string returned by grub_guess_root_device.
10553         * util/i386/pc/grub-setup.c: Likewise.
10554         * util/i386/pc/grub-probefs.c: Likewise.
10556         * util/i386/pc/grub-probefs.c: Rename to ...
10557         * util/i386/pc/grub-probe.c: ... this.
10558         * DISTLIST: Remove grub-probefs, add grub-probe.
10559         * conf/i386-efi.rmk: Likewise.
10560         * conf/i386-pc.rmk: Likewise.
10561         * util/i386/pc/grub-install.in: Likewise.
10563         * util/i386/pc/grub-probe.c: Add --target=(fs|device|drive) option to
10564         choose which information we want to print.
10566 2006-10-14  Yoshinori K. Okuji  <okuji@enbug.org>
10568         * DISTLIST: Added commands/echo.c, disk/lvm.c, disk/raid.c,
10569         include/grub/bitmap.h, include/grub/lvm.h, include/grub/raid.h,
10570         include/grub/i386/pc/vbeutil.h, include/grub/util/lvm.h,
10571         include/grub/util/raid.h, util/lvm.c, util/raid.c, video/bitmap.c,
10572         video/readers/tga.c and video/i386/pc/vbeutil.c.
10574 2006-10-14  Jeroen Dekkers  <jeroen@dekkers.cx>
10576         Added support for RAID and LVM.
10578         * disk/lvm.c: New file.
10579         * disk/raid.c: Likewise.
10580         * include/grub/lvm.h: Likewise.
10581         * include/grub/raid.h: Likewise.
10582         * include/grub/util/lvm.h: Likewise.
10583         * include/grub/util/raid.h: Likewise.
10584         * util/lvm.c: Likewise.
10585         * util/raid.c: Likewise.
10587         * include/grub/disk.h (grub_disk_dev_id): Add
10588         GRUB_DISK_DEVICE_RAID_ID and GRUB_DISK_DEVICE_LVM_ID.
10589         (grub_disk_get_size): New prototype.
10590         * kern/disk.c (grub_disk_open): Check whether grub_partition_probe()
10591         returns a partition.
10592         (grub_disk_get_size): New function.
10594         * kern/i386/pc/init.c (make_install_device): Copy the prefix
10595         verbatim if grub_install_dos_part is -2.
10597         * util/i386/pc/getroot.c (grub_guess_root_device): Support RAID
10598         and LVM devices.
10600         * util/i386/pc/grub-setup.c (setup): New argument
10601         MUST_EMBED. Force embedding of GRUB when the argument is
10602         true. Close FILE before returning.
10603         (main): Add support for RAID and LVM.
10605         * conf/common.rmk: Add RAID and LVM modules.
10606         * conf/i386-pc.rmk (grub_setup_SOURCES): Add util/raid.c and
10607         util/lvm.c.
10608         (grub_emu_SOURCES): Add disk/raid.c and disk/lvm.c.
10610         * kern/misc.c (grub_strstr): New function.
10611         * include/grub/misc.h (grub_strstr): New prototype.
10613 2006-10-10  Tristan Gingold  <tristan.gingold@bull.net>
10615         * include/grub/efi/api.h (GRUB_EFI_ERROR_CODE): Long constant.
10617 2006-10-05  Tristan Gingold  <tristan.gingold@bull.net>
10619         * kern/misc.c (grub_strtoull): Guess the base only if not
10620         specified.
10622 2006-10-01  Hollis Blanchard  <hollis@penguinppc.org>
10624         * kern/powerpc/ieee1275/cmain.c (cmain): Remove incomplete Old World
10625         PowerMac support.
10627 2006-10-01  Hollis Blanchard  <hollis@penguinppc.org>
10629         * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Cast `size' to long.
10631         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_next_property):
10632         Remove `flags' argument.  All callers changed.
10633         * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_ROOT): Removed.
10634         (IEEE1275_IHANDLE_INVALID): New variable.
10635         (IEEE1275_CELL_INVALID): New variable.
10636         (grub_ieee1275_finddevice, grub_ieee1275_get_property,
10637         grub_ieee1275_get_property_length, grub_ieee1275_instance_to_package,
10638         grub_ieee1275_package_to_path, grub_ieee1275_instance_to_path,
10639         grub_ieee1275_peer, grub_ieee1275_child, grub_ieee1275_open,
10640         grub_ieee1275_claim, grub_ieee1275_set_property): Error-check return
10641         codes from Open Firmware.  All callers updated.
10642         (grub_ieee1275_next_property): Directly return Open Firmware return
10643         code.
10644         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
10645         Standardize error checking from `grub_ieee1275_get_property'.
10646         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Rename
10647         `devalias' to `aliases'.  Correct comments.  Consolidate error paths.
10649 2006-10-01  Hollis Blanchard  <hollis@penguinppc.org>
10651         * kern/ieee1275/ieee1275.c (grub_ieee1275_instance_to_path): Rename
10652         `instance_to_package_args' to `instance_to_path_args'.
10654         * kern/powerpc/ieee1275/init.c (grub_machine_init): Use
10655         `grub_ieee1275_chosen'.
10657         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Call
10658         `grub_ieee1275_interpret'.
10660 2006-09-25  Hollis Blanchard  <hollis@penguinppc.org>
10662         * util/powerpc/ieee1275/grub-mkimage.c: Include config.h.
10664 2006-09-25  Hollis Blanchard  <hollis@penguinppc.org>
10666         * include/grub/powerpc/libgcc.h (__floatdisf): New prototype.
10667         (__cmpdi): Likewise.
10669         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Pass 0 as
10670         `flags' to `grub_ieee1275_next_property'.  Change `pathlen' to type
10671         `grub_ssize_t'.
10673         * kern/powerpc/ieee1275/cmain.c: Include grub/misc.h.
10675         * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Change `actual'
10676         to type `grub_ssize_t'.
10677         (grub_rescue_cmd_linux): Cast -1 to `grub_off_t'.
10679 2006-09-22  Marco Gerards  <marco@gnu.org>
10681         * normal/script.c (grub_script_create_cmdmenu): Skip leading
10682         newlines.
10684 2006-09-22  Marco Gerards  <marco@gnu.org>
10686         * commands/echo.c: New file.
10688         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/echo.c'.
10690         * conf/common.rmk (echo_mod_SOURCES): New variable.
10691         (echo_mod_CFLAGS): Likewise.
10692         (echo_mod_LDFLAGS): Likewise.
10694 2006-09-22  Marco Gerards  <marco@gnu.org>
10696         * normal/main.c (get_line): Malloc memory instead of using
10697         preallocated memory.  Removed the arguments `cmdline' and
10698         `max_len'.  Updated all callers.
10700 2006-09-22  Marco Gerards  <marco@gnu.org>
10702         * conf/i386-efi.rmk (grub_emu_DEPENDENCIES): New variable.
10703         (normal_mod_DEPENDENCIES): Likewise.
10705         * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Likewise.
10706         (normal_mod_DEPENDENCIES): Likewise.
10708         * conf/sparc64-ieee1275.rmk (normal_mod_DEPENDENCIES): Likewise.
10710 2006-09-22  Johan Rydberg  <jrydberg@gnu.org>
10712         * genmk.rb: Add DEPENDENCIES variables to modules, utilities, and
10713         programs.
10714         * conf/i386-pc.rmk (grub_emu_DEPENDENCIES): Declare.
10715         (normal_mod_DEPENDENCIES): Likewise.
10716         * conf/i386-pc.mk: Regenerate.
10717         * conf/i386-efi.mk: Likewise
10718         * conf/common.mk: Likewise.
10719         * conf/powerpc-ieee1275.mk: Likewise.
10720         * conf/sparc64-ieee1275.mk: Likewise.
10722 2006-09-22  Robert Millan  <rmh@aybabtu.com>
10724         Sync with i386 version.
10725         * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Remove grub-emu, add grub-mkimage.
10726         * conf/powerpc-ieee1275.rmk (sbin_UTILITIES): Remove grub-mkimage, add grub-emu.
10728 2006-09-21  Robert Millan  <rmh@aybabtu.com>
10730         Import from GRUB Legacy (lib/device.c):
10731         * util/i386/pc/grub-mkdevicemap.c (get_i2o_disk_name): New function.
10732         (init_device_map) [__linux__]: Add support for I2O devices.
10734 2006-09-14  Marco Gerards  <marco@gnu.org>
10736         * conf/i386-pc.rmk (COMMON_LDFLAGS): Use `-m32' instead of
10737         `-melf_i386'.
10739 2006-09-14  Robert Millan  <rmh@aybabtu.com>
10741         * util/i386/pc/grub-install.in: Skip menu.lst when removing
10742         /boot/grub/*.lst.
10744         * util/i386/pc/getroot.c: Don't recurse into dotdirs (e.g. ".static").
10746         * util/i386/pc/grub-mkdevicemap.c: Make sure the floppy device exists
10747         before adding it to device.map.
10749 2006-08-15  Johan Rydberg  <jrydberg@gnu.org>
10751         * genmk.rb: Let GCC generate dependencies the first time it
10752         compiles a file; using the -MD option.
10753         * conf/common.mk: Regenerate.
10754         * conf/i386-pc.mk: Likewise.
10755         * conf/i386-efi.mk: Likewise.
10756         * conf/powerpc-ieee1275.mk: Likewise.
10757         * conf/sparc64-ieee1275.mk: Likewise.
10759 2006-08-04  Yoshinori K. Okuji  <okuji@enbug.org>
10761         Move the prototypes of grub_setjmp and grub_longjmp to
10762         cpu/setjmp.h, so that each architecture may specify different
10763         attributes.
10765         * include/grub/i386/setjmp.h (grub_setjmp): New prototype.
10766         (grub_longjmp): Likewise.
10767         * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise..
10768         (grub_longjmp): Likewise.
10769         * include/grub/sparc64/setjmp.h (grub_setjmp): Likewise..
10770         (grub_longjmp): Likewise.
10772         * include/grub/setjmp.h [!GRUB_UTIL] (grub_setjmp): Removed.
10773         [!GRUB_UTIL] (grub_longjmp): Removed.
10775 2006-08-01  Pelletier Vincent  <subdino2004@yahoo.fr>
10777         * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): IEEE1275
10778         "color!" method does not return any value.
10780 2006-07-29  Vesa Jaaskelainen  <chaac@nic.fi>
10782         * include/grub/bitmap.h: New file.
10784         * include/grub/i386/pc/vbeutil.h: Likewise.
10786         * video/bitmap.c: Likewise.
10788         * video/readers/tga.c: Likewise.
10790         * video/i386/pc/vbeutil.c: Likewise.
10792         * commands/videotest.c: Code cleanup and updated to reflect to new
10793         video API.
10795         * term/gfxterm.c: Likewise.
10797         * video/video.c: Likewise.
10799         * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod.
10800         (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c.
10801         (bitmap_mod_SOURCES): New entry.
10802         (bitmap_mod_CFLAGS): Likewise.
10803         (bitmap_mod_LDFLAGS): Likewise.
10804         (tga_mod_SOURCES): Likewise.
10805         (tga_mod_CFLAGS): Likewise.
10806         (tga_mod_LDFLAGS): Likewise.
10808         * include/grub/video.h (grub_video_blit_operators): New enum type.
10809         (grub_video_render_target): Changed as forward declaration and moved
10810         actual definition to be video driver specific.
10811         (grub_video_adapter.blit_bitmap): Added blitting operator.
10812         (grub_video_adapter.blit_render_target): Likewise.
10813         (grub_video_blit_bitmap): Likewise.
10814         (grub_video_blit_render_target): Likewise.
10816         * include/grub/i386/pc/vbe.h (grub_video_render_target): Added
10817         driver specific render target definition.
10818         (grub_video_vbe_map_rgba): Added driver internal helper.
10819         (grub_video_vbe_unmap_color): Updated to use
10820         grub_video_i386_vbeblit_info.
10821         (grub_video_vbe_get_video_ptr): Likewise.
10823         * include/grub/i386/pc/vbeblit.h
10824         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use
10825         grub_video_i386_vbeblit_info.
10826         (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
10827         (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
10828         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
10829         (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
10830         (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
10831         (grub_video_i386_vbeblit_index_index): Likewise.
10832         (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function.
10833         (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
10834         (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
10835         (grub_video_i386_vbeblit_blend): Added generic blitter for blend
10836         operator.
10837         (grub_video_i386_vbeblit_replace): Added generic blitter for replace
10838         operator.
10840         * video/i386/pc/vbeblit.c: Updated to reflect changes on
10841         include/grub/i386/pc/vbeblit.h.
10843         * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8):
10844         Updated to use grub_video_i386_vbeblit_info.
10845         (grub_video_i386_vbefill_R8G8B8): Likewise.
10846         (grub_video_i386_vbefill_index): Likewise.
10847         (grub_video_i386_vbefill): Added generic filler.
10849         * video/i386/pc/vbefill.c: Updated to reflect changes on
10850         include/grub/i386/pc/vbefill.h.
10852         * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use
10853         grub_video_i386_vbeblit_info.
10854         (grub_video_vbe_unmap_color): Likewise.
10855         (grub_video_vbe_blit_glyph): Likewise.
10856         (grub_video_vbe_scroll): Likewise.
10857         (grub_video_vbe_draw_pixel): Removed function.
10858         (grub_video_vbe_get_pixel): Likewise.
10859         (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and
10860         updated code to use it.
10861         (common_blitter): Added common blitter for render target and bitmap.
10862         (grub_video_vbe_blit_bitmap): Updated to use common_blitter.
10863         (grub_video_vbe_blit_render_target): Likewise.
10865 2006-07-30  Johan Rydberg  <jrydberg@gnu.org>
10867         * kern/efi/efi.c (grub_efi_set_text_mode): Assume console already
10868         is in text mode if there is no console control protocol instance
10869         available.
10871 2006-07-29  Vesa Jaaskelainen  <chaac@nic.fi>
10873         * include/grub/video.h: Code cleanup.
10875         * include/grub/i386/pc/vbe.h: Likewise.
10877         * video/i386/pc/vbe.c: Likewise.
10879         * video/i386/pc/vbeblit.c: Likewise.
10881         * video/i386/pc/vbefill.c: Likewise.
10883         * video/video.c: Likewise.  Also added more comments.
10885 2006-07-29  Vesa Jaaskelainen  <chaac@nic.fi>
10887         * disk/i386/pc/biosdisk.c (struct grub_biosdisk_drp): Moved to ...
10888         (struct grub_biosdisk_dap): Likewise.
10890         * include/grub/i386/pc/biosdisk.h: ... to here.  Also corrected
10891         linkage settings for all functions.
10893 2006-07-12  Marco Gerards  <marco@gnu.org>
10895         * configure.ac (--enable-mm-debug): Fix typo.
10897         * genkernsyms.sh.in: Use proper quoting for `CC'.
10899 2006-07-02  Jeroen Dekkers  <jeroen@dekkers.cx>
10901         * conf/i386-pc.rmk (COMMON_ASFLAGS): Add "-m32".
10902         (normal_mod_ASFLAGS): Remove "-m32".
10904 2006-06-14  Yoshinori K. Okuji  <okuji@enbug.org>
10906         * util/misc.c: Include config.h.
10907         [!HAVE_MEMALIGN]: Do not include malloc.h.
10908         (grub_memalign): Use posix_memalign, if present. Then, use
10909         memalign, if present. Otherwise, emit an error.
10911         * util/grub-emu.c: Do not include malloc.h.
10913         * include/grub/util/misc.h: Include unistd.h. This is required for
10914         FreeBSD, because off_t is defined in unistd.h. Reported by Harley
10915         D. Eades III <hde@foobar-qux.org>.
10917         * configure.ac (AC_GNU_SOURCE): Added.
10918         (AC_CHECK_FUNCS): Check posix_memalign and memalign for the host
10919         type.
10921 2006-06-09  Yoshinori K. Okuji  <okuji@enbug.org>
10923         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Make sure that
10924         ADDR_MAX does not exceed GRUB_LINUX_INITRD_MAX_ADDRESS.
10926 2006-06-07  Jeroen Dekkers  <jeroen@dekkers.cx>
10928         * include/grub/types.h (grub_host_addr_t): Rename to
10929         grub_target_addr_t.
10930         (grub_host_off_t): Rename to grub_target_off_t.
10931         (grub_host_size_t): Rename to grub_target_size_t.
10932         (grub_host_ssize_t): Rename to grub_target_ssize_t.
10933         Refer to GRUB_TARGET_SIZEOF_VOID_P to define those variables.
10935         * include/grub/kernel.h (struct grub_module_header): Change type
10936         of OFFSET to grub_target_off_t and type of SIZE to grub_target_size_t.
10937         (grub_module_info): Likewise.
10939 2006-06-05  Yoshinori K. Okuji  <okuji@enbug.org>
10941         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): The conditional
10942         of checking LINUX_MEM_SIZE was reverse. Reported by Jesus
10943         Velazquez <jesus.velazquez@gmail.com>.
10945 2006-06-05  Yoshinori K. Okuji  <okuji@enbug.org>
10947         Count partitions from 1 instead of 0 in the string representation
10948         of partitions. Still use 0-based internally.
10950         * partmap/sun.c (grub_sun_is_valid): A cosmetic change.
10951         (sun_partition_map_iterate): Use grub_partition_t instead of
10952         struct grub_partition *. Cast DESC->START_CYLINDER to
10953         grub_uint64_t after converting the endian.
10954         (sun_partition_map_probe): Subtract 1 for PARTNUM.
10955         (sun_partition_map_get_name): Add 1 to P->INDEX.
10957         * partmap/pc.c (grub_partition_parse): Subtract 1 for
10958         PCDATA->DOS_PART.
10959         (pc_partition_map_get_name): Add 1 into PCDATA->DOS_PART.
10961         * partmap/gpt.c (gpt_partition_map_iterate): Initialize PARTNO to
10962         zero instead of one.
10963         (gpt_partition_map_probe): Subtract 1 for PARTNUM.
10964         (gpt_partition_map_get_name): Add 1 into P->INDEX.
10966         * partmap/apple.c (apple_partition_map_iterate): Change the type
10967         of POS to unsigned.
10968         (apple_partition_map_probe): Subtract 1 for PARTNUM.
10969         (apple_partition_map_get_name): Add 1 into P->INDEX.
10971         * partmap/amiga.c (amiga_partition_map_iterate): Change the type
10972         of POS to unsigned.
10973         (amiga_partition_map_iterate): Cast NEXT to grub_off_t to
10974         calculate the offset of a partition.
10975         (amiga_partition_map_probe): Subtract 1 for PARTNUM.
10976         (amiga_partition_map_get_name): Add 1 into P->INDEX.
10978         * partmap/acorn.c (acorn_partition_map_find): Change the type of
10979         SECTOR to grub_disk_addr_t.
10980         (acorn_partition_map_iterate): Likewise.
10981         (acorn_partition_map_probe): Subtract 1 for PARTNUM.
10982         Change the type of SECTOR to grub_disk_addr_t. Declare P on the
10983         top.
10984         (acorn_partition_map_get_name): Add 1 into P->INDEX.
10986         * kern/i386/pc/init.c (make_install_device): Add 1 into
10987         GRUB_INSTALL_DOS_PART.
10989         * fs/iso9660.c (grub_iso9660_mount): Fixed a reversed
10990         conditional.
10992 2006-06-04  Yoshinori K. Okuji  <okuji@enbug.org>
10994         Clean up the code to support 64-bit addressing in disks and
10995         files. This change is not enough for filesystems yet.
10997         * util/i386/pc/grub-setup.c (struct boot_blocklist): Change the
10998         type of "start" to grub_uint64_t.
10999         (setup): Change the types of KERNEL_SECTOR and FIRST_SECTOR to
11000         grub_disk_addr_t * and grub_disk_addr_t. Fix the format string in
11001         save_first_sector and save_blocklists. Use grub_le_to_cpu64 to
11002         convert addresses.
11004         * util/i386/pc/biosdisk.c (open_device): Change the type of SECTOR
11005         to grub_disk_addr_t.
11007         * partmap/gpt.c (gpt_partition_map_iterate): Fix the format
11008         string.
11010         * partmap/pc.c (pc_partition_map_iterate): Likewise.
11012         * partmap/amiga.c (amiga_partition_map_iterate): Cast RDSK.MAGIC
11013         to char *.
11015         * normal/script.c (grub_script_parse): Remove unused MEMFREE.
11017         * normal/parser.y (YYLTYPE_IS_TRIVIAL): New macro.
11019         * normal/lexer.c (grub_script_yyerror): Specify unused to LEX.
11021         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf64): Cast -1
11022         to grub_off_t, to detect an error from grub_file_seek.
11023         (grub_multiboot_load_elf32): Likewise.
11025         * kern/misc.c (grub_strtoul): Use grub_strtoull. Return the
11026         maximum unsigned long value when an overflow is detected.
11027         (grub_strtoull): New function.
11028         (grub_divmod64): Likewise.
11029         (grub_lltoa): use grub_divmod64.
11031         * kern/fs.c (struct grub_fs_block): Change the type of "offset" to
11032         grub_disk_addr_t.
11033         (grub_fs_blocklist_open): Increase P if P is not NULL to advance
11034         the pointer to next character. Use grub_strtoull instead of
11035         grub_strtoul.
11036         (grub_fs_blocklist_read): Change the types of SECTOR, OFFSET and
11037         SIZE to grub_disk_addr_t, grub_off_t and grub_size_t,
11038         respectively.
11040         * kern/file.c (grub_file_read): Prevent an overflow of LEN, as the
11041         return value is signed.
11042         (grub_file_seek): Change the type of OLD to grub_off_t. Do not
11043         test if OFFSET is less than zero, as OFFSET is unsigned now.
11045         * kern/disk.c (struct grub_disk_cache): Change the type of
11046         "sector" to grub_disk_addr_t.
11047         (grub_disk_cache_get_index): Change the type of SECTOR to
11048         grub_disk_addr_t. Calculate the hash with SECTOR casted to
11049         unsigned after shifting.
11050         (grub_disk_cache_invalidate): Change the type of SECTOR to
11051         grub_disk_addr_t.
11052         (grub_disk_cache_unlock): Likewise.
11053         (grub_disk_cache_store): Likewise.
11054         (grub_disk_check_range): Change the types of SECTOR, OFFSET, SIZE,
11055         START and LEN to grub_disk_addr_t *, grub_off_t *, grub_size_t,
11056         grub_disk_addr_t and grub_uint64_t, respectively.
11057         (grub_disk_read): Use an unsigned variable REAL_OFFSET for the
11058         body, as the value of OFFSET is tweaked by
11059         grub_disk_check_range. Change the types of START_SECTOR, LEN and
11060         POS to grub_disk_addr_t, grub_size_t and grub_size_t,
11061         respectively.
11062         (grub_disk_write): Use an unsigned variable REAL_OFFSET for the
11063         body, as the value of OFFSET is tweaked by
11064         grub_disk_check_range. Change the types of LEN and N to
11065         grub_size_t.
11067         * io/gzio.c (struct grub_gzio): Change the types of "data_offset"
11068         and "saved_offset" to grub_off_t.
11069         (test_header): Cast BUF to char *.
11070         (get_byte): Cast GZIO->DATA_OFFSET to grub_off_t. Cast GZIO->INBUF
11071         to char *.
11072         (grub_gzio_read): Change the types of OFFSET and SIZE to
11073         grub_off_t and grub_size_t, respectively.
11075         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_FORCE_LBA):
11076         Removed.
11077         (GRUB_BOOT_MACHINE_BOOT_DRIVE): Changed to 0x4c.
11078         (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Changed to 0x40.
11079         (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Changed to 0x42.
11080         (GRUB_BOOT_MACHINE_DRIVE_CHECK): Changed to 0x4e.
11081         (GRUB_BOOT_MACHINE_LIST_SIZE): Increased to 12.
11083         * include/grub/types.h (grub_off_t): Unconditionally set to
11084         grub_uint64_t.
11085         (grub_disk_addr_t): Changed to grub_uint64_t.
11087         * include/grub/partition.h (struct grub_partition): Change the
11088         types of "start", "len" and "offset" to grub_disk_addr_t,
11089         grub_uint64_t and grub_disk_addr_t, respectively.
11090         (grub_partition_get_start): Return grub_disk_addr_t.
11091         (grub_partition_get_len): Return grub_uint64_t.
11093         * include/grub/misc.h (grub_strtoull): New prototype.
11094         (grub_divmod64): Likewise.
11096         * include/grub/fshelp.h (grub_fshelp_read_file): Change the types
11097         of SECTOR, LEN and FILESIZE to grub_disk_addr_t, grub_size_t and
11098         grub_off_t, respectively.
11099         All callers and references changed.
11101         * include/grub/fs.h (struct grub_fs): Change the type of LEN to
11102         grub_size_t in "read".
11103         All callers and references changed.
11105         * include/grub/file.h (struct grub_file): Change the types of
11106         "offset" and "size" to grub_off_t and grub_off_t,
11107         respectively. Change the type of SECTOR to grub_disk_addr_t in
11108         "read_hook".
11109         (grub_file_read): Change the type of LEN to grub_size_t.
11110         (grub_file_seek): Return grub_off_t. Change the type of OFFSET to
11111         grub_off_t.
11112         (grub_file_size): Return grub_off_t.
11113         (grub_file_tell): Likewise.
11114         All callers and references changed.
11116         * include/grub/disk.h (struct grub_disk_dev): Change the types of
11117         SECTOR and SIZE to grub_disk_addr_t and grub_size_t in "read" and
11118         "write".
11119         (struct grub_disk): Change the type of "total_sectors" to
11120         grub_uint64_t. Change the type of SECTOR to grub_disk_addr_t in
11121         "read_hook".
11122         (grub_disk_read): Change the types of SECTOR, OFFSET and SIZE to
11123         grub_disk_addr_t, grub_off_t and grub_size_t, respectively.
11124         (grub_disk_write): Likewise.
11125         All callers and references changed.
11127         * fs/iso9660.c (grub_iso9660_susp_iterate): Cast parameters to
11128         char * for grub_strncmp to silence gcc.
11129         (grub_iso9660_mount): Likewise.
11130         (grub_iso9660_mount): Likewise.
11131         (grub_iso9660_read_symlink): Likewise. Also, remove the nonsense
11132         return statement.
11133         (grub_iso9660_iterate_dir): Likewise.
11134         (grub_iso9660_label): Cast DATA->VOLDESC.VOLNAME to char *.
11136         * fs/hfs.c (grub_hfs_read_file): Change the types of SECTOR and
11137         LEN to grub_disk_addr_t and grub_size_t, respectively.
11139         * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
11141         * fs/jfs.c (grub_jfs_read_file): Likewise.
11143         * fs/minix.c (grub_jfs_read_file): Likewise.
11145         * fs/sfs.c (grub_jfs_read_file): Likewise.
11147         * fs/ufs.c (grub_jfs_read_file): Likewise.
11149         * fs/xfs.c (grub_jfs_read_file): Likewise.
11151         * fs/fat.c (grub_fat_read_data): Change the types of SECTOR, LEN
11152         and SIZE to grub_disk_addr_t, grub_size_t and grub_size_t,
11153         respectively.
11155         * fs/ext2.c (grub_ext2_read_block): When an error happens, set
11156         BLKNR to -1 instead of returning GRUB_ERRNO.
11157         (grub_ext2_read_file): Change the types of SECTOR and
11158         LEN to grub_disk_addr_t and grub_size_t, respectively.
11160         * fs/affs.c (grub_affs_read_file): Change the types of SECTOR and
11161         LEN to grub_disk_addr_t and grub_size_t, respectively.
11163         * font/manager.c (grub_font_get_glyph): Cast BITMAP to char * for
11164         grub_file_read.
11166         * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Fix the format
11167         string. Do not cast SECTOR explicitly.
11169         * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Change the type of
11170         TOTAL_SECTORS to grub_uint64_t. Do not mask DRP->TOTAL_SECTORS.
11171         (grub_biosdisk_rw): Change the types of SECTOR and SIZE to
11172         grub_disk_addr_t and grub_size_t, respectively. If the sector is
11173         over 2TB and LBA mode is not supported, raise an error.
11174         (get_safe_sectors): New function.
11175         (grub_biosdisk_read): Use get_safe_sectors.
11176         (grub_biosdisk_write): Likewise.
11178         * disk/efi/efidisk.c (grub_efidisk_read): Fix the format string.
11179         (grub_efidisk_write): Likewise.
11181         * disk/loopback.c (delete_loopback): Cosmetic changes.
11182         (grub_cmd_loopback): Likewise. Also, test NEWDEV->FILENAME
11183         correctly.
11184         (grub_loopback_open): Likewise.
11185         (grub_loopback_read): Likewise. Also, change the type of POS to
11186         grub_off_t, and fix the usage of grub_memset.
11188         * commands/i386/pc/play.c: Include grub/machine/time.h.
11190         * commands/ls.c (grub_ls_list_files): Use "llu" instead of "d" to
11191         print FILE->SIZE.
11193         * commands/configfile.c: Include grub/env.h.
11195         * commands/cmp.c (grub_cmd_cmp): Do not use ERR, but use
11196         GRUB_ERRNO directly instead. Change the type of POS to
11197         grub_off_t. Follow the coding standard.
11199         * commands/blocklist.c: Include grub/partition.h.
11200         (grub_cmd_blocklist): Return an error if the underlying device is
11201         not a disk. Take the starting sector of a partition into account,
11202         if a partition is used.
11204         * boot/i386/pc/diskboot.S (bootloop): Adapted to the new offset of
11205         a length field.
11206         (lba_mode): Support 64-bit addresses.
11207         (chs_mode): Likewise.
11208         (copy_buffer): Adapted to the new offsets of a length field and a
11209         segment field.
11210         (blocklist_default_start): Allocate 64-bit space.
11212         * boot/i386/pc/boot.S (force_lba): Removed.
11213         (boot_drive): Moved to under KERNEL_SECTOR.
11214         (kernel_sector): Moved to under KERNEL_SEGMENT. Allocate 64-bit
11215         space.
11216         (real_start): Set %si earlier. Remove code for FORCE_LBA, since it
11217         is useless.
11218         (lba_mode): Refactored to support a 64-bit address. More size
11219         optimization.
11220         (setup_sectors): Likewise.
11222 2006-06-04  Yoshinori K. Okuji  <okuji@enbug.org>
11224         * DISTLIST: Added include/grub/i386/linux.h. Removed
11225         include/grub/i386/pc/linux.h
11227         * configure.ac (AC_INIT): Bumped to 1.94.
11229         * config.guess: Updated from gnulib.
11230         * config.sub: Likewise.
11231         * install-sh: Likewise.
11232         * mkinstalldirs: Likewise.
11234 2006-06-02  Yoshinori K. Okuji  <okuji@enbug.org>
11236         * conf/common.rmk (grub_modules_init.lst): Depended on
11237         grub_emu_SOURCES, excluding grub_emu_init.c, instead of
11238         MODSRCFILES.
11240         * genmk.rb (PModule::rule): Reverted the previous change.
11242 2006-06-02  Yoshinori K. Okuji  <okuji@enbug.org>
11244         * conf/common.rmk (grub_modules_init.lst): Depends on
11245         $(MODSRCFILES). Grep only the files in $(MODSRCFILES). Make sure
11246         that the target does not exist before producing.
11247         (grub_modules_init.h): Remove the target before generating.
11248         (grub_emu_init.c): Likewise.
11250         * genmk.rb (PModule::rule): Add source files into MODSRCFILES.
11252 2006-05-31  Jeroen Dekkers  <jeroen@dekkers.cx>
11254         * configure.ac: Don't set host_m32 for x86_64. Also reset LIBS
11255         for the target-specific tests. Make sure that we also have the
11256         up-to-date target variables for those tests.
11258 2006-05-31  Yoshinori K. Okuji  <okuji@enbug.org>
11260         * genmk.rb (Image::rule): Prefix CFLAGS or ASFLAGS with TARGET_.
11261         (PModule::rule): Likewise.
11263 2006-05-31  Yoshinori K. Okuji  <okuji@enbug.org>
11265         * genmk.rb (Image::rule): Set FLAG to CFLAGS or ASFLAGS instead of
11266         TARGET_CFLAGS or TARGET_ASFLAGS. There is no reason why
11267         target-specific flags should be prefixed.
11268         (PModule::rule): Likewise.
11270 2006-05-30  Yoshinori K. Okuji  <okuji@enbug.org>
11272         * configure.ac (CMP): Check if cmp is available explicitly.
11274 2006-05-29  Yoshinori K. Okuji  <okuji@enbug.org>
11276         * util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
11277         (target_cpu): New variable.
11278         (pkglibdir): Use target_cpu instead of host_cpu.
11280         * util/i386/pc/grub-install.in (host_cpu): Removed.
11281         (target_cpu): New variable.
11282         (pkglibdir): Use target_cpu instead of host_cpu.
11284         * util/genmoddep.c: Removed.
11286         * kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
11287         instead of GRUB_HOST_SIZEOF_VOID_P.
11288         * kern/dl.c: Likewise.
11290         * include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
11291         ...
11292         (GRUB_TARGET_SIZEOF_VOID_P): ... this.
11293         (GRUB_HOST_SIZEOF_LONG): Renamed to ...
11294         (GRUB_TARGET_SIZEOF_LONG): ... this.
11295         (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
11296         (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
11297         * include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
11298         to ...
11299         (GRUB_TARGET_SIZEOF_VOID_P): ... this.
11300         (GRUB_HOST_SIZEOF_LONG): Renamed to ...
11301         (GRUB_TARGET_SIZEOF_LONG): ... this.
11302         (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
11303         (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
11304         * include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
11305         to ...
11306         (GRUB_TARGET_SIZEOF_VOID_P): ... this.
11307         (GRUB_HOST_SIZEOF_LONG): Renamed to ...
11308         (GRUB_TARGET_SIZEOF_LONG): ... this.
11309         (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
11310         (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
11312         * include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
11313         GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
11314         [!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
11315         instead of GRUB_HOST_SIZEOF_LONG.
11316         [!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
11317         GRUB_HOST_WORDS_BIGENDIAN to define or undefine
11318         GRUB_CPU_WORDS_BIGENDIAN.
11319         Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
11320         define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
11321         grub_host_ssize_t.
11323         * conf/i386-efi.rmk (noinst_UTILITIES): Removed.
11324         (genmoddep_SOURCES): Likewise.
11325         * conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
11326         (genmoddep_SOURCES): Likewise.
11327         * conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
11328         (genmoddep_SOURCES): Likewise.
11329         * conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
11330         Likewise.
11331         (genmoddep_SOURCES): Likewise.
11333         * genmoddep.awk: New file.
11335         * genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
11336         TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
11337         CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
11338         (PModule::rule): Likewise.
11339         (Program::rule): Likewise.
11340         (Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
11341         BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
11342         respectively.
11344         * configure.ac: Rewritten intensively to use host and target
11345         instead of build and host, respectively.
11347         * Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
11348         (host_cpu): Removed.
11349         (target_cpu): New variable.
11350         (CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
11351         (BUILD_CC): Removed.
11352         (BUILD_CFLAGS): Likewise.
11353         (BUILD_CPPFLAGS): Likewise.
11354         (TARGET_CC): New variable.
11355         (TARGET_CFLAGS): Likewise.
11356         (TARGET_CPPFLAGS): Likewise.
11357         (TARGET_LDFLAGS): Likewise.
11358         (AWK): Likewise.
11359         (include): Use target_cpu instead of host_cpu.
11360         (moddep.lst:): Use genmoddep.awk instead of genmoddep.
11362         * DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
11364 2006-05-29  Vesa Jaaskelainen  <chaac@nic.fi>
11366         * include/grub/script.h (grub_script_cmdif): Renamed field 'bool' to
11367         'exec_to_evaluate'.  Renamed field 'true' to 'exec_on_true'.  Renamed
11368         field 'false' to 'exec_on_false'.
11369         (grub_script_create_cmdif): Renamed argument names to reflect above
11370         changes.
11372         * normal/execute.c (grub_script_execute_cmdif): Likewise.
11374         * normal/script.c (grub_script_create_cmdif): Likewise.
11376 2006-05-28  Yoshinori K. Okuji  <okuji@enbug.org>
11378         * fs/hfsplus.c (grub_hfsplus_btree_recoffset): Moved to near the
11379         top.
11380         (grub_hfsplus_btree_recptr): Likewise.
11381         (grub_hfsplus_find_block): Do not take RETRY any longer. Use
11382         FILEBLOCK both to pass a block number and store next block
11383         number.
11384         (grub_hfsplus_read_block): Rewritten heavily to support an extent
11385         overflow file correctly. Specify errors appropriately, because
11386         fshelp expects that GRUB_ERRNO is set when fails. Reuse
11387         grub_hfsplus_btree_recptr to get the pointer to a found key.
11388         (grub_hfsplus_btree_search): Return 1 instead of 0 when no match
11389         is found.
11391         * conf/i386-efi.rmk (pkgdata_MODULES): Added _linux.mod and
11392         linux.mod.
11393         (_linux_mod_SOURCES): New variable.
11394         (_linux_mod_CFLAGS): Likewise.
11395         (_linux_mod_LDFLAGS): Likewise.
11396         (linux_mod_SOURCES): Likewise.
11397         (linux_mod_CFLAGS): Likewise.
11398         (linux_mod_LDFLAGS): Likewise.
11400         * DISTLIST: Added loader/i386/efi/linux.c,
11401         loader/i386/efi/linux_normal.c and
11402         include/grub/i386/efi/loader.h.
11404         * loader/i386/efi/linux.c: New file.
11405         * loader/i386/efi/linux_normal.c: Likewise.
11406         * include/grub/i386/efi/loader.h: Likewise.
11408 2006-05-27  Yoshinori K. Okuji  <okuji@enbug.org>
11410         * commands/blocklist.c: New file.
11412         * DISTLIST: Added commands/blocklist.c.
11414         * term/efi/console.c (grub_console_highlight_color): Use a lighter
11415         color for the background, and a darker color for the foreground.
11416         (grub_console_checkkey): Return READ_KEY.
11417         (grub_console_cls): Set the background to
11418         GRUB_EFI_BACKGROUND_BLACK temporarily to clean out the screen.
11420         * kern/efi/efi.c (grub_efi_exit_boot_services): New function.
11422         * include/grub/i386/linux.h (struct linux_kernel_params): Fixed
11423         the size of "padding5", "hd0_drive_info" and "hd1_drive_info".
11425         * include/grub/efi/efi.h (grub_efi_exit_boot_services): New
11426         prototype.
11428         * include/grub/efi/api.h (GRUB_EFI_TEXT_ATTR): Do not shift
11429         BG. The spec is wrong again.
11431         * include/grub/normal.h [GRUB_UTIL] (grub_blocklist_init): New
11432         prototype.
11433         [GRUB_UTIL] (grub_blocklist_fini): Likewise.
11435         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
11436         commands/blocklist.c.
11437         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
11439         * conf/common.rmk (pkgdata_MODULES): Added blocklist.mod.
11440         (blocklist_mod_SOURCES): New variable.
11441         (blocklist_mod_CFLAGS): Likewise.
11442         (blocklist_mod_LDFLAGS): Likewise.
11444 2006-05-20  Yoshinori K. Okuji  <okuji@enbug.org>
11446         * boot/i386/pc/boot.S (real_start): Set %si earlier to eliminate
11447         duplication.
11448         (lba_mode): Use %eax more intensively to reduce the code size.
11450 2006-05-20  Marco Gerards  <marco@gnu.org>
11452         * normal/lexer.c (grub_script_yylex): Don't filter out newlines.
11454         * normal/parser.y (commandblock): Defined as <cmd>.  A subroutine
11455         for `menuentry'.
11456         (script): Accept leading newlines.
11457         (newlines): New rule to describe 0 or more newlines.
11458         (commands): Accept `command' with trailing newline.  Fixed the
11459         order in which arguments were passed to `grub_script_add_cmd'.
11460         Accept commands separated by newlines.
11461         (function): Changed to accept newlines.
11462         (menuentry) Rewritten.
11464         * normal/script.c (grub_script_create_cmdmenu): Add new entries in
11465         front of the list, instead of to the end.
11467 2006-05-19  Yoshinori K. Okuji  <okuji@enbug.org>
11469         * util/i386/pc/grub-install.in (bindir): New variable.
11470         (grub_mkimage): Use BINDIR instead of SBINDIR. Reported by Lee
11471         Shaver <lbgwjl@gmail.com>.
11473 2006-05-14  Yoshinori K. Okuji  <okuji@enbug.org>
11475         * kern/i386/pc/startup.S: Include grub/cpu/linux.h instead of
11476         grub/machine/linux.h
11477         * loader/i386/pc/linux.c: Likewise.
11479         * include/grub/i386/pc/linux.h: Moved to ...
11480         * include/grub/i386/linux.h: ... here.
11482         * include/grub/i386/linux.h (struct linux_kernel_params): New
11483         struct.
11485 2006-05-09  Vesa Jaaskelainen  <chaac@nic.fi>
11487         * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Corrected bounds
11488         checking.
11489         (grub_video_vbe_blit_glyph): Likewise.
11490         (grub_video_vbe_blit_bitmap): Likewise.
11491         (grub_video_vbe_blit_render_target): Likewise.
11493 2006-05-09  Yoshinori K. Okuji  <okuji@enbug.org>
11495         * configure.ac (--with-platform): Properly quote the square
11496         brackets.
11498 2006-05-08  Marco Gerards  <marco@gnu.org>
11500         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Renamed from
11501         this...
11502         (kernel_elf_HEADERS): ...to this.  Updated all users.
11503         (grubof_symlist.c): Renamed from this...
11504         (kernel_elf_symlist.c): ...to this.  Updated all users.
11505         (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
11506         (grubof_SOURCES): Renamed from this...
11507         (kernel_elf_SOURCES): ...to this.
11508         (grubof_HEADERS): Renamed from this...
11509         (kernel_elf_HEADERS): ...to this.
11510         (grubof_CFLAGS): Renamed from this...
11511         (kernel_elf_CFLAGS): ...to this.
11512         (grubof_ASFLAGS): Renamed from this...
11513         (kernel_elf_ASFLAGS): ...to this.
11514         (grubof_LDFLAGS): Renamed from this...
11515         (kernel_elf_LDFLAGS): ...to this.
11517         * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Renamed from
11518         this...
11519         (kernel_elf_HEADERS): ...to this.  Updated all users.
11520         (grubof_symlist.c): Renamed from this...
11521         (kernel_elf_symlist.c): ...to this.  Updated all users.
11522         (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
11523         (grubof_SOURCES): Renamed from this...
11524         (kernel_elf_SOURCES): ...to this.
11525         (grubof_HEADERS): Renamed from this...
11526         (kernel_elf_HEADERS): ...to this.
11527         (grubof_CFLAGS): Renamed from this...
11528         (kernel_elf_CFLAGS): ...to this.
11529         (grubof_ASFLAGS): Renamed from this...
11530         (kernel_elf_ASFLAGS): ...to this.
11531         (grubof_LDFLAGS): Renamed from this...
11532         (kernel_elf_LDFLAGS): ...to this.
11534         * util/powerpc/ieee1275/grub-mkimage.c (add_segments): Use
11535         `kernel.elf' instead of `grubof'.
11537 2006-05-08  Yoshinori K. Okuji  <okuji@enbug.org>
11539         Add --with-platform to configure. Use pkglibdir instead of
11540         pkgdatadir. This is reported by Roger Leigh.
11542         * util/powerpc/ieee1275/grub-install.in (datadir): Removed.
11543         (host_vendor): Likewise.
11544         (host_os): Likewise.
11545         (pkgdatadir): Likewise.
11546         (platform): New variable.
11547         (pkglibdir): Likewise.
11548         Use PKGLIBDIR instead of PKGDATADIR.
11550         * util/i386/pc/grub-install.in (datadir): Removed.
11551         (host_vendor): Likewise.
11552         (host_os): Likewise.
11553         (pkgdatadir): Likewise.
11554         (platform): New variable.
11555         (pkglibdir): Likewise.
11556         Use PKGLIBDIR instead of PKGDATADIR.
11558         * util/powerpc/ieee1275/grub-mkimage.c (usage): Use GRUB_LIBDIR
11559         instead of GRUB_DATADIR.
11560         (main): Likewise.
11561         * util/i386/pc/grub-mkimage.c (usage): Likewise.
11562         (main): Likewise.
11563         * util/i386/efi/grub-mkimage.c (usage): Likewise.
11564         (main): Likewise.
11566         * configure.ac (--with-platform): New option.
11567         Use PLATFORM instead of HOST_VENDOR to specify a platform.
11569         * Makefile.in: Include a makefile based on PLATFORM instead of
11570         HOST_VENDOR.
11571         (pkgdatadir): Not appended by the machine type.
11572         (pkglibdir): Appended by the machine type.
11573         (host_vendor): Removed.
11574         (platform): New variable.
11575         (BUILD_CPPFLAGS): Specify GRUB_LIBDIR instead of GRUB_DATADIR.
11576         (install-local): Use PKGLIBDIR instead of PKGDATADIR.
11577         (uninstall): Likewise.
11579 2006-05-07  Yoshinori K. Okuji  <okuji@enbug.org>
11581         Use the environment context in the menu. Remove the commands
11582         "default" and "timeout", and use variables instead.
11584         * normal/menu.c: Include grub/env.h.
11585         (print_entry): Cast TITLE to silence gcc.
11586         (get_timeout): New function.
11587         (set_timeout): Likewise.
11588         (get_entry_number): Likewise.
11589         (run_menu): Use a default entry, a fallback entry and a timeout
11590         in the environment variables "default", "fallback" and
11591         "timeout". Also, tweak the default entry if it is not within the
11592         current menu entries.
11593         (grub_menu_run): Use a fallback entry in the environment variable
11594         "fallback".
11596         * normal/main.c (read_config_file): Do not initialize
11597         NEWMENU->DEFAULT_ENTRY, NEWMENU->FALLBACK_ENTRY or
11598         NEWMENU->TIMEOUT.
11599         (grub_normal_execute): Use a data slot to store the menu.
11601         * include/grub/normal.h (struct grub_menu): Removed default_entry,
11602         fallback_entry and timeout.
11603         (struct grub_menu_list): Removed.
11604         (grub_menu_list_t): Likewise.
11605         (struct grub_context): Likewise.
11606         (grub_context_t): Likewise.
11607         (grub_context_get): Likewise.
11608         (grub_context_get_current_menu): Likewise.
11609         (grub_context_push_menu): Likewise.
11610         (grub_context_pop_menu): Likewise.
11611         (grub_default_init): Likewise.
11612         (grub_default_fini): Likewise.
11613         (grub_timeout_init): Likewise.
11614         (grub_timeout_fini): Likewise.
11616         * conf/sparc64-ieee1275.rmk (pkgdata_MODULES): Removed default.mod
11617         and timeout.mod.
11618         (normal_mod_SOURCES): Removed normal/context.c.
11620         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Removed
11621         commands/default.c, commands/timeout.c and normal/context.c.
11622         (normal_mod_SOURCES): Removed normal/context.c.
11624         * conf/i386-pc.rmk (grub_emu_SOURCES): Removed commands/default.c,
11625         commands/timeout.c and normal/context.c.
11626         (normal_mod_SOURCES): Removed normal/context.c.
11628         * conf/i386-efi.rmk (grub_emu_SOURCES): Removed
11629         commands/default.c, commands/timeout.c and normal/context.c.
11630         (normal_mod_SOURCES): Removed normal/context.c.
11632         * conf/common.rmk (pkgdata_MODULES): Removed default.mod and
11633         timeout.mod.
11634         (default_mod_SOURCES): Removed.
11635         (default_mod_CFLAGS): Likewise.
11636         (default_mod_LDFLAGS): Likewise.
11637         (timeout_mod_SOURCES): Removed.
11638         (timeout_mod_CFLAGS): Likewise.
11639         (timeout_mod_LDFLAGS): Likewise.
11641         * DISTLIST: Removed commands/default.c, commands/timeout.c and
11642         normal/context.c.
11644         * commands/default.c: Removed.
11645         * commands/timeout.c: Likewise.
11646         * normal/context.c: Likewise.
11648 2006-05-07  Vesa Jaaskelainen  <chaac@nic.fi>
11650         * kern/i386/pc/startup.S (grub_exit): Added missing .code32 tag.
11652 2006-05-02  Yoshinori K. Okuji  <okuji@enbug.org>
11654         * kern/env.c (struct grub_env_context): Removed "sorted". Renamed
11655         "next" to "prev" for readability.
11656         (struct grub_env_sorted_var): New struct.
11657         (grub_env_context): Renamed to ...
11658         (initial_context): ... this.
11659         (grub_env_var_context): Renamed to ...
11660         (current_context): ... this.
11661         (grub_env_find): Look only at CURRENT_CONTEXT.
11662         (grub_env_context_open): Rewritten to copy exported variables from
11663         previous context.
11664         (grub_env_context_close): Rewritten according to the new
11665         scheme. Also, add an assertion to prevent the initial context from
11666         removed.
11667         (grub_env_insert): Removed the code for the sorted list.
11668         (grub_env_remove): Likewise.
11669         (grub_env_export): Simply mark the variable with
11670         GRUB_ENV_VAR_GLOBAL.
11671         (grub_env_set): A cosmetic change for naming consistency.
11672         (grub_env_get): Likewise.
11673         (grub_env_unset): Likewise.
11674         (grub_env_iterate): Rewritten to sort variables within this
11675         function.
11676         (grub_register_variable_hook): Fixed for naming consistency. Call
11677         grub_env_find again, only if NAME is not found at the first time.
11678         (mangle_data_slot_name): New function.
11679         (grub_env_set_data_slot): Likewise.
11680         (grub_env_get_data_slot): Likewise.
11681         (grub_env_unset_data_slot): Likewise.
11683         * include/grub/env.h (grub_env_var_type): New enum.
11684         (GRUB_ENV_VAR_LOCAL): New constant.
11685         (GRUB_ENV_VAR_GLOBAL): Likewise.
11686         (GRUB_ENV_VAR_DATA): Likewise.
11687         (struct grub_env_var): Removed "sort_next" and "sort_prevp". Added
11688         "type".
11689         (grub_env_set): Replace VAR with NAME for consistency.
11690         (grub_register_variable_hook): Likewise.
11691         (grub_env_export): Specify the name of the argument.
11692         (grub_env_set_data_slot): New prototype.
11693         (grub_env_get_data_slot): Likewise.
11694         (grub_env_unset_data_slot): Likewise.
11696 2006-04-30  Yoshinori K. Okuji  <okuji@enbug.org>
11698         Extend the loader so that GRUB can accept a loader which comes
11699         back to GRUB when a loaded image exits. Also, this change adds
11700         support for a chainloader on EFI.
11702         * term/efi/console.c: Include grub/misc.h.
11703         (grub_console_checkkey): Display a scan code on the top for
11704         debugging. This will be removed once the EFI port gets stable.
11705         Correct the scan code mapping.
11707         * kern/efi/mm.c (sort_memory_map): Sort in a descending order to
11708         allocate memory from larger regions, in order to reduce the number
11709         of allocated regions. Otherwise, the MacOSX loader panics.
11710         (filter_memory_map): Avoid less than 1MB for compatibility with
11711         other loaders.
11712         (add_memory_regions): Allocate from the tail of a region, if
11713         possible, to avoid allocating a region near to 1MB, for the MacOSX
11714         loader.
11716         * kern/efi/init.c (grub_efi_set_prefix): Specify
11717         GRUB_EFI_IMAGE_HANDLE to grub_efi_get_loaded_image.
11719         * kern/efi/efi.c (grub_efi_get_loaded_image): Accept a new
11720         argument IMAGE_HANDLE and specify it to get a loaded image.
11721         (grub_arch_modules_addr): Specify GRUB_EFI_IMAGE_HANDLE to
11722         grub_efi_get_loaded_image.
11723         (grub_efi_get_filename): Divide the length by the size of
11724         grub_efi_char16_t.
11725         (grub_efi_get_device_path): New function.
11726         (grub_efi_print_device_path): Print End Device Path nodes. Divide
11727         the length by the size of grub_efi_char16_t for a file path device
11728         path node.
11730         * kern/loader.c (grub_loader_noreturn): New variable.
11731         (grub_loader_set): Accept a new argument NORETURN. Set
11732         GRUB_LOADER_NORETURN to NORETURN.
11733         All callers changed.
11734         (grub_loader_boot): If GRUB_LOADER_NORETURN is false, do not call
11735         grub_machine_fini.
11737         * include/grub/efi/efi.h (grub_efi_get_device_path): New
11738         prototype.
11739         (grub_efi_get_loaded_image): Take an argument to specify an image
11740         handle.
11742         * include/grub/loader.h (grub_loader_set): Added one more argument
11743         NORETURN.
11745         * disk/efi/efidisk.c (make_devices): Use grub_efi_get_device_path
11746         instead of grub_efi_open_protocol.
11747         (grub_efidisk_get_device_name): Likewise.
11748         (grub_efidisk_close): Print a newline.
11749         (grub_efidisk_get_device_handle): Fixed to use
11750         GRUB_EFI_DEVICE_PATH_SUBTYPE instead of
11751         GRUB_EFI_DEVICE_PATH_TYPE.
11753         * disk/efi/efidisk.c (device_path_guid): Moved to ...
11754         * kern/efi/efi.c (device_path_guid): ... here.
11756         * conf/i386-efi.rmk (pkgdata_MODULES): Added _chain.mod and
11757         chain.mod.
11758         (kernel_mod_HEADERS): Added efi/disk.h.
11759         (_chain_mod_SOURCES): New variable.
11760         (_chain_mod_CFLAGS): Likewise.
11761         (_chain_mod_LDFLAGS): Likewise.
11762         (chain_mod_SOURCES): Likewise.
11763         (chain_mod_CFLAGS): Likewise.
11764         (chain_mod_LDFLAGS): Likewise.
11766         * DISTLIST: Added include/grub/efi/chainloader.h,
11767         loader/efi/chainloader.c and loader/efi/chainloader_normal.c.
11769         * include/grub/efi/chainloader.h: New file.
11770         * loader/efi/chainloader.c: Likewise.
11771         * loader/efi/chainloader_normal.c: Likewise.
11773 2006-04-30  Marco Gerards  <marco@gnu.org>
11775         * commands/configfile.c (grub_cmd_source): New function.
11776         (GRUB_MOD_INIT): Register the commands `source' and `.'.
11777         (GRUB_MOD_FINI): De-register the commands `source' and `.'.
11779 2006-04-30  Marco Gerards  <marco@gnu.org>
11781         * normal/execute.c (grub_script_execute_cmd): Change the return
11782         type to `grub_err_t'.  Correctly return the error.
11783         (grub_script_execute_cmdline): In case a command line is not a
11784         command or a function, try to interpret it as an assignment.
11786 2006-04-30  Yoshinori K. Okuji  <okuji@enbug.org>
11788         * fs/hfsplus.c (grub_hfsplus_read_block): Fixed a memory leak.
11789         (grub_hfsplus_iterate_dir): Reordered to skip unknown nodes. Also,
11790         skip a node whose name is obviously invalid as UTF-16,
11791         i.e. contains a NUL character. Stop the iteration when the last
11792         directory entry is found. Instead of using the return value of
11793         grub_hfsplus_btree_iterate_node, store the value in RET and use
11794         it, because the iterator can be stopped by the last directory
11795         entry.
11797 2006-04-30  Marco Gerards  <marco@gnu.org>
11799         * include/grub/env.h (grub_env_export): New prototype.  Reported
11800         by Jan C. Kleinsorge <jan.kleinsorge@udo.edu>.
11802 2006-04-30  Marco Gerards  <marco@gnu.org>
11804         * fs/hfsplus.c (grub_hfsplus_iterate_dir): Correctly calculate the
11805         size of the extents in a catalog file record.
11807 2006-04-29  Marco Gerards  <marco@gnu.org>
11809         * commands/configfile.c (grub_cmd_configfile): Execute the
11810         configfile within its own context.
11812         * include/grub/env.h (grub_env_context_open): New prototype.
11813         (grub_env_context_close): Likewise.
11815         * kern/env.c (grub_env): Removed.
11816         (grub_env_sorted): Likewise.
11817         (grub_env_context): New variable.
11818         (grub_env_var_context): Likewise.
11819         (grub_env_find): Search both the active context and the global
11820         context.
11821         (grub_env_context_open): New function.
11822         (grub_env_context_close): Likewise.
11823         (grub_env_insert): Likewise.
11824         (grub_env_remove): Likewise.
11825         (grub_env_export): Likewise.
11826         (grub_env_set): Changed to use helper functions to avoid code
11827         duplication.
11828         (grub_env_iterate): Rewritten so both the current context and the
11829         global context are being used.
11831         * normal/command.c (export_command): New function.
11832         (grub_command_init): Register the `export' function.
11834 2006-04-26  Yoshinori K. Okuji  <okuji@enbug.org>
11836         * util/i386/pc/grub-mkimage.c (compress_kernel): Cast arguments
11837         explicitly to suppress gcc's warnings.
11838         * fs/fat.c (grub_fat_find_dir): Likewise.
11839         (grub_fat_label): Likewise.
11840         * fs/xfs.c (grub_xfs_read_inode): Likewise.
11841         (grub_xfs_mount): Likewise.
11842         (grub_xfs_label): Likewise.
11843         * fs/affs.c (grub_affs_mount): Likewise.
11844         (grub_affs_label): Likewise.
11845         (grub_affs_iterate_dir): Likewise.
11846         * fs/sfs.c (grub_sfs_mount): Likewise.
11847         (grub_sfs_iterate_dir): Likewise.
11848         * fs/ufs.c (grub_ufs_lookup_symlink): Likewise.
11849         * fs/hfs.c (grub_hfs_mount): Likewise.
11850         (grub_hfs_cmp_catkeys): Likewise.
11851         (grub_hfs_find_dir): Likewise.
11852         (grub_hfs_dir): Likewise.
11853         (grub_hfs_label): Likewise.
11854         * fs/jfs.c (grub_jfs_mount): Likewise.
11855         (grub_jfs_opendir): Likewise.
11856         (grub_jfs_getent): Likewise.
11857         (grub_jfs_lookup_symlink): Likewise.
11858         (grub_jfs_label): Likewise.
11859         * fs/hfsplus.c (grub_hfsplus_cmp_catkey): Likewise.
11860         (grub_hfsplus_iterate_dir): Likewise.
11861         (grub_hfsplus_btree_iterate_node): Made static.
11863         * util/grub-emu.c (prefix): New variable.
11864         (grub_machine_set_prefix): New function.
11865         (main): Do not set the environment variable "prefix" here. Only
11866         set PREFIX, which is used later by grub_machine_set_prefix.
11868         * include/grub/video.h: Do not include grub/symbol.h.
11869         (grub_video_register): Not exported. This symbol is not defined in
11870         the kernel.
11871         (grub_video_unregister): Likewise.
11872         (grub_video_iterate): Likewise.
11873         (grub_video_setup): Likewise.
11874         (grub_video_restore): Likewise.
11875         (grub_video_get_info): Likewise.
11876         (grub_video_get_blit_format): Likewise.
11877         (grub_video_set_palette): Likewise.
11878         (grub_video_get_palette): Likewise.
11879         (grub_video_set_viewport): Likewise.
11880         (grub_video_get_viewport): Likewise.
11881         (grub_video_map_color): Likewise.
11882         (grub_video_map_rgb): Likewise.
11883         (grub_video_map_rgba): Likewise.
11884         (grub_video_fill_rect): Likewise.
11885         (grub_video_blit_glyph): Likewise.
11886         (grub_video_blit_bitmap): Likewise.
11887         (grub_video_blit_render_target): Likewise.
11888         (grub_video_scroll): Likewise.
11889         (grub_video_swap_buffers): Likewise.
11890         (grub_video_create_render_target): Likewise.
11891         (grub_video_delete_render_target): Likewise.
11892         (grub_video_set_active_render_target): Likewise.
11894         * include/grub/symbol.h [GRUB_SYMBOL_GENERATOR] (EXPORT_FUNC):
11895         Undefined.
11896         [GRUB_SYMBOL_GENERATOR] (EXPORT_VAR): Likewise.
11898         * conf/sparc64-ieee1275.rmk (grubof_symlist.c): Depended on
11899         config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
11900         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
11901         instead of $(srcdir)/genkernsyms.sh.
11903         * conf/powerpc-ieee1275.rmk (grubof_symlist.c): Depended on
11904         config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
11905         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
11906         instead of $(srcdir)/genkernsyms.sh.
11908         * conf/i386-pc.rmk (symlist.c): Depended on config.h. Use
11909         gensymlist.sh instead of $(srcdir)/gensymlist.sh.
11910         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
11911         instead of $(srcdir)/genkernsyms.sh.
11913         * conf/i386-efi.rmk (symlist.c): Depended on config.h. Use
11914         gensymlist.sh instead of $(srcdir)/gensymlist.sh.
11915         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
11916         instead of $(srcdir)/genkernsyms.sh.
11918         * configure.ac (AC_CONFIG_FILES): Added gensymlist.sh and
11919         genkernsyms.sh.
11921         * Makefile.in (DISTCLEANFILES): Added gensymlist.sh and
11922         genkernsyms.sh.
11923         (gensymlist.sh): New target.
11924         (genkernsyms.sh): Likewise.
11926         * DISTLIST: Removed genkernsyms.sh and gensymlist.sh. Added
11927         genkernsyms.sh.in and gensymlist.sh.in.
11929         * genkernsyms.sh: Removed.
11930         * gensymlist.sh: Likewise.
11932         * genkernsyms.sh.in: New file.
11933         * gensymlist.sh.in: Likewise.
11935 2006-04-25  Hollis Blanchard  <hollis@penguinppc.org>
11937         * kern/powerpc/ieee1275/init.c (grub_machine_set_prefix): Do not
11938         clobber "prefix", since we may have already set it manually.
11940 2006-04-25  Hollis Blanchard  <hollis@penguinppc.org>
11942         * kern/misc.c (abort): New alias for grub_abort.
11944 2006-04-25  Yoshinori K. Okuji  <okuji@enbug.org>
11946         A new machine-specific function "grub_machine_set_prefix" is
11947         defined. This is called after loading modules, so that a prefix
11948         initialization can use modules. Also, this change adds an
11949         intensive debugging feature for the memory manager via the
11950         configure option "--enable-mm-debug".
11952         * partmap/gpt.c (gpt_partition_map_iterate): Add one more into
11953         PART.LEN.
11955         * kern/sparc64/ieee1275/init.c (abort): Removed.
11956         (grub_stop): Likewise.
11957         (grub_exit): New function.
11958         (grub_set_prefix): Renamed to ...
11959         (grub_machine_set_prefix): ... this.
11960         (grub_machine_init): Do not call grub_set_prefix.
11962         * kern/powerpc/ieee1275/init.c (grub_set_prefix): Renamed to ...
11963         (grub_machine_set_prefix): ... this.
11964         (grub_machine_init): Do not call grub_set_prefix.
11966         * kern/i386/pc/init.c (grub_machine_set_prefix): New function.
11967         (grub_machine_init): Do not set the prefix here.
11969         * kern/i386/efi/init.c (grub_machine_set_prefix): New function.
11971         * kern/efi/init.c: Include grub/mm.h.
11972         (grub_efi_set_prefix): New function.
11974         * kern/efi/efi.c (grub_exit): Call grub_efi_fini.
11975         (grub_efi_get_filename): New function.
11976         (grub_print_device_path): Renamed to ...
11977         (grub_efi_print_device_path): ... this.
11979         * kern/mm.c [MM_DEBUG] (grub_malloc): Undefined.
11980         [MM_DEBUG] (grub_realloc): Likewise.
11981         [MM_DEBUG] (grub_free): Likewise.
11982         [MM_DEBUG] (grub_memalign): Likewise.
11983         [MM_DEBUG] (grub_mm_debug): New variable.
11984         [MM_DEBUG] (grub_debug_malloc): New function.
11985         [MM_DEBUG] (grub_debug_free): New function.
11986         [MM_DEBUG] (grub_debug_realloc): New function.
11987         [MM_DEBUG] (grub_debug_memalign): New function.
11989         * kern/misc.c (grub_abort): Print a newline to distinguish
11990         the message.
11992         * kern/main.c (grub_main): Call grub_machine_set_prefix and
11993         grub_set_root_dev after loading modules. This is necessary when
11994         setting a prefix depends on modules.
11996         * include/grub/efi/efi.h (grub_print_device_path): Renamed to ...
11997         (grub_efi_print_device_path): ... this.
11998         (grub_efi_get_filename): New prototype.
11999         (grub_efi_set_prefix): Likewise.
12001         * include/grub/efi/disk.h: Include grub/efi/api.h, grub/symbol.h
12002         and grub/disk.h.
12003         (grub_efidisk_get_device_handle): New prototype.
12004         (grub_efidisk_get_device_name): Likewise.
12006         * include/grub/mm.h: Include config.h.
12007         (MM_DEBUG): Removed.
12008         [MM_DEBUG && !GRUB_UTIL] (grub_mm_debug): New prototype.
12009         [MM_DEBUG && !GRUB_UTIL] (grub_malloc): New macro.
12010         [MM_DEBUG && !GRUB_UTIL] (grub_realloc): Likewise.
12011         [MM_DEBUG && !GRUB_UTIL] (grub_memalign): Likewise.
12012         [MM_DEBUG && !GRUB_UTIL] (grub_free): Likewise.
12013         [MM_DEBUG && !GRUB_UTIL] (grub_debug_malloc): New prototype.
12014         [MM_DEBUG && !GRUB_UTIL] (grub_debug_realloc): New prototype.
12015         [MM_DEBUG && !GRUB_UTIL] (grub_debug_memalign): New prototype.
12016         [MM_DEBUG && !GRUB_UTIL] (grub_debug_free): New prototype.
12018         * include/grub/kernel.h (grub_machine_set_prefix): New prototype.
12020         * disk/efi/efidisk.c: Include grub/partition.h.
12021         (iterate_child_devices): New function.
12022         (add_device): First, compare only last device path nodes, so that
12023         devices are sorted by the types.
12024         (grub_efidisk_get_device_handle): New function.
12025         (grub_efidisk_get_device_name): Likewise.
12027         * configure.ac (--enable-mm-debug): New option to enable the
12028         memory manager debugging feature. This makes the binary much
12029         bigger, so is disabled by default.
12031 2006-04-23  Yoshinori K. Okuji  <okuji@enbug.org>
12033         Use grub_abort instead of grub_stop, and grub_exit must be
12034         define in each architecture now. Also, this change adds support
12035         for EFI disks.
12037         * util/i386/pc/grub-probefs.c: Include grub/term.h.
12038         (grub_getkey): New function.
12039         (grub_term_get_current): Likewise.
12041         * util/i386/pc/grub-setup.c: Include grub/term.h.
12042         (grub_getkey): New function.
12043         (grub_term_get_current): Likewise.
12045         * util/misc.c (grub_stop): Renamed to ...
12046         (grub_exit): ... this.
12048         * kern/powerpc/ieee1275/init.c (abort): Renamed to ...
12049         (grub_exit): ... this.
12050         (grub_machine_init): Use grub_abort instead of abort.
12051         (grub_stop): Removed.
12053         * kern/powerpc/ieee1275/cmain.c (cmain): Use grub_abort instead of
12054         abort.
12056         * kern/i386/pc/startup.S (grub_exit): New function.
12057         (cold_reboot): New label.
12059         * kern/efi/init.c: Include grub/efi/disk.h and grub/env.h.
12060         (grub_efi_init): Call grub_efidisk_init.
12061         (grub_efi_fini): Call grub_efidisk_fini.
12063         * kern/efi/efi.c: Include grub/mm.h.
12064         (grub_efi_console_control_guid): Renamed to ...
12065         (console_control_guid): ... this.
12066         (grub_efi_loaded_image_guid): Renamed to ...
12067         (loaded_image_guid): ... this.
12068         (grub_efi_locate_handle): New function.
12069         (grub_efi_open_protocol): Likewise.
12070         (grub_efi_set_text_mode): Use CONSOLE_CONTROL_GUID instead of
12071         GRUB_EFI_CONSOLE_CONTROL_GUID.
12072         (grub_efi_exit): Removed.
12073         (grub_stop): Likewise.
12074         (grub_efi_get_loaded_image): Use grub_efi_open_protocol.
12075         (grub_exit): New function.
12076         (grub_print_device_path): Likewise.
12078         * kern/rescue.c (grub_rescue_cmd_exit): New function.
12079         (grub_enter_rescue_mode): Register "exit".
12081         * kern/misc.c (grub_real_dprintf): A cosmetic change.
12082         (grub_abort): New function.
12084         * kern/err.c (grub_fatal): Use grub_abort instead of grub_stop.
12086         * include/grub/sparc64/ieee1275/kernel.h (abort): Removed.
12088         * include/grub/powerpc/ieee1275/kernel.h (abort): Removed.
12090         * include/grub/efi/efi.h (grub_efi_exit): Removed.
12091         (grub_print_device_path): New prototype.
12092         (grub_efi_locate_handle): Likewise.
12093         (grub_efi_open_protocol): Likewise.
12095         * include/grub/efi/disk.h (grub_efidisk_fini): New file.
12096         * disk/efi/efidisk.c: Likewise.
12098         * DISTLIST: Added disk/efi/efidisk.c and include/grub/efi/disk.h.
12100         * include/grub/efi/console_control.h
12101         (GRUB_EFI_CONSOLE_CONTROL_GUID): Use an array for the last 8 bytes.
12103         * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): Specify the
12104         last 8 bytes as an array.
12105         (GRUB_EFI_DISK_IO_GUID): New macro.
12106         (GRUB_EFI_BLOCK_IO_GUID): Likewise.
12107         (GRUB_EFI_DEVICE_PATH_GUID): Likewise.
12108         (grub_efi_ipv6_address_t): Change the type to grub_uint16_t from
12109         grub_uint8_t.
12110         (struct grub_efi_guid): Use an array to specify the last 8 bytes.
12111         (struct grub_efi_device_path): Rename the member "sub_type" to
12112         "subtype".
12113         (GRUB_EFI_DEVICE_PATH_TYPE): New macro.
12114         (GRUB_EFI_DEVICE_PATH_SUBTYPE): Likewise.
12115         (GRUB_EFI_DEVICE_PATH_LENGTH): Likewise.
12116         (GRUB_EFI_END_DEVICE_PATH_TYPE): Likewise.
12117         (GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE): Likewise.
12118         (GRUB_EFI_END_THIS_DEVICE_PATH_SUBTYPE): Likewise.
12119         (GRUB_EFI_END_ENTIRE_DEVICE_PATH): Likewise.
12120         (GRUB_EFI_NEXT_DEVICE_PATH): Likewise.
12121         (GRUB_EFI_HARDWARE_DEVICE_PATH_TYPE): Likewise.
12122         (GRUB_EFI_PCI_DEVICE_PATH_SUBTYPE): Likewise.
12123         (struct grub_efi_pci_device_path): New structure.
12124         (grub_efi_pci_device_path_t): New type.
12125         (GRUB_EFI_PCCARD_DEVICE_PATH_SUBTYPE): New macro.
12126         (struct grub_efi_pccard_device_path): New structure.
12127         (grub_efi_pccard_device_path_t): New type.
12128         (GRUB_EFI_MEMORY_MAPPED_DEVICE_PATH_SUBTYPE): New macro.
12129         (struct grub_efi_memory_mapped_device_path): New structure.
12130         (grub_efi_memory_mapped_device_path_t): New type.
12131         (GRUB_EFI_VENDOR_DEVICE_PATH_SUBTYPE): New macro.
12132         (struct grub_efi_vendor_device_path): New structure.
12133         (grub_efi_vendor_device_path_t): New type.
12134         (GRUB_EFI_CONTROLLER_DEVICE_PATH_SUBTYPE): New macro.
12135         (struct grub_efi_controller_device_path): New structure.
12136         (grub_efi_controller_device_path_t): New type.
12137         (GRUB_EFI_ACPI_DEVICE_PATH_TYPE): New macro.
12138         (GRUB_EFI_ACPI_DEVICE_PATH_SUBTYPE): Likewise.
12139         (struct grub_efi_acpi_device_path): New structure.
12140         (grub_efi_acpi_device_path_t): New type.
12141         (GRUB_EFI_EXPANDED_ACPI_DEVICE_PATH_SUBTYPE): New macro.
12142         (struct grub_efi_expanded_acpi_device_path): New structure.
12143         (grub_efi_expanded_acpi_device_path_t): New type.
12144         (GRUB_EFI_EXPANDED_ACPI_HIDSTR): New macro.
12145         (GRUB_EFI_EXPANDED_ACPI_UIDSTR): Likewise.
12146         (GRUB_EFI_EXPANDED_ACPI_CIDSTR): Likewise.
12147         (GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE): Likewise.
12148         (GRUB_EFI_ATAPI_DEVICE_PATH_SUBTYPE): Likewise.
12149         (struct grub_efi_atapi_device_path): New structure.
12150         (grub_efi_atapi_device_path_t): New type.
12151         (GRUB_EFI_FIBRE_CHANNEL_DEVICE_PATH_SUBTYPE): New macro.
12152         (struct grub_efi_fibre_channel_device_path): New structure.
12153         (grub_efi_fibre_channel_device_path_t): New type.
12154         (GRUB_EFI_1394_DEVICE_PATH_SUBTYPE): New macro.
12155         (struct grub_efi_1394_device_path): New structure.
12156         (grub_efi_1394_device_path_t): New type.
12157         (GRUB_EFI_USB_DEVICE_PATH_SUBTYPE): New macro.
12158         (struct grub_efi_usb_device_path): New structure.
12159         (grub_efi_usb_device_path_t): New type.
12160         (GRUB_EFI_USB_CLASS_DEVICE_PATH_SUBTYPE): New macro.
12161         (struct grub_efi_usb_class_device_path): New structure.
12162         (grub_efi_usb_class_device_path_t): New type.
12163         (GRUB_EFI_I2O_DEVICE_PATH_SUBTYPE): New macro.
12164         (struct grub_efi_i2o_device_path): New structure.
12165         (grub_efi_i2o_device_path_t): New type.
12166         (GRUB_EFI_MAC_ADDRESS_DEVICE_PATH_SUBTYPE): New macro.
12167         (struct grub_efi_mac_address_device_path): New structure.
12168         (grub_efi_mac_address_device_path_t): New type.
12169         (GRUB_EFI_IPV4_DEVICE_PATH_SUBTYPE): New macro.
12170         (struct grub_efi_ipv4_device_path): New structure.
12171         (grub_efi_ipv4_device_path_t): New type.
12172         (GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE): New macro.
12173         (struct grub_efi_ipv6_device_path): New structure.
12174         (grub_efi_ipv6_device_path_t): New type.
12175         (GRUB_EFI_INFINIBAND_DEVICE_PATH_SUBTYPE): New macro.
12176         (struct grub_efi_infiniband_device_path): New structure.
12177         (grub_efi_infiniband_device_path_t): New type.
12178         (GRUB_EFI_UART_DEVICE_PATH_SUBTYPE): New macro.
12179         (struct grub_efi_uart_device_path): New structure.
12180         (grub_efi_uart_device_path_t): New type.
12181         (GRUB_EFI_VENDOR_MESSAGING_DEVICE_PATH_SUBTYPE): New macro.
12182         (struct grub_efi_vendor_messaging_device_path): New structure.
12183         (grub_efi_vendor_messaging_device_path_t): New type.
12184         (GRUB_EFI_MEDIA_DEVICE_PATH_TYPE): New macro.
12185         (GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE): Likewise.
12186         (struct grub_efi_hard_drive_device_path): New structure.
12187         (grub_efi_hard_drive_device_path_t): New type.
12188         (GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE): New macro.
12189         (struct grub_efi_cdrom_device_path): New structure.
12190         (grub_efi_cdrom_device_path_t): New type.
12191         (GRUB_EFI_VENDOR_MEDIA_DEVICE_PATH_SUBTYPE): New macro.
12192         (struct grub_efi_vendor_media_device_path): New structure.
12193         (grub_efi_vendor_media_device_path_t): New type.
12194         (GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE): New macro.
12195         (struct grub_efi_file_path_device_path): New structure.
12196         (grub_efi_file_path_device_path_t): New type.
12197         (GRUB_EFI_PROTOCOL_DEVICE_PATH_SUBTYPE): New macro.
12198         (struct grub_efi_protocol_device_path): New structure.
12199         (grub_efi_protocol_device_path_t): New type.
12200         (GRUB_EFI_BIOS_DEVICE_PATH_TYPE): New macro.
12201         (GRUB_EFI_BIOS_DEVICE_PATH_SUBTYPE): Likewise.
12202         (struct grub_efi_bios_device_path): New structure.
12203         (grub_efi_bios_device_path_t): New type.
12204         (struct grub_efi_disk_io): New structure.
12205         (grub_efi_disk_io_t): New type.
12206         (struct grub_efi_block_io_media): New structure.
12207         (grub_efi_block_io_media_t): New type.
12208         (struct grub_efi_block_io): New structure.
12209         (grub_efi_block_io_t): New type.
12211         * include/grub/misc.h (grub_stop): Removed.
12212         (grub_exit): New prototype.
12213         (grub_abort): Likewise.
12215         * include/grub/disk.h (enum grub_disk_dev_id): Added
12216         GRUB_DISK_DEVICE_EFIDISK_ID.
12218         * conf/i386-efi.rmk (kernel_mod_SOURCES): Added
12219         disk/efi/efidisk.c.
12220         (kernel_syms.lst): Remove the target if an error occurs.
12222 2006-04-22  Yoshinori K. Okuji  <okuji@enbug.org>
12224         * kern/misc.c (grub_lltoa): Rewritten the decimal conversion part,
12225         as it was simply too buggy.
12227 2006-04-21  Yoshinori K. Okuji  <okuji@enbug.org>
12229         * kern/misc.c (grub_lltoa): New function.
12230         (grub_vsprintf): Added support for the long long suffix,
12231         i.e. "ll".
12233 2006-04-20  Hollis Blanchard  <hollis@penguinppc.org>
12235         * Makefile.in (LDFLAGS): Add variable.
12236         (LD): Remove variable.
12237         * configure.ac: Add -m32 to LDFLAGS.
12238         * genmk.rb (PModule#rule): Use $(CC) instead of $(LD).
12239         * conf/powerpc-ieee1275.rmk (COMMON_LDFLAGS): Add variable.
12240         (grubof_LDFLAGS): Use $(COMMON_LDFLAGS).
12241         (_linux_mod_LDFLAGS, linux_mod_LDFLAGS, normal_mod_LDFLAGS,
12242         suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS): New
12243         variables.
12244         * conf/sparc64-ieee1275.rmk (COMMON_LDFLAGS): Add -nostdlib.
12245         * conf/i386-pc.rmk (COMMON_LDFLAGS): Add -nostdlib.
12246         * conf/i386-efi.rmk (COMMON_LDFLAGS): Add -nostdlib.
12248 2006-04-20  Vesa Jaaskelainen  <chaac@nic.fi>
12250         * term/gfxterm.c (grub_gfxterm_getcharwidth): Fixed character
12251         length for unknown glyph.
12253 2006-04-20  Yoshinori K. Okuji  <okuji@enbug.org>
12255         Add support for pre-loaded modules into the EFI port.
12257         * util/i386/efi/grub-mkimage.c (make_mods_section): Rewritten
12258         completely. Accept one more argument DIR. The caller has changed.
12260         * kern/i386/efi/init.c (grub_arch_modules_addr): Removed.
12262         * kern/efi/efi.c: Include grub/efi/pe32.h and grub/kernel.h.
12263         (grub_efi_loaded_image_guid): New variable.
12264         (grub_efi_get_loaded_image): New function.
12265         (grub_arch_modules_addr): Likewise.
12267         * include/grub/efi/efi.h (grub_efi_get_loaded_image): New
12268         prototype.
12270         * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): New macro.
12271         (struct grub_efi_loaded_image): New structure.
12272         (grub_efi_loaded_image_t): New type.
12274 2006-04-20  Yoshinori K. Okuji  <okuji@enbug.org>
12276         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Compare the file
12277         size with GRUB_OS_AREA_SIZE as grub_size_t instead of
12278         grub_ssize_t. Reported by Jeff Chua <jeff84@silk.corp.fedex.com>.
12280 2006-04-19  Roger Leigh  <rleigh@whinlatter.ukfsn.org>
12282         * DISTLIST: Added `util/powerpc/ieee1275/grub-install.in'.
12284 2006-04-19  Yoshinori K. Okuji  <okuji@enbug.org>
12286         * DISTLIST: Added include/grub/efi/console.h,
12287         include/grub/efi/time.h, include/grub/i386/efi/kernel.h,
12288         kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
12290         * include/grub/efi/console.h: New file.
12291         * include/grub/efi/time.h: Likewise.
12292         * include/grub/i386/efi/kernel.h: Likewise.
12293         * kern/efi/init.c: Likewise.
12294         * kern/efi/mm.c: Likewise.
12295         * term/efi/console.c: Likewise.
12297         * kern/i386/efi/init.c: Do not include grub/machine/time.h.
12298         (grub_stop): Removed.
12299         (grub_get_rtc): Likewise.
12300         (grub_machine_init): Simply call grub_efi_init.
12301         (grub_machine_fini): Call grub_efi_fini.
12303         * kern/efi/efi.c: Include grub/machine/time.h and grub/term.h.
12304         (grub_efi_output_string): Removed.
12305         (grub_efi_stall): New function.
12306         (grub_stop): Likewise.
12307         (grub_get_rtc): Likewise.
12309         * include/grub/efi/efi.h (grub_efi_output_string): Removed.
12310         (grub_efi_stall): New prototype.
12311         (grub_efi_allocate_pages): Likewise.
12312         (grub_efi_free_pages): Likewise.
12313         (grub_efi_get_memory_map): Likewise.
12314         (grub_efi_mm_init): Likewise.
12315         (grub_efi_mm_fini): Likewise.
12316         (grub_efi_init): Likewise.
12317         (grub_efi_fini): Likewise.
12319         * include/grub/i386/efi/time.h: Do not include
12320         grub/symbol.h. Include grub/efi/time.h.
12321         (GRUB_TICKS_PER_SECOND): Removed.
12322         (grub_get_rtc): Likewise.
12324         * include/grub/efi/api.h (struct grub_efi_memory_descriptor):
12325         Added padding. The EFI spec is buggy.
12326         (GRUB_EFI_BLACK): New macro.
12327         (GRUB_EFI_BLUE): Likewise.
12328         (GRUB_EFI_GREEN): Likewise.
12329         (GRUB_EFI_CYAN): Likewise.
12330         (GRUB_EFI_RED): Likewise.
12331         (GRUB_EFI_MAGENTA): Likewise.
12332         (GRUB_EFI_BROWN): Likewise.
12333         (GRUB_EFI_LIGHTGRAY): Likewise.
12334         (GRUB_EFI_BRIGHT): Likewise.
12335         (GRUB_EFI_DARKGRAY): Likewise.
12336         (GRUB_EFI_LIGHTBLUE): Likewise.
12337         (GRUB_EFI_LIGHTGREEN): Likewise.
12338         (GRUB_EFI_LIGHTCYAN): Likewise.
12339         (GRUB_EFI_LIGHTRED): Likewise.
12340         (GRUB_EFI_LIGHTMAGENTA): Likewise.
12341         (GRUB_EFI_YELLOW): Likewise.
12342         (GRUB_EFI_WHITE): Likewise.
12343         (GRUB_EFI_BACKGROUND_BLACK): Likewise.
12344         (GRUB_EFI_BACKGROUND_BLUE): Likewise.
12345         (GRUB_EFI_BACKGROUND_GREEN): Likewise.
12346         (GRUB_EFI_BACKGROUND_CYAN): Likewise.
12347         (GRUB_EFI_BACKGROUND_RED): Likewise.
12348         (GRUB_EFI_BACKGROUND_MAGENTA): Likewise.
12349         (GRUB_EFI_BACKGROUND_BROWN): Likewise.
12350         (GRUB_EFI_BACKGROUND_LIGHTGRAY): Likewise.
12351         (GRUB_EFI_TEXT_ATTR): Likewise.
12353         * conf/i386-efi.rmk (kernel_mod_SOURCES): Added kern/efi/efi.c,
12354         kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
12355         (kernel_mod_HEADERS): Added efi/time.h.
12357 2006-04-18  Yoshinori K. Okuji  <okuji@enbug.org>
12359         * DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
12360         include/grub/efi/api.h, include/grub/efi/console_control.h,
12361         include/grub/efi/efi.h, include/grub/efi/pe32.h,
12362         include/grub/i386/efi/time.h, kern/efi/efi.c,
12363         kern/i386/efi/init.c, kern/i386/efi/startup.S,
12364         and util/i386/efi/grub-mkimage.c.
12366         * Makefile.in (RMKFILES): Added i386-efi.rmk.
12368         * genmk.rb (PModule#rule): Do not export symbols if
12369         #{prefix}_EXPORTS is set to "no".
12371         * conf/i386-efi.mk: New file.
12372         * conf/i386-efi.rmk: Likewise.
12373         * include/grub/efi/api.h: Likewise.
12374         * include/grub/efi/console_control.h: Likewise.
12375         * include/grub/efi/efi.h: Likewise.
12376         * include/grub/efi/pe32.h: Likewise.
12377         * include/grub/i386/efi/time.h: Likewise.
12378         * kern/efi/efi.c: Likewise.
12379         * kern/i386/efi/init.c: Likewise.
12380         * kern/i386/efi/startup.S: Likewise.
12381         * util/i386/efi/grub-mkimage.c: Likewise.
12383 2006-04-17  Marco Gerards  <marco@gnu.org>
12385         * include/grub/script.h: Include <grub/parser.h> and
12386         "grub_script.tab.h".
12387         (struct grub_lexer_param): New struct.
12388         (struct grub_parser_param): Likewise.
12389         (grub_script_create_arglist): Pass the state in an argument.
12390         (grub_script_add_arglist): Likewise.
12391         (grub_script_create_cmdline): Likewise.
12392         (grub_script_create_cmdblock): Likewise.
12393         (grub_script_create_cmdif): Likewise.
12394         (grub_script_create_cmdmenu): Likewise.
12395         (grub_script_add_cmd): Likewise.
12396         (grub_script_arg_add): Likewise.
12397         (grub_script_lexer_ref): Likewise.
12398         (grub_script_lexer_deref): Likewise.
12399         (grub_script_lexer_record_start): Likewise.
12400         (grub_script_lexer_record_stop): Likewise.
12401         (grub_script_mem_record): Likewise.
12402         (grub_script_mem_record_stop): Likewise.
12403         (grub_script_malloc): Likewise.
12404         (grub_script_yylex): Likewise.
12405         (grub_script_yyparse): Likewise.
12406         (grub_script_yyerror): Likewise.
12407         (grub_script_yylex): Likewise.
12408         (grub_script_lexer_init): Return the state.
12410         * normal/lexer.c (grub_script_lexer_state): Removed variable.
12411         (grub_script_lexer_done): Likewise.
12412         (grub_script_lexer_getline): Likewise.
12413         (grub_script_lexer_refs): Likewise.
12414         (script): Likewise.
12415         (newscript): Likewise.
12416         (record): Likewise.
12417         (recording): Likewise.
12418         (recordpos): Likewise.
12419         (recordlen): Likewise.
12420         (grub_script_lexer_init): Return the state instead of setting
12421         global variables.
12422         (grub_script_lexer_ref): Use the newly added argument for state
12423         instead of globals.
12424         (grub_script_lexer_deref): Likewise.
12425         (grub_script_lexer_record_start): Likewise.
12426         (grub_script_lexer_record_stop): Likewise.
12427         (recordchar): Likewise.
12428         (nextchar): Likewise.
12429         (grub_script_yylex2): Likewise.
12430         (grub_script_yylex): Likewise.
12431         (grub_script_yyerror): Likewise.
12433         * normal/parser.y (func_mem): Removed variable.
12434         (menu_entry): Likewise.
12435         (err): Likewise.
12436         (%lex-param): New parser option.
12437         (%parse-param): Likewise.
12438         (script): Always return the AST.
12439         (argument): Pass the state around.
12440         (arguments): Likewise.
12441         (grubcmd): Likewise.
12442         (commands): Likewise.
12443         (function): Likewise.
12444         (menuentry): Likewise.
12445         (if_statement): Likewise.
12446         (if): Likewise.
12448         * normal/script.c (grub_script_memused): Removed variable.
12449         (grub_script_parsed): Likewise.
12450         (grub_script_malloc): Added a state argument.  Use that instead of
12451         global variables.
12452         (grub_script_mem_record): Likewise.
12453         (grub_script_mem_record_stop): Likewise.
12454         (grub_script_arg_add): Likewise.
12455         (grub_script_add_arglist): Likewise.
12456         (grub_script_create_cmdline): Likewise.
12457         (grub_script_create_cmdif): Likewise.
12458         (grub_script_create_cmdmenu): Likewise.
12459         (grub_script_add_cmd): Likewise.
12460         (grub_script_parse): Setup the state before calling the parser.
12462 2006-04-16  Marco Gerards  <marco@gnu.org>
12464         * normal/command.c (grub_command_init): Remove the title command.
12466         * normal/lexer.c (grub_script_yylex): Renamed from this...
12467         (grub_script_yylex2): ... to this.
12468         (grub_script_yylex): New function.  Temporary
12469         introduced to filter some tokens.
12470         (grub_script_yyerror): Print a newline.
12472         * normal/main.c (read_config_file): Output information about the
12473         lines that contain errors.  Wait for a key after all lines have
12474         been processed.  Don't return an empty menu.
12476         * normal/parser.y (func_mem): Don't initialize.
12477         (menu_entry): Likewise.
12478         (err): New variable.
12479         (script): Don't return anything when an error was encountered.
12480         (ws, returns): Removed rules.
12481         (argument): Disabled concatenated variable support.
12482         (arguments): Remove explicit separators.
12483         (grubcmd): Likewise.
12484         (function): Likewise.
12485         (menuentry): Likewise.
12486         (if): Likewise.
12487         (commands): Likewise.  Add error handling.
12489         * normal/script.c (grub_script_create_cmdline): If
12490         `grub_script_parsed' is 0, assume the parser encountered an error.
12492 2006-04-02  Yoshinori K. Okuji  <okuji@enbug.org>
12494         * configure.ac: Add support for EFI. Fix the typo
12495         BUILD_LDDFLAGS. Restore the LDFLAGS after testing.
12497 2006-04-01  Vesa Jaaskelainen  <chaac@nic.fi>
12499         * util/unifont2pff.rb: Removed unnecessary byte ordering.  Now
12500         foreign multibyte characters should be shown correctly.
12502 2006-04-01  Vesa Jaaskelainen  <chaac@nic.fi>
12504         * normal/main.c (grub_normal_menu_addentry): Fixed menu size
12505         calculation.
12506         (read_config_file): Made it to close file before returning.
12508 2006-03-31  Vesa Jaaskelainen  <chaac@nic.fi>
12510         * DISTLIST: Added include/grub/i386/pc/vbeblit.h,
12511         include/grub/i386/pc/vbefill.h, video/i386/pc/vbeblit.c,
12512         video/i386/pc/vbefill.c.
12514         * conf/i386-pc.rmk (vbe_mod_SOURCES): Added video/i386/pc/vbeblit.c,
12515         video/i386/pc/vbefill.c.
12517         * include/grub/video.h (grub_video_blit_format): New enum.
12518         (grub_video_mode_info): Added new member blit_format.
12519         (grub_video_get_blit_format): New function prototype.
12521         * include/grub/i386/pc/vbe.h (grub_video_vbe_get_video_ptr): New
12522         function prototype.
12523         (grub_video_vbe_map_rgb): Likewise.
12524         (grub_video_vbe_unmap_color): Likewise.
12526         * include/grub/i386/pc/vbeblit.h: New file.
12528         * include/grub/i386/pc/vbefill.h: New file.
12530         * video/video.c (grub_video_get_blit_format): New function.
12531         (grub_video_vbe_get_video_ptr): Re-declared as non-static.
12532         (grub_video_vbe_map_rgb): Likewise.
12533         (grub_video_vbe_unmap_color): Likewise.
12535         * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Changed to use more
12536         optimized fills.
12537         (grub_video_vbe_blit_render_target): Changed to use more optimized
12538         blits.
12539         (grub_video_vbe_setup): Added detection for optimized settings.
12540         (grub_video_vbe_create_render_target): Likewise.
12542         * video/i386/pc/vbeblit.c: New file.
12544         * video/i386/pc/vbefill.c: New file.
12546 2006-03-30  Vesa Jaaskelainen  <chaac@nic.fi>
12548         * font/manager.c (grub_font_get_glyph): Removed font fixup from
12549         here...
12551         * util/unifont2pff.rb: ... and moved it to here.  Improved argument
12552         parsing to support both hex and dec ranges.  If filename was missing
12553         show usage information.
12555 2006-03-14  Vesa Jaaskelainen  <chaac@nic.fi>
12557         * DISTLIST: Added include/grub/video.h, term/gfxterm.c,
12558         video/video.c, commands/videotest.c.  Removed term/i386/pc/vesafb.c.
12560         * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod,
12561         gfxterm.mod, videotest.mod.  Removed vga.mod, vesafb.mod.
12562         (video_mod_SOURCES): Added.
12563         (video_mod_CFLAGS): Likewise.
12564         (video_mod_LDFLAGS): Likewise.
12565         (gfxterm_mod_SOURCES): Likewise.
12566         (gfxterm_mod_CFLAGS): Likewise.
12567         (gfxterm_mod_LDFLAGS): Likewise.
12568         (videotest_mod_SOURCES): Likewise.
12569         (videotest_mod_CFLAGS): Likewise.
12570         (videotest_mod_LDFLAGS): Likewise.
12571         (vesafb_mod_SOURCES): Removed.
12572         (vesafb_mod_CFLAGS): Likewise.
12573         (vesafb_mod_LDFLAGS): Likewise.
12574         (vga_mod_SOURCES): Likewise.
12575         (vga_mod_CFLAGS): Likewise.
12576         (vga_mod_LDFLAGS): Likewise.
12578         * commands/videotest.c: New file.
12580         * font/manager.c (fill_with_default_glyph): Modified to use
12581         grub_font_glyph.
12582         (grub_font_get_glyph): Likewise.
12583         (fontmanager): Renamed from this...
12584         (font_manager): ... to this.
12586         * include/grub/font.h (grub_font_glyph): Added new structure.
12587         (grub_font_get_glyph): Modified to use grub_font_glyph.
12589         * include/grub/misc.h (grub_abs): Added as inline function.
12591         * include/grub/video.h: New file.
12593         * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro.
12594         (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise.
12595         (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise.
12596         (grub_vbe_get_controller_info): Renamed from this...
12597         (grub_vbe_bios_get_controller_info): ... to this.
12598         (grub_vbe_get_mode_info): Renamed from this...
12599         (grub_vbe_bios_get_mode_info): ... to this.
12600         (grub_vbe_set_mode): Renamed from this...
12601         (grub_vbe_bios_set_mode): ... to this.
12602         (grub_vbe_get_mode): Renamed from this...
12603         (grub_vbe_bios_get_mode): ... to this.
12604         (grub_vbe_set_memory_window): Renamed from this...
12605         (grub_vbe_bios_set_memory_window): ... to this.
12606         (grub_vbe_get_memory_window): Renamed from this...
12607         (grub_vbe_bios_get_memory_window): ... to this.
12608         (grub_vbe_set_scanline_length): Renamed from this...
12609         (grub_vbe_set_scanline_length): ... to this.
12610         (grub_vbe_get_scanline_length): Renamed from this...
12611         (grub_vbe_bios_get_scanline_length): ... to this.
12612         (grub_vbe_set_display_start): Renamed from this...
12613         (grub_vbe_bios_set_display_start): ... to this.
12614         (grub_vbe_get_display_start): Renamed from this...
12615         (grub_vbe_bios_get_display_start): ... to this.
12616         (grub_vbe_set_palette_data): Renamed from this...
12617         (grub_vbe_bios_set_palette_data): ... to this.
12618         (grub_vbe_set_pixel_rgb): Removed.
12619         (grub_vbe_set_pixel_index): Likewise.
12621         * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed
12622         from this...
12623         (grub_vbe_bios_get_controller_info): ... to this.
12624         (grub_vbe_get_mode_info): Renamed from this...
12625         (grub_vbe_bios_get_mode_info): ... to this.
12626         (grub_vbe_set_mode): Renamed from this...
12627         (grub_vbe_bios_set_mode): ... to this.
12628         (grub_vbe_get_mode): Renamed from this...
12629         (grub_vbe_bios_get_mode): ... to this.
12630         (grub_vbe_set_memory_window): Renamed from this...
12631         (grub_vbe_bios_set_memory_window): ... to this.
12632         (grub_vbe_get_memory_window): Renamed from this...
12633         (grub_vbe_bios_get_memory_window): ... to this.
12634         (grub_vbe_set_scanline_length): Renamed from this...
12635         (grub_vbe_set_scanline_length): ... to this.
12636         (grub_vbe_get_scanline_length): Renamed from this...
12637         (grub_vbe_bios_get_scanline_length): ... to this.
12638         (grub_vbe_set_display_start): Renamed from this...
12639         (grub_vbe_bios_set_display_start): ... to this.
12640         (grub_vbe_get_display_start): Renamed from this...
12641         (grub_vbe_bios_get_display_start): ... to this.
12642         (grub_vbe_set_palette_data): Renamed from this...
12643         (grub_vbe_bios_set_palette_data): ... to this.
12644         (grub_vbe_bios_get_controller_info): Fixed problem with registers
12645         getting corrupted after calling it.  Added more pushes and pops.
12646         (grub_vbe_bios_set_mode): Likewise.
12647         (grub_vbe_bios_get_mode): Likewise.
12648         (grub_vbe_bios_get_memory_window): Likewise.
12649         (grub_vbe_bios_set_scanline_length): Likewise.
12650         (grub_vbe_bios_get_scanline_length): Likewise.
12651         (grub_vbe_bios_get_display_start): Likewise.
12652         (grub_vbe_bios_set_palette_data): Likewise.
12654         * normal/cmdline.c (cl_set_pos): Refresh the screen.
12655         (cl_insert): Likewise.
12656         (cl_delete): Likewise.
12658         * term/gfxterm.c: New file.
12660         * term/i386/pc/vesafb.c: Removed file.
12662         * video/video.c: New file.
12664         * video/i386/pc/vbe.c (real2pm): Added new function.
12665         (grub_video_vbe_draw_pixel): Likewise.
12666         (grub_video_vbe_get_video_ptr): Likewise.
12667         (grub_video_vbe_get_pixel): Likewise
12668         (grub_video_vbe_init): Likewise.
12669         (grub_video_vbe_fini): Likewise.
12670         (grub_video_vbe_setup): Likewise.
12671         (grub_video_vbe_get_info): Likewise.
12672         (grub_video_vbe_set_palette): Likewise.
12673         (grub_video_vbe_get_palette): Likewise.
12674         (grub_video_vbe_set_viewport): Likewise.
12675         (grub_video_vbe_get_viewport): Likewise.
12676         (grub_video_vbe_map_color): Likewise.
12677         (grub_video_vbe_map_rgb): Likewise.
12678         (grub_video_vbe_map_rgba): Likewise.
12679         (grub_video_vbe_unmap_color): Likewise.
12680         (grub_video_vbe_fill_rect): Likewise.
12681         (grub_video_vbe_blit_glyph): Likewise.
12682         (grub_video_vbe_blit_bitmap): Likewise.
12683         (grub_video_vbe_blit_render_target): Likewise.
12684         (grub_video_vbe_scroll): Likewise.
12685         (grub_video_vbe_swap_buffers): Likewise.
12686         (grub_video_vbe_create_render_target): Likewise.
12687         (grub_video_vbe_delete_render_target): Likewise.
12688         (grub_video_vbe_set_active_render_target): Likewise.
12689         (grub_vbe_set_pixel_rgb): Remove function.
12690         (grub_vbe_set_pixel_index): Likewise.
12691         (index_color_mode): Remove static variable.
12692         (active_mode): Likewise.
12693         (framebuffer): Likewise.
12694         (bytes_per_scan_line): Likewise.
12695         (grub_video_vbe_adapter): Added new static variable.
12696         (framebuffer): Likewise.
12697         (render_target): Likewise.
12698         (initial_mode): Likewise.
12699         (mode_in_use): Likewise.
12700         (mode_list): Likewise.
12702 2006-03-10  Marco Gerards  <marco@gnu.org>
12704         * configure.ac (AC_INIT): Bumped to 1.93.
12706         * DISTLIST: Added `include/grub/hfs.h'.
12708 2006-02-01  Yoshinori K. Okuji  <okuji@enbug.org>
12710         * boot/i386/pc/boot.S (general_error): Before looping, try INT
12711         18H, which might help the BIOS falling back to next boot media.
12713 2006-01-25  Yoshinori K. Okuji  <okuji@enbug.org>
12715         * util/i386/pc/grub-install.in: Escape a backslash. Reported by
12716         Poe Chen <poe.poechen@gmail.com>.
12718 2006-01-17  Marco Gerards  <marco@gnu.org>
12720         * include/grub/normal.h: Include <grub/script.h>.
12721         (grub_command_list): Removed struct.
12722         (grub_command_list_t): Removed type.
12723         (grub_menu_entry): Remove members `num' and `command_list'.  Add
12724         members `commands' and `sourcecode'.
12725         * include/grub/script.h: Add inclusion guards.
12726         (grub_script_cmd_menuentry): New struct.
12727         (grub_script_execute_menuentry): New prototype.
12728         (grub_script_lexer_record_start): Likewise.
12729         (grub_script_lexer_record_stop): Likewise.
12730         * normal/execute.c (grub_script_execute_menuentry): New function.
12731         * normal/lexer.c (record, recording, recordpos, recordlen): New
12732         variables.
12733         (grub_script_lexer_record_start): New function.
12734         (grub_script_lexer_record_stop): Likewise.
12735         (recordchar): Likewise.
12736         (nextchar): Likewise.
12737         (grub_script_yylex): Use `nextchar' to fetch new characters.  Use
12738         2048 as the buffer size.  Add the tokens `menuentry' and `@'.
12739         * normal/main.c: Include <grub/parser.h> and <grub/script.h>
12740         (current_menu): New variable.
12741         (free_menu): Mainly rewritten.
12742         (grub_normal_menu_addentry): New function.
12743         (read_config_file): Rewritten.
12744         * normal/menu.c (run_menu_entry): Mainly rewritten.
12745         * normal/menu_entry.c (make_screen): Rewritten the code to insert
12746         the menu entry.
12747         (run): Mainly rewritten.
12748         * normal/parser.y (menu_entry): New variable.
12749         (GRUB_PARSER_TOKEN_MENUENTRY): New token.
12750         (menuentry): New rule.
12751         (command): Add `menuentry'.
12752         (if_statement): Allow additional returns before `fi'.
12753         * normal/script.c (grub_script_create_cmdmenu): New function.
12755 2006-01-03  Marco Gerards  <marco@gnu.org>
12757         * INSTALL: GNU Bison is required.
12758         * configure.ac: Rewritten the test to detect Bison.
12759         * Makefile.in (YACC): New variable.  Reported by Xun Sun
12760         <xun.sun.cn@gmail.com>.
12762 2006-01-03  Marco Gerards  <marco@gnu.org>
12764         * fs/hfsplus.c (grub_hfsplus_read_block): Convert the offset of
12765         the HFS+ filesystem to filesystem blocks.
12766         (grub_hfsplus_iterate_dir): Cast the `fileinfo' assignment so a
12767         GCC warning is silenced.
12769 2006-01-03  Marco Gerards  <marco@gnu.org>
12771         * partmap/apple.c (apple_partition_map_iterate): Convert the data
12772         read from disk from big endian to host byte order.
12774 2006-01-03  Hollis Blanchard  <hollis@penguinppc.org>
12776         * fs/hfs.c: Include <grub/hfs.h>.  Added reference to the official
12777         documentation.
12778         (GRUB_HFS_EMBED_HFSPLUS_SIG): New macro.
12779         (grub_hfs_mount): Grammar fix in error. Make sure this is not an
12780         embedded HFS+ filesystem.
12781         (GRUB_HFS_MAGIC, grub_hfs_extent, grub_hfs_datarecord_t)
12782         (grub_hfs_sblock): Move from here...
12783         * include/grub/hfs.h: To here...  New file.
12784         * fs/hfsplus.c: Include <grub/hfs.h>.  Added reference to the official
12785         documentation.
12786         (GRUB_HFSPLUS_MAGIC, GRUB_HFSPLUSX_MAGIC, GRUB_HFSPLUS_SBLOCK):
12787         New macros.
12788         (grub_hfsplus_volheader): Change type of member `magic' to
12789         `grub_uint16_t'.
12790         (grub_hfsplus_data): Add new member `embedded_offset'.
12791         (grub_hfsplus_read_block): Add the HFS+ wrapper offset to the
12792         returned block.
12793         (grub_hfsplus_mount): Read the HFS+ wrapper if it exists.
12794         Calculate the offset.
12796 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
12798         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRP_ADDR):
12799         Removed.
12800         (GRUB_BOOT_MACHINE_DRP_SIZE): Likewise.
12802 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
12804         * kern/env.c (grub_env_set): Check if ENV->VALUE instead of
12805         ENV->NAME is NULL after allocating ENV->VALUE.
12807 2005-12-25  Marco Gerards  <marco@gnu.org>
12809         * kern/env.c (grub_env_set): Rewritten the error handling code.
12811 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
12813         * geninit.sh: Made more robust, and more portable.
12815 2005-12-25  Marco Gerards  <marco@gnu.org>
12817         Add support for Apple HFS+ filesystems.
12819         * fs/hfsplus.c: New file.
12821         * DISTLIST: Added `fs/hfsplus.c'.
12823         * conf/common.rmk (pkgdata_MODULES): Add `hfsplus.mod'.
12824         (hfsplus_mod_SOURCES): New variable.
12825         (hfsplus_mod_CFLAGS): Likewise.
12826         (hfsplus_mod_LDFLAGS): Likewise.
12827         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/hfsplus.c'.
12828         (grub_setup_SOURCES): Likewise.
12829         (grub_mkdevicemap_SOURCES): Likewise.
12830         (grub_emu_SOURCES): Likewise.
12831         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
12833         * fs/fshelp.c (grub_fshelp_log2blksize): New function.
12835         * include/grub/fshelp.h (grub_fshelp_log2blksize): new prototype.
12837 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
12839         * DISTLIST: Added geninitheader.sh, geninit.sh, commands/test.c,
12840         commands/i386/pc/play.c, conf/common.mk, conf/common.rmk,
12841         include/grub/parser.h, include/grub/script.h, kern/parser.c,
12842         kern/sparc64/cache.S, normal/execute.c, normal/function.c,
12843         normal/lexer.c, normal/parser.y, normal/script.c, and
12844         partmap/gpt.c.
12845         Removed kern/sparc64/cache.c.
12847         * conf/common.rmk (DISTCLEANFILES): Added grub_script.tab.c,
12848         grub_script.tab.h, grub_modules_init.lst, grub_modules_init.h,
12849         grub_emu_init.c.
12851         * configure.ac (AC_INIT): Bumped to 1.92.
12853 2005-12-24  Vesa Jaaskelainen  <chaac@nic.fi>
12855         * kern/err.c (grub_error_push): Added new function to support error
12856         stacks.
12857         (grub_error_pop): Likewise.
12858         (grub_error_stack_items): New local variable to support error stacks.
12859         (grub_error_stack_pos): Likewise.
12860         (grub_error_stack_assert): Likewise.
12861         (GRUB_ERROR_STACK_SIZE): Added new define to configure maximum error
12862         stack depth.
12863         (grub_print_error): Added support to print errors from error stack.
12865         * include/grub/err.h (grub_error_push): Added function prototype.
12866         (grub_error_pop): Likewise.
12868 2005-12-09  Hollis Blanchard  <hollis@penguinppc.org>
12870         * configure.ac: Accept `powerpc64' as host_cpu.
12871         (amd64): Rename to `biarch32'.
12873         * kern/powerpc/cache.S (grub_arch_sync_caches): Handle
12874         non-cacheline-aligned addresses.
12876         * kern/dl.c (grub_dl_load_core): Add grub_dprintf messages.
12877         (grub_dl_flush_cache): Likewise.  Only call `grub_arch_sync_caches'
12878         if `size' is non-zero.
12880 2005-12-03  Marco Gerards  <mgerards@xs4all.nl>
12882         * conf/common.rmk (grub_modules_init.lst): Use `-printf "%P\n"'
12883         and `cd' to make sure the filename is not prefixed with a
12884         directory name.
12885         (pkgdata_MODULES): Add `gpt.mod'.
12886         (gpt_mod_SOURCES): New variable.
12887         (gpt_mod_CFLAGS): Likewise.
12888         (gpt_mod_LDFLAGS): Likewise.
12890         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/gpt.c'.
12892         * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_GPT_DISK):
12893         New macro.
12895         * partmap/gpt.c: New file.
12897         * partmap/pc.c (pc_partition_map_iterate): Don't continue when a
12898         GPT partition map is detected.
12900 2005-12-03  Vincent Pelletier  <subdino2004@yahoo.fr>
12902         * commands/i386/pc/play.c: New file.
12903         * conf/i386-pc.rmk (pkgdata_MODULES): Added play.mod.
12904         (play_mod_SOURCES, play_mod_CFLAGS, play_mod_LDFLAGS): New
12905         macros.
12907 2005-11-27  Marco Gerards  <mgerards@xs4all.nl>
12909         * include/grub/dl.h (GRUB_MOD_INIT): Use `__attribute__
12910         ((unused))' to silence gcc warning.
12912 2005-11-26  Hollis Blanchard  <hollis@penguinppc.org>
12914         * configure.ac: Correct `AC_PROG_YACC' test.
12916 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
12918         * util/powerpc/ieee1275/grub-install.in: Run the mount point
12919         check before installing files.
12921 2005-11-22  Mike Small  <smallm@panix.com>
12923         * util/powerpc/ieee1275/grub-install.in (grubdir): Fixed partition
12924         number regex so multidigit numbers are recognized correctly.
12926 2005-11-22  Mike Small  <smallm@panix.com>
12928         * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Add a
12929         debugging message before attempting to claim memory.
12930         (grub_rescue_cmd_initrd): Add a claim debugging message and try
12931         multiple addresses in case of failure.
12933 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
12935         * term/tparm.c (get_space): Remove empty `if' statement.
12937         * fs/ufs.c (grub_ufs_find_file): Remove `grub_le_to_cpu32'.
12939         * kern/parser.c (check_varstate): Rename `state' to 's'.
12941 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
12943         * partmap/acorn.c: Change `unsigned' to `unsigned int'.  Move all
12944         variable definitions to the beginning of each function.  Sort stack
12945         variables by size.
12946         (find): Rename to `acorn_partition_map_find'.  Cast `grub_disk_read'
12947         `buf' argument to `char *'.
12949 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
12951         * conf/powerpc-ieee1275.rmk: Include conf/common.mk.
12952         (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
12953         minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
12954         hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
12955         help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
12956         sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
12957         configfile.mod, search.mod, gzio.mod and test.mod.
12958         (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
12959         (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
12960         (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
12961         (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
12962         (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
12963         (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
12964         (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
12965         (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
12966         (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
12967         (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
12968         (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
12969         (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
12970         (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
12971         (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
12972         (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
12973         (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
12974         (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
12975         (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
12976         (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
12977         (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
12978         (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
12979         (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
12980         (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Removed.
12982         * conf/common.mk (grub_modules_init.lst): Use `find' instead of
12983         `grep --include'.
12984         (pkgdata_MODULES): Add test.mod.
12986 2005-11-18  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
12988         * genmk.rb: Fixed list rules moved to Makefile.in.  Recognise
12989         appending to variables with "+=".
12990         (PModule): Use full pathname to generate *.lst filenames.
12992         * Makefile.in: Fixed list rules moved from genmk.rb.
12993         (.DELETE_ON_ERROR): New special target.
12994         (RMKFILES): Add common.rmk and sparc64-ieee1275.rmk.
12996         * conf/i386-pc.rmk: Include conf/common.mk.
12997         (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
12998         minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
12999         hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
13000         help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
13001         sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
13002         configfile.mod, search.mod, gzio.mod and test.mod.
13003         (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
13004         (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
13005         (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
13006         (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
13007         (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
13008         (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
13009         (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
13010         (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
13011         (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
13012         (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
13013         (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
13014         (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
13015         (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
13016         (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
13017         (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
13018         (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
13019         (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
13020         (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
13021         (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
13022         (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
13023         (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
13024         (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
13025         (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Move from
13026         here...
13027         * conf/common.rmk: ... to here.  New file.
13029         * conf/common.mk: New file.
13031 2005-11-18  Yoshinori K. Okuji  <okuji@enbug.org>
13033         * conf/powerpc-ieee1275.rmk (grub_script.tab.h): Unified to ...
13034         (grub_script.tab.c): ... here.
13036         * conf/sparc64-ieee1275.rmk (grub_script.tab.h): Unified to ...
13037         (grub_script.tab.c): ... here.
13039         * conf/i386-pc.rmk (grub_script.tab.h): Unified to ...
13040         (grub_script.tab.c): ... here.
13042         * normal/command.c (grub_command_find): Fixed a memory leak of
13043         MODULE_NAME. Reported by Mike Small <smallm@panix.com>.
13045 2005-11-13  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
13047         * include/grub/symbol.h: (FUNCTION): Use double quotes instead of
13048         "@" which marks the start of a comment on ARM.
13049         (VARIABLE): Likewise.
13051 2005-11-13  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
13053         Add support for Linux/ADFS partition tables.
13055         * partmap/acorn.c: New file.
13057         * include/grub/acorn_filecore.h: Likewise.
13059         * DISTLIST: Added `partmap/acorn.c' and
13060         `include/grub/acorn_filecore.h'.
13062         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
13063         `partmap/acorn.c'.
13064         (pkgdata_MODULES): Add `acorn.mod'.
13065         (acorn_mod_SOURCES): New variable.
13066         (acorn_mod_CFLAGS): Likewise.
13068         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
13069         `partmap/acorn.c'.
13070         (pkgdata_MODULES): Add `acorn.mod'.
13071         (acorn_mod_SOURCES): New variable.
13072         (acorn_mod_CFLAGS): Likewise.
13074         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/acorn.c'.
13075         (pkgdata_MODULES): Add `acorn.mod'.
13076         (acorn_mod_SOURCES): New variable.
13077         (acorn_mod_CFLAGS): Likewise.
13078         (acorn_mod_LDFLAGS): Likewise.
13080         * include/types.h (grub_disk_addr_t): New typedef.
13082 2005-11-13  Marco Gerards  <mgerards@xs4all.nl>
13084         * geninit.sh: New file.
13086         * geninitheader.sh: Likewise.
13088         * commands/boot.c (grub_boot_init, grub_boot_fini): Removed.
13089         * commands/cat.c (grub_cat_init, grub_cat_fini): Likewise.
13090         * commands/cmp.c (grub_cmp_init, grub_cmp_fini): Likewise.
13091         * commands/configfile.c (grub_configfile_init)
13092         (grub_configfile_fini): Likewise.
13093         * commands/default.c (grub_default_init, grub_default_fini):
13094         Likewise.
13095         * commands/help.c (grub_help_init, grub_help_fini): Likewise.
13096         * commands/ls.c (grub_ls_init, grub_ls_fini): Likewise.
13097         * commands/search.c (grub_search_init, grub_search_fini): Likewise.
13098         * commands/terminal.c (grub_terminal_init, grub_terminal_fini):
13099         Likewise.
13100         * commands/test.c (grub_test_init, grub_test_fini): Likewise.
13101         * commands/timeout.c (grub_timeout_init, grub_timeout_fini):
13102         Likewise.
13103         * commands/i386/pc/halt.c (grub_halt_init, grub_halt_fini): Likewise.
13104         * commands/ieee1275/halt.c (grub_halt_init, grub_halt_fini):
13105         Likewise.
13106         * commands/i386/pc/reboot.c (grub_reboot_init, grub_reboot_fini):
13107         Likewise.
13108         * commands/ieee1275/reboot.c (grub_reboot_init, grub_reboot_fini):
13109         Likewise.
13110         * disk/loopback.c (grub_loop_init, grub_loop_fini): Likewise.
13111         * fs/affs.c (grub_affs_init, grub_affs_fini): Likewise.
13112         * fs/ext2.c (grub_ext2_init, grub_ext2_fini): Likewise.
13113         * fs/fat.c (grub_fat_init, grub_fat_fini): Likewise.
13114         * fs/hfs.c (grub_hfs_init, grub_hfs_fini): Likewise.
13115         * fs/iso9660.c (grub_iso9660_init, grub_iso9660_fini): Likewise.
13116         * fs/jfs.c (grub_jfs_init, grub_jfs_fini): Likewise.
13117         * fs/minix.c (grub_minix_init, grub_minix_fini): Likewise.
13118         * fs/sfs.c (grub_sfs_init, grub_sfs_fini): Likewise.
13119         * fs/ufs.c (grub_ufs_init, grub_ufs_fini): Likewise.
13120         * fs/xfs.c (grub_xfs_init, grub_xfs_fini): Likewise.
13121         * normal/main.c (grub_normal_init, grub_normal_fini): Likewise.
13122         * partmap/amiga.c (grub_amiga_partition_map_init)
13123         (grub_amiga_partition_map_fini): Likewise.
13124         * partmap/apple.c (grub_apple_partition_map_init)
13125         (grub_apple_partition_map_fini): Likewise.
13126         * partmap/pc.c (grub_pc_partition_map_init)
13127         (grub_pc_partition_map_fini): Likewise.
13128         * partmap/sun.c (grub_sun_partition_map_init,
13129         grub_sun_partition_map_fini): Likewise.
13130         * term/terminfo.c (grub_terminal_init, grub_terminal_fini):
13131         Likewise.
13133         * util/grub-emu.c: Include <grub_modules_init.h>.
13134         (main): Don't initialize and de-initialize any modules directly,
13135         use `grub_init_all' and `grub_fini_all' instead.
13137         * term/i386/pc/vesafb.c (grub_vesafb_init): Renamed to
13138         `grub_vesafb_mod_init'.
13139         (grub_vesafb_fini): Renamed to `grub_vesafb_mod_fini'.  Updated
13140         all users.
13141         * term/i386/pc/vga.c (grub_vga_init): Renamed to
13142         `grub_vga_mod_init'.  Updated all users.
13143         (grub_vga_fini): Renamed to `grub_vga_mod_fini'.
13145         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `grub_emu_init.c'.
13146         (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c): New
13147         rules.
13149         * include/grub/dl.h (GRUB_MOD_INIT): Add argument `name'.
13150         Generate a function to initialize the module in utilities.
13151         Updated all callers.
13152         (GRUB_MOD_FINI): Add argument `name'.  Generate a function to
13153         initialize the module in utilities.  Updated all callers.
13155 2005-11-09  Hollis Blanchard  <hollis@penguinppc.org>
13157         * term/ieee1275/ofconsole.c (grub_ofconsole_cls): Use both the ANSI
13158         escape sequence and a literal ^L to clear the screen.
13160         * commands/ieee1275/suspend.c (grub_cmd_suspend): Clear the screen
13161         when returning from Open Firmware.
13163 2005-11-09  Hollis Blanchard  <hollis@penguinppc.org>
13165         * term/ieee1275/ofconsole.c (grub_ofconsole_width): New variable.
13166         (grub_ofconsole_height): Likewise.
13167         (grub_ofconsole_putchar): If `grub_curr_x' exceeds console width,
13168         manually insert a '\n'.
13169         (grub_ofconsole_getwh): Set and return `grub_ofconsole_width' and
13170         `grub_ofconsole_height'.  Return early if these are already set.
13172 2005-11-07  Vincent Pelletier  <subdino2004@yahoo.fr>
13174         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
13175         `commands/test.c', `fs/affs.c', `fs/sfs.c', `fs/xfs.c',
13176         `normal/execute.c', `normal/lexer.c', `io/gzio.c',
13177         `kern/parser.c', `grub_script.tab.c', `normal/function.c'
13178         and `normal/script.c'.
13179         (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
13180         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
13181         (test_mod_SOURCES): New variable.
13182         (test_mod_CFLAGS): Likewise.
13183         (test_mod_LDFLAGS): Likewise.
13184         (pkgdata_MODULES): Add `test.mod'.
13185         (grub_script.tab.c): New rule.
13186         (grub_script.tab.h): Likewise.
13188 2005-11-07  Marco Gerards  <mgerards@xs4all.nl>
13190         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
13191         `commands/test.c', `normal/execute.c', `normal/lexer.c',
13192         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
13193         (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
13194         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
13195         (test_mod_SOURCES): New variable.
13196         (test_mod_CFLAGS): Likewise.
13197         (pkgdata_MODULES): Add `test.mod'.
13198         (grub_script.tab.c): New rule.
13199         (grub_script.tab.h): Likewise.
13201 2005-11-06  Marco Gerards  <mgerards@xs4all.nl>
13203         Add initial scripting support.
13205         * commands/test.c: New file.
13206         * include/grub/script.h: Likewise.
13207         * normal/execute.c: Likewise.
13208         * normal/function.c: Likewise.
13209         * normal/lexer.c: Likewise.
13210         * normal/parser.y: Likewise.
13211         * normal/script.c: Likewise.
13213         * configure.ac: Add `AC_PROG_YACC' test.
13215         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/test.c',
13216         `normal/execute.c', `normal/lexer.c', `grub_script.tab.c',
13217         `normal/function.c' and `normal/script.c'.
13218         (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
13219         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
13220         (test_mod_SOURCES, test_mod_CFLAGS, test_mod_LDFLAGS): New
13221         variables.
13222         (pkgdata_MODULES): Add `test.mod'.
13223         (grub_script.tab.c): New rule.
13224         (grub_script.tab.h): Likewise.
13226         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TEST_FAILURE'.
13228         * include/grub/normal.h (grub_test_init): New prototype.
13229         (grub_test_fini): Likewise.
13231         * normal/command.c: Include <grub/script.h>.
13232         (grub_command_execute): Rewritten.
13234         * util/grub-emu.c (main): Call `grub_test_init' and
13235         `grub_test_fini'.
13237 2005-11-03  Hollis Blanchard  <hollis@penguinppc.org>
13239         * kern/powerpc/ieee1275/init.c (grub_get_rtc): Initialize `msecs'
13240         to 0.
13241         * term/ieee1275/ofconsole.c (grub_ofconsole_checkkey): Return -1 if
13242         there are no pending characters.
13244 2005-11-03  Hollis Blanchard  <hollis@penguinppc.org>
13246         * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_get_devname): Use
13247         `grub_strndup' to drop device arguments. Replace unnecessary
13248         `grub_strndup' with `grub_strdup'.
13250 2005-11-03  Hollis Blanchard  <hollis@penguinppc.org>
13252         * kern/term.c (grub_cls): Do not call grub_cur_term->cls() if the
13253         `debug' environment variable has been set.
13255 2005-11-02  Hollis Blanchard  <hollis@penguinppc.org>
13257         * Makefile.in (install-local): Use $(DATA).
13258         (uninstall): Likewise.
13259         * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Move grub-mkimage...
13260         (sbin_UTILITIES): ... to here.
13261         (sbin_SCRIPTS): New variable.
13262         (grub_install_SOURCES): New variable.
13263         * util/powerpc/ieee1275/grub-install.in: New file.
13264         * util/powerpc/ieee1275/grub-mkimage.c (kernel_path): Remove
13265         variable.
13266         (add_segments): Call `grub_util_get_path'.
13268 2005-10-28  Yoshinori K. Okuji  <okuji@enbug.org>
13270         From Timothy Baldwin:
13271         * commands/ls.c (grub_ls_list_files): Close FILE with
13272         grub_file_close.
13273         * kern/misc.c (grub_vsprintf): Terminate the string S with NUL.
13275 2005-10-24  Marco Gerards  <mgerards@xs4all.nl>
13277         * include/grub/parser.h: New file.
13279         * kern/parser.c: Likewise.
13281         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/parser.c'.
13282         (grub_setup_SOURCES): Likewise.
13283         (grub_probefs_SOURCES): Likewise.
13284         (grub_emu_SOURCES): Likewise.
13285         (kernel_img_HEADERS): Add `parser.h'.
13287         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
13288         (grub_emu_SOURCES): Add `kern/parser.c'.
13289         (grubof_SOURCES): Likewise.
13291         * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
13292         (grubof_SOURCES): Add `kern/parser.c'.
13294         * include/grub/misc.h (grub_split_cmdline): Removed prototype.
13296         * kern/misc.c (grub_split_cmdline): Removed function.
13298         * kern/rescue.c: Include <grub/parser.h>.
13299         (grub_enter_rescue_mode): Use `grub_parser_split_cmdline' instead
13300         of `grub_split_cmdline'.
13302         * normal/command.c: Include <grub/parser.h>.
13303         (grub_command_execute):  Use `grub_parser_split_cmdline' instead
13304         of `grub_split_cmdline'.
13306         * normal/completion.c: Include <grub/parser.h>.
13307         (cmdline_state): New variable.
13308         (iterate_dir): End the filename with a quote depending on the
13309         command line state.
13310         (get_state): new function.
13311         (grub_normal_do_completion): Use `grub_parser_split_cmdline' to
13312         split the arguments and determine the current argument.  When the
13313         argument string is not quoted, escape all spaces.
13315 2005-10-23  Vincent Pelletier  <subdino2004@yahoo.fr>
13317         * normal/sparc64/setjmp.S: New file.
13319 2005-10-23  Vincent Pelletier  <subdino2004@yahoo.fr>
13321         * include/grub/sparc64/libgcc.h: New file.
13322         * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Remove -Av9.
13323         (normal_mod_SOURCES): Use normal/sparc64/setjmp.S instead of
13324         normal/sparc64/setjmp.c.
13326 2005-10-23  Vincent Pelletier  <subdino2004@yahoo.fr>
13328         * kern/sparc64/dl.c: Rewritten for SPARCV9 ELF.
13329         * kern/sparc64/cache.S: New file.
13330         * kern/sparc64/cache.c: Removed.
13331         * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Add -Av9.
13332         (COMMON_CFLAGS): Add -mno-app-regs.  Remove -mcpu=v9 and
13333         -mtune=ultrasparc.
13334         (COMMON_LDFLAGS): Add -melf64_sparc.
13335         (grubof_HEADERS): Add sparc64/libgcc.h and machine/kernel.h.
13336         (grubof_SOURCES): Use cache.S instead of cache.c.
13337         (grubof_LDFLAGS): Add -mno-app-regs.  Replace "-Xlinker
13338         --oformat -Xlinker elf64-sparc" by "-Bstatic,-melf64_sparc".
13339         (pkgdata_MODULES): Uncomment. Leave linux.mod and _linux.mod
13340         commented though.
13341         (normal_mod_SOURCES): Add normal/completion.c and normal/misc.c.
13342         (_linux_mod_SOURCES, _linux_mod_CFLAGS, linux_mod_SOURCES)
13343         (linux_mod_CFLAGS): Commented out.
13344         (_linux_mod_LDFLAGS, linux_mod_LDFLAGS): New macro, commented
13345         out because module isn't built.
13346         (fshelp_mod_LDFLAGS, fat_mod_LDFLAGS, ext2_mod_LDFLAGS)
13347         (ufs_mod_LDFLAGS, minix_mod_LDFLAGS, hfs_mod_LDFLAGS)
13348         (jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS, normal_mod_LDFLAGS)
13349         (hello_mod_LDFLAGS, boot_mod_LDFLAGS, terminal_mod_LDFLAGS)
13350         (ls_mod_LDFLAGS, cmp_mod_LDFLAGS, cat_mod_LDFLAGS)
13351         (font_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
13352         (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
13353         (suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS)
13354         (help_mod_LDFLAGS, default_mod_LDFLAGS, timeout_mod_LDFLAGS)
13355         (configfile_mod_LDFLAGS, search_mod_LDFLAGS, xfs_mod_SOURCES)
13356         (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
13357         (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
13358         (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, gzio_mod_SOURCES)
13359         (gzio_mod_CFLAGS, gzio_mod_LDFLAGS): New macro.
13361 2005-10-20  Yoshinori K. Okuji  <okuji@enbug.org>
13363         * util/i386/pc/grub-probefs.c (main): Call grub_xfs_init and
13364         grub_xfs_fini. Do not call grub_hfs_init or grub_hfs_fini any
13365         longer, because HFS should not be used on PC.
13367 2005-10-20  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
13369         * io/gzio.c (grub_gzio_read): Use OFFSET instead of FILE->OFFSET
13370         consistently within the loop.
13372 2005-10-15  Marco Gerards  <mgerards@xs4all.nl>
13374         * fs/xfs.c (grub_xfs_iterate_dir): Detect an error if part of a
13375         directory can not be read.
13377 2005-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
13379         * configure.ac (AC_INIT): Increase the version number to 1.91.
13381         * DISTLIST: Added include/grub/terminfo.h, include/grub/tparm.h,
13382         include/grub/i386/pc/serial.h, term/terminfo.c, term/tparm.c and
13383         term/i386/pc/serial.c.
13385 2005-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
13387         * kern/file.c (grub_file_seek): Seeking to an offset equal to a
13388         file size must be permitted.
13390         * kern/i386/pc/startup.S (multiboot_trampoline): Fix a mistake
13391         between %ah and %al.
13393 2005-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
13395         * fs/xfs.c (grub_xfs_iterate_dir): Change the type of BLK to
13396         grub_uint64_t.
13397         Call the hook with a NUL-terminated filename.
13398         (grub_xfs_mount): Use grub_be_to_cpu32 instead of
13399         grub_cpu_to_be32.
13401         * kern/term.c (cursor_state): New variable.
13402         (grub_term_set_current): Reset the cursor state on a new
13403         terminal.
13404         (grub_setcursor): Rewritten to use CURSOR_STATE.
13405         (grub_getcursor): New function.
13407         * include/grub/term.h (grub_getcursor): New prototype.
13409         * io/gzio.c (test_header): Align BUF for accessing it as 32-bit
13410         integers on ARM. Reported by Timothy Baldwin
13411         <T.E.Baldwin99@members.leeds.ac.uk>.
13413 2005-10-11  Marco Gerards  <mgerards@xs4all.nl>
13415         * fs/sfs.c (grub_sfs_open): Don't free `data->label' if it is not
13416         allocated.
13417         (grub_sfs_dir): Likewise.
13419 2005-10-09  Marco Gerards  <mgerards@xs4all.nl>
13421         Add support for the SFS filesystem.
13423         * fs/sfs.c: New file.
13425         * DISTLIST: Added `fs/sfs.c'.
13427         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/sfs.c'.
13428         (grub_probefs_SOURCES): Likewise.
13429         (grub_emu_SOURCES): Likewise.
13430         (pkgdata_MODULES): Add `sfs.mod'.
13431         (sfs_mod_SOURCES): New variable.
13432         (sfs_mod_CFLAGS): Likewise.
13433         (sfs_mod_LDFLAGS): Likewise.
13435         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/sfs.c'.
13436         (pkgdata_MODULES): Add `sfs.mod'.
13437         (sfs_mod_SOURCES): New variable.
13438         (sfs_mod_CFLAGS): Likewise.
13440         * util/grub-emu.c (main): Call `grub_sfs_init' and
13441         `grub_sfs_fini'.
13443         * include/grub/fs.h (grub_sfs_init): New prototype.
13444         (grub_sfs_fini): Likewise.
13446 2005-10-07  Marco Gerards  <mgerards@xs4all.nl>
13448         Add support for the AFFS filesystem.
13450         * fs/affs.c: New file.
13452         * DISTLIST: Added `fs/affs.c'.
13454         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/affs.c'.
13455         (grub_probefs_SOURCES): Likewise.
13456         (grub_emu_SOURCES): Likewise.
13457         (pkgdata_MODULES): Add `affs.mod'.
13458         (affs_mod_SOURCES): New variable.
13459         (affs_mod_CFLAGS): Likewise.
13460         (affs_mod_LDFLAGS): Likewise.
13462         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/affs.c'.
13463         (pkgdata_MODULES): Add `affs.mod'.
13464         (affs_mod_SOURCES): New variable.
13465         (affs_mod_CFLAGS): Likewise.
13467         * util/grub-emu.c (main): Call `grub_affs_init' and
13468         `grub_affs_fini'.
13470         * include/grub/fs.h (grub_affs_init): New prototype.
13471         (grub_affs_fini): Likewise.
13473 2005-10-01  Marco Gerards  <mgerards@xs4all.nl>
13475         * fs/xfs.c (grub_xfs_iterate_dir): Add parentheses.
13477 2005-10-01  Marco Gerards  <mgerards@xs4all.nl>
13479         * configure.ac: Accept `x86_64' as host_cpu.  In that case add
13480         `-m32' to CFLAGS.
13482         * genmk.rb (class PModule): Always use `$(#{prefix}_LDFLAGS)' when
13483         linking.
13485         * conf/i386-pc.rmk (COMMON_CFLAGS): Add `-m32'.
13486         (COMMON_LDFLAGS): New variable.
13487         (kernel_img_LDFLAGS): Include `COMMON_FLAGS'.
13488         (_chain_mod_LDFLAGS, fshelp_mod_LDFLAGS, fat_mod_LDFLAGS)
13489         (ext2_mod_LDFLAGS, ufs_mod_LDFLAGS, minix_mod_LDFLAGS)
13490         (hfs_mod_LDFLAGS, jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS)
13491         (xfs_mod_LDFLAGS, _linux_mod_LDFLAGS, linux_mod_LDFLAGS)
13492         (normal_mod_LDFLAGS, hello_mod_LDFLAGS, boot_mod_LDFLAGS)
13493         (terminal_mod_LDFLAGS, ls_mod_LDFLAGS, cmp_mod_LDFLAGS)
13494         (cat_mod_LDFLAGS, help_mod_LDFLAGS, reboot_mod_LDFLAGS)
13495         (halt_mod_LDFLAGS, vga_mod_LDFLAGS, font_mod_LDFLAGS)
13496         (terminfo_mod_LDFLAGS, serial_mod_LDFLAGS, _multiboot_mod_LDFLAGS)
13497         (multiboot_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
13498         (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
13499         (default_mod_LDFLAGS, timeout_mod_LDFLAGS, configfile_mod_LDFLAGS)
13500         (vbe_mod_LDFLAGS, vesafb_mod_LDFLAGS, vbeinfo_mod_LDFLAGS)
13501         (vbetest_mod_LDFLAGS, search_mod_LDFLAGS, gzio_mod_LDFLAGS): New
13502         variables.
13503         (normal_mod_ASFLAGS): Add `-m32'.
13505         * include/grub/types.h (grub_host_addr_t, grub_host_off_t)
13506         (grub_host_size_t, grub_host_ssize_t): New types.
13507         (grub_addr_t, grub_off_t, grub_size_t, grub_ssize_t): Make type
13508         dependent of `GRUB_CPU_SIZEOF_VOID_P' instead on
13509         `GRUB_HOST_SIZEOF_VOID_P'.
13511         * include/grub/kernel.h (struct grub_module_header): Type of
13512         member offset changed to `grub_host_off_t'.  Type of member size
13513         changed to `grub_host_size_t'.
13514         (struct grub_module_info): Type of member offset changed to
13515         `grub_host_off_t'.  Type of member size changed to
13516         `grub_host_size_t'.
13518 2005-09-29  Yoshinori K. Okuji  <okuji@enbug.org>
13520         Make GRUB's kernel compliant to Multiboot Specification.
13522         * kern/i386/pc/startup.S (multiboot_header): New label.
13523         (multiboot_entry): Likewise.
13524         (multiboot_trampoline): Likewise.
13526         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
13527         Increased to 0x4A0.
13529         * fs/xfs.c (grub_xfs_iterate_dir): Fix a syntax error. You may not
13530         put parentheses after a question mark.
13531         [!GRUB_UTIL] (my_mod): New variable.
13533         * util/grub-emu.c (main): Call grub_xfs_init and grub_xfs_fini.
13535 2005-09-28  Marco Gerards  <mgerards@xs4all.nl>
13537         Adds support for the XFS filesystem.  Btrees are not supported
13538         yet.
13540         * fs/xfs.c: New file.
13542         * DISTLIST: Added `fs/xfs.c'.
13544         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/xfs.c'.
13545         (grub_probefs_SOURCES): Likewise.
13546         (grub_emu_SOURCES): Likewise.
13547         (pkgdata_MODULES): Add `xfs.mod'.
13548         (xfs_mod_SOURCES): New variable.
13549         (xfs_mod_CFLAGS): Likewise.
13551         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/xfs.c'.
13552         (pkgdata_MODULES): Add `xfs.mod'.
13553         (xfs_mod_SOURCES): New variable.
13554         (xfs_mod_CFLAGS): Likewise.
13556         * util/grub-emu.c (main): Call `grub_xfs_init' and
13557         `grub_xfs_fini'.
13559         * include/grub/fs.h (grub_xfs_init): New prototype.
13560         (grub_xfs_fini): Likewise.
13563 2005-09-18  Vesa Jaaskelainen  <chaac@nic.fi>
13565         * video/i386/pc/vbe.c (grub_vbe_set_video_mode): In indexed
13566         color modes, allow greater than 16 colors to be configured as
13567         a default palette.
13569 2005-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
13571         * normal/completion.c (complete_arguments): Add the qualifier
13572         const into OPTIONS.
13574         From Omniflux <omniflux+lists@omniflux.com>:
13575         * include/grub/terminfo.h: New file.
13576         * include/grub/tparm.h: Likewise.
13577         * include/grub/i386/pc/serial.h: Likewise.
13578         * term/terminfo.c: Likewise.
13579         * term/tparm.c: Likewise.
13580         * term/i386/pc/serial.c: Likewise.
13581         * conf/i386-pc.rmk (pkgdata_MODULES): Added terminfo.mod and
13582         serial.mod.
13583         (terminfo_mod_SOURCES): New variable.
13584         (terminfo_mod_CFLAGS): Likewise.
13585         (serial_mod_SOURCES): Likewise.
13586         (serial_mod_CFLAGS): Likewise.
13588 2005-08-31  Yoshinori K. Okuji  <okuji@enbug.org>
13590         * DISTLIST: Replaced boot/powerpc/ieee1275/crt0.S and
13591         boot/powerpc/ieee1275/cmain.c with kern/powerpc/ieee1275/crt0.S
13592         and kern/powerpc/ieee1275/cmain.c, respectively.
13594         * boot/powerpc/ieee1275/crt0.S: Moved to ...
13595         * kern/powerpc/ieee1275/crt0.S: ... here.
13597         * boot/powerpc/ieee1275/cmain.c: Moved to ...
13598         * kern/powerpc/ieee1275/cmain.c: ... here.
13600         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Use
13601         kern/powerpc/ieee1275/crt0.S and kern/powerpc/ieee1275/cmain.c
13602         instead of boot/powerpc/ieee1275/crt0.S and
13603         boot/powerpc/ieee1275/cmain.c, respectively.
13605         * boot/i386/pc/boot.S (lba_mode): Do not store the total number of
13606         sectors. It was not used anyway.
13608 2005-08-30  Hollis Blanchard  <hollis@penguinppc.org>
13610         * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): Fix
13611         `unused parameter' warning.
13613 2005-08-30  Hollis Blanchard  <hollis@penguinppc.org>
13615         * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): New
13616         function.
13617         (grub_ofconsole_term): Specify grub_ofconsole_getcharwidth as
13618         getcharwidth.
13620 2005-08-28  Marco Gerards  <metgerards@student.han.nl>
13622         * include/grub/normal.h (enum grub_completion_type): Added
13623         `GRUB_COMPLETION_TYPE_ARGUMENT'.
13625         * normal/cmdline.c (print_completion): Handle
13626         the `GRUB_COMPLETION_TYPE_ARGUMENT' type.
13627         * normal/menu_entry.c (store_completion): Likewise.
13629         * normal/completion.c (complete_arguments): New function.
13630         (grub_normal_do_completion): Call `complete_arguments' when the
13631         current words start with a dash.
13633 2005-08-27  Marco Gerards  <metgerards@student.han.nl>
13635         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Fix typo (use
13636         `gzio.mod' instead of `io.mod').
13638 2005-08-22  Yoshinori K. Okuji  <okuji@enbug.org>
13640         * gendistlist.sh (EXTRA_DISTFILES): Added genfslist.sh.
13641         (DISTDIRS): Added io and video.
13642         Rewrite the search routine to make an output consistently.
13644         * DISTLIST: Added conf/sparc64-ieee1275.mk,
13645         conf/sparc64-ieee1275.rmk, include/grub/gzio.h,
13646         include/grub/ieee1275/ieee1275.h, include/grub/ieee1275/ofdisk.h,
13647         io/gzio.c, kern/sparc64/cache.c, kern/sparc64/dl.c,
13648         kern/sparc64/ieee1275/init.c, kern/sparc64/ieee1275/openfw.c and
13649         util/powerpc/ieee1275/misc.c.
13651         * include/grub/gzio.h: New file.
13652         * io/gzio.c: Likewise.
13654         * kern/file.c (grub_file_close): Call grub_device_close only if
13655         FILE->DEVICE is not NULL.
13657         * include/grub/mm.h [!NULL] (NULL): New macro.
13659         * include/grub/err.h (GRUB_ERR_BAD_GZIP_DATA): New constant.
13661         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added io/gzip.c.
13662         (pkgdata_MODULES): Added gzio.mod.
13663         (gzio_mod_SOURCES): New variable.
13664         (gzio_mod_CFLAGS): Likewise.
13666         * conf/i386-pc.rmk (grub_emu_SOURCES): Added io/gzip.c.
13667         (pkgdata_MODULES): Added gzio.mod.
13668         (gzio_mod_SOURCES): New variable.
13669         (gzio_mod_CFLAGS): Likewise.
13671         * commands/cat.c: Include grub/gzio.h.
13672         (grub_cmd_cat): Use grub_gzfile_open instead of
13673         grub_file_open.
13675         * commands/cmp.c: Include grub/gzio.h.
13676         (grub_cmd_cmp): Use grub_gzfile_open instead of
13677         grub_file_open.
13679         * loader/i386/pc/multiboot.c: Include grub/gzio.h.
13680         (grub_rescue_cmd_multiboot): Use grub_gzfile_open instead of
13681         grub_file_open.
13682         (grub_rescue_cmd_module): Likewise.
13684 2005-08-21  Vincent Pelletier  <subdino2004@yahoo.fr>
13686         * conf/sparc64-ieee1275.rmk (grubof_SOURCES): The first file must be
13687         kern/sparc64/ieee1275/init.c because it contains _start.
13688         * conf/sparc64-ieee1275.mk: Generated from conf/sparc64-ieee1275.rmk.
13690 2005-08-21  Vincent Pelletier  <subdino2004@yahoo.fr>
13692         * configure.ac: Add support for sparc64 host with ieee1275
13693         firmware.
13694         * configure: Generated from configure.ac.
13695         * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Use grub_ssize_t
13696         instead of int.
13697         (grub_ofdisk_read): Likewise.
13698         (grub_ofdisk_open): Use %p to print pointer values, and cast the
13699         pointers as (void *) to remove a warning.
13700         (grub_ofdisk_close): Likewise.
13701         (grub_ofdisk_read): Likewise.
13702         * kern/ieee1275/ieee1275.c (grub_ieee1275_exit): This never
13703         returns, so make it return void to remove a warning.
13704         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_exit):
13705         Corresponding prototype change.
13706         * kern/mm.c (grub_mm_init_region): Use %p to print pointer
13707         values, and cast the pointers as (void *) to remove a warning.
13708         (grub_mm_dump): Likewise.
13709         * conf/sparc64-ieee1275.mk: New file.
13710         * conf/sparc64-ieee1275.rmk: Likewise.
13711         * include/grub/sparc64/setjmp.h: Likewise.
13712         * include/grub/sparc64/types.h: Likewise.
13713         * include/grub/sparc64/ieee1275/console.h: Likewise.
13714         * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
13715         * include/grub/sparc64/ieee1275/kernel.h: Likewise.
13716         * include/grub/sparc64/ieee1275/time.h: Likewise.
13717         * kern/sparc64/cache.c: Likewise.
13718         * kern/sparc64/dl.c: Likewise.
13719         * kern/sparc64/ieee1275/init.c: Likewise.
13720         * kern/sparc64/ieee1275/openfw.c: Likewise.
13722 2005-08-21  Yoshinori K. Okuji  <okuji@enbug.org>
13724         * util/console.c (grub_ncurses_putchar): If C is greater than
13725         0x7f, set C to a question mark.
13726         (grub_ncurses_getcharwidth): New function.
13727         (grub_ncurses_term): Specify grub_ncurses_getcharwidth as
13728         getcharwidth.
13730         * normal/menu.c (print_entry): Made aware of Unicode. First,
13731         convert TITLE to UCS-4, and predict the cursor position by
13732         grub_getcharwidth.
13734         * include/grub/misc.h (grub_utf8_to_ucs4): Specify the qualifier
13735         const to SRC.
13736         * kern/misc.c (grub_utf16_to_utf8): Likewise.
13738 2005-08-20  Yoshinori K. Okuji  <okuji@enbug.org>
13740         * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Specify
13741         the boot file by the option BOOT_IMAGE. Use grub_stpcpy instead of
13742         grub_strcat.
13744         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Specify the boot
13745         file by the option BOOT_IMAGE. Use grub_stpcpy instead of
13746         grub_strcpy and grub_strlen. Take it into account that a space
13747         character is inserted as a delimiter.
13749 2005-08-20  Yoshinori K. Okuji  <okuji@enbug.org>
13751         * partmap/pc.c (pc_partition_map_iterate): Include the value of an
13752         invalid magic in the error.
13754         * commands/search.c: New file.
13756         * util/grub-emu.c (main): Call grub_search_init and
13757         grub_search_fini.
13759         * kern/rescue.c (grub_rescue_print_disks): Removed.
13760         (grub_rescue_print_devices): New function.
13761         (grub_rescue_cmd_ls): Use grub_device_iterate with
13762         grub_rescue_print_devices instead of grub_disk_dev_iterate with
13763         grub_rescue_print_disks.
13765         * kern/partition.c (grub_partition_iterate): Return the result of
13766         PARTMAP->ITERATE instead of GRUB_ERRNO.
13768         * kern/device.c: Include grub/partition.h.
13769         (grub_device_iterate): New function.
13771         * include/grub/partition.h (grub_partition_iterate): Return int
13772         instead of grub_err_t.
13774         * include/grub/normal.h [GRUB_UTIL] (grub_search_init): New
13775         prototype.
13776         [GRUB_UTIL] (grub_search_fini): Likewise.
13778         * include/grub/device.h (grub_device_iterate): New prototype.
13780         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
13781         commands/search.c.
13782         (pkgdata_MODULES): Added search.mod.
13783         (search_mod_SOURCES): New variable.
13784         (search_mod_CFLAGS): Likewise.
13786         * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/search.c.
13787         (pkgdata_MODULES): Added search.mod.
13788         (search_mod_SOURCES): New variable.
13789         (search_mod_CFLAGS): Likewise.
13791         * commands/ls.c (grub_ls_list_disks): Renamed to ...
13792         (grub_ls_list_devices): ... this, and use grub_device_iterate.
13793         All callers changed.
13795         * DISTLIST: Added commands/search.c.
13797 2005-08-20  Yoshinori K. Okuji  <okuji@enbug.org>
13799         * kern/term.c (grub_putchar): Use grub_utf8_to_ucs4 for the
13800         conversion.
13801         (grub_getcharwidth): New function.
13803         * kern/misc.c (grub_utf8_to_ucs4): New function.
13805         * include/grub/term.h (struct grub_term): Added a new member
13806         "getcharwidth".
13807         (grub_getcharwidth): New prototype.
13809         * include/grub/misc.h (grub_utf8_to_ucs4): New prototype.
13811         * term/i386/pc/console.c (map_char): New function. Segregated from
13812         grub_console_putchar.
13813         (grub_console_putchar): Use map_char.
13814         (grub_console_getcharwidth): New function.
13815         (grub_console_term): Specified grub_console_getcharwidth as
13816         getcharwidth.
13818         * term/i386/pc/vga.c (grub_vga_getcharwidth): New function.
13819         (grub_vga_term): Specified grub_vga_getcharwidth as getcharwidth.
13821         * term/i386/pc/vesafb.c (grub_virtual_screen_setup): Return
13822         GRUB_ERRNO.
13823         (grub_vesafb_init): Do not use RC. Instead, use GRUB_ERRNO. Rely
13824         on grub_strtoul completely.
13825         (write_char): Declare local variables in the beginning of the
13826         function.
13827         (grub_vesafb_getcharwidth): New function.
13828         (grub_vesafb_term): Specified grub_vesafb_getcharwidth as
13829         getcharwidth.
13831 2005-08-19  Yoshinori K. Okuji  <okuji@enbug.org>
13833         * DISTLIST: Replace commands/i386/pc/vbe_list_modes.c and
13834         commands/i386/pc/vbe_test.c with commands/i386/pc/vbeinfo.c and
13835         commands/i386/pc/vbetest.c.
13837         * video/i386/pc/vbe.c (grub_vbe_probe): If INFOBLOCK is not NULL,
13838         call grub_vbe_get_controller_info again, because the returned
13839         information is volatile.
13840         (grub_vbe_set_video_mode): Mostly rewritten.
13841         (grub_vbe_get_video_mode): Use grub_vbe_probe and use
13842         grub_vbe_status_t correctly.
13843         (grub_vbe_get_video_mode_info): Likewise.
13844         (grub_vbe_set_pixel_rgb): Use a switch statement rather than
13845         several if statements.
13847         * commands/i386/pc/vbe_list_modes.c: Renamed to ...
13848         * commands/i386/pc/vbeinfo.c: ... this.
13850         * commands/i386/pc/vbe_test.c: Renamed to ...
13851         * commands/i386/pc/vbetest.c: ... this.
13853         * commands/i386/pc/vbeinfo.c (grub_cmd_vbe_list_modes): Renamed to
13854         ...
13855         (grub_cmd_vbeinfo): ... this. Save video modes before
13856         iterating. Skip a video mode, if it is not available, not enough
13857         information is given or it is monochrome. Show the memory
13858         model. Leave the interpretation of MODEVAR to grub_strtoul
13859         completely.
13860         (GRUB_MOD_INIT): Rename vbe_list_modes to vbeinfo.
13861         (GRUB_MOD_FINI): Likewise.
13863         * commands/i386/pc/vbetest.c (grub_cmd_vbe_test): Renamed to ...
13864         (grub_cmd_vbetest): ... this. Don't print unnecessarily. Use
13865         grub_err_t instead of grub_uint32_t. Don't use SPTR. Remove a
13866         duplicated grub_env_get. Leave the interpretation of MODEVAR to
13867         grub_strtoul completely.
13868         (real2pm): Removed.
13869         (GRUB_MOD_INIT): Rename vbe_test to vbetest.
13870         (GRUB_MOD_FINI): Likewise.
13872         * normal/misc.c: Include grub/mm.h.
13874         * conf/i386-pc.rmk (pkgdata_MODULES): Replaced vbe_test.mod and
13875         vbe_list_modes with vbetest.mod and vbeinfo.mod.
13876         (vbe_list_modes_mod_SOURCES): Removed.
13877         (vbe_list_modes_mod_CFLAGS): Likewise.
13878         (vbe_test_mod_SOURCES): Likewise.
13879         (vbe_test_mod_CFLAGS): Likewise.
13880         (vbeinfo_mod_SOURCES): New variable.
13881         (vbeinfo_mod_CFLAGS): Likewise.
13882         (vbetest_mod_SOURCES): Likewise.
13883         (vbetest_mod_CFLAGS): Likewise.
13885 2005-08-18  Yoshinori K. Okuji  <okuji@enbug.org>
13887         * normal/misc.c: New file.
13889         * DISTLIST: Added normal/misc.c.
13891         * partmap/amiga.c (amiga_partition_map_iterate): Add an argument
13892         DISK to HOOK. Call HOOK with DISK.
13893         * partmap/apple.c (apple_partition_map_iterate): Likewise.
13894         * partmap/pc.c (pc_partition_map_iterate): Likewise.
13895         * partmap/sun.c (sun_partition_map_iterate): Likewise.
13897         * normal/menu_entry.c (struct screen): Added a new member
13898         "completion_shown".
13899         (completion_buffer): New global variable.
13900         (make_screen): Set SCREEN->COMPLETION_SHOWN to zero.
13901         (store_completion): New function.
13902         (complete): Likewise.
13903         (clear_completions): Likewise.
13904         (grub_menu_entry_run): If SCREEN->COMPLETION_SHOWN is non-zero,
13905         call clear_completions and reset SCREEN->COMPLETION_SHOWN. If C is
13906         a tab, call complete.
13908         * normal/completion.c (disk_dev): Removed.
13909         (print_simple_completion): Likewise.
13910         (print_partition_completion): Likewise.
13911         (print_func): New global variable.
13912         (add_completion): Do not take the arguments WHAT or PRINT any
13913         longer. Added a new argument TYPE. Instead of printing directly,
13914         call PRINT_FUNC if not NULL.
13915         All callers changed.
13916         (complete_device): Use a local variable DEV instead of
13917         DISK_DEV. Do not move CURRENT_WORD to the end of a device name.
13918         (grub_normal_do_completion): Take a new argument HOOK. Do not
13919         initialize DISK_DEV. Initialize PRINT_FUNC to HOOK. If RET is an
13920         empty string, return NULL instead.
13921         All callers changed.
13923         * normal/cmdline.c (print_completion): New function.
13925         * kern/partition.c (grub_partition_iterate): Add an argument DISK
13926         to HOOK.
13927         All callers changed.
13929         * kern/disk.c (grub_print_partinfo): Removed.
13931         * include/grub/partition.h (struct grub_partition_map): Add a new
13932         argument DISK into HOOK of ITERATE.
13933         (grub_partition_iterate): Add a new argument DISK to HOOK.
13935         * include/grub/normal.h (enum grub_completion_type): New enum.
13936         (grub_completion_type_t): New type.
13937         (GRUB_COMPLETION_TYPE_COMMAND): New constant.
13938         (GRUB_COMPLETION_TYPE_DEVICE): Likewise.
13939         (GRUB_COMPLETION_TYPE_PARTITION): Likewise.
13940         (GRUB_COMPLETION_TYPE_FILE): Likewise.
13941         (grub_normal_do_completion): Added a new argument HOOK.
13942         (grub_normal_print_device_info): New prototype.
13944         * include/grub/disk.h (grub_print_partinfo): Removed.
13946         * conf/i386-pc.rmk (grub_emu_SOURCES): Added normal/misc.c.
13947         (normal_mod_SOURCES): Likewise.
13948         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
13949         (normal_mod_SOURCES): Likewise.
13951         * commands/ls.c (grub_ls_list_disks): Use
13952         grub_normal_print_device_info instead of grub_print_partinfo. Free
13953         PNAME.
13954         (grub_ls_list_files): Use grub_normal_print_device_info instead of
13955         duplicating the code.
13957 2005-08-16  Vesa Jaaskelainen  <chaac@nic.fi>
13959         * commands/i386/pc/vbe_list_modes.c: Update source formatting to
13960         follow GCS more precisely.
13961         * commands/i386/pc/vbe_test.c: Likewise.
13962         * include/grub/i386/pc/vbe.h: Likewise.
13963         * term/i386/pc/vesafb.c: Likewise.
13964         * video/i386/pc/vbe.c: Likewise.
13966 2005-08-16  Vesa Jaaskelainen  <chaac@nic.fi>
13968         * DISTLIST: Added term/i386/pc/vesafb.c
13969         DISTLIST: Added video/i386/pc/vbe.c
13970         DISTLIST: Added commands/i386/pc/vbe_list_modes.c.
13971         DISTLIST: Added commands/i386/pc/vbe_test.c.
13972         * commands/i386/pc/vbe_list_modes.c: New file.
13973         * commands/i386/pc/vbe_test.c: Likewise.
13974         * term/i386/pc/vesafb.c: Likewise.
13975         * video/i386/pc/vbe.c: Likewise.
13976         * include/grub/i386/pc/vbe.h (GRUB_VBE_DEFAULT_VIDEO_MODE): Added define.
13977         (grub_vbe_probe) Added prototype.
13978         (grub_vbe_set_video_mode) Likewise.
13979         (grub_vbe_get_video_mode) Likewise.
13980         (grub_vbe_get_video_mode_info) Likewise.
13981         (grub_vbe_set_pixel_rgb) Likewise.
13982         (grub_vbe_set_pixel_index) Likewise.
13983         * conf/i386-pc.rmk (pkgdata_MODULES): Added vbe.mod.
13984         (pkgdata_MODULES): Added vesafb.mod.
13985         (pkgdata_MODULES): Added vbe_list_modes.mod.
13986         (pkgdata_MODULES): Added vbe_test.mod.
13987         (vbe_mod_SOURCES): Added.
13988         (vbe_mod_CFLAGS): Likewise.
13989         (vesafb_mod_SOURCES): Likewise.
13990         (vesafb_mod_CFLAGS): Likewise.
13991         (vbe_list_modes_mod_SOURCES): Likewise.
13992         (vbe_list_modes_mod_CFLAGS): Likewise.
13993         (vbe_test_mod_SOURCES): Likewise.
13994         (vbe_test_mod_CFLAGS): Likewise.
13996 2005-08-14  Yoshinori K. Okuji  <okuji@enbug.org>
13998         * normal/command.c (grub_command_execute): If INTERACTIVE is
13999         false and GRUB_COMMAND_FLAG_NO_ECHO is not specified, print
14000         CMDLINE. Disable the pager if INTERACTIVE is true.
14001         All callers are changed.
14003         * normal/main.c (grub_normal_execute): Read command.lst and fs.lst
14004         before reading a config file.
14005         * normal/main.c (read_config_file): Even if a command is not
14006         found, register it if it is within an entry.
14008         * util/grub-emu.c: Include sys/types.h and unistd.h.
14009         (options): Added --hold.
14010         (struct arguments): Added a new member "hold".
14011         (parse_opt): If KEY is 'H', set ARGS->HOLD to ARG or -1 if ARG is
14012         missing.
14013         (main): Initialize ARGS.HOLD to zero. Wait until ARGS.HOLD is
14014         cleared by a debugger, if it is not zero.
14016         * include/grub/normal.h (grub_command_execute): Add an argument
14017         INTERACTIVE.
14019 2005-08-14  Vesa Jaaskelainen  <chaac@nic.fi>
14021         * DISTLIST: Added include/grub/i386/pc/vbe.h.
14023 2005-08-13  Yoshinori K. Okuji  <okuji@enbug.org>
14025         * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Replace the test
14026         program with another one, because the old one didn't detect a bug
14027         in gcc-3.4. Always use regparm 2, because the new test is still
14028         not enough for gcc-4.0. Someone must investigate a simple test
14029         case which detects a bug in gcc-4.0.
14031 2005-08-12  Yoshinori K. Okuji  <okuji@enbug.org>
14033         * DISTLIST: Added normal/completion.c.
14035         * normal/completion.c: New file.
14037         * term/i386/pc/console.c (grub_console_getwh): New function.
14038         (grub_console_term): Assign grub_console_getwh to getwh.
14040         * normal/cmdline.c (grub_tab_complete): Removed. Now the same
14041         function is defined in normal/completion.c as
14042         grub_normal_do_completion.
14043         (grub_cmdline_get): Use grub_normal_do_completion instead of
14044         grub_tab_complete.
14046         * kern/partition.c (grub_partition_map_iterate): Return 1 if HOOK
14047         returns non-zero, otherwise return 0.
14048         (grub_partition_iterate): First, probe the partition map. Then,
14049         call ITERATE only for this partition map.
14051         * kern/misc.c (grub_strncmp): Rewritten.
14053         * kern/disk.c (grub_disk_dev_iterate): Return 1 if P->ITERATE
14054         returns non-zero. Otherwise return 0.
14056         * include/grub/partition.h (grub_partition_map_iterate): Return
14057         int instead of void.
14059         * include/grub/normal.h (grub_normal_do_completion): New prototype.
14061         * include/grub/misc.h (grub_strncmp): Change the type of N to
14062         grub_size_t.
14064         * include/grub/disk.h (grub_disk_dev_iterate): Return int instead
14065         of void.
14067         * normal/menu.c (draw_border): Cast GRUB_TERM_BORDER_WIDTH to
14068         unsigned explicitly before comparing it with I.
14070         * kern/main.c (grub_env_write_root): Add the attribute unused into
14071         VAR.
14073         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
14074         normal/completion.c.
14075         (normal_mod_SOURCES): Likewise.
14076         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
14077         (normal_mod_SOURCES): Likewise.
14079         * normal/command.c (grub_iterate_commands): If ITERATE returns
14080         non-zero, return one immediately.
14082 2005-08-09  Vesa Jaaskelainen  <chaac@nic.fi>
14084         * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vbe.h.
14085         * kern/i386/pc/startup.S: Updated Global Descriptor table's
14086         descriptions.
14087         (grub_vbe_get_controller_info): New function.
14088         (grub_vbe_get_mode_info): Likewise.
14089         (grub_vbe_set_mode): Likewise.
14090         (grub_vbe_get_mode): Likewise.
14091         (grub_vbe_set_memory_window): Likewise.
14092         (grub_vbe_get_memory_window): Likewise.
14093         (grub_vbe_set_scanline_length): Likewise.
14094         (grub_vbe_get_scanline_length): Likewise.
14095         (grub_vbe_set_display_start): Likewise.
14096         (grub_vbe_get_display_start): Likewise.
14097         (grub_vbe_set_palette_data): Likewise.
14098         * include/grub/i386/pc/vbe.h: New file.
14100 2005-08-08  Hollis Blanchard  <hollis@penguinppc.org>
14102         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
14103         kern/ieee1275/of.c with kern/ieee1275/ieee1275.c.
14104         * DISTLIST: Likewise.
14105         * kern/ieee1275/of.c: Moved to ...
14106         * kern/ieee1275/ieee1275.c: ... here.
14108 2005-08-08  Hollis Blanchard  <hollis@penguinppc.org>
14110         * term/ieee1275/ofconsole.c: Include <grub/mm.h>.
14111         (grub_ofconsole_getwh): Cast -1 to type grub_ieee1275_ihandle_t.
14112         Pass 0 as `end' parameter to grub_strtoul().
14114 2005-08-08  Hollis Blanchard  <hollis@penguinppc.org>
14116         * include/grub/powerpc/ieee1275/console.h: Do not include
14117         <grub/types.h>.  Do not include <grub/symbol.h>.  Remove ASM_FILE
14118         ifdef.
14119         (grub_console_cur_color): Remove i386-specific prototype.
14120         (grub_console_real_putchar): Likewise.
14121         (grub_console_checkkey): Likewise.
14122         (grub_console_getkey): Likewise.
14123         (grub_console_getxy): Likewise.
14124         (grub_console_gotoxy): Likewise.
14125         (grub_console_cls): Likewise.
14126         (grub_console_setcursor): Likewise.
14127         * kern/powerpc/ieee1275/init.c: Don't include <grub/console.h>.
14128         Include <grub/machine/console.h>.
14129         * term/ieee1275/ofconsole.c: Likewise.
14131 2005-08-08  Yoshinori K. Okuji  <okuji@enbug.org>
14133         * Makefile.in (LIBLZO): New variable.
14135         * configure.ac: Check for LZO version 2.
14137         * util/i386/pc/grub-mkimage.c [HAVE_LZO_LZO1X_H]: Include
14138         lzo/lzo1x.h instead of lzo1x.h.
14140         * conf/i386-pc.rmk (grub_mkimage_LDFLAGS): Use $(LIBLZO) instead
14141         of -llzo.
14143         * util/i386/pc/grub-setup.c (main): Do not free PREFIX
14144         twice. Reported by Vladimir Serbinenko <phcoder@gmail.com>.
14146         * partmap/pc.c (pc_partition_map_probe): Restore P->DATA after
14147         copying the data from PARTITION to P.
14149 2005-08-07  Yoshinori K. Okuji  <okuji@enbug.org>
14151         * kern/rescue.c (grub_rescue_cmd_rmmod): If the reference count is
14152         negative, unload the module.
14154         * util/i386/pc/grub-setup.c (setup): The name of the PC partition
14155         map is "pc_partition_map" but not "pc".
14156         (usage): Fix the description. The options are --boot-image and
14157         --core-image but not --boot-file or --core-file.
14158         (main): If not specified explicitly, make BOOT_FILE and CORE_FILE
14159         based on DEFAULT_BOOT_FILE and DEFAULT_CORE_FILE with DIR or
14160         DEFAULT_DIRECTORY.
14162         * util/i386/pc/grub-install.in: Do not specify --boot-file or
14163         --core-file. Specify INSTALL_DEVICE as an argument.
14165         * util/console.c: Include config.h.
14166         [HAVE_NCURSeS_CURSES_H]: Include ncurses/curses.h.
14167         [HAVE_NCURSES_H]: Include ncurses.h.
14168         [HAVE_CURSES_H]: Include curses.h.
14169         [!A_NORMAL] (A_NORMAL): Defined as zero.
14170         [!A_STANDOUT] (A_STANDOUT): Likewise.
14172         * conf/i386-pc.rmk (grub_emu_LDFLAGS): Use $(LIBCURSES) instead of
14173         -lncurses.
14174         * conf/powerpc-ieee1275.rmk (grub_emu_LDFLAGS): Likewise.
14176         * configure.ac: Check for curses libraries and headers.
14178         * Makefile.in (LIBCURSES): New variable.
14180         * genmk.rb (Script::rule): Set the executable bits.
14182         * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): The
14183         name of the PC partition map is "pc_partition_map" but not "pc".
14185 2005-08-07  Yoshinori K. Okuji  <okuji@enbug.org>
14187         * util/i386/pc/grub-install.in (grub_probefs): New variable.
14188         (modules): Likewise.
14189         (usage): Added descriptions for --modules and --grub-probefs.
14190         Handle --modules and --grub-probefs. Save the arguments in MODULES
14191         and GRUB_PROBEFS, respectively.
14192         Auto-detect a filesystem module against GRUBDIR. If the result is
14193         empty and modules are not specified explicitly, abort the
14194         installation. Add the result to MODULES.
14196         * DISTLIST: Removed boot/powerpc/ieee1275/ieee1275.c,
14197         disk/powerpc/ieee1275/ofdisk.c,
14198         include/grub/powerpc/ieee1275/init.h and
14199         term/powerpc/ieee1275/ofconsole.c.
14200         Added disk/ieee1275/ofdisk.c, kern/ieee1275/of.c and
14201         term/ieee1275/ofconsole.c.
14203         * include/grub/powerpc/ieee1275/console.h: Resurrected.
14205         * COPYING: Upgraded to the latest version. Only the address of the
14206         FSF office has changed.
14208 2005-08-07  Yoshinori K. Okuji  <okuji@enbug.org>
14210         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
14211         kern/ieee1275.c with kern/ieee1275/of.c.
14213         * kern/ieee1275.c: Moved to ...
14214         * kern/ieee1275/of.c: ... here.
14216 2005-08-06  Yoshinori K. Okuji  <okuji@enbug.org>
14218         * conf/i386-pc.rmk (kernel_img_HEADERS): Reordered for
14219         readability.
14221         * config.guess: Updated to the latest version from gnulib.
14222         * config.sub: Likewise.
14223         * install.sh: Likewise.
14224         * mkinstalldirs: Likewise.
14226         * include/grub/console.h: Removed. This file is arch-specific. Do
14227         not put this in include/grub.
14229         * include/grub/i386/pc/console.h: Resurrected.
14231         * util/console.c: Include grub/machine/console.h instead of
14232         grub/console.h.
14233         * util/grub-emu.c: Likewise.
14235 2005-08-04  Marco Gerards  <metgerards@student.han.nl>
14237         * kern/term.c (grub_putcode): Use `grub_getwh' instead of
14238         hardcoded value.
14240         From Vincent Pelletier  <subdino2004@yahoo.fr>
14241         * include/grub/term.h (GRUB_TERM_WIDTH, GRUB_TERM_HEIGHT):
14242         Redefined to use grub_getwh.
14243         (grub_term): New member named getwh.
14244         (grub_getwh): New prototype.
14245         * kern/term.c (grub_getwh): New function.
14246         * term/i386/pc/console.c (grub_console_getwh): New function.
14247         (grub_console_term): New member `getwh'.
14248         * term/i386/pc/vga.c (grub_vga_getwh): New function.
14249         (grub_vga_term): New member `getwh'.
14250         * term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Use
14251         grub_ssize_t.
14252         (grub_ofconsole_getw): New function.
14253         (grub_ofconsole_init): Use grub_ssize_t and unsigned char.
14254         (grub_ofconsole_term): New field named getwh and new initial
14255         value.
14257 2005-08-03  Hollis Blanchard  <hollis@penguinppc.org>
14259         * include/grub/powerpc/ieee1275/ieee1275.h: Move ...
14260         * include/grub/ieee1275/ieee1275.h: ... to here.  All users updated.
14261         Move `abort', `grub_reboot', and `grub_halt' prototypes ...
14262         * include/grub/powerpc/ieee1275/kernel.h: ... to here.
14263         * commands/ieee1275/halt.c: Include <grub/machine/kernel.h> instead
14264         of <grub/machine/ieee1275.h>.
14265         * commands/ieee1275/reboot.c: Likewise.
14266         * boot/powerpc/ieee1275/ieee1275.c: Move ...
14267         * kern/ieee1275.c: ... to here.  All users updated.  Change all
14268         parameter structs to use new type `grub_ieee1275_cell_t'.
14269         * term/powerpc/ieee1275/ofconsole.c: Move ...
14270         * term/ieee1275/ofconsole.c: ... to here.  All users updated.
14271         * disk/powerpc/ieee1275/ofdisk.c: Move ...
14272         * disk/ieee1275/ofdisk.c: ... to here.  All users updated.
14273         * boot/powerpc/ieee1275/cmain.c: Change `grub_ieee1275_entry_fn' type
14274         to return int.
14275         * include/grub/i386/pc/console.h: Move to include/grub/console.h.
14276         Remove unused prototypes.  All users updated.
14277         * include/grub/powerpc/ieee1275/console.h: Removed.
14278         * include/grub/powerpc/ieee1275/ieee1275.h: Define
14279         `grub_ieee1275_cell_t'.
14280         * kern/powerpc/ieee1275/openfw.c: Include <grub/machine/kernel.h>.
14281         Cast comparisons with -1 to the correct type.
14282         * loader/powerpc/ieee1275/linux.c (kernel_entry_t): Change parameter
14283         type to match `grub_ieee1275_entry_fn'.
14285 2005-08-01  Yoshinori K. Okuji  <okuji@enbug.org>
14287         * DISTLIST: Added util/i386/pc/grub-probefs.c.
14289         * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-probefs.
14290         (grub_setup_SOURCES): Removed partmap/amiga.c, partmap/apple.c and
14291         partmap/sun.c.
14292         (grub_probefs_SOURCES): New variable.
14294         * util/i386/pc/grub-probefs.c: New file.
14296         * util/i386/pc/grub-setup.c (main): Call
14297         grub_pc_partition_map_init, grub_ufs_init, grub_minix_init,
14298         grub_hfs_init and grub_jfs_init to initialize the system. Call
14299         grub_ufs_fini, grub_minix_fini, grub_hfs_fini, grub_jfs_init and
14300         grub_pc_partition_map_fini to finish the system.
14302 2005-07-31  Yoshinori K. Okuji  <okuji@enbug.org>
14304         * loader/i386/pc/multiboot.c (grub_multiboot_is_elf32): New
14305         function.
14306         (grub_multiboot_load_elf32): Likewise.
14307         (grub_multiboot_is_elf64): Likewise.
14308         (grub_multiboot_load_elf64): Likewise.
14309         (grub_multiboot_load_elf): Likewise.
14310         (grub_rescue_cmd_multiboot): Call grub_multiboot_load_elf to load
14311         an ELF32 or ELF64 file.
14312         This is based on a patch from Ruslan Nikolaev <nruslan@mail.com>.
14314         From Serbinenko Vladimir <serbinenko.vova@list.ru>:
14315         * kern/disk.c (grub_print_partinfo): Check if FS->LABEL is not
14316         NULL before calling FS->LABEL.
14317         * fs/fat.c (grub_fat_dir): Initialize DIRNAME to NULL.
14318         * commands/ls.c (grub_ls_list_files): Show labels, if possible.
14319         (grub_ls_list_disks): Check if FS and FS->LABEL are not NULL
14320         before calling FS->LABEL.
14322 2005-07-26  Yoshinori K. Okuji  <okuji@enbug.org>
14324         * util/i386/pc/grub-install.in (datadir): New variable.
14325         (libdir): Removed.
14326         (pkgdatadir): New variable.
14327         (pkglibdir): Removed.
14329 2005-07-24  Yoshinori K. Okuji  <okuji@enbug.org>
14331         * DISTLIST: Added util/i386/pc/grub-install.in.
14333         * util/i386/pc/grub-install.in: New file.
14335         * conf/i386-pc.rmk (sbin_SCRIPTS): New variable.
14336         (grub_install_SOURCES): Likewise.
14338         * genmk.rb: Added support for scripts.
14339         (Script): New class.
14340         (scripts): New variable.
14342         * Makefile.in (install-local): Install sbin_SCRIPTS by
14343         INSTALL_SCRIPT.
14344         (uninstall): Remove sbin_SCRIPTS.
14346         * util/i386/pc/grub-setup.c (main): If the argument is not a GRUB
14347         device, try to get a GRUB device by
14348         grub_util_biosdisk_get_grub_dev.
14349         Free DEST_DEV.
14351         * util/i386/pc/grub-mkdevicemap.c (usage): Remove a duplicated
14352         description for --device-map.
14354 2005-07-20  Yoshinori K. Okuji  <okuji@enbug.org>
14356         Change the semantics of variable hooks. They now return strings
14357         instead of error values.
14359         * util/i386/pc/grub-setup.c: Include grub/env.h.
14360         (setup): Use grub_device_set_root instead of grub_env_set.
14362         * kern/rescue.c (grub_rescue_cmd_root): Use grub_env_set and
14363         grub_env_get instead of grub_device_set_root and
14364         grub_device_get_root, respectively.
14366         * kern/main.c (grub_env_write_root): New function.
14367         (grub_set_root_dev): Register grub_env_write_hook for "root". Use
14368         grub_env_set instead of grub_device_set_root.
14370         * kern/env.c (HASHSZ): Reduced to 13, because GRUB does not need
14371         many variables.
14372         (grub_env_set): Set ENV->VALUE to the result of ENV->WRITE_HOOK
14373         rather than calling ENV->WRITE_HOOK afterwards.
14374         (grub_env_get): Return the result of ENV->READ_HOOK rather than
14375         passing a pointer of a pointer.
14376         (grub_register_variable_hook): Change the types of "read_hook" and
14377         "write_hook" to grub_env_read_hook_t and grub_env_write_hook_t,
14378         respectively.
14379         Allocate the default empty string on the heap, because this string
14380         may be freed later.
14382         * kern/device.c: Include grub/env.h.
14383         (grub_device_set_root): Removed.
14384         (grub_device_get_root): Likewise.
14385         (grub_device_open): Use grub_env_get instead of
14386         grub_device_get_root.
14388         * include/grub/env.h (grub_env_read_hook_t): New type.
14389         (grub_env_write_hook_t): Likewise.
14390         (grub_env_var): Change the types of "read_hook" and "write_hook"
14391         to grub_env_read_hook_t and grub_env_write_hook_t, respectively.
14392         (grub_register_variable_hook): Likewise.
14394         * include/grub/device.h (grub_device_set_root): Removed.
14395         (grub_device_set_root): Likewise.
14397         * fs/fat.c (grub_fat_dir): Make a copy of PATH in DIRNAME, and
14398         make sure that DIRNAME terminates with '/', so that
14399         grub_fat_find_dir will fail if PATH is not a directory.
14401         * commands/ls.c (grub_ls_list_files): Remove the qualifier const
14402         from DIRNAME.
14403         Use the qualifier auto for print_files and print_files_long.
14404         If FS->DIR sets GRUB_ERRNO to GRUB_ERR_BAD_FILE_TYPE, try DIRNAME
14405         as a regular file.
14406         Put a newline only if there is no error.
14407         (grub_cmd_ls): Remove grub_ls_print_files, because this is not
14408         used.
14410 2005-07-20  Yoshinori K. Okuji  <okuji@enbug.org>
14412         * kern/partition.c (grub_partition_probe): Initialize PART to
14413         NULL. Otherwise, when no partition map is registered, this returns
14414         a garbage.
14416 2005-07-19  Yoshinori K. Okuji  <okuji@enbug.org>
14418         * partmap/apple.c (apple_partition_map_iterate): Check if POS
14419         equals GRUB_DISK_SECTOR_SIZE to see if the partition table is
14420         valid.
14422 2005-07-18  Yoshinori K. Okuji  <okuji@enbug.org>
14424         * commands/ls.c (grub_ls_list_disks): Print the filesystem
14425         information on each device, if it does not have partitions. Print
14426         "Device" instead of "Disk", because this function is not specific
14427         to disk devices.
14429         * normal/main.c (grub_rescue_cmd_normal): Make the variable CONFIG
14430         static to ensure that it is put on the memory rather than a
14431         register.
14433 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
14435         * commands/cat.c (GRUB_MOD_INIT): Use better documentation.
14436         (grub_cat_init): Likewise.
14437         * loader/i386/pc/chainloader_normal.c (GRUB_MOD_INIT): Likewise.
14438         (options): Likewise.
14439         * commands/configfile.c (GRUB_MOD_INIT): Likewise.
14440         (grub_configfile_init): Likewise.
14441         * font/manager.c (GRUB_MOD_INIT): Likewise.
14442         * commands/help.c (GRUB_MOD_INIT): Likewise.
14443         (grub_help_init): Likewise.
14444         * normal/command.c (grub_command_init): Likewise.
14445         * loader/i386/pc/linux_normal.c (GRUB_MOD_INIT): Likewise.
14446         * disk/loopback.c (grub_loop_init): Likewise.
14447         (GRUB_MOD_INIT): Likewise.
14448         * commands/ls.c (grub_ls_init): Likewise.
14449         (GRUB_MOD_INIT): Likewise.
14450         (options): Likewise.
14451         * commands/boot.c (grub_boot_init): Likewise.
14452         (GRUB_MOD_INIT): Likewise.
14453         * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Likewise.
14454         * commands/i386/pc/reboot.c (grub_reboot_init): Likewise.
14455         (GRUB_MOD_INIT): Likewise.
14456         * commands/cmp.c (grub_cmp_init): Likewise.
14457         (GRUB_MOD_INIT): Likewise.
14459         * normal/arg.c: Use <> instead of "" to include header files.
14460         (SHORT_ARG_HELP): New macro.
14461         (SHORT_ARG_USAGE): Likewise.
14462         (help_options): Specify SHORT_ARG_HELP and SHORT_ARG_USAGE instead
14463         of 'h' and 'u' for help and usage, respectively. Use more GNU-like
14464         descriptions.
14465         (find_short): Check if C is 'h' or 'u' explicitly.
14466         (grub_arg_show_help): Use space characters instead of tabs. Treat
14467         SHORT_ARG_HELP and SHORT_ARG_USAGE exceptionally so that -h and -u
14468         are shown with --help and --usage only if they are not used for
14469         the command itself.
14470         (parse_option): Use SHORT_ARG_HELP and SHORT_ARG_USAGE instead of
14471         'h' and 'u'.
14473         * include/grub/arg.h (struct grub_arg_option): Add the qualifier
14474         const into "longarg". Change the type of "shortarg" to int.
14476 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
14478         * boot/i386/pc/boot.S (boot_drive_check): New label.
14480         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRIVE_CHECK): New
14481         macro.
14483         * util/i386/pc/grub-setup.c (setup): Added a workaround for BIOSes
14484         which do not pass a boot drive correctly. Copied from GRUB Legacy.
14486 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
14488         * kern/i386/pc/startup.S (gate_a20_try_system_control_port_a):
14489         When turning off Gate A20, skip the check and return immediately,
14490         because this is not fatal usually.
14492 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
14494         * conf/i386-pc.rmk (pxeboot_img_LDFLAGS): The text address should
14495         be 0x7C00 instead of 0x8000.
14497         * boot/i386/pc/pxeboot.S: Rewritten.
14499         * kern/i386/pc/startup.S (gate_a20_try_bios): No need to specify
14500         EXT_C.
14501         (gate_a20_check_state): Read a byte from 0x108000. Invert the
14502         result.
14504 2005-07-16  Yoshinori K. Okuji  <okuji@enbug.org>
14506         * kern/i386/pc/startup.S (grub_gate_a20): Rewritten for
14507         robustness. This routine now supports a BIOS call and System
14508         Control Port A to modify the gate A20.
14510         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
14511         Increased to 0x440.
14513 2005-07-12  Hollis Blanchard  <hollis@penguinppc.org>
14515         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): dprintf the
14516         device path and resulting ihandle.
14517         (grub_ofdisk_close): dprintf the ihandle being closed.
14518         (grub_ofdisk_read): dprintf function parameters.
14519         * kern/mm.c (grub_mm_init_region): Likewise.
14520         * loader/powerpc/ieee1275/linux.c: Remove extra whitespace.
14521         (grub_linux_boot): dprintf the Linux entry point, initrd address and
14522         size, and boot arguments.
14523         (grub_rescue_cmd_linux): dprintf each ELF segment's address and size
14524         before loading into memory.
14525         (grub_rescue_cmd_initrd): dprintf the initrd's address and size
14526         before loading into memory.
14528 2005-07-12  Yoshinori K. Okuji  <okuji@enbug.org>
14530         * kern/mm.c: Added much documentation.
14531         (GRUB_MM_ALIGN_LOG2): When GRUB_CPU_SIZEOF_VOID_P is
14532         8, set to 5 instead of 8.
14534 2005-07-10  Yoshinori Okuji  <okuji@enbug.org>
14536         * DISTLIST: Added util/i386/pc/grub-mkimage.c.
14538         * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-mkdevicemap.
14539         (grub_mkdevicemap_SOURCES): New variable.
14541         * util/i386/pc/grub-mkdevicemap.c: New file. Mostly copied from
14542         lib/device.c of GRUB Legacy.
14544 2005-07-10  Yoshinori Okuji  <okuji@enbug.org>
14546         * commands/ls.c (grub_ls_list_files): Check if *PATH is NUL
14547         instead of PATH is NULL.
14549 2005-07-09  Vincent Pelletier  <subdino2004@yahoo.fr>
14551         * commands/cmp.c (BUFFER_SIZE): New macro.
14552         (grub_cmd_cmp): Close the right file at the right time.  Compare
14553         only data just read.  Don't report files of different  size as
14554         identical.  Dynamically allocate buffers.  Move variable
14555         declarations at the beginning of function.
14557 2005-07-09  Yoshinori Okuji  <okuji@enbug.org>
14559         * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): The return value was
14560         reverse.
14562 2004-07-04  Vincent Pelletier  <subdino2004@yahoo.fr>
14564         * normal/cmdline.c (grub_cmdline_get): Don't fallback on ctrl-d
14565         when backspace is pressed at beginning of line.
14567 2005-07-03  Yoshinori Okuji  <okuji@enbug.org>
14569         * DISTLIST: Added genfslist.sh.
14571         * normal/main.c (fs_module_list): New variable.
14572         (autoload_fs_module): New function.
14573         (read_fs_list): Likewise.
14574         (grub_normal_execute): Call read_fs_list.
14576         * kern/fs.c (grub_fs_autoload_hook): New variable.
14577         (grub_fs_probe): Added support for auto-loading.
14579         * include/grub/normal.h (struct grub_fs_module_list): New struct.
14580         (grub_fs_module_list_t): New type.
14582         * include/grub/fs.h (grub_fs_autoload_hook_t): New type.
14583         (grub_fs_autoload_hook): New prototype.
14585         * genfslist.sh: New file.
14587         * genmk.rb: Added a rule to generate a filesystem list.
14589 2005-06-30  Marco Gerards  <metgerards@student.han.nl>
14591         * configure.ac: Fix the test for cross-compiling.
14593         * genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'.  Don't
14594         define GRUB_UTIL anymore.
14596         * util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes
14597         so this function works on other systems than just big endian.
14598         (load_modules): Likewise.
14599         (add_segments): Likewise.
14601 2005-06-23  Hollis Blanchard  <hollis@penguinppc.org>
14603         * kern/misc.c (grub_vsprintf): Add `longfmt'.  If format string
14604         contains `l' modifier, get a long from va_arg().
14606 2005-06-23  Yoshinori K. Okuji  <okuji@enbug.org>
14608         * kern/mm.c (grub_free): If the next free block which is being
14609         merged is the first free block, set the first block to the block
14610         being freed.
14611         Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.
14613 2005-05-08  Hollis Blanchard  <hollis@penguinppc.org>
14615         * boot/powerpc/ieee1275/cmain.c (cmain): Initialize
14616         `grub_ieee1275_chosen'.
14618 2005-05-08  Hollis Blanchard  <hollis@penguinppc.org>
14620         * boot/powerpc/ieee1275/cmain.c (module_info): Remove definition.
14621         (grub_ieee1275_chosen): New variable.
14622         (cmain): Initialize and use `grub_ieee1275_chosen' instead of
14623         `chosen'.
14624         * boot/powerpc/ieee1275/crt0.S (init_stack): Remove stack space.
14625         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
14626         Rename first argument to `phandle' for consistency.
14627         (grub_ieee1275_get_property_length): Likewise.
14628         (grub_ieee1275_next_property): Likewise.  Change type of first argument
14629         to grub_ieee1275_phandle_t.
14630         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn):
14631         Move export next to declaration.
14632         (grub_ieee1275_chosen): New variable.
14633         * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MODULE_BASE):
14634         Correct cosmetic typo.
14635         * kern/powerpc/ieee1275/init.c (grub_set_prefix): Use
14636         `grub_ieee1275_chosen'.
14637         * kern/powerpc/ieee1275/openfw.c (grub_map): Likewise.
14638         * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Likewise.
14639         (grub_rescue_cmd_linux): Set `initrd_addr' to 0.
14640         * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_refresh): Use
14641         `grub_ieee1275_chosen'.
14643 2005-05-10  Hollis Blanchard  <hollis@penguinppc.org>
14645         * boot/powerpc/ieee1275/cmain.c (cmain): Remove code to parse
14646         /chosen/bootargs.
14647         * kern/powerpc/ieee1275/init.c (grub_machine_init): Parse
14648         /chosen/bootargs as "variable=value" pairs.
14650 2005-05-08  Vincent Pelletier  <subdino2004@yahoo.fr>
14652         * include/grub/misc.h (grub_dprintf): New macro.
14653         (grub_real_dprintf): New prototype.
14654         (grub_strword): Likewise.
14655         (grub_iswordseparator): Likewise.
14656         * kern/misc.c (grub_real_dprintf): New function.
14657         (grub_strword): Likewise.
14658         (grub_iswordseparator): Likewise.
14660 2005-04-30  Hollis Blanchard  <hollis@penguinppc.org>
14662         * boot/powerpc/ieee1275/cmain.c: Don't include grub/machine/init.h.
14663         (roundup): Remove macro.
14664         (grub_ieee1275_flags): Make static.
14665         (grub_ieee1275_realmode): Remove.
14666         (grub_ieee1275_test_flag): New function.
14667         (grub_ieee1275_set_flag): Likewise.
14668         (find_options): Rename to `grub_ieee1275_find_options'; update
14669         callers. Set GRUB_IEEE1275_FLAG_REAL_MODE and
14670         GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS.
14671         (cmain): New prototype.
14672         (cmain): Use `grub_ieee1275_set_flag' instead of accessing
14673         `grub_ieee1275_flags' directly.
14674         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Remove
14675         machine/biosdisk.h.
14676         * disk/powerpc/ieee1275/ofdisk.c: Include grub/machine/ofdisk.h.
14677         Don't include grub/machine/init.h.
14678         (grub_ofdisk_open): Call `grub_ieee1275_test_flag'.
14679         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
14680         Remove prototype.
14681         (grub_ieee1275_realmode): Likewise.
14682         (grub_ieee1275_flag): New enum.
14683         (grub_ieee1275_test_flag): New prototype.
14684         (grub_ieee1275_set_flag): New prototype.
14685         * include/grub/powerpc/ieee1275/init.h: Remove file.
14686         * include/grub/powerpc/ieee1275/ofdisk.h: New file.
14687         * kern/powerpc/ieee1275/init.c: Don't include grub/machine/init.h.
14688         Include grub/machine/console.h.  Include grub/machine/ofdisk.h.
14689         (grub_machine_fini): Don't call `grub_ieee1275_release'.  Remove
14690         comment.
14691         * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Call
14692         `grub_ieee1275_test_flag'.
14693         (grub_ieee1275_encode_devname): Likewise.
14695 2005-04-21  Hollis Blanchard  <hollis@penguinppc.org>
14697         * include/grub/powerpc/ieee1275/ieee1275.h
14698         (grub_ieee1275_encode_devname): New prototype.
14699         (grub_ieee1275_get_filename): Likewise.
14700         * kern/powerpc/ieee1275/init.c (grub_translate_ieee175_path): New
14701         function.
14702         (grub_set_prefix): Likewise.
14703         (grub_machine_init): Call grub_set_prefix.
14704         * kern/powerpc/ieee1275/openfw.c: Fix typos.
14705         (grub_parse_type): New enum.
14706         (grub_ieee1275_get_devargs): New function.
14707         (grub_ieee1275_get_devname): Likewise.
14708         (grub_ieee1275_parse_args): Likewise.
14709         (grub_ieee1275_get_filename): Likewise.
14710         (grub_ieee1275_encode_devname): Likewise.
14712 2005-03-30  Marco Gerards  <metgerards@student.han.nl>
14714         * kern/powerpc/ieee1275/init.c (grub_machine_fini): Don't call
14715         `grub_loader_unset'.
14717 2005-03-26  Hollis Blanchard  <hollis@penguinppc.org>
14719         * commands/ieee1275/halt.c (grub_cmd_halt): Call grub_halt
14720         instead of grub_ieee1275_interpret.
14721         (grub_halt_init): New function.
14722         (grub_halt_fini): Likewise.
14723         (GRUB_MOD_INIT): Correct message grammar.
14724         * commands/ieee1275/reboot.c (grub_cmd_reboot): Call grub_reboot
14725         instead of grub_ieee1275_interpret.
14726         (grub_reboot_init): New function.
14727         (grub_reboot_fini): Likewise.
14728         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace
14729         commands/i386/pc/halt.c, commands/i386/pc/reboot.c, and
14730         util/i386/pc/misc.c with commands/ieee1275/halt.c,
14731         commands/ieee1275/reboot.c, and util/powerpc/ieee1275/misc.c.
14732         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_fini): New
14733         function.
14734         * include/grub/powerpc/ieee1275/console.h (grub_console_fini):
14735         Add prototype.
14736         * include/grub/powerpc/ieee1275/ieee1275.h (grub_reboot): Add
14737         prototype.
14738         (grub_halt): Likewise.
14739         * include/grub/powerpc/ieee1275/init.h: Remove inaccurate comment.
14740         (cmain): Remove __attribute__((unused)).
14741         * kern/powerpc/ieee1275/init.c (grub_heap_start): New variable.
14742         (grub_heap_len): Likewise.
14743         (grub_machine_fini): New function.
14744         * kern/powerpc/ieee1275/openfw.c (grub_reboot): New function.
14745         (grub_halt): Likewise.
14746         * term/powerpc/ieee1275/ofconsole.c (grub_console_fini): New
14747         function.
14748         * util/powerpc/ieee1275/misc.c: New file.
14750 2005-03-19  Yoshinori K. Okuji  <okuji@enbug.org>
14752         * DISTLIST: New file.
14753         * gendistlist.sh: Likewise.
14755         * Makefile.in (COMMON_DISTFILES): Removed.
14756         (BOOT_DISTFILES): Likewise.
14757         (CONF_DISTFILES): Likewise.
14758         (DISK_DISTFILES): Likewise.
14759         (FS_DISTFILES): Likewise.
14760         (INCLUDE_DISTFILES): Likewise.
14761         (KERN_DISTFILES): Likewise.
14762         (LOADER_DISTFILES): Likewise.
14763         (TERM_DISTFILES): Likewise.
14764         (UTIL_DISTFILES): Likewise.
14765         (DISTFILES): Likewise.
14766         (uninstall): Uninstall files in $(pkgdata_DATA).
14767         (DISTLIST): New target.
14768         (distdir): Use the contents of the file DISTLIST to get a list of
14769         distributed files.
14771 2005-03-18  Yoshinori K. Okuji  <okuji@enbug.org>
14773         * fs/fat.c (grub_fat_mount): Ignore the 3rd bit of a media
14774         descriptor. This is ported from GRUB Legacy.
14776         * gencmdlist.sh: Added an extra semicolon to make it work with
14777         old sed versions. Reported by Robert Bihlmeyer
14778         <robbe@orcus.priv.at>.
14780 2005-03-08  Yoshinori Okuji  <okuji@enbug.org>
14782         Automatic loading of commands is supported.
14784         * normal/main.c (read_command_list): New function.
14785         (grub_normal_execute): Call read_command_list.
14787         * normal/command.c (grub_register_command): Return zero or CMD.
14788         Allocate CMD->NAME from the heap.
14789         Initialize CMD->MODULE_NAME to zero.
14790         Find the same name as well. If the same command is found and it is
14791         a dummy command, overwrite members. If it is not a dummy command,
14792         return zero.
14793         (grub_unregister_command): Free Q->NAME and Q->MODULE_NAME.
14794         (grub_command_find): If a dummy command is found, load a module
14795         and retry to find a command only once.
14797         * normal/cmdline.c (grub_tab_complete): Call grub_command_find to
14798         make sure that each command is loaded.
14800         * include/grub/normal.h (GRUB_COMMAND_FLAG_NOT_LOADED): New
14801         macro.
14802         (struct grub_command): Remove const from the member `name'.
14803         Add a new member `module_name'.
14804         (grub_register_command): Return grub_command_t.
14806         * commands/help.c (grub_cmd_help): Call grub_command_find to make
14807         sure that each command is loaded.
14809         * genmk.rb (PModule::rule): Specify a module name without the
14810         suffix ".mod" to gencmdlist.sh.
14812 2005-03-02  Yoshinori K. Okuji  <okuji@enbug.org>
14814         * gencmdlist.sh: New file.
14816         * genmk.rb (PModule::rule): Generate a rule for a command list.
14817         Clean command.lst.
14818         Generate command.lst from $(COMMANDFILES).
14820         * Makefile.in (COMMON_DISTFILES): Added gencmdlist.sh.
14821         (DATA): Added $(pkgdata_DATA).
14822         (install-local): Install files in $(pkgdata_DATA).
14824 2005-03-02  Yoshinori K. Okuji  <okuji@enbug.org>
14826         * term/i386/pc/vga.c (debug_command): Removed.
14827         (GRUB_MOD_INIT): Do not register the command "debug".
14829         From Hollis Blanchard:
14830         * commands/configfile.c: New file.
14831         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
14832         commands/configfile.c.
14833         (pkgdata_MODULES): Added configfile.mod.
14834         (configfile_mod_SOURCES): New variable.
14835         (configfile_mod_CFLAGS): Likewise.
14836         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
14837         commands/configfile.c.
14838         (pkgdata_MODULES): Added configfile.mod.
14839         (configfile_mod_SOURCES): New variable.
14840         (configfile_mod_CFLAGS): Likewise.
14841         * util/grub-emu.c (main): Call grub_configfile_init and
14842         grub_configfile_fini.
14843         * include/grub/normal.h [GRUB_UTIL] (grub_configfile_init): New
14844         prototype.
14845         [GRUB_UTIL] (grub_configfile_fini): Likewise.
14847 2005-02-27  Yoshinori K. Okuji  <okuji@enbug.org>
14849         * normal/arg.c (grub_arg_show_help): Do not show the bug report
14850         address.
14852         * commands/help.c (grub_cmd_help): Do not print newlines after
14853         the last command in print_command_help.
14855 2005-02-27  Yoshinori K. Okuji  <okuji@enbug.org>
14857         * commands/default.h: New file.
14858         * commands/timeout.h: Likewise.
14859         * normal/context.c: Likewise.
14861         * util/misc.c: Do not include sys/times.h.
14862         Include sys/time.h and grub/machine/time.h.
14863         (grub_get_rtc): Rewritten with gettimeofday.
14865         * util/grub-emu.c (main): Call grub_default_init and
14866         grub_timeout_init before grub_normal_init, and call
14867         grub_timeout_fini and grub_default_fini after grub_main.
14869         * util/console.c (grub_ncurses_checkkey): Return the read
14870         character or -1.
14872         * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it
14873         timeouts.
14875         * normal/main.c (read_config_file): Push MENU. If this fails,
14876         print an error and wait for a user input.
14877         Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE.
14878         If a menu is empty or an error occurs, pop MENU.
14879         (grub_normal_execute): Pop and free MENU after grub_menu_run
14880         returns.
14882         * kern/loader.c (grub_loader_boot): Call grub_machine_fini.
14884         * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not
14885         include time.h.
14886         [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
14887         without GRUB_UTIL.
14888         * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include
14889         time.h.
14890         [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
14891         without GRUB_UTIL.
14893         * include/grub/normal.h (struct grub_menu_list): New struct.
14894         (grub_menu_list_t): New type.
14895         (struct grub_context): New struct.
14896         (grub_context_t): New type.
14897         (grub_register_command): Got rid of EXPORT_FUNC.
14898         (grub_unregister_command): Likewise.
14899         (grub_context_get): New prototype.
14900         (grub_context_get_current_menu): Likewise.
14901         (grub_context_push_menu): Likewise.
14902         (grub_context_pop_menu): Likewise.
14903         [GRUB_UTIL] (grub_default_init): Likewise.
14904         [GRUB_UTIL] (grub_default_fini): Likewise.
14905         [GRUB_UTIL] (grub_timeout_init): Likewise.
14906         [GRUB_UTIL] (grub_timeout_fini): Likewise.
14908         * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c,
14909         commands/timeout.c and normal/context.c.
14910         (pkgdata_MODULES): Added default.mod and timeout.mod.
14911         (normal_mod_SOURCES): Added normal/context.c.
14912         (default_mod_SOURCES): New variable.
14913         (default_mod_CFLAGS): Likewise.
14914         (timeout_mod_SOURCES): Likewise.
14915         (timeout_mod_CFLAGS): Likewise.
14916         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from
14917         conf/i386-pc.rmk.
14918         (pkgdata_MODULES): Added default.mod and timeout.mod.
14919         (normal_mod_SOURCES): Added normal/context.c.
14920         (default_mod_SOURCES): New variable.
14921         (default_mod_CFLAGS): Likewise.
14922         (timeout_mod_SOURCES): Likewise.
14923         (timeout_mod_CFLAGS): Likewise.
14925         * Makefile.in (all-local): Added $(MKFILES).
14927 2005-02-21  Vincent Pelletier  <subdino2004@yahoo.fr>
14929         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `partmap/sun.c'.
14930         (grub_emu_SOURCES): Likewise.
14931         (pkgdata_MODULES): Add `sun.mod'.
14932         (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
14933         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
14934         `partmap/sun.c'.
14935         (pkgdata_MODULES): Add `sun.mod'.
14936         (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
14937         * include/grub/partition.h (grub_sun_partition_map_init): New
14938         prototype.
14939         (grub_sun_partition_map_fini): Likewise.
14940         * partmap/sun.c: New file.
14941         * util/grub-emu.c (main): Initialize and de-initialize the sun
14942         partitionmap support.
14944 2005-02-19  Yoshinori K. Okuji  <okuji@enbug.org>
14946         This implements an Emacs-like menu entry editor.
14948         * normal/menu_entry.c: New file.
14950         * util/console.c (grub_ncurses_putchar): Translate some Unicode
14951         characters to ASCII.
14952         (saved_char): New variable.
14953         (grub_ncurses_checkkey): Rewritten completely.
14954         (grub_ncurses_getkey): Likewise.
14955         (grub_ncurses_init): Call raw instead of cbreak.
14957         * normal/menu.c (print_entry): Do not put a space.
14958         (init_page): Renamed to ...
14959         (grub_menu_init_page): ... this. All callers changed.
14960         (edit_menu_entry): Removed.
14961         (run_menu): Call grub_menu_entry_run instead of edit_menu_entry.
14963         * normal/cmdline.c (grub_cmdline_run): Call grub_setcursor.
14965         * kern/misc.c (grub_vprintf): Call grub_refresh.
14967         * normal/menu.c (DISP_LEFT): Renamed to ...
14968         * include/grub/term.h (GRUB_TERM_DISP_LEFT): ... this.
14969         * normal/menu.c (DISP_UP): Renamed to ...
14970         * include/grub/term.h (GRUB_TERM_DISP_UP): ... this.
14971         * normal/menu.c (DISP_RIGHT): Renamed to ...
14972         * include/grub/term.h (GRUB_TERM_DISP_RIGHT): ... this.
14973         * normal/menu.c (DISP_DOWN): Renamed to ...
14974         * include/grub/term.h (GRUB_TERM_DISP_DOWN): ... this.
14975         * normal/menu.c (DISP_HLINE): Renamed to ...
14976         * include/grub/term.h (GRUB_TERM_DISP_HLINE): ... this.
14977         * normal/menu.c (DISP_VLINE): Renamed to ...
14978         * include/grub/term.h (GRUB_TERM_DISP_VLINE): ... this.
14979         * normal/menu.c (DISP_UL): Renamed to ...
14980         * include/grub/term.h (GRUB_TERM_DISP_UL): ... this.
14981         * normal/menu.c (DISP_UR): Renamed to ...
14982         * include/grub/term.h (GRUB_TERM_DISP_UR): ... this.
14983         * normal/menu.c (DISP_LL): Renamed to ...
14984         * include/grub/term.h (GRUB_TERM_DISP_LL): ... this.
14985         * normal/menu.c (DISP_LR): Renamed to ...
14986         * include/grub/term.h (GRUB_TERM_DISP_LR): ... this.
14987         * normal/menu.c (TERM_WIDTH): Renamed to ...
14988         * include/grub/term.h (GRUB_TERM_WIDTH): ... this.
14989         * normal/menu.c (TERM_HEIGHT): Renamed to ...
14990         * include/grub/term.h (GRUB_TERM_HEIGHT): ... this.
14991         * normal/menu.c (TERM_INFO_HEIGHT): Renamed to ...
14992         * include/grub/term.h (GRUB_TERM_INFO_HEIGHT): ... this.
14993         * normal/menu.c (TERM_MARGIN): Renamed to ...
14994         * include/grub/term.h (GRUB_TERM_MARGIN): ... this.
14995         * normal/menu.c (TERM_SCROLL_WIDTH): Renamed to ...
14996         * include/grub/term.h (GRUB_TERM_SCROLL_WIDTH): ... this.
14997         * normal/menu.c (TERM_TOP_BORDER_Y): Renamed to ...
14998         * include/grub/term.h (GRUB_TERM_TOP_BORDER_Y): ... this.
14999         * normal/menu.c (TERM_LEFT_BORDER_X): Renamed to ...
15000         * include/grub/term.h (GRUB_TERM_LEFT_BORDER_X): ... this.
15001         * normal/menu.c (TERM_BORDER_WIDTH): Renamed to ...
15002         * include/grub/term.h (GRUB_TERM_BORDER_WIDTH): ... this.
15003         * normal/menu.c (TERM_MESSAGE_HEIGHT): Renamed to ...
15004         * include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): ... this.
15005         * normal/menu.c (TERM_BORDER_HEIGHT): Renamed to ...
15006         * include/grub/term.h (GRUB_TERM_BORDER_HEIGHT): ... this.
15007         * normal/menu.c (TERM_NUM_ENTRIES): Renamed to ...
15008         * include/grub/term.h (GRUB_TERM_NUM_ENTRIES): ... this.
15009         * normal/menu.c (TERM_FIRST_ENTRY_Y): Renamed to ...
15010         * include/grub/term.h (GRUB_TERM_FIRST_ENTRY_Y): ... this.
15011         * normal/menu.c (TERM_ENTRY_WIDTH): Renamed to ...
15012         * include/grub/term.h (GRUB_TERM_ENTRY_WIDTH): ... this.
15013         * normal/menu.c (TERM_CURSOR_X): Renamed to ...
15014         * include/grub/term.h (GRUB_TERM_CURSOR_X): ... this.
15015         All callers changed.
15017         * include/grub/normal.h: New prototype.
15019         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
15020         normal/menu_entry.c.
15021         (normal_mod_SOURCES): Likewise.
15022         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
15023         (normal_mod_SOURCES): Likewise.
15025 2005-02-15  Yoshinori K. Okuji  <okuji@enbug.org>
15027         * include/grub/normal.h (grub_halt_init): New prototype.
15028         (grub_halt_fini): Likewise.
15029         (grub_reboot_init): Likewise.
15030         (grub_reboot_fini): Likewise.
15032         * util/grub-emu.c: Include signal.h.
15033         (main_env): New global variable.
15034         (grub_machine_init): Ignore SIGINT. Otherwise grub-emu cannot
15035         catch C-c.
15036         (grub_machine_fini): New function.
15037         (main): Call grub_halt_init and grub_reboot_init before
15038         grub_main, and grub_reboot_fini and grub_halt_fini after it.
15039         Call setjmp with MAIN_ENV to go back afterwards.
15040         Call grub_machine_fini right before return.
15042         * include/grub/util/misc.h: Include setjmp.h.
15043         (main_env): New prototype.
15045         * include/grub/kernel.h (grub_machine_fini): New prototype.
15046         * include/grub/i386/pc/biosdisk.h (grub_biosdisk_fini): Likewise.
15047         * include/grub/i386/pc/console.h (grub_console_fini): Likewise.
15049         * disk/i386/pc/biosdisk.c (grub_biosdisk_fini): New function.
15050         * kern/i386/pc/init.c (grub_machine_fini): Likewise.
15051         * term/i386/pc/console.c (grub_console_fini): Likewise.
15053         * util/i386/pc/misc.c: New file.
15055         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
15056         util/i386/pc/misc.c, commands/i386/pc/halt.c and
15057         commands/i386/pc/reboot.c.
15059 2005-02-14  Guillem Jover  <guillem@hadrons.org>
15061         * include/grub/dl.h (grub_dl_check_header): New prototype.
15062         (grub_arch_dl_check_header): Change return type to grub_err_t,
15063         remove size parameter and export function.  Update all callers.
15064         * kern/dl.c (grub_dl_check_header): New function.
15065         (grub_dl_load_core): Use `grub_dl_check_header' instead of
15066         `grub_arch_dl_check_header'.  Check ELF type.  Check if sections
15067         are inside the core.
15068         * kern/i386/dl.c (grub_arch_dl_check_header): Remove arch
15069         independent ELF header checks.
15070         * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
15071         * loader/i386/pc/multiboot.c (grub_rescue_cmd_multiboot): Use
15072         `grub_dl_check_header' instead of explicit checks.  Check for the
15073         ELF type.
15074         * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Use
15075         `grub_dl_check_header' instead of explicit checks.  Remove arch
15076         specific ELF header checks.
15078         * util/grub-emu.c (grub_arch_dl_check_header): Remove the
15079         argument SIZE.
15081 2005-02-13  Hollis Blanchard  <hollis@penguinppc.org>
15083         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add ls.mod.
15084         * include/grub/powerpc/libgcc.h (__mulsf3): New prototype.
15086 2005-02-12  Hollis Blanchard  <hollis@penguinppc.org>
15088         * kern/partition.c (grub_partition_probe): Clear `grub_errno' and
15089         return 0 if `grub_errno' is GRUB_ERR_BAD_PART_TABLE.
15090         (part_map_iterate): Clear `grub_errno' and return 0 if
15091         `partmap->iterate' returns GRUB_ERR_BAD_PART_TABLE.
15092         * partmap/amiga.c (amiga_partition_map_iterate): Return
15093         GRUB_ERR_BAD_PART_TABLE if no partition map magic is found.
15094         * partmap/apple.c (apple_partition_map_iterate): Likewise.
15096 2005-02-01  Guillem Jover  <guillem@hadrons.org>
15098         * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Fix module
15099         help info.
15101 2005-01-31  Marco Gerards  <metgerards@student.han.nl>
15103         * include/grub/powerpc/ieee1275/loader.h (grub_load_linux):
15104         Removed prototype.
15105         (grub_rescue_cmd_linux): New prototype.
15106         (grub_rescue_cmd_initrd): Likewise.
15107         * powerpc/ieee1275/linux.c (grub_linux_boot): Remove struct
15108         `bi_rec'.
15109         (grub_linux_release_mem): Release the memory for the initrd.
15110         (grub_load_linux): Renamed from this...
15111         (grub_rescue_cmd_linux): ...To this.  Changed all callers.
15112         Changed `entry' not to be static.  Loop over memory regions to
15113         find another one when the default fails.
15114         (grub_rescue_cmd_initrd): New function.
15115         (grub_linux_init): Remove function.
15116         (grub_linux_fini): Likewise.
15117         (GRUB_MOD_INIT): Register `initrd'.
15118         (GRUB_MOD_FINI): Unregister `initrd'.
15119         * powerpc/ieee1275/linux_normal.c (grub_linux_normal_init):
15120         Function removed.
15121         (grub_linux_normal_fini): Likewise.
15122         (GRUB_MOD_INIT): Register `initrd'.
15123         (GRUB_MOD_FINI): Unregister `initrd'.
15125 2005-01-31  Marco Gerards  <metgerards@student.han.nl>
15127         * commands/help.c: New file.
15128         * normal/arg.c (show_help): Renamed to...
15129         (grub_arg_show_help): ... this.
15130         * commands/i386/pc/halt.c: New file.
15131         * commands/i386/pc/reboot.c: Likewise.
15132         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/help.c'.
15133         (pkgdata_MODULES): Add `reboot.mod', `halt.mod' and `help.mod'.
15134         (help_mod_SOURCES, help_mod_CFLAGS, reboot_mod_SOURCES)
15135         (reboot_mod_CFLAGS, halt_mod_SOURCES, halt_mod_CFLAGS): New
15136         variables.
15137         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
15138         `commands/help.c'.
15139         (pkgdata_MODULES): Add `help.mod'.
15140         (help_mod_SOURCES, help_mod_CFLAGS): New variables.
15141         * grub/i386/pc/init.h (grub_reboot): New prototype.
15142         (grub_halt): Likewise.
15143         * include/grub/normal.h (grub_arg_show_help): New prototype.
15144         (grub_help_init): Likewise.
15145         (grub_help_fini): Likewise.
15146         * util/grub-emu.c (main): Initialize and deinitialize the help
15147         command.
15149         * normal/cmdline.c (grub_cmdline_get): Doc fix.
15151         * normal/command.c (grub_command_init): Fixed the description of
15152         the `set' and `unset' commands.
15154 2005-01-31  Marco Gerards  <metgerards@student.han.nl>
15156         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_interpret): New
15157         function.
15158         * commands/ieee1275/halt.c: New file.
15159         * commands/ieee1275/reboot.c: Likewise.
15160         * commands/ieee1275/suspend.c (grub_cmd_suspend): Use
15161         `__attribute__ ((unused))'.  Some GCS related fixed.
15162         (grub_suspend_init) [GRUB_UTIL]: Function removed.
15163         (grub_suspend_fini): Likewise.
15164         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add `reboot.mod'
15165         and `halt.mod'.
15166         (reboot_mod_SOURCES, reboot_mod_CFLAGS, halt_mod_SOURCES)
15167         (halt_mod_CFLAGS): New variables.
15168         * include/grub/powerpc/ieee1275/ieee1275.h
15169         (grub_ieee1275_interpret): New prototype.
15171 2005-01-29  Yoshinori K. Okuji  <okuji@enbug.org>
15173         * include/grub/misc.h (memmove): New prototype.
15174         (memcpy): Likewise.
15176 2005-01-22  Hollis Blanchard  <hollis@penguinppc.org>
15178         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
15179         `devpath' to 0.  Use `name' instead of `devpath' with `grub_strndup'.
15181 2005-01-22  Marco Gerards  <metgerards@student.han.nl>
15183         * kern/misc.c (grub_strndup): Function rewritten.
15185 2005-01-22  Vincent Pelletier  <subdino2004@yahoo.fr>
15187         * normal/menu.c (TERM_WIDTH): Macro redefined.
15188         (TERM_TOP_BORDER_Y): Likewise.
15189         (draw_border): Replaced while-loop by a for-loop.  Make the number
15190         of lines consistent with the number of lines displayed in
15191         print_entries.  Added a margin below the rectangle.
15192         (print_entry): Make the entry fit in the rectangle.
15193         (print_entries): Display the scroll arrows next to the right
15194         border.
15196 2005-01-21  Marco Gerards  <metgerards@student.han.nl>
15198         * fs/minix.c (grub_minix_find_file): Reserve more space for
15199         `fpath' so the \0 can be stored.  Use `grub_strcpy' instead of
15200         `grub_strncpy' to copy `path' into it.
15202 2005-01-21  Marco Gerards  <metgerards@student.han.nl>
15204         Add the loopback device, a device via which files can be accessed
15205         as devices.
15207         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/loopback.c'.
15208         (pkgdata_MODULES): Add loopback.mod.
15209         (loopback_mod_SOURCES): New variable.
15210         (loopback_mod_CFLAGS): Likewise.
15211         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
15212         `disk/loopback.c'.
15213         (pkgdata_MODULES): Add loopback.mod.
15214         (loopback_mod_SOURCES): New variable.
15215         (loopback_mod_CFLAGS): Likewise.
15216         * disk/loopback.c: new file.
15217         * include/grub/normal.h (grub_loop_init): New prototype.
15218         (grub_loop_fini): New prototype.
15219         * util/grub-emu.c (main): Initialize and de-initialize loopback
15220         support.
15221         * include/grub/disk.h (grub_disk_dev_id): Add
15222         `GRUB_DISK_DEVICE_LOOPBACK_ID'.
15224 2005-01-20  Hollis Blanchard  <hollis@penguinppc.org>
15226         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_enter): New
15227         function.
15228         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add suspend.mod.
15229         (suspend_mod_SOURCES): New variable.
15230         (suspend_mod_CFLAGS): Likewise.
15231         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_enter):
15232         New prototype.
15233         * commands/ieee1275/suspend.c: New file.
15235 2005-01-20  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
15237         * include/grub/dl.h (GRUB_MOD_INIT): Changed `__attribute__
15238         ((unused))' to `__attribute__ ((used))'.
15239         (GRUB_MOD_FINI): Likewise.
15240         * kern/dl.c (grub_dl_load_file): Fix null pointer dereference.
15241         * genmk.rb (PModule): Assign space to common symbols when linking
15242         modules.
15244 2005-01-20  Marco Gerards  <metgerards@student.han.nl>
15246         * include/grub/mm.h (grub_mm_init_region): Change the type of the
15247         `unsigned' arguments to `grub_size_t'.
15248         (grub_malloc): Likewise.
15249         (grub_realloc): Likewise.
15250         (grub_memalign): Likewise.
15251         * kern/i386/dl.c (grub_arch_dl_check_header): Likewise.
15252         * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
15253         * util/misc.c (grub_malloc): Likewise.
15254         (grub_realloc): Likewise.
15255         * kern/mm.c (get_header_from_pointer): Change the casts to
15256         `unsigned' into a cast to `grub_size_t'.
15258         * fs/fshelp.c (grub_fshelp_find_file): The `oldnode' should always
15259         point to `currnode' when `currnode' is changed.
15261         * util/grub-emu.c (main): Initialize `progname'.  Reported by Nico
15262         Schottelius <nico-linux@schottelius.org>.
15264 2005-01-09  Hollis Blanchard  <hollis@penguinppc.org>
15266         * util/powerpc/ieee1275/grub-mkimage.c: Include <string.h>.
15267         (note_path): Remove variable.
15268         (GRUB_IEEE1275_NOTE_NAME): New macro.
15269         (GRUB_IEEE1275_NOTE_TYPE): Likewise.
15270         (grub_ieee1275_note_hdr): New structure.
15271         (grub_ieee1275_note_desc): Likewise.
15272         (grub_ieee1275_note): Likewise.
15273         (load_note): Remove `dir' argument.  All callers updated.  Remove
15274         `note_img' and `path'.  Do not load a file from `note_path'.
15275         Initialize a struct grub_ieee1275_note and write that to `out'.
15276         Use GRUB_IEEE1275_MODULE_BASE instead of MODULE_BASE.
15278 2005-01-05  Marco Gerards  <metgerards@student.han.nl>
15280         * util/misc.c (grub_util_read_image): Revert last change.  It
15281         called `grub_util_read_at', which seeks from the beginning of the
15282         file.
15284 2005-01-04  Hollis Blanchard  <hollis@penguinppc.org>
15286         * TODO: Add note about endianness in grub-mkimage.
15287         * boot/powerpc/ieee1275/crt0.S (note): Remove unused .note
15288         section.
15289         * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Add grub-mkimage.
15290         (grub_mkimage_SOURCES): New target.
15291         * include/grub/kernel.h (grub_start_addr): Remove variable.
15292         (grub_end_addr): Likewise.
15293         (grub_total_module_size): Likewise.
15294         (grub_kernel_image_size): Likewise.
15295         (GRUB_MODULE_MAGIC): New constant.
15296         (grub_module_info): New structure.
15297         (grub_arch_modules_addr): New prototype.
15298         (grub_get_end_addr): Remove prototype.
15299         * include/grub/i386/pc/kernel.h (grub_end_addr): New prototype.
15300         * include/grub/powerpc/ieee1275/kernel.h: New file.
15301         * include/grub/util/misc.h (grub_util_get_fp_size): New
15302         prototype.
15303         (grub_util_read_at): Likewise.
15304         (grub_util_write_image_at): Likewise.
15305         * kern/main.c (grub_get_end_addr): Remove function.
15306         (grub_load_modules): Call grub_arch_modules_addr instead of using
15307         grub_end_addr.  Look for a grub_module_info struct in memory.  Use
15308         the grub_module_info fields instead of calling grub_get_end_addr
15309         as loop conditions.  Move grub_add_unused_region code here.
15310         (grub_add_unused_region): Remove function.
15311         * kern/i386/pc/init.c: Include grub/cache.h.
15312         (grub_machine_init): Remove call to grub_get_end_addr.  Remove
15313         one call to add_mem_region.
15314         (grub_arch_modules_addr): New function.
15315         * kern/powerpc/ieee1275/init.c (grub_end_addr): Remove variable.
15316         (grub_total_module_size): Likewise.
15317         Include grub/machine/kernel.h.
15318         (grub_arch_modules_addr): New function.
15319         * util/grub-emu.c (grub_end_addr): Remove variable.
15320         (grub_total_module_size): Likewise.
15321         (grub_arch_modules_addr): New function.
15322         * util/misc.c: Include unistd.h.
15323         (grub_util_get_fp_size): New function.
15324         (grub_util_read_at): Likewise.
15325         (grub_util_write_image_at): Likewise.
15326         (grub_util_read_image): Call grub_util_read_at.
15327         (grub_util_write_image): Call grub_util_write_image_at.
15328         * util/i386/pc/grub-mkimage.c (generate_image): Allocate
15329         additional memory in kernel_img for a struct grub_module_info.
15330         Fill in that grub_module_info.
15331         * util/powerpc/ieee1275/grub-mkimage.c: New file.
15333 2005-01-03  Hollis Blanchard  <hollis@penguinppc.org>
15335         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_milliseconds):
15336         New function.
15337         * include/grub/powerpc/ieee1275/ieee1275.h
15338         (grub_ieee1275_milliseconds): New prototype.
15339         * include/grub/powerpc/ieee1275/time.h (GRUB_TICKS_PER_SECOND):
15340         Change to 1000.
15341         * kern/powerpc/ieee1275/init.c (grub_get_rtc): Call
15342         grub_ieee1275_milliseconds.
15344 2005-01-03  Hollis Blanchard  <hollis@penguinppc.org>
15346         * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_realmode): New
15347         variable.
15348         (find_options): New function.
15349         (cmain): Call find_options.
15350         * include/grub/powerpc/ieee1275/ieee1275.h
15351         (grub_ieee1275_realmode): New extern variable.
15352         * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Only call
15353         grub_map if grub_ieee1275_realmode is false.
15355 2004-12-29  Marco Gerards  <metgerards@student.han.nl>
15357         * normal/cmdline.c (grub_cmdline_get): Redone logic so no empty
15358         lines are inserted and make it work like readline.  Reported by
15359         Vincent Pelletier <subdino2004@yahoo.fr>.
15361 2004-12-28  Marco Gerards  <metgerards@student.han.nl>
15363         * boot/powerpc/ieee1275/crt0.S (_start): Don't set up the stack.
15365         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCE): Remove
15366         `kern/powerpc/cache.S'.
15368 2004-12-27  Marco Gerards  <metgerards@student.han.nl>
15370         * genmk.rb: Handle the `Program' class in the main loop.  Written
15371         by Johan Rydberg <jrydberg@gnu.org>.
15372         (Program): New class.
15373         (programs): New variable.
15374         * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h>
15375         instead of "grub/machine/ieee1275.h".  Include <grub/kernel.h>
15376         instead of "grub/kernel.h".  Include <grub/machine/init.h>.
15377         (help_arch): Function removed.
15378         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add
15379         `powerpc/libgcc.h' and `loader.h'.
15380         (pkgdata_PROGRAMS): New variable.
15381         (sbin_UTILITIES): Variable removed.
15382         (grub_emu_SOURCES): Added kern/powerpc/cache.S.
15383         (grubof_SOURCES): Variable re-defined so it only includes the
15384         core functionality.
15385         (grubof_CFLAGS): Remove `-DGRUBOF'.
15386         (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS,
15387         (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES)
15388         (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS)
15389         (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES)
15390         (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS)
15391         (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES)
15392         (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS)
15393         (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS)
15394         (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES)
15395         (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS)
15396         (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
15397         (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES)
15398         (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS)
15399         (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES)
15400         (pc_mod_CFLAGS): New variables.
15401         * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>.
15402         (grub_ofdisk_iterate): Add a prototype for `dev_iterate'.
15403         * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype.
15404         * include/grub/loader.h (grub_os_area_addr, grub_os_area_size):
15405         Moved from here...
15406         * include/grub/i386/pc/init.h (grub_os_area_addr)
15407         (rub_os_area_size): ... to here.
15408         * include/grub/powerpc/ieee1275/ieee1275.h
15409         (grub_ieee1275_entry_fn): Export symbol.
15410         * include/grub/powerpc/ieee1275/init.h: New file.
15411         * include/grub/powerpc/libgcc.h: Likewise.
15412         * include/grub/cache.h: Likewise.
15413         * kern/powerpc/cache.S: Likewise.  Written by Hollis Blanchard
15414         <hollis@penguinppc.org>.
15415         * kern/dl.c: Include <grub/cache.h>.
15416         (grub_dl_flush_cache): New function.
15417         (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache
15418         for this module.
15419         * kern/powerpc/ieee1275/init.c (grub_ofdisk_init)
15420         (grub_console_init): Removed prototypes.
15421         (grub_machine_init): Don't initialize the modules anymore.
15422         * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function
15423         static.
15424         * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN):
15425         Macro undef removed.
15426         (GRUB_HOST_WORDS_BIGENDIAN): New macro.
15427         * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add
15428         relocation `R_PPC_REL32'.  Return an error when the relocation is
15429         unknown.
15430         * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'.
15431         * kern/i386/pc/init.c (grub_arch_sync_caches): New function.
15432         * util/misc.c (grub_arch_sync_caches): Likewise.
15434 2004-12-19  Marco Gerards  <metgerards@student.han.nl>
15436         * conf/powerpc-ieee1275.rmk (MOSTLYCLEANFILES): Remove
15437         `symlist.c', add `grubof_symlist.c'.
15438         (symlist.c): Variable removed.
15439         (grubof_HEADERS): Variable added.
15440         (grubof_symlist.c): New target.
15441         (kernel_syms.lst): Use `grubof_HEADERS' instead of
15442         `kernel_img_HEADERS'.
15443         (grubof_SOURCES): Add `kern/powerpc/dl.c' and `grubof_symlist.c'.
15444         * kern/powerpc/dl.c: New file.
15445         * kern/powerpc/ieee1275/init.c (grub_arch_dl_check_header):
15446         Function removed.
15447         (grub_arch_dl_relocate_symbols): Likewise.
15448         (grub_register_exported_symbols): Likewise.
15450 2004-12-13  Marco Gerards  <metgerards@student.han.nl>
15452         * fs/ext2.c (grub_ext2_open): Don't use data after freeing it.
15453         (grub_ext2_dir): Likewise.  Don't return in case of an error, jump
15454         to fail instead.  Reported by Vincent Pelletier
15455         <subdino2004@yahoo.fr>.
15457         * fs/fshelp.c (grub_fshelp_find_file): Don't free `oldnode' when
15458         it is not allocated.  Reported by Vincent Pelletier
15459         <subdino2004@yahoo.fr>.
15461         * normal/cmdline.c (grub_tab_complete): Add a blank line to the
15462         output so the output looks better.
15464 2004-12-04  Marco Gerards  <metgerards@student.han.nl>
15466         Modulize the partition map support and add support for the amiga
15467         partition map.
15469         * commands/ls.c: Include <grub/partition.h> instead of
15470         <grub/machine/partition.h>.
15471         * kern/disk.c: Likewise.
15472         * kern/rescue.c: Likewise.
15473         * loader/i386/pc/chainloader.c: Likewise.
15474         * normal/cmdline.c: Likewise.
15475         * kern/powerpc/ieee1275/init.c: Likewise.
15476         (grub_machine_init): Call `grub_pc_partition_map_init',
15477         `grub_amiga_partition_map_init' and
15478         `grub_apple_partition_map_init'.
15479         * conf/i386-pc.rmk (kernel_img_SOURCES): Remove
15480         `disk/i386/pc/partition.c'.  Add `kern/partition.c'.
15481         (kernel_img_HEADERS): Remove `machine/partition.h'.  Add
15482         `partition.h' and `pc_partition.h'.
15483         (grub_setup_SOURCES): Remove
15484         `disk/i386/pc/partition.c'.  Add `kern/partition.c',
15485         `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
15486         (grub_emu_SOURCES): Likewise.
15487         (pkgdata_MODULES): Add `amiga.mod', `apple.mod' and `pc.mod'.
15488         (amiga_mod_SOURCES, amiga_mod_CFLAGS, apple_mod_SOURCES)
15489         (apple_mod_CFLAGS, pc_mod_SOURCES, pc_mod_CFLAGS): New variables.
15490         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
15491         `disk/powerpc/ieee1275/partition.c'.  Add `kern/partition.c',
15492         `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
15493         (grubof_SOURCES): Likewise.
15494         * disk/i386/pc/partition.c: File removed.
15495         * disk/powerpc/ieee1275/partition.c: Likewise.
15496         * include/grub/powerpc/ieee1275/partition.h: Likewise.
15497         * include/grub/i386/pc/partition.h: Likewise.
15498         * kern/partition.c: New file.
15499         * partmap/amiga.c: Likewise.
15500         * partmap/apple.c: Likewise.
15501         * partmap/pc.c: Likewise.
15502         * include/grub/partition.h: Likewise..
15503         * include/grub/pc_partition.h: Likewise.
15504         * util/grub-emu.c: Include <grub/partition.h> instead of
15505         <grub/machine/partition.h>.
15506         (main): Call `grub_pc_partition_map_init',
15507         `grub_amiga_partition_map_init' and
15508         `grub_apple_partition_map_init' and deinitialize afterwards.
15509         * util/i386/pc/biosdisk.c: Include `#include
15510         <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
15511         `<grub/machine/partition.h>'.
15512         * util/i386/pc/grub-setup.c: Likewise.
15513         * util/i386/pc/biosdisk.c: Likewise.
15514         (grub_util_biosdisk_get_grub_dev): Only access the PC specific
15515         partition information in case of a PC partition.
15516         * util/i386/pc/grub-setup.c: Include `#include
15517         <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
15518         `<grub/machine/partition.h>'.
15519         (setup): Only access the PC specific partition information in case
15520         of a PC partition.
15522 2004-11-17  Hollis Blanchard  <hollis@penguinppc.org>
15524         * kern/powerpc/ieee1275/init.c (grub_setjmp): Remove function.
15525         (grub_longjmp): Likewise.
15526         * include/grub/powerpc/setjmp.h (grub_jmp_buf): Set array size to
15527         20.
15528         * normal/powerpc/setjmp.S: New file.
15529         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
15530         `normal/powerpc/setjmp.S'.
15531         (grubof_CFLAGS): Add `-DGRUBOF'.
15532         * include/grub/setjmp.h [GRUB_UTIL]: Changed condition to
15533         [GRUB_UTIL && !GRUBOF].
15535 2004-11-16  Marco Gerards  <metgerards@student.han.nl>
15537         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Skip any
15538         property named `name'.  Correctly handle the error returned by
15539         `grub_ieee1275_finddevice' if a device can not be opened.
15541 2004-11-02  Hollis Blanchard  <hollis@penguinppc.org>
15543         * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_readkey): Test
15544         `actual' for negativity.
15545         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
15546         kern/fshelp.c.
15548 2004-11-01  Marco Gerards  <metgerards@student.han.nl>
15550         * term/i386/pc/vga.c (VGA_HEIGHT): Changed to 350.
15551         (PAGE_OFFSET): New macro.
15552         (CRTC_ADDR_PORT): Likewise.
15553         (CRTC_DATA_PORT): Likewise.
15554         (START_ADDR_HIGH_REGISTER): Likewise.
15555         (START_ADDR_LOW_REGISTER): Likewise.
15556         (GRAPHICS_ADDR_PORT): Likewise.
15557         (GRAPHICS_DATA_PORT): Likewise.
15558         (READ_MAP_REGISTER): Likewise.
15559         (INPUT_STATUS1_REGISTER): Likewise.
15560         (INPUT_STATUS1_VERTR_BIT): Likewise.
15561         (page): New variable.
15562         (wait_vretrace): New function.
15563         (set_read_map): Likewise.
15564         (set_start_address): Likewise.
15565         (grub_vga_init): Use mode 0x10 instead of mode 0x12.  Switch to
15566         the right page.
15567         (check_vga_mem): Take the page into account.
15568         (write_char): Likewise.
15569         (write_cursor): Likewise.
15570         (scroll_up): Likewise.  Copy the page to the page that is not
15571         shown and switch between both pages.
15572         (grub_vga_putchar): Fix off by one error.
15573         (grub_vga_cls): Wait for the vertical retrace.  Take the page into
15574         account.
15576 2004-11-01  Marco Gerards  <metgerards@student.han.nl>
15578         Add support for iso9660 (including rockridge).
15580         * conf/i386-pc.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
15581         (iso9660_mod_SOURCES): New variable.
15582         (iso9660_mod_CFLAGS): Likewise.
15583         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
15584         * include/grub/fs.h (grub_iso9660_init): New prototype.
15585         * util/grub-emu.c (main): Call `grub_iso9660_init'.
15586         * fs/iso9660.c: New file.
15588         * include/grub/misc.h (grub_strncat): New prototype.
15589         * kern/misc.c (grub_strncat): New function.
15591         * fs/hfs.c (grub_hfs_mount): Translate the error
15592         `GRUB_ERR_OUT_OF_RANGE' to `GRUB_ERR_BAD_FS'.
15593         * fs/jfs.c (grub_jfs_mount): Likewise.
15594         * fs/ufs.c (grub_ufs_mount): Likewise.
15596 2004-10-28  Hollis Blanchard  <hollis@penguinppc.org>
15598         * boot/powerpc/ieee1275/cmain.c (cmain): Remove asm statements
15599         which initialized BAT registers.
15600         * boot/powerpc/ieee1275/ieee1275.c (IEEE1275_CALL_ENTRY_FN,
15601         grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
15602         Move from here...
15603         * include/grub/powerpc/ieee1275/ieee1275.h (IEEE1275_CALL_ENTRY_FN,
15604         grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
15605         ... to here.
15606         * kern/powerpc/ieee1275/openfw.c (grub_map): New function.
15607         (grub_mapclaim): Likewise.
15608         * loader/powerpc/ieee1275/linux.c (grub_load_linux): Use
15609         grub_mapclaim instead of grub_ieee1275_claim.  Assign linux_addr by
15610         hand.
15612 2004-10-19  Hollis Blanchard  <hollis@penguinppc.org>
15614         * conf/powerpc-ieee1275.rmk (COMMON_ASFLAGS): Remove -fno-builtin.
15615         (COMMON_CFLAGS): Remove -fno-builtin and -D__ASSEMBLY__. Add
15616         -ffreestanding and -msoft-float.
15618 2004-10-15  Hollis Blanchard  <hollis@penguinppc.org>
15620         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Do not
15621         append ":0" to devpath if the GRUB_IEEE1275_NO_PARTITION_0 flag is
15622         set in grub_ieee1275_flags.
15624 2004-10-14  Hollis Blanchard  <hollis@penguinppc.org>
15626         * include/grub/powerpc/ieee1275/ieee1275.h (abort): Add function
15627         prototype.
15628         * kern/powerpc/ieee1275/init.c (grub_machine_init): Call
15629         grub_console_init first.
15630         Change the memory range used for grub_ieee1275_claim and
15631         grub_mm_init_region.
15632         Print an error message if the claim fails.
15633         Include <grub/misc.h>.
15635 2004-10-13  Hollis Blanchard  <hollis@penguinppc.org>
15637         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_iterate):
15638         Call grub_children_iterate for device nodes of type `scsi',
15639         `ide', or `ata'.
15640         (grub_ofdisk_open): Remove manual device alias resolution.
15641         Fix memory leak when device cannot be opened.
15642         * include/grub/powerpc/ieee1275/ieee1275.h
15643         (grub_children_iterate): New prototype.
15644         * kern/powerpc/ieee1275/openfw.c (grub_children_iterate):
15645         New function.
15646         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
15647         Return -1 if args.size was -1.
15649 2004-10-11  Hollis Blanchard  <hollis@penguinppc.org>
15651         * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_flags): New global.
15652         (cmain): Accept 3 parameters. Test for 0xdeadbeef, indicating Old
15653         World Macintosh. If Old Wold, set flag in grub_ieee1275_flags; claim
15654         Open Firmware's memory for it; claim memory from _start to _end.
15655         * boot/powerpc/ieee1275/crt0.S (__bss_start): New extern.
15656         (_end): New extern.
15657         (_start): Zero BSS from __bss_start to _end.
15658         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
15659         New extern.
15660         (GRUB_IEEE1275_NO_PARTITION_0): New #define.
15662 2004-10-11  Hollis Blanchard  <hollis@penguinppc.org>
15664         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): Return
15665         -1 if args.base was -1.
15667 2004-10-08  Hollis Blanchard  <hollis@penguinppc.org>
15669         * term/powerpc/ieee1275/ieee1275.c (grub_ofconsole_cls): Use an ANSI
15670         escape sequence instead of a literal ^L. Also call
15671         grub_ofconsole_gotoxy.
15673 2004-10-03  Hollis Blanchard  <hollis@penguinppc.org>
15675         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): change
15676         void *  arguments to grub_addr_t.  All callers updated.  Also make
15677         the `result' argument optional.
15678         (grub_ieee1275_release): change void * arguments to grub_addr_t.
15679         All callers updated.
15681 2004-09-22  Hollis Blanchard  <hollis@penguinppc.org>
15683         * commands/ls.c (grub_ls_list_files): Use the string following the
15684         initial ')', if present, as the filesystem path.
15685         * kern/rescue.c (grub_rescue_cmd_ls): Likewise.
15687         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): List crt0.S first.
15689 2004-09-18  Yoshinori K. Okuji  <okuji@enbug.org>
15691         Make the source code of the menu interface more readable.
15693         * normal/menu.c: Include grub/mm.h.
15694         (TERM_WIDTH): New macro.
15695         (TERM_HEIGHT): Likewise.
15696         (TERM_INFO_HEIGHT): Likewise.
15697         (TERM_MARGIN): Likewise.
15698         (TERM_SCROLL_WIDTH): Likewise.
15699         (TERM_TOP_BORDER_Y): Likewise.
15700         (TERM_LEFT_BORDER_X): Likewise.
15701         (TERM_BORDER_WIDTH): Likewise.
15702         (TERM_MESSAGE_HEIGHT): Likewise.
15703         (TERM_BORDER_HEIGHT): Likewise.
15704         (TERM_NUM_ENTRIES): Likewise.
15705         (TERM_FIRST_ENTRY_Y): Likewise.
15706         (TERM_ENTRY_WIDTH): Likewise.
15707         (TERM_CURSOR_X): Likewise.
15708         (draw_border): Use macros instead of magic numbers.
15709         (print_entry): Likewise.
15710         (print_entries): Likewise.
15711         (run_menu): Likewise. Also, handle the key 'e'.
15712         (run_menu_entry): Ignore empty command lines.
15713         (print_message): Added a new argument EDIT. If EDIT is true,
15714         print a different message.
15715         (init_page): Likewise.
15716         (edit_menu_entry): New function. Not implemented yet.
15718 2004-09-17  Marco Gerards  <metgerards@student.han.nl>
15720         Add `linux.mod' and `multiboot.mod' so linux and multiboot kernels
15721         can be loaded from normal mode.
15723         * conf/i386-pc.rmk (pkgdata_MODULES): Add `linux.mod' and
15724         `multiboot.mod'.
15725         (linux_mod_SOURCES, linux_mod_CFLAGS, multiboot_mod_SOURCES)
15726         (multiboot_mod_CFLAGS): New variables.
15727         * loader/i386/pc/linux_normal.c: New file.
15728         * loader/i386/pc/multiboot_normal.c: Likewise.
15730         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Don't use the
15731         attribute `unused'.
15733         * fs/ext2.c (grub_ext2_iterate_dir): Fix typos in inode type.  Use
15734         `fdiro' to read the mode information from instead of `diro'.
15736         * fs/fshelp.c (grub_fshelp_find_file): Set type to foundtype after
15737         looking up a symlink.
15739         * include/grub/normal.h (GRUB_COMMAND_FLAG_NO_ARG_PARSE): New
15740         macro.
15741         * normal/command.c (grub_command_execute): Don't parse the
15742         arguments when `GRUB_COMMAND_FLAG_NO_ARG_PARSE' is set in the
15743         flags of the command.
15745         * normal/menu.c (grub_menu_run): Fix typo.
15747 2004-09-14  Hollis Blanchard  <hollis@penguinppc.org>
15749         * kern/powerpc/ieee1275/init.c (abort): Trap into Open Firmware.
15751         * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_gotoxy): Use
15752         `y + 1' instead of `y - 1'.
15754         * conf/powerpc-ieee1275.rmk (grubof_LDFLAGS): Add `-N' and `-S'.
15756 2004-09-14  Yoshinori K. Okuji  <okuji@enbug.org>
15758         From Hollis Blanchard <hollis@penguinppc.org>:
15759         * kern/misc.c (memmove): New alias for grub_memmove.
15760         (memcmp): New alias for grub_memcmp.
15761         (memset): New alias for grub_memset.
15762         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
15763         Change "int handle" to "grub_ieee1275_phandle_t handle".
15764         * include/grub/powerpc/ieee1275/ieee1275.h
15765         (grub_ieee1275_get_property): Likewise.
15767 2004-09-12  Tomas Ebenlendr  <ebik@ucw.cz>
15769         Added normal mode command `chainloader' as module chain.mod, which
15770         depends on normal.mod and _chain.mod.
15772         * conf/i386-pc.rmk (pkgdata_MODULES): Add `chain.mod'.
15773         (chain_mod_SOURCES, chain_mod_CFLAGS): Variables added.
15774         * include/grub/i386/pc/loader.h (grub_rescue_cmd_chainloader):
15775         Deleted prototype.
15776         * loader/i386/pc/chainloader.c (grub_rescue_cmd_chainloader): All
15777         but arguments parsing moved to ...
15778         (grub_chainloader_cmd): ... here.  New function.
15779         * include/grub/i386/pc/chainloader.h: New file.
15780         * loader/i386/pc/chainloader_normal.c: Likewise.
15782 2004-09-11  Marco Gerards  <metgerards@student.han.nl>
15784         * conf/i386-pc.rmk (kernel_img_SOURCES): Added kern/fshelp.c.
15785         (grub_mkimage_LDFLAGS): Likewise.
15786         (grub_emu_SOURCES): Likewise.
15787         (kernel_img_HEADERS): Added fshelp.h.
15788         * fs/ext2.c: Include <grub/fshelp.h>.
15789         (FILETYPE_REG): New macro.
15790         (FILETYPE_INO_REG): Likewise.
15791         (grub_ext_sblock): Renamed to `grub_ext2_sblock'.
15792         Changed all users.
15793         (ext2_block_group): Renamed to `grub_ext2_block_group'.  Changed
15794         all users.
15795         (grub_fshelp_node): New struct.
15796         (grub_ext2_data): Added member `diropen'.  Changed member `inode'
15797         to a pointer.
15798         (grub_ext2_get_file_block): Removed function.
15799         (grub_ext2_read_block): New function.
15800         (grub_ext2_read_file): Replaced parameter `data' by `node'.
15801         This function was written.
15802         (grub_ext2_mount): Read the root inode.  Create a diropen struct.
15803         (grub_ext2_find_file): Removed function.
15804         (grub_ext2_read_symlink): New function.
15805         (grub_ext2_iterate_dir): Likewise.
15806         (grub_ext2_open): Rewritten.
15807         (grub_ext2_dir): Rewritten.
15808         * include/grub/fshelp.h: New file.
15809         * fs/fshelp.c: Likewise.
15811 2004-09-10  Yoshinori K. Okuji  <okuji@enbug.org>
15813         * normal/menu.c: Include grub/loader.h and grub/machine/time.h.
15814         (print_message): Add a missing newline.
15815         (run_menu): Added timeout support.
15816         (run_menu_entry): New local function.
15817         (grub_menu_run): Added support for booting.
15819         * kern/loader.c (grub_loader_is_loaded): New function.
15821         * include/grub/powerpc/ieee1275/time.h: Include grub/symbol.h.
15822         (grub_get_rtc): Exported.
15824         * include/grub/i386/pc/time.h: Include grub/symbol.h.
15825         (grub_get_rtc): Exported.
15827         * include/grub/normal.h (struct grub_command_list): Remove
15828         constant from the member `command'.
15830         * include/grub/loader.h (grub_loader_is_loaded): Declared.
15832         * include/grub/err.h (GRUB_ERR_INVALID_COMMAND): New constant.
15834         * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/time.h.
15836 2004-08-28  Marco Gerards  <metgerards@student.han.nl>
15838         Add support for the JFS filesystem.
15840         * fs/jfs.c: New file.
15841         * include/grub/fs.h (grub_jfs_init): New prototype.
15842         (grub_jfs_fini): New prototype.
15843         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/jfs.c.
15844         (grub_emu_SOURCES): Likewise.
15845         (pkgdata_MODULES): Add jfs.mod.
15846         (jfs_mod_SOURCES): New variable.
15847         (jfs_mod_CFLAGS): Likewise.
15848         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs.jfs.c.
15849         (grubof_SOURCES): Likewise.
15850         * util/grub-emu.c (main): Initialize and deinitialize JFS support.
15852         * fs/fat.c (grub_fat_find_dir): Convert the filename little
15853         endian to the host endian.
15854         (grub_fat_utf16_to_utf8): Move function from there...
15855         * kern/misc.c (grub_utf16_to_utf8): ...to here.  Do not convert
15856         the endianness of the source string anymore.
15857         * include/grub/misc.h (grub_utf16_to_utf8): New prototype.
15859 2004-08-24  Marco Gerards  <metgerards@student.han.nl>
15861         * commands/boot.c (grub_boot_init) [GRUB_UTIL]: Make conditional.
15862         (grub_boot_fini) [GRUB_UTIL]: Likewise.
15863         (GRUB_MOD_INIT) [!GRUB_UTIL]: Likewise.
15864         (GRUB_MOD_FINI) [!GRUB_UTIL]: Likewise.
15866         * fs/hfs.c (grub_hfs_find_node): Add a prototype for `node_found'.
15867         (grub_hfs_iterate_dir): Make the function static.  Add prototypes
15868         for `node_found' and `it_dir'.
15869         (grub_hfs_dir): Add prototype for `dir_hook'.
15871         * fs/minix.c (grub_minix_get_file_block): Add prototype for
15872         `grub_get_indir'.  Rename `indir' in two blocks to `indir16'
15873         and `indir32' to silence a gcc warning.
15875         * include/grub/fs.h (grub_hfs_init): New prototype.
15876         (grub_hfs_fini): Likewise.
15879 2004-08-21  Yoshinori K. Okuji  <okuji@enbug.org>
15881         Each disk device has its own id now. This is useful to make use
15882         of multiple disk devices.
15884         * include/grub/disk.h (grub_disk_dev_id): New enum.
15885         (GRUB_DISK_DEVICE_BIOSDISK_ID): New constant.
15886         (GRUB_DISK_DEVICE_OFDISK_ID): Likewise.
15888         * disk/i386/pc/biosdisk.c (grub_biosdisk_dev): Specify
15889         GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
15891         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_dev): Specify
15892         GRUB_DISK_DEVICE_OFDISK_ID as an id.
15894         * util/i386/pc/biosdisk.c (grub_util_biosdisk_dev): Specify
15895         GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
15897         * include/grub/disk.h (struct grub_disk_dev): Added a new member
15898         "id" which is used by the cache manager.
15900         * normal/main.c (grub_normal_init_page): Use "GNU GRUB" instead
15901         of just "GRUB".
15903 2004-08-18  Marco Gerards  <metgerards@student.han.nl>
15905         * fs/hfs.c: New file.
15906         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/hfs.c.
15907         (grub_emu_SOURCES): Likewise.
15908         (pkgdata_MODULES): Add hfs.mod.
15909         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/hfs.c.
15910         (grubof_SOURCES): Likewise.
15911         * util/grub-emu.c (main): Initialize and deinitialize HFS support.
15913         * include/grub/misc.h (grub_strncasecmp): Add prototype.
15914         * kern/misc.c (grub_strncasecmp): Add function.
15916 2004-08-14  Marco Gerards  <metgerards@student.han.nl>
15918         * include/grub/arg.h (GRUB_ARG_OPTION_OPTIONAL): Surround macro
15919         with parentheses.
15921         * fs/ext2.c (FILETYPE_UNKNOWN): New macro.
15922         (grub_ext2_dir): In case the directory entry type is unknown, read
15923         it from the inode.
15925 2004-08-02  Peter Bruin  <pjbruin@dds.nl>
15927         * loader/powerpc/ieee1275/linux.c (grub_linux_init): Pass
15928         grub_load_linux instead of grub_rescue_cmd_linux as second
15929         argument of grub_rescue_register_command.
15931         * Makefile.in (RMKFILES): Add conf/powerpc-ieee1275.rmk.
15933 2004-07-27  Marco Gerards  <metgerards@student.han.nl>
15935         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_release): New
15936         function.
15937         * commands/boot.c: Remove the check for `GRUB_UTIL'.
15938         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
15939         `loader/powerpc/ieee1275/linux.c',
15940         `loader/powerpc/ieee1275/linux_normal.c' and `commands/boot.c'.
15941         * include/grub/powerpc/ieee1275/ieee1275.h
15942         (grub_ieee1275_release): New prototype.
15943         * include/grub/powerpc/ieee1275/loader.h: Rewritten.
15944         * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize
15945         normal, boot, linux and linux_normal.
15946         * loader/powerpc/ieee1275/linux.c: New file.
15947         * loader/powerpc/ieee1275/linux_normal.c: Likewise.
15949 2004-07-12  Marco Gerards  <metgerards@student.han.nl>
15951         * normal/arg.c (grub_arg_parse): Correct error handling after
15952         reallocating the argumentlist (check if `argl' is not null instead
15953         of checking if `args' is not null).
15954         * kern/mm.c (grub_realloc): Return the same pointer when using the
15955         same region, instead of returning the header address.
15957 2004-07-11  Marco Gerards  <metgerards@student.han.nl>
15959         * disk/powerpc/ieee1275/partition.c (grub_partition_iterate): Skip
15960         one block instead of two when looking for the initial partition.
15961         (grub_partition_probe): Initialize the local variable `p' with 0.
15962         Use base 10 for the grub_strtoul call.
15963         * kern/misc.c (grub_strncpy): Fix off by one bug.  Eliminated the
15964         need for one local variable.
15965         (grub_strtoul): Don't add the new value to `num', instead of that
15966         just assign it.
15968 2004-07-11  Marco Gerards  <metgerards@student.han.nl>
15970         * conf/i386-pc.rmk (pkgdata_IMAGE): Add pxeboot.img.
15971         (pxeboot_img_SOURCES): New variable.
15972         (pxeboot_img_ASFLAGS): Likewise.
15973         (pxeboot_img_LDFLAGS): Likewise.
15974         * boot/i386/pc/pxeboot.S: New file.  Based on pxeloader.S from
15975         GRUB Legacy and boot.S.  Adopted for GRUB 2 by lode leroy
15976         <lode_leroy@hotmail.com>.
15978 2004-06-27  Tomas Ebenlendr  <ebik@ucw.cz>
15980         * kern/rescue.c (grub_enter_rescue_mode): Don't continue when
15981         there was no input.
15983 2004-06-27  Tomas Ebenlendr  <ebik@ucw.cz>
15985         * normal/cmdline.c (grub_set_history): Fix off by one bug.  Fixed
15986         the history buffer logic.
15988 2004-06-27  Tomas Ebenlendr  <ebik@ucw.cz>
15990         * fs/ext2.c (FILETYPE_INO_MASK, FILETYPE_INO_DIRECTORY)
15991         (FILETYPE_INO_SYMLINK): New macros.
15992         (grub_ext2_find_file): Check if the node is a directory using the
15993         inode stat information instead of using the filetype in the
15994         dirent.  Exclude the first character of an absolute symlink.
15995         (grub_ext2_dir): Mask out the filetype part of the mode member of
15996         the inode.
15998 2004-05-24  Marco Gerards  <metgerards@student.han.nl>
16000         Add support for UFS version 1 and 2.  Add support for the minix
16001         filesystem version 1 and 2, both the variants with 14 and 30 long
16002         filenames.
16004         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ufs.c and
16005         fs/minix.c.
16006         (grub_emu_SOURCES): Likewise.
16007         (pkgdata_MODULES): Add ufs.mod and minix.mod.
16008         (ufs_mod_SOURCES): New variable.
16009         (ufs_mod_CFLAGS): Likewise.
16010         (minix_mod_SOURCES): Likewise.
16011         (minix_mod_CFLAGS): Likewise.
16012         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/ufs.c and
16013         fs/minix.c.
16014         (grubof_SOURCES): Likewise.
16015         * fs/ufs.c: New file.
16016         * fs/minix.c: New file.
16017         * include/grub/fs.h (grub_ufs_init): New prototype.
16018         (grub_ufs_fini): Likewise.
16019         (grub_minix_init): Likewise.
16020         (grub_minix_fini): Likewise.
16021         * util/grub-emu.c (main): Initialize and deinitialize UFS and
16022         minix fs.
16024 2004-04-30  Jeroen Dekkers  <jeroen@dekkers.cx>
16026         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add normal/arg.c,
16027         commands/ls.c, commands/terminal.c, commands/boot.c,
16028         commands/cmp.c and commands/cat.c.
16029         (grubof_LDFLAGS): Add -nostdlib -static-libgcc -lgcc.
16031         * kern/powerpc/ieee1275/init.c: Include "grub/env.h" instead of
16032         "env.h"
16034 2004-04-04  Yoshinori K. Okuji  <okuji@enbug.org>
16036         All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
16037         and grub_, respectively. Because the conversion is trivial and
16038         mechanical, I omit the details here. Please refer to the CVS
16039         if you need more information.
16041 2004-04-04  Yoshinori K. Okuji  <okuji@enbug.org>
16043         * include/pupa: Renamed to ...
16044         * include/grub: ... this.
16045         * util/i386/pc/pupa-mkimage.c: Renamed to ...
16046         * util/i386/pc/grub-mkimage.c: ... this.
16047         * util/i386/pc/pupa-setup.c: Renamed to ...
16048         * util/i386/pc/grub-setup.c: ... this.
16049         * util/pupa-emu.c: Renamed to ...
16050         * util/grub-emu.c: ... this.
16052 2004-03-29  Marco Gerards  <metgerards@student.han.nl>
16054         Add support for the newworld apple macintosh (PPC).  This has been
16055         tested on the powerbook 2000 only.  It only adds support for
16056         generic ieee1275 functions, console and disk support.  This should
16057         be easy to port to other architectures with support for Open
16058         Firmware.
16060         * configure.ac: Accept the powerpc as host_cpu.  In the case of
16061         the powerpc cpu set the host_vendor to ieee1275.  Make sure the i386
16062         specific tests are only executed while building for the i386.
16063         Inverse test for crosscompile.
16064         * genmk.rb (Utility): Allow assembler files.
16065         * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno.
16066         * conf/powerpc-ieee1275.rmk: New file.
16067         * disk/powerpc/ieee1275/ofdisk.c: Likewise.
16068         * disk/powerpc/ieee1275/partition.c: Likewise.
16069         * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise.
16070         * include/pupa/powerpc/ieee1275/console.h: Likewise.
16071         * include/pupa/powerpc/ieee1275/partition.h: Likewise.
16072         * include/pupa/powerpc/ieee1275/time.h: Likewise.
16073         * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise.
16074         * include/pupa/powerpc/ieee1275/multiboot.h: Likewise.
16075         * include/pupa/powerpc/ieee1275/loader.h
16076         * include/pupa/powerpc/setjmp.h: Likewise.
16077         * include/pupa/powerpc/types.h: Likewise.
16078         * kern/powerpc/ieee1275/init.c: Likewise.
16079         * kern/powerpc/ieee1275/openfw.c: Likewise.
16080         * term/powerpc/ieee1275/ofconsole.c: Likewise.
16082         These files were written by Johan Rydberg
16083         (jrydberg@night.trouble.net) and I only modified them slightly.
16085         * boot/powerpc/ieee1275/cmain.c: New file.
16086         * boot/powerpc/ieee1275/crt0.S: Likewise.
16087         * boot/powerpc/ieee1275/ieee1275.c: Likewise.
16088         * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
16090 2004-03-14  Jeroen Dekkers  <jeroen@dekkers.cx>
16092         * Makefile.in: Update copyright.
16093         * genmodsrc.sh: Likewise.
16094         * gensymlist.sh: Likewise.
16095         * term/i386/pc/vga.c: Indent correctly.
16097         * util/i386/pc/pupa-mkimage.c (usage): Use PACKAGE_BUGREPORT as
16098         bugreporting address.
16099         * util/i386/pc/pupa-setup.c (usage): Likewise,
16100         (main): Call pupa_ext2_init and pupa_ext2_fini.
16102         * fs/fat.c (log2): Renamed to ...
16103         (fat_log2): ... this.
16104         All callers changed.
16105         * kern/misc.c (memcpy): Alias to pupa_memmove.
16106         * loader/i386/pc/multiboot.c (pupa_rescue_cmd_multiboot): Fix
16107         lvalue cast.
16108         * util/console.c (pupa_ncurses_fini): Return 0.
16110         * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open)[__linux__]:
16111         Move fail label here.
16112         [__GNU__]: Don't warn when using stat.
16113         (open_device)[!__linux__]: Check if FD < 0 instead of !FD.
16114         (pupa_util_biosdisk_get_pupa_dev)[__GNU__]: Change type of N to
16115         long int. Use strtol instead of strtoul.
16117 2004-03-14  Marco Gerards  <metgerards@student.han.nl>
16119         * commands/boot.c: New file.
16120         * commands/cat.c: Likewise.
16121         * commands/cmp.c: Likewise.
16122         * commands/ls.c: Likewise.
16123         * commands/terminal.c: Likewise.
16124         * normal/command.c: Include <pupa/env.h> and <pupa/dl.h>.
16125         (pupa_register_command): Changed interface to match the new
16126         argument parser.
16127         (pupa_command_execute): Changed (almost rewritten) so it uses
16128         pupa_split_command.  Added support for setting variables using the
16129         syntax `foo=bar'.
16130         (rescue_command): Changed to work with the new argument parser.
16131         (terminal_command): Moved from here to commands/terminal.c.
16132         (set_command): New function.
16133         (unset_command): New function.
16134         (insmod_command): New function.
16135         (rmmod_command): New function.
16136         (lsmod_command): New function.
16137         (pupa_command_init): Don't initialize the command terminal
16138         anymore.  Initialize the commands set, unset, insmod, rmmod and
16139         lsmod.
16140         * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/env.c.
16141         (kernel_img_HEADERS): Add arg.h and env.h.
16142         (pupa_mkimage_LDFLAGS): Add kern/env.c.
16143         (pupa_emu_SOURCES): Add kern/env.c, commands/ls.c,
16144         commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c,
16145         normal/arg.c.
16146         (pkgdata_MODULES): Add ls.mod, boot.mod, cmp.mod, cat.mod and
16147         terminal.mod.
16148         (normal_mod_SOURCES): Add normal/arg.c and normal/arg.c.
16149         (boot_mod_SOURCES): New variable.
16150         (terminal_mod_SOURCES): Likewise.
16151         (ls_mod_SOURCES): Likewise.
16152         (cmp_mod_SOURCES): Likewise.
16153         (cat_mod_SOURCES): Likewise.
16155         * normal/arg.c: New file.
16156         * kern/env.c: Likewise.
16157         * include/pupa/arg.h: Likewise.
16158         * include/pupa/env.h: Likewise.
16159         * font/manager.c (font_command): Changed to match argument parsing
16160         interface changes.
16161         (PUPA_MOD_INIT): Likewise.
16162         * hello/hello.c (pupa_cmd_hello): Likewise.
16163         (PUPA_MOD_INIT): Likewise.
16164         * include/pupa/disk.h: Include <pupa/device.h>.
16165         (pupa_print_partinfo): New prototype.
16166         * include/pupa/dl.h (pupa_dl_set_prefix): Prototype removed.
16167         (pupa_dl_get_prefix): Likewise.
16168         * include/pupa/misc.h: Include <pupa/err.h>.
16169         (pupa_isgraph): New prototype.
16170         (pupa_isdigit): Likewise.
16171         (pupa_split_cmdline): Likewise.
16172         * include/pupa/normal.h: Include <pupa/arg.h>.
16173         (pupa_command): Changed the prototype of the member `func' to
16174         match the argument parsing interface.  Added member `options'.
16175         (pupa_register_command): Updated to match function.
16176         (pupa_arg_parse): New prototype.
16177         (pupa_hello_init) [PUPA_UTIL]: New prototype.
16178         (pupa_hello_fini) [PUPA_UTIL]: Likewise.
16179         (pupa_ls_init) [PUPA_UTIL]: Likewise.
16180         (pupa_ls_fini) [PUPA_UTIL]: Likewise.
16181         (pupa_cat_init) [PUPA_UTIL]: Likewise.
16182         (pupa_cat_fini) [PUPA_UTIL]: Likewise.
16183         (pupa_boot_init) [PUPA_UTIL]: Likewise.
16184         (pupa_boot_fini) [PUPA_UTIL]: Likewise.
16185         (pupa_cmp_init) [PUPA_UTIL]: Likewise.
16186         (pupa_cmp_fini) [PUPA_UTIL]: Likewise.
16187         (pupa_terminal_init) [PUPA_UTIL]: Likewise.
16188         (pupa_terminal_fini) [PUPA_UTIL]: Likewise.
16189         * kern/disk.c: Include <pupa/file.h>.
16190         (pupa_print_partinfo): New function.
16191         * kern/dl.c: Include <pupa/env.h>.
16192         (pupa_dl_dir): Variable removed.
16193         (pupa_dl_load): Use the environment variable `prefix' instead of
16194         the variable pupa_dl_dir.
16195         (pupa_dl_set_prefix): Function removed.
16196         (pupa_dl_get_prefix): Likewise.
16197         * kern/i386/pc/init.c: Include <pupa/env.h>.
16198         (pupa_machine_init): Use the environment variable `prefix' instead of
16199         using pupa_dl_set_prefix to set the prefix.
16200         * kern/main.c: Include <pupa/env.h>.
16201         (pupa_set_root_dev): Use the environment variable `prefix' instead of
16202         using pupa_dl_get_prefix to get the prefix.
16203         * kern/misc.c: Include <pupa/env.h>.
16204         (pupa_isdigit): New function.
16205         (pupa_isgraph): Likewise.
16206         (pupa_ftoa): Likewise.
16207         (pupa_vsprintf): Added support for printing values of the type
16208         `double'.  Make it possible to format variable output when using
16209         formatting like `%1.2%f'.
16210         (pupa_split_cmdline): New function.
16211         * kern/rescue.c: Include <pupa/env.h>.
16212         (next_word): Removed function.
16213         (pupa_rescue_cmd_prefix): Likewise.
16214         (pupa_rescue_cmd_set): New function.
16215         (pupa_rescue_cmd_unset): New function.
16216         (pupa_enter_rescue_mode): Use the `pupa_split_cmdline' function to
16217         split the command line instead of splitting it here.  Added
16218         support for setting variables using the syntax `foo=bar'.  Don't
16219         initialize the prefix command anymore.  Initialized the set and
16220         unset commands.
16221         * normal/cmdline.c: Include <pupa/env.h>.
16222         (pupa_tab_complete): Added prototypes for print_simple_completion,
16223         print_partition_completion, add_completion, iterate_commands,
16224         iterate_dev, iterate_part and iterate_dir. Moved code to print
16225         partition information from here to kern/disk.c.
16226         (pupa_cmdline_run): Don't check if the function exists anymore.
16227         * normal/main.c: Include <pupa/env.h>.
16228         (pupa_rescue_cmd_normal): Use the environment variable `prefix'
16229         instead of using pupa_dl_get_prefix to get the prefix.
16230         * term/i386/pc/vga.c: Include <pupa/arg.h>.
16231         (check_vga_mem): Cast pointers to `void *' to silence a gcc
16232         warning.
16233         (pupa_vga_putchar) [! DEBUG_VGA]: Removed for this case.
16234         (pupa_vga_setcolor): Declare unused variables with `__attribute__
16235         ((unused))' to silence a gcc warning.
16236         (pupa_vga_setcolor): Likewise.
16237         (debug_command): Changed to match argument parsing
16238         interface changes.
16239         * util/pupa-emu.c: Include <pupa/env.h>.
16240         (options): Added 0's for unused fields to silence a gcc warning.
16241         (argp): Likewise.
16242         (main): Use the environment variable `prefix' instead of using
16243         pupa_dl_set_prefix to set the prefix.  Initialize the commands ls,
16244         boot, cmp, cat and terminal.  Finish the commands boot, cmp, cat
16245         and terminal.
16247         * util/i386/pc/getroot.c: Include <pupa/i386/pc/util/biosdisk.h>.
16248         * util/misc.c: Include <malloc.h>.
16249         (pupa_malloc): Rewritten so errors are correctly reported.
16250         (pupa_realloc): Likewise.
16251         (pupa_memalign): Likewise.
16252         (pupa_mm_init_region): Declare unused variables with
16253         `__attribute__ ((unused))' to silence a gcc warning.
16254         * normal/i386/setjmp.S: Remove tab at the end of the file to
16255         silence a gcc warning.
16256         * loader/i386/pc/linux.c (pupa_rescue_cmd_initrd): Declare unused
16257         variables with `__attribute__ ((unused))' to silence a gcc
16258         warning.
16259         * loader/i386/pc/multiboot.c (pupa_multiboot_unload): Make the
16260         local variable i unsigned to silence a gcc warning.
16262         * kern/term.c: Include <pupa/misc.h>.
16263         (pupa_more_lines): New variable.
16264         (pupa_more): Likewise.
16265         (pupa_putcode): When the pager is active pause at the end of every
16266         screen.
16267         (pupa_set_more): New function.
16268         * include/pupa/term.h (pupa_set_more): New prototype.
16271 2004-03-07  Yoshinori K. Okuji  <okuji@enbug.org>
16273         Now this project is GRUB 2 rather than PUPA. The location of
16274         the CVS repository was moved to GRUB's.
16276         * configure.ac: Use bug-grub as the reporting address.
16277         Use GRUB instead of PUPA.
16278         Change the version number to 1.90.
16280 2004-02-24  Yoshinori K. Okuji  <okuji@enbug.org>
16282         * genkernsyms.sh: Updated copyright information.
16283         * genmk.rb: Likewise.
16284         * genmodsrc.sh: Likewise.
16285         * gensymlist.sh: Likewise.
16286         * boot/i386/pc/boot.S: Likewise.
16287         * boot/i386/pc/diskboot.S: Likewise.
16288         * disk/i386/pc/biosdisk.c: Likewise.
16289         * disk/i386/pc/partition.c: Likewise.
16290         * font/manager.c: Likewise.
16291         * fs/ext2.c: Likewise.
16292         * fs/fat.c: Likewise.
16293         * include/pupa/boot.h: Likewise.
16294         * include/pupa/device.h: Likewise.
16295         * include/pupa/disk.h: Likewise.
16296         * include/pupa/dl.h: Likewise.
16297         * include/pupa/elf.h: Likewise.
16298         * include/pupa/err.h: Likewise.
16299         * include/pupa/file.h: Likewise.
16300         * include/pupa/font.h: Likewise.
16301         * include/pupa/fs.h: Likewise.
16302         * include/pupa/kernel.h: Likewise.
16303         * include/pupa/loader.h: Likewise.
16304         * include/pupa/misc.h: Likewise.
16305         * include/pupa/mm.h: Likewise.
16306         * include/pupa/net.h: Likewise.
16307         * include/pupa/normal.h: Likewise.
16308         * include/pupa/rescue.h: Likewise.
16309         * include/pupa/setjmp.h: Likewise.
16310         * include/pupa/symbol.h: Likewise.
16311         * include/pupa/term.h: Likewise.
16312         * include/pupa/types.h: Likewise.
16313         * include/pupa/i386/setjmp.h: Likewise.
16314         * include/pupa/i386/types.h: Likewise.
16315         * include/pupa/i386/pc/biosdisk.h: Likewise.
16316         * include/pupa/i386/pc/boot.h: Likewise.
16317         * include/pupa/i386/pc/console.h: Likewise.
16318         * include/pupa/i386/pc/init.h: Likewise.
16319         * include/pupa/i386/pc/kernel.h: Likewise.
16320         * include/pupa/i386/pc/linux.h: Likewise.
16321         * include/pupa/i386/pc/loader.h: Likewise.
16322         * include/pupa/i386/pc/memory.h: Likewise.
16323         * include/pupa/i386/pc/multiboot.h: Likewise.
16324         * include/pupa/i386/pc/partition.h: Likewise.
16325         * include/pupa/i386/pc/time.h: Likewise.
16326         * include/pupa/i386/pc/vga.h: Likewise.
16327         * include/pupa/i386/pc/util/biosdisk.h: Likewise.
16328         * include/pupa/util/getroot.h: Likewise.
16329         * include/pupa/util/misc.h: Likewise.
16330         * include/pupa/util/resolve.h: Likewise.
16331         * kern/device.c: Likewise.
16332         * kern/disk.c: Likewise.
16333         * kern/dl.c: Likewise.
16334         * kern/err.c: Likewise.
16335         * kern/file.c: Likewise.
16336         * kern/fs.c: Likewise.
16337         * kern/loader.c: Likewise.
16338         * kern/main.c: Likewise.
16339         * kern/misc.c: Likewise.
16340         * kern/mm.c: Likewise.
16341         * kern/rescue.c: Likewise.
16342         * kern/term.c: Likewise.
16343         * kern/i386/dl.c: Likewise.
16344         * kern/i386/pc/init.c: Likewise.
16345         * kern/i386/pc/lzo1x.S: Likewise.
16346         * kern/i386/pc/startup.S: Likewise.
16347         * loader/i386/pc/chainloader.c: Likewise.
16348         * loader/i386/pc/linux.c: Likewise.
16349         * loader/i386/pc/multiboot.c: Likewise.
16350         * normal/cmdline.c: Likewise.
16351         * normal/command.c: Likewise.
16352         * normal/main.c: Likewise.
16353         * normal/menu.c: Likewise.
16354         * normal/i386/setjmp.S: Likewise.
16355         * term/i386/pc/console.c: Likewise.
16356         * term/i386/pc/vga.c: Likewise.
16357         * util/console.c: Likewise.
16358         * util/genmoddep.c: Likewise.
16359         * util/misc.c: Likewise.
16360         * util/pupa-emu.c: Likewise.
16361         * util/resolve.c: Likewise.
16362         * util/unifont2pff.rb: Likewise.
16363         * util/i386/pc/biosdisk.c: Likewise.
16364         * util/i386/pc/getroot.c: Likewise.
16365         * util/i386/pc/pupa-mkimage.c: Likewise.
16366         * util/i386/pc/pupa-setup.c: Likewise.
16368 2004-02-15  Jeroen Dekkers  <jeroen@dekkers.cx>
16370         * fs/ext2.c (pupa_ext2_read_file): Correct the value of BLOCKEND
16371         when it is EXT2_BLOCK_SIZE (data).  New argument READ_HOOK, all
16372         callers changed.  Set DATA->DISK->READ_HOOK to READ_HOOK before
16373         reading and reset it after reading.
16374         (pupa_ext2_close): Return PUPA_ERR_NONE.
16376         * include/pupa/i386/pc/linux.h (PUPA_LINUX_INITRD_MAX_ADDRESS):
16377         Correct value.
16378         (struct linux_kernel_header): Add kernel_version and
16379         initrd_addr_max.
16380         * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Check whether
16381         pupa_file_read succeeds.
16382         (pupa_rescue_cmd_initrd): Implement.
16384 2003-12-03  Marco Gerards  <metgerards@student.han.nl>
16386         * fs/ext2.c (pupa_ext2_label): New function.
16387         (pupa_ext2_fs): Added label.
16388         * fs/fat.c (pupa_fat_label): New function.
16389         (pupa_fat_fs): Added label.
16390         * include/pupa/fs.h (struct pupa_fs): Added prototype label.
16392         * kern/misc.c (pupa_strndup): New function.
16393         * include/pupa/misc.h (pupa_strndup): New prototype.
16395         * include/pupa/normal.h: Include <pupa/err.h>.
16396         (pupa_set_history): New prototype.
16397         (pupa_iterate_commands): New prototype.
16398         * normal/cmdline.c: Include <pupa/machine/partition.h>,
16399         <pupa/disk.h>, <pupa/file.h>.
16400         (hist_size): New variable.
16401         (hist_lines): Likewise.
16402         (hist_end): Likewise.
16403         (hist_used): Likewise.
16404         (pupa_set_history): New function.
16405         (pupa_history_get): Likewise.
16406         (pupa_history_add): Likewise.
16407         (pupa_history_replace): Likewise.
16408         (pupa_tab_complete): Likewise.
16409         (pupa_cmdline_run): Added tab completion and history buffer.  Tab
16410         completion shows partitionnames while completing partitions, this
16411         feature was suggested by Jeff Bailey.
16412         * normal/command.c (pupa_iterate_commands): New function.
16413         * normal/main.c (PUPA_DEFAULT_HISTORY_SIZE): New macro.
16414         (pupa_normal_init): Initialize history buffer.
16415         (PUPA_MOD_INIT): Likewise.
16416         (pupa_normal_fini): Free the history buffer.
16417         (PUPA_MOD_FINI): Likewise.
16419         * util/console.c (pupa_ncurses_getkey): Accept 127 as backspace
16420         key.
16422         * aclocal.m4 (pupa_I386_CHECK_REGPARM_BUG): New DEFUN.
16423         * configure.ac [i386]: Check for regparam bug.
16424         (NESTED_FUNC_ATTR) [! i386]: Defined.
16426 2003-11-17  Marco Gerards  <metgerards@student.han.nl>
16428         * conf/i386-pc.rmk (sbin_UTILITIES): Added pupa-emu.
16429         (pupa_setup_SOURCES): Added util/i386/pc/getroot.c.
16430         (pupa_emu_SOURCES): New variable.
16431         (pupa_emu_LDFLAGS): Likewise.
16432         * include/pupa/fs.h (pupa_ext2_init) [PUPA_UTIL]: New prototype.
16433         (pupa_ext2_fini) [PUPA_UTIL]: Likewise.
16434         * include/pupa/normal.h (pupa_normal_init) [PUPA_UTIL]: Likewise.
16435         (pupa_normal_fini) [PUPA_UTIL]: Likewise.
16436         * include/pupa/setjmp.h [PUPA_UTIL]: Include <setjmp.h>.
16437         (pupa_jmp_buf): New typedef.
16438         (pupa_setjmp) [PUPA_UTIL]: New macro.
16439         (pupa_longjmp) [PUPA_UTIL]: Likewise.
16440         * include/pupa/term.h (struct pupa_term): New member `refresh'.
16441         (pupa_refresh): New prototype.
16442         * include/pupa/util/getroot.h: New file.
16443         * kern/misc.c (pupa_vsprintf): Refresh the screen after updating
16444         it.
16445         * kern/rescue.c (pupa_rescue_get_command_line): Likewise.
16446         (pupa_rescue_cmd_cat): Likewise.
16447         (pupa_rescue_cmd_ls): Likewise.
16448         (pupa_rescue_cmd_testload): Likewise.
16449         (pupa_rescue_cmd_lsmod): Likewise.
16450         * normal/cmdline.c (pupa_cmdline_get): Likewise.
16451         * normal/menu.c (run_menu): Likewise.
16452         * kern/term.c (pupa_cls): Likewise.
16453         (pupa_refresh): New function.
16454         * normal/normal.c (pupa_normal_init) [PUPA_UTIL]: New function.
16455         (pupa_normal_fini) [PUPA_UTIL]: Likewise.
16456         * util/console.c: New file.
16458         * util/i386/pc/getroot.c: New file.
16459         * util/i386/pc/pupa-setup.c: Include <pupa/util/getroot.h>.
16460         (pupa_putchar): New function.
16461         (pupa_refresh): Likewise.
16462         (xgetcwd): Function moved to ...
16463         (strip_extra_slashes): Likewise.
16464         (get_prefix): Likewise.
16465         * util/i386/pc/getroot.c: ... here.
16466         (find_root_device): Function moved and renamed to...
16467         * util/i386/pc/getroot.c (pupa_find_root_device): ... here.
16468         Changed all callers.
16469         * util/i386/pc/pupa-setup.c (guess_root_device): Function moved
16470         and renamed to...
16471         * util/i386/pc/getroot.c (pupa_guess_root_device): ... here.
16472         Changed all callers.
16473         * util/misc.c (pupa_memalign): New function.
16474         (pupa_mm_init_region): Likewise.
16475         (pupa_register_exported_symbols): Likewise.
16476         (pupa_putchar): Function removed.
16477         * util/pupa-emu.c: New file.
16479 2003-11-16  Jeroen Dekkers  <jeroen@dekkers.cx>
16481         * conf/i386-pc.rmk (pkgdata_MODULES): Add _multiboot.mod.
16482         (_multiboot_mod_SOURCES): New variable.
16483         (_multiboot_mod_CFLAGS): Likewise.
16484         * loader/i386/pc/multiboot.c: New file.
16485         * include/pupa/i386/pc/multiboot.h: Likewise.
16486         * kern/i386/pc/startup.S: Include pupa/machine/multiboot.h.
16487         (pupa_multiboot_real_boot): New function.
16488         * include/pupa/i386/pc/loader.h: Include pupa/machine/multiboot.h.
16489         (pupa_multiboot_real_boot): New prototype.
16490         (pupa_rescue_cmd_multiboot): Likewise
16491         (pupa_rescue_cmd_module): Likewise.
16493         * kern/loader.c (pupa_loader_set): Continue when
16494         pupa_loader_unload_func() fails.
16495         (pupa_loader_unset): New function.
16496         * include/pupa/loader.h (pupa_loader_unset): New prototype.
16498         * kern/misc.c (pupa_stpcpy): New function.
16499         * include/pupa/misc.h (pupa_stpcpy): New prototype.
16501 2003-11-12  Marco Gerards  <metgerards@student.han.nl>
16503         * disk/i386/pc/biosdisk.c (pupa_biosdisk_open): Correctly check
16504         for available extensions.
16506         * include/pupa/i386/pc/time.h: New file.
16507         * kern/disk.c: Include <pupa/machine/time.h>.
16508         (PUPA_CACHE_TIMEOUT): New macro.
16509         (pupa_last_time): New variable.
16510         (pupa_disk_open): Flush the cache when there was a timeout.
16511         (pupa_disk_close): Reset the timer.
16512         * kern/i386/pc/startup.S (pupa_get_rtc): Renamed from
16513         pupa_currticks.
16514         * util/misc.c: Include <sys/times.h>
16515         (pupa_get_rtc): New function.
16517 2003-11-09  Jeroen Dekkers  <jeroen@dekkers.cx>
16519         * fs/ext2.c (struct pupa_ext2_inode): Declare struct datablocks
16520         as blocks.
16521         (pupa_ext2_get_file_block): Use blocks member.
16523         * fs/ext2.c (pupa_ext2_read_file): Only set skipfirst for the
16524         first block. Return -1 instead of pupa_errno on error.
16526 2003-10-27  Marco Gerards  <metgerards@student.han.nl>
16528         * README: In the pupa-mkimage example use _chain instead of chain
16529         and ext2 instead of fat.
16530         * TODO: Replace ext2fs with jfs as an example.  Add an item for
16531         adding journal playback for ext2fs.
16532         * conf/i386-pc.rmk (pupa_setup_SOURCES): Added fs/ext2.c.
16533         (pkgdata_MODULES): Added ext2.mod.
16534         (ext2_mod_SOURCES): New variable.
16535         (ext2_mod_CFLAGS): Likewise.
16536         * include/pupa/err.h (pupa_err_t): Added PUPA_ERR_SYMLINK_LOOP.
16537         * include/pupa/misc.h (pupa_strncpy): New prototype.
16538         (pupa_strcat): Likewise.
16539         (pupa_strncmp): Likewise.
16540         * kern/misc.c (pupa_strcat): Enable function.
16541         (pupa_strncpy): New function.
16542         (pupa_strncmp): Likewise.
16543         * fs/ext2.c: New file.
16545         * kern/disk.c (pupa_disk_read): Set pupa_errno to PUPA_ERR_NONE
16546         when the read failed before retrying.
16547         * util/i386/pc/biosdisk.c (_LARGEFILE_SOURCE): Removed.
16548         (_FILE_OFFSET_BITS): Likewise.
16549         * configure.ac: Added AC_SYS_LARGEFILE.
16551 2003-09-25  Yoshinori K. Okuji  <okuji@enbug.org>
16553         * genmk.rb (PModule#rule): Make sure to get only symbol names
16554         from the output of nm.
16555         Reported by Robert Millan <zeratul2@wanadoo.es>.
16557 2003-09-25  Yoshinori K. Okuji  <okuji@enbug.org>
16559         I forgot to check in these changes for a long time. This adds
16560         incomplete support for VGA console, and this is still very
16561         buggy. Also, a lot of consideration is required for I18N,
16562         UNICODE, and VGA font issues. Therefore, assume that this is
16563         such that "better than nothing".
16565         * font/manager.c: New file.
16566         * include/pupa/font.h: Likewise.
16567         * include/pupa/i386/pc/vga.h: Likewise.
16568         * term/i386/pc/vga.c: Likewise.
16569         * util/unifont2pff.rb: Likewise.
16571         * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vga.h.
16572         (pkgdata_MODULES): Added vga.mod and font.mod.
16573         (vga_mod_SOURCES): New variables.
16574         (vga_mod_CFLAGS): Likewise.
16575         (font_mod_SOURCES): Likewise.
16576         (font_mod_CFLAGS): Likewise.
16578         * include/pupa/err.h (PUPA_ERR_BAD_FONT): New constant.
16580         * include/pupa/term.h: Include pupa/err.h.
16581         (struct pupa_term): Added init and fini.
16582         Changed the argument of putchar to pupa_uint32_t.
16584         * include/pupa/i386/pc/console.h: Include pupa/symbol.h.
16585         (pupa_console_real_putchar): New prototype.
16586         (pupa_console_putchar): Removed.
16587         (pupa_console_checkkey): Exported.
16588         (pupa_console_getkey): Likewise.
16590         * kern/misc.c (pupa_vsprintf): Add support for UNICODE
16591         characters.
16593         * kern/term.c (pupa_term_set_current): Rewritten.
16594         (pupa_putchar): Likewise.
16595         (pupa_putcode): New function.
16597         * kern/i386/pc/startup.S (pupa_console_putchar): Renamed to ...
16598         (pupa_console_real_putchar): ... this.
16599         (pupa_vga_set_mode): New function.
16600         (pupa_vga_get_font): Likewise.
16602         * normal/command.c: Include pupa/term.h.
16603         (terminal_command): New function.
16604         (pupa_command_init): Register the command "terminal".
16606         * normal/menu.c (DISP_LEFT): Changed to a UNICODE value.
16607         (DISP_UP): Likewise.
16608         (DISP_RIGHT): Likewise.
16609         (DISP_DOWN): Likewise.
16610         (DISP_HLINE): Likewise.
16611         (DISP_VLINE): Likewise.
16612         (DISP_UL): Likewise.
16613         (DISP_UR): Likewise.
16614         (DISP_LL): Likewise.
16615         (DISP_LR): Likewise.
16617         * term/i386/pc/console.c (pupa_console_putchar): New function.
16619 2003-02-08  NIIBE Yutaka  <gniibe@m17n.org>
16621         * util/resolve.c (pupa_util_resolve_dependencies): BUG
16622         FIX. Reverse the path_list.
16624         * include/pupa/normal.h: Export pupa_register_command and
16625         pupa_unregister_command.
16627         * hello/hello.c (pupa_cmd_hello): New module.
16628         * conf/i386-pc.rmk: Added hello.mod.
16630 2003-01-31  Yoshinori K. Okuji  <okuji@enbug.org>
16632         * kern/i386/pc/lzo1x.S: New file.
16634         * util/i386/pc/pupa-mkimage.c: Include lzo1x.h.
16635         (compress_kernel): New variable.
16636         (generate_image): Heavily modified to support compressing a
16637         large part of the core image.
16639         * util/misc.c (pupa_util_read_image): Fix a file descriptor
16640         leak.
16641         (pupa_util_load_image): New function.
16643         * kern/i386/pc/startup.S: Include pupa/machine/kernel.h.
16644         (pupa_compressed_size): New variable.
16645         (codestart): Enable Gate A20 here.
16646         Decompress the compressed part of the core image.
16647         Rearrange the code to put functions and variables which are
16648         required for initialization in the non-compressed part.
16649         Include lzo1x.S.
16651         * kern/i386/pc/init.c (pupa_machine_init): Don't enable Gate A20
16652         here.
16654         * include/pupa/util/misc.h (pupa_util_write_image): Declared.
16656         * include/pupa/i386/pc/kernel.h
16657         (PUPA_KERNEL_MACHINE_COMPRESSED_SIZE): New macro.
16658         (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): Increased by 4.
16659         (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
16660         (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
16661         (PUPA_KERNEL_MACHINE_RAW_SIZE): New macro.
16663         * conf/i386-pc.rmk (pupa_mkimage_LDFLAGS): New variable.
16665         * genmk.rb (Image#rule): Put LDFLAGS at the end of a line.
16666         (Utility#rule): Likewise.
16668         * configure.ac: Check if LZO is available.
16670 2003-01-20  Yoshinori K. Okuji  <okuji@enbug.org>
16672         * include/pupa/normal.h: New file.
16673         * include/pupa/setjmp.h: Likewise.
16674         * include/pupa/i386/setjmp.h: Likewise.
16675         * normal/cmdline.c: Likewise.
16676         * normal/command.c: Likewise.
16677         * normal/main.c: Likewise.
16678         * normal/menu.c: Likewise.
16679         * normal/i386/setjmp.S: Likewise.
16681         * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Made global.
16682         (pupa_rescue_cmd_initrd): Likewise.
16684         * loader/i386/pc/chainloader.c (pupa_rescue_cmd_chainloader):
16685         Likewise.
16687         * kern/i386/pc/startup.S (translation_table): New variable.
16688         (translate_keycode): New function.
16689         (pupa_console_getkey): Call translate_keycode.
16691         * kern/rescue.c (attempt_normal_mode): New function.
16692         (pupa_enter_rescue_mode): Attempt to execute the normal mode. If
16693         it failed, print a message.
16695         * kern/mm.c (pupa_real_malloc): Print more information when a
16696         free magic is broken.
16697         (pupa_free): If the first free header is not free actually, set
16698         it to P.
16700         * kern/main.c (pupa_load_normal_mode): Just load the module
16701         "normal".
16702         (pupa_main): Don't print the message
16703         "Entering into rescue mode..." here.
16705         * include/pupa/i386/pc/loader.h (pupa_rescue_cmd_initrd):
16706         Declared.
16707         (pupa_rescue_cmd_initrd): Likewise.
16708         (pupa_rescue_cmd_initrd): Likewise.
16710         * include/pupa/symbol.h (FUNCTION): Specify the type.
16711         (VARIABLE): Likewise.
16713         * include/pupa/err.h (pupa_err_t): Added
16714         PUPA_ERR_UNKNOWN_COMMAND.
16716         * include/pupa/dl.h (pupa_dl_set_prefix): Exported.
16717         (pupa_dl_get_prefix): Likewise.
16719         * conf/i386-pc.rmk (pkgdata_MODULES): Added normal.mod.
16720         Added _chain.mod and _linux.mod instead of chain.mod and
16721         linux.mod.
16722         (chain_mod_SOURCES): Renamed to ...
16723         (_chain_mod_SOURCES): ... this.
16724         (chain_mod_CFLAGS): Renamed to ...
16725         (_chain_mod_CFLAGS): ... this.
16726         (linux_mod_SOURCES): Renamed to ...
16727         (_linux_mod_SOURCES): ... this.
16728         (linux_mod_CFLAGS): Renamed to ...
16729         (_linux_mod_CFLAGS): ... this.
16730         (normal_mod_SOURCES): New variable.
16731         (normal_mod_CFLAGS): Likewise.
16732         (normal_mod_ASFLAGS): Likewise.
16734 2003-01-18  Yoshinori K. Okuji  <okuji@enbug.org>
16736         * kern/rescue.c (pupa_rescue_cmd_rmmod): Call pupa_dl_unload, if
16737         possible.
16739         * kern/dl.c (pupa_dl_ref): Refer depending modules
16740         recursively.
16741         (pupa_dl_unref): Unrefer depending modules recursively.
16742         Don't call pupa_dl_unload implicitly, because PUPA can crash if
16743         a module is unloaded before one depending on that module is
16744         unloaded.
16745         (pupa_dl_unload): Unload depending modules explicitly,
16746         if possible.
16748 2003-01-17  Yoshinori K. Okuji  <okuji@enbug.org>
16750         * include/pupa/i386/pc/linux.h: New file.
16751         * loader/i386/pc/linux.c: Likewise.
16753         * loader/i386/pc/chainloader.c (pupa_chainloader_boot_sector):
16754         Removed.
16755         (pupa_chainloader_unload): Return PUPA_ERR_NONE.
16756         (pupa_rescue_cmd_chainloader): Read the image to 0x7C00 instead
16757         of PUPA_CHAINLOADER_BOOT_SECTOR.
16759         * kern/i386/pc/startup.S: Include pupa/machine/linux.h.
16760         (pupa_linux_prot_size): New variable.
16761         (pupa_linux_tmp_addr): Likewise.
16762         (pupa_linux_real_addr): Likewise.
16763         (pupa_linux_boot_zimage): New function.
16764         (pupa_linux_boot_bzimage): Likewise.
16766         * kern/i386/pc/init.c (struct mem_region): New structure.
16767         (MAX_REGIONS): New macro.
16768         (mem_regions): New variable.
16769         (num_regions): Likewise.
16770         (pupa_os_area_addr): Likewise.
16771         (pupa_os_area_size): Likewise.
16772         (pupa_lower_mem): Likewise.
16773         (pupa_upper_mem): Likewise.
16774         (add_mem_region): New function.
16775         (compact_mem_regions): Likewise.
16776         (pupa_machine_init): Set PUPA_LOWER_MEM and PUPA_UPPER_MEM to
16777         the size of the conventional memory and that of so-called upper
16778         memory (before the first memory hole).
16779         Instead of adding each found region to free memory, use
16780         add_mem_region and add them after removing overlaps.
16781         Also, add only 1/4 of the upper memory to free memory. The rest
16782         is used for loading OS images. Maybe this is ad hoc, but this
16783         makes it much easier to relocate OS images when booting.
16785         * kern/rescue.c (pupa_rescue_cmd_module): Removed.
16786         (pupa_enter_rescue_mode): Don't register initrd and module.
16788         * kern/mm.c: Include pupa/dl.h.
16790         * kern/main.c: Include pupa/file.h and pupa/device.h.
16792         * kern/loader.c (pupa_loader_load_module_func): Removed.
16793         (pupa_loader_load_module): Likewise.
16795         * kern/dl.c (pupa_dl_load): Use the suffix ``.mod'' instead of
16796         ``.o''.
16798         * include/pupa/i386/pc/loader.h (pupa_linux_prot_size): Declared.
16799         (pupa_linux_tmp_addr): Likewise.
16800         (pupa_linux_real_addr): Likewise.
16801         (pupa_linux_boot_zimage): Likewise.
16802         (pupa_linux_boot_bzimage): Likewise.
16804         * include/pupa/i386/pc/init.h (pupa_lower_mem): Declared.
16805         (pupa_upper_mem): Likewise.
16806         (pupa_gate_a20): Don't export, because turning off Gate A20 in a
16807         module is too dangerous.
16809         * include/pupa/loader.h (pupa_os_area_addr): Declared.
16810         (pupa_os_area_size): Likewise.
16811         (pupa_loader_set): Remove the first argument. Loader doesn't
16812         manage modules or initrd any longer.
16813         (pupa_loader_load_module): Removed.
16815         * conf/i386-pc.rmk (pkgdata_MODULES): Added linux.mod.
16816         (linux_mod_SOURCES): New variable.
16817         (linux_mod_CFLAGS): Likewise.
16819 2003-01-07  Yoshinori K. Okuji  <okuji@enbug.org>
16821         * util/i386/pc/pupa-setup.c (setup): Convert the endianness of
16822         the length of a blocklist correctly.
16824         * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open) [__linux__]:
16825         Use ioctl only if the OS file is a block device.
16826         (pupa_util_biosdisk_open): Don't use ST.ST_BLOCKS, because it is
16827         not very useful for normal files.
16829         * kern/main.c (pupa_set_root_dev): New function.
16830         (pupa_load_normal_mode): Likewise.
16831         (pupa_main): Call those above.
16833         * include/pupa/types.h (pupa_swap_bytes16): Cast the result to
16834         pupa_uint16_t.
16836         * include/pupa/kernel.h (pupa_enter_normal_mode): Removed.
16838 2003-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
16840         * util/i386/pc/pupa-setup.c: Include pupa/machine/kernel.h.
16841         (setup): Configure the installed partition information and the
16842         dl prefix.
16844         * loader/i386/pc/chainloader.c (my_mod): New variable.
16845         (pupa_chainloader_unload): New function.
16846         (pupa_rescue_cmd_chainloader): Refer itself.
16847         (PUPA_MOD_INIT): Save its own module in MY_MOD.
16849         * kern/i386/pc/startup.S (install_partition): Removed.
16850         (version_string): Likewise.
16851         (config_file): Likewise.
16852         (pupa_install_dos_part): New variable.
16853         (pupa_install_bsd_part): Likewise.
16854         (pupa_prefix): Likewise.
16855         (pupa_chainloader_real_boot): Call pupa_dl_unload_all.
16857         * kern/i386/pc/init.c: Include pupa/machine/kernel.h, pupa/dl.h
16858         and pupa/misc.h.
16859         (make_install_device): New function.
16860         (pupa_machine_init): Set the dl prefix.
16862         * kern/rescue.c: Include pupa/rescue.h and pupa/dl.h.
16863         (buf): Renamed to ...
16864         (linebuf): ... this.
16865         (pupa_rescue_cmd_prefix): New function.
16866         (pupa_rescue_cmd_insmod): Likewise.
16867         (pupa_rescue_cmd_rmmod): Likewise.
16868         (pupa_rescue_cmd_lsmod): Likewise.
16869         (pupa_enter_rescue_mode): Register new commands: prefix, insmod,
16870         rmmod and lsmod.
16872         * kern/mm.c (pupa_memalign): If failed even after invalidating
16873         disk caches, unload unneeded modules and retry.
16875         * kern/misc.c (pupa_memmove): New function.
16876         (pupa_memcpy): Removed.
16877         (pupa_strcpy): New function.
16878         (pupa_itoa): Made static.
16880         * kern/dl.c (pupa_dl_iterate): New function.
16881         (pupa_dl_ref): Likewise.
16882         (pupa_dl_unref): Likewise.
16883         (pupa_dl_unload): Return if succeeded or not.
16884         (pupa_dl_unload_unneeded): New function.
16885         (pupa_dl_unload_all): Likewise.
16886         (pupa_dl_init): Renamed to ...
16887         (pupa_dl_set_prefix): ... this.
16888         (pupa_dl_get_prefix): New function.
16890         * include/pupa/i386/pc/kernel.h: Include pupa/types.h.
16891         (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): New macro.
16892         (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
16893         (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
16894         (pupa_install_dos_part): Declared.
16895         (pupa_install_bsd_part): Likewise.
16896         (pupa_prefix): Likewise.
16897         (pupa_boot_drive): Likewise.
16899         * include/pupa/types.h: Fix a typo.
16901         * include/pupa/misc.h (pupa_memcpy): New macro. Just an alias to
16902         pupa_memmove.
16903         (pupa_memmove): Declared.
16904         (pupa_strcpy): Likewise.
16906         * include/pupa/dl.h (PUPA_MOD_INIT): Change the prototype. Now
16907         pupa_mod_init takes one argument, its own module.
16908         (pupa_dl_unload_unneeded): Declared.
16909         (pupa_dl_unload_all): Likewise.
16910         (pupa_dl_ref): Likewise.
16911         (pupa_dl_unref): Likewise.
16912         (pupa_dl_iterate): Likewise.
16913         (pupa_dl_init): Renamed to ...
16914         (pupa_dl_set_prefix): ... this.
16915         (pupa_dl_get_prefix): Declared.
16917         * fs/fat.c [!PUPA_UTIL] (my_mod): New variable.
16918         (pupa_fat_dir) [!PUPA_UTIL]: Prevent the fat module from being
16919         unloaded.
16920         (pupa_fat_open) [!PUPA_UTIL]: Refer itself if succeeded.
16921         (pupa_fat_close) [!PUPA_UTIL]: Unrefer itself.
16923         * configure.ac (tmp_CFLAGS): Added -Wshadow, -Wpointer-arith,
16924         -Wmissing-prototypes, -Wundef and -Wstrict-prototypes.
16926 2003-01-03  Yoshinori K. Okuji  <okuji@enbug.org>
16928         * util/i386/pc/pupa-setup.c (setup): Define the internal
16929         function find_first_partition_start at the top level, because GCC
16930         3.0.x cannot compile internal functions in deeper scopes
16931         correctly.
16932         (find_root_device): Use lstat instead of stat.
16933         Don't follow symbolic links.
16934         Fix the path-constructing code.
16936         * util/i386/pc/biosdisk.c [__linux__] (BLKFLSBUF): New macro.
16937         (pupa_util_biosdisk_open) [__linux__]: Get the size of a device
16938         by a BLKGETSIZE ioctl first, because block devices don't fill
16939         the member st_mode of the structure stat on Linux.
16940         [__linux__] (linux_find_partition): Use a temporary buffer
16941         REAL_DEV for the working space. Copy it to DEV before returning.
16942         (open_device) [__linux__]: Call ioctl with BLKFLSBUF to make the
16943         buffer cache consistent.
16944         (get_os_disk) [__linux__]: Use the length 5 instead of 4 for
16945         strncmp. The previous value was merely wrong.
16946         (pupa_util_biosdisk_get_pupa_dev): Use stat instead of lstat.
16948         * fs/fat.c (pupa_fat_read_data): Shift 4 instead of 12 when the
16949         FAT size is 12. The previous value was merely wrong.
16951         * kern/main.c (pupa_main): Don't split the starting message from
16952         newlines.
16954         * kern/term.c (pupa_putchar): Put CR after LF instead of before
16955         LF, because BIOS goes crazy about character attributes in this
16956         case.
16958 2003-01-03  Yoshinori K. Okuji  <okuji@enbug.org>
16960         * include/i386/pc/util/biosdisk.h: New file.
16961         * util/i386/pc/biosdisk.c: Likewise.
16962         * util/i386/pc/pupa-setup.c: Likewise.
16964         * Makefile.in (INCLUDE_DISTFILES): Added
16965         include/pupa/i386/pc/util/biosdisk.h.
16966         (UTIL_DISTFILES): Added biosdisk.c and pupa-setup.c under the
16967         directory util/i386/pc.
16968         (install-local): Added a rule for sbin_UTILITIES.
16969         (uninstall): Likewise.
16971         * util/i386/pc/pupa-mkimage.c (usage): Fix a typo in the doc.
16973         * util/misc.c (xrealloc): New function.
16974         (pupa_malloc): Likewise.
16975         (pupa_free): Likewise.
16976         (pupa_realloc): Likewise.
16977         (pupa_stop): Likewise.
16978         (pupa_putchar): Likewise.
16980         * kern/disk.c (pupa_disk_read): Prevent L from underflowing.
16982         * include/pupa/util/misc.h (xrealloc): Declared.
16984         * include/pupa/i386/pc/boot.h (PUPA_BOOT_MACHINE_BPB_START): New
16985         macro.
16986         (PUPA_BOOT_MACHINE_BPBEND): Renamed to ...
16987         (PUPA_BOOT_MACHINE_BPB_END): ... this.
16989         * include/pupa/fs.h [PUPA_UTIL] (pupa_fat_init): Declared.
16990         [PUPA_UTIL] (pupa_fat_fini): Likewise.
16992         * fs/fat.c [PUPA_UTIL] (pupa_fat_init): Defined. Maybe a better
16993         way should be implemented.
16994         [PUPA_UTIL] (pupa_fat_fini): Likewise.
16996         * disk/i386/pc/biosdisk.c (pupa_biosdisk_call_hook): Increase
16997         the size of NAME for safety.
16998         (pupa_biosdisk_iterate): Search hard disks to 0x90 instead of
16999         0x88.
17001         * conf/i386-pc.rmk (sbin_UTILITIES): New variable.
17002         (pupa_setup_SOURCES): Likewise.
17004         * genmk.rb (Utility#rule): Add $(BUILD_CFLAGS) into the rules.
17006 2002-12-28  Yoshinori K. Okuji  <okuji@enbug.org>
17008         * kern/i386/pc/startup.S (push_get_mmap_entry): Revert to a
17009         bunch of pushl's from pusha, because this destroys the return
17010         value.
17012 2002-12-28  Yoshinori K. Okuji  <okuji@enbug.org>
17014         Use -mrtd and -mregparm=3 to reduce the generated code sizes.
17015         This means that any missing prototypes could be fatal. Also, you
17016         must take care when writing assembly code. See the comments at
17017         the beginning of startup.S, for more details.
17019         * kern/i386/pc/startup.S (pupa_halt): Modified for the new
17020         compilation mechanism.
17021         (pupa_chainloader_real_boot): Likewise.
17022         (pupa_biosdisk_rw_int13_extensions): Likewise.
17023         (pupa_biosdisk_rw_standard): Likewise.
17024         (pupa_biosdisk_check_int13_extensions): Likewise.
17025         (pupa_biosdisk_get_diskinfo_int13_extensions): Likewise.
17026         (pupa_biosdisk_get_diskinfo_standard): Likewise.
17027         (pupa_get_memsize): Likewise.
17028         (pupa_get_mmap_entry): Likewise.
17029         (pupa_console_putchar): Likewise.
17030         (pupa_console_setcursor): Likewise.
17031         (pupa_getrtsecs): Use pushl instead of push.
17033         * kern/i386/pc/init.c (pupa_machine_init): Use the scratch
17034         memory instead of the stack for a mmap entry, because some
17035         BIOSes may ignore the maximum size and overflow.
17037         * conf/i386-pc.rmk (COMMON_CFLAGS): Added -mrtd and -mregparm=3.
17039         * genmk.rb (PModule#rule): Compile automatically generated
17040         sources with module-specific CFLAGS as well as other sources.
17042 2002-12-27  Yoshinori K. Okuji  <okuji@enbug.org>
17044         * configure.ac: Check ld.
17045         Replace CFLAGS and CPPFLAGS with BUILD_CFLAGS and BUILD_CPPFLAGS
17046         respectively, before checking endianness and sizes.
17048         * Makefile.in (LD): New variable.
17050 2002-12-27  Yoshinori K. Okuji  <okuji@enbug.org>
17052         * Makefile.in (BUILD_CC): CC -> BUILD_CC.
17054 2002-12-27  Yoshinori K. Okuji  <okuji@enbug.org>
17056         * Changelog: New file.